diff --git a/.gitignore b/.gitignore index 80f7631497..26ab3c8d09 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -/*.ys /Cache/ /Meta/ /rosettacode.log -/entry -/pick -/random-clojure-task -/.clj-kondo/ -/.lsp/ diff --git a/Conf/lang.yaml b/Conf/lang.yaml index 72c972e3d8..298e845387 100644 --- a/Conf/lang.yaml +++ b/Conf/lang.yaml @@ -4,7 +4,6 @@ 360 Assembly: '.360' 4D: .4d 4DOS Batch: .4dos -4ME: .4me 6502 Assembly: '.6502' 68000 Assembly: '.68000' 6800 Assembly: '.6800' @@ -23,19 +22,17 @@ Acornsoft Lisp: .lisp Action!: .action ActionScript: .as Acurity Architect: .acurity -Ada: .adb -Adina: .adina -Agda2: .agda2 +Ada: .ada Agda: .agda +Agda2: .agda2 Agena: .agena AHDL: .ahdl -AIDED NATURAL LANGUAGE: .aided Aikido: .aikido Aime: .aime Algae: .algae +ALGOL: .alg ALGOL 60: .alg ALGOL 68: .alg -ALGOL: .alg ALGOL-M: .alg ALGOL W: .alg Alice ML: .alice @@ -53,7 +50,6 @@ Anyways: .anyways Apex: .apex APL: .apl App Inventor: .app -Apple: .apple AppleScript: .applescript Applesoft BASIC: .basic Application Master: .app @@ -63,8 +59,6 @@ Arbre: .arbre Arc: .arc Arendelle: .arendelle Argile: .argile -Aria: .aria -ArkScript: .ark ARM Assembly: .arm ArnoldC: .arnoldc Arturo: .arturo @@ -74,7 +68,7 @@ ASP: .asp AspectC++: .acpp AspectJ: .aspectj ASP.Net: .asp -Assembly: .asm +Assembly: .as AssemblyScript: .asmscript Astro: .astro Asymptote: .asymptote @@ -83,14 +77,15 @@ ATS: .ats AutoHotkey: .ahk Autohotkey V2: .ahk AutoHotKey V2: .ahk -AutoIt: .au3 -AutoLISP: .lsp +AutoIt: .autoit +AutoLISP: .l Avail: .avail AWK: .awk Axe: .axe Axiom: .axiom Axum: .axum Ayrch: .ayrch +B: .b B4J: .b4j B4X: .b4x Babel: .pb @@ -99,13 +94,12 @@ BaCon: .bacon Bait: .bait Ballerina: .ballerina Bas: .bas +BASIC: .basic Basic09: .basic BASIC256: .basic -BASIC: .basic Batari Basic: .basic Batch File: .bat Battlestar: .battlestar -B: .b BBC BASIC: .basic Bc: .bc BCPL: .bcpl @@ -113,7 +107,6 @@ Beads: .beads Beef: .beef Beeswax: .beeswax Befunge: .bf -Berkeley Logo: .logo Beta: .beta Biferno: .biferno Binary Lambda Calculus: .blc @@ -137,26 +130,23 @@ Brat: .brat Brlcad: .brlcad Bruijn: .bruijn Burlesque: .blq +C++: .cpp +C: .c C0H: .c0h C1R: .c1r C2: .c2 C3: .c3 CafeOBJ: .cafeobj -Calc: .calc -Calcscript: .calc Caml: .caml Casio BASIC: .basic Cat: .cat CB80: .cb80 -CBASIC: .basic -C: .c C++/CLI: .cpp -C++: .cpp Cduce: .cduce Cecil: .cecil Ceylon: .ceylon CFEngine: .cfengine -Chapel: .chpl +Chapel: .chapel Chef: .chef Cherrycake: .cherrycake Chipmunk Basic: .basic @@ -165,7 +155,6 @@ ChucK: .chuck Cilk++: .cilk++ Cilk: .cilk Cind: .cind -CJam: .cjam Clarion: .clarion Clay: .clay Clean: .clean @@ -176,7 +165,7 @@ CLIPS: .clips Clojure: .clj CLU: .clu CMake: .cmake -COBOL: .cob +COBOL: .cobol Cobra: .cobra Coco: .coco Coconut: .coconut @@ -189,19 +178,19 @@ Common Lisp: .lisp Component Pascal: .pas Computer/zero Assembly: .0asm ContextFree: .cf -Convex: .convex Coq: .coq Corescript: .core Cowgol: .cowgol Crack: .crack Craft Basic: .basic Creative Basic: .basic -Crystal: .cr +Curto: .curto +Crystal: .crystal C sharp: .cs C Shell: .csh Cubescript: .cube Curry: .curry -Curto: .curto +D: .d Dafny: .dafny Dao: .dao Dart: .dart @@ -210,9 +199,8 @@ DataWeave: .dw DBL: .dbl Dc: .dc DCL: .dcl -D: .d DDNC: .ddnc -Delphi: .pas +Delphi: .delphi Deluge: .deluge DeviousYarn: .dy DIBOL-11: .dibol-11 @@ -224,23 +212,20 @@ DMS: .dms Dodo0: .dodo0 Draco: .draco Dragon: .dragon -Dragonstone: .dragonstone DreamBerd: .dreamberd Dt: .dt -DuckDB: .duckdb DUP: .dup DWScript: .dw Dyalect: .dyalect Dylan: .dylan Dylan.NET: .dylan +E: .e EasyLang: .easy EC: .ec EchoLisp: .l ECL: .ecl Ecstasy: .ecstasy -Ed: .ed EDSAC order code: .edsac -E: .e Eero: .eero Efene: .efene Egel: .egel @@ -253,10 +238,10 @@ Elan: .elan ElastiC: .elastic Elena: .elena Elisa: .elisa -Elixir: .ex +Elixir: .elixir ELLA: .ella Elm: .elm -Emacs Lisp: .el +Emacs Lisp: .l EMal: .emal Emojicode: .emojicode Enguage: .enguage @@ -267,29 +252,28 @@ ERRE: .erre Es: .es ESQL: .esql Euler: .euler -Euphoria: .eu +Euphoria: .euphoria Evaldraw: .evaldraw Excel: .excel Explore: .explore Extended BrainF***: .ebf -Extended Color BASIC: .basic Ezhil: .ezhil +F: .f Factor: .factor Falcon: .falcon 'FALSE': .false -Fancy: .fancy Fan: .fan +Fancy: .fancy Fantom: .fantom FAUST: .faust FBSL: .fbsl -FeatureC++: .cpp Fe: .fe +FeatureC++: .cpp Felix: .felix Fennel: .fennel Ferite: .ferite Fermat: .fermat Fexl: .fexl -F: .f Fhidwfe: .fhidwfe Fish: .fish FLORA-2: .flora2 @@ -310,7 +294,6 @@ Frink: .frink FRISC Assembly: .frisc F Sharp: .fs FTCBASIC: .basic -FuncSug: .funcsug FunL: .funl Furor: .furor FurryScript: .furryscript @@ -340,10 +323,9 @@ GlovePIE: .glovepie GLSL: .glsl GML: .gml Gnuplot: .gnuplot -Goaldi: .goaldi -Goboscript: .gobo Go!: .go Go: .go +Goaldi: .goaldi Golfscript: .golf Golo: .golo Goo: .goo @@ -360,7 +342,7 @@ Halon: .halon Harbour: .harbour Hare: .hare Haskell: .hs -Haxe: .hx +Haxe: .haxe Heron: .heron Hexiscript: .hexi HicEst: .hicest @@ -374,11 +356,10 @@ HQ9+: .hq9+ Huginn: .huginn Hy: .hy HyperTalk: .ht +I: .i Icon: .icon IDL: .idl Idris: .idris -I: .i -Imp77: .imp77 Inform 6: '.inf' Inform 7: '.inf' Informix 4GL: .4gl @@ -393,19 +374,18 @@ Iptscrae: .iptscrae Isabelle: .isabelle IS-BASIC: .basic IWBASIC: .basic +J: .j Jabaco: .jabaco Jack: .jack Jacquard Loom: .jacquard -Jactl: .jactl Jakt: .jakt JAMES II/Rule-based Cellular Automata: .james Janet: .janet -JavaFX Script: .javafx Java: .java +JavaFX Script: .javafx JavaScript: .js JCL: .jcl Jinja: .jinja -J: .j JoCaml: .jocaml JOVIAL: .jovial Joy: .joy @@ -414,34 +394,31 @@ JScript.NET: .jscript JSE: .jse Jsish: .jsish JudoScript: .judo -Julia: .jl +Julia: .julia +K: .k Kabap: .kabap Kamailio Script: .kamailio -Kantalo: .kantalo KAP: .kap Kaya: .kaya Keg: .keg KeyList Databasing: .keylist Kite: .kite Kitten: .kitten -K: .k KL1: .kl1 Klingphix: .klingphix Klong: .klong Koka: .koka -Komodo: .komodo KonsolScript: .konsol -Kotlin: .kts +Kotlin: .kotlin KQL: .kql Ksh: .ksh +L++: .l++ LabVIEW: .labview -Labyrinth: .labyrinth Lambda Prolog: .pro Lambdatalk: .lambdatalk -Lang5: .lang5 Lang: .lang +Lang5: .lang5 Langur: .langur -Lapyst: .lapyst Lasso: .lasso LAST: .last LaTeX: .tex @@ -467,7 +444,6 @@ Little: .little Little Man Computer: .lmc LiveCode: .livecode LiveScript: .live -L++: .l++ LLP: .llp LLVM: .llvm Lobster: .lobster @@ -480,8 +456,8 @@ Lolli: .lolli Lotus 123 Macro Scripting: .lotus123 LotusScript: .lotus Lout: .lout -LSE64: .lse64 LSE: .lse +LSE64: .lse64 LSL: .lsl LSTS: .lsts Lua: .lua @@ -502,8 +478,6 @@ Malbolge: .malbolge MANOOL: .manool Maple: .maple MAPPER: .mapper -MariaDB: .sql -Mastermind: .mastermind Mathcad: .mathcad MathCortex: .mathcortex Mathematica: .math @@ -523,21 +497,20 @@ Metapost: .metapost MGS: .mgs Mia: .mia Microsoft Small Basic: .basic +Min: .min MINIL: .minil Minimal BASIC: .basic MiniScript: .mini MiniZinc: .minizinc -Min: .min MIPS Assembly: .mips Mirah: .mirah Miranda: .miranda MIRC Scripting Language: .mirc Mirelle: .mirelle +ML: .ml ML/I: .mli MLite: .mlite -ML: .ml MMIX: .mmix -Mn: .mn Modula-2: .mod2 Modula-3: .mod3 Mojo: .mojo @@ -547,8 +520,6 @@ Monkey: .monkey Monte: .monte MontiLang: .monti MOO: .moo -MoonBit: .moonbit -MoonRock: .moonrock MoonScript: .moon Morfa: .morfa Mosaic: .mosaic @@ -587,7 +558,6 @@ Nit: .nit Niue: .niue Nix: .nix NLP++: .nlp++ -Nom: .num NOWUT: .nowut NQP: .nqp NS-HUBASIC: .basic @@ -596,27 +566,24 @@ N/t/roff: .ntroff Nu: .nu Nutt: .nutt Nyquist: .nyquist -OASYS Assembler: .oasys OASYS: .oasys -Oberon-07: .oberon +OASYS Assembler: .oasys Oberon: .oberon Objeck: .objeck ObjectIcon: .oi Objective-C: .m -Object Pascal Implementations: .pas Object Pascal: .pas -OCaml: .ml +OCaml: .ocaml Occam: .occam Octave: .octave Odin: .odin Oforth: .fth Ol: .ol Omega: .omega -OmniMark: .xom Onyx: .onyx Onyx (wasm): .onyx -OOCalc: .oocalc OOC: .ooc +OOCalc: .oocalc OoRexx: .rexx Opa: .opa OpenC++: .openc++ @@ -635,9 +602,8 @@ Panoramic: .panoramic ParaCL: .paracl Pare: .pare PARI/GP: .parigp -PascalABC.NET: .pas Pascal: .pas -Pascal-P: .pas +PascalABC.NET: .pas PASM: .pasm PDP-11 Assembly: .pdp11 Pebble: .pebble @@ -646,16 +612,15 @@ Pentium Assembly: .pentium PeopleCode: .peoplecode PepsiScript: .pepsi Peri: .peri +Perl: .pl Perl5i: .p5i Perl 6: .pl6 -Perl: .pl Peylang: .peylang -Phixmonti: .phixmonti Phix: .phix +Phixmonti: .phixmonti PHL: .phl PHP: .php Picat: .picat -Pico-8: .pico8 PicoLisp: .l Pict: .pict Piet: .piet @@ -668,13 +633,12 @@ Plain English: .plain PlainTeX: .tex Plan: .plan PL/B: .plb -PL/I-80: .pli PL/I: .pli +PL/I-80: .pli PL/M: .plm PL/pgSQL: .sql PL/SQL: .sql PLUS: .plus -Pluto: .pluto PLZ/SYS: .plz Pointless: .pointless Polyglot: .polyglot @@ -687,58 +651,56 @@ POV-Ray: .povray PowerBASIC: .basic Powerbuilder: .powerbuilder PowerPC Assembly: .ppc -PowerShell: .ps1 +PowerShell: .psh PPL: .ppl Processing: .processing Processing Python mode: .processing-py Processing.R: .processing-r ProDOS: .dos Prog8: .prog8 -ProgressBASIC: .basic Prolog: .pro PROMAL: .promal PSQL: .psql +Pure: .pure PureBasic: .basic Pure Data: .puredata -Pure: .pure Purity: .purity -Pyret: .arr +Pyret: .pyret Python: .py +Q: .q QB64: .qb64 QBasic: .basic Qi: .qi .QL: .ql QL SuperBASIC: .basic Qore: .qore -Q: .q Quackery: .quackery QuakeC: .c QuickBASIC: .basic Quill: .quill Quite BASIC: .basic Quorum: .quorum +R: .r +Ra: .ra Racket: .rkt Raku: .raku RapidQ: .rapidq Rapira: .rapira -Ra: .ra Rascal: .rascal RASEL: .rasel RATFOR: .ratfor Raven: .raven REALbasic: .basic -Reason: .re -Rebol: .rebol +Reason: .reason REBOL: .rebol Red: .red Reduce: .reduce Refal: .refal Relation: .relation -ReScript: .res +ReScript: .re Retro: .retro Revolution: .rev REXX: .rexx -Rhombus: .rhombus Rhope: .rhope Rhovas: .rhovas Ring: .ring @@ -746,31 +708,28 @@ RISC-V Assembly: .asm RLaB: .rlab RLSL: .rlsl Robotic: .robotic -Rockstar: .rockstar -Rocq: .rocq Roc: .roc -RPGIV: .rpgiv +Rockstar: .rockstar RPG: .rpg -RPL/2: .rpl2 +RPGIV: .rpgiv RPL: .rpl -R: .r +RPL/2: .rpl2 RTL/2: .rtl2 RTSL: .rtsl Rubylog: .rubylog Ruby: .rb Run BASIC: .basic -Rust: .rs -Rye: .rye +Rust: .rust +S++: .s++ Sage: .sage Salmon: .salmon -SapbotVM: .sapbot -SASL: .sasl SAS: .sas +SASL: .sasl Sass/SCSS: .sass Sather: .sa S-BASIC: .basic Scala: .scala -Scheme: .scm +Scheme: .ss Scilab: .scilab Scratch: .scratch ScratchScript: .scratch @@ -782,15 +741,14 @@ Seed7: .seed7 Self: .self SenseTalk: .sensetalk SequenceL: .sequencel +SETL: .setl Setl4: .setl4 Set lang: .set -SETL: .setl Shale: .shale SheerPower 4GL: .4gl Shen: .shen Shiny: .shiny Sidef: .sidef -SIL: .sil SimpleCode: .simplecode SimpleLang: .simple SIMPOL: .simpol @@ -807,8 +765,8 @@ Smalltalk: .st Smart BASIC: .basic SMEQL: .smeql SmileBASIC: .basic -SNOBOL4: .sno Snobol: .sno +SNOBOL4: .sno SNUSP: .snusp Soar: .soar Soda: .soda @@ -816,15 +774,14 @@ SoneKing Assembly: .soneking SPAD: .spad SPARC Assembly: .sparc SparForte: .sparforte -Sparkling: .sparkling SPARK: .spark +Sparkling: .sparkling Spin: .spin SPL: .spl SPSS: .spss -SQL PL: .sql SQL: .sql +SQL PL: .sql Squirrel: .nut -S++: .s++ SSEM: .ssem Standard ML: .ml Star: .star @@ -845,23 +802,22 @@ SystemVerilog: .v TailDot: .taildot Tailspin: .tailspin TAL: .tal -TAV: .tav Tbas: .tbas Tcl: .tcl TechBASIC: .basic Teco: .teco TeLa: .tela Tern: .tern -Terraform: .terraform Terra: .terra +Terraform: .terraform TestML: .tml Thistle: .thistle Thyrd: .thyrd +TI BASIC: .basic TI-57: .ti57 TI-83 BASIC: .basic TI-83 Hex Assembly: .asm TI-89 BASIC: .basic -TI BASIC: .basic Tiny BASIC: .basic Tiny Craft Basic: .basic TIS-100: .tis100 @@ -894,30 +850,31 @@ Uiua: .uiua Ultimate++: .ultimate++ Unicon: .unicon Uniface: .uniface -Unison: .u +Unison: .unison UnixPipes: .up UNIX Shell: .sh Unlambda: .unlambda -Ursalang: .ursa -Ursala: .ursala Ursa: .ursa +Ursala: .ursala +Ursalang: .ursa UScript: .u UserRPL: .rpl UTFool: .utfool Uxntal: .uxnatl +V: .v Vala: .vala Vale: .vale VAX Assembly: .vax VB6: .vb6 VBA: .vba -VBScript: .vbs +VBScript: .vb Vedit macro language: .vedit Verbexx: .verbexx Verilog: .v -VHDL: .vhd +VHDL: .vhdl Vim Script: .vim -Visual Basic .NET: .vb Visual Basic: .vb +Visual Basic .NET: .vb Visual FoxPro: .fvp Visual Objects: .vobj Visual Prolog: .pro @@ -926,10 +883,7 @@ Vorpal: .vorpal Vox: .vox VRML: .vrml VTL-2: .vtl-2 -V: .v V (Vlang): .v -Vyxal: .vyxal -Waduzitdo: .waduzitdo Wart: .wart WDTE: .wdte WebAssembly: .wasm @@ -951,32 +905,31 @@ XBase: .xbase XBasic: .basic XBS: .xbs XEec: .xeec -XLISP: .l XL: .xl +XLISP: .l Xojo: .xojo XPath 2.0: .xpath XPL0: .xpl0 XProc: .xproc XProfan: .xprofan XQuery: .xquery -X-script: .x +XS: .xs +XSLT: .xslt XSLT 1.0: .xslt XSLT 2.0: .xslt -XSLT: .xslt -XS: .xs XTalk: .xtalk XUL: .xul +Ya: .ya Yabasic: .basic Yacas: .yacas YAMLScript: .ys -Ya: .ya Yorick: .yorick Z80 Assembly: .z80 ZED: .zed Zig: .zig Zkl: .zkl -Zoea Visual: .zoea Zoea: .zoea +Zoea Visual: .zoea Zonnon: .zonnon Zoomscript: .zoom ZPL: .zpl diff --git a/Lang/11l/Bioinformatics-base-count b/Lang/11l/Bioinformatics-base-count new file mode 120000 index 0000000000..d8c9e2572d --- /dev/null +++ b/Lang/11l/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/11l \ No newline at end of file diff --git a/Lang/11l/Meissel-Mertens-constant b/Lang/11l/Meissel-Mertens-constant new file mode 120000 index 0000000000..908ef16ca2 --- /dev/null +++ b/Lang/11l/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/11l \ No newline at end of file diff --git a/Lang/11l/Miller-Rabin-primality-test b/Lang/11l/Miller-Rabin-primality-test new file mode 120000 index 0000000000..cec9772a16 --- /dev/null +++ b/Lang/11l/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/11l \ No newline at end of file diff --git a/Lang/11l/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/11l/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/11l/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/11l/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/11l/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/11l/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/11l/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/11l/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/11l/Sorting-Algorithms-Circle-Sort b/Lang/11l/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..38059f4dea --- /dev/null +++ b/Lang/11l/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/11l \ No newline at end of file diff --git a/Lang/4D/00-LANG.txt b/Lang/4D/00-LANG.txt index 8c8b507919..d591e6be7f 100644 --- a/Lang/4D/00-LANG.txt +++ b/Lang/4D/00-LANG.txt @@ -1,6 +1,3 @@ -{{stub}} -{{language|4D -|site=https://us.4d.com/ -}}{{IDE}}'''4D''' (or '''4th Dimension''') is a database management system and [[:Category:Integrated Development Environments|integrated development environment]] authored by Laurent Ribardière in 1984. +{{stub}}{{language|4D}}{{IDE}}'''4D''' (or '''4th Dimension''') is a database management system and [[:Category:Integrated Development Environments|integrated development environment]] authored by Laurent Ribardière in 1984. ==Citations== *[[wp:4th_Dimension_%28Software%29|Wikipedia:4th Dimension (Software)]] \ No newline at end of file diff --git a/Lang/4ME/00-LANG.txt b/Lang/4ME/00-LANG.txt deleted file mode 100644 index d297ba9483..0000000000 --- a/Lang/4ME/00-LANG.txt +++ /dev/null @@ -1,7 +0,0 @@ -{{language|4ME -|site=https://thevitebsk.github.io/4ME.by/}} -4ME is a programing language created by [[User:Gaham]] implemented in 04.07.2024 MSK -==See Also== -* [https://esolangs.org/wiki/4ME 4ME in Esolangs.org] -* [https://github.com/Thevitebsk/4me/ Github repo] -[[Category:Programming paradigm/Concatenative]] \ No newline at end of file diff --git a/Lang/4ME/00-META.yaml b/Lang/4ME/00-META.yaml deleted file mode 100644 index f0031de2c3..0000000000 --- a/Lang/4ME/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:4ME diff --git a/Lang/6502-Assembly/00-LANG.txt b/Lang/6502-Assembly/00-LANG.txt index 1273acfa02..a7fa28ad34 100644 --- a/Lang/6502-Assembly/00-LANG.txt +++ b/Lang/6502-Assembly/00-LANG.txt @@ -131,29 +131,6 @@ This flag is set if the BRK command was executed. The BRK basically * Set with: BRK * Cleared with: RTI * There are no branches associated with this command. - -This flag is used only for differentiating a BRK from an hardware IRQ -IRQ: - STA saveAccumulator ; save accumulator - PLA ; get flags - STA saveFlags ; save flags - AND #$10 ; check "break" flag - BNE IRQ_fromBreak ; if(break flag set){ goto IRQ_fromBreak; } - JMP IRQ_fromHardware ; else{ goto IRQ_fromInterrupt; } -IRQ_fromBreak: - LDA saveFlags ; load flags from temp address - PHA ; restore flags to stack - LDA saveAccumulator ; restore accumulator - ;... - RTI ; return from interrupt - -IRQ_fromInterrupt: - LDA saveFlags ; load flags from temp address - PHA ; restore flags to stack - LDA saveAccumulator ; restore accumulator - ;... - RTI ; return from interrupt -

===Decimal=== diff --git a/Lang/68000-Assembly/00-LANG.txt b/Lang/68000-Assembly/00-LANG.txt index 245cbaaea5..cfd37d0eae 100644 --- a/Lang/68000-Assembly/00-LANG.txt +++ b/Lang/68000-Assembly/00-LANG.txt @@ -3,36 +3,31 @@ {{language}} 68000 assembly is the assembly language used for the Motorola 68000, or commonly known as the 68K. It should not be confused with the 6800 (which predates it). The Motorola 68000 is a big-endian processor with full 32-bit capabilities (despite most systems that use it being considered 16-bit.) It was used in many computers such as the Amiga or the Canon Cat, as well as game consoles such as the Sega Genesis and Neo Geo. + ==Architecture Overview== ===Big-Endian=== The 68000, unlike most processors of its era, is big-endian. This means that bytes are stored from left to right. The example below illustrates this concept: - -MOVE.L #$12345678,$100000 ;store the hexadecimal numeral #$12345678 at memory address $100000 - +MOVE.L #$12345678,$100000 ;store the hexadecimal numeral #$12345678 at memory address $100000 -
 ;hexdump of $100000:
 ;$100000 = $12
 ;$100001 = $34
 ;$100002 = $56
-;$100003 = $78
-
+;$100003 = $78
On a little-endian processor such as in [[x86 Assembly]], the order of the bytes would be reversed, i.e.: -
-;hexdump of $100000
+;hexdump of $100000
 ;$100000 = $78
 ;$100001 = $56
 ;$100002 = $34
-;$100003 = $12
-
+;$100003 = $12 -The main difference is that if you wanted to access this value as a byte or word it would be at a different address, whereas with a little endian architecture it is at the same address. +This difference isn't usually relevant in the majority of situations, so don't concern yourself too much. It's much more important when doing [[6502 Assembly]] where registers are smaller than the address space. ===Notation Conventions=== How you write the source code depends on your assembler and the syntax it uses. This page is written using Motorola syntax but there is also Milo syntax which has different conventions. -How you go about defining numbers or text in your code varies wildly between assemblers. +How you go about defining numbers or text in your code varies wildly between assemblers. I'm using VASM and these are the rules I have to follow, but your assembler may be different. * A number with a # in front represents a constant, literal value. For example, the 3 in MOVE.B #3,D0 represents the number 3. @@ -50,88 +45,72 @@ How you go about defining numbers or text in your code varies wildly between ass * The operand before the comma is the "source", and the operand after is the "destination." For example, MOVE.L D3,D2 takes the value in D3 and stores it into D2, not the other way around. This is the opposite of x86 and ARM, which have the source on the right and the destination on the left. -Data blocks, on the other hand, begin with DC.B, DC.W, or DC.L and each represents a constant numeric value. You do NOT prefix these with # to signify them as constants (doing so will cause an error on most assemblers). However, you can use the $ or % modifiers to denote hexadecimal or binary. + +Data blocks, on the other hand, begin with DC.B, DC.W, or DC.L and each represents a constant numeric value. Strangely, you do NOT prefix these with # to signify them as constants (doing so will cause an error on most assemblers). However, you can use the $ or % modifiers to denote hexadecimal or binary. Keep in mind that there is no requirement to use hexadecimal, decimal, or binary in your source code. It all gets converted to binary anyway. However, it is recommended to use the notation that is appropriate for how your data is meant to be interpreted, for readability purposes. ===Data Registers=== There are eight 32-bit data registers on the 68000, numbered D0-D7. As the name implies, these are designed to hold data. Much like in [[ARM Assembly]], each one is identical in terms of which commands it can use. A command that can be used for D0 can be used for any other D-register. - -MOVE.B #$FF,D0 ;move the hexadecimal value 0xFF into the bottom byte of D0. -ADD.W #$8000,D4 ;add hexadecimal 0x8000 to the value stored in D4. - +MOVE.B #$FF,D0 ;move the hexadecimal value 0xFF into the bottom byte of D0. +ADD.W #$8000,D4 ;add hexadecimal 0x8000 to the value stored in D4. ===Address Registers=== There are eight of these as well, numbered A0-A7. A7 is reserved as the stack pointer, and is commonly referenced as SP in assemblers. The others are free to use for any purpose. Although these registers are 32-bit, the 68000's address space is 24-bit (ranges from 0x000000 to 0xFFFFFF), so the leftmost byte is ignored. You can do simple math involving these registers but more complicated commands like multiply or divide can only be used with data registers. Address registers are used to contain addresses and extract the values stored within. ====Loading From Memory==== - -MOVEA.L #$200000,A2 ;usually these are loaded from a label. +MOVEA.L #$200000,A2 ;usually these are loaded from a label. ;The hex dump of address $200000: 44 55 66 77 MOVE.L #$00000000,D0 MOVE.B (A2),D0 ;load the byte stored at $200000 into D0. D0 = #$00000044 MOVE.W (A2),D0 ;load the word stored at $200000 into D0. D0 = #$00004455 MOVE.L (A2),D0 ;load the long stored at $200000 into D0. D0 = #$44556677 -MOVE.L D2,(A5) ;store the contents of D2 into the memory address pointed to by A5. - +MOVE.L D2,(A5) ;store the contents of D2 into the memory address pointed to by A5. + Note that it's also possible to transfer values to/from memory directly, without involving address registers at all. For constant memory locations, this is fine. However, the real strength of the address registers is in their pre-decrement and post-increment modes, which constant memory locations cannot use. - -MOVE.L ($00FF0000),D0 +MOVE.L ($00FF0000),D0 MOVE.W D1,($00FFFFFE) -MOVE.W ($00FF0000),($00FF1000) - +MOVE.W ($00FF0000),($00FF1000) The use of parentheses is not required on most assemblers, but can be used as a reminder to someone reading your code that these represent the values stored at the specified memory locations rather than literal numbers. ====Post-Increment==== The post-increment mode is specified by adding a + to the end of parentheses. This means that after the command is done, the address stored in the address register (not the value stored at that address) is increased by the byte length of the command (1 for .B, 2 for .W, 4 for .L). - -MOVEA.L #$00240000,A4 ;load the address $240000 into A4 +MOVEA.L #$00240000,A4 ;load the address $240000 into A4 MOVE.W (A4)+,D0 ;move the word stored at $240000 into D0, then increment to #$240002 MOVE.L (A4)+,D1 ;move the long stored at $240000 into D1, then increment to #$240006 -MOVE.L (SP)+,D3 ;pop the top value of the stack into D3 - +MOVE.L (SP)+,D3 ;pop the top value of the stack into D3 ====Pre-Decrement==== The pre-decrement mode is specified by typing a - before the parentheses. This means that before the command is done, the address stored in the address register is decreased by the byte length of the command. -MOVEA.L #$0024000A,A4 ;load the address $24000A into A4 +MOVEA.L #$0024000A,A4 ;load the address $24000A into A4 MOVE.W -(A4),D0 ;move the word stored at $240008 into D0 MOVE.L -(A4),D1 ;move the long stored at $240004 into D1 -MOVE.L D2,-(SP) ;push the contents of D2 onto the stack +MOVE.L D2,-(SP) ;push the contents of D2 onto the stack ====Address Offsets==== A memory address can be offset by a data register, an immediate value, or both. If a data register is used, only the bottom 2 bytes are considered. In either case, the contents of the data register and/or the immediate value are added to the value stored in the address register, and the value is read from that address at the specified length. The offsets are applied during the calculation only; the actual contents in the address register after the move are unchanged. Using a post-increment or pre-decrement with this addressing mode will only update the address by the specified length, not by the offsets. - -MOVE.B (4,A0,D0),D1 ;The byte at A0+D0+4 is loaded into D1. - - +MOVE.B (4,A0,D0),D1 ;The byte at A0+D0+4 is loaded into D1. It's possible to use the same data register as the offset and the destination. This does not cause any problems whatsoever, as the data register offset is "locked in" before the move, and is only updated after the command fully executes. Using the same command again immediately afterwards will offset based on the new value of that register. - -MOVE.W (6,A0,D0),D0 ;The word at A0+D0+6 is read, then loaded into D0. - - +MOVE.W (6,A0,D0),D0 ;The word at A0+D0+6 is read, then loaded into D0. A very important note is that when using this method with words and longs, the resulting address must be even! Otherwise the CPU will crash. For MOVE.B it doesn't matter. ====Effective Address==== A calculated offset can be saved to an address register with the LEA command, which stands for "Load Effective Address." [[x86 Assembly]] also has this command, and it serves the same purpose. The syntax for it can be a bit misleading depending on your assembler. - -LEA myData,A0 ;load the effective address of myData into A0 +LEA myData,A0 ;load the effective address of myData into A0 LEA (4,A0),A1 ;load into A1 the effective address A0+4. This looks like a dereference operation but it is not! -MOVE.W (A1),D1 ;dereference A1, loading the value it points to into D1. - +MOVE.W (A1),D1 ;dereference A1, loading the value it points to into D1. This can get confusing, especially if you have tables of pointers. Just remember that LEA cannot dereference an address. If you don't want to store the effective address in an address register, you can use PEA (push effective address) to put it onto the stack instead. - -LEA myData,A0 ;load the effective address of myData into A0 -PEA (4,A0) ;store the effective address of A0+4 onto the stack. - +LEA myData,A0 ;load the effective address of myData into A0 +PEA (4,A0) ;store the effective address of A0+4 onto the stack. ====The Stack==== The 68000's stack is commonly referred to as SP but it is also address register A7. This register is handled differently than the other address registers when pushing bytes onto the stack. A byte value pushed onto the stack will be padded to the right. The stack needs to pad byte-length data so that it can stay word-aligned at all times. Otherwise the CPU would crash as soon as you tried to use the stack for anything other than a byte! @@ -145,48 +124,48 @@ The 68000 can work with 8-bit, 16-bit, or 32-bit values. Some commands only work If you don't specify a length with your command, it usually defaults to word length, but ultimately it depends on the command you are using. (Some commands cannot be used at word length.) Bytes and words moved into a register are always stored on the right-hand side. For example: - -MOVE.L #$FFFFFFFF,D7 +MOVE.L #$FFFFFFFF,D7 MOVE.B #$00,D7 ;D7 contains #$FFFFFF00 -MOVE.W #$2222,D7 ;D7 contains #$FFFF2222 - +MOVE.W #$2222,D7 ;D7 contains #$FFFF2222 As you can see, the rest of the register is unchanged. (On the ARM, it would turn to zeroes.) This is very important to remember. If your code is doing something unexpected it might be due to the "old" value of the register corrupting another function. If the given constant is smaller than the length provided, the value is padded to the left with zeroes. - -MOVE.W #$FF,D3 ;D3 = #$xxxx00FF, where x is the previous value of D3. -MOVE.L #0,D3 ;D3 = #$00000000 - +MOVE.W #$FF,D3 ;D3 = #$xxxx00FF, where x is the previous value of D3. +MOVE.L #0,D3 ;D3 = #$00000000 Loading immediate values into address registers is different. You can only move words or longer into address registers, and if you move a word, the value is sign-extended. This means that if the top nibble of the word is 8 or greater, the value gets padded to the left with Fs, and is padded with zeroes if the top nibble is 7 or less. If you're adding a constant value less than 7FFF to an address, it's usually safe to use the word length operation, which takes less bytes to encode than the long length version. - -MOVEA.W #$8000,A4 ;A4 = #$FFFF8000. Remember the top byte is ignored so this is the same as #$00FF8000. -MOVEA.W #$7FFF,A3 ;A3 = #$00007FFF - +MOVEA.W #$8000,A4 ;A4 = #$FFFF8000. Remember the top byte is ignored so this is the same as #$00FF8000. +MOVEA.W #$7FFF,A3 ;A3 = #$00007FFF ==The Flags== The flags are stored in the Condition Code Register, also known as the CCR. The 68000 has no built-in commands like CLC for clearing/setting individual flags. Rather, you can alter them directly with MOVE,AND,OR, and EOR. Unfortunately, this means you'll have to remember which bits represent which flags. Or, if your assembler supports macros, you can define a macro that handles this for you. The flags update automatically after most operations, and take into consideration the operand sizes when doing so. Check out this example: - + MOVE.L #$12FF,D0 ADD.B #1,D0 - + Since we used ADD.B, D0 now contains $1200, and the extend, carry, and zero flags are all set. Had we done ADD.W, we would get $1300 in D0 with none of those flags set. The flags are based on what the actual instruction "sees", not the entire register at all times. * X: The eXtend flag is bit 4 of the CCR, and is similar to the carry flag. It gets set and cleared often for the same reasons and is used with the ADDX, SUBX, NEGX, ROXL, and ROXR commands. Why the 68000 has both this and the carry flag, I still don't know. + * N: The negative flag is bit 3 of the CCR, and is set when the last operation resulted in a "negative" value. What constitutes a negative value depends on the size of the last operation - for .B instructions, $80-$FF. For .W instructions, $8000-$FFFF, and for .L instructions, $80000000-$FFFFFFFF. + * Z: The zero flag is bit 2 of the CCR and works like you would expect - it's set whenever an operation results in zero. Unlike x86 Assembly, this also includes moving 0 directly into a register, clearing a register or memory with CLR, etc. + * V: The overflow flag is bit 1 of the CCR. It is set whenever a math operation results in a value crossing the $7F-$80 boundary. (Wraparound from 00 to FF doesn't count as overflow, but it does set the carry flag.) + * C: The carry flag is bit 0 of the CCR. It is set when a math operation results in a carry or borrow. Rolling over from FF to 00, or a 1 getting "pushed out" via a bit shift or rotate, set the carry flag. When using CMP, the carry flag determines the unsigned magnitude comparison. Carry set is less than, carry clear is greater than or equal. + + In truth, the flags are a 16-bit register, of which the CCR is just the "low half". The SR (status register) is the full 16-bit register. There are a few additional flags in the upper half, which are used by the operating system. You can read these but for the most part you won't need to write to them. @@ -210,15 +189,13 @@ The 68000 supports 7 different interrupts, often called IRQs or Interrupt Reques ==Alignment== The 68000 can only read or write words and longs at even addresses. Doing so at an odd address will result in the CPU crashing. (Note that reading byte data will not cause a crash regardless of whether it's located at an odd or even address.) This isn't usually a problem, but it can be if the programmer is not careful with the way their data is organized. Consider the following example: - -TestData: +TestData: DC.B $02 DC.W $0345 LEA TestData,A0 ;load effective address of TestData into A0. MOVE.B (A0)+,D0 ;load $02 into D0, increment A0 by 1 -MOVE.W (A0)+,D1 ;this crashes the CPU since A0 is now odd - +MOVE.W (A0)+,D1 ;this crashes the CPU since A0 is now odd How was it known that the address was odd at the second instruction? Simple. All instructions take an even number of bytes to encode. So there are only a few ways improper alignment can occur: * An odd value is loaded into an address register. @@ -228,23 +205,18 @@ How was it known that the address was odd at the second instruction? Simple. All If the programmer is smart with the way they encode byte-length data they can avoid this problem entirely with little effort. One way is to separate byte-length data into its own table. - -ByteData: +ByteData: DC.B $20,$40,$60,$80 WordData: -DC.W $1000,$2000,$3000,$4000 - +DC.W $1000,$2000,$3000,$4000 Another way is to pad the data with an extra byte, so that there is an even number of entries in the table. This becomes impractical with large data tables, so the EVEN directive can be placed after a series of bytes. If the byte count is odd, EVEN will pad the data with an extra byte. If it's already even, the EVEN command is ignored. This saves you the trouble of having to count a long series of bytes without worrying about wasting space. - -MyString: DC.B "HELLO WORLD 12345678900000",0 -EVEN ;some assemblers require this to be on its own line - +MyString: DC.B "HELLO WORLD 12345678900000",0 +EVEN ;some assemblers require this to be on its own line A third way is to perform a "dummy read." This is when a value is read from an address using pre-decrement or post-increment, with the sole purpose of moving the pointer, and the value being read is of zero interest. This method lets you work with mixed data types in the same table, but it requires the programmer to know in advance where the byte-length data begins and ends. - -TestData: +TestData: DC.B $02,$03,$04 DC.W $0345 @@ -255,8 +227,7 @@ MOVE.B (A0)+,(A1)+ ;copy $04 to a new memory location ;if we did MOVE.W (A0)+,(A1)+ now we'd crash. First we need to adjust the pointers. MOVE.B (A0)+,D7 ;dummy read to D7. Now A0 is word aligned. MOVE.B (A1)+,D7 ;dummy read to D7. Now A1 is word aligned. -MOVE.W (A0)+,(A1)+ ;copy $0345 to a new memory location - +MOVE.W (A0)+,(A1)+ ;copy $0345 to a new memory location Using ADDA.L #1,A0 and ADDA.L #1,A1 would have worked also, instead of the dummy read. The 68000 gives the programmer a lot of different ways to do a task. diff --git a/Lang/68000-Assembly/Musical-scale b/Lang/68000-Assembly/Musical-scale deleted file mode 120000 index 0a23b13b4e..0000000000 --- a/Lang/68000-Assembly/Musical-scale +++ /dev/null @@ -1 +0,0 @@ -../../Task/Musical-scale/68000-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Align-columns b/Lang/8080-Assembly/Align-columns deleted file mode 120000 index d9134cb487..0000000000 --- a/Lang/8080-Assembly/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Display-a-linear-combination b/Lang/8080-Assembly/Display-a-linear-combination deleted file mode 120000 index 5e499be357..0000000000 --- a/Lang/8080-Assembly/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Integer-comparison b/Lang/8080-Assembly/Integer-comparison deleted file mode 120000 index e48c1e8ea4..0000000000 --- a/Lang/8080-Assembly/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Loops-Infinite b/Lang/8080-Assembly/Loops-Infinite deleted file mode 120000 index f6336ebca0..0000000000 --- a/Lang/8080-Assembly/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Ordered-words b/Lang/8080-Assembly/Ordered-words deleted file mode 120000 index eee238f68d..0000000000 --- a/Lang/8080-Assembly/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Run-length-encoding b/Lang/8080-Assembly/Run-length-encoding deleted file mode 120000 index bc3ed9076c..0000000000 --- a/Lang/8080-Assembly/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Sieve-of-Eratosthenes b/Lang/8080-Assembly/Sieve-of-Eratosthenes deleted file mode 120000 index ddc8441b98..0000000000 --- a/Lang/8080-Assembly/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Square-but-not-cube b/Lang/8080-Assembly/Square-but-not-cube deleted file mode 120000 index e8de867485..0000000000 --- a/Lang/8080-Assembly/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Twos-complement b/Lang/8080-Assembly/Twos-complement deleted file mode 120000 index 86928fcdc9..0000000000 --- a/Lang/8080-Assembly/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/8080-Assembly \ No newline at end of file diff --git a/Lang/8080-Assembly/Zeckendorf-number-representation b/Lang/8080-Assembly/Zeckendorf-number-representation deleted file mode 120000 index b0569b898c..0000000000 --- a/Lang/8080-Assembly/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/8080-Assembly \ No newline at end of file diff --git a/Lang/8086-Assembly/00-LANG.txt b/Lang/8086-Assembly/00-LANG.txt index 9120d12d87..7cf10761fa 100644 --- a/Lang/8086-Assembly/00-LANG.txt +++ b/Lang/8086-Assembly/00-LANG.txt @@ -4,13 +4,13 @@ ===Segmented Memory=== The 8086 uses a segmented memory model, similar to the Super Nintendo Entertainment System. Unlike banked memory models used in the Commodore 64 and late NES games, segment addresses are held in segment registers. These segment registers are 16 bit and get left-shifted by 4 and added to the pointer register of interest to determine the memory address to look up. The 8086 has four in total, but only the DS and ES registers can be used by the programmer. (The other two work with the stack pointer and instruction pointer, and are loaded for you.) On the 8086, you can only load segment registers with the value in a data register, or with the POP command. So first you must load a segment into a data register, THEN into a segment register. -;This is NOT valid code! +;This is NOT valid code! mov ds, @data ;you're trying to move the data segment location directly into DS. You can't! ;This is the proper way: mov ax, @data ;I chose AX but I could have used BX, CX, or DX. -mov ds, ax ;load DS with the data segment. +mov ds, ax ;load DS with the data segment. It's important to remember the subtle distinction between a ''segment'' and a ''segment register.'' Your program might have labeled ''segments'' such as .data and .code, but in order to properly read from/write to these sections you'll need to load their memory locations into ''segment registers.'' @@ -18,17 +18,17 @@ It's important to remember the subtle distinction between a ''segment'' and a '' There are four data registers: AX, BX, CX, and DX. While most commands can use any of them, some only work with particular data registers. System calls in particular are very specific about which registers can be used for what. On [[MS-DOS]], the AX register is used for selecting the desired interrupt to use with the INT command. Each data register is 16-bit, but has two eight bit halves ending in H or L, e.g. AH, AL. Instructions can be executed using the whole register or just half of it. -mov ax, 1000h ;move 1000h into AX, or equivalently, move 10h into AH and 00h into AL. +mov ax, 1000h ;move 1000h into AX, or equivalently, move 10h into AH and 00h into AL. Moving a value smaller than 16 bits into ?X is the same as moving it into ?L, and moving 0 into ?H. (? represents the data register of your choice. They are all the same in this regard.) -mov ax,0030h +mov ax,0030h ;is the same as: mov al, 30h -mov ah, 0h +mov ah, 0h Commands that alter the contents of a single register will not affect the other half. -mov ax,00FFh -inc al +mov ax,00FFh +inc al If we had executed INC AX, then AX would have been incremented to 0x100. Since we only incremented AL, only AL was incremented in this case, and AH '''still equals 0x00!''' Generally speaking, the 8086's registers serve the following purposes: @@ -42,24 +42,24 @@ When writing to or reading from consecutive sections of memory, it is helpful to The syntax for offsetting an index register will vary depending on your assembler. Many assemblers will often accept multiple different ways of writing it, and it comes down to personal preference. -mov si, offset MyArray +mov si, offset MyArray mov bx,2 mov al,[bx+si] ;loads decimal 30 into AL MyArray: -byte 10,20,30,40,50 +byte 10,20,30,40,50 ===The Stack=== As with [[Z80 Assembly]], you can't push 8-bit registers onto the stack. For data registers, you have to push/pop both halves. -;This is valid code. +;This is valid code. push ax push bx pop bx pop ax -;This is NOT valid code. +;This is NOT valid code. push ah push al push bh @@ -69,14 +69,14 @@ push bl pop bl pop bh pop al -pop ah +pop ah As with all processors that use a stack, if you push one or more registers and want to restore the backed-up values correctly, you must pop them in the reverse order. You can pop them out of order on purpose to swap registers around. In fact, this is a quick way to move the segment from DS into ES, or vice-versa: -push DS -pop ES ;you can't do "mov es, ds" but you can do this! +push DS +pop ES ;you can't do "mov es, ds" but you can do this! The proper way to use the stack to preserve registers: - + call foo mov ax,4C00h @@ -91,7 +91,7 @@ push cx pop cx pop bx pop ax -ret +ret If one of the push/pop commands in the routine above were missing, the RET instruction would not properly return to where it came from. As long as you pop at the end the same number of registers you pushed at the start, the stack is "balanced" and your return instruction will return correctly. This is because RET is actually POP IP (IP being the instruction pointer, which you can think of as what "line" of code the CPU is on.) The CPU assumes the top of the stack is the correct place to return to, but has no way of actually verifying it. If the function you just wrote causes the CPU to crash or jump to a completely different part of the code, there's a good chance you might have forgotten to balance the stack properly. @@ -107,40 +107,40 @@ One other caveat to mention: On early IBM PCs and compatibles, the 8087 was not ===Looping Constructs=== The 8086 has a lot more of these than most CPUs. The most obvious one is LOOP, which will subtract 1 from CX, then jump back to a specified label if CX is nonzero after the subtraction. If CX becomes zero after subtracting 1, then no jump will occur and the instruction pointer simply moves to the next instruction. -mov cx,0100h ;set the loop counter's starting value. This must be outside the loop, otherwise you'll loop forever! +mov cx,0100h ;set the loop counter's starting value. This must be outside the loop, otherwise you'll loop forever! foo: ;; your code that you want to loop goes here -loop foo +loop foo It's important not to alter CX inside the loop. It's easy to make a mistake like this if you're in a hurry: -foobar: +foobar: mov cx,1000h ;your code goes here -loop foobar +loop foobar It may not be obvious at first but the above loop will never end. CX decrements to 0x0FFF with the LOOP instruction but the mov cx,1000h was mistakenly placed ''inside'' the loop, resetting the loop counter back to 0x1000, which means no progress is really being made. The correct way to do this is to set the starting loop counter '''outside''' the loop, like so: -mov cx,1000h +mov cx,1000h foobar: ;your code goes here -loop foobar +loop foobar Sometimes you'll have to change CX during a loop, like if you want to do bit shifts with a shift amount other than 1, for example. There's a simple fix - use the stack to stash and retrieve the loop counter. -mov cx,0100h +mov cx,0100h foo: push cx mov cl,2 ror ax,cl ;starting with the 80186 you don't need CL for bit shifting. pop cx -loop foo +loop foo By using PUSH CX and POP CX, you can temporarily use CX for something else, as long as you restore it before the LOOP instruction. You can use other registers as loop counters as well, but not with the LOOP instruction - it's hardcoded to only work with CX. But you can do this: -mov dx,0100h +mov dx,0100h baz: ;your code goes here dec dx @@ -148,7 +148,7 @@ jnz baz ; A minor note for advanced programmers: ; If you're expecting the flags to be in a particular state based on the loop body, tough luck! ; They'll only reflect the decrement of DX from 1 to 0 at this point in the code. -; LOOP doesn't change the flags, which makes it more useful for loops meant to compare things. +; LOOP doesn't change the flags, which makes it more useful for loops meant to compare things. Another frequently used looping construct is REP. REP can be combined with certain instructions to repeat that instruction until CX equals zero. However, unlike LOOP, which can be used to repeat a block of instructions, REP can only repeat one. It doesn't work on all instructions, only the "string" instructions which operate on a block of memory. Typically these include MOVSB, LODSB, STOSB, CMPSB, and SCASB (each has a variant that ends in W instead of B, for 16-bit data.) There are also REPZ and REPNZ, which stand for "Repeat if Zero" and "Repeat if Nonzero" respectively. These two only work properly with CMPSB and SCASB, as MOVSB, LODSB, STOSB do not affect the flags. (The CPU doesn't detect whether CX equals zero using the flags, as the flags never reflect this equality to zero like you would expect.) diff --git a/Lang/8th/Angle-difference-between-two-bearings b/Lang/8th/Angle-difference-between-two-bearings deleted file mode 120000 index 9cc882831f..0000000000 --- a/Lang/8th/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/8th \ No newline at end of file diff --git a/Lang/8th/Environment-variables b/Lang/8th/Environment-variables deleted file mode 120000 index f15e7e1793..0000000000 --- a/Lang/8th/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/8th \ No newline at end of file diff --git a/Lang/8th/Factorial b/Lang/8th/Factorial deleted file mode 120000 index dde7e52e98..0000000000 --- a/Lang/8th/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/8th \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Bifid-cipher b/Lang/AArch64-Assembly/Bifid-cipher deleted file mode 120000 index 57b7c95a81..0000000000 --- a/Lang/AArch64-Assembly/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Binary-strings b/Lang/AArch64-Assembly/Binary-strings deleted file mode 120000 index 09d5581057..0000000000 --- a/Lang/AArch64-Assembly/Binary-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-strings/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Bioinformatics-base-count b/Lang/AArch64-Assembly/Bioinformatics-base-count new file mode 120000 index 0000000000..77532b44f2 --- /dev/null +++ b/Lang/AArch64-Assembly/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Calculating-the-value-of-e b/Lang/AArch64-Assembly/Calculating-the-value-of-e deleted file mode 120000 index 6be0e9e4dd..0000000000 --- a/Lang/AArch64-Assembly/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Comma-quibbling b/Lang/AArch64-Assembly/Comma-quibbling deleted file mode 120000 index 09eae1e29d..0000000000 --- a/Lang/AArch64-Assembly/Comma-quibbling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comma-quibbling/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Compound-data-type b/Lang/AArch64-Assembly/Compound-data-type deleted file mode 120000 index 5e69c433e8..0000000000 --- a/Lang/AArch64-Assembly/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Conways-Game-of-Life b/Lang/AArch64-Assembly/Conways-Game-of-Life deleted file mode 120000 index 048d5e56cd..0000000000 --- a/Lang/AArch64-Assembly/Conways-Game-of-Life +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conways-Game-of-Life/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Create-an-HTML-table b/Lang/AArch64-Assembly/Create-an-HTML-table deleted file mode 120000 index 53d9451773..0000000000 --- a/Lang/AArch64-Assembly/Create-an-HTML-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-HTML-table/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Determine-sentence-type b/Lang/AArch64-Assembly/Determine-sentence-type deleted file mode 120000 index 9e5de0c792..0000000000 --- a/Lang/AArch64-Assembly/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Environment-variables b/Lang/AArch64-Assembly/Environment-variables deleted file mode 120000 index bf37f1b011..0000000000 --- a/Lang/AArch64-Assembly/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Fibonacci-n-step-number-sequences b/Lang/AArch64-Assembly/Fibonacci-n-step-number-sequences deleted file mode 120000 index 27c6d5155d..0000000000 --- a/Lang/AArch64-Assembly/Fibonacci-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-n-step-number-sequences/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Fibonacci-sequence b/Lang/AArch64-Assembly/Fibonacci-sequence deleted file mode 120000 index 1b2a811917..0000000000 --- a/Lang/AArch64-Assembly/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Halt-and-catch-fire b/Lang/AArch64-Assembly/Halt-and-catch-fire deleted file mode 120000 index fcd91d9797..0000000000 --- a/Lang/AArch64-Assembly/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Hash-from-two-arrays b/Lang/AArch64-Assembly/Hash-from-two-arrays deleted file mode 120000 index 8f4af92c06..0000000000 --- a/Lang/AArch64-Assembly/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Hofstadter-Q-sequence b/Lang/AArch64-Assembly/Hofstadter-Q-sequence deleted file mode 120000 index 249eb0836e..0000000000 --- a/Lang/AArch64-Assembly/Hofstadter-Q-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Q-sequence/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Keyboard-input-Obtain-a-Y-or-N-response b/Lang/AArch64-Assembly/Keyboard-input-Obtain-a-Y-or-N-response deleted file mode 120000 index ea8bafc85e..0000000000 --- a/Lang/AArch64-Assembly/Keyboard-input-Obtain-a-Y-or-N-response +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Obtain-a-Y-or-N-response/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Leonardo-numbers b/Lang/AArch64-Assembly/Leonardo-numbers deleted file mode 120000 index c954cc6b34..0000000000 --- a/Lang/AArch64-Assembly/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Logical-operations b/Lang/AArch64-Assembly/Logical-operations deleted file mode 120000 index c765c862aa..0000000000 --- a/Lang/AArch64-Assembly/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Machine-code b/Lang/AArch64-Assembly/Machine-code deleted file mode 120000 index 0510df24d2..0000000000 --- a/Lang/AArch64-Assembly/Machine-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Machine-code/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Magic-8-ball b/Lang/AArch64-Assembly/Magic-8-ball deleted file mode 120000 index 1c232e0832..0000000000 --- a/Lang/AArch64-Assembly/Magic-8-ball +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-8-ball/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Mandelbrot-set b/Lang/AArch64-Assembly/Mandelbrot-set deleted file mode 120000 index 8e4411d4d0..0000000000 --- a/Lang/AArch64-Assembly/Mandelbrot-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mandelbrot-set/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Menu b/Lang/AArch64-Assembly/Menu deleted file mode 120000 index 5b0688a2c5..0000000000 --- a/Lang/AArch64-Assembly/Menu +++ /dev/null @@ -1 +0,0 @@ -../../Task/Menu/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Miller-Rabin-primality-test b/Lang/AArch64-Assembly/Miller-Rabin-primality-test new file mode 120000 index 0000000000..f452839a71 --- /dev/null +++ b/Lang/AArch64-Assembly/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Phrase-reversals b/Lang/AArch64-Assembly/Phrase-reversals deleted file mode 120000 index 65751e913c..0000000000 --- a/Lang/AArch64-Assembly/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Pi b/Lang/AArch64-Assembly/Pi deleted file mode 120000 index 34be149f2d..0000000000 --- a/Lang/AArch64-Assembly/Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pi/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Read-a-configuration-file b/Lang/AArch64-Assembly/Read-a-configuration-file deleted file mode 120000 index 869fc1989f..0000000000 --- a/Lang/AArch64-Assembly/Read-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-configuration-file/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Repeat-a-string b/Lang/AArch64-Assembly/Repeat-a-string deleted file mode 120000 index c83eefd8df..0000000000 --- a/Lang/AArch64-Assembly/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Reverse-words-in-a-string b/Lang/AArch64-Assembly/Reverse-words-in-a-string deleted file mode 120000 index 2f40f86595..0000000000 --- a/Lang/AArch64-Assembly/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Sorting-Algorithms-Circle-Sort b/Lang/AArch64-Assembly/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..6922a69550 --- /dev/null +++ b/Lang/AArch64-Assembly/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Strip-block-comments b/Lang/AArch64-Assembly/Strip-block-comments deleted file mode 120000 index 4a2741cf35..0000000000 --- a/Lang/AArch64-Assembly/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Strip-comments-from-a-string b/Lang/AArch64-Assembly/Strip-comments-from-a-string deleted file mode 120000 index 1e7fb59c48..0000000000 --- a/Lang/AArch64-Assembly/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Strip-whitespace-from-a-string-Top-and-tail b/Lang/AArch64-Assembly/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index 115198d3ea..0000000000 --- a/Lang/AArch64-Assembly/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Twos-complement b/Lang/AArch64-Assembly/Twos-complement deleted file mode 120000 index 92454eff57..0000000000 --- a/Lang/AArch64-Assembly/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Update-a-configuration-file b/Lang/AArch64-Assembly/Update-a-configuration-file deleted file mode 120000 index c28afd01b6..0000000000 --- a/Lang/AArch64-Assembly/Update-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Update-a-configuration-file/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Vigen-re-cipher b/Lang/AArch64-Assembly/Vigen-re-cipher deleted file mode 120000 index 02254d1d9a..0000000000 --- a/Lang/AArch64-Assembly/Vigen-re-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Vigen-re-cipher-Cryptanalysis b/Lang/AArch64-Assembly/Vigen-re-cipher-Cryptanalysis deleted file mode 120000 index cc7f7e2227..0000000000 --- a/Lang/AArch64-Assembly/Vigen-re-cipher-Cryptanalysis +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher-Cryptanalysis/AArch64-Assembly \ No newline at end of file diff --git a/Lang/AArch64-Assembly/Visualize-a-tree b/Lang/AArch64-Assembly/Visualize-a-tree deleted file mode 120000 index a3e4c5223f..0000000000 --- a/Lang/AArch64-Assembly/Visualize-a-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Visualize-a-tree/AArch64-Assembly \ No newline at end of file diff --git a/Lang/ABAP/00-LANG.txt b/Lang/ABAP/00-LANG.txt index 819bd4cbc5..446b44c265 100644 --- a/Lang/ABAP/00-LANG.txt +++ b/Lang/ABAP/00-LANG.txt @@ -1,14 +1,2 @@ -{{stub}}{{language -|site=http://www.sdn.sap.com/irj/sdn/abap -|safety=safe -|strength=strong -|compat=nominative -|checking=static -|tags=abap}} -ABAP (Advanced Business Application Programming) is a programming language developed by the german software vendor SAP. It is mainly used to build high performance business applications. - -==Citation== -*[https://en.wikipedia.org/wiki/ABAP] - -[[Category:Programming paradigm/Object-oriented]] -[[Category:Programming paradigm/Imperative]] \ No newline at end of file +{{stub}}{{language|site=http://www.sdn.sap.com/irj/sdn/abap}} +ABAP (Advanced Business Application Programming) is a programming language developed by the german software vendor SAP. It is mainly used to build high performance business applications. \ No newline at end of file diff --git a/Lang/ABC/Arithmetic-derivative b/Lang/ABC/Arithmetic-derivative deleted file mode 120000 index 4225078056..0000000000 --- a/Lang/ABC/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/ABC \ No newline at end of file diff --git a/Lang/ABC/Look-and-say-sequence b/Lang/ABC/Look-and-say-sequence deleted file mode 120000 index 68b9661932..0000000000 --- a/Lang/ABC/Look-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Look-and-say-sequence/ABC \ No newline at end of file diff --git a/Lang/ABC/Population-count b/Lang/ABC/Population-count deleted file mode 120000 index 6bd44c7e1e..0000000000 --- a/Lang/ABC/Population-count +++ /dev/null @@ -1 +0,0 @@ -../../Task/Population-count/ABC \ No newline at end of file diff --git a/Lang/ABC/Square-but-not-cube b/Lang/ABC/Square-but-not-cube deleted file mode 120000 index 23a046e711..0000000000 --- a/Lang/ABC/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/ABC \ No newline at end of file diff --git a/Lang/ABC/Zeckendorf-number-representation b/Lang/ABC/Zeckendorf-number-representation deleted file mode 120000 index 8384d29a12..0000000000 --- a/Lang/ABC/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/ABC \ No newline at end of file diff --git a/Lang/AIDED-NATURAL-LANGUAGE/00-LANG.txt b/Lang/AIDED-NATURAL-LANGUAGE/00-LANG.txt deleted file mode 100644 index c25a056976..0000000000 --- a/Lang/AIDED-NATURAL-LANGUAGE/00-LANG.txt +++ /dev/null @@ -1 +0,0 @@ -{{stub}}{{language|Ayrch}} \ No newline at end of file diff --git a/Lang/AIDED-NATURAL-LANGUAGE/00-META.yaml b/Lang/AIDED-NATURAL-LANGUAGE/00-META.yaml deleted file mode 100644 index 8395003e03..0000000000 --- a/Lang/AIDED-NATURAL-LANGUAGE/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:AIDED_NATURAL_LANGUAGE diff --git a/Lang/ALGOL-60/00-LANG.txt b/Lang/ALGOL-60/00-LANG.txt index 2f04de0a7d..725689b57a 100644 --- a/Lang/ALGOL-60/00-LANG.txt +++ b/Lang/ALGOL-60/00-LANG.txt @@ -16,9 +16,4 @@ gcc hello.c -lalgol -lm -o hello *[[wp:ALGOL 60|ALGOL 60 on Wikipedia]] *[[ALGOL 68]] *[[ALGOL W]] -*[[Simula]] - -==External links== -* [http://algol60.org algol60.org] -* [https://softwarepreservation.computerhistory.org/ALGOL/ History of ALGOL] Includes links to documentation (e.g. reports) -* [https://www.masswerk.at/algol60/report.htm Revised Report on the Algorithmic Language Algol 60] (HTML) \ No newline at end of file +*[[Simula]] \ No newline at end of file diff --git a/Lang/ALGOL-60/Additive-primes b/Lang/ALGOL-60/Additive-primes deleted file mode 120000 index 360a570784..0000000000 --- a/Lang/ALGOL-60/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Anti-primes b/Lang/ALGOL-60/Anti-primes deleted file mode 120000 index 6d19745d0e..0000000000 --- a/Lang/ALGOL-60/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Even-or-odd b/Lang/ALGOL-60/Even-or-odd deleted file mode 120000 index 13baeccf6c..0000000000 --- a/Lang/ALGOL-60/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Factorial b/Lang/ALGOL-60/Factorial new file mode 120000 index 0000000000..67b243e1d0 --- /dev/null +++ b/Lang/ALGOL-60/Factorial @@ -0,0 +1 @@ +../../Task/Factorial/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Harmonic-series b/Lang/ALGOL-60/Harmonic-series deleted file mode 120000 index a1eefb4086..0000000000 --- a/Lang/ALGOL-60/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Horners-rule-for-polynomial-evaluation b/Lang/ALGOL-60/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 2a520e0e7c..0000000000 --- a/Lang/ALGOL-60/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Integer-comparison b/Lang/ALGOL-60/Integer-comparison deleted file mode 120000 index 54a6736fa3..0000000000 --- a/Lang/ALGOL-60/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Largest-proper-divisor-of-n b/Lang/ALGOL-60/Largest-proper-divisor-of-n deleted file mode 120000 index bd5f1adbca..0000000000 --- a/Lang/ALGOL-60/Largest-proper-divisor-of-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-proper-divisor-of-n/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Loops-Increment-loop-index-within-loop-body b/Lang/ALGOL-60/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index b6ef8c8c0c..0000000000 --- a/Lang/ALGOL-60/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Nth-root b/Lang/ALGOL-60/Nth-root deleted file mode 120000 index 3032f52453..0000000000 --- a/Lang/ALGOL-60/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Prime-decomposition b/Lang/ALGOL-60/Prime-decomposition deleted file mode 120000 index cd5f625ac0..0000000000 --- a/Lang/ALGOL-60/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Proper-divisors b/Lang/ALGOL-60/Proper-divisors deleted file mode 120000 index 7bb12e66dd..0000000000 --- a/Lang/ALGOL-60/Proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Proper-divisors/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Semiprime b/Lang/ALGOL-60/Semiprime deleted file mode 120000 index 0981557b93..0000000000 --- a/Lang/ALGOL-60/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Sequence-of-primes-by-trial-division b/Lang/ALGOL-60/Sequence-of-primes-by-trial-division deleted file mode 120000 index b95a2ebdcc..0000000000 --- a/Lang/ALGOL-60/Sequence-of-primes-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primes-by-trial-division/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Square-free-integers b/Lang/ALGOL-60/Square-free-integers deleted file mode 120000 index caff91a536..0000000000 --- a/Lang/ALGOL-60/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Sum-of-a-series b/Lang/ALGOL-60/Sum-of-a-series deleted file mode 120000 index 48b6d3380c..0000000000 --- a/Lang/ALGOL-60/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Tau-function b/Lang/ALGOL-60/Tau-function deleted file mode 120000 index 5e48edf00f..0000000000 --- a/Lang/ALGOL-60/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-60/Tau-number b/Lang/ALGOL-60/Tau-number deleted file mode 120000 index a054d3d6bb..0000000000 --- a/Lang/ALGOL-60/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/ALGOL-60 \ No newline at end of file diff --git a/Lang/ALGOL-68/00-LANG.txt b/Lang/ALGOL-68/00-LANG.txt index 0415892136..c77464279f 100644 --- a/Lang/ALGOL-68/00-LANG.txt +++ b/Lang/ALGOL-68/00-LANG.txt @@ -41,7 +41,7 @@ A syntax chart is available [http://www.softwarepreservation.org/projects/ALGOL/ * [http://www.linkedin.com/groups/Algol68-2333923 Algol68 group at linkedin] - includes various famous compiler composers.
'''Books available online''': -* [https://algol68genie.nl/ Algol 68G Manual - By Marcel van der Veer] Includes the Revised Report +* [http://jmvdveer.home.xs4all.nl/en.algol-68-genie.html Algol 68G Manual - By Marcel van der Veer] Includes the Revised Report * [http://www.softwarepreservation.org/projects/ALGOL/book/pame.2008.a4.pdf/view Programming Algol 68 Made Easy - by Sian Mountbatten (on softwarepreservation.org)] * [http://www.softwarepreservation.org/projects/ALGOL/book/Lindsey_van_der_Meulen-IItA68-Revised.pdf/view Informal Introduction to Algol 68 - by C. H. Lindsey & S. V. Van der Meulen (on softwarepreservation.org)] - if you prefer (and find) a hardcopy, be sure to get the 1977 edition. Highly recomended! @@ -59,7 +59,7 @@ A syntax chart is available [http://www.softwarepreservation.org/projects/ALGOL/ ** AND 50th Birthday '''ALGOL 58'''. * 23rd August 2009 - [http://sourceforge.net/projects/algol68/files/ algol68g-1.18.0-9h] released * 20th December 2009 - Happy 51st/41st Birthdays with [[Hamming_numbers#ALGOL_68|Hamming numbers]] - the 200th '''ALGOL 68''' code contribution on rosettacode.org! -** This time code was by [[User:Algol68g|Marcel van der Veer]], author of [https://algol68genie.nl Algol 68 Genie] +** This time code was by [[User:Algol68g|Marcel van der Veer]], author of [http://www.xs4all.nl/~jmvdveer/algol.html Algol 68 Genie] * 25th October 2011 - [[User:Jejones3141|Jejones3141]] added [[Soundex#ALGOL_68|Soundex]] - the 300th '''ALGOL 68''' code specimen. == Revisions == @@ -67,12 +67,203 @@ A syntax chart is available [http://www.softwarepreservation.org/projects/ALGOL/ *Oct. 1968: Penultimate Draft Report on the Algorithmic Language ALGOL 68 - Chapters 1-9 - Edited by: A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster. *Dec. 1968: Report on the Algorithmic Language ALGOL 68 - Offprint from Numerische Mathematik, 14, 79-218 (1969); Springer-Verlag. - Edited by: A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster. *Sep 1973: Revised Report on the Algorithmic Language Algol 68 - Springer-Verlag 1976 - Edited by: A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck, C.H.A. Koster, M. Sintzoff, C.H. Lindsey, L.G.L.T. Meertens and R.G. Fisker. -==Coding style of samples, alphabets and stropping== -See [[ALGOL 68 Representation]]. +==Coding style of samples== +Click "Expand" for more details. +
+
+ +Many of the code samples provided here have a leading main:( and a matching ) at the end. These are not actually required in the language, but are included so as to highlight the main routine. + +On some compilers, it may be necessary to include appropriate "job cards" +or preludes in order for the programs to compile successfully. Hopefully +not too much else is required. Examples: +{|border="1" style="border-collapse: collapse; border: 5px double grey;" align="center" +|| Brief Algol68 +|| Algol68 as in rosettacode +|| Actual ELLA Algol 68RS code +|- +|| + print(("Hello, world!",new line)) +|| + main:( + print(("Hello, world!",new line)) + ) +|| + PROGRAM helloworld CONTEXT VOID + USE standard + BEGIN + print(("Hello, world!", new line)) + END + FINISH +|} +

'''Examples of different program representations''' +

+At the time when ALGOL 68 was defined some predominant computers had +24 or 36 bit words, with 6 bit character sets. Hence it was desirable that +ALGOL 68 should be able to run on machines with only uppercase. +The official spec provided for different representations of the same +program. Quote stropping (enclosing the bold words in single quotes) +and Point stropping (preceeding the bold words with a dot) +were used. A variant of Point stropping called RES stropping was also defined. +In RES stropping some language-defined bold words are not preceded by a dot. +A pragmatic comment may have been required to indicate which +stropping convention was to be used, as in some of the examples below. +Upper stropping (representing the bold words by upper case and +non-bold words in lower case) was introduced by Algol 68R. Upper stropping +is used by Algol 68RS and is one of the options for Algol 68G. +Rutgers ALGOL 68 uses quote stropping. Most of the samples +on Rosetta Code use Upper stropping. +Examples (pragmatic comments to set the stropping regime not shown): +{|border="1" style="border-collapse: collapse; border: 2px double grey;" align="left" +|| Algol68 as typically published + '''mode''' '''xint''' = '''int'''; + '''xint''' sum sq:=0; + '''for''' i '''while''' + sum sq≠70×70 + '''do''' + sum sq+:=i↑2 + '''od''' +|| QUOTE stropping (similar to wiki) + 'mode' 'xint' = 'int'; + 'xint' sum sq:=0; + 'for' i 'while' + sum sq≠70×70 + 'do' + sum sq+:=i↑2 + 'od' +|| POINT stropping + .MODE .XINT = .INT; + .XINT SUM SQ:=0; + .FOR I .WHILE + SUM SQ .NE 70*70 + .DO + SUM SQ .PLUSAB I .UP 2 + .OD +|| RES stropping + mode .xint = int; + .xint sum sq:=0; + for i while + sum sq≠70×70 + do + sum sq+:=i↑2 + od +|| Upper stropping + MODE XINT = INT; + XINT sum sq:=0; + FOR i WHILE + sum sq /= 70*70 + DO + sum sq PLUSAB i UP 2 + OD +|} + +
== Coercion (casting) == -ALGOL 68 has a hierarchy of contexts which determine which kind of coercions are available at a particular point in the program.
-See [[:Category:ALGOL_68_Coercions|ALGOL 68 Coercions]] for more details. +ALGOL 68 has a hierarchy of contexts which determine which kind of coercions are available at a particular point in the program. +
+Click "Expand" for more details. +
+
+ +These contexts are: +{|class="wikitable" +!rowspan=2| N
+a
+m
+e +!rowspan=2| Context location +!colspan=5| Coercions available in this context +!rowspan=2| Coercion examples +|- +|bgcolor=aaaaff|Soft +|bgcolor=aaeeaa|Weak +|bgcolor=ffee99|Meek +|bgcolor=ffcc99|Firm +|bgcolor=ffcccc|Strong +|- +!S
+t
+r
+o
+n
+g +||Right hand side of: +* Identity-declarations, as "~" in: REAL x = ~ +* Initialisations, as "~" in: REAL x := ~ +Also: +* Actual-parameters of calls, as "~" in:PROC: sin(~) +* Enclosed clauses of casts, as "~" in: REAL(~) +* Units of routine-texts +* Statements yielding VOID +* All parts (but one) of a balanced clause +* One side of an identity relation, as "~" in: ~ IS ~ +|bgcolor=aaaaff rowspan=4 width="50px"| deproc- eduring +|bgcolor=aaeeaa rowspan=3 width="50px"| all '''soft''' then weak deref- erencing +|bgcolor=ffee99 rowspan=2 width="50px"| all '''weak''' then deref- erencing +|bgcolor=ffcc99 rowspan=1 width="50px"| all '''meek''' then uniting +|bgcolor=ffcccc width="50px"| all '''firm''' then widening, rowing and voiding +|colspan=1 bgcolor=ffcccc| +Widening occurs if there is no loss of precision. For example: An INT will be coerced to a REAL, and a REAL will be coerced to a LONG REAL. But not vice-versa. Examples: +INT to LONG INT +INT to REAL +REAL to COMPL +BITS to []BOOL +BYTES to STRING +A variable can also be coerced (rowed) to an array of length 1. + +For example: +INT to [1]INT +REAL to [1]REAL etc +|- +!F
+i
+r
+m +|| +*Operands of formulas as "~" in:OP: ~ * ~ +*Parameters of transput calls +|colspan=3 bgcolor=ffcc99| Example: +UNION(INT,REAL) var := 1 +|- +!M
+e
+e
+k +|| +* Trimscripts (yielding INT) +* Enquiries: e.g. as "~" in the following +IF ~ THEN ... FI and +FROM ~ BY ~ TO ~ WHILE ~ DO ... OD etc +* Primaries of calls (e.g. sin in sin(x)) +|colspan=4 bgcolor=ffee99|Examples: +REF REF BOOL to BOOL +REF REF REF INT to INT +|- +!W
+e
+a
+k +|| +* Primaries of slices, as in "~" in: ~[1:99] +* Secondaries of selections, as "~" in: value OF ~ +|colspan=5 bgcolor=aaeeaa|Examples: +REF BOOL to REF BOOL +REF REF INT to REF INT +REF REF REF REAL to REF REAL +REF REF REF REF STRUCT to REF STRUCT +|- +!S
+o
+f
+t +|| The LHS of assignments, as "~" in: ~ := ... +|colspan=6 bgcolor=aaaaff| Example: +* deproceduring of: PROC REAL random: e.g. random +|} +For more details about Primaries and Secondaries refer to [[Operator_precedence#ALGOL_68|Operator precedence]]. + +
==See also== *[[Web 68]] @@ -82,22 +273,13 @@ See [[:Category:ALGOL_68_Coercions|ALGOL 68 Coercions]] for more details. * [[Action!]] * [[Agena]] * [[Draco]] -* [[RTL/2]] * [https://en.wikipedia.org/wiki/S3_(programming_language) S3 for ICL 2900] == Library code used in Rosetta Code samples == -* [[ALGOL_68/prelude|Various (including the standard prelude)]] -* -* [[:Category:ALGOL_68-bits|bit-manipulation related]] -* [[:Category:ALGOL_68-files|File related]] -* [[:Category:ALGOL_68-l-system|L-System related]] -* [[:Category:ALGOL_68-primes|Prime related]] -* [[:Category:ALGOL_68-rows|Row (array) related]] -* [[:Category:ALGOL_68-sort|Sorting related]] - -== Tools == -[[Syntax_highlighting_using_Mediawiki_formatting#ALGOL 68|Format an upper-stropped Algol 68 source with Mediawiki markup]]
-[[Compiler/Simple_file_inclusion_pre_processor#ALGOL 68|Implement ''read'' and ''include'' pragmatic-comments for compilers that don't support file inclusion]] +[https://rosettacode.org/wiki/ALGOL_68/prelude Various (including the standard prelude)]
+[https://rosettacode.org/wiki/Category:ALGOL_68-primes Prime related]
+[https://rosettacode.org/wiki/Category:ALGOL_68-rows Row (array) related]
+[https://rosettacode.org/wiki/Category:ALGOL_68-l-system L-System related] {{language programming paradigm|Concurrent}} {{language programming paradigm|Imperative}} \ No newline at end of file diff --git a/Lang/ALGOL-68/100-prisoners b/Lang/ALGOL-68/100-prisoners deleted file mode 120000 index f6c4da597a..0000000000 --- a/Lang/ALGOL-68/100-prisoners +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-prisoners/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/21-game b/Lang/ALGOL-68/21-game deleted file mode 120000 index 76ba9066d7..0000000000 --- a/Lang/ALGOL-68/21-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/21-game/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/9-billion-names-of-God-the-integer b/Lang/ALGOL-68/9-billion-names-of-God-the-integer deleted file mode 120000 index 01c632e0dd..0000000000 --- a/Lang/ALGOL-68/9-billion-names-of-God-the-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/9-billion-names-of-God-the-integer/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Archimedean-spiral b/Lang/ALGOL-68/Archimedean-spiral deleted file mode 120000 index 64c4988ade..0000000000 --- a/Lang/ALGOL-68/Archimedean-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Archimedean-spiral/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Arithmetic-geometric-mean-Calculate-Pi b/Lang/ALGOL-68/Arithmetic-geometric-mean-Calculate-Pi deleted file mode 120000 index 1c8bcda555..0000000000 --- a/Lang/ALGOL-68/Arithmetic-geometric-mean-Calculate-Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean-Calculate-Pi/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Bifid-cipher b/Lang/ALGOL-68/Bifid-cipher deleted file mode 120000 index 5e9da259ac..0000000000 --- a/Lang/ALGOL-68/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Bioinformatics-base-count b/Lang/ALGOL-68/Bioinformatics-base-count new file mode 120000 index 0000000000..cb9d66b55c --- /dev/null +++ b/Lang/ALGOL-68/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Biorhythms b/Lang/ALGOL-68/Biorhythms deleted file mode 120000 index b15056dfc9..0000000000 --- a/Lang/ALGOL-68/Biorhythms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Biorhythms/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Bitmap-B-zier-curves-Quadratic b/Lang/ALGOL-68/Bitmap-B-zier-curves-Quadratic deleted file mode 120000 index 30ab56c310..0000000000 --- a/Lang/ALGOL-68/Bitmap-B-zier-curves-Quadratic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-B-zier-curves-Quadratic/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Burrows-Wheeler-transform b/Lang/ALGOL-68/Burrows-Wheeler-transform deleted file mode 120000 index 203e0e501f..0000000000 --- a/Lang/ALGOL-68/Burrows-Wheeler-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Burrows-Wheeler-transform/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Chaocipher b/Lang/ALGOL-68/Chaocipher deleted file mode 120000 index 1d4c0173db..0000000000 --- a/Lang/ALGOL-68/Chaocipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaocipher/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Chernicks-Carmichael-numbers b/Lang/ALGOL-68/Chernicks-Carmichael-numbers deleted file mode 120000 index ebdbb0354b..0000000000 --- a/Lang/ALGOL-68/Chernicks-Carmichael-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chernicks-Carmichael-numbers/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Convex-hull b/Lang/ALGOL-68/Convex-hull deleted file mode 120000 index 6ded12cc5d..0000000000 --- a/Lang/ALGOL-68/Convex-hull +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convex-hull/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Date-manipulation b/Lang/ALGOL-68/Date-manipulation deleted file mode 120000 index 700d602cf1..0000000000 --- a/Lang/ALGOL-68/Date-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-manipulation/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/De-Bruijn-sequences b/Lang/ALGOL-68/De-Bruijn-sequences deleted file mode 120000 index 1c1a7f459e..0000000000 --- a/Lang/ALGOL-68/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Demings-funnel b/Lang/ALGOL-68/Demings-funnel deleted file mode 120000 index c30e5a173e..0000000000 --- a/Lang/ALGOL-68/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Determinant-and-permanent b/Lang/ALGOL-68/Determinant-and-permanent deleted file mode 120000 index e8a753594d..0000000000 --- a/Lang/ALGOL-68/Determinant-and-permanent +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determinant-and-permanent/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Dice-game-probabilities b/Lang/ALGOL-68/Dice-game-probabilities deleted file mode 120000 index 9b1e59ee7b..0000000000 --- a/Lang/ALGOL-68/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Display-an-outline-as-a-nested-table b/Lang/ALGOL-68/Display-an-outline-as-a-nested-table deleted file mode 120000 index 41ea472cc8..0000000000 --- a/Lang/ALGOL-68/Display-an-outline-as-a-nested-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-an-outline-as-a-nested-table/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Distribution-of-0-digits-in-factorial-series b/Lang/ALGOL-68/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index 242e3aeb60..0000000000 --- a/Lang/ALGOL-68/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Draw-a-cuboid b/Lang/ALGOL-68/Draw-a-cuboid deleted file mode 120000 index 3102af7fc7..0000000000 --- a/Lang/ALGOL-68/Draw-a-cuboid +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-cuboid/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Elementary-cellular-automaton-Random-number-generator b/Lang/ALGOL-68/Elementary-cellular-automaton-Random-number-generator deleted file mode 120000 index a4aed0fa0e..0000000000 --- a/Lang/ALGOL-68/Elementary-cellular-automaton-Random-number-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elementary-cellular-automaton-Random-number-generator/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Elliptic-curve-arithmetic b/Lang/ALGOL-68/Elliptic-curve-arithmetic deleted file mode 120000 index 88681d69e9..0000000000 --- a/Lang/ALGOL-68/Elliptic-curve-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-curve-arithmetic/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Factorial b/Lang/ALGOL-68/Factorial new file mode 120000 index 0000000000..b406800839 --- /dev/null +++ b/Lang/ALGOL-68/Factorial @@ -0,0 +1 @@ +../../Task/Factorial/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Factorial-base-numbers-indexing-permutations-of-a-collection b/Lang/ALGOL-68/Factorial-base-numbers-indexing-permutations-of-a-collection deleted file mode 120000 index ab36c72f12..0000000000 --- a/Lang/ALGOL-68/Factorial-base-numbers-indexing-permutations-of-a-collection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-base-numbers-indexing-permutations-of-a-collection/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Four-is-magic b/Lang/ALGOL-68/Four-is-magic deleted file mode 120000 index 007db868ed..0000000000 --- a/Lang/ALGOL-68/Four-is-magic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Four-is-magic/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/IBAN b/Lang/ALGOL-68/IBAN deleted file mode 120000 index 08ea01a928..0000000000 --- a/Lang/ALGOL-68/IBAN +++ /dev/null @@ -1 +0,0 @@ -../../Task/IBAN/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Jaro-similarity b/Lang/ALGOL-68/Jaro-similarity deleted file mode 120000 index 0255b5f0fa..0000000000 --- a/Lang/ALGOL-68/Jaro-similarity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-similarity/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Jordan-P-lya-numbers b/Lang/ALGOL-68/Jordan-P-lya-numbers deleted file mode 120000 index 6750737d48..0000000000 --- a/Lang/ALGOL-68/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Juggler-sequence b/Lang/ALGOL-68/Juggler-sequence deleted file mode 120000 index 2c24c77bfb..0000000000 --- a/Lang/ALGOL-68/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Knapsack-problem-0-1 b/Lang/ALGOL-68/Knapsack-problem-0-1 deleted file mode 120000 index 38cd6f2ecb..0000000000 --- a/Lang/ALGOL-68/Knapsack-problem-0-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-0-1/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Knapsack-problem-Continuous b/Lang/ALGOL-68/Knapsack-problem-Continuous deleted file mode 120000 index f49865cc46..0000000000 --- a/Lang/ALGOL-68/Knapsack-problem-Continuous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Continuous/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/LU-decomposition b/Lang/ALGOL-68/LU-decomposition deleted file mode 120000 index 3453e9548a..0000000000 --- a/Lang/ALGOL-68/LU-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/LU-decomposition/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Legendre-prime-counting-function b/Lang/ALGOL-68/Legendre-prime-counting-function deleted file mode 120000 index f71f764e65..0000000000 --- a/Lang/ALGOL-68/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Logistic-curve-fitting-in-epidemiology b/Lang/ALGOL-68/Logistic-curve-fitting-in-epidemiology deleted file mode 120000 index 508ef46a64..0000000000 --- a/Lang/ALGOL-68/Logistic-curve-fitting-in-epidemiology +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logistic-curve-fitting-in-epidemiology/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Longest-increasing-subsequence b/Lang/ALGOL-68/Longest-increasing-subsequence deleted file mode 120000 index a09c83eed3..0000000000 --- a/Lang/ALGOL-68/Longest-increasing-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-increasing-subsequence/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Mayan-numerals b/Lang/ALGOL-68/Mayan-numerals deleted file mode 120000 index 901b0eac41..0000000000 --- a/Lang/ALGOL-68/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Meissel-Mertens-constant b/Lang/ALGOL-68/Meissel-Mertens-constant new file mode 120000 index 0000000000..e7b400c689 --- /dev/null +++ b/Lang/ALGOL-68/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Miller-Rabin-primality-test b/Lang/ALGOL-68/Miller-Rabin-primality-test new file mode 120000 index 0000000000..c0a1c115c4 --- /dev/null +++ b/Lang/ALGOL-68/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Partition-function-P b/Lang/ALGOL-68/Partition-function-P deleted file mode 120000 index 98f6538801..0000000000 --- a/Lang/ALGOL-68/Partition-function-P +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-function-P/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Pentagram b/Lang/ALGOL-68/Pentagram deleted file mode 120000 index 7ab101a89e..0000000000 --- a/Lang/ALGOL-68/Pentagram +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pentagram/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Perlin-noise b/Lang/ALGOL-68/Perlin-noise deleted file mode 120000 index 8bd6981103..0000000000 --- a/Lang/ALGOL-68/Perlin-noise +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perlin-noise/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Permutation-test b/Lang/ALGOL-68/Permutation-test deleted file mode 120000 index 1a8b7f20df..0000000000 --- a/Lang/ALGOL-68/Permutation-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutation-test/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Primes---allocate-descendants-to-their-ancestors b/Lang/ALGOL-68/Primes---allocate-descendants-to-their-ancestors deleted file mode 120000 index 9bf6ed3e36..0000000000 --- a/Lang/ALGOL-68/Primes---allocate-descendants-to-their-ancestors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primes---allocate-descendants-to-their-ancestors/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Pythagoras-tree b/Lang/ALGOL-68/Pythagoras-tree deleted file mode 120000 index 8c304d8b68..0000000000 --- a/Lang/ALGOL-68/Pythagoras-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagoras-tree/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Quaternion-type b/Lang/ALGOL-68/Quaternion-type new file mode 120000 index 0000000000..9934ee409f --- /dev/null +++ b/Lang/ALGOL-68/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Quoting-constructs b/Lang/ALGOL-68/Quoting-constructs deleted file mode 120000 index 7f6defd772..0000000000 --- a/Lang/ALGOL-68/Quoting-constructs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quoting-constructs/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Ramanujans-constant b/Lang/ALGOL-68/Ramanujans-constant deleted file mode 120000 index 7fce932657..0000000000 --- a/Lang/ALGOL-68/Ramanujans-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramanujans-constant/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Sailors-coconuts-and-a-monkey-problem b/Lang/ALGOL-68/Sailors-coconuts-and-a-monkey-problem deleted file mode 120000 index c84573878e..0000000000 --- a/Lang/ALGOL-68/Sailors-coconuts-and-a-monkey-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sailors-coconuts-and-a-monkey-problem/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Sequence:-nth-number-with-exactly-n-divisors b/Lang/ALGOL-68/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/ALGOL-68/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/ALGOL-68/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/ALGOL-68/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/ALGOL-68/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/ALGOL-68/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/ALGOL-68/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/ALGOL-68/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/ALGOL-68/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/ALGOL-68/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/ALGOL-68/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/ALGOL-68/Sleeping-Beauty-problem b/Lang/ALGOL-68/Sleeping-Beauty-problem deleted file mode 120000 index b5873d4f8d..0000000000 --- a/Lang/ALGOL-68/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Solve-a-Hidato-puzzle b/Lang/ALGOL-68/Solve-a-Hidato-puzzle deleted file mode 120000 index 228ccf6bb3..0000000000 --- a/Lang/ALGOL-68/Solve-a-Hidato-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hidato-puzzle/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Solve-a-Numbrix-puzzle b/Lang/ALGOL-68/Solve-a-Numbrix-puzzle deleted file mode 120000 index 14e9e80e97..0000000000 --- a/Lang/ALGOL-68/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Solve-the-no-connection-puzzle b/Lang/ALGOL-68/Solve-the-no-connection-puzzle deleted file mode 120000 index 0ffda5f1f9..0000000000 --- a/Lang/ALGOL-68/Solve-the-no-connection-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-the-no-connection-puzzle/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Sort-disjoint-sublist b/Lang/ALGOL-68/Sort-disjoint-sublist deleted file mode 120000 index be15a7cde3..0000000000 --- a/Lang/ALGOL-68/Sort-disjoint-sublist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-disjoint-sublist/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Subtractive-generator b/Lang/ALGOL-68/Subtractive-generator deleted file mode 120000 index f90071e31a..0000000000 --- a/Lang/ALGOL-68/Subtractive-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Subtractive-generator/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Super-d-numbers b/Lang/ALGOL-68/Super-d-numbers deleted file mode 120000 index f050b2afa7..0000000000 --- a/Lang/ALGOL-68/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Take-notes-on-the-command-line b/Lang/ALGOL-68/Take-notes-on-the-command-line deleted file mode 120000 index f0f896e58b..0000000000 --- a/Lang/ALGOL-68/Take-notes-on-the-command-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Take-notes-on-the-command-line/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Text-processing-2 b/Lang/ALGOL-68/Text-processing-2 deleted file mode 120000 index 124fe3bf6c..0000000000 --- a/Lang/ALGOL-68/Text-processing-2 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Text-processing-2/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Verhoeff-algorithm b/Lang/ALGOL-68/Verhoeff-algorithm deleted file mode 120000 index 7cabb86204..0000000000 --- a/Lang/ALGOL-68/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Vogels-approximation-method b/Lang/ALGOL-68/Vogels-approximation-method deleted file mode 120000 index 9c09f3c2a5..0000000000 --- a/Lang/ALGOL-68/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Wasteful-equidigital-and-frugal-numbers b/Lang/ALGOL-68/Wasteful-equidigital-and-frugal-numbers deleted file mode 120000 index 6de9ddaea1..0000000000 --- a/Lang/ALGOL-68/Wasteful-equidigital-and-frugal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wasteful-equidigital-and-frugal-numbers/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-68/Word-wheel b/Lang/ALGOL-68/Word-wheel deleted file mode 120000 index ab6aaa99f7..0000000000 --- a/Lang/ALGOL-68/Word-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wheel/ALGOL-68 \ No newline at end of file diff --git a/Lang/ALGOL-M/Additive-primes b/Lang/ALGOL-M/Additive-primes deleted file mode 120000 index 974f9484e7..0000000000 --- a/Lang/ALGOL-M/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/ALGOL-M \ No newline at end of file diff --git a/Lang/ALGOL-M/Case-sensitivity-of-identifiers b/Lang/ALGOL-M/Case-sensitivity-of-identifiers deleted file mode 120000 index 3e61bd6e7f..0000000000 --- a/Lang/ALGOL-M/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/ALGOL-M \ No newline at end of file diff --git a/Lang/ALGOL-M/Integer-comparison b/Lang/ALGOL-M/Integer-comparison deleted file mode 120000 index 1066ff383c..0000000000 --- a/Lang/ALGOL-M/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/ALGOL-M \ No newline at end of file diff --git a/Lang/ALGOL-M/Integer-overflow b/Lang/ALGOL-M/Integer-overflow deleted file mode 120000 index a7f3c63fee..0000000000 --- a/Lang/ALGOL-M/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/ALGOL-M \ No newline at end of file diff --git a/Lang/ALGOL-M/Semiprime b/Lang/ALGOL-M/Semiprime deleted file mode 120000 index 9bc2a5e1b8..0000000000 --- a/Lang/ALGOL-M/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/ALGOL-M \ No newline at end of file diff --git a/Lang/ALGOL-W/00-LANG.txt b/Lang/ALGOL-W/00-LANG.txt index f0f11b51d0..eed21ba5cf 100644 --- a/Lang/ALGOL-W/00-LANG.txt +++ b/Lang/ALGOL-W/00-LANG.txt @@ -7,15 +7,27 @@ |checking=both |tags=algolw |LCT=yes}} -Algol W was designed as a successor to [[wp:Algol 60|Algol 60]], closely based on A +Algol W is a successor to [[wp:Algol 60|Algol 60]] closely based on A Contribution to the Development of ALGOL by [[wp:Niklaus Wirth|Niklaus Wirth]] and [[wp:C.A.R. Hoare|C. A. R. Hoare]]. It includes dynamically allocated records, string handling, complex numbers and a standard I/O -system. A description of the Algol W Language as at 1972 can be found at [https://bitsavers.org/pdf/stanford/cs_techReports/STAN-CS-71-230_Algol_W_Reference_Manual_Feb72.pdf Algol W Reference Manual 1972 on bitsavers.org] +system. A copy of the Algol W Language Description can be found on Karl +Kleine's [http://www.fh-jena.de/~kleine/history/history.html Historic Documents in Computer Science] page. [http://everything2.com/title/Algol%2520W Dabcanboulet's Algol W @ Everything2] page contains an excellent history and tutorial. +[http://tiddly-pom.com/~glyn/ Awe] is a new compiler for the Algol W +language. It is a complete implementation of the language described in +the [https://tiddly-pom.com/~glyn/algolw.pdf Algol W Language Description, June 1972]. Awe should be able to +compile code intended for the [[wp:OS/360|OS/360]] Algol W compilers +with little or no modification. See the Awe manual for more details. + +Awe correctly compiles Tony Marsland's computer [[wp:chess|chess]] player +[http://webdocs.cs.ualberta.ca/~tony/Public/Awit-Wita-ComputerChess/ Awit] +and Hendrik Boom's [http://mtn-host.prjek.net/projects/a68h/ A68H] +[[Algol 68]] compiler. + ==To do== [[Tasks not implemented in ALGOL W]] diff --git a/Lang/ALGOL-W/Arithmetic-Integer b/Lang/ALGOL-W/Arithmetic-Integer new file mode 120000 index 0000000000..de259d015a --- /dev/null +++ b/Lang/ALGOL-W/Arithmetic-Integer @@ -0,0 +1 @@ +../../Task/Arithmetic-Integer/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Arithmetic-geometric-mean-Calculate-Pi b/Lang/ALGOL-W/Arithmetic-geometric-mean-Calculate-Pi deleted file mode 120000 index 0fd6c8a97f..0000000000 --- a/Lang/ALGOL-W/Arithmetic-geometric-mean-Calculate-Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean-Calculate-Pi/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Calculating-the-value-of-e b/Lang/ALGOL-W/Calculating-the-value-of-e deleted file mode 120000 index 0bccb15458..0000000000 --- a/Lang/ALGOL-W/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Copy-a-string b/Lang/ALGOL-W/Copy-a-string new file mode 120000 index 0000000000..4a449ab936 --- /dev/null +++ b/Lang/ALGOL-W/Copy-a-string @@ -0,0 +1 @@ +../../Task/Copy-a-string/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Equal-prime-and-composite-sums b/Lang/ALGOL-W/Equal-prime-and-composite-sums deleted file mode 120000 index 54c76175f4..0000000000 --- a/Lang/ALGOL-W/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Eulers-constant-0.5772... b/Lang/ALGOL-W/Eulers-constant-0.5772... deleted file mode 120000 index 809de9e1fd..0000000000 --- a/Lang/ALGOL-W/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Eulers-identity b/Lang/ALGOL-W/Eulers-identity deleted file mode 120000 index cda4a96c63..0000000000 --- a/Lang/ALGOL-W/Eulers-identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-identity/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Factorial b/Lang/ALGOL-W/Factorial new file mode 120000 index 0000000000..01c77fb141 --- /dev/null +++ b/Lang/ALGOL-W/Factorial @@ -0,0 +1 @@ +../../Task/Factorial/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Factorial-primes b/Lang/ALGOL-W/Factorial-primes deleted file mode 120000 index d855b375f0..0000000000 --- a/Lang/ALGOL-W/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Find-the-intersection-of-two-lines b/Lang/ALGOL-W/Find-the-intersection-of-two-lines deleted file mode 120000 index 0514984ef6..0000000000 --- a/Lang/ALGOL-W/Find-the-intersection-of-two-lines +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-intersection-of-two-lines/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Integer-comparison b/Lang/ALGOL-W/Integer-comparison new file mode 120000 index 0000000000..b056aab0f7 --- /dev/null +++ b/Lang/ALGOL-W/Integer-comparison @@ -0,0 +1 @@ +../../Task/Integer-comparison/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Jordan-P-lya-numbers b/Lang/ALGOL-W/Jordan-P-lya-numbers deleted file mode 120000 index 6e24b686d2..0000000000 --- a/Lang/ALGOL-W/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Knapsack-problem-Continuous b/Lang/ALGOL-W/Knapsack-problem-Continuous deleted file mode 120000 index fba28c1695..0000000000 --- a/Lang/ALGOL-W/Knapsack-problem-Continuous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Continuous/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/McNuggets-problem b/Lang/ALGOL-W/McNuggets-problem deleted file mode 120000 index 74213b63b7..0000000000 --- a/Lang/ALGOL-W/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Mian-Chowla-sequence b/Lang/ALGOL-W/Mian-Chowla-sequence deleted file mode 120000 index ef2068107d..0000000000 --- a/Lang/ALGOL-W/Mian-Chowla-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mian-Chowla-sequence/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Numbers-with-equal-rises-and-falls b/Lang/ALGOL-W/Numbers-with-equal-rises-and-falls deleted file mode 120000 index da06043b47..0000000000 --- a/Lang/ALGOL-W/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Pseudo-random-numbers-Middle-square-method b/Lang/ALGOL-W/Pseudo-random-numbers-Middle-square-method deleted file mode 120000 index e6f0e36a5b..0000000000 --- a/Lang/ALGOL-W/Pseudo-random-numbers-Middle-square-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Middle-square-method/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Quaternion-type b/Lang/ALGOL-W/Quaternion-type new file mode 120000 index 0000000000..9f1593930d --- /dev/null +++ b/Lang/ALGOL-W/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/ALGOL-W/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/ALGOL-W/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/ALGOL-W/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/ALGOL-W/Sleeping-Beauty-problem b/Lang/ALGOL-W/Sleeping-Beauty-problem deleted file mode 120000 index 2a0e8b6707..0000000000 --- a/Lang/ALGOL-W/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Square-but-not-cube b/Lang/ALGOL-W/Square-but-not-cube deleted file mode 120000 index 4f2dc4fb68..0000000000 --- a/Lang/ALGOL-W/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Square-free-integers b/Lang/ALGOL-W/Square-free-integers deleted file mode 120000 index c98b8e474a..0000000000 --- a/Lang/ALGOL-W/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/Tau-number b/Lang/ALGOL-W/Tau-number deleted file mode 120000 index 8bde57a739..0000000000 --- a/Lang/ALGOL-W/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/ALGOL-W \ No newline at end of file diff --git a/Lang/ALGOL-W/The-sieve-of-Sundaram b/Lang/ALGOL-W/The-sieve-of-Sundaram deleted file mode 120000 index f0d3b0894c..0000000000 --- a/Lang/ALGOL-W/The-sieve-of-Sundaram +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-sieve-of-Sundaram/ALGOL-W \ No newline at end of file diff --git a/Lang/ANSI-BASIC/100-doors b/Lang/ANSI-BASIC/100-doors deleted file mode 120000 index bd1164e9d1..0000000000 --- a/Lang/ANSI-BASIC/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/AKS-test-for-primes b/Lang/ANSI-BASIC/AKS-test-for-primes deleted file mode 120000 index 4668d2783c..0000000000 --- a/Lang/ANSI-BASIC/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Abundant-deficient-and-perfect-number-classifications b/Lang/ANSI-BASIC/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index c6e6a91dca..0000000000 --- a/Lang/ANSI-BASIC/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Abundant-odd-numbers b/Lang/ANSI-BASIC/Abundant-odd-numbers deleted file mode 120000 index 655c1f21d6..0000000000 --- a/Lang/ANSI-BASIC/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Angle-difference-between-two-bearings b/Lang/ANSI-BASIC/Angle-difference-between-two-bearings deleted file mode 120000 index de48f860b4..0000000000 --- a/Lang/ANSI-BASIC/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Arithmetic-numbers b/Lang/ANSI-BASIC/Arithmetic-numbers deleted file mode 120000 index db92ceb262..0000000000 --- a/Lang/ANSI-BASIC/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Babbage-problem b/Lang/ANSI-BASIC/Babbage-problem deleted file mode 120000 index 8ef3bfe458..0000000000 --- a/Lang/ANSI-BASIC/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/CUSIP b/Lang/ANSI-BASIC/CUSIP deleted file mode 120000 index fc24eb8330..0000000000 --- a/Lang/ANSI-BASIC/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Catalan-numbers b/Lang/ANSI-BASIC/Catalan-numbers deleted file mode 120000 index 9c5cfe1b71..0000000000 --- a/Lang/ANSI-BASIC/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Cumulative-standard-deviation b/Lang/ANSI-BASIC/Cumulative-standard-deviation deleted file mode 120000 index 1d8fe68648..0000000000 --- a/Lang/ANSI-BASIC/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Damm-algorithm b/Lang/ANSI-BASIC/Damm-algorithm deleted file mode 120000 index e4b39fdaa1..0000000000 --- a/Lang/ANSI-BASIC/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Day-of-the-week b/Lang/ANSI-BASIC/Day-of-the-week deleted file mode 120000 index 8ccffe667c..0000000000 --- a/Lang/ANSI-BASIC/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Department-numbers b/Lang/ANSI-BASIC/Department-numbers deleted file mode 120000 index 44a9633eba..0000000000 --- a/Lang/ANSI-BASIC/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Determine-if-a-string-is-collapsible b/Lang/ANSI-BASIC/Determine-if-a-string-is-collapsible deleted file mode 120000 index 47a87c627a..0000000000 --- a/Lang/ANSI-BASIC/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Dot-product b/Lang/ANSI-BASIC/Dot-product deleted file mode 120000 index 22c1437095..0000000000 --- a/Lang/ANSI-BASIC/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Dutch-national-flag-problem b/Lang/ANSI-BASIC/Dutch-national-flag-problem deleted file mode 120000 index 96adf147fe..0000000000 --- a/Lang/ANSI-BASIC/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Equilibrium-index b/Lang/ANSI-BASIC/Equilibrium-index deleted file mode 120000 index 4273670f14..0000000000 --- a/Lang/ANSI-BASIC/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Ethiopian-multiplication b/Lang/ANSI-BASIC/Ethiopian-multiplication deleted file mode 120000 index 0687e83f8a..0000000000 --- a/Lang/ANSI-BASIC/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Factors-of-an-integer b/Lang/ANSI-BASIC/Factors-of-an-integer deleted file mode 120000 index 187d81b94b..0000000000 --- a/Lang/ANSI-BASIC/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Fibonacci-sequence b/Lang/ANSI-BASIC/Fibonacci-sequence deleted file mode 120000 index 7c7a1193ff..0000000000 --- a/Lang/ANSI-BASIC/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Formatted-numeric-output b/Lang/ANSI-BASIC/Formatted-numeric-output deleted file mode 120000 index e876b7e939..0000000000 --- a/Lang/ANSI-BASIC/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Function-definition b/Lang/ANSI-BASIC/Function-definition deleted file mode 120000 index c45352eba7..0000000000 --- a/Lang/ANSI-BASIC/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Generate-lower-case-ASCII-alphabet b/Lang/ANSI-BASIC/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 26bc617302..0000000000 --- a/Lang/ANSI-BASIC/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Horners-rule-for-polynomial-evaluation b/Lang/ANSI-BASIC/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 4c6423e8e1..0000000000 --- a/Lang/ANSI-BASIC/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Langtons-ant b/Lang/ANSI-BASIC/Langtons-ant deleted file mode 120000 index c0944407d4..0000000000 --- a/Lang/ANSI-BASIC/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Leap-year b/Lang/ANSI-BASIC/Leap-year deleted file mode 120000 index d8f2cec2bd..0000000000 --- a/Lang/ANSI-BASIC/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Leonardo-numbers b/Lang/ANSI-BASIC/Leonardo-numbers deleted file mode 120000 index eeb51e71aa..0000000000 --- a/Lang/ANSI-BASIC/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Levenshtein-distance b/Lang/ANSI-BASIC/Levenshtein-distance deleted file mode 120000 index 92b553d536..0000000000 --- a/Lang/ANSI-BASIC/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Long-year b/Lang/ANSI-BASIC/Long-year deleted file mode 120000 index ca5898e1c7..0000000000 --- a/Lang/ANSI-BASIC/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Loops-Do-while b/Lang/ANSI-BASIC/Loops-Do-while deleted file mode 120000 index 998c0b9f8a..0000000000 --- a/Lang/ANSI-BASIC/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Luhn-test-of-credit-card-numbers b/Lang/ANSI-BASIC/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 5e8c5fe6dd..0000000000 --- a/Lang/ANSI-BASIC/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/M-bius-function b/Lang/ANSI-BASIC/M-bius-function deleted file mode 120000 index f786d2b99e..0000000000 --- a/Lang/ANSI-BASIC/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Magic-constant b/Lang/ANSI-BASIC/Magic-constant deleted file mode 120000 index 7d2184182c..0000000000 --- a/Lang/ANSI-BASIC/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Map-range b/Lang/ANSI-BASIC/Map-range deleted file mode 120000 index 829dfc3a26..0000000000 --- a/Lang/ANSI-BASIC/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Mayan-numerals b/Lang/ANSI-BASIC/Mayan-numerals deleted file mode 120000 index daef520f79..0000000000 --- a/Lang/ANSI-BASIC/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Monty-Hall-problem b/Lang/ANSI-BASIC/Monty-Hall-problem deleted file mode 120000 index 8f9a29cbcc..0000000000 --- a/Lang/ANSI-BASIC/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Nth-root b/Lang/ANSI-BASIC/Nth-root deleted file mode 120000 index 089f4d872e..0000000000 --- a/Lang/ANSI-BASIC/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Old-Russian-measure-of-length b/Lang/ANSI-BASIC/Old-Russian-measure-of-length deleted file mode 120000 index 81f64cd54c..0000000000 --- a/Lang/ANSI-BASIC/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Periodic-table b/Lang/ANSI-BASIC/Periodic-table deleted file mode 120000 index b9e95e6595..0000000000 --- a/Lang/ANSI-BASIC/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Random-numbers b/Lang/ANSI-BASIC/Random-numbers deleted file mode 120000 index 1de5221db0..0000000000 --- a/Lang/ANSI-BASIC/Random-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-numbers/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Real-constants-and-functions b/Lang/ANSI-BASIC/Real-constants-and-functions deleted file mode 120000 index 02cced5726..0000000000 --- a/Lang/ANSI-BASIC/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Repeat-a-string b/Lang/ANSI-BASIC/Repeat-a-string deleted file mode 120000 index 018a40d1b5..0000000000 --- a/Lang/ANSI-BASIC/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Rot-13 b/Lang/ANSI-BASIC/Rot-13 deleted file mode 120000 index 6dadbcd391..0000000000 --- a/Lang/ANSI-BASIC/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Semiprime b/Lang/ANSI-BASIC/Semiprime deleted file mode 120000 index e0427579b2..0000000000 --- a/Lang/ANSI-BASIC/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Shoelace-formula-for-polygonal-area b/Lang/ANSI-BASIC/Shoelace-formula-for-polygonal-area deleted file mode 120000 index 63de3b564e..0000000000 --- a/Lang/ANSI-BASIC/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Sorting-algorithms-Quicksort b/Lang/ANSI-BASIC/Sorting-algorithms-Quicksort deleted file mode 120000 index acf4c89afe..0000000000 --- a/Lang/ANSI-BASIC/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Square-free-integers b/Lang/ANSI-BASIC/Square-free-integers deleted file mode 120000 index 90f8c4cba3..0000000000 --- a/Lang/ANSI-BASIC/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Statistics-Basic b/Lang/ANSI-BASIC/Statistics-Basic deleted file mode 120000 index 11c8fbb1d2..0000000000 --- a/Lang/ANSI-BASIC/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Statistics-Normal-distribution b/Lang/ANSI-BASIC/Statistics-Normal-distribution deleted file mode 120000 index 674b0ba86f..0000000000 --- a/Lang/ANSI-BASIC/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Tau-number b/Lang/ANSI-BASIC/Tau-number deleted file mode 120000 index bfebf263eb..0000000000 --- a/Lang/ANSI-BASIC/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/ANSI-BASIC \ No newline at end of file diff --git a/Lang/ANSI-BASIC/Temperature-conversion b/Lang/ANSI-BASIC/Temperature-conversion deleted file mode 120000 index af167d778a..0000000000 --- a/Lang/ANSI-BASIC/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/ANSI-BASIC \ No newline at end of file diff --git a/Lang/APL/ADFGVX-cipher b/Lang/APL/ADFGVX-cipher deleted file mode 120000 index ab764adced..0000000000 --- a/Lang/APL/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/APL \ No newline at end of file diff --git a/Lang/APL/Abelian-sandpile-model b/Lang/APL/Abelian-sandpile-model deleted file mode 120000 index 346a055fbc..0000000000 --- a/Lang/APL/Abelian-sandpile-model +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model/APL \ No newline at end of file diff --git a/Lang/APL/Arithmetic-derivative b/Lang/APL/Arithmetic-derivative deleted file mode 120000 index c5dd2fd89b..0000000000 --- a/Lang/APL/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/APL \ No newline at end of file diff --git a/Lang/APL/Bioinformatics-base-count b/Lang/APL/Bioinformatics-base-count new file mode 120000 index 0000000000..f9e2de8949 --- /dev/null +++ b/Lang/APL/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/APL \ No newline at end of file diff --git a/Lang/APL/Combinations b/Lang/APL/Combinations deleted file mode 120000 index b1574b8996..0000000000 --- a/Lang/APL/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/APL \ No newline at end of file diff --git a/Lang/APL/Display-a-linear-combination b/Lang/APL/Display-a-linear-combination deleted file mode 120000 index 0e1867473a..0000000000 --- a/Lang/APL/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/APL \ No newline at end of file diff --git a/Lang/APL/Loops-Infinite b/Lang/APL/Loops-Infinite deleted file mode 120000 index 0f3ec957d2..0000000000 --- a/Lang/APL/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/APL \ No newline at end of file diff --git a/Lang/APL/Monte-Carlo-methods b/Lang/APL/Monte-Carlo-methods deleted file mode 120000 index 2cf831a11c..0000000000 --- a/Lang/APL/Monte-Carlo-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monte-Carlo-methods/APL \ No newline at end of file diff --git a/Lang/APL/Move-to-front-algorithm b/Lang/APL/Move-to-front-algorithm deleted file mode 120000 index bce8e1d67b..0000000000 --- a/Lang/APL/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/APL \ No newline at end of file diff --git a/Lang/APL/Pisano-period b/Lang/APL/Pisano-period deleted file mode 120000 index d81ff37307..0000000000 --- a/Lang/APL/Pisano-period +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pisano-period/APL \ No newline at end of file diff --git a/Lang/APL/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/APL/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/APL/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/APL/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/APL/Sort-a-list-of-object-identifiers b/Lang/APL/Sort-a-list-of-object-identifiers deleted file mode 120000 index 400cb9fc60..0000000000 --- a/Lang/APL/Sort-a-list-of-object-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-a-list-of-object-identifiers/APL \ No newline at end of file diff --git a/Lang/APL/Strip-comments-from-a-string b/Lang/APL/Strip-comments-from-a-string deleted file mode 120000 index ff78e120aa..0000000000 --- a/Lang/APL/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/APL \ No newline at end of file diff --git a/Lang/APL/Tic-tac-toe b/Lang/APL/Tic-tac-toe deleted file mode 120000 index 58bb681d1c..0000000000 --- a/Lang/APL/Tic-tac-toe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tic-tac-toe/APL \ No newline at end of file diff --git a/Lang/APL/Word-ladder b/Lang/APL/Word-ladder deleted file mode 120000 index 6de9f38d51..0000000000 --- a/Lang/APL/Word-ladder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-ladder/APL \ No newline at end of file diff --git a/Lang/APL/Zeckendorf-number-representation b/Lang/APL/Zeckendorf-number-representation deleted file mode 120000 index e25cdfa21a..0000000000 --- a/Lang/APL/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/APL \ No newline at end of file diff --git a/Lang/ARM-Assembly/00-LANG.txt b/Lang/ARM-Assembly/00-LANG.txt index 273ed5e757..4c41d124d7 100644 --- a/Lang/ARM-Assembly/00-LANG.txt +++ b/Lang/ARM-Assembly/00-LANG.txt @@ -4,9 +4,9 @@ The ARM architecture is widely used on mobile phones and tablets. It falls under ===Instruction Size=== Every instruction that the ARM can execute is 32 bits. While other processors can have variable length instructions, the ARM does not. This means that the ARM doesn't need to parse where an instruction begins and ends, which makes it run very fast. What you might not expect is that this 32-bit instruction size includes both the actual instruction and the operands! Let's take a look at a [[Z80 Assembly]] instruction and compare it to an ARM instruction. -LD HL,&8040 ;bytecode is 0x21 0x40 0x80 +LD HL,&8040 ;bytecode is 0x21 0x40 0x80 -mov r4,#0x04000000 ;bytecode is 0xE3A04301 +mov r4,#0x04000000 ;bytecode is 0xE3A04301 So where did the 0x04000000 go? It's actually been compressed and fit within those 4 bytes you saw earlier. The ARM is very good at decompressing it, since it's been shrunk to an 8-bit number that can be rotated by an even number of bits. Unfortunately, this compression method is a double-edged sword - some 32-bit numbers can't be compressed this way, and thus many instructions can't work with them! @@ -18,73 +18,72 @@ Registers are much more flexible than immediate operands. Unlike immediate opera Getting an address in a register can be achieved with the MOV command, but there are limitations to that which will be explained in detail later. It's more reliable to use ADR which loads a nearby address into a register. This address has to be within a certain distance from the current program counter or it can't be loaded, so it's not a reliable way to load from the heap on many machines. It's mostly intended for loading from nearby read-only data, such as text strings or stored immediates (more on that later). When you type ADR R0,LABEL, the assembler will convert this to MOV R0,PC,#N, where N is the difference between the current program counter value and the label you specified. LDR can be used in a similar fashion to ADR but there is a subtle distinction between the two. Assume that the section below is assembled starting at memory address 0x04000000: -DataBlock: +DataBlock: .long 0xDEADBEEF ;VASM uses .long for 32-bit data and .word for 16-bit data. Your assembler will probably use .word for 32 bit and .long 0xFFFFFFFF ; .hword for 16-bit. MyCode: adr r0, DataBlock ;loads the value 0x04000000 into R0 + ldr r1, DataBlock ;loads the value 0xDEADBEEF into R1 + adr r2, DataBlock+4 ;loads the value 0x04000004 into R2 -ldr r3, DataBlock+4 ;loads the value 0xFFFFFFFF into R3 - + +ldr r3, DataBlock+4 ;loads the value 0xFFFFFFFF into R3 As you can see, ADR only gives you the memory location of a value in memory, where LDR loads ''from'' that memory location. + ===Data Addressing using LDR and STR=== Unlike its "cousin," the Motorola 68000 (which isn't really related but has a somewhat similar design), the ARM cannot directly write immediate values to memory. Those values must be contained in registers first. Unlike the 68000, the ARM has no "address registers." Rather, enclosing a register name in square brackets turns its value into a reference to a memory location. You'll need to load that memory location's numeric "value" as a constant first. Then you can read from it with LDR and write to it with STR. Not only can you read from a given address, you can also adjust how you read from it, and what you do before or after the read. -RAM_ADDRESS: +RAM_ADDRESS: .long 0 ;for simplicity we'll assume that this can actually be written to. Represents a placeholder for 32-bit data. ;Your assembler's syntax may be different. + .long 0 ;another placeholder for 32-bit data MyCode: adr R2,RAM_Address ;get the address of a nearby place to store values. MOV R0,#0x12345678 ;the value to store. -STR R0,[R2] ;store 0x12345678 into the first 32-bit slot. - +STR R0,[R2] ;store 0x12345678 into the first 32-bit slot. This is the basic way to store into memory, but there are other options, such as offsetting and post-increment. -RAM_ADDRESS: +RAM_ADDRESS: .long 0 .long 0 ;we'll store here this time. MyCode: adr R2,RAM_Address ;point R2 to the first storage slot MOV R0,#0x12345678 -STR R0,[R2,#4] ;store into the SECOND slot. R2 still points to the first slot - the #4 is added to R2 only temporarily. - +STR R0,[R2,#4] ;store into the SECOND slot. R2 still points to the first slot - the #4 is added to R2 only temporarily. There's a limit on the size of an immediate value used to offset when loading/storing. You can also use a register as an offset, whose value will be added to the address. -RAM_AREA: +RAM_AREA: .space 64,0 ;64 bytes of ram ;assume that R2 contains the address of "RAM_AREA" MyCode: MOV R0,#0x12345678 MOV R1,#20 -STR R0,[R2,R1] ;equivalent of "STR R0,[R2,#20]" - +STR R0,[R2,R1] ;equivalent of "STR R0,[R2,#20]" Now let's say you wanted to actually alter the pointer to R2, so that it remains pointing to where you offset it to after the store or load. That's an option you have - all you have to do is type "!" after the brackets. This is called "pre-increment" or "pre-indexing." -RAM_ADDRESS: +RAM_ADDRESS: .long 0 .long 0 ;we'll store here this time, and we want R2 to still be pointing here after we write to it. MyCode: adr R2,RAM_Address ;point R2 to the first storage slot MOV R0,#0x12345678 -STR R0,[R2,#4]! ;store into the SECOND slot. R2 also points to the second slot now, even after this instruction has concluded. - +STR R0,[R2,#4]! ;store into the SECOND slot. R2 also points to the second slot now, even after this instruction has concluded. Here, the offset is performed ''before'' the storage operation. What if you want to offset afterwards? That would be useful for reading in a data stream. Good news - you can do that simply by having the offset value or register '''outside''' the brackets. This is called "post-increment" or "post-indexing." Unlike pre-indexing, these changes to the pointer are not temporary. -LDR R0,[R1],#4 ;load the 32-bit value stored at memory location R1 into R0, THEN add 4 to R1. This offset remains even after this - ; instruction is finished. - +LDR R0,[R1],#4 ;load the 32-bit value stored at memory location R1 into R0, THEN add 4 to R1. This offset remains even after this + ; instruction is finished. ===Barrel Shifter=== The ARM can add a bit shift or rotate to one of its operands at no additional cost to execution time or bytecode. If the operand being shifted is a register, the value of that register is not actually changed. The shift or rotate only applies during that instruction. diff --git a/Lang/ARM-Assembly/Bifid-cipher b/Lang/ARM-Assembly/Bifid-cipher deleted file mode 120000 index 456e328d85..0000000000 --- a/Lang/ARM-Assembly/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Binary-strings b/Lang/ARM-Assembly/Binary-strings deleted file mode 120000 index a7b6ed7647..0000000000 --- a/Lang/ARM-Assembly/Binary-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-strings/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Bioinformatics-base-count b/Lang/ARM-Assembly/Bioinformatics-base-count new file mode 120000 index 0000000000..baff8c16a9 --- /dev/null +++ b/Lang/ARM-Assembly/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Comma-quibbling b/Lang/ARM-Assembly/Comma-quibbling deleted file mode 120000 index 3d3d7812f0..0000000000 --- a/Lang/ARM-Assembly/Comma-quibbling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comma-quibbling/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Create-an-HTML-table b/Lang/ARM-Assembly/Create-an-HTML-table deleted file mode 120000 index 72c300d67a..0000000000 --- a/Lang/ARM-Assembly/Create-an-HTML-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-HTML-table/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Determine-sentence-type b/Lang/ARM-Assembly/Determine-sentence-type deleted file mode 120000 index 5e77711ab2..0000000000 --- a/Lang/ARM-Assembly/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Environment-variables b/Lang/ARM-Assembly/Environment-variables deleted file mode 120000 index 11f3baa342..0000000000 --- a/Lang/ARM-Assembly/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Fibonacci-n-step-number-sequences b/Lang/ARM-Assembly/Fibonacci-n-step-number-sequences deleted file mode 120000 index 6e51a1f11e..0000000000 --- a/Lang/ARM-Assembly/Fibonacci-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-n-step-number-sequences/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Guess-the-number b/Lang/ARM-Assembly/Guess-the-number deleted file mode 120000 index f4c41a9cec..0000000000 --- a/Lang/ARM-Assembly/Guess-the-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Halt-and-catch-fire b/Lang/ARM-Assembly/Halt-and-catch-fire deleted file mode 120000 index 56faf31b66..0000000000 --- a/Lang/ARM-Assembly/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Hash-from-two-arrays b/Lang/ARM-Assembly/Hash-from-two-arrays deleted file mode 120000 index 2a1c9147a6..0000000000 --- a/Lang/ARM-Assembly/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Keyboard-input-Obtain-a-Y-or-N-response b/Lang/ARM-Assembly/Keyboard-input-Obtain-a-Y-or-N-response deleted file mode 120000 index dc21bae989..0000000000 --- a/Lang/ARM-Assembly/Keyboard-input-Obtain-a-Y-or-N-response +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Obtain-a-Y-or-N-response/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Leonardo-numbers b/Lang/ARM-Assembly/Leonardo-numbers deleted file mode 120000 index 6639dbc2f4..0000000000 --- a/Lang/ARM-Assembly/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Machine-code b/Lang/ARM-Assembly/Machine-code deleted file mode 120000 index e48d9e81b2..0000000000 --- a/Lang/ARM-Assembly/Machine-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Machine-code/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Menu b/Lang/ARM-Assembly/Menu deleted file mode 120000 index 73a332d6f3..0000000000 --- a/Lang/ARM-Assembly/Menu +++ /dev/null @@ -1 +0,0 @@ -../../Task/Menu/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Miller-Rabin-primality-test b/Lang/ARM-Assembly/Miller-Rabin-primality-test new file mode 120000 index 0000000000..195623d60d --- /dev/null +++ b/Lang/ARM-Assembly/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Pancake-numbers b/Lang/ARM-Assembly/Pancake-numbers deleted file mode 120000 index 7bcfc9ff51..0000000000 --- a/Lang/ARM-Assembly/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Phrase-reversals b/Lang/ARM-Assembly/Phrase-reversals deleted file mode 120000 index 011ca34c42..0000000000 --- a/Lang/ARM-Assembly/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Pi b/Lang/ARM-Assembly/Pi deleted file mode 120000 index 97b44cbcc1..0000000000 --- a/Lang/ARM-Assembly/Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pi/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Read-a-configuration-file b/Lang/ARM-Assembly/Read-a-configuration-file deleted file mode 120000 index 76094b38c7..0000000000 --- a/Lang/ARM-Assembly/Read-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-configuration-file/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Repeat-a-string b/Lang/ARM-Assembly/Repeat-a-string deleted file mode 120000 index 69591f65b7..0000000000 --- a/Lang/ARM-Assembly/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Reverse-words-in-a-string b/Lang/ARM-Assembly/Reverse-words-in-a-string deleted file mode 120000 index 10d177c9f9..0000000000 --- a/Lang/ARM-Assembly/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Sorting-Algorithms-Circle-Sort b/Lang/ARM-Assembly/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..21eb603d7e --- /dev/null +++ b/Lang/ARM-Assembly/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/String-prepend b/Lang/ARM-Assembly/String-prepend deleted file mode 120000 index ab543c682f..0000000000 --- a/Lang/ARM-Assembly/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Strip-block-comments b/Lang/ARM-Assembly/Strip-block-comments deleted file mode 120000 index 6a5702298a..0000000000 --- a/Lang/ARM-Assembly/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Strip-comments-from-a-string b/Lang/ARM-Assembly/Strip-comments-from-a-string deleted file mode 120000 index b01acc2585..0000000000 --- a/Lang/ARM-Assembly/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Strip-whitespace-from-a-string-Top-and-tail b/Lang/ARM-Assembly/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index ba0f5a585c..0000000000 --- a/Lang/ARM-Assembly/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Update-a-configuration-file b/Lang/ARM-Assembly/Update-a-configuration-file deleted file mode 120000 index 9dd67115c0..0000000000 --- a/Lang/ARM-Assembly/Update-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Update-a-configuration-file/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Vigen-re-cipher b/Lang/ARM-Assembly/Vigen-re-cipher deleted file mode 120000 index caeb031a4b..0000000000 --- a/Lang/ARM-Assembly/Vigen-re-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Vigen-re-cipher-Cryptanalysis b/Lang/ARM-Assembly/Vigen-re-cipher-Cryptanalysis deleted file mode 120000 index ecfd7ae59c..0000000000 --- a/Lang/ARM-Assembly/Vigen-re-cipher-Cryptanalysis +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher-Cryptanalysis/ARM-Assembly \ No newline at end of file diff --git a/Lang/ARM-Assembly/Visualize-a-tree b/Lang/ARM-Assembly/Visualize-a-tree deleted file mode 120000 index 58626c23da..0000000000 --- a/Lang/ARM-Assembly/Visualize-a-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Visualize-a-tree/ARM-Assembly \ No newline at end of file diff --git a/Lang/ASIC/Dragon-curve b/Lang/ASIC/Dragon-curve deleted file mode 120000 index 7538c55bbc..0000000000 --- a/Lang/ASIC/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/ASIC \ No newline at end of file diff --git a/Lang/ASIC/Generate-lower-case-ASCII-alphabet b/Lang/ASIC/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index af19876ed5..0000000000 --- a/Lang/ASIC/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/ASIC \ No newline at end of file diff --git a/Lang/ASIC/Luhn-test-of-credit-card-numbers b/Lang/ASIC/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 30c2c72edb..0000000000 --- a/Lang/ASIC/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/ASIC \ No newline at end of file diff --git a/Lang/ASIC/M-bius-function b/Lang/ASIC/M-bius-function deleted file mode 120000 index 7848f34d54..0000000000 --- a/Lang/ASIC/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/ASIC \ No newline at end of file diff --git a/Lang/ASIC/Old-Russian-measure-of-length b/Lang/ASIC/Old-Russian-measure-of-length deleted file mode 120000 index e5e809a47d..0000000000 --- a/Lang/ASIC/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/ASIC \ No newline at end of file diff --git a/Lang/ASIC/Temperature-conversion b/Lang/ASIC/Temperature-conversion deleted file mode 120000 index 312278bfcd..0000000000 --- a/Lang/ASIC/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/ASIC \ No newline at end of file diff --git a/Lang/ATS/Quaternion-type b/Lang/ATS/Quaternion-type new file mode 120000 index 0000000000..95bd8641ec --- /dev/null +++ b/Lang/ATS/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/ATS \ No newline at end of file diff --git a/Lang/AWK/00-LANG.txt b/Lang/AWK/00-LANG.txt index 4d384747d7..8c5a32efdd 100644 --- a/Lang/AWK/00-LANG.txt +++ b/Lang/AWK/00-LANG.txt @@ -8,13 +8,13 @@ Each AWK program consists of pattern-action statements. The program reads each input line, checks lines against patterns, and runs matching actions. For programs that never read input lines, the entire program can be one BEGIN { ... } block. -* ''List users who have /bin/ksh as a shell.''$ awk -F: '$7 == "/bin/ksh" { print $1 }' /etc/passwd +* ''List users who have /bin/ksh as a shell.''$ awk -F: '$7 == "/bin/ksh" { print $1 }' /etc/passwd AWK has only three types of variables: they are strings, floating-point numbers, and associative arrays (where every array index is a string). Conversion between strings and numbers is automatic. AWK also has regular expressions, which appear in many AWK programs. There are a few built-in functions, like cos() and sprintf(). -* ''Find average line length.''$ awk '{ cnt += length($0) } END { print cnt / NR }' /etc/rc +* ''Find average line length.''$ awk '{ cnt += length($0) } END { print cnt / NR }' /etc/rc The name "AWK" comes from the initials of Alfred Aho, Peter Weinberger and Brian Kernighan: they invented AWK during the 1970s. A few decades later, Kernighan continues to maintain the [[nawk|reference implementation]] of AWK. diff --git a/Lang/AWK/100-doors b/Lang/AWK/100-doors new file mode 120000 index 0000000000..99c9a19f16 --- /dev/null +++ b/Lang/AWK/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/AWK \ No newline at end of file diff --git a/Lang/AWK/Arithmetic-derivative b/Lang/AWK/Arithmetic-derivative deleted file mode 120000 index 5f269aa501..0000000000 --- a/Lang/AWK/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/AWK \ No newline at end of file diff --git a/Lang/AWK/Bell-numbers b/Lang/AWK/Bell-numbers deleted file mode 120000 index ba62e9e87d..0000000000 --- a/Lang/AWK/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/AWK \ No newline at end of file diff --git a/Lang/AWK/Bioinformatics-base-count b/Lang/AWK/Bioinformatics-base-count new file mode 120000 index 0000000000..0d26eb27e1 --- /dev/null +++ b/Lang/AWK/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/AWK \ No newline at end of file diff --git a/Lang/AWK/Blum-integer b/Lang/AWK/Blum-integer deleted file mode 120000 index 3a37b18d0c..0000000000 --- a/Lang/AWK/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/AWK \ No newline at end of file diff --git a/Lang/AWK/Brilliant-numbers b/Lang/AWK/Brilliant-numbers deleted file mode 120000 index 75aada11ac..0000000000 --- a/Lang/AWK/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/AWK \ No newline at end of file diff --git a/Lang/AWK/Cuban-primes b/Lang/AWK/Cuban-primes deleted file mode 120000 index e24a72c78b..0000000000 --- a/Lang/AWK/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/AWK \ No newline at end of file diff --git a/Lang/AWK/Documentation b/Lang/AWK/Documentation deleted file mode 120000 index 203588c43d..0000000000 --- a/Lang/AWK/Documentation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Documentation/AWK \ No newline at end of file diff --git a/Lang/AWK/Egyptian-division b/Lang/AWK/Egyptian-division deleted file mode 120000 index b3edb7cd3b..0000000000 --- a/Lang/AWK/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/AWK \ No newline at end of file diff --git a/Lang/AWK/Equal-prime-and-composite-sums b/Lang/AWK/Equal-prime-and-composite-sums deleted file mode 120000 index ff748db68b..0000000000 --- a/Lang/AWK/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/AWK \ No newline at end of file diff --git a/Lang/AWK/Eulers-constant-0.5772... b/Lang/AWK/Eulers-constant-0.5772... deleted file mode 120000 index f2365557d6..0000000000 --- a/Lang/AWK/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../AWK \ No newline at end of file diff --git a/Lang/AWK/Factorial-primes b/Lang/AWK/Factorial-primes deleted file mode 120000 index 7344ad75fd..0000000000 --- a/Lang/AWK/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/AWK \ No newline at end of file diff --git a/Lang/AWK/Interactive-programming-repl- b/Lang/AWK/Interactive-programming-repl- deleted file mode 120000 index 958761b6b1..0000000000 --- a/Lang/AWK/Interactive-programming-repl- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Interactive-programming-repl-/AWK \ No newline at end of file diff --git a/Lang/AWK/Isqrt-integer-square-root-of-X b/Lang/AWK/Isqrt-integer-square-root-of-X deleted file mode 120000 index 04e9a1d13c..0000000000 --- a/Lang/AWK/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/AWK \ No newline at end of file diff --git a/Lang/AWK/MAC-vendor-lookup b/Lang/AWK/MAC-vendor-lookup deleted file mode 120000 index 3bffc2dd1c..0000000000 --- a/Lang/AWK/MAC-vendor-lookup +++ /dev/null @@ -1 +0,0 @@ -../../Task/MAC-vendor-lookup/AWK \ No newline at end of file diff --git a/Lang/AWK/Own-digits-power-sum b/Lang/AWK/Own-digits-power-sum deleted file mode 120000 index f78f510ce9..0000000000 --- a/Lang/AWK/Own-digits-power-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Own-digits-power-sum/AWK \ No newline at end of file diff --git a/Lang/AWK/Padovan-n-step-number-sequences b/Lang/AWK/Padovan-n-step-number-sequences deleted file mode 120000 index 6bc3dbde1f..0000000000 --- a/Lang/AWK/Padovan-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Padovan-n-step-number-sequences/AWK \ No newline at end of file diff --git a/Lang/AWK/Pierpont-primes b/Lang/AWK/Pierpont-primes deleted file mode 120000 index f41d86837f..0000000000 --- a/Lang/AWK/Pierpont-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pierpont-primes/AWK \ No newline at end of file diff --git a/Lang/AWK/Scope-modifiers b/Lang/AWK/Scope-modifiers deleted file mode 120000 index 635bec03ae..0000000000 --- a/Lang/AWK/Scope-modifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Scope-modifiers/AWK \ No newline at end of file diff --git a/Lang/AWK/Search-a-list-of-records b/Lang/AWK/Search-a-list-of-records deleted file mode 120000 index 6172b78f81..0000000000 --- a/Lang/AWK/Search-a-list-of-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list-of-records/AWK \ No newline at end of file diff --git a/Lang/AWK/Selectively-replace-multiple-instances-of-a-character-within-a-string b/Lang/AWK/Selectively-replace-multiple-instances-of-a-character-within-a-string deleted file mode 120000 index 248fe6e3f2..0000000000 --- a/Lang/AWK/Selectively-replace-multiple-instances-of-a-character-within-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Selectively-replace-multiple-instances-of-a-character-within-a-string/AWK \ No newline at end of file diff --git a/Lang/AWK/Sequence-of-primorial-primes b/Lang/AWK/Sequence-of-primorial-primes deleted file mode 120000 index 0448804b7b..0000000000 --- a/Lang/AWK/Sequence-of-primorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primorial-primes/AWK \ No newline at end of file diff --git a/Lang/AWK/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/AWK/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/AWK/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/AWK/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/AWK/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/AWK/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/AWK/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/AWK/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/AWK/Soloways-recurring-rainfall b/Lang/AWK/Soloways-recurring-rainfall deleted file mode 120000 index 1f850c19b0..0000000000 --- a/Lang/AWK/Soloways-recurring-rainfall +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soloways-recurring-rainfall/AWK \ No newline at end of file diff --git a/Lang/AWK/Time-a-function b/Lang/AWK/Time-a-function deleted file mode 120000 index d78f55d9f9..0000000000 --- a/Lang/AWK/Time-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Time-a-function/AWK \ No newline at end of file diff --git a/Lang/AWK/Vampire-number b/Lang/AWK/Vampire-number deleted file mode 120000 index 3b7709e53a..0000000000 --- a/Lang/AWK/Vampire-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vampire-number/AWK \ No newline at end of file diff --git a/Lang/AWK/Wagstaff-primes b/Lang/AWK/Wagstaff-primes deleted file mode 120000 index 955871e83e..0000000000 --- a/Lang/AWK/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/AWK \ No newline at end of file diff --git a/Lang/AWK/Wilson-primes-of-order-n b/Lang/AWK/Wilson-primes-of-order-n deleted file mode 120000 index 840b045a17..0000000000 --- a/Lang/AWK/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/AWK \ No newline at end of file diff --git a/Lang/Action-/00-LANG.txt b/Lang/Action-/00-LANG.txt index 3811c3c636..b37eb47c8f 100644 --- a/Lang/Action-/00-LANG.txt +++ b/Lang/Action-/00-LANG.txt @@ -4,7 +4,7 @@ }} Action! is a language written by Clinton Parker and published by Optimized Sytems Software (OSS) for the Atari 8-bit line of home computers. It is related to ALGOL and optimized for single-pass compilation to 6502 code. -A manual for the language is available at https://seriouscomputerist.atariverse.com/media/pdf/manual/OSS%20OS-A+%20-%20Manual%20(1983).pdf + ==See Also== * [[wp:Action!_(programming_language)|Action! on Wikipedia]] * [[ALGOL 68]] diff --git a/Lang/Action-/Arithmetic-derivative b/Lang/Action-/Arithmetic-derivative deleted file mode 120000 index 8206b6a192..0000000000 --- a/Lang/Action-/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Action- \ No newline at end of file diff --git a/Lang/Action-/Bioinformatics-base-count b/Lang/Action-/Bioinformatics-base-count new file mode 120000 index 0000000000..2a7e093367 --- /dev/null +++ b/Lang/Action-/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Action- \ No newline at end of file diff --git a/Lang/Action-/Quaternion-type b/Lang/Action-/Quaternion-type new file mode 120000 index 0000000000..0cfb07db30 --- /dev/null +++ b/Lang/Action-/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Action- \ No newline at end of file diff --git a/Lang/Action-/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Action-/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Action-/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Action-/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Action-/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Action-/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Action-/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Action-/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Action-/Sorting-Algorithms-Circle-Sort b/Lang/Action-/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..a9db72f0ce --- /dev/null +++ b/Lang/Action-/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Action- \ No newline at end of file diff --git a/Lang/ActionScript/00-LANG.txt b/Lang/ActionScript/00-LANG.txt index 4fe99ed760..14a7dc41bf 100644 --- a/Lang/ActionScript/00-LANG.txt +++ b/Lang/ActionScript/00-LANG.txt @@ -4,8 +4,7 @@ |strength=strong |safety=safe |checking=static -|LCT=yes -|tags=actionscript, as}} +|LCT=yes}} {{Language programming paradigm|Distributed}} {{Language programming paradigm|Imperative}} diff --git a/Lang/Ada/00-LANG.txt b/Lang/Ada/00-LANG.txt index e9eb8d687d..85a16e96c0 100644 --- a/Lang/Ada/00-LANG.txt +++ b/Lang/Ada/00-LANG.txt @@ -8,7 +8,7 @@ |strength=strong |safety=safe |LCT=yes -|bnf=http://www.ada-auth.org/standards/22rm/html/RM-P-1.html}}'''Ada''' is a structured, statically typed [[imperative programming|imperative]] computer programming language. Ada was initially standardized by [[ANSI]] in 1983 and by [[ISO]] in 1987. This version of the language is commonly known as [[Ada 83]]. The next version was standardized by ISO in 1995 (ISO/IEC 8652:1995) and is commonly known as [[Ada 95]]. Following that ISO published ISO/IEC 8652:1995/Amd 1:2007 in 2007, which is commonly known as [[Ada 2005]]. Afterwards they published ISO/IEC 8652:2012(E), also known as [[Ada 2012]]. Most recently ISO published [http://www.ada-auth.org/standards/22rm/html/RM-TTL.html ISO/IEC 8652:2023], commonly known as [[Ada 2022]]. Formally only the most recent version of the language is known as '''Ada'''. +|bnf=http://www.adaic.org/standards/1zrm/html/RM-P.html}}'''Ada''' is a structured, statically typed [[imperative programming|imperative]] computer programming language. Ada was initially standardized by [[ANSI]] in 1983 and by [[ISO]] in 1987. This version of the language is commonly known as [[Ada 83]]. The next version was standardized by ISO in 1995 (ISO/IEC 8652:1995) and is commonly known as [[Ada 95]]. Following that ISO published ISO/IEC 8652:1995/Amd 1:2007 in 2007, which is commonly known as [[Ada 2005]]. Most recently ISO published [http://www.ada-auth.org/standards/12rm/html/RM-TTL.html ISO/IEC 8652:2012(E)], commonly known as [[Ada 2012]]. Formally only the most recent version of the language is known as '''Ada'''. The language is named after [[wp:Ada_Lovelace|Augusta Ada King, Countess of Lovelace]] thought to be the first ever programmer. Initially it was designed for [http://www.defense.gov U.S. Department of Defense]. The language is used for large and mission-critical systems. See [[wp:Ada_(programming_language)|also]]. ==Grammar== @@ -17,6 +17,4 @@ The language is named after [[wp:Ada_Lovelace|Augusta Ada King, Countess of Love {{Language programming paradigm|Distributed}} {{Language programming paradigm|Generic}} {{Language programming paradigm|Imperative}} -{{Language programming paradigm|Object-oriented}} -==Todo== -* [[Tasks not implemented in Ada]] \ No newline at end of file +{{Language programming paradigm|Object-oriented}} \ No newline at end of file diff --git a/Lang/Ada/24-game-Solve b/Lang/Ada/24-game-Solve deleted file mode 120000 index 245a9225c6..0000000000 --- a/Lang/Ada/24-game-Solve +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game-Solve/Ada \ No newline at end of file diff --git a/Lang/Ada/Abelian-sandpile-model b/Lang/Ada/Abelian-sandpile-model deleted file mode 120000 index adfb5aa625..0000000000 --- a/Lang/Ada/Abelian-sandpile-model +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model/Ada \ No newline at end of file diff --git a/Lang/Ada/Achilles-numbers b/Lang/Ada/Achilles-numbers deleted file mode 120000 index 8a02102d36..0000000000 --- a/Lang/Ada/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Almkvist-Giullera-formula-for-pi b/Lang/Ada/Almkvist-Giullera-formula-for-pi deleted file mode 120000 index 66015473cd..0000000000 --- a/Lang/Ada/Almkvist-Giullera-formula-for-pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almkvist-Giullera-formula-for-pi/Ada \ No newline at end of file diff --git a/Lang/Ada/Angles-geometric-normalization-and-conversion b/Lang/Ada/Angles-geometric-normalization-and-conversion deleted file mode 120000 index d4d2487c81..0000000000 --- a/Lang/Ada/Angles-geometric-normalization-and-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angles-geometric-normalization-and-conversion/Ada \ No newline at end of file diff --git a/Lang/Ada/Arithmetic-derivative b/Lang/Ada/Arithmetic-derivative deleted file mode 120000 index 87dd4d6940..0000000000 --- a/Lang/Ada/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Ada \ No newline at end of file diff --git a/Lang/Ada/Arithmetic-geometric-mean-Calculate-Pi b/Lang/Ada/Arithmetic-geometric-mean-Calculate-Pi deleted file mode 120000 index 14bdbe4c3d..0000000000 --- a/Lang/Ada/Arithmetic-geometric-mean-Calculate-Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean-Calculate-Pi/Ada \ No newline at end of file diff --git a/Lang/Ada/Ascending-primes b/Lang/Ada/Ascending-primes deleted file mode 120000 index cee2b86585..0000000000 --- a/Lang/Ada/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/Babylonian-spiral b/Lang/Ada/Babylonian-spiral deleted file mode 120000 index fd4ac4c6ad..0000000000 --- a/Lang/Ada/Babylonian-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babylonian-spiral/Ada \ No newline at end of file diff --git a/Lang/Ada/Bioinformatics-base-count b/Lang/Ada/Bioinformatics-base-count new file mode 120000 index 0000000000..59c9c9dde5 --- /dev/null +++ b/Lang/Ada/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Ada \ No newline at end of file diff --git a/Lang/Ada/Biorhythms b/Lang/Ada/Biorhythms deleted file mode 120000 index 0d82777906..0000000000 --- a/Lang/Ada/Biorhythms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Biorhythms/Ada \ No newline at end of file diff --git a/Lang/Ada/Blum-integer b/Lang/Ada/Blum-integer deleted file mode 120000 index 48b2715109..0000000000 --- a/Lang/Ada/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/Ada \ No newline at end of file diff --git a/Lang/Ada/Boyer-Moore-string-search b/Lang/Ada/Boyer-Moore-string-search deleted file mode 120000 index 114c2a5fea..0000000000 --- a/Lang/Ada/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Ada \ No newline at end of file diff --git a/Lang/Ada/Brace-expansion b/Lang/Ada/Brace-expansion deleted file mode 120000 index b881365fa7..0000000000 --- a/Lang/Ada/Brace-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brace-expansion/Ada \ No newline at end of file diff --git a/Lang/Ada/Brilliant-numbers b/Lang/Ada/Brilliant-numbers deleted file mode 120000 index 80af4238ae..0000000000 --- a/Lang/Ada/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Calkin-Wilf-sequence b/Lang/Ada/Calkin-Wilf-sequence deleted file mode 120000 index 9e4b8cd779..0000000000 --- a/Lang/Ada/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/Ada \ No newline at end of file diff --git a/Lang/Ada/Camel-case-and-snake-case b/Lang/Ada/Camel-case-and-snake-case deleted file mode 120000 index 1d95b38233..0000000000 --- a/Lang/Ada/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Ada \ No newline at end of file diff --git a/Lang/Ada/Canonicalize-CIDR b/Lang/Ada/Canonicalize-CIDR deleted file mode 120000 index c0c0b338b8..0000000000 --- a/Lang/Ada/Canonicalize-CIDR +++ /dev/null @@ -1 +0,0 @@ -../../Task/Canonicalize-CIDR/Ada \ No newline at end of file diff --git a/Lang/Ada/Chaos-game b/Lang/Ada/Chaos-game deleted file mode 120000 index 456fd72f97..0000000000 --- a/Lang/Ada/Chaos-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaos-game/Ada \ No newline at end of file diff --git a/Lang/Ada/Cistercian-numerals b/Lang/Ada/Cistercian-numerals deleted file mode 120000 index a03109c188..0000000000 --- a/Lang/Ada/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Ada \ No newline at end of file diff --git a/Lang/Ada/Color-wheel b/Lang/Ada/Color-wheel deleted file mode 120000 index 3d78384078..0000000000 --- a/Lang/Ada/Color-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-wheel/Ada \ No newline at end of file diff --git a/Lang/Ada/Combinations-and-permutations b/Lang/Ada/Combinations-and-permutations deleted file mode 120000 index 3f163f203e..0000000000 --- a/Lang/Ada/Combinations-and-permutations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations-and-permutations/Ada \ No newline at end of file diff --git a/Lang/Ada/Cuban-primes b/Lang/Ada/Cuban-primes deleted file mode 120000 index a7270c8ac4..0000000000 --- a/Lang/Ada/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/Curzon-numbers b/Lang/Ada/Curzon-numbers deleted file mode 120000 index 4a77e1da8a..0000000000 --- a/Lang/Ada/Curzon-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Curzon-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Deepcopy b/Lang/Ada/Deepcopy deleted file mode 120000 index 4b1e30735d..0000000000 --- a/Lang/Ada/Deepcopy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deepcopy/Ada \ No newline at end of file diff --git a/Lang/Ada/Descending-primes b/Lang/Ada/Descending-primes deleted file mode 120000 index 3c6c36447c..0000000000 --- a/Lang/Ada/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/Determine-sentence-type b/Lang/Ada/Determine-sentence-type deleted file mode 120000 index df39412f47..0000000000 --- a/Lang/Ada/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Ada \ No newline at end of file diff --git a/Lang/Ada/Eban-numbers b/Lang/Ada/Eban-numbers deleted file mode 120000 index 8c7c83bfc9..0000000000 --- a/Lang/Ada/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Equal-prime-and-composite-sums b/Lang/Ada/Equal-prime-and-composite-sums deleted file mode 120000 index b1a2555466..0000000000 --- a/Lang/Ada/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/Ada \ No newline at end of file diff --git a/Lang/Ada/Eulers-constant-0.5772... b/Lang/Ada/Eulers-constant-0.5772... deleted file mode 120000 index b0e75cb33e..0000000000 --- a/Lang/Ada/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../Ada \ No newline at end of file diff --git a/Lang/Ada/FTP b/Lang/Ada/FTP deleted file mode 120000 index 1d406ce7cd..0000000000 --- a/Lang/Ada/FTP +++ /dev/null @@ -1 +0,0 @@ -../../Task/FTP/Ada \ No newline at end of file diff --git a/Lang/Ada/Factorial-primes b/Lang/Ada/Factorial-primes deleted file mode 120000 index fdff310065..0000000000 --- a/Lang/Ada/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/Factorions b/Lang/Ada/Factorions deleted file mode 120000 index d9b74415a9..0000000000 --- a/Lang/Ada/Factorions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorions/Ada \ No newline at end of file diff --git a/Lang/Ada/Fermat-numbers b/Lang/Ada/Fermat-numbers deleted file mode 120000 index c9d81fb3a1..0000000000 --- a/Lang/Ada/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Find-duplicate-files b/Lang/Ada/Find-duplicate-files deleted file mode 120000 index f7ad1ff6fd..0000000000 --- a/Lang/Ada/Find-duplicate-files +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-duplicate-files/Ada \ No newline at end of file diff --git a/Lang/Ada/Giuga-numbers b/Lang/Ada/Giuga-numbers deleted file mode 120000 index 24ab180f54..0000000000 --- a/Lang/Ada/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Harmonic-series b/Lang/Ada/Harmonic-series deleted file mode 120000 index 97492bcb66..0000000000 --- a/Lang/Ada/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/Ada \ No newline at end of file diff --git a/Lang/Ada/Hex-words b/Lang/Ada/Hex-words deleted file mode 120000 index da49cf2b4d..0000000000 --- a/Lang/Ada/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/Ada \ No newline at end of file diff --git a/Lang/Ada/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols b/Lang/Ada/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols deleted file mode 120000 index 29e378f3f1..0000000000 --- a/Lang/Ada/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols +++ /dev/null @@ -1 +0,0 @@ -../../Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Ada \ No newline at end of file diff --git a/Lang/Ada/Jacobi-symbol b/Lang/Ada/Jacobi-symbol deleted file mode 120000 index 1c52eec7ce..0000000000 --- a/Lang/Ada/Jacobi-symbol +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobi-symbol/Ada \ No newline at end of file diff --git a/Lang/Ada/Jacobsthal-numbers b/Lang/Ada/Jacobsthal-numbers deleted file mode 120000 index 630504cad4..0000000000 --- a/Lang/Ada/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Knapsack-problem-Bounded b/Lang/Ada/Knapsack-problem-Bounded deleted file mode 120000 index 1cfbda0d29..0000000000 --- a/Lang/Ada/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/Ada \ No newline at end of file diff --git a/Lang/Ada/Kosaraju b/Lang/Ada/Kosaraju deleted file mode 120000 index 0b7b72cfb6..0000000000 --- a/Lang/Ada/Kosaraju +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kosaraju/Ada \ No newline at end of file diff --git a/Lang/Ada/Lah-numbers b/Lang/Ada/Lah-numbers deleted file mode 120000 index e4f08d947d..0000000000 --- a/Lang/Ada/Lah-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lah-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Largest-number-divisible-by-its-digits b/Lang/Ada/Largest-number-divisible-by-its-digits deleted file mode 120000 index d61b3cb8be..0000000000 --- a/Lang/Ada/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/Ada \ No newline at end of file diff --git a/Lang/Ada/Left-factorials b/Lang/Ada/Left-factorials deleted file mode 120000 index 8c62b38a57..0000000000 --- a/Lang/Ada/Left-factorials +++ /dev/null @@ -1 +0,0 @@ -../../Task/Left-factorials/Ada \ No newline at end of file diff --git a/Lang/Ada/Levenshtein-distance-Alignment b/Lang/Ada/Levenshtein-distance-Alignment deleted file mode 120000 index 1c6a7ca906..0000000000 --- a/Lang/Ada/Levenshtein-distance-Alignment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance-Alignment/Ada \ No newline at end of file diff --git a/Lang/Ada/Long-literals-with-continuations b/Lang/Ada/Long-literals-with-continuations deleted file mode 120000 index 9d6be6cfc8..0000000000 --- a/Lang/Ada/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/Ada \ No newline at end of file diff --git a/Lang/Ada/Longest-increasing-subsequence b/Lang/Ada/Longest-increasing-subsequence deleted file mode 120000 index dd360a694d..0000000000 --- a/Lang/Ada/Longest-increasing-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-increasing-subsequence/Ada \ No newline at end of file diff --git a/Lang/Ada/M-bius-function b/Lang/Ada/M-bius-function deleted file mode 120000 index cb59f2e52a..0000000000 --- a/Lang/Ada/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Ada \ No newline at end of file diff --git a/Lang/Ada/Machine-code b/Lang/Ada/Machine-code deleted file mode 120000 index 52ae4edc91..0000000000 --- a/Lang/Ada/Machine-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Machine-code/Ada \ No newline at end of file diff --git a/Lang/Ada/Magic-constant b/Lang/Ada/Magic-constant deleted file mode 120000 index bd59423b8e..0000000000 --- a/Lang/Ada/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/Ada \ No newline at end of file diff --git a/Lang/Ada/Metallic-ratios b/Lang/Ada/Metallic-ratios deleted file mode 120000 index f41030172b..0000000000 --- a/Lang/Ada/Metallic-ratios +++ /dev/null @@ -1 +0,0 @@ -../../Task/Metallic-ratios/Ada \ No newline at end of file diff --git a/Lang/Ada/Miller-Rabin-primality-test b/Lang/Ada/Miller-Rabin-primality-test new file mode 120000 index 0000000000..79bf6fd437 --- /dev/null +++ b/Lang/Ada/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Ada \ No newline at end of file diff --git a/Lang/Ada/Mind-boggling-card-trick b/Lang/Ada/Mind-boggling-card-trick deleted file mode 120000 index 11ae4366fc..0000000000 --- a/Lang/Ada/Mind-boggling-card-trick +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mind-boggling-card-trick/Ada \ No newline at end of file diff --git a/Lang/Ada/Minimal-steps-down-to-1 b/Lang/Ada/Minimal-steps-down-to-1 deleted file mode 120000 index 44f17e189f..0000000000 --- a/Lang/Ada/Minimal-steps-down-to-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minimal-steps-down-to-1/Ada \ No newline at end of file diff --git a/Lang/Ada/Musical-scale b/Lang/Ada/Musical-scale deleted file mode 120000 index a792f4144a..0000000000 --- a/Lang/Ada/Musical-scale +++ /dev/null @@ -1 +0,0 @@ -../../Task/Musical-scale/Ada \ No newline at end of file diff --git a/Lang/Ada/Naming-conventions b/Lang/Ada/Naming-conventions deleted file mode 120000 index 44f00f1ff1..0000000000 --- a/Lang/Ada/Naming-conventions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Naming-conventions/Ada \ No newline at end of file diff --git a/Lang/Ada/Nautical-bell b/Lang/Ada/Nautical-bell deleted file mode 120000 index 61069c35a0..0000000000 --- a/Lang/Ada/Nautical-bell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nautical-bell/Ada \ No newline at end of file diff --git a/Lang/Ada/Next-highest-int-from-digits b/Lang/Ada/Next-highest-int-from-digits deleted file mode 120000 index e996a777e6..0000000000 --- a/Lang/Ada/Next-highest-int-from-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Next-highest-int-from-digits/Ada \ No newline at end of file diff --git a/Lang/Ada/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors b/Lang/Ada/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors deleted file mode 120000 index 58dcaaaaee..0000000000 --- a/Lang/Ada/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors/Ada \ No newline at end of file diff --git a/Lang/Ada/Old-Russian-measure-of-length b/Lang/Ada/Old-Russian-measure-of-length deleted file mode 120000 index 1d4422be24..0000000000 --- a/Lang/Ada/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/Ada \ No newline at end of file diff --git a/Lang/Ada/Penneys-game b/Lang/Ada/Penneys-game deleted file mode 120000 index 00a5e1d496..0000000000 --- a/Lang/Ada/Penneys-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Penneys-game/Ada \ No newline at end of file diff --git a/Lang/Ada/Permutations-by-swapping b/Lang/Ada/Permutations-by-swapping deleted file mode 120000 index 9140cf7f43..0000000000 --- a/Lang/Ada/Permutations-by-swapping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations-by-swapping/Ada \ No newline at end of file diff --git a/Lang/Ada/Play-recorded-sounds b/Lang/Ada/Play-recorded-sounds deleted file mode 120000 index 2365ca211b..0000000000 --- a/Lang/Ada/Play-recorded-sounds +++ /dev/null @@ -1 +0,0 @@ -../../Task/Play-recorded-sounds/Ada \ No newline at end of file diff --git a/Lang/Ada/Poker-hand-analyser b/Lang/Ada/Poker-hand-analyser deleted file mode 120000 index fc5a66b995..0000000000 --- a/Lang/Ada/Poker-hand-analyser +++ /dev/null @@ -1 +0,0 @@ -../../Task/Poker-hand-analyser/Ada \ No newline at end of file diff --git a/Lang/Ada/Prime-conspiracy b/Lang/Ada/Prime-conspiracy deleted file mode 120000 index 49f0dd3152..0000000000 --- a/Lang/Ada/Prime-conspiracy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-conspiracy/Ada \ No newline at end of file diff --git a/Lang/Ada/Quaternion-type b/Lang/Ada/Quaternion-type new file mode 120000 index 0000000000..9dc0eab94d --- /dev/null +++ b/Lang/Ada/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Ada \ No newline at end of file diff --git a/Lang/Ada/Random-sentence-from-book b/Lang/Ada/Random-sentence-from-book deleted file mode 120000 index f08e942e14..0000000000 --- a/Lang/Ada/Random-sentence-from-book +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-sentence-from-book/Ada \ No newline at end of file diff --git a/Lang/Ada/Read-a-file-character-by-character-UTF8 b/Lang/Ada/Read-a-file-character-by-character-UTF8 deleted file mode 120000 index 71f788273b..0000000000 --- a/Lang/Ada/Read-a-file-character-by-character-UTF8 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-character-by-character-UTF8/Ada \ No newline at end of file diff --git a/Lang/Ada/Record-sound b/Lang/Ada/Record-sound deleted file mode 120000 index af45b7783f..0000000000 --- a/Lang/Ada/Record-sound +++ /dev/null @@ -1 +0,0 @@ -../../Task/Record-sound/Ada \ No newline at end of file diff --git a/Lang/Ada/Safe-primes-and-unsafe-primes b/Lang/Ada/Safe-primes-and-unsafe-primes deleted file mode 120000 index 97b204f4de..0000000000 --- a/Lang/Ada/Safe-primes-and-unsafe-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Safe-primes-and-unsafe-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/Selectively-replace-multiple-instances-of-a-character-within-a-string b/Lang/Ada/Selectively-replace-multiple-instances-of-a-character-within-a-string deleted file mode 120000 index 5077dd9033..0000000000 --- a/Lang/Ada/Selectively-replace-multiple-instances-of-a-character-within-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Selectively-replace-multiple-instances-of-a-character-within-a-string/Ada \ No newline at end of file diff --git a/Lang/Ada/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Ada/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Ada/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Ada/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Ada/Sexy-primes b/Lang/Ada/Sexy-primes deleted file mode 120000 index ec070f062f..0000000000 --- a/Lang/Ada/Sexy-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sexy-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/Sierpinski-pentagon b/Lang/Ada/Sierpinski-pentagon deleted file mode 120000 index d3c2f495a7..0000000000 --- a/Lang/Ada/Sierpinski-pentagon +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-pentagon/Ada \ No newline at end of file diff --git a/Lang/Ada/Sierpinski-square-curve b/Lang/Ada/Sierpinski-square-curve deleted file mode 120000 index 32cee5f712..0000000000 --- a/Lang/Ada/Sierpinski-square-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-square-curve/Ada \ No newline at end of file diff --git a/Lang/Ada/Sierpinski-triangle-Graphical b/Lang/Ada/Sierpinski-triangle-Graphical deleted file mode 120000 index c5fb35984b..0000000000 --- a/Lang/Ada/Sierpinski-triangle-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle-Graphical/Ada \ No newline at end of file diff --git a/Lang/Ada/Sleeping-Beauty-problem b/Lang/Ada/Sleeping-Beauty-problem deleted file mode 120000 index 1c2ef27d37..0000000000 --- a/Lang/Ada/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Ada \ No newline at end of file diff --git a/Lang/Ada/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k b/Lang/Ada/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k deleted file mode 120000 index acb5a83713..0000000000 --- a/Lang/Ada/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k/Ada \ No newline at end of file diff --git a/Lang/Ada/Sorting-algorithms-Cocktail-sort-with-shifting-bounds b/Lang/Ada/Sorting-algorithms-Cocktail-sort-with-shifting-bounds deleted file mode 120000 index 484d3d768d..0000000000 --- a/Lang/Ada/Sorting-algorithms-Cocktail-sort-with-shifting-bounds +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Cocktail-sort-with-shifting-bounds/Ada \ No newline at end of file diff --git a/Lang/Ada/Sorting-algorithms-Permutation-sort b/Lang/Ada/Sorting-algorithms-Permutation-sort deleted file mode 120000 index 0f333c5ec8..0000000000 --- a/Lang/Ada/Sorting-algorithms-Permutation-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Permutation-sort/Ada \ No newline at end of file diff --git a/Lang/Ada/Test-integerness b/Lang/Ada/Test-integerness deleted file mode 120000 index 8a5462dcb5..0000000000 --- a/Lang/Ada/Test-integerness +++ /dev/null @@ -1 +0,0 @@ -../../Task/Test-integerness/Ada \ No newline at end of file diff --git a/Lang/Ada/Total-circles-area b/Lang/Ada/Total-circles-area deleted file mode 120000 index 781e585826..0000000000 --- a/Lang/Ada/Total-circles-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Total-circles-area/Ada \ No newline at end of file diff --git a/Lang/Ada/Twin-primes b/Lang/Ada/Twin-primes deleted file mode 120000 index f368573f47..0000000000 --- a/Lang/Ada/Twin-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twin-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/Twos-complement b/Lang/Ada/Twos-complement deleted file mode 120000 index 396d1a76f2..0000000000 --- a/Lang/Ada/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Ada \ No newline at end of file diff --git a/Lang/Ada/UPC b/Lang/Ada/UPC deleted file mode 120000 index 374da7b0aa..0000000000 --- a/Lang/Ada/UPC +++ /dev/null @@ -1 +0,0 @@ -../../Task/UPC/Ada \ No newline at end of file diff --git a/Lang/Ada/Ultra-useful-primes b/Lang/Ada/Ultra-useful-primes deleted file mode 120000 index c89f1426c4..0000000000 --- a/Lang/Ada/Ultra-useful-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ultra-useful-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/Vector b/Lang/Ada/Vector deleted file mode 120000 index 4cc7975e2f..0000000000 --- a/Lang/Ada/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/Ada \ No newline at end of file diff --git a/Lang/Ada/Wagstaff-primes b/Lang/Ada/Wagstaff-primes deleted file mode 120000 index 3b705137b1..0000000000 --- a/Lang/Ada/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Ada \ No newline at end of file diff --git a/Lang/Ada/War-card-game b/Lang/Ada/War-card-game deleted file mode 120000 index dd4f92afee..0000000000 --- a/Lang/Ada/War-card-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/War-card-game/Ada \ No newline at end of file diff --git a/Lang/Ada/Weird-numbers b/Lang/Ada/Weird-numbers deleted file mode 120000 index 98491ade1a..0000000000 --- a/Lang/Ada/Weird-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Weird-numbers/Ada \ No newline at end of file diff --git a/Lang/Ada/Wilson-primes-of-order-n b/Lang/Ada/Wilson-primes-of-order-n deleted file mode 120000 index 95a6ebc6d1..0000000000 --- a/Lang/Ada/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/Ada \ No newline at end of file diff --git a/Lang/Ada/Word-ladder b/Lang/Ada/Word-ladder deleted file mode 120000 index 495c24dbcd..0000000000 --- a/Lang/Ada/Word-ladder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-ladder/Ada \ No newline at end of file diff --git a/Lang/Ada/Word-search b/Lang/Ada/Word-search deleted file mode 120000 index 32f00f4762..0000000000 --- a/Lang/Ada/Word-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-search/Ada \ No newline at end of file diff --git a/Lang/Ada/Word-wheel b/Lang/Ada/Word-wheel deleted file mode 120000 index 47f67698e0..0000000000 --- a/Lang/Ada/Word-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wheel/Ada \ No newline at end of file diff --git a/Lang/Adina/00-LANG.txt b/Lang/Adina/00-LANG.txt deleted file mode 100644 index e796807867..0000000000 --- a/Lang/Adina/00-LANG.txt +++ /dev/null @@ -1,13 +0,0 @@ -{{language|Adina}} -Adina is a programming language, based on Racket and russian language. Unlike Racket it uses indent and operators precedence to describe program syntax. It may be used in english, because all Racket libraries are accessible. One should add "english()" in first string to use standard racket libraries. - -Адина, это язык программирования, основанный на Racket и русском языке. В отличие от Racket вместо скобок для синтаксической -структуры используются отступы и бинарные операторы. Также сделан доступ через квадратные скобки к элементам коллекции и через фигурные к методам объектов. - -Документация по адресу: https://docs.racket-lang.org/russian-lang/ - -==See Also== -* [[Racket]] - -==TODO== -[[Tasks not implemented in Adina]] \ No newline at end of file diff --git a/Lang/Adina/00-META.yaml b/Lang/Adina/00-META.yaml deleted file mode 100644 index e1ca8650ca..0000000000 --- a/Lang/Adina/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Adina diff --git a/Lang/Adina/100-doors b/Lang/Adina/100-doors deleted file mode 120000 index c96d2d65fc..0000000000 --- a/Lang/Adina/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Adina \ No newline at end of file diff --git a/Lang/Adina/Even-or-odd b/Lang/Adina/Even-or-odd deleted file mode 120000 index 1718b42d76..0000000000 --- a/Lang/Adina/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/Adina \ No newline at end of file diff --git a/Lang/Adina/Hello-world-Text b/Lang/Adina/Hello-world-Text deleted file mode 120000 index f886a7cc4f..0000000000 --- a/Lang/Adina/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Adina \ No newline at end of file diff --git a/Lang/Adina/Loops-For b/Lang/Adina/Loops-For deleted file mode 120000 index c4d6bee093..0000000000 --- a/Lang/Adina/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Adina \ No newline at end of file diff --git a/Lang/Adina/Tree-traversal b/Lang/Adina/Tree-traversal deleted file mode 120000 index fd3896d623..0000000000 --- a/Lang/Adina/Tree-traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-traversal/Adina \ No newline at end of file diff --git a/Lang/Agena/00-LANG.txt b/Lang/Agena/00-LANG.txt index 5398f01156..c2930ac7a2 100644 --- a/Lang/Agena/00-LANG.txt +++ b/Lang/Agena/00-LANG.txt @@ -20,10 +20,5 @@ The syntax looks like very simplified [[ALGOL 68]] with elements taken from [[Lu == How has it been implemented ? == Agena is based on the [[ANSI]] [[C]] source code of [[Lua]], a popular and widely used Open Source programming language. -== Todo == -[[Tasks not implemented in Agena]] - == See Also == -[[ALGOL 68]]
-[[Lua]]
-[[SQL]] \ No newline at end of file +[[ALGOL 68]] \ No newline at end of file diff --git a/Lang/Agena/100-doors b/Lang/Agena/100-doors new file mode 120000 index 0000000000..3a9139bb1c --- /dev/null +++ b/Lang/Agena/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/Agena \ No newline at end of file diff --git a/Lang/Agena/AKS-test-for-primes b/Lang/Agena/AKS-test-for-primes deleted file mode 120000 index ab27a842c8..0000000000 --- a/Lang/Agena/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/Agena \ No newline at end of file diff --git a/Lang/Agena/Abundant-deficient-and-perfect-number-classifications b/Lang/Agena/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index 89450cb83c..0000000000 --- a/Lang/Agena/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Agena \ No newline at end of file diff --git a/Lang/Agena/Abundant-odd-numbers b/Lang/Agena/Abundant-odd-numbers deleted file mode 120000 index a18ccbb662..0000000000 --- a/Lang/Agena/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Ackermann-function b/Lang/Agena/Ackermann-function deleted file mode 120000 index fb262b01a7..0000000000 --- a/Lang/Agena/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/Agena \ No newline at end of file diff --git a/Lang/Agena/Almost-prime b/Lang/Agena/Almost-prime deleted file mode 120000 index 62b34f9616..0000000000 --- a/Lang/Agena/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Agena \ No newline at end of file diff --git a/Lang/Agena/Angle-difference-between-two-bearings b/Lang/Agena/Angle-difference-between-two-bearings deleted file mode 120000 index 62a719bb70..0000000000 --- a/Lang/Agena/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Agena \ No newline at end of file diff --git a/Lang/Agena/Anti-primes b/Lang/Agena/Anti-primes deleted file mode 120000 index f98d65a6cf..0000000000 --- a/Lang/Agena/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Agena \ No newline at end of file diff --git a/Lang/Agena/Arbitrary-precision-integers-included- b/Lang/Agena/Arbitrary-precision-integers-included- deleted file mode 120000 index 347104998a..0000000000 --- a/Lang/Agena/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/Agena \ No newline at end of file diff --git a/Lang/Agena/Ascending-primes b/Lang/Agena/Ascending-primes deleted file mode 120000 index 9c8c50d2ae..0000000000 --- a/Lang/Agena/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Agena \ No newline at end of file diff --git a/Lang/Agena/Associative-array-Iteration b/Lang/Agena/Associative-array-Iteration deleted file mode 120000 index 55b1a0c7a6..0000000000 --- a/Lang/Agena/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/Agena \ No newline at end of file diff --git a/Lang/Agena/Attractive-numbers b/Lang/Agena/Attractive-numbers deleted file mode 120000 index bc968b5d21..0000000000 --- a/Lang/Agena/Attractive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Attractive-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Brazilian-numbers b/Lang/Agena/Brazilian-numbers deleted file mode 120000 index 7312d4ef84..0000000000 --- a/Lang/Agena/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Calkin-Wilf-sequence b/Lang/Agena/Calkin-Wilf-sequence deleted file mode 120000 index eaff2085aa..0000000000 --- a/Lang/Agena/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/Agena \ No newline at end of file diff --git a/Lang/Agena/Catalan-numbers b/Lang/Agena/Catalan-numbers deleted file mode 120000 index 926ef43918..0000000000 --- a/Lang/Agena/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Character-codes b/Lang/Agena/Character-codes deleted file mode 120000 index 39121b3568..0000000000 --- a/Lang/Agena/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/Agena \ No newline at end of file diff --git a/Lang/Agena/Chowla-numbers b/Lang/Agena/Chowla-numbers deleted file mode 120000 index d4c2806c20..0000000000 --- a/Lang/Agena/Chowla-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chowla-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Damm-algorithm b/Lang/Agena/Damm-algorithm deleted file mode 120000 index d753c9e99f..0000000000 --- a/Lang/Agena/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/Agena \ No newline at end of file diff --git a/Lang/Agena/Day-of-the-week b/Lang/Agena/Day-of-the-week deleted file mode 120000 index e4733798aa..0000000000 --- a/Lang/Agena/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Agena \ No newline at end of file diff --git a/Lang/Agena/Department-numbers b/Lang/Agena/Department-numbers deleted file mode 120000 index fdeaca8fd3..0000000000 --- a/Lang/Agena/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Descending-primes b/Lang/Agena/Descending-primes deleted file mode 120000 index 483dfe03f7..0000000000 --- a/Lang/Agena/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Agena \ No newline at end of file diff --git a/Lang/Agena/Disarium-numbers b/Lang/Agena/Disarium-numbers deleted file mode 120000 index 2bace62b71..0000000000 --- a/Lang/Agena/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Entropy b/Lang/Agena/Entropy deleted file mode 120000 index f0f66caa04..0000000000 --- a/Lang/Agena/Entropy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy/Agena \ No newline at end of file diff --git a/Lang/Agena/Equal-prime-and-composite-sums b/Lang/Agena/Equal-prime-and-composite-sums deleted file mode 120000 index 376401ddea..0000000000 --- a/Lang/Agena/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/Agena \ No newline at end of file diff --git a/Lang/Agena/Factorial b/Lang/Agena/Factorial deleted file mode 120000 index 21cbc1e46b..0000000000 --- a/Lang/Agena/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Agena \ No newline at end of file diff --git a/Lang/Agena/Factorial-primes b/Lang/Agena/Factorial-primes deleted file mode 120000 index 68796e7224..0000000000 --- a/Lang/Agena/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Agena \ No newline at end of file diff --git a/Lang/Agena/Gamma-function b/Lang/Agena/Gamma-function deleted file mode 120000 index c0b0340467..0000000000 --- a/Lang/Agena/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/Agena \ No newline at end of file diff --git a/Lang/Agena/Gauss-Jordan-matrix-inversion b/Lang/Agena/Gauss-Jordan-matrix-inversion deleted file mode 120000 index a1bc51eaa3..0000000000 --- a/Lang/Agena/Gauss-Jordan-matrix-inversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gauss-Jordan-matrix-inversion/Agena \ No newline at end of file diff --git a/Lang/Agena/Generate-lower-case-ASCII-alphabet b/Lang/Agena/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index ace5f93bb5..0000000000 --- a/Lang/Agena/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/Agena \ No newline at end of file diff --git a/Lang/Agena/Giuga-numbers b/Lang/Agena/Giuga-numbers deleted file mode 120000 index 273fdf8c7c..0000000000 --- a/Lang/Agena/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Goldbachs-comet b/Lang/Agena/Goldbachs-comet deleted file mode 120000 index 26b052a294..0000000000 --- a/Lang/Agena/Goldbachs-comet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Goldbachs-comet/Agena \ No newline at end of file diff --git a/Lang/Agena/Haversine-formula b/Lang/Agena/Haversine-formula deleted file mode 120000 index 45e20df974..0000000000 --- a/Lang/Agena/Haversine-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Haversine-formula/Agena \ No newline at end of file diff --git a/Lang/Agena/Horners-rule-for-polynomial-evaluation b/Lang/Agena/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index cffe37e87c..0000000000 --- a/Lang/Agena/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/Agena \ No newline at end of file diff --git a/Lang/Agena/Humble-numbers b/Lang/Agena/Humble-numbers deleted file mode 120000 index bdce77fd35..0000000000 --- a/Lang/Agena/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/JSON b/Lang/Agena/JSON deleted file mode 120000 index 9c20f7b68f..0000000000 --- a/Lang/Agena/JSON +++ /dev/null @@ -1 +0,0 @@ -../../Task/JSON/Agena \ No newline at end of file diff --git a/Lang/Agena/Jacobsthal-numbers b/Lang/Agena/Jacobsthal-numbers deleted file mode 120000 index 740d21ef1a..0000000000 --- a/Lang/Agena/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Jewels-and-stones b/Lang/Agena/Jewels-and-stones deleted file mode 120000 index 7c03f8ec8f..0000000000 --- a/Lang/Agena/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Agena \ No newline at end of file diff --git a/Lang/Agena/Jordan-P-lya-numbers b/Lang/Agena/Jordan-P-lya-numbers deleted file mode 120000 index 4e2d64a6e1..0000000000 --- a/Lang/Agena/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Juggler-sequence b/Lang/Agena/Juggler-sequence deleted file mode 120000 index e5817b72b7..0000000000 --- a/Lang/Agena/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/Agena \ No newline at end of file diff --git a/Lang/Agena/Kaprekar-numbers b/Lang/Agena/Kaprekar-numbers deleted file mode 120000 index d665f2f5f5..0000000000 --- a/Lang/Agena/Kaprekar-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kaprekar-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Legendre-prime-counting-function b/Lang/Agena/Legendre-prime-counting-function deleted file mode 120000 index 07d7bc7083..0000000000 --- a/Lang/Agena/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/Agena \ No newline at end of file diff --git a/Lang/Agena/Leonardo-numbers b/Lang/Agena/Leonardo-numbers deleted file mode 120000 index d6d819f05a..0000000000 --- a/Lang/Agena/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Levenshtein-distance b/Lang/Agena/Levenshtein-distance deleted file mode 120000 index ec3426b464..0000000000 --- a/Lang/Agena/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Agena \ No newline at end of file diff --git a/Lang/Agena/Mayan-numerals b/Lang/Agena/Mayan-numerals deleted file mode 120000 index 671a85a6c0..0000000000 --- a/Lang/Agena/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/Agena \ No newline at end of file diff --git a/Lang/Agena/McNuggets-problem b/Lang/Agena/McNuggets-problem deleted file mode 120000 index b2417f0142..0000000000 --- a/Lang/Agena/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/Agena \ No newline at end of file diff --git a/Lang/Agena/Mian-Chowla-sequence b/Lang/Agena/Mian-Chowla-sequence deleted file mode 120000 index a6489175a6..0000000000 --- a/Lang/Agena/Mian-Chowla-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mian-Chowla-sequence/Agena \ No newline at end of file diff --git a/Lang/Agena/Monty-Hall-problem b/Lang/Agena/Monty-Hall-problem deleted file mode 120000 index d1c4ae980e..0000000000 --- a/Lang/Agena/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/Agena \ No newline at end of file diff --git a/Lang/Agena/Numbers-with-equal-rises-and-falls b/Lang/Agena/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 08787d85d6..0000000000 --- a/Lang/Agena/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Agena \ No newline at end of file diff --git a/Lang/Agena/Ordered-words b/Lang/Agena/Ordered-words deleted file mode 120000 index 3503a492c8..0000000000 --- a/Lang/Agena/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Agena \ No newline at end of file diff --git a/Lang/Agena/Periodic-table b/Lang/Agena/Periodic-table deleted file mode 120000 index cb70080867..0000000000 --- a/Lang/Agena/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/Agena \ No newline at end of file diff --git a/Lang/Agena/Pernicious-numbers b/Lang/Agena/Pernicious-numbers deleted file mode 120000 index 454ce5b94d..0000000000 --- a/Lang/Agena/Pernicious-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pernicious-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Pisano-period b/Lang/Agena/Pisano-period deleted file mode 120000 index afaae8dce9..0000000000 --- a/Lang/Agena/Pisano-period +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pisano-period/Agena \ No newline at end of file diff --git a/Lang/Agena/Primality-by-trial-division b/Lang/Agena/Primality-by-trial-division deleted file mode 120000 index 621c0609eb..0000000000 --- a/Lang/Agena/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/Agena \ No newline at end of file diff --git a/Lang/Agena/Program-name b/Lang/Agena/Program-name deleted file mode 120000 index bf43276155..0000000000 --- a/Lang/Agena/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/Agena \ No newline at end of file diff --git a/Lang/Agena/Quoting-constructs b/Lang/Agena/Quoting-constructs deleted file mode 120000 index f6fed80313..0000000000 --- a/Lang/Agena/Quoting-constructs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quoting-constructs/Agena \ No newline at end of file diff --git a/Lang/Agena/Read-a-file-line-by-line b/Lang/Agena/Read-a-file-line-by-line deleted file mode 120000 index a4d8ef354b..0000000000 --- a/Lang/Agena/Read-a-file-line-by-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-line-by-line/Agena \ No newline at end of file diff --git a/Lang/Agena/Reverse-a-string b/Lang/Agena/Reverse-a-string deleted file mode 120000 index db79d68725..0000000000 --- a/Lang/Agena/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/Agena \ No newline at end of file diff --git a/Lang/Agena/Sequence-of-primes-by-trial-division b/Lang/Agena/Sequence-of-primes-by-trial-division deleted file mode 120000 index d7958a31a1..0000000000 --- a/Lang/Agena/Sequence-of-primes-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primes-by-trial-division/Agena \ No newline at end of file diff --git a/Lang/Agena/Sleeping-Beauty-problem b/Lang/Agena/Sleeping-Beauty-problem deleted file mode 120000 index 2cf02e5792..0000000000 --- a/Lang/Agena/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Agena \ No newline at end of file diff --git a/Lang/Agena/Smarandache-prime-digital-sequence b/Lang/Agena/Smarandache-prime-digital-sequence deleted file mode 120000 index 3a1f0e0805..0000000000 --- a/Lang/Agena/Smarandache-prime-digital-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smarandache-prime-digital-sequence/Agena \ No newline at end of file diff --git a/Lang/Agena/Soloways-recurring-rainfall b/Lang/Agena/Soloways-recurring-rainfall deleted file mode 120000 index b391a79582..0000000000 --- a/Lang/Agena/Soloways-recurring-rainfall +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soloways-recurring-rainfall/Agena \ No newline at end of file diff --git a/Lang/Agena/Square-but-not-cube b/Lang/Agena/Square-but-not-cube deleted file mode 120000 index 951bd25edd..0000000000 --- a/Lang/Agena/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/Agena \ No newline at end of file diff --git a/Lang/Agena/Sum-of-elements-below-main-diagonal-of-matrix b/Lang/Agena/Sum-of-elements-below-main-diagonal-of-matrix deleted file mode 120000 index 6bd7256f3a..0000000000 --- a/Lang/Agena/Sum-of-elements-below-main-diagonal-of-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-elements-below-main-diagonal-of-matrix/Agena \ No newline at end of file diff --git a/Lang/Agena/Super-d-numbers b/Lang/Agena/Super-d-numbers deleted file mode 120000 index 1da0548626..0000000000 --- a/Lang/Agena/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Sylvesters-sequence b/Lang/Agena/Sylvesters-sequence deleted file mode 120000 index 9a5d51563f..0000000000 --- a/Lang/Agena/Sylvesters-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sylvesters-sequence/Agena \ No newline at end of file diff --git a/Lang/Agena/Tau-function b/Lang/Agena/Tau-function deleted file mode 120000 index 579307a681..0000000000 --- a/Lang/Agena/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/Agena \ No newline at end of file diff --git a/Lang/Agena/Tau-number b/Lang/Agena/Tau-number deleted file mode 120000 index 543c34a5b4..0000000000 --- a/Lang/Agena/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Agena \ No newline at end of file diff --git a/Lang/Agena/The-sieve-of-Sundaram b/Lang/Agena/The-sieve-of-Sundaram deleted file mode 120000 index 5ab3c6c849..0000000000 --- a/Lang/Agena/The-sieve-of-Sundaram +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-sieve-of-Sundaram/Agena \ No newline at end of file diff --git a/Lang/Agena/Thue-Morse b/Lang/Agena/Thue-Morse deleted file mode 120000 index f3225165e3..0000000000 --- a/Lang/Agena/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/Agena \ No newline at end of file diff --git a/Lang/Agena/Time-a-function b/Lang/Agena/Time-a-function deleted file mode 120000 index e5746c4dff..0000000000 --- a/Lang/Agena/Time-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Time-a-function/Agena \ No newline at end of file diff --git a/Lang/Agena/Totient-function b/Lang/Agena/Totient-function deleted file mode 120000 index d74f15771c..0000000000 --- a/Lang/Agena/Totient-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Totient-function/Agena \ No newline at end of file diff --git a/Lang/Agena/Unprimeable-numbers b/Lang/Agena/Unprimeable-numbers deleted file mode 120000 index fc3b30fec4..0000000000 --- a/Lang/Agena/Unprimeable-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unprimeable-numbers/Agena \ No newline at end of file diff --git a/Lang/Agena/Van-Eck-sequence b/Lang/Agena/Van-Eck-sequence deleted file mode 120000 index 1714aa1507..0000000000 --- a/Lang/Agena/Van-Eck-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-Eck-sequence/Agena \ No newline at end of file diff --git a/Lang/Agena/Van-der-Corput-sequence b/Lang/Agena/Van-der-Corput-sequence deleted file mode 120000 index 92bec950df..0000000000 --- a/Lang/Agena/Van-der-Corput-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-der-Corput-sequence/Agena \ No newline at end of file diff --git a/Lang/Agena/Wagstaff-primes b/Lang/Agena/Wagstaff-primes deleted file mode 120000 index b63d3369fa..0000000000 --- a/Lang/Agena/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Agena \ No newline at end of file diff --git a/Lang/Agena/Wieferich-primes b/Lang/Agena/Wieferich-primes deleted file mode 120000 index 34597fbb1d..0000000000 --- a/Lang/Agena/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/Agena \ No newline at end of file diff --git a/Lang/Agena/Wilson-primes-of-order-n b/Lang/Agena/Wilson-primes-of-order-n deleted file mode 120000 index 6b8ae43468..0000000000 --- a/Lang/Agena/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/Agena \ No newline at end of file diff --git a/Lang/Agena/Yellowstone-sequence b/Lang/Agena/Yellowstone-sequence deleted file mode 120000 index 4464a6e815..0000000000 --- a/Lang/Agena/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/Agena \ No newline at end of file diff --git a/Lang/Aikido/00-LANG.txt b/Lang/Aikido/00-LANG.txt index 19bd4a47ab..4126891ffb 100644 --- a/Lang/Aikido/00-LANG.txt +++ b/Lang/Aikido/00-LANG.txt @@ -12,4 +12,4 @@ It was developed at [[Sun Microsystems|Sun Microsystems Laboratories]] by David In some respects it is similar in functionality to [[Python]], [[Perl]], [[JavaScript]] and [[Java]]. Syntactically it is very similar to [[C++]] and Java. -Aikido is available for Linux, Mac OS X and Solaris. The interpreter can be obtained from http://sourceforge.net/projects/aikido. Documentation (in PDF) is at https://sourceforge.net/projects/aikido/files/aikido/1.40/aikidoref140.pdf/download \ No newline at end of file +Aikido is available for Linux, Mac OS X and Solaris. The interpreter can be obtained from http://sourceforge.net/projects/aikido. Documentation (in PDF) is at http://downloads.sourceforge.net/aikido/aikido_prm.pdf \ No newline at end of file diff --git a/Lang/Amazing-Hopper/Digital-root b/Lang/Amazing-Hopper/Digital-root deleted file mode 120000 index 22bf453215..0000000000 --- a/Lang/Amazing-Hopper/Digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root/Amazing-Hopper \ No newline at end of file diff --git a/Lang/Amazing-Hopper/Sum-of-a-series b/Lang/Amazing-Hopper/Sum-of-a-series deleted file mode 120000 index 03635804ee..0000000000 --- a/Lang/Amazing-Hopper/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/Amazing-Hopper \ No newline at end of file diff --git a/Lang/AmigaBASIC/00-LANG.txt b/Lang/AmigaBASIC/00-LANG.txt index c2e6f48854..94b3e71ee7 100644 --- a/Lang/AmigaBASIC/00-LANG.txt +++ b/Lang/AmigaBASIC/00-LANG.txt @@ -11,7 +11,5 @@ Execution speed however was not a particular strength of AmigaBASIC. Some 8-bit AmigaBASIC was superseded by [[wp:ARexx|ARexx]], a REXX-style scripting language, from AmigaOS version 2.0 onwards. The 1.x AmigaBASIC binary also works on AmigaOS 2, but not on AmigaOS 3. -Microsoft [[QuickBASIC]] (1985) and QBasic (1991) look very similar to AmigaBASIC, so their syntax highlighting rules mostly also work for AmigaBASIC code. - ==See Also== *[https://archive.org/search.php?query=amiga%20basic Scanned AmigaBASIC books at archive.org] \ No newline at end of file diff --git a/Lang/AmigaBASIC/Animate-a-pendulum b/Lang/AmigaBASIC/Animate-a-pendulum deleted file mode 120000 index 010529e570..0000000000 --- a/Lang/AmigaBASIC/Animate-a-pendulum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Animate-a-pendulum/AmigaBASIC \ No newline at end of file diff --git a/Lang/AmigaBASIC/Chaos-game b/Lang/AmigaBASIC/Chaos-game deleted file mode 120000 index 06fb31b581..0000000000 --- a/Lang/AmigaBASIC/Chaos-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaos-game/AmigaBASIC \ No newline at end of file diff --git a/Lang/Apple/00-LANG.txt b/Lang/Apple/00-LANG.txt deleted file mode 100644 index e4e452b143..0000000000 --- a/Lang/Apple/00-LANG.txt +++ /dev/null @@ -1,12 +0,0 @@ -{{language|Apple -|exec=Compiled -|safety=safe -|checking=static -|strength=strong -|site=https://github.com/vmchale/apple}} - -{{language programming paradigm|functional}} - -The Apple Array System is a JIT-compiler for a statically typed functional language specialized on arrays. - -It is expression-oriented (it has no imports); it is meant to be called from other languages. \ No newline at end of file diff --git a/Lang/Apple/00-META.yaml b/Lang/Apple/00-META.yaml deleted file mode 100644 index fcdeec5d5c..0000000000 --- a/Lang/Apple/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Apple diff --git a/Lang/Apple/Averages-Arithmetic-mean b/Lang/Apple/Averages-Arithmetic-mean deleted file mode 120000 index b4236a6909..0000000000 --- a/Lang/Apple/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/Apple \ No newline at end of file diff --git a/Lang/Apple/Averages-Pythagorean-means b/Lang/Apple/Averages-Pythagorean-means deleted file mode 120000 index 50c70e6c0b..0000000000 --- a/Lang/Apple/Averages-Pythagorean-means +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Pythagorean-means/Apple \ No newline at end of file diff --git a/Lang/Apple/Catamorphism b/Lang/Apple/Catamorphism deleted file mode 120000 index 5d06cbf18d..0000000000 --- a/Lang/Apple/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/Apple \ No newline at end of file diff --git a/Lang/Apple/Dot-product b/Lang/Apple/Dot-product deleted file mode 120000 index 084fc21920..0000000000 --- a/Lang/Apple/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Apple \ No newline at end of file diff --git a/Lang/Apple/Factorial b/Lang/Apple/Factorial deleted file mode 120000 index 8d659daa6f..0000000000 --- a/Lang/Apple/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Apple \ No newline at end of file diff --git a/Lang/Apple/Factors-of-an-integer b/Lang/Apple/Factors-of-an-integer deleted file mode 120000 index a965a5d4bd..0000000000 --- a/Lang/Apple/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Apple \ No newline at end of file diff --git a/Lang/Apple/Filter b/Lang/Apple/Filter deleted file mode 120000 index 5dfbcaf92d..0000000000 --- a/Lang/Apple/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/Apple \ No newline at end of file diff --git a/Lang/Apple/ISBN13-check-digit b/Lang/Apple/ISBN13-check-digit deleted file mode 120000 index b9d843e9fc..0000000000 --- a/Lang/Apple/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/Apple \ No newline at end of file diff --git a/Lang/AppleScript/21-game b/Lang/AppleScript/21-game deleted file mode 120000 index 8108f8c3fc..0000000000 --- a/Lang/AppleScript/21-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/21-game/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Angle-difference-between-two-bearings b/Lang/AppleScript/Angle-difference-between-two-bearings deleted file mode 120000 index cb1c37c369..0000000000 --- a/Lang/AppleScript/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Associative-array-Creation b/Lang/AppleScript/Associative-array-Creation deleted file mode 120000 index 8dba66b7c2..0000000000 --- a/Lang/AppleScript/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Bin-given-limits b/Lang/AppleScript/Bin-given-limits deleted file mode 120000 index 955dc82ffb..0000000000 --- a/Lang/AppleScript/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Call-a-foreign-language-function b/Lang/AppleScript/Call-a-foreign-language-function deleted file mode 120000 index 29365d0ac9..0000000000 --- a/Lang/AppleScript/Call-a-foreign-language-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-foreign-language-function/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Catalan-numbers b/Lang/AppleScript/Catalan-numbers deleted file mode 120000 index 0299ff88b4..0000000000 --- a/Lang/AppleScript/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Create-an-HTML-table b/Lang/AppleScript/Create-an-HTML-table deleted file mode 120000 index c5386274dd..0000000000 --- a/Lang/AppleScript/Create-an-HTML-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-HTML-table/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Formatted-numeric-output b/Lang/AppleScript/Formatted-numeric-output deleted file mode 120000 index de125c08d5..0000000000 --- a/Lang/AppleScript/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Hello-world-Newbie b/Lang/AppleScript/Hello-world-Newbie deleted file mode 120000 index 251b56564d..0000000000 --- a/Lang/AppleScript/Hello-world-Newbie +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newbie/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Horners-rule-for-polynomial-evaluation b/Lang/AppleScript/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index b014f0231a..0000000000 --- a/Lang/AppleScript/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Logical-operations b/Lang/AppleScript/Logical-operations deleted file mode 120000 index f381ea6d80..0000000000 --- a/Lang/AppleScript/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Loops-N-plus-one-half b/Lang/AppleScript/Loops-N-plus-one-half deleted file mode 120000 index c9ebbc6d6f..0000000000 --- a/Lang/AppleScript/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Loops-Wrong-ranges b/Lang/AppleScript/Loops-Wrong-ranges deleted file mode 120000 index 30ead650a7..0000000000 --- a/Lang/AppleScript/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Magic-constant b/Lang/AppleScript/Magic-constant deleted file mode 120000 index 103e56a841..0000000000 --- a/Lang/AppleScript/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Monte-Carlo-methods b/Lang/AppleScript/Monte-Carlo-methods deleted file mode 120000 index a3fd9d8a00..0000000000 --- a/Lang/AppleScript/Monte-Carlo-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monte-Carlo-methods/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Naming-conventions b/Lang/AppleScript/Naming-conventions deleted file mode 120000 index bd6fd7dc7b..0000000000 --- a/Lang/AppleScript/Naming-conventions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Naming-conventions/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Nim-game b/Lang/AppleScript/Nim-game deleted file mode 120000 index f67182813f..0000000000 --- a/Lang/AppleScript/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Nth-root b/Lang/AppleScript/Nth-root deleted file mode 120000 index 24be4fbbed..0000000000 --- a/Lang/AppleScript/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Numerical-integration b/Lang/AppleScript/Numerical-integration deleted file mode 120000 index 2cd0b2ae37..0000000000 --- a/Lang/AppleScript/Numerical-integration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-integration/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Penneys-game b/Lang/AppleScript/Penneys-game deleted file mode 120000 index 8e49dba4f9..0000000000 --- a/Lang/AppleScript/Penneys-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Penneys-game/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Pig-the-dice-game b/Lang/AppleScript/Pig-the-dice-game deleted file mode 120000 index db35af118f..0000000000 --- a/Lang/AppleScript/Pig-the-dice-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pig-the-dice-game/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Program-name b/Lang/AppleScript/Program-name deleted file mode 120000 index 08ec2ad4f8..0000000000 --- a/Lang/AppleScript/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Real-constants-and-functions b/Lang/AppleScript/Real-constants-and-functions deleted file mode 120000 index 4a6c0f5db0..0000000000 --- a/Lang/AppleScript/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Return-multiple-values b/Lang/AppleScript/Return-multiple-values deleted file mode 120000 index f507a094fb..0000000000 --- a/Lang/AppleScript/Return-multiple-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Return-multiple-values/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Send-email b/Lang/AppleScript/Send-email deleted file mode 120000 index 4ba0780be8..0000000000 --- a/Lang/AppleScript/Send-email +++ /dev/null @@ -1 +0,0 @@ -../../Task/Send-email/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Sorting-algorithms-Stooge-sort b/Lang/AppleScript/Sorting-algorithms-Stooge-sort deleted file mode 120000 index 56b9196ffc..0000000000 --- a/Lang/AppleScript/Sorting-algorithms-Stooge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Stooge-sort/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Variable-declaration-reset b/Lang/AppleScript/Variable-declaration-reset deleted file mode 120000 index 3059dd090c..0000000000 --- a/Lang/AppleScript/Variable-declaration-reset +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-declaration-reset/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Write-entire-file b/Lang/AppleScript/Write-entire-file deleted file mode 120000 index 5be6a2da0d..0000000000 --- a/Lang/AppleScript/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/AppleScript \ No newline at end of file diff --git a/Lang/AppleScript/Write-float-arrays-to-a-text-file b/Lang/AppleScript/Write-float-arrays-to-a-text-file deleted file mode 120000 index d7524dd990..0000000000 --- a/Lang/AppleScript/Write-float-arrays-to-a-text-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-float-arrays-to-a-text-file/AppleScript \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/00-LANG.txt b/Lang/Applesoft-BASIC/00-LANG.txt index 854387033b..b47ab777d1 100644 --- a/Lang/Applesoft-BASIC/00-LANG.txt +++ b/Lang/Applesoft-BASIC/00-LANG.txt @@ -7,5 +7,4 @@ * [[wp:Applesoft BASIC|Wikipedia: Applesoft BASIC]] * [http://www.landsnail.com/a2ref.htm Apple II Programmer's Reference] from ][ In a Mac, via [http://www.landsnail.com/ Landsnail.com] * [http://www.hoist-point.com/applesoft_basic_tutorial.htm AppleSoft BASIC tutorial for absolute beginners] -* [https://www.calormen.com/jsbasic/ Applesoft BASIC in Javascript] On-line interpreter * ''[[Tasks not implemented in Applesoft BASIC|Tasks not implemented in Applesoft BASIC]]'' \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Check-output-device-is-a-terminal b/Lang/Applesoft-BASIC/Check-output-device-is-a-terminal deleted file mode 120000 index e21d34eceb..0000000000 --- a/Lang/Applesoft-BASIC/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Church-numerals b/Lang/Applesoft-BASIC/Church-numerals deleted file mode 120000 index a114e6a3f9..0000000000 --- a/Lang/Applesoft-BASIC/Church-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Church-numerals/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Cistercian-numerals b/Lang/Applesoft-BASIC/Cistercian-numerals deleted file mode 120000 index 2c5e6c52c1..0000000000 --- a/Lang/Applesoft-BASIC/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Compare-a-list-of-strings b/Lang/Applesoft-BASIC/Compare-a-list-of-strings deleted file mode 120000 index 7eafe8f723..0000000000 --- a/Lang/Applesoft-BASIC/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Determine-if-a-string-is-collapsible b/Lang/Applesoft-BASIC/Determine-if-a-string-is-collapsible deleted file mode 120000 index 02f9d8d440..0000000000 --- a/Lang/Applesoft-BASIC/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Determine-if-a-string-is-squeezable b/Lang/Applesoft-BASIC/Determine-if-a-string-is-squeezable deleted file mode 120000 index b18de01c9a..0000000000 --- a/Lang/Applesoft-BASIC/Determine-if-a-string-is-squeezable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-squeezable/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Display-a-linear-combination b/Lang/Applesoft-BASIC/Display-a-linear-combination deleted file mode 120000 index d72f6d3a78..0000000000 --- a/Lang/Applesoft-BASIC/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Dragon-curve b/Lang/Applesoft-BASIC/Dragon-curve deleted file mode 120000 index 89a81bf5e7..0000000000 --- a/Lang/Applesoft-BASIC/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Enumerations b/Lang/Applesoft-BASIC/Enumerations deleted file mode 120000 index aa327448dc..0000000000 --- a/Lang/Applesoft-BASIC/Enumerations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enumerations/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Eulers-sum-of-powers-conjecture b/Lang/Applesoft-BASIC/Eulers-sum-of-powers-conjecture deleted file mode 120000 index 814a94e748..0000000000 --- a/Lang/Applesoft-BASIC/Eulers-sum-of-powers-conjecture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-sum-of-powers-conjecture/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Fibonacci-sequence b/Lang/Applesoft-BASIC/Fibonacci-sequence deleted file mode 120000 index f95390f3d5..0000000000 --- a/Lang/Applesoft-BASIC/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Formatted-numeric-output b/Lang/Applesoft-BASIC/Formatted-numeric-output deleted file mode 120000 index 52c4ceb520..0000000000 --- a/Lang/Applesoft-BASIC/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Levenshtein-distance b/Lang/Applesoft-BASIC/Levenshtein-distance deleted file mode 120000 index 890eb3e044..0000000000 --- a/Lang/Applesoft-BASIC/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Modular-inverse b/Lang/Applesoft-BASIC/Modular-inverse deleted file mode 120000 index d8b60109c6..0000000000 --- a/Lang/Applesoft-BASIC/Modular-inverse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-inverse/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Monty-Hall-problem b/Lang/Applesoft-BASIC/Monty-Hall-problem deleted file mode 120000 index 6e0ff7bcb9..0000000000 --- a/Lang/Applesoft-BASIC/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Multi-dimensional-array b/Lang/Applesoft-BASIC/Multi-dimensional-array deleted file mode 120000 index c47a96b8ff..0000000000 --- a/Lang/Applesoft-BASIC/Multi-dimensional-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-dimensional-array/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Rep-string b/Lang/Applesoft-BASIC/Rep-string deleted file mode 120000 index ba7d92f8da..0000000000 --- a/Lang/Applesoft-BASIC/Rep-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rep-string/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Repeat b/Lang/Applesoft-BASIC/Repeat deleted file mode 120000 index eb0c08d923..0000000000 --- a/Lang/Applesoft-BASIC/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Sorting-algorithms-Gnome-sort b/Lang/Applesoft-BASIC/Sorting-algorithms-Gnome-sort deleted file mode 120000 index 4b7c42e62c..0000000000 --- a/Lang/Applesoft-BASIC/Sorting-algorithms-Gnome-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Gnome-sort/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Applesoft-BASIC/Towers-of-Hanoi b/Lang/Applesoft-BASIC/Towers-of-Hanoi deleted file mode 120000 index 7e7bc24b30..0000000000 --- a/Lang/Applesoft-BASIC/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Applesoft-BASIC \ No newline at end of file diff --git a/Lang/Aquarius-BASIC/00-LANG.txt b/Lang/Aquarius-BASIC/00-LANG.txt index 1314ae0882..787837afb3 100644 --- a/Lang/Aquarius-BASIC/00-LANG.txt +++ b/Lang/Aquarius-BASIC/00-LANG.txt @@ -2,37 +2,4 @@ |exec=interpreted |tags=basic,aquariusbasic }} -{{Implementation|BASIC}}'''Aquarius BASIC''' refers to the more or less stripped-down releases of Microsoft BASIC for the Mattel/Radofin Aquarius, a home computer released in 1983. - -The built-in ROM BASIC was seriously restricted since the system only included 4K of RAM and 8K of ROM by default. Minus the RAM used for video and system management, only about 1.7K of RAM were usable by default; the optionally available Extended Microsoft BASIC that came on ROM cartridge was somewhat more generous, and RAM expansion cartridges were available. - -BASIC lines can be a maximum of 72 characters long. Only the first two characters of a variable name are significant, so e.g. ABC and ABBA will contain the same value: - -10 ABC=3 -20 ABBA=5 -30 PRINT ABC;ABBA -RUN - 5 5 - -The Aquarius features a text-mode screen of 40x25 characters with 16 colors. BASIC only uses 38x24 characters, i.e. the row at the top and the two outermost columns on each side are not accessible when editing, PRINTing, or LISTing. However, all 40x25 characters can be modified via POKEs from BASIC to screen memory. - -Screen character memory starts at 0x3000 (12288); color RAM (with high nibble = foreground color; low nibble = background color) starts at 0x3400 (12288 + 1024 = 13312). Border color can be set by POKEing to the top left character, e.g. POKE 13312,7 will turn the border color to white. BASIC programs start at 0x3901.[https://www.vdsteenoven.com/aquarius/malloc.html] - -BASIC can set and unset 80x72-resolution pixels on the Aquarius with the PSET and PRESET commands (each text character consists of 2x3 pixels). This program for instance draws an ellipsis: -10 PRINT CHR$(11); -20 PI=3.141593 : R=30 -30 FOR I=0 TO 360 -40 X=R*SIN(I*PI/180) -50 Y=R*COS(I*PI/180) -60 PSET(39+X,35+Y) -70 NEXT - -The Aquarius character set cannot be redefined. - -By default, the total space for string variables is only 50 bytes! This can be increased with CLEAR, e.g. CLEAR 200 will reserve 200 bytes for strings. You can check with PRINT FRE("a") how much unused string space is still available. - -Emulators of the Mattel Aquarius include MAME and [https://aquarius.je/aqualite/ AquaLite]. - -==See Also== -* [[wp:Mattel Aquarius|Mattel Aquarius]] at Wikipedia -* [https://archive.org/search?query=mattel+aquarius Aquarius manuals at the Internet Archive] \ No newline at end of file +{{Implementation|BASIC}}'''Aquarius BASIC''' refers to the more or less stripped-down releases of Microsoft BASIC for the Mattel/Radofin Aquarius. The built-in ROM BASIC was seriously restricted since the system only included 4K of RAM and 8K of ROM by default. Minus the RAM used for video and system management, only about 1.7K or RAM were usable by default; the optionally available Extended Microsoft BASIC that came on ROM cartridge was somewhat more generous, and RAM expansion cartridges were available. \ No newline at end of file diff --git a/Lang/Aquarius-BASIC/Archimedean-spiral b/Lang/Aquarius-BASIC/Archimedean-spiral deleted file mode 120000 index a52a300e36..0000000000 --- a/Lang/Aquarius-BASIC/Archimedean-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Archimedean-spiral/Aquarius-BASIC \ No newline at end of file diff --git a/Lang/Aquarius-BASIC/Colour-bars-Display b/Lang/Aquarius-BASIC/Colour-bars-Display deleted file mode 120000 index 5113e0e205..0000000000 --- a/Lang/Aquarius-BASIC/Colour-bars-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-bars-Display/Aquarius-BASIC \ No newline at end of file diff --git a/Lang/Aquarius-BASIC/Mandelbrot-set b/Lang/Aquarius-BASIC/Mandelbrot-set deleted file mode 120000 index e078ca10a9..0000000000 --- a/Lang/Aquarius-BASIC/Mandelbrot-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mandelbrot-set/Aquarius-BASIC \ No newline at end of file diff --git a/Lang/Aquarius-BASIC/Matrix-digital-rain b/Lang/Aquarius-BASIC/Matrix-digital-rain deleted file mode 120000 index 227ab761a1..0000000000 --- a/Lang/Aquarius-BASIC/Matrix-digital-rain +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-digital-rain/Aquarius-BASIC \ No newline at end of file diff --git a/Lang/Aquarius-BASIC/Musical-scale b/Lang/Aquarius-BASIC/Musical-scale deleted file mode 120000 index 16fb0326f5..0000000000 --- a/Lang/Aquarius-BASIC/Musical-scale +++ /dev/null @@ -1 +0,0 @@ -../../Task/Musical-scale/Aquarius-BASIC \ No newline at end of file diff --git a/Lang/Aquarius-BASIC/Terminal-control-Display-an-extended-character b/Lang/Aquarius-BASIC/Terminal-control-Display-an-extended-character deleted file mode 120000 index 908e3614b8..0000000000 --- a/Lang/Aquarius-BASIC/Terminal-control-Display-an-extended-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Display-an-extended-character/Aquarius-BASIC \ No newline at end of file diff --git a/Lang/Aria/00-LANG.txt b/Lang/Aria/00-LANG.txt deleted file mode 100644 index f3d1668eba..0000000000 --- a/Lang/Aria/00-LANG.txt +++ /dev/null @@ -1,15 +0,0 @@ -{{language -|exec=interpreted -|site=https://egranata.github.io/aria/ -}} - -Aria is a modern, dynamic scripting language. It is meant to be a “sweet spot” language, easy to pick-up and enjoyable to use. - -It provides a familiar C-style syntax, with a feature set inspired by well-beloved languages such as Python and Rust. It comes with little ceremony and a focus on getting stuff done. - -Aria programs are written as .aria files and passed to the Aria virtual machine, which compiles them down to bytecode and executes them. - -The Aria interpreter is written in Rust, 2024 edition. - -==Todo== -[[Tasks_not_implemented_in_Aria]] \ No newline at end of file diff --git a/Lang/Aria/00-META.yaml b/Lang/Aria/00-META.yaml deleted file mode 100644 index 35ebadd91a..0000000000 --- a/Lang/Aria/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Aria diff --git a/Lang/Aria/99-bottles-of-beer b/Lang/Aria/99-bottles-of-beer deleted file mode 120000 index c2f486227d..0000000000 --- a/Lang/Aria/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Aria \ No newline at end of file diff --git a/Lang/Aria/Hello-world-Text b/Lang/Aria/Hello-world-Text deleted file mode 120000 index bb8e1db7a7..0000000000 --- a/Lang/Aria/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Aria \ No newline at end of file diff --git a/Lang/ArkScript/00-LANG.txt b/Lang/ArkScript/00-LANG.txt deleted file mode 100644 index 11fc16bd5b..0000000000 --- a/Lang/ArkScript/00-LANG.txt +++ /dev/null @@ -1,43 +0,0 @@ -{{language|ArkScript -|exec=bytecode -|site=https://arkscript-lang.dev -|gc=no -|parampass=value -|strength=strong -|checking=dynamic -|tags=arkscript}} -ArkScript is a small, fast, functional and scripting language for C++ projects, inspired by [[Lua]], [[Lisp]], and [[Python]]. - -The language has been designed to be concise, with only 9 keywords, and two rules to parse it: -# the first node after an opening paren ( is a "function", the following nodes are arguments -# the only exception to the previous rule is when defining the argument list of a function - - -(let foo 5) -(let bar "hello world!") - -(let egg (fun (a b c) - (+ a (* b c)))) - -(print (egg 1 foo bar)) - - -The language is also -* small: the core fit under 8000 lines of code ; also small in terms of keywords (only 9) -* a scripting language: very easy to embed it in your projects. Registering your own functions in the language is made easy -* portable: a unique bytecode which can be run everywhere the virtual machine is -* a functional language: every parameter is passed by value, everything is immutable unless specified -* powerful: provides closures and explicit capture -* promoting functionalities before performances: expressiveness often brings more productivity, though performances aren't left behind -* a Lisp inspired language, with fewer parentheses: [...] is expanded to (list ...) and {} to (begin ...) -* extensible: supports C++ module to use it in the language, adding functionalities - - -===Implementation=== -The compiler and VM are implemented in [[C++]] 20. For more details, see [https://github.com/ArkScript-lang/Ark ArkScript GitHub]. - -===License=== -ArkScript is released under the Mozilla Public License 2.0. - -===Todo=== -[[Tasks not implemented in ArkScript]] \ No newline at end of file diff --git a/Lang/ArkScript/00-META.yaml b/Lang/ArkScript/00-META.yaml deleted file mode 100644 index 0a989734f8..0000000000 --- a/Lang/ArkScript/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:ArkScript diff --git a/Lang/ArkScript/100-doors b/Lang/ArkScript/100-doors deleted file mode 120000 index 733c5ecdec..0000000000 --- a/Lang/ArkScript/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/99-bottles-of-beer b/Lang/ArkScript/99-bottles-of-beer deleted file mode 120000 index 44d94215f1..0000000000 --- a/Lang/ArkScript/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/A+B b/Lang/ArkScript/A+B deleted file mode 120000 index 482decfa5a..0000000000 --- a/Lang/ArkScript/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Abbreviations-easy b/Lang/ArkScript/Abbreviations-easy deleted file mode 120000 index 03457b23d1..0000000000 --- a/Lang/ArkScript/Abbreviations-easy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-easy/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Ackermann-function b/Lang/ArkScript/Ackermann-function deleted file mode 120000 index f1f525fde6..0000000000 --- a/Lang/ArkScript/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Anonymous-recursion b/Lang/ArkScript/Anonymous-recursion deleted file mode 120000 index c2db291cc2..0000000000 --- a/Lang/ArkScript/Anonymous-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anonymous-recursion/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Apply-a-callback-to-an-array b/Lang/ArkScript/Apply-a-callback-to-an-array deleted file mode 120000 index da474aa4d7..0000000000 --- a/Lang/ArkScript/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Arithmetic-Complex b/Lang/ArkScript/Arithmetic-Complex deleted file mode 120000 index c21a1d5bf8..0000000000 --- a/Lang/ArkScript/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Arithmetic-Integer b/Lang/ArkScript/Arithmetic-Integer deleted file mode 120000 index 0023796f90..0000000000 --- a/Lang/ArkScript/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Array-concatenation b/Lang/ArkScript/Array-concatenation deleted file mode 120000 index 250e35894f..0000000000 --- a/Lang/ArkScript/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Array-length b/Lang/ArkScript/Array-length deleted file mode 120000 index f70d67437b..0000000000 --- a/Lang/ArkScript/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Ascending-primes b/Lang/ArkScript/Ascending-primes deleted file mode 120000 index 9fc34de6f6..0000000000 --- a/Lang/ArkScript/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Associative-array-Creation b/Lang/ArkScript/Associative-array-Creation deleted file mode 120000 index 2a5f3a1e53..0000000000 --- a/Lang/ArkScript/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Associative-array-Iteration b/Lang/ArkScript/Associative-array-Iteration deleted file mode 120000 index f11b39f9bb..0000000000 --- a/Lang/ArkScript/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Associative-array-Merging b/Lang/ArkScript/Associative-array-Merging deleted file mode 120000 index 03affb97ec..0000000000 --- a/Lang/ArkScript/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Balanced-brackets b/Lang/ArkScript/Balanced-brackets deleted file mode 120000 index 7380d4a234..0000000000 --- a/Lang/ArkScript/Balanced-brackets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-brackets/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Boolean-values b/Lang/ArkScript/Boolean-values deleted file mode 120000 index 5efbe13431..0000000000 --- a/Lang/ArkScript/Boolean-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boolean-values/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Calculating-the-value-of-e b/Lang/ArkScript/Calculating-the-value-of-e deleted file mode 120000 index 0a0116531f..0000000000 --- a/Lang/ArkScript/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Call-a-function b/Lang/ArkScript/Call-a-function deleted file mode 120000 index 4d2870d9cb..0000000000 --- a/Lang/ArkScript/Call-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-function/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Call-an-object-method b/Lang/ArkScript/Call-an-object-method deleted file mode 120000 index 9b53aa0595..0000000000 --- a/Lang/ArkScript/Call-an-object-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-an-object-method/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Catamorphism b/Lang/ArkScript/Catamorphism deleted file mode 120000 index f6210b0ec4..0000000000 --- a/Lang/ArkScript/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Character-codes b/Lang/ArkScript/Character-codes deleted file mode 120000 index fcf79b3e9a..0000000000 --- a/Lang/ArkScript/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Check-that-file-exists b/Lang/ArkScript/Check-that-file-exists deleted file mode 120000 index 7e3651c090..0000000000 --- a/Lang/ArkScript/Check-that-file-exists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-that-file-exists/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Closures-Value-capture b/Lang/ArkScript/Closures-Value-capture deleted file mode 120000 index 6b30a8d976..0000000000 --- a/Lang/ArkScript/Closures-Value-capture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closures-Value-capture/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Command-line-arguments b/Lang/ArkScript/Command-line-arguments deleted file mode 120000 index 216020915c..0000000000 --- a/Lang/ArkScript/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Comments b/Lang/ArkScript/Comments deleted file mode 120000 index 360a2acb05..0000000000 --- a/Lang/ArkScript/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Compound-data-type b/Lang/ArkScript/Compound-data-type deleted file mode 120000 index a901531424..0000000000 --- a/Lang/ArkScript/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Concurrent-computing b/Lang/ArkScript/Concurrent-computing deleted file mode 120000 index 13a2e9c874..0000000000 --- a/Lang/ArkScript/Concurrent-computing +++ /dev/null @@ -1 +0,0 @@ -../../Task/Concurrent-computing/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Conditional-structures b/Lang/ArkScript/Conditional-structures deleted file mode 120000 index 10a922af53..0000000000 --- a/Lang/ArkScript/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Conways-Game-of-Life b/Lang/ArkScript/Conways-Game-of-Life deleted file mode 120000 index 2d495d7699..0000000000 --- a/Lang/ArkScript/Conways-Game-of-Life +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conways-Game-of-Life/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Copy-a-string b/Lang/ArkScript/Copy-a-string deleted file mode 120000 index 88194e46fb..0000000000 --- a/Lang/ArkScript/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Count-occurrences-of-a-substring b/Lang/ArkScript/Count-occurrences-of-a-substring deleted file mode 120000 index da5c9db0d2..0000000000 --- a/Lang/ArkScript/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Currying b/Lang/ArkScript/Currying deleted file mode 120000 index 68a7b93b42..0000000000 --- a/Lang/ArkScript/Currying +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currying/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Delete-a-file b/Lang/ArkScript/Delete-a-file deleted file mode 120000 index d6dbc3ecd5..0000000000 --- a/Lang/ArkScript/Delete-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delete-a-file/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Dot-product b/Lang/ArkScript/Dot-product deleted file mode 120000 index 0ee74f8b5a..0000000000 --- a/Lang/ArkScript/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Empty-directory b/Lang/ArkScript/Empty-directory deleted file mode 120000 index 5ade8a3b8b..0000000000 --- a/Lang/ArkScript/Empty-directory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-directory/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Empty-program b/Lang/ArkScript/Empty-program deleted file mode 120000 index d33db3e33c..0000000000 --- a/Lang/ArkScript/Empty-program +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-program/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Empty-string b/Lang/ArkScript/Empty-string deleted file mode 120000 index aa29f38546..0000000000 --- a/Lang/ArkScript/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Enforced-immutability b/Lang/ArkScript/Enforced-immutability deleted file mode 120000 index c12069d86c..0000000000 --- a/Lang/ArkScript/Enforced-immutability +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enforced-immutability/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Even-or-odd b/Lang/ArkScript/Even-or-odd deleted file mode 120000 index 7aee966d84..0000000000 --- a/Lang/ArkScript/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Execute-a-system-command b/Lang/ArkScript/Execute-a-system-command deleted file mode 120000 index ab936f59d4..0000000000 --- a/Lang/ArkScript/Execute-a-system-command +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-a-system-command/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Extend-your-language b/Lang/ArkScript/Extend-your-language deleted file mode 120000 index 08fabf671d..0000000000 --- a/Lang/ArkScript/Extend-your-language +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extend-your-language/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Factorial b/Lang/ArkScript/Factorial deleted file mode 120000 index 270de2c6be..0000000000 --- a/Lang/ArkScript/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Fibonacci-sequence b/Lang/ArkScript/Fibonacci-sequence deleted file mode 120000 index 46f2bbba10..0000000000 --- a/Lang/ArkScript/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/File-input-output b/Lang/ArkScript/File-input-output deleted file mode 120000 index f2e1e6b1be..0000000000 --- a/Lang/ArkScript/File-input-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-input-output/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Filter b/Lang/ArkScript/Filter deleted file mode 120000 index 51c30a5235..0000000000 --- a/Lang/ArkScript/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/FizzBuzz b/Lang/ArkScript/FizzBuzz deleted file mode 120000 index 2464c5dcce..0000000000 --- a/Lang/ArkScript/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Flatten-a-list b/Lang/ArkScript/Flatten-a-list deleted file mode 120000 index 8540eceb42..0000000000 --- a/Lang/ArkScript/Flatten-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flatten-a-list/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Function-definition b/Lang/ArkScript/Function-definition deleted file mode 120000 index e750f72eaf..0000000000 --- a/Lang/ArkScript/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Generate-lower-case-ASCII-alphabet b/Lang/ArkScript/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 9cae72db7e..0000000000 --- a/Lang/ArkScript/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Greatest-element-of-a-list b/Lang/ArkScript/Greatest-element-of-a-list deleted file mode 120000 index d8bc7be88e..0000000000 --- a/Lang/ArkScript/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Hello-world-Line-printer b/Lang/ArkScript/Hello-world-Line-printer deleted file mode 120000 index 205cc44ef5..0000000000 --- a/Lang/ArkScript/Hello-world-Line-printer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Line-printer/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Hello-world-Newline-omission b/Lang/ArkScript/Hello-world-Newline-omission deleted file mode 120000 index e70990b485..0000000000 --- a/Lang/ArkScript/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Hello-world-Text b/Lang/ArkScript/Hello-world-Text deleted file mode 120000 index efe7845aa7..0000000000 --- a/Lang/ArkScript/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Include-a-file b/Lang/ArkScript/Include-a-file deleted file mode 120000 index ebb4a807d7..0000000000 --- a/Lang/ArkScript/Include-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Include-a-file/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Infinity b/Lang/ArkScript/Infinity deleted file mode 120000 index e2ef2bf985..0000000000 --- a/Lang/ArkScript/Infinity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Infinity/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Integer-comparison b/Lang/ArkScript/Integer-comparison deleted file mode 120000 index 6396856212..0000000000 --- a/Lang/ArkScript/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Integer-sequence b/Lang/ArkScript/Integer-sequence deleted file mode 120000 index 386017d017..0000000000 --- a/Lang/ArkScript/Integer-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-sequence/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Letter-frequency b/Lang/ArkScript/Letter-frequency deleted file mode 120000 index 5c5906f290..0000000000 --- a/Lang/ArkScript/Letter-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Letter-frequency/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Literals-Floating-point b/Lang/ArkScript/Literals-Floating-point deleted file mode 120000 index 5bc172fabe..0000000000 --- a/Lang/ArkScript/Literals-Floating-point +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Floating-point/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Literals-Integer b/Lang/ArkScript/Literals-Integer deleted file mode 120000 index b313b7f803..0000000000 --- a/Lang/ArkScript/Literals-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Integer/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Literals-String b/Lang/ArkScript/Literals-String deleted file mode 120000 index ec507deee1..0000000000 --- a/Lang/ArkScript/Literals-String +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-String/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Logical-operations b/Lang/ArkScript/Logical-operations deleted file mode 120000 index aaefe48457..0000000000 --- a/Lang/ArkScript/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Loops-While b/Lang/ArkScript/Loops-While deleted file mode 120000 index 5f0c886bc8..0000000000 --- a/Lang/ArkScript/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Middle-three-digits b/Lang/ArkScript/Middle-three-digits deleted file mode 120000 index 71c7fc7a98..0000000000 --- a/Lang/ArkScript/Middle-three-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Middle-three-digits/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Munchausen-numbers b/Lang/ArkScript/Munchausen-numbers deleted file mode 120000 index c351968c20..0000000000 --- a/Lang/ArkScript/Munchausen-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munchausen-numbers/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/N-queens-problem b/Lang/ArkScript/N-queens-problem deleted file mode 120000 index e917f9e593..0000000000 --- a/Lang/ArkScript/N-queens-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/N-queens-problem/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Nested-function b/Lang/ArkScript/Nested-function deleted file mode 120000 index 85ce060fae..0000000000 --- a/Lang/ArkScript/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Null-object b/Lang/ArkScript/Null-object deleted file mode 120000 index a698a2ff71..0000000000 --- a/Lang/ArkScript/Null-object +++ /dev/null @@ -1 +0,0 @@ -../../Task/Null-object/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Pangram-checker b/Lang/ArkScript/Pangram-checker deleted file mode 120000 index db321bb4cb..0000000000 --- a/Lang/ArkScript/Pangram-checker +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pangram-checker/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Pick-random-element b/Lang/ArkScript/Pick-random-element deleted file mode 120000 index be2e5037b3..0000000000 --- a/Lang/ArkScript/Pick-random-element +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pick-random-element/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Program-name b/Lang/ArkScript/Program-name deleted file mode 120000 index c48917f3b8..0000000000 --- a/Lang/ArkScript/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Program-termination b/Lang/ArkScript/Program-termination deleted file mode 120000 index 19d9d120f6..0000000000 --- a/Lang/ArkScript/Program-termination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-termination/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Read-entire-file b/Lang/ArkScript/Read-entire-file deleted file mode 120000 index e3a1c22530..0000000000 --- a/Lang/ArkScript/Read-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-entire-file/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Repeat-a-string b/Lang/ArkScript/Repeat-a-string deleted file mode 120000 index ed7c4e98d3..0000000000 --- a/Lang/ArkScript/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Reverse-a-string b/Lang/ArkScript/Reverse-a-string deleted file mode 120000 index a3a2ea0c27..0000000000 --- a/Lang/ArkScript/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Semordnilap b/Lang/ArkScript/Semordnilap deleted file mode 120000 index 25df93d2d3..0000000000 --- a/Lang/ArkScript/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Shell-one-liner b/Lang/ArkScript/Shell-one-liner deleted file mode 120000 index 889b436427..0000000000 --- a/Lang/ArkScript/Shell-one-liner +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shell-one-liner/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Short-circuit-evaluation b/Lang/ArkScript/Short-circuit-evaluation deleted file mode 120000 index dcd4ac26ee..0000000000 --- a/Lang/ArkScript/Short-circuit-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Short-circuit-evaluation/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Show-ASCII-table b/Lang/ArkScript/Show-ASCII-table deleted file mode 120000 index 65d6365487..0000000000 --- a/Lang/ArkScript/Show-ASCII-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Show-ASCII-table/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Sleep b/Lang/ArkScript/Sleep deleted file mode 120000 index cd07cddf41..0000000000 --- a/Lang/ArkScript/Sleep +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleep/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Sorting-algorithms-Quicksort b/Lang/ArkScript/Sorting-algorithms-Quicksort deleted file mode 120000 index 003f3fb633..0000000000 --- a/Lang/ArkScript/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Stack b/Lang/ArkScript/Stack deleted file mode 120000 index f0aa9a05ea..0000000000 --- a/Lang/ArkScript/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/String-append b/Lang/ArkScript/String-append deleted file mode 120000 index ade5a20d23..0000000000 --- a/Lang/ArkScript/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/String-case b/Lang/ArkScript/String-case deleted file mode 120000 index 25e27a4618..0000000000 --- a/Lang/ArkScript/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/String-concatenation b/Lang/ArkScript/String-concatenation deleted file mode 120000 index 999b5605f7..0000000000 --- a/Lang/ArkScript/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/String-interpolation-included- b/Lang/ArkScript/String-interpolation-included- deleted file mode 120000 index 33fa86b906..0000000000 --- a/Lang/ArkScript/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/String-length b/Lang/ArkScript/String-length deleted file mode 120000 index df129dcc11..0000000000 --- a/Lang/ArkScript/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/String-matching b/Lang/ArkScript/String-matching deleted file mode 120000 index 7558bd042a..0000000000 --- a/Lang/ArkScript/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/String-prepend b/Lang/ArkScript/String-prepend deleted file mode 120000 index 083b99bbf0..0000000000 --- a/Lang/ArkScript/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Sum-and-product-of-an-array b/Lang/ArkScript/Sum-and-product-of-an-array deleted file mode 120000 index 4c22ecff5f..0000000000 --- a/Lang/ArkScript/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Sum-digits-of-an-integer b/Lang/ArkScript/Sum-digits-of-an-integer deleted file mode 120000 index 29e7afd56c..0000000000 --- a/Lang/ArkScript/Sum-digits-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-digits-of-an-integer/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Sum-of-a-series b/Lang/ArkScript/Sum-of-a-series deleted file mode 120000 index f009df3580..0000000000 --- a/Lang/ArkScript/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Sum-of-squares b/Lang/ArkScript/Sum-of-squares deleted file mode 120000 index 85176ac4bb..0000000000 --- a/Lang/ArkScript/Sum-of-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-squares/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Time-a-function b/Lang/ArkScript/Time-a-function deleted file mode 120000 index e2c1f55e22..0000000000 --- a/Lang/ArkScript/Time-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Time-a-function/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/User-input-Text b/Lang/ArkScript/User-input-Text deleted file mode 120000 index f0daf24108..0000000000 --- a/Lang/ArkScript/User-input-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Text/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Variables b/Lang/ArkScript/Variables deleted file mode 120000 index f47b9d33ee..0000000000 --- a/Lang/ArkScript/Variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variables/ArkScript \ No newline at end of file diff --git a/Lang/ArkScript/Write-entire-file b/Lang/ArkScript/Write-entire-file deleted file mode 120000 index 978c98fba7..0000000000 --- a/Lang/ArkScript/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/ArkScript \ No newline at end of file diff --git a/Lang/Arturo/00-LANG.txt b/Lang/Arturo/00-LANG.txt index 7424af10da..e01d1ab72c 100644 --- a/Lang/Arturo/00-LANG.txt +++ b/Lang/Arturo/00-LANG.txt @@ -16,8 +16,8 @@ The language has been designed following some very simple and straightforward pr factorial: function [n][ - switch n > 0 -> n * factorial n-1 - -> 1 + if? n > 0 -> n * factorial n-1 + else -> 1 ] loop 1..19 [x]-> diff --git a/Lang/Arturo/Abstract-type b/Lang/Arturo/Abstract-type deleted file mode 120000 index d0cab7a251..0000000000 --- a/Lang/Arturo/Abstract-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abstract-type/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Achilles-numbers b/Lang/Arturo/Achilles-numbers deleted file mode 120000 index 14eecef378..0000000000 --- a/Lang/Arturo/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Arithmetic-derivative b/Lang/Arturo/Arithmetic-derivative deleted file mode 120000 index d1b6630a6c..0000000000 --- a/Lang/Arturo/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Bioinformatics-base-count b/Lang/Arturo/Bioinformatics-base-count new file mode 120000 index 0000000000..6562f48c25 --- /dev/null +++ b/Lang/Arturo/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Bitmap-Bresenhams-line-algorithm b/Lang/Arturo/Bitmap-Bresenhams-line-algorithm deleted file mode 120000 index 903f7d1b02..0000000000 --- a/Lang/Arturo/Bitmap-Bresenhams-line-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Bresenhams-line-algorithm/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Blum-integer b/Lang/Arturo/Blum-integer deleted file mode 120000 index 025a5231e2..0000000000 --- a/Lang/Arturo/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Dice-game-probabilities b/Lang/Arturo/Dice-game-probabilities deleted file mode 120000 index 963933dbf3..0000000000 --- a/Lang/Arturo/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/Arturo \ No newline at end of file diff --git a/Lang/Arturo/EKG-sequence-convergence b/Lang/Arturo/EKG-sequence-convergence deleted file mode 120000 index 0753ff65e6..0000000000 --- a/Lang/Arturo/EKG-sequence-convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/EKG-sequence-convergence/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Element-wise-operations b/Lang/Arturo/Element-wise-operations deleted file mode 120000 index da54867937..0000000000 --- a/Lang/Arturo/Element-wise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Element-wise-operations/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Entropy-Narcissist b/Lang/Arturo/Entropy-Narcissist deleted file mode 120000 index a5a91d666a..0000000000 --- a/Lang/Arturo/Entropy-Narcissist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy-Narcissist/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Inheritance-Single b/Lang/Arturo/Inheritance-Single deleted file mode 120000 index 9ea196311d..0000000000 --- a/Lang/Arturo/Inheritance-Single +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Single/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Magnanimous-numbers b/Lang/Arturo/Magnanimous-numbers deleted file mode 120000 index c058d4081f..0000000000 --- a/Lang/Arturo/Magnanimous-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magnanimous-numbers/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Meissel-Mertens-constant b/Lang/Arturo/Meissel-Mertens-constant new file mode 120000 index 0000000000..a360b321e1 --- /dev/null +++ b/Lang/Arturo/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Munching-squares b/Lang/Arturo/Munching-squares deleted file mode 120000 index 3d1757b680..0000000000 --- a/Lang/Arturo/Munching-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munching-squares/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Number-names b/Lang/Arturo/Number-names deleted file mode 120000 index 0265b7a150..0000000000 --- a/Lang/Arturo/Number-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Number-names/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Palindromic-gapful-numbers b/Lang/Arturo/Palindromic-gapful-numbers deleted file mode 120000 index bb7c640247..0000000000 --- a/Lang/Arturo/Palindromic-gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindromic-gapful-numbers/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Quaternion-type b/Lang/Arturo/Quaternion-type new file mode 120000 index 0000000000..b96cba3183 --- /dev/null +++ b/Lang/Arturo/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Radical-of-an-integer b/Lang/Arturo/Radical-of-an-integer deleted file mode 120000 index 0b80f4a924..0000000000 --- a/Lang/Arturo/Radical-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Radical-of-an-integer/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Reflection-List-methods b/Lang/Arturo/Reflection-List-methods deleted file mode 120000 index b2c29c2e7a..0000000000 --- a/Lang/Arturo/Reflection-List-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-methods/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Rosetta-Code-Find-unimplemented-tasks b/Lang/Arturo/Rosetta-Code-Find-unimplemented-tasks deleted file mode 120000 index 6c58da52bd..0000000000 --- a/Lang/Arturo/Rosetta-Code-Find-unimplemented-tasks +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Find-unimplemented-tasks/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Arturo/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Arturo/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Arturo/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Arturo/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Arturo/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Arturo/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Arturo/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Arturo/Sorting-Algorithms-Circle-Sort b/Lang/Arturo/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..fc98e0e878 --- /dev/null +++ b/Lang/Arturo/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Spelling-of-ordinal-numbers b/Lang/Arturo/Spelling-of-ordinal-numbers deleted file mode 120000 index 0d47ac2434..0000000000 --- a/Lang/Arturo/Spelling-of-ordinal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spelling-of-ordinal-numbers/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Super-d-numbers b/Lang/Arturo/Super-d-numbers deleted file mode 120000 index 9c8b511c5d..0000000000 --- a/Lang/Arturo/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Taxicab-numbers b/Lang/Arturo/Taxicab-numbers deleted file mode 120000 index 9c84413e59..0000000000 --- a/Lang/Arturo/Taxicab-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Taxicab-numbers/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Weird-numbers b/Lang/Arturo/Weird-numbers deleted file mode 120000 index 2f062bea69..0000000000 --- a/Lang/Arturo/Weird-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Weird-numbers/Arturo \ No newline at end of file diff --git a/Lang/Arturo/Zumkeller-numbers b/Lang/Arturo/Zumkeller-numbers deleted file mode 120000 index b956d7f399..0000000000 --- a/Lang/Arturo/Zumkeller-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zumkeller-numbers/Arturo \ No newline at end of file diff --git a/Lang/AsciiDots/Quine b/Lang/AsciiDots/Quine deleted file mode 120000 index c2090631eb..0000000000 --- a/Lang/AsciiDots/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/AsciiDots \ No newline at end of file diff --git a/Lang/AsciiDots/Write-language-name-in-3D-ASCII b/Lang/AsciiDots/Write-language-name-in-3D-ASCII deleted file mode 120000 index 81b3e17bd1..0000000000 --- a/Lang/AsciiDots/Write-language-name-in-3D-ASCII +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-language-name-in-3D-ASCII/AsciiDots \ No newline at end of file diff --git a/Lang/Asymptote/Array-length b/Lang/Asymptote/Array-length deleted file mode 120000 index 017bab2099..0000000000 --- a/Lang/Asymptote/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Day-of-the-week b/Lang/Asymptote/Day-of-the-week deleted file mode 120000 index f31fd61474..0000000000 --- a/Lang/Asymptote/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Determine-sentence-type b/Lang/Asymptote/Determine-sentence-type deleted file mode 120000 index 250fb5d120..0000000000 --- a/Lang/Asymptote/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Diversity-prediction-theorem b/Lang/Asymptote/Diversity-prediction-theorem deleted file mode 120000 index 4b9f736bd3..0000000000 --- a/Lang/Asymptote/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Empty-program b/Lang/Asymptote/Empty-program new file mode 120000 index 0000000000..5636b8fc49 --- /dev/null +++ b/Lang/Asymptote/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Evaluate-binomial-coefficients b/Lang/Asymptote/Evaluate-binomial-coefficients deleted file mode 120000 index 8408c303d7..0000000000 --- a/Lang/Asymptote/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Hello-world-Newline-omission b/Lang/Asymptote/Hello-world-Newline-omission deleted file mode 120000 index 1f04f08bd4..0000000000 --- a/Lang/Asymptote/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Jensens-Device b/Lang/Asymptote/Jensens-Device deleted file mode 120000 index 621c474cd7..0000000000 --- a/Lang/Asymptote/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Leonardo-numbers b/Lang/Asymptote/Leonardo-numbers deleted file mode 120000 index 53f9861f22..0000000000 --- a/Lang/Asymptote/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Loops-Infinite b/Lang/Asymptote/Loops-Infinite deleted file mode 120000 index 0aa1840fd7..0000000000 --- a/Lang/Asymptote/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Map-range b/Lang/Asymptote/Map-range deleted file mode 120000 index 249d69a043..0000000000 --- a/Lang/Asymptote/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Pancake-numbers b/Lang/Asymptote/Pancake-numbers deleted file mode 120000 index de9f5cf18c..0000000000 --- a/Lang/Asymptote/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Primality-by-trial-division b/Lang/Asymptote/Primality-by-trial-division deleted file mode 120000 index 0cfaa74cf3..0000000000 --- a/Lang/Asymptote/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Repeat b/Lang/Asymptote/Repeat deleted file mode 120000 index 03b0740c45..0000000000 --- a/Lang/Asymptote/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Sudan-function b/Lang/Asymptote/Sudan-function deleted file mode 120000 index 97eca50473..0000000000 --- a/Lang/Asymptote/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Towers-of-Hanoi b/Lang/Asymptote/Towers-of-Hanoi deleted file mode 120000 index 62a6e4d923..0000000000 --- a/Lang/Asymptote/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Asymptote \ No newline at end of file diff --git a/Lang/Asymptote/Twos-complement b/Lang/Asymptote/Twos-complement deleted file mode 120000 index a487252d4a..0000000000 --- a/Lang/Asymptote/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Asymptote \ No newline at end of file diff --git a/Lang/Atari-BASIC/00-LANG.txt b/Lang/Atari-BASIC/00-LANG.txt index f0ee8029ec..233d214413 100644 --- a/Lang/Atari-BASIC/00-LANG.txt +++ b/Lang/Atari-BASIC/00-LANG.txt @@ -3,23 +3,6 @@ |tags=basic,ataribasic }} {{Implementation|BASIC}} -'''Atari BASIC''' refers to the BASIC that shipped with Atari 8-bit micros. Revision A was released on cartridge for early models like the Atari 400 and 800 (1979), while revision B was included in ROM on later models such as the 800XL (1983). (Revision A is considered superior because revision B has more bugs!) Revision C was released on cartridge to address the bugs introduced in revision B. It was also in ROM on later 800XL computers and the XE range. +'''Atari BASIC''' refers to the BASIC that shipped with Atari 8-bit micros. -Emulators for Atari 8-bit computers include: -*[https://atari800.github.io/ Atari800] (Windows, Mac, Linux, etc.) -*[https://www.virtualdub.org/altirra.html Altirra] (Windows) - -Downloading the original Atari ROMs is not necessary for Atari800 or Altirra because they include the open source Altirra ROMs, which also feature Altirra BASIC, a fully compatible replacement for Atari BASIC. Altirra BASIC and OS are also better optimized than the original Atari ROMs; especially FOR loops and floating point functions are much quicker. - -To start Atari800 in BASIC mode, run it as atari800 -basic. Some important keys in Atari800 are F1=Settings, F5=Reset, F7=Break, F9=Quit, F10=Screenshot; see [https://github.com/atari800/atari800/blob/master/DOC/USAGE DOC/USAGE] for more. Lowercase characters in strings can be entered by first pressing Caps Lock in Atari800. - -In Atari800, folders on the host computer can be mounted in ''Emulator Configuration ⇨ Host Device Settings'', so then you can e.g. use LOAD "H1:MYPROG.BAS" to load a program from local disk. By default, folders are mounted read-only. - -BASIC programs in tokenized form are loaded and saved with LOAD and SAVE; in ASCII/ATASCII format you load them with ENTER and save them with LIST, e.g. LIST “H1:PROGRAM.LST”. - -After 9 minutes of inactivity, a screen saver (called attract mode by Atari) will activate and cycle colors. This can be stopped by an occasional POKE 77,0 to reset the timer. - -Like in Palo Alto Tiny BASIC, commands can be abbreviated by their first (unique) letters and a period, e.g. L. for LIST or GR. for GRAPHICS. - -==See Also== -*[https://en.wikipedia.org/wiki/Atari_BASIC Atari BASIC] in Wikipedia \ No newline at end of file +See Wikipedia: https://en.wikipedia.org/wiki/Atari_BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Archimedean-spiral b/Lang/Atari-BASIC/Archimedean-spiral deleted file mode 120000 index 3e75563330..0000000000 --- a/Lang/Atari-BASIC/Archimedean-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Archimedean-spiral/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Chaos-game b/Lang/Atari-BASIC/Chaos-game deleted file mode 120000 index f88e0f8ada..0000000000 --- a/Lang/Atari-BASIC/Chaos-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaos-game/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Color-of-a-screen-pixel b/Lang/Atari-BASIC/Color-of-a-screen-pixel deleted file mode 120000 index b097621245..0000000000 --- a/Lang/Atari-BASIC/Color-of-a-screen-pixel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-of-a-screen-pixel/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Colour-bars-Display b/Lang/Atari-BASIC/Colour-bars-Display deleted file mode 120000 index 03db8dce96..0000000000 --- a/Lang/Atari-BASIC/Colour-bars-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-bars-Display/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Draw-a-clock b/Lang/Atari-BASIC/Draw-a-clock deleted file mode 120000 index f8dd467da4..0000000000 --- a/Lang/Atari-BASIC/Draw-a-clock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-clock/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Mandelbrot-set b/Lang/Atari-BASIC/Mandelbrot-set deleted file mode 120000 index 45e66ccff0..0000000000 --- a/Lang/Atari-BASIC/Mandelbrot-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mandelbrot-set/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Musical-scale b/Lang/Atari-BASIC/Musical-scale deleted file mode 120000 index b870e25059..0000000000 --- a/Lang/Atari-BASIC/Musical-scale +++ /dev/null @@ -1 +0,0 @@ -../../Task/Musical-scale/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Pi b/Lang/Atari-BASIC/Pi deleted file mode 120000 index b081cc7024..0000000000 --- a/Lang/Atari-BASIC/Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pi/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Random-number-generator-device- b/Lang/Atari-BASIC/Random-number-generator-device- deleted file mode 120000 index bc35b665ee..0000000000 --- a/Lang/Atari-BASIC/Random-number-generator-device- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-number-generator-device-/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Reverse-a-string b/Lang/Atari-BASIC/Reverse-a-string deleted file mode 120000 index c2ff7e214b..0000000000 --- a/Lang/Atari-BASIC/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/System-time b/Lang/Atari-BASIC/System-time deleted file mode 120000 index c4df1e6a39..0000000000 --- a/Lang/Atari-BASIC/System-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/System-time/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Terminal-control-Hiding-the-cursor b/Lang/Atari-BASIC/Terminal-control-Hiding-the-cursor deleted file mode 120000 index 78972a34b6..0000000000 --- a/Lang/Atari-BASIC/Terminal-control-Hiding-the-cursor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Hiding-the-cursor/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Terminal-control-Inverse-video b/Lang/Atari-BASIC/Terminal-control-Inverse-video deleted file mode 120000 index 8c57f75946..0000000000 --- a/Lang/Atari-BASIC/Terminal-control-Inverse-video +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Inverse-video/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Terminal-control-Positional-read b/Lang/Atari-BASIC/Terminal-control-Positional-read deleted file mode 120000 index a0575b2278..0000000000 --- a/Lang/Atari-BASIC/Terminal-control-Positional-read +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Positional-read/Atari-BASIC \ No newline at end of file diff --git a/Lang/Atari-BASIC/Terminal-control-Ringing-the-terminal-bell b/Lang/Atari-BASIC/Terminal-control-Ringing-the-terminal-bell deleted file mode 120000 index 3666cabb9e..0000000000 --- a/Lang/Atari-BASIC/Terminal-control-Ringing-the-terminal-bell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Ringing-the-terminal-bell/Atari-BASIC \ No newline at end of file diff --git a/Lang/AutoHotkey/Miller-Rabin-primality-test b/Lang/AutoHotkey/Miller-Rabin-primality-test new file mode 120000 index 0000000000..518dd6b131 --- /dev/null +++ b/Lang/AutoHotkey/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/AutoHotkey \ No newline at end of file diff --git a/Lang/AutoHotkey/Quaternion-type b/Lang/AutoHotkey/Quaternion-type new file mode 120000 index 0000000000..00a1a5a068 --- /dev/null +++ b/Lang/AutoHotkey/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/AutoHotkey \ No newline at end of file diff --git a/Lang/AutoHotkey/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/AutoHotkey/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/AutoHotkey/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/AutoHotkey/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/AutoHotkey/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/AutoHotkey/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/AutoHotkey/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/AutoHotkey/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/AutoHotkey/Sorting-Algorithms-Circle-Sort b/Lang/AutoHotkey/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..975740b1fa --- /dev/null +++ b/Lang/AutoHotkey/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/AutoHotkey \ No newline at end of file diff --git a/Lang/AutoLISP/100-doors b/Lang/AutoLISP/100-doors deleted file mode 120000 index 4d97a8a5d6..0000000000 --- a/Lang/AutoLISP/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/AutoLISP \ No newline at end of file diff --git a/Lang/AutoLISP/Babbage-problem b/Lang/AutoLISP/Babbage-problem deleted file mode 120000 index 0ae3941c82..0000000000 --- a/Lang/AutoLISP/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/AutoLISP \ No newline at end of file diff --git a/Lang/AutoLISP/Balanced-brackets b/Lang/AutoLISP/Balanced-brackets deleted file mode 120000 index b752cfc1d6..0000000000 --- a/Lang/AutoLISP/Balanced-brackets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-brackets/AutoLISP \ No newline at end of file diff --git a/Lang/AutoLISP/Entropy b/Lang/AutoLISP/Entropy deleted file mode 120000 index bc1dec235f..0000000000 --- a/Lang/AutoLISP/Entropy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy/AutoLISP \ No newline at end of file diff --git a/Lang/AutoLISP/Entropy-Narcissist b/Lang/AutoLISP/Entropy-Narcissist deleted file mode 120000 index 0a143c87ce..0000000000 --- a/Lang/AutoLISP/Entropy-Narcissist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy-Narcissist/AutoLISP \ No newline at end of file diff --git a/Lang/AutoLISP/Environment-variables b/Lang/AutoLISP/Environment-variables deleted file mode 120000 index cc9ceec1ff..0000000000 --- a/Lang/AutoLISP/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/AutoLISP \ No newline at end of file diff --git a/Lang/AutoLISP/Largest-proper-divisor-of-n b/Lang/AutoLISP/Largest-proper-divisor-of-n deleted file mode 120000 index 48c08fae1a..0000000000 --- a/Lang/AutoLISP/Largest-proper-divisor-of-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-proper-divisor-of-n/AutoLISP \ No newline at end of file diff --git a/Lang/AutoLISP/The-Twelve-Days-of-Christmas b/Lang/AutoLISP/The-Twelve-Days-of-Christmas deleted file mode 120000 index 3dd7563b0d..0000000000 --- a/Lang/AutoLISP/The-Twelve-Days-of-Christmas +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Twelve-Days-of-Christmas/AutoLISP \ No newline at end of file diff --git a/Lang/Axiom/Quaternion-type b/Lang/Axiom/Quaternion-type new file mode 120000 index 0000000000..483576377a --- /dev/null +++ b/Lang/Axiom/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Axiom \ No newline at end of file diff --git a/Lang/BASIC/00-LANG.txt b/Lang/BASIC/00-LANG.txt index ddee550d0d..8f4f969193 100644 --- a/Lang/BASIC/00-LANG.txt +++ b/Lang/BASIC/00-LANG.txt @@ -12,56 +12,25 @@ BASIC became popular, with many different implementations for various computers. ==Links== *[[wp:BASIC|Wikipedia:BASIC]] -**[[wp:ASIC]] -**[[wp:Atari BASIC]] **[[wp:BASIC-PLUS]] -**[[wp:Basic-256]] -**[[wp:Batari BASIC]] -**[[wp:BBC BASIC]] **[[wp:Benton Harbor BASIC]] -**[[wp:Beta BASIC]] **[[wp:CBASIC]] **[[wp:Chipmunk Basic]] -**[[wp:DarkBASIC]] **[[wp:Dartmouth BASIC]] -**[[wp:FreeBASIC]] -**[[wp:FutureBASIC]] -**[[wp:GFA BASIC]] -**[[wp:GLBasic]] -**[[wp:Integer BASIC]] -**[[wp:Liberty BASIC]] -**[[wp:Locomotive BASIC]] **[[wp:Microsoft BASIC]] ***[[wp:Altair BASIC]] ***[[wp:Amiga BASIC]] ***[[wp:Applesoft BASIC]] ***[[wp:Atari Microsoft BASIC]] ***[[wp:Commodore BASIC]] -***[[wp:Extended Color BASIC]] ***[[wp:IBM BASIC]] -***[[wp:MS BASIC for Macintosh]] -***[[wp:MSX BASIC]] -***[[wp:Small Basic]] -***[[wp:QBasic]] -***[[wp:QuickBASIC]]‎ -***[[wp:TRS-80 Level II BASIC]] -***[[wp:Visual Basic‎]] +***[[wp:TRS-80 Level II BASIC ]] **[[wp:PowerBASIC]] **[[wp:PureBasic]] -**[[wp:QB64‎]] -**[[wp:Quite BASIC]]‎ -**[[wp:RapidQ]] -**[[wp:Realbasic]] **[[wp:Rocky Mountain BASIC]] -**[[wp:Run BASIC]] **[[wp:S-BASIC]] -**[[wp:ScriptBasic]] **[[wp:Sinclair BASIC]] -**[[wp:SmileBASIC‎]] **[[wp:SuperBASIC]] **[[wp:TI BASIC (TI 99/4A)]] -**[[wp:Tiny BASIC‎]] **[[wp:True BASIC]] -**[[wp:UBASIC]] -**[[wp:Yabasic]] {{language programming paradigm|Procedural}} \ No newline at end of file diff --git a/Lang/BASIC/Abundant-deficient-and-perfect-number-classifications b/Lang/BASIC/Abundant-deficient-and-perfect-number-classifications new file mode 120000 index 0000000000..732a066bdf --- /dev/null +++ b/Lang/BASIC/Abundant-deficient-and-perfect-number-classifications @@ -0,0 +1 @@ +../../Task/Abundant-deficient-and-perfect-number-classifications/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Arithmetic-derivative b/Lang/BASIC/Arithmetic-derivative deleted file mode 120000 index 25cf9a8b6a..0000000000 --- a/Lang/BASIC/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Damm-algorithm b/Lang/BASIC/Damm-algorithm new file mode 120000 index 0000000000..41ee6d1c36 --- /dev/null +++ b/Lang/BASIC/Damm-algorithm @@ -0,0 +1 @@ +../../Task/Damm-algorithm/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Determine-if-a-string-is-collapsible b/Lang/BASIC/Determine-if-a-string-is-collapsible new file mode 120000 index 0000000000..87084a2029 --- /dev/null +++ b/Lang/BASIC/Determine-if-a-string-is-collapsible @@ -0,0 +1 @@ +../../Task/Determine-if-a-string-is-collapsible/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Ethiopian-multiplication b/Lang/BASIC/Ethiopian-multiplication new file mode 120000 index 0000000000..94be458bb2 --- /dev/null +++ b/Lang/BASIC/Ethiopian-multiplication @@ -0,0 +1 @@ +../../Task/Ethiopian-multiplication/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Function-definition b/Lang/BASIC/Function-definition new file mode 120000 index 0000000000..a052c63292 --- /dev/null +++ b/Lang/BASIC/Function-definition @@ -0,0 +1 @@ +../../Task/Function-definition/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Gray-code b/Lang/BASIC/Gray-code new file mode 120000 index 0000000000..f0bc6f352f --- /dev/null +++ b/Lang/BASIC/Gray-code @@ -0,0 +1 @@ +../../Task/Gray-code/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Mayan-numerals b/Lang/BASIC/Mayan-numerals new file mode 120000 index 0000000000..ae24d05061 --- /dev/null +++ b/Lang/BASIC/Mayan-numerals @@ -0,0 +1 @@ +../../Task/Mayan-numerals/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Monty-Hall-problem b/Lang/BASIC/Monty-Hall-problem new file mode 120000 index 0000000000..ba5a5a279d --- /dev/null +++ b/Lang/BASIC/Monty-Hall-problem @@ -0,0 +1 @@ +../../Task/Monty-Hall-problem/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Move-to-front-algorithm b/Lang/BASIC/Move-to-front-algorithm deleted file mode 120000 index a9f8d4df7e..0000000000 --- a/Lang/BASIC/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Ordered-words b/Lang/BASIC/Ordered-words deleted file mode 120000 index dd2f98d4e6..0000000000 --- a/Lang/BASIC/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Partition-an-integer-x-into-n-primes b/Lang/BASIC/Partition-an-integer-x-into-n-primes deleted file mode 120000 index 8db316776d..0000000000 --- a/Lang/BASIC/Partition-an-integer-x-into-n-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-an-integer-x-into-n-primes/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Rot-13 b/Lang/BASIC/Rot-13 new file mode 120000 index 0000000000..37a240fe69 --- /dev/null +++ b/Lang/BASIC/Rot-13 @@ -0,0 +1 @@ +../../Task/Rot-13/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Sorting-algorithms-Quicksort b/Lang/BASIC/Sorting-algorithms-Quicksort new file mode 120000 index 0000000000..f7976ecb9f --- /dev/null +++ b/Lang/BASIC/Sorting-algorithms-Quicksort @@ -0,0 +1 @@ +../../Task/Sorting-algorithms-Quicksort/BASIC \ No newline at end of file diff --git a/Lang/BASIC/Temperature-conversion b/Lang/BASIC/Temperature-conversion new file mode 120000 index 0000000000..21182b0539 --- /dev/null +++ b/Lang/BASIC/Temperature-conversion @@ -0,0 +1 @@ +../../Task/Temperature-conversion/BASIC \ No newline at end of file diff --git a/Lang/BASIC256/Associative-array-Merging b/Lang/BASIC256/Associative-array-Merging deleted file mode 120000 index 20bef5368f..0000000000 --- a/Lang/BASIC256/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Determine-if-a-string-has-all-the-same-characters b/Lang/BASIC256/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 0fc88a3804..0000000000 --- a/Lang/BASIC256/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Determine-sentence-type b/Lang/BASIC256/Determine-sentence-type deleted file mode 120000 index 6be21d3753..0000000000 --- a/Lang/BASIC256/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Eban-numbers b/Lang/BASIC256/Eban-numbers deleted file mode 120000 index cc54b44b18..0000000000 --- a/Lang/BASIC256/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Empty-program b/Lang/BASIC256/Empty-program new file mode 120000 index 0000000000..163b273495 --- /dev/null +++ b/Lang/BASIC256/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Evaluate-binomial-coefficients b/Lang/BASIC256/Evaluate-binomial-coefficients deleted file mode 120000 index 415fd5e54e..0000000000 --- a/Lang/BASIC256/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Kronecker-product b/Lang/BASIC256/Kronecker-product deleted file mode 120000 index dd258524fe..0000000000 --- a/Lang/BASIC256/Kronecker-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Meissel-Mertens-constant b/Lang/BASIC256/Meissel-Mertens-constant new file mode 120000 index 0000000000..6ff8d02267 --- /dev/null +++ b/Lang/BASIC256/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Multiple-regression b/Lang/BASIC256/Multiple-regression deleted file mode 120000 index 4d8b79e98b..0000000000 --- a/Lang/BASIC256/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Nested-templated-data b/Lang/BASIC256/Nested-templated-data deleted file mode 120000 index f5ddb43f39..0000000000 --- a/Lang/BASIC256/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Phrase-reversals b/Lang/BASIC256/Phrase-reversals deleted file mode 120000 index 7bce29f023..0000000000 --- a/Lang/BASIC256/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Pythagorean-triples b/Lang/BASIC256/Pythagorean-triples deleted file mode 120000 index 0ded5bc54d..0000000000 --- a/Lang/BASIC256/Pythagorean-triples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagorean-triples/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Quaternion-type b/Lang/BASIC256/Quaternion-type new file mode 120000 index 0000000000..ecfff3f315 --- /dev/null +++ b/Lang/BASIC256/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Ramer-Douglas-Peucker-line-simplification b/Lang/BASIC256/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index 9a890661d4..0000000000 --- a/Lang/BASIC256/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Sailors-coconuts-and-a-monkey-problem b/Lang/BASIC256/Sailors-coconuts-and-a-monkey-problem deleted file mode 120000 index 3cfdfb5740..0000000000 --- a/Lang/BASIC256/Sailors-coconuts-and-a-monkey-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sailors-coconuts-and-a-monkey-problem/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/BASIC256/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/BASIC256/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/BASIC256/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/BASIC256/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/BASIC256/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/BASIC256/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/BASIC256/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/BASIC256/Sexy-primes b/Lang/BASIC256/Sexy-primes deleted file mode 120000 index 86fc0a12b9..0000000000 --- a/Lang/BASIC256/Sexy-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sexy-primes/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Sort-disjoint-sublist b/Lang/BASIC256/Sort-disjoint-sublist deleted file mode 120000 index 4422d7b840..0000000000 --- a/Lang/BASIC256/Sort-disjoint-sublist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-disjoint-sublist/BASIC256 \ No newline at end of file diff --git a/Lang/BASIC256/Twos-complement b/Lang/BASIC256/Twos-complement deleted file mode 120000 index 8b3d33db0a..0000000000 --- a/Lang/BASIC256/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/BASIC256 \ No newline at end of file diff --git a/Lang/BBC-BASIC/Arbitrary-precision-integers-included- b/Lang/BBC-BASIC/Arbitrary-precision-integers-included- deleted file mode 120000 index ca18adffdc..0000000000 --- a/Lang/BBC-BASIC/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/BBC-BASIC \ No newline at end of file diff --git a/Lang/BBC-BASIC/Bioinformatics-base-count b/Lang/BBC-BASIC/Bioinformatics-base-count new file mode 120000 index 0000000000..109612c5db --- /dev/null +++ b/Lang/BBC-BASIC/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/BBC-BASIC \ No newline at end of file diff --git a/Lang/BBC-BASIC/Multi-dimensional-array b/Lang/BBC-BASIC/Multi-dimensional-array deleted file mode 120000 index 4bc7c4a17c..0000000000 --- a/Lang/BBC-BASIC/Multi-dimensional-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-dimensional-array/BBC-BASIC \ No newline at end of file diff --git a/Lang/BBC-BASIC/Quaternion-type b/Lang/BBC-BASIC/Quaternion-type new file mode 120000 index 0000000000..018816057d --- /dev/null +++ b/Lang/BBC-BASIC/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/BBC-BASIC \ No newline at end of file diff --git a/Lang/BCPL/Move-to-front-algorithm b/Lang/BCPL/Move-to-front-algorithm deleted file mode 120000 index 27c5309df1..0000000000 --- a/Lang/BCPL/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/BCPL \ No newline at end of file diff --git a/Lang/BCPL/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/BCPL/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/BCPL/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/BCPL/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/BCPL/Zeckendorf-number-representation b/Lang/BCPL/Zeckendorf-number-representation deleted file mode 120000 index 6723808a9f..0000000000 --- a/Lang/BCPL/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/BCPL \ No newline at end of file diff --git a/Lang/BQN/Abundant-odd-numbers b/Lang/BQN/Abundant-odd-numbers deleted file mode 120000 index fdb56e6ed6..0000000000 --- a/Lang/BQN/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/BQN \ No newline at end of file diff --git a/Lang/BQN/Base64-decode-data b/Lang/BQN/Base64-decode-data deleted file mode 120000 index 2272b7f2a1..0000000000 --- a/Lang/BQN/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/BQN \ No newline at end of file diff --git a/Lang/BQN/Bell-numbers b/Lang/BQN/Bell-numbers deleted file mode 120000 index 2c520a34e3..0000000000 --- a/Lang/BQN/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/BQN \ No newline at end of file diff --git a/Lang/BQN/CUSIP b/Lang/BQN/CUSIP deleted file mode 120000 index b7ca66ab5f..0000000000 --- a/Lang/BQN/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/BQN \ No newline at end of file diff --git a/Lang/BQN/Call-an-object-method b/Lang/BQN/Call-an-object-method deleted file mode 120000 index eb9e8d9920..0000000000 --- a/Lang/BQN/Call-an-object-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-an-object-method/BQN \ No newline at end of file diff --git a/Lang/BQN/Cartesian-product-of-two-or-more-lists b/Lang/BQN/Cartesian-product-of-two-or-more-lists deleted file mode 120000 index 9eca0c70e0..0000000000 --- a/Lang/BQN/Cartesian-product-of-two-or-more-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cartesian-product-of-two-or-more-lists/BQN \ No newline at end of file diff --git a/Lang/BQN/Determine-if-a-string-is-squeezable b/Lang/BQN/Determine-if-a-string-is-squeezable deleted file mode 120000 index 604c0583b1..0000000000 --- a/Lang/BQN/Determine-if-a-string-is-squeezable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-squeezable/BQN \ No newline at end of file diff --git a/Lang/BQN/Dutch-national-flag-problem b/Lang/BQN/Dutch-national-flag-problem deleted file mode 120000 index c24e10da06..0000000000 --- a/Lang/BQN/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/BQN \ No newline at end of file diff --git a/Lang/BQN/Find-common-directory-path b/Lang/BQN/Find-common-directory-path deleted file mode 120000 index d4456eaa79..0000000000 --- a/Lang/BQN/Find-common-directory-path +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-common-directory-path/BQN \ No newline at end of file diff --git a/Lang/BQN/Globally-replace-text-in-several-files b/Lang/BQN/Globally-replace-text-in-several-files deleted file mode 120000 index b13db5355b..0000000000 --- a/Lang/BQN/Globally-replace-text-in-several-files +++ /dev/null @@ -1 +0,0 @@ -../../Task/Globally-replace-text-in-several-files/BQN \ No newline at end of file diff --git a/Lang/BQN/Harmonic-series b/Lang/BQN/Harmonic-series deleted file mode 120000 index 6efb347667..0000000000 --- a/Lang/BQN/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/BQN \ No newline at end of file diff --git a/Lang/BQN/I-before-E-except-after-C b/Lang/BQN/I-before-E-except-after-C deleted file mode 120000 index 5fd82fbd92..0000000000 --- a/Lang/BQN/I-before-E-except-after-C +++ /dev/null @@ -1 +0,0 @@ -../../Task/I-before-E-except-after-C/BQN \ No newline at end of file diff --git a/Lang/BQN/IBAN b/Lang/BQN/IBAN deleted file mode 120000 index 501e54d38b..0000000000 --- a/Lang/BQN/IBAN +++ /dev/null @@ -1 +0,0 @@ -../../Task/IBAN/BQN \ No newline at end of file diff --git a/Lang/BQN/ISBN13-check-digit b/Lang/BQN/ISBN13-check-digit deleted file mode 120000 index 70feb3a0c6..0000000000 --- a/Lang/BQN/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/BQN \ No newline at end of file diff --git a/Lang/BQN/Miller-Rabin-primality-test b/Lang/BQN/Miller-Rabin-primality-test new file mode 120000 index 0000000000..88fd3a622d --- /dev/null +++ b/Lang/BQN/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/BQN \ No newline at end of file diff --git a/Lang/BQN/Phrase-reversals b/Lang/BQN/Phrase-reversals deleted file mode 120000 index a35381900f..0000000000 --- a/Lang/BQN/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/BQN \ No newline at end of file diff --git a/Lang/BQN/Self-describing-numbers b/Lang/BQN/Self-describing-numbers deleted file mode 120000 index 394307e5cb..0000000000 --- a/Lang/BQN/Self-describing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Self-describing-numbers/BQN \ No newline at end of file diff --git a/Lang/BQN/Sort-disjoint-sublist b/Lang/BQN/Sort-disjoint-sublist deleted file mode 120000 index b6e62b246c..0000000000 --- a/Lang/BQN/Sort-disjoint-sublist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-disjoint-sublist/BQN \ No newline at end of file diff --git a/Lang/BQN/Tau-number b/Lang/BQN/Tau-number deleted file mode 120000 index 0d0f120696..0000000000 --- a/Lang/BQN/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/BQN \ No newline at end of file diff --git a/Lang/BQN/Water-collected-between-towers b/Lang/BQN/Water-collected-between-towers deleted file mode 120000 index 905f66c364..0000000000 --- a/Lang/BQN/Water-collected-between-towers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Water-collected-between-towers/BQN \ No newline at end of file diff --git a/Lang/BaCon/Copy-a-string b/Lang/BaCon/Copy-a-string new file mode 120000 index 0000000000..a2df7bcd98 --- /dev/null +++ b/Lang/BaCon/Copy-a-string @@ -0,0 +1 @@ +../../Task/Copy-a-string/BaCon \ No newline at end of file diff --git a/Lang/Bait/Array-length b/Lang/Bait/Array-length deleted file mode 120000 index 986225a090..0000000000 --- a/Lang/Bait/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Bait \ No newline at end of file diff --git a/Lang/Bait/Empty-string b/Lang/Bait/Empty-string deleted file mode 120000 index b1bbee2da3..0000000000 --- a/Lang/Bait/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/Bait \ No newline at end of file diff --git a/Lang/Bait/Loops-Continue b/Lang/Bait/Loops-Continue deleted file mode 120000 index 6e3768fbb1..0000000000 --- a/Lang/Bait/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/Bait \ No newline at end of file diff --git a/Lang/Ballerina/00-LANG.txt b/Lang/Ballerina/00-LANG.txt index 211ba0fe40..af215acfd5 100644 --- a/Lang/Ballerina/00-LANG.txt +++ b/Lang/Ballerina/00-LANG.txt @@ -1,20 +1 @@ -{{language|Ballerina -|exec=bytecode -|strength=strong -|safety=safe -|express=explicit -|checking=static -|gc=yes -|hopl=no -|site=https://ballerina.io -}} -'''[https://en.wikipedia.org/wiki/Ballerina_(programming_language) Ballerina]''' is an open source general-purpose programming language designed and supported by [https://wso2.com/ WSO2] for cloud-era application programmers. - -It is under development on [https://github.com/ballerina-platform/ballerina-lang GitHub] and is fully documented [https://ballerina.io here]. - -Ballerina was first publicly announced in 2017 and version 1.0 was released on September 10, 2019. However, a major overhaul took place in 2022 when [https://blog.ballerina.io/posts/2022-02-01-announcing-ballerina-2201.0.0-swan-lake/ Ballerina 2201.0.0 (Swan Lake)] was released. - -The current version (2201.12.3) has distributions available for Windows, Linux and macOS and can be downloaded [https://ballerina.io/downloads/ here]. - -== See Also == -* [https://ballerina.io/learn/by-example/ Ballerina by Example] \ No newline at end of file +{{stub}}{{language|Ballerina}} \ No newline at end of file diff --git a/Lang/Ballerina/100-doors b/Lang/Ballerina/100-doors deleted file mode 120000 index 833a0fc189..0000000000 --- a/Lang/Ballerina/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/99-bottles-of-beer b/Lang/Ballerina/99-bottles-of-beer deleted file mode 120000 index b3bd8e29e3..0000000000 --- a/Lang/Ballerina/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/A+B b/Lang/Ballerina/A+B deleted file mode 120000 index e9aab74a73..0000000000 --- a/Lang/Ballerina/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/ABC-problem b/Lang/Ballerina/ABC-problem deleted file mode 120000 index 49ca7ac9ad..0000000000 --- a/Lang/Ballerina/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/AKS-test-for-primes b/Lang/Ballerina/AKS-test-for-primes deleted file mode 120000 index 9b19f08d80..0000000000 --- a/Lang/Ballerina/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Abundant-deficient-and-perfect-number-classifications b/Lang/Ballerina/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index b5353658a4..0000000000 --- a/Lang/Ballerina/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Abundant-odd-numbers b/Lang/Ballerina/Abundant-odd-numbers deleted file mode 120000 index 0b3a97c4a1..0000000000 --- a/Lang/Ballerina/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Accumulator-factory b/Lang/Ballerina/Accumulator-factory deleted file mode 120000 index 837dbbe6a0..0000000000 --- a/Lang/Ballerina/Accumulator-factory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Accumulator-factory/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Achilles-numbers b/Lang/Ballerina/Achilles-numbers deleted file mode 120000 index 3336ab1c37..0000000000 --- a/Lang/Ballerina/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Ackermann-function b/Lang/Ballerina/Ackermann-function deleted file mode 120000 index b9748d884d..0000000000 --- a/Lang/Ballerina/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Add-a-variable-to-a-class-instance-at-runtime b/Lang/Ballerina/Add-a-variable-to-a-class-instance-at-runtime deleted file mode 120000 index 12efd91bd6..0000000000 --- a/Lang/Ballerina/Add-a-variable-to-a-class-instance-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Add-a-variable-to-a-class-instance-at-runtime/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Additive-primes b/Lang/Ballerina/Additive-primes deleted file mode 120000 index a504210ea7..0000000000 --- a/Lang/Ballerina/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Address-of-a-variable b/Lang/Ballerina/Address-of-a-variable deleted file mode 120000 index 6428e75ce3..0000000000 --- a/Lang/Ballerina/Address-of-a-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Address-of-a-variable/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Almost-prime b/Lang/Ballerina/Almost-prime deleted file mode 120000 index 33d501af1e..0000000000 --- a/Lang/Ballerina/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Amb b/Lang/Ballerina/Amb deleted file mode 120000 index 7acc58d7c4..0000000000 --- a/Lang/Ballerina/Amb +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amb/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Angle-difference-between-two-bearings b/Lang/Ballerina/Angle-difference-between-two-bearings deleted file mode 120000 index 04ff00d986..0000000000 --- a/Lang/Ballerina/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Anti-primes b/Lang/Ballerina/Anti-primes deleted file mode 120000 index 9911fc0bcb..0000000000 --- a/Lang/Ballerina/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Apply-a-callback-to-an-array b/Lang/Ballerina/Apply-a-callback-to-an-array deleted file mode 120000 index 9911480671..0000000000 --- a/Lang/Ballerina/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Approximate-equality b/Lang/Ballerina/Approximate-equality deleted file mode 120000 index 0ea6692d0d..0000000000 --- a/Lang/Ballerina/Approximate-equality +++ /dev/null @@ -1 +0,0 @@ -../../Task/Approximate-equality/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Arithmetic-Complex b/Lang/Ballerina/Arithmetic-Complex deleted file mode 120000 index f87fd15204..0000000000 --- a/Lang/Ballerina/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Arithmetic-Integer b/Lang/Ballerina/Arithmetic-Integer deleted file mode 120000 index a4c8cf5206..0000000000 --- a/Lang/Ballerina/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Arithmetic-Rational b/Lang/Ballerina/Arithmetic-Rational deleted file mode 120000 index 422af5f88b..0000000000 --- a/Lang/Ballerina/Arithmetic-Rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Rational/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Arithmetic-numbers b/Lang/Ballerina/Arithmetic-numbers deleted file mode 120000 index 38541780a0..0000000000 --- a/Lang/Ballerina/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Array-concatenation b/Lang/Ballerina/Array-concatenation deleted file mode 120000 index 41c2603b74..0000000000 --- a/Lang/Ballerina/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Array-length b/Lang/Ballerina/Array-length deleted file mode 120000 index 25020148f9..0000000000 --- a/Lang/Ballerina/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Arrays b/Lang/Ballerina/Arrays deleted file mode 120000 index ec5c5a266e..0000000000 --- a/Lang/Ballerina/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Ascending-primes b/Lang/Ballerina/Ascending-primes deleted file mode 120000 index 51444ceb96..0000000000 --- a/Lang/Ballerina/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Associative-array-Creation b/Lang/Ballerina/Associative-array-Creation deleted file mode 120000 index 2639b285f3..0000000000 --- a/Lang/Ballerina/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Associative-array-Iteration b/Lang/Ballerina/Associative-array-Iteration deleted file mode 120000 index d3e31d2374..0000000000 --- a/Lang/Ballerina/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Associative-array-Merging b/Lang/Ballerina/Associative-array-Merging deleted file mode 120000 index cd38137d75..0000000000 --- a/Lang/Ballerina/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Averages-Arithmetic-mean b/Lang/Ballerina/Averages-Arithmetic-mean deleted file mode 120000 index 039d1f0de8..0000000000 --- a/Lang/Ballerina/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Averages-Mean-angle b/Lang/Ballerina/Averages-Mean-angle deleted file mode 120000 index adf77693ce..0000000000 --- a/Lang/Ballerina/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Averages-Mean-time-of-day b/Lang/Ballerina/Averages-Mean-time-of-day deleted file mode 120000 index c969ed84e4..0000000000 --- a/Lang/Ballerina/Averages-Mean-time-of-day +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-time-of-day/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Averages-Median b/Lang/Ballerina/Averages-Median deleted file mode 120000 index 5bbd39cecb..0000000000 --- a/Lang/Ballerina/Averages-Median +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Median/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Averages-Mode b/Lang/Ballerina/Averages-Mode deleted file mode 120000 index 72d0e02dae..0000000000 --- a/Lang/Ballerina/Averages-Mode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mode/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Averages-Pythagorean-means b/Lang/Ballerina/Averages-Pythagorean-means deleted file mode 120000 index fd607a9ee8..0000000000 --- a/Lang/Ballerina/Averages-Pythagorean-means +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Pythagorean-means/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Averages-Root-mean-square b/Lang/Ballerina/Averages-Root-mean-square deleted file mode 120000 index 48056410d9..0000000000 --- a/Lang/Ballerina/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Averages-Simple-moving-average b/Lang/Ballerina/Averages-Simple-moving-average deleted file mode 120000 index 7e2849cced..0000000000 --- a/Lang/Ballerina/Averages-Simple-moving-average +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Simple-moving-average/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Balanced-brackets b/Lang/Ballerina/Balanced-brackets deleted file mode 120000 index 3d78b77dd3..0000000000 --- a/Lang/Ballerina/Balanced-brackets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-brackets/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Binary-digits b/Lang/Ballerina/Binary-digits deleted file mode 120000 index 47999ed558..0000000000 --- a/Lang/Ballerina/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Boolean-values b/Lang/Ballerina/Boolean-values deleted file mode 120000 index c01657f16a..0000000000 --- a/Lang/Ballerina/Boolean-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boolean-values/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Caesar-cipher b/Lang/Ballerina/Caesar-cipher deleted file mode 120000 index 8e1a6603e9..0000000000 --- a/Lang/Ballerina/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Calculating-the-value-of-e b/Lang/Ballerina/Calculating-the-value-of-e deleted file mode 120000 index af3085b824..0000000000 --- a/Lang/Ballerina/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Case-sensitivity-of-identifiers b/Lang/Ballerina/Case-sensitivity-of-identifiers deleted file mode 120000 index 42725d41da..0000000000 --- a/Lang/Ballerina/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Character-codes b/Lang/Ballerina/Character-codes deleted file mode 120000 index 6abede048f..0000000000 --- a/Lang/Ballerina/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Classes b/Lang/Ballerina/Classes deleted file mode 120000 index 0c8bd2434d..0000000000 --- a/Lang/Ballerina/Classes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Classes/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Commatizing-numbers b/Lang/Ballerina/Commatizing-numbers deleted file mode 120000 index a644eda1b6..0000000000 --- a/Lang/Ballerina/Commatizing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Commatizing-numbers/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Comments b/Lang/Ballerina/Comments deleted file mode 120000 index 6b5d53ddee..0000000000 --- a/Lang/Ballerina/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Copy-a-string b/Lang/Ballerina/Copy-a-string deleted file mode 120000 index ce5773b181..0000000000 --- a/Lang/Ballerina/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Count-in-octal b/Lang/Ballerina/Count-in-octal deleted file mode 120000 index 7e70a67830..0000000000 --- a/Lang/Ballerina/Count-in-octal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-octal/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Currency b/Lang/Ballerina/Currency deleted file mode 120000 index 2b278dfa20..0000000000 --- a/Lang/Ballerina/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Currying b/Lang/Ballerina/Currying deleted file mode 120000 index 7e465c7834..0000000000 --- a/Lang/Ballerina/Currying +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currying/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Dot-product b/Lang/Ballerina/Dot-product deleted file mode 120000 index 327f9d0969..0000000000 --- a/Lang/Ballerina/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Dynamic-variable-names b/Lang/Ballerina/Dynamic-variable-names deleted file mode 120000 index 5c549728ae..0000000000 --- a/Lang/Ballerina/Dynamic-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dynamic-variable-names/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Empty-string b/Lang/Ballerina/Empty-string deleted file mode 120000 index a86a0ffc9d..0000000000 --- a/Lang/Ballerina/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Even-or-odd b/Lang/Ballerina/Even-or-odd deleted file mode 120000 index 2d8b1b90ab..0000000000 --- a/Lang/Ballerina/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Extreme-floating-point-values b/Lang/Ballerina/Extreme-floating-point-values deleted file mode 120000 index 7f91d37268..0000000000 --- a/Lang/Ballerina/Extreme-floating-point-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extreme-floating-point-values/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Factors-of-an-integer b/Lang/Ballerina/Factors-of-an-integer deleted file mode 120000 index ac634eef84..0000000000 --- a/Lang/Ballerina/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Farey-sequence b/Lang/Ballerina/Farey-sequence deleted file mode 120000 index d542459c5f..0000000000 --- a/Lang/Ballerina/Farey-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Farey-sequence/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Fibonacci-sequence b/Lang/Ballerina/Fibonacci-sequence deleted file mode 120000 index 96031e7d01..0000000000 --- a/Lang/Ballerina/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Filter b/Lang/Ballerina/Filter deleted file mode 120000 index b57b5e74be..0000000000 --- a/Lang/Ballerina/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Find-limit-of-recursion b/Lang/Ballerina/Find-limit-of-recursion deleted file mode 120000 index 0c9c45aca0..0000000000 --- a/Lang/Ballerina/Find-limit-of-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-limit-of-recursion/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Fivenum b/Lang/Ballerina/Fivenum deleted file mode 120000 index 0df90aeb78..0000000000 --- a/Lang/Ballerina/Fivenum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fivenum/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/FizzBuzz b/Lang/Ballerina/FizzBuzz deleted file mode 120000 index e7f3aa8019..0000000000 --- a/Lang/Ballerina/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Floyds-triangle b/Lang/Ballerina/Floyds-triangle deleted file mode 120000 index 524ef8d9d5..0000000000 --- a/Lang/Ballerina/Floyds-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyds-triangle/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Four-bit-adder b/Lang/Ballerina/Four-bit-adder deleted file mode 120000 index da1ccb0292..0000000000 --- a/Lang/Ballerina/Four-bit-adder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Four-bit-adder/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Function-definition b/Lang/Ballerina/Function-definition deleted file mode 120000 index aad5e07c0c..0000000000 --- a/Lang/Ballerina/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Gapful-numbers b/Lang/Ballerina/Gapful-numbers deleted file mode 120000 index 16bb3670f6..0000000000 --- a/Lang/Ballerina/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Greatest-common-divisor b/Lang/Ballerina/Greatest-common-divisor deleted file mode 120000 index 0f657f13a6..0000000000 --- a/Lang/Ballerina/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Greatest-element-of-a-list b/Lang/Ballerina/Greatest-element-of-a-list deleted file mode 120000 index 579d0c3022..0000000000 --- a/Lang/Ballerina/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Greatest-subsequential-sum b/Lang/Ballerina/Greatest-subsequential-sum deleted file mode 120000 index edc1a686d7..0000000000 --- a/Lang/Ballerina/Greatest-subsequential-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-subsequential-sum/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Hailstone-sequence b/Lang/Ballerina/Hailstone-sequence deleted file mode 120000 index 41dfb14066..0000000000 --- a/Lang/Ballerina/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Hello-world-Graphical b/Lang/Ballerina/Hello-world-Graphical deleted file mode 120000 index 4e2e7e9224..0000000000 --- a/Lang/Ballerina/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Hello-world-Newbie b/Lang/Ballerina/Hello-world-Newbie deleted file mode 120000 index b59c1b36e9..0000000000 --- a/Lang/Ballerina/Hello-world-Newbie +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newbie/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Hello-world-Newline-omission b/Lang/Ballerina/Hello-world-Newline-omission deleted file mode 120000 index 1016c5553e..0000000000 --- a/Lang/Ballerina/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Hello-world-Standard-error b/Lang/Ballerina/Hello-world-Standard-error deleted file mode 120000 index c4921dce1f..0000000000 --- a/Lang/Ballerina/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Increment-a-numerical-string b/Lang/Ballerina/Increment-a-numerical-string deleted file mode 120000 index 712faa77bf..0000000000 --- a/Lang/Ballerina/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Integer-comparison b/Lang/Ballerina/Integer-comparison deleted file mode 120000 index 8563637dab..0000000000 --- a/Lang/Ballerina/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Integer-sequence b/Lang/Ballerina/Integer-sequence deleted file mode 120000 index 06b95f33f5..0000000000 --- a/Lang/Ballerina/Integer-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-sequence/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Levenshtein-distance b/Lang/Ballerina/Levenshtein-distance deleted file mode 120000 index 4824e03354..0000000000 --- a/Lang/Ballerina/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Logical-operations b/Lang/Ballerina/Logical-operations deleted file mode 120000 index 06b4043fcb..0000000000 --- a/Lang/Ballerina/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loop-over-multiple-arrays-simultaneously b/Lang/Ballerina/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index 9b68d094d5..0000000000 --- a/Lang/Ballerina/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Break b/Lang/Ballerina/Loops-Break deleted file mode 120000 index 6ab612b087..0000000000 --- a/Lang/Ballerina/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Continue b/Lang/Ballerina/Loops-Continue deleted file mode 120000 index 175be123b9..0000000000 --- a/Lang/Ballerina/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Do-while b/Lang/Ballerina/Loops-Do-while deleted file mode 120000 index b90c6b3171..0000000000 --- a/Lang/Ballerina/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Downward-for b/Lang/Ballerina/Loops-Downward-for deleted file mode 120000 index e977389f54..0000000000 --- a/Lang/Ballerina/Loops-Downward-for +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Downward-for/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-For b/Lang/Ballerina/Loops-For deleted file mode 120000 index 8ad2b8fd0c..0000000000 --- a/Lang/Ballerina/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-For-with-a-specified-step b/Lang/Ballerina/Loops-For-with-a-specified-step deleted file mode 120000 index cc892dc7f2..0000000000 --- a/Lang/Ballerina/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Foreach b/Lang/Ballerina/Loops-Foreach deleted file mode 120000 index f819fadabe..0000000000 --- a/Lang/Ballerina/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Increment-loop-index-within-loop-body b/Lang/Ballerina/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index 1c9b81a58a..0000000000 --- a/Lang/Ballerina/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Infinite b/Lang/Ballerina/Loops-Infinite deleted file mode 120000 index 312369ce48..0000000000 --- a/Lang/Ballerina/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-N-plus-one-half b/Lang/Ballerina/Loops-N-plus-one-half deleted file mode 120000 index 220ecbad7f..0000000000 --- a/Lang/Ballerina/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Nested b/Lang/Ballerina/Loops-Nested deleted file mode 120000 index f32c9a3c17..0000000000 --- a/Lang/Ballerina/Loops-Nested +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Nested/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-With-multiple-ranges b/Lang/Ballerina/Loops-With-multiple-ranges deleted file mode 120000 index 2fad29a9f9..0000000000 --- a/Lang/Ballerina/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Loops-Wrong-ranges b/Lang/Ballerina/Loops-Wrong-ranges deleted file mode 120000 index 6c8ada2aa7..0000000000 --- a/Lang/Ballerina/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Palindrome-detection b/Lang/Ballerina/Palindrome-detection deleted file mode 120000 index 981d11f5cd..0000000000 --- a/Lang/Ballerina/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Repeat-a-string b/Lang/Ballerina/Repeat-a-string deleted file mode 120000 index 83134ceac0..0000000000 --- a/Lang/Ballerina/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Reverse-a-string b/Lang/Ballerina/Reverse-a-string deleted file mode 120000 index f4e8e73220..0000000000 --- a/Lang/Ballerina/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Rot-13 b/Lang/Ballerina/Rot-13 deleted file mode 120000 index d33ecacc03..0000000000 --- a/Lang/Ballerina/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Sieve-of-Eratosthenes b/Lang/Ballerina/Sieve-of-Eratosthenes deleted file mode 120000 index 4cae2a9d5e..0000000000 --- a/Lang/Ballerina/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Stack b/Lang/Ballerina/Stack deleted file mode 120000 index e073045735..0000000000 --- a/Lang/Ballerina/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Statistics-Basic b/Lang/Ballerina/Statistics-Basic deleted file mode 120000 index 7ef892b782..0000000000 --- a/Lang/Ballerina/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/String-case b/Lang/Ballerina/String-case deleted file mode 120000 index 091d633ac8..0000000000 --- a/Lang/Ballerina/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/String-concatenation b/Lang/Ballerina/String-concatenation deleted file mode 120000 index a5a366085e..0000000000 --- a/Lang/Ballerina/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/String-length b/Lang/Ballerina/String-length deleted file mode 120000 index 0cdb126aa0..0000000000 --- a/Lang/Ballerina/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Sum-and-product-of-an-array b/Lang/Ballerina/Sum-and-product-of-an-array deleted file mode 120000 index a5ba732cde..0000000000 --- a/Lang/Ballerina/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Sum-of-a-series b/Lang/Ballerina/Sum-of-a-series deleted file mode 120000 index 27da1c4b06..0000000000 --- a/Lang/Ballerina/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Sum-of-squares b/Lang/Ballerina/Sum-of-squares deleted file mode 120000 index 9f1e366796..0000000000 --- a/Lang/Ballerina/Sum-of-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-squares/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Tokenize-a-string b/Lang/Ballerina/Tokenize-a-string deleted file mode 120000 index d9a64c3a3e..0000000000 --- a/Lang/Ballerina/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Towers-of-Hanoi b/Lang/Ballerina/Towers-of-Hanoi deleted file mode 120000 index 81bf7985bd..0000000000 --- a/Lang/Ballerina/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Truncatable-primes b/Lang/Ballerina/Truncatable-primes deleted file mode 120000 index 044dcb5d58..0000000000 --- a/Lang/Ballerina/Truncatable-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncatable-primes/Ballerina \ No newline at end of file diff --git a/Lang/Ballerina/Unicode-variable-names b/Lang/Ballerina/Unicode-variable-names deleted file mode 120000 index 7f61255815..0000000000 --- a/Lang/Ballerina/Unicode-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-variable-names/Ballerina \ No newline at end of file diff --git a/Lang/Basic09/00-LANG.txt b/Lang/Basic09/00-LANG.txt index fa600ca16b..16853881ce 100644 --- a/Lang/Basic09/00-LANG.txt +++ b/Lang/Basic09/00-LANG.txt @@ -1,3 +1 @@ -{{language|Basic09}} -{{implementation|BASIC}} -Basic09 is a dialect of BASIC created by Microware Systems Corporation in 1978 for use on the OS-9 operating system designed for the Motorola 6809 microporcessor. There is a version for OS-9/68000, "Microware BASIC", identical save that the INTEGER type is a four-byte signed integer instead of two-byte and REAL is IEEE 754 double precision rather than the five-byte format in the original version. \ No newline at end of file +{{language|Basic09}}Basic09 is a dialect of BASIC created by Microware Systems Corporation in 1978 for use on the OS-9 operating system designed for the Motorola 6809 microporcessor. There is a version for OS-9/68000, "Microware BASIC", identical save that the INTEGER type is a four-byte signed integer instead of two-byte and REAL is IEEE 754 double precision rather than the five-byte format in the original version. \ No newline at end of file diff --git a/Lang/Batch-File/00-LANG.txt b/Lang/Batch-File/00-LANG.txt index 06b0c85598..1bcc82760d 100644 --- a/Lang/Batch-File/00-LANG.txt +++ b/Lang/Batch-File/00-LANG.txt @@ -1,3 +1,3 @@ -{{language|Batch File}}'''Batch file''', sometimes just called Batch, is the common name for the scripting language for [[Microsoft]] command line shells, such as COMMAND.COM (in [[MS-DOS]]), and CMD.EXE (in Windows). They typically have either the .BAT or .CMD extension. Due to the association of batch files with MS-DOS in the public consciousness, sometimes this language is called the MS-DOS programming language even when used on modern versions of Windows, though this usage of the term is not technically correct. +{{language|Batch File}}'''Batch files''' are the scripting languages for [[Microsoft]] command line shells, such as [[MS-DOS]], COMMAND.EXE, and CMD.EXE. They typically have either the .BAT or .CMD extension. The "batch files" written in the Batch File language are not to be confused with the "bash scripts" written in the [[bash | bash programming language]] for the [[UNIX Shell]]. \ No newline at end of file diff --git a/Lang/Batch-File/Base64-decode-data b/Lang/Batch-File/Base64-decode-data deleted file mode 120000 index ec2f53b5db..0000000000 --- a/Lang/Batch-File/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Call-a-foreign-language-function b/Lang/Batch-File/Call-a-foreign-language-function deleted file mode 120000 index 82bd97e4ca..0000000000 --- a/Lang/Batch-File/Call-a-foreign-language-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-foreign-language-function/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Check-input-device-is-a-terminal b/Lang/Batch-File/Check-input-device-is-a-terminal deleted file mode 120000 index e3cbbd272b..0000000000 --- a/Lang/Batch-File/Check-input-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-input-device-is-a-terminal/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Check-output-device-is-a-terminal b/Lang/Batch-File/Check-output-device-is-a-terminal deleted file mode 120000 index 3d54ec8254..0000000000 --- a/Lang/Batch-File/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Chinese-zodiac b/Lang/Batch-File/Chinese-zodiac deleted file mode 120000 index c2c7ae27f9..0000000000 --- a/Lang/Batch-File/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Copy-stdin-to-stdout b/Lang/Batch-File/Copy-stdin-to-stdout deleted file mode 120000 index ec25d70662..0000000000 --- a/Lang/Batch-File/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Exponentiation-operator b/Lang/Batch-File/Exponentiation-operator deleted file mode 120000 index 93dda3ab18..0000000000 --- a/Lang/Batch-File/Exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-operator/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Flatten-a-list b/Lang/Batch-File/Flatten-a-list deleted file mode 120000 index bdac6d0d38..0000000000 --- a/Lang/Batch-File/Flatten-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flatten-a-list/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Handle-a-signal b/Lang/Batch-File/Handle-a-signal deleted file mode 120000 index 5dfc7c6a7d..0000000000 --- a/Lang/Batch-File/Handle-a-signal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Handle-a-signal/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Hello-world-Web-server b/Lang/Batch-File/Hello-world-Web-server deleted file mode 120000 index ef5c7e0f66..0000000000 --- a/Lang/Batch-File/Hello-world-Web-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Web-server/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Input-loop b/Lang/Batch-File/Input-loop new file mode 120000 index 0000000000..a2a4a9b473 --- /dev/null +++ b/Lang/Batch-File/Input-loop @@ -0,0 +1 @@ +../../Task/Input-loop/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Keyboard-input-Keypress-check b/Lang/Batch-File/Keyboard-input-Keypress-check deleted file mode 120000 index 5711a16a1c..0000000000 --- a/Lang/Batch-File/Keyboard-input-Keypress-check +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Keypress-check/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Long-year b/Lang/Batch-File/Long-year deleted file mode 120000 index 2a90ddff12..0000000000 --- a/Lang/Batch-File/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Make-directory-path b/Lang/Batch-File/Make-directory-path deleted file mode 120000 index 057c573752..0000000000 --- a/Lang/Batch-File/Make-directory-path +++ /dev/null @@ -1 +0,0 @@ -../../Task/Make-directory-path/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Primality-by-trial-division b/Lang/Batch-File/Primality-by-trial-division deleted file mode 120000 index 5a253da7c4..0000000000 --- a/Lang/Batch-File/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Read-a-configuration-file b/Lang/Batch-File/Read-a-configuration-file deleted file mode 120000 index 163a19758c..0000000000 --- a/Lang/Batch-File/Read-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-configuration-file/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Read-entire-file b/Lang/Batch-File/Read-entire-file deleted file mode 120000 index a4d22dbb49..0000000000 --- a/Lang/Batch-File/Read-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-entire-file/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/SHA-1 b/Lang/Batch-File/SHA-1 deleted file mode 120000 index 7b80d0565c..0000000000 --- a/Lang/Batch-File/SHA-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-1/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/SHA-256 b/Lang/Batch-File/SHA-256 deleted file mode 120000 index 88132ba441..0000000000 --- a/Lang/Batch-File/SHA-256 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-256/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Simple-windowed-application b/Lang/Batch-File/Simple-windowed-application deleted file mode 120000 index 98ffbccd11..0000000000 --- a/Lang/Batch-File/Simple-windowed-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-windowed-application/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Sort-an-integer-array b/Lang/Batch-File/Sort-an-integer-array deleted file mode 120000 index 9e7fd40b38..0000000000 --- a/Lang/Batch-File/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Strip-a-set-of-characters-from-a-string b/Lang/Batch-File/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index bb3a4f27fc..0000000000 --- a/Lang/Batch-File/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Temperature-conversion b/Lang/Batch-File/Temperature-conversion deleted file mode 120000 index a928fb35a8..0000000000 --- a/Lang/Batch-File/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Terminal-control-Hiding-the-cursor b/Lang/Batch-File/Terminal-control-Hiding-the-cursor deleted file mode 120000 index 55e8dcde29..0000000000 --- a/Lang/Batch-File/Terminal-control-Hiding-the-cursor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Hiding-the-cursor/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Terminal-control-Preserve-screen b/Lang/Batch-File/Terminal-control-Preserve-screen deleted file mode 120000 index 8bc69bb473..0000000000 --- a/Lang/Batch-File/Terminal-control-Preserve-screen +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Preserve-screen/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Terminal-control-Unicode-output b/Lang/Batch-File/Terminal-control-Unicode-output deleted file mode 120000 index d9cf45a55e..0000000000 --- a/Lang/Batch-File/Terminal-control-Unicode-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Unicode-output/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Truncate-a-file b/Lang/Batch-File/Truncate-a-file deleted file mode 120000 index 18bcf16da0..0000000000 --- a/Lang/Batch-File/Truncate-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncate-a-file/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/URL-decoding b/Lang/Batch-File/URL-decoding deleted file mode 120000 index 4081a1f375..0000000000 --- a/Lang/Batch-File/URL-decoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-decoding/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/URL-encoding b/Lang/Batch-File/URL-encoding deleted file mode 120000 index 5609bac01d..0000000000 --- a/Lang/Batch-File/URL-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-encoding/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Unicode-variable-names b/Lang/Batch-File/Unicode-variable-names deleted file mode 120000 index 04bbb2a08c..0000000000 --- a/Lang/Batch-File/Unicode-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-variable-names/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Unix-ls b/Lang/Batch-File/Unix-ls deleted file mode 120000 index d789240aba..0000000000 --- a/Lang/Batch-File/Unix-ls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unix-ls/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Window-creation b/Lang/Batch-File/Window-creation deleted file mode 120000 index 733ac1868e..0000000000 --- a/Lang/Batch-File/Window-creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-creation/Batch-File \ No newline at end of file diff --git a/Lang/Batch-File/Write-entire-file b/Lang/Batch-File/Write-entire-file deleted file mode 120000 index ace14aef52..0000000000 --- a/Lang/Batch-File/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/Batch-File \ No newline at end of file diff --git a/Lang/Bc/Anti-primes b/Lang/Bc/Anti-primes deleted file mode 120000 index 3d900bc4e9..0000000000 --- a/Lang/Bc/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Bc \ No newline at end of file diff --git a/Lang/Bc/Arithmetic-derivative b/Lang/Bc/Arithmetic-derivative deleted file mode 120000 index 3ff888839e..0000000000 --- a/Lang/Bc/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Bc \ No newline at end of file diff --git a/Lang/Bc/Department-numbers b/Lang/Bc/Department-numbers deleted file mode 120000 index 0e2c9bd91f..0000000000 --- a/Lang/Bc/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/Bc \ No newline at end of file diff --git a/Lang/Bc/Fairshare-between-two-and-more b/Lang/Bc/Fairshare-between-two-and-more deleted file mode 120000 index f5c1a3523e..0000000000 --- a/Lang/Bc/Fairshare-between-two-and-more +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fairshare-between-two-and-more/Bc \ No newline at end of file diff --git a/Lang/Bc/Miller-Rabin-primality-test b/Lang/Bc/Miller-Rabin-primality-test new file mode 120000 index 0000000000..1ae2fd8406 --- /dev/null +++ b/Lang/Bc/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Bc \ No newline at end of file diff --git a/Lang/Bc/Sieve-of-Eratosthenes b/Lang/Bc/Sieve-of-Eratosthenes deleted file mode 120000 index de34a684a4..0000000000 --- a/Lang/Bc/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/Bc \ No newline at end of file diff --git a/Lang/Bc/Variables b/Lang/Bc/Variables deleted file mode 120000 index 03f47bea63..0000000000 --- a/Lang/Bc/Variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variables/Bc \ No newline at end of file diff --git a/Lang/Beeswax/00-LANG.txt b/Lang/Beeswax/00-LANG.txt index c131bf7731..bea56d7b6b 100644 --- a/Lang/Beeswax/00-LANG.txt +++ b/Lang/Beeswax/00-LANG.txt @@ -25,7 +25,7 @@ All data in the local and global stacks are unsigned 64-bit integers, output as == More information == -* [http://esolangs.org/wiki/beeswax Esoteric languages wiki entry] +* [[eso:Beeswax|Esoteric languages wiki entry]] == Reference implementation, example programs and complete language specification == diff --git a/Lang/Berkeley-Logo/00-LANG.txt b/Lang/Berkeley-Logo/00-LANG.txt deleted file mode 100644 index 06b91b5045..0000000000 --- a/Lang/Berkeley-Logo/00-LANG.txt +++ /dev/null @@ -1,8 +0,0 @@ -{{language|Berkeley Logo}} -{{language programming paradigm|Procedural}} -{{implementation|Logo}} -'''Berkeley Logo''' (or '''UCBLogo''') is a portable implementation of the Logo language, maintained by Brian Harvey. He has also written a series of university textbooks using this language, ''Computer Science Logo Style''. - -==External links== -* [http://www.cs.berkeley.edu/~bh/logo.html Home page] -* [https://github.com/jrincayc/ucblogo-code further UCBLogo development] \ No newline at end of file diff --git a/Lang/Berkeley-Logo/00-META.yaml b/Lang/Berkeley-Logo/00-META.yaml deleted file mode 100644 index 9eabccce73..0000000000 --- a/Lang/Berkeley-Logo/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Berkeley_Logo diff --git a/Lang/Berkeley-Logo/Abundant-deficient-and-perfect-number-classifications b/Lang/Berkeley-Logo/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index 04fb2b777b..0000000000 --- a/Lang/Berkeley-Logo/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Berkeley-Logo \ No newline at end of file diff --git a/Lang/Berkeley-Logo/Associative-array-Creation b/Lang/Berkeley-Logo/Associative-array-Creation deleted file mode 120000 index 4d2050642e..0000000000 --- a/Lang/Berkeley-Logo/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Berkeley-Logo \ No newline at end of file diff --git a/Lang/Berkeley-Logo/Babbage-problem b/Lang/Berkeley-Logo/Babbage-problem deleted file mode 120000 index aa1e4e41aa..0000000000 --- a/Lang/Berkeley-Logo/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/Berkeley-Logo \ No newline at end of file diff --git a/Lang/Berkeley-Logo/Bell-numbers b/Lang/Berkeley-Logo/Bell-numbers deleted file mode 120000 index 77a9bcb26c..0000000000 --- a/Lang/Berkeley-Logo/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Berkeley-Logo \ No newline at end of file diff --git a/Lang/Berkeley-Logo/Formatted-numeric-output b/Lang/Berkeley-Logo/Formatted-numeric-output deleted file mode 120000 index 85a340c7e0..0000000000 --- a/Lang/Berkeley-Logo/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/Berkeley-Logo \ No newline at end of file diff --git a/Lang/Binary-Lambda-Calculus/00-LANG.txt b/Lang/Binary-Lambda-Calculus/00-LANG.txt index 694f9a9437..3f502204f1 100644 --- a/Lang/Binary-Lambda-Calculus/00-LANG.txt +++ b/Lang/Binary-Lambda-Calculus/00-LANG.txt @@ -5,16 +5,7 @@ }} {{language programming paradigm|functional}} '''Binary Lambda Calculus''' is a minimal, pure, functional, esoteric language based on lambda calculus. [[provides::Capability:First class functions| ]] - ==External links== * https://tromp.github.io/cl/cl.html * https://www.ioccc.org/2012/tromp/hint.html -* https://gist.github.com/tromp/86b3184f852f65bfb814e3ab0987d861 - -Some implementations of BLC: -* [https://www.ioccc.org/2012/tromp/hint.html original tromp's implementation] for IOCCC, in pure ANSI C -* [https://github.com/tromp/AIT tromp's AIT], a project utilizing BLC for Information Theory research. Also includes a Haskell->BLC compiler and several other implementations -* [https://codeberg.org/aartaka/cl-blc aartaka's cl-blc], implementing BLC in Lisp - -==To do== -[[Tasks not implemented in Binary Lambda Calculus]] \ No newline at end of file +* https://gist.github.com/tromp/86b3184f852f65bfb814e3ab0987d861 \ No newline at end of file diff --git a/Lang/Binary-Lambda-Calculus/A+B b/Lang/Binary-Lambda-Calculus/A+B deleted file mode 120000 index 1a7c10c298..0000000000 --- a/Lang/Binary-Lambda-Calculus/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Binary-Lambda-Calculus \ No newline at end of file diff --git a/Lang/Binary-Lambda-Calculus/Binary-digits b/Lang/Binary-Lambda-Calculus/Binary-digits deleted file mode 120000 index f74ad898bd..0000000000 --- a/Lang/Binary-Lambda-Calculus/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/Binary-Lambda-Calculus \ No newline at end of file diff --git a/Lang/Binary-Lambda-Calculus/Church-numerals b/Lang/Binary-Lambda-Calculus/Church-numerals deleted file mode 120000 index 45f7ab14bd..0000000000 --- a/Lang/Binary-Lambda-Calculus/Church-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Church-numerals/Binary-Lambda-Calculus \ No newline at end of file diff --git a/Lang/Binary-Lambda-Calculus/Ethiopian-multiplication b/Lang/Binary-Lambda-Calculus/Ethiopian-multiplication deleted file mode 120000 index 45465fad0c..0000000000 --- a/Lang/Binary-Lambda-Calculus/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Binary-Lambda-Calculus \ No newline at end of file diff --git a/Lang/Binary-Lambda-Calculus/Hailstone-sequence b/Lang/Binary-Lambda-Calculus/Hailstone-sequence deleted file mode 120000 index 8bb334bdb3..0000000000 --- a/Lang/Binary-Lambda-Calculus/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/Binary-Lambda-Calculus \ No newline at end of file diff --git a/Lang/Binary-Lambda-Calculus/Sorting-algorithms-Merge-sort b/Lang/Binary-Lambda-Calculus/Sorting-algorithms-Merge-sort deleted file mode 120000 index 6a9a8bf4e0..0000000000 --- a/Lang/Binary-Lambda-Calculus/Sorting-algorithms-Merge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Merge-sort/Binary-Lambda-Calculus \ No newline at end of file diff --git a/Lang/Blade/00-LANG.txt b/Lang/Blade/00-LANG.txt index 71d6c9cdba..f18c210bc3 100644 --- a/Lang/Blade/00-LANG.txt +++ b/Lang/Blade/00-LANG.txt @@ -6,13 +6,25 @@ |parampass=value |LCT=yes}}{{language programming paradigm|Object-oriented}}{{language programming paradigm|functional}} -'''Blade''' is a modern general-purpose programming language focused on enterprise Web, IoT, and secure application development. '''Blade''' offers a comprehensive set of tools and libraries out of the box leading to reduced reliance on third-party packages. +'''Blade''' is a simple, fast, clean and dynamic language that allows you to develop complex applications quickly. Blade emphasises algorithm over syntax and for this reason, it has a very small but powerful syntax set with a very natural feel. -'''Blade''' comes equipped with an integrated package management system, simplifying the management of both internal and external dependencies and a self-hostable repository server making it ideal for private organisational and personal use. Its intuitive syntax and gentle learning curve ensure an accessible experience for developers of all skill levels. Leveraging the best features from JavaScript, Python, Ruby, and Dart, '''Blade''' provides a familiar and robust ecosystem that enables developers to harness the strengths of these languages effortlessly. +If you’ve ever had experience with a compiled language (e.g. [[C]]/[[C++]], [[Java]], etc), then one thing you’ll quickly notice (at least I did) was how much the whole process of write-compile-run-debug can be tedious and get in the way of creative programming and sometimes you even forget that mind-blowing algorithm you were going to write and take over the world in the whole process of compiling. -While '''Blade''' focuses on Web and IoT, it is also great for general software development. +Sometimes, you just want to automate a few tasks, for example, I have a simple program to always remind me to get away from my laptop and eat something (you know how it is) and yet another one to suggest food for me. Do you find yourself needing this often? Do you know why you haven’t written it? Get out of your head, you are writing a compiled language! Compiling takes longer than the time it will take you to convince yourself that you need to eat. + +At other times, you have written this amazing program and you want users to be able to control it using a simple scripting language. I know… I know… there are many interpreted languages out there that will do the job just fine. Well… you still have one problem. Your users aren’t going to remember all the crazy going on in many of them (Yes [[Lua]]! I’m staring at you. What you gonna do about it?) + +Other times, we kind of find a very good solution to our problem in languages like [[Python]] (I must confess, even '''Blade''' did learn a lot of things from it), but the structure of such languages usually creates a new overhead in writing complex programs. It’s really difficult keeping a tab of indentations in such languages especially when you are not in a GUI IDE environment. I tried to work [[Python]] in nano, but man… it wasn’t easy. + +If you are feeling me, then Blade is just right for you. + +Blade is a simple language that has tried very much to learn from the mistake and successes of its predecessors. + +Blade is interpreted and simple like [[Python]] but with a more generic [[C]]-like syntax and a ridiculously simple Object-orientation similar to [[Dart]] and the granularity of [[JavaScript]] while still maintaining a very minimal syntax and keywords when compared to all of them. + +'''Blade is designed to be a memorizable language and the entire “language” can be learned in one sitting. However, Blade is as complete and powerful as any language can be and can be applied in the field of web, mobile, desktop, scientific, academic and research engineering to mention a few.''' ==Links== -* [https://bladelang.org https://bladelang.org] +* [https://bladelang.com https://bladelang.com] * [https://github.com/blade-lang/blade https://github.com/blade-lang/blade] -* [https://bladelang.org/quick-learn.html Quick Language Introduction] \ No newline at end of file +* [https://bladelang.com/quick-learn.html Quick Language Introduction] \ No newline at end of file diff --git a/Lang/BlooP/00-LANG.txt b/Lang/BlooP/00-LANG.txt index d0fc3b449f..61490d18ec 100644 --- a/Lang/BlooP/00-LANG.txt +++ b/Lang/BlooP/00-LANG.txt @@ -20,7 +20,7 @@ The best way to explain BlooP is really just to look at some examples, so here a Find the factorial of N: - + DEFINE PROCEDURE FACTORIAL [N]: BLOCK 0: BEGIN OUTPUT <= 1; @@ -31,11 +31,11 @@ BLOCK 0: BEGIN CELL(0) <= CELL(0) + 1; BLOCK 1: END; BLOCK 0: END. - + + - subtraction (this is the only way to do it, since it must be defined in terms of addition): - + DEFINE PROCEDURE MINUS [M,N]: BLOCK 0: BEGIN OUTPUT <= 0; @@ -48,12 +48,12 @@ BLOCK 0: BEGIN OUTPUT <= OUTPUT + 1; BLOCK 1: END; BLOCK 0: END. - + Nim game in BlooP. Since user input is not possible in most implementations, this version uses a procedure which takes 3 numbers. - + DEFINE PROCEDURE ''DIVIDE'' [A,B]: BLOCK 0: BEGIN IF A < B, THEN: @@ -145,7 +145,7 @@ BLOCK 0: BEGIN BLOCK 0: END. PLAY_GAME [2,1,1]; - + {{out}}
diff --git a/Lang/BootBASIC/Empty-program b/Lang/BootBASIC/Empty-program
new file mode 120000
index 0000000000..5aaffbd057
--- /dev/null
+++ b/Lang/BootBASIC/Empty-program
@@ -0,0 +1 @@
+../../Task/Empty-program/BootBASIC
\ No newline at end of file
diff --git a/Lang/Bracmat/Miller-Rabin-primality-test b/Lang/Bracmat/Miller-Rabin-primality-test
new file mode 120000
index 0000000000..7c953943cd
--- /dev/null
+++ b/Lang/Bracmat/Miller-Rabin-primality-test
@@ -0,0 +1 @@
+../../Task/Miller-Rabin-primality-test/Bracmat
\ No newline at end of file
diff --git a/Lang/Brainf---/00-LANG.txt b/Lang/Brainf---/00-LANG.txt
index d9ca931bf4..7b702b4d45 100644
--- a/Lang/Brainf---/00-LANG.txt
+++ b/Lang/Brainf---/00-LANG.txt
@@ -63,10 +63,10 @@ BUT due to vehement opposition to the name [http://esolangs.org/wiki/Cupid vario
 ==See also==
 * [[Rosetta Code:Brainf***]]  ( why some people call it BF :)
 * [[RCBF]] - BF interpreters as a Rosetta Code task
-* [https://esolangs.org/wiki/brainfuck_algorithms brainf*** algorithms]
+
 ==Citations==
 
-* [https://esolangs.org/wiki/Brainfuck Esoteric languages wiki entry]
+* [[eso:Brainfuck|Esoteric languages wiki entry]]
 *[[wp:Brainfuck|Wikipedia entry on Brainf***]]
 * [http://dmoz.org/Computers/Programming/Languages/Brainfuck/ DMOZ Brainf*** category]
 * [http://www.iwriteiam.nl/Ha_BF.html Brainf*** tutorial]
diff --git a/Lang/Brainf---/Loops-While b/Lang/Brainf---/Loops-While
deleted file mode 120000
index 057717ea5a..0000000000
--- a/Lang/Brainf---/Loops-While
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Loops-While/Brainf---
\ No newline at end of file
diff --git a/Lang/Bruijn/Harmonic-series b/Lang/Bruijn/Harmonic-series
deleted file mode 120000
index b39ae4ae88..0000000000
--- a/Lang/Bruijn/Harmonic-series
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Harmonic-series/Bruijn
\ No newline at end of file
diff --git a/Lang/Bruijn/Towers-of-Hanoi b/Lang/Bruijn/Towers-of-Hanoi
deleted file mode 120000
index 96dafe6af8..0000000000
--- a/Lang/Bruijn/Towers-of-Hanoi
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Towers-of-Hanoi/Bruijn
\ No newline at end of file
diff --git a/Lang/C++/Add-a-variable-to-a-class-instance-at-runtime b/Lang/C++/Add-a-variable-to-a-class-instance-at-runtime
deleted file mode 120000
index 61888079c6..0000000000
--- a/Lang/C++/Add-a-variable-to-a-class-instance-at-runtime
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Add-a-variable-to-a-class-instance-at-runtime/C++
\ No newline at end of file
diff --git a/Lang/C++/Bioinformatics-base-count b/Lang/C++/Bioinformatics-base-count
new file mode 120000
index 0000000000..e0584bb6b7
--- /dev/null
+++ b/Lang/C++/Bioinformatics-base-count
@@ -0,0 +1 @@
+../../Task/Bioinformatics-base-count/C++
\ No newline at end of file
diff --git a/Lang/C++/Bitcoin-address-validation b/Lang/C++/Bitcoin-address-validation
deleted file mode 120000
index fdb6fa9bf8..0000000000
--- a/Lang/C++/Bitcoin-address-validation
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Bitcoin-address-validation/C++
\ No newline at end of file
diff --git a/Lang/C++/Bitcoin-public-point-to-address b/Lang/C++/Bitcoin-public-point-to-address
deleted file mode 120000
index 1229c8b30f..0000000000
--- a/Lang/C++/Bitcoin-public-point-to-address
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Bitcoin-public-point-to-address/C++
\ No newline at end of file
diff --git a/Lang/C++/Bitwise-IO b/Lang/C++/Bitwise-IO
deleted file mode 120000
index 0612736bad..0000000000
--- a/Lang/C++/Bitwise-IO
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Bitwise-IO/C++
\ No newline at end of file
diff --git a/Lang/C++/Catmull-Clark-subdivision-surface b/Lang/C++/Catmull-Clark-subdivision-surface
deleted file mode 120000
index dbaa0ac83b..0000000000
--- a/Lang/C++/Catmull-Clark-subdivision-surface
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Catmull-Clark-subdivision-surface/C++
\ No newline at end of file
diff --git a/Lang/C++/Commatizing-numbers b/Lang/C++/Commatizing-numbers
deleted file mode 120000
index 96b27f445d..0000000000
--- a/Lang/C++/Commatizing-numbers
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Commatizing-numbers/C++
\ No newline at end of file
diff --git a/Lang/C++/Compare-sorting-algorithms-performance b/Lang/C++/Compare-sorting-algorithms-performance
deleted file mode 120000
index 8616fdb726..0000000000
--- a/Lang/C++/Compare-sorting-algorithms-performance
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Compare-sorting-algorithms-performance/C++
\ No newline at end of file
diff --git a/Lang/C++/Compiler-virtual-machine-interpreter b/Lang/C++/Compiler-virtual-machine-interpreter
deleted file mode 120000
index 94f3cd637b..0000000000
--- a/Lang/C++/Compiler-virtual-machine-interpreter
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Compiler-virtual-machine-interpreter/C++
\ No newline at end of file
diff --git a/Lang/C++/Currency b/Lang/C++/Currency
deleted file mode 120000
index ae0e8d6190..0000000000
--- a/Lang/C++/Currency
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Currency/C++
\ No newline at end of file
diff --git a/Lang/C++/Deconvolution-2D+ b/Lang/C++/Deconvolution-2D+
deleted file mode 120000
index dba078e8e0..0000000000
--- a/Lang/C++/Deconvolution-2D+
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Deconvolution-2D+/C++
\ No newline at end of file
diff --git a/Lang/C++/Documentation b/Lang/C++/Documentation
deleted file mode 120000
index dd69dde201..0000000000
--- a/Lang/C++/Documentation
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Documentation/C++
\ No newline at end of file
diff --git a/Lang/C++/Dominoes b/Lang/C++/Dominoes
deleted file mode 120000
index 5c79b6947b..0000000000
--- a/Lang/C++/Dominoes
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Dominoes/C++
\ No newline at end of file
diff --git a/Lang/C++/Euclid-Mullin-sequence b/Lang/C++/Euclid-Mullin-sequence
deleted file mode 120000
index f743f51e54..0000000000
--- a/Lang/C++/Euclid-Mullin-sequence
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Euclid-Mullin-sequence/C++
\ No newline at end of file
diff --git a/Lang/C++/Extend-your-language b/Lang/C++/Extend-your-language
deleted file mode 120000
index da1eb035c9..0000000000
--- a/Lang/C++/Extend-your-language
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Extend-your-language/C++
\ No newline at end of file
diff --git a/Lang/C++/Extreme-floating-point-values b/Lang/C++/Extreme-floating-point-values
deleted file mode 120000
index 36dd74b460..0000000000
--- a/Lang/C++/Extreme-floating-point-values
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Extreme-floating-point-values/C++
\ No newline at end of file
diff --git a/Lang/C++/Factorial-base-numbers-indexing-permutations-of-a-collection b/Lang/C++/Factorial-base-numbers-indexing-permutations-of-a-collection
deleted file mode 120000
index 9b984d5ea4..0000000000
--- a/Lang/C++/Factorial-base-numbers-indexing-permutations-of-a-collection
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Factorial-base-numbers-indexing-permutations-of-a-collection/C++
\ No newline at end of file
diff --git a/Lang/C++/First-class-environments b/Lang/C++/First-class-environments
deleted file mode 120000
index 652816150b..0000000000
--- a/Lang/C++/First-class-environments
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/First-class-environments/C++
\ No newline at end of file
diff --git a/Lang/C++/French-Republican-calendar b/Lang/C++/French-Republican-calendar
deleted file mode 120000
index b361af00f6..0000000000
--- a/Lang/C++/French-Republican-calendar
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/French-Republican-calendar/C++
\ No newline at end of file
diff --git a/Lang/C++/Functional-coverage-tree b/Lang/C++/Functional-coverage-tree
deleted file mode 120000
index 06e1a4bfaf..0000000000
--- a/Lang/C++/Functional-coverage-tree
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Functional-coverage-tree/C++
\ No newline at end of file
diff --git a/Lang/C++/Im-a-software-engineer-get-me-out-of-here b/Lang/C++/Im-a-software-engineer-get-me-out-of-here
deleted file mode 120000
index 7c9de1375f..0000000000
--- a/Lang/C++/Im-a-software-engineer-get-me-out-of-here
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Im-a-software-engineer-get-me-out-of-here/C++
\ No newline at end of file
diff --git a/Lang/C++/MD5-Implementation b/Lang/C++/MD5-Implementation
deleted file mode 120000
index b31aca0e67..0000000000
--- a/Lang/C++/MD5-Implementation
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/MD5-Implementation/C++
\ No newline at end of file
diff --git a/Lang/C++/Meissel-Mertens-constant b/Lang/C++/Meissel-Mertens-constant
new file mode 120000
index 0000000000..3242c970c7
--- /dev/null
+++ b/Lang/C++/Meissel-Mertens-constant
@@ -0,0 +1 @@
+../../Task/Meissel-Mertens-constant/C++
\ No newline at end of file
diff --git a/Lang/C++/Miller-Rabin-primality-test b/Lang/C++/Miller-Rabin-primality-test
new file mode 120000
index 0000000000..615ee001e8
--- /dev/null
+++ b/Lang/C++/Miller-Rabin-primality-test
@@ -0,0 +1 @@
+../../Task/Miller-Rabin-primality-test/C++
\ No newline at end of file
diff --git a/Lang/C++/Natural-sorting b/Lang/C++/Natural-sorting
deleted file mode 120000
index 221a15ac6d..0000000000
--- a/Lang/C++/Natural-sorting
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Natural-sorting/C++
\ No newline at end of file
diff --git a/Lang/C++/Non-transitive-dice b/Lang/C++/Non-transitive-dice
deleted file mode 120000
index 2c6300fda7..0000000000
--- a/Lang/C++/Non-transitive-dice
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Non-transitive-dice/C++
\ No newline at end of file
diff --git a/Lang/C++/P-Adic-square-roots b/Lang/C++/P-Adic-square-roots
deleted file mode 120000
index a25d0f7d5c..0000000000
--- a/Lang/C++/P-Adic-square-roots
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/P-Adic-square-roots/C++
\ No newline at end of file
diff --git a/Lang/C++/Quaternion-type b/Lang/C++/Quaternion-type
new file mode 120000
index 0000000000..053fd1142a
--- /dev/null
+++ b/Lang/C++/Quaternion-type
@@ -0,0 +1 @@
+../../Task/Quaternion-type/C++
\ No newline at end of file
diff --git a/Lang/C++/Rendezvous b/Lang/C++/Rendezvous
deleted file mode 120000
index b1c8af4bea..0000000000
--- a/Lang/C++/Rendezvous
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Rendezvous/C++
\ No newline at end of file
diff --git a/Lang/C++/Sequence:-nth-number-with-exactly-n-divisors b/Lang/C++/Sequence-nth-number-with-exactly-n-divisors
similarity index 100%
rename from Lang/C++/Sequence:-nth-number-with-exactly-n-divisors
rename to Lang/C++/Sequence-nth-number-with-exactly-n-divisors
diff --git a/Lang/C++/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/C++/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors
similarity index 100%
rename from Lang/C++/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors
rename to Lang/C++/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors
diff --git a/Lang/C++/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/C++/Sequence-smallest-number-with-exactly-n-divisors
similarity index 100%
rename from Lang/C++/Sequence:-smallest-number-with-exactly-n-divisors
rename to Lang/C++/Sequence-smallest-number-with-exactly-n-divisors
diff --git a/Lang/C++/Simple-database b/Lang/C++/Simple-database
deleted file mode 120000
index 60394bf013..0000000000
--- a/Lang/C++/Simple-database
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Simple-database/C++
\ No newline at end of file
diff --git a/Lang/C++/Sort-an-outline-at-every-level b/Lang/C++/Sort-an-outline-at-every-level
deleted file mode 120000
index 5467a50bff..0000000000
--- a/Lang/C++/Sort-an-outline-at-every-level
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Sort-an-outline-at-every-level/C++
\ No newline at end of file
diff --git a/Lang/C++/Sorting-Algorithms-Circle-Sort b/Lang/C++/Sorting-Algorithms-Circle-Sort
new file mode 120000
index 0000000000..91c7b06653
--- /dev/null
+++ b/Lang/C++/Sorting-Algorithms-Circle-Sort
@@ -0,0 +1 @@
+../../Task/Sorting-Algorithms-Circle-Sort/C++
\ No newline at end of file
diff --git a/Lang/C++/Strassens-algorithm b/Lang/C++/Strassens-algorithm
deleted file mode 120000
index 1423f44a39..0000000000
--- a/Lang/C++/Strassens-algorithm
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Strassens-algorithm/C++
\ No newline at end of file
diff --git a/Lang/C++/URL-parser b/Lang/C++/URL-parser
deleted file mode 120000
index c94d78f772..0000000000
--- a/Lang/C++/URL-parser
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/URL-parser/C++
\ No newline at end of file
diff --git a/Lang/C++/UTF-8-encode-and-decode b/Lang/C++/UTF-8-encode-and-decode
deleted file mode 120000
index a3942ee81c..0000000000
--- a/Lang/C++/UTF-8-encode-and-decode
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/UTF-8-encode-and-decode/C++
\ No newline at end of file
diff --git a/Lang/C++/Ukkonen-s-suffix-tree-construction b/Lang/C++/Ukkonen-s-suffix-tree-construction
deleted file mode 120000
index 3dffa49793..0000000000
--- a/Lang/C++/Ukkonen-s-suffix-tree-construction
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Ukkonen-s-suffix-tree-construction/C++
\ No newline at end of file
diff --git a/Lang/C++/Update-a-configuration-file b/Lang/C++/Update-a-configuration-file
deleted file mode 120000
index dd78746576..0000000000
--- a/Lang/C++/Update-a-configuration-file
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Update-a-configuration-file/C++
\ No newline at end of file
diff --git a/Lang/C-sharp/00-LANG.txt b/Lang/C-sharp/00-LANG.txt
index 2ffb00e180..17083312b1 100644
--- a/Lang/C-sharp/00-LANG.txt
+++ b/Lang/C-sharp/00-LANG.txt
@@ -17,10 +17,6 @@
 ==Citations==
 *[[wp:C_Sharp_(programming_language)|Wikipedia:C#]]
 
-== External links ==
-=== Online editors and compilers ===
-*[https://www.onlinegdb.com/ GDB Online Compiler] (Select C#)
-
 {{language programming paradigm|Imperative}}
 {{language programming paradigm|Object-oriented}}
 {{language programming paradigm|Generic}}
diff --git a/Lang/C-sharp/ADFGVX-cipher b/Lang/C-sharp/ADFGVX-cipher
deleted file mode 120000
index 1bd5856497..0000000000
--- a/Lang/C-sharp/ADFGVX-cipher
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/ADFGVX-cipher/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/ASCII-art-diagram-converter b/Lang/C-sharp/ASCII-art-diagram-converter
deleted file mode 120000
index a3c0a49ccd..0000000000
--- a/Lang/C-sharp/ASCII-art-diagram-converter
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/ASCII-art-diagram-converter/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Additive-primes b/Lang/C-sharp/Additive-primes
deleted file mode 120000
index d958846baf..0000000000
--- a/Lang/C-sharp/Additive-primes
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Additive-primes/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Arithmetic-derivative b/Lang/C-sharp/Arithmetic-derivative
deleted file mode 120000
index 99fc50446f..0000000000
--- a/Lang/C-sharp/Arithmetic-derivative
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Arithmetic-derivative/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Boyer-Moore-string-search b/Lang/C-sharp/Boyer-Moore-string-search
deleted file mode 120000
index 6d8ebe0502..0000000000
--- a/Lang/C-sharp/Boyer-Moore-string-search
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Boyer-Moore-string-search/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Calkin-Wilf-sequence b/Lang/C-sharp/Calkin-Wilf-sequence
deleted file mode 120000
index 75d6e98750..0000000000
--- a/Lang/C-sharp/Calkin-Wilf-sequence
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Calkin-Wilf-sequence/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Camel-case-and-snake-case b/Lang/C-sharp/Camel-case-and-snake-case
deleted file mode 120000
index 0b673ec8ed..0000000000
--- a/Lang/C-sharp/Camel-case-and-snake-case
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Camel-case-and-snake-case/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Cistercian-numerals b/Lang/C-sharp/Cistercian-numerals
deleted file mode 120000
index d482ff0533..0000000000
--- a/Lang/C-sharp/Cistercian-numerals
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Cistercian-numerals/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Colorful-numbers b/Lang/C-sharp/Colorful-numbers
deleted file mode 120000
index b35a72c815..0000000000
--- a/Lang/C-sharp/Colorful-numbers
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Colorful-numbers/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/C-sharp/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-
deleted file mode 120000
index 2adfbd6635..0000000000
--- a/Lang/C-sharp/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Cyclops-numbers b/Lang/C-sharp/Cyclops-numbers
deleted file mode 120000
index c4380e8ccd..0000000000
--- a/Lang/C-sharp/Cyclops-numbers
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Cyclops-numbers/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Elliptic-Curve-Digital-Signature-Algorithm b/Lang/C-sharp/Elliptic-Curve-Digital-Signature-Algorithm
deleted file mode 120000
index 82412a8f32..0000000000
--- a/Lang/C-sharp/Elliptic-Curve-Digital-Signature-Algorithm
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Elliptic-Curve-Digital-Signature-Algorithm/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Execute-a-Markov-algorithm b/Lang/C-sharp/Execute-a-Markov-algorithm
deleted file mode 120000
index fac2e3f425..0000000000
--- a/Lang/C-sharp/Execute-a-Markov-algorithm
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Execute-a-Markov-algorithm/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Extensible-prime-generator b/Lang/C-sharp/Extensible-prime-generator
deleted file mode 120000
index 1e4636d3bb..0000000000
--- a/Lang/C-sharp/Extensible-prime-generator
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Extensible-prime-generator/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/File-extension-is-in-extensions-list b/Lang/C-sharp/File-extension-is-in-extensions-list
deleted file mode 120000
index caec470709..0000000000
--- a/Lang/C-sharp/File-extension-is-in-extensions-list
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/File-extension-is-in-extensions-list/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Find-if-a-point-is-within-a-triangle b/Lang/C-sharp/Find-if-a-point-is-within-a-triangle
deleted file mode 120000
index 0c9dec87d9..0000000000
--- a/Lang/C-sharp/Find-if-a-point-is-within-a-triangle
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Find-if-a-point-is-within-a-triangle/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Gotchas b/Lang/C-sharp/Gotchas
deleted file mode 120000
index c20938cf21..0000000000
--- a/Lang/C-sharp/Gotchas
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Gotchas/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Index-finite-lists-of-positive-integers b/Lang/C-sharp/Index-finite-lists-of-positive-integers
deleted file mode 120000
index 692e611ddc..0000000000
--- a/Lang/C-sharp/Index-finite-lists-of-positive-integers
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Index-finite-lists-of-positive-integers/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/K-d-tree b/Lang/C-sharp/K-d-tree
deleted file mode 120000
index 9ea6355b83..0000000000
--- a/Lang/C-sharp/K-d-tree
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/K-d-tree/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Longest-string-challenge b/Lang/C-sharp/Longest-string-challenge
deleted file mode 120000
index bd57b65702..0000000000
--- a/Lang/C-sharp/Longest-string-challenge
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Longest-string-challenge/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/M-bius-function b/Lang/C-sharp/M-bius-function
deleted file mode 120000
index 56f84fb14c..0000000000
--- a/Lang/C-sharp/M-bius-function
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/M-bius-function/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Miller-Rabin-primality-test b/Lang/C-sharp/Miller-Rabin-primality-test
new file mode 120000
index 0000000000..4d27fefcbd
--- /dev/null
+++ b/Lang/C-sharp/Miller-Rabin-primality-test
@@ -0,0 +1 @@
+../../Task/Miller-Rabin-primality-test/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/P-Adic-numbers-basic b/Lang/C-sharp/P-Adic-numbers-basic
deleted file mode 120000
index 564565afb6..0000000000
--- a/Lang/C-sharp/P-Adic-numbers-basic
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/P-Adic-numbers-basic/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Periodic-table b/Lang/C-sharp/Periodic-table
deleted file mode 120000
index 97d676b17d..0000000000
--- a/Lang/C-sharp/Periodic-table
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Periodic-table/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Quaternion-type b/Lang/C-sharp/Quaternion-type
new file mode 120000
index 0000000000..53c4bd6185
--- /dev/null
+++ b/Lang/C-sharp/Quaternion-type
@@ -0,0 +1 @@
+../../Task/Quaternion-type/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Reflection-Get-source b/Lang/C-sharp/Reflection-Get-source
deleted file mode 120000
index a8b2f45e4c..0000000000
--- a/Lang/C-sharp/Reflection-Get-source
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Reflection-Get-source/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/C-sharp/Sequence:-smallest-number-with-exactly-n-divisors
deleted file mode 120000
index 71508d1c44..0000000000
--- a/Lang/C-sharp/Sequence:-smallest-number-with-exactly-n-divisors
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Sequence:-smallest-number-with-exactly-n-divisors/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Sorting-Algorithms-Circle-Sort b/Lang/C-sharp/Sorting-Algorithms-Circle-Sort
new file mode 120000
index 0000000000..6f1414c420
--- /dev/null
+++ b/Lang/C-sharp/Sorting-Algorithms-Circle-Sort
@@ -0,0 +1 @@
+../../Task/Sorting-Algorithms-Circle-Sort/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Square-free-integers b/Lang/C-sharp/Square-free-integers
deleted file mode 120000
index 6cabcf20b3..0000000000
--- a/Lang/C-sharp/Square-free-integers
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Square-free-integers/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Strassens-algorithm b/Lang/C-sharp/Strassens-algorithm
deleted file mode 120000
index 45fd91dfa9..0000000000
--- a/Lang/C-sharp/Strassens-algorithm
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Strassens-algorithm/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Summarize-primes b/Lang/C-sharp/Summarize-primes
deleted file mode 120000
index de1b22714d..0000000000
--- a/Lang/C-sharp/Summarize-primes
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Summarize-primes/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Tau-function b/Lang/C-sharp/Tau-function
deleted file mode 120000
index aa9069413d..0000000000
--- a/Lang/C-sharp/Tau-function
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Tau-function/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Tau-number b/Lang/C-sharp/Tau-number
deleted file mode 120000
index 0980d5ce28..0000000000
--- a/Lang/C-sharp/Tau-number
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Tau-number/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Tree-from-nesting-levels b/Lang/C-sharp/Tree-from-nesting-levels
deleted file mode 120000
index e46b1553ea..0000000000
--- a/Lang/C-sharp/Tree-from-nesting-levels
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Tree-from-nesting-levels/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Ultra-useful-primes b/Lang/C-sharp/Ultra-useful-primes
deleted file mode 120000
index 2258e0373a..0000000000
--- a/Lang/C-sharp/Ultra-useful-primes
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Ultra-useful-primes/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Variable-declaration-reset b/Lang/C-sharp/Variable-declaration-reset
deleted file mode 120000
index ec0809da88..0000000000
--- a/Lang/C-sharp/Variable-declaration-reset
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Variable-declaration-reset/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Vogels-approximation-method b/Lang/C-sharp/Vogels-approximation-method
deleted file mode 120000
index bb638d067a..0000000000
--- a/Lang/C-sharp/Vogels-approximation-method
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Vogels-approximation-method/C-sharp
\ No newline at end of file
diff --git a/Lang/C-sharp/Yellowstone-sequence b/Lang/C-sharp/Yellowstone-sequence
deleted file mode 120000
index 793ce587ba..0000000000
--- a/Lang/C-sharp/Yellowstone-sequence
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Yellowstone-sequence/C-sharp
\ No newline at end of file
diff --git a/Lang/C/Achilles-numbers b/Lang/C/Achilles-numbers
deleted file mode 120000
index 5c3326676b..0000000000
--- a/Lang/C/Achilles-numbers
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Achilles-numbers/C
\ No newline at end of file
diff --git a/Lang/C/Bioinformatics-base-count b/Lang/C/Bioinformatics-base-count
new file mode 120000
index 0000000000..4819495149
--- /dev/null
+++ b/Lang/C/Bioinformatics-base-count
@@ -0,0 +1 @@
+../../Task/Bioinformatics-base-count/C
\ No newline at end of file
diff --git a/Lang/C/Color-wheel b/Lang/C/Color-wheel
deleted file mode 120000
index 9d6561adcd..0000000000
--- a/Lang/C/Color-wheel
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Color-wheel/C
\ No newline at end of file
diff --git a/Lang/C/Distance-and-Bearing b/Lang/C/Distance-and-Bearing
deleted file mode 120000
index 4496c69ac6..0000000000
--- a/Lang/C/Distance-and-Bearing
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Distance-and-Bearing/C
\ No newline at end of file
diff --git a/Lang/C/Dynamic-variable-names b/Lang/C/Dynamic-variable-names
deleted file mode 120000
index 278fe3b232..0000000000
--- a/Lang/C/Dynamic-variable-names
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Dynamic-variable-names/C
\ No newline at end of file
diff --git a/Lang/C/Execute-Computer-Zero b/Lang/C/Execute-Computer-Zero
deleted file mode 120000
index c10597c078..0000000000
--- a/Lang/C/Execute-Computer-Zero
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Execute-Computer-Zero/C
\ No newline at end of file
diff --git a/Lang/C/Harmonic-series b/Lang/C/Harmonic-series
deleted file mode 120000
index dfebedc2c8..0000000000
--- a/Lang/C/Harmonic-series
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Harmonic-series/C
\ No newline at end of file
diff --git a/Lang/C/History-variables b/Lang/C/History-variables
deleted file mode 120000
index 3a73616359..0000000000
--- a/Lang/C/History-variables
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/History-variables/C
\ No newline at end of file
diff --git a/Lang/C/Hunt-the-Wumpus b/Lang/C/Hunt-the-Wumpus
deleted file mode 120000
index e7186ced48..0000000000
--- a/Lang/C/Hunt-the-Wumpus
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Hunt-the-Wumpus/C
\ No newline at end of file
diff --git a/Lang/C/Magic-constant b/Lang/C/Magic-constant
deleted file mode 120000
index 3d29fd6624..0000000000
--- a/Lang/C/Magic-constant
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Magic-constant/C
\ No newline at end of file
diff --git a/Lang/C/Miller-Rabin-primality-test b/Lang/C/Miller-Rabin-primality-test
new file mode 120000
index 0000000000..b9ab762a9c
--- /dev/null
+++ b/Lang/C/Miller-Rabin-primality-test
@@ -0,0 +1 @@
+../../Task/Miller-Rabin-primality-test/C
\ No newline at end of file
diff --git a/Lang/C/Nested-templated-data b/Lang/C/Nested-templated-data
deleted file mode 120000
index ef78f3cb0c..0000000000
--- a/Lang/C/Nested-templated-data
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Nested-templated-data/C
\ No newline at end of file
diff --git a/Lang/C/One-time-pad b/Lang/C/One-time-pad
deleted file mode 120000
index e0845d9058..0000000000
--- a/Lang/C/One-time-pad
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/One-time-pad/C
\ No newline at end of file
diff --git a/Lang/C/Pig-the-dice-game-Player b/Lang/C/Pig-the-dice-game-Player
deleted file mode 120000
index 28ecb509a8..0000000000
--- a/Lang/C/Pig-the-dice-game-Player
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Pig-the-dice-game-Player/C
\ No newline at end of file
diff --git a/Lang/C/Quaternion-type b/Lang/C/Quaternion-type
new file mode 120000
index 0000000000..25d9910755
--- /dev/null
+++ b/Lang/C/Quaternion-type
@@ -0,0 +1 @@
+../../Task/Quaternion-type/C
\ No newline at end of file
diff --git a/Lang/C/Sequence:-nth-number-with-exactly-n-divisors b/Lang/C/Sequence-nth-number-with-exactly-n-divisors
similarity index 100%
rename from Lang/C/Sequence:-nth-number-with-exactly-n-divisors
rename to Lang/C/Sequence-nth-number-with-exactly-n-divisors
diff --git a/Lang/C/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/C/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors
similarity index 100%
rename from Lang/C/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors
rename to Lang/C/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors
diff --git a/Lang/C/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/C/Sequence-smallest-number-with-exactly-n-divisors
similarity index 100%
rename from Lang/C/Sequence:-smallest-number-with-exactly-n-divisors
rename to Lang/C/Sequence-smallest-number-with-exactly-n-divisors
diff --git a/Lang/C/Sleeping-Beauty-problem b/Lang/C/Sleeping-Beauty-problem
deleted file mode 120000
index 193e808670..0000000000
--- a/Lang/C/Sleeping-Beauty-problem
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Sleeping-Beauty-problem/C
\ No newline at end of file
diff --git a/Lang/C/Sorting-Algorithms-Circle-Sort b/Lang/C/Sorting-Algorithms-Circle-Sort
new file mode 120000
index 0000000000..335574f406
--- /dev/null
+++ b/Lang/C/Sorting-Algorithms-Circle-Sort
@@ -0,0 +1 @@
+../../Task/Sorting-Algorithms-Circle-Sort/C
\ No newline at end of file
diff --git a/Lang/C3/Binary-digits b/Lang/C3/Binary-digits
deleted file mode 120000
index 34a04afae2..0000000000
--- a/Lang/C3/Binary-digits
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Binary-digits/C3
\ No newline at end of file
diff --git a/Lang/C3/Bulls-and-cows b/Lang/C3/Bulls-and-cows
deleted file mode 120000
index b5099b13d9..0000000000
--- a/Lang/C3/Bulls-and-cows
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Bulls-and-cows/C3
\ No newline at end of file
diff --git a/Lang/CB80/00-LANG.txt b/Lang/CB80/00-LANG.txt
index 86de52ef42..96b8bf005c 100644
--- a/Lang/CB80/00-LANG.txt
+++ b/Lang/CB80/00-LANG.txt
@@ -1,2 +1 @@
-{{language}}{{Stub}}
-CB80 is not a separate language or dialect but rather a companion compiler for the [[CBASIC]] dialect of BASIC for 8-bit CP/M systems. The CBASIC compiler compiles source code into an intermediate form, which is stored on disk with the file extension INT. The compiled code is executed by invoking a run-time interpreter (CRUN.COM) from the command line. CB80, by contrast, compiles the source into a relocatable machine code file having an REL extension, which is then linked with necessary run-time library routines using the supplied linker (either LINK.COM or LK80.COM), to create a stand-alone executable file with the extension COM, which can be run simply by typing its name on the CP/M command-line. All of the posted CBASIC examples on Rosetta Code as of 9/14/2024 will compile and run without change under CB80. One subtle difference which could affect some programs lies in the behavior of the FOR .. NEXT statement. When run under CBASIC the body of the statement will always be executed at least once even if the index variable exceeds the value of the stop expression. If compiled using CB80, however, the loop will not be executed under those circumstances.
\ No newline at end of file
+{{language}}{{Stub}}
\ No newline at end of file
diff --git a/Lang/CBASIC/00-LANG.txt b/Lang/CBASIC/00-LANG.txt
deleted file mode 100644
index f0ff8ea32b..0000000000
--- a/Lang/CBASIC/00-LANG.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-{{stub}} {{language|CBASIC}}
-CBASIC was the commercial outgrowth of the BASIC-E compiler
-written by Gordon Eubanks as his Master's thesis while a 
-student at the Naval Postgraduate School. CBASIC -- which
-was marketed for both 8 and 16 bit CP/M systems -- differed from
-many of the BASIC dialects of the day in two major respects:
-(1) line numbers were not required unless the statement was
-the target of a GOTO or GOSUB statement (and were in any event
-treated simply as labels) and (2) real (floating point) variables
-were implemented as 14-digit binary coded decimal (BCD), which,
-particularly in business and accounting applications, avoided round-off 
-errors which purely binary floating point computations were prone
-to. Integer and string variables (which required % and $ suffixes,
-respectively) were also provided, as well as multi-dimensional arrays.
-Identifiers could be of any length, although only the first 31
-characters were significant. CBASIC supported multiline user-defined 
-functions with parameters passed by value but did not support recursion.
-CBASIC was implemented as a compiler-interpreter: the source code was
-compiled into an intermediate form, which could then be executed by
-invoking a run-time interpreter. A companion compiler, [[CB80]], was
-offered that compiled to machine code.
\ No newline at end of file
diff --git a/Lang/CBASIC/00-META.yaml b/Lang/CBASIC/00-META.yaml
deleted file mode 100644
index ad24e74664..0000000000
--- a/Lang/CBASIC/00-META.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-from: http://rosettacode.org/wiki/Category:CBASIC
diff --git a/Lang/CBASIC/100-doors b/Lang/CBASIC/100-doors
deleted file mode 120000
index e01a233041..0000000000
--- a/Lang/CBASIC/100-doors
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/100-doors/CBASIC
\ No newline at end of file
diff --git a/Lang/CBASIC/Amicable-pairs b/Lang/CBASIC/Amicable-pairs
deleted file mode 120000
index 6386efc2a5..0000000000
--- a/Lang/CBASIC/Amicable-pairs
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Amicable-pairs/CBASIC
\ No newline at end of file
diff --git a/Lang/CBASIC/Binary-digits b/Lang/CBASIC/Binary-digits
deleted file mode 120000
index d0de913861..0000000000
--- a/Lang/CBASIC/Binary-digits
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Binary-digits/CBASIC
\ No newline at end of file
diff --git a/Lang/CBASIC/Factorial b/Lang/CBASIC/Factorial
deleted file mode 120000
index 97dfd0b137..0000000000
--- a/Lang/CBASIC/Factorial
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Factorial/CBASIC
\ No newline at end of file
diff --git a/Lang/CBASIC/Fibonacci-sequence b/Lang/CBASIC/Fibonacci-sequence
deleted file mode 120000
index eb9f8cf7a1..0000000000
--- a/Lang/CBASIC/Fibonacci-sequence
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Fibonacci-sequence/CBASIC
\ No newline at end of file
diff --git a/Lang/CBASIC/Harmonic-series b/Lang/CBASIC/Harmonic-series
deleted file mode 120000
index aa1eac83fa..0000000000
--- a/Lang/CBASIC/Harmonic-series
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Harmonic-series/CBASIC
\ No newline at end of file
diff --git a/Lang/CBASIC/Perfect-numbers b/Lang/CBASIC/Perfect-numbers
deleted file mode 120000
index 3f847760d8..0000000000
--- a/Lang/CBASIC/Perfect-numbers
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Perfect-numbers/CBASIC
\ No newline at end of file
diff --git a/Lang/CBASIC/Rot-13 b/Lang/CBASIC/Rot-13
deleted file mode 120000
index bbda100cd2..0000000000
--- a/Lang/CBASIC/Rot-13
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Rot-13/CBASIC
\ No newline at end of file
diff --git a/Lang/CBASIC/Sieve-of-Eratosthenes b/Lang/CBASIC/Sieve-of-Eratosthenes
deleted file mode 120000
index ecdf66656a..0000000000
--- a/Lang/CBASIC/Sieve-of-Eratosthenes
+++ /dev/null
@@ -1 +0,0 @@
-../../Task/Sieve-of-Eratosthenes/CBASIC
\ No newline at end of file
diff --git a/Lang/CJam/00-LANG.txt b/Lang/CJam/00-LANG.txt
deleted file mode 100644
index 9d6f8331dc..0000000000
--- a/Lang/CJam/00-LANG.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-{{language|site=https://sourceforge.net/p/cjam/wiki/Home/}}
-
-[https://sourceforge.net/projects/cjam/ sf repo]
-
-From the [https://sourceforge.net/p/cjam/wiki/Home/ wiki]:
-
-:In order to run a CJam program, [https://sourceforge.net/projects/cjam/files/ download] the latest jar file, e.g. cjam-0.6.5.jar, and run this command:
-:
java -jar cjam-0.6.5.jar file.cjam
\ No newline at end of file diff --git a/Lang/CJam/00-META.yaml b/Lang/CJam/00-META.yaml deleted file mode 100644 index 49b8d01361..0000000000 --- a/Lang/CJam/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:CJam diff --git a/Lang/CLU/Arithmetic-derivative b/Lang/CLU/Arithmetic-derivative deleted file mode 120000 index f0f81c6bc1..0000000000 --- a/Lang/CLU/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/CLU \ No newline at end of file diff --git a/Lang/CLU/Move-to-front-algorithm b/Lang/CLU/Move-to-front-algorithm deleted file mode 120000 index bbdfe9bcdb..0000000000 --- a/Lang/CLU/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/CLU \ No newline at end of file diff --git a/Lang/CLU/Quaternion-type b/Lang/CLU/Quaternion-type new file mode 120000 index 0000000000..abdefd8765 --- /dev/null +++ b/Lang/CLU/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/CLU \ No newline at end of file diff --git a/Lang/CLU/Super-d-numbers b/Lang/CLU/Super-d-numbers deleted file mode 120000 index a271a5f6dc..0000000000 --- a/Lang/CLU/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/CLU \ No newline at end of file diff --git a/Lang/COBOL/ABC-problem b/Lang/COBOL/ABC-problem deleted file mode 120000 index ca521ee81d..0000000000 --- a/Lang/COBOL/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/COBOL \ No newline at end of file diff --git a/Lang/COBOL/AVL-tree b/Lang/COBOL/AVL-tree deleted file mode 120000 index d8a20640c6..0000000000 --- a/Lang/COBOL/AVL-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/AVL-tree/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Abundant-odd-numbers b/Lang/COBOL/Abundant-odd-numbers deleted file mode 120000 index 7268a8a6ca..0000000000 --- a/Lang/COBOL/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Achilles-numbers b/Lang/COBOL/Achilles-numbers deleted file mode 120000 index 4a3a715de1..0000000000 --- a/Lang/COBOL/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Arithmetic-numbers b/Lang/COBOL/Arithmetic-numbers deleted file mode 120000 index cf8f3a0323..0000000000 --- a/Lang/COBOL/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Calkin-Wilf-sequence b/Lang/COBOL/Calkin-Wilf-sequence deleted file mode 120000 index f3e314890f..0000000000 --- a/Lang/COBOL/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Colorful-numbers b/Lang/COBOL/Colorful-numbers deleted file mode 120000 index 6d5c4f9dff..0000000000 --- a/Lang/COBOL/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Cullen-and-Woodall-numbers b/Lang/COBOL/Cullen-and-Woodall-numbers deleted file mode 120000 index b212ad96a5..0000000000 --- a/Lang/COBOL/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Damm-algorithm b/Lang/COBOL/Damm-algorithm deleted file mode 120000 index e4f3bf1f71..0000000000 --- a/Lang/COBOL/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/COBOL \ No newline at end of file diff --git a/Lang/COBOL/De-Bruijn-sequences b/Lang/COBOL/De-Bruijn-sequences deleted file mode 120000 index 67e8dee974..0000000000 --- a/Lang/COBOL/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Dijkstras-algorithm b/Lang/COBOL/Dijkstras-algorithm deleted file mode 120000 index 19c743357a..0000000000 --- a/Lang/COBOL/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Farey-sequence b/Lang/COBOL/Farey-sequence deleted file mode 120000 index b402aede64..0000000000 --- a/Lang/COBOL/Farey-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Farey-sequence/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Floyd-Warshall-algorithm b/Lang/COBOL/Floyd-Warshall-algorithm deleted file mode 120000 index de49182ec8..0000000000 --- a/Lang/COBOL/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Fusc-sequence b/Lang/COBOL/Fusc-sequence deleted file mode 120000 index e8b4b1330c..0000000000 --- a/Lang/COBOL/Fusc-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fusc-sequence/COBOL \ No newline at end of file diff --git a/Lang/COBOL/K-d-tree b/Lang/COBOL/K-d-tree deleted file mode 120000 index af9595a130..0000000000 --- a/Lang/COBOL/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Knuths-algorithm-S b/Lang/COBOL/Knuths-algorithm-S deleted file mode 120000 index 119841f920..0000000000 --- a/Lang/COBOL/Knuths-algorithm-S +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-algorithm-S/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Leonardo-numbers b/Lang/COBOL/Leonardo-numbers deleted file mode 120000 index 65bc7509a4..0000000000 --- a/Lang/COBOL/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Move-to-front-algorithm b/Lang/COBOL/Move-to-front-algorithm deleted file mode 120000 index f9458888cc..0000000000 --- a/Lang/COBOL/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Nim-game b/Lang/COBOL/Nim-game deleted file mode 120000 index 9a7c582b48..0000000000 --- a/Lang/COBOL/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Pancake-numbers b/Lang/COBOL/Pancake-numbers deleted file mode 120000 index 22e5574a28..0000000000 --- a/Lang/COBOL/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Parametric-polymorphism b/Lang/COBOL/Parametric-polymorphism deleted file mode 120000 index 44f214df50..0000000000 --- a/Lang/COBOL/Parametric-polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parametric-polymorphism/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Soloways-recurring-rainfall b/Lang/COBOL/Soloways-recurring-rainfall deleted file mode 120000 index 883bf3b2e0..0000000000 --- a/Lang/COBOL/Soloways-recurring-rainfall +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soloways-recurring-rainfall/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Strassens-algorithm b/Lang/COBOL/Strassens-algorithm deleted file mode 120000 index 488f64d9e2..0000000000 --- a/Lang/COBOL/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/COBOL \ No newline at end of file diff --git a/Lang/COBOL/The-Name-Game b/Lang/COBOL/The-Name-Game deleted file mode 120000 index 35866ecb72..0000000000 --- a/Lang/COBOL/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Twos-complement b/Lang/COBOL/Twos-complement deleted file mode 120000 index 776801b9e2..0000000000 --- a/Lang/COBOL/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Vigen-re-cipher b/Lang/COBOL/Vigen-re-cipher deleted file mode 120000 index 93e3f53bcb..0000000000 --- a/Lang/COBOL/Vigen-re-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher/COBOL \ No newline at end of file diff --git a/Lang/COBOL/Zeckendorf-number-representation b/Lang/COBOL/Zeckendorf-number-representation deleted file mode 120000 index d3c11d47da..0000000000 --- a/Lang/COBOL/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/COBOL \ No newline at end of file diff --git a/Lang/Calc/00-LANG.txt b/Lang/Calc/00-LANG.txt deleted file mode 100644 index 9066fe1741..0000000000 --- a/Lang/Calc/00-LANG.txt +++ /dev/null @@ -1,10 +0,0 @@ -{{language|Calc -|untyped=yes}} -{{language programming paradigm|stack-based}} -{{language programming paradigm|imperative}} - -Calc is a stack-based RPN calculator inside [[Emacs]]. Calc is part of GNU Emacs 22, or a package for XEmacs. - -Calc presents itself as an interactive calculator. Instructions can also be stored as macros, including control flow instructions (if-then-else, for loop, etc.), which makes Calc fully programmable. Calc also provides a library available in Emacs Lisp programs. - -Calc has more numeric types than plain Emacs Lisp. Calc has big integers, big floating-point numbers, rational numbers, complex numbers, and more. (For contrast, plain Emacs Lisp can only handle integers and floating-point numbers of limited precision.) Emacs Lisp with Calc can solve tasks requiring these types of numbers. \ No newline at end of file diff --git a/Lang/Calc/00-META.yaml b/Lang/Calc/00-META.yaml deleted file mode 100644 index 85b0e2ef53..0000000000 --- a/Lang/Calc/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Calc diff --git a/Lang/Calc/Averages-Arithmetic-mean b/Lang/Calc/Averages-Arithmetic-mean deleted file mode 120000 index 8ad84c8dbd..0000000000 --- a/Lang/Calc/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/Calc \ No newline at end of file diff --git a/Lang/Calc/Modular-exponentiation b/Lang/Calc/Modular-exponentiation deleted file mode 120000 index b72a4448d5..0000000000 --- a/Lang/Calc/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/Calc \ No newline at end of file diff --git a/Lang/Calcscript/00-LANG.txt b/Lang/Calcscript/00-LANG.txt deleted file mode 100644 index d2db819bbe..0000000000 --- a/Lang/Calcscript/00-LANG.txt +++ /dev/null @@ -1,10 +0,0 @@ -{{language -|site=https://gitee.com/jfiewo/calc/ -}} -Calcscript is a small lisp-like language. -* It has 3 datatypes: Int, Same, and Invalid. -* The usual 4 arithmetic operations are supported. - -See [https://gitee.com/jfiewo/calc/ the respository] for details. -{{language programming paradigm|Logic Programming}} -{{language programming paradigm|Functional}} \ No newline at end of file diff --git a/Lang/Calcscript/00-META.yaml b/Lang/Calcscript/00-META.yaml deleted file mode 100644 index cee9fc468f..0000000000 --- a/Lang/Calcscript/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Calcscript diff --git a/Lang/Chapel/Function-definition b/Lang/Chapel/Function-definition deleted file mode 120000 index 589b4afa2c..0000000000 --- a/Lang/Chapel/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Chapel \ No newline at end of file diff --git a/Lang/Chapel/Maze-generation b/Lang/Chapel/Maze-generation deleted file mode 120000 index b4c55cfddb..0000000000 --- a/Lang/Chapel/Maze-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maze-generation/Chapel \ No newline at end of file diff --git a/Lang/Chapel/Repeat b/Lang/Chapel/Repeat deleted file mode 120000 index 3c555a4885..0000000000 --- a/Lang/Chapel/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Chapel \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/ASCII-art-diagram-converter b/Lang/Chipmunk-Basic/ASCII-art-diagram-converter deleted file mode 120000 index a034d74b58..0000000000 --- a/Lang/Chipmunk-Basic/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Associative-array-Merging b/Lang/Chipmunk-Basic/Associative-array-Merging deleted file mode 120000 index dd87e8e06c..0000000000 --- a/Lang/Chipmunk-Basic/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Determine-sentence-type b/Lang/Chipmunk-Basic/Determine-sentence-type deleted file mode 120000 index 6851894430..0000000000 --- a/Lang/Chipmunk-Basic/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Display-a-linear-combination b/Lang/Chipmunk-Basic/Display-a-linear-combination deleted file mode 120000 index 76f3965566..0000000000 --- a/Lang/Chipmunk-Basic/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Diversity-prediction-theorem b/Lang/Chipmunk-Basic/Diversity-prediction-theorem deleted file mode 120000 index 094da6a44e..0000000000 --- a/Lang/Chipmunk-Basic/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Eban-numbers b/Lang/Chipmunk-Basic/Eban-numbers deleted file mode 120000 index 109253525e..0000000000 --- a/Lang/Chipmunk-Basic/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Evaluate-binomial-coefficients b/Lang/Chipmunk-Basic/Evaluate-binomial-coefficients deleted file mode 120000 index b45aed06e2..0000000000 --- a/Lang/Chipmunk-Basic/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Fibonacci-n-step-number-sequences b/Lang/Chipmunk-Basic/Fibonacci-n-step-number-sequences deleted file mode 120000 index 24e6f1fb75..0000000000 --- a/Lang/Chipmunk-Basic/Fibonacci-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-n-step-number-sequences/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Generate-Chess960-starting-position b/Lang/Chipmunk-Basic/Generate-Chess960-starting-position deleted file mode 120000 index daceb0cf8f..0000000000 --- a/Lang/Chipmunk-Basic/Generate-Chess960-starting-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-Chess960-starting-position/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Generate-lower-case-ASCII-alphabet b/Lang/Chipmunk-Basic/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 22e12f5ab0..0000000000 --- a/Lang/Chipmunk-Basic/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Jensens-Device b/Lang/Chipmunk-Basic/Jensens-Device deleted file mode 120000 index 927dca2f6f..0000000000 --- a/Lang/Chipmunk-Basic/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Leonardo-numbers b/Lang/Chipmunk-Basic/Leonardo-numbers deleted file mode 120000 index 65f7e68a9b..0000000000 --- a/Lang/Chipmunk-Basic/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Map-range b/Lang/Chipmunk-Basic/Map-range deleted file mode 120000 index 3aa5f00ecb..0000000000 --- a/Lang/Chipmunk-Basic/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Multiple-regression b/Lang/Chipmunk-Basic/Multiple-regression deleted file mode 120000 index 82844a944e..0000000000 --- a/Lang/Chipmunk-Basic/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Nested-templated-data b/Lang/Chipmunk-Basic/Nested-templated-data deleted file mode 120000 index a7e95ed6f1..0000000000 --- a/Lang/Chipmunk-Basic/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Pascals-triangle b/Lang/Chipmunk-Basic/Pascals-triangle deleted file mode 120000 index aa62c07130..0000000000 --- a/Lang/Chipmunk-Basic/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Perfect-numbers b/Lang/Chipmunk-Basic/Perfect-numbers deleted file mode 120000 index 4bd1876580..0000000000 --- a/Lang/Chipmunk-Basic/Perfect-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-numbers/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Phrase-reversals b/Lang/Chipmunk-Basic/Phrase-reversals deleted file mode 120000 index 3d4b70a430..0000000000 --- a/Lang/Chipmunk-Basic/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Price-fraction b/Lang/Chipmunk-Basic/Price-fraction deleted file mode 120000 index 895d56d4cf..0000000000 --- a/Lang/Chipmunk-Basic/Price-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Price-fraction/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Proper-divisors b/Lang/Chipmunk-Basic/Proper-divisors deleted file mode 120000 index e83b2b6ef0..0000000000 --- a/Lang/Chipmunk-Basic/Proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Proper-divisors/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Rate-counter b/Lang/Chipmunk-Basic/Rate-counter deleted file mode 120000 index 214d671194..0000000000 --- a/Lang/Chipmunk-Basic/Rate-counter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rate-counter/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Chipmunk-Basic/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Chipmunk-Basic/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Chipmunk-Basic/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Chipmunk-Basic/Shell-one-liner b/Lang/Chipmunk-Basic/Shell-one-liner deleted file mode 120000 index a90b838683..0000000000 --- a/Lang/Chipmunk-Basic/Shell-one-liner +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shell-one-liner/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Split-a-character-string-based-on-change-of-character b/Lang/Chipmunk-Basic/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index ae1d1da2a7..0000000000 --- a/Lang/Chipmunk-Basic/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Sudan-function b/Lang/Chipmunk-Basic/Sudan-function deleted file mode 120000 index 8b26708ee8..0000000000 --- a/Lang/Chipmunk-Basic/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Sum-of-a-series b/Lang/Chipmunk-Basic/Sum-of-a-series deleted file mode 120000 index f9bdcf9a6b..0000000000 --- a/Lang/Chipmunk-Basic/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/The-Name-Game b/Lang/Chipmunk-Basic/The-Name-Game deleted file mode 120000 index 5655525e11..0000000000 --- a/Lang/Chipmunk-Basic/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Twos-complement b/Lang/Chipmunk-Basic/Twos-complement deleted file mode 120000 index 4eb5b36880..0000000000 --- a/Lang/Chipmunk-Basic/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Chipmunk-Basic/Vector b/Lang/Chipmunk-Basic/Vector deleted file mode 120000 index 68aa51b11b..0000000000 --- a/Lang/Chipmunk-Basic/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/Chipmunk-Basic \ No newline at end of file diff --git a/Lang/Clojure/Miller-Rabin-primality-test b/Lang/Clojure/Miller-Rabin-primality-test new file mode 120000 index 0000000000..67b048eb10 --- /dev/null +++ b/Lang/Clojure/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Clojure \ No newline at end of file diff --git a/Lang/CoffeeScript/Empty-program b/Lang/CoffeeScript/Empty-program new file mode 120000 index 0000000000..c325b31ffa --- /dev/null +++ b/Lang/CoffeeScript/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/CoffeeScript \ No newline at end of file diff --git a/Lang/CoffeeScript/Sorting-Algorithms-Circle-Sort b/Lang/CoffeeScript/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..e4d7481d88 --- /dev/null +++ b/Lang/CoffeeScript/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/CoffeeScript \ No newline at end of file diff --git a/Lang/Comal/Fairshare-between-two-and-more b/Lang/Comal/Fairshare-between-two-and-more deleted file mode 120000 index 4497e4f55d..0000000000 --- a/Lang/Comal/Fairshare-between-two-and-more +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fairshare-between-two-and-more/Comal \ No newline at end of file diff --git a/Lang/Comal/Zeckendorf-number-representation b/Lang/Comal/Zeckendorf-number-representation deleted file mode 120000 index 55d16429d3..0000000000 --- a/Lang/Comal/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/Comal \ No newline at end of file diff --git a/Lang/Commodore-BASIC/Miller-Rabin-primality-test b/Lang/Commodore-BASIC/Miller-Rabin-primality-test new file mode 120000 index 0000000000..7354bc510f --- /dev/null +++ b/Lang/Commodore-BASIC/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Commodore-BASIC \ No newline at end of file diff --git a/Lang/Commodore-BASIC/N-queens-problem b/Lang/Commodore-BASIC/N-queens-problem deleted file mode 120000 index d5a4ff5b7a..0000000000 --- a/Lang/Commodore-BASIC/N-queens-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/N-queens-problem/Commodore-BASIC \ No newline at end of file diff --git a/Lang/Commodore-BASIC/Random-number-generator-device- b/Lang/Commodore-BASIC/Random-number-generator-device- deleted file mode 120000 index f23b1d0d42..0000000000 --- a/Lang/Commodore-BASIC/Random-number-generator-device- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-number-generator-device-/Commodore-BASIC \ No newline at end of file diff --git a/Lang/Common-Lisp/Blum-integer b/Lang/Common-Lisp/Blum-integer deleted file mode 120000 index 854dbaeee7..0000000000 --- a/Lang/Common-Lisp/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/Common-Lisp \ No newline at end of file diff --git a/Lang/Common-Lisp/Factorial-primes b/Lang/Common-Lisp/Factorial-primes deleted file mode 120000 index cc0d935af1..0000000000 --- a/Lang/Common-Lisp/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Common-Lisp \ No newline at end of file diff --git a/Lang/Common-Lisp/Miller-Rabin-primality-test b/Lang/Common-Lisp/Miller-Rabin-primality-test new file mode 120000 index 0000000000..4f8dbe695d --- /dev/null +++ b/Lang/Common-Lisp/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Common-Lisp \ No newline at end of file diff --git a/Lang/Common-Lisp/Multi-dimensional-array b/Lang/Common-Lisp/Multi-dimensional-array deleted file mode 120000 index 37f7ef0979..0000000000 --- a/Lang/Common-Lisp/Multi-dimensional-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-dimensional-array/Common-Lisp \ No newline at end of file diff --git a/Lang/Common-Lisp/Quaternion-type b/Lang/Common-Lisp/Quaternion-type new file mode 120000 index 0000000000..dd7bafa7e8 --- /dev/null +++ b/Lang/Common-Lisp/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Common-Lisp \ No newline at end of file diff --git a/Lang/Common-Lisp/Substitution-cipher b/Lang/Common-Lisp/Substitution-cipher deleted file mode 120000 index 332d90e9f0..0000000000 --- a/Lang/Common-Lisp/Substitution-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substitution-cipher/Common-Lisp \ No newline at end of file diff --git a/Lang/Common-Lisp/Wieferich-primes b/Lang/Common-Lisp/Wieferich-primes deleted file mode 120000 index 91ad6e3ba2..0000000000 --- a/Lang/Common-Lisp/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/Common-Lisp \ No newline at end of file diff --git a/Lang/Component-Pascal/00-LANG.txt b/Lang/Component-Pascal/00-LANG.txt index 7056dd922c..a83cc2b2e7 100644 --- a/Lang/Component-Pascal/00-LANG.txt +++ b/Lang/Component-Pascal/00-LANG.txt @@ -1,11 +1,4 @@ {{language|Component Pascal}}'''Component Pascal''' is a programming language in the tradition of Oberon and [[Oberon-2]], the last language Niklaus Wirth designed before he retired in 1999. It bears the name of the [[Pascal]] programming language but is incompatible with it. Instead, it is a minor variant and refinement of Oberon-2, designed and supported by a small ETH Zürich spin-off company called Oberon microsystems. Their [[IDE]] is called BlackBox Component Builder. At the time the first version was released (1994) it presented a novel approach to graphical user interface ([[GUI]]) construction based on editable forms, where fields and command buttons are linked to exported variables and executable procedures. This approach bears some similarity to the code-behind way used in [[Microsoft]]'s [[.NET]] 3.0 to access code in XAML. ==Citations== -* [http://en.wikipedia.org/wiki/Component_Pascal Wikipedia:Component Pascal] - -===See also=== -* [[Oberon-07]] -* [[Oberon-2]] -* [[Zonnon]] -* [[Modula-2]] -* [[Modula-3]] \ No newline at end of file +* [http://en.wikipedia.org/wiki/Component_Pascal Wikipedia:Component Pascal] \ No newline at end of file diff --git a/Lang/Component-Pascal/100-doors b/Lang/Component-Pascal/100-doors new file mode 120000 index 0000000000..76b023254e --- /dev/null +++ b/Lang/Component-Pascal/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/Component-Pascal \ No newline at end of file diff --git a/Lang/Computer-zero-Assembly/00-LANG.txt b/Lang/Computer-zero-Assembly/00-LANG.txt index 779b92356f..e6ea975211 100644 --- a/Lang/Computer-zero-Assembly/00-LANG.txt +++ b/Lang/Computer-zero-Assembly/00-LANG.txt @@ -19,10 +19,10 @@ There are only 32 bytes of memory, and this includes your program code, leaving ==Self-Modifying Code== With such little RAM available, the biggest tool we have at our disposal for programming is self-modifying code. The CPU makes no distinction between data and instructions, and as such we can store values into memory before that memory is executed, in order to change what the computer will do. Here's an example: -LDA 4 +LDA 4 STA 2 ADD 3 STP -SUB 3 +SUB 3 The above snippet of code never actually ADDs anything, since that instruction gets overwritten by SUB 3. And what is SUB 3 subtracting? It's subtracting the value of STP, which can be encoded as any number between 0xE0 and 0xFF. Specifically, the encoding of SUB 3 (i.e. 0b10000011) is decreased by some value between 0xE0 and 0xFF, and since all arithmetic on this CPU is modulo 256 (as is standard for nearly all 8-bit CPUs), there will be roll-over across the FF-00 boundary. Without a hardware carry flag, however, it's difficult to track this overflow. \ No newline at end of file diff --git a/Lang/Convex/00-LANG.txt b/Lang/Convex/00-LANG.txt deleted file mode 100644 index 6676f23dde..0000000000 --- a/Lang/Convex/00-LANG.txt +++ /dev/null @@ -1,6 +0,0 @@ -Convex is a stack-based golfing esolang based on Golfscript and CJam. - -{{language|site=https://github.com/ZekNikZ/Convex}} - -{{try|Convex|[https://tio.run/#convex Try Convex on tio.run].}} -{{language_programming_paradigm|Concatenative}} \ No newline at end of file diff --git a/Lang/Convex/00-META.yaml b/Lang/Convex/00-META.yaml deleted file mode 100644 index b10fffa83e..0000000000 --- a/Lang/Convex/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Convex diff --git a/Lang/Coq/00-LANG.txt b/Lang/Coq/00-LANG.txt index dac9774672..3a03214cba 100644 --- a/Lang/Coq/00-LANG.txt +++ b/Lang/Coq/00-LANG.txt @@ -1 +1,9 @@ -#REDIRECT [[:Category:Rocq]] \ No newline at end of file +{{language|Coq +|site=http://coq.inria.fr +}} +In computer science, Coq is a proof assistant application. It allows the expression of mathematical assertions, mechanically checks proofs of these assertions, helps to find formal proofs, and extracts a certified program from the constructive proof of its formal specification. Coq works within the theory of the calculus of inductive constructions, a derivative of the calculus of constructions. Coq is not an automated [[wp:Theorem_prover|theorem prover]] but includes automatic theorem proving tactics and various decision procedures. + +==Citations== +* [[wp:Coq|Coq]] + +[[Category:Mathematical programming languages]] \ No newline at end of file diff --git a/Lang/Coq/100-doors b/Lang/Coq/100-doors new file mode 120000 index 0000000000..fd39f903ef --- /dev/null +++ b/Lang/Coq/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/Coq \ No newline at end of file diff --git a/Lang/Coq/Ackermann-function b/Lang/Coq/Ackermann-function new file mode 120000 index 0000000000..03a0752c76 --- /dev/null +++ b/Lang/Coq/Ackermann-function @@ -0,0 +1 @@ +../../Task/Ackermann-function/Coq \ No newline at end of file diff --git a/Lang/Coq/Extend-your-language b/Lang/Coq/Extend-your-language new file mode 120000 index 0000000000..2e717c1027 --- /dev/null +++ b/Lang/Coq/Extend-your-language @@ -0,0 +1 @@ +../../Task/Extend-your-language/Coq \ No newline at end of file diff --git a/Lang/Coq/Factorial b/Lang/Coq/Factorial new file mode 120000 index 0000000000..3d35ebeb5f --- /dev/null +++ b/Lang/Coq/Factorial @@ -0,0 +1 @@ +../../Task/Factorial/Coq \ No newline at end of file diff --git a/Lang/Coq/Fibonacci-sequence b/Lang/Coq/Fibonacci-sequence new file mode 120000 index 0000000000..fc6d7d958a --- /dev/null +++ b/Lang/Coq/Fibonacci-sequence @@ -0,0 +1 @@ +../../Task/Fibonacci-sequence/Coq \ No newline at end of file diff --git a/Lang/Coq/FizzBuzz b/Lang/Coq/FizzBuzz new file mode 120000 index 0000000000..966d79dca5 --- /dev/null +++ b/Lang/Coq/FizzBuzz @@ -0,0 +1 @@ +../../Task/FizzBuzz/Coq \ No newline at end of file diff --git a/Lang/Coq/Hello-world-Newbie b/Lang/Coq/Hello-world-Newbie new file mode 120000 index 0000000000..53590d7473 --- /dev/null +++ b/Lang/Coq/Hello-world-Newbie @@ -0,0 +1 @@ +../../Task/Hello-world-Newbie/Coq \ No newline at end of file diff --git a/Lang/Coq/Hello-world-Text b/Lang/Coq/Hello-world-Text new file mode 120000 index 0000000000..194b2d17df --- /dev/null +++ b/Lang/Coq/Hello-world-Text @@ -0,0 +1 @@ +../../Task/Hello-world-Text/Coq \ No newline at end of file diff --git a/Lang/Coq/Loops-For b/Lang/Coq/Loops-For new file mode 120000 index 0000000000..b1341b994c --- /dev/null +++ b/Lang/Coq/Loops-For @@ -0,0 +1 @@ +../../Task/Loops-For/Coq \ No newline at end of file diff --git a/Lang/Coq/Tree-traversal b/Lang/Coq/Tree-traversal new file mode 120000 index 0000000000..e38e9a0bdd --- /dev/null +++ b/Lang/Coq/Tree-traversal @@ -0,0 +1 @@ +../../Task/Tree-traversal/Coq \ No newline at end of file diff --git a/Lang/Coq/Variadic-function b/Lang/Coq/Variadic-function new file mode 120000 index 0000000000..391626fb92 --- /dev/null +++ b/Lang/Coq/Variadic-function @@ -0,0 +1 @@ +../../Task/Variadic-function/Coq \ No newline at end of file diff --git a/Lang/Cowgol/Align-columns b/Lang/Cowgol/Align-columns deleted file mode 120000 index 2931644d20..0000000000 --- a/Lang/Cowgol/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/Cowgol \ No newline at end of file diff --git a/Lang/Cowgol/Arithmetic-derivative b/Lang/Cowgol/Arithmetic-derivative deleted file mode 120000 index 5d9cc4afd2..0000000000 --- a/Lang/Cowgol/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Cowgol \ No newline at end of file diff --git a/Lang/Cowgol/Compound-data-type b/Lang/Cowgol/Compound-data-type deleted file mode 120000 index f242ef8856..0000000000 --- a/Lang/Cowgol/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/Cowgol \ No newline at end of file diff --git a/Lang/Cowgol/Display-a-linear-combination b/Lang/Cowgol/Display-a-linear-combination deleted file mode 120000 index 7e169cd6fe..0000000000 --- a/Lang/Cowgol/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Cowgol \ No newline at end of file diff --git a/Lang/Cowgol/Move-to-front-algorithm b/Lang/Cowgol/Move-to-front-algorithm deleted file mode 120000 index 137327f2ab..0000000000 --- a/Lang/Cowgol/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/Cowgol \ No newline at end of file diff --git a/Lang/Cowgol/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Cowgol/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Cowgol/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Cowgol/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Cowgol/UTF-8-encode-and-decode b/Lang/Cowgol/UTF-8-encode-and-decode deleted file mode 120000 index 93ae70053a..0000000000 --- a/Lang/Cowgol/UTF-8-encode-and-decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/UTF-8-encode-and-decode/Cowgol \ No newline at end of file diff --git a/Lang/Crystal/00-LANG.txt b/Lang/Crystal/00-LANG.txt index 2d48345f43..b671a267bf 100644 --- a/Lang/Crystal/00-LANG.txt +++ b/Lang/Crystal/00-LANG.txt @@ -6,8 +6,7 @@ |strength=strong |checking=static |compat=duck -|site=http://crystal-lang.org -|hopl=no, HOPL only has an older "Crystal" language from 1986}} +|site=http://crystal-lang.org}} Crystal is a programming language with the following goals: * Have the same syntax as Ruby, or at least as similar as possible. * Never have to specify the type of a variable or method argument. @@ -15,7 +14,4 @@ Crystal is a programming language with the following goals: * Have compile-time evaluation and generation of code, to avoid boilerplate code. * Compile to efficient native code. -You can ask for help on LiberaChat in the [ircs://irc.libera.chat:6697#crystal-lang #crystal-lang] channel ([https://web.libera.chat/#crystal-lang web]). - -==Tasks not implemented in Crystal== -[[Tasks not implemented in Crystal]] \ No newline at end of file +You can ask for help on Freenode in the #crystal-lang channel. \ No newline at end of file diff --git a/Lang/Crystal/ABC-problem b/Lang/Crystal/ABC-problem deleted file mode 120000 index 4ebb385d2c..0000000000 --- a/Lang/Crystal/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/Crystal \ No newline at end of file diff --git a/Lang/Crystal/ADFGVX-cipher b/Lang/Crystal/ADFGVX-cipher deleted file mode 120000 index 20d511e75f..0000000000 --- a/Lang/Crystal/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/Crystal \ No newline at end of file diff --git a/Lang/Crystal/ASCII-art-diagram-converter b/Lang/Crystal/ASCII-art-diagram-converter deleted file mode 120000 index 0f1238b276..0000000000 --- a/Lang/Crystal/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Abbreviations-automatic b/Lang/Crystal/Abbreviations-automatic deleted file mode 120000 index 356658ce4c..0000000000 --- a/Lang/Crystal/Abbreviations-automatic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-automatic/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Abbreviations-easy b/Lang/Crystal/Abbreviations-easy deleted file mode 120000 index b3a87e7119..0000000000 --- a/Lang/Crystal/Abbreviations-easy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-easy/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Abelian-sandpile-model b/Lang/Crystal/Abelian-sandpile-model deleted file mode 120000 index 8c440adf10..0000000000 --- a/Lang/Crystal/Abelian-sandpile-model +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Abelian-sandpile-model-Identity b/Lang/Crystal/Abelian-sandpile-model-Identity deleted file mode 120000 index ad1df3a714..0000000000 --- a/Lang/Crystal/Abelian-sandpile-model-Identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model-Identity/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Abundant-deficient-and-perfect-number-classifications b/Lang/Crystal/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index 7cba469c21..0000000000 --- a/Lang/Crystal/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Abundant-odd-numbers b/Lang/Crystal/Abundant-odd-numbers deleted file mode 120000 index 3676d5a336..0000000000 --- a/Lang/Crystal/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Achilles-numbers b/Lang/Crystal/Achilles-numbers deleted file mode 120000 index baac6a0487..0000000000 --- a/Lang/Crystal/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Add-a-variable-to-a-class-instance-at-runtime b/Lang/Crystal/Add-a-variable-to-a-class-instance-at-runtime deleted file mode 120000 index 7c0d033962..0000000000 --- a/Lang/Crystal/Add-a-variable-to-a-class-instance-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Add-a-variable-to-a-class-instance-at-runtime/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Address-of-a-variable b/Lang/Crystal/Address-of-a-variable deleted file mode 120000 index 55aa429a76..0000000000 --- a/Lang/Crystal/Address-of-a-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Address-of-a-variable/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Align-columns b/Lang/Crystal/Align-columns deleted file mode 120000 index 2ab766781e..0000000000 --- a/Lang/Crystal/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Aliquot-sequence-classifications b/Lang/Crystal/Aliquot-sequence-classifications deleted file mode 120000 index 7453e5fb67..0000000000 --- a/Lang/Crystal/Aliquot-sequence-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Aliquot-sequence-classifications/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Almost-prime b/Lang/Crystal/Almost-prime deleted file mode 120000 index 782486465b..0000000000 --- a/Lang/Crystal/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Amb b/Lang/Crystal/Amb deleted file mode 120000 index 31a9ff96ef..0000000000 --- a/Lang/Crystal/Amb +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amb/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Anagrams-Deranged-anagrams b/Lang/Crystal/Anagrams-Deranged-anagrams deleted file mode 120000 index 01826ee4a9..0000000000 --- a/Lang/Crystal/Anagrams-Deranged-anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams-Deranged-anagrams/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Angle-difference-between-two-bearings b/Lang/Crystal/Angle-difference-between-two-bearings deleted file mode 120000 index 80eb3d6093..0000000000 --- a/Lang/Crystal/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Angles-geometric-normalization-and-conversion b/Lang/Crystal/Angles-geometric-normalization-and-conversion deleted file mode 120000 index a07d6f6045..0000000000 --- a/Lang/Crystal/Angles-geometric-normalization-and-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angles-geometric-normalization-and-conversion/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Anonymous-recursion b/Lang/Crystal/Anonymous-recursion deleted file mode 120000 index 8266f214bc..0000000000 --- a/Lang/Crystal/Anonymous-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anonymous-recursion/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Append-a-record-to-the-end-of-a-text-file b/Lang/Crystal/Append-a-record-to-the-end-of-a-text-file deleted file mode 120000 index 2a2afc8f9c..0000000000 --- a/Lang/Crystal/Append-a-record-to-the-end-of-a-text-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Append-a-record-to-the-end-of-a-text-file/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Apply-a-digital-filter-direct-form-II-transposed- b/Lang/Crystal/Apply-a-digital-filter-direct-form-II-transposed- deleted file mode 120000 index 4772cfa6a5..0000000000 --- a/Lang/Crystal/Apply-a-digital-filter-direct-form-II-transposed- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-digital-filter-direct-form-II-transposed-/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Approximate-equality b/Lang/Crystal/Approximate-equality deleted file mode 120000 index f45d53cb9c..0000000000 --- a/Lang/Crystal/Approximate-equality +++ /dev/null @@ -1 +0,0 @@ -../../Task/Approximate-equality/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Archimedean-spiral b/Lang/Crystal/Archimedean-spiral deleted file mode 120000 index 38cdafc563..0000000000 --- a/Lang/Crystal/Archimedean-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Archimedean-spiral/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Arithmetic-Complex b/Lang/Crystal/Arithmetic-Complex deleted file mode 120000 index db70676449..0000000000 --- a/Lang/Crystal/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Arithmetic-Rational b/Lang/Crystal/Arithmetic-Rational deleted file mode 120000 index 9934cb69b5..0000000000 --- a/Lang/Crystal/Arithmetic-Rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Rational/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Arithmetic-derivative b/Lang/Crystal/Arithmetic-derivative deleted file mode 120000 index afe551091f..0000000000 --- a/Lang/Crystal/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Arithmetic-evaluation b/Lang/Crystal/Arithmetic-evaluation deleted file mode 120000 index cefbf4e2d9..0000000000 --- a/Lang/Crystal/Arithmetic-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-evaluation/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Arithmetic-geometric-mean b/Lang/Crystal/Arithmetic-geometric-mean deleted file mode 120000 index c8754aa805..0000000000 --- a/Lang/Crystal/Arithmetic-geometric-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Arithmetic-geometric-mean-Calculate-Pi b/Lang/Crystal/Arithmetic-geometric-mean-Calculate-Pi deleted file mode 120000 index b641674514..0000000000 --- a/Lang/Crystal/Arithmetic-geometric-mean-Calculate-Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean-Calculate-Pi/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Arithmetic-numbers b/Lang/Crystal/Arithmetic-numbers deleted file mode 120000 index a07126fc36..0000000000 --- a/Lang/Crystal/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Ascending-primes b/Lang/Crystal/Ascending-primes deleted file mode 120000 index 159e1b5bed..0000000000 --- a/Lang/Crystal/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Atomic-updates b/Lang/Crystal/Atomic-updates deleted file mode 120000 index 332b197fee..0000000000 --- a/Lang/Crystal/Atomic-updates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Atomic-updates/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Attractive-numbers b/Lang/Crystal/Attractive-numbers deleted file mode 120000 index 04e80138ee..0000000000 --- a/Lang/Crystal/Attractive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Attractive-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Average-loop-length b/Lang/Crystal/Average-loop-length deleted file mode 120000 index 06beee4e14..0000000000 --- a/Lang/Crystal/Average-loop-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Average-loop-length/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Averages-Mean-angle b/Lang/Crystal/Averages-Mean-angle deleted file mode 120000 index 8e548785b0..0000000000 --- a/Lang/Crystal/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Averages-Mean-time-of-day b/Lang/Crystal/Averages-Mean-time-of-day deleted file mode 120000 index 4952b673eb..0000000000 --- a/Lang/Crystal/Averages-Mean-time-of-day +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-time-of-day/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Averages-Mode b/Lang/Crystal/Averages-Mode deleted file mode 120000 index bb15fa305b..0000000000 --- a/Lang/Crystal/Averages-Mode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mode/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Averages-Pythagorean-means b/Lang/Crystal/Averages-Pythagorean-means deleted file mode 120000 index a97d5df819..0000000000 --- a/Lang/Crystal/Averages-Pythagorean-means +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Pythagorean-means/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Babbage-problem b/Lang/Crystal/Babbage-problem deleted file mode 120000 index 7e1cc42ea8..0000000000 --- a/Lang/Crystal/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Babylonian-spiral b/Lang/Crystal/Babylonian-spiral deleted file mode 120000 index 7478d85b07..0000000000 --- a/Lang/Crystal/Babylonian-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babylonian-spiral/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bell-numbers b/Lang/Crystal/Bell-numbers deleted file mode 120000 index 3f05e224a6..0000000000 --- a/Lang/Crystal/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bifid-cipher b/Lang/Crystal/Bifid-cipher deleted file mode 120000 index 6b07c1520e..0000000000 --- a/Lang/Crystal/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bin-given-limits b/Lang/Crystal/Bin-given-limits deleted file mode 120000 index 40a049c833..0000000000 --- a/Lang/Crystal/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bioinformatics-Global-alignment b/Lang/Crystal/Bioinformatics-Global-alignment deleted file mode 120000 index b8310a94b2..0000000000 --- a/Lang/Crystal/Bioinformatics-Global-alignment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bioinformatics-Global-alignment/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Biorhythms b/Lang/Crystal/Biorhythms deleted file mode 120000 index adde97b4c1..0000000000 --- a/Lang/Crystal/Biorhythms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Biorhythms/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bitmap-Bresenhams-line-algorithm b/Lang/Crystal/Bitmap-Bresenhams-line-algorithm deleted file mode 120000 index 680f0b15d0..0000000000 --- a/Lang/Crystal/Bitmap-Bresenhams-line-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Bresenhams-line-algorithm/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bitmap-Flood-fill b/Lang/Crystal/Bitmap-Flood-fill deleted file mode 120000 index 82f2b7e4ae..0000000000 --- a/Lang/Crystal/Bitmap-Flood-fill +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Flood-fill/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bitmap-Midpoint-circle-algorithm b/Lang/Crystal/Bitmap-Midpoint-circle-algorithm deleted file mode 120000 index fd45ea7903..0000000000 --- a/Lang/Crystal/Bitmap-Midpoint-circle-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Midpoint-circle-algorithm/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bitmap-Read-a-PPM-file b/Lang/Crystal/Bitmap-Read-a-PPM-file deleted file mode 120000 index 72567511a0..0000000000 --- a/Lang/Crystal/Bitmap-Read-a-PPM-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Read-a-PPM-file/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bitmap-Write-a-PPM-file b/Lang/Crystal/Bitmap-Write-a-PPM-file deleted file mode 120000 index 86ca9711aa..0000000000 --- a/Lang/Crystal/Bitmap-Write-a-PPM-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Write-a-PPM-file/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Bitwise-operations b/Lang/Crystal/Bitwise-operations deleted file mode 120000 index 1a5350f2cc..0000000000 --- a/Lang/Crystal/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/Crystal \ No newline at end of file diff --git a/Lang/Crystal/CUSIP b/Lang/Crystal/CUSIP deleted file mode 120000 index b88441138f..0000000000 --- a/Lang/Crystal/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Camel-case-and-snake-case b/Lang/Crystal/Camel-case-and-snake-case deleted file mode 120000 index 04ca76eb1a..0000000000 --- a/Lang/Crystal/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Catamorphism b/Lang/Crystal/Catamorphism deleted file mode 120000 index 59ec253ef2..0000000000 --- a/Lang/Crystal/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Chaocipher b/Lang/Crystal/Chaocipher deleted file mode 120000 index b200ad768f..0000000000 --- a/Lang/Crystal/Chaocipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaocipher/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Character-codes b/Lang/Crystal/Character-codes deleted file mode 120000 index bd4879b77c..0000000000 --- a/Lang/Crystal/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Cistercian-numerals b/Lang/Crystal/Cistercian-numerals deleted file mode 120000 index b439a8a963..0000000000 --- a/Lang/Crystal/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Closures-Value-capture b/Lang/Crystal/Closures-Value-capture deleted file mode 120000 index f3038be393..0000000000 --- a/Lang/Crystal/Closures-Value-capture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closures-Value-capture/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Color-wheel b/Lang/Crystal/Color-wheel deleted file mode 120000 index b0d2a4f84a..0000000000 --- a/Lang/Crystal/Color-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-wheel/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Colour-bars-Display b/Lang/Crystal/Colour-bars-Display deleted file mode 120000 index 0ec7f62738..0000000000 --- a/Lang/Crystal/Colour-bars-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-bars-Display/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Comma-quibbling b/Lang/Crystal/Comma-quibbling deleted file mode 120000 index 3151a9c58f..0000000000 --- a/Lang/Crystal/Comma-quibbling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comma-quibbling/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Compare-a-list-of-strings b/Lang/Crystal/Compare-a-list-of-strings deleted file mode 120000 index f978784371..0000000000 --- a/Lang/Crystal/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Compile-time-calculation b/Lang/Crystal/Compile-time-calculation deleted file mode 120000 index 306dfbb009..0000000000 --- a/Lang/Crystal/Compile-time-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compile-time-calculation/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Consecutive-primes-with-ascending-or-descending-differences b/Lang/Crystal/Consecutive-primes-with-ascending-or-descending-differences deleted file mode 120000 index 697e7e52cd..0000000000 --- a/Lang/Crystal/Consecutive-primes-with-ascending-or-descending-differences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Consecutive-primes-with-ascending-or-descending-differences/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Convert-seconds-to-compound-duration b/Lang/Crystal/Convert-seconds-to-compound-duration deleted file mode 120000 index 313254bee3..0000000000 --- a/Lang/Crystal/Convert-seconds-to-compound-duration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-seconds-to-compound-duration/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Count-occurrences-of-a-substring b/Lang/Crystal/Count-occurrences-of-a-substring deleted file mode 120000 index f235e95129..0000000000 --- a/Lang/Crystal/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Cullen-and-Woodall-numbers b/Lang/Crystal/Cullen-and-Woodall-numbers deleted file mode 120000 index 62ef13cd07..0000000000 --- a/Lang/Crystal/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Currency b/Lang/Crystal/Currency deleted file mode 120000 index 275fd9dcb2..0000000000 --- a/Lang/Crystal/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Day-of-the-week b/Lang/Crystal/Day-of-the-week deleted file mode 120000 index 0f98ad94ee..0000000000 --- a/Lang/Crystal/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Department-numbers b/Lang/Crystal/Department-numbers deleted file mode 120000 index 1e36b398e9..0000000000 --- a/Lang/Crystal/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Detect-division-by-zero b/Lang/Crystal/Detect-division-by-zero deleted file mode 120000 index d23bedf4f0..0000000000 --- a/Lang/Crystal/Detect-division-by-zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Detect-division-by-zero/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Determine-if-a-string-has-all-the-same-characters b/Lang/Crystal/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index a0bef4d19a..0000000000 --- a/Lang/Crystal/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Determine-if-a-string-is-collapsible b/Lang/Crystal/Determine-if-a-string-is-collapsible deleted file mode 120000 index 7e2d57c2cb..0000000000 --- a/Lang/Crystal/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Determine-if-a-string-is-numeric b/Lang/Crystal/Determine-if-a-string-is-numeric deleted file mode 120000 index 907fa1cc6f..0000000000 --- a/Lang/Crystal/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Determine-sentence-type b/Lang/Crystal/Determine-sentence-type deleted file mode 120000 index 95914c2896..0000000000 --- a/Lang/Crystal/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Digital-root-Multiplicative-digital-root b/Lang/Crystal/Digital-root-Multiplicative-digital-root deleted file mode 120000 index 92366c8b32..0000000000 --- a/Lang/Crystal/Digital-root-Multiplicative-digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root-Multiplicative-digital-root/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Dijkstras-algorithm b/Lang/Crystal/Dijkstras-algorithm deleted file mode 120000 index 829bbaa132..0000000000 --- a/Lang/Crystal/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Diversity-prediction-theorem b/Lang/Crystal/Diversity-prediction-theorem deleted file mode 120000 index bfb6463f86..0000000000 --- a/Lang/Crystal/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Dutch-national-flag-problem b/Lang/Crystal/Dutch-national-flag-problem deleted file mode 120000 index a920e0b89a..0000000000 --- a/Lang/Crystal/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Egyptian-division b/Lang/Crystal/Egyptian-division deleted file mode 120000 index 6766caec22..0000000000 --- a/Lang/Crystal/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Elementary-cellular-automaton b/Lang/Crystal/Elementary-cellular-automaton deleted file mode 120000 index a397b94a1b..0000000000 --- a/Lang/Crystal/Elementary-cellular-automaton +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elementary-cellular-automaton/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Elementary-cellular-automaton-Random-number-generator b/Lang/Crystal/Elementary-cellular-automaton-Random-number-generator deleted file mode 120000 index 6d743a5fc8..0000000000 --- a/Lang/Crystal/Elementary-cellular-automaton-Random-number-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elementary-cellular-automaton-Random-number-generator/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Emirp-primes b/Lang/Crystal/Emirp-primes deleted file mode 120000 index 6a762271db..0000000000 --- a/Lang/Crystal/Emirp-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Emirp-primes/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Empty-program b/Lang/Crystal/Empty-program new file mode 120000 index 0000000000..78e7f559d2 --- /dev/null +++ b/Lang/Crystal/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Enumerations b/Lang/Crystal/Enumerations deleted file mode 120000 index 81276f7ab4..0000000000 --- a/Lang/Crystal/Enumerations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enumerations/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Environment-variables b/Lang/Crystal/Environment-variables deleted file mode 120000 index 17cbcdefee..0000000000 --- a/Lang/Crystal/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Equilibrium-index b/Lang/Crystal/Equilibrium-index deleted file mode 120000 index 1125331aa6..0000000000 --- a/Lang/Crystal/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Ethiopian-multiplication b/Lang/Crystal/Ethiopian-multiplication deleted file mode 120000 index e534df962f..0000000000 --- a/Lang/Crystal/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Evolutionary-algorithm b/Lang/Crystal/Evolutionary-algorithm deleted file mode 120000 index a0bcba6242..0000000000 --- a/Lang/Crystal/Evolutionary-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evolutionary-algorithm/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Execute-Brain- b/Lang/Crystal/Execute-Brain- deleted file mode 120000 index 4ffee47edd..0000000000 --- a/Lang/Crystal/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Exponentiation-order b/Lang/Crystal/Exponentiation-order deleted file mode 120000 index e7f6547257..0000000000 --- a/Lang/Crystal/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Exponentiation-with-infix-operators-in-or-operating-on-the-base b/Lang/Crystal/Exponentiation-with-infix-operators-in-or-operating-on-the-base deleted file mode 120000 index bea2082efb..0000000000 --- a/Lang/Crystal/Exponentiation-with-infix-operators-in-or-operating-on-the-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-with-infix-operators-in-or-operating-on-the-base/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Extensible-prime-generator b/Lang/Crystal/Extensible-prime-generator deleted file mode 120000 index f7e46afa3d..0000000000 --- a/Lang/Crystal/Extensible-prime-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extensible-prime-generator/Crystal \ No newline at end of file diff --git a/Lang/Crystal/File-extension-is-in-extensions-list b/Lang/Crystal/File-extension-is-in-extensions-list deleted file mode 120000 index d3f5d5ad97..0000000000 --- a/Lang/Crystal/File-extension-is-in-extensions-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-extension-is-in-extensions-list/Crystal \ No newline at end of file diff --git a/Lang/Crystal/File-modification-time b/Lang/Crystal/File-modification-time deleted file mode 120000 index b3a7e1065d..0000000000 --- a/Lang/Crystal/File-modification-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-modification-time/Crystal \ No newline at end of file diff --git a/Lang/Crystal/File-size b/Lang/Crystal/File-size deleted file mode 120000 index f7ccd8930e..0000000000 --- a/Lang/Crystal/File-size +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-size/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Filter b/Lang/Crystal/Filter deleted file mode 120000 index 13d5962733..0000000000 --- a/Lang/Crystal/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Find-if-a-point-is-within-a-triangle b/Lang/Crystal/Find-if-a-point-is-within-a-triangle deleted file mode 120000 index a3ff575d32..0000000000 --- a/Lang/Crystal/Find-if-a-point-is-within-a-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-if-a-point-is-within-a-triangle/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Find-the-last-Sunday-of-each-month b/Lang/Crystal/Find-the-last-Sunday-of-each-month deleted file mode 120000 index b7448c15e3..0000000000 --- a/Lang/Crystal/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/Crystal \ No newline at end of file diff --git a/Lang/Crystal/First-class-functions b/Lang/Crystal/First-class-functions deleted file mode 120000 index 41628a5683..0000000000 --- a/Lang/Crystal/First-class-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Five-weekends b/Lang/Crystal/Five-weekends deleted file mode 120000 index aee26e19f7..0000000000 --- a/Lang/Crystal/Five-weekends +++ /dev/null @@ -1 +0,0 @@ -../../Task/Five-weekends/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Four-is-magic b/Lang/Crystal/Four-is-magic deleted file mode 120000 index e56a866dc3..0000000000 --- a/Lang/Crystal/Four-is-magic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Four-is-magic/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Function-definition b/Lang/Crystal/Function-definition deleted file mode 120000 index 1fac36efe3..0000000000 --- a/Lang/Crystal/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Generate-lower-case-ASCII-alphabet b/Lang/Crystal/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 8b481efdf1..0000000000 --- a/Lang/Crystal/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Generator-Exponential b/Lang/Crystal/Generator-Exponential deleted file mode 120000 index d9c996b99e..0000000000 --- a/Lang/Crystal/Generator-Exponential +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generator-Exponential/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Get-system-command-output b/Lang/Crystal/Get-system-command-output deleted file mode 120000 index 75fcf73ed6..0000000000 --- a/Lang/Crystal/Get-system-command-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Get-system-command-output/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Greatest-common-divisor b/Lang/Crystal/Greatest-common-divisor deleted file mode 120000 index cac765e22c..0000000000 --- a/Lang/Crystal/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Hello-world-Newline-omission b/Lang/Crystal/Hello-world-Newline-omission deleted file mode 120000 index cf00f3e8a9..0000000000 --- a/Lang/Crystal/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Hello-world-Standard-error b/Lang/Crystal/Hello-world-Standard-error deleted file mode 120000 index 560e23c97c..0000000000 --- a/Lang/Crystal/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Hex-words b/Lang/Crystal/Hex-words deleted file mode 120000 index 1390f8d3e3..0000000000 --- a/Lang/Crystal/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Hofstadter-Q-sequence b/Lang/Crystal/Hofstadter-Q-sequence deleted file mode 120000 index a856d63c6d..0000000000 --- a/Lang/Crystal/Hofstadter-Q-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Q-sequence/Crystal \ No newline at end of file diff --git a/Lang/Crystal/ISBN13-check-digit b/Lang/Crystal/ISBN13-check-digit deleted file mode 120000 index eedbc71ec1..0000000000 --- a/Lang/Crystal/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Idiomatically-determine-all-the-lowercase-and-uppercase-letters b/Lang/Crystal/Idiomatically-determine-all-the-lowercase-and-uppercase-letters deleted file mode 120000 index 9e0f4e23b4..0000000000 --- a/Lang/Crystal/Idiomatically-determine-all-the-lowercase-and-uppercase-letters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Increment-a-numerical-string b/Lang/Crystal/Increment-a-numerical-string deleted file mode 120000 index aeae95c765..0000000000 --- a/Lang/Crystal/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Input-loop b/Lang/Crystal/Input-loop deleted file mode 120000 index 27bc4f9208..0000000000 --- a/Lang/Crystal/Input-loop +++ /dev/null @@ -1 +0,0 @@ -../../Task/Input-loop/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Integer-comparison b/Lang/Crystal/Integer-comparison deleted file mode 120000 index 1d8d9443a7..0000000000 --- a/Lang/Crystal/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Integer-overflow b/Lang/Crystal/Integer-overflow deleted file mode 120000 index 868816b94b..0000000000 --- a/Lang/Crystal/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Interactive-programming-repl- b/Lang/Crystal/Interactive-programming-repl- deleted file mode 120000 index 348f845b57..0000000000 --- a/Lang/Crystal/Interactive-programming-repl- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Interactive-programming-repl-/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Inverted-syntax b/Lang/Crystal/Inverted-syntax deleted file mode 120000 index 33eb9c0c4b..0000000000 --- a/Lang/Crystal/Inverted-syntax +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inverted-syntax/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Isograms-and-heterograms b/Lang/Crystal/Isograms-and-heterograms deleted file mode 120000 index 46dc26699c..0000000000 --- a/Lang/Crystal/Isograms-and-heterograms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isograms-and-heterograms/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Isqrt-integer-square-root-of-X b/Lang/Crystal/Isqrt-integer-square-root-of-X deleted file mode 120000 index d671dd4e29..0000000000 --- a/Lang/Crystal/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Jacobsthal-numbers b/Lang/Crystal/Jacobsthal-numbers deleted file mode 120000 index da4fc1eede..0000000000 --- a/Lang/Crystal/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Kernighans-large-earthquake-problem b/Lang/Crystal/Kernighans-large-earthquake-problem deleted file mode 120000 index d6f60d2a2c..0000000000 --- a/Lang/Crystal/Kernighans-large-earthquake-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kernighans-large-earthquake-problem/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Knuths-algorithm-S b/Lang/Crystal/Knuths-algorithm-S deleted file mode 120000 index fbde0f33c9..0000000000 --- a/Lang/Crystal/Knuths-algorithm-S +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-algorithm-S/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Langtons-ant b/Lang/Crystal/Langtons-ant deleted file mode 120000 index accd634e59..0000000000 --- a/Lang/Crystal/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Last-Friday-of-each-month b/Lang/Crystal/Last-Friday-of-each-month deleted file mode 120000 index 5dd6eb4e30..0000000000 --- a/Lang/Crystal/Last-Friday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-Friday-of-each-month/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Least-common-multiple b/Lang/Crystal/Least-common-multiple deleted file mode 120000 index ab85fbea40..0000000000 --- a/Lang/Crystal/Least-common-multiple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Least-common-multiple/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Letter-frequency b/Lang/Crystal/Letter-frequency deleted file mode 120000 index 9aed428d1c..0000000000 --- a/Lang/Crystal/Letter-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Letter-frequency/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Logical-operations b/Lang/Crystal/Logical-operations deleted file mode 120000 index efa5e278dd..0000000000 --- a/Lang/Crystal/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Logistic-curve-fitting-in-epidemiology b/Lang/Crystal/Logistic-curve-fitting-in-epidemiology deleted file mode 120000 index c8d098d82a..0000000000 --- a/Lang/Crystal/Logistic-curve-fitting-in-epidemiology +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logistic-curve-fitting-in-epidemiology/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Long-year b/Lang/Crystal/Long-year deleted file mode 120000 index 2a978e84d7..0000000000 --- a/Lang/Crystal/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Longest-string-challenge b/Lang/Crystal/Longest-string-challenge deleted file mode 120000 index 8a9ac3dfd0..0000000000 --- a/Lang/Crystal/Longest-string-challenge +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-string-challenge/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Loops-Do-while b/Lang/Crystal/Loops-Do-while deleted file mode 120000 index 16d73545fb..0000000000 --- a/Lang/Crystal/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Loops-Foreach b/Lang/Crystal/Loops-Foreach deleted file mode 120000 index c20a1c8c2c..0000000000 --- a/Lang/Crystal/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Loops-N-plus-one-half b/Lang/Crystal/Loops-N-plus-one-half deleted file mode 120000 index baee612204..0000000000 --- a/Lang/Crystal/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Loops-With-multiple-ranges b/Lang/Crystal/Loops-With-multiple-ranges deleted file mode 120000 index a0c34f1c73..0000000000 --- a/Lang/Crystal/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Loops-Wrong-ranges b/Lang/Crystal/Loops-Wrong-ranges deleted file mode 120000 index 402c2c3d6b..0000000000 --- a/Lang/Crystal/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Magic-8-ball b/Lang/Crystal/Magic-8-ball deleted file mode 120000 index 7694de9dbd..0000000000 --- a/Lang/Crystal/Magic-8-ball +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-8-ball/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Magnanimous-numbers b/Lang/Crystal/Magnanimous-numbers deleted file mode 120000 index f025f31b2f..0000000000 --- a/Lang/Crystal/Magnanimous-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magnanimous-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Map-range b/Lang/Crystal/Map-range deleted file mode 120000 index 2ce80c8e32..0000000000 --- a/Lang/Crystal/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Middle-three-digits b/Lang/Crystal/Middle-three-digits deleted file mode 120000 index c195484a68..0000000000 --- a/Lang/Crystal/Middle-three-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Middle-three-digits/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Miller-Rabin-primality-test b/Lang/Crystal/Miller-Rabin-primality-test new file mode 120000 index 0000000000..3714050251 --- /dev/null +++ b/Lang/Crystal/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Move-to-front-algorithm b/Lang/Crystal/Move-to-front-algorithm deleted file mode 120000 index 1fc15ab4a7..0000000000 --- a/Lang/Crystal/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Narcissistic-decimal-number b/Lang/Crystal/Narcissistic-decimal-number deleted file mode 120000 index 7713050610..0000000000 --- a/Lang/Crystal/Narcissistic-decimal-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Narcissistic-decimal-number/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Nested-function b/Lang/Crystal/Nested-function deleted file mode 120000 index 4453485348..0000000000 --- a/Lang/Crystal/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Non-decimal-radices-Convert b/Lang/Crystal/Non-decimal-radices-Convert deleted file mode 120000 index 342df0f845..0000000000 --- a/Lang/Crystal/Non-decimal-radices-Convert +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-decimal-radices-Convert/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Number-names b/Lang/Crystal/Number-names deleted file mode 120000 index 65ddc62215..0000000000 --- a/Lang/Crystal/Number-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Number-names/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Numbers-with-equal-rises-and-falls b/Lang/Crystal/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 6aa2426e57..0000000000 --- a/Lang/Crystal/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Crystal \ No newline at end of file diff --git a/Lang/Crystal/One-dimensional-cellular-automata b/Lang/Crystal/One-dimensional-cellular-automata deleted file mode 120000 index e519134b4d..0000000000 --- a/Lang/Crystal/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Order-by-pair-comparisons b/Lang/Crystal/Order-by-pair-comparisons deleted file mode 120000 index 7f819e26a0..0000000000 --- a/Lang/Crystal/Order-by-pair-comparisons +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-by-pair-comparisons/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Order-two-numerical-lists b/Lang/Crystal/Order-two-numerical-lists deleted file mode 120000 index 44bdc040e5..0000000000 --- a/Lang/Crystal/Order-two-numerical-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-two-numerical-lists/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Ordered-words b/Lang/Crystal/Ordered-words deleted file mode 120000 index 52c1bed5c6..0000000000 --- a/Lang/Crystal/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Palindrome-dates b/Lang/Crystal/Palindrome-dates deleted file mode 120000 index e9d9714cac..0000000000 --- a/Lang/Crystal/Palindrome-dates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-dates/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Parallel-brute-force b/Lang/Crystal/Parallel-brute-force deleted file mode 120000 index 496ce76b45..0000000000 --- a/Lang/Crystal/Parallel-brute-force +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parallel-brute-force/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Parse-an-IP-Address b/Lang/Crystal/Parse-an-IP-Address deleted file mode 120000 index 940d156ab2..0000000000 --- a/Lang/Crystal/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Parsing-RPN-calculator-algorithm b/Lang/Crystal/Parsing-RPN-calculator-algorithm deleted file mode 120000 index 79e0e2ae7e..0000000000 --- a/Lang/Crystal/Parsing-RPN-calculator-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-calculator-algorithm/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Parsing-RPN-to-infix-conversion b/Lang/Crystal/Parsing-RPN-to-infix-conversion deleted file mode 120000 index e19adc6368..0000000000 --- a/Lang/Crystal/Parsing-RPN-to-infix-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-to-infix-conversion/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Parsing-Shunting-yard-algorithm b/Lang/Crystal/Parsing-Shunting-yard-algorithm deleted file mode 120000 index a18ff957d5..0000000000 --- a/Lang/Crystal/Parsing-Shunting-yard-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-Shunting-yard-algorithm/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Partial-function-application b/Lang/Crystal/Partial-function-application deleted file mode 120000 index 06b96bb5bb..0000000000 --- a/Lang/Crystal/Partial-function-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partial-function-application/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Perfect-numbers b/Lang/Crystal/Perfect-numbers deleted file mode 120000 index 708a2045e2..0000000000 --- a/Lang/Crystal/Perfect-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Phrase-reversals b/Lang/Crystal/Phrase-reversals deleted file mode 120000 index 7a12cc6718..0000000000 --- a/Lang/Crystal/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Power-set b/Lang/Crystal/Power-set deleted file mode 120000 index 0fd70fd5b9..0000000000 --- a/Lang/Crystal/Power-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Power-set/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Priority-queue b/Lang/Crystal/Priority-queue deleted file mode 120000 index 4f7dddb139..0000000000 --- a/Lang/Crystal/Priority-queue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Priority-queue/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Program-name b/Lang/Crystal/Program-name deleted file mode 120000 index 0398fe1a1e..0000000000 --- a/Lang/Crystal/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Quaternion-type b/Lang/Crystal/Quaternion-type new file mode 120000 index 0000000000..5a28c33333 --- /dev/null +++ b/Lang/Crystal/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Random-sentence-from-book b/Lang/Crystal/Random-sentence-from-book deleted file mode 120000 index 916a4913b6..0000000000 --- a/Lang/Crystal/Random-sentence-from-book +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-sentence-from-book/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Range-extraction b/Lang/Crystal/Range-extraction deleted file mode 120000 index 984878874c..0000000000 --- a/Lang/Crystal/Range-extraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-extraction/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Regular-expressions b/Lang/Crystal/Regular-expressions deleted file mode 120000 index 1e1b324d69..0000000000 --- a/Lang/Crystal/Regular-expressions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Regular-expressions/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Repeat b/Lang/Crystal/Repeat deleted file mode 120000 index cbbc5973da..0000000000 --- a/Lang/Crystal/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Return-multiple-values b/Lang/Crystal/Return-multiple-values deleted file mode 120000 index df0883e4b0..0000000000 --- a/Lang/Crystal/Return-multiple-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Return-multiple-values/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Reverse-words-in-a-string b/Lang/Crystal/Reverse-words-in-a-string deleted file mode 120000 index 44576bae9a..0000000000 --- a/Lang/Crystal/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Rosetta-Code-Rank-languages-by-popularity b/Lang/Crystal/Rosetta-Code-Rank-languages-by-popularity deleted file mode 120000 index 69fe9e65d5..0000000000 --- a/Lang/Crystal/Rosetta-Code-Rank-languages-by-popularity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Rank-languages-by-popularity/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Rot-13 b/Lang/Crystal/Rot-13 deleted file mode 120000 index 430011bd06..0000000000 --- a/Lang/Crystal/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Run-length-encoding b/Lang/Crystal/Run-length-encoding deleted file mode 120000 index 1a2b6b241a..0000000000 --- a/Lang/Crystal/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Search-a-list b/Lang/Crystal/Search-a-list deleted file mode 120000 index 975cbb3120..0000000000 --- a/Lang/Crystal/Search-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sequence-of-non-squares b/Lang/Crystal/Sequence-of-non-squares deleted file mode 120000 index 4854c5c8ce..0000000000 --- a/Lang/Crystal/Sequence-of-non-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-non-squares/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Set b/Lang/Crystal/Set deleted file mode 120000 index 09e0457880..0000000000 --- a/Lang/Crystal/Set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Short-circuit-evaluation b/Lang/Crystal/Short-circuit-evaluation deleted file mode 120000 index 42f8d1e06a..0000000000 --- a/Lang/Crystal/Short-circuit-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Short-circuit-evaluation/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Simple-database b/Lang/Crystal/Simple-database deleted file mode 120000 index 91a24ce202..0000000000 --- a/Lang/Crystal/Simple-database +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-database/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Singly-linked-list-Element-definition b/Lang/Crystal/Singly-linked-list-Element-definition deleted file mode 120000 index 1c9a4e215c..0000000000 --- a/Lang/Crystal/Singly-linked-list-Element-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-definition/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Singly-linked-list-Element-insertion b/Lang/Crystal/Singly-linked-list-Element-insertion deleted file mode 120000 index e0de17b549..0000000000 --- a/Lang/Crystal/Singly-linked-list-Element-insertion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-insertion/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Singly-linked-list-Traversal b/Lang/Crystal/Singly-linked-list-Traversal deleted file mode 120000 index e89e5d42db..0000000000 --- a/Lang/Crystal/Singly-linked-list-Traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Traversal/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sleep b/Lang/Crystal/Sleep deleted file mode 120000 index 1648e77b82..0000000000 --- a/Lang/Crystal/Sleep +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleep/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sleeping-Beauty-problem b/Lang/Crystal/Sleeping-Beauty-problem deleted file mode 120000 index 50b43e53b7..0000000000 --- a/Lang/Crystal/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Soloways-recurring-rainfall b/Lang/Crystal/Soloways-recurring-rainfall deleted file mode 120000 index 017187c230..0000000000 --- a/Lang/Crystal/Soloways-recurring-rainfall +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soloways-recurring-rainfall/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sort-a-list-of-object-identifiers b/Lang/Crystal/Sort-a-list-of-object-identifiers deleted file mode 120000 index 2b599d3df1..0000000000 --- a/Lang/Crystal/Sort-a-list-of-object-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-a-list-of-object-identifiers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sort-an-array-of-composite-structures b/Lang/Crystal/Sort-an-array-of-composite-structures deleted file mode 120000 index 5ea781aef9..0000000000 --- a/Lang/Crystal/Sort-an-array-of-composite-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-array-of-composite-structures/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sort-disjoint-sublist b/Lang/Crystal/Sort-disjoint-sublist deleted file mode 120000 index a252445ff4..0000000000 --- a/Lang/Crystal/Sort-disjoint-sublist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-disjoint-sublist/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sort-numbers-lexicographically b/Lang/Crystal/Sort-numbers-lexicographically deleted file mode 120000 index 884dc88521..0000000000 --- a/Lang/Crystal/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sort-three-variables b/Lang/Crystal/Sort-three-variables deleted file mode 120000 index e206daaf02..0000000000 --- a/Lang/Crystal/Sort-three-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-three-variables/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sort-using-a-custom-comparator b/Lang/Crystal/Sort-using-a-custom-comparator deleted file mode 120000 index 0614ceb188..0000000000 --- a/Lang/Crystal/Sort-using-a-custom-comparator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-using-a-custom-comparator/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sorting-algorithms-Bubble-sort b/Lang/Crystal/Sorting-algorithms-Bubble-sort deleted file mode 120000 index 88a150acfe..0000000000 --- a/Lang/Crystal/Sorting-algorithms-Bubble-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bubble-sort/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sorting-algorithms-Stooge-sort b/Lang/Crystal/Sorting-algorithms-Stooge-sort deleted file mode 120000 index 9882d0a5e5..0000000000 --- a/Lang/Crystal/Sorting-algorithms-Stooge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Stooge-sort/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sparkline-in-unicode b/Lang/Crystal/Sparkline-in-unicode deleted file mode 120000 index 986b27240a..0000000000 --- a/Lang/Crystal/Sparkline-in-unicode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sparkline-in-unicode/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Spelling-of-ordinal-numbers b/Lang/Crystal/Spelling-of-ordinal-numbers deleted file mode 120000 index 68e66511d0..0000000000 --- a/Lang/Crystal/Spelling-of-ordinal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spelling-of-ordinal-numbers/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Split-a-character-string-based-on-change-of-character b/Lang/Crystal/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 874feaced9..0000000000 --- a/Lang/Crystal/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Stack-traces b/Lang/Crystal/Stack-traces deleted file mode 120000 index 9cc8cddb52..0000000000 --- a/Lang/Crystal/Stack-traces +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack-traces/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Stem-and-leaf-plot b/Lang/Crystal/Stem-and-leaf-plot deleted file mode 120000 index 4fac378f12..0000000000 --- a/Lang/Crystal/Stem-and-leaf-plot +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stem-and-leaf-plot/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Stirling-numbers-of-the-first-kind b/Lang/Crystal/Stirling-numbers-of-the-first-kind deleted file mode 120000 index 8a52252a36..0000000000 --- a/Lang/Crystal/Stirling-numbers-of-the-first-kind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stirling-numbers-of-the-first-kind/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Straddling-checkerboard b/Lang/Crystal/Straddling-checkerboard deleted file mode 120000 index 1550d42cee..0000000000 --- a/Lang/Crystal/Straddling-checkerboard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Straddling-checkerboard/Crystal \ No newline at end of file diff --git a/Lang/Crystal/String-append b/Lang/Crystal/String-append deleted file mode 120000 index 4f16bddd70..0000000000 --- a/Lang/Crystal/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/Crystal \ No newline at end of file diff --git a/Lang/Crystal/String-concatenation b/Lang/Crystal/String-concatenation deleted file mode 120000 index 1237b70607..0000000000 --- a/Lang/Crystal/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Crystal \ No newline at end of file diff --git a/Lang/Crystal/String-interpolation-included- b/Lang/Crystal/String-interpolation-included- deleted file mode 120000 index 05bff0aabd..0000000000 --- a/Lang/Crystal/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/Crystal \ No newline at end of file diff --git a/Lang/Crystal/String-matching b/Lang/Crystal/String-matching deleted file mode 120000 index 439dd1fa36..0000000000 --- a/Lang/Crystal/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/Crystal \ No newline at end of file diff --git a/Lang/Crystal/String-prepend b/Lang/Crystal/String-prepend deleted file mode 120000 index 2c5c171e4c..0000000000 --- a/Lang/Crystal/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Strip-a-set-of-characters-from-a-string b/Lang/Crystal/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index 7c09aa4ce1..0000000000 --- a/Lang/Crystal/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Strip-block-comments b/Lang/Crystal/Strip-block-comments deleted file mode 120000 index 2a4303ed27..0000000000 --- a/Lang/Crystal/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Strip-comments-from-a-string b/Lang/Crystal/Strip-comments-from-a-string deleted file mode 120000 index bf4a72832d..0000000000 --- a/Lang/Crystal/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Strip-control-codes-and-extended-characters-from-a-string b/Lang/Crystal/Strip-control-codes-and-extended-characters-from-a-string deleted file mode 120000 index 2831009e2a..0000000000 --- a/Lang/Crystal/Strip-control-codes-and-extended-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-control-codes-and-extended-characters-from-a-string/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Substring-Top-and-tail b/Lang/Crystal/Substring-Top-and-tail deleted file mode 120000 index d3af8a2b7f..0000000000 --- a/Lang/Crystal/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sudan-function b/Lang/Crystal/Sudan-function deleted file mode 120000 index a75bf5defc..0000000000 --- a/Lang/Crystal/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sum-to-100 b/Lang/Crystal/Sum-to-100 deleted file mode 120000 index 02859f9ab7..0000000000 --- a/Lang/Crystal/Sum-to-100 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-to-100/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Summarize-and-say-sequence b/Lang/Crystal/Summarize-and-say-sequence deleted file mode 120000 index ac69b16598..0000000000 --- a/Lang/Crystal/Summarize-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-and-say-sequence/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Sylvesters-sequence b/Lang/Crystal/Sylvesters-sequence deleted file mode 120000 index cd026cc33a..0000000000 --- a/Lang/Crystal/Sylvesters-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sylvesters-sequence/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Symmetric-difference b/Lang/Crystal/Symmetric-difference deleted file mode 120000 index 566657d82c..0000000000 --- a/Lang/Crystal/Symmetric-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Symmetric-difference/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Take-notes-on-the-command-line b/Lang/Crystal/Take-notes-on-the-command-line deleted file mode 120000 index e978486e4d..0000000000 --- a/Lang/Crystal/Take-notes-on-the-command-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Take-notes-on-the-command-line/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Temperature-conversion b/Lang/Crystal/Temperature-conversion deleted file mode 120000 index d97258c24c..0000000000 --- a/Lang/Crystal/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Ternary-logic b/Lang/Crystal/Ternary-logic deleted file mode 120000 index adfcdc28dd..0000000000 --- a/Lang/Crystal/Ternary-logic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ternary-logic/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Textonyms b/Lang/Crystal/Textonyms deleted file mode 120000 index e9c8a3c5ec..0000000000 --- a/Lang/Crystal/Textonyms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Textonyms/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Towers-of-Hanoi b/Lang/Crystal/Towers-of-Hanoi deleted file mode 120000 index 49ee652bdd..0000000000 --- a/Lang/Crystal/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Transliterate-English-text-using-the-Greek-alphabet b/Lang/Crystal/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index cb70d2aa14..0000000000 --- a/Lang/Crystal/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Truncate-a-file b/Lang/Crystal/Truncate-a-file deleted file mode 120000 index a75ef5468d..0000000000 --- a/Lang/Crystal/Truncate-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncate-a-file/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Truth-table b/Lang/Crystal/Truth-table deleted file mode 120000 index 7f3aa2a526..0000000000 --- a/Lang/Crystal/Truth-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truth-table/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Twos-complement b/Lang/Crystal/Twos-complement deleted file mode 120000 index 2272e1c36b..0000000000 --- a/Lang/Crystal/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Crystal \ No newline at end of file diff --git a/Lang/Crystal/UPC b/Lang/Crystal/UPC deleted file mode 120000 index b4d8d405f7..0000000000 --- a/Lang/Crystal/UPC +++ /dev/null @@ -1 +0,0 @@ -../../Task/UPC/Crystal \ No newline at end of file diff --git a/Lang/Crystal/UTF-8-encode-and-decode b/Lang/Crystal/UTF-8-encode-and-decode deleted file mode 120000 index acebf418fa..0000000000 --- a/Lang/Crystal/UTF-8-encode-and-decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/UTF-8-encode-and-decode/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Van-der-Corput-sequence b/Lang/Crystal/Van-der-Corput-sequence deleted file mode 120000 index c9bba5d9e9..0000000000 --- a/Lang/Crystal/Van-der-Corput-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-der-Corput-sequence/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Variable-length-quantity b/Lang/Crystal/Variable-length-quantity deleted file mode 120000 index 4664ff0cf8..0000000000 --- a/Lang/Crystal/Variable-length-quantity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-length-quantity/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Vector b/Lang/Crystal/Vector deleted file mode 120000 index eff97fd6f9..0000000000 --- a/Lang/Crystal/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Wagstaff-primes b/Lang/Crystal/Wagstaff-primes deleted file mode 120000 index ce243d1192..0000000000 --- a/Lang/Crystal/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Wordiff b/Lang/Crystal/Wordiff deleted file mode 120000 index fcf6f8935c..0000000000 --- a/Lang/Crystal/Wordiff +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wordiff/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Write-entire-file b/Lang/Crystal/Write-entire-file deleted file mode 120000 index f56680457a..0000000000 --- a/Lang/Crystal/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Write-language-name-in-3D-ASCII b/Lang/Crystal/Write-language-name-in-3D-ASCII deleted file mode 120000 index 668585ccef..0000000000 --- a/Lang/Crystal/Write-language-name-in-3D-ASCII +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-language-name-in-3D-ASCII/Crystal \ No newline at end of file diff --git a/Lang/Crystal/XML-Input b/Lang/Crystal/XML-Input deleted file mode 120000 index 186294c638..0000000000 --- a/Lang/Crystal/XML-Input +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-Input/Crystal \ No newline at end of file diff --git a/Lang/Crystal/XML-XPath b/Lang/Crystal/XML-XPath deleted file mode 120000 index cc58f19135..0000000000 --- a/Lang/Crystal/XML-XPath +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-XPath/Crystal \ No newline at end of file diff --git a/Lang/Crystal/Yellowstone-sequence b/Lang/Crystal/Yellowstone-sequence deleted file mode 120000 index e0ffb2052b..0000000000 --- a/Lang/Crystal/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/Crystal \ No newline at end of file diff --git a/Lang/D/Find-Chess960-starting-position-identifier b/Lang/D/Find-Chess960-starting-position-identifier deleted file mode 120000 index 79e07139b9..0000000000 --- a/Lang/D/Find-Chess960-starting-position-identifier +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-Chess960-starting-position-identifier/D \ No newline at end of file diff --git a/Lang/D/Miller-Rabin-primality-test b/Lang/D/Miller-Rabin-primality-test new file mode 120000 index 0000000000..407bdbfce4 --- /dev/null +++ b/Lang/D/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/D \ No newline at end of file diff --git a/Lang/D/Quaternion-type b/Lang/D/Quaternion-type new file mode 120000 index 0000000000..4703070a3f --- /dev/null +++ b/Lang/D/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/D \ No newline at end of file diff --git a/Lang/D/Sequence:-nth-number-with-exactly-n-divisors b/Lang/D/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/D/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/D/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/D/Sorting-Algorithms-Circle-Sort b/Lang/D/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..950d2a1c8c --- /dev/null +++ b/Lang/D/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/D \ No newline at end of file diff --git a/Lang/Dart/15-puzzle-solver b/Lang/Dart/15-puzzle-solver deleted file mode 120000 index 9e8e216a39..0000000000 --- a/Lang/Dart/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/Dart \ No newline at end of file diff --git a/Lang/Dart/24-game-Solve b/Lang/Dart/24-game-Solve deleted file mode 120000 index ae64875d6c..0000000000 --- a/Lang/Dart/24-game-Solve +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game-Solve/Dart \ No newline at end of file diff --git a/Lang/Dart/AVL-tree b/Lang/Dart/AVL-tree deleted file mode 120000 index 00bc5f9c2f..0000000000 --- a/Lang/Dart/AVL-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/AVL-tree/Dart \ No newline at end of file diff --git a/Lang/Dart/Benfords-law b/Lang/Dart/Benfords-law deleted file mode 120000 index bccac375ec..0000000000 --- a/Lang/Dart/Benfords-law +++ /dev/null @@ -1 +0,0 @@ -../../Task/Benfords-law/Dart \ No newline at end of file diff --git a/Lang/Dart/Boyer-Moore-string-search b/Lang/Dart/Boyer-Moore-string-search deleted file mode 120000 index 8b8a6a6060..0000000000 --- a/Lang/Dart/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Dart \ No newline at end of file diff --git a/Lang/Dart/Break-OO-privacy b/Lang/Dart/Break-OO-privacy deleted file mode 120000 index e07e79a6ca..0000000000 --- a/Lang/Dart/Break-OO-privacy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Break-OO-privacy/Dart \ No newline at end of file diff --git a/Lang/Dart/Character-codes b/Lang/Dart/Character-codes deleted file mode 120000 index eee070c4f5..0000000000 --- a/Lang/Dart/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/Dart \ No newline at end of file diff --git a/Lang/Dart/Continued-fraction b/Lang/Dart/Continued-fraction deleted file mode 120000 index ea5b665958..0000000000 --- a/Lang/Dart/Continued-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction/Dart \ No newline at end of file diff --git a/Lang/Dart/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/Dart/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- deleted file mode 120000 index eb55960eb5..0000000000 --- a/Lang/Dart/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/Dart \ No newline at end of file diff --git a/Lang/Dart/Cullen-and-Woodall-numbers b/Lang/Dart/Cullen-and-Woodall-numbers deleted file mode 120000 index 573f34cd4f..0000000000 --- a/Lang/Dart/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/Dart \ No newline at end of file diff --git a/Lang/Dart/Day-of-the-week b/Lang/Dart/Day-of-the-week deleted file mode 120000 index 15dd0e18f6..0000000000 --- a/Lang/Dart/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Dart \ No newline at end of file diff --git a/Lang/Dart/De-Bruijn-sequences b/Lang/Dart/De-Bruijn-sequences deleted file mode 120000 index f7a9a5e2e1..0000000000 --- a/Lang/Dart/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/Dart \ No newline at end of file diff --git a/Lang/Dart/Determine-sentence-type b/Lang/Dart/Determine-sentence-type deleted file mode 120000 index cbfbfb1793..0000000000 --- a/Lang/Dart/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Dart \ No newline at end of file diff --git a/Lang/Dart/Dijkstras-algorithm b/Lang/Dart/Dijkstras-algorithm deleted file mode 120000 index fc7b73a06b..0000000000 --- a/Lang/Dart/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/Dart \ No newline at end of file diff --git a/Lang/Dart/Diversity-prediction-theorem b/Lang/Dart/Diversity-prediction-theorem deleted file mode 120000 index 525bb8c4cf..0000000000 --- a/Lang/Dart/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Dart \ No newline at end of file diff --git a/Lang/Dart/Floyd-Warshall-algorithm b/Lang/Dart/Floyd-Warshall-algorithm deleted file mode 120000 index 34dc98809b..0000000000 --- a/Lang/Dart/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/Dart \ No newline at end of file diff --git a/Lang/Dart/Generate-lower-case-ASCII-alphabet b/Lang/Dart/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 947014123e..0000000000 --- a/Lang/Dart/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/Dart \ No newline at end of file diff --git a/Lang/Dart/Iterated-digits-squaring b/Lang/Dart/Iterated-digits-squaring deleted file mode 120000 index 87955b71c0..0000000000 --- a/Lang/Dart/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/Dart \ No newline at end of file diff --git a/Lang/Dart/Jensens-Device b/Lang/Dart/Jensens-Device deleted file mode 120000 index 973fbf791f..0000000000 --- a/Lang/Dart/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/Dart \ No newline at end of file diff --git a/Lang/Dart/Jewels-and-stones b/Lang/Dart/Jewels-and-stones deleted file mode 120000 index 8673bcd41d..0000000000 --- a/Lang/Dart/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Dart \ No newline at end of file diff --git a/Lang/Dart/K-d-tree b/Lang/Dart/K-d-tree deleted file mode 120000 index 4b4a8013e5..0000000000 --- a/Lang/Dart/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/Dart \ No newline at end of file diff --git a/Lang/Dart/Leonardo-numbers b/Lang/Dart/Leonardo-numbers deleted file mode 120000 index 93d2f002c1..0000000000 --- a/Lang/Dart/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Dart \ No newline at end of file diff --git a/Lang/Dart/Map-range b/Lang/Dart/Map-range deleted file mode 120000 index 5ed6b07ca1..0000000000 --- a/Lang/Dart/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Dart \ No newline at end of file diff --git a/Lang/Dart/Meissel-Mertens-constant b/Lang/Dart/Meissel-Mertens-constant new file mode 120000 index 0000000000..bac3ec4c99 --- /dev/null +++ b/Lang/Dart/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Dart \ No newline at end of file diff --git a/Lang/Dart/Modular-exponentiation b/Lang/Dart/Modular-exponentiation deleted file mode 120000 index afe2138c27..0000000000 --- a/Lang/Dart/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/Dart \ No newline at end of file diff --git a/Lang/Dart/Ormiston-triples b/Lang/Dart/Ormiston-triples deleted file mode 120000 index ddb933956b..0000000000 --- a/Lang/Dart/Ormiston-triples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ormiston-triples/Dart \ No newline at end of file diff --git a/Lang/Dart/Pancake-numbers b/Lang/Dart/Pancake-numbers deleted file mode 120000 index 78b8078b97..0000000000 --- a/Lang/Dart/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/Dart \ No newline at end of file diff --git a/Lang/Dart/Parse-an-IP-Address b/Lang/Dart/Parse-an-IP-Address deleted file mode 120000 index bbe41020cb..0000000000 --- a/Lang/Dart/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Dart \ No newline at end of file diff --git a/Lang/Dart/Parsing-Shunting-yard-algorithm b/Lang/Dart/Parsing-Shunting-yard-algorithm deleted file mode 120000 index 764230d0e5..0000000000 --- a/Lang/Dart/Parsing-Shunting-yard-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-Shunting-yard-algorithm/Dart \ No newline at end of file diff --git a/Lang/Dart/Partition-an-integer-x-into-n-primes b/Lang/Dart/Partition-an-integer-x-into-n-primes deleted file mode 120000 index 4b67e26b1a..0000000000 --- a/Lang/Dart/Partition-an-integer-x-into-n-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-an-integer-x-into-n-primes/Dart \ No newline at end of file diff --git a/Lang/Dart/Partition-function-P b/Lang/Dart/Partition-function-P deleted file mode 120000 index 9146b4b231..0000000000 --- a/Lang/Dart/Partition-function-P +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-function-P/Dart \ No newline at end of file diff --git a/Lang/Dart/Penneys-game b/Lang/Dart/Penneys-game deleted file mode 120000 index f054d83b87..0000000000 --- a/Lang/Dart/Penneys-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Penneys-game/Dart \ No newline at end of file diff --git a/Lang/Dart/Quaternion-type b/Lang/Dart/Quaternion-type new file mode 120000 index 0000000000..fb391b98d0 --- /dev/null +++ b/Lang/Dart/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Dart \ No newline at end of file diff --git a/Lang/Dart/Random-Latin-squares b/Lang/Dart/Random-Latin-squares deleted file mode 120000 index 226cba5197..0000000000 --- a/Lang/Dart/Random-Latin-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-Latin-squares/Dart \ No newline at end of file diff --git a/Lang/Dart/Random-sentence-from-book b/Lang/Dart/Random-sentence-from-book deleted file mode 120000 index 2b4a3a67d4..0000000000 --- a/Lang/Dart/Random-sentence-from-book +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-sentence-from-book/Dart \ No newline at end of file diff --git a/Lang/Dart/Repeat b/Lang/Dart/Repeat deleted file mode 120000 index f9635c7eb9..0000000000 --- a/Lang/Dart/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Dart \ No newline at end of file diff --git a/Lang/Dart/Solve-a-Numbrix-puzzle b/Lang/Dart/Solve-a-Numbrix-puzzle deleted file mode 120000 index 38339de00c..0000000000 --- a/Lang/Dart/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/Dart \ No newline at end of file diff --git a/Lang/Dart/Sorting-algorithms-Gnome-sort b/Lang/Dart/Sorting-algorithms-Gnome-sort deleted file mode 120000 index 0f0280ed89..0000000000 --- a/Lang/Dart/Sorting-algorithms-Gnome-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Gnome-sort/Dart \ No newline at end of file diff --git a/Lang/Dart/Split-a-character-string-based-on-change-of-character b/Lang/Dart/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 06c92b1b7c..0000000000 --- a/Lang/Dart/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/Dart \ No newline at end of file diff --git a/Lang/Dart/Strassens-algorithm b/Lang/Dart/Strassens-algorithm deleted file mode 120000 index db4cbbbc5d..0000000000 --- a/Lang/Dart/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Dart \ No newline at end of file diff --git a/Lang/Dart/The-Name-Game b/Lang/Dart/The-Name-Game deleted file mode 120000 index 41a16ad1a3..0000000000 --- a/Lang/Dart/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/Dart \ No newline at end of file diff --git a/Lang/Dart/Tonelli-Shanks-algorithm b/Lang/Dart/Tonelli-Shanks-algorithm deleted file mode 120000 index 72acd046bd..0000000000 --- a/Lang/Dart/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/Dart \ No newline at end of file diff --git a/Lang/Dart/Topological-sort b/Lang/Dart/Topological-sort deleted file mode 120000 index 7361beca1d..0000000000 --- a/Lang/Dart/Topological-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topological-sort/Dart \ No newline at end of file diff --git a/Lang/Dart/Word-search b/Lang/Dart/Word-search deleted file mode 120000 index c9693c2a8f..0000000000 --- a/Lang/Dart/Word-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-search/Dart \ No newline at end of file diff --git a/Lang/Dc/Man-or-boy-test b/Lang/Dc/Man-or-boy-test deleted file mode 120000 index 3b3beb62b4..0000000000 --- a/Lang/Dc/Man-or-boy-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Man-or-boy-test/Dc \ No newline at end of file diff --git a/Lang/Delphi/Bioinformatics-base-count b/Lang/Delphi/Bioinformatics-base-count new file mode 120000 index 0000000000..8964650820 --- /dev/null +++ b/Lang/Delphi/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Delphi \ No newline at end of file diff --git a/Lang/Delphi/Generate-Chess960-starting-position b/Lang/Delphi/Generate-Chess960-starting-position deleted file mode 120000 index 2c3a66190d..0000000000 --- a/Lang/Delphi/Generate-Chess960-starting-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-Chess960-starting-position/Delphi \ No newline at end of file diff --git a/Lang/Delphi/Meissel-Mertens-constant b/Lang/Delphi/Meissel-Mertens-constant new file mode 120000 index 0000000000..2b1c7d3804 --- /dev/null +++ b/Lang/Delphi/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Delphi \ No newline at end of file diff --git a/Lang/Delphi/Quaternion-type b/Lang/Delphi/Quaternion-type new file mode 120000 index 0000000000..fe804d3654 --- /dev/null +++ b/Lang/Delphi/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Delphi \ No newline at end of file diff --git a/Lang/Delphi/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Delphi/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Delphi/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Delphi/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Delphi/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Delphi/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Delphi/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Delphi/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Delphi/Sorting-Algorithms-Circle-Sort b/Lang/Delphi/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..d4a4f938c0 --- /dev/null +++ b/Lang/Delphi/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Delphi \ No newline at end of file diff --git a/Lang/Draco/Align-columns b/Lang/Draco/Align-columns deleted file mode 120000 index 00c426b153..0000000000 --- a/Lang/Draco/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/Draco \ No newline at end of file diff --git a/Lang/Draco/Anti-primes b/Lang/Draco/Anti-primes deleted file mode 120000 index e9ba464537..0000000000 --- a/Lang/Draco/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Draco \ No newline at end of file diff --git a/Lang/Draco/Arithmetic-derivative b/Lang/Draco/Arithmetic-derivative deleted file mode 120000 index b83ffadf85..0000000000 --- a/Lang/Draco/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Draco \ No newline at end of file diff --git a/Lang/Draco/Compound-data-type b/Lang/Draco/Compound-data-type deleted file mode 120000 index 4fcd536f99..0000000000 --- a/Lang/Draco/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/Draco \ No newline at end of file diff --git a/Lang/Draco/Cullen-and-Woodall-numbers b/Lang/Draco/Cullen-and-Woodall-numbers deleted file mode 120000 index 4559430dd4..0000000000 --- a/Lang/Draco/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/Draco \ No newline at end of file diff --git a/Lang/Draco/Display-a-linear-combination b/Lang/Draco/Display-a-linear-combination deleted file mode 120000 index bbaeb41c31..0000000000 --- a/Lang/Draco/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Draco \ No newline at end of file diff --git a/Lang/Draco/Doomsday-rule b/Lang/Draco/Doomsday-rule deleted file mode 120000 index 50f248643e..0000000000 --- a/Lang/Draco/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/Draco \ No newline at end of file diff --git a/Lang/Draco/Horners-rule-for-polynomial-evaluation b/Lang/Draco/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 3be037b7e6..0000000000 --- a/Lang/Draco/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/Draco \ No newline at end of file diff --git a/Lang/Draco/Roman-numerals-Encode b/Lang/Draco/Roman-numerals-Encode deleted file mode 120000 index 11eed87fb8..0000000000 --- a/Lang/Draco/Roman-numerals-Encode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roman-numerals-Encode/Draco \ No newline at end of file diff --git a/Lang/Draco/Tokenize-a-string b/Lang/Draco/Tokenize-a-string deleted file mode 120000 index b60ddd21df..0000000000 --- a/Lang/Draco/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/Draco \ No newline at end of file diff --git a/Lang/Draco/Zeckendorf-number-representation b/Lang/Draco/Zeckendorf-number-representation deleted file mode 120000 index 5142294607..0000000000 --- a/Lang/Draco/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/Draco \ No newline at end of file diff --git a/Lang/Dragonstone/00-LANG.txt b/Lang/Dragonstone/00-LANG.txt deleted file mode 100644 index 910f7b9a21..0000000000 --- a/Lang/Dragonstone/00-LANG.txt +++ /dev/null @@ -1,9 +0,0 @@ -{{language -|exec=both -|gc=optional -|parampass=both -|express=both -|strength=strong -|checking=both -|site=http://dragonstone-lang.org}} -'''Dragonstone''' is a general purpose, high-level, object-oriented programming language. It is both an interpreted and compiled language, it's inspired by Ruby and Crystal but designed for programmer happiness, productivity, and choice. \ No newline at end of file diff --git a/Lang/Dragonstone/00-META.yaml b/Lang/Dragonstone/00-META.yaml deleted file mode 100644 index 33832d2528..0000000000 --- a/Lang/Dragonstone/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Dragonstone diff --git a/Lang/Dragonstone/Comments b/Lang/Dragonstone/Comments deleted file mode 120000 index 49a5841988..0000000000 --- a/Lang/Dragonstone/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Dragonstone \ No newline at end of file diff --git a/Lang/Dragonstone/Hello-world-Newline-omission b/Lang/Dragonstone/Hello-world-Newline-omission deleted file mode 120000 index a67c99cc88..0000000000 --- a/Lang/Dragonstone/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Dragonstone \ No newline at end of file diff --git a/Lang/Dragonstone/Hello-world-Text b/Lang/Dragonstone/Hello-world-Text deleted file mode 120000 index 7f601f87ad..0000000000 --- a/Lang/Dragonstone/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Dragonstone \ No newline at end of file diff --git a/Lang/Dragonstone/Loops-While b/Lang/Dragonstone/Loops-While deleted file mode 120000 index c8a2239e27..0000000000 --- a/Lang/Dragonstone/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Dragonstone \ No newline at end of file diff --git a/Lang/DuckDB/00-LANG.txt b/Lang/DuckDB/00-LANG.txt deleted file mode 100644 index 2609130966..0000000000 --- a/Lang/DuckDB/00-LANG.txt +++ /dev/null @@ -1,4 +0,0 @@ -[[DuckDB]] is an open-source, fast in-process analytical database management system based on a feature-rich SQL dialect complemented with deep integrations into client APIs. - -[[Category:Programming Languages]] -[[Category:SQL]] \ No newline at end of file diff --git a/Lang/DuckDB/00-META.yaml b/Lang/DuckDB/00-META.yaml deleted file mode 100644 index c9eafe7cf5..0000000000 --- a/Lang/DuckDB/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:DuckDB diff --git a/Lang/DuckDB/100-doors b/Lang/DuckDB/100-doors deleted file mode 120000 index a0ee1f337e..0000000000 --- a/Lang/DuckDB/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/99-bottles-of-beer b/Lang/DuckDB/99-bottles-of-beer deleted file mode 120000 index c5f15cd273..0000000000 --- a/Lang/DuckDB/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/A+B b/Lang/DuckDB/A+B deleted file mode 120000 index ae6220876f..0000000000 --- a/Lang/DuckDB/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/ABC-problem b/Lang/DuckDB/ABC-problem deleted file mode 120000 index 36e60dd0cd..0000000000 --- a/Lang/DuckDB/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Anagrams b/Lang/DuckDB/Anagrams deleted file mode 120000 index e80c01b2e3..0000000000 --- a/Lang/DuckDB/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Anonymous-recursion b/Lang/DuckDB/Anonymous-recursion deleted file mode 120000 index e4448d2542..0000000000 --- a/Lang/DuckDB/Anonymous-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anonymous-recursion/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Arithmetic-Complex b/Lang/DuckDB/Arithmetic-Complex deleted file mode 120000 index 7e149e59dc..0000000000 --- a/Lang/DuckDB/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Arithmetic-Integer b/Lang/DuckDB/Arithmetic-Integer deleted file mode 120000 index 5bc3696b71..0000000000 --- a/Lang/DuckDB/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Arithmetic-geometric-mean b/Lang/DuckDB/Arithmetic-geometric-mean deleted file mode 120000 index 2519d0a8f8..0000000000 --- a/Lang/DuckDB/Arithmetic-geometric-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Arithmetic-numbers b/Lang/DuckDB/Arithmetic-numbers deleted file mode 120000 index a5e7e075b9..0000000000 --- a/Lang/DuckDB/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Array-concatenation b/Lang/DuckDB/Array-concatenation deleted file mode 120000 index 7ef5be0b5a..0000000000 --- a/Lang/DuckDB/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Array-length b/Lang/DuckDB/Array-length deleted file mode 120000 index ebd59786ea..0000000000 --- a/Lang/DuckDB/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Arrays b/Lang/DuckDB/Arrays deleted file mode 120000 index 85190ece0f..0000000000 --- a/Lang/DuckDB/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Associative-array-Creation b/Lang/DuckDB/Associative-array-Creation deleted file mode 120000 index ea2505f34f..0000000000 --- a/Lang/DuckDB/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Associative-array-Iteration b/Lang/DuckDB/Associative-array-Iteration deleted file mode 120000 index c8269906e9..0000000000 --- a/Lang/DuckDB/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Associative-array-Merging b/Lang/DuckDB/Associative-array-Merging deleted file mode 120000 index 4e70d9ab01..0000000000 --- a/Lang/DuckDB/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Averages-Arithmetic-mean b/Lang/DuckDB/Averages-Arithmetic-mean deleted file mode 120000 index 7ef12ec4b6..0000000000 --- a/Lang/DuckDB/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Averages-Mean-angle b/Lang/DuckDB/Averages-Mean-angle deleted file mode 120000 index 5b1aa18e5e..0000000000 --- a/Lang/DuckDB/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Averages-Mean-time-of-day b/Lang/DuckDB/Averages-Mean-time-of-day deleted file mode 120000 index 7971faf640..0000000000 --- a/Lang/DuckDB/Averages-Mean-time-of-day +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-time-of-day/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Averages-Mode b/Lang/DuckDB/Averages-Mode deleted file mode 120000 index 0ba388e74d..0000000000 --- a/Lang/DuckDB/Averages-Mode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mode/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Averages-Pythagorean-means b/Lang/DuckDB/Averages-Pythagorean-means deleted file mode 120000 index 1a5cb3068d..0000000000 --- a/Lang/DuckDB/Averages-Pythagorean-means +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Pythagorean-means/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Babbage-problem b/Lang/DuckDB/Babbage-problem deleted file mode 120000 index 7cee7b9a76..0000000000 --- a/Lang/DuckDB/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Benfords-law b/Lang/DuckDB/Benfords-law deleted file mode 120000 index 9302673cc0..0000000000 --- a/Lang/DuckDB/Benfords-law +++ /dev/null @@ -1 +0,0 @@ -../../Task/Benfords-law/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Bin-given-limits b/Lang/DuckDB/Bin-given-limits deleted file mode 120000 index ba754d6a93..0000000000 --- a/Lang/DuckDB/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Binary-digits b/Lang/DuckDB/Binary-digits deleted file mode 120000 index c4e4b4a580..0000000000 --- a/Lang/DuckDB/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Bitwise-IO b/Lang/DuckDB/Bitwise-IO deleted file mode 120000 index d00e607776..0000000000 --- a/Lang/DuckDB/Bitwise-IO +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-IO/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Bitwise-operations b/Lang/DuckDB/Bitwise-operations deleted file mode 120000 index a0841908e6..0000000000 --- a/Lang/DuckDB/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/CSV-data-manipulation b/Lang/DuckDB/CSV-data-manipulation deleted file mode 120000 index 799ed97795..0000000000 --- a/Lang/DuckDB/CSV-data-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/CSV-data-manipulation/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Call-a-function b/Lang/DuckDB/Call-a-function deleted file mode 120000 index bf87fb6ba8..0000000000 --- a/Lang/DuckDB/Call-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-function/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Cartesian-product-of-two-or-more-lists b/Lang/DuckDB/Cartesian-product-of-two-or-more-lists deleted file mode 120000 index f0873100b0..0000000000 --- a/Lang/DuckDB/Cartesian-product-of-two-or-more-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cartesian-product-of-two-or-more-lists/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Case-sensitivity-of-identifiers b/Lang/DuckDB/Case-sensitivity-of-identifiers deleted file mode 120000 index 2a0900e2e4..0000000000 --- a/Lang/DuckDB/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Catalan-numbers b/Lang/DuckDB/Catalan-numbers deleted file mode 120000 index 5591f12e62..0000000000 --- a/Lang/DuckDB/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Catalan-numbers-Pascals-triangle b/Lang/DuckDB/Catalan-numbers-Pascals-triangle deleted file mode 120000 index 690dec4614..0000000000 --- a/Lang/DuckDB/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Check-that-file-exists b/Lang/DuckDB/Check-that-file-exists deleted file mode 120000 index 7a35121080..0000000000 --- a/Lang/DuckDB/Check-that-file-exists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-that-file-exists/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Collections b/Lang/DuckDB/Collections deleted file mode 120000 index 4bd2b4f60a..0000000000 --- a/Lang/DuckDB/Collections +++ /dev/null @@ -1 +0,0 @@ -../../Task/Collections/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Combinations b/Lang/DuckDB/Combinations deleted file mode 120000 index 61cb39c1bb..0000000000 --- a/Lang/DuckDB/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Combinations-with-repetitions b/Lang/DuckDB/Combinations-with-repetitions deleted file mode 120000 index 3781b1dd53..0000000000 --- a/Lang/DuckDB/Combinations-with-repetitions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations-with-repetitions/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Compare-a-list-of-strings b/Lang/DuckDB/Compare-a-list-of-strings deleted file mode 120000 index dcf4a9dc8d..0000000000 --- a/Lang/DuckDB/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Compare-length-of-two-strings b/Lang/DuckDB/Compare-length-of-two-strings deleted file mode 120000 index b29bfdb369..0000000000 --- a/Lang/DuckDB/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Compound-data-type b/Lang/DuckDB/Compound-data-type deleted file mode 120000 index dc469b307b..0000000000 --- a/Lang/DuckDB/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Conditional-structures b/Lang/DuckDB/Conditional-structures deleted file mode 120000 index 19bf4a5caa..0000000000 --- a/Lang/DuckDB/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Convert-seconds-to-compound-duration b/Lang/DuckDB/Convert-seconds-to-compound-duration deleted file mode 120000 index 44055a0c42..0000000000 --- a/Lang/DuckDB/Convert-seconds-to-compound-duration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-seconds-to-compound-duration/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Copy-a-string b/Lang/DuckDB/Copy-a-string deleted file mode 120000 index d5f908f98d..0000000000 --- a/Lang/DuckDB/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Count-occurrences-of-a-substring b/Lang/DuckDB/Count-occurrences-of-a-substring deleted file mode 120000 index 82775de6e5..0000000000 --- a/Lang/DuckDB/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Create-a-two-dimensional-array-at-runtime b/Lang/DuckDB/Create-a-two-dimensional-array-at-runtime deleted file mode 120000 index 14657f9c21..0000000000 --- a/Lang/DuckDB/Create-a-two-dimensional-array-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-two-dimensional-array-at-runtime/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Cumulative-standard-deviation b/Lang/DuckDB/Cumulative-standard-deviation deleted file mode 120000 index f323d6c56e..0000000000 --- a/Lang/DuckDB/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Currency b/Lang/DuckDB/Currency deleted file mode 120000 index 092e5fcb13..0000000000 --- a/Lang/DuckDB/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Day-of-the-week b/Lang/DuckDB/Day-of-the-week deleted file mode 120000 index 467c28db17..0000000000 --- a/Lang/DuckDB/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Define-a-primitive-data-type b/Lang/DuckDB/Define-a-primitive-data-type deleted file mode 120000 index f086397ed2..0000000000 --- a/Lang/DuckDB/Define-a-primitive-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Define-a-primitive-data-type/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Detect-division-by-zero b/Lang/DuckDB/Detect-division-by-zero deleted file mode 120000 index 92508ad1dd..0000000000 --- a/Lang/DuckDB/Detect-division-by-zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Detect-division-by-zero/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Determinant-and-permanent b/Lang/DuckDB/Determinant-and-permanent deleted file mode 120000 index 6bccec7e87..0000000000 --- a/Lang/DuckDB/Determinant-and-permanent +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determinant-and-permanent/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Determine-if-a-string-has-all-the-same-characters b/Lang/DuckDB/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 3a9bd20a7a..0000000000 --- a/Lang/DuckDB/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Determine-if-a-string-has-all-unique-characters b/Lang/DuckDB/Determine-if-a-string-has-all-unique-characters deleted file mode 120000 index 64885aacf1..0000000000 --- a/Lang/DuckDB/Determine-if-a-string-has-all-unique-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-unique-characters/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Determine-if-a-string-is-collapsible b/Lang/DuckDB/Determine-if-a-string-is-collapsible deleted file mode 120000 index 0bb2727b9c..0000000000 --- a/Lang/DuckDB/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Determine-if-a-string-is-numeric b/Lang/DuckDB/Determine-if-a-string-is-numeric deleted file mode 120000 index ead16cd478..0000000000 --- a/Lang/DuckDB/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Determine-if-a-string-is-squeezable b/Lang/DuckDB/Determine-if-a-string-is-squeezable deleted file mode 120000 index 57414557b7..0000000000 --- a/Lang/DuckDB/Determine-if-a-string-is-squeezable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-squeezable/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Determine-sentence-type b/Lang/DuckDB/Determine-sentence-type deleted file mode 120000 index 50fb0aaf1b..0000000000 --- a/Lang/DuckDB/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Digital-root b/Lang/DuckDB/Digital-root deleted file mode 120000 index 736b8ccc4f..0000000000 --- a/Lang/DuckDB/Digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Diversity-prediction-theorem b/Lang/DuckDB/Diversity-prediction-theorem deleted file mode 120000 index 2c04d6784a..0000000000 --- a/Lang/DuckDB/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Documentation b/Lang/DuckDB/Documentation deleted file mode 120000 index f9f6aaf2ce..0000000000 --- a/Lang/DuckDB/Documentation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Documentation/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Dot-product b/Lang/DuckDB/Dot-product deleted file mode 120000 index b17f0214ea..0000000000 --- a/Lang/DuckDB/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Dynamic-variable-names b/Lang/DuckDB/Dynamic-variable-names deleted file mode 120000 index c534bbc61d..0000000000 --- a/Lang/DuckDB/Dynamic-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dynamic-variable-names/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Element-wise-operations b/Lang/DuckDB/Element-wise-operations deleted file mode 120000 index 7d7754f7f7..0000000000 --- a/Lang/DuckDB/Element-wise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Element-wise-operations/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Empty-string b/Lang/DuckDB/Empty-string deleted file mode 120000 index 67b471da95..0000000000 --- a/Lang/DuckDB/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Entropy b/Lang/DuckDB/Entropy deleted file mode 120000 index 9c2bc0a9a7..0000000000 --- a/Lang/DuckDB/Entropy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Enumerations b/Lang/DuckDB/Enumerations deleted file mode 120000 index 0605dce25b..0000000000 --- a/Lang/DuckDB/Enumerations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enumerations/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Equilibrium-index b/Lang/DuckDB/Equilibrium-index deleted file mode 120000 index 40fbbe81bb..0000000000 --- a/Lang/DuckDB/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Euler-method b/Lang/DuckDB/Euler-method deleted file mode 120000 index 61aa9557d0..0000000000 --- a/Lang/DuckDB/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Eulers-constant-0.5772... b/Lang/DuckDB/Eulers-constant-0.5772... deleted file mode 120000 index c954937ec2..0000000000 --- a/Lang/DuckDB/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Eulers-identity b/Lang/DuckDB/Eulers-identity deleted file mode 120000 index 58919d8390..0000000000 --- a/Lang/DuckDB/Eulers-identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-identity/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Evaluate-binomial-coefficients b/Lang/DuckDB/Evaluate-binomial-coefficients deleted file mode 120000 index 69d838bb98..0000000000 --- a/Lang/DuckDB/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Even-or-odd b/Lang/DuckDB/Even-or-odd deleted file mode 120000 index e428a57303..0000000000 --- a/Lang/DuckDB/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Exponentiation-order b/Lang/DuckDB/Exponentiation-order deleted file mode 120000 index 56438a22ee..0000000000 --- a/Lang/DuckDB/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Extreme-floating-point-values b/Lang/DuckDB/Extreme-floating-point-values deleted file mode 120000 index 617a7e99de..0000000000 --- a/Lang/DuckDB/Extreme-floating-point-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extreme-floating-point-values/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Factorial b/Lang/DuckDB/Factorial deleted file mode 120000 index 24543aba0b..0000000000 --- a/Lang/DuckDB/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Factors-of-an-integer b/Lang/DuckDB/Factors-of-an-integer deleted file mode 120000 index 70e5ed8d56..0000000000 --- a/Lang/DuckDB/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Fairshare-between-two-and-more b/Lang/DuckDB/Fairshare-between-two-and-more deleted file mode 120000 index 0c62807925..0000000000 --- a/Lang/DuckDB/Fairshare-between-two-and-more +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fairshare-between-two-and-more/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Feigenbaum-constant-calculation b/Lang/DuckDB/Feigenbaum-constant-calculation deleted file mode 120000 index 6f57f3044b..0000000000 --- a/Lang/DuckDB/Feigenbaum-constant-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Feigenbaum-constant-calculation/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Fibonacci-sequence b/Lang/DuckDB/Fibonacci-sequence deleted file mode 120000 index 0411dbf9f3..0000000000 --- a/Lang/DuckDB/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/File-input-output b/Lang/DuckDB/File-input-output deleted file mode 120000 index 0bb640b9cd..0000000000 --- a/Lang/DuckDB/File-input-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-input-output/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Filter b/Lang/DuckDB/Filter deleted file mode 120000 index bec860336f..0000000000 --- a/Lang/DuckDB/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Find-limit-of-recursion b/Lang/DuckDB/Find-limit-of-recursion deleted file mode 120000 index e7eff55309..0000000000 --- a/Lang/DuckDB/Find-limit-of-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-limit-of-recursion/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Find-the-last-Sunday-of-each-month b/Lang/DuckDB/Find-the-last-Sunday-of-each-month deleted file mode 120000 index 39172062a9..0000000000 --- a/Lang/DuckDB/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Five-weekends b/Lang/DuckDB/Five-weekends deleted file mode 120000 index 4d8ed3ebe3..0000000000 --- a/Lang/DuckDB/Five-weekends +++ /dev/null @@ -1 +0,0 @@ -../../Task/Five-weekends/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Fixed-length-records b/Lang/DuckDB/Fixed-length-records deleted file mode 120000 index 0b8d72de87..0000000000 --- a/Lang/DuckDB/Fixed-length-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fixed-length-records/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Flatten-a-list b/Lang/DuckDB/Flatten-a-list deleted file mode 120000 index 5bd1c5b0d8..0000000000 --- a/Lang/DuckDB/Flatten-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flatten-a-list/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Formatted-numeric-output b/Lang/DuckDB/Formatted-numeric-output deleted file mode 120000 index 789e647161..0000000000 --- a/Lang/DuckDB/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Forward-difference b/Lang/DuckDB/Forward-difference deleted file mode 120000 index 6a0d935f36..0000000000 --- a/Lang/DuckDB/Forward-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Forward-difference/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Function-definition b/Lang/DuckDB/Function-definition deleted file mode 120000 index b39d093883..0000000000 --- a/Lang/DuckDB/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Gamma-function b/Lang/DuckDB/Gamma-function deleted file mode 120000 index 6fcec68436..0000000000 --- a/Lang/DuckDB/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Gapful-numbers b/Lang/DuckDB/Gapful-numbers deleted file mode 120000 index 875c3e4310..0000000000 --- a/Lang/DuckDB/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Generate-lower-case-ASCII-alphabet b/Lang/DuckDB/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 51094f97da..0000000000 --- a/Lang/DuckDB/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Generic-swap b/Lang/DuckDB/Generic-swap deleted file mode 120000 index b384241f1f..0000000000 --- a/Lang/DuckDB/Generic-swap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generic-swap/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Golden-ratio-Convergence b/Lang/DuckDB/Golden-ratio-Convergence deleted file mode 120000 index 0ca8f2458f..0000000000 --- a/Lang/DuckDB/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Gotchas b/Lang/DuckDB/Gotchas deleted file mode 120000 index 16cceb3ff0..0000000000 --- a/Lang/DuckDB/Gotchas +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gotchas/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Greatest-common-divisor b/Lang/DuckDB/Greatest-common-divisor deleted file mode 120000 index 6fb062c771..0000000000 --- a/Lang/DuckDB/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Greatest-element-of-a-list b/Lang/DuckDB/Greatest-element-of-a-list deleted file mode 120000 index 5a2c7a66c9..0000000000 --- a/Lang/DuckDB/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Greatest-subsequential-sum b/Lang/DuckDB/Greatest-subsequential-sum deleted file mode 120000 index dd3661e978..0000000000 --- a/Lang/DuckDB/Greatest-subsequential-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-subsequential-sum/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/HTTP b/Lang/DuckDB/HTTP deleted file mode 120000 index f77a3116ff..0000000000 --- a/Lang/DuckDB/HTTP +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTP/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/HTTPS b/Lang/DuckDB/HTTPS deleted file mode 120000 index 694faecb0f..0000000000 --- a/Lang/DuckDB/HTTPS +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/HTTPS-Authenticated b/Lang/DuckDB/HTTPS-Authenticated deleted file mode 120000 index c1b123b3b8..0000000000 --- a/Lang/DuckDB/HTTPS-Authenticated +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS-Authenticated/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Hailstone-sequence b/Lang/DuckDB/Hailstone-sequence deleted file mode 120000 index 8cb9cd3c4d..0000000000 --- a/Lang/DuckDB/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Harmonic-series b/Lang/DuckDB/Harmonic-series deleted file mode 120000 index d5b23dfe32..0000000000 --- a/Lang/DuckDB/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Hash-from-two-arrays b/Lang/DuckDB/Hash-from-two-arrays deleted file mode 120000 index 4fd3efc241..0000000000 --- a/Lang/DuckDB/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Hash-join b/Lang/DuckDB/Hash-join deleted file mode 120000 index d89e18cc75..0000000000 --- a/Lang/DuckDB/Hash-join +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-join/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Haversine-formula b/Lang/DuckDB/Haversine-formula deleted file mode 120000 index 102a047e33..0000000000 --- a/Lang/DuckDB/Haversine-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Haversine-formula/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Hello-world-Text b/Lang/DuckDB/Hello-world-Text deleted file mode 120000 index 1af484f405..0000000000 --- a/Lang/DuckDB/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Here-document b/Lang/DuckDB/Here-document deleted file mode 120000 index f233028f5b..0000000000 --- a/Lang/DuckDB/Here-document +++ /dev/null @@ -1 +0,0 @@ -../../Task/Here-document/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/ISBN13-check-digit b/Lang/DuckDB/ISBN13-check-digit deleted file mode 120000 index ad247e79cf..0000000000 --- a/Lang/DuckDB/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Identity-matrix b/Lang/DuckDB/Identity-matrix deleted file mode 120000 index d8402f7ae8..0000000000 --- a/Lang/DuckDB/Identity-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Identity-matrix/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols b/Lang/DuckDB/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols deleted file mode 120000 index 90e880a4b1..0000000000 --- a/Lang/DuckDB/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols +++ /dev/null @@ -1 +0,0 @@ -../../Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Idiomatically-determine-all-the-lowercase-and-uppercase-letters b/Lang/DuckDB/Idiomatically-determine-all-the-lowercase-and-uppercase-letters deleted file mode 120000 index 3722271469..0000000000 --- a/Lang/DuckDB/Idiomatically-determine-all-the-lowercase-and-uppercase-letters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Increment-a-numerical-string b/Lang/DuckDB/Increment-a-numerical-string deleted file mode 120000 index a9f84c0e8c..0000000000 --- a/Lang/DuckDB/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Infinity b/Lang/DuckDB/Infinity deleted file mode 120000 index ed12f74690..0000000000 --- a/Lang/DuckDB/Infinity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Infinity/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Integer-comparison b/Lang/DuckDB/Integer-comparison deleted file mode 120000 index c6cacfcd06..0000000000 --- a/Lang/DuckDB/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Introspection b/Lang/DuckDB/Introspection deleted file mode 120000 index c3bb6d896d..0000000000 --- a/Lang/DuckDB/Introspection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Introspection/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Inverted-index b/Lang/DuckDB/Inverted-index deleted file mode 120000 index 81053e0c15..0000000000 --- a/Lang/DuckDB/Inverted-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inverted-index/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Inverted-syntax b/Lang/DuckDB/Inverted-syntax deleted file mode 120000 index cadc81e3b6..0000000000 --- a/Lang/DuckDB/Inverted-syntax +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inverted-syntax/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/JSON b/Lang/DuckDB/JSON deleted file mode 120000 index e4757a4b09..0000000000 --- a/Lang/DuckDB/JSON +++ /dev/null @@ -1 +0,0 @@ -../../Task/JSON/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Jaro-similarity b/Lang/DuckDB/Jaro-similarity deleted file mode 120000 index 39c64b8488..0000000000 --- a/Lang/DuckDB/Jaro-similarity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-similarity/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Knuth-shuffle b/Lang/DuckDB/Knuth-shuffle deleted file mode 120000 index 7d43c57cbe..0000000000 --- a/Lang/DuckDB/Knuth-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuth-shuffle/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Largest-int-from-concatenated-ints b/Lang/DuckDB/Largest-int-from-concatenated-ints deleted file mode 120000 index 8e73a50292..0000000000 --- a/Lang/DuckDB/Largest-int-from-concatenated-ints +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-int-from-concatenated-ints/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Last-Friday-of-each-month b/Lang/DuckDB/Last-Friday-of-each-month deleted file mode 120000 index 1236ebdc14..0000000000 --- a/Lang/DuckDB/Last-Friday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-Friday-of-each-month/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Leap-year b/Lang/DuckDB/Leap-year deleted file mode 120000 index 5816394f02..0000000000 --- a/Lang/DuckDB/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Left-factorials b/Lang/DuckDB/Left-factorials deleted file mode 120000 index 6877bf1f73..0000000000 --- a/Lang/DuckDB/Left-factorials +++ /dev/null @@ -1 +0,0 @@ -../../Task/Left-factorials/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Leonardo-numbers b/Lang/DuckDB/Leonardo-numbers deleted file mode 120000 index 206ddcfce9..0000000000 --- a/Lang/DuckDB/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Letter-frequency b/Lang/DuckDB/Letter-frequency deleted file mode 120000 index 29228c3e0b..0000000000 --- a/Lang/DuckDB/Letter-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Letter-frequency/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Levenshtein-distance b/Lang/DuckDB/Levenshtein-distance deleted file mode 120000 index d0954b60f2..0000000000 --- a/Lang/DuckDB/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/List-comprehensions b/Lang/DuckDB/List-comprehensions deleted file mode 120000 index 72558c43a1..0000000000 --- a/Lang/DuckDB/List-comprehensions +++ /dev/null @@ -1 +0,0 @@ -../../Task/List-comprehensions/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Literals-Integer b/Lang/DuckDB/Literals-Integer deleted file mode 120000 index 39629959b4..0000000000 --- a/Lang/DuckDB/Literals-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Integer/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Logical-operations b/Lang/DuckDB/Logical-operations deleted file mode 120000 index 14d59b0f70..0000000000 --- a/Lang/DuckDB/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Longest-increasing-subsequence b/Lang/DuckDB/Longest-increasing-subsequence deleted file mode 120000 index 35a8443499..0000000000 --- a/Lang/DuckDB/Longest-increasing-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-increasing-subsequence/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-Break b/Lang/DuckDB/Loops-Break deleted file mode 120000 index 40b7904e3f..0000000000 --- a/Lang/DuckDB/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-Do-while b/Lang/DuckDB/Loops-Do-while deleted file mode 120000 index 257f84d6ba..0000000000 --- a/Lang/DuckDB/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-Downward-for b/Lang/DuckDB/Loops-Downward-for deleted file mode 120000 index 5516907335..0000000000 --- a/Lang/DuckDB/Loops-Downward-for +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Downward-for/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-For b/Lang/DuckDB/Loops-For deleted file mode 120000 index 56dde9a604..0000000000 --- a/Lang/DuckDB/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-For-with-a-specified-step b/Lang/DuckDB/Loops-For-with-a-specified-step deleted file mode 120000 index f7e2b536d7..0000000000 --- a/Lang/DuckDB/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-Increment-loop-index-within-loop-body b/Lang/DuckDB/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index d530992462..0000000000 --- a/Lang/DuckDB/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-N-plus-one-half b/Lang/DuckDB/Loops-N-plus-one-half deleted file mode 120000 index f9812bda7e..0000000000 --- a/Lang/DuckDB/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-Nested b/Lang/DuckDB/Loops-Nested deleted file mode 120000 index 8b4afa46b5..0000000000 --- a/Lang/DuckDB/Loops-Nested +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Nested/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-While b/Lang/DuckDB/Loops-While deleted file mode 120000 index 60343480f3..0000000000 --- a/Lang/DuckDB/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Loops-With-multiple-ranges b/Lang/DuckDB/Loops-With-multiple-ranges deleted file mode 120000 index 540b734a24..0000000000 --- a/Lang/DuckDB/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Luhn-test-of-credit-card-numbers b/Lang/DuckDB/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 397557411e..0000000000 --- a/Lang/DuckDB/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/MD5 b/Lang/DuckDB/MD5 deleted file mode 120000 index ab453e87da..0000000000 --- a/Lang/DuckDB/MD5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD5/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Map-range b/Lang/DuckDB/Map-range deleted file mode 120000 index 6cd697a04b..0000000000 --- a/Lang/DuckDB/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Matrix-multiplication b/Lang/DuckDB/Matrix-multiplication deleted file mode 120000 index 2110896869..0000000000 --- a/Lang/DuckDB/Matrix-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-multiplication/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Matrix-transposition b/Lang/DuckDB/Matrix-transposition deleted file mode 120000 index 7e416217b2..0000000000 --- a/Lang/DuckDB/Matrix-transposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-transposition/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Merge-and-aggregate-datasets b/Lang/DuckDB/Merge-and-aggregate-datasets deleted file mode 120000 index e9d467735b..0000000000 --- a/Lang/DuckDB/Merge-and-aggregate-datasets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Merge-and-aggregate-datasets/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Metallic-ratios b/Lang/DuckDB/Metallic-ratios deleted file mode 120000 index 56fa981641..0000000000 --- a/Lang/DuckDB/Metallic-ratios +++ /dev/null @@ -1 +0,0 @@ -../../Task/Metallic-ratios/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Middle-three-digits b/Lang/DuckDB/Middle-three-digits deleted file mode 120000 index 9c32c60a1c..0000000000 --- a/Lang/DuckDB/Middle-three-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Middle-three-digits/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Monte-Carlo-methods b/Lang/DuckDB/Monte-Carlo-methods deleted file mode 120000 index f27be4f0e8..0000000000 --- a/Lang/DuckDB/Monte-Carlo-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monte-Carlo-methods/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Nested-function b/Lang/DuckDB/Nested-function deleted file mode 120000 index 6ccb0c0029..0000000000 --- a/Lang/DuckDB/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Nth b/Lang/DuckDB/Nth deleted file mode 120000 index 6d1fd0295b..0000000000 --- a/Lang/DuckDB/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Nth-root b/Lang/DuckDB/Nth-root deleted file mode 120000 index bdfee4887c..0000000000 --- a/Lang/DuckDB/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/One-of-n-lines-in-a-file b/Lang/DuckDB/One-of-n-lines-in-a-file deleted file mode 120000 index 84adf8bb46..0000000000 --- a/Lang/DuckDB/One-of-n-lines-in-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-of-n-lines-in-a-file/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Order-two-numerical-lists b/Lang/DuckDB/Order-two-numerical-lists deleted file mode 120000 index fcd259b6c0..0000000000 --- a/Lang/DuckDB/Order-two-numerical-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-two-numerical-lists/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Ordered-words b/Lang/DuckDB/Ordered-words deleted file mode 120000 index 57d12d9c27..0000000000 --- a/Lang/DuckDB/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Palindrome-detection b/Lang/DuckDB/Palindrome-detection deleted file mode 120000 index a318cb02ae..0000000000 --- a/Lang/DuckDB/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Parameterized-SQL-statement b/Lang/DuckDB/Parameterized-SQL-statement deleted file mode 120000 index dded36b01b..0000000000 --- a/Lang/DuckDB/Parameterized-SQL-statement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parameterized-SQL-statement/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Pascals-triangle b/Lang/DuckDB/Pascals-triangle deleted file mode 120000 index e38a99fc2d..0000000000 --- a/Lang/DuckDB/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Permutations b/Lang/DuckDB/Permutations deleted file mode 120000 index fa1198c6a6..0000000000 --- a/Lang/DuckDB/Permutations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Permutations-Derangements b/Lang/DuckDB/Permutations-Derangements deleted file mode 120000 index b4140ee27e..0000000000 --- a/Lang/DuckDB/Permutations-Derangements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations-Derangements/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Pick-random-element b/Lang/DuckDB/Pick-random-element deleted file mode 120000 index 4eec54c36e..0000000000 --- a/Lang/DuckDB/Pick-random-element +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pick-random-element/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Primality-by-trial-division b/Lang/DuckDB/Primality-by-trial-division deleted file mode 120000 index 8e9e10eb1a..0000000000 --- a/Lang/DuckDB/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Prime-decomposition b/Lang/DuckDB/Prime-decomposition deleted file mode 120000 index dbb3b57727..0000000000 --- a/Lang/DuckDB/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Probabilistic-choice b/Lang/DuckDB/Probabilistic-choice deleted file mode 120000 index caa9cf57ce..0000000000 --- a/Lang/DuckDB/Probabilistic-choice +++ /dev/null @@ -1 +0,0 @@ -../../Task/Probabilistic-choice/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Proper-divisors b/Lang/DuckDB/Proper-divisors deleted file mode 120000 index a8b8cf32ca..0000000000 --- a/Lang/DuckDB/Proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Proper-divisors/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Pseudo-random-numbers-Middle-square-method b/Lang/DuckDB/Pseudo-random-numbers-Middle-square-method deleted file mode 120000 index 3424580b60..0000000000 --- a/Lang/DuckDB/Pseudo-random-numbers-Middle-square-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Middle-square-method/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Random-numbers b/Lang/DuckDB/Random-numbers deleted file mode 120000 index 4e7ae21251..0000000000 --- a/Lang/DuckDB/Random-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-numbers/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Range-expansion b/Lang/DuckDB/Range-expansion deleted file mode 120000 index 73f7852f3e..0000000000 --- a/Lang/DuckDB/Range-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-expansion/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Range-extraction b/Lang/DuckDB/Range-extraction deleted file mode 120000 index 70b9fee7f2..0000000000 --- a/Lang/DuckDB/Range-extraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-extraction/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Read-a-file-line-by-line b/Lang/DuckDB/Read-a-file-line-by-line deleted file mode 120000 index 5698cabe3f..0000000000 --- a/Lang/DuckDB/Read-a-file-line-by-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-line-by-line/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Reflection-List-methods b/Lang/DuckDB/Reflection-List-methods deleted file mode 120000 index e87f71ad29..0000000000 --- a/Lang/DuckDB/Reflection-List-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-methods/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Reflection-List-properties b/Lang/DuckDB/Reflection-List-properties deleted file mode 120000 index 61160f5035..0000000000 --- a/Lang/DuckDB/Reflection-List-properties +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-properties/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Remove-duplicate-elements b/Lang/DuckDB/Remove-duplicate-elements deleted file mode 120000 index e38927d88b..0000000000 --- a/Lang/DuckDB/Remove-duplicate-elements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Remove-duplicate-elements/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Rep-string b/Lang/DuckDB/Rep-string deleted file mode 120000 index ce2543465d..0000000000 --- a/Lang/DuckDB/Rep-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rep-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Repeat-a-string b/Lang/DuckDB/Repeat-a-string deleted file mode 120000 index 126fb8a5a7..0000000000 --- a/Lang/DuckDB/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Return-multiple-values b/Lang/DuckDB/Return-multiple-values deleted file mode 120000 index 44885d997f..0000000000 --- a/Lang/DuckDB/Return-multiple-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Return-multiple-values/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Reverse-a-string b/Lang/DuckDB/Reverse-a-string deleted file mode 120000 index 9c2fcefbbf..0000000000 --- a/Lang/DuckDB/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Roots-of-unity b/Lang/DuckDB/Roots-of-unity deleted file mode 120000 index fbae972a1d..0000000000 --- a/Lang/DuckDB/Roots-of-unity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roots-of-unity/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Run-length-encoding b/Lang/DuckDB/Run-length-encoding deleted file mode 120000 index 798b72b50c..0000000000 --- a/Lang/DuckDB/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Search-a-list-of-records b/Lang/DuckDB/Search-a-list-of-records deleted file mode 120000 index 8875d845bf..0000000000 --- a/Lang/DuckDB/Search-a-list-of-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list-of-records/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Set b/Lang/DuckDB/Set deleted file mode 120000 index 7e25aac634..0000000000 --- a/Lang/DuckDB/Set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Set-consolidation b/Lang/DuckDB/Set-consolidation deleted file mode 120000 index 46e9513ebb..0000000000 --- a/Lang/DuckDB/Set-consolidation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-consolidation/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Show-the-epoch b/Lang/DuckDB/Show-the-epoch deleted file mode 120000 index 6cd68764f9..0000000000 --- a/Lang/DuckDB/Show-the-epoch +++ /dev/null @@ -1 +0,0 @@ -../../Task/Show-the-epoch/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sieve-of-Eratosthenes b/Lang/DuckDB/Sieve-of-Eratosthenes deleted file mode 120000 index ee6aa1fbd3..0000000000 --- a/Lang/DuckDB/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sort-an-array-of-composite-structures b/Lang/DuckDB/Sort-an-array-of-composite-structures deleted file mode 120000 index 35612aed66..0000000000 --- a/Lang/DuckDB/Sort-an-array-of-composite-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-array-of-composite-structures/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sort-numbers-lexicographically b/Lang/DuckDB/Sort-numbers-lexicographically deleted file mode 120000 index 390860d685..0000000000 --- a/Lang/DuckDB/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Statistics-Basic b/Lang/DuckDB/Statistics-Basic deleted file mode 120000 index c3caa99be7..0000000000 --- a/Lang/DuckDB/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/String-append b/Lang/DuckDB/String-append deleted file mode 120000 index cc8ce5011e..0000000000 --- a/Lang/DuckDB/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/String-case b/Lang/DuckDB/String-case deleted file mode 120000 index ab3478758f..0000000000 --- a/Lang/DuckDB/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/String-comparison b/Lang/DuckDB/String-comparison deleted file mode 120000 index b7a7339e14..0000000000 --- a/Lang/DuckDB/String-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-comparison/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/String-interpolation-included- b/Lang/DuckDB/String-interpolation-included- deleted file mode 120000 index 807f8abec4..0000000000 --- a/Lang/DuckDB/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/String-length b/Lang/DuckDB/String-length deleted file mode 120000 index f49078b058..0000000000 --- a/Lang/DuckDB/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/String-matching b/Lang/DuckDB/String-matching deleted file mode 120000 index e3f7fa5300..0000000000 --- a/Lang/DuckDB/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/String-prepend b/Lang/DuckDB/String-prepend deleted file mode 120000 index ea6f95610c..0000000000 --- a/Lang/DuckDB/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Strip-a-set-of-characters-from-a-string b/Lang/DuckDB/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index 77ce9f900d..0000000000 --- a/Lang/DuckDB/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Strip-comments-from-a-string b/Lang/DuckDB/Strip-comments-from-a-string deleted file mode 120000 index f58b2c006d..0000000000 --- a/Lang/DuckDB/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Strip-control-codes-and-extended-characters-from-a-string b/Lang/DuckDB/Strip-control-codes-and-extended-characters-from-a-string deleted file mode 120000 index e3de3aa487..0000000000 --- a/Lang/DuckDB/Strip-control-codes-and-extended-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-control-codes-and-extended-characters-from-a-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Strip-whitespace-from-a-string-Top-and-tail b/Lang/DuckDB/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index 93405e661f..0000000000 --- a/Lang/DuckDB/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Substring b/Lang/DuckDB/Substring deleted file mode 120000 index fe9daf5b9c..0000000000 --- a/Lang/DuckDB/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sudoku b/Lang/DuckDB/Sudoku deleted file mode 120000 index efc19532bb..0000000000 --- a/Lang/DuckDB/Sudoku +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudoku/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sum-and-product-of-an-array b/Lang/DuckDB/Sum-and-product-of-an-array deleted file mode 120000 index 9db07cfe55..0000000000 --- a/Lang/DuckDB/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sum-digits-of-an-integer b/Lang/DuckDB/Sum-digits-of-an-integer deleted file mode 120000 index 2b4e9e5805..0000000000 --- a/Lang/DuckDB/Sum-digits-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-digits-of-an-integer/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sum-multiples-of-3-and-5 b/Lang/DuckDB/Sum-multiples-of-3-and-5 deleted file mode 120000 index 06a19cefb7..0000000000 --- a/Lang/DuckDB/Sum-multiples-of-3-and-5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-multiples-of-3-and-5/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sum-of-a-series b/Lang/DuckDB/Sum-of-a-series deleted file mode 120000 index db0f6f79c5..0000000000 --- a/Lang/DuckDB/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Sum-of-squares b/Lang/DuckDB/Sum-of-squares deleted file mode 120000 index fe3d9a8a52..0000000000 --- a/Lang/DuckDB/Sum-of-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-squares/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Symmetric-difference b/Lang/DuckDB/Symmetric-difference deleted file mode 120000 index f254423d5f..0000000000 --- a/Lang/DuckDB/Symmetric-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Symmetric-difference/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Table-creation-Postal-addresses b/Lang/DuckDB/Table-creation-Postal-addresses deleted file mode 120000 index 174f03f886..0000000000 --- a/Lang/DuckDB/Table-creation-Postal-addresses +++ /dev/null @@ -1 +0,0 @@ -../../Task/Table-creation-Postal-addresses/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Test-integerness b/Lang/DuckDB/Test-integerness deleted file mode 120000 index 0e9573c924..0000000000 --- a/Lang/DuckDB/Test-integerness +++ /dev/null @@ -1 +0,0 @@ -../../Task/Test-integerness/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Text-processing-2 b/Lang/DuckDB/Text-processing-2 deleted file mode 120000 index b3c883d2ec..0000000000 --- a/Lang/DuckDB/Text-processing-2 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Text-processing-2/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Thue-Morse b/Lang/DuckDB/Thue-Morse deleted file mode 120000 index e14a41e488..0000000000 --- a/Lang/DuckDB/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Time-a-function b/Lang/DuckDB/Time-a-function deleted file mode 120000 index d82a288f55..0000000000 --- a/Lang/DuckDB/Time-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Time-a-function/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Tokenize-a-string b/Lang/DuckDB/Tokenize-a-string deleted file mode 120000 index ee6d07a4b5..0000000000 --- a/Lang/DuckDB/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Top-rank-per-group b/Lang/DuckDB/Top-rank-per-group deleted file mode 120000 index ada50a852c..0000000000 --- a/Lang/DuckDB/Top-rank-per-group +++ /dev/null @@ -1 +0,0 @@ -../../Task/Top-rank-per-group/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Trigonometric-functions b/Lang/DuckDB/Trigonometric-functions deleted file mode 120000 index 58530b66ee..0000000000 --- a/Lang/DuckDB/Trigonometric-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trigonometric-functions/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/URL-decoding b/Lang/DuckDB/URL-decoding deleted file mode 120000 index c717460642..0000000000 --- a/Lang/DuckDB/URL-decoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-decoding/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/UTF-8-encode-and-decode b/Lang/DuckDB/UTF-8-encode-and-decode deleted file mode 120000 index 792323a78c..0000000000 --- a/Lang/DuckDB/UTF-8-encode-and-decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/UTF-8-encode-and-decode/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Unix-ls b/Lang/DuckDB/Unix-ls deleted file mode 120000 index 85287a21f6..0000000000 --- a/Lang/DuckDB/Unix-ls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unix-ls/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Variable-size-Get b/Lang/DuckDB/Variable-size-Get deleted file mode 120000 index 3cff7c631a..0000000000 --- a/Lang/DuckDB/Variable-size-Get +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-size-Get/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Variable-size-Set b/Lang/DuckDB/Variable-size-Set deleted file mode 120000 index ee4a003cfa..0000000000 --- a/Lang/DuckDB/Variable-size-Set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-size-Set/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Vector-products b/Lang/DuckDB/Vector-products deleted file mode 120000 index 3347aa5bba..0000000000 --- a/Lang/DuckDB/Vector-products +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector-products/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Zero-to-the-zero-power b/Lang/DuckDB/Zero-to-the-zero-power deleted file mode 120000 index 7c7bac0f0b..0000000000 --- a/Lang/DuckDB/Zero-to-the-zero-power +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zero-to-the-zero-power/DuckDB \ No newline at end of file diff --git a/Lang/DuckDB/Zig-zag-matrix b/Lang/DuckDB/Zig-zag-matrix deleted file mode 120000 index dee409f57f..0000000000 --- a/Lang/DuckDB/Zig-zag-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zig-zag-matrix/DuckDB \ No newline at end of file diff --git a/Lang/Dyalect/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Dyalect/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Dyalect/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Dyalect/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/E/Miller-Rabin-primality-test b/Lang/E/Miller-Rabin-primality-test new file mode 120000 index 0000000000..f586feb18b --- /dev/null +++ b/Lang/E/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/E \ No newline at end of file diff --git a/Lang/E/Quaternion-type b/Lang/E/Quaternion-type new file mode 120000 index 0000000000..ecc55ca8a4 --- /dev/null +++ b/Lang/E/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/E \ No newline at end of file diff --git a/Lang/EDSAC-order-code/Haversine-formula b/Lang/EDSAC-order-code/Haversine-formula deleted file mode 120000 index 0cab079f84..0000000000 --- a/Lang/EDSAC-order-code/Haversine-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Haversine-formula/EDSAC-order-code \ No newline at end of file diff --git a/Lang/EDSAC-order-code/Numerical-integration-Gauss-Legendre-Quadrature b/Lang/EDSAC-order-code/Numerical-integration-Gauss-Legendre-Quadrature deleted file mode 120000 index f518a6e1fc..0000000000 --- a/Lang/EDSAC-order-code/Numerical-integration-Gauss-Legendre-Quadrature +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-integration-Gauss-Legendre-Quadrature/EDSAC-order-code \ No newline at end of file diff --git a/Lang/EDSAC-order-code/Shoelace-formula-for-polygonal-area b/Lang/EDSAC-order-code/Shoelace-formula-for-polygonal-area deleted file mode 120000 index fb3446e1bf..0000000000 --- a/Lang/EDSAC-order-code/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/EDSAC-order-code \ No newline at end of file diff --git a/Lang/EDSAC-order-code/Water-collected-between-towers b/Lang/EDSAC-order-code/Water-collected-between-towers deleted file mode 120000 index 7c9456760f..0000000000 --- a/Lang/EDSAC-order-code/Water-collected-between-towers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Water-collected-between-towers/EDSAC-order-code \ No newline at end of file diff --git a/Lang/EMal/00-LANG.txt b/Lang/EMal/00-LANG.txt index 3af52fab5c..9ecf11d932 100644 --- a/Lang/EMal/00-LANG.txt +++ b/Lang/EMal/00-LANG.txt @@ -6,23 +6,21 @@ |site=https://emal-lang.sourceforge.io |tags=emal |gc=yes}} -EMal is a prototyping programming language that supports English and Italian syntax. +EMal is a prototyping programming language that supports english and italian syntax. -EMal wants to be expressive and readable. It supports closures, classes, records; it's influenced by Java, Perl, Javascript. +EMal wants to be expressive and easy to read. -The programming environment consists of an interpreter that directly navigates the AST produced by the parser. - -This is an example that, inside the same script, calculates F10 = 55 in English and in Italian: +This is an example that, inside the same script, calculates F10 = 55 in english and in italian: type FibonacciInEnglish -fun fibonacci ← int by int n +fun fibonacci = int by int n if n < 2 do return n else do return fibonacci(n - 1) + fibonacci(n - 2) end end writeLine(fibonacci(10)) tipo FibonacciInItaliano -funzione fibonacci ← intero da intero n +funzione fibonacci = intero da intero n se n < 2 ritorna n altrimenti diff --git a/Lang/EMal/ABC-problem b/Lang/EMal/ABC-problem deleted file mode 120000 index 4b49dc2baf..0000000000 --- a/Lang/EMal/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/EMal \ No newline at end of file diff --git a/Lang/EMal/Babbage-problem b/Lang/EMal/Babbage-problem deleted file mode 120000 index 8a7db13311..0000000000 --- a/Lang/EMal/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/EMal \ No newline at end of file diff --git a/Lang/EMal/Bifid-cipher b/Lang/EMal/Bifid-cipher deleted file mode 120000 index 1dbee9fec8..0000000000 --- a/Lang/EMal/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/EMal \ No newline at end of file diff --git a/Lang/EMal/Delegates b/Lang/EMal/Delegates deleted file mode 120000 index 5293d68109..0000000000 --- a/Lang/EMal/Delegates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delegates/EMal \ No newline at end of file diff --git a/Lang/EMal/Determine-if-a-string-is-squeezable b/Lang/EMal/Determine-if-a-string-is-squeezable deleted file mode 120000 index 27c56fc092..0000000000 --- a/Lang/EMal/Determine-if-a-string-is-squeezable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-squeezable/EMal \ No newline at end of file diff --git a/Lang/EMal/Dynamic-variable-names b/Lang/EMal/Dynamic-variable-names deleted file mode 120000 index 28a70b20a1..0000000000 --- a/Lang/EMal/Dynamic-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dynamic-variable-names/EMal \ No newline at end of file diff --git a/Lang/EMal/Gamma-function b/Lang/EMal/Gamma-function deleted file mode 120000 index f928139952..0000000000 --- a/Lang/EMal/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/EMal \ No newline at end of file diff --git a/Lang/EMal/Greatest-common-divisor b/Lang/EMal/Greatest-common-divisor deleted file mode 120000 index 5a6de213e1..0000000000 --- a/Lang/EMal/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/EMal \ No newline at end of file diff --git a/Lang/EMal/Guess-the-number b/Lang/EMal/Guess-the-number deleted file mode 120000 index fc6e3366e6..0000000000 --- a/Lang/EMal/Guess-the-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number/EMal \ No newline at end of file diff --git a/Lang/EMal/Halt-and-catch-fire b/Lang/EMal/Halt-and-catch-fire deleted file mode 120000 index 63015fddfa..0000000000 --- a/Lang/EMal/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/EMal \ No newline at end of file diff --git a/Lang/EMal/Mutual-recursion b/Lang/EMal/Mutual-recursion deleted file mode 120000 index cb3ebc8ca5..0000000000 --- a/Lang/EMal/Mutual-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mutual-recursion/EMal \ No newline at end of file diff --git a/Lang/EMal/Nth-root b/Lang/EMal/Nth-root deleted file mode 120000 index 58e1f9e30f..0000000000 --- a/Lang/EMal/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/EMal \ No newline at end of file diff --git a/Lang/EMal/Sorting-algorithms-Bogosort b/Lang/EMal/Sorting-algorithms-Bogosort deleted file mode 120000 index 8dc8cc02d3..0000000000 --- a/Lang/EMal/Sorting-algorithms-Bogosort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bogosort/EMal \ No newline at end of file diff --git a/Lang/EMal/Sorting-algorithms-Bubble-sort b/Lang/EMal/Sorting-algorithms-Bubble-sort deleted file mode 120000 index 53f744e6e9..0000000000 --- a/Lang/EMal/Sorting-algorithms-Bubble-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bubble-sort/EMal \ No newline at end of file diff --git a/Lang/EMal/Sorting-algorithms-Stooge-sort b/Lang/EMal/Sorting-algorithms-Stooge-sort deleted file mode 120000 index 05296c2a09..0000000000 --- a/Lang/EMal/Sorting-algorithms-Stooge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Stooge-sort/EMal \ No newline at end of file diff --git a/Lang/EMal/String-comparison b/Lang/EMal/String-comparison deleted file mode 120000 index 02b430a538..0000000000 --- a/Lang/EMal/String-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-comparison/EMal \ No newline at end of file diff --git a/Lang/EMal/Sudan-function b/Lang/EMal/Sudan-function deleted file mode 120000 index ea87f1432e..0000000000 --- a/Lang/EMal/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/EMal \ No newline at end of file diff --git a/Lang/EMal/Ternary-logic b/Lang/EMal/Ternary-logic deleted file mode 120000 index 837bedfab5..0000000000 --- a/Lang/EMal/Ternary-logic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ternary-logic/EMal \ No newline at end of file diff --git a/Lang/EMal/Tree-traversal b/Lang/EMal/Tree-traversal deleted file mode 120000 index b693d069a6..0000000000 --- a/Lang/EMal/Tree-traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-traversal/EMal \ No newline at end of file diff --git a/Lang/EMal/User-input-Text b/Lang/EMal/User-input-Text deleted file mode 120000 index 3c00cf11ba..0000000000 --- a/Lang/EMal/User-input-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Text/EMal \ No newline at end of file diff --git a/Lang/EMal/Van-Eck-sequence b/Lang/EMal/Van-Eck-sequence deleted file mode 120000 index 45280862ec..0000000000 --- a/Lang/EMal/Van-Eck-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-Eck-sequence/EMal \ No newline at end of file diff --git a/Lang/ERRE/Leonardo-numbers b/Lang/ERRE/Leonardo-numbers deleted file mode 120000 index 3e0d0050d1..0000000000 --- a/Lang/ERRE/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/ERRE \ No newline at end of file diff --git a/Lang/ERRE/Quaternion-type b/Lang/ERRE/Quaternion-type new file mode 120000 index 0000000000..fcc1edb64e --- /dev/null +++ b/Lang/ERRE/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/ERRE \ No newline at end of file diff --git a/Lang/EasyLang/00-LANG.txt b/Lang/EasyLang/00-LANG.txt index e09a925b83..aa156f93c8 100644 --- a/Lang/EasyLang/00-LANG.txt +++ b/Lang/EasyLang/00-LANG.txt @@ -1,19 +1,19 @@ {{language |exec=interpreted -|site=https://easylang.online/ +|site=https://easylang.dev/ |parampass=value, reference |safety=safe |express=explicit |checking=static |tags=learning, web canvas}} -[https://easylang.online/ide/ '''Browser IDE'''] +[https://easylang.dev/ide/ '''Browser IDE'''] ''Easylang'' is a (beginners) programming language with built-in commands for graphics output. The statically typed language has a reduced syntax and semantics. Variables do not have to be declared, the data type is encoded in the variable name - as was usual in the earlier home computer BASIC. The data types are strings and numbers (floating point), arrays of strings and numbers, and arrays of arrays. Arrays are 1-based and can grow. Programs compiled into an AST tree run in the browser or in the browser IDE. -[https://easylang.online/ide/ A browser IDE] with different tutorials, one for beginners, makes programming and learning to program as easy as possible. +[https://easylang.dev/ide/ A browser IDE] with different tutorials, one for beginners, makes programming and learning to program as easy as possible. -The finished programs can be easily integrated into a [https://easylang.online/apps/ website]. +The finished programs can be easily integrated into a [https://easylang.dev/apps/ website]. ==Todo== [[Tasks not implemented in EasyLang]] \ No newline at end of file diff --git a/Lang/EasyLang/2048 b/Lang/EasyLang/2048 deleted file mode 120000 index 4a69b16207..0000000000 --- a/Lang/EasyLang/2048 +++ /dev/null @@ -1 +0,0 @@ -../../Task/2048/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/24-game b/Lang/EasyLang/24-game deleted file mode 120000 index 85da2301e7..0000000000 --- a/Lang/EasyLang/24-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/9-billion-names-of-God-the-integer b/Lang/EasyLang/9-billion-names-of-God-the-integer deleted file mode 120000 index eab904ccaa..0000000000 --- a/Lang/EasyLang/9-billion-names-of-God-the-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/9-billion-names-of-God-the-integer/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/AKS-test-for-primes b/Lang/EasyLang/AKS-test-for-primes deleted file mode 120000 index fb3fd809a4..0000000000 --- a/Lang/EasyLang/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Abbreviations-automatic b/Lang/EasyLang/Abbreviations-automatic deleted file mode 120000 index 10b2251691..0000000000 --- a/Lang/EasyLang/Abbreviations-automatic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-automatic/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Abbreviations-easy b/Lang/EasyLang/Abbreviations-easy deleted file mode 120000 index 9f43877f2b..0000000000 --- a/Lang/EasyLang/Abbreviations-easy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-easy/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Abbreviations-simple b/Lang/EasyLang/Abbreviations-simple deleted file mode 120000 index 53295111be..0000000000 --- a/Lang/EasyLang/Abbreviations-simple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-simple/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Abelian-sandpile-model b/Lang/EasyLang/Abelian-sandpile-model deleted file mode 120000 index c97f3c3aa6..0000000000 --- a/Lang/EasyLang/Abelian-sandpile-model +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Abelian-sandpile-model-Identity b/Lang/EasyLang/Abelian-sandpile-model-Identity deleted file mode 120000 index c44f8cb53d..0000000000 --- a/Lang/EasyLang/Abelian-sandpile-model-Identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model-Identity/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Amb b/Lang/EasyLang/Amb deleted file mode 120000 index cee73196db..0000000000 --- a/Lang/EasyLang/Amb +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amb/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Anagrams b/Lang/EasyLang/Anagrams deleted file mode 120000 index 1a48ded8aa..0000000000 --- a/Lang/EasyLang/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Anagrams-Deranged-anagrams b/Lang/EasyLang/Anagrams-Deranged-anagrams deleted file mode 120000 index b7af47405b..0000000000 --- a/Lang/EasyLang/Anagrams-Deranged-anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams-Deranged-anagrams/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Approximate-equality b/Lang/EasyLang/Approximate-equality deleted file mode 120000 index 916cbf0873..0000000000 --- a/Lang/EasyLang/Approximate-equality +++ /dev/null @@ -1 +0,0 @@ -../../Task/Approximate-equality/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Arithmetic-Complex b/Lang/EasyLang/Arithmetic-Complex deleted file mode 120000 index 547a37cd78..0000000000 --- a/Lang/EasyLang/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Associative-array-Merging b/Lang/EasyLang/Associative-array-Merging deleted file mode 120000 index efe48db36d..0000000000 --- a/Lang/EasyLang/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Babylonian-spiral b/Lang/EasyLang/Babylonian-spiral deleted file mode 120000 index a141d2cd6b..0000000000 --- a/Lang/EasyLang/Babylonian-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babylonian-spiral/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Bioinformatics-Sequence-mutation b/Lang/EasyLang/Bioinformatics-Sequence-mutation deleted file mode 120000 index 6d30bfa11e..0000000000 --- a/Lang/EasyLang/Bioinformatics-Sequence-mutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bioinformatics-Sequence-mutation/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Bioinformatics-base-count b/Lang/EasyLang/Bioinformatics-base-count new file mode 120000 index 0000000000..3bc65db849 --- /dev/null +++ b/Lang/EasyLang/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Bitmap-B-zier-curves-Quadratic b/Lang/EasyLang/Bitmap-B-zier-curves-Quadratic deleted file mode 120000 index 569a661356..0000000000 --- a/Lang/EasyLang/Bitmap-B-zier-curves-Quadratic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-B-zier-curves-Quadratic/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Bitmap-Midpoint-circle-algorithm b/Lang/EasyLang/Bitmap-Midpoint-circle-algorithm deleted file mode 120000 index 9b995802ee..0000000000 --- a/Lang/EasyLang/Bitmap-Midpoint-circle-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Midpoint-circle-algorithm/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Boyer-Moore-string-search b/Lang/EasyLang/Boyer-Moore-string-search deleted file mode 120000 index 189112146a..0000000000 --- a/Lang/EasyLang/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Brace-expansion b/Lang/EasyLang/Brace-expansion deleted file mode 120000 index fadaa7c96a..0000000000 --- a/Lang/EasyLang/Brace-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brace-expansion/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Bulls-and-cows-Player b/Lang/EasyLang/Bulls-and-cows-Player deleted file mode 120000 index 9e4aef5378..0000000000 --- a/Lang/EasyLang/Bulls-and-cows-Player +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bulls-and-cows-Player/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Burrows-Wheeler-transform b/Lang/EasyLang/Burrows-Wheeler-transform deleted file mode 120000 index d3dcf6a651..0000000000 --- a/Lang/EasyLang/Burrows-Wheeler-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Burrows-Wheeler-transform/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/CRC-32 b/Lang/EasyLang/CRC-32 deleted file mode 120000 index 75d250a063..0000000000 --- a/Lang/EasyLang/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Cheryls-birthday b/Lang/EasyLang/Cheryls-birthday deleted file mode 120000 index da4092e3ea..0000000000 --- a/Lang/EasyLang/Cheryls-birthday +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cheryls-birthday/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Cholesky-decomposition b/Lang/EasyLang/Cholesky-decomposition deleted file mode 120000 index 3d9b8e35d4..0000000000 --- a/Lang/EasyLang/Cholesky-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cholesky-decomposition/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Convert-decimal-number-to-rational b/Lang/EasyLang/Convert-decimal-number-to-rational deleted file mode 120000 index d8af3c05f9..0000000000 --- a/Lang/EasyLang/Convert-decimal-number-to-rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-decimal-number-to-rational/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Currency b/Lang/EasyLang/Currency deleted file mode 120000 index a42c848ea8..0000000000 --- a/Lang/EasyLang/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Date-format b/Lang/EasyLang/Date-format deleted file mode 120000 index 443f76ed6a..0000000000 --- a/Lang/EasyLang/Date-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-format/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Death-Star b/Lang/EasyLang/Death-Star deleted file mode 120000 index 71ec2dde3d..0000000000 --- a/Lang/EasyLang/Death-Star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Death-Star/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Deconvolution-1D b/Lang/EasyLang/Deconvolution-1D deleted file mode 120000 index 7dba9ab208..0000000000 --- a/Lang/EasyLang/Deconvolution-1D +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-1D/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Deepcopy b/Lang/EasyLang/Deepcopy deleted file mode 120000 index 4137c6d590..0000000000 --- a/Lang/EasyLang/Deepcopy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deepcopy/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Determinant-and-permanent b/Lang/EasyLang/Determinant-and-permanent deleted file mode 120000 index 09ae422506..0000000000 --- a/Lang/EasyLang/Determinant-and-permanent +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determinant-and-permanent/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Distribution-of-0-digits-in-factorial-series b/Lang/EasyLang/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index 10532131de..0000000000 --- a/Lang/EasyLang/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Draw-a-sphere b/Lang/EasyLang/Draw-a-sphere deleted file mode 120000 index 4a92493ec5..0000000000 --- a/Lang/EasyLang/Draw-a-sphere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-sphere/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/EKG-sequence-convergence b/Lang/EasyLang/EKG-sequence-convergence deleted file mode 120000 index a5d661cade..0000000000 --- a/Lang/EasyLang/EKG-sequence-convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/EKG-sequence-convergence/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Earliest-difference-between-prime-gaps b/Lang/EasyLang/Earliest-difference-between-prime-gaps deleted file mode 120000 index e8abb13bc1..0000000000 --- a/Lang/EasyLang/Earliest-difference-between-prime-gaps +++ /dev/null @@ -1 +0,0 @@ -../../Task/Earliest-difference-between-prime-gaps/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Element-wise-operations b/Lang/EasyLang/Element-wise-operations deleted file mode 120000 index 79d10fbb82..0000000000 --- a/Lang/EasyLang/Element-wise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Element-wise-operations/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Elementary-cellular-automaton-Infinite-length b/Lang/EasyLang/Elementary-cellular-automaton-Infinite-length deleted file mode 120000 index 440a0e3168..0000000000 --- a/Lang/EasyLang/Elementary-cellular-automaton-Infinite-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elementary-cellular-automaton-Infinite-length/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Erd-s-Selfridge-categorization-of-primes b/Lang/EasyLang/Erd-s-Selfridge-categorization-of-primes deleted file mode 120000 index a64dc7d4f0..0000000000 --- a/Lang/EasyLang/Erd-s-Selfridge-categorization-of-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Erd-s-Selfridge-categorization-of-primes/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Eulers-identity b/Lang/EasyLang/Eulers-identity deleted file mode 120000 index 6753a604ea..0000000000 --- a/Lang/EasyLang/Eulers-identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-identity/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Factorions b/Lang/EasyLang/Factorions deleted file mode 120000 index 52bf4a578c..0000000000 --- a/Lang/EasyLang/Factorions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorions/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Fast-Fourier-transform b/Lang/EasyLang/Fast-Fourier-transform deleted file mode 120000 index 6486d41d10..0000000000 --- a/Lang/EasyLang/Fast-Fourier-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fast-Fourier-transform/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Faulhabers-formula b/Lang/EasyLang/Faulhabers-formula deleted file mode 120000 index a0587d4c22..0000000000 --- a/Lang/EasyLang/Faulhabers-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Faulhabers-formula/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Faulhabers-triangle b/Lang/EasyLang/Faulhabers-triangle deleted file mode 120000 index 0ced82832c..0000000000 --- a/Lang/EasyLang/Faulhabers-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Faulhabers-triangle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Fermat-numbers b/Lang/EasyLang/Fermat-numbers deleted file mode 120000 index 0bf9bf359c..0000000000 --- a/Lang/EasyLang/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Fibonacci-word-fractal b/Lang/EasyLang/Fibonacci-word-fractal deleted file mode 120000 index d075c27d88..0000000000 --- a/Lang/EasyLang/Fibonacci-word-fractal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-word-fractal/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Find-Chess960-starting-position-identifier b/Lang/EasyLang/Find-Chess960-starting-position-identifier deleted file mode 120000 index 74db5136c0..0000000000 --- a/Lang/EasyLang/Find-Chess960-starting-position-identifier +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-Chess960-starting-position-identifier/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Find-if-a-point-is-within-a-triangle b/Lang/EasyLang/Find-if-a-point-is-within-a-triangle deleted file mode 120000 index cd1bb80075..0000000000 --- a/Lang/EasyLang/Find-if-a-point-is-within-a-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-if-a-point-is-within-a-triangle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Floyd-Warshall-algorithm b/Lang/EasyLang/Floyd-Warshall-algorithm deleted file mode 120000 index 3210a33bb1..0000000000 --- a/Lang/EasyLang/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Fortunate-numbers b/Lang/EasyLang/Fortunate-numbers deleted file mode 120000 index 2c6e02874b..0000000000 --- a/Lang/EasyLang/Fortunate-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fortunate-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Forward-difference b/Lang/EasyLang/Forward-difference deleted file mode 120000 index 12de7eedb0..0000000000 --- a/Lang/EasyLang/Forward-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Forward-difference/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Fraction-reduction b/Lang/EasyLang/Fraction-reduction deleted file mode 120000 index 61af524020..0000000000 --- a/Lang/EasyLang/Fraction-reduction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fraction-reduction/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Fractran b/Lang/EasyLang/Fractran deleted file mode 120000 index 431453ab79..0000000000 --- a/Lang/EasyLang/Fractran +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractran/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/French-Republican-calendar b/Lang/EasyLang/French-Republican-calendar deleted file mode 120000 index 63cacd897e..0000000000 --- a/Lang/EasyLang/French-Republican-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/French-Republican-calendar/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Function-prototype b/Lang/EasyLang/Function-prototype deleted file mode 120000 index d56b3a5da3..0000000000 --- a/Lang/EasyLang/Function-prototype +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-prototype/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Greatest-subsequential-sum b/Lang/EasyLang/Greatest-subsequential-sum deleted file mode 120000 index 679d3c6deb..0000000000 --- a/Lang/EasyLang/Greatest-subsequential-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-subsequential-sum/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Guess-the-number-With-feedback-player- b/Lang/EasyLang/Guess-the-number-With-feedback-player- deleted file mode 120000 index 56ad8fd02a..0000000000 --- a/Lang/EasyLang/Guess-the-number-With-feedback-player- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number-With-feedback-player-/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Halt-and-catch-fire b/Lang/EasyLang/Halt-and-catch-fire deleted file mode 120000 index fe61f64c40..0000000000 --- a/Lang/EasyLang/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Hamming-numbers b/Lang/EasyLang/Hamming-numbers deleted file mode 120000 index 6f52ef2c78..0000000000 --- a/Lang/EasyLang/Hamming-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hamming-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Hash-from-two-arrays b/Lang/EasyLang/Hash-from-two-arrays deleted file mode 120000 index 0d148a2df3..0000000000 --- a/Lang/EasyLang/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Heronian-triangles b/Lang/EasyLang/Heronian-triangles deleted file mode 120000 index 8656dc59f0..0000000000 --- a/Lang/EasyLang/Heronian-triangles +++ /dev/null @@ -1 +0,0 @@ -../../Task/Heronian-triangles/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Hex-words b/Lang/EasyLang/Hex-words deleted file mode 120000 index 0d39e2eee9..0000000000 --- a/Lang/EasyLang/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Hofstadter-Figure-Figure-sequences b/Lang/EasyLang/Hofstadter-Figure-Figure-sequences deleted file mode 120000 index d5a34b275d..0000000000 --- a/Lang/EasyLang/Hofstadter-Figure-Figure-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Figure-Figure-sequences/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Honeycombs b/Lang/EasyLang/Honeycombs deleted file mode 120000 index 5885102888..0000000000 --- a/Lang/EasyLang/Honeycombs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Honeycombs/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Hunt-the-Wumpus b/Lang/EasyLang/Hunt-the-Wumpus deleted file mode 120000 index 8a2489577d..0000000000 --- a/Lang/EasyLang/Hunt-the-Wumpus +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hunt-the-Wumpus/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/IBAN b/Lang/EasyLang/IBAN deleted file mode 120000 index 961014b963..0000000000 --- a/Lang/EasyLang/IBAN +++ /dev/null @@ -1 +0,0 @@ -../../Task/IBAN/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols b/Lang/EasyLang/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols deleted file mode 120000 index ff1573925b..0000000000 --- a/Lang/EasyLang/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols +++ /dev/null @@ -1 +0,0 @@ -../../Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Im-a-software-engineer-get-me-out-of-here b/Lang/EasyLang/Im-a-software-engineer-get-me-out-of-here deleted file mode 120000 index 70ace224d9..0000000000 --- a/Lang/EasyLang/Im-a-software-engineer-get-me-out-of-here +++ /dev/null @@ -1 +0,0 @@ -../../Task/Im-a-software-engineer-get-me-out-of-here/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Isograms-and-heterograms b/Lang/EasyLang/Isograms-and-heterograms deleted file mode 120000 index 44f53b57ff..0000000000 --- a/Lang/EasyLang/Isograms-and-heterograms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isograms-and-heterograms/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Iterated-digits-squaring b/Lang/EasyLang/Iterated-digits-squaring deleted file mode 120000 index 193be9fcba..0000000000 --- a/Lang/EasyLang/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Jacobi-symbol b/Lang/EasyLang/Jacobi-symbol deleted file mode 120000 index fec464ee0d..0000000000 --- a/Lang/EasyLang/Jacobi-symbol +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobi-symbol/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Jacobsthal-numbers b/Lang/EasyLang/Jacobsthal-numbers deleted file mode 120000 index 9469db92c2..0000000000 --- a/Lang/EasyLang/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Jaro-Winkler-distance b/Lang/EasyLang/Jaro-Winkler-distance deleted file mode 120000 index 727f74b880..0000000000 --- a/Lang/EasyLang/Jaro-Winkler-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-Winkler-distance/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Jaro-similarity b/Lang/EasyLang/Jaro-similarity deleted file mode 120000 index d630573e8e..0000000000 --- a/Lang/EasyLang/Jaro-similarity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-similarity/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/JortSort b/Lang/EasyLang/JortSort deleted file mode 120000 index 69c9d425de..0000000000 --- a/Lang/EasyLang/JortSort +++ /dev/null @@ -1 +0,0 @@ -../../Task/JortSort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Juggler-sequence b/Lang/EasyLang/Juggler-sequence deleted file mode 120000 index a501986168..0000000000 --- a/Lang/EasyLang/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/K-means++-clustering b/Lang/EasyLang/K-means++-clustering deleted file mode 120000 index 9c59e662f6..0000000000 --- a/Lang/EasyLang/K-means++-clustering +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-means++-clustering/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Kernighans-large-earthquake-problem b/Lang/EasyLang/Kernighans-large-earthquake-problem deleted file mode 120000 index 3ab1e4458e..0000000000 --- a/Lang/EasyLang/Kernighans-large-earthquake-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kernighans-large-earthquake-problem/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Keyboard-input-Keypress-check b/Lang/EasyLang/Keyboard-input-Keypress-check deleted file mode 120000 index 749a963892..0000000000 --- a/Lang/EasyLang/Keyboard-input-Keypress-check +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Keypress-check/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Keyboard-input-Obtain-a-Y-or-N-response b/Lang/EasyLang/Keyboard-input-Obtain-a-Y-or-N-response deleted file mode 120000 index afc72ecd9d..0000000000 --- a/Lang/EasyLang/Keyboard-input-Obtain-a-Y-or-N-response +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Obtain-a-Y-or-N-response/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Knapsack-problem-Bounded b/Lang/EasyLang/Knapsack-problem-Bounded deleted file mode 120000 index d0f7a40df2..0000000000 --- a/Lang/EasyLang/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Knapsack-problem-Continuous b/Lang/EasyLang/Knapsack-problem-Continuous deleted file mode 120000 index a54e4a1363..0000000000 --- a/Lang/EasyLang/Knapsack-problem-Continuous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Continuous/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Knapsack-problem-Unbounded b/Lang/EasyLang/Knapsack-problem-Unbounded deleted file mode 120000 index feaf22d24e..0000000000 --- a/Lang/EasyLang/Knapsack-problem-Unbounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Unbounded/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Knights-tour b/Lang/EasyLang/Knights-tour deleted file mode 120000 index c3c72273c2..0000000000 --- a/Lang/EasyLang/Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knights-tour/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Kolakoski-sequence b/Lang/EasyLang/Kolakoski-sequence deleted file mode 120000 index 0d808caea4..0000000000 --- a/Lang/EasyLang/Kolakoski-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kolakoski-sequence/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Kosaraju b/Lang/EasyLang/Kosaraju deleted file mode 120000 index 84b9e66a67..0000000000 --- a/Lang/EasyLang/Kosaraju +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kosaraju/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Kronecker-product b/Lang/EasyLang/Kronecker-product deleted file mode 120000 index 1246c0ce28..0000000000 --- a/Lang/EasyLang/Kronecker-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Kronecker-product-based-fractals b/Lang/EasyLang/Kronecker-product-based-fractals deleted file mode 120000 index 563af0ba71..0000000000 --- a/Lang/EasyLang/Kronecker-product-based-fractals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product-based-fractals/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/LU-decomposition b/Lang/EasyLang/LU-decomposition deleted file mode 120000 index b8f8a0d85a..0000000000 --- a/Lang/EasyLang/LU-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/LU-decomposition/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Largest-int-from-concatenated-ints b/Lang/EasyLang/Largest-int-from-concatenated-ints deleted file mode 120000 index 10e1335e8a..0000000000 --- a/Lang/EasyLang/Largest-int-from-concatenated-ints +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-int-from-concatenated-ints/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Last-letter-first-letter b/Lang/EasyLang/Last-letter-first-letter deleted file mode 120000 index 0b195a1260..0000000000 --- a/Lang/EasyLang/Last-letter-first-letter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-letter-first-letter/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Law-of-cosines---triples b/Lang/EasyLang/Law-of-cosines---triples deleted file mode 120000 index c863a3f9c0..0000000000 --- a/Lang/EasyLang/Law-of-cosines---triples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Law-of-cosines---triples/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Left-factorials b/Lang/EasyLang/Left-factorials deleted file mode 120000 index 99571138e4..0000000000 --- a/Lang/EasyLang/Left-factorials +++ /dev/null @@ -1 +0,0 @@ -../../Task/Left-factorials/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Legendre-prime-counting-function b/Lang/EasyLang/Legendre-prime-counting-function deleted file mode 120000 index 4b5478a288..0000000000 --- a/Lang/EasyLang/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/List-rooted-trees b/Lang/EasyLang/List-rooted-trees deleted file mode 120000 index 14cdfaa5a6..0000000000 --- a/Lang/EasyLang/List-rooted-trees +++ /dev/null @@ -1 +0,0 @@ -../../Task/List-rooted-trees/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Logistic-curve-fitting-in-epidemiology b/Lang/EasyLang/Logistic-curve-fitting-in-epidemiology deleted file mode 120000 index 265f7cdf24..0000000000 --- a/Lang/EasyLang/Logistic-curve-fitting-in-epidemiology +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logistic-curve-fitting-in-epidemiology/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Long-literals-with-continuations b/Lang/EasyLang/Long-literals-with-continuations deleted file mode 120000 index ffe5aa4238..0000000000 --- a/Lang/EasyLang/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Longest-increasing-subsequence b/Lang/EasyLang/Longest-increasing-subsequence deleted file mode 120000 index eabf95f750..0000000000 --- a/Lang/EasyLang/Longest-increasing-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-increasing-subsequence/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Loops-Wrong-ranges b/Lang/EasyLang/Loops-Wrong-ranges deleted file mode 120000 index d803a36357..0000000000 --- a/Lang/EasyLang/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Ludic-numbers b/Lang/EasyLang/Ludic-numbers deleted file mode 120000 index 1d6fc2e015..0000000000 --- a/Lang/EasyLang/Ludic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ludic-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Lychrel-numbers b/Lang/EasyLang/Lychrel-numbers deleted file mode 120000 index a66932caaa..0000000000 --- a/Lang/EasyLang/Lychrel-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lychrel-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/MD4 b/Lang/EasyLang/MD4 deleted file mode 120000 index 607e4d2f65..0000000000 --- a/Lang/EasyLang/MD4 +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD4/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Mad-Libs b/Lang/EasyLang/Mad-Libs deleted file mode 120000 index 80e4f5b2e7..0000000000 --- a/Lang/EasyLang/Mad-Libs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mad-Libs/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Magic-squares-of-doubly-even-order b/Lang/EasyLang/Magic-squares-of-doubly-even-order deleted file mode 120000 index b5f41f3cca..0000000000 --- a/Lang/EasyLang/Magic-squares-of-doubly-even-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-doubly-even-order/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Magic-squares-of-singly-even-order b/Lang/EasyLang/Magic-squares-of-singly-even-order deleted file mode 120000 index bffad4e9d9..0000000000 --- a/Lang/EasyLang/Magic-squares-of-singly-even-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-singly-even-order/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Map-range b/Lang/EasyLang/Map-range deleted file mode 120000 index 7f2fe886c3..0000000000 --- a/Lang/EasyLang/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Matrix-chain-multiplication b/Lang/EasyLang/Matrix-chain-multiplication deleted file mode 120000 index 49b2582836..0000000000 --- a/Lang/EasyLang/Matrix-chain-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-chain-multiplication/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Matrix-exponentiation-operator b/Lang/EasyLang/Matrix-exponentiation-operator deleted file mode 120000 index ffeb77ddad..0000000000 --- a/Lang/EasyLang/Matrix-exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-exponentiation-operator/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Mayan-numerals b/Lang/EasyLang/Mayan-numerals deleted file mode 120000 index 101692428a..0000000000 --- a/Lang/EasyLang/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Meissel-Mertens-constant b/Lang/EasyLang/Meissel-Mertens-constant new file mode 120000 index 0000000000..2673a3a653 --- /dev/null +++ b/Lang/EasyLang/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Merge-and-aggregate-datasets b/Lang/EasyLang/Merge-and-aggregate-datasets deleted file mode 120000 index 4240a68719..0000000000 --- a/Lang/EasyLang/Merge-and-aggregate-datasets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Merge-and-aggregate-datasets/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Mian-Chowla-sequence b/Lang/EasyLang/Mian-Chowla-sequence deleted file mode 120000 index 314aaad4b1..0000000000 --- a/Lang/EasyLang/Mian-Chowla-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mian-Chowla-sequence/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Minkowski-question-mark-function b/Lang/EasyLang/Minkowski-question-mark-function deleted file mode 120000 index e4df814cca..0000000000 --- a/Lang/EasyLang/Minkowski-question-mark-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minkowski-question-mark-function/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Modified-random-distribution b/Lang/EasyLang/Modified-random-distribution deleted file mode 120000 index 127bc0bcb6..0000000000 --- a/Lang/EasyLang/Modified-random-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modified-random-distribution/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Modular-exponentiation b/Lang/EasyLang/Modular-exponentiation deleted file mode 120000 index 7257cc430f..0000000000 --- a/Lang/EasyLang/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Move-to-front-algorithm b/Lang/EasyLang/Move-to-front-algorithm deleted file mode 120000 index 8c3f8fe7f9..0000000000 --- a/Lang/EasyLang/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Multi-base-primes b/Lang/EasyLang/Multi-base-primes deleted file mode 120000 index 0b06b01c9e..0000000000 --- a/Lang/EasyLang/Multi-base-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-base-primes/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Multisplit b/Lang/EasyLang/Multisplit deleted file mode 120000 index 3f480eaeea..0000000000 --- a/Lang/EasyLang/Multisplit +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multisplit/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Negative-base-numbers b/Lang/EasyLang/Negative-base-numbers deleted file mode 120000 index 750b2fa4de..0000000000 --- a/Lang/EasyLang/Negative-base-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Negative-base-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Nested-function b/Lang/EasyLang/Nested-function deleted file mode 120000 index 3d6f80739f..0000000000 --- a/Lang/EasyLang/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Non-continuous-subsequences b/Lang/EasyLang/Non-continuous-subsequences deleted file mode 120000 index 1ddebfbef7..0000000000 --- a/Lang/EasyLang/Non-continuous-subsequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-continuous-subsequences/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Non-decimal-radices-Input b/Lang/EasyLang/Non-decimal-radices-Input deleted file mode 120000 index 15845b7041..0000000000 --- a/Lang/EasyLang/Non-decimal-radices-Input +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-decimal-radices-Input/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Nonoblock b/Lang/EasyLang/Nonoblock deleted file mode 120000 index e2c27bd166..0000000000 --- a/Lang/EasyLang/Nonoblock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nonoblock/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Number-reversal-game b/Lang/EasyLang/Number-reversal-game deleted file mode 120000 index a55399f2e0..0000000000 --- a/Lang/EasyLang/Number-reversal-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Number-reversal-game/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Order-by-pair-comparisons b/Lang/EasyLang/Order-by-pair-comparisons deleted file mode 120000 index 78fc8f28e3..0000000000 --- a/Lang/EasyLang/Order-by-pair-comparisons +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-by-pair-comparisons/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Order-disjoint-list-items b/Lang/EasyLang/Order-disjoint-list-items deleted file mode 120000 index bd0f2b89f9..0000000000 --- a/Lang/EasyLang/Order-disjoint-list-items +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-disjoint-list-items/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Ordered-words b/Lang/EasyLang/Ordered-words deleted file mode 120000 index 284c4e7df2..0000000000 --- a/Lang/EasyLang/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Paraffins b/Lang/EasyLang/Paraffins deleted file mode 120000 index 954e9b549e..0000000000 --- a/Lang/EasyLang/Paraffins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Paraffins/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Parsing-RPN-calculator-algorithm b/Lang/EasyLang/Parsing-RPN-calculator-algorithm deleted file mode 120000 index 4c308dc876..0000000000 --- a/Lang/EasyLang/Parsing-RPN-calculator-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-calculator-algorithm/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Partition-an-integer-x-into-n-primes b/Lang/EasyLang/Partition-an-integer-x-into-n-primes deleted file mode 120000 index 21cc93eeed..0000000000 --- a/Lang/EasyLang/Partition-an-integer-x-into-n-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-an-integer-x-into-n-primes/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Partition-function-P b/Lang/EasyLang/Partition-function-P deleted file mode 120000 index 07b0e608d7..0000000000 --- a/Lang/EasyLang/Partition-function-P +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-function-P/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Pascal-matrix-generation b/Lang/EasyLang/Pascal-matrix-generation deleted file mode 120000 index 2a45a12baf..0000000000 --- a/Lang/EasyLang/Pascal-matrix-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascal-matrix-generation/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Pascals-triangle-Puzzle b/Lang/EasyLang/Pascals-triangle-Puzzle deleted file mode 120000 index bb3b35817e..0000000000 --- a/Lang/EasyLang/Pascals-triangle-Puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle-Puzzle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Password-generator b/Lang/EasyLang/Password-generator deleted file mode 120000 index 004d74f550..0000000000 --- a/Lang/EasyLang/Password-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Password-generator/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Pathological-floating-point-problems b/Lang/EasyLang/Pathological-floating-point-problems deleted file mode 120000 index feb17cf372..0000000000 --- a/Lang/EasyLang/Pathological-floating-point-problems +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pathological-floating-point-problems/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Penneys-game b/Lang/EasyLang/Penneys-game deleted file mode 120000 index 8a534b3c6f..0000000000 --- a/Lang/EasyLang/Penneys-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Penneys-game/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Percolation-Mean-cluster-density b/Lang/EasyLang/Percolation-Mean-cluster-density deleted file mode 120000 index 5231594fc4..0000000000 --- a/Lang/EasyLang/Percolation-Mean-cluster-density +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percolation-Mean-cluster-density/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Percolation-Site-percolation b/Lang/EasyLang/Percolation-Site-percolation deleted file mode 120000 index 50ffe015c4..0000000000 --- a/Lang/EasyLang/Percolation-Site-percolation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percolation-Site-percolation/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Peripheral-drift-illusion b/Lang/EasyLang/Peripheral-drift-illusion deleted file mode 120000 index 6922becd71..0000000000 --- a/Lang/EasyLang/Peripheral-drift-illusion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peripheral-drift-illusion/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Permutation-test b/Lang/EasyLang/Permutation-test deleted file mode 120000 index d3b1950f7a..0000000000 --- a/Lang/EasyLang/Permutation-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutation-test/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Permutations-Rank-of-a-permutation b/Lang/EasyLang/Permutations-Rank-of-a-permutation deleted file mode 120000 index 0512aed3af..0000000000 --- a/Lang/EasyLang/Permutations-Rank-of-a-permutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations-Rank-of-a-permutation/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Phrase-reversals b/Lang/EasyLang/Phrase-reversals deleted file mode 120000 index 3631697399..0000000000 --- a/Lang/EasyLang/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Pierpont-primes b/Lang/EasyLang/Pierpont-primes deleted file mode 120000 index 6e3e44c04c..0000000000 --- a/Lang/EasyLang/Pierpont-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pierpont-primes/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Pinstripe-Display b/Lang/EasyLang/Pinstripe-Display deleted file mode 120000 index db25917458..0000000000 --- a/Lang/EasyLang/Pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pinstripe-Display/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Plasma-effect b/Lang/EasyLang/Plasma-effect deleted file mode 120000 index 5f845f7e61..0000000000 --- a/Lang/EasyLang/Plasma-effect +++ /dev/null @@ -1 +0,0 @@ -../../Task/Plasma-effect/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Playfair-cipher b/Lang/EasyLang/Playfair-cipher deleted file mode 120000 index 3d1568669f..0000000000 --- a/Lang/EasyLang/Playfair-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Playfair-cipher/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Poker-hand-analyser b/Lang/EasyLang/Poker-hand-analyser deleted file mode 120000 index 0d36d9a0f9..0000000000 --- a/Lang/EasyLang/Poker-hand-analyser +++ /dev/null @@ -1 +0,0 @@ -../../Task/Poker-hand-analyser/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Polynomial-long-division b/Lang/EasyLang/Polynomial-long-division deleted file mode 120000 index b22845819d..0000000000 --- a/Lang/EasyLang/Polynomial-long-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polynomial-long-division/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Prime-numbers-whose-neighboring-pairs-are-tetraprimes b/Lang/EasyLang/Prime-numbers-whose-neighboring-pairs-are-tetraprimes deleted file mode 120000 index deadbe682f..0000000000 --- a/Lang/EasyLang/Prime-numbers-whose-neighboring-pairs-are-tetraprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-numbers-whose-neighboring-pairs-are-tetraprimes/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Prime-triangle b/Lang/EasyLang/Prime-triangle deleted file mode 120000 index 1d703d33b5..0000000000 --- a/Lang/EasyLang/Prime-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-triangle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Primes---allocate-descendants-to-their-ancestors b/Lang/EasyLang/Primes---allocate-descendants-to-their-ancestors deleted file mode 120000 index c5cfa0147b..0000000000 --- a/Lang/EasyLang/Primes---allocate-descendants-to-their-ancestors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primes---allocate-descendants-to-their-ancestors/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Primorial-numbers b/Lang/EasyLang/Primorial-numbers deleted file mode 120000 index d0a4900284..0000000000 --- a/Lang/EasyLang/Primorial-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primorial-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a b/Lang/EasyLang/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a deleted file mode 120000 index 4f4d220e94..0000000000 --- a/Lang/EasyLang/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Pythagorean-quadruples b/Lang/EasyLang/Pythagorean-quadruples deleted file mode 120000 index 63bc250851..0000000000 --- a/Lang/EasyLang/Pythagorean-quadruples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagorean-quadruples/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Quaternion-type b/Lang/EasyLang/Quaternion-type new file mode 120000 index 0000000000..fd590dabb6 --- /dev/null +++ b/Lang/EasyLang/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Quoting-constructs b/Lang/EasyLang/Quoting-constructs deleted file mode 120000 index 4d929963d4..0000000000 --- a/Lang/EasyLang/Quoting-constructs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quoting-constructs/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/RIPEMD-160 b/Lang/EasyLang/RIPEMD-160 deleted file mode 120000 index c7b5193d17..0000000000 --- a/Lang/EasyLang/RIPEMD-160 +++ /dev/null @@ -1 +0,0 @@ -../../Task/RIPEMD-160/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/RSA-code b/Lang/EasyLang/RSA-code deleted file mode 120000 index ab0c3fd0ae..0000000000 --- a/Lang/EasyLang/RSA-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/RSA-code/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Range-consolidation b/Lang/EasyLang/Range-consolidation deleted file mode 120000 index 2af9d87ce4..0000000000 --- a/Lang/EasyLang/Range-consolidation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-consolidation/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Range-expansion b/Lang/EasyLang/Range-expansion deleted file mode 120000 index b1e04fdc47..0000000000 --- a/Lang/EasyLang/Range-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-expansion/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Ranking-methods b/Lang/EasyLang/Ranking-methods deleted file mode 120000 index 7f1b7f2c09..0000000000 --- a/Lang/EasyLang/Ranking-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ranking-methods/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Read-a-specific-line-from-a-file b/Lang/EasyLang/Read-a-specific-line-from-a-file deleted file mode 120000 index d7d3ddb462..0000000000 --- a/Lang/EasyLang/Read-a-specific-line-from-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-specific-line-from-a-file/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Resistor-mesh b/Lang/EasyLang/Resistor-mesh deleted file mode 120000 index 7e1b48a0ca..0000000000 --- a/Lang/EasyLang/Resistor-mesh +++ /dev/null @@ -1 +0,0 @@ -../../Task/Resistor-mesh/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Rhonda-numbers b/Lang/EasyLang/Rhonda-numbers deleted file mode 120000 index 5ec2f03aee..0000000000 --- a/Lang/EasyLang/Rhonda-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rhonda-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Rock-paper-scissors b/Lang/EasyLang/Rock-paper-scissors deleted file mode 120000 index f5bc56ac98..0000000000 --- a/Lang/EasyLang/Rock-paper-scissors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rock-paper-scissors/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Ruth-Aaron-numbers b/Lang/EasyLang/Ruth-Aaron-numbers deleted file mode 120000 index 8c50b35963..0000000000 --- a/Lang/EasyLang/Ruth-Aaron-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ruth-Aaron-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/SHA-1 b/Lang/EasyLang/SHA-1 deleted file mode 120000 index 85ee6bdeff..0000000000 --- a/Lang/EasyLang/SHA-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-1/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/SHA-256 b/Lang/EasyLang/SHA-256 deleted file mode 120000 index 90c60df38f..0000000000 --- a/Lang/EasyLang/SHA-256 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-256/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sailors-coconuts-and-a-monkey-problem b/Lang/EasyLang/Sailors-coconuts-and-a-monkey-problem deleted file mode 120000 index 13c2416787..0000000000 --- a/Lang/EasyLang/Sailors-coconuts-and-a-monkey-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sailors-coconuts-and-a-monkey-problem/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Scope-Function-names-and-labels b/Lang/EasyLang/Scope-Function-names-and-labels deleted file mode 120000 index 159b6679bd..0000000000 --- a/Lang/EasyLang/Scope-Function-names-and-labels +++ /dev/null @@ -1 +0,0 @@ -../../Task/Scope-Function-names-and-labels/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Selectively-replace-multiple-instances-of-a-character-within-a-string b/Lang/EasyLang/Selectively-replace-multiple-instances-of-a-character-within-a-string deleted file mode 120000 index c9738f521a..0000000000 --- a/Lang/EasyLang/Selectively-replace-multiple-instances-of-a-character-within-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Selectively-replace-multiple-instances-of-a-character-within-a-string/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Self-numbers b/Lang/EasyLang/Self-numbers deleted file mode 120000 index 219b2abf44..0000000000 --- a/Lang/EasyLang/Self-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Self-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Semordnilap b/Lang/EasyLang/Semordnilap deleted file mode 120000 index 54e7d67bd7..0000000000 --- a/Lang/EasyLang/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/EasyLang/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/EasyLang/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/EasyLang/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/EasyLang/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/EasyLang/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/EasyLang/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/EasyLang/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/EasyLang/Show-the-epoch b/Lang/EasyLang/Show-the-epoch deleted file mode 120000 index 67a6b1a9c5..0000000000 --- a/Lang/EasyLang/Show-the-epoch +++ /dev/null @@ -1 +0,0 @@ -../../Task/Show-the-epoch/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sierpinski-triangle b/Lang/EasyLang/Sierpinski-triangle deleted file mode 120000 index 36520550cb..0000000000 --- a/Lang/EasyLang/Sierpinski-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Solve-a-Hidato-puzzle b/Lang/EasyLang/Solve-a-Hidato-puzzle deleted file mode 120000 index 91cd1509fe..0000000000 --- a/Lang/EasyLang/Solve-a-Hidato-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hidato-puzzle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Solve-a-Holy-Knights-tour b/Lang/EasyLang/Solve-a-Holy-Knights-tour deleted file mode 120000 index 0807789002..0000000000 --- a/Lang/EasyLang/Solve-a-Holy-Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Holy-Knights-tour/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Solve-a-Hopido-puzzle b/Lang/EasyLang/Solve-a-Hopido-puzzle deleted file mode 120000 index f1ae260677..0000000000 --- a/Lang/EasyLang/Solve-a-Hopido-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hopido-puzzle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Solve-a-Numbrix-puzzle b/Lang/EasyLang/Solve-a-Numbrix-puzzle deleted file mode 120000 index 9dc56df255..0000000000 --- a/Lang/EasyLang/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Solve-the-no-connection-puzzle b/Lang/EasyLang/Solve-the-no-connection-puzzle deleted file mode 120000 index 759be373e6..0000000000 --- a/Lang/EasyLang/Solve-the-no-connection-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-the-no-connection-puzzle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sort-a-list-of-object-identifiers b/Lang/EasyLang/Sort-a-list-of-object-identifiers deleted file mode 120000 index 6767e4212b..0000000000 --- a/Lang/EasyLang/Sort-a-list-of-object-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-a-list-of-object-identifiers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sort-an-integer-array b/Lang/EasyLang/Sort-an-integer-array deleted file mode 120000 index b6e22e35fd..0000000000 --- a/Lang/EasyLang/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sort-an-outline-at-every-level b/Lang/EasyLang/Sort-an-outline-at-every-level deleted file mode 120000 index aa549fd59a..0000000000 --- a/Lang/EasyLang/Sort-an-outline-at-every-level +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-outline-at-every-level/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sort-numbers-lexicographically b/Lang/EasyLang/Sort-numbers-lexicographically deleted file mode 120000 index 096e63b030..0000000000 --- a/Lang/EasyLang/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Bead-sort b/Lang/EasyLang/Sorting-algorithms-Bead-sort deleted file mode 120000 index a450a04067..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Bead-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bead-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Cocktail-sort b/Lang/EasyLang/Sorting-algorithms-Cocktail-sort deleted file mode 120000 index 6ea90a8bea..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Cocktail-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Cocktail-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Cocktail-sort-with-shifting-bounds b/Lang/EasyLang/Sorting-algorithms-Cocktail-sort-with-shifting-bounds deleted file mode 120000 index 885e9fc6f4..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Cocktail-sort-with-shifting-bounds +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Cocktail-sort-with-shifting-bounds/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Comb-sort b/Lang/EasyLang/Sorting-algorithms-Comb-sort deleted file mode 120000 index 105d051508..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Comb-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Comb-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Pancake-sort b/Lang/EasyLang/Sorting-algorithms-Pancake-sort deleted file mode 120000 index 7f8da5bd54..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Pancake-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Pancake-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Patience-sort b/Lang/EasyLang/Sorting-algorithms-Patience-sort deleted file mode 120000 index 6123828d8e..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Patience-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Patience-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Permutation-sort b/Lang/EasyLang/Sorting-algorithms-Permutation-sort deleted file mode 120000 index 858ffd0315..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Permutation-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Permutation-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Shell-sort b/Lang/EasyLang/Sorting-algorithms-Shell-sort deleted file mode 120000 index f5b30c5803..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Shell-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Shell-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sorting-algorithms-Strand-sort b/Lang/EasyLang/Sorting-algorithms-Strand-sort deleted file mode 120000 index 005353ca66..0000000000 --- a/Lang/EasyLang/Sorting-algorithms-Strand-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Strand-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sparkline-in-unicode b/Lang/EasyLang/Sparkline-in-unicode deleted file mode 120000 index 7ec2356a98..0000000000 --- a/Lang/EasyLang/Sparkline-in-unicode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sparkline-in-unicode/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Spelling-of-ordinal-numbers b/Lang/EasyLang/Spelling-of-ordinal-numbers deleted file mode 120000 index 657348f1ae..0000000000 --- a/Lang/EasyLang/Spelling-of-ordinal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spelling-of-ordinal-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sphenic-numbers b/Lang/EasyLang/Sphenic-numbers deleted file mode 120000 index 376288b88d..0000000000 --- a/Lang/EasyLang/Sphenic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sphenic-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Square-free-integers b/Lang/EasyLang/Square-free-integers deleted file mode 120000 index 07046cee4c..0000000000 --- a/Lang/EasyLang/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Stable-marriage-problem b/Lang/EasyLang/Stable-marriage-problem deleted file mode 120000 index 5a03ad65b0..0000000000 --- a/Lang/EasyLang/Stable-marriage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stable-marriage-problem/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Stair-climbing-puzzle b/Lang/EasyLang/Stair-climbing-puzzle deleted file mode 120000 index e0c07f706d..0000000000 --- a/Lang/EasyLang/Stair-climbing-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stair-climbing-puzzle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Statistics-Normal-distribution b/Lang/EasyLang/Statistics-Normal-distribution deleted file mode 120000 index cfeed445c6..0000000000 --- a/Lang/EasyLang/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Stem-and-leaf-plot b/Lang/EasyLang/Stem-and-leaf-plot deleted file mode 120000 index cf4dace06c..0000000000 --- a/Lang/EasyLang/Stem-and-leaf-plot +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stem-and-leaf-plot/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Straddling-checkerboard b/Lang/EasyLang/Straddling-checkerboard deleted file mode 120000 index df23fad6e0..0000000000 --- a/Lang/EasyLang/Straddling-checkerboard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Straddling-checkerboard/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Suffixation-of-decimal-numbers b/Lang/EasyLang/Suffixation-of-decimal-numbers deleted file mode 120000 index 2c99b570e5..0000000000 --- a/Lang/EasyLang/Suffixation-of-decimal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Suffixation-of-decimal-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sum-and-product-puzzle b/Lang/EasyLang/Sum-and-product-puzzle deleted file mode 120000 index 8dd4cbcafb..0000000000 --- a/Lang/EasyLang/Sum-and-product-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-puzzle/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Super-d-numbers b/Lang/EasyLang/Super-d-numbers deleted file mode 120000 index c760610b85..0000000000 --- a/Lang/EasyLang/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Superpermutation-minimisation b/Lang/EasyLang/Superpermutation-minimisation deleted file mode 120000 index 6607fe41d8..0000000000 --- a/Lang/EasyLang/Superpermutation-minimisation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Superpermutation-minimisation/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Sutherland-Hodgman-polygon-clipping b/Lang/EasyLang/Sutherland-Hodgman-polygon-clipping deleted file mode 120000 index 948deb6c32..0000000000 --- a/Lang/EasyLang/Sutherland-Hodgman-polygon-clipping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sutherland-Hodgman-polygon-clipping/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Taxicab-numbers b/Lang/EasyLang/Taxicab-numbers deleted file mode 120000 index 7035ad16c4..0000000000 --- a/Lang/EasyLang/Taxicab-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Taxicab-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Teacup-rim-text b/Lang/EasyLang/Teacup-rim-text deleted file mode 120000 index 6602971306..0000000000 --- a/Lang/EasyLang/Teacup-rim-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Teacup-rim-text/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Tokenize-a-string-with-escaping b/Lang/EasyLang/Tokenize-a-string-with-escaping deleted file mode 120000 index 1059b903ad..0000000000 --- a/Lang/EasyLang/Tokenize-a-string-with-escaping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string-with-escaping/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Top-rank-per-group b/Lang/EasyLang/Top-rank-per-group deleted file mode 120000 index 861db59645..0000000000 --- a/Lang/EasyLang/Top-rank-per-group +++ /dev/null @@ -1 +0,0 @@ -../../Task/Top-rank-per-group/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Topological-sort b/Lang/EasyLang/Topological-sort deleted file mode 120000 index 8100dde197..0000000000 --- a/Lang/EasyLang/Topological-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topological-sort/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Topswops b/Lang/EasyLang/Topswops deleted file mode 120000 index 2080f48b84..0000000000 --- a/Lang/EasyLang/Topswops +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topswops/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Truth-table b/Lang/EasyLang/Truth-table deleted file mode 120000 index 73d0946392..0000000000 --- a/Lang/EasyLang/Truth-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truth-table/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/UPC b/Lang/EasyLang/UPC deleted file mode 120000 index 2bb2969064..0000000000 --- a/Lang/EasyLang/UPC +++ /dev/null @@ -1 +0,0 @@ -../../Task/UPC/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/URL-decoding b/Lang/EasyLang/URL-decoding deleted file mode 120000 index a070edc78b..0000000000 --- a/Lang/EasyLang/URL-decoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-decoding/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/URL-encoding b/Lang/EasyLang/URL-encoding deleted file mode 120000 index c0b065b1e5..0000000000 --- a/Lang/EasyLang/URL-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-encoding/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/UTF-8-encode-and-decode b/Lang/EasyLang/UTF-8-encode-and-decode deleted file mode 120000 index c4de9115dc..0000000000 --- a/Lang/EasyLang/UTF-8-encode-and-decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/UTF-8-encode-and-decode/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Unicode-strings b/Lang/EasyLang/Unicode-strings deleted file mode 120000 index c52bd4da5c..0000000000 --- a/Lang/EasyLang/Unicode-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-strings/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Universal-Turing-machine b/Lang/EasyLang/Universal-Turing-machine deleted file mode 120000 index c6c36c7e83..0000000000 --- a/Lang/EasyLang/Universal-Turing-machine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Universal-Turing-machine/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Unprimeable-numbers b/Lang/EasyLang/Unprimeable-numbers deleted file mode 120000 index ae808307c7..0000000000 --- a/Lang/EasyLang/Unprimeable-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unprimeable-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Verhoeff-algorithm b/Lang/EasyLang/Verhoeff-algorithm deleted file mode 120000 index 31c375b7e9..0000000000 --- a/Lang/EasyLang/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Verify-distribution-uniformity-Naive b/Lang/EasyLang/Verify-distribution-uniformity-Naive deleted file mode 120000 index bc6d548e1b..0000000000 --- a/Lang/EasyLang/Verify-distribution-uniformity-Naive +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verify-distribution-uniformity-Naive/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Vigen-re-cipher-Cryptanalysis b/Lang/EasyLang/Vigen-re-cipher-Cryptanalysis deleted file mode 120000 index 019adf3986..0000000000 --- a/Lang/EasyLang/Vigen-re-cipher-Cryptanalysis +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher-Cryptanalysis/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Vogels-approximation-method b/Lang/EasyLang/Vogels-approximation-method deleted file mode 120000 index 576b7c1373..0000000000 --- a/Lang/EasyLang/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/War-card-game b/Lang/EasyLang/War-card-game deleted file mode 120000 index 4889819208..0000000000 --- a/Lang/EasyLang/War-card-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/War-card-game/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Wasteful-equidigital-and-frugal-numbers b/Lang/EasyLang/Wasteful-equidigital-and-frugal-numbers deleted file mode 120000 index 2c61d301f5..0000000000 --- a/Lang/EasyLang/Wasteful-equidigital-and-frugal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wasteful-equidigital-and-frugal-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Weird-numbers b/Lang/EasyLang/Weird-numbers deleted file mode 120000 index 503b16eabc..0000000000 --- a/Lang/EasyLang/Weird-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Weird-numbers/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Word-ladder b/Lang/EasyLang/Word-ladder deleted file mode 120000 index c40a883a5f..0000000000 --- a/Lang/EasyLang/Word-ladder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-ladder/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Word-wheel b/Lang/EasyLang/Word-wheel deleted file mode 120000 index cc8df0aac8..0000000000 --- a/Lang/EasyLang/Word-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wheel/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/World-Cup-group-stage b/Lang/EasyLang/World-Cup-group-stage deleted file mode 120000 index 903f2de54b..0000000000 --- a/Lang/EasyLang/World-Cup-group-stage +++ /dev/null @@ -1 +0,0 @@ -../../Task/World-Cup-group-stage/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Xiaolin-Wus-line-algorithm b/Lang/EasyLang/Xiaolin-Wus-line-algorithm deleted file mode 120000 index ece28f1e59..0000000000 --- a/Lang/EasyLang/Xiaolin-Wus-line-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Xiaolin-Wus-line-algorithm/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Zhang-Suen-thinning-algorithm b/Lang/EasyLang/Zhang-Suen-thinning-algorithm deleted file mode 120000 index 06bef59d73..0000000000 --- a/Lang/EasyLang/Zhang-Suen-thinning-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zhang-Suen-thinning-algorithm/EasyLang \ No newline at end of file diff --git a/Lang/EasyLang/Zig-zag-matrix b/Lang/EasyLang/Zig-zag-matrix deleted file mode 120000 index 59c91477d5..0000000000 --- a/Lang/EasyLang/Zig-zag-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zig-zag-matrix/EasyLang \ No newline at end of file diff --git a/Lang/EchoLisp/Miller-Rabin-primality-test b/Lang/EchoLisp/Miller-Rabin-primality-test new file mode 120000 index 0000000000..a1456f561f --- /dev/null +++ b/Lang/EchoLisp/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/EchoLisp \ No newline at end of file diff --git a/Lang/Ecstasy/00-LANG.txt b/Lang/Ecstasy/00-LANG.txt index 9c977a310d..7358e7f1ea 100644 --- a/Lang/Ecstasy/00-LANG.txt +++ b/Lang/Ecstasy/00-LANG.txt @@ -25,7 +25,4 @@ The primary benefits of Ecstasy are: * A security model designed for the serverless cloud, using lightweight software containers and dependency injection (IOC/DI) * A reified generic type system with support for unions, intersection, and difference types, first-class tuples and functions, type inference, and type-safe mixins * Built-in concurrency support, with first-class support for object immutability, and the elimination of shared-mutable data -* All of the modern capabilities that developers have grown to depend on, such as: [[garbage collection|Automatic memory management]], an integrated module system, first-class lambdas and functions, partial binding and currying, cross-platform portability, and an open source development model - -==TODO== -* [[Tasks not implemented in Ecstasy]] \ No newline at end of file +* All of the modern capabilities that developers have grown to depend on, such as: [[garbage collection|Automatic memory management]], an integrated module system, first-class lambdas and functions, partial binding and currying, cross-platform portability, and an open source development model \ No newline at end of file diff --git a/Lang/Ecstasy/100-prisoners b/Lang/Ecstasy/100-prisoners deleted file mode 120000 index e9fb2d2f70..0000000000 --- a/Lang/Ecstasy/100-prisoners +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-prisoners/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Assertions b/Lang/Ecstasy/Assertions deleted file mode 120000 index 0802d10c0c..0000000000 --- a/Lang/Ecstasy/Assertions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Assertions/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Pointers-and-references b/Lang/Ecstasy/Pointers-and-references deleted file mode 120000 index 9b85919b2d..0000000000 --- a/Lang/Ecstasy/Pointers-and-references +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pointers-and-references/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Program-name b/Lang/Ecstasy/Program-name deleted file mode 120000 index 6411623f47..0000000000 --- a/Lang/Ecstasy/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Reflection-List-methods b/Lang/Ecstasy/Reflection-List-methods deleted file mode 120000 index f4010fce77..0000000000 --- a/Lang/Ecstasy/Reflection-List-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-methods/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Reflection-List-properties b/Lang/Ecstasy/Reflection-List-properties deleted file mode 120000 index 40ec86fd95..0000000000 --- a/Lang/Ecstasy/Reflection-List-properties +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-properties/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Search-a-list b/Lang/Ecstasy/Search-a-list deleted file mode 120000 index f6044e825c..0000000000 --- a/Lang/Ecstasy/Search-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Send-an-unknown-method-call b/Lang/Ecstasy/Send-an-unknown-method-call deleted file mode 120000 index 5d1a4cbed5..0000000000 --- a/Lang/Ecstasy/Send-an-unknown-method-call +++ /dev/null @@ -1 +0,0 @@ -../../Task/Send-an-unknown-method-call/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Singleton b/Lang/Ecstasy/Singleton deleted file mode 120000 index 8c9a0eb1b2..0000000000 --- a/Lang/Ecstasy/Singleton +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singleton/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/String-case b/Lang/Ecstasy/String-case deleted file mode 120000 index 75c8cc65c2..0000000000 --- a/Lang/Ecstasy/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/String-comparison b/Lang/Ecstasy/String-comparison deleted file mode 120000 index 2a690e7c01..0000000000 --- a/Lang/Ecstasy/String-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-comparison/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/String-concatenation b/Lang/Ecstasy/String-concatenation deleted file mode 120000 index a8fc37bb41..0000000000 --- a/Lang/Ecstasy/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/String-length b/Lang/Ecstasy/String-length deleted file mode 120000 index e3f6d6a12a..0000000000 --- a/Lang/Ecstasy/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Substring b/Lang/Ecstasy/Substring deleted file mode 120000 index 59160f9d22..0000000000 --- a/Lang/Ecstasy/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/Substring-Top-and-tail b/Lang/Ecstasy/Substring-Top-and-tail deleted file mode 120000 index cf035aa347..0000000000 --- a/Lang/Ecstasy/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/Ecstasy \ No newline at end of file diff --git a/Lang/Ecstasy/System-time b/Lang/Ecstasy/System-time deleted file mode 120000 index 4b0a593cce..0000000000 --- a/Lang/Ecstasy/System-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/System-time/Ecstasy \ No newline at end of file diff --git a/Lang/Ed/00-LANG.txt b/Lang/Ed/00-LANG.txt deleted file mode 100644 index 0ffa56bf3c..0000000000 --- a/Lang/Ed/00-LANG.txt +++ /dev/null @@ -1,27 +0,0 @@ -{{stub}} -{{language|Ed}} -This is the command language used by [[wp:ed_(software)]], -the line oriented text editor, not to be confused with [[Sed]], the stream editor. - -Implementations are [[GNU Ed]], [[Plan 9 Ed]], BSD ed, and original UNIX ed. -Ed is also a precursor to a whole family of other text editors and command languages. -Including [[Sed]], ex, vi, vim, sam, and others. - -Ed scripts are usually ran as (on the example of [[GNU Ed]]) - -cat script.ed | ed -lEGs file.in - - -Or, more portably, with Basic Regular Expressions on BSD, Mac, and [[GNU Ed]]. - -cat script.ed | ed -s file.in - - -There's a convention of starting every ed script with capital H on a line of its own, to toggle more verbose error messages on. And optionally end the script with capital Q to force-quit without saving the changes to file. - -A good reference for Ed is it's info page, which can be found online [https://linux.die.net/man/1/ed here]. - -Also see [[Tasks not implemented in Ed]] - -[[Category:Editor]] -[[Category:Utility]] \ No newline at end of file diff --git a/Lang/Ed/00-META.yaml b/Lang/Ed/00-META.yaml deleted file mode 100644 index 8c668497f3..0000000000 --- a/Lang/Ed/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Ed diff --git a/Lang/Ed/A+B b/Lang/Ed/A+B deleted file mode 120000 index 00ee271a45..0000000000 --- a/Lang/Ed/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Ed \ No newline at end of file diff --git a/Lang/Ed/Address-of-a-variable b/Lang/Ed/Address-of-a-variable deleted file mode 120000 index b7216d9c2d..0000000000 --- a/Lang/Ed/Address-of-a-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Address-of-a-variable/Ed \ No newline at end of file diff --git a/Lang/Ed/Append-a-record-to-the-end-of-a-text-file b/Lang/Ed/Append-a-record-to-the-end-of-a-text-file deleted file mode 120000 index c20f4ffb66..0000000000 --- a/Lang/Ed/Append-a-record-to-the-end-of-a-text-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Append-a-record-to-the-end-of-a-text-file/Ed \ No newline at end of file diff --git a/Lang/Ed/Balanced-brackets b/Lang/Ed/Balanced-brackets deleted file mode 120000 index 12f98da078..0000000000 --- a/Lang/Ed/Balanced-brackets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-brackets/Ed \ No newline at end of file diff --git a/Lang/Ed/Base64-decode-data b/Lang/Ed/Base64-decode-data deleted file mode 120000 index d08c0a29a4..0000000000 --- a/Lang/Ed/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/Ed \ No newline at end of file diff --git a/Lang/Ed/Binary-digits b/Lang/Ed/Binary-digits deleted file mode 120000 index 3593438a83..0000000000 --- a/Lang/Ed/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/Ed \ No newline at end of file diff --git a/Lang/Ed/Brace-expansion b/Lang/Ed/Brace-expansion deleted file mode 120000 index 57b88b6984..0000000000 --- a/Lang/Ed/Brace-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brace-expansion/Ed \ No newline at end of file diff --git a/Lang/Ed/CSV-to-HTML-translation b/Lang/Ed/CSV-to-HTML-translation deleted file mode 120000 index 982d76328a..0000000000 --- a/Lang/Ed/CSV-to-HTML-translation +++ /dev/null @@ -1 +0,0 @@ -../../Task/CSV-to-HTML-translation/Ed \ No newline at end of file diff --git a/Lang/Ed/Camel-case-and-snake-case b/Lang/Ed/Camel-case-and-snake-case deleted file mode 120000 index 34e48e10ce..0000000000 --- a/Lang/Ed/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Ed \ No newline at end of file diff --git a/Lang/Ed/Check-input-device-is-a-terminal b/Lang/Ed/Check-input-device-is-a-terminal deleted file mode 120000 index aaa70cb2b9..0000000000 --- a/Lang/Ed/Check-input-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-input-device-is-a-terminal/Ed \ No newline at end of file diff --git a/Lang/Ed/Check-output-device-is-a-terminal b/Lang/Ed/Check-output-device-is-a-terminal deleted file mode 120000 index 7304043875..0000000000 --- a/Lang/Ed/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/Ed \ No newline at end of file diff --git a/Lang/Ed/Chinese-zodiac b/Lang/Ed/Chinese-zodiac deleted file mode 120000 index 3a56ea0052..0000000000 --- a/Lang/Ed/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/Ed \ No newline at end of file diff --git a/Lang/Ed/Cistercian-numerals b/Lang/Ed/Cistercian-numerals deleted file mode 120000 index f8c9ddde28..0000000000 --- a/Lang/Ed/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Ed \ No newline at end of file diff --git a/Lang/Ed/Comma-quibbling b/Lang/Ed/Comma-quibbling deleted file mode 120000 index d9dc3b3989..0000000000 --- a/Lang/Ed/Comma-quibbling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comma-quibbling/Ed \ No newline at end of file diff --git a/Lang/Ed/Comments b/Lang/Ed/Comments deleted file mode 120000 index 08d536496b..0000000000 --- a/Lang/Ed/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Ed \ No newline at end of file diff --git a/Lang/Ed/Conditional-structures b/Lang/Ed/Conditional-structures deleted file mode 120000 index 46db5ede62..0000000000 --- a/Lang/Ed/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/Ed \ No newline at end of file diff --git a/Lang/Ed/Copy-a-string b/Lang/Ed/Copy-a-string deleted file mode 120000 index 55ec74ae6a..0000000000 --- a/Lang/Ed/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Count-occurrences-of-a-substring b/Lang/Ed/Count-occurrences-of-a-substring deleted file mode 120000 index 1c698d3069..0000000000 --- a/Lang/Ed/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/Ed \ No newline at end of file diff --git a/Lang/Ed/Create-a-file b/Lang/Ed/Create-a-file deleted file mode 120000 index 11ca37c1ec..0000000000 --- a/Lang/Ed/Create-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-file/Ed \ No newline at end of file diff --git a/Lang/Ed/Date-format b/Lang/Ed/Date-format deleted file mode 120000 index 972dcea98a..0000000000 --- a/Lang/Ed/Date-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-format/Ed \ No newline at end of file diff --git a/Lang/Ed/Delete-a-file b/Lang/Ed/Delete-a-file deleted file mode 120000 index f208022c59..0000000000 --- a/Lang/Ed/Delete-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delete-a-file/Ed \ No newline at end of file diff --git a/Lang/Ed/Determine-if-a-string-has-all-the-same-characters b/Lang/Ed/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 448ed7ccc8..0000000000 --- a/Lang/Ed/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/Ed \ No newline at end of file diff --git a/Lang/Ed/Determine-if-a-string-has-all-unique-characters b/Lang/Ed/Determine-if-a-string-has-all-unique-characters deleted file mode 120000 index 3ce9aedae3..0000000000 --- a/Lang/Ed/Determine-if-a-string-has-all-unique-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-unique-characters/Ed \ No newline at end of file diff --git a/Lang/Ed/Determine-if-a-string-is-collapsible b/Lang/Ed/Determine-if-a-string-is-collapsible deleted file mode 120000 index 8b2921d3eb..0000000000 --- a/Lang/Ed/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/Ed \ No newline at end of file diff --git a/Lang/Ed/Determine-if-a-string-is-numeric b/Lang/Ed/Determine-if-a-string-is-numeric deleted file mode 120000 index 05c951f131..0000000000 --- a/Lang/Ed/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Ed \ No newline at end of file diff --git a/Lang/Ed/Empty-string b/Lang/Ed/Empty-string deleted file mode 120000 index d609b5a73a..0000000000 --- a/Lang/Ed/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Ethiopian-multiplication b/Lang/Ed/Ethiopian-multiplication deleted file mode 120000 index a218310c2e..0000000000 --- a/Lang/Ed/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Ed \ No newline at end of file diff --git a/Lang/Ed/Even-or-odd b/Lang/Ed/Even-or-odd deleted file mode 120000 index 216cea134c..0000000000 --- a/Lang/Ed/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/Ed \ No newline at end of file diff --git a/Lang/Ed/File-input-output b/Lang/Ed/File-input-output deleted file mode 120000 index ab2356c090..0000000000 --- a/Lang/Ed/File-input-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-input-output/Ed \ No newline at end of file diff --git a/Lang/Ed/Filter b/Lang/Ed/Filter deleted file mode 120000 index 0e10013135..0000000000 --- a/Lang/Ed/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/Ed \ No newline at end of file diff --git a/Lang/Ed/Find-common-directory-path b/Lang/Ed/Find-common-directory-path deleted file mode 120000 index 31b50e9c25..0000000000 --- a/Lang/Ed/Find-common-directory-path +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-common-directory-path/Ed \ No newline at end of file diff --git a/Lang/Ed/FizzBuzz b/Lang/Ed/FizzBuzz deleted file mode 120000 index 5f01963d2b..0000000000 --- a/Lang/Ed/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Ed \ No newline at end of file diff --git a/Lang/Ed/Hello-world-Text b/Lang/Ed/Hello-world-Text deleted file mode 120000 index 09329e9578..0000000000 --- a/Lang/Ed/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Ed \ No newline at end of file diff --git a/Lang/Ed/Here-document b/Lang/Ed/Here-document deleted file mode 120000 index 1aca222a29..0000000000 --- a/Lang/Ed/Here-document +++ /dev/null @@ -1 +0,0 @@ -../../Task/Here-document/Ed \ No newline at end of file diff --git a/Lang/Ed/I-before-E-except-after-C b/Lang/Ed/I-before-E-except-after-C deleted file mode 120000 index 017b410bd0..0000000000 --- a/Lang/Ed/I-before-E-except-after-C +++ /dev/null @@ -1 +0,0 @@ -../../Task/I-before-E-except-after-C/Ed \ No newline at end of file diff --git a/Lang/Ed/Increment-a-numerical-string b/Lang/Ed/Increment-a-numerical-string deleted file mode 120000 index e55a87b09f..0000000000 --- a/Lang/Ed/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Jewels-and-stones b/Lang/Ed/Jewels-and-stones deleted file mode 120000 index aa6e0865ea..0000000000 --- a/Lang/Ed/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Ed \ No newline at end of file diff --git a/Lang/Ed/Longest-common-subsequence b/Lang/Ed/Longest-common-subsequence deleted file mode 120000 index d0e8efbf1e..0000000000 --- a/Lang/Ed/Longest-common-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-common-subsequence/Ed \ No newline at end of file diff --git a/Lang/Ed/Loops-For b/Lang/Ed/Loops-For deleted file mode 120000 index 3de59c57c2..0000000000 --- a/Lang/Ed/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Ed \ No newline at end of file diff --git a/Lang/Ed/Loops-Foreach b/Lang/Ed/Loops-Foreach deleted file mode 120000 index c06f3655df..0000000000 --- a/Lang/Ed/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/Ed \ No newline at end of file diff --git a/Lang/Ed/Morse-code b/Lang/Ed/Morse-code deleted file mode 120000 index e5384e5776..0000000000 --- a/Lang/Ed/Morse-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Morse-code/Ed \ No newline at end of file diff --git a/Lang/Ed/Nth b/Lang/Ed/Nth deleted file mode 120000 index d2f15b3c88..0000000000 --- a/Lang/Ed/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/Ed \ No newline at end of file diff --git a/Lang/Ed/Palindrome-detection b/Lang/Ed/Palindrome-detection deleted file mode 120000 index 1bec256a92..0000000000 --- a/Lang/Ed/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/Ed \ No newline at end of file diff --git a/Lang/Ed/Phrase-reversals b/Lang/Ed/Phrase-reversals deleted file mode 120000 index 0ee3f41dfa..0000000000 --- a/Lang/Ed/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/Ed \ No newline at end of file diff --git a/Lang/Ed/Quine b/Lang/Ed/Quine deleted file mode 120000 index 3690e73126..0000000000 --- a/Lang/Ed/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/Ed \ No newline at end of file diff --git a/Lang/Ed/Random-number-generator-device- b/Lang/Ed/Random-number-generator-device- deleted file mode 120000 index ebfa530984..0000000000 --- a/Lang/Ed/Random-number-generator-device- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-number-generator-device-/Ed \ No newline at end of file diff --git a/Lang/Ed/Read-a-specific-line-from-a-file b/Lang/Ed/Read-a-specific-line-from-a-file deleted file mode 120000 index 68b3526a94..0000000000 --- a/Lang/Ed/Read-a-specific-line-from-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-specific-line-from-a-file/Ed \ No newline at end of file diff --git a/Lang/Ed/Regular-expressions b/Lang/Ed/Regular-expressions deleted file mode 120000 index 03fa790d32..0000000000 --- a/Lang/Ed/Regular-expressions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Regular-expressions/Ed \ No newline at end of file diff --git a/Lang/Ed/Rep-string b/Lang/Ed/Rep-string deleted file mode 120000 index 1cabc7547c..0000000000 --- a/Lang/Ed/Rep-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rep-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Repeat-a-string b/Lang/Ed/Repeat-a-string deleted file mode 120000 index 88553bc853..0000000000 --- a/Lang/Ed/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Reverse-a-string b/Lang/Ed/Reverse-a-string deleted file mode 120000 index 6104b59dd9..0000000000 --- a/Lang/Ed/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Reverse-words-in-a-string b/Lang/Ed/Reverse-words-in-a-string deleted file mode 120000 index d59e80e1fb..0000000000 --- a/Lang/Ed/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Roman-numerals-Decode b/Lang/Ed/Roman-numerals-Decode deleted file mode 120000 index 81a8608ea4..0000000000 --- a/Lang/Ed/Roman-numerals-Decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roman-numerals-Decode/Ed \ No newline at end of file diff --git a/Lang/Ed/Roman-numerals-Encode b/Lang/Ed/Roman-numerals-Encode deleted file mode 120000 index 686206e904..0000000000 --- a/Lang/Ed/Roman-numerals-Encode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roman-numerals-Encode/Ed \ No newline at end of file diff --git a/Lang/Ed/Rot-13 b/Lang/Ed/Rot-13 deleted file mode 120000 index 731a496ae9..0000000000 --- a/Lang/Ed/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/Ed \ No newline at end of file diff --git a/Lang/Ed/Run-length-encoding b/Lang/Ed/Run-length-encoding deleted file mode 120000 index 69e6b1b531..0000000000 --- a/Lang/Ed/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/Ed \ No newline at end of file diff --git a/Lang/Ed/Selectively-replace-multiple-instances-of-a-character-within-a-string b/Lang/Ed/Selectively-replace-multiple-instances-of-a-character-within-a-string deleted file mode 120000 index e414614b56..0000000000 --- a/Lang/Ed/Selectively-replace-multiple-instances-of-a-character-within-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Selectively-replace-multiple-instances-of-a-character-within-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Semordnilap b/Lang/Ed/Semordnilap deleted file mode 120000 index daf7a5ecb1..0000000000 --- a/Lang/Ed/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/Ed \ No newline at end of file diff --git a/Lang/Ed/Sort-an-integer-array b/Lang/Ed/Sort-an-integer-array deleted file mode 120000 index b1a2a66ffa..0000000000 --- a/Lang/Ed/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/Ed \ No newline at end of file diff --git a/Lang/Ed/Split-a-character-string-based-on-change-of-character b/Lang/Ed/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 0033ba43dd..0000000000 --- a/Lang/Ed/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/Ed \ No newline at end of file diff --git a/Lang/Ed/String-case b/Lang/Ed/String-case deleted file mode 120000 index daab926f48..0000000000 --- a/Lang/Ed/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/Ed \ No newline at end of file diff --git a/Lang/Ed/String-comparison b/Lang/Ed/String-comparison deleted file mode 120000 index d24860c04c..0000000000 --- a/Lang/Ed/String-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-comparison/Ed \ No newline at end of file diff --git a/Lang/Ed/String-concatenation b/Lang/Ed/String-concatenation deleted file mode 120000 index f24bfde76e..0000000000 --- a/Lang/Ed/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Ed \ No newline at end of file diff --git a/Lang/Ed/String-interpolation-included- b/Lang/Ed/String-interpolation-included- deleted file mode 120000 index 6b90881c7e..0000000000 --- a/Lang/Ed/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/Ed \ No newline at end of file diff --git a/Lang/Ed/String-length b/Lang/Ed/String-length deleted file mode 120000 index de41c29ef2..0000000000 --- a/Lang/Ed/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/Ed \ No newline at end of file diff --git a/Lang/Ed/String-matching b/Lang/Ed/String-matching deleted file mode 120000 index 2895138190..0000000000 --- a/Lang/Ed/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/Ed \ No newline at end of file diff --git a/Lang/Ed/String-prepend b/Lang/Ed/String-prepend deleted file mode 120000 index ce1d9a46f5..0000000000 --- a/Lang/Ed/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/Ed \ No newline at end of file diff --git a/Lang/Ed/Strip-a-set-of-characters-from-a-string b/Lang/Ed/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index 6a57ca5210..0000000000 --- a/Lang/Ed/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Strip-block-comments b/Lang/Ed/Strip-block-comments deleted file mode 120000 index 913cdfb609..0000000000 --- a/Lang/Ed/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/Ed \ No newline at end of file diff --git a/Lang/Ed/Strip-comments-from-a-string b/Lang/Ed/Strip-comments-from-a-string deleted file mode 120000 index f7c3c178f3..0000000000 --- a/Lang/Ed/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Strip-control-codes-and-extended-characters-from-a-string b/Lang/Ed/Strip-control-codes-and-extended-characters-from-a-string deleted file mode 120000 index 8cffb60723..0000000000 --- a/Lang/Ed/Strip-control-codes-and-extended-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-control-codes-and-extended-characters-from-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Strip-whitespace-from-a-string-Top-and-tail b/Lang/Ed/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index 87421d1e38..0000000000 --- a/Lang/Ed/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/Ed \ No newline at end of file diff --git a/Lang/Ed/Substring b/Lang/Ed/Substring deleted file mode 120000 index 373a20b8f4..0000000000 --- a/Lang/Ed/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/Ed \ No newline at end of file diff --git a/Lang/Ed/Substring-Top-and-tail b/Lang/Ed/Substring-Top-and-tail deleted file mode 120000 index bff998aeb0..0000000000 --- a/Lang/Ed/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/Ed \ No newline at end of file diff --git a/Lang/Ed/Tokenize-a-string b/Lang/Ed/Tokenize-a-string deleted file mode 120000 index d8f4499b3c..0000000000 --- a/Lang/Ed/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/Ed \ No newline at end of file diff --git a/Lang/Ed/Word-wrap b/Lang/Ed/Word-wrap deleted file mode 120000 index b86e0349c6..0000000000 --- a/Lang/Ed/Word-wrap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wrap/Ed \ No newline at end of file diff --git a/Lang/Eero/Quaternion-type b/Lang/Eero/Quaternion-type new file mode 120000 index 0000000000..91a82e433f --- /dev/null +++ b/Lang/Eero/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Eero \ No newline at end of file diff --git a/Lang/Eiffel/Loops-For b/Lang/Eiffel/Loops-For deleted file mode 120000 index 30f93ee824..0000000000 --- a/Lang/Eiffel/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Eiffel \ No newline at end of file diff --git a/Lang/Eiffel/Loops-Infinite b/Lang/Eiffel/Loops-Infinite deleted file mode 120000 index 1016f5af23..0000000000 --- a/Lang/Eiffel/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Eiffel \ No newline at end of file diff --git a/Lang/Elena/00-LANG.txt b/Lang/Elena/00-LANG.txt index c3a21bf2d4..671257e3ee 100644 --- a/Lang/Elena/00-LANG.txt +++ b/Lang/Elena/00-LANG.txt @@ -1,5 +1,5 @@ {{language|Elena -|site=https://elena-lang.github.io/ +|site=http://elenalang.sourceforge.net |exec=bytecode |strength=strong |safety=safe diff --git a/Lang/Elena/Comma-quibbling b/Lang/Elena/Comma-quibbling deleted file mode 120000 index f92aff5654..0000000000 --- a/Lang/Elena/Comma-quibbling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comma-quibbling/Elena \ No newline at end of file diff --git a/Lang/Elena/Concurrent-computing b/Lang/Elena/Concurrent-computing deleted file mode 120000 index d22278e519..0000000000 --- a/Lang/Elena/Concurrent-computing +++ /dev/null @@ -1 +0,0 @@ -../../Task/Concurrent-computing/Elena \ No newline at end of file diff --git a/Lang/Elena/HTTP b/Lang/Elena/HTTP deleted file mode 120000 index c94b6f99cd..0000000000 --- a/Lang/Elena/HTTP +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTP/Elena \ No newline at end of file diff --git a/Lang/Elena/HTTPS b/Lang/Elena/HTTPS deleted file mode 120000 index 879dfcb045..0000000000 --- a/Lang/Elena/HTTPS +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS/Elena \ No newline at end of file diff --git a/Lang/Elena/Quaternion-type b/Lang/Elena/Quaternion-type new file mode 120000 index 0000000000..1637f784c6 --- /dev/null +++ b/Lang/Elena/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Elena \ No newline at end of file diff --git a/Lang/Elixir/Determinant-and-permanent b/Lang/Elixir/Determinant-and-permanent deleted file mode 120000 index 91e99770a2..0000000000 --- a/Lang/Elixir/Determinant-and-permanent +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determinant-and-permanent/Elixir \ No newline at end of file diff --git a/Lang/Elixir/Empty-program b/Lang/Elixir/Empty-program new file mode 120000 index 0000000000..e1c7956a55 --- /dev/null +++ b/Lang/Elixir/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Elixir \ No newline at end of file diff --git a/Lang/Elixir/K-d-tree b/Lang/Elixir/K-d-tree deleted file mode 120000 index 4a7008abc8..0000000000 --- a/Lang/Elixir/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/Elixir \ No newline at end of file diff --git a/Lang/Elixir/Miller-Rabin-primality-test b/Lang/Elixir/Miller-Rabin-primality-test new file mode 120000 index 0000000000..911bb7e6dd --- /dev/null +++ b/Lang/Elixir/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Elixir \ No newline at end of file diff --git a/Lang/Elixir/Parallel-brute-force b/Lang/Elixir/Parallel-brute-force deleted file mode 120000 index 154ccc9bb9..0000000000 --- a/Lang/Elixir/Parallel-brute-force +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parallel-brute-force/Elixir \ No newline at end of file diff --git a/Lang/Elixir/Parse-an-IP-Address b/Lang/Elixir/Parse-an-IP-Address deleted file mode 120000 index bad8e9a86e..0000000000 --- a/Lang/Elixir/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Elixir \ No newline at end of file diff --git a/Lang/Elixir/Sorting-Algorithms-Circle-Sort b/Lang/Elixir/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..97335bafb5 --- /dev/null +++ b/Lang/Elixir/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Elixir \ No newline at end of file diff --git a/Lang/Elixir/Strassens-algorithm b/Lang/Elixir/Strassens-algorithm deleted file mode 120000 index b73f87ff60..0000000000 --- a/Lang/Elixir/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Elixir \ No newline at end of file diff --git a/Lang/Elm/Caesar-cipher b/Lang/Elm/Caesar-cipher deleted file mode 120000 index e2f4604523..0000000000 --- a/Lang/Elm/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/Elm \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Abbreviations-automatic b/Lang/Emacs-Lisp/Abbreviations-automatic deleted file mode 120000 index 917fbde092..0000000000 --- a/Lang/Emacs-Lisp/Abbreviations-automatic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-automatic/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Align-columns b/Lang/Emacs-Lisp/Align-columns deleted file mode 120000 index 9be61160c6..0000000000 --- a/Lang/Emacs-Lisp/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Anagrams b/Lang/Emacs-Lisp/Anagrams deleted file mode 120000 index 0bf987f884..0000000000 --- a/Lang/Emacs-Lisp/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Bulls-and-cows b/Lang/Emacs-Lisp/Bulls-and-cows deleted file mode 120000 index b0602ecaf2..0000000000 --- a/Lang/Emacs-Lisp/Bulls-and-cows +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bulls-and-cows/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Color-wheel b/Lang/Emacs-Lisp/Color-wheel deleted file mode 120000 index 90b9cec116..0000000000 --- a/Lang/Emacs-Lisp/Color-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-wheel/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Compare-length-of-two-strings b/Lang/Emacs-Lisp/Compare-length-of-two-strings deleted file mode 120000 index 2aa87a97f8..0000000000 --- a/Lang/Emacs-Lisp/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Date-manipulation b/Lang/Emacs-Lisp/Date-manipulation deleted file mode 120000 index d88e6a9576..0000000000 --- a/Lang/Emacs-Lisp/Date-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-manipulation/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Determine-if-a-string-is-numeric b/Lang/Emacs-Lisp/Determine-if-a-string-is-numeric deleted file mode 120000 index 2314291eaa..0000000000 --- a/Lang/Emacs-Lisp/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Determine-sentence-type b/Lang/Emacs-Lisp/Determine-sentence-type deleted file mode 120000 index 633b068253..0000000000 --- a/Lang/Emacs-Lisp/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Find-palindromic-numbers-in-both-binary-and-ternary-bases b/Lang/Emacs-Lisp/Find-palindromic-numbers-in-both-binary-and-ternary-bases deleted file mode 120000 index d1e4e53b61..0000000000 --- a/Lang/Emacs-Lisp/Find-palindromic-numbers-in-both-binary-and-ternary-bases +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-palindromic-numbers-in-both-binary-and-ternary-bases/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Generate-random-chess-position b/Lang/Emacs-Lisp/Generate-random-chess-position deleted file mode 120000 index 7ef4f0bf90..0000000000 --- a/Lang/Emacs-Lisp/Generate-random-chess-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-random-chess-position/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Keyboard-input-Flush-the-keyboard-buffer b/Lang/Emacs-Lisp/Keyboard-input-Flush-the-keyboard-buffer deleted file mode 120000 index db888b4ffd..0000000000 --- a/Lang/Emacs-Lisp/Keyboard-input-Flush-the-keyboard-buffer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Flush-the-keyboard-buffer/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Keyboard-input-Keypress-check b/Lang/Emacs-Lisp/Keyboard-input-Keypress-check deleted file mode 120000 index 1bf55a234e..0000000000 --- a/Lang/Emacs-Lisp/Keyboard-input-Keypress-check +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Keypress-check/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Keyboard-input-Obtain-a-Y-or-N-response b/Lang/Emacs-Lisp/Keyboard-input-Obtain-a-Y-or-N-response deleted file mode 120000 index d6205cc54b..0000000000 --- a/Lang/Emacs-Lisp/Keyboard-input-Obtain-a-Y-or-N-response +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Obtain-a-Y-or-N-response/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Ordered-words b/Lang/Emacs-Lisp/Ordered-words deleted file mode 120000 index 444b596fcd..0000000000 --- a/Lang/Emacs-Lisp/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Search-a-list b/Lang/Emacs-Lisp/Search-a-list deleted file mode 120000 index 6aef3bcdb0..0000000000 --- a/Lang/Emacs-Lisp/Search-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Snake b/Lang/Emacs-Lisp/Snake deleted file mode 120000 index b334d7a373..0000000000 --- a/Lang/Emacs-Lisp/Snake +++ /dev/null @@ -1 +0,0 @@ -../../Task/Snake/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Soundex b/Lang/Emacs-Lisp/Soundex deleted file mode 120000 index d8aeb9b48e..0000000000 --- a/Lang/Emacs-Lisp/Soundex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soundex/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Split-a-character-string-based-on-change-of-character b/Lang/Emacs-Lisp/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 7bff70bc55..0000000000 --- a/Lang/Emacs-Lisp/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Strip-comments-from-a-string b/Lang/Emacs-Lisp/Strip-comments-from-a-string deleted file mode 120000 index e8fcd5a3c3..0000000000 --- a/Lang/Emacs-Lisp/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Substitution-cipher b/Lang/Emacs-Lisp/Substitution-cipher deleted file mode 120000 index 93f7ee4d63..0000000000 --- a/Lang/Emacs-Lisp/Substitution-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substitution-cipher/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Emacs-Lisp/Word-frequency b/Lang/Emacs-Lisp/Word-frequency deleted file mode 120000 index 74fd09e7f4..0000000000 --- a/Lang/Emacs-Lisp/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/Emacs-Lisp \ No newline at end of file diff --git a/Lang/Erlang/Cheryls-birthday b/Lang/Erlang/Cheryls-birthday deleted file mode 120000 index 2e3c0e28bc..0000000000 --- a/Lang/Erlang/Cheryls-birthday +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cheryls-birthday/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Determinant-and-permanent b/Lang/Erlang/Determinant-and-permanent deleted file mode 120000 index 1dcba08234..0000000000 --- a/Lang/Erlang/Determinant-and-permanent +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determinant-and-permanent/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Floyd-Warshall-algorithm b/Lang/Erlang/Floyd-Warshall-algorithm deleted file mode 120000 index ac856e6ffa..0000000000 --- a/Lang/Erlang/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Long-multiplication b/Lang/Erlang/Long-multiplication deleted file mode 120000 index 12ca47c665..0000000000 --- a/Lang/Erlang/Long-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-multiplication/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Miller-Rabin-primality-test b/Lang/Erlang/Miller-Rabin-primality-test new file mode 120000 index 0000000000..5bdd377694 --- /dev/null +++ b/Lang/Erlang/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Parse-an-IP-Address b/Lang/Erlang/Parse-an-IP-Address deleted file mode 120000 index 3e48d0f0b1..0000000000 --- a/Lang/Erlang/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Stem-and-leaf-plot b/Lang/Erlang/Stem-and-leaf-plot deleted file mode 120000 index 1763f740f3..0000000000 --- a/Lang/Erlang/Stem-and-leaf-plot +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stem-and-leaf-plot/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Strassens-algorithm b/Lang/Erlang/Strassens-algorithm deleted file mode 120000 index 62150c659e..0000000000 --- a/Lang/Erlang/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Super-d-numbers b/Lang/Erlang/Super-d-numbers deleted file mode 120000 index de46d8ba65..0000000000 --- a/Lang/Erlang/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/Erlang \ No newline at end of file diff --git a/Lang/Erlang/Tonelli-Shanks-algorithm b/Lang/Erlang/Tonelli-Shanks-algorithm deleted file mode 120000 index 5c601a781e..0000000000 --- a/Lang/Erlang/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/Erlang \ No newline at end of file diff --git a/Lang/Euphoria/00-LANG.txt b/Lang/Euphoria/00-LANG.txt index 9dc38ade08..702dca9e88 100644 --- a/Lang/Euphoria/00-LANG.txt +++ b/Lang/Euphoria/00-LANG.txt @@ -18,7 +18,4 @@ Euphoria is a powerful yet simple programming language, developed by Robert Crai ==See also== * [[wp:Euphoria (programming language)|Euphoria on Wikipedia]] * [http://rapideuphoria.com/ RapidEuphoria site] -* [http://openeuphoria.org/ openEuphoria site] - -==Todo== -[https://rosettacode.org/wiki/Tasks_not_implemented_in_Euphoria Tasks not implemented in Euphoria] \ No newline at end of file +* [http://openeuphoria.org/ openEuphoria site] \ No newline at end of file diff --git a/Lang/Euphoria/Calculating-the-value-of-e b/Lang/Euphoria/Calculating-the-value-of-e deleted file mode 120000 index ae2255b209..0000000000 --- a/Lang/Euphoria/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/Euphoria \ No newline at end of file diff --git a/Lang/Euphoria/Combinations b/Lang/Euphoria/Combinations deleted file mode 120000 index 10b7f0283e..0000000000 --- a/Lang/Euphoria/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/Euphoria \ No newline at end of file diff --git a/Lang/Euphoria/Convert-seconds-to-compound-duration b/Lang/Euphoria/Convert-seconds-to-compound-duration deleted file mode 120000 index 91ba9055cf..0000000000 --- a/Lang/Euphoria/Convert-seconds-to-compound-duration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-seconds-to-compound-duration/Euphoria \ No newline at end of file diff --git a/Lang/Euphoria/Empty-program b/Lang/Euphoria/Empty-program new file mode 120000 index 0000000000..241cd5711b --- /dev/null +++ b/Lang/Euphoria/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Euphoria \ No newline at end of file diff --git a/Lang/Euphoria/File-size-distribution b/Lang/Euphoria/File-size-distribution deleted file mode 120000 index a10a0eb48b..0000000000 --- a/Lang/Euphoria/File-size-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-size-distribution/Euphoria \ No newline at end of file diff --git a/Lang/Euphoria/Nth b/Lang/Euphoria/Nth deleted file mode 120000 index 6f87edee5c..0000000000 --- a/Lang/Euphoria/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/Euphoria \ No newline at end of file diff --git a/Lang/Euphoria/Quaternion-type b/Lang/Euphoria/Quaternion-type new file mode 120000 index 0000000000..aedb6b51e1 --- /dev/null +++ b/Lang/Euphoria/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Euphoria \ No newline at end of file diff --git a/Lang/Euphoria/Repeat b/Lang/Euphoria/Repeat deleted file mode 120000 index 750ad0f53c..0000000000 --- a/Lang/Euphoria/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Euphoria \ No newline at end of file diff --git a/Lang/Excel/Arrays b/Lang/Excel/Arrays deleted file mode 120000 index bad8c856a9..0000000000 --- a/Lang/Excel/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Excel \ No newline at end of file diff --git a/Lang/Excel/Cholesky-decomposition b/Lang/Excel/Cholesky-decomposition deleted file mode 120000 index 2db67f4a20..0000000000 --- a/Lang/Excel/Cholesky-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cholesky-decomposition/Excel \ No newline at end of file diff --git a/Lang/Excel/Conditional-structures b/Lang/Excel/Conditional-structures deleted file mode 120000 index f4ffdbd4b9..0000000000 --- a/Lang/Excel/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/Excel \ No newline at end of file diff --git a/Lang/Excel/FizzBuzz b/Lang/Excel/FizzBuzz deleted file mode 120000 index 15df08a856..0000000000 --- a/Lang/Excel/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Excel \ No newline at end of file diff --git a/Lang/Excel/Function-definition b/Lang/Excel/Function-definition deleted file mode 120000 index e6ecf64bef..0000000000 --- a/Lang/Excel/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Excel \ No newline at end of file diff --git a/Lang/Excel/Jacobi-symbol b/Lang/Excel/Jacobi-symbol deleted file mode 120000 index 85f7061c07..0000000000 --- a/Lang/Excel/Jacobi-symbol +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobi-symbol/Excel \ No newline at end of file diff --git a/Lang/Excel/Loops-For b/Lang/Excel/Loops-For deleted file mode 120000 index 876b47b179..0000000000 --- a/Lang/Excel/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Excel \ No newline at end of file diff --git a/Lang/Excel/Repeat-a-string b/Lang/Excel/Repeat-a-string deleted file mode 120000 index 2c684073cb..0000000000 --- a/Lang/Excel/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/Excel \ No newline at end of file diff --git a/Lang/Excel/Reverse-a-string b/Lang/Excel/Reverse-a-string deleted file mode 120000 index 2a3cf97cfe..0000000000 --- a/Lang/Excel/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/Excel \ No newline at end of file diff --git a/Lang/Excel/Tokenize-a-string b/Lang/Excel/Tokenize-a-string deleted file mode 120000 index 9d5af3b4b4..0000000000 --- a/Lang/Excel/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/Excel \ No newline at end of file diff --git a/Lang/Extended-Color-BASIC/00-LANG.txt b/Lang/Extended-Color-BASIC/00-LANG.txt deleted file mode 100644 index 17efd36e93..0000000000 --- a/Lang/Extended-Color-BASIC/00-LANG.txt +++ /dev/null @@ -1,7 +0,0 @@ -{{language|Extended Color BASIC}} - -Microsoft Extended Color BASIC the BASIC interpreter for the Tandy Color Computer and the Dragon Data Motorola 6809 processor based machines. - -==See Also== -* [[wp:Extended Color BASIC|Wikipedia: Extended Color BASIC]] -* [[Tasks not Implemented in Extended Color BASIC]] \ No newline at end of file diff --git a/Lang/Extended-Color-BASIC/00-META.yaml b/Lang/Extended-Color-BASIC/00-META.yaml deleted file mode 100644 index 57e9e4028d..0000000000 --- a/Lang/Extended-Color-BASIC/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Extended_Color_BASIC diff --git a/Lang/Extended-Color-BASIC/Arrays b/Lang/Extended-Color-BASIC/Arrays deleted file mode 120000 index 2ca9fdf8eb..0000000000 --- a/Lang/Extended-Color-BASIC/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Extended-Color-BASIC \ No newline at end of file diff --git a/Lang/Extended-Color-BASIC/Copy-a-string b/Lang/Extended-Color-BASIC/Copy-a-string deleted file mode 120000 index 7a931a182a..0000000000 --- a/Lang/Extended-Color-BASIC/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/Extended-Color-BASIC \ No newline at end of file diff --git a/Lang/Extended-Color-BASIC/Hello-world-Text b/Lang/Extended-Color-BASIC/Hello-world-Text deleted file mode 120000 index b5cfbf6b90..0000000000 --- a/Lang/Extended-Color-BASIC/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Extended-Color-BASIC \ No newline at end of file diff --git a/Lang/Extended-Color-BASIC/Loops-For b/Lang/Extended-Color-BASIC/Loops-For deleted file mode 120000 index 8719420a7c..0000000000 --- a/Lang/Extended-Color-BASIC/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Extended-Color-BASIC \ No newline at end of file diff --git a/Lang/Extended-Color-BASIC/Quine b/Lang/Extended-Color-BASIC/Quine deleted file mode 120000 index fb6135d264..0000000000 --- a/Lang/Extended-Color-BASIC/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/Extended-Color-BASIC \ No newline at end of file diff --git a/Lang/Extended-Color-BASIC/User-input-Text b/Lang/Extended-Color-BASIC/User-input-Text deleted file mode 120000 index 545233f9b1..0000000000 --- a/Lang/Extended-Color-BASIC/User-input-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Text/Extended-Color-BASIC \ No newline at end of file diff --git a/Lang/F-Sharp/00-LANG.txt b/Lang/F-Sharp/00-LANG.txt index db0c37eee0..ba98a5db01 100644 --- a/Lang/F-Sharp/00-LANG.txt +++ b/Lang/F-Sharp/00-LANG.txt @@ -9,9 +9,8 @@ It is based on the [[Caml]] language, and resembles it in syntax. F# is included as an 'official' .NET language in [[Visual Studio]] 2010 and later. -==Links== +==External Links== * [http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/default.aspx F# Website at Microsoft] * [http://blogs.msdn.com/dsyme/ Don Syme's F# Weblog] -* [[Tasks_not_implemented_in_F_Sharp]] [[Category:Caml Implementations]] \ No newline at end of file diff --git a/Lang/F-Sharp/Bifid-cipher b/Lang/F-Sharp/Bifid-cipher deleted file mode 120000 index 4ac927ed58..0000000000 --- a/Lang/F-Sharp/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Call-an-object-method b/Lang/F-Sharp/Call-an-object-method deleted file mode 120000 index 69c90b1041..0000000000 --- a/Lang/F-Sharp/Call-an-object-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-an-object-method/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Define-a-primitive-data-type b/Lang/F-Sharp/Define-a-primitive-data-type deleted file mode 120000 index ef08834748..0000000000 --- a/Lang/F-Sharp/Define-a-primitive-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Define-a-primitive-data-type/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Dice-game-probabilities b/Lang/F-Sharp/Dice-game-probabilities deleted file mode 120000 index 70c873d7d5..0000000000 --- a/Lang/F-Sharp/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/I-before-E-except-after-C b/Lang/F-Sharp/I-before-E-except-after-C deleted file mode 120000 index 67d12030f9..0000000000 --- a/Lang/F-Sharp/I-before-E-except-after-C +++ /dev/null @@ -1 +0,0 @@ -../../Task/I-before-E-except-after-C/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Long-literals-with-continuations b/Lang/F-Sharp/Long-literals-with-continuations deleted file mode 120000 index 25a8149ce8..0000000000 --- a/Lang/F-Sharp/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Long-multiplication b/Lang/F-Sharp/Long-multiplication new file mode 120000 index 0000000000..a8ece45d37 --- /dev/null +++ b/Lang/F-Sharp/Long-multiplication @@ -0,0 +1 @@ +../../Task/Long-multiplication/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Long-year b/Lang/F-Sharp/Long-year deleted file mode 120000 index 94b40682e9..0000000000 --- a/Lang/F-Sharp/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Mad-Libs b/Lang/F-Sharp/Mad-Libs deleted file mode 120000 index 69a30ced53..0000000000 --- a/Lang/F-Sharp/Mad-Libs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mad-Libs/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Miller-Rabin-primality-test b/Lang/F-Sharp/Miller-Rabin-primality-test new file mode 120000 index 0000000000..4b1a1d67d8 --- /dev/null +++ b/Lang/F-Sharp/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Multi-dimensional-array b/Lang/F-Sharp/Multi-dimensional-array deleted file mode 120000 index 0d6b1aaed5..0000000000 --- a/Lang/F-Sharp/Multi-dimensional-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-dimensional-array/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Multiplicative-order b/Lang/F-Sharp/Multiplicative-order deleted file mode 120000 index b2064cc3e0..0000000000 --- a/Lang/F-Sharp/Multiplicative-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplicative-order/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Old-lady-swallowed-a-fly b/Lang/F-Sharp/Old-lady-swallowed-a-fly deleted file mode 120000 index 066ed3c32b..0000000000 --- a/Lang/F-Sharp/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Probabilistic-choice b/Lang/F-Sharp/Probabilistic-choice deleted file mode 120000 index b7d2692fe4..0000000000 --- a/Lang/F-Sharp/Probabilistic-choice +++ /dev/null @@ -1 +0,0 @@ -../../Task/Probabilistic-choice/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Quaternion-type b/Lang/F-Sharp/Quaternion-type new file mode 120000 index 0000000000..2de1d9f870 --- /dev/null +++ b/Lang/F-Sharp/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Same-fringe b/Lang/F-Sharp/Same-fringe deleted file mode 120000 index 04d84b3c5a..0000000000 --- a/Lang/F-Sharp/Same-fringe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Same-fringe/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/F-Sharp/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/F-Sharp/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/F-Sharp/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/F-Sharp/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/F-Sharp/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/F-Sharp/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/F-Sharp/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/F-Sharp/Sockets b/Lang/F-Sharp/Sockets deleted file mode 120000 index 13e34e4285..0000000000 --- a/Lang/F-Sharp/Sockets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sockets/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Sort-a-list-of-object-identifiers b/Lang/F-Sharp/Sort-a-list-of-object-identifiers deleted file mode 120000 index 396fa34539..0000000000 --- a/Lang/F-Sharp/Sort-a-list-of-object-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-a-list-of-object-identifiers/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Sort-numbers-lexicographically b/Lang/F-Sharp/Sort-numbers-lexicographically deleted file mode 120000 index bcc33d5bb2..0000000000 --- a/Lang/F-Sharp/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/F-Sharp \ No newline at end of file diff --git a/Lang/F-Sharp/Variable-length-quantity b/Lang/F-Sharp/Variable-length-quantity deleted file mode 120000 index 2c43b02869..0000000000 --- a/Lang/F-Sharp/Variable-length-quantity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-length-quantity/F-Sharp \ No newline at end of file diff --git a/Lang/FALSE/Empty-program b/Lang/FALSE/Empty-program new file mode 120000 index 0000000000..35445789cd --- /dev/null +++ b/Lang/FALSE/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/FALSE \ No newline at end of file diff --git a/Lang/FALSE/Zeckendorf-number-representation b/Lang/FALSE/Zeckendorf-number-representation deleted file mode 120000 index fdef231a56..0000000000 --- a/Lang/FALSE/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/FALSE \ No newline at end of file diff --git a/Lang/FOCAL/Combinations b/Lang/FOCAL/Combinations deleted file mode 120000 index 882a5e580d..0000000000 --- a/Lang/FOCAL/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/FOCAL \ No newline at end of file diff --git a/Lang/FOCAL/Hunt-the-Wumpus b/Lang/FOCAL/Hunt-the-Wumpus deleted file mode 120000 index 098e817517..0000000000 --- a/Lang/FOCAL/Hunt-the-Wumpus +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hunt-the-Wumpus/FOCAL \ No newline at end of file diff --git a/Lang/FOCAL/Sierpinski-carpet b/Lang/FOCAL/Sierpinski-carpet deleted file mode 120000 index 986467c5d7..0000000000 --- a/Lang/FOCAL/Sierpinski-carpet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-carpet/FOCAL \ No newline at end of file diff --git a/Lang/FOCAL/Zeckendorf-number-representation b/Lang/FOCAL/Zeckendorf-number-representation deleted file mode 120000 index d0cbc5b4d2..0000000000 --- a/Lang/FOCAL/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/FOCAL \ No newline at end of file diff --git a/Lang/Factor/Best-shuffle b/Lang/Factor/Best-shuffle deleted file mode 120000 index a10c8f5d14..0000000000 --- a/Lang/Factor/Best-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Best-shuffle/Factor \ No newline at end of file diff --git a/Lang/Factor/Bioinformatics-base-count b/Lang/Factor/Bioinformatics-base-count new file mode 120000 index 0000000000..cf4a54a26f --- /dev/null +++ b/Lang/Factor/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Factor \ No newline at end of file diff --git a/Lang/Factor/Brownian-tree b/Lang/Factor/Brownian-tree deleted file mode 120000 index a93650256d..0000000000 --- a/Lang/Factor/Brownian-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brownian-tree/Factor \ No newline at end of file diff --git a/Lang/Factor/Quaternion-type b/Lang/Factor/Quaternion-type new file mode 120000 index 0000000000..47f0548ea8 --- /dev/null +++ b/Lang/Factor/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Factor \ No newline at end of file diff --git a/Lang/Factor/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Factor/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Factor/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Factor/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Factor/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Factor/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Factor/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Factor/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Factor/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Factor/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Factor/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Factor/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Factor/Tic-tac-toe b/Lang/Factor/Tic-tac-toe deleted file mode 120000 index 183c5fb3e0..0000000000 --- a/Lang/Factor/Tic-tac-toe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tic-tac-toe/Factor \ No newline at end of file diff --git a/Lang/Fennel/00-LANG.txt b/Lang/Fennel/00-LANG.txt index a3b3fb9075..d4313c004b 100644 --- a/Lang/Fennel/00-LANG.txt +++ b/Lang/Fennel/00-LANG.txt @@ -10,9 +10,4 @@ According to Fennel website: Fennel is a programming language that brings togeth Anywhere you can run Lua code, you can run Fennel code. -See more examples at: [https://fennel-lang.org/ Fennel Website] - -A useful learning tool is antifennel at [https://git.sr.ht/~technomancy/antifennel https://git.sr.ht/~technomancy/antifennel] that can convert Lua programs to Fennel. -NB, some Lua features are not supported, particularly , and goto and any new features in Lua 5.5. - -As well as [[Lua]] 5.x VMs, Fennel programs can also be run with [[Pluto]], though warnings will probably be generated when Pluto parses the generated Lua. \ No newline at end of file +See more examples at: [https://fennel-lang.org/ Fennel Website] \ No newline at end of file diff --git a/Lang/Fennel/100-doors b/Lang/Fennel/100-doors deleted file mode 120000 index 445ef6d734..0000000000 --- a/Lang/Fennel/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Abundant-deficient-and-perfect-number-classifications b/Lang/Fennel/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index fbb88cf56d..0000000000 --- a/Lang/Fennel/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Almost-prime b/Lang/Fennel/Almost-prime deleted file mode 120000 index ff96ace4e0..0000000000 --- a/Lang/Fennel/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Ascending-primes b/Lang/Fennel/Ascending-primes deleted file mode 120000 index 809d348a6f..0000000000 --- a/Lang/Fennel/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Associative-array-Iteration b/Lang/Fennel/Associative-array-Iteration deleted file mode 120000 index 35dee61a57..0000000000 --- a/Lang/Fennel/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Chowla-numbers b/Lang/Fennel/Chowla-numbers deleted file mode 120000 index ceac262e93..0000000000 --- a/Lang/Fennel/Chowla-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chowla-numbers/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Descending-primes b/Lang/Fennel/Descending-primes deleted file mode 120000 index 0de026f662..0000000000 --- a/Lang/Fennel/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Dot-product b/Lang/Fennel/Dot-product deleted file mode 120000 index ef8e13865c..0000000000 --- a/Lang/Fennel/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Equal-prime-and-composite-sums b/Lang/Fennel/Equal-prime-and-composite-sums deleted file mode 120000 index fd46523293..0000000000 --- a/Lang/Fennel/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Euclid-Mullin-sequence b/Lang/Fennel/Euclid-Mullin-sequence deleted file mode 120000 index 3b36037b43..0000000000 --- a/Lang/Fennel/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Execute-Brain- b/Lang/Fennel/Execute-Brain- deleted file mode 120000 index c651f55913..0000000000 --- a/Lang/Fennel/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Factorial b/Lang/Fennel/Factorial deleted file mode 120000 index ad3ab162af..0000000000 --- a/Lang/Fennel/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Factorial-primes b/Lang/Fennel/Factorial-primes deleted file mode 120000 index f7ae7a4fab..0000000000 --- a/Lang/Fennel/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Goldbachs-comet b/Lang/Fennel/Goldbachs-comet deleted file mode 120000 index 38a9767c12..0000000000 --- a/Lang/Fennel/Goldbachs-comet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Goldbachs-comet/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Haversine-formula b/Lang/Fennel/Haversine-formula deleted file mode 120000 index 855dbd8be0..0000000000 --- a/Lang/Fennel/Haversine-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Haversine-formula/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Horners-rule-for-polynomial-evaluation b/Lang/Fennel/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 74fe37f151..0000000000 --- a/Lang/Fennel/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Jacobsthal-numbers b/Lang/Fennel/Jacobsthal-numbers deleted file mode 120000 index fcf69f6156..0000000000 --- a/Lang/Fennel/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Jordan-P-lya-numbers b/Lang/Fennel/Jordan-P-lya-numbers deleted file mode 120000 index b4c757f403..0000000000 --- a/Lang/Fennel/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Juggler-sequence b/Lang/Fennel/Juggler-sequence deleted file mode 120000 index 09d9faa2d8..0000000000 --- a/Lang/Fennel/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Legendre-prime-counting-function b/Lang/Fennel/Legendre-prime-counting-function deleted file mode 120000 index da570fb296..0000000000 --- a/Lang/Fennel/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Magic-8-ball b/Lang/Fennel/Magic-8-ball deleted file mode 120000 index aa85a0a813..0000000000 --- a/Lang/Fennel/Magic-8-ball +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-8-ball/Fennel \ No newline at end of file diff --git a/Lang/Fennel/McNuggets-problem b/Lang/Fennel/McNuggets-problem deleted file mode 120000 index 6947e9ca17..0000000000 --- a/Lang/Fennel/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Numbers-with-equal-rises-and-falls b/Lang/Fennel/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 5b24fbe9c6..0000000000 --- a/Lang/Fennel/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Ordered-words b/Lang/Fennel/Ordered-words deleted file mode 120000 index e6920afb80..0000000000 --- a/Lang/Fennel/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Program-name b/Lang/Fennel/Program-name deleted file mode 120000 index c12837ea94..0000000000 --- a/Lang/Fennel/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Quoting-constructs b/Lang/Fennel/Quoting-constructs deleted file mode 120000 index 69544d5ca6..0000000000 --- a/Lang/Fennel/Quoting-constructs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quoting-constructs/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Sleeping-Beauty-problem b/Lang/Fennel/Sleeping-Beauty-problem deleted file mode 120000 index 35404c74a3..0000000000 --- a/Lang/Fennel/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Square-but-not-cube b/Lang/Fennel/Square-but-not-cube deleted file mode 120000 index 55c96cb4bd..0000000000 --- a/Lang/Fennel/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Sum-of-elements-below-main-diagonal-of-matrix b/Lang/Fennel/Sum-of-elements-below-main-diagonal-of-matrix deleted file mode 120000 index e6054255ef..0000000000 --- a/Lang/Fennel/Sum-of-elements-below-main-diagonal-of-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-elements-below-main-diagonal-of-matrix/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Tau-function b/Lang/Fennel/Tau-function deleted file mode 120000 index 97342018ad..0000000000 --- a/Lang/Fennel/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Tau-number b/Lang/Fennel/Tau-number deleted file mode 120000 index b25562b44c..0000000000 --- a/Lang/Fennel/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Thue-Morse b/Lang/Fennel/Thue-Morse deleted file mode 120000 index 03b98b380a..0000000000 --- a/Lang/Fennel/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Time-a-function b/Lang/Fennel/Time-a-function deleted file mode 120000 index e57c2d9bfb..0000000000 --- a/Lang/Fennel/Time-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Time-a-function/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Wilson-primes-of-order-n b/Lang/Fennel/Wilson-primes-of-order-n deleted file mode 120000 index 3a829de574..0000000000 --- a/Lang/Fennel/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/Fennel \ No newline at end of file diff --git a/Lang/Fennel/Yellowstone-sequence b/Lang/Fennel/Yellowstone-sequence deleted file mode 120000 index e160b50754..0000000000 --- a/Lang/Fennel/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/Fennel \ No newline at end of file diff --git a/Lang/Fish/00-LANG.txt b/Lang/Fish/00-LANG.txt index 3479165e5a..ae84e9d381 100644 --- a/Lang/Fish/00-LANG.txt +++ b/Lang/Fish/00-LANG.txt @@ -1,3 +1,4 @@ -{{language}}Fish (properly spelled "><>") is a Funge-like esoteric language, consisting of the traditional Funge one-character commands arranged in a two-dimensional code space. A complete specification with a list of implementations can be found at [[eso:Fish|esolangs]]. +{{language}}Fish is an Funge-like esoteric language, consisting of the traditional Funge one-character commands. +A complete specification with a list of implementations can be found at [[eso:Fish|esolangs]]. [[Category:Esoteric_Languages]] \ No newline at end of file diff --git a/Lang/Forth/Almost-prime b/Lang/Forth/Almost-prime deleted file mode 120000 index bbe907fa90..0000000000 --- a/Lang/Forth/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Forth \ No newline at end of file diff --git a/Lang/Forth/Bell-numbers b/Lang/Forth/Bell-numbers deleted file mode 120000 index d0f973798a..0000000000 --- a/Lang/Forth/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Forth \ No newline at end of file diff --git a/Lang/Forth/Bioinformatics-base-count b/Lang/Forth/Bioinformatics-base-count new file mode 120000 index 0000000000..b72b7872d9 --- /dev/null +++ b/Lang/Forth/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Forth \ No newline at end of file diff --git a/Lang/Forth/Chaocipher b/Lang/Forth/Chaocipher deleted file mode 120000 index 4e26356ed4..0000000000 --- a/Lang/Forth/Chaocipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaocipher/Forth \ No newline at end of file diff --git a/Lang/Forth/Deceptive-numbers b/Lang/Forth/Deceptive-numbers deleted file mode 120000 index 68978661e4..0000000000 --- a/Lang/Forth/Deceptive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deceptive-numbers/Forth \ No newline at end of file diff --git a/Lang/Forth/Duffinian-numbers b/Lang/Forth/Duffinian-numbers deleted file mode 120000 index 9a7e28500f..0000000000 --- a/Lang/Forth/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/Forth \ No newline at end of file diff --git a/Lang/Forth/Fibonacci-word b/Lang/Forth/Fibonacci-word deleted file mode 120000 index b5b4488597..0000000000 --- a/Lang/Forth/Fibonacci-word +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-word/Forth \ No newline at end of file diff --git a/Lang/Forth/GUI-component-interaction b/Lang/Forth/GUI-component-interaction deleted file mode 120000 index 6ac944b586..0000000000 --- a/Lang/Forth/GUI-component-interaction +++ /dev/null @@ -1 +0,0 @@ -../../Task/GUI-component-interaction/Forth \ No newline at end of file diff --git a/Lang/Forth/Hunt-the-Wumpus b/Lang/Forth/Hunt-the-Wumpus deleted file mode 120000 index 3a835dfd4d..0000000000 --- a/Lang/Forth/Hunt-the-Wumpus +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hunt-the-Wumpus/Forth \ No newline at end of file diff --git a/Lang/Forth/Lah-numbers b/Lang/Forth/Lah-numbers deleted file mode 120000 index 63faba81d9..0000000000 --- a/Lang/Forth/Lah-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lah-numbers/Forth \ No newline at end of file diff --git a/Lang/Forth/Leonardo-numbers b/Lang/Forth/Leonardo-numbers deleted file mode 120000 index 5742a06693..0000000000 --- a/Lang/Forth/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Forth \ No newline at end of file diff --git a/Lang/Forth/M-bius-function b/Lang/Forth/M-bius-function deleted file mode 120000 index 02d70b9302..0000000000 --- a/Lang/Forth/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Forth \ No newline at end of file diff --git a/Lang/Forth/Miller-Rabin-primality-test b/Lang/Forth/Miller-Rabin-primality-test new file mode 120000 index 0000000000..6d752b6553 --- /dev/null +++ b/Lang/Forth/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Forth \ No newline at end of file diff --git a/Lang/Forth/Particle-fountain b/Lang/Forth/Particle-fountain deleted file mode 120000 index 3ac0d2e0d6..0000000000 --- a/Lang/Forth/Particle-fountain +++ /dev/null @@ -1 +0,0 @@ -../../Task/Particle-fountain/Forth \ No newline at end of file diff --git a/Lang/Forth/Pseudo-random-numbers-PCG32 b/Lang/Forth/Pseudo-random-numbers-PCG32 deleted file mode 120000 index df0bc45550..0000000000 --- a/Lang/Forth/Pseudo-random-numbers-PCG32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-PCG32/Forth \ No newline at end of file diff --git a/Lang/Forth/Quaternion-type b/Lang/Forth/Quaternion-type new file mode 120000 index 0000000000..bed4c03ac8 --- /dev/null +++ b/Lang/Forth/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Forth \ No newline at end of file diff --git a/Lang/Forth/Sorting-Algorithms-Circle-Sort b/Lang/Forth/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..0f0dc80920 --- /dev/null +++ b/Lang/Forth/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Forth \ No newline at end of file diff --git a/Lang/Forth/Sorting-algorithms-Pancake-sort b/Lang/Forth/Sorting-algorithms-Pancake-sort deleted file mode 120000 index 84e38b0321..0000000000 --- a/Lang/Forth/Sorting-algorithms-Pancake-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Pancake-sort/Forth \ No newline at end of file diff --git a/Lang/Forth/Stirling-numbers-of-the-first-kind b/Lang/Forth/Stirling-numbers-of-the-first-kind deleted file mode 120000 index f35ec2aaf5..0000000000 --- a/Lang/Forth/Stirling-numbers-of-the-first-kind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stirling-numbers-of-the-first-kind/Forth \ No newline at end of file diff --git a/Lang/Forth/Stirling-numbers-of-the-second-kind b/Lang/Forth/Stirling-numbers-of-the-second-kind deleted file mode 120000 index a86eb5dfc1..0000000000 --- a/Lang/Forth/Stirling-numbers-of-the-second-kind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stirling-numbers-of-the-second-kind/Forth \ No newline at end of file diff --git a/Lang/Forth/Twin-primes b/Lang/Forth/Twin-primes deleted file mode 120000 index 7812aac04a..0000000000 --- a/Lang/Forth/Twin-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twin-primes/Forth \ No newline at end of file diff --git a/Lang/Fortran/ADFGVX-cipher b/Lang/Fortran/ADFGVX-cipher deleted file mode 120000 index dc1d16bc9a..0000000000 --- a/Lang/Fortran/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Abbreviations-automatic b/Lang/Fortran/Abbreviations-automatic deleted file mode 120000 index b006a0de84..0000000000 --- a/Lang/Fortran/Abbreviations-automatic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-automatic/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Abbreviations-easy b/Lang/Fortran/Abbreviations-easy deleted file mode 120000 index ad33bd3687..0000000000 --- a/Lang/Fortran/Abbreviations-easy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-easy/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Abbreviations-simple b/Lang/Fortran/Abbreviations-simple deleted file mode 120000 index 9ddfe0b240..0000000000 --- a/Lang/Fortran/Abbreviations-simple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-simple/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Abelian-sandpile-model-Identity b/Lang/Fortran/Abelian-sandpile-model-Identity deleted file mode 120000 index f022469180..0000000000 --- a/Lang/Fortran/Abelian-sandpile-model-Identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model-Identity/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Additive-primes b/Lang/Fortran/Additive-primes deleted file mode 120000 index ea531b1d68..0000000000 --- a/Lang/Fortran/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Apply-a-digital-filter-direct-form-II-transposed- b/Lang/Fortran/Apply-a-digital-filter-direct-form-II-transposed- deleted file mode 120000 index dd0e66389d..0000000000 --- a/Lang/Fortran/Apply-a-digital-filter-direct-form-II-transposed- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-digital-filter-direct-form-II-transposed-/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Arithmetic-derivative b/Lang/Fortran/Arithmetic-derivative deleted file mode 120000 index afa7044404..0000000000 --- a/Lang/Fortran/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Arithmetic-numbers b/Lang/Fortran/Arithmetic-numbers deleted file mode 120000 index 19ae0a75dc..0000000000 --- a/Lang/Fortran/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Associative-array-Merging b/Lang/Fortran/Associative-array-Merging deleted file mode 120000 index 862cee9b2b..0000000000 --- a/Lang/Fortran/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/Fortran \ No newline at end of file diff --git a/Lang/Fortran/B-zier-curves-Intersections b/Lang/Fortran/B-zier-curves-Intersections deleted file mode 120000 index 59ae9a9e9a..0000000000 --- a/Lang/Fortran/B-zier-curves-Intersections +++ /dev/null @@ -1 +0,0 @@ -../../Task/B-zier-curves-Intersections/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Best-shuffle b/Lang/Fortran/Best-shuffle deleted file mode 120000 index 735756bb7c..0000000000 --- a/Lang/Fortran/Best-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Best-shuffle/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Bifid-cipher b/Lang/Fortran/Bifid-cipher deleted file mode 120000 index 65b6def5fd..0000000000 --- a/Lang/Fortran/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Bin-given-limits b/Lang/Fortran/Bin-given-limits deleted file mode 120000 index d5ad60904d..0000000000 --- a/Lang/Fortran/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Bioinformatics-Sequence-mutation b/Lang/Fortran/Bioinformatics-Sequence-mutation deleted file mode 120000 index 9bcd7a681c..0000000000 --- a/Lang/Fortran/Bioinformatics-Sequence-mutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bioinformatics-Sequence-mutation/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Blum-integer b/Lang/Fortran/Blum-integer deleted file mode 120000 index 814d829eed..0000000000 --- a/Lang/Fortran/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Brilliant-numbers b/Lang/Fortran/Brilliant-numbers deleted file mode 120000 index 6c927981ae..0000000000 --- a/Lang/Fortran/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Burrows-Wheeler-transform b/Lang/Fortran/Burrows-Wheeler-transform deleted file mode 120000 index e312b27f94..0000000000 --- a/Lang/Fortran/Burrows-Wheeler-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Burrows-Wheeler-transform/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Calkin-Wilf-sequence b/Lang/Fortran/Calkin-Wilf-sequence deleted file mode 120000 index daedbbc7bc..0000000000 --- a/Lang/Fortran/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Camel-case-and-snake-case b/Lang/Fortran/Camel-case-and-snake-case deleted file mode 120000 index 8c737ed655..0000000000 --- a/Lang/Fortran/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Casting-out-nines b/Lang/Fortran/Casting-out-nines deleted file mode 120000 index 7062811203..0000000000 --- a/Lang/Fortran/Casting-out-nines +++ /dev/null @@ -1 +0,0 @@ -../../Task/Casting-out-nines/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Catalan-numbers-Pascals-triangle b/Lang/Fortran/Catalan-numbers-Pascals-triangle deleted file mode 120000 index e33b331d86..0000000000 --- a/Lang/Fortran/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Chaocipher b/Lang/Fortran/Chaocipher deleted file mode 120000 index 1db3092120..0000000000 --- a/Lang/Fortran/Chaocipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaocipher/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Check-input-device-is-a-terminal b/Lang/Fortran/Check-input-device-is-a-terminal deleted file mode 120000 index a97eabf9a0..0000000000 --- a/Lang/Fortran/Check-input-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-input-device-is-a-terminal/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Check-output-device-is-a-terminal b/Lang/Fortran/Check-output-device-is-a-terminal deleted file mode 120000 index 47a93202b8..0000000000 --- a/Lang/Fortran/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Chinese-zodiac b/Lang/Fortran/Chinese-zodiac deleted file mode 120000 index 87ed14e5e7..0000000000 --- a/Lang/Fortran/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Commatizing-numbers b/Lang/Fortran/Commatizing-numbers deleted file mode 120000 index b30a0bb3a4..0000000000 --- a/Lang/Fortran/Commatizing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Commatizing-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Consecutive-primes-with-ascending-or-descending-differences b/Lang/Fortran/Consecutive-primes-with-ascending-or-descending-differences deleted file mode 120000 index 1347a887b7..0000000000 --- a/Lang/Fortran/Consecutive-primes-with-ascending-or-descending-differences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Consecutive-primes-with-ascending-or-descending-differences/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Copy-stdin-to-stdout b/Lang/Fortran/Copy-stdin-to-stdout deleted file mode 120000 index 47cac281c7..0000000000 --- a/Lang/Fortran/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Count-the-coins b/Lang/Fortran/Count-the-coins deleted file mode 120000 index 974abe5d75..0000000000 --- a/Lang/Fortran/Count-the-coins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-the-coins/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Cuban-primes b/Lang/Fortran/Cuban-primes deleted file mode 120000 index 87850fcead..0000000000 --- a/Lang/Fortran/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Cullen-and-Woodall-numbers b/Lang/Fortran/Cullen-and-Woodall-numbers deleted file mode 120000 index ca6a11cd97..0000000000 --- a/Lang/Fortran/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Currency b/Lang/Fortran/Currency deleted file mode 120000 index 2f7b0a58da..0000000000 --- a/Lang/Fortran/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Curzon-numbers b/Lang/Fortran/Curzon-numbers deleted file mode 120000 index b7d16c2b28..0000000000 --- a/Lang/Fortran/Curzon-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Curzon-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Cyclops-numbers b/Lang/Fortran/Cyclops-numbers deleted file mode 120000 index 8c606709ad..0000000000 --- a/Lang/Fortran/Cyclops-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclops-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Cyclotomic-polynomial b/Lang/Fortran/Cyclotomic-polynomial deleted file mode 120000 index 0c2fd63e5e..0000000000 --- a/Lang/Fortran/Cyclotomic-polynomial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclotomic-polynomial/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Demings-funnel b/Lang/Fortran/Demings-funnel deleted file mode 120000 index 0a1ca7ab40..0000000000 --- a/Lang/Fortran/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Determine-if-a-string-is-collapsible b/Lang/Fortran/Determine-if-a-string-is-collapsible deleted file mode 120000 index f496b06786..0000000000 --- a/Lang/Fortran/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Determine-if-two-triangles-overlap b/Lang/Fortran/Determine-if-two-triangles-overlap deleted file mode 120000 index 902cd39054..0000000000 --- a/Lang/Fortran/Determine-if-two-triangles-overlap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-two-triangles-overlap/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Dice-game-probabilities b/Lang/Fortran/Dice-game-probabilities deleted file mode 120000 index 1215daca7a..0000000000 --- a/Lang/Fortran/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Dinesmans-multiple-dwelling-problem b/Lang/Fortran/Dinesmans-multiple-dwelling-problem deleted file mode 120000 index 4ab5caf233..0000000000 --- a/Lang/Fortran/Dinesmans-multiple-dwelling-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dinesmans-multiple-dwelling-problem/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Dining-philosophers b/Lang/Fortran/Dining-philosophers deleted file mode 120000 index 8822e00fdf..0000000000 --- a/Lang/Fortran/Dining-philosophers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dining-philosophers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Disarium-numbers b/Lang/Fortran/Disarium-numbers deleted file mode 120000 index 4713bf931d..0000000000 --- a/Lang/Fortran/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Display-a-linear-combination b/Lang/Fortran/Display-a-linear-combination deleted file mode 120000 index 4a9784f58d..0000000000 --- a/Lang/Fortran/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Diversity-prediction-theorem b/Lang/Fortran/Diversity-prediction-theorem deleted file mode 120000 index c6eafa5019..0000000000 --- a/Lang/Fortran/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Fortran \ No newline at end of file diff --git a/Lang/Fortran/EKG-sequence-convergence b/Lang/Fortran/EKG-sequence-convergence deleted file mode 120000 index 3ba5c0a162..0000000000 --- a/Lang/Fortran/EKG-sequence-convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/EKG-sequence-convergence/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Eban-numbers b/Lang/Fortran/Eban-numbers deleted file mode 120000 index 0d435c16c7..0000000000 --- a/Lang/Fortran/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Egyptian-division b/Lang/Fortran/Egyptian-division deleted file mode 120000 index bb7a134139..0000000000 --- a/Lang/Fortran/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Entropy-Narcissist b/Lang/Fortran/Entropy-Narcissist deleted file mode 120000 index 9050980c1c..0000000000 --- a/Lang/Fortran/Entropy-Narcissist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy-Narcissist/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Eulers-constant-0.5772... b/Lang/Fortran/Eulers-constant-0.5772... deleted file mode 120000 index e2642e24fb..0000000000 --- a/Lang/Fortran/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../Fortran \ No newline at end of file diff --git a/Lang/Fortran/Exponentiation-with-infix-operators-in-or-operating-on-the-base b/Lang/Fortran/Exponentiation-with-infix-operators-in-or-operating-on-the-base deleted file mode 120000 index 813fe58706..0000000000 --- a/Lang/Fortran/Exponentiation-with-infix-operators-in-or-operating-on-the-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-with-infix-operators-in-or-operating-on-the-base/Fortran \ No newline at end of file diff --git a/Lang/Fortran/FASTA-format b/Lang/Fortran/FASTA-format deleted file mode 120000 index b5442ba0f5..0000000000 --- a/Lang/Fortran/FASTA-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/FASTA-format/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Factorions b/Lang/Fortran/Factorions deleted file mode 120000 index 2a48b53fa3..0000000000 --- a/Lang/Fortran/Factorions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorions/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Farey-sequence b/Lang/Fortran/Farey-sequence deleted file mode 120000 index d7c19f96de..0000000000 --- a/Lang/Fortran/Farey-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Farey-sequence/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Fibonacci-word b/Lang/Fortran/Fibonacci-word deleted file mode 120000 index e92e6e10a6..0000000000 --- a/Lang/Fortran/Fibonacci-word +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-word/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Find-Chess960-starting-position-identifier b/Lang/Fortran/Find-Chess960-starting-position-identifier deleted file mode 120000 index 9300b24a96..0000000000 --- a/Lang/Fortran/Find-Chess960-starting-position-identifier +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-Chess960-starting-position-identifier/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Find-common-directory-path b/Lang/Fortran/Find-common-directory-path deleted file mode 120000 index 87683f2dbe..0000000000 --- a/Lang/Fortran/Find-common-directory-path +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-common-directory-path/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Find-the-intersection-of-a-line-with-a-plane b/Lang/Fortran/Find-the-intersection-of-a-line-with-a-plane deleted file mode 120000 index b07ee0b0a7..0000000000 --- a/Lang/Fortran/Find-the-intersection-of-a-line-with-a-plane +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-intersection-of-a-line-with-a-plane/Fortran \ No newline at end of file diff --git a/Lang/Fortran/First-perfect-square-in-base-n-with-n-unique-digits b/Lang/Fortran/First-perfect-square-in-base-n-with-n-unique-digits deleted file mode 120000 index 6f8a8ab270..0000000000 --- a/Lang/Fortran/First-perfect-square-in-base-n-with-n-unique-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-perfect-square-in-base-n-with-n-unique-digits/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Fivenum b/Lang/Fortran/Fivenum deleted file mode 120000 index a8fe9953dc..0000000000 --- a/Lang/Fortran/Fivenum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fivenum/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Fixed-length-records b/Lang/Fortran/Fixed-length-records deleted file mode 120000 index aa68735e7e..0000000000 --- a/Lang/Fortran/Fixed-length-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fixed-length-records/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Fraction-reduction b/Lang/Fortran/Fraction-reduction deleted file mode 120000 index f7daa9279c..0000000000 --- a/Lang/Fortran/Fraction-reduction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fraction-reduction/Fortran \ No newline at end of file diff --git a/Lang/Fortran/French-Republican-calendar b/Lang/Fortran/French-Republican-calendar deleted file mode 120000 index 765942db3d..0000000000 --- a/Lang/Fortran/French-Republican-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/French-Republican-calendar/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Fusc-sequence b/Lang/Fortran/Fusc-sequence deleted file mode 120000 index c5e3005573..0000000000 --- a/Lang/Fortran/Fusc-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fusc-sequence/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Gapful-numbers b/Lang/Fortran/Gapful-numbers deleted file mode 120000 index 7500b01654..0000000000 --- a/Lang/Fortran/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Giuga-numbers b/Lang/Fortran/Giuga-numbers deleted file mode 120000 index 9f15a4c7e2..0000000000 --- a/Lang/Fortran/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Greedy-algorithm-for-Egyptian-fractions b/Lang/Fortran/Greedy-algorithm-for-Egyptian-fractions deleted file mode 120000 index 053e501120..0000000000 --- a/Lang/Fortran/Greedy-algorithm-for-Egyptian-fractions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greedy-algorithm-for-Egyptian-fractions/Fortran \ No newline at end of file diff --git a/Lang/Fortran/HTTP b/Lang/Fortran/HTTP deleted file mode 120000 index 24f0692116..0000000000 --- a/Lang/Fortran/HTTP +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTP/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Harmonic-series b/Lang/Fortran/Harmonic-series deleted file mode 120000 index 6a6cd246a2..0000000000 --- a/Lang/Fortran/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Hex-words b/Lang/Fortran/Hex-words deleted file mode 120000 index 2b9a4573e8..0000000000 --- a/Lang/Fortran/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Hofstadter-Figure-Figure-sequences b/Lang/Fortran/Hofstadter-Figure-Figure-sequences deleted file mode 120000 index 46497cf751..0000000000 --- a/Lang/Fortran/Hofstadter-Figure-Figure-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Figure-Figure-sequences/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Humble-numbers b/Lang/Fortran/Humble-numbers deleted file mode 120000 index 5aff41aed9..0000000000 --- a/Lang/Fortran/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Intersecting-number-wheels b/Lang/Fortran/Intersecting-number-wheels deleted file mode 120000 index f87ba36725..0000000000 --- a/Lang/Fortran/Intersecting-number-wheels +++ /dev/null @@ -1 +0,0 @@ -../../Task/Intersecting-number-wheels/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Isograms-and-heterograms b/Lang/Fortran/Isograms-and-heterograms deleted file mode 120000 index cc9bb4e50b..0000000000 --- a/Lang/Fortran/Isograms-and-heterograms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isograms-and-heterograms/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Iterated-digits-squaring b/Lang/Fortran/Iterated-digits-squaring deleted file mode 120000 index b72dc14257..0000000000 --- a/Lang/Fortran/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Jewels-and-stones b/Lang/Fortran/Jewels-and-stones deleted file mode 120000 index 5375572de2..0000000000 --- a/Lang/Fortran/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Fortran \ No newline at end of file diff --git a/Lang/Fortran/K-d-tree b/Lang/Fortran/K-d-tree deleted file mode 120000 index 3b7491c540..0000000000 --- a/Lang/Fortran/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Kernighans-large-earthquake-problem b/Lang/Fortran/Kernighans-large-earthquake-problem deleted file mode 120000 index ae20f8ddbd..0000000000 --- a/Lang/Fortran/Kernighans-large-earthquake-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kernighans-large-earthquake-problem/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Knapsack-problem-Bounded b/Lang/Fortran/Knapsack-problem-Bounded deleted file mode 120000 index 9f9870702b..0000000000 --- a/Lang/Fortran/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Knuths-algorithm-S b/Lang/Fortran/Knuths-algorithm-S deleted file mode 120000 index fe5b21ade9..0000000000 --- a/Lang/Fortran/Knuths-algorithm-S +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-algorithm-S/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Knuths-power-tree b/Lang/Fortran/Knuths-power-tree deleted file mode 120000 index 163172c51f..0000000000 --- a/Lang/Fortran/Knuths-power-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-power-tree/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Largest-number-divisible-by-its-digits b/Lang/Fortran/Largest-number-divisible-by-its-digits deleted file mode 120000 index cd7d8d0694..0000000000 --- a/Lang/Fortran/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Logistic-curve-fitting-in-epidemiology b/Lang/Fortran/Logistic-curve-fitting-in-epidemiology deleted file mode 120000 index c968939bbf..0000000000 --- a/Lang/Fortran/Logistic-curve-fitting-in-epidemiology +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logistic-curve-fitting-in-epidemiology/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Long-literals-with-continuations b/Lang/Fortran/Long-literals-with-continuations deleted file mode 120000 index 7af1186694..0000000000 --- a/Lang/Fortran/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Longest-increasing-subsequence b/Lang/Fortran/Longest-increasing-subsequence deleted file mode 120000 index 4d7a715c23..0000000000 --- a/Lang/Fortran/Longest-increasing-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-increasing-subsequence/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Loops-Wrong-ranges b/Lang/Fortran/Loops-Wrong-ranges deleted file mode 120000 index ecb218786f..0000000000 --- a/Lang/Fortran/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Lucky-and-even-lucky-numbers b/Lang/Fortran/Lucky-and-even-lucky-numbers deleted file mode 120000 index 5ac4d084fd..0000000000 --- a/Lang/Fortran/Lucky-and-even-lucky-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lucky-and-even-lucky-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Magic-constant b/Lang/Fortran/Magic-constant deleted file mode 120000 index 011d77bc86..0000000000 --- a/Lang/Fortran/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/Fortran \ No newline at end of file diff --git a/Lang/Fortran/McNuggets-problem b/Lang/Fortran/McNuggets-problem deleted file mode 120000 index 6e4b8bc9dd..0000000000 --- a/Lang/Fortran/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Metallic-ratios b/Lang/Fortran/Metallic-ratios deleted file mode 120000 index 21133a8990..0000000000 --- a/Lang/Fortran/Metallic-ratios +++ /dev/null @@ -1 +0,0 @@ -../../Task/Metallic-ratios/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Miller-Rabin-primality-test b/Lang/Fortran/Miller-Rabin-primality-test new file mode 120000 index 0000000000..6d501f45e9 --- /dev/null +++ b/Lang/Fortran/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Mind-boggling-card-trick b/Lang/Fortran/Mind-boggling-card-trick deleted file mode 120000 index bda2aaf5f0..0000000000 --- a/Lang/Fortran/Mind-boggling-card-trick +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mind-boggling-card-trick/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Minimum-multiple-of-m-where-digital-sum-equals-m b/Lang/Fortran/Minimum-multiple-of-m-where-digital-sum-equals-m deleted file mode 120000 index 0e425fef14..0000000000 --- a/Lang/Fortran/Minimum-multiple-of-m-where-digital-sum-equals-m +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minimum-multiple-of-m-where-digital-sum-equals-m/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Minimum-positive-multiple-in-base-10-using-only-0-and-1 b/Lang/Fortran/Minimum-positive-multiple-in-base-10-using-only-0-and-1 deleted file mode 120000 index 2524fb63f9..0000000000 --- a/Lang/Fortran/Minimum-positive-multiple-in-base-10-using-only-0-and-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minimum-positive-multiple-in-base-10-using-only-0-and-1/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Modified-random-distribution b/Lang/Fortran/Modified-random-distribution deleted file mode 120000 index b886daca51..0000000000 --- a/Lang/Fortran/Modified-random-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modified-random-distribution/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Move-to-front-algorithm b/Lang/Fortran/Move-to-front-algorithm deleted file mode 120000 index aaea4a888b..0000000000 --- a/Lang/Fortran/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Multisplit b/Lang/Fortran/Multisplit deleted file mode 120000 index f032908bb4..0000000000 --- a/Lang/Fortran/Multisplit +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multisplit/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors b/Lang/Fortran/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors deleted file mode 120000 index 2f7237b820..0000000000 --- a/Lang/Fortran/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Ormiston-triples b/Lang/Fortran/Ormiston-triples deleted file mode 120000 index a2f8794905..0000000000 --- a/Lang/Fortran/Ormiston-triples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ormiston-triples/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Palindrome-dates b/Lang/Fortran/Palindrome-dates deleted file mode 120000 index 0f7da68189..0000000000 --- a/Lang/Fortran/Palindrome-dates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-dates/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Parallel-brute-force b/Lang/Fortran/Parallel-brute-force deleted file mode 120000 index 85bd9c5ced..0000000000 --- a/Lang/Fortran/Parallel-brute-force +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parallel-brute-force/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Parse-an-IP-Address b/Lang/Fortran/Parse-an-IP-Address deleted file mode 120000 index 33994c1cc1..0000000000 --- a/Lang/Fortran/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Pascals-triangle-Puzzle b/Lang/Fortran/Pascals-triangle-Puzzle deleted file mode 120000 index 5cea267339..0000000000 --- a/Lang/Fortran/Pascals-triangle-Puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle-Puzzle/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Password-generator b/Lang/Fortran/Password-generator deleted file mode 120000 index 5ff2015452..0000000000 --- a/Lang/Fortran/Password-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Password-generator/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Pells-equation b/Lang/Fortran/Pells-equation deleted file mode 120000 index 5929e39745..0000000000 --- a/Lang/Fortran/Pells-equation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pells-equation/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Playfair-cipher b/Lang/Fortran/Playfair-cipher deleted file mode 120000 index 7f02f8e934..0000000000 --- a/Lang/Fortran/Playfair-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Playfair-cipher/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Primality-by-Wilsons-theorem b/Lang/Fortran/Primality-by-Wilsons-theorem deleted file mode 120000 index 228dd95d2d..0000000000 --- a/Lang/Fortran/Primality-by-Wilsons-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-Wilsons-theorem/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Pseudo-random-numbers-Splitmix64 b/Lang/Fortran/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index 39aac5cdd2..0000000000 --- a/Lang/Fortran/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Quaternion-type b/Lang/Fortran/Quaternion-type new file mode 120000 index 0000000000..a1829748df --- /dev/null +++ b/Lang/Fortran/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Ramanujan-primes-twins b/Lang/Fortran/Ramanujan-primes-twins deleted file mode 120000 index bdb1a22484..0000000000 --- a/Lang/Fortran/Ramanujan-primes-twins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramanujan-primes-twins/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Ramanujans-constant b/Lang/Fortran/Ramanujans-constant deleted file mode 120000 index 8de4420011..0000000000 --- a/Lang/Fortran/Ramanujans-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramanujans-constant/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Ramer-Douglas-Peucker-line-simplification b/Lang/Fortran/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index a601cbd90f..0000000000 --- a/Lang/Fortran/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Ranking-methods b/Lang/Fortran/Ranking-methods deleted file mode 120000 index a369cc6fab..0000000000 --- a/Lang/Fortran/Ranking-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ranking-methods/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Read-a-file-character-by-character-UTF8 b/Lang/Fortran/Read-a-file-character-by-character-UTF8 deleted file mode 120000 index 4e9ecfa6e0..0000000000 --- a/Lang/Fortran/Read-a-file-character-by-character-UTF8 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-character-by-character-UTF8/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Resistor-mesh b/Lang/Fortran/Resistor-mesh deleted file mode 120000 index 4c45bf818f..0000000000 --- a/Lang/Fortran/Resistor-mesh +++ /dev/null @@ -1 +0,0 @@ -../../Task/Resistor-mesh/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Sailors-coconuts-and-a-monkey-problem b/Lang/Fortran/Sailors-coconuts-and-a-monkey-problem deleted file mode 120000 index e105172665..0000000000 --- a/Lang/Fortran/Sailors-coconuts-and-a-monkey-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sailors-coconuts-and-a-monkey-problem/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Sieve-of-Pritchard b/Lang/Fortran/Sieve-of-Pritchard deleted file mode 120000 index a74974dd66..0000000000 --- a/Lang/Fortran/Sieve-of-Pritchard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Pritchard/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Sleeping-Beauty-problem b/Lang/Fortran/Sleeping-Beauty-problem deleted file mode 120000 index 35b7547112..0000000000 --- a/Lang/Fortran/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Solve-a-Hopido-puzzle b/Lang/Fortran/Solve-a-Hopido-puzzle deleted file mode 120000 index 4726977710..0000000000 --- a/Lang/Fortran/Solve-a-Hopido-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hopido-puzzle/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Sorting-Algorithms-Circle-Sort b/Lang/Fortran/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..62558aaa6e --- /dev/null +++ b/Lang/Fortran/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Sorting-algorithms-Cocktail-sort-with-shifting-bounds b/Lang/Fortran/Sorting-algorithms-Cocktail-sort-with-shifting-bounds deleted file mode 120000 index cbe69052c4..0000000000 --- a/Lang/Fortran/Sorting-algorithms-Cocktail-sort-with-shifting-bounds +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Cocktail-sort-with-shifting-bounds/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Square-but-not-cube b/Lang/Fortran/Square-but-not-cube deleted file mode 120000 index 13809f6e51..0000000000 --- a/Lang/Fortran/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Stable-marriage-problem b/Lang/Fortran/Stable-marriage-problem deleted file mode 120000 index b61f49608c..0000000000 --- a/Lang/Fortran/Stable-marriage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stable-marriage-problem/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Strassens-algorithm b/Lang/Fortran/Strassens-algorithm deleted file mode 120000 index f73f6498f4..0000000000 --- a/Lang/Fortran/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Strip-whitespace-from-a-string-Top-and-tail b/Lang/Fortran/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index e6e0c4696a..0000000000 --- a/Lang/Fortran/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Sum-of-elements-below-main-diagonal-of-matrix b/Lang/Fortran/Sum-of-elements-below-main-diagonal-of-matrix deleted file mode 120000 index a739c37e8e..0000000000 --- a/Lang/Fortran/Sum-of-elements-below-main-diagonal-of-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-elements-below-main-diagonal-of-matrix/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Synchronous-concurrency b/Lang/Fortran/Synchronous-concurrency deleted file mode 120000 index f0f128cdfd..0000000000 --- a/Lang/Fortran/Synchronous-concurrency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Synchronous-concurrency/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Tarjan b/Lang/Fortran/Tarjan deleted file mode 120000 index 22149d08b7..0000000000 --- a/Lang/Fortran/Tarjan +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tarjan/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Thieles-interpolation-formula b/Lang/Fortran/Thieles-interpolation-formula deleted file mode 120000 index f8f82960bc..0000000000 --- a/Lang/Fortran/Thieles-interpolation-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thieles-interpolation-formula/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Total-circles-area b/Lang/Fortran/Total-circles-area deleted file mode 120000 index 7ea452c217..0000000000 --- a/Lang/Fortran/Total-circles-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Total-circles-area/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Totient-function b/Lang/Fortran/Totient-function deleted file mode 120000 index 2559e22f69..0000000000 --- a/Lang/Fortran/Totient-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Totient-function/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Tree-datastructures b/Lang/Fortran/Tree-datastructures deleted file mode 120000 index 0155519b78..0000000000 --- a/Lang/Fortran/Tree-datastructures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-datastructures/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Twelve-statements b/Lang/Fortran/Twelve-statements deleted file mode 120000 index dfaa2166b8..0000000000 --- a/Lang/Fortran/Twelve-statements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twelve-statements/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Two-bullet-roulette b/Lang/Fortran/Two-bullet-roulette deleted file mode 120000 index 67f7fb2512..0000000000 --- a/Lang/Fortran/Two-bullet-roulette +++ /dev/null @@ -1 +0,0 @@ -../../Task/Two-bullet-roulette/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Twos-complement b/Lang/Fortran/Twos-complement deleted file mode 120000 index b8e6672d37..0000000000 --- a/Lang/Fortran/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Ukkonen-s-suffix-tree-construction b/Lang/Fortran/Ukkonen-s-suffix-tree-construction deleted file mode 120000 index 183d59f5c8..0000000000 --- a/Lang/Fortran/Ukkonen-s-suffix-tree-construction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ukkonen-s-suffix-tree-construction/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Unprimeable-numbers b/Lang/Fortran/Unprimeable-numbers deleted file mode 120000 index 9835babcf5..0000000000 --- a/Lang/Fortran/Unprimeable-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unprimeable-numbers/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Vampire-number b/Lang/Fortran/Vampire-number deleted file mode 120000 index fda3c25555..0000000000 --- a/Lang/Fortran/Vampire-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vampire-number/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Verhoeff-algorithm b/Lang/Fortran/Verhoeff-algorithm deleted file mode 120000 index da50f29648..0000000000 --- a/Lang/Fortran/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Vigen-re-cipher-Cryptanalysis b/Lang/Fortran/Vigen-re-cipher-Cryptanalysis deleted file mode 120000 index 1fbd3a2ec4..0000000000 --- a/Lang/Fortran/Vigen-re-cipher-Cryptanalysis +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher-Cryptanalysis/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Vogels-approximation-method b/Lang/Fortran/Vogels-approximation-method deleted file mode 120000 index 3098233175..0000000000 --- a/Lang/Fortran/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Word-search b/Lang/Fortran/Word-search deleted file mode 120000 index 1675b7de44..0000000000 --- a/Lang/Fortran/Word-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-search/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Yellowstone-sequence b/Lang/Fortran/Yellowstone-sequence deleted file mode 120000 index ba08bc09f7..0000000000 --- a/Lang/Fortran/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/Fortran \ No newline at end of file diff --git a/Lang/Fortran/Zebra-puzzle b/Lang/Fortran/Zebra-puzzle deleted file mode 120000 index 93816a6fc6..0000000000 --- a/Lang/Fortran/Zebra-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zebra-puzzle/Fortran \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/ADFGVX-cipher b/Lang/Free-Pascal-Lazarus/ADFGVX-cipher deleted file mode 120000 index b14ee34ace..0000000000 --- a/Lang/Free-Pascal-Lazarus/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Abstract-type b/Lang/Free-Pascal-Lazarus/Abstract-type deleted file mode 120000 index 89db3c6334..0000000000 --- a/Lang/Free-Pascal-Lazarus/Abstract-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abstract-type/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Abundant-odd-numbers b/Lang/Free-Pascal-Lazarus/Abundant-odd-numbers deleted file mode 120000 index 04dfaa00e1..0000000000 --- a/Lang/Free-Pascal-Lazarus/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Bell-numbers b/Lang/Free-Pascal-Lazarus/Bell-numbers deleted file mode 120000 index 889cd61708..0000000000 --- a/Lang/Free-Pascal-Lazarus/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Bin-given-limits b/Lang/Free-Pascal-Lazarus/Bin-given-limits deleted file mode 120000 index 090d25165e..0000000000 --- a/Lang/Free-Pascal-Lazarus/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Binary-strings b/Lang/Free-Pascal-Lazarus/Binary-strings deleted file mode 120000 index f6ed90f24b..0000000000 --- a/Lang/Free-Pascal-Lazarus/Binary-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-strings/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Boyer-Moore-string-search b/Lang/Free-Pascal-Lazarus/Boyer-Moore-string-search deleted file mode 120000 index 9902c3a3ea..0000000000 --- a/Lang/Free-Pascal-Lazarus/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Brazilian-numbers b/Lang/Free-Pascal-Lazarus/Brazilian-numbers deleted file mode 120000 index 2f21964a49..0000000000 --- a/Lang/Free-Pascal-Lazarus/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Brilliant-numbers b/Lang/Free-Pascal-Lazarus/Brilliant-numbers deleted file mode 120000 index 07a95dbd77..0000000000 --- a/Lang/Free-Pascal-Lazarus/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Cistercian-numerals b/Lang/Free-Pascal-Lazarus/Cistercian-numerals deleted file mode 120000 index e09b44b1be..0000000000 --- a/Lang/Free-Pascal-Lazarus/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Closures-Value-capture b/Lang/Free-Pascal-Lazarus/Closures-Value-capture deleted file mode 120000 index 4b2493493f..0000000000 --- a/Lang/Free-Pascal-Lazarus/Closures-Value-capture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closures-Value-capture/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/DNS-query b/Lang/Free-Pascal-Lazarus/DNS-query deleted file mode 120000 index f7c79b4afe..0000000000 --- a/Lang/Free-Pascal-Lazarus/DNS-query +++ /dev/null @@ -1 +0,0 @@ -../../Task/DNS-query/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Duffinian-numbers b/Lang/Free-Pascal-Lazarus/Duffinian-numbers deleted file mode 120000 index d54184ff4d..0000000000 --- a/Lang/Free-Pascal-Lazarus/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Dutch-national-flag-problem b/Lang/Free-Pascal-Lazarus/Dutch-national-flag-problem deleted file mode 120000 index da47f4535f..0000000000 --- a/Lang/Free-Pascal-Lazarus/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Ethiopian-multiplication b/Lang/Free-Pascal-Lazarus/Ethiopian-multiplication deleted file mode 120000 index 845adfef13..0000000000 --- a/Lang/Free-Pascal-Lazarus/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Fractal-tree b/Lang/Free-Pascal-Lazarus/Fractal-tree deleted file mode 120000 index c2081a0860..0000000000 --- a/Lang/Free-Pascal-Lazarus/Fractal-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractal-tree/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Gamma-function b/Lang/Free-Pascal-Lazarus/Gamma-function deleted file mode 120000 index 9c45231564..0000000000 --- a/Lang/Free-Pascal-Lazarus/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Hickerson-series-of-almost-integers b/Lang/Free-Pascal-Lazarus/Hickerson-series-of-almost-integers deleted file mode 120000 index e8c446d1f2..0000000000 --- a/Lang/Free-Pascal-Lazarus/Hickerson-series-of-almost-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hickerson-series-of-almost-integers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Kaprekar-numbers b/Lang/Free-Pascal-Lazarus/Kaprekar-numbers deleted file mode 120000 index 7aca236c6b..0000000000 --- a/Lang/Free-Pascal-Lazarus/Kaprekar-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kaprekar-numbers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Largest-number-divisible-by-its-digits b/Lang/Free-Pascal-Lazarus/Largest-number-divisible-by-its-digits deleted file mode 120000 index 702d65adc8..0000000000 --- a/Lang/Free-Pascal-Lazarus/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Leap-year b/Lang/Free-Pascal-Lazarus/Leap-year deleted file mode 120000 index 1dc9648945..0000000000 --- a/Lang/Free-Pascal-Lazarus/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Leonardo-numbers b/Lang/Free-Pascal-Lazarus/Leonardo-numbers deleted file mode 120000 index 5fc9b6dc54..0000000000 --- a/Lang/Free-Pascal-Lazarus/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Levenshtein-distance b/Lang/Free-Pascal-Lazarus/Levenshtein-distance deleted file mode 120000 index eebdca8158..0000000000 --- a/Lang/Free-Pascal-Lazarus/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Map-range b/Lang/Free-Pascal-Lazarus/Map-range deleted file mode 120000 index 65b07f3cc6..0000000000 --- a/Lang/Free-Pascal-Lazarus/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Numbers-with-equal-rises-and-falls b/Lang/Free-Pascal-Lazarus/Numbers-with-equal-rises-and-falls deleted file mode 120000 index d3988596ad..0000000000 --- a/Lang/Free-Pascal-Lazarus/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Ordered-words b/Lang/Free-Pascal-Lazarus/Ordered-words deleted file mode 120000 index ec364f330e..0000000000 --- a/Lang/Free-Pascal-Lazarus/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Pancake-numbers b/Lang/Free-Pascal-Lazarus/Pancake-numbers deleted file mode 120000 index e82c81624b..0000000000 --- a/Lang/Free-Pascal-Lazarus/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Parallel-brute-force b/Lang/Free-Pascal-Lazarus/Parallel-brute-force deleted file mode 120000 index cdb4d87e7a..0000000000 --- a/Lang/Free-Pascal-Lazarus/Parallel-brute-force +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parallel-brute-force/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Parallel-calculations b/Lang/Free-Pascal-Lazarus/Parallel-calculations deleted file mode 120000 index 191ed1dae7..0000000000 --- a/Lang/Free-Pascal-Lazarus/Parallel-calculations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parallel-calculations/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Prime-decomposition b/Lang/Free-Pascal-Lazarus/Prime-decomposition deleted file mode 120000 index 358a72f6ea..0000000000 --- a/Lang/Free-Pascal-Lazarus/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Probabilistic-choice b/Lang/Free-Pascal-Lazarus/Probabilistic-choice deleted file mode 120000 index 0f85f5937f..0000000000 --- a/Lang/Free-Pascal-Lazarus/Probabilistic-choice +++ /dev/null @@ -1 +0,0 @@ -../../Task/Probabilistic-choice/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Sorting-algorithms-Shell-sort b/Lang/Free-Pascal-Lazarus/Sorting-algorithms-Shell-sort deleted file mode 120000 index e5c8120991..0000000000 --- a/Lang/Free-Pascal-Lazarus/Sorting-algorithms-Shell-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Shell-sort/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/Free-Pascal-Lazarus/Square-free-integers b/Lang/Free-Pascal-Lazarus/Square-free-integers deleted file mode 120000 index 88fe83b6b1..0000000000 --- a/Lang/Free-Pascal-Lazarus/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/Free-Pascal-Lazarus \ No newline at end of file diff --git a/Lang/FreeBASIC/15-puzzle-solver b/Lang/FreeBASIC/15-puzzle-solver deleted file mode 120000 index aac40387ff..0000000000 --- a/Lang/FreeBASIC/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/24-game-Solve b/Lang/FreeBASIC/24-game-Solve deleted file mode 120000 index 68ad0335d9..0000000000 --- a/Lang/FreeBASIC/24-game-Solve +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game-Solve/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/ADFGVX-cipher b/Lang/FreeBASIC/ADFGVX-cipher deleted file mode 120000 index 43433b4959..0000000000 --- a/Lang/FreeBASIC/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/ASCII-art-diagram-converter b/Lang/FreeBASIC/ASCII-art-diagram-converter deleted file mode 120000 index f349074235..0000000000 --- a/Lang/FreeBASIC/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/AVL-tree b/Lang/FreeBASIC/AVL-tree deleted file mode 120000 index 7500f1c637..0000000000 --- a/Lang/FreeBASIC/AVL-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/AVL-tree/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Abbreviations-simple b/Lang/FreeBASIC/Abbreviations-simple deleted file mode 120000 index de9c8f171b..0000000000 --- a/Lang/FreeBASIC/Abbreviations-simple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-simple/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Abelian-sandpile-model-Identity b/Lang/FreeBASIC/Abelian-sandpile-model-Identity deleted file mode 120000 index e9077c65f8..0000000000 --- a/Lang/FreeBASIC/Abelian-sandpile-model-Identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model-Identity/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Algebraic-data-types b/Lang/FreeBASIC/Algebraic-data-types deleted file mode 120000 index f2fce8f3dc..0000000000 --- a/Lang/FreeBASIC/Algebraic-data-types +++ /dev/null @@ -1 +0,0 @@ -../../Task/Algebraic-data-types/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Almkvist-Giullera-formula-for-pi b/Lang/FreeBASIC/Almkvist-Giullera-formula-for-pi deleted file mode 120000 index 37082cc7bb..0000000000 --- a/Lang/FreeBASIC/Almkvist-Giullera-formula-for-pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almkvist-Giullera-formula-for-pi/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Arithmetic-Rational b/Lang/FreeBASIC/Arithmetic-Rational deleted file mode 120000 index 3182d3a125..0000000000 --- a/Lang/FreeBASIC/Arithmetic-Rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Rational/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Arithmetic-derivative b/Lang/FreeBASIC/Arithmetic-derivative deleted file mode 120000 index 2a22a10780..0000000000 --- a/Lang/FreeBASIC/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Associative-array-Merging b/Lang/FreeBASIC/Associative-array-Merging deleted file mode 120000 index 77edeb4249..0000000000 --- a/Lang/FreeBASIC/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/B-zier-curves-Intersections b/Lang/FreeBASIC/B-zier-curves-Intersections deleted file mode 120000 index e1718d7dc9..0000000000 --- a/Lang/FreeBASIC/B-zier-curves-Intersections +++ /dev/null @@ -1 +0,0 @@ -../../Task/B-zier-curves-Intersections/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Babylonian-spiral b/Lang/FreeBASIC/Babylonian-spiral deleted file mode 120000 index e141e5d456..0000000000 --- a/Lang/FreeBASIC/Babylonian-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babylonian-spiral/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bifid-cipher b/Lang/FreeBASIC/Bifid-cipher deleted file mode 120000 index 6fc87c7ae7..0000000000 --- a/Lang/FreeBASIC/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bioinformatics-Global-alignment b/Lang/FreeBASIC/Bioinformatics-Global-alignment deleted file mode 120000 index 93fb335c5b..0000000000 --- a/Lang/FreeBASIC/Bioinformatics-Global-alignment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bioinformatics-Global-alignment/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bioinformatics-base-count b/Lang/FreeBASIC/Bioinformatics-base-count new file mode 120000 index 0000000000..89403f2018 --- /dev/null +++ b/Lang/FreeBASIC/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bitcoin-public-point-to-address b/Lang/FreeBASIC/Bitcoin-public-point-to-address deleted file mode 120000 index 6ff9b61a5b..0000000000 --- a/Lang/FreeBASIC/Bitcoin-public-point-to-address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitcoin-public-point-to-address/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bitmap-Histogram b/Lang/FreeBASIC/Bitmap-Histogram deleted file mode 120000 index dc9da15219..0000000000 --- a/Lang/FreeBASIC/Bitmap-Histogram +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Histogram/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bitmap-PPM-conversion-through-a-pipe b/Lang/FreeBASIC/Bitmap-PPM-conversion-through-a-pipe deleted file mode 120000 index 9082778f9e..0000000000 --- a/Lang/FreeBASIC/Bitmap-PPM-conversion-through-a-pipe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-PPM-conversion-through-a-pipe/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bitmap-Read-an-image-through-a-pipe b/Lang/FreeBASIC/Bitmap-Read-an-image-through-a-pipe deleted file mode 120000 index 17dd1b6040..0000000000 --- a/Lang/FreeBASIC/Bitmap-Read-an-image-through-a-pipe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Read-an-image-through-a-pipe/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bitmap-Write-a-PPM-file b/Lang/FreeBASIC/Bitmap-Write-a-PPM-file deleted file mode 120000 index 91057d85e5..0000000000 --- a/Lang/FreeBASIC/Bitmap-Write-a-PPM-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Write-a-PPM-file/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Brace-expansion b/Lang/FreeBASIC/Brace-expansion deleted file mode 120000 index b08a413ab2..0000000000 --- a/Lang/FreeBASIC/Brace-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brace-expansion/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Bulls-and-cows-Player b/Lang/FreeBASIC/Bulls-and-cows-Player deleted file mode 120000 index 3f30549ded..0000000000 --- a/Lang/FreeBASIC/Bulls-and-cows-Player +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bulls-and-cows-Player/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Calkin-Wilf-sequence b/Lang/FreeBASIC/Calkin-Wilf-sequence new file mode 120000 index 0000000000..0cfeafa7e2 --- /dev/null +++ b/Lang/FreeBASIC/Calkin-Wilf-sequence @@ -0,0 +1 @@ +../../Task/Calkin-Wilf-sequence/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Canny-edge-detector b/Lang/FreeBASIC/Canny-edge-detector deleted file mode 120000 index 17dd124847..0000000000 --- a/Lang/FreeBASIC/Canny-edge-detector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Canny-edge-detector/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Catmull-Clark-subdivision-surface b/Lang/FreeBASIC/Catmull-Clark-subdivision-surface deleted file mode 120000 index aa2f6e5ed9..0000000000 --- a/Lang/FreeBASIC/Catmull-Clark-subdivision-surface +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catmull-Clark-subdivision-surface/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Chat-server b/Lang/FreeBASIC/Chat-server deleted file mode 120000 index 59f06de348..0000000000 --- a/Lang/FreeBASIC/Chat-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chat-server/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Cistercian-numerals b/Lang/FreeBASIC/Cistercian-numerals deleted file mode 120000 index ceb56b6604..0000000000 --- a/Lang/FreeBASIC/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Color-quantization b/Lang/FreeBASIC/Color-quantization deleted file mode 120000 index ddc5eaabb7..0000000000 --- a/Lang/FreeBASIC/Color-quantization +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-quantization/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Colorful-numbers b/Lang/FreeBASIC/Colorful-numbers deleted file mode 120000 index dcf0a876c1..0000000000 --- a/Lang/FreeBASIC/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Compiler-AST-interpreter b/Lang/FreeBASIC/Compiler-AST-interpreter deleted file mode 120000 index ea89d91369..0000000000 --- a/Lang/FreeBASIC/Compiler-AST-interpreter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-AST-interpreter/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Compiler-code-generator b/Lang/FreeBASIC/Compiler-code-generator deleted file mode 120000 index 836b1482c2..0000000000 --- a/Lang/FreeBASIC/Compiler-code-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-code-generator/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Compiler-syntax-analyzer b/Lang/FreeBASIC/Compiler-syntax-analyzer deleted file mode 120000 index a7d7204b01..0000000000 --- a/Lang/FreeBASIC/Compiler-syntax-analyzer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-syntax-analyzer/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Compiler-virtual-machine-interpreter b/Lang/FreeBASIC/Compiler-virtual-machine-interpreter deleted file mode 120000 index 18e70488f2..0000000000 --- a/Lang/FreeBASIC/Compiler-virtual-machine-interpreter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-virtual-machine-interpreter/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Constrained-genericity b/Lang/FreeBASIC/Constrained-genericity deleted file mode 120000 index 1fc68e6907..0000000000 --- a/Lang/FreeBASIC/Constrained-genericity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Constrained-genericity/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/FreeBASIC/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- deleted file mode 120000 index e2defb3109..0000000000 --- a/Lang/FreeBASIC/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Cut-a-rectangle b/Lang/FreeBASIC/Cut-a-rectangle deleted file mode 120000 index 16e664db93..0000000000 --- a/Lang/FreeBASIC/Cut-a-rectangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cut-a-rectangle/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Cyclotomic-polynomial b/Lang/FreeBASIC/Cyclotomic-polynomial deleted file mode 120000 index 82e1fdeb03..0000000000 --- a/Lang/FreeBASIC/Cyclotomic-polynomial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclotomic-polynomial/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/De-Bruijn-sequences b/Lang/FreeBASIC/De-Bruijn-sequences deleted file mode 120000 index 2f6e2651ca..0000000000 --- a/Lang/FreeBASIC/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Death-Star b/Lang/FreeBASIC/Death-Star deleted file mode 120000 index b45f2416c8..0000000000 --- a/Lang/FreeBASIC/Death-Star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Death-Star/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Deconvolution-2D+ b/Lang/FreeBASIC/Deconvolution-2D+ deleted file mode 120000 index 2a10e72230..0000000000 --- a/Lang/FreeBASIC/Deconvolution-2D+ +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-2D+/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Dijkstras-algorithm b/Lang/FreeBASIC/Dijkstras-algorithm deleted file mode 120000 index 4465c347e7..0000000000 --- a/Lang/FreeBASIC/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Dining-philosophers b/Lang/FreeBASIC/Dining-philosophers deleted file mode 120000 index 5d616c69b5..0000000000 --- a/Lang/FreeBASIC/Dining-philosophers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dining-philosophers/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Display-an-outline-as-a-nested-table b/Lang/FreeBASIC/Display-an-outline-as-a-nested-table deleted file mode 120000 index e1fe23aa03..0000000000 --- a/Lang/FreeBASIC/Display-an-outline-as-a-nested-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-an-outline-as-a-nested-table/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Distance-and-Bearing b/Lang/FreeBASIC/Distance-and-Bearing deleted file mode 120000 index 14b1500a35..0000000000 --- a/Lang/FreeBASIC/Distance-and-Bearing +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distance-and-Bearing/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Distributed-programming b/Lang/FreeBASIC/Distributed-programming deleted file mode 120000 index 3c9ea14752..0000000000 --- a/Lang/FreeBASIC/Distributed-programming +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distributed-programming/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Distribution-of-0-digits-in-factorial-series b/Lang/FreeBASIC/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index caef600e25..0000000000 --- a/Lang/FreeBASIC/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Dominoes b/Lang/FreeBASIC/Dominoes deleted file mode 120000 index 46d9dcf5f4..0000000000 --- a/Lang/FreeBASIC/Dominoes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dominoes/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Echo-server b/Lang/FreeBASIC/Echo-server deleted file mode 120000 index af11371400..0000000000 --- a/Lang/FreeBASIC/Echo-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Echo-server/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Elementary-cellular-automaton-Infinite-length b/Lang/FreeBASIC/Elementary-cellular-automaton-Infinite-length deleted file mode 120000 index ab22fce8e1..0000000000 --- a/Lang/FreeBASIC/Elementary-cellular-automaton-Infinite-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elementary-cellular-automaton-Infinite-length/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Elliptic-curve-arithmetic b/Lang/FreeBASIC/Elliptic-curve-arithmetic deleted file mode 120000 index ab0b3f0aed..0000000000 --- a/Lang/FreeBASIC/Elliptic-curve-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-curve-arithmetic/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Executable-library b/Lang/FreeBASIC/Executable-library deleted file mode 120000 index ece6e47b6f..0000000000 --- a/Lang/FreeBASIC/Executable-library +++ /dev/null @@ -1 +0,0 @@ -../../Task/Executable-library/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Execute-Computer-Zero b/Lang/FreeBASIC/Execute-Computer-Zero deleted file mode 120000 index 018dffe9b4..0000000000 --- a/Lang/FreeBASIC/Execute-Computer-Zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Computer-Zero/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Execute-SNUSP b/Lang/FreeBASIC/Execute-SNUSP deleted file mode 120000 index 7b179aedb8..0000000000 --- a/Lang/FreeBASIC/Execute-SNUSP +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-SNUSP/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Execute-a-Markov-algorithm b/Lang/FreeBASIC/Execute-a-Markov-algorithm deleted file mode 120000 index 7f61263c19..0000000000 --- a/Lang/FreeBASIC/Execute-a-Markov-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-a-Markov-algorithm/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Faces-from-a-mesh b/Lang/FreeBASIC/Faces-from-a-mesh deleted file mode 120000 index 33d860451f..0000000000 --- a/Lang/FreeBASIC/Faces-from-a-mesh +++ /dev/null @@ -1 +0,0 @@ -../../Task/Faces-from-a-mesh/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Factorial-base-numbers-indexing-permutations-of-a-collection b/Lang/FreeBASIC/Factorial-base-numbers-indexing-permutations-of-a-collection deleted file mode 120000 index 1f2b24105a..0000000000 --- a/Lang/FreeBASIC/Factorial-base-numbers-indexing-permutations-of-a-collection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-base-numbers-indexing-permutations-of-a-collection/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Fermat-numbers b/Lang/FreeBASIC/Fermat-numbers deleted file mode 120000 index b6ff867057..0000000000 --- a/Lang/FreeBASIC/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/File-size-distribution b/Lang/FreeBASIC/File-size-distribution deleted file mode 120000 index fa04d214bc..0000000000 --- a/Lang/FreeBASIC/File-size-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-size-distribution/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Find-duplicate-files b/Lang/FreeBASIC/Find-duplicate-files deleted file mode 120000 index f2becdf037..0000000000 --- a/Lang/FreeBASIC/Find-duplicate-files +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-duplicate-files/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Find-largest-left-truncatable-prime-in-a-given-base b/Lang/FreeBASIC/Find-largest-left-truncatable-prime-in-a-given-base deleted file mode 120000 index 90493830d8..0000000000 --- a/Lang/FreeBASIC/Find-largest-left-truncatable-prime-in-a-given-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-largest-left-truncatable-prime-in-a-given-base/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Four-is-the-number-of-letters-in-the-... b/Lang/FreeBASIC/Four-is-the-number-of-letters-in-the-... deleted file mode 120000 index 7c1f37136c..0000000000 --- a/Lang/FreeBASIC/Four-is-the-number-of-letters-in-the-... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Four-is-the-number-of-letters-in-the-.../FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Fraction-reduction b/Lang/FreeBASIC/Fraction-reduction deleted file mode 120000 index fe901cf96d..0000000000 --- a/Lang/FreeBASIC/Fraction-reduction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fraction-reduction/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Functional-coverage-tree b/Lang/FreeBASIC/Functional-coverage-tree deleted file mode 120000 index 03b730b6d0..0000000000 --- a/Lang/FreeBASIC/Functional-coverage-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Functional-coverage-tree/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Galton-box-animation b/Lang/FreeBASIC/Galton-box-animation deleted file mode 120000 index d8550e96b6..0000000000 --- a/Lang/FreeBASIC/Galton-box-animation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Galton-box-animation/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Gotchas b/Lang/FreeBASIC/Gotchas deleted file mode 120000 index 152b1da45f..0000000000 --- a/Lang/FreeBASIC/Gotchas +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gotchas/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Graph-colouring b/Lang/FreeBASIC/Graph-colouring deleted file mode 120000 index 2b6f6e444d..0000000000 --- a/Lang/FreeBASIC/Graph-colouring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Graph-colouring/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/HTTPS b/Lang/FreeBASIC/HTTPS deleted file mode 120000 index ffa1e6ee82..0000000000 --- a/Lang/FreeBASIC/HTTPS +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/HTTPS-Authenticated b/Lang/FreeBASIC/HTTPS-Authenticated deleted file mode 120000 index 3da86c1cef..0000000000 --- a/Lang/FreeBASIC/HTTPS-Authenticated +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS-Authenticated/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/HTTPS-Client-authenticated b/Lang/FreeBASIC/HTTPS-Client-authenticated deleted file mode 120000 index 8c2cbfcd86..0000000000 --- a/Lang/FreeBASIC/HTTPS-Client-authenticated +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS-Client-authenticated/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Hello-world-Web-server b/Lang/FreeBASIC/Hello-world-Web-server deleted file mode 120000 index 25d52ccee6..0000000000 --- a/Lang/FreeBASIC/Hello-world-Web-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Web-server/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Hex-words b/Lang/FreeBASIC/Hex-words deleted file mode 120000 index fa25607a2e..0000000000 --- a/Lang/FreeBASIC/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/History-variables b/Lang/FreeBASIC/History-variables deleted file mode 120000 index 68f4bcd858..0000000000 --- a/Lang/FreeBASIC/History-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/History-variables/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Honeycombs b/Lang/FreeBASIC/Honeycombs deleted file mode 120000 index 12b1cd0046..0000000000 --- a/Lang/FreeBASIC/Honeycombs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Honeycombs/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Hough-transform b/Lang/FreeBASIC/Hough-transform deleted file mode 120000 index b825046529..0000000000 --- a/Lang/FreeBASIC/Hough-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hough-transform/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Im-a-software-engineer-get-me-out-of-here b/Lang/FreeBASIC/Im-a-software-engineer-get-me-out-of-here deleted file mode 120000 index 2169aad43b..0000000000 --- a/Lang/FreeBASIC/Im-a-software-engineer-get-me-out-of-here +++ /dev/null @@ -1 +0,0 @@ -../../Task/Im-a-software-engineer-get-me-out-of-here/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Image-convolution b/Lang/FreeBASIC/Image-convolution deleted file mode 120000 index 5f1451fadd..0000000000 --- a/Lang/FreeBASIC/Image-convolution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Image-convolution/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Imaginary-base-numbers b/Lang/FreeBASIC/Imaginary-base-numbers deleted file mode 120000 index 00ee9d8fe6..0000000000 --- a/Lang/FreeBASIC/Imaginary-base-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Imaginary-base-numbers/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Intersecting-number-wheels b/Lang/FreeBASIC/Intersecting-number-wheels deleted file mode 120000 index 42313ae624..0000000000 --- a/Lang/FreeBASIC/Intersecting-number-wheels +++ /dev/null @@ -1 +0,0 @@ -../../Task/Intersecting-number-wheels/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Inverted-index b/Lang/FreeBASIC/Inverted-index deleted file mode 120000 index affc1bf23c..0000000000 --- a/Lang/FreeBASIC/Inverted-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inverted-index/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Isograms-and-heterograms b/Lang/FreeBASIC/Isograms-and-heterograms deleted file mode 120000 index c142330285..0000000000 --- a/Lang/FreeBASIC/Isograms-and-heterograms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isograms-and-heterograms/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Jaro-Winkler-distance b/Lang/FreeBASIC/Jaro-Winkler-distance deleted file mode 120000 index 567e61dfba..0000000000 --- a/Lang/FreeBASIC/Jaro-Winkler-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-Winkler-distance/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Juggler-sequence b/Lang/FreeBASIC/Juggler-sequence deleted file mode 120000 index 5aaf9a794f..0000000000 --- a/Lang/FreeBASIC/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/K-d-tree b/Lang/FreeBASIC/K-d-tree deleted file mode 120000 index f6319abaa1..0000000000 --- a/Lang/FreeBASIC/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Knuths-algorithm-S b/Lang/FreeBASIC/Knuths-algorithm-S deleted file mode 120000 index 720a4a3a7e..0000000000 --- a/Lang/FreeBASIC/Knuths-algorithm-S +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-algorithm-S/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Knuths-power-tree b/Lang/FreeBASIC/Knuths-power-tree deleted file mode 120000 index b6075609dd..0000000000 --- a/Lang/FreeBASIC/Knuths-power-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-power-tree/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Kolakoski-sequence b/Lang/FreeBASIC/Kolakoski-sequence deleted file mode 120000 index fce085b91c..0000000000 --- a/Lang/FreeBASIC/Kolakoski-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kolakoski-sequence/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Kosaraju b/Lang/FreeBASIC/Kosaraju deleted file mode 120000 index b8d8396338..0000000000 --- a/Lang/FreeBASIC/Kosaraju +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kosaraju/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/LU-decomposition b/Lang/FreeBASIC/LU-decomposition deleted file mode 120000 index a239ac6c87..0000000000 --- a/Lang/FreeBASIC/LU-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/LU-decomposition/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Last-letter-first-letter b/Lang/FreeBASIC/Last-letter-first-letter deleted file mode 120000 index 436ebfb8b9..0000000000 --- a/Lang/FreeBASIC/Last-letter-first-letter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-letter-first-letter/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Latin-Squares-in-reduced-form b/Lang/FreeBASIC/Latin-Squares-in-reduced-form deleted file mode 120000 index db9e5d8a88..0000000000 --- a/Lang/FreeBASIC/Latin-Squares-in-reduced-form +++ /dev/null @@ -1 +0,0 @@ -../../Task/Latin-Squares-in-reduced-form/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/List-rooted-trees b/Lang/FreeBASIC/List-rooted-trees deleted file mode 120000 index d641d1dcf0..0000000000 --- a/Lang/FreeBASIC/List-rooted-trees +++ /dev/null @@ -1 +0,0 @@ -../../Task/List-rooted-trees/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Lucky-and-even-lucky-numbers b/Lang/FreeBASIC/Lucky-and-even-lucky-numbers deleted file mode 120000 index ab68b27195..0000000000 --- a/Lang/FreeBASIC/Lucky-and-even-lucky-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lucky-and-even-lucky-numbers/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Mayan-calendar b/Lang/FreeBASIC/Mayan-calendar deleted file mode 120000 index 4de11e93f6..0000000000 --- a/Lang/FreeBASIC/Mayan-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-calendar/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Maze-solving b/Lang/FreeBASIC/Maze-solving deleted file mode 120000 index 2140d087ef..0000000000 --- a/Lang/FreeBASIC/Maze-solving +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maze-solving/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Median-filter b/Lang/FreeBASIC/Median-filter deleted file mode 120000 index a0d5eec8a2..0000000000 --- a/Lang/FreeBASIC/Median-filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Median-filter/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Meissel-Mertens-constant b/Lang/FreeBASIC/Meissel-Mertens-constant new file mode 120000 index 0000000000..f9f037c2ea --- /dev/null +++ b/Lang/FreeBASIC/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Metallic-ratios b/Lang/FreeBASIC/Metallic-ratios deleted file mode 120000 index 46551c0b17..0000000000 --- a/Lang/FreeBASIC/Metallic-ratios +++ /dev/null @@ -1 +0,0 @@ -../../Task/Metallic-ratios/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Miller-Rabin-primality-test b/Lang/FreeBASIC/Miller-Rabin-primality-test new file mode 120000 index 0000000000..31ca057e36 --- /dev/null +++ b/Lang/FreeBASIC/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Multiplicative-order b/Lang/FreeBASIC/Multiplicative-order deleted file mode 120000 index 1ba98d9611..0000000000 --- a/Lang/FreeBASIC/Multiplicative-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplicative-order/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/N-smooth-numbers b/Lang/FreeBASIC/N-smooth-numbers deleted file mode 120000 index 7dad0a8519..0000000000 --- a/Lang/FreeBASIC/N-smooth-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/N-smooth-numbers/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Natural-sorting b/Lang/FreeBASIC/Natural-sorting deleted file mode 120000 index 00267c2e93..0000000000 --- a/Lang/FreeBASIC/Natural-sorting +++ /dev/null @@ -1 +0,0 @@ -../../Task/Natural-sorting/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Nested-templated-data b/Lang/FreeBASIC/Nested-templated-data deleted file mode 120000 index 064256a2d8..0000000000 --- a/Lang/FreeBASIC/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Non-transitive-dice b/Lang/FreeBASIC/Non-transitive-dice deleted file mode 120000 index a320f65fd4..0000000000 --- a/Lang/FreeBASIC/Non-transitive-dice +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-transitive-dice/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Nonoblock b/Lang/FreeBASIC/Nonoblock deleted file mode 120000 index 18e71abc62..0000000000 --- a/Lang/FreeBASIC/Nonoblock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nonoblock/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Numerical-and-alphabetical-suffixes b/Lang/FreeBASIC/Numerical-and-alphabetical-suffixes deleted file mode 120000 index f6a2f778c0..0000000000 --- a/Lang/FreeBASIC/Numerical-and-alphabetical-suffixes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-and-alphabetical-suffixes/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/OLE-automation b/Lang/FreeBASIC/OLE-automation deleted file mode 120000 index eb6c2ccae6..0000000000 --- a/Lang/FreeBASIC/OLE-automation +++ /dev/null @@ -1 +0,0 @@ -../../Task/OLE-automation/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Order-disjoint-list-items b/Lang/FreeBASIC/Order-disjoint-list-items deleted file mode 120000 index d5dc6c71fd..0000000000 --- a/Lang/FreeBASIC/Order-disjoint-list-items +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-disjoint-list-items/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/P-value-correction b/Lang/FreeBASIC/P-value-correction deleted file mode 120000 index a2f7c2e1e2..0000000000 --- a/Lang/FreeBASIC/P-value-correction +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-value-correction/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Padovan-sequence b/Lang/FreeBASIC/Padovan-sequence deleted file mode 120000 index efb5ea56df..0000000000 --- a/Lang/FreeBASIC/Padovan-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Padovan-sequence/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Parse-an-IP-Address b/Lang/FreeBASIC/Parse-an-IP-Address deleted file mode 120000 index 4b51728d74..0000000000 --- a/Lang/FreeBASIC/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Parsing-RPN-to-infix-conversion b/Lang/FreeBASIC/Parsing-RPN-to-infix-conversion deleted file mode 120000 index d524880dde..0000000000 --- a/Lang/FreeBASIC/Parsing-RPN-to-infix-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-to-infix-conversion/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Parsing-Shunting-yard-algorithm b/Lang/FreeBASIC/Parsing-Shunting-yard-algorithm deleted file mode 120000 index c598b75c18..0000000000 --- a/Lang/FreeBASIC/Parsing-Shunting-yard-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-Shunting-yard-algorithm/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Particle-fountain b/Lang/FreeBASIC/Particle-fountain deleted file mode 120000 index e93e8b964f..0000000000 --- a/Lang/FreeBASIC/Particle-fountain +++ /dev/null @@ -1 +0,0 @@ -../../Task/Particle-fountain/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Partition-an-integer-x-into-n-primes b/Lang/FreeBASIC/Partition-an-integer-x-into-n-primes deleted file mode 120000 index 1e3ac14a3f..0000000000 --- a/Lang/FreeBASIC/Partition-an-integer-x-into-n-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-an-integer-x-into-n-primes/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pentagram b/Lang/FreeBASIC/Pentagram deleted file mode 120000 index 60996db876..0000000000 --- a/Lang/FreeBASIC/Pentagram +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pentagram/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pentomino-tiling b/Lang/FreeBASIC/Pentomino-tiling deleted file mode 120000 index 684a3829b3..0000000000 --- a/Lang/FreeBASIC/Pentomino-tiling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pentomino-tiling/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Percentage-difference-between-images b/Lang/FreeBASIC/Percentage-difference-between-images deleted file mode 120000 index 4b5a28d9b2..0000000000 --- a/Lang/FreeBASIC/Percentage-difference-between-images +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percentage-difference-between-images/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Percolation-Bond-percolation b/Lang/FreeBASIC/Percolation-Bond-percolation deleted file mode 120000 index 15d6381502..0000000000 --- a/Lang/FreeBASIC/Percolation-Bond-percolation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percolation-Bond-percolation/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Percolation-Mean-cluster-density b/Lang/FreeBASIC/Percolation-Mean-cluster-density deleted file mode 120000 index 6d9dff89ca..0000000000 --- a/Lang/FreeBASIC/Percolation-Mean-cluster-density +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percolation-Mean-cluster-density/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Peripheral-drift-illusion b/Lang/FreeBASIC/Peripheral-drift-illusion deleted file mode 120000 index 8fbf1d3fb4..0000000000 --- a/Lang/FreeBASIC/Peripheral-drift-illusion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peripheral-drift-illusion/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pig-the-dice-game-Player b/Lang/FreeBASIC/Pig-the-dice-game-Player deleted file mode 120000 index 5766e4e5d7..0000000000 --- a/Lang/FreeBASIC/Pig-the-dice-game-Player +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pig-the-dice-game-Player/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pinstripe-Printer b/Lang/FreeBASIC/Pinstripe-Printer deleted file mode 120000 index be78fdd396..0000000000 --- a/Lang/FreeBASIC/Pinstripe-Printer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pinstripe-Printer/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pisano-period b/Lang/FreeBASIC/Pisano-period deleted file mode 120000 index 33961710c0..0000000000 --- a/Lang/FreeBASIC/Pisano-period +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pisano-period/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Play-recorded-sounds b/Lang/FreeBASIC/Play-recorded-sounds deleted file mode 120000 index a80641ee64..0000000000 --- a/Lang/FreeBASIC/Play-recorded-sounds +++ /dev/null @@ -1 +0,0 @@ -../../Task/Play-recorded-sounds/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Primes---allocate-descendants-to-their-ancestors b/Lang/FreeBASIC/Primes---allocate-descendants-to-their-ancestors deleted file mode 120000 index 49848d0592..0000000000 --- a/Lang/FreeBASIC/Primes---allocate-descendants-to-their-ancestors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primes---allocate-descendants-to-their-ancestors/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a b/Lang/FreeBASIC/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a deleted file mode 120000 index a870f104af..0000000000 --- a/Lang/FreeBASIC/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pseudo-random-numbers-PCG32 b/Lang/FreeBASIC/Pseudo-random-numbers-PCG32 deleted file mode 120000 index 8a007fed91..0000000000 --- a/Lang/FreeBASIC/Pseudo-random-numbers-PCG32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-PCG32/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pseudo-random-numbers-Splitmix64 b/Lang/FreeBASIC/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index 233c73713f..0000000000 --- a/Lang/FreeBASIC/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Pseudo-random-numbers-Xorshift-star b/Lang/FreeBASIC/Pseudo-random-numbers-Xorshift-star deleted file mode 120000 index a40446f6c8..0000000000 --- a/Lang/FreeBASIC/Pseudo-random-numbers-Xorshift-star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Xorshift-star/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/QR-decomposition b/Lang/FreeBASIC/QR-decomposition deleted file mode 120000 index b4e25e341a..0000000000 --- a/Lang/FreeBASIC/QR-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/QR-decomposition/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Quaternion-type b/Lang/FreeBASIC/Quaternion-type new file mode 120000 index 0000000000..f82c3a440e --- /dev/null +++ b/Lang/FreeBASIC/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Random-sentence-from-book b/Lang/FreeBASIC/Random-sentence-from-book deleted file mode 120000 index 9834480618..0000000000 --- a/Lang/FreeBASIC/Random-sentence-from-book +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-sentence-from-book/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Reflection-List-methods b/Lang/FreeBASIC/Reflection-List-methods deleted file mode 120000 index c065c312ec..0000000000 --- a/Lang/FreeBASIC/Reflection-List-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-methods/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Reflection-List-properties b/Lang/FreeBASIC/Reflection-List-properties deleted file mode 120000 index 0fd1a0e61e..0000000000 --- a/Lang/FreeBASIC/Reflection-List-properties +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-properties/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Rendezvous b/Lang/FreeBASIC/Rendezvous deleted file mode 120000 index 1f852cdb53..0000000000 --- a/Lang/FreeBASIC/Rendezvous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rendezvous/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Repunit-primes b/Lang/FreeBASIC/Repunit-primes deleted file mode 120000 index f9270140df..0000000000 --- a/Lang/FreeBASIC/Repunit-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repunit-primes/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Rosetta-Code-Count-examples b/Lang/FreeBASIC/Rosetta-Code-Count-examples deleted file mode 120000 index c38f53ad75..0000000000 --- a/Lang/FreeBASIC/Rosetta-Code-Count-examples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Count-examples/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Rosetta-Code-Find-bare-lang-tags b/Lang/FreeBASIC/Rosetta-Code-Find-bare-lang-tags deleted file mode 120000 index c9a2ddc646..0000000000 --- a/Lang/FreeBASIC/Rosetta-Code-Find-bare-lang-tags +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Find-bare-lang-tags/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Rosetta-Code-Find-unimplemented-tasks b/Lang/FreeBASIC/Rosetta-Code-Find-unimplemented-tasks deleted file mode 120000 index 3f89d2cb42..0000000000 --- a/Lang/FreeBASIC/Rosetta-Code-Find-unimplemented-tasks +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Find-unimplemented-tasks/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Rosetta-Code-Fix-code-tags b/Lang/FreeBASIC/Rosetta-Code-Fix-code-tags deleted file mode 120000 index 53b438e29f..0000000000 --- a/Lang/FreeBASIC/Rosetta-Code-Fix-code-tags +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Fix-code-tags/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Rosetta-Code-Rank-languages-by-popularity b/Lang/FreeBASIC/Rosetta-Code-Rank-languages-by-popularity deleted file mode 120000 index 71d538269e..0000000000 --- a/Lang/FreeBASIC/Rosetta-Code-Rank-languages-by-popularity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Rank-languages-by-popularity/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Runtime-evaluation-In-an-environment b/Lang/FreeBASIC/Runtime-evaluation-In-an-environment deleted file mode 120000 index 80c5a69b35..0000000000 --- a/Lang/FreeBASIC/Runtime-evaluation-In-an-environment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Runtime-evaluation-In-an-environment/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/S-expressions b/Lang/FreeBASIC/S-expressions deleted file mode 120000 index 9a014b780a..0000000000 --- a/Lang/FreeBASIC/S-expressions +++ /dev/null @@ -1 +0,0 @@ -../../Task/S-expressions/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/SOAP b/Lang/FreeBASIC/SOAP deleted file mode 120000 index 927bc2295a..0000000000 --- a/Lang/FreeBASIC/SOAP +++ /dev/null @@ -1 +0,0 @@ -../../Task/SOAP/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/SQL-based-authentication b/Lang/FreeBASIC/SQL-based-authentication deleted file mode 120000 index 19b09b4fc4..0000000000 --- a/Lang/FreeBASIC/SQL-based-authentication +++ /dev/null @@ -1 +0,0 @@ -../../Task/SQL-based-authentication/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Same-fringe b/Lang/FreeBASIC/Same-fringe deleted file mode 120000 index 756cf55a7d..0000000000 --- a/Lang/FreeBASIC/Same-fringe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Same-fringe/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Search-in-paragraphs-text b/Lang/FreeBASIC/Search-in-paragraphs-text deleted file mode 120000 index bb0ecc2e40..0000000000 --- a/Lang/FreeBASIC/Search-in-paragraphs-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-in-paragraphs-text/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sequence:-nth-number-with-exactly-n-divisors b/Lang/FreeBASIC/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/FreeBASIC/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/FreeBASIC/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/FreeBASIC/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/FreeBASIC/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/FreeBASIC/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/FreeBASIC/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/FreeBASIC/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/FreeBASIC/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/FreeBASIC/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/FreeBASIC/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/FreeBASIC/Set-puzzle b/Lang/FreeBASIC/Set-puzzle deleted file mode 120000 index bdebb4443c..0000000000 --- a/Lang/FreeBASIC/Set-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-puzzle/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Simple-database b/Lang/FreeBASIC/Simple-database deleted file mode 120000 index 8d38b56c2d..0000000000 --- a/Lang/FreeBASIC/Simple-database +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-database/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Simulate-input-Keyboard b/Lang/FreeBASIC/Simulate-input-Keyboard deleted file mode 120000 index 504f3b18d3..0000000000 --- a/Lang/FreeBASIC/Simulate-input-Keyboard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simulate-input-Keyboard/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Singular-value-decomposition b/Lang/FreeBASIC/Singular-value-decomposition deleted file mode 120000 index efbf29e97a..0000000000 --- a/Lang/FreeBASIC/Singular-value-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singular-value-decomposition/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sisyphus-sequence b/Lang/FreeBASIC/Sisyphus-sequence deleted file mode 120000 index 10074b9571..0000000000 --- a/Lang/FreeBASIC/Sisyphus-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sisyphus-sequence/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sokoban b/Lang/FreeBASIC/Sokoban deleted file mode 120000 index 4305dae36d..0000000000 --- a/Lang/FreeBASIC/Sokoban +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sokoban/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Solve-a-Hidato-puzzle b/Lang/FreeBASIC/Solve-a-Hidato-puzzle deleted file mode 120000 index ad49dd7d72..0000000000 --- a/Lang/FreeBASIC/Solve-a-Hidato-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hidato-puzzle/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Solve-a-Holy-Knights-tour b/Lang/FreeBASIC/Solve-a-Holy-Knights-tour deleted file mode 120000 index f7260b5f2d..0000000000 --- a/Lang/FreeBASIC/Solve-a-Holy-Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Holy-Knights-tour/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Solve-a-Hopido-puzzle b/Lang/FreeBASIC/Solve-a-Hopido-puzzle deleted file mode 120000 index 3af9403ab8..0000000000 --- a/Lang/FreeBASIC/Solve-a-Hopido-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hopido-puzzle/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Solve-a-Numbrix-puzzle b/Lang/FreeBASIC/Solve-a-Numbrix-puzzle deleted file mode 120000 index 9212eac2bb..0000000000 --- a/Lang/FreeBASIC/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Solve-the-no-connection-puzzle b/Lang/FreeBASIC/Solve-the-no-connection-puzzle deleted file mode 120000 index b14a0d6097..0000000000 --- a/Lang/FreeBASIC/Solve-the-no-connection-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-the-no-connection-puzzle/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sort-a-list-of-object-identifiers b/Lang/FreeBASIC/Sort-a-list-of-object-identifiers deleted file mode 120000 index 2c5a5fbb3b..0000000000 --- a/Lang/FreeBASIC/Sort-a-list-of-object-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-a-list-of-object-identifiers/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sort-an-outline-at-every-level b/Lang/FreeBASIC/Sort-an-outline-at-every-level deleted file mode 120000 index ae4c555049..0000000000 --- a/Lang/FreeBASIC/Sort-an-outline-at-every-level +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-outline-at-every-level/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sorting-Algorithms-Circle-Sort b/Lang/FreeBASIC/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..ea5bf17e30 --- /dev/null +++ b/Lang/FreeBASIC/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sorting-algorithms-Patience-sort b/Lang/FreeBASIC/Sorting-algorithms-Patience-sort deleted file mode 120000 index 1fc80c416d..0000000000 --- a/Lang/FreeBASIC/Sorting-algorithms-Patience-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Patience-sort/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sorting-algorithms-Radix-sort b/Lang/FreeBASIC/Sorting-algorithms-Radix-sort deleted file mode 120000 index bddec7031b..0000000000 --- a/Lang/FreeBASIC/Sorting-algorithms-Radix-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Radix-sort/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Sorting-algorithms-Strand-sort b/Lang/FreeBASIC/Sorting-algorithms-Strand-sort deleted file mode 120000 index 5305f3c6f7..0000000000 --- a/Lang/FreeBASIC/Sorting-algorithms-Strand-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Strand-sort/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Stable-marriage-problem b/Lang/FreeBASIC/Stable-marriage-problem deleted file mode 120000 index e54d2883a7..0000000000 --- a/Lang/FreeBASIC/Stable-marriage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stable-marriage-problem/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/State-name-puzzle b/Lang/FreeBASIC/State-name-puzzle deleted file mode 120000 index 31d5af215a..0000000000 --- a/Lang/FreeBASIC/State-name-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/State-name-puzzle/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Strassens-algorithm b/Lang/FreeBASIC/Strassens-algorithm deleted file mode 120000 index a5c6e9ef78..0000000000 --- a/Lang/FreeBASIC/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Summarize-and-say-sequence b/Lang/FreeBASIC/Summarize-and-say-sequence deleted file mode 120000 index c59e649aca..0000000000 --- a/Lang/FreeBASIC/Summarize-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-and-say-sequence/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Synchronous-concurrency b/Lang/FreeBASIC/Synchronous-concurrency deleted file mode 120000 index 787a5aebfc..0000000000 --- a/Lang/FreeBASIC/Synchronous-concurrency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Synchronous-concurrency/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Tarjan b/Lang/FreeBASIC/Tarjan deleted file mode 120000 index 2088963b57..0000000000 --- a/Lang/FreeBASIC/Tarjan +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tarjan/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Teacup-rim-text b/Lang/FreeBASIC/Teacup-rim-text deleted file mode 120000 index e0ebee7a7f..0000000000 --- a/Lang/FreeBASIC/Teacup-rim-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Teacup-rim-text/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Text-processing-1 b/Lang/FreeBASIC/Text-processing-1 deleted file mode 120000 index 1e52cc9a2a..0000000000 --- a/Lang/FreeBASIC/Text-processing-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Text-processing-1/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Text-processing-2 b/Lang/FreeBASIC/Text-processing-2 deleted file mode 120000 index 03a524d892..0000000000 --- a/Lang/FreeBASIC/Text-processing-2 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Text-processing-2/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Textonyms b/Lang/FreeBASIC/Textonyms deleted file mode 120000 index 1d60439533..0000000000 --- a/Lang/FreeBASIC/Textonyms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Textonyms/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Topological-sort b/Lang/FreeBASIC/Topological-sort deleted file mode 120000 index c6cd407c9f..0000000000 --- a/Lang/FreeBASIC/Topological-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topological-sort/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Transliterate-English-text-using-the-Greek-alphabet b/Lang/FreeBASIC/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index a3142e6912..0000000000 --- a/Lang/FreeBASIC/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Tree-datastructures b/Lang/FreeBASIC/Tree-datastructures deleted file mode 120000 index 9ca72e7eb6..0000000000 --- a/Lang/FreeBASIC/Tree-datastructures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-datastructures/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Truth-table b/Lang/FreeBASIC/Truth-table deleted file mode 120000 index 228be906c6..0000000000 --- a/Lang/FreeBASIC/Truth-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truth-table/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/UPC b/Lang/FreeBASIC/UPC deleted file mode 120000 index ddcf027e49..0000000000 --- a/Lang/FreeBASIC/UPC +++ /dev/null @@ -1 +0,0 @@ -../../Task/UPC/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/URL-parser b/Lang/FreeBASIC/URL-parser deleted file mode 120000 index 870d1a309b..0000000000 --- a/Lang/FreeBASIC/URL-parser +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-parser/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Ukkonen-s-suffix-tree-construction b/Lang/FreeBASIC/Ukkonen-s-suffix-tree-construction deleted file mode 120000 index 6686d05c91..0000000000 --- a/Lang/FreeBASIC/Ukkonen-s-suffix-tree-construction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ukkonen-s-suffix-tree-construction/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Universal-Turing-machine b/Lang/FreeBASIC/Universal-Turing-machine deleted file mode 120000 index a29b2e6201..0000000000 --- a/Lang/FreeBASIC/Universal-Turing-machine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Universal-Turing-machine/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Use-another-language-to-call-a-function b/Lang/FreeBASIC/Use-another-language-to-call-a-function deleted file mode 120000 index 5d195ad8f5..0000000000 --- a/Lang/FreeBASIC/Use-another-language-to-call-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Use-another-language-to-call-a-function/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/User-input-Graphical b/Lang/FreeBASIC/User-input-Graphical deleted file mode 120000 index 8c4f2f8158..0000000000 --- a/Lang/FreeBASIC/User-input-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Graphical/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Verify-distribution-uniformity-Chi-squared-test b/Lang/FreeBASIC/Verify-distribution-uniformity-Chi-squared-test deleted file mode 120000 index 8088ed160e..0000000000 --- a/Lang/FreeBASIC/Verify-distribution-uniformity-Chi-squared-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verify-distribution-uniformity-Chi-squared-test/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Vigen-re-cipher-Cryptanalysis b/Lang/FreeBASIC/Vigen-re-cipher-Cryptanalysis deleted file mode 120000 index a802341d36..0000000000 --- a/Lang/FreeBASIC/Vigen-re-cipher-Cryptanalysis +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher-Cryptanalysis/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Vogels-approximation-method b/Lang/FreeBASIC/Vogels-approximation-method deleted file mode 120000 index e685ba3d8d..0000000000 --- a/Lang/FreeBASIC/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Wasteful-equidigital-and-frugal-numbers b/Lang/FreeBASIC/Wasteful-equidigital-and-frugal-numbers deleted file mode 120000 index 7889ec2570..0000000000 --- a/Lang/FreeBASIC/Wasteful-equidigital-and-frugal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wasteful-equidigital-and-frugal-numbers/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Web-scraping b/Lang/FreeBASIC/Web-scraping deleted file mode 120000 index ef3ee370f4..0000000000 --- a/Lang/FreeBASIC/Web-scraping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Web-scraping/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Window-management b/Lang/FreeBASIC/Window-management deleted file mode 120000 index f998cbb6ef..0000000000 --- a/Lang/FreeBASIC/Window-management +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-management/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Word-ladder b/Lang/FreeBASIC/Word-ladder deleted file mode 120000 index 1390108efe..0000000000 --- a/Lang/FreeBASIC/Word-ladder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-ladder/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/World-Cup-group-stage b/Lang/FreeBASIC/World-Cup-group-stage deleted file mode 120000 index 10c687e006..0000000000 --- a/Lang/FreeBASIC/World-Cup-group-stage +++ /dev/null @@ -1 +0,0 @@ -../../Task/World-Cup-group-stage/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Write-to-Windows-event-log b/Lang/FreeBASIC/Write-to-Windows-event-log deleted file mode 120000 index 8993ae4828..0000000000 --- a/Lang/FreeBASIC/Write-to-Windows-event-log +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-to-Windows-event-log/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Yahoo-search-interface b/Lang/FreeBASIC/Yahoo-search-interface deleted file mode 120000 index f92d06f36d..0000000000 --- a/Lang/FreeBASIC/Yahoo-search-interface +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yahoo-search-interface/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Zebra-puzzle b/Lang/FreeBASIC/Zebra-puzzle deleted file mode 120000 index aa6204ae2d..0000000000 --- a/Lang/FreeBASIC/Zebra-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zebra-puzzle/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Zeckendorf-arithmetic b/Lang/FreeBASIC/Zeckendorf-arithmetic deleted file mode 120000 index 5830437272..0000000000 --- a/Lang/FreeBASIC/Zeckendorf-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-arithmetic/FreeBASIC \ No newline at end of file diff --git a/Lang/FreeBASIC/Zumkeller-numbers b/Lang/FreeBASIC/Zumkeller-numbers deleted file mode 120000 index 6994043985..0000000000 --- a/Lang/FreeBASIC/Zumkeller-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zumkeller-numbers/FreeBASIC \ No newline at end of file diff --git a/Lang/Frink/24-game b/Lang/Frink/24-game deleted file mode 120000 index 843d6f51e2..0000000000 --- a/Lang/Frink/24-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game/Frink \ No newline at end of file diff --git a/Lang/Frink/Averages-Root-mean-square b/Lang/Frink/Averages-Root-mean-square deleted file mode 120000 index 5ccaff432e..0000000000 --- a/Lang/Frink/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/Frink \ No newline at end of file diff --git a/Lang/Frink/Blum-integer b/Lang/Frink/Blum-integer deleted file mode 120000 index 51dea63ee5..0000000000 --- a/Lang/Frink/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/Frink \ No newline at end of file diff --git a/Lang/Frink/Combinations b/Lang/Frink/Combinations deleted file mode 120000 index ca07ce8ac3..0000000000 --- a/Lang/Frink/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/Frink \ No newline at end of file diff --git a/Lang/Frink/Disarium-numbers b/Lang/Frink/Disarium-numbers deleted file mode 120000 index 30da6e89d2..0000000000 --- a/Lang/Frink/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/Frink \ No newline at end of file diff --git a/Lang/Frink/Entropy b/Lang/Frink/Entropy deleted file mode 120000 index 686a6c7be3..0000000000 --- a/Lang/Frink/Entropy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy/Frink \ No newline at end of file diff --git a/Lang/Frink/Factorial-primes b/Lang/Frink/Factorial-primes deleted file mode 120000 index 704a6876ac..0000000000 --- a/Lang/Frink/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Frink \ No newline at end of file diff --git a/Lang/Frink/Find-palindromic-numbers-in-both-binary-and-ternary-bases b/Lang/Frink/Find-palindromic-numbers-in-both-binary-and-ternary-bases deleted file mode 120000 index 8a6a61669b..0000000000 --- a/Lang/Frink/Find-palindromic-numbers-in-both-binary-and-ternary-bases +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-palindromic-numbers-in-both-binary-and-ternary-bases/Frink \ No newline at end of file diff --git a/Lang/Frink/Floyds-triangle b/Lang/Frink/Floyds-triangle deleted file mode 120000 index 993ee6e3c2..0000000000 --- a/Lang/Frink/Floyds-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyds-triangle/Frink \ No newline at end of file diff --git a/Lang/Frink/Happy-numbers b/Lang/Frink/Happy-numbers deleted file mode 120000 index e83b081fcc..0000000000 --- a/Lang/Frink/Happy-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Happy-numbers/Frink \ No newline at end of file diff --git a/Lang/Frink/Knapsack-problem-0-1 b/Lang/Frink/Knapsack-problem-0-1 deleted file mode 120000 index ae292bd7e7..0000000000 --- a/Lang/Frink/Knapsack-problem-0-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-0-1/Frink \ No newline at end of file diff --git a/Lang/Frink/Knapsack-problem-Bounded b/Lang/Frink/Knapsack-problem-Bounded deleted file mode 120000 index 52649c831e..0000000000 --- a/Lang/Frink/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/Frink \ No newline at end of file diff --git a/Lang/Frink/Order-two-numerical-lists b/Lang/Frink/Order-two-numerical-lists deleted file mode 120000 index 7daa415aeb..0000000000 --- a/Lang/Frink/Order-two-numerical-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-two-numerical-lists/Frink \ No newline at end of file diff --git a/Lang/Frink/Palindrome-dates b/Lang/Frink/Palindrome-dates deleted file mode 120000 index 9b0bf86617..0000000000 --- a/Lang/Frink/Palindrome-dates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-dates/Frink \ No newline at end of file diff --git a/Lang/Frink/Search-a-list b/Lang/Frink/Search-a-list deleted file mode 120000 index 71db52cc8c..0000000000 --- a/Lang/Frink/Search-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list/Frink \ No newline at end of file diff --git a/Lang/Frink/Smith-numbers b/Lang/Frink/Smith-numbers deleted file mode 120000 index 368b2f0d50..0000000000 --- a/Lang/Frink/Smith-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smith-numbers/Frink \ No newline at end of file diff --git a/Lang/Frink/Square-free-integers b/Lang/Frink/Square-free-integers deleted file mode 120000 index 23755894dd..0000000000 --- a/Lang/Frink/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/Frink \ No newline at end of file diff --git a/Lang/Frink/String-matching b/Lang/Frink/String-matching deleted file mode 120000 index f56424a6a3..0000000000 --- a/Lang/Frink/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/Frink \ No newline at end of file diff --git a/Lang/FunL/Miller-Rabin-primality-test b/Lang/FunL/Miller-Rabin-primality-test new file mode 120000 index 0000000000..592d9059fa --- /dev/null +++ b/Lang/FunL/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/FunL \ No newline at end of file diff --git a/Lang/FuncSug/00-LANG.txt b/Lang/FuncSug/00-LANG.txt deleted file mode 100644 index 9239e3a1ef..0000000000 --- a/Lang/FuncSug/00-LANG.txt +++ /dev/null @@ -1 +0,0 @@ -{{stub}}{{language|FuncSug}} \ No newline at end of file diff --git a/Lang/FuncSug/00-META.yaml b/Lang/FuncSug/00-META.yaml deleted file mode 100644 index 0613d9bea7..0000000000 --- a/Lang/FuncSug/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:FuncSug diff --git a/Lang/FuncSug/15-puzzle-game b/Lang/FuncSug/15-puzzle-game deleted file mode 120000 index 76eb121586..0000000000 --- a/Lang/FuncSug/15-puzzle-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-game/FuncSug \ No newline at end of file diff --git a/Lang/FuncSug/GUI-component-interaction b/Lang/FuncSug/GUI-component-interaction deleted file mode 120000 index 744e9aac1b..0000000000 --- a/Lang/FuncSug/GUI-component-interaction +++ /dev/null @@ -1 +0,0 @@ -../../Task/GUI-component-interaction/FuncSug \ No newline at end of file diff --git a/Lang/FuncSug/GUI-enabling-disabling-of-controls b/Lang/FuncSug/GUI-enabling-disabling-of-controls deleted file mode 120000 index 049595483a..0000000000 --- a/Lang/FuncSug/GUI-enabling-disabling-of-controls +++ /dev/null @@ -1 +0,0 @@ -../../Task/GUI-enabling-disabling-of-controls/FuncSug \ No newline at end of file diff --git a/Lang/FuncSug/Hello-world-Text b/Lang/FuncSug/Hello-world-Text deleted file mode 120000 index f188530df7..0000000000 --- a/Lang/FuncSug/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/FuncSug \ No newline at end of file diff --git a/Lang/FuncSug/Play-recorded-sounds b/Lang/FuncSug/Play-recorded-sounds deleted file mode 120000 index 9418947577..0000000000 --- a/Lang/FuncSug/Play-recorded-sounds +++ /dev/null @@ -1 +0,0 @@ -../../Task/Play-recorded-sounds/FuncSug \ No newline at end of file diff --git a/Lang/FuncSug/Simple-windowed-application b/Lang/FuncSug/Simple-windowed-application deleted file mode 120000 index 8eec686bff..0000000000 --- a/Lang/FuncSug/Simple-windowed-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-windowed-application/FuncSug \ No newline at end of file diff --git a/Lang/FuncSug/Simulate-input-Mouse b/Lang/FuncSug/Simulate-input-Mouse deleted file mode 120000 index 186d49bf08..0000000000 --- a/Lang/FuncSug/Simulate-input-Mouse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simulate-input-Mouse/FuncSug \ No newline at end of file diff --git a/Lang/FuncSug/User-input-Graphical b/Lang/FuncSug/User-input-Graphical deleted file mode 120000 index b685a2412e..0000000000 --- a/Lang/FuncSug/User-input-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Graphical/FuncSug \ No newline at end of file diff --git a/Lang/FutureBasic/00-LANG.txt b/Lang/FutureBasic/00-LANG.txt index 36f5f0b065..d3dbdba2ec 100644 --- a/Lang/FutureBasic/00-LANG.txt +++ b/Lang/FutureBasic/00-LANG.txt @@ -12,11 +12,7 @@ [[File:FutureBasicIcon.png|64px|top]] -FutureBasic — commonly called FB by its users — is a robust freeware Macintosh IDE. - -It began life as Zbasic, a commercial variant of [[BASIC]] for the early Macintoshes, but has grown far beyond that into a mature IDE compatible with the latest macOSes. Through its FBtoC translator, it can be used to compile C and Objective-C [[object-oriented]] code. It uses the industry-standard clang compiler included with an Xcode installation. - -FB is excellent as a educational tool, for fast prototyping and for commercial application development. In addition to its native language, it can incorporate C and Objective-C (Cocoa) for those who prefer programmatic code without the overhead of Xcode. It is compatible with Xcode nib and xib files used for building GUIs. Among its enthusiasts are commercial developers, engineers, professors, doctors, musicians, writers and a host of amateurs who program with FB for the sheer joy of it. +FutureBasic began life as Zbasic, a commercial variant of [[BASIC]] for the early Macintoshes, but has grown far beyond that into a mature freeware IDE that, through its FBtoC translator, can be used to compile C and Objective-C [[object-oriented]] code using the clang compiler included with an Xcode installation. It is excellent as a educational tool and for fast prototyping -- especially in Objective-C (Cocoa) by those who prefer programmatic code without the overhead of Xcode. Among its enthusiasts are commercial developers, engineers, professors, doctors, musicians, writers and a host of amateurs who program with FB for the sheer joy of it. == FutureBasic Home Page & Download == @@ -68,11 +64,11 @@ In 1995 Staz Software, led by Chris Stasny based in Diamondhead, Miss., acquired When Apple transitioned the Mac from 68k to PowerPC, the FB editor was rewritten by Stasny and was coupled with an adaptation of the compiler by Andy Gariepy. The result of their efforts, a dramatically enhanced IDE called FB^3 (FB-cubed) was released in September 1999. -Major update releases introduced a full-featured Appearance Compliant runtime written by the late New Zealander Robert Purves renowned for his brilliant programming. Once completely carbonized to run natively on the Mac OS X, the FutureBASIC Integrated Development Environment (FB IDE) was called FB4 and released in July 2004. +Major update releases introduced a full-featured Appearance Compliant runtime written by the late New Zealander Robert Purves renown for his brilliant programming. Once completely carbonized to run natively on the Mac OS X, the FutureBASIC Integrated Development Environment (FB IDE) was called FB4 and released in July 2004. In August 2005, Staz Software was devastated by Hurricane Katrina just at the time Apple was transitioning from Motorola PPC microprocessors to Intel chips. FB development slowed almost to a standstill. On January 1, 2008, Staz Software announced that FB would henceforth be freeware and FB4 with FBtoC 1.0 was made available. -Since that time, an independent team of volunteer developers initially led by Purves continued to improve FBtoC, which took code produced by the FB Editor and translated it to C for processing by gcc which was eventually transitioned to the more robust clang. +Since that time, an independent team of volunteer developers initially lead by Purves continued to improve FBtoC, which took code produced by the FB Editor and translated it to C for processing by gcc which was eventually transitioned to the more robust clang. On Sunday, June 3, 2012, members of the FB List Serve were notified that Robert Purves had died after a long bout with cancer. The news came as a surprise to many FB developers who were unaware of Purves' illness. While coping with cancer, he continued as an active member of the FB community, improving FB, answering questions, solving problems, and posting exquisitely terse code often salted with pithy remarks from his wonderfully dry humor. He never mentioned his health problems and never complained. A tribute to Purves can be found at the bottom of the FB Home Page diff --git a/Lang/FutureBasic/15-puzzle-solver b/Lang/FutureBasic/15-puzzle-solver deleted file mode 120000 index db2f936a7e..0000000000 --- a/Lang/FutureBasic/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/24-game b/Lang/FutureBasic/24-game deleted file mode 120000 index f1ea3d0684..0000000000 --- a/Lang/FutureBasic/24-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/9-billion-names-of-God-the-integer b/Lang/FutureBasic/9-billion-names-of-God-the-integer deleted file mode 120000 index 2c2322b6ea..0000000000 --- a/Lang/FutureBasic/9-billion-names-of-God-the-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/9-billion-names-of-God-the-integer/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/ADFGVX-cipher b/Lang/FutureBasic/ADFGVX-cipher deleted file mode 120000 index e5f0c8a31e..0000000000 --- a/Lang/FutureBasic/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/AKS-test-for-primes b/Lang/FutureBasic/AKS-test-for-primes deleted file mode 120000 index d7fcaa6502..0000000000 --- a/Lang/FutureBasic/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/ASCII-art-diagram-converter b/Lang/FutureBasic/ASCII-art-diagram-converter deleted file mode 120000 index cb5711ff54..0000000000 --- a/Lang/FutureBasic/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Achilles-numbers b/Lang/FutureBasic/Achilles-numbers deleted file mode 120000 index a912859c01..0000000000 --- a/Lang/FutureBasic/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Aliquot-sequence-classifications b/Lang/FutureBasic/Aliquot-sequence-classifications deleted file mode 120000 index d24c82afdc..0000000000 --- a/Lang/FutureBasic/Aliquot-sequence-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Aliquot-sequence-classifications/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Almkvist-Giullera-formula-for-pi b/Lang/FutureBasic/Almkvist-Giullera-formula-for-pi deleted file mode 120000 index 0079b2eae5..0000000000 --- a/Lang/FutureBasic/Almkvist-Giullera-formula-for-pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almkvist-Giullera-formula-for-pi/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Amb b/Lang/FutureBasic/Amb deleted file mode 120000 index 399b8a70d5..0000000000 --- a/Lang/FutureBasic/Amb +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amb/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Angles-geometric-normalization-and-conversion b/Lang/FutureBasic/Angles-geometric-normalization-and-conversion deleted file mode 120000 index 63c4e835a4..0000000000 --- a/Lang/FutureBasic/Angles-geometric-normalization-and-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angles-geometric-normalization-and-conversion/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Anonymous-recursion b/Lang/FutureBasic/Anonymous-recursion deleted file mode 120000 index d52f4bbda0..0000000000 --- a/Lang/FutureBasic/Anonymous-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anonymous-recursion/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Arbitrary-precision-integers-included- b/Lang/FutureBasic/Arbitrary-precision-integers-included- deleted file mode 120000 index ca9deb04e2..0000000000 --- a/Lang/FutureBasic/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Arithmetic-Complex b/Lang/FutureBasic/Arithmetic-Complex deleted file mode 120000 index eab72eafe1..0000000000 --- a/Lang/FutureBasic/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Arithmetic-Rational b/Lang/FutureBasic/Arithmetic-Rational deleted file mode 120000 index 4ba3750b0f..0000000000 --- a/Lang/FutureBasic/Arithmetic-Rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Rational/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Arithmetic-derivative b/Lang/FutureBasic/Arithmetic-derivative deleted file mode 120000 index 4b54c16b3d..0000000000 --- a/Lang/FutureBasic/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Arithmetic-geometric-mean b/Lang/FutureBasic/Arithmetic-geometric-mean deleted file mode 120000 index 2894f4733f..0000000000 --- a/Lang/FutureBasic/Arithmetic-geometric-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Assertions b/Lang/FutureBasic/Assertions deleted file mode 120000 index 6270ababb4..0000000000 --- a/Lang/FutureBasic/Assertions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Assertions/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Averages-Mean-angle b/Lang/FutureBasic/Averages-Mean-angle deleted file mode 120000 index 45c7d861f6..0000000000 --- a/Lang/FutureBasic/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Averages-Mean-time-of-day b/Lang/FutureBasic/Averages-Mean-time-of-day deleted file mode 120000 index 0caef5a9a0..0000000000 --- a/Lang/FutureBasic/Averages-Mean-time-of-day +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-time-of-day/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Averages-Root-mean-square b/Lang/FutureBasic/Averages-Root-mean-square deleted file mode 120000 index f04b81a3b0..0000000000 --- a/Lang/FutureBasic/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Barnsley-fern b/Lang/FutureBasic/Barnsley-fern deleted file mode 120000 index a6da4c722a..0000000000 --- a/Lang/FutureBasic/Barnsley-fern +++ /dev/null @@ -1 +0,0 @@ -../../Task/Barnsley-fern/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Bernoulli-numbers b/Lang/FutureBasic/Bernoulli-numbers deleted file mode 120000 index 3ed522958e..0000000000 --- a/Lang/FutureBasic/Bernoulli-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bernoulli-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Bin-given-limits b/Lang/FutureBasic/Bin-given-limits deleted file mode 120000 index 6397588001..0000000000 --- a/Lang/FutureBasic/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Binary-search b/Lang/FutureBasic/Binary-search deleted file mode 120000 index 55e96bcbd8..0000000000 --- a/Lang/FutureBasic/Binary-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-search/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Bioinformatics-base-count b/Lang/FutureBasic/Bioinformatics-base-count new file mode 120000 index 0000000000..8f826b0063 --- /dev/null +++ b/Lang/FutureBasic/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Biorhythms b/Lang/FutureBasic/Biorhythms deleted file mode 120000 index db55b5c43b..0000000000 --- a/Lang/FutureBasic/Biorhythms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Biorhythms/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Bitmap b/Lang/FutureBasic/Bitmap deleted file mode 120000 index 5e3f607822..0000000000 --- a/Lang/FutureBasic/Bitmap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Bitmap-B-zier-curves-Cubic b/Lang/FutureBasic/Bitmap-B-zier-curves-Cubic deleted file mode 120000 index 743bf83068..0000000000 --- a/Lang/FutureBasic/Bitmap-B-zier-curves-Cubic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-B-zier-curves-Cubic/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Blum-integer b/Lang/FutureBasic/Blum-integer deleted file mode 120000 index 0ccbf69775..0000000000 --- a/Lang/FutureBasic/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Box-the-compass b/Lang/FutureBasic/Box-the-compass deleted file mode 120000 index 7b89a8413c..0000000000 --- a/Lang/FutureBasic/Box-the-compass +++ /dev/null @@ -1 +0,0 @@ -../../Task/Box-the-compass/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Boyer-Moore-string-search b/Lang/FutureBasic/Boyer-Moore-string-search deleted file mode 120000 index 574c899ddd..0000000000 --- a/Lang/FutureBasic/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Brazilian-numbers b/Lang/FutureBasic/Brazilian-numbers deleted file mode 120000 index ea4e519da9..0000000000 --- a/Lang/FutureBasic/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Brilliant-numbers b/Lang/FutureBasic/Brilliant-numbers deleted file mode 120000 index 0ee49e027a..0000000000 --- a/Lang/FutureBasic/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Brownian-tree b/Lang/FutureBasic/Brownian-tree deleted file mode 120000 index 26e06861c7..0000000000 --- a/Lang/FutureBasic/Brownian-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brownian-tree/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/CRC-32 b/Lang/FutureBasic/CRC-32 deleted file mode 120000 index 8330772d04..0000000000 --- a/Lang/FutureBasic/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Caesar-cipher b/Lang/FutureBasic/Caesar-cipher deleted file mode 120000 index c0196256fa..0000000000 --- a/Lang/FutureBasic/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Canonicalize-CIDR b/Lang/FutureBasic/Canonicalize-CIDR deleted file mode 120000 index 77fabb43fd..0000000000 --- a/Lang/FutureBasic/Canonicalize-CIDR +++ /dev/null @@ -1 +0,0 @@ -../../Task/Canonicalize-CIDR/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Carmichael-3-strong-pseudoprimes b/Lang/FutureBasic/Carmichael-3-strong-pseudoprimes deleted file mode 120000 index 17664f9781..0000000000 --- a/Lang/FutureBasic/Carmichael-3-strong-pseudoprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Carmichael-3-strong-pseudoprimes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Catalan-numbers-Pascals-triangle b/Lang/FutureBasic/Catalan-numbers-Pascals-triangle deleted file mode 120000 index 48a5bd3f8b..0000000000 --- a/Lang/FutureBasic/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Catamorphism b/Lang/FutureBasic/Catamorphism deleted file mode 120000 index 25e6699616..0000000000 --- a/Lang/FutureBasic/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Check-output-device-is-a-terminal b/Lang/FutureBasic/Check-output-device-is-a-terminal deleted file mode 120000 index e2e8c9c4eb..0000000000 --- a/Lang/FutureBasic/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Chinese-remainder-theorem b/Lang/FutureBasic/Chinese-remainder-theorem deleted file mode 120000 index 2cdd3a4f64..0000000000 --- a/Lang/FutureBasic/Chinese-remainder-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-remainder-theorem/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Chinese-zodiac b/Lang/FutureBasic/Chinese-zodiac deleted file mode 120000 index df6e098031..0000000000 --- a/Lang/FutureBasic/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Colorful-numbers b/Lang/FutureBasic/Colorful-numbers deleted file mode 120000 index f9f2dd43bc..0000000000 --- a/Lang/FutureBasic/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Combinations b/Lang/FutureBasic/Combinations deleted file mode 120000 index d7395ea4d1..0000000000 --- a/Lang/FutureBasic/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Command-line-arguments b/Lang/FutureBasic/Command-line-arguments deleted file mode 120000 index 2926af8716..0000000000 --- a/Lang/FutureBasic/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Compile-time-calculation b/Lang/FutureBasic/Compile-time-calculation deleted file mode 120000 index ef10ff644e..0000000000 --- a/Lang/FutureBasic/Compile-time-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compile-time-calculation/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k b/Lang/FutureBasic/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k deleted file mode 120000 index 2fbac26654..0000000000 --- a/Lang/FutureBasic/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k +++ /dev/null @@ -1 +0,0 @@ -../../Task/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Consecutive-primes-with-ascending-or-descending-differences b/Lang/FutureBasic/Consecutive-primes-with-ascending-or-descending-differences deleted file mode 120000 index ca47092ad1..0000000000 --- a/Lang/FutureBasic/Consecutive-primes-with-ascending-or-descending-differences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Consecutive-primes-with-ascending-or-descending-differences/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Constrained-random-points-on-a-circle b/Lang/FutureBasic/Constrained-random-points-on-a-circle deleted file mode 120000 index db1c784250..0000000000 --- a/Lang/FutureBasic/Constrained-random-points-on-a-circle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Constrained-random-points-on-a-circle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Continued-fraction-Arithmetic-Construct-from-rational-number b/Lang/FutureBasic/Continued-fraction-Arithmetic-Construct-from-rational-number deleted file mode 120000 index fa25a1c542..0000000000 --- a/Lang/FutureBasic/Continued-fraction-Arithmetic-Construct-from-rational-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-Construct-from-rational-number/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Copy-stdin-to-stdout b/Lang/FutureBasic/Copy-stdin-to-stdout deleted file mode 120000 index 9a5df43082..0000000000 --- a/Lang/FutureBasic/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Cuban-primes b/Lang/FutureBasic/Cuban-primes deleted file mode 120000 index 3b2980081c..0000000000 --- a/Lang/FutureBasic/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Cumulative-standard-deviation b/Lang/FutureBasic/Cumulative-standard-deviation deleted file mode 120000 index e51653c2b1..0000000000 --- a/Lang/FutureBasic/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Curzon-numbers b/Lang/FutureBasic/Curzon-numbers deleted file mode 120000 index bcd7e577f6..0000000000 --- a/Lang/FutureBasic/Curzon-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Curzon-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Damm-algorithm b/Lang/FutureBasic/Damm-algorithm deleted file mode 120000 index 1a53ae4466..0000000000 --- a/Lang/FutureBasic/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Deal-cards-for-FreeCell b/Lang/FutureBasic/Deal-cards-for-FreeCell deleted file mode 120000 index b84bfb771c..0000000000 --- a/Lang/FutureBasic/Deal-cards-for-FreeCell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deal-cards-for-FreeCell/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Death-Star b/Lang/FutureBasic/Death-Star deleted file mode 120000 index 6a87d38224..0000000000 --- a/Lang/FutureBasic/Death-Star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Death-Star/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Deceptive-numbers b/Lang/FutureBasic/Deceptive-numbers deleted file mode 120000 index 82f50bcc9e..0000000000 --- a/Lang/FutureBasic/Deceptive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deceptive-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Demings-funnel b/Lang/FutureBasic/Demings-funnel deleted file mode 120000 index a0b916f84d..0000000000 --- a/Lang/FutureBasic/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Determine-if-a-string-has-all-the-same-characters b/Lang/FutureBasic/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 94f004e3ea..0000000000 --- a/Lang/FutureBasic/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Determine-if-a-string-is-squeezable b/Lang/FutureBasic/Determine-if-a-string-is-squeezable deleted file mode 120000 index 3b259327b7..0000000000 --- a/Lang/FutureBasic/Determine-if-a-string-is-squeezable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-squeezable/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Determine-if-only-one-instance-is-running b/Lang/FutureBasic/Determine-if-only-one-instance-is-running deleted file mode 120000 index e3fa96a5b5..0000000000 --- a/Lang/FutureBasic/Determine-if-only-one-instance-is-running +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-only-one-instance-is-running/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Determine-if-two-triangles-overlap b/Lang/FutureBasic/Determine-if-two-triangles-overlap deleted file mode 120000 index 40f32b74b7..0000000000 --- a/Lang/FutureBasic/Determine-if-two-triangles-overlap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-two-triangles-overlap/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Determine-sentence-type b/Lang/FutureBasic/Determine-sentence-type deleted file mode 120000 index fce2322962..0000000000 --- a/Lang/FutureBasic/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Digital-root b/Lang/FutureBasic/Digital-root deleted file mode 120000 index 63da54faf1..0000000000 --- a/Lang/FutureBasic/Digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Dinesmans-multiple-dwelling-problem b/Lang/FutureBasic/Dinesmans-multiple-dwelling-problem deleted file mode 120000 index cdb0294902..0000000000 --- a/Lang/FutureBasic/Dinesmans-multiple-dwelling-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dinesmans-multiple-dwelling-problem/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Distribution-of-0-digits-in-factorial-series b/Lang/FutureBasic/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index 2e525770b5..0000000000 --- a/Lang/FutureBasic/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Diversity-prediction-theorem b/Lang/FutureBasic/Diversity-prediction-theorem deleted file mode 120000 index 75ad65e089..0000000000 --- a/Lang/FutureBasic/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Doubly-linked-list-Definition b/Lang/FutureBasic/Doubly-linked-list-Definition deleted file mode 120000 index dbb3fa0478..0000000000 --- a/Lang/FutureBasic/Doubly-linked-list-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Definition/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Dutch-national-flag-problem b/Lang/FutureBasic/Dutch-national-flag-problem deleted file mode 120000 index a769d7e0d9..0000000000 --- a/Lang/FutureBasic/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Eban-numbers b/Lang/FutureBasic/Eban-numbers deleted file mode 120000 index 2ae3f59434..0000000000 --- a/Lang/FutureBasic/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Echo-server b/Lang/FutureBasic/Echo-server deleted file mode 120000 index 25d59262e7..0000000000 --- a/Lang/FutureBasic/Echo-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Echo-server/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Eertree b/Lang/FutureBasic/Eertree deleted file mode 120000 index f3374493cf..0000000000 --- a/Lang/FutureBasic/Eertree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eertree/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Egyptian-division b/Lang/FutureBasic/Egyptian-division deleted file mode 120000 index 5961af2842..0000000000 --- a/Lang/FutureBasic/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Entropy b/Lang/FutureBasic/Entropy deleted file mode 120000 index 6336540906..0000000000 --- a/Lang/FutureBasic/Entropy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Equilibrium-index b/Lang/FutureBasic/Equilibrium-index deleted file mode 120000 index 92d577887f..0000000000 --- a/Lang/FutureBasic/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Euclid-Mullin-sequence b/Lang/FutureBasic/Euclid-Mullin-sequence deleted file mode 120000 index 20745da07c..0000000000 --- a/Lang/FutureBasic/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Euler-method b/Lang/FutureBasic/Euler-method deleted file mode 120000 index 89a7e85a03..0000000000 --- a/Lang/FutureBasic/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Evaluate-binomial-coefficients b/Lang/FutureBasic/Evaluate-binomial-coefficients deleted file mode 120000 index 59e49028f9..0000000000 --- a/Lang/FutureBasic/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Evolutionary-algorithm b/Lang/FutureBasic/Evolutionary-algorithm deleted file mode 120000 index 6ad9576429..0000000000 --- a/Lang/FutureBasic/Evolutionary-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evolutionary-algorithm/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Exceptions b/Lang/FutureBasic/Exceptions deleted file mode 120000 index 0e25a15f85..0000000000 --- a/Lang/FutureBasic/Exceptions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exceptions/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Exceptions-Catch-an-exception-thrown-in-a-nested-call b/Lang/FutureBasic/Exceptions-Catch-an-exception-thrown-in-a-nested-call deleted file mode 120000 index fd7f3bd9e7..0000000000 --- a/Lang/FutureBasic/Exceptions-Catch-an-exception-thrown-in-a-nested-call +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exceptions-Catch-an-exception-thrown-in-a-nested-call/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/FASTA-format b/Lang/FutureBasic/FASTA-format deleted file mode 120000 index 739187f0ef..0000000000 --- a/Lang/FutureBasic/FASTA-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/FASTA-format/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Factors-of-a-Mersenne-number b/Lang/FutureBasic/Factors-of-a-Mersenne-number deleted file mode 120000 index c65e3bfb3a..0000000000 --- a/Lang/FutureBasic/Factors-of-a-Mersenne-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-a-Mersenne-number/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Fermat-numbers b/Lang/FutureBasic/Fermat-numbers deleted file mode 120000 index 2c5c3120a2..0000000000 --- a/Lang/FutureBasic/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Fibonacci-n-step-number-sequences b/Lang/FutureBasic/Fibonacci-n-step-number-sequences deleted file mode 120000 index 4131a2e05b..0000000000 --- a/Lang/FutureBasic/Fibonacci-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-n-step-number-sequences/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Fibonacci-word b/Lang/FutureBasic/Fibonacci-word deleted file mode 120000 index c773eeed44..0000000000 --- a/Lang/FutureBasic/Fibonacci-word +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-word/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Find-limit-of-recursion b/Lang/FutureBasic/Find-limit-of-recursion deleted file mode 120000 index cbc1e3a568..0000000000 --- a/Lang/FutureBasic/Find-limit-of-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-limit-of-recursion/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Find-the-missing-permutation b/Lang/FutureBasic/Find-the-missing-permutation deleted file mode 120000 index 83f97c5dbb..0000000000 --- a/Lang/FutureBasic/Find-the-missing-permutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-missing-permutation/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Five-weekends b/Lang/FutureBasic/Five-weekends deleted file mode 120000 index d11a92b953..0000000000 --- a/Lang/FutureBasic/Five-weekends +++ /dev/null @@ -1 +0,0 @@ -../../Task/Five-weekends/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Flipping-bits-game b/Lang/FutureBasic/Flipping-bits-game deleted file mode 120000 index 439479c614..0000000000 --- a/Lang/FutureBasic/Flipping-bits-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flipping-bits-game/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Flow-control-structures b/Lang/FutureBasic/Flow-control-structures deleted file mode 120000 index 47305c16bf..0000000000 --- a/Lang/FutureBasic/Flow-control-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flow-control-structures/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Floyds-triangle b/Lang/FutureBasic/Floyds-triangle deleted file mode 120000 index 134b2be232..0000000000 --- a/Lang/FutureBasic/Floyds-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyds-triangle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Forest-fire b/Lang/FutureBasic/Forest-fire deleted file mode 120000 index 5ed21f66e0..0000000000 --- a/Lang/FutureBasic/Forest-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Forest-fire/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Forward-difference b/Lang/FutureBasic/Forward-difference deleted file mode 120000 index 8669b1c1f5..0000000000 --- a/Lang/FutureBasic/Forward-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Forward-difference/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Function-composition b/Lang/FutureBasic/Function-composition deleted file mode 120000 index 363444c694..0000000000 --- a/Lang/FutureBasic/Function-composition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-composition/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Function-prototype b/Lang/FutureBasic/Function-prototype deleted file mode 120000 index 00a31e111b..0000000000 --- a/Lang/FutureBasic/Function-prototype +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-prototype/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Fusc-sequence b/Lang/FutureBasic/Fusc-sequence deleted file mode 120000 index 603bccf327..0000000000 --- a/Lang/FutureBasic/Fusc-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fusc-sequence/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Gamma-function b/Lang/FutureBasic/Gamma-function deleted file mode 120000 index fbf1cf8878..0000000000 --- a/Lang/FutureBasic/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Gaussian-elimination b/Lang/FutureBasic/Gaussian-elimination deleted file mode 120000 index f8adccdee8..0000000000 --- a/Lang/FutureBasic/Gaussian-elimination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gaussian-elimination/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Go-Fish b/Lang/FutureBasic/Go-Fish deleted file mode 120000 index cc2210d25a..0000000000 --- a/Lang/FutureBasic/Go-Fish +++ /dev/null @@ -1 +0,0 @@ -../../Task/Go-Fish/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Golden-ratio-Convergence b/Lang/FutureBasic/Golden-ratio-Convergence deleted file mode 120000 index 2807889e38..0000000000 --- a/Lang/FutureBasic/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Gray-code b/Lang/FutureBasic/Gray-code deleted file mode 120000 index 5eafcaba04..0000000000 --- a/Lang/FutureBasic/Gray-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gray-code/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Greatest-subsequential-sum b/Lang/FutureBasic/Greatest-subsequential-sum deleted file mode 120000 index cf9f89b8cf..0000000000 --- a/Lang/FutureBasic/Greatest-subsequential-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-subsequential-sum/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Greedy-algorithm-for-Egyptian-fractions b/Lang/FutureBasic/Greedy-algorithm-for-Egyptian-fractions deleted file mode 120000 index 65dad8fc47..0000000000 --- a/Lang/FutureBasic/Greedy-algorithm-for-Egyptian-fractions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greedy-algorithm-for-Egyptian-fractions/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Guess-the-number-With-feedback-player- b/Lang/FutureBasic/Guess-the-number-With-feedback-player- deleted file mode 120000 index 0ee5d26b61..0000000000 --- a/Lang/FutureBasic/Guess-the-number-With-feedback-player- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number-With-feedback-player-/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/HTTPS-Authenticated b/Lang/FutureBasic/HTTPS-Authenticated deleted file mode 120000 index 9edb1d8326..0000000000 --- a/Lang/FutureBasic/HTTPS-Authenticated +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS-Authenticated/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Halt-and-catch-fire b/Lang/FutureBasic/Halt-and-catch-fire deleted file mode 120000 index d78c73210e..0000000000 --- a/Lang/FutureBasic/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Hamming-numbers b/Lang/FutureBasic/Hamming-numbers deleted file mode 120000 index 69b0f1ea7d..0000000000 --- a/Lang/FutureBasic/Hamming-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hamming-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Hello-world-Standard-error b/Lang/FutureBasic/Hello-world-Standard-error deleted file mode 120000 index 326ae936a9..0000000000 --- a/Lang/FutureBasic/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Here-document b/Lang/FutureBasic/Here-document deleted file mode 120000 index 44b4edadd8..0000000000 --- a/Lang/FutureBasic/Here-document +++ /dev/null @@ -1 +0,0 @@ -../../Task/Here-document/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Hickerson-series-of-almost-integers b/Lang/FutureBasic/Hickerson-series-of-almost-integers deleted file mode 120000 index 22531fa967..0000000000 --- a/Lang/FutureBasic/Hickerson-series-of-almost-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hickerson-series-of-almost-integers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Hofstadter-Q-sequence b/Lang/FutureBasic/Hofstadter-Q-sequence deleted file mode 120000 index bb38370ecf..0000000000 --- a/Lang/FutureBasic/Hofstadter-Q-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Q-sequence/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Home-primes b/Lang/FutureBasic/Home-primes deleted file mode 120000 index 4744c5ec64..0000000000 --- a/Lang/FutureBasic/Home-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Home-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Honeycombs b/Lang/FutureBasic/Honeycombs deleted file mode 120000 index 306c30d982..0000000000 --- a/Lang/FutureBasic/Honeycombs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Honeycombs/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Host-introspection b/Lang/FutureBasic/Host-introspection deleted file mode 120000 index c342a7333a..0000000000 --- a/Lang/FutureBasic/Host-introspection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Host-introspection/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Hunt-the-Wumpus b/Lang/FutureBasic/Hunt-the-Wumpus deleted file mode 120000 index 6ac2d19ea6..0000000000 --- a/Lang/FutureBasic/Hunt-the-Wumpus +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hunt-the-Wumpus/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/ISBN13-check-digit b/Lang/FutureBasic/ISBN13-check-digit deleted file mode 120000 index ad5e4cffb4..0000000000 --- a/Lang/FutureBasic/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Integer-overflow b/Lang/FutureBasic/Integer-overflow deleted file mode 120000 index 37f3cd9e93..0000000000 --- a/Lang/FutureBasic/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/JortSort b/Lang/FutureBasic/JortSort deleted file mode 120000 index a21b94121b..0000000000 --- a/Lang/FutureBasic/JortSort +++ /dev/null @@ -1 +0,0 @@ -../../Task/JortSort/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Josephus-problem b/Lang/FutureBasic/Josephus-problem deleted file mode 120000 index d84fa33d5d..0000000000 --- a/Lang/FutureBasic/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Juggler-sequence b/Lang/FutureBasic/Juggler-sequence deleted file mode 120000 index f39646025c..0000000000 --- a/Lang/FutureBasic/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Keyboard-input-Flush-the-keyboard-buffer b/Lang/FutureBasic/Keyboard-input-Flush-the-keyboard-buffer deleted file mode 120000 index 958993035a..0000000000 --- a/Lang/FutureBasic/Keyboard-input-Flush-the-keyboard-buffer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Flush-the-keyboard-buffer/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Largest-number-divisible-by-its-digits b/Lang/FutureBasic/Largest-number-divisible-by-its-digits deleted file mode 120000 index 3dcba1705b..0000000000 --- a/Lang/FutureBasic/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Last-Friday-of-each-month b/Lang/FutureBasic/Last-Friday-of-each-month deleted file mode 120000 index a3476e0672..0000000000 --- a/Lang/FutureBasic/Last-Friday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-Friday-of-each-month/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Last-letter-first-letter b/Lang/FutureBasic/Last-letter-first-letter deleted file mode 120000 index 82ed39c3f0..0000000000 --- a/Lang/FutureBasic/Last-letter-first-letter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-letter-first-letter/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Least-common-multiple b/Lang/FutureBasic/Least-common-multiple deleted file mode 120000 index 23b8dbfe57..0000000000 --- a/Lang/FutureBasic/Least-common-multiple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Least-common-multiple/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Left-factorials b/Lang/FutureBasic/Left-factorials deleted file mode 120000 index b771fa0031..0000000000 --- a/Lang/FutureBasic/Left-factorials +++ /dev/null @@ -1 +0,0 @@ -../../Task/Left-factorials/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Long-literals-with-continuations b/Lang/FutureBasic/Long-literals-with-continuations deleted file mode 120000 index 09dff817df..0000000000 --- a/Lang/FutureBasic/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Long-multiplication b/Lang/FutureBasic/Long-multiplication deleted file mode 120000 index cc3dd93634..0000000000 --- a/Lang/FutureBasic/Long-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-multiplication/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Long-year b/Lang/FutureBasic/Long-year deleted file mode 120000 index ae89f1d742..0000000000 --- a/Lang/FutureBasic/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Loops-Increment-loop-index-within-loop-body b/Lang/FutureBasic/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index ff81b810cd..0000000000 --- a/Lang/FutureBasic/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Lucas-Lehmer-test b/Lang/FutureBasic/Lucas-Lehmer-test deleted file mode 120000 index 0d48052ee1..0000000000 --- a/Lang/FutureBasic/Lucas-Lehmer-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lucas-Lehmer-test/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/MAC-vendor-lookup b/Lang/FutureBasic/MAC-vendor-lookup deleted file mode 120000 index 63a0a7c0b7..0000000000 --- a/Lang/FutureBasic/MAC-vendor-lookup +++ /dev/null @@ -1 +0,0 @@ -../../Task/MAC-vendor-lookup/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Magic-constant b/Lang/FutureBasic/Magic-constant deleted file mode 120000 index 1b88b55f67..0000000000 --- a/Lang/FutureBasic/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Man-or-boy-test b/Lang/FutureBasic/Man-or-boy-test deleted file mode 120000 index ffaf61719d..0000000000 --- a/Lang/FutureBasic/Man-or-boy-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Man-or-boy-test/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Mastermind b/Lang/FutureBasic/Mastermind deleted file mode 120000 index e02911b738..0000000000 --- a/Lang/FutureBasic/Mastermind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mastermind/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Matrix-digital-rain b/Lang/FutureBasic/Matrix-digital-rain deleted file mode 120000 index 26c9356719..0000000000 --- a/Lang/FutureBasic/Matrix-digital-rain +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-digital-rain/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Mayan-calendar b/Lang/FutureBasic/Mayan-calendar deleted file mode 120000 index 7b5f78ca25..0000000000 --- a/Lang/FutureBasic/Mayan-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-calendar/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Mayan-numerals b/Lang/FutureBasic/Mayan-numerals deleted file mode 120000 index cbc6204e00..0000000000 --- a/Lang/FutureBasic/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Minesweeper-game b/Lang/FutureBasic/Minesweeper-game deleted file mode 120000 index fdc515bbc6..0000000000 --- a/Lang/FutureBasic/Minesweeper-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minesweeper-game/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Minimum-multiple-of-m-where-digital-sum-equals-m b/Lang/FutureBasic/Minimum-multiple-of-m-where-digital-sum-equals-m deleted file mode 120000 index 088e4f56af..0000000000 --- a/Lang/FutureBasic/Minimum-multiple-of-m-where-digital-sum-equals-m +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minimum-multiple-of-m-where-digital-sum-equals-m/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Modular-inverse b/Lang/FutureBasic/Modular-inverse deleted file mode 120000 index 89556b3bbe..0000000000 --- a/Lang/FutureBasic/Modular-inverse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-inverse/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Monte-Carlo-methods b/Lang/FutureBasic/Monte-Carlo-methods deleted file mode 120000 index 729102269f..0000000000 --- a/Lang/FutureBasic/Monte-Carlo-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monte-Carlo-methods/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Monty-Hall-problem b/Lang/FutureBasic/Monty-Hall-problem deleted file mode 120000 index 0d9da7e7cc..0000000000 --- a/Lang/FutureBasic/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Multi-dimensional-array b/Lang/FutureBasic/Multi-dimensional-array deleted file mode 120000 index 89411e3bf7..0000000000 --- a/Lang/FutureBasic/Multi-dimensional-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-dimensional-array/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Munching-squares b/Lang/FutureBasic/Munching-squares deleted file mode 120000 index 3fb288f688..0000000000 --- a/Lang/FutureBasic/Munching-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munching-squares/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Mutex b/Lang/FutureBasic/Mutex deleted file mode 120000 index 027130dc63..0000000000 --- a/Lang/FutureBasic/Mutex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mutex/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/N-queens-problem b/Lang/FutureBasic/N-queens-problem deleted file mode 120000 index 68d9aebc8f..0000000000 --- a/Lang/FutureBasic/N-queens-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/N-queens-problem/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Named-parameters b/Lang/FutureBasic/Named-parameters deleted file mode 120000 index 77a79a818c..0000000000 --- a/Lang/FutureBasic/Named-parameters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Named-parameters/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Nim-game b/Lang/FutureBasic/Nim-game deleted file mode 120000 index edc10ed0c5..0000000000 --- a/Lang/FutureBasic/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Nth b/Lang/FutureBasic/Nth deleted file mode 120000 index 10c058fbd2..0000000000 --- a/Lang/FutureBasic/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Own-digits-power-sum b/Lang/FutureBasic/Own-digits-power-sum deleted file mode 120000 index 5cd998b558..0000000000 --- a/Lang/FutureBasic/Own-digits-power-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Own-digits-power-sum/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Palindrome-dates b/Lang/FutureBasic/Palindrome-dates deleted file mode 120000 index 2b72c0230b..0000000000 --- a/Lang/FutureBasic/Palindrome-dates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-dates/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Pascals-triangle b/Lang/FutureBasic/Pascals-triangle deleted file mode 120000 index 31e8218285..0000000000 --- a/Lang/FutureBasic/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Pascals-triangle-Puzzle b/Lang/FutureBasic/Pascals-triangle-Puzzle deleted file mode 120000 index 142f796d16..0000000000 --- a/Lang/FutureBasic/Pascals-triangle-Puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle-Puzzle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Pentagram b/Lang/FutureBasic/Pentagram deleted file mode 120000 index 036f2d484a..0000000000 --- a/Lang/FutureBasic/Pentagram +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pentagram/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Perfect-shuffle b/Lang/FutureBasic/Perfect-shuffle deleted file mode 120000 index 6d2e5e3668..0000000000 --- a/Lang/FutureBasic/Perfect-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-shuffle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Pinstripe-Display b/Lang/FutureBasic/Pinstripe-Display deleted file mode 120000 index da5d8bc2b0..0000000000 --- a/Lang/FutureBasic/Pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pinstripe-Display/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Playing-cards b/Lang/FutureBasic/Playing-cards deleted file mode 120000 index 965405f346..0000000000 --- a/Lang/FutureBasic/Playing-cards +++ /dev/null @@ -1 +0,0 @@ -../../Task/Playing-cards/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Poker-hand-analyser b/Lang/FutureBasic/Poker-hand-analyser deleted file mode 120000 index 35dd2acb93..0000000000 --- a/Lang/FutureBasic/Poker-hand-analyser +++ /dev/null @@ -1 +0,0 @@ -../../Task/Poker-hand-analyser/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Prime-conspiracy b/Lang/FutureBasic/Prime-conspiracy deleted file mode 120000 index 73d0f046b0..0000000000 --- a/Lang/FutureBasic/Prime-conspiracy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-conspiracy/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Prime-decomposition b/Lang/FutureBasic/Prime-decomposition deleted file mode 120000 index 16553faec7..0000000000 --- a/Lang/FutureBasic/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Pythagorean-triples b/Lang/FutureBasic/Pythagorean-triples deleted file mode 120000 index f0267047e8..0000000000 --- a/Lang/FutureBasic/Pythagorean-triples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagorean-triples/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Radical-of-an-integer b/Lang/FutureBasic/Radical-of-an-integer deleted file mode 120000 index 6713bbf881..0000000000 --- a/Lang/FutureBasic/Radical-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Radical-of-an-integer/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Range-expansion b/Lang/FutureBasic/Range-expansion deleted file mode 120000 index 9b92918178..0000000000 --- a/Lang/FutureBasic/Range-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-expansion/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Range-extraction b/Lang/FutureBasic/Range-extraction deleted file mode 120000 index 9a5f1d0533..0000000000 --- a/Lang/FutureBasic/Range-extraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-extraction/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Read-a-file-character-by-character-UTF8 b/Lang/FutureBasic/Read-a-file-character-by-character-UTF8 deleted file mode 120000 index beadc18b56..0000000000 --- a/Lang/FutureBasic/Read-a-file-character-by-character-UTF8 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-character-by-character-UTF8/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Read-a-file-line-by-line b/Lang/FutureBasic/Read-a-file-line-by-line deleted file mode 120000 index 43ff8334a4..0000000000 --- a/Lang/FutureBasic/Read-a-file-line-by-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-line-by-line/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Record-sound b/Lang/FutureBasic/Record-sound deleted file mode 120000 index 7ce89c688d..0000000000 --- a/Lang/FutureBasic/Record-sound +++ /dev/null @@ -1 +0,0 @@ -../../Task/Record-sound/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Regular-expressions b/Lang/FutureBasic/Regular-expressions deleted file mode 120000 index cd49461444..0000000000 --- a/Lang/FutureBasic/Regular-expressions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Regular-expressions/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Rep-string b/Lang/FutureBasic/Rep-string deleted file mode 120000 index 99b81bb2f4..0000000000 --- a/Lang/FutureBasic/Rep-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rep-string/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Repunit-primes b/Lang/FutureBasic/Repunit-primes deleted file mode 120000 index 366d1fc05e..0000000000 --- a/Lang/FutureBasic/Repunit-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repunit-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Resistor-mesh b/Lang/FutureBasic/Resistor-mesh deleted file mode 120000 index 318a1a0f13..0000000000 --- a/Lang/FutureBasic/Resistor-mesh +++ /dev/null @@ -1 +0,0 @@ -../../Task/Resistor-mesh/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/SEDOLs b/Lang/FutureBasic/SEDOLs deleted file mode 120000 index 87a0048d3a..0000000000 --- a/Lang/FutureBasic/SEDOLs +++ /dev/null @@ -1 +0,0 @@ -../../Task/SEDOLs/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/SHA-256 b/Lang/FutureBasic/SHA-256 deleted file mode 120000 index 0d14776e97..0000000000 --- a/Lang/FutureBasic/SHA-256 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-256/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Search-a-list-of-records b/Lang/FutureBasic/Search-a-list-of-records deleted file mode 120000 index 3fefc25b7b..0000000000 --- a/Lang/FutureBasic/Search-a-list-of-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list-of-records/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Semiprime b/Lang/FutureBasic/Semiprime deleted file mode 120000 index 71cf62e6e6..0000000000 --- a/Lang/FutureBasic/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Semordnilap b/Lang/FutureBasic/Semordnilap deleted file mode 120000 index 23f6715ad0..0000000000 --- a/Lang/FutureBasic/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sequence-of-primorial-primes b/Lang/FutureBasic/Sequence-of-primorial-primes deleted file mode 120000 index 9447c777cb..0000000000 --- a/Lang/FutureBasic/Sequence-of-primorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primorial-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sierpinski-arrowhead-curve b/Lang/FutureBasic/Sierpinski-arrowhead-curve deleted file mode 120000 index d52f730a0b..0000000000 --- a/Lang/FutureBasic/Sierpinski-arrowhead-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-arrowhead-curve/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sierpinski-carpet b/Lang/FutureBasic/Sierpinski-carpet deleted file mode 120000 index c79bb878a8..0000000000 --- a/Lang/FutureBasic/Sierpinski-carpet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-carpet/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sierpinski-pentagon b/Lang/FutureBasic/Sierpinski-pentagon deleted file mode 120000 index 1e105b6fb4..0000000000 --- a/Lang/FutureBasic/Sierpinski-pentagon +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-pentagon/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sierpinski-square-curve b/Lang/FutureBasic/Sierpinski-square-curve deleted file mode 120000 index 2938f1fa47..0000000000 --- a/Lang/FutureBasic/Sierpinski-square-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-square-curve/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sierpinski-triangle b/Lang/FutureBasic/Sierpinski-triangle deleted file mode 120000 index 300049c10c..0000000000 --- a/Lang/FutureBasic/Sierpinski-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sleep b/Lang/FutureBasic/Sleep deleted file mode 120000 index 8ce099ff7d..0000000000 --- a/Lang/FutureBasic/Sleep +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleep/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k b/Lang/FutureBasic/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k deleted file mode 120000 index 8cc89de701..0000000000 --- a/Lang/FutureBasic/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Smarandache-Wellin-primes b/Lang/FutureBasic/Smarandache-Wellin-primes deleted file mode 120000 index 7564a9b0b8..0000000000 --- a/Lang/FutureBasic/Smarandache-Wellin-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smarandache-Wellin-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Smarandache-prime-digital-sequence b/Lang/FutureBasic/Smarandache-prime-digital-sequence deleted file mode 120000 index 879ea05348..0000000000 --- a/Lang/FutureBasic/Smarandache-prime-digital-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smarandache-prime-digital-sequence/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sort-an-array-of-composite-structures b/Lang/FutureBasic/Sort-an-array-of-composite-structures deleted file mode 120000 index ffd97b8a5e..0000000000 --- a/Lang/FutureBasic/Sort-an-array-of-composite-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-array-of-composite-structures/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sort-disjoint-sublist b/Lang/FutureBasic/Sort-disjoint-sublist deleted file mode 120000 index 030bf0bfd7..0000000000 --- a/Lang/FutureBasic/Sort-disjoint-sublist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-disjoint-sublist/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sort-numbers-lexicographically b/Lang/FutureBasic/Sort-numbers-lexicographically deleted file mode 120000 index b8d6f91892..0000000000 --- a/Lang/FutureBasic/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sort-three-variables b/Lang/FutureBasic/Sort-three-variables deleted file mode 120000 index 48424426c7..0000000000 --- a/Lang/FutureBasic/Sort-three-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-three-variables/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sorting-algorithms-Insertion-sort b/Lang/FutureBasic/Sorting-algorithms-Insertion-sort deleted file mode 120000 index d1f91f0286..0000000000 --- a/Lang/FutureBasic/Sorting-algorithms-Insertion-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Insertion-sort/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sorting-algorithms-Sleep-sort b/Lang/FutureBasic/Sorting-algorithms-Sleep-sort deleted file mode 120000 index b94b39a51d..0000000000 --- a/Lang/FutureBasic/Sorting-algorithms-Sleep-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Sleep-sort/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Spinning-rod-animation-Text b/Lang/FutureBasic/Spinning-rod-animation-Text deleted file mode 120000 index a0c68e7478..0000000000 --- a/Lang/FutureBasic/Spinning-rod-animation-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spinning-rod-animation-Text/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Spiral-matrix b/Lang/FutureBasic/Spiral-matrix deleted file mode 120000 index 4d24174200..0000000000 --- a/Lang/FutureBasic/Spiral-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spiral-matrix/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Square-but-not-cube b/Lang/FutureBasic/Square-but-not-cube deleted file mode 120000 index a8c6d02eba..0000000000 --- a/Lang/FutureBasic/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Square-free-integers b/Lang/FutureBasic/Square-free-integers deleted file mode 120000 index d3a0459f3e..0000000000 --- a/Lang/FutureBasic/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Stack b/Lang/FutureBasic/Stack deleted file mode 120000 index 638a183bbc..0000000000 --- a/Lang/FutureBasic/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Stack-traces b/Lang/FutureBasic/Stack-traces deleted file mode 120000 index 589e50b2fa..0000000000 --- a/Lang/FutureBasic/Stack-traces +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack-traces/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Start-from-a-main-routine b/Lang/FutureBasic/Start-from-a-main-routine deleted file mode 120000 index c3215fed19..0000000000 --- a/Lang/FutureBasic/Start-from-a-main-routine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Start-from-a-main-routine/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/String-length b/Lang/FutureBasic/String-length deleted file mode 120000 index 6df040b0bc..0000000000 --- a/Lang/FutureBasic/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Strip-block-comments b/Lang/FutureBasic/Strip-block-comments deleted file mode 120000 index 1f0c4fb53d..0000000000 --- a/Lang/FutureBasic/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Strip-control-codes-and-extended-characters-from-a-string b/Lang/FutureBasic/Strip-control-codes-and-extended-characters-from-a-string deleted file mode 120000 index ae3840dae2..0000000000 --- a/Lang/FutureBasic/Strip-control-codes-and-extended-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-control-codes-and-extended-characters-from-a-string/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sudan-function b/Lang/FutureBasic/Sudan-function deleted file mode 120000 index 1f582a9d0d..0000000000 --- a/Lang/FutureBasic/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sum-digits-of-an-integer b/Lang/FutureBasic/Sum-digits-of-an-integer deleted file mode 120000 index cf8ab32c2c..0000000000 --- a/Lang/FutureBasic/Sum-digits-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-digits-of-an-integer/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sum-of-a-series b/Lang/FutureBasic/Sum-of-a-series deleted file mode 120000 index 44687bc461..0000000000 --- a/Lang/FutureBasic/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sum-of-squares b/Lang/FutureBasic/Sum-of-squares deleted file mode 120000 index 3bded3f286..0000000000 --- a/Lang/FutureBasic/Sum-of-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-squares/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sum-to-100 b/Lang/FutureBasic/Sum-to-100 deleted file mode 120000 index 5cdb7cf4a8..0000000000 --- a/Lang/FutureBasic/Sum-to-100 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-to-100/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Super-d-numbers b/Lang/FutureBasic/Super-d-numbers deleted file mode 120000 index 77af2a994a..0000000000 --- a/Lang/FutureBasic/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Sylvesters-sequence b/Lang/FutureBasic/Sylvesters-sequence deleted file mode 120000 index 1e1ae008f1..0000000000 --- a/Lang/FutureBasic/Sylvesters-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sylvesters-sequence/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Tau-function b/Lang/FutureBasic/Tau-function deleted file mode 120000 index 4d9cc08c3d..0000000000 --- a/Lang/FutureBasic/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Tau-number b/Lang/FutureBasic/Tau-number deleted file mode 120000 index 363cfbc636..0000000000 --- a/Lang/FutureBasic/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Temperature-conversion b/Lang/FutureBasic/Temperature-conversion deleted file mode 120000 index b60c2baf77..0000000000 --- a/Lang/FutureBasic/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Terminal-control-Clear-the-screen b/Lang/FutureBasic/Terminal-control-Clear-the-screen deleted file mode 120000 index 878687a038..0000000000 --- a/Lang/FutureBasic/Terminal-control-Clear-the-screen +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Clear-the-screen/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Terminal-control-Coloured-text b/Lang/FutureBasic/Terminal-control-Coloured-text deleted file mode 120000 index 6858a62734..0000000000 --- a/Lang/FutureBasic/Terminal-control-Coloured-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Coloured-text/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Terminal-control-Cursor-movement b/Lang/FutureBasic/Terminal-control-Cursor-movement deleted file mode 120000 index 050e1439d6..0000000000 --- a/Lang/FutureBasic/Terminal-control-Cursor-movement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Cursor-movement/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Terminal-control-Cursor-positioning b/Lang/FutureBasic/Terminal-control-Cursor-positioning deleted file mode 120000 index 22f710aaf6..0000000000 --- a/Lang/FutureBasic/Terminal-control-Cursor-positioning +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Cursor-positioning/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Terminal-control-Hiding-the-cursor b/Lang/FutureBasic/Terminal-control-Hiding-the-cursor deleted file mode 120000 index 22bc1dda83..0000000000 --- a/Lang/FutureBasic/Terminal-control-Hiding-the-cursor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Hiding-the-cursor/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Terminal-control-Ringing-the-terminal-bell b/Lang/FutureBasic/Terminal-control-Ringing-the-terminal-bell deleted file mode 120000 index 6f8d6c609a..0000000000 --- a/Lang/FutureBasic/Terminal-control-Ringing-the-terminal-bell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Ringing-the-terminal-bell/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Terminal-control-Unicode-output b/Lang/FutureBasic/Terminal-control-Unicode-output deleted file mode 120000 index 712dfa9fa9..0000000000 --- a/Lang/FutureBasic/Terminal-control-Unicode-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Unicode-output/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/The-Name-Game b/Lang/FutureBasic/The-Name-Game deleted file mode 120000 index 2e6c9ef1a6..0000000000 --- a/Lang/FutureBasic/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/The-sieve-of-Sundaram b/Lang/FutureBasic/The-sieve-of-Sundaram deleted file mode 120000 index 439633bf42..0000000000 --- a/Lang/FutureBasic/The-sieve-of-Sundaram +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-sieve-of-Sundaram/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Tic-tac-toe b/Lang/FutureBasic/Tic-tac-toe deleted file mode 120000 index e0c70b24fe..0000000000 --- a/Lang/FutureBasic/Tic-tac-toe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tic-tac-toe/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Time-a-function b/Lang/FutureBasic/Time-a-function deleted file mode 120000 index 819601365f..0000000000 --- a/Lang/FutureBasic/Time-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Time-a-function/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Transliterate-English-text-using-the-Greek-alphabet b/Lang/FutureBasic/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index f300e3db8a..0000000000 --- a/Lang/FutureBasic/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Truncate-a-file b/Lang/FutureBasic/Truncate-a-file deleted file mode 120000 index 29710d148d..0000000000 --- a/Lang/FutureBasic/Truncate-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncate-a-file/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Twin-primes b/Lang/FutureBasic/Twin-primes deleted file mode 120000 index 172e832801..0000000000 --- a/Lang/FutureBasic/Twin-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twin-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/URL-decoding b/Lang/FutureBasic/URL-decoding deleted file mode 120000 index 001e7a5dfa..0000000000 --- a/Lang/FutureBasic/URL-decoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-decoding/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/URL-parser b/Lang/FutureBasic/URL-parser deleted file mode 120000 index 46cddba12b..0000000000 --- a/Lang/FutureBasic/URL-parser +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-parser/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Ultra-useful-primes b/Lang/FutureBasic/Ultra-useful-primes deleted file mode 120000 index eff79aec0f..0000000000 --- a/Lang/FutureBasic/Ultra-useful-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ultra-useful-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Unicode-strings b/Lang/FutureBasic/Unicode-strings deleted file mode 120000 index dd71b73f3c..0000000000 --- a/Lang/FutureBasic/Unicode-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-strings/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Use-another-language-to-call-a-function b/Lang/FutureBasic/Use-another-language-to-call-a-function deleted file mode 120000 index 704ff5c0c8..0000000000 --- a/Lang/FutureBasic/Use-another-language-to-call-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Use-another-language-to-call-a-function/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/User-input-Text b/Lang/FutureBasic/User-input-Text deleted file mode 120000 index 3d0e3bd7f1..0000000000 --- a/Lang/FutureBasic/User-input-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Text/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Validate-International-Securities-Identification-Number b/Lang/FutureBasic/Validate-International-Securities-Identification-Number deleted file mode 120000 index 81f74f067a..0000000000 --- a/Lang/FutureBasic/Validate-International-Securities-Identification-Number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Validate-International-Securities-Identification-Number/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Wagstaff-primes b/Lang/FutureBasic/Wagstaff-primes deleted file mode 120000 index 455c60b96b..0000000000 --- a/Lang/FutureBasic/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Wieferich-primes b/Lang/FutureBasic/Wieferich-primes deleted file mode 120000 index 1c38642d13..0000000000 --- a/Lang/FutureBasic/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Wilson-primes-of-order-n b/Lang/FutureBasic/Wilson-primes-of-order-n deleted file mode 120000 index 027bdd5d80..0000000000 --- a/Lang/FutureBasic/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Word-wrap b/Lang/FutureBasic/Word-wrap deleted file mode 120000 index d1cd565464..0000000000 --- a/Lang/FutureBasic/Word-wrap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wrap/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/XML-Output b/Lang/FutureBasic/XML-Output deleted file mode 120000 index 7889975674..0000000000 --- a/Lang/FutureBasic/XML-Output +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-Output/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Yahoo-search-interface b/Lang/FutureBasic/Yahoo-search-interface deleted file mode 120000 index 9f29c6ac04..0000000000 --- a/Lang/FutureBasic/Yahoo-search-interface +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yahoo-search-interface/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Yellowstone-sequence b/Lang/FutureBasic/Yellowstone-sequence deleted file mode 120000 index 8a816499f6..0000000000 --- a/Lang/FutureBasic/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Zebra-puzzle b/Lang/FutureBasic/Zebra-puzzle deleted file mode 120000 index 68d36dbfcd..0000000000 --- a/Lang/FutureBasic/Zebra-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zebra-puzzle/FutureBasic \ No newline at end of file diff --git a/Lang/FutureBasic/Zeckendorf-number-representation b/Lang/FutureBasic/Zeckendorf-number-representation deleted file mode 120000 index c805683421..0000000000 --- a/Lang/FutureBasic/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/FutureBasic \ No newline at end of file diff --git a/Lang/GAP/Character-codes b/Lang/GAP/Character-codes deleted file mode 120000 index ff4a3d2754..0000000000 --- a/Lang/GAP/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/GAP \ No newline at end of file diff --git a/Lang/GAP/Quaternion-type b/Lang/GAP/Quaternion-type new file mode 120000 index 0000000000..67ec7fa115 --- /dev/null +++ b/Lang/GAP/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/GAP \ No newline at end of file diff --git a/Lang/GDScript/Playing-cards b/Lang/GDScript/Playing-cards deleted file mode 120000 index 11180c642f..0000000000 --- a/Lang/GDScript/Playing-cards +++ /dev/null @@ -1 +0,0 @@ -../../Task/Playing-cards/GDScript \ No newline at end of file diff --git a/Lang/GW-BASIC/Abundant-deficient-and-perfect-number-classifications b/Lang/GW-BASIC/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index 4709185f8a..0000000000 --- a/Lang/GW-BASIC/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Associative-array-Merging b/Lang/GW-BASIC/Associative-array-Merging deleted file mode 120000 index bd171c9e89..0000000000 --- a/Lang/GW-BASIC/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Case-sensitivity-of-identifiers b/Lang/GW-BASIC/Case-sensitivity-of-identifiers new file mode 120000 index 0000000000..605ddebd53 --- /dev/null +++ b/Lang/GW-BASIC/Case-sensitivity-of-identifiers @@ -0,0 +1 @@ +../../Task/Case-sensitivity-of-identifiers/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Colour-pinstripe-Display b/Lang/GW-BASIC/Colour-pinstripe-Display deleted file mode 120000 index 383619acfb..0000000000 --- a/Lang/GW-BASIC/Colour-pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-pinstripe-Display/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Damm-algorithm b/Lang/GW-BASIC/Damm-algorithm deleted file mode 120000 index b0cc19e6df..0000000000 --- a/Lang/GW-BASIC/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Determine-if-a-string-is-collapsible b/Lang/GW-BASIC/Determine-if-a-string-is-collapsible deleted file mode 120000 index 2b997d0c38..0000000000 --- a/Lang/GW-BASIC/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Determine-sentence-type b/Lang/GW-BASIC/Determine-sentence-type deleted file mode 120000 index 0a4310dab2..0000000000 --- a/Lang/GW-BASIC/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Display-a-linear-combination b/Lang/GW-BASIC/Display-a-linear-combination deleted file mode 120000 index 8162367d7b..0000000000 --- a/Lang/GW-BASIC/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Dutch-national-flag-problem b/Lang/GW-BASIC/Dutch-national-flag-problem deleted file mode 120000 index 96431612bd..0000000000 --- a/Lang/GW-BASIC/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Gray-code b/Lang/GW-BASIC/Gray-code deleted file mode 120000 index a45f2031ed..0000000000 --- a/Lang/GW-BASIC/Gray-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gray-code/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Jensens-Device b/Lang/GW-BASIC/Jensens-Device deleted file mode 120000 index 0236b00319..0000000000 --- a/Lang/GW-BASIC/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Langtons-ant b/Lang/GW-BASIC/Langtons-ant deleted file mode 120000 index 4d565760ef..0000000000 --- a/Lang/GW-BASIC/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Leonardo-numbers b/Lang/GW-BASIC/Leonardo-numbers deleted file mode 120000 index f7945f7063..0000000000 --- a/Lang/GW-BASIC/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Levenshtein-distance b/Lang/GW-BASIC/Levenshtein-distance deleted file mode 120000 index 4605e15436..0000000000 --- a/Lang/GW-BASIC/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Luhn-test-of-credit-card-numbers b/Lang/GW-BASIC/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 3e46368b55..0000000000 --- a/Lang/GW-BASIC/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Magic-constant b/Lang/GW-BASIC/Magic-constant deleted file mode 120000 index 4dbe3ee401..0000000000 --- a/Lang/GW-BASIC/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Map-range b/Lang/GW-BASIC/Map-range deleted file mode 120000 index 487538bdd0..0000000000 --- a/Lang/GW-BASIC/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Mayan-numerals b/Lang/GW-BASIC/Mayan-numerals deleted file mode 120000 index 5c6a4bdb6a..0000000000 --- a/Lang/GW-BASIC/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Nested-templated-data b/Lang/GW-BASIC/Nested-templated-data deleted file mode 120000 index bb39849801..0000000000 --- a/Lang/GW-BASIC/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Nth-root b/Lang/GW-BASIC/Nth-root deleted file mode 120000 index 44da5f255f..0000000000 --- a/Lang/GW-BASIC/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Old-Russian-measure-of-length b/Lang/GW-BASIC/Old-Russian-measure-of-length deleted file mode 120000 index 6121a6a7b1..0000000000 --- a/Lang/GW-BASIC/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Phrase-reversals b/Lang/GW-BASIC/Phrase-reversals deleted file mode 120000 index f735fa85b8..0000000000 --- a/Lang/GW-BASIC/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Pinstripe-Display b/Lang/GW-BASIC/Pinstripe-Display deleted file mode 120000 index 282b987dfa..0000000000 --- a/Lang/GW-BASIC/Pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pinstripe-Display/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Primality-by-trial-division b/Lang/GW-BASIC/Primality-by-trial-division deleted file mode 120000 index 2b782a101b..0000000000 --- a/Lang/GW-BASIC/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Sort-an-integer-array b/Lang/GW-BASIC/Sort-an-integer-array deleted file mode 120000 index 47749b90fd..0000000000 --- a/Lang/GW-BASIC/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Split-a-character-string-based-on-change-of-character b/Lang/GW-BASIC/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 55c414402a..0000000000 --- a/Lang/GW-BASIC/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Sum-of-a-series b/Lang/GW-BASIC/Sum-of-a-series deleted file mode 120000 index 0eb15c49ab..0000000000 --- a/Lang/GW-BASIC/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Twos-complement b/Lang/GW-BASIC/Twos-complement deleted file mode 120000 index 6a1e61b45b..0000000000 --- a/Lang/GW-BASIC/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/GW-BASIC \ No newline at end of file diff --git a/Lang/GW-BASIC/Vector b/Lang/GW-BASIC/Vector deleted file mode 120000 index 6d1d7a6796..0000000000 --- a/Lang/GW-BASIC/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/GW-BASIC \ No newline at end of file diff --git a/Lang/Gambas/Determine-if-a-string-has-all-the-same-characters b/Lang/Gambas/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 448e7d07b5..0000000000 --- a/Lang/Gambas/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Determine-sentence-type b/Lang/Gambas/Determine-sentence-type deleted file mode 120000 index 2d6d98f0ec..0000000000 --- a/Lang/Gambas/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Diversity-prediction-theorem b/Lang/Gambas/Diversity-prediction-theorem deleted file mode 120000 index f0154a9ba0..0000000000 --- a/Lang/Gambas/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Eban-numbers b/Lang/Gambas/Eban-numbers deleted file mode 120000 index 238b6dbb7b..0000000000 --- a/Lang/Gambas/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Evaluate-binomial-coefficients b/Lang/Gambas/Evaluate-binomial-coefficients deleted file mode 120000 index d84c9e286a..0000000000 --- a/Lang/Gambas/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Generate-Chess960-starting-position b/Lang/Gambas/Generate-Chess960-starting-position deleted file mode 120000 index 3ee17430bf..0000000000 --- a/Lang/Gambas/Generate-Chess960-starting-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-Chess960-starting-position/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Hofstadter-Q-sequence b/Lang/Gambas/Hofstadter-Q-sequence deleted file mode 120000 index 6288d88da4..0000000000 --- a/Lang/Gambas/Hofstadter-Q-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Q-sequence/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Jensens-Device b/Lang/Gambas/Jensens-Device deleted file mode 120000 index cf682dd548..0000000000 --- a/Lang/Gambas/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Jewels-and-stones b/Lang/Gambas/Jewels-and-stones deleted file mode 120000 index b13ca1d825..0000000000 --- a/Lang/Gambas/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Leonardo-numbers b/Lang/Gambas/Leonardo-numbers deleted file mode 120000 index 92f225b368..0000000000 --- a/Lang/Gambas/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Gambas \ No newline at end of file diff --git a/Lang/Gambas/M-bius-function b/Lang/Gambas/M-bius-function deleted file mode 120000 index 4846367944..0000000000 --- a/Lang/Gambas/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Magic-constant b/Lang/Gambas/Magic-constant deleted file mode 120000 index 3e63290c94..0000000000 --- a/Lang/Gambas/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Map-range b/Lang/Gambas/Map-range deleted file mode 120000 index 47ffb049ec..0000000000 --- a/Lang/Gambas/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Proper-divisors b/Lang/Gambas/Proper-divisors deleted file mode 120000 index c95a4aae71..0000000000 --- a/Lang/Gambas/Proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Proper-divisors/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Gambas/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Gambas/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Gambas/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Gambas/Sort-disjoint-sublist b/Lang/Gambas/Sort-disjoint-sublist deleted file mode 120000 index d77e8ada49..0000000000 --- a/Lang/Gambas/Sort-disjoint-sublist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-disjoint-sublist/Gambas \ No newline at end of file diff --git a/Lang/Gambas/The-Name-Game b/Lang/Gambas/The-Name-Game deleted file mode 120000 index 03cc006601..0000000000 --- a/Lang/Gambas/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/Gambas \ No newline at end of file diff --git a/Lang/Gambas/Twos-complement b/Lang/Gambas/Twos-complement deleted file mode 120000 index 4ed9e66d7c..0000000000 --- a/Lang/Gambas/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Gambas \ No newline at end of file diff --git a/Lang/Gleam/00-LANG.txt b/Lang/Gleam/00-LANG.txt index 6a2642caa9..1105755c96 100644 --- a/Lang/Gleam/00-LANG.txt +++ b/Lang/Gleam/00-LANG.txt @@ -1,5 +1,2 @@ {{stub}}{{language|Gleam|hopl=no|site=https://gleam.run/}} -Gleam is a type-safe functional programming language that runs on the [[Erlang]] virtual machine. - -== Todo == -[https://rosettacode.org/wiki/Tasks_not_implemented_in_Gleam Tasks not implemented in Gleam] \ No newline at end of file +Gleam is a type-safe functional programming language that runs on the [[Erlang]] virtual machine. \ No newline at end of file diff --git a/Lang/Gleam/Abstract-type b/Lang/Gleam/Abstract-type deleted file mode 120000 index e0dafb7309..0000000000 --- a/Lang/Gleam/Abstract-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abstract-type/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Ackermann-function b/Lang/Gleam/Ackermann-function deleted file mode 120000 index 6d193a9b28..0000000000 --- a/Lang/Gleam/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Apply-a-callback-to-an-array b/Lang/Gleam/Apply-a-callback-to-an-array deleted file mode 120000 index 45d13702b0..0000000000 --- a/Lang/Gleam/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Arithmetic-Integer b/Lang/Gleam/Arithmetic-Integer deleted file mode 120000 index cf77808968..0000000000 --- a/Lang/Gleam/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Array-concatenation b/Lang/Gleam/Array-concatenation deleted file mode 120000 index a1a9260979..0000000000 --- a/Lang/Gleam/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Array-length b/Lang/Gleam/Array-length deleted file mode 120000 index ab180dc3f2..0000000000 --- a/Lang/Gleam/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Assertions b/Lang/Gleam/Assertions deleted file mode 120000 index aca06893a5..0000000000 --- a/Lang/Gleam/Assertions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Assertions/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Associative-array-Creation b/Lang/Gleam/Associative-array-Creation deleted file mode 120000 index 954ca71884..0000000000 --- a/Lang/Gleam/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Binary-digits b/Lang/Gleam/Binary-digits deleted file mode 120000 index a13df512cd..0000000000 --- a/Lang/Gleam/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Catamorphism b/Lang/Gleam/Catamorphism deleted file mode 120000 index a390f8e444..0000000000 --- a/Lang/Gleam/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Comments b/Lang/Gleam/Comments deleted file mode 120000 index e7d9705951..0000000000 --- a/Lang/Gleam/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Compare-a-list-of-strings b/Lang/Gleam/Compare-a-list-of-strings deleted file mode 120000 index 1669281682..0000000000 --- a/Lang/Gleam/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Compound-data-type b/Lang/Gleam/Compound-data-type deleted file mode 120000 index 7cff564dfe..0000000000 --- a/Lang/Gleam/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Conditional-structures b/Lang/Gleam/Conditional-structures deleted file mode 120000 index c889229abf..0000000000 --- a/Lang/Gleam/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Copy-a-string b/Lang/Gleam/Copy-a-string deleted file mode 120000 index 8cf2c44a17..0000000000 --- a/Lang/Gleam/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Count-in-octal b/Lang/Gleam/Count-in-octal deleted file mode 120000 index 15c2c2e9c2..0000000000 --- a/Lang/Gleam/Count-in-octal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-octal/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Date-format b/Lang/Gleam/Date-format deleted file mode 120000 index 328512d62f..0000000000 --- a/Lang/Gleam/Date-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-format/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Delete-a-file b/Lang/Gleam/Delete-a-file deleted file mode 120000 index 85116e4edd..0000000000 --- a/Lang/Gleam/Delete-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delete-a-file/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Detect-division-by-zero b/Lang/Gleam/Detect-division-by-zero deleted file mode 120000 index 9eea7618bf..0000000000 --- a/Lang/Gleam/Detect-division-by-zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Detect-division-by-zero/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Determine-if-a-string-is-numeric b/Lang/Gleam/Determine-if-a-string-is-numeric deleted file mode 120000 index a9d9a1d6a1..0000000000 --- a/Lang/Gleam/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Dice-game-probabilities b/Lang/Gleam/Dice-game-probabilities deleted file mode 120000 index 1cf64df0ec..0000000000 --- a/Lang/Gleam/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Digital-root b/Lang/Gleam/Digital-root deleted file mode 120000 index f4b00d8cfb..0000000000 --- a/Lang/Gleam/Digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Dot-product b/Lang/Gleam/Dot-product deleted file mode 120000 index cf4ac49af6..0000000000 --- a/Lang/Gleam/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Empty-directory b/Lang/Gleam/Empty-directory deleted file mode 120000 index 1ce790d8fd..0000000000 --- a/Lang/Gleam/Empty-directory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-directory/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Empty-string b/Lang/Gleam/Empty-string deleted file mode 120000 index 5b7f7b9014..0000000000 --- a/Lang/Gleam/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Ethiopian-multiplication b/Lang/Gleam/Ethiopian-multiplication deleted file mode 120000 index f93edec2ee..0000000000 --- a/Lang/Gleam/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Even-or-odd b/Lang/Gleam/Even-or-odd deleted file mode 120000 index e725b0e8c1..0000000000 --- a/Lang/Gleam/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Factorial b/Lang/Gleam/Factorial deleted file mode 120000 index a5b5b846f8..0000000000 --- a/Lang/Gleam/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Fibonacci-sequence b/Lang/Gleam/Fibonacci-sequence deleted file mode 120000 index 1d18c4a46d..0000000000 --- a/Lang/Gleam/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Filter b/Lang/Gleam/Filter deleted file mode 120000 index 556438c396..0000000000 --- a/Lang/Gleam/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Function-definition b/Lang/Gleam/Function-definition deleted file mode 120000 index ba4dddd180..0000000000 --- a/Lang/Gleam/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Generic-swap b/Lang/Gleam/Generic-swap deleted file mode 120000 index 21212ee1ef..0000000000 --- a/Lang/Gleam/Generic-swap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generic-swap/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Greatest-common-divisor b/Lang/Gleam/Greatest-common-divisor deleted file mode 120000 index 9040d6ace0..0000000000 --- a/Lang/Gleam/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Greatest-element-of-a-list b/Lang/Gleam/Greatest-element-of-a-list deleted file mode 120000 index 0479d1d5ea..0000000000 --- a/Lang/Gleam/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Increment-a-numerical-string b/Lang/Gleam/Increment-a-numerical-string deleted file mode 120000 index 7bddbff85b..0000000000 --- a/Lang/Gleam/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Integer-sequence b/Lang/Gleam/Integer-sequence deleted file mode 120000 index d2b7a0c5c2..0000000000 --- a/Lang/Gleam/Integer-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-sequence/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Jewels-and-stones b/Lang/Gleam/Jewels-and-stones deleted file mode 120000 index 2eb704c9d0..0000000000 --- a/Lang/Gleam/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Kernighans-large-earthquake-problem b/Lang/Gleam/Kernighans-large-earthquake-problem deleted file mode 120000 index 06b9c08a6c..0000000000 --- a/Lang/Gleam/Kernighans-large-earthquake-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kernighans-large-earthquake-problem/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Look-and-say-sequence b/Lang/Gleam/Look-and-say-sequence deleted file mode 120000 index dafdaa21e3..0000000000 --- a/Lang/Gleam/Look-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Look-and-say-sequence/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Luhn-test-of-credit-card-numbers b/Lang/Gleam/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 784acc9d8d..0000000000 --- a/Lang/Gleam/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Multiplication-tables b/Lang/Gleam/Multiplication-tables deleted file mode 120000 index 4745c27425..0000000000 --- a/Lang/Gleam/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Nth b/Lang/Gleam/Nth deleted file mode 120000 index 9607d54630..0000000000 --- a/Lang/Gleam/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Order-by-pair-comparisons b/Lang/Gleam/Order-by-pair-comparisons deleted file mode 120000 index fc683495ba..0000000000 --- a/Lang/Gleam/Order-by-pair-comparisons +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-by-pair-comparisons/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Primality-by-Wilsons-theorem b/Lang/Gleam/Primality-by-Wilsons-theorem deleted file mode 120000 index 96d456e3fb..0000000000 --- a/Lang/Gleam/Primality-by-Wilsons-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-Wilsons-theorem/Gleam \ No newline at end of file diff --git a/Lang/Gleam/RPG-attributes-generator b/Lang/Gleam/RPG-attributes-generator deleted file mode 120000 index 800e60ff4c..0000000000 --- a/Lang/Gleam/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Repeat b/Lang/Gleam/Repeat deleted file mode 120000 index fab6759fe5..0000000000 --- a/Lang/Gleam/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Repeat-a-string b/Lang/Gleam/Repeat-a-string deleted file mode 120000 index 587cd9830b..0000000000 --- a/Lang/Gleam/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Set b/Lang/Gleam/Set deleted file mode 120000 index c138abd777..0000000000 --- a/Lang/Gleam/Set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Sort-an-integer-array b/Lang/Gleam/Sort-an-integer-array deleted file mode 120000 index 39c8723c40..0000000000 --- a/Lang/Gleam/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Sorting-algorithms-Quicksort b/Lang/Gleam/Sorting-algorithms-Quicksort deleted file mode 120000 index f1e07b6052..0000000000 --- a/Lang/Gleam/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Stack b/Lang/Gleam/Stack deleted file mode 120000 index 174c4b56e2..0000000000 --- a/Lang/Gleam/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/Gleam \ No newline at end of file diff --git a/Lang/Gleam/String-append b/Lang/Gleam/String-append deleted file mode 120000 index 8450c82d83..0000000000 --- a/Lang/Gleam/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/Gleam \ No newline at end of file diff --git a/Lang/Gleam/String-length b/Lang/Gleam/String-length deleted file mode 120000 index f57922e1a7..0000000000 --- a/Lang/Gleam/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/Gleam \ No newline at end of file diff --git a/Lang/Gleam/String-prepend b/Lang/Gleam/String-prepend deleted file mode 120000 index a7f4b33fae..0000000000 --- a/Lang/Gleam/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Sum-and-product-of-an-array b/Lang/Gleam/Sum-and-product-of-an-array deleted file mode 120000 index 15ce85c799..0000000000 --- a/Lang/Gleam/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Sum-digits-of-an-integer b/Lang/Gleam/Sum-digits-of-an-integer deleted file mode 120000 index cfe6f1a5d3..0000000000 --- a/Lang/Gleam/Sum-digits-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-digits-of-an-integer/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Sum-multiples-of-3-and-5 b/Lang/Gleam/Sum-multiples-of-3-and-5 deleted file mode 120000 index 3e5a3657a3..0000000000 --- a/Lang/Gleam/Sum-multiples-of-3-and-5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-multiples-of-3-and-5/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Sum-of-squares b/Lang/Gleam/Sum-of-squares deleted file mode 120000 index 34f0e02665..0000000000 --- a/Lang/Gleam/Sum-of-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-squares/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Symmetric-difference b/Lang/Gleam/Symmetric-difference deleted file mode 120000 index 51ff7c4a32..0000000000 --- a/Lang/Gleam/Symmetric-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Symmetric-difference/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Temperature-conversion b/Lang/Gleam/Temperature-conversion deleted file mode 120000 index 2d1d9f16a7..0000000000 --- a/Lang/Gleam/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Tree-traversal b/Lang/Gleam/Tree-traversal deleted file mode 120000 index b8d43d9b74..0000000000 --- a/Lang/Gleam/Tree-traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-traversal/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Variables b/Lang/Gleam/Variables deleted file mode 120000 index b43723c7ff..0000000000 --- a/Lang/Gleam/Variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variables/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Vector-products b/Lang/Gleam/Vector-products deleted file mode 120000 index e08e49670f..0000000000 --- a/Lang/Gleam/Vector-products +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector-products/Gleam \ No newline at end of file diff --git a/Lang/Gleam/Water-collected-between-towers b/Lang/Gleam/Water-collected-between-towers deleted file mode 120000 index 787299f258..0000000000 --- a/Lang/Gleam/Water-collected-between-towers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Water-collected-between-towers/Gleam \ No newline at end of file diff --git a/Lang/Go/Bifid-cipher b/Lang/Go/Bifid-cipher deleted file mode 120000 index 329ffb397d..0000000000 --- a/Lang/Go/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Go \ No newline at end of file diff --git a/Lang/Go/Bioinformatics-base-count b/Lang/Go/Bioinformatics-base-count new file mode 120000 index 0000000000..485b68c3c6 --- /dev/null +++ b/Lang/Go/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Go \ No newline at end of file diff --git a/Lang/Go/Boyer-Moore-string-search b/Lang/Go/Boyer-Moore-string-search deleted file mode 120000 index 0b971fdf3b..0000000000 --- a/Lang/Go/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Go \ No newline at end of file diff --git a/Lang/Go/Camel-case-and-snake-case b/Lang/Go/Camel-case-and-snake-case deleted file mode 120000 index 580007cb79..0000000000 --- a/Lang/Go/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Go \ No newline at end of file diff --git a/Lang/Go/Distance-and-Bearing b/Lang/Go/Distance-and-Bearing deleted file mode 120000 index 566b8d5b53..0000000000 --- a/Lang/Go/Distance-and-Bearing +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distance-and-Bearing/Go \ No newline at end of file diff --git a/Lang/Go/Factorial-primes b/Lang/Go/Factorial-primes deleted file mode 120000 index 5b25426fd0..0000000000 --- a/Lang/Go/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Go \ No newline at end of file diff --git a/Lang/Go/Goldbachs-comet b/Lang/Go/Goldbachs-comet deleted file mode 120000 index e80a90c082..0000000000 --- a/Lang/Go/Goldbachs-comet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Goldbachs-comet/Go \ No newline at end of file diff --git a/Lang/Go/Meissel-Mertens-constant b/Lang/Go/Meissel-Mertens-constant new file mode 120000 index 0000000000..8c13ff2d6b --- /dev/null +++ b/Lang/Go/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Go \ No newline at end of file diff --git a/Lang/Go/Miller-Rabin-primality-test b/Lang/Go/Miller-Rabin-primality-test new file mode 120000 index 0000000000..c9da74462b --- /dev/null +++ b/Lang/Go/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Go \ No newline at end of file diff --git a/Lang/Go/P-Adic-square-roots b/Lang/Go/P-Adic-square-roots deleted file mode 120000 index 064157bec0..0000000000 --- a/Lang/Go/P-Adic-square-roots +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-square-roots/Go \ No newline at end of file diff --git a/Lang/Go/Quaternion-type b/Lang/Go/Quaternion-type new file mode 120000 index 0000000000..e62c595975 --- /dev/null +++ b/Lang/Go/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Go \ No newline at end of file diff --git a/Lang/Go/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Go/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Go/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Go/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Go/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Go/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Go/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Go/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Go/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Go/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Go/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Go/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Go/Simple-turtle-graphics b/Lang/Go/Simple-turtle-graphics deleted file mode 120000 index 81f4233716..0000000000 --- a/Lang/Go/Simple-turtle-graphics +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-turtle-graphics/Go \ No newline at end of file diff --git a/Lang/Go/Sorting-Algorithms-Circle-Sort b/Lang/Go/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..1288f4ddcf --- /dev/null +++ b/Lang/Go/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Go \ No newline at end of file diff --git a/Lang/Go/Terminal-control-Unicode-output b/Lang/Go/Terminal-control-Unicode-output new file mode 120000 index 0000000000..7532989408 --- /dev/null +++ b/Lang/Go/Terminal-control-Unicode-output @@ -0,0 +1 @@ +../../Task/Terminal-control-Unicode-output/Go \ No newline at end of file diff --git a/Lang/Goboscript/00-LANG.txt b/Lang/Goboscript/00-LANG.txt deleted file mode 100644 index fbf55e819e..0000000000 --- a/Lang/Goboscript/00-LANG.txt +++ /dev/null @@ -1,15 +0,0 @@ -{{stub}}{{language -|tags=compiled, transpiled, Scratch -| site=https://aspizu.github.io/goboscript/ -|parampass=value -|goboscript}} - -From [https://github.com/aspizu/goboscript/ the goboscript repo]:
- -goboscript is a text-based programming language that compiles to Scratch. Write Scratch projects in text, and compile it into a .sb3 file -- which can be opened in the Scratch editor, TurboWarp or be uploaded to the Scratch website. - -===Package managers=== -Despite being a relatively new programming language, goboscript has multiple package managers. - -* [https://github.com/aspizu/backpack backpack] - The official goboscript package manager -* [https://github.com/inflated-goboscript/inflator inflator] - A more powerful package manager inspired by Python's pip \ No newline at end of file diff --git a/Lang/Goboscript/00-META.yaml b/Lang/Goboscript/00-META.yaml deleted file mode 100644 index 48464a36ad..0000000000 --- a/Lang/Goboscript/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Goboscript diff --git a/Lang/Goboscript/100-doors b/Lang/Goboscript/100-doors deleted file mode 120000 index 293aa8a0f0..0000000000 --- a/Lang/Goboscript/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Goboscript \ No newline at end of file diff --git a/Lang/Goboscript/99-bottles-of-beer b/Lang/Goboscript/99-bottles-of-beer deleted file mode 120000 index 5a60ef7f8c..0000000000 --- a/Lang/Goboscript/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Goboscript \ No newline at end of file diff --git a/Lang/Goboscript/Arithmetic-Complex b/Lang/Goboscript/Arithmetic-Complex deleted file mode 120000 index ed35177c3c..0000000000 --- a/Lang/Goboscript/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/Goboscript \ No newline at end of file diff --git a/Lang/Golfscript/00-LANG.txt b/Lang/Golfscript/00-LANG.txt index ce1ed4276d..67be1df4fd 100644 --- a/Lang/Golfscript/00-LANG.txt +++ b/Lang/Golfscript/00-LANG.txt @@ -1,10 +1,5 @@ {{language|GolfScript |site=http://www.golfscript.com/golfscript/index.html }} -{{try|Golfscript|[https://tio.run/#golfscript Try Golfscript on tio.run].}} {{language programming paradigm|Concatenative}} -GolfScript is a stack oriented esoteric programming language aimed at solving problems (holes) in as few keystrokes as possible. It also aims to be simple and easy to write. - -== External links == -* [https://golfscript.com/golfscript/ Official website] -* [https://codegolf.stackexchange.com/questions/5264/tips-for-golfing-in-golfscript Tips for golfing in Golfscript] \ No newline at end of file +GolfScript is a stack oriented esoteric programming language aimed at solving problems (holes) in as few keystrokes as possible. It also aims to be simple and easy to write. \ No newline at end of file diff --git a/Lang/Golfscript/Primality-by-trial-division b/Lang/Golfscript/Primality-by-trial-division deleted file mode 120000 index 42e31431cb..0000000000 --- a/Lang/Golfscript/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/Golfscript \ No newline at end of file diff --git a/Lang/Groovy/Empty-program b/Lang/Groovy/Empty-program new file mode 120000 index 0000000000..8d1c7a42ae --- /dev/null +++ b/Lang/Groovy/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Groovy \ No newline at end of file diff --git a/Lang/Guile/2048 b/Lang/Guile/2048 deleted file mode 120000 index 69532585e1..0000000000 --- a/Lang/Guile/2048 +++ /dev/null @@ -1 +0,0 @@ -../../Task/2048/Guile \ No newline at end of file diff --git a/Lang/Guile/A+B b/Lang/Guile/A+B deleted file mode 120000 index ea7ff34909..0000000000 --- a/Lang/Guile/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Guile \ No newline at end of file diff --git a/Lang/Guile/MD5-Implementation b/Lang/Guile/MD5-Implementation deleted file mode 120000 index c467572ebf..0000000000 --- a/Lang/Guile/MD5-Implementation +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD5-Implementation/Guile \ No newline at end of file diff --git a/Lang/Guish/00-LANG.txt b/Lang/Guish/00-LANG.txt index e15298f7c3..593da31c91 100644 --- a/Lang/Guish/00-LANG.txt +++ b/Lang/Guish/00-LANG.txt @@ -1016,7 +1016,7 @@ Any element that's not a page has a particular text alignment that can be change -Francesco Palumbo +Francesco Palumbo <phranz@subfc.net> = THANKS = diff --git a/Lang/HPPPL/A+B b/Lang/HPPPL/A+B deleted file mode 120000 index dd8d8fff42..0000000000 --- a/Lang/HPPPL/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/HPPPL \ No newline at end of file diff --git a/Lang/HPPPL/Ackermann-function b/Lang/HPPPL/Ackermann-function deleted file mode 120000 index ff1ef99b52..0000000000 --- a/Lang/HPPPL/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/HPPPL \ No newline at end of file diff --git a/Lang/HPPPL/Babbage-problem b/Lang/HPPPL/Babbage-problem deleted file mode 120000 index 441aa0d4f6..0000000000 --- a/Lang/HPPPL/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/HPPPL \ No newline at end of file diff --git a/Lang/HPPPL/Jacobsthal-numbers b/Lang/HPPPL/Jacobsthal-numbers deleted file mode 120000 index 5f5706ea3b..0000000000 --- a/Lang/HPPPL/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/HPPPL \ No newline at end of file diff --git a/Lang/HPPPL/Jaro-similarity b/Lang/HPPPL/Jaro-similarity deleted file mode 120000 index 022c80a0a8..0000000000 --- a/Lang/HPPPL/Jaro-similarity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-similarity/HPPPL \ No newline at end of file diff --git a/Lang/HPPPL/Numbers-with-equal-rises-and-falls b/Lang/HPPPL/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 7d6ca5c6b5..0000000000 --- a/Lang/HPPPL/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/HPPPL \ No newline at end of file diff --git a/Lang/HPPPL/Primality-by-trial-division b/Lang/HPPPL/Primality-by-trial-division deleted file mode 120000 index 2127fa3655..0000000000 --- a/Lang/HPPPL/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/HPPPL \ No newline at end of file diff --git a/Lang/HPPPL/Tau-number b/Lang/HPPPL/Tau-number deleted file mode 120000 index 1180967c35..0000000000 --- a/Lang/HPPPL/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/HPPPL \ No newline at end of file diff --git a/Lang/Hare/Execute-Brain- b/Lang/Hare/Execute-Brain- deleted file mode 120000 index dc8caabad0..0000000000 --- a/Lang/Hare/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Hare \ No newline at end of file diff --git a/Lang/Haskell/00-LANG.txt b/Lang/Haskell/00-LANG.txt index 9b79cdd879..fe49ebce44 100644 --- a/Lang/Haskell/00-LANG.txt +++ b/Lang/Haskell/00-LANG.txt @@ -20,5 +20,5 @@ Linspire GNU/[[Linux]] chose Haskell for system tools development. ==Citations== * [[wp:Haskell_%28programming_language%29|Wikipedia:Haskell (programming language)]] -==Unimplemented Tasks== -* [[Tasks_not_implemented_in_Haskell|Haskell Unimplemented]] \ No newline at end of file +==Todo== +[[Reports:Tasks_not_implemented_in_Haskell]] \ No newline at end of file diff --git a/Lang/Haskell/Arithmetic-numbers b/Lang/Haskell/Arithmetic-numbers deleted file mode 120000 index ca4dc61dcb..0000000000 --- a/Lang/Haskell/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Ascending-primes b/Lang/Haskell/Ascending-primes deleted file mode 120000 index 443d61be19..0000000000 --- a/Lang/Haskell/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Bifid-cipher b/Lang/Haskell/Bifid-cipher deleted file mode 120000 index e9402d0afc..0000000000 --- a/Lang/Haskell/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Bioinformatics-Global-alignment b/Lang/Haskell/Bioinformatics-Global-alignment deleted file mode 120000 index adcd5f4ce2..0000000000 --- a/Lang/Haskell/Bioinformatics-Global-alignment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bioinformatics-Global-alignment/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Bioinformatics-base-count b/Lang/Haskell/Bioinformatics-base-count new file mode 120000 index 0000000000..cf913dcdcd --- /dev/null +++ b/Lang/Haskell/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Cistercian-numerals b/Lang/Haskell/Cistercian-numerals deleted file mode 120000 index 2a13541c88..0000000000 --- a/Lang/Haskell/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Deceptive-numbers b/Lang/Haskell/Deceptive-numbers deleted file mode 120000 index 6fa6eb6011..0000000000 --- a/Lang/Haskell/Deceptive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deceptive-numbers/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Descending-primes b/Lang/Haskell/Descending-primes deleted file mode 120000 index 58817d1239..0000000000 --- a/Lang/Haskell/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Duffinian-numbers b/Lang/Haskell/Duffinian-numbers deleted file mode 120000 index 282d30bb6b..0000000000 --- a/Lang/Haskell/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Factorial-primes b/Lang/Haskell/Factorial-primes deleted file mode 120000 index 004f7e5f7d..0000000000 --- a/Lang/Haskell/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Jordan-P-lya-numbers b/Lang/Haskell/Jordan-P-lya-numbers deleted file mode 120000 index 0e7225789a..0000000000 --- a/Lang/Haskell/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Miller-Rabin-primality-test b/Lang/Haskell/Miller-Rabin-primality-test new file mode 120000 index 0000000000..c41f1ba06c --- /dev/null +++ b/Lang/Haskell/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Mouse-position b/Lang/Haskell/Mouse-position deleted file mode 120000 index 842d59376f..0000000000 --- a/Lang/Haskell/Mouse-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mouse-position/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Pathological-floating-point-problems b/Lang/Haskell/Pathological-floating-point-problems deleted file mode 120000 index f17bacf62a..0000000000 --- a/Lang/Haskell/Pathological-floating-point-problems +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pathological-floating-point-problems/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Quaternion-type b/Lang/Haskell/Quaternion-type new file mode 120000 index 0000000000..14aca84bfa --- /dev/null +++ b/Lang/Haskell/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Haskell/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Haskell/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Haskell/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Haskell/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Haskell/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Haskell/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Haskell/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Haskell/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Haskell/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Haskell/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Haskell/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Haskell/Sorting-Algorithms-Circle-Sort b/Lang/Haskell/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..7f6f1559db --- /dev/null +++ b/Lang/Haskell/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Haskell \ No newline at end of file diff --git a/Lang/Haskell/Strassens-algorithm b/Lang/Haskell/Strassens-algorithm deleted file mode 120000 index f39dbbfd50..0000000000 --- a/Lang/Haskell/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Haskell \ No newline at end of file diff --git a/Lang/Haxe/Abstract-type b/Lang/Haxe/Abstract-type deleted file mode 120000 index 6ff9aba1f6..0000000000 --- a/Lang/Haxe/Abstract-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abstract-type/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Apply-a-callback-to-an-array b/Lang/Haxe/Apply-a-callback-to-an-array deleted file mode 120000 index 6fdb21da75..0000000000 --- a/Lang/Haxe/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Arrays b/Lang/Haxe/Arrays deleted file mode 120000 index bd303e4884..0000000000 --- a/Lang/Haxe/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Associative-array-Creation b/Lang/Haxe/Associative-array-Creation deleted file mode 120000 index 38347f6de6..0000000000 --- a/Lang/Haxe/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Associative-array-Iteration b/Lang/Haxe/Associative-array-Iteration deleted file mode 120000 index aa7c7951b8..0000000000 --- a/Lang/Haxe/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Binary-digits b/Lang/Haxe/Binary-digits deleted file mode 120000 index 9bf8952c0d..0000000000 --- a/Lang/Haxe/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Boolean-values b/Lang/Haxe/Boolean-values deleted file mode 120000 index b5ef0e7d8b..0000000000 --- a/Lang/Haxe/Boolean-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boolean-values/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Call-an-object-method b/Lang/Haxe/Call-an-object-method deleted file mode 120000 index 953d02b76c..0000000000 --- a/Lang/Haxe/Call-an-object-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-an-object-method/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Character-codes b/Lang/Haxe/Character-codes deleted file mode 120000 index 92ab060a1a..0000000000 --- a/Lang/Haxe/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/Haxe \ No newline at end of file diff --git a/Lang/Haxe/Classes b/Lang/Haxe/Classes deleted file mode 120000 index 5c922938d4..0000000000 --- a/Lang/Haxe/Classes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Classes/Haxe \ No newline at end of file diff --git a/Lang/IDL/00-LANG.txt b/Lang/IDL/00-LANG.txt index fed6398ad2..ef4aad38d6 100644 --- a/Lang/IDL/00-LANG.txt +++ b/Lang/IDL/00-LANG.txt @@ -1,4 +1,4 @@ {{stub}}{{language|IDL}} IDL (Interactive Data Language) is an [[array]] programming language designed by David Stern. [[wp:IDL_%28programming_language%29|Wikipedia article]] -(free implementation: GDL - GNU Data Language https://github.com/gnudatalanguage/gdl) \ No newline at end of file +(free implementation: GDL - GNU Data Language http://gnudatalanguage.sourceforge.net) \ No newline at end of file diff --git a/Lang/IS-BASIC/Determine-if-a-string-has-all-the-same-characters b/Lang/IS-BASIC/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 3a0ac72c5c..0000000000 --- a/Lang/IS-BASIC/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/IS-BASIC \ No newline at end of file diff --git a/Lang/Icon/00-LANG.txt b/Lang/Icon/00-LANG.txt index 16054a3927..6d6b15bfc2 100644 --- a/Lang/Icon/00-LANG.txt +++ b/Lang/Icon/00-LANG.txt @@ -39,7 +39,5 @@ Several extensions of Icon were developed to improve functionality. Many of the * [[Icon%2BUnicon/Intro|An introduction to Icon and Unicon for Rosetta Code]] * [[:Category:Icon/Omit|Unimplementable tasks]] * [[:Category:Icon_examples_needing_attention|Tasks requiring attention]] -* [[:Category:Icon_Programming_Library|The Icon Programming Library]] - -==Todo== -* [[Tasks not implemented in Icon]] \ No newline at end of file +* [[Reports:Tasks_not_implemented_in_Icon|Tasks not yet implemented]] +* [[:Category:Icon_Programming_Library|The Icon Programming Library]] \ No newline at end of file diff --git a/Lang/Icon/100-prisoners b/Lang/Icon/100-prisoners deleted file mode 120000 index 9bc15827ac..0000000000 --- a/Lang/Icon/100-prisoners +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-prisoners/Icon \ No newline at end of file diff --git a/Lang/Icon/Additive-primes b/Lang/Icon/Additive-primes deleted file mode 120000 index f7253ea73d..0000000000 --- a/Lang/Icon/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/Icon \ No newline at end of file diff --git a/Lang/Icon/Amicable-pairs b/Lang/Icon/Amicable-pairs deleted file mode 120000 index 13242a82ae..0000000000 --- a/Lang/Icon/Amicable-pairs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amicable-pairs/Icon \ No newline at end of file diff --git a/Lang/Icon/Anti-primes b/Lang/Icon/Anti-primes deleted file mode 120000 index 63243658da..0000000000 --- a/Lang/Icon/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Icon \ No newline at end of file diff --git a/Lang/Icon/Ascending-primes b/Lang/Icon/Ascending-primes deleted file mode 120000 index e30e0fc896..0000000000 --- a/Lang/Icon/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Icon \ No newline at end of file diff --git a/Lang/Icon/Attractive-numbers b/Lang/Icon/Attractive-numbers deleted file mode 120000 index 743b113011..0000000000 --- a/Lang/Icon/Attractive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Attractive-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Babbage-problem b/Lang/Icon/Babbage-problem deleted file mode 120000 index 735fcc5c8a..0000000000 --- a/Lang/Icon/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/Icon \ No newline at end of file diff --git a/Lang/Icon/Bin-given-limits b/Lang/Icon/Bin-given-limits deleted file mode 120000 index 39a04e7b2e..0000000000 --- a/Lang/Icon/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/Icon \ No newline at end of file diff --git a/Lang/Icon/Brilliant-numbers b/Lang/Icon/Brilliant-numbers deleted file mode 120000 index 1a8f34ef87..0000000000 --- a/Lang/Icon/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Colorful-numbers b/Lang/Icon/Colorful-numbers deleted file mode 120000 index d1f1a0b56b..0000000000 --- a/Lang/Icon/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Compare-length-of-two-strings b/Lang/Icon/Compare-length-of-two-strings deleted file mode 120000 index beabf2e98e..0000000000 --- a/Lang/Icon/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Icon \ No newline at end of file diff --git a/Lang/Icon/Copy-stdin-to-stdout b/Lang/Icon/Copy-stdin-to-stdout deleted file mode 120000 index 7a52714a89..0000000000 --- a/Lang/Icon/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/Icon \ No newline at end of file diff --git a/Lang/Icon/Curzon-numbers b/Lang/Icon/Curzon-numbers deleted file mode 120000 index 4ee931a90d..0000000000 --- a/Lang/Icon/Curzon-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Curzon-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Damm-algorithm b/Lang/Icon/Damm-algorithm deleted file mode 120000 index 67c033a005..0000000000 --- a/Lang/Icon/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/Icon \ No newline at end of file diff --git a/Lang/Icon/Department-numbers b/Lang/Icon/Department-numbers deleted file mode 120000 index ce0a0885c3..0000000000 --- a/Lang/Icon/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Descending-primes b/Lang/Icon/Descending-primes deleted file mode 120000 index c0f125d9e3..0000000000 --- a/Lang/Icon/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Icon \ No newline at end of file diff --git a/Lang/Icon/Determine-if-a-string-is-collapsible b/Lang/Icon/Determine-if-a-string-is-collapsible deleted file mode 120000 index d589db9f61..0000000000 --- a/Lang/Icon/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/Icon \ No newline at end of file diff --git a/Lang/Icon/Determine-if-a-string-is-squeezable b/Lang/Icon/Determine-if-a-string-is-squeezable deleted file mode 120000 index 46209569af..0000000000 --- a/Lang/Icon/Determine-if-a-string-is-squeezable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-squeezable/Icon \ No newline at end of file diff --git a/Lang/Icon/Disarium-numbers b/Lang/Icon/Disarium-numbers deleted file mode 120000 index 12c9e05e7d..0000000000 --- a/Lang/Icon/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Duffinian-numbers b/Lang/Icon/Duffinian-numbers deleted file mode 120000 index 5897c057e3..0000000000 --- a/Lang/Icon/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Exponentiation-order b/Lang/Icon/Exponentiation-order deleted file mode 120000 index c87e5174b5..0000000000 --- a/Lang/Icon/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/Icon \ No newline at end of file diff --git a/Lang/Icon/Exponentiation-with-infix-operators-in-or-operating-on-the-base b/Lang/Icon/Exponentiation-with-infix-operators-in-or-operating-on-the-base deleted file mode 120000 index 08ed217100..0000000000 --- a/Lang/Icon/Exponentiation-with-infix-operators-in-or-operating-on-the-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-with-infix-operators-in-or-operating-on-the-base/Icon \ No newline at end of file diff --git a/Lang/Icon/Gapful-numbers b/Lang/Icon/Gapful-numbers deleted file mode 120000 index fc3d78f9a2..0000000000 --- a/Lang/Icon/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/General-FizzBuzz b/Lang/Icon/General-FizzBuzz deleted file mode 120000 index ea33dc312a..0000000000 --- a/Lang/Icon/General-FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/General-FizzBuzz/Icon \ No newline at end of file diff --git a/Lang/Icon/Halt-and-catch-fire b/Lang/Icon/Halt-and-catch-fire deleted file mode 120000 index cc36db873b..0000000000 --- a/Lang/Icon/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/Icon \ No newline at end of file diff --git a/Lang/Icon/History-variables b/Lang/Icon/History-variables deleted file mode 120000 index 3757ea49f2..0000000000 --- a/Lang/Icon/History-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/History-variables/Icon \ No newline at end of file diff --git a/Lang/Icon/Humble-numbers b/Lang/Icon/Humble-numbers deleted file mode 120000 index 4ff6385336..0000000000 --- a/Lang/Icon/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/JSON b/Lang/Icon/JSON deleted file mode 120000 index cac5544cb8..0000000000 --- a/Lang/Icon/JSON +++ /dev/null @@ -1 +0,0 @@ -../../Task/JSON/Icon \ No newline at end of file diff --git a/Lang/Icon/Jewels-and-stones b/Lang/Icon/Jewels-and-stones deleted file mode 120000 index 5dee8d7cee..0000000000 --- a/Lang/Icon/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Icon \ No newline at end of file diff --git a/Lang/Icon/JortSort b/Lang/Icon/JortSort deleted file mode 120000 index f9d0bbf2dd..0000000000 --- a/Lang/Icon/JortSort +++ /dev/null @@ -1 +0,0 @@ -../../Task/JortSort/Icon \ No newline at end of file diff --git a/Lang/Icon/Kernighans-large-earthquake-problem b/Lang/Icon/Kernighans-large-earthquake-problem deleted file mode 120000 index c766366430..0000000000 --- a/Lang/Icon/Kernighans-large-earthquake-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kernighans-large-earthquake-problem/Icon \ No newline at end of file diff --git a/Lang/Icon/Largest-number-divisible-by-its-digits b/Lang/Icon/Largest-number-divisible-by-its-digits deleted file mode 120000 index 13b83b49d7..0000000000 --- a/Lang/Icon/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/Icon \ No newline at end of file diff --git a/Lang/Icon/Largest-proper-divisor-of-n b/Lang/Icon/Largest-proper-divisor-of-n deleted file mode 120000 index 31002a6508..0000000000 --- a/Lang/Icon/Largest-proper-divisor-of-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-proper-divisor-of-n/Icon \ No newline at end of file diff --git a/Lang/Icon/Longest-common-substring b/Lang/Icon/Longest-common-substring deleted file mode 120000 index 911a5f7a03..0000000000 --- a/Lang/Icon/Longest-common-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-common-substring/Icon \ No newline at end of file diff --git a/Lang/Icon/Loops-Increment-loop-index-within-loop-body b/Lang/Icon/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index 19c94ce3da..0000000000 --- a/Lang/Icon/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/Icon \ No newline at end of file diff --git a/Lang/Icon/Loops-Wrong-ranges b/Lang/Icon/Loops-Wrong-ranges deleted file mode 120000 index 0317af2079..0000000000 --- a/Lang/Icon/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/Icon \ No newline at end of file diff --git a/Lang/Icon/Lychrel-numbers b/Lang/Icon/Lychrel-numbers deleted file mode 120000 index 17b9194dd0..0000000000 --- a/Lang/Icon/Lychrel-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lychrel-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Matrix-exponentiation-operator b/Lang/Icon/Matrix-exponentiation-operator deleted file mode 120000 index 7d0b44e7a5..0000000000 --- a/Lang/Icon/Matrix-exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-exponentiation-operator/Icon \ No newline at end of file diff --git a/Lang/Icon/Mian-Chowla-sequence b/Lang/Icon/Mian-Chowla-sequence deleted file mode 120000 index c2755bd935..0000000000 --- a/Lang/Icon/Mian-Chowla-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mian-Chowla-sequence/Icon \ No newline at end of file diff --git a/Lang/Icon/Miller-Rabin-primality-test b/Lang/Icon/Miller-Rabin-primality-test new file mode 120000 index 0000000000..0a9d526a8b --- /dev/null +++ b/Lang/Icon/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Icon \ No newline at end of file diff --git a/Lang/Icon/Minimum-multiple-of-m-where-digital-sum-equals-m b/Lang/Icon/Minimum-multiple-of-m-where-digital-sum-equals-m deleted file mode 120000 index e9ef6d5260..0000000000 --- a/Lang/Icon/Minimum-multiple-of-m-where-digital-sum-equals-m +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minimum-multiple-of-m-where-digital-sum-equals-m/Icon \ No newline at end of file diff --git a/Lang/Icon/Palindromic-gapful-numbers b/Lang/Icon/Palindromic-gapful-numbers deleted file mode 120000 index 0baaac39e3..0000000000 --- a/Lang/Icon/Palindromic-gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindromic-gapful-numbers/Icon \ No newline at end of file diff --git a/Lang/Icon/Perfect-shuffle b/Lang/Icon/Perfect-shuffle deleted file mode 120000 index 6f3471d6c3..0000000000 --- a/Lang/Icon/Perfect-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-shuffle/Icon \ No newline at end of file diff --git a/Lang/Icon/Repeat b/Lang/Icon/Repeat deleted file mode 120000 index c83ed88406..0000000000 --- a/Lang/Icon/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Icon \ No newline at end of file diff --git a/Lang/Icon/Search-a-list-of-records b/Lang/Icon/Search-a-list-of-records deleted file mode 120000 index b796eca599..0000000000 --- a/Lang/Icon/Search-a-list-of-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list-of-records/Icon \ No newline at end of file diff --git a/Lang/Icon/Sort-numbers-lexicographically b/Lang/Icon/Sort-numbers-lexicographically deleted file mode 120000 index 7c99f7d928..0000000000 --- a/Lang/Icon/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/Icon \ No newline at end of file diff --git a/Lang/Icon/Tau-function b/Lang/Icon/Tau-function deleted file mode 120000 index a9852ae0fc..0000000000 --- a/Lang/Icon/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/Icon \ No newline at end of file diff --git a/Lang/Icon/Tau-number b/Lang/Icon/Tau-number deleted file mode 120000 index 16be5aedc6..0000000000 --- a/Lang/Icon/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Icon \ No newline at end of file diff --git a/Lang/Icon/Thue-Morse b/Lang/Icon/Thue-Morse deleted file mode 120000 index bfa031f039..0000000000 --- a/Lang/Icon/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/Icon \ No newline at end of file diff --git a/Lang/Icon/Tokenize-a-string-with-escaping b/Lang/Icon/Tokenize-a-string-with-escaping deleted file mode 120000 index 6a5856de9c..0000000000 --- a/Lang/Icon/Tokenize-a-string-with-escaping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string-with-escaping/Icon \ No newline at end of file diff --git a/Lang/Icon/Tree-from-nesting-levels b/Lang/Icon/Tree-from-nesting-levels deleted file mode 120000 index 670d6ecf62..0000000000 --- a/Lang/Icon/Tree-from-nesting-levels +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-from-nesting-levels/Icon \ No newline at end of file diff --git a/Lang/Icon/UTF-8-encode-and-decode b/Lang/Icon/UTF-8-encode-and-decode deleted file mode 120000 index 354f23e4f3..0000000000 --- a/Lang/Icon/UTF-8-encode-and-decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/UTF-8-encode-and-decode/Icon \ No newline at end of file diff --git a/Lang/Icon/Unix-ls b/Lang/Icon/Unix-ls deleted file mode 120000 index a60d089d88..0000000000 --- a/Lang/Icon/Unix-ls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unix-ls/Icon \ No newline at end of file diff --git a/Lang/Icon/Word-frequency b/Lang/Icon/Word-frequency deleted file mode 120000 index 24fef71b7b..0000000000 --- a/Lang/Icon/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/Icon \ No newline at end of file diff --git a/Lang/Icon/Write-entire-file b/Lang/Icon/Write-entire-file deleted file mode 120000 index a982401a37..0000000000 --- a/Lang/Icon/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/Icon \ No newline at end of file diff --git a/Lang/Idris/Comments b/Lang/Idris/Comments deleted file mode 120000 index ffaead275c..0000000000 --- a/Lang/Idris/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Idris \ No newline at end of file diff --git a/Lang/Idris/Palindrome-detection b/Lang/Idris/Palindrome-detection deleted file mode 120000 index 58af724843..0000000000 --- a/Lang/Idris/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/Idris \ No newline at end of file diff --git a/Lang/Idris/Quaternion-type b/Lang/Idris/Quaternion-type new file mode 120000 index 0000000000..6489466168 --- /dev/null +++ b/Lang/Idris/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Idris \ No newline at end of file diff --git a/Lang/Imp77/00-LANG.txt b/Lang/Imp77/00-LANG.txt deleted file mode 100644 index 85ea555671..0000000000 --- a/Lang/Imp77/00-LANG.txt +++ /dev/null @@ -1,37 +0,0 @@ -{{language -|exec=machine -|gc=no -|parampass=value or by address -|checking=static -|tags=imp77 -}}{{language programming paradigm|Imperative}} -'''Imp77''' is a general-purpose, [[procedural programming|procedural]], [[imperative programming|imperative]] computer programming language developed around 1977 by the Computer Science Department at Edinburgh University. The original Imp was an incremental development of its predecessor, [[derived from::AtlasAutocode]], via Imp9 . - -==Versions== -* '''Atlas Autocode''' was originally created by Tony Brooker as his response to the 1958 IAL proposal which was the prototype for Algol60. It was very similar to Algol 60 but without some of the problematic areas such as 'call-by-name'. -* '''Imp(AA)''' was the first Imp compiler (running on the KDF9) to use the name Imp, but it was almost identical to Atlas Autocode apart from having removed a few unused language features such as %complex variables and minor syntax that was dependent on the use of the Flexowriter and the KDF9 character set, which happened when the compiler was modified to use the 7-bit ISO character set. -* '''Imp9''' was the final release of Imp on the ICL System 4/75. By this point Imp had acquired records and strings. -* '''Impi''' was an interactive version of the Imp language based on the Imp9 specification, which compiled a statement at a time or a procedure at a time to executable code in memory. Although the Impi name meant "Imp Interpreter" it was not an interpreter in the sense of interpreting an intermediate code, but was rather a true dynamic and interactive compiler. -* '''Iopt''' was the Imp9 compiler modernised and ported to the ICL 29XX range. This was the most fully-featured version of Imp until Imp77 was created. -* '''Skimp''' was a cut-down version of the language, at about the same level of complexity as Atlas Autocode, used for teaching compiler-writing to third-year computer science students at Edinburgh University. It was also used as a bootstrapping compiler when porting imp to new systems. -* '''Imp15''' was an implementation of Imp for the PDP9 and PDP15 systems, which ran in 8K words (words being 18 bits). -* '''Imp11''' was a version of Imp, bootstrapped through Skimp but implementing most of the language, written to support the PDP11 processors used at Edinburgh for the communications network. -* '''Imp77''' was a full implementation of Imp supporting all language features, written by Peter Robertson of the Department of Computer Science in support of his PhD thesis on the subject of portable intermediate codes. Imp77 was adopted as the primary compiler of the Department of Computer Science at Edinburgh and made available on many architectures. Most Imp submissions to Rosetta Code will be in Imp77 because it is the only version of Imp remaining with a native compiler available (x86) although there are a few other architectures still usable under emulation. The current Imp77 compiler is a hobbyist revival and is to some extent still under development, lacking the extensive library support and runtime diagnostics that were present in Edinburgh University implementations. -* '''Imp80''' was an attempt to merge Iopt and Imp77 into a common subset language, as the versions of Imp used by the Edinburgh Regional Computing Center and the Department of Computer Science had diverged sufficiently by 1980, that much code was not compatible between the two versions. The standardisation process that Imp80 started was never completed as Edinburgh abandoned the use of Imp in the 1980's, under political pressure to switch to using languages with a broader code base. - -==Overview== - -Imp is structurally very similar to Algol 60 except that instead of Algol's "name" parameters which implement a somewhat broken call-by-substitution mechanism, Imp uses call-by-reference, passing the address of a variable instead, and implicitly de-referencing such variables within a procedure, without requiring explicit syntax to access them as would be done in C for example. - -==Stropping== - -Imp uses keywords rather than reserved words, and in principle keywords in an Imp program are written with underlining. However this was seldom done in practise (in fact the last implementation to support underlining was back when the language was still called Atlas Autocode) and the convention used was that alphabetic sequences introduced by a '%' character were to be considered as being underlined, with the underlining terminating on the first non-alphabetic character. Imp compilers applied a 'line reconstruction' phase to their input, converting underlined letters into an internal representation distinct from regular letters, whilst removing all spaces (but not line endings) from the input other than within quoted strings and characters. - -It is however quite acceptable to show listings of Imp programs with underlined (or bold) keywords in place of %-stropped keywords. -==Citation== - -==Todo== -* [[Tasks not implemented in Imp77]] - - -{{language programming paradigm|Imperative}} \ No newline at end of file diff --git a/Lang/Imp77/00-META.yaml b/Lang/Imp77/00-META.yaml deleted file mode 100644 index 382e836f84..0000000000 --- a/Lang/Imp77/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Imp77 diff --git a/Lang/Imp77/Towers-of-Hanoi b/Lang/Imp77/Towers-of-Hanoi deleted file mode 120000 index 9cf1e23a14..0000000000 --- a/Lang/Imp77/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Imp77 \ No newline at end of file diff --git a/Lang/Imp77/Trabb-Pardo-Knuth-algorithm b/Lang/Imp77/Trabb-Pardo-Knuth-algorithm deleted file mode 120000 index 974a19fbc9..0000000000 --- a/Lang/Imp77/Trabb-Pardo-Knuth-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trabb-Pardo-Knuth-algorithm/Imp77 \ No newline at end of file diff --git a/Lang/Insitux/00-LANG.txt b/Lang/Insitux/00-LANG.txt index b852a0706e..ffe7dc9e9e 100644 --- a/Lang/Insitux/00-LANG.txt +++ b/Lang/Insitux/00-LANG.txt @@ -3,8 +3,10 @@ |hopl=no |tags=insitux}} -Insitux (pronounced /ɪnˈsɪtjuːɪks/) is a dynamically-typed functional scripting language inspired by Clojure, originally commissioned in July 2021 for safe and extensible in-game scripting in a popular Roblox game. It now targets Node.js/Bun and client-side web. +Insitux (pronounced /ɪnˈsɪtjuːɪks/) is a dynamically-typed functional scripting language inspired by Clojure, originally commissioned in July 2021 for safe and extensible in-game scripting in a popular Roblox game. It has retained compatibility with Roblox by using two sets of "poly-fills" between [https://roblox-ts.com/ roblox-ts] and Node.js / web, meaning it can target Roblox, Node.js, and web with two slightly varying codebases. -Despite its origins it is a capable language, with development focusing on the language itself, its Node.js ecosystem, and to a lesser extent its web ecosystem. This primarily involves adding to the already 200+ built-in operations, which tend to cause existing Insitux programs to shrink in size over time; and improving language performance since dropping Roblox compatibility in 2024. +Despite its origins it is a capable language, with development focusing on the language itself, its Node.js ecosystem, and to a lesser extent its web ecosystem. This primarily involves adding to the already 200+ built-in operations, which tend to cause existing Insitux programs to shrink in size over time. + +Insitux currently does not have a performance focus, and due to its syntactic flexibility, and its engine being transpiled into both JavaScript and [https://luau-lang.org/ Luau], it is difficult to optimise. Eventually Roblox support will be dropped / forked, pivoting mainline Insitux into AOT and JIT JavaScript transpilation. {{language programming paradigm|functional}} \ No newline at end of file diff --git a/Lang/Isabelle/Bernoulli-numbers b/Lang/Isabelle/Bernoulli-numbers deleted file mode 120000 index 73728f3564..0000000000 --- a/Lang/Isabelle/Bernoulli-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bernoulli-numbers/Isabelle \ No newline at end of file diff --git a/Lang/Isabelle/Catalan-numbers b/Lang/Isabelle/Catalan-numbers deleted file mode 120000 index b2ce7b3a40..0000000000 --- a/Lang/Isabelle/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/Isabelle \ No newline at end of file diff --git a/Lang/J/00-LANG.txt b/Lang/J/00-LANG.txt index 5ca185b4f1..c3a67e79d5 100644 --- a/Lang/J/00-LANG.txt +++ b/Lang/J/00-LANG.txt @@ -117,7 +117,6 @@ Discussion of the goals of the J community on RC and general guidelines for pres *[[User:Lambertdw|David Lambert]]:[[Special:Contributions/Lambertdw|contributions]] *[[User:JimTheriot|JimTheriot]]: [[Special:Contributions/JimTheriot|contributions]] *[[User:DevonMcC|Devon McCormick]]: [[Special:Contributions/DevonMcC|contributions]] -*[[User:Cchando|Cameron Chandoke]]: [[Special:Contributions/Cchando|contributions]], [[j:User:Cameron_Chandoke|J wiki]] == Try me == diff --git a/Lang/J/Bioinformatics-base-count b/Lang/J/Bioinformatics-base-count new file mode 120000 index 0000000000..78c6127b60 --- /dev/null +++ b/Lang/J/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/J \ No newline at end of file diff --git a/Lang/J/Meissel-Mertens-constant b/Lang/J/Meissel-Mertens-constant new file mode 120000 index 0000000000..04eb0042a3 --- /dev/null +++ b/Lang/J/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/J \ No newline at end of file diff --git a/Lang/J/Quaternion-type b/Lang/J/Quaternion-type new file mode 120000 index 0000000000..0868577467 --- /dev/null +++ b/Lang/J/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/J \ No newline at end of file diff --git a/Lang/J/Sequence:-nth-number-with-exactly-n-divisors b/Lang/J/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/J/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/J/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/J/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/J/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/J/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/J/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/J/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/J/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/J/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/J/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/J/Sorting-Algorithms-Circle-Sort b/Lang/J/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..c9563959dd --- /dev/null +++ b/Lang/J/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/J \ No newline at end of file diff --git a/Lang/Jactl/00-LANG.txt b/Lang/Jactl/00-LANG.txt deleted file mode 100644 index 108b3303c1..0000000000 --- a/Lang/Jactl/00-LANG.txt +++ /dev/null @@ -1,8 +0,0 @@ -{{stub}}{{language|Jactl}} - -Jactl is an open source scripting language that compiles to JVM byte-code. -It can be run stand-alone or embedded in Java applications. - -Documentation site: https://jactl.io - -Github repository: https://github.com/jaccomoc/jactl \ No newline at end of file diff --git a/Lang/Jactl/00-META.yaml b/Lang/Jactl/00-META.yaml deleted file mode 100644 index c4f2a6e6a8..0000000000 --- a/Lang/Jactl/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Jactl diff --git a/Lang/Jactl/Apply-a-callback-to-an-array b/Lang/Jactl/Apply-a-callback-to-an-array deleted file mode 120000 index 0b25c16ea6..0000000000 --- a/Lang/Jactl/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Associative-array-Creation b/Lang/Jactl/Associative-array-Creation deleted file mode 120000 index df471994d0..0000000000 --- a/Lang/Jactl/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Associative-array-Iteration b/Lang/Jactl/Associative-array-Iteration deleted file mode 120000 index c89bf33985..0000000000 --- a/Lang/Jactl/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Closures-Value-capture b/Lang/Jactl/Closures-Value-capture deleted file mode 120000 index 838f9ae309..0000000000 --- a/Lang/Jactl/Closures-Value-capture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closures-Value-capture/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Colorful-numbers b/Lang/Jactl/Colorful-numbers deleted file mode 120000 index a03bdecce3..0000000000 --- a/Lang/Jactl/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Fibonacci-sequence b/Lang/Jactl/Fibonacci-sequence deleted file mode 120000 index 6763bcee23..0000000000 --- a/Lang/Jactl/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Jactl \ No newline at end of file diff --git a/Lang/Jactl/FizzBuzz b/Lang/Jactl/FizzBuzz deleted file mode 120000 index fd8d004ee0..0000000000 --- a/Lang/Jactl/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Hello-world-Newline-omission b/Lang/Jactl/Hello-world-Newline-omission deleted file mode 120000 index d612b43ea9..0000000000 --- a/Lang/Jactl/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Hello-world-Text b/Lang/Jactl/Hello-world-Text deleted file mode 120000 index fba754494d..0000000000 --- a/Lang/Jactl/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loop-over-multiple-arrays-simultaneously b/Lang/Jactl/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index 208e0c484c..0000000000 --- a/Lang/Jactl/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-Break b/Lang/Jactl/Loops-Break deleted file mode 120000 index e1f4382462..0000000000 --- a/Lang/Jactl/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-Continue b/Lang/Jactl/Loops-Continue deleted file mode 120000 index d7062f586e..0000000000 --- a/Lang/Jactl/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-Do-while b/Lang/Jactl/Loops-Do-while deleted file mode 120000 index 70f4e6642c..0000000000 --- a/Lang/Jactl/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-Downward-for b/Lang/Jactl/Loops-Downward-for deleted file mode 120000 index e955b7c7cb..0000000000 --- a/Lang/Jactl/Loops-Downward-for +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Downward-for/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-For b/Lang/Jactl/Loops-For deleted file mode 120000 index 69ac8efd8b..0000000000 --- a/Lang/Jactl/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-For-with-a-specified-step b/Lang/Jactl/Loops-For-with-a-specified-step deleted file mode 120000 index cc4794f4cd..0000000000 --- a/Lang/Jactl/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-Foreach b/Lang/Jactl/Loops-Foreach deleted file mode 120000 index 5acefa1624..0000000000 --- a/Lang/Jactl/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-Increment-loop-index-within-loop-body b/Lang/Jactl/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index db9efe2bf3..0000000000 --- a/Lang/Jactl/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-Infinite b/Lang/Jactl/Loops-Infinite deleted file mode 120000 index 7f2c46419c..0000000000 --- a/Lang/Jactl/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-N-plus-one-half b/Lang/Jactl/Loops-N-plus-one-half deleted file mode 120000 index 03de5e2ce5..0000000000 --- a/Lang/Jactl/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-Nested b/Lang/Jactl/Loops-Nested deleted file mode 120000 index 4ee2958398..0000000000 --- a/Lang/Jactl/Loops-Nested +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Nested/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Loops-While b/Lang/Jactl/Loops-While deleted file mode 120000 index 306a1e9dea..0000000000 --- a/Lang/Jactl/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Selectively-replace-multiple-instances-of-a-character-within-a-string b/Lang/Jactl/Selectively-replace-multiple-instances-of-a-character-within-a-string deleted file mode 120000 index 5c89cea762..0000000000 --- a/Lang/Jactl/Selectively-replace-multiple-instances-of-a-character-within-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Selectively-replace-multiple-instances-of-a-character-within-a-string/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Sorting-algorithms-Merge-sort b/Lang/Jactl/Sorting-algorithms-Merge-sort deleted file mode 120000 index f5d29cd0bd..0000000000 --- a/Lang/Jactl/Sorting-algorithms-Merge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Merge-sort/Jactl \ No newline at end of file diff --git a/Lang/Jactl/Sorting-algorithms-Quicksort b/Lang/Jactl/Sorting-algorithms-Quicksort deleted file mode 120000 index 6ebc4a30df..0000000000 --- a/Lang/Jactl/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/Jactl \ No newline at end of file diff --git a/Lang/Jactl/String-interpolation-included- b/Lang/Jactl/String-interpolation-included- deleted file mode 120000 index 4aeb71ddbe..0000000000 --- a/Lang/Jactl/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/Jactl \ No newline at end of file diff --git a/Lang/Janet/Check-input-device-is-a-terminal b/Lang/Janet/Check-input-device-is-a-terminal deleted file mode 120000 index 2a4f62bb71..0000000000 --- a/Lang/Janet/Check-input-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-input-device-is-a-terminal/Janet \ No newline at end of file diff --git a/Lang/Janet/Check-output-device-is-a-terminal b/Lang/Janet/Check-output-device-is-a-terminal deleted file mode 120000 index 8405e395e2..0000000000 --- a/Lang/Janet/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/Janet \ No newline at end of file diff --git a/Lang/Janet/Comments b/Lang/Janet/Comments deleted file mode 120000 index b5297d4f4d..0000000000 --- a/Lang/Janet/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Janet \ No newline at end of file diff --git a/Lang/Janet/Determine-if-a-string-has-all-the-same-characters b/Lang/Janet/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 361efcff47..0000000000 --- a/Lang/Janet/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/Janet \ No newline at end of file diff --git a/Lang/Janet/Environment-variables b/Lang/Janet/Environment-variables deleted file mode 120000 index 7f09b690ca..0000000000 --- a/Lang/Janet/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/Janet \ No newline at end of file diff --git a/Lang/Janet/Loops-Infinite b/Lang/Janet/Loops-Infinite deleted file mode 120000 index 6c4ed476ed..0000000000 --- a/Lang/Janet/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Janet \ No newline at end of file diff --git a/Lang/Janet/Nested-function b/Lang/Janet/Nested-function deleted file mode 120000 index cc57c8a9fa..0000000000 --- a/Lang/Janet/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/Janet \ No newline at end of file diff --git a/Lang/Janet/Partial-function-application b/Lang/Janet/Partial-function-application deleted file mode 120000 index 2936ce5923..0000000000 --- a/Lang/Janet/Partial-function-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partial-function-application/Janet \ No newline at end of file diff --git a/Lang/Janet/Short-circuit-evaluation b/Lang/Janet/Short-circuit-evaluation deleted file mode 120000 index c41f99f9ac..0000000000 --- a/Lang/Janet/Short-circuit-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Short-circuit-evaluation/Janet \ No newline at end of file diff --git a/Lang/Janet/Sum-and-product-of-an-array b/Lang/Janet/Sum-and-product-of-an-array deleted file mode 120000 index 798628772b..0000000000 --- a/Lang/Janet/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/Janet \ No newline at end of file diff --git a/Lang/Java/00-LANG.txt b/Lang/Java/00-LANG.txt index 9df12a7429..72a980a538 100644 --- a/Lang/Java/00-LANG.txt +++ b/Lang/Java/00-LANG.txt @@ -41,4 +41,4 @@ Useful Java links: * [http://openjdk.java.net OpenJDK] ==Todo== -[https://rosettacode.org/wiki/Tasks_not_implemented_in_Java Tasks not implemented in Java] \ No newline at end of file +[[Reports:Tasks_not_implemented_in_Java]] \ No newline at end of file diff --git a/Lang/Java/Arena-storage-pool b/Lang/Java/Arena-storage-pool deleted file mode 120000 index 11592b83c1..0000000000 --- a/Lang/Java/Arena-storage-pool +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arena-storage-pool/Java \ No newline at end of file diff --git a/Lang/Java/Bioinformatics-base-count b/Lang/Java/Bioinformatics-base-count new file mode 120000 index 0000000000..a3d5761560 --- /dev/null +++ b/Lang/Java/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Java \ No newline at end of file diff --git a/Lang/Java/Bitcoin-public-point-to-address b/Lang/Java/Bitcoin-public-point-to-address deleted file mode 120000 index cbdcab404f..0000000000 --- a/Lang/Java/Bitcoin-public-point-to-address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitcoin-public-point-to-address/Java \ No newline at end of file diff --git a/Lang/Java/Bitwise-IO b/Lang/Java/Bitwise-IO deleted file mode 120000 index 91887eddd0..0000000000 --- a/Lang/Java/Bitwise-IO +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-IO/Java \ No newline at end of file diff --git a/Lang/Java/Catmull-Clark-subdivision-surface b/Lang/Java/Catmull-Clark-subdivision-surface deleted file mode 120000 index cc0173bf86..0000000000 --- a/Lang/Java/Catmull-Clark-subdivision-surface +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catmull-Clark-subdivision-surface/Java \ No newline at end of file diff --git a/Lang/Java/Check-output-device-is-a-terminal b/Lang/Java/Check-output-device-is-a-terminal deleted file mode 120000 index f5afcf5e18..0000000000 --- a/Lang/Java/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/Java \ No newline at end of file diff --git a/Lang/Java/Compare-sorting-algorithms-performance b/Lang/Java/Compare-sorting-algorithms-performance deleted file mode 120000 index 1c312e8af3..0000000000 --- a/Lang/Java/Compare-sorting-algorithms-performance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-sorting-algorithms-performance/Java \ No newline at end of file diff --git a/Lang/Java/Compiler-virtual-machine-interpreter b/Lang/Java/Compiler-virtual-machine-interpreter deleted file mode 120000 index 8a6c333099..0000000000 --- a/Lang/Java/Compiler-virtual-machine-interpreter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-virtual-machine-interpreter/Java \ No newline at end of file diff --git a/Lang/Java/Cyclops-numbers b/Lang/Java/Cyclops-numbers deleted file mode 120000 index 2d9674ea30..0000000000 --- a/Lang/Java/Cyclops-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclops-numbers/Java \ No newline at end of file diff --git a/Lang/Java/Deconvolution-2D+ b/Lang/Java/Deconvolution-2D+ deleted file mode 120000 index a4641fed07..0000000000 --- a/Lang/Java/Deconvolution-2D+ +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-2D+/Java \ No newline at end of file diff --git a/Lang/Java/Dominoes b/Lang/Java/Dominoes deleted file mode 120000 index f00d194617..0000000000 --- a/Lang/Java/Dominoes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dominoes/Java \ No newline at end of file diff --git a/Lang/Java/Events b/Lang/Java/Events deleted file mode 120000 index c4d1c5d403..0000000000 --- a/Lang/Java/Events +++ /dev/null @@ -1 +0,0 @@ -../../Task/Events/Java \ No newline at end of file diff --git a/Lang/Java/Fixed-length-records b/Lang/Java/Fixed-length-records deleted file mode 120000 index 8506be253e..0000000000 --- a/Lang/Java/Fixed-length-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fixed-length-records/Java \ No newline at end of file diff --git a/Lang/Java/French-Republican-calendar b/Lang/Java/French-Republican-calendar deleted file mode 120000 index 2451cb085a..0000000000 --- a/Lang/Java/French-Republican-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/French-Republican-calendar/Java \ No newline at end of file diff --git a/Lang/Java/Im-a-software-engineer-get-me-out-of-here b/Lang/Java/Im-a-software-engineer-get-me-out-of-here deleted file mode 120000 index 5e4c7fd308..0000000000 --- a/Lang/Java/Im-a-software-engineer-get-me-out-of-here +++ /dev/null @@ -1 +0,0 @@ -../../Task/Im-a-software-engineer-get-me-out-of-here/Java \ No newline at end of file diff --git a/Lang/Java/Matrix-exponentiation-operator b/Lang/Java/Matrix-exponentiation-operator deleted file mode 120000 index e07ce3d287..0000000000 --- a/Lang/Java/Matrix-exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-exponentiation-operator/Java \ No newline at end of file diff --git a/Lang/Java/Meissel-Mertens-constant b/Lang/Java/Meissel-Mertens-constant new file mode 120000 index 0000000000..f7dce3ca3d --- /dev/null +++ b/Lang/Java/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Java \ No newline at end of file diff --git a/Lang/Java/Miller-Rabin-primality-test b/Lang/Java/Miller-Rabin-primality-test new file mode 120000 index 0000000000..5708188da1 --- /dev/null +++ b/Lang/Java/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Java \ No newline at end of file diff --git a/Lang/Java/Natural-sorting b/Lang/Java/Natural-sorting deleted file mode 120000 index 9f37ed8709..0000000000 --- a/Lang/Java/Natural-sorting +++ /dev/null @@ -1 +0,0 @@ -../../Task/Natural-sorting/Java \ No newline at end of file diff --git a/Lang/Java/Nested-templated-data b/Lang/Java/Nested-templated-data deleted file mode 120000 index ffed37deff..0000000000 --- a/Lang/Java/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/Java \ No newline at end of file diff --git a/Lang/Java/Numerical-and-alphabetical-suffixes b/Lang/Java/Numerical-and-alphabetical-suffixes deleted file mode 120000 index b77e52fdf7..0000000000 --- a/Lang/Java/Numerical-and-alphabetical-suffixes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-and-alphabetical-suffixes/Java \ No newline at end of file diff --git a/Lang/Java/P-Adic-square-roots b/Lang/Java/P-Adic-square-roots deleted file mode 120000 index 768922bdbb..0000000000 --- a/Lang/Java/P-Adic-square-roots +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-square-roots/Java \ No newline at end of file diff --git a/Lang/Java/Quaternion-type b/Lang/Java/Quaternion-type new file mode 120000 index 0000000000..3cf154640d --- /dev/null +++ b/Lang/Java/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Java \ No newline at end of file diff --git a/Lang/Java/Rendezvous b/Lang/Java/Rendezvous deleted file mode 120000 index b182a3392e..0000000000 --- a/Lang/Java/Rendezvous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rendezvous/Java \ No newline at end of file diff --git a/Lang/Java/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Java/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Java/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Java/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Java/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Java/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Java/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Java/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Java/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Java/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Java/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Java/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Java/Sorting-Algorithms-Circle-Sort b/Lang/Java/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..2c7141e7c3 --- /dev/null +++ b/Lang/Java/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Java \ No newline at end of file diff --git a/Lang/Java/Strassens-algorithm b/Lang/Java/Strassens-algorithm deleted file mode 120000 index 1c8b3f279b..0000000000 --- a/Lang/Java/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Java \ No newline at end of file diff --git a/Lang/Java/Suffixation-of-decimal-numbers b/Lang/Java/Suffixation-of-decimal-numbers deleted file mode 120000 index a2b82d2da9..0000000000 --- a/Lang/Java/Suffixation-of-decimal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Suffixation-of-decimal-numbers/Java \ No newline at end of file diff --git a/Lang/Java/Sylvesters-sequence b/Lang/Java/Sylvesters-sequence deleted file mode 120000 index 6dfb05d095..0000000000 --- a/Lang/Java/Sylvesters-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sylvesters-sequence/Java \ No newline at end of file diff --git a/Lang/Java/Topic-variable b/Lang/Java/Topic-variable deleted file mode 120000 index 25c03be6d5..0000000000 --- a/Lang/Java/Topic-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topic-variable/Java \ No newline at end of file diff --git a/Lang/Java/Untouchable-numbers b/Lang/Java/Untouchable-numbers deleted file mode 120000 index 4fdd94665a..0000000000 --- a/Lang/Java/Untouchable-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Untouchable-numbers/Java \ No newline at end of file diff --git a/Lang/JavaScript/15-puzzle-solver b/Lang/JavaScript/15-puzzle-solver deleted file mode 120000 index 34b980cd29..0000000000 --- a/Lang/JavaScript/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/ADFGVX-cipher b/Lang/JavaScript/ADFGVX-cipher deleted file mode 120000 index eeef4038b2..0000000000 --- a/Lang/JavaScript/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Achilles-numbers b/Lang/JavaScript/Achilles-numbers deleted file mode 120000 index 0c343baad5..0000000000 --- a/Lang/JavaScript/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Aliquot-sequence-classifications b/Lang/JavaScript/Aliquot-sequence-classifications deleted file mode 120000 index 5043f9bf29..0000000000 --- a/Lang/JavaScript/Aliquot-sequence-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Aliquot-sequence-classifications/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Arithmetic-geometric-mean-Calculate-Pi b/Lang/JavaScript/Arithmetic-geometric-mean-Calculate-Pi deleted file mode 120000 index 28dcd16b9c..0000000000 --- a/Lang/JavaScript/Arithmetic-geometric-mean-Calculate-Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean-Calculate-Pi/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Arithmetic-numbers b/Lang/JavaScript/Arithmetic-numbers deleted file mode 120000 index ca8b16d782..0000000000 --- a/Lang/JavaScript/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Average-loop-length b/Lang/JavaScript/Average-loop-length deleted file mode 120000 index c1bd894dc5..0000000000 --- a/Lang/JavaScript/Average-loop-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Average-loop-length/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/B-zier-curves-Intersections b/Lang/JavaScript/B-zier-curves-Intersections deleted file mode 120000 index e14b622f07..0000000000 --- a/Lang/JavaScript/B-zier-curves-Intersections +++ /dev/null @@ -1 +0,0 @@ -../../Task/B-zier-curves-Intersections/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Babylonian-spiral b/Lang/JavaScript/Babylonian-spiral deleted file mode 120000 index c1ab7a098f..0000000000 --- a/Lang/JavaScript/Babylonian-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babylonian-spiral/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Balanced-ternary b/Lang/JavaScript/Balanced-ternary deleted file mode 120000 index c71298b653..0000000000 --- a/Lang/JavaScript/Balanced-ternary +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-ternary/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Bell-numbers b/Lang/JavaScript/Bell-numbers deleted file mode 120000 index d4be94731e..0000000000 --- a/Lang/JavaScript/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Bernoulli-numbers b/Lang/JavaScript/Bernoulli-numbers deleted file mode 120000 index 96368f729e..0000000000 --- a/Lang/JavaScript/Bernoulli-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bernoulli-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Bifid-cipher b/Lang/JavaScript/Bifid-cipher deleted file mode 120000 index 837e122e66..0000000000 --- a/Lang/JavaScript/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Bioinformatics-base-count b/Lang/JavaScript/Bioinformatics-base-count new file mode 120000 index 0000000000..033fba4ffa --- /dev/null +++ b/Lang/JavaScript/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Bitcoin-address-validation b/Lang/JavaScript/Bitcoin-address-validation deleted file mode 120000 index d09d433cd8..0000000000 --- a/Lang/JavaScript/Bitcoin-address-validation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitcoin-address-validation/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Bitcoin-public-point-to-address b/Lang/JavaScript/Bitcoin-public-point-to-address deleted file mode 120000 index c3f037151b..0000000000 --- a/Lang/JavaScript/Bitcoin-public-point-to-address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitcoin-public-point-to-address/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Boyer-Moore-string-search b/Lang/JavaScript/Boyer-Moore-string-search deleted file mode 120000 index b25016942d..0000000000 --- a/Lang/JavaScript/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Brazilian-numbers b/Lang/JavaScript/Brazilian-numbers deleted file mode 120000 index a5d5cf431a..0000000000 --- a/Lang/JavaScript/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Break-OO-privacy b/Lang/JavaScript/Break-OO-privacy deleted file mode 120000 index 085d7969ff..0000000000 --- a/Lang/JavaScript/Break-OO-privacy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Break-OO-privacy/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Brilliant-numbers b/Lang/JavaScript/Brilliant-numbers deleted file mode 120000 index 447591badd..0000000000 --- a/Lang/JavaScript/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Burrows-Wheeler-transform b/Lang/JavaScript/Burrows-Wheeler-transform deleted file mode 120000 index 79a79f877d..0000000000 --- a/Lang/JavaScript/Burrows-Wheeler-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Burrows-Wheeler-transform/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Calkin-Wilf-sequence b/Lang/JavaScript/Calkin-Wilf-sequence deleted file mode 120000 index 3eaf3f5375..0000000000 --- a/Lang/JavaScript/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Camel-case-and-snake-case b/Lang/JavaScript/Camel-case-and-snake-case deleted file mode 120000 index 0e52d396b8..0000000000 --- a/Lang/JavaScript/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Carmichael-3-strong-pseudoprimes b/Lang/JavaScript/Carmichael-3-strong-pseudoprimes deleted file mode 120000 index a3d0ffd992..0000000000 --- a/Lang/JavaScript/Carmichael-3-strong-pseudoprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Carmichael-3-strong-pseudoprimes/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Catmull-Clark-subdivision-surface b/Lang/JavaScript/Catmull-Clark-subdivision-surface deleted file mode 120000 index 40bf4ef0fc..0000000000 --- a/Lang/JavaScript/Catmull-Clark-subdivision-surface +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catmull-Clark-subdivision-surface/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Check-output-device-is-a-terminal b/Lang/JavaScript/Check-output-device-is-a-terminal deleted file mode 120000 index 0efca1a6ff..0000000000 --- a/Lang/JavaScript/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Checkpoint-synchronization b/Lang/JavaScript/Checkpoint-synchronization deleted file mode 120000 index cf18aef6aa..0000000000 --- a/Lang/JavaScript/Checkpoint-synchronization +++ /dev/null @@ -1 +0,0 @@ -../../Task/Checkpoint-synchronization/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Chernicks-Carmichael-numbers b/Lang/JavaScript/Chernicks-Carmichael-numbers deleted file mode 120000 index 45e47ff0f0..0000000000 --- a/Lang/JavaScript/Chernicks-Carmichael-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chernicks-Carmichael-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Chowla-numbers b/Lang/JavaScript/Chowla-numbers deleted file mode 120000 index 44b573de9f..0000000000 --- a/Lang/JavaScript/Chowla-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chowla-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Circular-primes b/Lang/JavaScript/Circular-primes deleted file mode 120000 index ce0d83b0b4..0000000000 --- a/Lang/JavaScript/Circular-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Circular-primes/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Colorful-numbers b/Lang/JavaScript/Colorful-numbers deleted file mode 120000 index 861658de92..0000000000 --- a/Lang/JavaScript/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Commatizing-numbers b/Lang/JavaScript/Commatizing-numbers deleted file mode 120000 index dac4a7f279..0000000000 --- a/Lang/JavaScript/Commatizing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Commatizing-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Compiler-code-generator b/Lang/JavaScript/Compiler-code-generator deleted file mode 120000 index 7b6f8e25b0..0000000000 --- a/Lang/JavaScript/Compiler-code-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-code-generator/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k b/Lang/JavaScript/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k deleted file mode 120000 index 2b7b501bb6..0000000000 --- a/Lang/JavaScript/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k +++ /dev/null @@ -1 +0,0 @@ -../../Task/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Continued-fraction b/Lang/JavaScript/Continued-fraction deleted file mode 120000 index 73bc586c57..0000000000 --- a/Lang/JavaScript/Continued-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Continued-fraction-Arithmetic-Construct-from-rational-number b/Lang/JavaScript/Continued-fraction-Arithmetic-Construct-from-rational-number deleted file mode 120000 index b87cd7b6a5..0000000000 --- a/Lang/JavaScript/Continued-fraction-Arithmetic-Construct-from-rational-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-Construct-from-rational-number/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/JavaScript/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- deleted file mode 120000 index 95862446c9..0000000000 --- a/Lang/JavaScript/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Create-a-file-on-magnetic-tape b/Lang/JavaScript/Create-a-file-on-magnetic-tape deleted file mode 120000 index 0f15206dcf..0000000000 --- a/Lang/JavaScript/Create-a-file-on-magnetic-tape +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-file-on-magnetic-tape/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Cuban-primes b/Lang/JavaScript/Cuban-primes deleted file mode 120000 index 4659a4500f..0000000000 --- a/Lang/JavaScript/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Cullen-and-Woodall-numbers b/Lang/JavaScript/Cullen-and-Woodall-numbers deleted file mode 120000 index 7d700fedb9..0000000000 --- a/Lang/JavaScript/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Curzon-numbers b/Lang/JavaScript/Curzon-numbers deleted file mode 120000 index 5d5da06bda..0000000000 --- a/Lang/JavaScript/Curzon-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Curzon-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Cyclops-numbers b/Lang/JavaScript/Cyclops-numbers deleted file mode 120000 index 6c3c7fc0d0..0000000000 --- a/Lang/JavaScript/Cyclops-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclops-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Cyclotomic-polynomial b/Lang/JavaScript/Cyclotomic-polynomial deleted file mode 120000 index 1407b6559c..0000000000 --- a/Lang/JavaScript/Cyclotomic-polynomial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclotomic-polynomial/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/De-Bruijn-sequences b/Lang/JavaScript/De-Bruijn-sequences deleted file mode 120000 index d753d9f9d0..0000000000 --- a/Lang/JavaScript/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Deconvolution-1D b/Lang/JavaScript/Deconvolution-1D deleted file mode 120000 index 719c208ec2..0000000000 --- a/Lang/JavaScript/Deconvolution-1D +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-1D/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Deconvolution-2D+ b/Lang/JavaScript/Deconvolution-2D+ deleted file mode 120000 index 61f93d9cd6..0000000000 --- a/Lang/JavaScript/Deconvolution-2D+ +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-2D+/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Demings-funnel b/Lang/JavaScript/Demings-funnel deleted file mode 120000 index 6225280d4a..0000000000 --- a/Lang/JavaScript/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Digital-root-Multiplicative-digital-root b/Lang/JavaScript/Digital-root-Multiplicative-digital-root deleted file mode 120000 index 6bac52bd37..0000000000 --- a/Lang/JavaScript/Digital-root-Multiplicative-digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root-Multiplicative-digital-root/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Display-a-linear-combination b/Lang/JavaScript/Display-a-linear-combination deleted file mode 120000 index 4b7084cb84..0000000000 --- a/Lang/JavaScript/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Distribution-of-0-digits-in-factorial-series b/Lang/JavaScript/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index 3fd7f0feb5..0000000000 --- a/Lang/JavaScript/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Dominoes b/Lang/JavaScript/Dominoes deleted file mode 120000 index 240a06d327..0000000000 --- a/Lang/JavaScript/Dominoes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dominoes/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Doomsday-rule b/Lang/JavaScript/Doomsday-rule deleted file mode 120000 index 53e067c157..0000000000 --- a/Lang/JavaScript/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Duffinian-numbers b/Lang/JavaScript/Duffinian-numbers deleted file mode 120000 index 852d875370..0000000000 --- a/Lang/JavaScript/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/EKG-sequence-convergence b/Lang/JavaScript/EKG-sequence-convergence deleted file mode 120000 index 2eef93ef6c..0000000000 --- a/Lang/JavaScript/EKG-sequence-convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/EKG-sequence-convergence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Eban-numbers b/Lang/JavaScript/Eban-numbers deleted file mode 120000 index 584fb39bde..0000000000 --- a/Lang/JavaScript/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Element-wise-operations b/Lang/JavaScript/Element-wise-operations deleted file mode 120000 index 179f9154f4..0000000000 --- a/Lang/JavaScript/Element-wise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Element-wise-operations/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Elliptic-Curve-Digital-Signature-Algorithm b/Lang/JavaScript/Elliptic-Curve-Digital-Signature-Algorithm deleted file mode 120000 index b9a9906259..0000000000 --- a/Lang/JavaScript/Elliptic-Curve-Digital-Signature-Algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-Curve-Digital-Signature-Algorithm/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Elliptic-curve-arithmetic b/Lang/JavaScript/Elliptic-curve-arithmetic deleted file mode 120000 index 41de6c075f..0000000000 --- a/Lang/JavaScript/Elliptic-curve-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-curve-arithmetic/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Erd-s-Nicolas-numbers b/Lang/JavaScript/Erd-s-Nicolas-numbers deleted file mode 120000 index 2d8924574b..0000000000 --- a/Lang/JavaScript/Erd-s-Nicolas-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Erd-s-Nicolas-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Erd-s-Selfridge-categorization-of-primes b/Lang/JavaScript/Erd-s-Selfridge-categorization-of-primes deleted file mode 120000 index 376367be26..0000000000 --- a/Lang/JavaScript/Erd-s-Selfridge-categorization-of-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Erd-s-Selfridge-categorization-of-primes/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Euclid-Mullin-sequence b/Lang/JavaScript/Euclid-Mullin-sequence deleted file mode 120000 index f2430affeb..0000000000 --- a/Lang/JavaScript/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Eulers-constant-0.5772... b/Lang/JavaScript/Eulers-constant-0.5772... deleted file mode 120000 index 3aac1cafba..0000000000 --- a/Lang/JavaScript/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Exponentiation-order b/Lang/JavaScript/Exponentiation-order deleted file mode 120000 index a3de1259b9..0000000000 --- a/Lang/JavaScript/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Exponentiation-with-infix-operators-in-or-operating-on-the-base b/Lang/JavaScript/Exponentiation-with-infix-operators-in-or-operating-on-the-base deleted file mode 120000 index d16e5defb5..0000000000 --- a/Lang/JavaScript/Exponentiation-with-infix-operators-in-or-operating-on-the-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-with-infix-operators-in-or-operating-on-the-base/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Factorial-base-numbers-indexing-permutations-of-a-collection b/Lang/JavaScript/Factorial-base-numbers-indexing-permutations-of-a-collection deleted file mode 120000 index 7b4e06b0ab..0000000000 --- a/Lang/JavaScript/Factorial-base-numbers-indexing-permutations-of-a-collection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-base-numbers-indexing-permutations-of-a-collection/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Factorions b/Lang/JavaScript/Factorions deleted file mode 120000 index d7c8ae41c4..0000000000 --- a/Lang/JavaScript/Factorions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorions/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Farey-sequence b/Lang/JavaScript/Farey-sequence deleted file mode 120000 index e324d68d34..0000000000 --- a/Lang/JavaScript/Farey-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Farey-sequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Faulhabers-formula b/Lang/JavaScript/Faulhabers-formula deleted file mode 120000 index 547452171f..0000000000 --- a/Lang/JavaScript/Faulhabers-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Faulhabers-formula/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Fermat-numbers b/Lang/JavaScript/Fermat-numbers deleted file mode 120000 index 14c8b8d697..0000000000 --- a/Lang/JavaScript/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Fraction-reduction b/Lang/JavaScript/Fraction-reduction deleted file mode 120000 index f3f2ab2629..0000000000 --- a/Lang/JavaScript/Fraction-reduction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fraction-reduction/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/French-Republican-calendar b/Lang/JavaScript/French-Republican-calendar deleted file mode 120000 index b3233aa527..0000000000 --- a/Lang/JavaScript/French-Republican-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/French-Republican-calendar/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Gauss-Jordan-matrix-inversion b/Lang/JavaScript/Gauss-Jordan-matrix-inversion deleted file mode 120000 index 77acac5de4..0000000000 --- a/Lang/JavaScript/Gauss-Jordan-matrix-inversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gauss-Jordan-matrix-inversion/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Giuga-numbers b/Lang/JavaScript/Giuga-numbers deleted file mode 120000 index 757d93b792..0000000000 --- a/Lang/JavaScript/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Graph-colouring b/Lang/JavaScript/Graph-colouring deleted file mode 120000 index 8c22e6e014..0000000000 --- a/Lang/JavaScript/Graph-colouring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Graph-colouring/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Greedy-algorithm-for-Egyptian-fractions b/Lang/JavaScript/Greedy-algorithm-for-Egyptian-fractions deleted file mode 120000 index 4b7a0299ee..0000000000 --- a/Lang/JavaScript/Greedy-algorithm-for-Egyptian-fractions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greedy-algorithm-for-Egyptian-fractions/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Halt-and-catch-fire b/Lang/JavaScript/Halt-and-catch-fire deleted file mode 120000 index 34a6fcf7d2..0000000000 --- a/Lang/JavaScript/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Home-primes b/Lang/JavaScript/Home-primes deleted file mode 120000 index 903d43b23e..0000000000 --- a/Lang/JavaScript/Home-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Home-primes/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Horizontal-sundial-calculations b/Lang/JavaScript/Horizontal-sundial-calculations deleted file mode 120000 index 854f95761b..0000000000 --- a/Lang/JavaScript/Horizontal-sundial-calculations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horizontal-sundial-calculations/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/ISBN13-check-digit b/Lang/JavaScript/ISBN13-check-digit deleted file mode 120000 index a76c26065c..0000000000 --- a/Lang/JavaScript/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Isqrt-integer-square-root-of-X b/Lang/JavaScript/Isqrt-integer-square-root-of-X deleted file mode 120000 index 7c262657f5..0000000000 --- a/Lang/JavaScript/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Jacobi-symbol b/Lang/JavaScript/Jacobi-symbol deleted file mode 120000 index 7ca750b7ca..0000000000 --- a/Lang/JavaScript/Jacobi-symbol +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobi-symbol/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Jaro-Winkler-distance b/Lang/JavaScript/Jaro-Winkler-distance deleted file mode 120000 index 48d79ffb3b..0000000000 --- a/Lang/JavaScript/Jaro-Winkler-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-Winkler-distance/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Jaro-similarity b/Lang/JavaScript/Jaro-similarity deleted file mode 120000 index 72e11e0e2b..0000000000 --- a/Lang/JavaScript/Jaro-similarity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-similarity/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Jordan-P-lya-numbers b/Lang/JavaScript/Jordan-P-lya-numbers deleted file mode 120000 index 1c850674c3..0000000000 --- a/Lang/JavaScript/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/K-d-tree b/Lang/JavaScript/K-d-tree deleted file mode 120000 index f551f8aa55..0000000000 --- a/Lang/JavaScript/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Knuths-algorithm-S b/Lang/JavaScript/Knuths-algorithm-S deleted file mode 120000 index 78ce9e9420..0000000000 --- a/Lang/JavaScript/Knuths-algorithm-S +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-algorithm-S/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Knuths-power-tree b/Lang/JavaScript/Knuths-power-tree deleted file mode 120000 index 65f212b8ef..0000000000 --- a/Lang/JavaScript/Knuths-power-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-power-tree/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Kolakoski-sequence b/Lang/JavaScript/Kolakoski-sequence deleted file mode 120000 index eac78035ff..0000000000 --- a/Lang/JavaScript/Kolakoski-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kolakoski-sequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Kosaraju b/Lang/JavaScript/Kosaraju deleted file mode 120000 index 679452fdc1..0000000000 --- a/Lang/JavaScript/Kosaraju +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kosaraju/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Largest-number-divisible-by-its-digits b/Lang/JavaScript/Largest-number-divisible-by-its-digits deleted file mode 120000 index 04fdf583a0..0000000000 --- a/Lang/JavaScript/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Largest-proper-divisor-of-n b/Lang/JavaScript/Largest-proper-divisor-of-n deleted file mode 120000 index 3f1ca809f7..0000000000 --- a/Lang/JavaScript/Largest-proper-divisor-of-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-proper-divisor-of-n/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Levenshtein-distance-Alignment b/Lang/JavaScript/Levenshtein-distance-Alignment deleted file mode 120000 index fabac4db0b..0000000000 --- a/Lang/JavaScript/Levenshtein-distance-Alignment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance-Alignment/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Linear-congruential-generator b/Lang/JavaScript/Linear-congruential-generator deleted file mode 120000 index 9664d4ce1d..0000000000 --- a/Lang/JavaScript/Linear-congruential-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Linear-congruential-generator/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Literals-Floating-point b/Lang/JavaScript/Literals-Floating-point deleted file mode 120000 index d4ebfbadf6..0000000000 --- a/Lang/JavaScript/Literals-Floating-point +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Floating-point/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Long-literals-with-continuations b/Lang/JavaScript/Long-literals-with-continuations deleted file mode 120000 index 51b7c2433b..0000000000 --- a/Lang/JavaScript/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Loops-With-multiple-ranges b/Lang/JavaScript/Loops-With-multiple-ranges deleted file mode 120000 index 0fe86f1b4e..0000000000 --- a/Lang/JavaScript/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Loops-Wrong-ranges b/Lang/JavaScript/Loops-Wrong-ranges deleted file mode 120000 index 285ca2bf4f..0000000000 --- a/Lang/JavaScript/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Lychrel-numbers b/Lang/JavaScript/Lychrel-numbers deleted file mode 120000 index ddc0a3b2ae..0000000000 --- a/Lang/JavaScript/Lychrel-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lychrel-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/M-bius-function b/Lang/JavaScript/M-bius-function deleted file mode 120000 index 8b88e437b9..0000000000 --- a/Lang/JavaScript/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/MD5 b/Lang/JavaScript/MD5 deleted file mode 120000 index 764b1e5dd2..0000000000 --- a/Lang/JavaScript/MD5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD5/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/MD5-Implementation b/Lang/JavaScript/MD5-Implementation deleted file mode 120000 index 96da37623c..0000000000 --- a/Lang/JavaScript/MD5-Implementation +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD5-Implementation/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Magic-constant b/Lang/JavaScript/Magic-constant deleted file mode 120000 index 93ac503011..0000000000 --- a/Lang/JavaScript/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Memory-layout-of-a-data-structure b/Lang/JavaScript/Memory-layout-of-a-data-structure deleted file mode 120000 index 40a22a351b..0000000000 --- a/Lang/JavaScript/Memory-layout-of-a-data-structure +++ /dev/null @@ -1 +0,0 @@ -../../Task/Memory-layout-of-a-data-structure/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Merge-and-aggregate-datasets b/Lang/JavaScript/Merge-and-aggregate-datasets deleted file mode 120000 index d1ec3fd3c7..0000000000 --- a/Lang/JavaScript/Merge-and-aggregate-datasets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Merge-and-aggregate-datasets/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Miller-Rabin-primality-test b/Lang/JavaScript/Miller-Rabin-primality-test new file mode 120000 index 0000000000..41f625032e --- /dev/null +++ b/Lang/JavaScript/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Motzkin-numbers b/Lang/JavaScript/Motzkin-numbers deleted file mode 120000 index f887ca66ad..0000000000 --- a/Lang/JavaScript/Motzkin-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Motzkin-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Numeric-error-propagation b/Lang/JavaScript/Numeric-error-propagation deleted file mode 120000 index 4c3115218f..0000000000 --- a/Lang/JavaScript/Numeric-error-propagation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numeric-error-propagation/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Numerical-integration b/Lang/JavaScript/Numerical-integration deleted file mode 120000 index b80325338d..0000000000 --- a/Lang/JavaScript/Numerical-integration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-integration/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Old-lady-swallowed-a-fly b/Lang/JavaScript/Old-lady-swallowed-a-fly deleted file mode 120000 index a49e302025..0000000000 --- a/Lang/JavaScript/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Own-digits-power-sum b/Lang/JavaScript/Own-digits-power-sum deleted file mode 120000 index af2067363a..0000000000 --- a/Lang/JavaScript/Own-digits-power-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Own-digits-power-sum/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/P-Adic-numbers-basic b/Lang/JavaScript/P-Adic-numbers-basic deleted file mode 120000 index 8430626fe6..0000000000 --- a/Lang/JavaScript/P-Adic-numbers-basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-numbers-basic/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/P-Adic-square-roots b/Lang/JavaScript/P-Adic-square-roots deleted file mode 120000 index dc1614d80a..0000000000 --- a/Lang/JavaScript/P-Adic-square-roots +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-square-roots/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/P-value-correction b/Lang/JavaScript/P-value-correction deleted file mode 120000 index 0bb6d9d877..0000000000 --- a/Lang/JavaScript/P-value-correction +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-value-correction/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Palindromic-gapful-numbers b/Lang/JavaScript/Palindromic-gapful-numbers deleted file mode 120000 index 3ea405216b..0000000000 --- a/Lang/JavaScript/Palindromic-gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindromic-gapful-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Pancake-numbers b/Lang/JavaScript/Pancake-numbers deleted file mode 120000 index 6f2eb315df..0000000000 --- a/Lang/JavaScript/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Paraffins b/Lang/JavaScript/Paraffins deleted file mode 120000 index 583d8a86f5..0000000000 --- a/Lang/JavaScript/Paraffins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Paraffins/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Parse-an-IP-Address b/Lang/JavaScript/Parse-an-IP-Address deleted file mode 120000 index 5981d2ba9f..0000000000 --- a/Lang/JavaScript/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Pascals-triangle-Puzzle b/Lang/JavaScript/Pascals-triangle-Puzzle deleted file mode 120000 index 2acf8cdb4d..0000000000 --- a/Lang/JavaScript/Pascals-triangle-Puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle-Puzzle/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Percolation-Bond-percolation b/Lang/JavaScript/Percolation-Bond-percolation deleted file mode 120000 index b784faa7b0..0000000000 --- a/Lang/JavaScript/Percolation-Bond-percolation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percolation-Bond-percolation/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Percolation-Mean-cluster-density b/Lang/JavaScript/Percolation-Mean-cluster-density deleted file mode 120000 index 8cad881ab4..0000000000 --- a/Lang/JavaScript/Percolation-Mean-cluster-density +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percolation-Mean-cluster-density/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Percolation-Mean-run-density b/Lang/JavaScript/Percolation-Mean-run-density deleted file mode 120000 index 6c804e3579..0000000000 --- a/Lang/JavaScript/Percolation-Mean-run-density +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percolation-Mean-run-density/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Percolation-Site-percolation b/Lang/JavaScript/Percolation-Site-percolation deleted file mode 120000 index 3d8672383d..0000000000 --- a/Lang/JavaScript/Percolation-Site-percolation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percolation-Site-percolation/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Periodic-table b/Lang/JavaScript/Periodic-table deleted file mode 120000 index 3252400859..0000000000 --- a/Lang/JavaScript/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Perlin-noise b/Lang/JavaScript/Perlin-noise deleted file mode 120000 index d4cfceb70d..0000000000 --- a/Lang/JavaScript/Perlin-noise +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perlin-noise/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Playfair-cipher b/Lang/JavaScript/Playfair-cipher deleted file mode 120000 index e94d50f327..0000000000 --- a/Lang/JavaScript/Playfair-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Playfair-cipher/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Priority-queue b/Lang/JavaScript/Priority-queue deleted file mode 120000 index 01d2cd2765..0000000000 --- a/Lang/JavaScript/Priority-queue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Priority-queue/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Pseudo-random-numbers-Middle-square-method b/Lang/JavaScript/Pseudo-random-numbers-Middle-square-method deleted file mode 120000 index 670dfa6542..0000000000 --- a/Lang/JavaScript/Pseudo-random-numbers-Middle-square-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Middle-square-method/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Pseudo-random-numbers-PCG32 b/Lang/JavaScript/Pseudo-random-numbers-PCG32 deleted file mode 120000 index 689b737182..0000000000 --- a/Lang/JavaScript/Pseudo-random-numbers-PCG32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-PCG32/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Pseudo-random-numbers-Splitmix64 b/Lang/JavaScript/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index e21d263f6d..0000000000 --- a/Lang/JavaScript/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Pseudo-random-numbers-Xorshift-star b/Lang/JavaScript/Pseudo-random-numbers-Xorshift-star deleted file mode 120000 index 40211cc2a7..0000000000 --- a/Lang/JavaScript/Pseudo-random-numbers-Xorshift-star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Xorshift-star/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/QR-decomposition b/Lang/JavaScript/QR-decomposition deleted file mode 120000 index 0913aa7d30..0000000000 --- a/Lang/JavaScript/QR-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/QR-decomposition/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Quaternion-type b/Lang/JavaScript/Quaternion-type new file mode 120000 index 0000000000..e2a6535526 --- /dev/null +++ b/Lang/JavaScript/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/RIPEMD-160 b/Lang/JavaScript/RIPEMD-160 deleted file mode 120000 index aa85f54790..0000000000 --- a/Lang/JavaScript/RIPEMD-160 +++ /dev/null @@ -1 +0,0 @@ -../../Task/RIPEMD-160/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Repeat b/Lang/JavaScript/Repeat deleted file mode 120000 index e8bb71f4ce..0000000000 --- a/Lang/JavaScript/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/SHA-1 b/Lang/JavaScript/SHA-1 deleted file mode 120000 index 2773e9c63c..0000000000 --- a/Lang/JavaScript/SHA-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-1/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/SHA-256-Merkle-tree b/Lang/JavaScript/SHA-256-Merkle-tree deleted file mode 120000 index 0c2b665899..0000000000 --- a/Lang/JavaScript/SHA-256-Merkle-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-256-Merkle-tree/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/JavaScript/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/JavaScript/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/JavaScript/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/JavaScript/Set-puzzle b/Lang/JavaScript/Set-puzzle deleted file mode 120000 index 22b0bad552..0000000000 --- a/Lang/JavaScript/Set-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-puzzle/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Shortest-common-supersequence b/Lang/JavaScript/Shortest-common-supersequence deleted file mode 120000 index 4e107e522e..0000000000 --- a/Lang/JavaScript/Shortest-common-supersequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shortest-common-supersequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Sisyphus-sequence b/Lang/JavaScript/Sisyphus-sequence deleted file mode 120000 index 67b00353f0..0000000000 --- a/Lang/JavaScript/Sisyphus-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sisyphus-sequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Smarandache-prime-digital-sequence b/Lang/JavaScript/Smarandache-prime-digital-sequence deleted file mode 120000 index 14cb702228..0000000000 --- a/Lang/JavaScript/Smarandache-prime-digital-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smarandache-prime-digital-sequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Sokoban b/Lang/JavaScript/Sokoban deleted file mode 120000 index 3ab86467bd..0000000000 --- a/Lang/JavaScript/Sokoban +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sokoban/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Solve-a-Hidato-puzzle b/Lang/JavaScript/Solve-a-Hidato-puzzle deleted file mode 120000 index 3e3c25cd7c..0000000000 --- a/Lang/JavaScript/Solve-a-Hidato-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hidato-puzzle/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Solve-a-Hopido-puzzle b/Lang/JavaScript/Solve-a-Hopido-puzzle deleted file mode 120000 index aea3983b76..0000000000 --- a/Lang/JavaScript/Solve-a-Hopido-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hopido-puzzle/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Solve-a-Numbrix-puzzle b/Lang/JavaScript/Solve-a-Numbrix-puzzle deleted file mode 120000 index 43202401f9..0000000000 --- a/Lang/JavaScript/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Sort-numbers-lexicographically b/Lang/JavaScript/Sort-numbers-lexicographically deleted file mode 120000 index 0350e5ac3a..0000000000 --- a/Lang/JavaScript/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Sorting-algorithms-Radix-sort b/Lang/JavaScript/Sorting-algorithms-Radix-sort deleted file mode 120000 index 0d4b9cb23d..0000000000 --- a/Lang/JavaScript/Sorting-algorithms-Radix-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Radix-sort/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Spelling-of-ordinal-numbers b/Lang/JavaScript/Spelling-of-ordinal-numbers deleted file mode 120000 index 5ed638cc81..0000000000 --- a/Lang/JavaScript/Spelling-of-ordinal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spelling-of-ordinal-numbers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Square-free-integers b/Lang/JavaScript/Square-free-integers deleted file mode 120000 index 5f495f4fd4..0000000000 --- a/Lang/JavaScript/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/State-name-puzzle b/Lang/JavaScript/State-name-puzzle deleted file mode 120000 index 12f667dc4c..0000000000 --- a/Lang/JavaScript/State-name-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/State-name-puzzle/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Steffensens-method b/Lang/JavaScript/Steffensens-method deleted file mode 120000 index 12c21e29e2..0000000000 --- a/Lang/JavaScript/Steffensens-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Steffensens-method/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Strassens-algorithm b/Lang/JavaScript/Strassens-algorithm deleted file mode 120000 index f4d0497694..0000000000 --- a/Lang/JavaScript/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Stream-merge b/Lang/JavaScript/Stream-merge deleted file mode 120000 index cf7057043d..0000000000 --- a/Lang/JavaScript/Stream-merge +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stream-merge/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Subleq b/Lang/JavaScript/Subleq deleted file mode 120000 index 19f1606c88..0000000000 --- a/Lang/JavaScript/Subleq +++ /dev/null @@ -1 +0,0 @@ -../../Task/Subleq/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Substitution-cipher b/Lang/JavaScript/Substitution-cipher deleted file mode 120000 index e8fd969b4a..0000000000 --- a/Lang/JavaScript/Substitution-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substitution-cipher/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Superpermutation-minimisation b/Lang/JavaScript/Superpermutation-minimisation deleted file mode 120000 index a257c8e7e7..0000000000 --- a/Lang/JavaScript/Superpermutation-minimisation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Superpermutation-minimisation/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Sylvesters-sequence b/Lang/JavaScript/Sylvesters-sequence deleted file mode 120000 index 472599a8bf..0000000000 --- a/Lang/JavaScript/Sylvesters-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sylvesters-sequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Tarjan b/Lang/JavaScript/Tarjan deleted file mode 120000 index c299c7aebb..0000000000 --- a/Lang/JavaScript/Tarjan +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tarjan/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Tau-number b/Lang/JavaScript/Tau-number deleted file mode 120000 index ff78310d47..0000000000 --- a/Lang/JavaScript/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Thieles-interpolation-formula b/Lang/JavaScript/Thieles-interpolation-formula deleted file mode 120000 index 4aa6c84146..0000000000 --- a/Lang/JavaScript/Thieles-interpolation-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thieles-interpolation-formula/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Tonelli-Shanks-algorithm b/Lang/JavaScript/Tonelli-Shanks-algorithm deleted file mode 120000 index f646a271d1..0000000000 --- a/Lang/JavaScript/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Topswops b/Lang/JavaScript/Topswops deleted file mode 120000 index cffdbd99df..0000000000 --- a/Lang/JavaScript/Topswops +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topswops/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Transliterate-English-text-using-the-Greek-alphabet b/Lang/JavaScript/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index 90b7eb9492..0000000000 --- a/Lang/JavaScript/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Twos-complement b/Lang/JavaScript/Twos-complement deleted file mode 120000 index d0b1730478..0000000000 --- a/Lang/JavaScript/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Ukkonen-s-suffix-tree-construction b/Lang/JavaScript/Ukkonen-s-suffix-tree-construction deleted file mode 120000 index 7a4d0832f5..0000000000 --- a/Lang/JavaScript/Ukkonen-s-suffix-tree-construction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ukkonen-s-suffix-tree-construction/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Unbias-a-random-generator b/Lang/JavaScript/Unbias-a-random-generator deleted file mode 120000 index 1e801c1fa5..0000000000 --- a/Lang/JavaScript/Unbias-a-random-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unbias-a-random-generator/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Unicode-strings b/Lang/JavaScript/Unicode-strings deleted file mode 120000 index ad6c128bef..0000000000 --- a/Lang/JavaScript/Unicode-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-strings/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Van-der-Corput-sequence b/Lang/JavaScript/Van-der-Corput-sequence deleted file mode 120000 index 41397b68df..0000000000 --- a/Lang/JavaScript/Van-der-Corput-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-der-Corput-sequence/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Vector b/Lang/JavaScript/Vector deleted file mode 120000 index fec6065641..0000000000 --- a/Lang/JavaScript/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Verhoeff-algorithm b/Lang/JavaScript/Verhoeff-algorithm deleted file mode 120000 index cd27def09b..0000000000 --- a/Lang/JavaScript/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Vigen-re-cipher-Cryptanalysis b/Lang/JavaScript/Vigen-re-cipher-Cryptanalysis deleted file mode 120000 index 53c004e91c..0000000000 --- a/Lang/JavaScript/Vigen-re-cipher-Cryptanalysis +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher-Cryptanalysis/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Vogels-approximation-method b/Lang/JavaScript/Vogels-approximation-method deleted file mode 120000 index 72693f1daa..0000000000 --- a/Lang/JavaScript/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Word-ladder b/Lang/JavaScript/Word-ladder deleted file mode 120000 index f78d94e145..0000000000 --- a/Lang/JavaScript/Word-ladder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-ladder/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Wordiff b/Lang/JavaScript/Wordiff deleted file mode 120000 index 18ec352da6..0000000000 --- a/Lang/JavaScript/Wordiff +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wordiff/JavaScript \ No newline at end of file diff --git a/Lang/JavaScript/Zebra-puzzle b/Lang/JavaScript/Zebra-puzzle deleted file mode 120000 index 5c531004b3..0000000000 --- a/Lang/JavaScript/Zebra-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zebra-puzzle/JavaScript \ No newline at end of file diff --git a/Lang/Joy/Case-sensitivity-of-identifiers b/Lang/Joy/Case-sensitivity-of-identifiers deleted file mode 120000 index e8f5c2c1db..0000000000 --- a/Lang/Joy/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/Joy \ No newline at end of file diff --git a/Lang/Joy/Read-a-file-line-by-line b/Lang/Joy/Read-a-file-line-by-line deleted file mode 120000 index 9985d0bc9c..0000000000 --- a/Lang/Joy/Read-a-file-line-by-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-line-by-line/Joy \ No newline at end of file diff --git a/Lang/Joy/Sort-an-integer-array b/Lang/Joy/Sort-an-integer-array deleted file mode 120000 index 91921cd08e..0000000000 --- a/Lang/Joy/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/Joy \ No newline at end of file diff --git a/Lang/Joy/Unicode-variable-names b/Lang/Joy/Unicode-variable-names deleted file mode 120000 index b7f93a76ef..0000000000 --- a/Lang/Joy/Unicode-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-variable-names/Joy \ No newline at end of file diff --git a/Lang/Jq/00-LANG.txt b/Lang/Jq/00-LANG.txt index a2d6626be7..3eba7f05c0 100644 --- a/Lang/Jq/00-LANG.txt +++ b/Lang/Jq/00-LANG.txt @@ -7,14 +7,9 @@ jq was originally designed and developed by Stephen Dolan. ==jq Modules at rosettacode.org== * [[:Category:Jq/assert.jq|assert.jq]] - module to support assertions -* [[:Category:Jq/bitwise.jq|bitwise.jq]] - bit streams, bit arrays, and integers * [[:Category:Jq/fibonacci.jq|fibonacci.jq]] - Fibonacci sequence and Fibonacci coding * [[:Category:Jq/peg.jq|peg.jq]] - Parsing Expression Grammar foundations * [[:Category:Jq/polynomials.jq|polynomials.jq]] - polynomials as JSON arrays -* [[:Category:Jq/rational.jq|rational.jq]] - rational numbers - -* [[:Category:Jq/Date.jq|Date.jq]] - Gregorian calendar from the year 1 -* [[:Category:Jq/MRG32k3a.jq|MRG32k3a.jq]] - MRG32k3a Combined Recursive Pseudo-Random Number Generator * [[:Category:Jq/RealSet.jq|RealSet.jq]] - Union of finite real intervals ==Todo== diff --git a/Lang/Jq/15-puzzle-game b/Lang/Jq/15-puzzle-game deleted file mode 120000 index 9c065d8ccc..0000000000 --- a/Lang/Jq/15-puzzle-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-game/Jq \ No newline at end of file diff --git a/Lang/Jq/15-puzzle-solver b/Lang/Jq/15-puzzle-solver deleted file mode 120000 index e822e3d4e7..0000000000 --- a/Lang/Jq/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/Jq \ No newline at end of file diff --git a/Lang/Jq/2048 b/Lang/Jq/2048 deleted file mode 120000 index e78d154a28..0000000000 --- a/Lang/Jq/2048 +++ /dev/null @@ -1 +0,0 @@ -../../Task/2048/Jq \ No newline at end of file diff --git a/Lang/Jq/24-game b/Lang/Jq/24-game deleted file mode 120000 index 1db8a29eb4..0000000000 --- a/Lang/Jq/24-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game/Jq \ No newline at end of file diff --git a/Lang/Jq/Averages-Simple-moving-average b/Lang/Jq/Averages-Simple-moving-average deleted file mode 120000 index 7c27d5bee2..0000000000 --- a/Lang/Jq/Averages-Simple-moving-average +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Simple-moving-average/Jq \ No newline at end of file diff --git a/Lang/Jq/Bioinformatics-base-count b/Lang/Jq/Bioinformatics-base-count new file mode 120000 index 0000000000..87df406d18 --- /dev/null +++ b/Lang/Jq/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Jq \ No newline at end of file diff --git a/Lang/Jq/Bitwise-operations b/Lang/Jq/Bitwise-operations deleted file mode 120000 index eff5a2f904..0000000000 --- a/Lang/Jq/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/Jq \ No newline at end of file diff --git a/Lang/Jq/CRC-32 b/Lang/Jq/CRC-32 deleted file mode 120000 index 800ab8f0ad..0000000000 --- a/Lang/Jq/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/Jq \ No newline at end of file diff --git a/Lang/Jq/Chaocipher b/Lang/Jq/Chaocipher deleted file mode 120000 index 3383992151..0000000000 --- a/Lang/Jq/Chaocipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaocipher/Jq \ No newline at end of file diff --git a/Lang/Jq/Continued-fraction-Arithmetic-Construct-from-rational-number b/Lang/Jq/Continued-fraction-Arithmetic-Construct-from-rational-number deleted file mode 120000 index 90c56c3b3a..0000000000 --- a/Lang/Jq/Continued-fraction-Arithmetic-Construct-from-rational-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-Construct-from-rational-number/Jq \ No newline at end of file diff --git a/Lang/Jq/Deconvolution-1D b/Lang/Jq/Deconvolution-1D deleted file mode 120000 index 4f872c1005..0000000000 --- a/Lang/Jq/Deconvolution-1D +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-1D/Jq \ No newline at end of file diff --git a/Lang/Jq/Display-an-outline-as-a-nested-table b/Lang/Jq/Display-an-outline-as-a-nested-table deleted file mode 120000 index 37137659b6..0000000000 --- a/Lang/Jq/Display-an-outline-as-a-nested-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-an-outline-as-a-nested-table/Jq \ No newline at end of file diff --git a/Lang/Jq/Draw-a-cuboid b/Lang/Jq/Draw-a-cuboid deleted file mode 120000 index 2af657c230..0000000000 --- a/Lang/Jq/Draw-a-cuboid +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-cuboid/Jq \ No newline at end of file diff --git a/Lang/Jq/Entropy-Narcissist b/Lang/Jq/Entropy-Narcissist deleted file mode 120000 index f142d7e681..0000000000 --- a/Lang/Jq/Entropy-Narcissist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy-Narcissist/Jq \ No newline at end of file diff --git a/Lang/Jq/Factors-of-a-Mersenne-number b/Lang/Jq/Factors-of-a-Mersenne-number deleted file mode 120000 index e34af6567d..0000000000 --- a/Lang/Jq/Factors-of-a-Mersenne-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-a-Mersenne-number/Jq \ No newline at end of file diff --git a/Lang/Jq/File-size-distribution b/Lang/Jq/File-size-distribution deleted file mode 120000 index d42e94402e..0000000000 --- a/Lang/Jq/File-size-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-size-distribution/Jq \ No newline at end of file diff --git a/Lang/Jq/Find-Chess960-starting-position-identifier b/Lang/Jq/Find-Chess960-starting-position-identifier deleted file mode 120000 index ea292cff65..0000000000 --- a/Lang/Jq/Find-Chess960-starting-position-identifier +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-Chess960-starting-position-identifier/Jq \ No newline at end of file diff --git a/Lang/Jq/Find-duplicate-files b/Lang/Jq/Find-duplicate-files deleted file mode 120000 index 289f08d02f..0000000000 --- a/Lang/Jq/Find-duplicate-files +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-duplicate-files/Jq \ No newline at end of file diff --git a/Lang/Jq/French-Republican-calendar b/Lang/Jq/French-Republican-calendar deleted file mode 120000 index d495d14d71..0000000000 --- a/Lang/Jq/French-Republican-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/French-Republican-calendar/Jq \ No newline at end of file diff --git a/Lang/Jq/Generate-random-chess-position b/Lang/Jq/Generate-random-chess-position deleted file mode 120000 index a6ff2b1df0..0000000000 --- a/Lang/Jq/Generate-random-chess-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-random-chess-position/Jq \ No newline at end of file diff --git a/Lang/Jq/Giuga-numbers b/Lang/Jq/Giuga-numbers deleted file mode 120000 index b5850902a3..0000000000 --- a/Lang/Jq/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/Jq \ No newline at end of file diff --git a/Lang/Jq/Graph-colouring b/Lang/Jq/Graph-colouring deleted file mode 120000 index 07b418f3a3..0000000000 --- a/Lang/Jq/Graph-colouring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Graph-colouring/Jq \ No newline at end of file diff --git a/Lang/Jq/Introspection b/Lang/Jq/Introspection deleted file mode 120000 index cdb6f22cc1..0000000000 --- a/Lang/Jq/Introspection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Introspection/Jq \ No newline at end of file diff --git a/Lang/Jq/Knights-tour b/Lang/Jq/Knights-tour deleted file mode 120000 index ca47275558..0000000000 --- a/Lang/Jq/Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knights-tour/Jq \ No newline at end of file diff --git a/Lang/Jq/Levenshtein-distance-Alignment b/Lang/Jq/Levenshtein-distance-Alignment deleted file mode 120000 index b331da38ff..0000000000 --- a/Lang/Jq/Levenshtein-distance-Alignment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance-Alignment/Jq \ No newline at end of file diff --git a/Lang/Jq/Mayan-calendar b/Lang/Jq/Mayan-calendar deleted file mode 120000 index aa0964c1d8..0000000000 --- a/Lang/Jq/Mayan-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-calendar/Jq \ No newline at end of file diff --git a/Lang/Jq/Mind-boggling-card-trick b/Lang/Jq/Mind-boggling-card-trick deleted file mode 120000 index 11a1e6dd3d..0000000000 --- a/Lang/Jq/Mind-boggling-card-trick +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mind-boggling-card-trick/Jq \ No newline at end of file diff --git a/Lang/Jq/Minimal-steps-down-to-1 b/Lang/Jq/Minimal-steps-down-to-1 deleted file mode 120000 index d05488db25..0000000000 --- a/Lang/Jq/Minimal-steps-down-to-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minimal-steps-down-to-1/Jq \ No newline at end of file diff --git a/Lang/Jq/Modified-random-distribution b/Lang/Jq/Modified-random-distribution deleted file mode 120000 index 5585f4b8dd..0000000000 --- a/Lang/Jq/Modified-random-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modified-random-distribution/Jq \ No newline at end of file diff --git a/Lang/Jq/Multiplicative-order b/Lang/Jq/Multiplicative-order deleted file mode 120000 index 72c4d667a9..0000000000 --- a/Lang/Jq/Multiplicative-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplicative-order/Jq \ No newline at end of file diff --git a/Lang/Jq/Nonoblock b/Lang/Jq/Nonoblock deleted file mode 120000 index f2323057e5..0000000000 --- a/Lang/Jq/Nonoblock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nonoblock/Jq \ No newline at end of file diff --git a/Lang/Jq/Nonogram-solver b/Lang/Jq/Nonogram-solver deleted file mode 120000 index 2ae5949d16..0000000000 --- a/Lang/Jq/Nonogram-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nonogram-solver/Jq \ No newline at end of file diff --git a/Lang/Jq/P-value-correction b/Lang/Jq/P-value-correction deleted file mode 120000 index 4685fd057d..0000000000 --- a/Lang/Jq/P-value-correction +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-value-correction/Jq \ No newline at end of file diff --git a/Lang/Jq/Palindromic-gapful-numbers b/Lang/Jq/Palindromic-gapful-numbers deleted file mode 120000 index 3f1d4b0a65..0000000000 --- a/Lang/Jq/Palindromic-gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindromic-gapful-numbers/Jq \ No newline at end of file diff --git a/Lang/Jq/Pancake-numbers b/Lang/Jq/Pancake-numbers deleted file mode 120000 index 7c0b6487cc..0000000000 --- a/Lang/Jq/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/Jq \ No newline at end of file diff --git a/Lang/Jq/Peaceful-chess-queen-armies b/Lang/Jq/Peaceful-chess-queen-armies deleted file mode 120000 index 7c675a3306..0000000000 --- a/Lang/Jq/Peaceful-chess-queen-armies +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peaceful-chess-queen-armies/Jq \ No newline at end of file diff --git a/Lang/Jq/Pentomino-tiling b/Lang/Jq/Pentomino-tiling deleted file mode 120000 index cce133df04..0000000000 --- a/Lang/Jq/Pentomino-tiling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pentomino-tiling/Jq \ No newline at end of file diff --git a/Lang/Jq/Perlin-noise b/Lang/Jq/Perlin-noise deleted file mode 120000 index eb52c317a2..0000000000 --- a/Lang/Jq/Perlin-noise +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perlin-noise/Jq \ No newline at end of file diff --git a/Lang/Jq/Pisano-period b/Lang/Jq/Pisano-period deleted file mode 120000 index 223468a26a..0000000000 --- a/Lang/Jq/Pisano-period +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pisano-period/Jq \ No newline at end of file diff --git a/Lang/Jq/Poker-hand-analyser b/Lang/Jq/Poker-hand-analyser deleted file mode 120000 index fd9738ce61..0000000000 --- a/Lang/Jq/Poker-hand-analyser +++ /dev/null @@ -1 +0,0 @@ -../../Task/Poker-hand-analyser/Jq \ No newline at end of file diff --git a/Lang/Jq/Polynomial-regression b/Lang/Jq/Polynomial-regression deleted file mode 120000 index 56985e2ba4..0000000000 --- a/Lang/Jq/Polynomial-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polynomial-regression/Jq \ No newline at end of file diff --git a/Lang/Jq/Prime-numbers-whose-neighboring-pairs-are-tetraprimes b/Lang/Jq/Prime-numbers-whose-neighboring-pairs-are-tetraprimes deleted file mode 120000 index e1fd0d226c..0000000000 --- a/Lang/Jq/Prime-numbers-whose-neighboring-pairs-are-tetraprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-numbers-whose-neighboring-pairs-are-tetraprimes/Jq \ No newline at end of file diff --git a/Lang/Jq/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a b/Lang/Jq/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a deleted file mode 120000 index 8a1fa69d52..0000000000 --- a/Lang/Jq/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a/Jq \ No newline at end of file diff --git a/Lang/Jq/Pseudo-random-numbers-PCG32 b/Lang/Jq/Pseudo-random-numbers-PCG32 deleted file mode 120000 index c80dea5d5d..0000000000 --- a/Lang/Jq/Pseudo-random-numbers-PCG32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-PCG32/Jq \ No newline at end of file diff --git a/Lang/Jq/Pseudo-random-numbers-Xorshift-star b/Lang/Jq/Pseudo-random-numbers-Xorshift-star deleted file mode 120000 index 54ff010417..0000000000 --- a/Lang/Jq/Pseudo-random-numbers-Xorshift-star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Xorshift-star/Jq \ No newline at end of file diff --git a/Lang/Jq/Quaternion-type b/Lang/Jq/Quaternion-type new file mode 120000 index 0000000000..36df977f17 --- /dev/null +++ b/Lang/Jq/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Jq \ No newline at end of file diff --git a/Lang/Jq/Ramer-Douglas-Peucker-line-simplification b/Lang/Jq/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index 2692c011c6..0000000000 --- a/Lang/Jq/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/Jq \ No newline at end of file diff --git a/Lang/Jq/Random-sentence-from-book b/Lang/Jq/Random-sentence-from-book deleted file mode 120000 index 677f7ffdcc..0000000000 --- a/Lang/Jq/Random-sentence-from-book +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-sentence-from-book/Jq \ No newline at end of file diff --git a/Lang/Jq/Rosetta-Code-Rank-languages-by-number-of-users b/Lang/Jq/Rosetta-Code-Rank-languages-by-number-of-users deleted file mode 120000 index 41c301e751..0000000000 --- a/Lang/Jq/Rosetta-Code-Rank-languages-by-number-of-users +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Rank-languages-by-number-of-users/Jq \ No newline at end of file diff --git a/Lang/Jq/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Jq/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Jq/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Jq/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Jq/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Jq/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Jq/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Jq/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Jq/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Jq/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Jq/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Jq/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Jq/Set-puzzle b/Lang/Jq/Set-puzzle deleted file mode 120000 index 4d4860ff33..0000000000 --- a/Lang/Jq/Set-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-puzzle/Jq \ No newline at end of file diff --git a/Lang/Jq/Set-right-adjacent-bits b/Lang/Jq/Set-right-adjacent-bits deleted file mode 120000 index 74d85af7c9..0000000000 --- a/Lang/Jq/Set-right-adjacent-bits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-right-adjacent-bits/Jq \ No newline at end of file diff --git a/Lang/Jq/Sierpinski-pentagon b/Lang/Jq/Sierpinski-pentagon deleted file mode 120000 index 25b52521df..0000000000 --- a/Lang/Jq/Sierpinski-pentagon +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-pentagon/Jq \ No newline at end of file diff --git a/Lang/Jq/Sleeping-Beauty-problem b/Lang/Jq/Sleeping-Beauty-problem deleted file mode 120000 index 56204d6c76..0000000000 --- a/Lang/Jq/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Jq \ No newline at end of file diff --git a/Lang/Jq/Solve-a-Hidato-puzzle b/Lang/Jq/Solve-a-Hidato-puzzle deleted file mode 120000 index e3f6b38721..0000000000 --- a/Lang/Jq/Solve-a-Hidato-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hidato-puzzle/Jq \ No newline at end of file diff --git a/Lang/Jq/Solve-a-Holy-Knights-tour b/Lang/Jq/Solve-a-Holy-Knights-tour deleted file mode 120000 index d69331eff1..0000000000 --- a/Lang/Jq/Solve-a-Holy-Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Holy-Knights-tour/Jq \ No newline at end of file diff --git a/Lang/Jq/Solve-a-Numbrix-puzzle b/Lang/Jq/Solve-a-Numbrix-puzzle deleted file mode 120000 index 29721632e1..0000000000 --- a/Lang/Jq/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/Jq \ No newline at end of file diff --git a/Lang/Jq/Sort-an-outline-at-every-level b/Lang/Jq/Sort-an-outline-at-every-level deleted file mode 120000 index bce371340d..0000000000 --- a/Lang/Jq/Sort-an-outline-at-every-level +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-outline-at-every-level/Jq \ No newline at end of file diff --git a/Lang/Jq/Sorting-Algorithms-Circle-Sort b/Lang/Jq/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..acb625912d --- /dev/null +++ b/Lang/Jq/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Jq \ No newline at end of file diff --git a/Lang/Jq/Strassens-algorithm b/Lang/Jq/Strassens-algorithm deleted file mode 120000 index d6ccda4254..0000000000 --- a/Lang/Jq/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Jq \ No newline at end of file diff --git a/Lang/Jq/Thieles-interpolation-formula b/Lang/Jq/Thieles-interpolation-formula deleted file mode 120000 index 25d4327e8c..0000000000 --- a/Lang/Jq/Thieles-interpolation-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thieles-interpolation-formula/Jq \ No newline at end of file diff --git a/Lang/Jq/Tic-tac-toe b/Lang/Jq/Tic-tac-toe deleted file mode 120000 index 29e18a13ef..0000000000 --- a/Lang/Jq/Tic-tac-toe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tic-tac-toe/Jq \ No newline at end of file diff --git a/Lang/Jq/Twos-complement b/Lang/Jq/Twos-complement deleted file mode 120000 index 79d28d31d7..0000000000 --- a/Lang/Jq/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Jq \ No newline at end of file diff --git a/Lang/Jq/Vogels-approximation-method b/Lang/Jq/Vogels-approximation-method deleted file mode 120000 index fb9aff7884..0000000000 --- a/Lang/Jq/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/Jq \ No newline at end of file diff --git a/Lang/Jq/War-card-game b/Lang/Jq/War-card-game deleted file mode 120000 index 428c4a1307..0000000000 --- a/Lang/Jq/War-card-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/War-card-game/Jq \ No newline at end of file diff --git a/Lang/Jq/Wordiff b/Lang/Jq/Wordiff deleted file mode 120000 index 61aa15852c..0000000000 --- a/Lang/Jq/Wordiff +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wordiff/Jq \ No newline at end of file diff --git a/Lang/Julia/Bioinformatics-base-count b/Lang/Julia/Bioinformatics-base-count new file mode 120000 index 0000000000..37835d6558 --- /dev/null +++ b/Lang/Julia/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Julia \ No newline at end of file diff --git a/Lang/Julia/Meissel-Mertens-constant b/Lang/Julia/Meissel-Mertens-constant new file mode 120000 index 0000000000..24fa8f526c --- /dev/null +++ b/Lang/Julia/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Julia \ No newline at end of file diff --git a/Lang/Julia/Miller-Rabin-primality-test b/Lang/Julia/Miller-Rabin-primality-test new file mode 120000 index 0000000000..1a7339a0d3 --- /dev/null +++ b/Lang/Julia/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Julia \ No newline at end of file diff --git a/Lang/Julia/OLE-automation b/Lang/Julia/OLE-automation deleted file mode 120000 index 58b1722653..0000000000 --- a/Lang/Julia/OLE-automation +++ /dev/null @@ -1 +0,0 @@ -../../Task/OLE-automation/Julia \ No newline at end of file diff --git a/Lang/Julia/Quaternion-type b/Lang/Julia/Quaternion-type new file mode 120000 index 0000000000..8a462d73ba --- /dev/null +++ b/Lang/Julia/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Julia \ No newline at end of file diff --git a/Lang/Julia/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Julia/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Julia/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Julia/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Julia/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Julia/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Julia/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Julia/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Julia/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Julia/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Julia/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Julia/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Julia/Simulate-input-Keyboard b/Lang/Julia/Simulate-input-Keyboard deleted file mode 120000 index 79cc3689e4..0000000000 --- a/Lang/Julia/Simulate-input-Keyboard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simulate-input-Keyboard/Julia \ No newline at end of file diff --git a/Lang/Julia/Sorting-Algorithms-Circle-Sort b/Lang/Julia/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..a8c5c2c2be --- /dev/null +++ b/Lang/Julia/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Julia \ No newline at end of file diff --git a/Lang/Julia/Use-another-language-to-call-a-function b/Lang/Julia/Use-another-language-to-call-a-function deleted file mode 120000 index c21a8c88ad..0000000000 --- a/Lang/Julia/Use-another-language-to-call-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Use-another-language-to-call-a-function/Julia \ No newline at end of file diff --git a/Lang/K/Abundant-odd-numbers b/Lang/K/Abundant-odd-numbers deleted file mode 120000 index e7fe0d3fc3..0000000000 --- a/Lang/K/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/K \ No newline at end of file diff --git a/Lang/K/Ascending-primes b/Lang/K/Ascending-primes deleted file mode 120000 index d9555980d2..0000000000 --- a/Lang/K/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/K \ No newline at end of file diff --git a/Lang/K/Benfords-law b/Lang/K/Benfords-law deleted file mode 120000 index 75ff9d97ad..0000000000 --- a/Lang/K/Benfords-law +++ /dev/null @@ -1 +0,0 @@ -../../Task/Benfords-law/K \ No newline at end of file diff --git a/Lang/K/Bulls-and-cows b/Lang/K/Bulls-and-cows deleted file mode 120000 index 97544c963d..0000000000 --- a/Lang/K/Bulls-and-cows +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bulls-and-cows/K \ No newline at end of file diff --git a/Lang/K/Circular-primes b/Lang/K/Circular-primes deleted file mode 120000 index 5e07afa7a8..0000000000 --- a/Lang/K/Circular-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Circular-primes/K \ No newline at end of file diff --git a/Lang/K/Compare-a-list-of-strings b/Lang/K/Compare-a-list-of-strings deleted file mode 120000 index e673df5891..0000000000 --- a/Lang/K/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/K \ No newline at end of file diff --git a/Lang/K/Compare-length-of-two-strings b/Lang/K/Compare-length-of-two-strings deleted file mode 120000 index 9854a6e09b..0000000000 --- a/Lang/K/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/K \ No newline at end of file diff --git a/Lang/K/Descending-primes b/Lang/K/Descending-primes deleted file mode 120000 index 1478a33e22..0000000000 --- a/Lang/K/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/K \ No newline at end of file diff --git a/Lang/K/Distribution-of-0-digits-in-factorial-series b/Lang/K/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index c4d66f6a7e..0000000000 --- a/Lang/K/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/K \ No newline at end of file diff --git a/Lang/K/Empty-program b/Lang/K/Empty-program new file mode 120000 index 0000000000..f255a9c6f6 --- /dev/null +++ b/Lang/K/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/K \ No newline at end of file diff --git a/Lang/K/Euler-method b/Lang/K/Euler-method deleted file mode 120000 index c1f821dc7c..0000000000 --- a/Lang/K/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/K \ No newline at end of file diff --git a/Lang/K/Find-common-directory-path b/Lang/K/Find-common-directory-path deleted file mode 120000 index 21e1ffcdd3..0000000000 --- a/Lang/K/Find-common-directory-path +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-common-directory-path/K \ No newline at end of file diff --git a/Lang/K/M-bius-function b/Lang/K/M-bius-function deleted file mode 120000 index e4dca86d37..0000000000 --- a/Lang/K/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/K \ No newline at end of file diff --git a/Lang/K/Monads-Maybe-monad b/Lang/K/Monads-Maybe-monad deleted file mode 120000 index c39136ba4b..0000000000 --- a/Lang/K/Monads-Maybe-monad +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monads-Maybe-monad/K \ No newline at end of file diff --git a/Lang/K/Monty-Hall-problem b/Lang/K/Monty-Hall-problem deleted file mode 120000 index 8fb0f9e98b..0000000000 --- a/Lang/K/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/K \ No newline at end of file diff --git a/Lang/K/Reverse-words-in-a-string b/Lang/K/Reverse-words-in-a-string deleted file mode 120000 index d83b97640c..0000000000 --- a/Lang/K/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/K \ No newline at end of file diff --git a/Lang/K/Sieve-of-Eratosthenes b/Lang/K/Sieve-of-Eratosthenes deleted file mode 120000 index c66b9a1b22..0000000000 --- a/Lang/K/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/K \ No newline at end of file diff --git a/Lang/K/Square-free-integers b/Lang/K/Square-free-integers deleted file mode 120000 index a0f2a0affe..0000000000 --- a/Lang/K/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/K \ No newline at end of file diff --git a/Lang/K/Substring b/Lang/K/Substring deleted file mode 120000 index 002d50df4f..0000000000 --- a/Lang/K/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/K \ No newline at end of file diff --git a/Lang/K/Sum-multiples-of-3-and-5 b/Lang/K/Sum-multiples-of-3-and-5 deleted file mode 120000 index 625ba55b5f..0000000000 --- a/Lang/K/Sum-multiples-of-3-and-5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-multiples-of-3-and-5/K \ No newline at end of file diff --git a/Lang/K/Tic-tac-toe b/Lang/K/Tic-tac-toe deleted file mode 120000 index bdd7e9ba5b..0000000000 --- a/Lang/K/Tic-tac-toe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tic-tac-toe/K \ No newline at end of file diff --git a/Lang/K/UTF-8-encode-and-decode b/Lang/K/UTF-8-encode-and-decode deleted file mode 120000 index f38c9e1894..0000000000 --- a/Lang/K/UTF-8-encode-and-decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/UTF-8-encode-and-decode/K \ No newline at end of file diff --git a/Lang/K/Write-float-arrays-to-a-text-file b/Lang/K/Write-float-arrays-to-a-text-file deleted file mode 120000 index 2af99671ba..0000000000 --- a/Lang/K/Write-float-arrays-to-a-text-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-float-arrays-to-a-text-file/K \ No newline at end of file diff --git a/Lang/Kantalo/00-LANG.txt b/Lang/Kantalo/00-LANG.txt deleted file mode 100644 index 453580c58d..0000000000 --- a/Lang/Kantalo/00-LANG.txt +++ /dev/null @@ -1,40 +0,0 @@ -{{language|Kantalo -|version=0.0.2 -|exec=interpreted -|strength=weak -|express=explicit -|checking=dynamic -|gc=yes -|tags=Kantalo,Language -|LCT=yes -|hopl=no -|safety=unsafe -|site=http://kantalo.kesug.com/}} - -=={{header|Kantalo}}== - -Kantalo is a non-object-oriented programming language, with the aim of making it easier to use. - -==Main commands== - -Here are some kantalo commands: - -
  • var.save - It is used to define variable.
  • -
  • var.import - Import variable outside functions.
  • -
  • var.edit - Edit an Existing Variable.
  • -
  • terminal.text - Returns a message passed within the argument.
  • -
  • terminal.input - Creates a text input.
  • -
  • if- Used to create conditions .
  • -
  • func - It is used to create functions.
  • -
  • execute - Performs functions.
  • - -
    -Simple Hello world with kantalo: -
    - -var.save nome = "Alice", -func saudacao > ( - terminal.text("Seja bem-vindo(a), -*nome*-!") -) -execute saudacao - \ No newline at end of file diff --git a/Lang/Kantalo/00-META.yaml b/Lang/Kantalo/00-META.yaml deleted file mode 100644 index c7d465ac08..0000000000 --- a/Lang/Kantalo/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Kantalo diff --git a/Lang/Koka/00-LANG.txt b/Lang/Koka/00-LANG.txt index 540a8fe180..96ea39de13 100644 --- a/Lang/Koka/00-LANG.txt +++ b/Lang/Koka/00-LANG.txt @@ -3,7 +3,7 @@ Releases: - https://github.com/koka-lang/koka/releases -Latest: v3.1.3 +Latest: v2.4.2 '''Language Reference''' diff --git a/Lang/Koka/A+B b/Lang/Koka/A+B deleted file mode 120000 index 5fcfbb2462..0000000000 --- a/Lang/Koka/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Koka \ No newline at end of file diff --git a/Lang/Koka/Extend-your-language b/Lang/Koka/Extend-your-language deleted file mode 120000 index fa9d061610..0000000000 --- a/Lang/Koka/Extend-your-language +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extend-your-language/Koka \ No newline at end of file diff --git a/Lang/Koka/Jump-anywhere b/Lang/Koka/Jump-anywhere deleted file mode 120000 index 39d5f8124d..0000000000 --- a/Lang/Koka/Jump-anywhere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jump-anywhere/Koka \ No newline at end of file diff --git a/Lang/Koka/Letter-frequency b/Lang/Koka/Letter-frequency deleted file mode 120000 index 35e2486b2e..0000000000 --- a/Lang/Koka/Letter-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Letter-frequency/Koka \ No newline at end of file diff --git a/Lang/Koka/Loops-Break b/Lang/Koka/Loops-Break deleted file mode 120000 index 21d8774db0..0000000000 --- a/Lang/Koka/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Koka \ No newline at end of file diff --git a/Lang/Koka/Man-or-boy-test b/Lang/Koka/Man-or-boy-test deleted file mode 120000 index d04c480201..0000000000 --- a/Lang/Koka/Man-or-boy-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Man-or-boy-test/Koka \ No newline at end of file diff --git a/Lang/Koka/Monads-Writer-monad b/Lang/Koka/Monads-Writer-monad deleted file mode 120000 index 21e3e4c596..0000000000 --- a/Lang/Koka/Monads-Writer-monad +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monads-Writer-monad/Koka \ No newline at end of file diff --git a/Lang/Koka/Nim-game b/Lang/Koka/Nim-game deleted file mode 120000 index f3fed42c95..0000000000 --- a/Lang/Koka/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/Koka \ No newline at end of file diff --git a/Lang/Koka/Order-by-pair-comparisons b/Lang/Koka/Order-by-pair-comparisons deleted file mode 120000 index f453142a5f..0000000000 --- a/Lang/Koka/Order-by-pair-comparisons +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-by-pair-comparisons/Koka \ No newline at end of file diff --git a/Lang/Komodo/00-LANG.txt b/Lang/Komodo/00-LANG.txt deleted file mode 100644 index 90f6e00b5c..0000000000 --- a/Lang/Komodo/00-LANG.txt +++ /dev/null @@ -1,4 +0,0 @@ -{{language -|exec=interpreted -|site=https://komodo-lang.org}}{{language programming paradigm|Declarative}}{{language programming paradigm|Procedural}} -Komodo is a programming language to test ideas in a fast and easy way. It is ideal for problems with basic discrete structures, like numbers and words. Komodo tries to make operating with these entities as easy as possible while minimizing the amount of code needed to achieve a successful implementation. Komodo is a scripting language regarding its flexibility, but it is a pretty specific language with a lot of assumptions about how things should be. Komodo is an experimental language, and some of its features are there because I had a personal preference for them. \ No newline at end of file diff --git a/Lang/Komodo/00-META.yaml b/Lang/Komodo/00-META.yaml deleted file mode 100644 index c626a5f324..0000000000 --- a/Lang/Komodo/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Komodo diff --git a/Lang/Komodo/Arithmetic-Integer b/Lang/Komodo/Arithmetic-Integer deleted file mode 120000 index bfaefbd88d..0000000000 --- a/Lang/Komodo/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Array-concatenation b/Lang/Komodo/Array-concatenation deleted file mode 120000 index bc329941d2..0000000000 --- a/Lang/Komodo/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Empty-string b/Lang/Komodo/Empty-string deleted file mode 120000 index 9210767339..0000000000 --- a/Lang/Komodo/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/Komodo \ No newline at end of file diff --git a/Lang/Komodo/FizzBuzz b/Lang/Komodo/FizzBuzz deleted file mode 120000 index 49b35c998a..0000000000 --- a/Lang/Komodo/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Function-definition b/Lang/Komodo/Function-definition deleted file mode 120000 index 375c03b7e3..0000000000 --- a/Lang/Komodo/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Greatest-element-of-a-list b/Lang/Komodo/Greatest-element-of-a-list deleted file mode 120000 index 61a341a27e..0000000000 --- a/Lang/Komodo/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Hello-world-Text b/Lang/Komodo/Hello-world-Text deleted file mode 120000 index cf4d6242bb..0000000000 --- a/Lang/Komodo/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Literals-Integer b/Lang/Komodo/Literals-Integer deleted file mode 120000 index e770e3710e..0000000000 --- a/Lang/Komodo/Literals-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Integer/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Logical-operations b/Lang/Komodo/Logical-operations deleted file mode 120000 index f15b7485a0..0000000000 --- a/Lang/Komodo/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Null-object b/Lang/Komodo/Null-object deleted file mode 120000 index a6a020a8ca..0000000000 --- a/Lang/Komodo/Null-object +++ /dev/null @@ -1 +0,0 @@ -../../Task/Null-object/Komodo \ No newline at end of file diff --git a/Lang/Komodo/Set b/Lang/Komodo/Set deleted file mode 120000 index a5c8370f07..0000000000 --- a/Lang/Komodo/Set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set/Komodo \ No newline at end of file diff --git a/Lang/Komodo/String-concatenation b/Lang/Komodo/String-concatenation deleted file mode 120000 index 72385e6195..0000000000 --- a/Lang/Komodo/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Komodo \ No newline at end of file diff --git a/Lang/Kotlin/00-LANG.txt b/Lang/Kotlin/00-LANG.txt index 95d9b59867..5f33d4bd2a 100644 --- a/Lang/Kotlin/00-LANG.txt +++ b/Lang/Kotlin/00-LANG.txt @@ -4,7 +4,7 @@ |site=http://kotlinlang.org |hopl=no }} -Kotlin is a statically-typed programming language that runs on the [[runs on vm::Java Virtual Machine]] (JVM) and can also be compiled to JavaScript. It is being developed by JetBrains with assistance from open source contributors and is intended for industrial use. +Kotlin is a statically-typed programming language that runs on the [[JVM]] and can also be compiled to JavaScript. It is being developed by JetBrains with assistance from open source contributors and is intended for industrial use. In addition, a separate team at JetBrains is developing a version of Kotlin which compiles (via LLVM) directly to machine code for various platforms. The first Technology Preview for this version was rolled out in April 2017. diff --git a/Lang/Kotlin/Bioinformatics-base-count b/Lang/Kotlin/Bioinformatics-base-count new file mode 120000 index 0000000000..998809c6ab --- /dev/null +++ b/Lang/Kotlin/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Boyer-Moore-string-search b/Lang/Kotlin/Boyer-Moore-string-search deleted file mode 120000 index 985c6560bd..0000000000 --- a/Lang/Kotlin/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Compare-length-of-two-strings b/Lang/Kotlin/Compare-length-of-two-strings deleted file mode 120000 index a8c0b8d6cf..0000000000 --- a/Lang/Kotlin/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Compiler-AST-interpreter b/Lang/Kotlin/Compiler-AST-interpreter deleted file mode 120000 index 5990b7f53e..0000000000 --- a/Lang/Kotlin/Compiler-AST-interpreter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-AST-interpreter/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Factorial-primes b/Lang/Kotlin/Factorial-primes deleted file mode 120000 index 36b19250f9..0000000000 --- a/Lang/Kotlin/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Miller-Rabin-primality-test b/Lang/Kotlin/Miller-Rabin-primality-test new file mode 120000 index 0000000000..4a724f8c08 --- /dev/null +++ b/Lang/Kotlin/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Quaternion-type b/Lang/Kotlin/Quaternion-type new file mode 120000 index 0000000000..a85b316d4c --- /dev/null +++ b/Lang/Kotlin/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Radical-of-an-integer b/Lang/Kotlin/Radical-of-an-integer deleted file mode 120000 index e9d51e3e8d..0000000000 --- a/Lang/Kotlin/Radical-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Radical-of-an-integer/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Kotlin/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Kotlin/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Kotlin/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Kotlin/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Kotlin/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Kotlin/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Kotlin/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Kotlin/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Kotlin/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Kotlin/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Kotlin/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Kotlin/Sorting-Algorithms-Circle-Sort b/Lang/Kotlin/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..74cde5ab2a --- /dev/null +++ b/Lang/Kotlin/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Kotlin \ No newline at end of file diff --git a/Lang/Kotlin/Strassens-algorithm b/Lang/Kotlin/Strassens-algorithm deleted file mode 120000 index f68cd59b88..0000000000 --- a/Lang/Kotlin/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Kotlin \ No newline at end of file diff --git a/Lang/LDPL/Command-line-arguments b/Lang/LDPL/Command-line-arguments deleted file mode 120000 index 7b4b88a226..0000000000 --- a/Lang/LDPL/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/LDPL \ No newline at end of file diff --git a/Lang/LOLCODE/00-LANG.txt b/Lang/LOLCODE/00-LANG.txt index 2195760c79..57c4165430 100644 --- a/Lang/LOLCODE/00-LANG.txt +++ b/Lang/LOLCODE/00-LANG.txt @@ -3,21 +3,4 @@ |site=http://lolcode.org/ |hopl=no }} - -LOLCODE is an esoteric language created by Adam Lindsay in 2007. It was inspired by the [https://en.wikipedia.org/wiki/Lolcat lolcat] phenomenon which began a year earlier. LOLCODE uses intentionally grammatically incorrect text known as lolspeak, a humorous imagining of what a cat might say if it could speak something resembling English. - -Here is an example program that prints the numbers 0 through 9 to standard output: - -HAI 1.3 - -IM IN YR loop UPPIN YR var TIL BOTH SAEM var AN 10 - VISIBLE var -IM OUTTA YR loop - -KTHXBYE - - -==Todo== -[https://rosettacode.org/wiki/Tasks_not_implemented_in_LOLCODE Tasks not implemented in LOLCODE] - [[Category:Esoteric Languages]] \ No newline at end of file diff --git a/Lang/LOLCODE/A+B b/Lang/LOLCODE/A+B deleted file mode 120000 index d5ea45853c..0000000000 --- a/Lang/LOLCODE/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Arithmetic-Integer b/Lang/LOLCODE/Arithmetic-Integer deleted file mode 120000 index bba2907420..0000000000 --- a/Lang/LOLCODE/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Boolean-values b/Lang/LOLCODE/Boolean-values deleted file mode 120000 index b3ad6a0e0d..0000000000 --- a/Lang/LOLCODE/Boolean-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boolean-values/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Case-sensitivity-of-identifiers b/Lang/LOLCODE/Case-sensitivity-of-identifiers deleted file mode 120000 index 32c69366ea..0000000000 --- a/Lang/LOLCODE/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Catalan-numbers b/Lang/LOLCODE/Catalan-numbers deleted file mode 120000 index 3fdf885cda..0000000000 --- a/Lang/LOLCODE/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Chinese-zodiac b/Lang/LOLCODE/Chinese-zodiac deleted file mode 120000 index 0169fc21dd..0000000000 --- a/Lang/LOLCODE/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Compound-data-type b/Lang/LOLCODE/Compound-data-type deleted file mode 120000 index a58d5bfd2a..0000000000 --- a/Lang/LOLCODE/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Conditional-structures b/Lang/LOLCODE/Conditional-structures deleted file mode 120000 index 15617a63e0..0000000000 --- a/Lang/LOLCODE/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Copy-a-string b/Lang/LOLCODE/Copy-a-string deleted file mode 120000 index deb186939a..0000000000 --- a/Lang/LOLCODE/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Determine-if-a-string-has-all-the-same-characters b/Lang/LOLCODE/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 492082be7e..0000000000 --- a/Lang/LOLCODE/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Dot-product b/Lang/LOLCODE/Dot-product deleted file mode 120000 index 0667fd8bc3..0000000000 --- a/Lang/LOLCODE/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Empty-program b/Lang/LOLCODE/Empty-program deleted file mode 120000 index 31b87c5a4b..0000000000 --- a/Lang/LOLCODE/Empty-program +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-program/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Evaluate-binomial-coefficients b/Lang/LOLCODE/Evaluate-binomial-coefficients deleted file mode 120000 index f6f761fd40..0000000000 --- a/Lang/LOLCODE/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Function-definition b/Lang/LOLCODE/Function-definition deleted file mode 120000 index c9fc3fa7a5..0000000000 --- a/Lang/LOLCODE/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Gotchas b/Lang/LOLCODE/Gotchas deleted file mode 120000 index 753dc0a0c3..0000000000 --- a/Lang/LOLCODE/Gotchas +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gotchas/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Hello-world-Newline-omission b/Lang/LOLCODE/Hello-world-Newline-omission deleted file mode 120000 index 29d6dd8c2e..0000000000 --- a/Lang/LOLCODE/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Integer-comparison b/Lang/LOLCODE/Integer-comparison deleted file mode 120000 index 565277c685..0000000000 --- a/Lang/LOLCODE/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Isqrt-integer-square-root-of-X b/Lang/LOLCODE/Isqrt-integer-square-root-of-X deleted file mode 120000 index 4aa1c0772e..0000000000 --- a/Lang/LOLCODE/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Jewels-and-stones b/Lang/LOLCODE/Jewels-and-stones deleted file mode 120000 index 5c30a50d3b..0000000000 --- a/Lang/LOLCODE/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Jordan-P-lya-numbers b/Lang/LOLCODE/Jordan-P-lya-numbers deleted file mode 120000 index d942ad0dab..0000000000 --- a/Lang/LOLCODE/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Loops-Do-while b/Lang/LOLCODE/Loops-Do-while deleted file mode 120000 index 55da8969f1..0000000000 --- a/Lang/LOLCODE/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Loops-Downward-for b/Lang/LOLCODE/Loops-Downward-for deleted file mode 120000 index 098dda4410..0000000000 --- a/Lang/LOLCODE/Loops-Downward-for +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Downward-for/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Loops-For b/Lang/LOLCODE/Loops-For deleted file mode 120000 index 131d677c68..0000000000 --- a/Lang/LOLCODE/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Loops-For-with-a-specified-step b/Lang/LOLCODE/Loops-For-with-a-specified-step deleted file mode 120000 index 5debcbe8c4..0000000000 --- a/Lang/LOLCODE/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Loops-N-plus-one-half b/Lang/LOLCODE/Loops-N-plus-one-half deleted file mode 120000 index f67d63ceea..0000000000 --- a/Lang/LOLCODE/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Menu b/Lang/LOLCODE/Menu deleted file mode 120000 index 8ec9ba2bbb..0000000000 --- a/Lang/LOLCODE/Menu +++ /dev/null @@ -1 +0,0 @@ -../../Task/Menu/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Nested-function b/Lang/LOLCODE/Nested-function deleted file mode 120000 index 28b8eedc4f..0000000000 --- a/Lang/LOLCODE/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Nim-game b/Lang/LOLCODE/Nim-game deleted file mode 120000 index 8694962a96..0000000000 --- a/Lang/LOLCODE/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Nth b/Lang/LOLCODE/Nth deleted file mode 120000 index ca0f39b290..0000000000 --- a/Lang/LOLCODE/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Primality-by-trial-division b/Lang/LOLCODE/Primality-by-trial-division deleted file mode 120000 index 243da2a0b6..0000000000 --- a/Lang/LOLCODE/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Real-constants-and-functions b/Lang/LOLCODE/Real-constants-and-functions deleted file mode 120000 index 9cae154fda..0000000000 --- a/Lang/LOLCODE/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Repeat b/Lang/LOLCODE/Repeat deleted file mode 120000 index bfb28ef859..0000000000 --- a/Lang/LOLCODE/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Repeat-a-string b/Lang/LOLCODE/Repeat-a-string deleted file mode 120000 index b733bdc3e9..0000000000 --- a/Lang/LOLCODE/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Return-multiple-values b/Lang/LOLCODE/Return-multiple-values deleted file mode 120000 index 326bda4561..0000000000 --- a/Lang/LOLCODE/Return-multiple-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Return-multiple-values/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Reverse-a-string b/Lang/LOLCODE/Reverse-a-string deleted file mode 120000 index c092ce2e24..0000000000 --- a/Lang/LOLCODE/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Short-circuit-evaluation b/Lang/LOLCODE/Short-circuit-evaluation deleted file mode 120000 index 747e2d63b6..0000000000 --- a/Lang/LOLCODE/Short-circuit-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Short-circuit-evaluation/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Split-a-character-string-based-on-change-of-character b/Lang/LOLCODE/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 3d417eb3b9..0000000000 --- a/Lang/LOLCODE/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/String-concatenation b/Lang/LOLCODE/String-concatenation deleted file mode 120000 index 8f1d425354..0000000000 --- a/Lang/LOLCODE/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/String-interpolation-included- b/Lang/LOLCODE/String-interpolation-included- deleted file mode 120000 index 2477427706..0000000000 --- a/Lang/LOLCODE/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Sum-of-a-series b/Lang/LOLCODE/Sum-of-a-series deleted file mode 120000 index 3071bb174e..0000000000 --- a/Lang/LOLCODE/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Terminal-control-Display-an-extended-character b/Lang/LOLCODE/Terminal-control-Display-an-extended-character deleted file mode 120000 index 506d7e357c..0000000000 --- a/Lang/LOLCODE/Terminal-control-Display-an-extended-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Display-an-extended-character/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Terminal-control-Ringing-the-terminal-bell b/Lang/LOLCODE/Terminal-control-Ringing-the-terminal-bell deleted file mode 120000 index a3dce93aeb..0000000000 --- a/Lang/LOLCODE/Terminal-control-Ringing-the-terminal-bell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Ringing-the-terminal-bell/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Tokenize-a-string b/Lang/LOLCODE/Tokenize-a-string deleted file mode 120000 index 61653af306..0000000000 --- a/Lang/LOLCODE/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Topic-variable b/Lang/LOLCODE/Topic-variable deleted file mode 120000 index 8a1f58e75e..0000000000 --- a/Lang/LOLCODE/Topic-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topic-variable/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Variable-declaration-reset b/Lang/LOLCODE/Variable-declaration-reset deleted file mode 120000 index 126975a58e..0000000000 --- a/Lang/LOLCODE/Variable-declaration-reset +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-declaration-reset/LOLCODE \ No newline at end of file diff --git a/Lang/LOLCODE/Zeckendorf-number-representation b/Lang/LOLCODE/Zeckendorf-number-representation deleted file mode 120000 index 093dc5325c..0000000000 --- a/Lang/LOLCODE/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/LOLCODE \ No newline at end of file diff --git a/Lang/LSE/Empty-program b/Lang/LSE/Empty-program new file mode 120000 index 0000000000..16856f6969 --- /dev/null +++ b/Lang/LSE/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/LSE \ No newline at end of file diff --git a/Lang/LSL/00-LANG.txt b/Lang/LSL/00-LANG.txt index 3025477b27..bdb68f1bc2 100644 --- a/Lang/LSL/00-LANG.txt +++ b/Lang/LSL/00-LANG.txt @@ -1,42 +1,25 @@ {{language |hopl=no }} -'''LSL''' ([[wp:Linden_Scripting_Language|'''Linden Scripting Language''']]) is the scripting language developed by [http://en.wikipedia.org/wiki/Linden_Lab Linden Labs] for their virtual sandbox world [[wp:Second_Life|Second Life]]. Also [[wp:OpenSimulator|OpenSimulator]] along with other [https://omrg.org Open Metaverse] proprietors run a largely compatible superset version of LSL. LSL scripts allow objects rezzed in-world(in-game) to interact with and manipulate the virtual world around them, but also the internet in limited fashion. LSL has many built-in functions, and the ability for inter script messaging, http POST and GET requests, gui dialog boxes, chat channel messaging, java & C like semantics, is turning complete, etc. - -==In Depth: Syntax Structure== -LSL is C-like with scoping of local varaibles and global; strict typing with type-recasting possible; use of {} to encapsulate function blocks, and ; to denote an execution block, and () to encapsulate parameters, and equivalency from right to left and for assignment myint=1-2, variables can be formed as procedures that return a value. Oprands are the same, but there are no pointers nor triple oprands such as +++. -LSL is not like C in many ways, there are only 3 basic types, and 4 special types of data structures: integer (unsigned 32bit), float (unsigned 32bit), string (max string length varies), key ( a 32bit base16 UUID often treated as a string),vectors (set of three floats, aka a tuple <0.0,0.0,0.0> ); quaternions or rot ( set of four floats <0.0,0.0,0.0,0.0> ); lists (1D array that can contain any of or a mix of types of data), There is no void as a type! Nor is there any keyword for functions. Simply outside of a script's default loop function called a state, one forms a function with it's name(type prams){;} and can be called anywhere else. Over-loading is not valid, nor is under-loading when calling a function or variable-function that returns a value. - -==In Depth: Where & when LSL scripts can run== -Rezzing is dragging and dropping from the user's inventory into to the virtual world space, or being worn as attachments to one's avatar (including HUDs). These aforementioned objects take the form of built-in 3d models of basic shapes commonly known as primitives or just prims, sculpted prims, and user uploaded 3D models. Each object has in-turn it's own inventory where the scripts run. In truth one can link many objects into a meta-object known as a link-set, each linked object retains it's own inventory instance, and running scripts. When an object is derezzed, that is brought back into the user's inventory, or an attached object derezzes when the user logs off the scripts' current status is paused and saved. - -==In Depth: LSL basic script structure== -Each script must contain a default script state, this is very similar to the default loop found with in Arduino Clike programming. It is possible to switch the currently running state of a script to a knew one, and back again, thus ignoring/clearing any callback functions called "events". (However the timer does not get cleared upon state changes). -Each state in LSL scripts can have built in call-back functions known as "event types" which are triggered with interrupt like behavior from a cue that is filled by the current simulator or sim (a sim is world instance, generally a 256x256meter block, although some communication with adjacent sims maybe possible) the script is residing in. Most events are repeatable, but there are logically single fire events such as state_entry, on_rez, on_attach, on_deattach. Aforementioned user functions, variables, - -==Back-ends of LSL with in Second-Life== -In Second-life, one can save & run scripts optionally for the two current back-ends that actually run the code over a server, each with their own pros and cons. -[https://wiki.secondlife.com/wiki/LSO LSO] exists for backward compatibility. LSO saved scripts are interpreted at runtime by the server. LSO scripts take less initial script memory, they are limited to less available memory as well. In rare circumstances LSO may run faster than MONO. However LSO suffers from memory fragmentation slow downs with list connotation (there are some work around). LSO handles the jump to @location in unexpected ways. -Mono saved scripts are compiled under [[wp:Mono_(software)|Mono]] (the most recent) to byte-code ran by the server. - Most scripts will benefit from being set to MONO compilation for greater speed and more available memory, at the cost of higher initial memory used. +The [[wp:Linden_Scripting_Language|'''Linden Scripting Language''']], usually just called '''LSL''' for short, is a language developed by [http://en.wikipedia.org/wiki/Linden_Lab Linden Labs] for their [[wp:Second_Life|Second Life]] virtual world. LSL allows Second Life objects to sense, respond to events, and interact with the (virtual) world around them, and the Avatars in that world. ==Flavors of LSL== -# A largely compatible version of LSL that can run in the [[http://opensimulator.org/wiki/OSSL_Script_Library|OpenSimulator]] virtual world. +There are currently three flavors of the LSL language +# LSL compiled under [[wp:Mono_(software)|Mono]] (the most recent) +# The original interpreted version (no longer being developed and only exists for backward compatibility) +# A largely compatible version of LSL that can run in the [[wp:OpenSimulator|OpenSimulator]] virtual world. ==Documentation== There are two popular web sites documenting LSL # Second Life's own [http://wiki.secondlife.com/wiki/LSL_Portal LSL Portal] # a user supported [http://lslwiki.net/lslwiki/wakka.php LSL Wiki] -==Libraries of Scripts== +==Libraries== There exists several open source libraries where users share code -* [https://outworldz.com/cgi/freescripts.plx Free LSL Scripts] * [http://community.secondlife.com/t5/LSL-Scripting-Library/bd-p/LSLScriptingLibrary LSL Scripting Library] * [http://wiki.secondlife.com/wiki/Category:LSL_Examples LSL Examples] +* [http://www.free-lsl-scripts.com/cgi/freescripts.plx Free LSL Scripts] * [http://community.secondlife.com/t5/LSL-Scripting/bd-p/LSLScripting LSL Scripting] ==External Editors== -There are also many [http://wiki.secondlife.com/wiki/LSL_Alternate_Editors external editors] for LSL allowing you to write with highlighting, [https://github.com/Feay/LSL-for-Scite api tool-tips], [https://github.com/Makopo/lslint syntax check], and (to a limited extent) -[https://github.com/Sei-Lisa/LSL-compiler compile and execute LSL] outside of the Second Life environment. - -You will need to sign up at [http://secondlife.com Second Life] and have a Second Life account to execute LSL in the virtual world. Your scripts can exist by themselves in a folder of your inventory, or in an Object in your inventory, but need to be in an Object that is in-world to execute (if an Object containing scripts is taken in to your inventory, the scripts will be suspended and will resume when brought out in to the world again.) \ No newline at end of file +There are also many [http://wiki.secondlife.com/wiki/LSL_Alternate_Editors external editors] for LSL allowing you to write, syntax check, and (to a limited extent) execute LSL outside of the Second Life environment. You will need to sign up at [http://secondlife.com Second Life] and have a Second Life account to execute LSL in the virtual world. Your scripts can exist by themselves in a folder of your inventory, or in an Object in your inventory, but need to be in an Object that is in-world to execute (if an Object containing scripts is taken in to your inventory, the scripts will be suspended and will resume when brought out in to the world again.) \ No newline at end of file diff --git a/Lang/LSL/Binary-digits b/Lang/LSL/Binary-digits deleted file mode 120000 index 54627407f6..0000000000 --- a/Lang/LSL/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/LSL \ No newline at end of file diff --git a/Lang/Labyrinth/00-LANG.txt b/Lang/Labyrinth/00-LANG.txt deleted file mode 100644 index 6b7624f3ac..0000000000 --- a/Lang/Labyrinth/00-LANG.txt +++ /dev/null @@ -1 +0,0 @@ -{{stub}}{{language|site=https://github.com/m-ender/labyrinth}} \ No newline at end of file diff --git a/Lang/Labyrinth/00-META.yaml b/Lang/Labyrinth/00-META.yaml deleted file mode 100644 index 2e09fd26db..0000000000 --- a/Lang/Labyrinth/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Labyrinth diff --git a/Lang/Lambdatalk/Bioinformatics-base-count b/Lang/Lambdatalk/Bioinformatics-base-count new file mode 120000 index 0000000000..03508c2431 --- /dev/null +++ b/Lang/Lambdatalk/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Lambdatalk \ No newline at end of file diff --git a/Lang/Langur/00-LANG.txt b/Lang/Langur/00-LANG.txt index 612e66c8de..c2da20439a 100644 --- a/Lang/Langur/00-LANG.txt +++ b/Lang/Langur/00-LANG.txt @@ -3,22 +3,12 @@ |hopl=no }} -Langur is an open-source programming language that natively uses arbitrary-precision decimal floating point, and deals with extremely large and small numbers. It also has native complex numbers that are arbitrary-precision decimal. Its principles of design are accuracy in calculation and a concise, expressive syntax. +Langur is an open-source imperative/functional programming language. The name langur begins with a lowercase letter when it does not start a sentence. -Langur has a high number of mathematical operators (rem, mod, etc.) and logical operators (including nand, nor, nxor). +Langur code can be run with script files or with its REPL. The recommended file name extension is .langur. -Langur has date/time literals (using ISO 8601 syntax) and duration literals. +Langur uses a hash mark for single line comments. Therefore, script files may begin with a shebang to tell a Linux shell where to find the interpreter. -Langur has flexible parameter options, with both positional parameters and parameters by name, and with parameter expansion (on last positional parameter). Parameters by name may be optional or required. - -Langur uses exceptions instead of error codes. - -Langur code can be run from executable files, or you can use interactive mode or the REPL. The file name extension is .langur. - -Langur uses a hash mark for single line comments. Therefore, script files can begin with a shebang to tell a Linux shell where to find the interpreter. - -Source code is always UTF-8, with no BOM, using Linux line returns (line feed) only. - -The name langur begins with a lowercase letter when it does not start a sentence. +Source code is in UTF-8, with no BOM, using Linux line returns (line feed) only. website: https://langurlang.org/ \ No newline at end of file diff --git a/Lang/Langur/99-bottles-of-beer b/Lang/Langur/99-bottles-of-beer deleted file mode 120000 index 043a4c56e9..0000000000 --- a/Lang/Langur/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Langur \ No newline at end of file diff --git a/Lang/Langur/Angle-difference-between-two-bearings b/Lang/Langur/Angle-difference-between-two-bearings deleted file mode 120000 index 7b4ef17804..0000000000 --- a/Lang/Langur/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Langur \ No newline at end of file diff --git a/Lang/Langur/Arithmetic-Complex b/Lang/Langur/Arithmetic-Complex deleted file mode 120000 index 5341d853ac..0000000000 --- a/Lang/Langur/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/Langur \ No newline at end of file diff --git a/Lang/Langur/Babbage-problem b/Lang/Langur/Babbage-problem deleted file mode 120000 index 662297217a..0000000000 --- a/Lang/Langur/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/Langur \ No newline at end of file diff --git a/Lang/Langur/Currency b/Lang/Langur/Currency deleted file mode 120000 index 5a712c5b9d..0000000000 --- a/Lang/Langur/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/Langur \ No newline at end of file diff --git a/Lang/Langur/Enforced-immutability b/Lang/Langur/Enforced-immutability deleted file mode 120000 index a6a872e8c6..0000000000 --- a/Lang/Langur/Enforced-immutability +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enforced-immutability/Langur \ No newline at end of file diff --git a/Lang/Langur/I-before-E-except-after-C b/Lang/Langur/I-before-E-except-after-C deleted file mode 120000 index a4c67c55c7..0000000000 --- a/Lang/Langur/I-before-E-except-after-C +++ /dev/null @@ -1 +0,0 @@ -../../Task/I-before-E-except-after-C/Langur \ No newline at end of file diff --git a/Lang/Langur/Monty-Hall-problem b/Lang/Langur/Monty-Hall-problem deleted file mode 120000 index b5a048c861..0000000000 --- a/Lang/Langur/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/Langur \ No newline at end of file diff --git a/Lang/Langur/Morse-code b/Lang/Langur/Morse-code deleted file mode 120000 index ee4498f8de..0000000000 --- a/Lang/Langur/Morse-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Morse-code/Langur \ No newline at end of file diff --git a/Lang/Langur/Old-Russian-measure-of-length b/Lang/Langur/Old-Russian-measure-of-length deleted file mode 120000 index 45d7b04413..0000000000 --- a/Lang/Langur/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/Langur \ No newline at end of file diff --git a/Lang/Langur/Program-name b/Lang/Langur/Program-name new file mode 120000 index 0000000000..04198cf0de --- /dev/null +++ b/Lang/Langur/Program-name @@ -0,0 +1 @@ +../../Task/Program-name/Langur \ No newline at end of file diff --git a/Lang/Langur/Safe-addition b/Lang/Langur/Safe-addition deleted file mode 120000 index 9cd478ca7f..0000000000 --- a/Lang/Langur/Safe-addition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Safe-addition/Langur \ No newline at end of file diff --git a/Lang/Langur/String-interpolation-included- b/Lang/Langur/String-interpolation-included- deleted file mode 120000 index e0b5bfaf9c..0000000000 --- a/Lang/Langur/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/Langur \ No newline at end of file diff --git a/Lang/Lapyst/00-LANG.txt b/Lang/Lapyst/00-LANG.txt deleted file mode 100644 index 4b906ad0c0..0000000000 --- a/Lang/Lapyst/00-LANG.txt +++ /dev/null @@ -1,14 +0,0 @@ -{{stub}} -{{language|Lapyst -|site=https://lang.lapyst.dev -|exec=both -|parampass=both -|strength=strong -|express=both -|checking=static -|tags=lapyst -|gc=yes (optional)}} - -Lapyst is an general-purpose language designed by [[User:Mai Lapyst]]. It features multiple backend strategies (machinecode, bytecode and interpretation), while combining many usefull features of other languages for the user to choose from. The philosophy in the language is generally to empower the user and give it as much choice as possible. - -The current default implementation is [[Lapystc]]. \ No newline at end of file diff --git a/Lang/Lapyst/00-META.yaml b/Lang/Lapyst/00-META.yaml deleted file mode 100644 index 3187527652..0000000000 --- a/Lang/Lapyst/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Lapyst diff --git a/Lang/Lapyst/Conditional-structures b/Lang/Lapyst/Conditional-structures deleted file mode 120000 index d244d152bd..0000000000 --- a/Lang/Lapyst/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/Lapyst \ No newline at end of file diff --git a/Lang/Lean/00-LANG.txt b/Lang/Lean/00-LANG.txt index ae97385d36..174b82817c 100644 --- a/Lang/Lean/00-LANG.txt +++ b/Lang/Lean/00-LANG.txt @@ -1,22 +1,17 @@ -{{language|Lean +{{language |exec=machine |strength=strong |safety=safe |checking=both |gc=yes -|LCT=yes -|site=https://lean-lang.org/}} +|LCT=yes}} +{{implementation|Lean}} {{language programming paradigm|functional}} {{language programming paradigm|dependent-types}} -'''Lean''' is a dependently typed programming language and proof assistant, similar to [[Rocq]] and [[Agda]]. It aims to bridge the gap between interactive and automated theorem proving by situating automated tools and methods in a framework that supports user interaction and the construction of fully specified axiomatic proofs. -As a proof assistant / theorem prover, Lean primarily benefits from Mathlib, a mechanized implementation of swaths of mathematics at the undergraduate and graduate level. +'''Lean'''   is an open source theorem prover and programming language being developed at Microsoft Research. -As a general-purpose programming language, Lean benefits from its use as a theorem prover, as several features developed for the purpose of theorem proving, such as its dependent types system and its syntax-rewriting macros, also find much utility outside their original theorem proving contexts. +Lean aims to bridge the gap between interactive and automated theorem proving, by situating automated tools and methods in a framework that supports user interaction and the construction of fully specified axiomatic proofs. -Lean 4 is the current major version of the language, being a bootstrapped rewrite of the older (and different) Lean 3 system. - -=== Citations === - -Frequently asked questions: https://lean-lang.org/faq/ \ No newline at end of file +https://leanprover.github.io/about/ \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Calculating-the-value-of-e b/Lang/Liberty-BASIC/Calculating-the-value-of-e deleted file mode 120000 index 95f95733b8..0000000000 --- a/Lang/Liberty-BASIC/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Egyptian-division b/Lang/Liberty-BASIC/Egyptian-division deleted file mode 120000 index 91346c7989..0000000000 --- a/Lang/Liberty-BASIC/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Hunt-the-Wumpus b/Lang/Liberty-BASIC/Hunt-the-Wumpus deleted file mode 120000 index 4e2d0e150d..0000000000 --- a/Lang/Liberty-BASIC/Hunt-the-Wumpus +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hunt-the-Wumpus/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Jacobsthal-numbers b/Lang/Liberty-BASIC/Jacobsthal-numbers deleted file mode 120000 index c1008ff58b..0000000000 --- a/Lang/Liberty-BASIC/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Jaro-similarity b/Lang/Liberty-BASIC/Jaro-similarity deleted file mode 120000 index 0f3ee067c6..0000000000 --- a/Lang/Liberty-BASIC/Jaro-similarity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-similarity/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Miller-Rabin-primality-test b/Lang/Liberty-BASIC/Miller-Rabin-primality-test new file mode 120000 index 0000000000..01eccc1a73 --- /dev/null +++ b/Lang/Liberty-BASIC/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Minesweeper-game b/Lang/Liberty-BASIC/Minesweeper-game deleted file mode 120000 index 19abfc9a07..0000000000 --- a/Lang/Liberty-BASIC/Minesweeper-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minesweeper-game/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Numbers-which-are-not-the-sum-of-distinct-squares b/Lang/Liberty-BASIC/Numbers-which-are-not-the-sum-of-distinct-squares deleted file mode 120000 index 18d07e8ad3..0000000000 --- a/Lang/Liberty-BASIC/Numbers-which-are-not-the-sum-of-distinct-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-which-are-not-the-sum-of-distinct-squares/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Numbers-with-equal-rises-and-falls b/Lang/Liberty-BASIC/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 019f830246..0000000000 --- a/Lang/Liberty-BASIC/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Poker-hand-analyser b/Lang/Liberty-BASIC/Poker-hand-analyser deleted file mode 120000 index 3ed8c3b507..0000000000 --- a/Lang/Liberty-BASIC/Poker-hand-analyser +++ /dev/null @@ -1 +0,0 @@ -../../Task/Poker-hand-analyser/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Primality-by-Wilsons-theorem b/Lang/Liberty-BASIC/Primality-by-Wilsons-theorem deleted file mode 120000 index d68ab9bb3f..0000000000 --- a/Lang/Liberty-BASIC/Primality-by-Wilsons-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-Wilsons-theorem/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Quaternion-type b/Lang/Liberty-BASIC/Quaternion-type new file mode 120000 index 0000000000..33da9602b0 --- /dev/null +++ b/Lang/Liberty-BASIC/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Liberty-BASIC/Snake b/Lang/Liberty-BASIC/Snake deleted file mode 120000 index 20a60d8427..0000000000 --- a/Lang/Liberty-BASIC/Snake +++ /dev/null @@ -1 +0,0 @@ -../../Task/Snake/Liberty-BASIC \ No newline at end of file diff --git a/Lang/Lilypond/00-LANG.txt b/Lang/Lilypond/00-LANG.txt index 9afe2b1bd9..5c24c70c93 100644 --- a/Lang/Lilypond/00-LANG.txt +++ b/Lang/Lilypond/00-LANG.txt @@ -1 +1,9 @@ -#REDIRECT [[:Category:LilyPond]] \ No newline at end of file +{{stub}} +{{language|lilypond +|site=http://www.lilypond.org/ +|hopl=no +}} + +The lilypond language is used by the lilypond score production software for describing the layout of musical score sheets. + +[[Category:Musical Notation]] \ No newline at end of file diff --git a/Lang/Locomotive-Basic/00-LANG.txt b/Lang/Locomotive-Basic/00-LANG.txt index 5045a1b047..04db5b5ea8 100644 --- a/Lang/Locomotive-Basic/00-LANG.txt +++ b/Lang/Locomotive-Basic/00-LANG.txt @@ -7,9 +7,9 @@ '''Locomotive BASIC''' is a variant of BASIC that is built into the ROM of the [[wp:Amstrad CPC|Amstrad CPC]] series of home computers introduced in 1984. In the 1980s, the CPC was a popular, slightly more expensive alternative to the Commodore C64/C128. It was not just suited for games but also office work because of its high resolution display and [[wp:CP/M|CP/M]] support. -The easiest way to use Locomotive BASIC today is [https://benchmarko.github.io/CPCBasic/cpcbasic.html CPCBasic], a very fast implementation in JavaScript which also allows easy pasting of code from Rosetta Code. Note that programs will run much faster in CPCBasic than on a real CPC. To slow down a program, add an extra delay loop to the main loop, e.g. for delay=1 to 5:frame:nextwhich will pause for five frames or 0.1 seconds. +The easiest way to use Locomotive BASIC today is [https://benchmarko.github.io/CPCBasic/cpcbasic.html CPCBasic], a very fast implementation in JavaScript which also allows easy pasting of code from Rosetta Code. Note that programs will run much faster in CPCBasic than on a real CPC. To slow down a program, add an extra delay loop to the main loop, e.g.:for delay=1 to 5:frame:nextwhich will pause for five frames or 0.1 seconds. -[https://retroshowcase.gr/cpcbox-master/ CPCBox] is another option for the web browser, a whole-machine JavaScript CPC emulator mainly for games which has good compatibility but which lacks copy and paste support. +[https://www.retrovm.com/ CPCBox] is another option for the web browser, a whole-machine JavaScript CPC emulator mainly for games which has good compatibility but which lacks copy and paste support. Locomotive BASIC can also be used via native CPC emulators such as [http://www.winape.net/ WinAPE] (Windows) or [http://sourceforge.net/projects/javacpc/ JavaCPC] (Windows/macOS/Linux). All these CPC emulators are also perfectly legal because Amstrad has given their permission for distributing CPC ROM images with emulators. @@ -19,14 +19,14 @@ Either use the CPCBasic browser-based Locomotive Basic emulator (https://benchma In CPCBasic, enter your program, e.g. -10 print "Hello World!" +10 print "Hello World!" into the "CPC Basic" text box at the top and then press the Run button below it. Output goes to the blue CPC screen below. You can also interact with the CPC screen directly if you first click on it with the mouse. The Reset button stops a running program and returns you to the Ready prompt. In a native emulator, just type -10 print "Hello World!" -run +10 print "Hello World!" +run to run your first Locomotive BASIC program. @@ -56,7 +56,7 @@ As on many other 8-bit machines of the era, BASIC programs are often extended wi Memory on the CPC 464 and 664 is subdivided into four 16 kB blocks (0 to 3), with block 3 at &c000 normally reserved for the screen. The CPC 6128 features a second 64 kB bank (blocks 4 to 7) which can be accessed from BASIC with [[wp:Bank switching|bank switching]] in block 1 (&4000 and &7fff), e.g. -out &7fff,&x11000100 +out &7fff,&x11000100 would make block 4 accessible in the address space of block 1.http://k1.dyndns.org/Vintage/Schneider%20CPC/Das%20Schneider%20CPC%20Systembuch/z87.htm This way, the entire 128 kB of memory can be used by BASIC. Alternatively, RSX commands for bank switching and copying between banks are included on the system discs and discussed in chapter 8 of the CPC user manual.http://www.cpcwiki.eu/index.php/User_Manual Even on the 64 kB models, it is possible to do [[wp:Multiple buffering|double buffering]] in BASIC by reserving another RAM block for the screen, drawing into the hidden screen, and then setting the CRTC screen address to the currently hidden screen with the BASIC [[wp:I/o port|port I/O]] command OUT. diff --git a/Lang/Locomotive-Basic/Abelian-sandpile-model b/Lang/Locomotive-Basic/Abelian-sandpile-model deleted file mode 120000 index e00a530896..0000000000 --- a/Lang/Locomotive-Basic/Abelian-sandpile-model +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model/Locomotive-Basic \ No newline at end of file diff --git a/Lang/Locomotive-Basic/Animate-a-pendulum b/Lang/Locomotive-Basic/Animate-a-pendulum deleted file mode 120000 index 32a0ee5149..0000000000 --- a/Lang/Locomotive-Basic/Animate-a-pendulum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Animate-a-pendulum/Locomotive-Basic \ No newline at end of file diff --git a/Lang/Locomotive-Basic/Dragon-curve b/Lang/Locomotive-Basic/Dragon-curve deleted file mode 120000 index 2088f12a68..0000000000 --- a/Lang/Locomotive-Basic/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/Locomotive-Basic \ No newline at end of file diff --git a/Lang/Locomotive-Basic/Draw-a-cuboid b/Lang/Locomotive-Basic/Draw-a-cuboid deleted file mode 120000 index cbfb396b7f..0000000000 --- a/Lang/Locomotive-Basic/Draw-a-cuboid +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-cuboid/Locomotive-Basic \ No newline at end of file diff --git a/Lang/Locomotive-Basic/Forest-fire b/Lang/Locomotive-Basic/Forest-fire deleted file mode 120000 index 44a3c54d6a..0000000000 --- a/Lang/Locomotive-Basic/Forest-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Forest-fire/Locomotive-Basic \ No newline at end of file diff --git a/Lang/Locomotive-Basic/Hilbert-curve b/Lang/Locomotive-Basic/Hilbert-curve deleted file mode 120000 index 8355f1c6bf..0000000000 --- a/Lang/Locomotive-Basic/Hilbert-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hilbert-curve/Locomotive-Basic \ No newline at end of file diff --git a/Lang/Locomotive-Basic/Koch-curve b/Lang/Locomotive-Basic/Koch-curve deleted file mode 120000 index 87294988f6..0000000000 --- a/Lang/Locomotive-Basic/Koch-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Koch-curve/Locomotive-Basic \ No newline at end of file diff --git a/Lang/Loglan82/AKS-test-for-primes b/Lang/Loglan82/AKS-test-for-primes deleted file mode 120000 index 335d9d190f..0000000000 --- a/Lang/Loglan82/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Abundant-deficient-and-perfect-number-classifications b/Lang/Loglan82/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index c3fb63599e..0000000000 --- a/Lang/Loglan82/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Abundant-odd-numbers b/Lang/Loglan82/Abundant-odd-numbers deleted file mode 120000 index 282ee6e007..0000000000 --- a/Lang/Loglan82/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Bell-numbers b/Lang/Loglan82/Bell-numbers deleted file mode 120000 index 7761831a2e..0000000000 --- a/Lang/Loglan82/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/CUSIP b/Lang/Loglan82/CUSIP deleted file mode 120000 index 8aaccb215d..0000000000 --- a/Lang/Loglan82/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Catalan-numbers b/Lang/Loglan82/Catalan-numbers deleted file mode 120000 index 309128cccf..0000000000 --- a/Lang/Loglan82/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Cumulative-standard-deviation b/Lang/Loglan82/Cumulative-standard-deviation deleted file mode 120000 index e030ba56eb..0000000000 --- a/Lang/Loglan82/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Day-of-the-week b/Lang/Loglan82/Day-of-the-week deleted file mode 120000 index 65e7a590f5..0000000000 --- a/Lang/Loglan82/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Diversity-prediction-theorem b/Lang/Loglan82/Diversity-prediction-theorem deleted file mode 120000 index 99f7aed5fc..0000000000 --- a/Lang/Loglan82/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Dot-product b/Lang/Loglan82/Dot-product deleted file mode 120000 index e65fed671f..0000000000 --- a/Lang/Loglan82/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Dutch-national-flag-problem b/Lang/Loglan82/Dutch-national-flag-problem deleted file mode 120000 index 80274c2f7b..0000000000 --- a/Lang/Loglan82/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Equilibrium-index b/Lang/Loglan82/Equilibrium-index deleted file mode 120000 index 99b2d35b94..0000000000 --- a/Lang/Loglan82/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Ethiopian-multiplication b/Lang/Loglan82/Ethiopian-multiplication deleted file mode 120000 index 13a8b5d45c..0000000000 --- a/Lang/Loglan82/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Factors-of-an-integer b/Lang/Loglan82/Factors-of-an-integer deleted file mode 120000 index 106a23d5a7..0000000000 --- a/Lang/Loglan82/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Gamma-function b/Lang/Loglan82/Gamma-function deleted file mode 120000 index e6dce092fb..0000000000 --- a/Lang/Loglan82/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Hello-world-Text b/Lang/Loglan82/Hello-world-Text deleted file mode 120000 index 02b527238f..0000000000 --- a/Lang/Loglan82/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Horners-rule-for-polynomial-evaluation b/Lang/Loglan82/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 5eca5139bd..0000000000 --- a/Lang/Loglan82/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Josephus-problem b/Lang/Loglan82/Josephus-problem deleted file mode 120000 index 74e740313f..0000000000 --- a/Lang/Loglan82/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Levenshtein-distance b/Lang/Loglan82/Levenshtein-distance deleted file mode 120000 index 64975523f2..0000000000 --- a/Lang/Loglan82/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Long-year b/Lang/Loglan82/Long-year deleted file mode 120000 index b249596823..0000000000 --- a/Lang/Loglan82/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Loops-Do-while b/Lang/Loglan82/Loops-Do-while deleted file mode 120000 index e038a12c06..0000000000 --- a/Lang/Loglan82/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Loops-For-with-a-specified-step b/Lang/Loglan82/Loops-For-with-a-specified-step deleted file mode 120000 index bace3aec2b..0000000000 --- a/Lang/Loglan82/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/M-bius-function b/Lang/Loglan82/M-bius-function deleted file mode 120000 index 82e1041f7d..0000000000 --- a/Lang/Loglan82/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Monty-Hall-problem b/Lang/Loglan82/Monty-Hall-problem deleted file mode 120000 index 3c5ec1bb89..0000000000 --- a/Lang/Loglan82/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Shoelace-formula-for-polygonal-area b/Lang/Loglan82/Shoelace-formula-for-polygonal-area deleted file mode 120000 index 7a3facc57c..0000000000 --- a/Lang/Loglan82/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Statistics-Basic b/Lang/Loglan82/Statistics-Basic deleted file mode 120000 index 06f2b88d7e..0000000000 --- a/Lang/Loglan82/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Statistics-Normal-distribution b/Lang/Loglan82/Statistics-Normal-distribution deleted file mode 120000 index c0cf6b079d..0000000000 --- a/Lang/Loglan82/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/Loglan82 \ No newline at end of file diff --git a/Lang/Loglan82/Tau-number b/Lang/Loglan82/Tau-number deleted file mode 120000 index 0f86291ac1..0000000000 --- a/Lang/Loglan82/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Loglan82 \ No newline at end of file diff --git a/Lang/Logo/Associative-array-Creation b/Lang/Logo/Associative-array-Creation new file mode 120000 index 0000000000..3776b1b4e9 --- /dev/null +++ b/Lang/Logo/Associative-array-Creation @@ -0,0 +1 @@ +../../Task/Associative-array-Creation/Logo \ No newline at end of file diff --git a/Lang/Logo/Merge-and-aggregate-datasets b/Lang/Logo/Merge-and-aggregate-datasets deleted file mode 120000 index f9a42bcf33..0000000000 --- a/Lang/Logo/Merge-and-aggregate-datasets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Merge-and-aggregate-datasets/Logo \ No newline at end of file diff --git a/Lang/Logo/Sort-three-variables b/Lang/Logo/Sort-three-variables deleted file mode 120000 index 98d62a0bb1..0000000000 --- a/Lang/Logo/Sort-three-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-three-variables/Logo \ No newline at end of file diff --git a/Lang/Logo/Sparkline-in-unicode b/Lang/Logo/Sparkline-in-unicode deleted file mode 120000 index d2b466f59a..0000000000 --- a/Lang/Logo/Sparkline-in-unicode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sparkline-in-unicode/Logo \ No newline at end of file diff --git a/Lang/Lua/100-doors b/Lang/Lua/100-doors new file mode 120000 index 0000000000..ce373fa8af --- /dev/null +++ b/Lang/Lua/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/Lua \ No newline at end of file diff --git a/Lang/Lua/Bioinformatics-base-count b/Lang/Lua/Bioinformatics-base-count new file mode 120000 index 0000000000..cb9548dcc8 --- /dev/null +++ b/Lang/Lua/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Lua \ No newline at end of file diff --git a/Lang/Lua/Calkin-Wilf-sequence b/Lang/Lua/Calkin-Wilf-sequence deleted file mode 120000 index 1f9b22fde7..0000000000 --- a/Lang/Lua/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/Lua \ No newline at end of file diff --git a/Lang/Lua/Check-input-device-is-a-terminal b/Lang/Lua/Check-input-device-is-a-terminal deleted file mode 120000 index fdc01bb562..0000000000 --- a/Lang/Lua/Check-input-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-input-device-is-a-terminal/Lua \ No newline at end of file diff --git a/Lang/Lua/Demings-funnel b/Lang/Lua/Demings-funnel deleted file mode 120000 index bfeba4e463..0000000000 --- a/Lang/Lua/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/Lua \ No newline at end of file diff --git a/Lang/Lua/Duffinian-numbers b/Lang/Lua/Duffinian-numbers deleted file mode 120000 index 3d384f7bda..0000000000 --- a/Lang/Lua/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/Lua \ No newline at end of file diff --git a/Lang/Lua/Empty-program b/Lang/Lua/Empty-program new file mode 120000 index 0000000000..451d4b192d --- /dev/null +++ b/Lang/Lua/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Lua \ No newline at end of file diff --git a/Lang/Lua/GUI-component-interaction b/Lang/Lua/GUI-component-interaction deleted file mode 120000 index da7428ad7e..0000000000 --- a/Lang/Lua/GUI-component-interaction +++ /dev/null @@ -1 +0,0 @@ -../../Task/GUI-component-interaction/Lua \ No newline at end of file diff --git a/Lang/Lua/Gauss-Jordan-matrix-inversion b/Lang/Lua/Gauss-Jordan-matrix-inversion deleted file mode 120000 index 4e412c8561..0000000000 --- a/Lang/Lua/Gauss-Jordan-matrix-inversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gauss-Jordan-matrix-inversion/Lua \ No newline at end of file diff --git a/Lang/Lua/Generate-random-chess-position b/Lang/Lua/Generate-random-chess-position deleted file mode 120000 index 7d17633430..0000000000 --- a/Lang/Lua/Generate-random-chess-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-random-chess-position/Lua \ No newline at end of file diff --git a/Lang/Lua/Hello-world-Line-printer b/Lang/Lua/Hello-world-Line-printer deleted file mode 120000 index 1ade14f20f..0000000000 --- a/Lang/Lua/Hello-world-Line-printer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Line-printer/Lua \ No newline at end of file diff --git a/Lang/Lua/Jacobsthal-numbers b/Lang/Lua/Jacobsthal-numbers deleted file mode 120000 index ff787752c3..0000000000 --- a/Lang/Lua/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Lua \ No newline at end of file diff --git a/Lang/Lua/Jordan-P-lya-numbers b/Lang/Lua/Jordan-P-lya-numbers deleted file mode 120000 index 860eeeaaa4..0000000000 --- a/Lang/Lua/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/Lua \ No newline at end of file diff --git a/Lang/Lua/Juggler-sequence b/Lang/Lua/Juggler-sequence deleted file mode 120000 index 94ab059422..0000000000 --- a/Lang/Lua/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/Lua \ No newline at end of file diff --git a/Lang/Lua/Knapsack-problem-Bounded b/Lang/Lua/Knapsack-problem-Bounded deleted file mode 120000 index edddb60b00..0000000000 --- a/Lang/Lua/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/Lua \ No newline at end of file diff --git a/Lang/Lua/Legendre-prime-counting-function b/Lang/Lua/Legendre-prime-counting-function deleted file mode 120000 index cf72af7d74..0000000000 --- a/Lang/Lua/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/Lua \ No newline at end of file diff --git a/Lang/Lua/Miller-Rabin-primality-test b/Lang/Lua/Miller-Rabin-primality-test new file mode 120000 index 0000000000..45a2ff22f4 --- /dev/null +++ b/Lang/Lua/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Lua \ No newline at end of file diff --git a/Lang/Lua/Numbers-with-equal-rises-and-falls b/Lang/Lua/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 5900c5ba75..0000000000 --- a/Lang/Lua/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Lua \ No newline at end of file diff --git a/Lang/Lua/Parse-an-IP-Address b/Lang/Lua/Parse-an-IP-Address deleted file mode 120000 index aa0f24a93c..0000000000 --- a/Lang/Lua/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Lua \ No newline at end of file diff --git a/Lang/Lua/Parsing-RPN-calculator-algorithm b/Lang/Lua/Parsing-RPN-calculator-algorithm new file mode 120000 index 0000000000..397c1ccfd1 --- /dev/null +++ b/Lang/Lua/Parsing-RPN-calculator-algorithm @@ -0,0 +1 @@ +../../Task/Parsing-RPN-calculator-algorithm/Lua \ No newline at end of file diff --git a/Lang/Lua/Quaternion-type b/Lang/Lua/Quaternion-type new file mode 120000 index 0000000000..09499b7f9c --- /dev/null +++ b/Lang/Lua/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Lua \ No newline at end of file diff --git a/Lang/Lua/Ramer-Douglas-Peucker-line-simplification b/Lang/Lua/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index 516d951928..0000000000 --- a/Lang/Lua/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/Lua \ No newline at end of file diff --git a/Lang/Lua/Sleeping-Beauty-problem b/Lang/Lua/Sleeping-Beauty-problem deleted file mode 120000 index 75e2ee6eb2..0000000000 --- a/Lang/Lua/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Lua \ No newline at end of file diff --git a/Lang/Lua/Sorting-Algorithms-Circle-Sort b/Lang/Lua/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..e6dc299d24 --- /dev/null +++ b/Lang/Lua/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Lua \ No newline at end of file diff --git a/Lang/Lua/Strassens-algorithm b/Lang/Lua/Strassens-algorithm deleted file mode 120000 index 9da800cb02..0000000000 --- a/Lang/Lua/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Lua \ No newline at end of file diff --git a/Lang/Lua/Sum-of-elements-below-main-diagonal-of-matrix b/Lang/Lua/Sum-of-elements-below-main-diagonal-of-matrix deleted file mode 120000 index 63a3cd2cf9..0000000000 --- a/Lang/Lua/Sum-of-elements-below-main-diagonal-of-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-elements-below-main-diagonal-of-matrix/Lua \ No newline at end of file diff --git a/Lang/Lua/Summarize-primes b/Lang/Lua/Summarize-primes deleted file mode 120000 index 601bc61d3c..0000000000 --- a/Lang/Lua/Summarize-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-primes/Lua \ No newline at end of file diff --git a/Lang/Lua/Super-d-numbers b/Lang/Lua/Super-d-numbers deleted file mode 120000 index 64e775e306..0000000000 --- a/Lang/Lua/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/Lua \ No newline at end of file diff --git a/Lang/Lua/Terminal-control-Hiding-the-cursor b/Lang/Lua/Terminal-control-Hiding-the-cursor deleted file mode 120000 index 68700a27b1..0000000000 --- a/Lang/Lua/Terminal-control-Hiding-the-cursor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Hiding-the-cursor/Lua \ No newline at end of file diff --git a/Lang/Lua/Terminal-control-Unicode-output b/Lang/Lua/Terminal-control-Unicode-output deleted file mode 120000 index b9be1e6352..0000000000 --- a/Lang/Lua/Terminal-control-Unicode-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Unicode-output/Lua \ No newline at end of file diff --git a/Lang/Lua/Total-circles-area b/Lang/Lua/Total-circles-area deleted file mode 120000 index 368862d6f6..0000000000 --- a/Lang/Lua/Total-circles-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Total-circles-area/Lua \ No newline at end of file diff --git a/Lang/Lua/Update-a-configuration-file b/Lang/Lua/Update-a-configuration-file deleted file mode 120000 index 75ad1d2a09..0000000000 --- a/Lang/Lua/Update-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Update-a-configuration-file/Lua \ No newline at end of file diff --git a/Lang/Lua/Use-another-language-to-call-a-function b/Lang/Lua/Use-another-language-to-call-a-function deleted file mode 120000 index 05e8f054e4..0000000000 --- a/Lang/Lua/Use-another-language-to-call-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Use-another-language-to-call-a-function/Lua \ No newline at end of file diff --git a/Lang/Lua/Wagstaff-primes b/Lang/Lua/Wagstaff-primes deleted file mode 120000 index c8cec659a4..0000000000 --- a/Lang/Lua/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Lua \ No newline at end of file diff --git a/Lang/Lua/Wieferich-primes b/Lang/Lua/Wieferich-primes deleted file mode 120000 index ac68d34377..0000000000 --- a/Lang/Lua/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/Lua \ No newline at end of file diff --git a/Lang/Lua/Wilson-primes-of-order-n b/Lang/Lua/Wilson-primes-of-order-n deleted file mode 120000 index 338cbe60ca..0000000000 --- a/Lang/Lua/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/Lua \ No newline at end of file diff --git a/Lang/M2000-Interpreter/00-LANG.txt b/Lang/M2000-Interpreter/00-LANG.txt index ab29824f45..ed77df4b81 100644 --- a/Lang/M2000-Interpreter/00-LANG.txt +++ b/Lang/M2000-Interpreter/00-LANG.txt @@ -9,7 +9,7 @@ |gc=allowed |hopl=no }} -M2000 is an interpreter running on its own Environment written in Visual Basic 6, as an open source project and can be found in GitHub[https://github.com/M2000Interpreter/Environment]. Current version is 14, revision 8. See [[M2000 Interpreter Implementation]] +M2000 is an interpreter running on its own Environment written in Visual Basic 6, as an open source project and can be found in GitHub[https://github.com/M2000Interpreter/Version9]. Current version is 12, revision 13. See [[M2000 Interpreter Implementation]] {{language programming paradigm|Imperative}} {{language programming paradigm|Object-oriented}} {{Language programming paradigm|Event-driven}} @@ -21,68 +21,12 @@ M2000 has two set of vocabularies, one with English identifiers and one with Gre M2000 start as an experimental interpreted language, using a Module in Module idea (like a Procedure in Procedure) where each inner Module is closed for modification, but open for expansion, by replacing code at run time. Source code executed as is, without second interpretation of a simple form, although block of code arranged for execution in a manner of consuming code (code which executed deleted, code in a loop kept as a copy for next iteration). -We can use BASIC type statement's. Although there are some differences. Like the FOR NEXT: - -SET SWITCHES "+FOR" -// WHY ? BECAUSE WHEN STEP IS POSITIVE (+1 HERE) -// WE GET ITERATION IF START VALUE IS LESS OR EQUAL THE LAST VALUE -FOR I=10 TO 0 - PRINT "NEVER PRINT - IS LIKE BASIC" -NEXT -SET SWITCHES "+DIM" -// WHY ? BECAUSE DIM MAKE AN ARRAY FROM 0 TO TOP VALUE (10) -DIM A(10)=1 -PRINT LEN(A())=11, A(0), A(10), "BASIC" - -SET SWITCHES "-FOR" ' THE DEFAULT -// WHY ? BECAUSE EVERY TIME ITERATE FROM START VALUE TO END VALUE -FOR I=10 TO 0 - PRINT "ALWAYS PRINT - IS NOT LIKE BASIC" -NEXT - -SET SWITCHES "-DIM" -// WHY ? BECAUSE DIM MAKE AN ARRAY N (10) ITEMS -DIM A(10)=1 -PRINT LEN(A())=10, A(0), A(9), "M2000" -DIM B(0 TO 10)=1 ' WE CAN DEFINE MIN AND MAX INDEX (CAN BE NEGATIVE) -PRINT LEN(B())=11, B(0), B(10), "M2000" - - Module's may be Global, or local to other modules. We can define global modules in a module, and all these definitions deleted at the end of module execution. Because we have to execute the definition of a module, we can select definition, or load definition before we call the module. Also modules can be part of object's of type Group. A module can't call itself unless we use Call module_name. The standard call is by using only the name of module. So from a module we can call local modules or global, but we can't call parent module (if isn't global). In a group we can call anything like a module plus the modules of the groups. -We can use labels and line numbers (each number is just a label). After a line number we can place statement. Static subs/functions have same scope as the module scope. Here SomethingElse() is like Module as a program, with own scope. - - -MODULE alfa { - FUNCTION SomethingElse(A, ZZ) { - =A/ZZ ' WE CAN'T READ Z HERE - } - 000 READ X - 001 Z=10 - 005 GOSUB alfa - 010 COMPUTE(&X) - 020 PRINT @MUL10(X), SomethingElse(@MUL10(X), Z) - 030 IF X<20 THEN 10 - 040 GOSUB alfa - 050 END - 060 SUB COMPUTE(&A) - 070 A++ - 080 Z++ // SIDE EFFECT - 090 END SUB - 100 FUNCTION MUL10(A) - 110 =A*Z - 120 END FUNCTION -alfa: - 130 PRINT "-------------------------" - 140 RETURN -} -alfa 14 - - We can change a inner module at the calling of a module, see the example: We call inner Beta in two stages. At the second stage we change inner Theta with Theta2. This is the decoration of Beta with Theta as Theta2. This is a temporary decoration because Beta after execution erase any new identifier including Theta. So each time we call Beta, statement Module Theta make this module unless a decoration stop it. ====English Vocabulary==== -Module Beta { +Module Beta { Module Theta (x){ Print "This is Theta, we get x=";x } @@ -94,141 +38,8 @@ Module Theta2 (x) { } Beta ; Theta as Theta2 - -This is a rare case. Most cases use alternative definitions: - -Module Beta { - Module Theta (x){ - Print "This is Theta, we get x=";x - } - For i=1 to 3 : Theta i : Next i -} -Beta -Module Beta { - Module Theta (x) { - Print "This is Theta2, we get x=";x - } - For i=1 to 3 : Theta i : Next i -} -Beta - - -Another variation is the use of function pass by reference: - -Module Beta { - Read &theta() - For i=1 to 3 :Call Theta(i) : Next i -} -Function Theta(x){ - Print "This is Theta, we get x=";x -} -Function Theta2(x) { - Print "This is Theta2, we get x=";x -} -Beta &Theta() -Beta &Theta2() - - -Or a more compact way to use a Group: - -Module Beta { - Read That - For i=1 to 3 :Call That.Theta(i) : Next i -} -Group A { - Function Theta(x){ - Print "This is Theta, we get x=";x - } -} -Group B { - Function Theta(x) { - Print "This is Theta2, we get x=";x - } -} -Beta A -Beta B - - -Or a more compact way to use a Class: - -Module Beta { - Read That - For i=1 to 3 :Call That.Theta(i) : Next i -} -Class Something { -Private: - string message=letter$ ' letter$ read from stack of values a string -Public: - Function Theta(x){ - Print .message;x - } -} -A=Something("This is Theta, we get x=") -B=Something("This is Theta2, we get x=") -Beta A -Beta B - - - -Or a variant of class which made an object which return value - -Module Beta { - Read &That - For i=1 to 3 :Print That(i) : Next i -} -Class Something { -Private: - string message=letter$ ' letter$ read from stack of values a string -Public: - Set { - Read This - } - Value (x){ ' (x) change to: Read x - = .message + x ' .message is string (x can be string or number) - } -} -A=Something("This is Theta, we get x=") -Beta &A -A=Something("This is Theta2, we get x=") -Beta &A - - -Or by using lambda functions (functions which we hold in variables, with closures) - - -Module Beta { - Read &That - For i=1 to 3 :Print That(i) : Next i -} -m="This is Theta, we get x=" -A=lambda m (x)->m + x ' one line lambda function -Beta &A -' we can use multiline lambda functions -A=lambda m="This is Theta2, we get x=" (x)->{ - =m + x -} -Beta &A - - -The same but now we bass by value (we remove & from the caller and the callee too: - - -Module Beta { - Read That - For i=1 to 3 :Print That(i) : Next i -} -m="This is Theta, we get x=" -A=lambda m (x)->m + x ' one line lambda function -Beta A -' we can use multiline lambda functions -A=lambda m="This is Theta2, we get x=" (x)->{ - =m + x -} -Beta A - - ====Greek Vocabulary==== -Τμήμα Βήτα { +Τμήμα Βήτα { Τμήμα Θήτα (χ){ Τύπωσε "Αυτό είναι το Θήτα, θα πάρουμε το χ=";χ } @@ -241,9 +52,9 @@ Beta A Βήτα ; Θήτα ως Θήτα2 -As we can see from code, some statements are like BASIC, except the use of curly brackets {}. Check the code below. We have a Module (as a Procedure), where we define some functions and some variables, as entities. These entities defined in every call to CheckIt, and erased when execution return from CheckIt. By default every parameter in M2000 pass by value. We define a function, Alfa() where we set type for parameter. +As we can see from code, some statements are like BASIC, except the use of curly brackets {}. Check the code below. We have a Module (as a Procedure), where we define some functions and some variables, as entities. These entities defined in every call to CheckIt, and erased when execution return from CheckIt. By default every parameter in M2000 pass by value. We define two functions, Alfa() where we set type for parameter x and ExpType$() where we not set type for x, and we wish to return the name of type when we make a call. -Module CheckIt { +Module CheckIt { \\ We can't call something out of this module Function Alfa(X as double) { =X**2 @@ -259,13 +70,14 @@ As we can see from code, some statements are like BASIC, except the use of curly Print Type$(Z) Currency Z1=212.12, Z2=323233.12, Z3=223212323323.12 Print Z1, Z2, Z3 - Print Type$(Z1+Z2) ' Currency - Print Type$(Z1*Z2) ' Currency - Print Type$(Z2*Z3) ' Double (Currency can't hold this number) + Def ExpType$(x)=Type$(x) + Print ExpType$(Z1+Z2) ' Currency + Print ExpType$(Z1*Z2) ' Currency + Print ExpType$(Z2*Z3) ' Double (Currency can't hold this number) \\ Integer, Long, Single, Currency, Decimal - Print Type$(10%), Type$(10&), Type$(10~), Type$(10#), Type$(10@) + Print ExpType$(10%), ExpType$(10&), ExpType$(10~), ExpType$(10#), ExpType$(10@) \\ Without symbol is a Double - Print Type$(10) + Print ExpType$(10) } \\ We call it CheckIt @@ -280,7 +92,7 @@ A statement Input Alfa$ can input characters for a string or for object typed gr Types are strong for values with a name (variables, constants), but weak for items in containers. In a container (Array, Inventory and Stack) we can place anything including other containers. We can bypass the "strong" capability but this isn't a practice for good programming. Internal or variables are of type of Variant, so we can make a reference of A to A$ and we can save a string "1212" and read from A the number 1212. - + Module AKindOfMess { a=10@ Print Type$(a)="Decimal" @@ -319,7 +131,7 @@ Print Error$="" So check this for proper use of types. -Module CheckInt { +Module CheckInt { A%=1212212.12@ Print A% ' 1212212 A%=1212212.52@ @@ -337,19 +149,18 @@ So check this for proper use of types. } CheckInt -So we say about Integer Variables, and no Integer Numeric Type. Like in Basic, M2000 is not case sensitive (except for labels), so A% and a% is the same. We may have A, A$ and A% as three variables, or A(), A%(), A$() as arrays or and functions. We can use name(* ) to call function and not array if we have each with same name. +So we say about Integer Variables, and no Integer Numeric Type. Like in Basic, M2000 is not case sensitive (except for labels), so A% and a% is the same. We may have A, A$ and A% as three variables, or A(), A%(), A$() as arrays or and functions. We can use name(@ ) to call function and not array if we have each with same name. -Dim A(10)=1 +Dim A(10)=1 Def A(x)=x**2 -Print A(3), A(* 4) ' change @ to * from later versions - +Print A(3), A(@ 4) By default all variables are local. M2000 uses heap to store local variables, not stack. We can use global variables, but a local definition hide a global one. We can make global variables for temporary use (at return from module which we define a global, this global erased). A global definition in an already defined global variable with same name, hide for temporary use the old global variable. It is easy to make modules, with modules, functions, variables, arrays. We can use subroutines when we want code in a module or a function to used more than once. We can use local variables inside subroutines. In subroutines we can use module's variables, functions, subroutines. Until here we see something like BASIC, except that variables are local to modules and functions, but can be used by subroutines. Also we have see that we can replace a module in a module when we call it. With this replacement we can use a predefined logic with some "terminals", modules that get parameters and do final things. We can make global modules and functions in local modules and functions, but these exist until creator module or function exit. -M2000 can be used for more advanced programming. Modules and functions can be members of Groups. Groups are values. So a function can return a Group. +M2000 can be used for more advanced programming. Modules and functions can be members of Groups. Groups are values. So a function can return a Group. ===Stack of Values=== Modules and functions get parameters in a stack. Modules get the parent stack with parameters, and functions get a new stack with parameters. Modules return from call and are responsible to clear as needed the stack. Functions drop the stack after the call from an expression. A module can return entities in stack, if we want to do that. We can call a module and pass parameters, and that module can call other module leaving parameters in stack to be read in last module. @@ -359,7 +170,7 @@ In the example below (y) is a Read y for module definition. Early versions of la As we see alfa has no read statement, because before get the first number need to make two modules, and then pop one number and call a module passing current stack, so if choose beta, then the second value feed y from a read y statement. - + module alfa { module beta (y) { print y**3 @@ -384,13 +195,15 @@ function sumall { print sumall(1,2,3,4,5,6,7)=28 + + ===OOP=== Groups are objects for M2000. We can use them as values, and if we want we can use pointers for groups (but we can make a lot of programs without using pointers to groups). Without using pointer, a Group may be local with a name in a Module or can be in a container like array, inventory (a type of map) and stack objects, without name. Groups may have private and public members, may have properties as read only, may get value and return value, and may have operators. Members of Groups can be anything, including other groups. Groups may have events too. We can make groups by using CLASS statement or by using own function which return a Group or a pointer to Group. A special object is the lambda object, which may have a number of closures, and have to faces, a variable and a function: -Module Delta { +Module Delta { \\ Make a group like a lambda \\ A Class make a Global Function \\ (in a group a Class definition make a group member, not a global function) @@ -431,7 +244,7 @@ We can place a lambda function as closure in a lambda function, and we can build a class define a type too. We can make a class from other classes too. We can make inner classes too. - + Form 80,50 \\ counters supposed we provide them from a file global LastCustomerId=100, ReportId=80 @@ -529,7 +342,7 @@ While M { Until now we see modules/functions/subs for procedural programming, Groups for OOP, Groups as lambda functions and lambda functions for functional programming. We can use events for groups and for COM objects, including GUI objects. -Module Beta { +Module Beta { Group WithEvents Alpha { Event "One" Module DoIt (x) { @@ -567,7 +380,7 @@ Until now we see that programming with events can be used in M2000. There is an Modules may have Threads, part of modules that can be executed in intervals, can be halted, or can be released, and can be erased. Each thread has own stack and may have own static variables (Modules and Functions also may have static variables), but can use modules variables and functions/modules/subs. Threads can run concurrent (thread return to task manager after execution of a statement or a block of statements) or sequential (a thread has to exit from interval to start other thread) -Module Zeta { +Module Zeta { k=10 Thread { k++ @@ -586,7 +399,7 @@ Zeta M2000 Interpreter can work with Structures and Buffers. Buffer is a memory block and Structure can define types of memory, and a buffer can hold arrays of structures. Each structure can be made from other structures or arrays of structures, and may have unions. We can use buffers for code execution (writing machine code), using standard buffers (not executable), for data holder. Also we can use Buffers calling external dll and passing by address. -Module Kappa { +Module Kappa { Function Theta(x) { Structure Points_single { x as single @@ -602,26 +415,4 @@ M2000 Interpreter can work with Structures and Buffers. Buffer is a memory block \\ Print Eval(P, 0!x)=1212.12~, Eval(P, 0!y)=21.1212~ } -Kappa -Module Kappa { - Function Theta(x) { - Structure Points_single { - x as single - y as single - } - Buffer Clear Points as Points_single*x - =Points - } - P=Theta(100) - Print Len(P)=800 ' 2x4x100 bytes - ' new way to use fields of structure - P[0]|x=1212.12 - P[0]|y=21.1212 - Print Eval(P, 0!x)=1212.12~, Eval(P, 0!y)=21.1212~ - Print P[0]|x=1212.12~, P[0]|y=21.1212~ - P[4]=P[0] ' copy of structure at offser 4*len of structrure Points_single - ' p(0) is address of first struct, p(4) is address of 5th struct - Print P[4]|x=1212.12~, P[4]|y=21.1212~, p(4)-p(0)=32 -} -Kappa - \ No newline at end of file +Kappa \ No newline at end of file diff --git a/Lang/M2000-Interpreter/ADFGVX-cipher b/Lang/M2000-Interpreter/ADFGVX-cipher deleted file mode 120000 index 58053e0f2d..0000000000 --- a/Lang/M2000-Interpreter/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Apply-a-digital-filter-direct-form-II-transposed- b/Lang/M2000-Interpreter/Apply-a-digital-filter-direct-form-II-transposed- deleted file mode 120000 index 0994290aa3..0000000000 --- a/Lang/M2000-Interpreter/Apply-a-digital-filter-direct-form-II-transposed- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-digital-filter-direct-form-II-transposed-/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Arbitrary-precision-integers-included- b/Lang/M2000-Interpreter/Arbitrary-precision-integers-included- deleted file mode 120000 index 4f4595771b..0000000000 --- a/Lang/M2000-Interpreter/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Arithmetic-Complex b/Lang/M2000-Interpreter/Arithmetic-Complex deleted file mode 120000 index d7240f321f..0000000000 --- a/Lang/M2000-Interpreter/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Associative-array-Merging b/Lang/M2000-Interpreter/Associative-array-Merging deleted file mode 120000 index e54ba7cbfd..0000000000 --- a/Lang/M2000-Interpreter/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Averages-Mean-angle b/Lang/M2000-Interpreter/Averages-Mean-angle deleted file mode 120000 index 5bcc89482d..0000000000 --- a/Lang/M2000-Interpreter/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Averages-Root-mean-square b/Lang/M2000-Interpreter/Averages-Root-mean-square deleted file mode 120000 index 226fa9019d..0000000000 --- a/Lang/M2000-Interpreter/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Averages-Simple-moving-average b/Lang/M2000-Interpreter/Averages-Simple-moving-average deleted file mode 120000 index 4d812f1b4c..0000000000 --- a/Lang/M2000-Interpreter/Averages-Simple-moving-average +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Simple-moving-average/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Babylonian-spiral b/Lang/M2000-Interpreter/Babylonian-spiral deleted file mode 120000 index 70eeaaf834..0000000000 --- a/Lang/M2000-Interpreter/Babylonian-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babylonian-spiral/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Bernoulli-numbers b/Lang/M2000-Interpreter/Bernoulli-numbers deleted file mode 120000 index 91c31cbe94..0000000000 --- a/Lang/M2000-Interpreter/Bernoulli-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bernoulli-numbers/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Bifid-cipher b/Lang/M2000-Interpreter/Bifid-cipher deleted file mode 120000 index c97cd39b1f..0000000000 --- a/Lang/M2000-Interpreter/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Binary-strings b/Lang/M2000-Interpreter/Binary-strings deleted file mode 120000 index 7890dd1bf5..0000000000 --- a/Lang/M2000-Interpreter/Binary-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-strings/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Bitmap-B-zier-curves-Quadratic b/Lang/M2000-Interpreter/Bitmap-B-zier-curves-Quadratic deleted file mode 120000 index 2471b47323..0000000000 --- a/Lang/M2000-Interpreter/Bitmap-B-zier-curves-Quadratic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-B-zier-curves-Quadratic/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Bitmap-Bresenhams-line-algorithm b/Lang/M2000-Interpreter/Bitmap-Bresenhams-line-algorithm deleted file mode 120000 index 37e0c9a050..0000000000 --- a/Lang/M2000-Interpreter/Bitmap-Bresenhams-line-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Bresenhams-line-algorithm/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Bitwise-operations b/Lang/M2000-Interpreter/Bitwise-operations deleted file mode 120000 index 7b5956a12b..0000000000 --- a/Lang/M2000-Interpreter/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Cartesian-product-of-two-or-more-lists b/Lang/M2000-Interpreter/Cartesian-product-of-two-or-more-lists deleted file mode 120000 index afa95add18..0000000000 --- a/Lang/M2000-Interpreter/Cartesian-product-of-two-or-more-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cartesian-product-of-two-or-more-lists/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Chinese-zodiac b/Lang/M2000-Interpreter/Chinese-zodiac deleted file mode 120000 index ba20540cb2..0000000000 --- a/Lang/M2000-Interpreter/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Compare-length-of-two-strings b/Lang/M2000-Interpreter/Compare-length-of-two-strings deleted file mode 120000 index 1726357b73..0000000000 --- a/Lang/M2000-Interpreter/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Compound-data-type b/Lang/M2000-Interpreter/Compound-data-type deleted file mode 120000 index 661e74ca81..0000000000 --- a/Lang/M2000-Interpreter/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Count-occurrences-of-a-substring b/Lang/M2000-Interpreter/Count-occurrences-of-a-substring deleted file mode 120000 index 96e93abdc4..0000000000 --- a/Lang/M2000-Interpreter/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Deal-cards-for-FreeCell b/Lang/M2000-Interpreter/Deal-cards-for-FreeCell deleted file mode 120000 index 59b0374429..0000000000 --- a/Lang/M2000-Interpreter/Deal-cards-for-FreeCell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deal-cards-for-FreeCell/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Doomsday-rule b/Lang/M2000-Interpreter/Doomsday-rule deleted file mode 120000 index 64bda385da..0000000000 --- a/Lang/M2000-Interpreter/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Egyptian-division b/Lang/M2000-Interpreter/Egyptian-division deleted file mode 120000 index ed8318ad3d..0000000000 --- a/Lang/M2000-Interpreter/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Equilibrium-index b/Lang/M2000-Interpreter/Equilibrium-index deleted file mode 120000 index 52fd43669a..0000000000 --- a/Lang/M2000-Interpreter/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Eulers-identity b/Lang/M2000-Interpreter/Eulers-identity deleted file mode 120000 index af0f40c33c..0000000000 --- a/Lang/M2000-Interpreter/Eulers-identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-identity/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Execute-Computer-Zero b/Lang/M2000-Interpreter/Execute-Computer-Zero deleted file mode 120000 index fecab5c3ec..0000000000 --- a/Lang/M2000-Interpreter/Execute-Computer-Zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Computer-Zero/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Factors-of-a-Mersenne-number b/Lang/M2000-Interpreter/Factors-of-a-Mersenne-number deleted file mode 120000 index dcb49d5579..0000000000 --- a/Lang/M2000-Interpreter/Factors-of-a-Mersenne-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-a-Mersenne-number/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Fast-Fourier-transform b/Lang/M2000-Interpreter/Fast-Fourier-transform deleted file mode 120000 index e70d70854c..0000000000 --- a/Lang/M2000-Interpreter/Fast-Fourier-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fast-Fourier-transform/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/File-extension-is-in-extensions-list b/Lang/M2000-Interpreter/File-extension-is-in-extensions-list deleted file mode 120000 index 6d12e57411..0000000000 --- a/Lang/M2000-Interpreter/File-extension-is-in-extensions-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-extension-is-in-extensions-list/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Find-the-last-Sunday-of-each-month b/Lang/M2000-Interpreter/Find-the-last-Sunday-of-each-month deleted file mode 120000 index 14e77f2ff4..0000000000 --- a/Lang/M2000-Interpreter/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Four-is-magic b/Lang/M2000-Interpreter/Four-is-magic deleted file mode 120000 index 3bd19ce379..0000000000 --- a/Lang/M2000-Interpreter/Four-is-magic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Four-is-magic/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Globally-replace-text-in-several-files b/Lang/M2000-Interpreter/Globally-replace-text-in-several-files deleted file mode 120000 index 6371957a66..0000000000 --- a/Lang/M2000-Interpreter/Globally-replace-text-in-several-files +++ /dev/null @@ -1 +0,0 @@ -../../Task/Globally-replace-text-in-several-files/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Greatest-subsequential-sum b/Lang/M2000-Interpreter/Greatest-subsequential-sum deleted file mode 120000 index 5470dd7511..0000000000 --- a/Lang/M2000-Interpreter/Greatest-subsequential-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-subsequential-sum/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/HTTPS b/Lang/M2000-Interpreter/HTTPS deleted file mode 120000 index 07f4e45833..0000000000 --- a/Lang/M2000-Interpreter/HTTPS +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/ISBN13-check-digit b/Lang/M2000-Interpreter/ISBN13-check-digit deleted file mode 120000 index b320adf2bf..0000000000 --- a/Lang/M2000-Interpreter/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols b/Lang/M2000-Interpreter/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols deleted file mode 120000 index 85569db69f..0000000000 --- a/Lang/M2000-Interpreter/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols +++ /dev/null @@ -1 +0,0 @@ -../../Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/K-d-tree b/Lang/M2000-Interpreter/K-d-tree deleted file mode 120000 index 5f1e9bff31..0000000000 --- a/Lang/M2000-Interpreter/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Leonardo-numbers b/Lang/M2000-Interpreter/Leonardo-numbers deleted file mode 120000 index 4f37c1babb..0000000000 --- a/Lang/M2000-Interpreter/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Logistic-curve-fitting-in-epidemiology b/Lang/M2000-Interpreter/Logistic-curve-fitting-in-epidemiology deleted file mode 120000 index d60f5aa239..0000000000 --- a/Lang/M2000-Interpreter/Logistic-curve-fitting-in-epidemiology +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logistic-curve-fitting-in-epidemiology/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Long-multiplication b/Lang/M2000-Interpreter/Long-multiplication deleted file mode 120000 index ba1dc9bc62..0000000000 --- a/Lang/M2000-Interpreter/Long-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-multiplication/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Long-year b/Lang/M2000-Interpreter/Long-year deleted file mode 120000 index 7119be8d2b..0000000000 --- a/Lang/M2000-Interpreter/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Mastermind b/Lang/M2000-Interpreter/Mastermind deleted file mode 120000 index 3cfbb80935..0000000000 --- a/Lang/M2000-Interpreter/Mastermind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mastermind/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Matrix-digital-rain b/Lang/M2000-Interpreter/Matrix-digital-rain deleted file mode 120000 index c3f5d509a7..0000000000 --- a/Lang/M2000-Interpreter/Matrix-digital-rain +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-digital-rain/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Matrix-transposition b/Lang/M2000-Interpreter/Matrix-transposition deleted file mode 120000 index 5ea61d7980..0000000000 --- a/Lang/M2000-Interpreter/Matrix-transposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-transposition/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Modified-random-distribution b/Lang/M2000-Interpreter/Modified-random-distribution deleted file mode 120000 index bbbb129f02..0000000000 --- a/Lang/M2000-Interpreter/Modified-random-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modified-random-distribution/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Modular-exponentiation b/Lang/M2000-Interpreter/Modular-exponentiation deleted file mode 120000 index 99e9549d1a..0000000000 --- a/Lang/M2000-Interpreter/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Morse-code b/Lang/M2000-Interpreter/Morse-code deleted file mode 120000 index 77ce05e92e..0000000000 --- a/Lang/M2000-Interpreter/Morse-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Morse-code/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Multi-dimensional-array b/Lang/M2000-Interpreter/Multi-dimensional-array deleted file mode 120000 index 24c2948fdf..0000000000 --- a/Lang/M2000-Interpreter/Multi-dimensional-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-dimensional-array/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Multiple-regression b/Lang/M2000-Interpreter/Multiple-regression deleted file mode 120000 index f645ea689c..0000000000 --- a/Lang/M2000-Interpreter/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Number-names b/Lang/M2000-Interpreter/Number-names deleted file mode 120000 index acf20af45b..0000000000 --- a/Lang/M2000-Interpreter/Number-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Number-names/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Old-lady-swallowed-a-fly b/Lang/M2000-Interpreter/Old-lady-swallowed-a-fly deleted file mode 120000 index f9fe169db2..0000000000 --- a/Lang/M2000-Interpreter/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Ordered-words b/Lang/M2000-Interpreter/Ordered-words deleted file mode 120000 index ccf0ec6f16..0000000000 --- a/Lang/M2000-Interpreter/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Password-generator b/Lang/M2000-Interpreter/Password-generator deleted file mode 120000 index 0b48ccbf39..0000000000 --- a/Lang/M2000-Interpreter/Password-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Password-generator/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Periodic-table b/Lang/M2000-Interpreter/Periodic-table deleted file mode 120000 index 0e286fad08..0000000000 --- a/Lang/M2000-Interpreter/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Polyspiral b/Lang/M2000-Interpreter/Polyspiral deleted file mode 120000 index f2eb619d45..0000000000 --- a/Lang/M2000-Interpreter/Polyspiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polyspiral/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Power-set b/Lang/M2000-Interpreter/Power-set deleted file mode 120000 index c99b047826..0000000000 --- a/Lang/M2000-Interpreter/Power-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Power-set/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Problem-of-Apollonius b/Lang/M2000-Interpreter/Problem-of-Apollonius deleted file mode 120000 index 3c1d7459c0..0000000000 --- a/Lang/M2000-Interpreter/Problem-of-Apollonius +++ /dev/null @@ -1 +0,0 @@ -../../Task/Problem-of-Apollonius/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Pseudo-random-numbers-Middle-square-method b/Lang/M2000-Interpreter/Pseudo-random-numbers-Middle-square-method deleted file mode 120000 index 71371c48fd..0000000000 --- a/Lang/M2000-Interpreter/Pseudo-random-numbers-Middle-square-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Middle-square-method/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Pseudo-random-numbers-Xorshift-star b/Lang/M2000-Interpreter/Pseudo-random-numbers-Xorshift-star deleted file mode 120000 index a60ebed0a5..0000000000 --- a/Lang/M2000-Interpreter/Pseudo-random-numbers-Xorshift-star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Xorshift-star/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Quaternion-type b/Lang/M2000-Interpreter/Quaternion-type new file mode 120000 index 0000000000..7027a86930 --- /dev/null +++ b/Lang/M2000-Interpreter/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Read-a-specific-line-from-a-file b/Lang/M2000-Interpreter/Read-a-specific-line-from-a-file deleted file mode 120000 index 12c1b22a47..0000000000 --- a/Lang/M2000-Interpreter/Read-a-specific-line-from-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-specific-line-from-a-file/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Roots-of-a-quadratic-function b/Lang/M2000-Interpreter/Roots-of-a-quadratic-function deleted file mode 120000 index 0f141b08fb..0000000000 --- a/Lang/M2000-Interpreter/Roots-of-a-quadratic-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roots-of-a-quadratic-function/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Simple-turtle-graphics b/Lang/M2000-Interpreter/Simple-turtle-graphics deleted file mode 120000 index 8bb4a18e49..0000000000 --- a/Lang/M2000-Interpreter/Simple-turtle-graphics +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-turtle-graphics/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Sleeping-Beauty-problem b/Lang/M2000-Interpreter/Sleeping-Beauty-problem deleted file mode 120000 index aee1fdd4f8..0000000000 --- a/Lang/M2000-Interpreter/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Sort-an-integer-array b/Lang/M2000-Interpreter/Sort-an-integer-array deleted file mode 120000 index f409389d27..0000000000 --- a/Lang/M2000-Interpreter/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Sort-an-outline-at-every-level b/Lang/M2000-Interpreter/Sort-an-outline-at-every-level deleted file mode 120000 index b5c1e68e5d..0000000000 --- a/Lang/M2000-Interpreter/Sort-an-outline-at-every-level +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-outline-at-every-level/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Sorting-algorithms-Strand-sort b/Lang/M2000-Interpreter/Sorting-algorithms-Strand-sort deleted file mode 120000 index 94b7b8369f..0000000000 --- a/Lang/M2000-Interpreter/Sorting-algorithms-Strand-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Strand-sort/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Stable-marriage-problem b/Lang/M2000-Interpreter/Stable-marriage-problem deleted file mode 120000 index 1148451e3c..0000000000 --- a/Lang/M2000-Interpreter/Stable-marriage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stable-marriage-problem/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Statistics-Basic b/Lang/M2000-Interpreter/Statistics-Basic deleted file mode 120000 index 9d5dab6ba7..0000000000 --- a/Lang/M2000-Interpreter/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Statistics-Normal-distribution b/Lang/M2000-Interpreter/Statistics-Normal-distribution deleted file mode 120000 index 6018d24b87..0000000000 --- a/Lang/M2000-Interpreter/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Strip-a-set-of-characters-from-a-string b/Lang/M2000-Interpreter/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index ca8f98d606..0000000000 --- a/Lang/M2000-Interpreter/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Taxicab-numbers b/Lang/M2000-Interpreter/Taxicab-numbers deleted file mode 120000 index 6c7f58f7d6..0000000000 --- a/Lang/M2000-Interpreter/Taxicab-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Taxicab-numbers/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Temperature-conversion b/Lang/M2000-Interpreter/Temperature-conversion deleted file mode 120000 index 75d9db05ed..0000000000 --- a/Lang/M2000-Interpreter/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Terminal-control-Hiding-the-cursor b/Lang/M2000-Interpreter/Terminal-control-Hiding-the-cursor deleted file mode 120000 index 7d9e8bacf5..0000000000 --- a/Lang/M2000-Interpreter/Terminal-control-Hiding-the-cursor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Hiding-the-cursor/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Tree-datastructures b/Lang/M2000-Interpreter/Tree-datastructures deleted file mode 120000 index 1fa6a47d52..0000000000 --- a/Lang/M2000-Interpreter/Tree-datastructures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-datastructures/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Truth-table b/Lang/M2000-Interpreter/Truth-table deleted file mode 120000 index b77fe8354b..0000000000 --- a/Lang/M2000-Interpreter/Truth-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truth-table/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Ultra-useful-primes b/Lang/M2000-Interpreter/Ultra-useful-primes deleted file mode 120000 index 5330980a0e..0000000000 --- a/Lang/M2000-Interpreter/Ultra-useful-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ultra-useful-primes/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Video-display-modes b/Lang/M2000-Interpreter/Video-display-modes deleted file mode 120000 index 39ee17dc2d..0000000000 --- a/Lang/M2000-Interpreter/Video-display-modes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Video-display-modes/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Window-management b/Lang/M2000-Interpreter/Window-management deleted file mode 120000 index bb8ac9e26a..0000000000 --- a/Lang/M2000-Interpreter/Window-management +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-management/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M2000-Interpreter/Write-language-name-in-3D-ASCII b/Lang/M2000-Interpreter/Write-language-name-in-3D-ASCII deleted file mode 120000 index 3ec6cbeb80..0000000000 --- a/Lang/M2000-Interpreter/Write-language-name-in-3D-ASCII +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-language-name-in-3D-ASCII/M2000-Interpreter \ No newline at end of file diff --git a/Lang/M4/Cantor-set b/Lang/M4/Cantor-set deleted file mode 120000 index cb3913e176..0000000000 --- a/Lang/M4/Cantor-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cantor-set/M4 \ No newline at end of file diff --git a/Lang/M4/Empty-program b/Lang/M4/Empty-program new file mode 120000 index 0000000000..3ce502532c --- /dev/null +++ b/Lang/M4/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/M4 \ No newline at end of file diff --git a/Lang/MACRO-11/Run-length-encoding b/Lang/MACRO-11/Run-length-encoding deleted file mode 120000 index 3f700314e0..0000000000 --- a/Lang/MACRO-11/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/MACRO-11 \ No newline at end of file diff --git a/Lang/MACRO-11/Square-but-not-cube b/Lang/MACRO-11/Square-but-not-cube deleted file mode 120000 index 7130b2c620..0000000000 --- a/Lang/MACRO-11/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/MACRO-11 \ No newline at end of file diff --git a/Lang/MAD/Arithmetic-derivative b/Lang/MAD/Arithmetic-derivative deleted file mode 120000 index e7c006ae6c..0000000000 --- a/Lang/MAD/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/MAD \ No newline at end of file diff --git a/Lang/MAD/Look-and-say-sequence b/Lang/MAD/Look-and-say-sequence deleted file mode 120000 index dbca6a6456..0000000000 --- a/Lang/MAD/Look-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Look-and-say-sequence/MAD \ No newline at end of file diff --git a/Lang/MAD/Zeckendorf-number-representation b/Lang/MAD/Zeckendorf-number-representation deleted file mode 120000 index 3be8d0f3cc..0000000000 --- a/Lang/MAD/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/MAD \ No newline at end of file diff --git a/Lang/MATLAB/Bioinformatics-base-count b/Lang/MATLAB/Bioinformatics-base-count new file mode 120000 index 0000000000..2622a73422 --- /dev/null +++ b/Lang/MATLAB/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/MATLAB \ No newline at end of file diff --git a/Lang/MATLAB/Find-the-last-Sunday-of-each-month b/Lang/MATLAB/Find-the-last-Sunday-of-each-month deleted file mode 120000 index 989cc5e7f4..0000000000 --- a/Lang/MATLAB/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/MATLAB \ No newline at end of file diff --git a/Lang/ML-I/Empty-program b/Lang/ML-I/Empty-program new file mode 120000 index 0000000000..48b06f2449 --- /dev/null +++ b/Lang/ML-I/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/ML-I \ No newline at end of file diff --git a/Lang/MSX-Basic/Colour-pinstripe-Display b/Lang/MSX-Basic/Colour-pinstripe-Display deleted file mode 120000 index f0497934ea..0000000000 --- a/Lang/MSX-Basic/Colour-pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-pinstripe-Display/MSX-Basic \ No newline at end of file diff --git a/Lang/MSX-Basic/Diversity-prediction-theorem b/Lang/MSX-Basic/Diversity-prediction-theorem deleted file mode 120000 index e57f4cb084..0000000000 --- a/Lang/MSX-Basic/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/MSX-Basic \ No newline at end of file diff --git a/Lang/MSX-Basic/Evaluate-binomial-coefficients b/Lang/MSX-Basic/Evaluate-binomial-coefficients deleted file mode 120000 index 806e2bfad2..0000000000 --- a/Lang/MSX-Basic/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/MSX-Basic \ No newline at end of file diff --git a/Lang/MSX-Basic/Generate-lower-case-ASCII-alphabet b/Lang/MSX-Basic/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 8cceece87f..0000000000 --- a/Lang/MSX-Basic/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/MSX-Basic \ No newline at end of file diff --git a/Lang/MSX-Basic/Leonardo-numbers b/Lang/MSX-Basic/Leonardo-numbers deleted file mode 120000 index 070fbe9186..0000000000 --- a/Lang/MSX-Basic/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/MSX-Basic \ No newline at end of file diff --git a/Lang/MSX-Basic/Map-range b/Lang/MSX-Basic/Map-range deleted file mode 120000 index 749213e0f6..0000000000 --- a/Lang/MSX-Basic/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/MSX-Basic \ No newline at end of file diff --git a/Lang/MSX-Basic/Pascals-triangle b/Lang/MSX-Basic/Pascals-triangle deleted file mode 120000 index bfaa04f0db..0000000000 --- a/Lang/MSX-Basic/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/MSX-Basic \ No newline at end of file diff --git a/Lang/MSX-Basic/Pinstripe-Display b/Lang/MSX-Basic/Pinstripe-Display deleted file mode 120000 index b37582657e..0000000000 --- a/Lang/MSX-Basic/Pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pinstripe-Display/MSX-Basic \ No newline at end of file diff --git a/Lang/MUMPS/00-LANG.txt b/Lang/MUMPS/00-LANG.txt index 491ec139a6..cfb6ac9800 100644 --- a/Lang/MUMPS/00-LANG.txt +++ b/Lang/MUMPS/00-LANG.txt @@ -1,21 +1,14 @@ {{language -|untyped=yes -|gc -|parampass| -}} - +|untyped=yes}} {{language programming paradigm|procedural}} -

    Visit the Google group/ Usenet newsgroupcomp.lang.mumps for discussions about this language.

    +

    Visit the Google group comp.lang.mumps for discussions about this language.

    Visit [[wp:MUMPS|Wikipedia]] for a general description.

    See http://71.174.62.16/Demo/AnnoStd for details about the language.

    -

    Standard MUMPS has one data type (strings) and some dialects (Cache, MSM, IRIS) add a second data type (objects). A variable can be unsubscripted or not, and the subscripted variables form a -sparse n-tree, or associative arrays or sparse multidimensional hierarchical key-value pair with keys as strings and values as strings. - -MUMPS doesn't have traditional arrays, but has an array syntax that manipulates trees as if they were arrays, using indexing to access nodes of the tree. You can create a tree that can have unlimited levels of branching, with keys and values associated with each node in the tree. Similarly, while the language doesn't have lists, you can mimic lists by creating strings with a consistent character (or string) as a delimiter separating the entries. - -The Cache and IRIS dialects also support explicit List operations and data structures as values. +

    Standard MUMPS has one data types (strings) and some dialects (Cache, MSM) add a second data type (objects). A variable can be unsubscripted or not, and the subscripted variables form a +sparse n-tree. MUMPS doesn't have traditional arrays, but has an array syntax that manipulates trees as if they were arrays, using indexing to access nodes of the tree. You can create a tree that can have unlimited levels of branching, with keys and values associated with each node in the tree. Similarly, while the language doesn't have lists, you can mimic lists by creating strings with a consistent character (or string) as a delimiter separating the entries. +The Cache dialect also supports explicit List operations and data structures.

    \ No newline at end of file diff --git a/Lang/MUMPS/Menu b/Lang/MUMPS/Menu new file mode 120000 index 0000000000..e9b86505e7 --- /dev/null +++ b/Lang/MUMPS/Menu @@ -0,0 +1 @@ +../../Task/Menu/MUMPS \ No newline at end of file diff --git a/Lang/Maple/Empty-program b/Lang/Maple/Empty-program new file mode 120000 index 0000000000..f9fceb04a1 --- /dev/null +++ b/Lang/Maple/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Maple \ No newline at end of file diff --git a/Lang/Maple/Pythagoras-tree b/Lang/Maple/Pythagoras-tree deleted file mode 120000 index 0342fe2180..0000000000 --- a/Lang/Maple/Pythagoras-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagoras-tree/Maple \ No newline at end of file diff --git a/Lang/Maple/Quaternion-type b/Lang/Maple/Quaternion-type new file mode 120000 index 0000000000..dc174952ef --- /dev/null +++ b/Lang/Maple/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Maple \ No newline at end of file diff --git a/Lang/Maple/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Maple/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Maple/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Maple/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/MariaDB/00-LANG.txt b/Lang/MariaDB/00-LANG.txt deleted file mode 100644 index fc505f9a24..0000000000 --- a/Lang/MariaDB/00-LANG.txt +++ /dev/null @@ -1,15 +0,0 @@ -{{language|MariaDB}} -{{implementation|SQL}} - -'''MariaDB''' is a relational database management system (RDBMS) with non-relational extensions, like JSON and dynamic columns. It was originally forked from MySQL. After Oracle acquired MySQL in 2009, its creator Michael "Monty" Widenius and other developers from the team created MariaDB. MariaDB was named after Monty's second daughter, Maria. - -MariaDB is backed by two organisations: the MariaDB Foundation, a not-for-profit organisation that makes sure that MariaDB will remain free forever; and MariaDB plc, a company that provides MariaDB support and sells the MariaDB Enterprise edition. MariaDB code is distributed under the GNU GPL 2. Part of the code belongs to Oracle, because it derives from MySQL. MariaDB KnowledgeBase, its documentation, is available under that GNU FDL and the CC-BY-SA 3.0. - -MariaDB SQL has procedural extensions, which can be used to develop stored procedures, stored functions, triggers and events, as well as anonymous code blocks. It also supports a PL/SQL parser, available when MariaDB is used in Oracle compatibility mode. User-Defined Functions can also be written in a compiled language and be used in SQL statements. MariaDB also supports storage engines and other types of plugins. - -== External Links == -* [https://en.wikipedia.org/wiki/MariaDB Wikipedia:MariaDB] -* [https://mariadb.com/kb MariaDB KnowledgeBase] -* [https://mariadb.com/ MariaDB website] - -[[Category:SQL Derivatives]] \ No newline at end of file diff --git a/Lang/MariaDB/00-META.yaml b/Lang/MariaDB/00-META.yaml deleted file mode 100644 index 4ad202983e..0000000000 --- a/Lang/MariaDB/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:MariaDB diff --git a/Lang/MariaDB/Conditional-structures b/Lang/MariaDB/Conditional-structures deleted file mode 120000 index 1ed7f68fbf..0000000000 --- a/Lang/MariaDB/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/MariaDB \ No newline at end of file diff --git a/Lang/MariaDB/Hello-world-Text b/Lang/MariaDB/Hello-world-Text deleted file mode 120000 index bc1357e35b..0000000000 --- a/Lang/MariaDB/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/MariaDB \ No newline at end of file diff --git a/Lang/MariaDB/Parameterized-SQL-statement b/Lang/MariaDB/Parameterized-SQL-statement deleted file mode 120000 index 28a4df441a..0000000000 --- a/Lang/MariaDB/Parameterized-SQL-statement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parameterized-SQL-statement/MariaDB \ No newline at end of file diff --git a/Lang/MariaDB/Table-creation-Postal-addresses b/Lang/MariaDB/Table-creation-Postal-addresses deleted file mode 120000 index 5f671a41e1..0000000000 --- a/Lang/MariaDB/Table-creation-Postal-addresses +++ /dev/null @@ -1 +0,0 @@ -../../Task/Table-creation-Postal-addresses/MariaDB \ No newline at end of file diff --git a/Lang/Mastermind/00-LANG.txt b/Lang/Mastermind/00-LANG.txt deleted file mode 100644 index faed2e3417..0000000000 --- a/Lang/Mastermind/00-LANG.txt +++ /dev/null @@ -1,292 +0,0 @@ -{{stub}}{{language|Mastermind}} -Mastermind is a programming language designed specifically to create [[Brainf***]] code. The [https://mastermind.lostpixels.org Mastermind IDE] includes a [[Rust]]-based compiler, which converts (compiles) Mastermind source programs into Brainf***. -The current Mastermind compiler generates Brainf*** code assuming an infinite bi-directional tape, as well as 8-bit wrapping cells https://github.com/Heathcorp/Mastermind. - -== Usage == - -=== Variables & Values === - -Variables can be defined as single cells, or as contiguous sets of cells: -// single-cell: -let var = 56; -let c = 'g'; -let bool = true; // true/false equivalent to 1/0 -// multi-cell: -let array[4] = [1, 2, 3, 4]; -let string[5] = "hello"; -If left uninitialised, a cell is assumed to have a value of 0. - -Expressions consist of simple adds and subtractions, arrays and strings cannot be used in expressions: - -// supported: -var += 4 + (5 - 4 + (3 - 2)); -var = 'g' - 23 + true; -var = var + 5; // inefficient but supported -var += array[0] + 5; -let arr[3] = [4 + 3 - ('5' - 46), 1, 3]; - -// NOT supported: -var += [4, 5, 7][1] + 3; -Array indices must be compile-time constant integers - -=== Input & Output === - -Single bytes can be output using the ''output'' operator: - -output 'h'; -output var; -output var + 6; -output array[0]; -// the following are equivalent: -output '\n'; -output 10; -Likewise for ''input'': - -input var; -input arr[2]; -There is also ''*'' spread syntax and support for strings and arrays for ease of use: - -output "hello"; -output ['1', '2', '3']; -output *array; - -input *array; - -=== Loops === - -The simplest is the ''while'' loop, which only supports cell references, not expressions: - -while var { - // do stuff - // var -= 1; - // etc -} - -==== Draining loops ==== -The "drain" loop is equivalent to the common Brainf*** construction of repeating an action ''N'' times, where ''N'' is the value of a tape cell. Hence, "draining" the cell while doing the actions in the loop body. - -drain var { - -} -// shorthand for following: -while var { - // do stuff - var -= 1; -} -This destructively loops as many times as the value in the cell being referenced, this can be used with expressions: - -drain 10 {} -drain var - 6 {} -There is also shorthand "into" syntax for adding to other cells: - -drain var into other_var other_var_2 *spread_array etc; - -// example of typical "for loop": -let i; -drain 10 into i { - output '0' + i; // inefficient for the example -} -// "0123456789" -// equivalent to the following: -let i; -let N = 10; -while N { - output '0' + i; -} - -==== Copying loops ==== -The "copy" loop is equivalent to the drain loop, except it is not destructive. This means the variable can be accessed safely from inside the loop body. - -copy var into other_var *spread_var etc; - -// examples: -copy var { - // this will output the original var value, var times - output var; -} - -let rows = 3; -let columns = 6; -let total; -drain rows { - copy columns into total { - output '.'; - } -} -// ...... -// ...... -// ...... - -=== If/Else === -The "if" and "else" keywords operate similar to [[C]], except "else if" is not supported. The code in the "if" body will be executed if the provided expression is positive, otherwise the "else" body is executed. If the "not" keyword is used, the behavior is reversed. -Examples: - -if 13 { - output "13"; -} - -if var { - output "true"; -} else { - output "false"; -} - -// typical equivalence use-case: -if not var - 10 { - // == -} else { - // != -} - -=== Functions === -Functions work like templates/macros, as they do not perform any passing by value. All functions are in-lined at compile time. This means multiple calls to a large function will significantly increase your compiled [[Brainf***]] size. - -For this reason, function arguments are given using ''<'' angled bracket ''>'' syntax, much like generic functions in other languages: - -def quote { - output 39; // ASCII single quote - output arg; - output 39; -} - -let N = 'g'; -quote; -N += 3; -quote; -// gj - -=== Imports === - -Imports work much like the [[C]] preprocessor: - -#include "other_file" -This copies the contents of "other_file" into the current file at compile-time. - -=== In-line Brainf*** features === - -In-line Brainf*** allows the programmer to define custom behavior as if writing raw [[Brainf***]], this is analogous to [[C]]'s in-line [[Assembly]]. - - -// This is its most basic form: -// find the next cell that equals -1 -bf { - +[->+]- -} - -// This is its more advanced form: -// input a line of lowercase letters and output the uppercase version -// this is an intentionally inefficient example -bf @3 clobbers var *spread_var etc { - ,----------[++++++++++>,----------] - <[<]> - [ - { - let g @0; - assert g unknown; - output g + ('A' - 'a'); - // embedded Mastermind! - } - > - ] - // now clear and return - <[[-]<]> -} -It is the programmer's responsibility to clear used cells and return back to the cell in which the in-line Brainf*** context began. If the programmer does not do this, any Mastermind code after the in-line Brainf*** command will likely break. - -==== Memory location specifiers ==== -For hand-tuning optimizations and in-line Brainf*** that reads from Mastermind variables, you can specify the location on the Brainf*** tape: -Variables can be fixed to a specified location on the eventual Brainf*** tape. This can also be done with in-line Brainf*** code sections. This can be used to share values between Mastermind and Brainf*** contexts. - -let var @3 = 4; -// compiled: >>>++++ - -bf @4 { - <><><> -} -// compiled: >>>><><><> - -==== Clobbering and Assertions ==== -The Mastermind compiler will try to predict the value of cells at compile-time, so it can prevent unnecessary cell clean-ups and unreachable code (with optimizations turned on). If your in-line Brainf*** affects existing Mastermind variables, you should tell the compiler using the "clobbers" keyword, the syntax is similar to the ''drain into'' variable list: - -bf clobbers var *spread_var other_var etc {} -The compiler will now assume nothing about the values of those variables afterwards. - -If instead you want to tell the compiler specifically that a value has become certain, you can use ''assert'': - -assert var equals 3; -// most common use cases: -assert var equals 0; -assert var unknown; -Asserting a variable as ''unknown'' is equivalent to clobbering. - -==== Embedded Mastermind ==== -Embedding Mastermind into your in-line [[Brainf***]] allows you to use Mastermind syntax features for programs within your Brainf***, this is useful for ''N''-length string based programs, or anything not possible in pure Mastermind: - - -let sum @0; - -bf @0 { - >> - // read input (until eof) to the tape, nullifying any spaces or newlines - // (this is probably not a good practical example, ideas are appreciated) - ,[ - { - let c @0; - assert c unknown; // needed otherwise the compiler assumes c = 0 - - if not (c - '\n') { - c = 0; - } - if not (c - ' ') { - c = 0; - } - } - >, - ] -} -Memory location specifiers are relative to the current Mastermind context. Also, top-level variables are not cleared by default in Mastermind contexts, this allows you to "leave" variables in cells for your Brainf*** to use. If you want your embedded Mastermind to clean itself up, you can simply open a scope at the top level: - -bf { - ++----++[][][<><><>] // the program doesn't matter for this example - { - // variables here will not be cleared - let g @2; - assert g unknown; - { - // variables here will be cleared - let b = 32; - } - } - {{ - // self-cleaning Mastermind code here - }} -} - -==== Advanced ==== -All Mastermind features are available within the embedded Mastermind contexts, including in-line [[Brainf***]] code. - -bf { - ++++[ - { - let i @0; - assert i unknown; - let j @1 = i + 1; - - bf @1 { - [.+] - { - // even more layers are possible - bf { - { - output "h" - } - } - } - } - } - -] -} - - -== References == -{{reflist}} \ No newline at end of file diff --git a/Lang/Mastermind/00-META.yaml b/Lang/Mastermind/00-META.yaml deleted file mode 100644 index 52ba5ad7eb..0000000000 --- a/Lang/Mastermind/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Mastermind diff --git a/Lang/Mastermind/Hello-world-Text b/Lang/Mastermind/Hello-world-Text deleted file mode 120000 index a0461bd60e..0000000000 --- a/Lang/Mastermind/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Mastermind \ No newline at end of file diff --git a/Lang/Mastermind/Repeat b/Lang/Mastermind/Repeat deleted file mode 120000 index 25794ace84..0000000000 --- a/Lang/Mastermind/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Mastermind \ No newline at end of file diff --git a/Lang/Mathematica/00-LANG.txt b/Lang/Mathematica/00-LANG.txt index 15e81dd703..5daf1eef81 100644 --- a/Lang/Mathematica/00-LANG.txt +++ b/Lang/Mathematica/00-LANG.txt @@ -11,4 +11,4 @@ It is used in many scientific, engineering, mathematical and computing fields, a [[Category:Mathematical programming languages]] ==Todo== -[[Tasks not implemented in Mathematica]] \ No newline at end of file +[[Reports:Tasks_not_implemented_in_Mathematica]] \ No newline at end of file diff --git a/Lang/Mathematica/15-puzzle-solver b/Lang/Mathematica/15-puzzle-solver deleted file mode 120000 index c802cd3973..0000000000 --- a/Lang/Mathematica/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/ADFGVX-cipher b/Lang/Mathematica/ADFGVX-cipher deleted file mode 120000 index 0a44fcd7ef..0000000000 --- a/Lang/Mathematica/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/ASCII-art-diagram-converter b/Lang/Mathematica/ASCII-art-diagram-converter deleted file mode 120000 index 1006da4cf6..0000000000 --- a/Lang/Mathematica/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Arithmetic-derivative b/Lang/Mathematica/Arithmetic-derivative deleted file mode 120000 index a9033ded41..0000000000 --- a/Lang/Mathematica/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/B-zier-curves-Intersections b/Lang/Mathematica/B-zier-curves-Intersections deleted file mode 120000 index 85dc8fb4ae..0000000000 --- a/Lang/Mathematica/B-zier-curves-Intersections +++ /dev/null @@ -1 +0,0 @@ -../../Task/B-zier-curves-Intersections/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Bioinformatics-base-count b/Lang/Mathematica/Bioinformatics-base-count new file mode 120000 index 0000000000..986950c20f --- /dev/null +++ b/Lang/Mathematica/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Camel-case-and-snake-case b/Lang/Mathematica/Camel-case-and-snake-case deleted file mode 120000 index 6d73876132..0000000000 --- a/Lang/Mathematica/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Doomsday-rule b/Lang/Mathematica/Doomsday-rule deleted file mode 120000 index 92b8fc707b..0000000000 --- a/Lang/Mathematica/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Empty-program b/Lang/Mathematica/Empty-program new file mode 120000 index 0000000000..7445caa973 --- /dev/null +++ b/Lang/Mathematica/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Erd-s-Nicolas-numbers b/Lang/Mathematica/Erd-s-Nicolas-numbers deleted file mode 120000 index d74b7bd3b7..0000000000 --- a/Lang/Mathematica/Erd-s-Nicolas-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Erd-s-Nicolas-numbers/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Jordan-P-lya-numbers b/Lang/Mathematica/Jordan-P-lya-numbers deleted file mode 120000 index 4fd2ab0262..0000000000 --- a/Lang/Mathematica/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Meissel-Mertens-constant b/Lang/Mathematica/Meissel-Mertens-constant new file mode 120000 index 0000000000..8d1d0df59d --- /dev/null +++ b/Lang/Mathematica/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Miller-Rabin-primality-test b/Lang/Mathematica/Miller-Rabin-primality-test new file mode 120000 index 0000000000..400d0fb0e3 --- /dev/null +++ b/Lang/Mathematica/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Parse-an-IP-Address b/Lang/Mathematica/Parse-an-IP-Address deleted file mode 120000 index 32b7086e88..0000000000 --- a/Lang/Mathematica/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Perlin-noise b/Lang/Mathematica/Perlin-noise deleted file mode 120000 index 9de4d18cd6..0000000000 --- a/Lang/Mathematica/Perlin-noise +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perlin-noise/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Prime-numbers-whose-neighboring-pairs-are-tetraprimes b/Lang/Mathematica/Prime-numbers-whose-neighboring-pairs-are-tetraprimes deleted file mode 120000 index e8da31b0d4..0000000000 --- a/Lang/Mathematica/Prime-numbers-whose-neighboring-pairs-are-tetraprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-numbers-whose-neighboring-pairs-are-tetraprimes/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Quaternion-type b/Lang/Mathematica/Quaternion-type new file mode 120000 index 0000000000..700c56b146 --- /dev/null +++ b/Lang/Mathematica/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Radical-of-an-integer b/Lang/Mathematica/Radical-of-an-integer deleted file mode 120000 index e6b1268eae..0000000000 --- a/Lang/Mathematica/Radical-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Radical-of-an-integer/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Ramer-Douglas-Peucker-line-simplification b/Lang/Mathematica/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index 40a31497c6..0000000000 --- a/Lang/Mathematica/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Same-fringe b/Lang/Mathematica/Same-fringe deleted file mode 120000 index 9a80cee1d8..0000000000 --- a/Lang/Mathematica/Same-fringe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Same-fringe/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Mathematica/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Mathematica/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Mathematica/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Mathematica/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Mathematica/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Mathematica/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Mathematica/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Mathematica/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Mathematica/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Mathematica/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Mathematica/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Mathematica/Singular-value-decomposition b/Lang/Mathematica/Singular-value-decomposition deleted file mode 120000 index 1a576b3373..0000000000 --- a/Lang/Mathematica/Singular-value-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singular-value-decomposition/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Sisyphus-sequence b/Lang/Mathematica/Sisyphus-sequence deleted file mode 120000 index 82e0aee9dd..0000000000 --- a/Lang/Mathematica/Sisyphus-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sisyphus-sequence/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Sorting-Algorithms-Circle-Sort b/Lang/Mathematica/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..9ff1fc78ae --- /dev/null +++ b/Lang/Mathematica/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Sphenic-numbers b/Lang/Mathematica/Sphenic-numbers deleted file mode 120000 index c276d09072..0000000000 --- a/Lang/Mathematica/Sphenic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sphenic-numbers/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Strassens-algorithm b/Lang/Mathematica/Strassens-algorithm deleted file mode 120000 index c75340ee0d..0000000000 --- a/Lang/Mathematica/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Sudan-function b/Lang/Mathematica/Sudan-function deleted file mode 120000 index 915d15ee53..0000000000 --- a/Lang/Mathematica/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Suffixation-of-decimal-numbers b/Lang/Mathematica/Suffixation-of-decimal-numbers deleted file mode 120000 index dd6272f891..0000000000 --- a/Lang/Mathematica/Suffixation-of-decimal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Suffixation-of-decimal-numbers/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Tonelli-Shanks-algorithm b/Lang/Mathematica/Tonelli-Shanks-algorithm deleted file mode 120000 index 747956daa4..0000000000 --- a/Lang/Mathematica/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Transliterate-English-text-using-the-Greek-alphabet b/Lang/Mathematica/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index d987c7e779..0000000000 --- a/Lang/Mathematica/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Tropical-algebra-overloading b/Lang/Mathematica/Tropical-algebra-overloading deleted file mode 120000 index 6a45231ead..0000000000 --- a/Lang/Mathematica/Tropical-algebra-overloading +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tropical-algebra-overloading/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Vogels-approximation-method b/Lang/Mathematica/Vogels-approximation-method deleted file mode 120000 index 2d01457a6e..0000000000 --- a/Lang/Mathematica/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/Wagstaff-primes b/Lang/Mathematica/Wagstaff-primes deleted file mode 120000 index 7e781a92a6..0000000000 --- a/Lang/Mathematica/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Mathematica \ No newline at end of file diff --git a/Lang/Mathematica/World-Cup-group-stage b/Lang/Mathematica/World-Cup-group-stage deleted file mode 120000 index c3a327e4ad..0000000000 --- a/Lang/Mathematica/World-Cup-group-stage +++ /dev/null @@ -1 +0,0 @@ -../../Task/World-Cup-group-stage/Mathematica \ No newline at end of file diff --git a/Lang/Maxima/Angle-difference-between-two-bearings b/Lang/Maxima/Angle-difference-between-two-bearings deleted file mode 120000 index b086194fa4..0000000000 --- a/Lang/Maxima/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Arithmetic-derivative b/Lang/Maxima/Arithmetic-derivative deleted file mode 120000 index b682390e8a..0000000000 --- a/Lang/Maxima/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Array-length b/Lang/Maxima/Array-length deleted file mode 120000 index da5c3a4dcd..0000000000 --- a/Lang/Maxima/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Carmichael-3-strong-pseudoprimes b/Lang/Maxima/Carmichael-3-strong-pseudoprimes deleted file mode 120000 index cca27bae48..0000000000 --- a/Lang/Maxima/Carmichael-3-strong-pseudoprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Carmichael-3-strong-pseudoprimes/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Chinese-zodiac b/Lang/Maxima/Chinese-zodiac deleted file mode 120000 index 5fc6134cf1..0000000000 --- a/Lang/Maxima/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Chowla-numbers b/Lang/Maxima/Chowla-numbers deleted file mode 120000 index 4a1835dd7a..0000000000 --- a/Lang/Maxima/Chowla-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chowla-numbers/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Conjugate-transpose b/Lang/Maxima/Conjugate-transpose deleted file mode 120000 index f1ca6a05e7..0000000000 --- a/Lang/Maxima/Conjugate-transpose +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conjugate-transpose/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Continued-fraction-Arithmetic-Construct-from-rational-number b/Lang/Maxima/Continued-fraction-Arithmetic-Construct-from-rational-number deleted file mode 120000 index 29d02a5a5d..0000000000 --- a/Lang/Maxima/Continued-fraction-Arithmetic-Construct-from-rational-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-Construct-from-rational-number/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Delete-a-file b/Lang/Maxima/Delete-a-file deleted file mode 120000 index 9515074358..0000000000 --- a/Lang/Maxima/Delete-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delete-a-file/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Diversity-prediction-theorem b/Lang/Maxima/Diversity-prediction-theorem deleted file mode 120000 index 5f6277f150..0000000000 --- a/Lang/Maxima/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Doomsday-rule b/Lang/Maxima/Doomsday-rule deleted file mode 120000 index e92ce2f9d2..0000000000 --- a/Lang/Maxima/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Exponentiation-order b/Lang/Maxima/Exponentiation-order deleted file mode 120000 index 3914b83865..0000000000 --- a/Lang/Maxima/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Exponentiation-with-infix-operators-in-or-operating-on-the-base b/Lang/Maxima/Exponentiation-with-infix-operators-in-or-operating-on-the-base deleted file mode 120000 index 571c836707..0000000000 --- a/Lang/Maxima/Exponentiation-with-infix-operators-in-or-operating-on-the-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-with-infix-operators-in-or-operating-on-the-base/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Fermat-numbers b/Lang/Maxima/Fermat-numbers deleted file mode 120000 index 705c8192a4..0000000000 --- a/Lang/Maxima/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/Maxima \ No newline at end of file diff --git a/Lang/Maxima/General-FizzBuzz b/Lang/Maxima/General-FizzBuzz deleted file mode 120000 index e422ed53f2..0000000000 --- a/Lang/Maxima/General-FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/General-FizzBuzz/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Guess-the-number b/Lang/Maxima/Guess-the-number deleted file mode 120000 index 386c9c38ac..0000000000 --- a/Lang/Maxima/Guess-the-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Guess-the-number-With-feedback b/Lang/Maxima/Guess-the-number-With-feedback deleted file mode 120000 index 8b04db909f..0000000000 --- a/Lang/Maxima/Guess-the-number-With-feedback +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number-With-feedback/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Hash-from-two-arrays b/Lang/Maxima/Hash-from-two-arrays deleted file mode 120000 index b59b47ec09..0000000000 --- a/Lang/Maxima/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Humble-numbers b/Lang/Maxima/Humble-numbers deleted file mode 120000 index d093fa7dd0..0000000000 --- a/Lang/Maxima/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Jacobi-symbol b/Lang/Maxima/Jacobi-symbol deleted file mode 120000 index 73e8a14256..0000000000 --- a/Lang/Maxima/Jacobi-symbol +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobi-symbol/Maxima \ No newline at end of file diff --git a/Lang/Maxima/List-comprehensions b/Lang/Maxima/List-comprehensions deleted file mode 120000 index de6043c392..0000000000 --- a/Lang/Maxima/List-comprehensions +++ /dev/null @@ -1 +0,0 @@ -../../Task/List-comprehensions/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Loops-N-plus-one-half b/Lang/Maxima/Loops-N-plus-one-half deleted file mode 120000 index 8fb12a3bb8..0000000000 --- a/Lang/Maxima/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Loops-With-multiple-ranges b/Lang/Maxima/Loops-With-multiple-ranges deleted file mode 120000 index 0d4ccad640..0000000000 --- a/Lang/Maxima/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Magic-constant b/Lang/Maxima/Magic-constant deleted file mode 120000 index 406aae118d..0000000000 --- a/Lang/Maxima/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Meissel-Mertens-constant b/Lang/Maxima/Meissel-Mertens-constant new file mode 120000 index 0000000000..ea7cea2fda --- /dev/null +++ b/Lang/Maxima/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Miller-Rabin-primality-test b/Lang/Maxima/Miller-Rabin-primality-test new file mode 120000 index 0000000000..331b953779 --- /dev/null +++ b/Lang/Maxima/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Nested-function b/Lang/Maxima/Nested-function deleted file mode 120000 index 14e0a5c6e4..0000000000 --- a/Lang/Maxima/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Nth b/Lang/Maxima/Nth deleted file mode 120000 index 76e7cadf39..0000000000 --- a/Lang/Maxima/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Old-lady-swallowed-a-fly b/Lang/Maxima/Old-lady-swallowed-a-fly deleted file mode 120000 index 7f7aab63d3..0000000000 --- a/Lang/Maxima/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Pernicious-numbers b/Lang/Maxima/Pernicious-numbers deleted file mode 120000 index 1062304d91..0000000000 --- a/Lang/Maxima/Pernicious-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pernicious-numbers/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Phrase-reversals b/Lang/Maxima/Phrase-reversals deleted file mode 120000 index e9f3fbc16e..0000000000 --- a/Lang/Maxima/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Population-count b/Lang/Maxima/Population-count deleted file mode 120000 index ae8e574cce..0000000000 --- a/Lang/Maxima/Population-count +++ /dev/null @@ -1 +0,0 @@ -../../Task/Population-count/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Proper-divisors b/Lang/Maxima/Proper-divisors deleted file mode 120000 index d541bf6c4d..0000000000 --- a/Lang/Maxima/Proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Proper-divisors/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Pseudo-random-numbers-PCG32 b/Lang/Maxima/Pseudo-random-numbers-PCG32 deleted file mode 120000 index 6feec056ab..0000000000 --- a/Lang/Maxima/Pseudo-random-numbers-PCG32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-PCG32/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Pseudo-random-numbers-Splitmix64 b/Lang/Maxima/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index c67133774e..0000000000 --- a/Lang/Maxima/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Pseudo-random-numbers-Xorshift-star b/Lang/Maxima/Pseudo-random-numbers-Xorshift-star deleted file mode 120000 index 601269aa2d..0000000000 --- a/Lang/Maxima/Pseudo-random-numbers-Xorshift-star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Xorshift-star/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Real-constants-and-functions b/Lang/Maxima/Real-constants-and-functions deleted file mode 120000 index 5465f4ddf0..0000000000 --- a/Lang/Maxima/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Regular-expressions b/Lang/Maxima/Regular-expressions deleted file mode 120000 index ad80bc2114..0000000000 --- a/Lang/Maxima/Regular-expressions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Regular-expressions/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Rename-a-file b/Lang/Maxima/Rename-a-file deleted file mode 120000 index 875c72e05d..0000000000 --- a/Lang/Maxima/Rename-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rename-a-file/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Repeat b/Lang/Maxima/Repeat deleted file mode 120000 index 69cf6bc4f0..0000000000 --- a/Lang/Maxima/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Repunit-primes b/Lang/Maxima/Repunit-primes deleted file mode 120000 index fb23d38994..0000000000 --- a/Lang/Maxima/Repunit-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repunit-primes/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Safe-primes-and-unsafe-primes b/Lang/Maxima/Safe-primes-and-unsafe-primes deleted file mode 120000 index 3ba21ce950..0000000000 --- a/Lang/Maxima/Safe-primes-and-unsafe-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Safe-primes-and-unsafe-primes/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Sequence-of-primorial-primes b/Lang/Maxima/Sequence-of-primorial-primes deleted file mode 120000 index 987ddfd5b4..0000000000 --- a/Lang/Maxima/Sequence-of-primorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primorial-primes/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Maxima/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Maxima/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Maxima/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Maxima/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Maxima/Sequence:-smallest-number-with-exactly-n-divisors deleted file mode 120000 index 2edcd184a6..0000000000 --- a/Lang/Maxima/Sequence:-smallest-number-with-exactly-n-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence:-smallest-number-with-exactly-n-divisors/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Shoelace-formula-for-polygonal-area b/Lang/Maxima/Shoelace-formula-for-polygonal-area deleted file mode 120000 index 4b2db308ce..0000000000 --- a/Lang/Maxima/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Sorting-algorithms-Counting-sort b/Lang/Maxima/Sorting-algorithms-Counting-sort deleted file mode 120000 index 3b3f2f0c39..0000000000 --- a/Lang/Maxima/Sorting-algorithms-Counting-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Counting-sort/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Sorting-algorithms-Stooge-sort b/Lang/Maxima/Sorting-algorithms-Stooge-sort deleted file mode 120000 index df60525c6e..0000000000 --- a/Lang/Maxima/Sorting-algorithms-Stooge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Stooge-sort/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Statistics-Basic b/Lang/Maxima/Statistics-Basic deleted file mode 120000 index 3aa4fcf62d..0000000000 --- a/Lang/Maxima/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Stirling-numbers-of-the-first-kind b/Lang/Maxima/Stirling-numbers-of-the-first-kind deleted file mode 120000 index 00938d2052..0000000000 --- a/Lang/Maxima/Stirling-numbers-of-the-first-kind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stirling-numbers-of-the-first-kind/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Stirling-numbers-of-the-second-kind b/Lang/Maxima/Stirling-numbers-of-the-second-kind deleted file mode 120000 index 3b2dde9483..0000000000 --- a/Lang/Maxima/Stirling-numbers-of-the-second-kind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stirling-numbers-of-the-second-kind/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Substring-Top-and-tail b/Lang/Maxima/Substring-Top-and-tail deleted file mode 120000 index 6897859615..0000000000 --- a/Lang/Maxima/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Summarize-primes b/Lang/Maxima/Summarize-primes deleted file mode 120000 index d202f40be0..0000000000 --- a/Lang/Maxima/Summarize-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-primes/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Superellipse b/Lang/Maxima/Superellipse deleted file mode 120000 index 4ecd2801c8..0000000000 --- a/Lang/Maxima/Superellipse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Superellipse/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Tau-function b/Lang/Maxima/Tau-function deleted file mode 120000 index 40243f7b1e..0000000000 --- a/Lang/Maxima/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Tau-number b/Lang/Maxima/Tau-number deleted file mode 120000 index 053b7e480c..0000000000 --- a/Lang/Maxima/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Maxima \ No newline at end of file diff --git a/Lang/Maxima/The-Twelve-Days-of-Christmas b/Lang/Maxima/The-Twelve-Days-of-Christmas deleted file mode 120000 index dd36e626f6..0000000000 --- a/Lang/Maxima/The-Twelve-Days-of-Christmas +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Twelve-Days-of-Christmas/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Topic-variable b/Lang/Maxima/Topic-variable deleted file mode 120000 index e2a8f808d7..0000000000 --- a/Lang/Maxima/Topic-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topic-variable/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Towers-of-Hanoi b/Lang/Maxima/Towers-of-Hanoi deleted file mode 120000 index 40963f2edb..0000000000 --- a/Lang/Maxima/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Unicode-variable-names b/Lang/Maxima/Unicode-variable-names deleted file mode 120000 index 34b765c308..0000000000 --- a/Lang/Maxima/Unicode-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-variable-names/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Variable-declaration-reset b/Lang/Maxima/Variable-declaration-reset deleted file mode 120000 index 127cccc10e..0000000000 --- a/Lang/Maxima/Variable-declaration-reset +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-declaration-reset/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Vector b/Lang/Maxima/Vector deleted file mode 120000 index 8d6cbd46ca..0000000000 --- a/Lang/Maxima/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Wagstaff-primes b/Lang/Maxima/Wagstaff-primes deleted file mode 120000 index f74c4ee3f2..0000000000 --- a/Lang/Maxima/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Wieferich-primes b/Lang/Maxima/Wieferich-primes deleted file mode 120000 index 8ad2bd1a72..0000000000 --- a/Lang/Maxima/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/Maxima \ No newline at end of file diff --git a/Lang/Maxima/Wilson-primes-of-order-n b/Lang/Maxima/Wilson-primes-of-order-n deleted file mode 120000 index 83b27ec734..0000000000 --- a/Lang/Maxima/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/Maxima \ No newline at end of file diff --git a/Lang/MelonBasic/Empty-program b/Lang/MelonBasic/Empty-program new file mode 120000 index 0000000000..8fb3b62c73 --- /dev/null +++ b/Lang/MelonBasic/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/MelonBasic \ No newline at end of file diff --git a/Lang/Mercury/Miller-Rabin-primality-test b/Lang/Mercury/Miller-Rabin-primality-test new file mode 120000 index 0000000000..6022def69b --- /dev/null +++ b/Lang/Mercury/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Mercury \ No newline at end of file diff --git a/Lang/Mercury/Quaternion-type b/Lang/Mercury/Quaternion-type new file mode 120000 index 0000000000..34fd045795 --- /dev/null +++ b/Lang/Mercury/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Mercury \ No newline at end of file diff --git a/Lang/Mia/Loops-While b/Lang/Mia/Loops-While deleted file mode 120000 index acad4e8591..0000000000 --- a/Lang/Mia/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Mia \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/A+B b/Lang/Microsoft-Small-Basic/A+B deleted file mode 120000 index f3a4fe9f2e..0000000000 --- a/Lang/Microsoft-Small-Basic/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Array-length b/Lang/Microsoft-Small-Basic/Array-length deleted file mode 120000 index 5cb5fd80e3..0000000000 --- a/Lang/Microsoft-Small-Basic/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Halt-and-catch-fire b/Lang/Microsoft-Small-Basic/Halt-and-catch-fire deleted file mode 120000 index 85dd00fc29..0000000000 --- a/Lang/Microsoft-Small-Basic/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Hello-world-Graphical b/Lang/Microsoft-Small-Basic/Hello-world-Graphical deleted file mode 120000 index e9bfd8a7e0..0000000000 --- a/Lang/Microsoft-Small-Basic/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/I-before-E-except-after-C b/Lang/Microsoft-Small-Basic/I-before-E-except-after-C deleted file mode 120000 index e009793925..0000000000 --- a/Lang/Microsoft-Small-Basic/I-before-E-except-after-C +++ /dev/null @@ -1 +0,0 @@ -../../Task/I-before-E-except-after-C/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Jump-anywhere b/Lang/Microsoft-Small-Basic/Jump-anywhere deleted file mode 120000 index ef9c52343e..0000000000 --- a/Lang/Microsoft-Small-Basic/Jump-anywhere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jump-anywhere/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Program-termination b/Lang/Microsoft-Small-Basic/Program-termination deleted file mode 120000 index ecf78f2fdc..0000000000 --- a/Lang/Microsoft-Small-Basic/Program-termination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-termination/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/RPG-attributes-generator b/Lang/Microsoft-Small-Basic/RPG-attributes-generator deleted file mode 120000 index b4096f1ae1..0000000000 --- a/Lang/Microsoft-Small-Basic/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Simple-windowed-application b/Lang/Microsoft-Small-Basic/Simple-windowed-application deleted file mode 120000 index 372561cd34..0000000000 --- a/Lang/Microsoft-Small-Basic/Simple-windowed-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-windowed-application/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Substring b/Lang/Microsoft-Small-Basic/Substring deleted file mode 120000 index 187fdf47c4..0000000000 --- a/Lang/Microsoft-Small-Basic/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/The-Name-Game b/Lang/Microsoft-Small-Basic/The-Name-Game deleted file mode 120000 index 904bd0e9c8..0000000000 --- a/Lang/Microsoft-Small-Basic/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Transliterate-English-text-using-the-Greek-alphabet b/Lang/Microsoft-Small-Basic/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index 5d28e3f2bb..0000000000 --- a/Lang/Microsoft-Small-Basic/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Variables b/Lang/Microsoft-Small-Basic/Variables deleted file mode 120000 index 3ad596872d..0000000000 --- a/Lang/Microsoft-Small-Basic/Variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variables/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/Microsoft-Small-Basic/Window-creation b/Lang/Microsoft-Small-Basic/Window-creation deleted file mode 120000 index 31935ba19c..0000000000 --- a/Lang/Microsoft-Small-Basic/Window-creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-creation/Microsoft-Small-Basic \ No newline at end of file diff --git a/Lang/MiniScript/Apply-a-callback-to-an-array b/Lang/MiniScript/Apply-a-callback-to-an-array deleted file mode 120000 index 9f2b7eb3c8..0000000000 --- a/Lang/MiniScript/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/MiniScript \ No newline at end of file diff --git a/Lang/MiniScript/Count-in-factors b/Lang/MiniScript/Count-in-factors deleted file mode 120000 index 7a0ecccaf4..0000000000 --- a/Lang/MiniScript/Count-in-factors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-factors/MiniScript \ No newline at end of file diff --git a/Lang/MiniScript/Empty-program b/Lang/MiniScript/Empty-program new file mode 120000 index 0000000000..60da45f9ae --- /dev/null +++ b/Lang/MiniScript/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/MiniScript \ No newline at end of file diff --git a/Lang/MiniScript/Haversine-formula b/Lang/MiniScript/Haversine-formula deleted file mode 120000 index 0bba2877d8..0000000000 --- a/Lang/MiniScript/Haversine-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Haversine-formula/MiniScript \ No newline at end of file diff --git a/Lang/MiniScript/Read-a-file-line-by-line b/Lang/MiniScript/Read-a-file-line-by-line deleted file mode 120000 index 7064fcf098..0000000000 --- a/Lang/MiniScript/Read-a-file-line-by-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-line-by-line/MiniScript \ No newline at end of file diff --git a/Lang/MiniScript/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/MiniScript/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/MiniScript/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/MiniScript/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/MiniScript/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/MiniScript/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/MiniScript/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/MiniScript/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/MiniScript/Sleeping-Beauty-problem b/Lang/MiniScript/Sleeping-Beauty-problem deleted file mode 120000 index feb4e597cb..0000000000 --- a/Lang/MiniScript/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/MiniScript \ No newline at end of file diff --git a/Lang/Minimal-BASIC/Abundant-deficient-and-perfect-number-classifications b/Lang/Minimal-BASIC/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index ca944f9e1d..0000000000 --- a/Lang/Minimal-BASIC/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Minimal-BASIC \ No newline at end of file diff --git a/Lang/Minimal-BASIC/Evaluate-binomial-coefficients b/Lang/Minimal-BASIC/Evaluate-binomial-coefficients deleted file mode 120000 index 6ad0769264..0000000000 --- a/Lang/Minimal-BASIC/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/Minimal-BASIC \ No newline at end of file diff --git a/Lang/Minimal-BASIC/Jensens-Device b/Lang/Minimal-BASIC/Jensens-Device deleted file mode 120000 index f729ff931e..0000000000 --- a/Lang/Minimal-BASIC/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/Minimal-BASIC \ No newline at end of file diff --git a/Lang/Minimal-BASIC/Leonardo-numbers b/Lang/Minimal-BASIC/Leonardo-numbers deleted file mode 120000 index c45ebe1ebc..0000000000 --- a/Lang/Minimal-BASIC/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Minimal-BASIC \ No newline at end of file diff --git a/Lang/Minimal-BASIC/Loops-Infinite b/Lang/Minimal-BASIC/Loops-Infinite deleted file mode 120000 index a936b362aa..0000000000 --- a/Lang/Minimal-BASIC/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Minimal-BASIC \ No newline at end of file diff --git a/Lang/Minimal-BASIC/Monty-Hall-problem b/Lang/Minimal-BASIC/Monty-Hall-problem deleted file mode 120000 index e997b4d558..0000000000 --- a/Lang/Minimal-BASIC/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/Minimal-BASIC \ No newline at end of file diff --git a/Lang/Minimal-BASIC/Pancake-numbers b/Lang/Minimal-BASIC/Pancake-numbers deleted file mode 120000 index 5141be0a11..0000000000 --- a/Lang/Minimal-BASIC/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/Minimal-BASIC \ No newline at end of file diff --git a/Lang/Minimal-BASIC/Sum-of-a-series b/Lang/Minimal-BASIC/Sum-of-a-series deleted file mode 120000 index b515c8004d..0000000000 --- a/Lang/Minimal-BASIC/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/Minimal-BASIC \ No newline at end of file diff --git a/Lang/Miranda/Align-columns b/Lang/Miranda/Align-columns deleted file mode 120000 index ca88577a8d..0000000000 --- a/Lang/Miranda/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Arithmetic-derivative b/Lang/Miranda/Arithmetic-derivative deleted file mode 120000 index 91683ddf96..0000000000 --- a/Lang/Miranda/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Bell-numbers b/Lang/Miranda/Bell-numbers deleted file mode 120000 index 6635e596b0..0000000000 --- a/Lang/Miranda/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Combinations b/Lang/Miranda/Combinations deleted file mode 120000 index b252f73176..0000000000 --- a/Lang/Miranda/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Display-a-linear-combination b/Lang/Miranda/Display-a-linear-combination deleted file mode 120000 index 38a961bb6a..0000000000 --- a/Lang/Miranda/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Doomsday-rule b/Lang/Miranda/Doomsday-rule deleted file mode 120000 index 91e25767d0..0000000000 --- a/Lang/Miranda/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Execute-Brain- b/Lang/Miranda/Execute-Brain- deleted file mode 120000 index e3f7d58819..0000000000 --- a/Lang/Miranda/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Fractran b/Lang/Miranda/Fractran deleted file mode 120000 index 528ab3ee2e..0000000000 --- a/Lang/Miranda/Fractran +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractran/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Hailstone-sequence b/Lang/Miranda/Hailstone-sequence deleted file mode 120000 index 1f03fbb737..0000000000 --- a/Lang/Miranda/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Isqrt-integer-square-root-of-X b/Lang/Miranda/Isqrt-integer-square-root-of-X deleted file mode 120000 index 4b479d99e5..0000000000 --- a/Lang/Miranda/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Leonardo-numbers b/Lang/Miranda/Leonardo-numbers deleted file mode 120000 index 6f062a014a..0000000000 --- a/Lang/Miranda/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Loops-Infinite b/Lang/Miranda/Loops-Infinite deleted file mode 120000 index 8845df4b78..0000000000 --- a/Lang/Miranda/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Modular-exponentiation b/Lang/Miranda/Modular-exponentiation deleted file mode 120000 index 876dc45d07..0000000000 --- a/Lang/Miranda/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Move-to-front-algorithm b/Lang/Miranda/Move-to-front-algorithm deleted file mode 120000 index ed5becbabe..0000000000 --- a/Lang/Miranda/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Mutual-recursion b/Lang/Miranda/Mutual-recursion deleted file mode 120000 index 42af709518..0000000000 --- a/Lang/Miranda/Mutual-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mutual-recursion/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Old-lady-swallowed-a-fly b/Lang/Miranda/Old-lady-swallowed-a-fly deleted file mode 120000 index 91f1f84abb..0000000000 --- a/Lang/Miranda/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Partition-an-integer-x-into-n-primes b/Lang/Miranda/Partition-an-integer-x-into-n-primes deleted file mode 120000 index 0d73af13aa..0000000000 --- a/Lang/Miranda/Partition-an-integer-x-into-n-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-an-integer-x-into-n-primes/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Run-length-encoding b/Lang/Miranda/Run-length-encoding deleted file mode 120000 index e0fd07015b..0000000000 --- a/Lang/Miranda/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Miranda/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Miranda/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Miranda/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Miranda/Sudan-function b/Lang/Miranda/Sudan-function deleted file mode 120000 index 30973d5427..0000000000 --- a/Lang/Miranda/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Super-d-numbers b/Lang/Miranda/Super-d-numbers deleted file mode 120000 index d99b0c174b..0000000000 --- a/Lang/Miranda/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/Miranda \ No newline at end of file diff --git a/Lang/Miranda/Zeckendorf-number-representation b/Lang/Miranda/Zeckendorf-number-representation deleted file mode 120000 index 8a316c3af1..0000000000 --- a/Lang/Miranda/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/Miranda \ No newline at end of file diff --git a/Lang/Mn/00-LANG.txt b/Lang/Mn/00-LANG.txt deleted file mode 100644 index 0fd90d2c3a..0000000000 --- a/Lang/Mn/00-LANG.txt +++ /dev/null @@ -1,7 +0,0 @@ -{{stub}}{{language|mn}} -mn is a minimalistic, concatenative, functional stack language. It is a very simple subset of [[min]]. - -==Links== -*[https://h3rald.com/mn/Mn_DeveloperGuide.htm Learn mn] - -{{Language programming paradigm|Concatenative}} \ No newline at end of file diff --git a/Lang/Mn/00-META.yaml b/Lang/Mn/00-META.yaml deleted file mode 100644 index f79f1602c3..0000000000 --- a/Lang/Mn/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Mn diff --git a/Lang/Mn/Factorial b/Lang/Mn/Factorial deleted file mode 120000 index 4c7a3c3b43..0000000000 --- a/Lang/Mn/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Mn \ No newline at end of file diff --git a/Lang/Mn/Loops-While b/Lang/Mn/Loops-While deleted file mode 120000 index 9e10aebd40..0000000000 --- a/Lang/Mn/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Mn \ No newline at end of file diff --git a/Lang/Modula-2/00-LANG.txt b/Lang/Modula-2/00-LANG.txt index 62faf6e14c..854aa29a1a 100644 --- a/Lang/Modula-2/00-LANG.txt +++ b/Lang/Modula-2/00-LANG.txt @@ -26,11 +26,4 @@ Modula-2 was designed by Niklaus Wirth at ETH Zurich as a systems implementation * [http://sourceforge.net/projects/schwarzerkaffee Schwarzer Kaffee] ==Modula-2 on IRC== -* [irc://irc.freenode.net/#modula-2 irc://irc.freenode.net/#modula-2] - -===See also=== -* [[Modula-3]] -* [[Oberon-07]] -* [[Oberon-2]] -* [[Component Pascal]] -* [[Zonnon]] \ No newline at end of file +* [irc://irc.freenode.net/#modula-2 irc://irc.freenode.net/#modula-2] \ No newline at end of file diff --git a/Lang/Modula-2/AKS-test-for-primes b/Lang/Modula-2/AKS-test-for-primes deleted file mode 120000 index f86ed2a172..0000000000 --- a/Lang/Modula-2/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Abundant-odd-numbers b/Lang/Modula-2/Abundant-odd-numbers deleted file mode 120000 index acae176170..0000000000 --- a/Lang/Modula-2/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Cistercian-numerals b/Lang/Modula-2/Cistercian-numerals deleted file mode 120000 index 5da4e51fc7..0000000000 --- a/Lang/Modula-2/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Cumulative-standard-deviation b/Lang/Modula-2/Cumulative-standard-deviation deleted file mode 120000 index 49f430ac8e..0000000000 --- a/Lang/Modula-2/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Day-of-the-week b/Lang/Modula-2/Day-of-the-week deleted file mode 120000 index 626da93e5e..0000000000 --- a/Lang/Modula-2/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Diversity-prediction-theorem b/Lang/Modula-2/Diversity-prediction-theorem deleted file mode 120000 index c351696cc1..0000000000 --- a/Lang/Modula-2/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Dutch-national-flag-problem b/Lang/Modula-2/Dutch-national-flag-problem deleted file mode 120000 index b6400fd8d9..0000000000 --- a/Lang/Modula-2/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Equilibrium-index b/Lang/Modula-2/Equilibrium-index deleted file mode 120000 index 434b864e3f..0000000000 --- a/Lang/Modula-2/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Factors-of-an-integer b/Lang/Modula-2/Factors-of-an-integer deleted file mode 120000 index 19271a7965..0000000000 --- a/Lang/Modula-2/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Gamma-function b/Lang/Modula-2/Gamma-function deleted file mode 120000 index f14cc894e2..0000000000 --- a/Lang/Modula-2/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Generate-lower-case-ASCII-alphabet b/Lang/Modula-2/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 94aba1f8a9..0000000000 --- a/Lang/Modula-2/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Gray-code b/Lang/Modula-2/Gray-code deleted file mode 120000 index 8cb45ff695..0000000000 --- a/Lang/Modula-2/Gray-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gray-code/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Luhn-test-of-credit-card-numbers b/Lang/Modula-2/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 7ff802d85c..0000000000 --- a/Lang/Modula-2/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/M-bius-function b/Lang/Modula-2/M-bius-function deleted file mode 120000 index e2d4a4a9b1..0000000000 --- a/Lang/Modula-2/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Magic-constant b/Lang/Modula-2/Magic-constant deleted file mode 120000 index d6cf44baf4..0000000000 --- a/Lang/Modula-2/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Map-range b/Lang/Modula-2/Map-range deleted file mode 120000 index d2da488e09..0000000000 --- a/Lang/Modula-2/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Mayan-numerals b/Lang/Modula-2/Mayan-numerals deleted file mode 120000 index 68f34cbb07..0000000000 --- a/Lang/Modula-2/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Monty-Hall-problem b/Lang/Modula-2/Monty-Hall-problem deleted file mode 120000 index 9ad6c8767a..0000000000 --- a/Lang/Modula-2/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Multifactorial b/Lang/Modula-2/Multifactorial deleted file mode 120000 index ba5a38f5d3..0000000000 --- a/Lang/Modula-2/Multifactorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multifactorial/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Nth-root b/Lang/Modula-2/Nth-root deleted file mode 120000 index 0efaa69472..0000000000 --- a/Lang/Modula-2/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Periodic-table b/Lang/Modula-2/Periodic-table deleted file mode 120000 index 20953bda9a..0000000000 --- a/Lang/Modula-2/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Ramer-Douglas-Peucker-line-simplification b/Lang/Modula-2/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index ff583aca48..0000000000 --- a/Lang/Modula-2/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Semiprime b/Lang/Modula-2/Semiprime deleted file mode 120000 index 108e390f08..0000000000 --- a/Lang/Modula-2/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Modula-2/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Modula-2/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Modula-2/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Modula-2/Temperature-conversion b/Lang/Modula-2/Temperature-conversion deleted file mode 120000 index fa236503d3..0000000000 --- a/Lang/Modula-2/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Tic-tac-toe b/Lang/Modula-2/Tic-tac-toe deleted file mode 120000 index 21b0370c7a..0000000000 --- a/Lang/Modula-2/Tic-tac-toe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tic-tac-toe/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-2/Zeckendorf-number-representation b/Lang/Modula-2/Zeckendorf-number-representation deleted file mode 120000 index bbadf943ec..0000000000 --- a/Lang/Modula-2/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/Modula-2 \ No newline at end of file diff --git a/Lang/Modula-3/00-LANG.txt b/Lang/Modula-3/00-LANG.txt index aaa0f4b8bf..582f870540 100644 --- a/Lang/Modula-3/00-LANG.txt +++ b/Lang/Modula-3/00-LANG.txt @@ -21,11 +21,4 @@ Its main implementation is [[Critical Mass Modula-3]]. Modula-3 influenced a few languages such as [[C Sharp|C#]], [[Java]], [[Ocaml]] and [[Python]]. ==Links== -* [http://en.wikipedia.org/wiki/Modula-3 Modula-3 at Wikipedia] - -===See also=== -* [[Modula-2]] -* [[Oberon-07]] -* [[Oberon-2]] -* [[Component Pascal]] -* [[Zonnon]] \ No newline at end of file +* [http://en.wikipedia.org/wiki/Modula-3 Modula-3 at Wikipedia] \ No newline at end of file diff --git a/Lang/Modula-3/Additive-primes b/Lang/Modula-3/Additive-primes deleted file mode 120000 index b81b571c35..0000000000 --- a/Lang/Modula-3/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/Modula-3 \ No newline at end of file diff --git a/Lang/Modula-3/Comments b/Lang/Modula-3/Comments new file mode 120000 index 0000000000..8c3489c305 --- /dev/null +++ b/Lang/Modula-3/Comments @@ -0,0 +1 @@ +../../Task/Comments/Modula-3 \ No newline at end of file diff --git a/Lang/Modula-3/Pascals-triangle b/Lang/Modula-3/Pascals-triangle deleted file mode 120000 index 093a7901c2..0000000000 --- a/Lang/Modula-3/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/Modula-3 \ No newline at end of file diff --git a/Lang/Mojo/Hunt-the-Wumpus b/Lang/Mojo/Hunt-the-Wumpus deleted file mode 120000 index a79c86df71..0000000000 --- a/Lang/Mojo/Hunt-the-Wumpus +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hunt-the-Wumpus/Mojo \ No newline at end of file diff --git a/Lang/MoonBit/00-LANG.txt b/Lang/MoonBit/00-LANG.txt deleted file mode 100644 index cf5345dc27..0000000000 --- a/Lang/MoonBit/00-LANG.txt +++ /dev/null @@ -1,13 +0,0 @@ -{{language|MoonBit -|exec=bytecode -|safety=safe -|strength=strong -|gc=yes -|site=https://www.moonbitlang.com/} -}} -'''MoonBit''' is a general-purpose programming language and toolchain designed for high performance and resource efficiency, optimized for WebAssembly (Wasm). It is developed by a young and passionate team led by Zhang Hongbo. One of the motivations behind MoonBit’s creation was Zhang’s belief that existing languages like Java, Go, and Rust do not fully leverage the security and speed advantages of the WebAssembly instruction set, particularly in cloud computing and edge computing. After its initial release with native WebAssembly support, MoonBit later added support for JavaScript, Native, and the LLVM backend. - -MoonBit was publicly released in August 2023 and is currently in its beta stage. - -==Todo== -* [[Tasks not implemented in MoonBit]] \ No newline at end of file diff --git a/Lang/MoonBit/00-META.yaml b/Lang/MoonBit/00-META.yaml deleted file mode 100644 index 97e1356190..0000000000 --- a/Lang/MoonBit/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:MoonBit diff --git a/Lang/MoonBit/Array-length b/Lang/MoonBit/Array-length deleted file mode 120000 index 4a5666710a..0000000000 --- a/Lang/MoonBit/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/MoonBit \ No newline at end of file diff --git a/Lang/MoonBit/Hello-world-Text b/Lang/MoonBit/Hello-world-Text deleted file mode 120000 index f3db6f7a6c..0000000000 --- a/Lang/MoonBit/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/MoonBit \ No newline at end of file diff --git a/Lang/MoonRock/00-LANG.txt b/Lang/MoonRock/00-LANG.txt deleted file mode 100644 index dcba29adb9..0000000000 --- a/Lang/MoonRock/00-LANG.txt +++ /dev/null @@ -1,68 +0,0 @@ -{{language|MoonRock -|exec=machine -|site=http://www.rowan.sensation.net.au/moonrock.html}} -{{language programming paradigm|Imperative}} -{{implementation|BASIC}} -'''MoonRock''' is a compiler for a [[BASIC]]-like programming language, developed by Rowan Crowe. Released for [[MS-DOS]] and compatible systems, MoonRock enables compilation to assembly language and linking to COM executable files. The compiler is known for producing exceptionally concise executables; for example, a "[[Hello world|Hello, World!]]" program can be compiled into a COM file as small as 276 bytes. - -MoonRock is a programming language specifically designed to facilitate the creation of programs that can be easily translated into assembly language. This design choice emphasizes simplicity and direct mapping to low-level operations, making it particularly suitable for environments where performance and control over hardware are critical. The language's syntax and features are structured to align closely with assembly language constructs while benefiting from some higher-level abstractions provided by BASIC. - -== MoonRock Version 0.50 == -=== Program Structure === -The definitions of arrays must be included within the BEGIN DEF section of the program. - -=== Control Structures === -The ''[[Loops/For|for]]'' loop requires that both the start and end values be variables, constants, or literals; expressions are not permitted. The language does not implement a ''[[Loops/Do-while|repeat-until]]'' loop. - -=== Arithmetic Operations === -MoonRock 0.50 does not support [[Floating point|floating-point numbers]] and operations. Division using the / operator produces rounded [[Arithmetic/Integer|integer]] results. For integer division, the \ operator must be used. For example: - -A% = 1 / 3 -PRINT A% + "\n" -A% = 2 / 3 -PRINT A% + "\n" -A% = 3 / 3 -PRINT A% + "\n" - -produces the output: -
    -0
    -1
    -1
    -
    -The MOD function is not implemented for 32-bit integers (doublewords). - -=== Comparison Operations === -Both operands in comparison operations must be literals, constants, or variables; expressions are not allowed. Only variables of the same type can be compared. Attempting to compare variables of different types, such as A& > B%, may produce incorrect results. - -=== Output === -To output the value of a named constant, it must be passed as an argument to the STR function: - -PRINT "Up to " + STR(%MaxNumber) + "\n" - -Formatted output is not supported. Users may create custom subroutines as a workaround, such as: - -SUB PrintStr(S$, Width%) - IF LEN(S$) > Width% THEN - PRINT S$ - ELSE - S$ = SPACE(Width%) + S$ - PRINT RIGHT(S$, Width%) - ENDIF -END SUB - - -=== Abnormal Behaviors === -The manual states: ''Keywords are shown in all upper case to aid readability. They may be of any case in the source code''. However, some statements function solely when written in lowercase. For example, the statement: - -if A@ = 0 then print B% + " " - -operates correctly only when if and then are in lowercase. Conversely, the following formulation works regardless of case: - -IF A@ = 0 THEN - PRINT B% + " " -ENDIF - - -== External links == -* [https://github.com/DosWorld/moonrock MoonRock on GitHub] \ No newline at end of file diff --git a/Lang/MoonRock/00-META.yaml b/Lang/MoonRock/00-META.yaml deleted file mode 100644 index 8869a57523..0000000000 --- a/Lang/MoonRock/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:MoonRock diff --git a/Lang/MoonRock/100-doors b/Lang/MoonRock/100-doors deleted file mode 120000 index 35643d2a2f..0000000000 --- a/Lang/MoonRock/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Abundant-deficient-and-perfect-number-classifications b/Lang/MoonRock/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index 5a720f6808..0000000000 --- a/Lang/MoonRock/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Bell-numbers b/Lang/MoonRock/Bell-numbers deleted file mode 120000 index 1519c89b24..0000000000 --- a/Lang/MoonRock/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Day-of-the-week b/Lang/MoonRock/Day-of-the-week deleted file mode 120000 index 3423abb3da..0000000000 --- a/Lang/MoonRock/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Ethiopian-multiplication b/Lang/MoonRock/Ethiopian-multiplication deleted file mode 120000 index 99b728ad22..0000000000 --- a/Lang/MoonRock/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Factors-of-an-integer b/Lang/MoonRock/Factors-of-an-integer deleted file mode 120000 index 9cb6716a51..0000000000 --- a/Lang/MoonRock/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Fibonacci-sequence b/Lang/MoonRock/Fibonacci-sequence deleted file mode 120000 index 633e95692a..0000000000 --- a/Lang/MoonRock/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Josephus-problem b/Lang/MoonRock/Josephus-problem deleted file mode 120000 index 1084916ce4..0000000000 --- a/Lang/MoonRock/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Leap-year b/Lang/MoonRock/Leap-year deleted file mode 120000 index 5ab049d315..0000000000 --- a/Lang/MoonRock/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Long-year b/Lang/MoonRock/Long-year deleted file mode 120000 index cc090c489a..0000000000 --- a/Lang/MoonRock/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/MoonRock \ No newline at end of file diff --git a/Lang/MoonRock/Semiprime b/Lang/MoonRock/Semiprime deleted file mode 120000 index 9c66936bd7..0000000000 --- a/Lang/MoonRock/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/MoonRock \ No newline at end of file diff --git a/Lang/MySQL/00-LANG.txt b/Lang/MySQL/00-LANG.txt index bf94001666..9f2e3a69fb 100644 --- a/Lang/MySQL/00-LANG.txt +++ b/Lang/MySQL/00-LANG.txt @@ -1,9 +1,9 @@ {{language}} '''MySQL''' is a multithreaded, multi-user, SQL Database Management System (DBMS) with more than six million installations. -'''MySQL''' is owned and sponsored by a single for-profit firm, Oracle, which holds the copyright to most of the codebase. This is similar to the JBoss model and how the Free Software Foundation handles copyright in its projects, and dissimilar to how the Apache project does it, where the software is developed by a public community, and the copyright to the codebase is owned by its individual authors. +'''MySQL''' is owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, which holds the copyright to most of the codebase. This is similar to the JBoss model and how the Free Software Foundation handles copyright in its projects, and dissimilar to how the Apache project does it, where the software is developed by a public community, and the copyright to the codebase is owned by its individual authors. -The company develops and maintains the system, selling support and service contracts, as well as a cloud variant called HeatWave (part of Oracle Cloud), proprietary-licensed copies of MySQL, and employing people all over the world who collaborate via the Internet. MySQL AB was founded by David Axmark, Allan Larsson, and Michael "Monty" Widenius. +The company develops and maintains the system, selling support and service contracts, as well as proprietary-licensed copies of MySQL, and employing people all over the world who collaborate via the Internet. MySQL AB was founded by David Axmark, Allan Larsson, and Michael "Monty" Widenius. ==Citations== * [http://en.wikipedia.org/wiki/Mysql Wikipedia:MySQL] diff --git a/Lang/NS-HUBASIC/Empty-program b/Lang/NS-HUBASIC/Empty-program new file mode 120000 index 0000000000..8edcb8591a --- /dev/null +++ b/Lang/NS-HUBASIC/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/NS-HUBASIC \ No newline at end of file diff --git a/Lang/Nanoquery/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Nanoquery/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Nanoquery/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Nanoquery/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Nascom-BASIC/Damm-algorithm b/Lang/Nascom-BASIC/Damm-algorithm deleted file mode 120000 index 5a6439a18c..0000000000 --- a/Lang/Nascom-BASIC/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/Nascom-BASIC \ No newline at end of file diff --git a/Lang/Nascom-BASIC/Dragon-curve b/Lang/Nascom-BASIC/Dragon-curve deleted file mode 120000 index 36b4172957..0000000000 --- a/Lang/Nascom-BASIC/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/Nascom-BASIC \ No newline at end of file diff --git a/Lang/Nascom-BASIC/Langtons-ant b/Lang/Nascom-BASIC/Langtons-ant deleted file mode 120000 index d0fdcffe2f..0000000000 --- a/Lang/Nascom-BASIC/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/Nascom-BASIC \ No newline at end of file diff --git a/Lang/Nascom-BASIC/Levenshtein-distance b/Lang/Nascom-BASIC/Levenshtein-distance deleted file mode 120000 index c821e59923..0000000000 --- a/Lang/Nascom-BASIC/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Nascom-BASIC \ No newline at end of file diff --git a/Lang/Nascom-BASIC/Luhn-test-of-credit-card-numbers b/Lang/Nascom-BASIC/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 1d7e8b0698..0000000000 --- a/Lang/Nascom-BASIC/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/Nascom-BASIC \ No newline at end of file diff --git a/Lang/Nascom-BASIC/Mayan-numerals b/Lang/Nascom-BASIC/Mayan-numerals deleted file mode 120000 index d2108ce9fa..0000000000 --- a/Lang/Nascom-BASIC/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/Nascom-BASIC \ No newline at end of file diff --git a/Lang/Nascom-BASIC/Old-Russian-measure-of-length b/Lang/Nascom-BASIC/Old-Russian-measure-of-length deleted file mode 120000 index 73ef2957e7..0000000000 --- a/Lang/Nascom-BASIC/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/Nascom-BASIC \ No newline at end of file diff --git a/Lang/NetRexx/00-LANG.txt b/Lang/NetRexx/00-LANG.txt index 3f624ad431..f110c9bdb8 100644 --- a/Lang/NetRexx/00-LANG.txt +++ b/Lang/NetRexx/00-LANG.txt @@ -29,7 +29,7 @@ as languages such as Java, while preserving the low threshold to learning and th On the 8th of June 2011, IBM transferred ownership of the reference implementation of NetRexx to The Rexx Language Association (RexxLA) for administration under the [http://site.icu-project.org ICU - International Components for Unicode] open source license. -On March 3rd, 2024, NetRexx 4.06-GA was released. +On September 12th 2022, NetRexx 4.04 was released ==== Useful Links ==== * [http://www.netrexx.org The NetRexx Programming Language - www.netrexx.org] diff --git a/Lang/NetRexx/Haversine-formula b/Lang/NetRexx/Haversine-formula deleted file mode 120000 index bbcbbd8775..0000000000 --- a/Lang/NetRexx/Haversine-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Haversine-formula/NetRexx \ No newline at end of file diff --git a/Lang/NewLISP/Abbreviations-simple b/Lang/NewLISP/Abbreviations-simple deleted file mode 120000 index ec4184c6a2..0000000000 --- a/Lang/NewLISP/Abbreviations-simple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-simple/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Ascending-primes b/Lang/NewLISP/Ascending-primes deleted file mode 120000 index 68daf13118..0000000000 --- a/Lang/NewLISP/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Associative-array-Merging b/Lang/NewLISP/Associative-array-Merging deleted file mode 120000 index 8ebd2e6646..0000000000 --- a/Lang/NewLISP/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Cartesian-product-of-two-or-more-lists b/Lang/NewLISP/Cartesian-product-of-two-or-more-lists deleted file mode 120000 index 4a3b5275b2..0000000000 --- a/Lang/NewLISP/Cartesian-product-of-two-or-more-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cartesian-product-of-two-or-more-lists/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Compare-a-list-of-strings b/Lang/NewLISP/Compare-a-list-of-strings deleted file mode 120000 index 9b0eddc19c..0000000000 --- a/Lang/NewLISP/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Department-numbers b/Lang/NewLISP/Department-numbers deleted file mode 120000 index 17043dfb0a..0000000000 --- a/Lang/NewLISP/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Dinesmans-multiple-dwelling-problem b/Lang/NewLISP/Dinesmans-multiple-dwelling-problem deleted file mode 120000 index 0b5efae41b..0000000000 --- a/Lang/NewLISP/Dinesmans-multiple-dwelling-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dinesmans-multiple-dwelling-problem/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Find-Chess960-starting-position-identifier b/Lang/NewLISP/Find-Chess960-starting-position-identifier deleted file mode 120000 index 772e0d75d4..0000000000 --- a/Lang/NewLISP/Find-Chess960-starting-position-identifier +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-Chess960-starting-position-identifier/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Loops-With-multiple-ranges b/Lang/NewLISP/Loops-With-multiple-ranges deleted file mode 120000 index ef48847607..0000000000 --- a/Lang/NewLISP/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Matrix-multiplication b/Lang/NewLISP/Matrix-multiplication deleted file mode 120000 index 0badc9299f..0000000000 --- a/Lang/NewLISP/Matrix-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-multiplication/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Multisplit b/Lang/NewLISP/Multisplit deleted file mode 120000 index 1bb5fea36e..0000000000 --- a/Lang/NewLISP/Multisplit +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multisplit/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Range-consolidation b/Lang/NewLISP/Range-consolidation deleted file mode 120000 index 15f7beee34..0000000000 --- a/Lang/NewLISP/Range-consolidation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-consolidation/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Range-expansion b/Lang/NewLISP/Range-expansion deleted file mode 120000 index 8f2d253805..0000000000 --- a/Lang/NewLISP/Range-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-expansion/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Run-length-encoding b/Lang/NewLISP/Run-length-encoding deleted file mode 120000 index 91cae97224..0000000000 --- a/Lang/NewLISP/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Set-consolidation b/Lang/NewLISP/Set-consolidation deleted file mode 120000 index 9d4d20d448..0000000000 --- a/Lang/NewLISP/Set-consolidation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-consolidation/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Sorting-algorithms-Permutation-sort b/Lang/NewLISP/Sorting-algorithms-Permutation-sort deleted file mode 120000 index a14257af91..0000000000 --- a/Lang/NewLISP/Sorting-algorithms-Permutation-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Permutation-sort/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Split-a-character-string-based-on-change-of-character b/Lang/NewLISP/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 5af27e593c..0000000000 --- a/Lang/NewLISP/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Text-processing-1 b/Lang/NewLISP/Text-processing-1 deleted file mode 120000 index 39b0cd8b87..0000000000 --- a/Lang/NewLISP/Text-processing-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Text-processing-1/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Text-processing-Max-licenses-in-use b/Lang/NewLISP/Text-processing-Max-licenses-in-use deleted file mode 120000 index fca40fd641..0000000000 --- a/Lang/NewLISP/Text-processing-Max-licenses-in-use +++ /dev/null @@ -1 +0,0 @@ -../../Task/Text-processing-Max-licenses-in-use/NewLISP \ No newline at end of file diff --git a/Lang/NewLISP/Truncatable-primes b/Lang/NewLISP/Truncatable-primes deleted file mode 120000 index 52cd8db47d..0000000000 --- a/Lang/NewLISP/Truncatable-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncatable-primes/NewLISP \ No newline at end of file diff --git a/Lang/Nickle/00-LANG.txt b/Lang/Nickle/00-LANG.txt index e2643c2540..53bb3afeae 100644 --- a/Lang/Nickle/00-LANG.txt +++ b/Lang/Nickle/00-LANG.txt @@ -19,7 +19,7 @@ Other datatypes include multi-dimensional arrays, strings, structures, tagged un The reference implementation includes an interactive top level with byte code compilation before evaluation. Example: -/* Arrays to JSON */ +/* Arrays to JSON */ autoimport JSON; int [*] d = {1,2,3}; poly [*] p = {1, "abc", 42}; @@ -39,8 +39,7 @@ print f; for (int i = 0; i < dim(p); i++) { printf("%v ", p[i]); } -printf("\n"); - +printf("\n"); {{out}}
    prompt$ nickle sampler.5c
    diff --git a/Lang/Nim/Bioinformatics-base-count b/Lang/Nim/Bioinformatics-base-count
    new file mode 120000
    index 0000000000..14fcd687ff
    --- /dev/null
    +++ b/Lang/Nim/Bioinformatics-base-count
    @@ -0,0 +1 @@
    +../../Task/Bioinformatics-base-count/Nim
    \ No newline at end of file
    diff --git a/Lang/Nim/Meissel-Mertens-constant b/Lang/Nim/Meissel-Mertens-constant
    new file mode 120000
    index 0000000000..760c7d7443
    --- /dev/null
    +++ b/Lang/Nim/Meissel-Mertens-constant
    @@ -0,0 +1 @@
    +../../Task/Meissel-Mertens-constant/Nim
    \ No newline at end of file
    diff --git a/Lang/Nim/Miller-Rabin-primality-test b/Lang/Nim/Miller-Rabin-primality-test
    new file mode 120000
    index 0000000000..1ce4ac13f6
    --- /dev/null
    +++ b/Lang/Nim/Miller-Rabin-primality-test
    @@ -0,0 +1 @@
    +../../Task/Miller-Rabin-primality-test/Nim
    \ No newline at end of file
    diff --git a/Lang/Nim/Quaternion-type b/Lang/Nim/Quaternion-type
    new file mode 120000
    index 0000000000..384e273bfc
    --- /dev/null
    +++ b/Lang/Nim/Quaternion-type
    @@ -0,0 +1 @@
    +../../Task/Quaternion-type/Nim
    \ No newline at end of file
    diff --git a/Lang/Nim/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Nim/Sequence-nth-number-with-exactly-n-divisors
    similarity index 100%
    rename from Lang/Nim/Sequence:-nth-number-with-exactly-n-divisors
    rename to Lang/Nim/Sequence-nth-number-with-exactly-n-divisors
    diff --git a/Lang/Nim/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Nim/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors
    similarity index 100%
    rename from Lang/Nim/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors
    rename to Lang/Nim/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors
    diff --git a/Lang/Nim/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Nim/Sequence-smallest-number-with-exactly-n-divisors
    similarity index 100%
    rename from Lang/Nim/Sequence:-smallest-number-with-exactly-n-divisors
    rename to Lang/Nim/Sequence-smallest-number-with-exactly-n-divisors
    diff --git a/Lang/Nim/Sorting-Algorithms-Circle-Sort b/Lang/Nim/Sorting-Algorithms-Circle-Sort
    new file mode 120000
    index 0000000000..80141c2866
    --- /dev/null
    +++ b/Lang/Nim/Sorting-Algorithms-Circle-Sort
    @@ -0,0 +1 @@
    +../../Task/Sorting-Algorithms-Circle-Sort/Nim
    \ No newline at end of file
    diff --git a/Lang/Nom/00-LANG.txt b/Lang/Nom/00-LANG.txt
    deleted file mode 100644
    index 596e8bc965..0000000000
    --- a/Lang/Nom/00-LANG.txt
    +++ /dev/null
    @@ -1,18 +0,0 @@
    -{{language|Nom}}
    -
    -Nom is an interpreted and also compiling (via the translation scripts)
    -language. Documentation for ''Nom'' can be found at [www.nomlang.org] along
    -with the downloadable [http://nomlang.org/download implementation]. 
    -All the source code is also hosted in [https://sourceforge.net sourceforge] 
    -at https://bumble.sf.net/books/pars/
    -
    -Nom is based on the PEP (''Parsing Engine for Patterns'') virtual machine, 
    -which is a text-based virtual machine. The PEP virtual machine is 
    -documented at [http://nomlang.org/doc/machine/]. Nom was first ''conceived'' 
    -around about 2005 but a good working implementation (the 
    -[https://bumble.sf.net/books/pars/object/pep.c pep] interpreter) was not 
    -achieved until approximately 2019. 
    -
    -Nom is, I believe a new approach to recognising/parsing/transforming/transpiling/compiling context-free languages
    -since it uses the same standard Unix-style approach of a ''text-stream-filter''
    -as with tools like ''sed'' or ''awk''.
    \ No newline at end of file
    diff --git a/Lang/Nom/00-META.yaml b/Lang/Nom/00-META.yaml
    deleted file mode 100644
    index 347649abaa..0000000000
    --- a/Lang/Nom/00-META.yaml
    +++ /dev/null
    @@ -1,2 +0,0 @@
    ----
    -from: http://rosettacode.org/wiki/Category:Nom
    diff --git a/Lang/Nom/Balanced-brackets b/Lang/Nom/Balanced-brackets
    deleted file mode 120000
    index 53c6847c48..0000000000
    --- a/Lang/Nom/Balanced-brackets
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Balanced-brackets/Nom
    \ No newline at end of file
    diff --git a/Lang/Nom/CSV-to-HTML-translation b/Lang/Nom/CSV-to-HTML-translation
    deleted file mode 120000
    index efc535b187..0000000000
    --- a/Lang/Nom/CSV-to-HTML-translation
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/CSV-to-HTML-translation/Nom
    \ No newline at end of file
    diff --git a/Lang/Nom/Determine-if-a-string-is-numeric b/Lang/Nom/Determine-if-a-string-is-numeric
    deleted file mode 120000
    index dc0b5a67ea..0000000000
    --- a/Lang/Nom/Determine-if-a-string-is-numeric
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Determine-if-a-string-is-numeric/Nom
    \ No newline at end of file
    diff --git a/Lang/Nom/Empty-string b/Lang/Nom/Empty-string
    deleted file mode 120000
    index e51cf14c29..0000000000
    --- a/Lang/Nom/Empty-string
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Empty-string/Nom
    \ No newline at end of file
    diff --git a/Lang/Nom/Even-or-odd b/Lang/Nom/Even-or-odd
    deleted file mode 120000
    index a93a39c338..0000000000
    --- a/Lang/Nom/Even-or-odd
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Even-or-odd/Nom
    \ No newline at end of file
    diff --git a/Lang/Nom/Hello-world-Text b/Lang/Nom/Hello-world-Text
    deleted file mode 120000
    index 6575bd7149..0000000000
    --- a/Lang/Nom/Hello-world-Text
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Hello-world-Text/Nom
    \ No newline at end of file
    diff --git a/Lang/Nom/Input-loop b/Lang/Nom/Input-loop
    deleted file mode 120000
    index c687c9a3a9..0000000000
    --- a/Lang/Nom/Input-loop
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Input-loop/Nom
    \ No newline at end of file
    diff --git a/Lang/Nom/Odd-word-problem b/Lang/Nom/Odd-word-problem
    deleted file mode 120000
    index 43979a4bb7..0000000000
    --- a/Lang/Nom/Odd-word-problem
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Odd-word-problem/Nom
    \ No newline at end of file
    diff --git a/Lang/Nom/Reverse-a-string b/Lang/Nom/Reverse-a-string
    deleted file mode 120000
    index 38692d6625..0000000000
    --- a/Lang/Nom/Reverse-a-string
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Reverse-a-string/Nom
    \ No newline at end of file
    diff --git a/Lang/Nu/00-LANG.txt b/Lang/Nu/00-LANG.txt
    index 4a1eea655e..d173c3d735 100644
    --- a/Lang/Nu/00-LANG.txt
    +++ b/Lang/Nu/00-LANG.txt
    @@ -1,5 +1,3 @@
    -{{stub}}
    -{{language|Nu|site=https://www.nushell.sh|tags=nu}}
    -{{Language programming paradigm|Functional}}
    +{{stub}}{{language|Nu}}
     
     Nu is the programming language used by Nushell.
    \ No newline at end of file
    diff --git a/Lang/Nu/Associative-array-Merging b/Lang/Nu/Associative-array-Merging
    deleted file mode 120000
    index 7f423eb251..0000000000
    --- a/Lang/Nu/Associative-array-Merging
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Associative-array-Merging/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Averages-Arithmetic-mean b/Lang/Nu/Averages-Arithmetic-mean
    deleted file mode 120000
    index 21a1e77aec..0000000000
    --- a/Lang/Nu/Averages-Arithmetic-mean
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Averages-Arithmetic-mean/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Averages-Median b/Lang/Nu/Averages-Median
    deleted file mode 120000
    index 8b1a3ddc2c..0000000000
    --- a/Lang/Nu/Averages-Median
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Averages-Median/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Averages-Mode b/Lang/Nu/Averages-Mode
    deleted file mode 120000
    index bb3150600b..0000000000
    --- a/Lang/Nu/Averages-Mode
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Averages-Mode/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Averages-Pythagorean-means b/Lang/Nu/Averages-Pythagorean-means
    deleted file mode 120000
    index 02b10a7b5e..0000000000
    --- a/Lang/Nu/Averages-Pythagorean-means
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Averages-Pythagorean-means/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Averages-Root-mean-square b/Lang/Nu/Averages-Root-mean-square
    deleted file mode 120000
    index ed92d8f206..0000000000
    --- a/Lang/Nu/Averages-Root-mean-square
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Averages-Root-mean-square/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Base64-decode-data b/Lang/Nu/Base64-decode-data
    deleted file mode 120000
    index 3620ff6de5..0000000000
    --- a/Lang/Nu/Base64-decode-data
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Base64-decode-data/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Binary-digits b/Lang/Nu/Binary-digits
    deleted file mode 120000
    index cbbd7fb698..0000000000
    --- a/Lang/Nu/Binary-digits
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Binary-digits/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/CSV-data-manipulation b/Lang/Nu/CSV-data-manipulation
    deleted file mode 120000
    index 212f9d037c..0000000000
    --- a/Lang/Nu/CSV-data-manipulation
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/CSV-data-manipulation/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Calculating-the-value-of-e b/Lang/Nu/Calculating-the-value-of-e
    deleted file mode 120000
    index 60dd80e1f7..0000000000
    --- a/Lang/Nu/Calculating-the-value-of-e
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Calculating-the-value-of-e/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Check-input-device-is-a-terminal b/Lang/Nu/Check-input-device-is-a-terminal
    deleted file mode 120000
    index 2c12886796..0000000000
    --- a/Lang/Nu/Check-input-device-is-a-terminal
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Check-input-device-is-a-terminal/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Check-output-device-is-a-terminal b/Lang/Nu/Check-output-device-is-a-terminal
    deleted file mode 120000
    index 8ac81dc9fd..0000000000
    --- a/Lang/Nu/Check-output-device-is-a-terminal
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Check-output-device-is-a-terminal/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Check-that-file-exists b/Lang/Nu/Check-that-file-exists
    deleted file mode 120000
    index aa750c153c..0000000000
    --- a/Lang/Nu/Check-that-file-exists
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Check-that-file-exists/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Comma-quibbling b/Lang/Nu/Comma-quibbling
    deleted file mode 120000
    index 6196295075..0000000000
    --- a/Lang/Nu/Comma-quibbling
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Comma-quibbling/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Count-in-octal b/Lang/Nu/Count-in-octal
    deleted file mode 120000
    index b2bc3a9f84..0000000000
    --- a/Lang/Nu/Count-in-octal
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Count-in-octal/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Count-occurrences-of-a-substring b/Lang/Nu/Count-occurrences-of-a-substring
    deleted file mode 120000
    index 1a4f958e67..0000000000
    --- a/Lang/Nu/Count-occurrences-of-a-substring
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Count-occurrences-of-a-substring/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Date-format b/Lang/Nu/Date-format
    deleted file mode 120000
    index b99fcd9487..0000000000
    --- a/Lang/Nu/Date-format
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Date-format/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Day-of-the-week b/Lang/Nu/Day-of-the-week
    deleted file mode 120000
    index 628ae77cde..0000000000
    --- a/Lang/Nu/Day-of-the-week
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Day-of-the-week/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Department-numbers b/Lang/Nu/Department-numbers
    deleted file mode 120000
    index bb0cfc31a5..0000000000
    --- a/Lang/Nu/Department-numbers
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Department-numbers/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Determine-if-a-string-has-all-the-same-characters b/Lang/Nu/Determine-if-a-string-has-all-the-same-characters
    deleted file mode 120000
    index 1b0a4160eb..0000000000
    --- a/Lang/Nu/Determine-if-a-string-has-all-the-same-characters
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Determine-if-a-string-has-all-the-same-characters/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Dot-product b/Lang/Nu/Dot-product
    deleted file mode 120000
    index 98aeabb740..0000000000
    --- a/Lang/Nu/Dot-product
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Dot-product/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Entropy b/Lang/Nu/Entropy
    deleted file mode 120000
    index 5bed68a8b8..0000000000
    --- a/Lang/Nu/Entropy
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Entropy/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Even-or-odd b/Lang/Nu/Even-or-odd
    deleted file mode 120000
    index 7bc71663d2..0000000000
    --- a/Lang/Nu/Even-or-odd
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Even-or-odd/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Factors-of-an-integer b/Lang/Nu/Factors-of-an-integer
    deleted file mode 120000
    index 5aa37c904e..0000000000
    --- a/Lang/Nu/Factors-of-an-integer
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Factors-of-an-integer/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Fibonacci-sequence b/Lang/Nu/Fibonacci-sequence
    deleted file mode 120000
    index c835014e2a..0000000000
    --- a/Lang/Nu/Fibonacci-sequence
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Fibonacci-sequence/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/File-extension-is-in-extensions-list b/Lang/Nu/File-extension-is-in-extensions-list
    deleted file mode 120000
    index ee608b6863..0000000000
    --- a/Lang/Nu/File-extension-is-in-extensions-list
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/File-extension-is-in-extensions-list/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/File-size b/Lang/Nu/File-size
    deleted file mode 120000
    index 14db7aa8d0..0000000000
    --- a/Lang/Nu/File-size
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/File-size/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/File-size-distribution b/Lang/Nu/File-size-distribution
    deleted file mode 120000
    index 2ee98ba338..0000000000
    --- a/Lang/Nu/File-size-distribution
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/File-size-distribution/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Find-limit-of-recursion b/Lang/Nu/Find-limit-of-recursion
    deleted file mode 120000
    index c6b78c9274..0000000000
    --- a/Lang/Nu/Find-limit-of-recursion
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Find-limit-of-recursion/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Find-the-last-Sunday-of-each-month b/Lang/Nu/Find-the-last-Sunday-of-each-month
    deleted file mode 120000
    index 7d0aedf546..0000000000
    --- a/Lang/Nu/Find-the-last-Sunday-of-each-month
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Find-the-last-Sunday-of-each-month/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Generate-lower-case-ASCII-alphabet b/Lang/Nu/Generate-lower-case-ASCII-alphabet
    deleted file mode 120000
    index 2680ace5a7..0000000000
    --- a/Lang/Nu/Generate-lower-case-ASCII-alphabet
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Generate-lower-case-ASCII-alphabet/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Greatest-common-divisor b/Lang/Nu/Greatest-common-divisor
    deleted file mode 120000
    index d844f147ad..0000000000
    --- a/Lang/Nu/Greatest-common-divisor
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Greatest-common-divisor/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Greatest-element-of-a-list b/Lang/Nu/Greatest-element-of-a-list
    deleted file mode 120000
    index 3b8838db94..0000000000
    --- a/Lang/Nu/Greatest-element-of-a-list
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Greatest-element-of-a-list/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Harshad-or-Niven-series b/Lang/Nu/Harshad-or-Niven-series
    deleted file mode 120000
    index 87dd3a6ea5..0000000000
    --- a/Lang/Nu/Harshad-or-Niven-series
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Harshad-or-Niven-series/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Hello-world-Newline-omission b/Lang/Nu/Hello-world-Newline-omission
    deleted file mode 120000
    index f00be9e5a7..0000000000
    --- a/Lang/Nu/Hello-world-Newline-omission
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Hello-world-Newline-omission/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Hex-words b/Lang/Nu/Hex-words
    deleted file mode 120000
    index 14f92faeab..0000000000
    --- a/Lang/Nu/Hex-words
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Hex-words/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/I-before-E-except-after-C b/Lang/Nu/I-before-E-except-after-C
    deleted file mode 120000
    index 3f6ace8c86..0000000000
    --- a/Lang/Nu/I-before-E-except-after-C
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/I-before-E-except-after-C/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Identity-matrix b/Lang/Nu/Identity-matrix
    deleted file mode 120000
    index 31adec2ac4..0000000000
    --- a/Lang/Nu/Identity-matrix
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Identity-matrix/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Integer-sequence b/Lang/Nu/Integer-sequence
    deleted file mode 120000
    index 32270a6fb8..0000000000
    --- a/Lang/Nu/Integer-sequence
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Integer-sequence/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Jewels-and-stones b/Lang/Nu/Jewels-and-stones
    deleted file mode 120000
    index 31ec593a67..0000000000
    --- a/Lang/Nu/Jewels-and-stones
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Jewels-and-stones/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Last-Friday-of-each-month b/Lang/Nu/Last-Friday-of-each-month
    deleted file mode 120000
    index 6075ef1dcc..0000000000
    --- a/Lang/Nu/Last-Friday-of-each-month
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Last-Friday-of-each-month/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Letter-frequency b/Lang/Nu/Letter-frequency
    deleted file mode 120000
    index 0b7cf31f44..0000000000
    --- a/Lang/Nu/Letter-frequency
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Letter-frequency/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Levenshtein-distance b/Lang/Nu/Levenshtein-distance
    deleted file mode 120000
    index f8c80b6b68..0000000000
    --- a/Lang/Nu/Levenshtein-distance
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Levenshtein-distance/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/MD5 b/Lang/Nu/MD5
    deleted file mode 120000
    index feac42125d..0000000000
    --- a/Lang/Nu/MD5
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/MD5/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Matrix-transposition b/Lang/Nu/Matrix-transposition
    deleted file mode 120000
    index adc758bbe0..0000000000
    --- a/Lang/Nu/Matrix-transposition
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Matrix-transposition/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Multiplication-tables b/Lang/Nu/Multiplication-tables
    deleted file mode 120000
    index ac72d93e8f..0000000000
    --- a/Lang/Nu/Multiplication-tables
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Multiplication-tables/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Non-decimal-radices-Convert b/Lang/Nu/Non-decimal-radices-Convert
    deleted file mode 120000
    index 1dbd245069..0000000000
    --- a/Lang/Nu/Non-decimal-radices-Convert
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Non-decimal-radices-Convert/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Null-object b/Lang/Nu/Null-object
    deleted file mode 120000
    index 74589e5538..0000000000
    --- a/Lang/Nu/Null-object
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Null-object/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Order-two-numerical-lists b/Lang/Nu/Order-two-numerical-lists
    deleted file mode 120000
    index a09725d44a..0000000000
    --- a/Lang/Nu/Order-two-numerical-lists
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Order-two-numerical-lists/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Ordered-words b/Lang/Nu/Ordered-words
    deleted file mode 120000
    index fb4962c2af..0000000000
    --- a/Lang/Nu/Ordered-words
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Ordered-words/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Phrase-reversals b/Lang/Nu/Phrase-reversals
    deleted file mode 120000
    index df54742816..0000000000
    --- a/Lang/Nu/Phrase-reversals
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Phrase-reversals/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Pick-random-element b/Lang/Nu/Pick-random-element
    deleted file mode 120000
    index 184348b826..0000000000
    --- a/Lang/Nu/Pick-random-element
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Pick-random-element/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Random-numbers b/Lang/Nu/Random-numbers
    deleted file mode 120000
    index ba277327c8..0000000000
    --- a/Lang/Nu/Random-numbers
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Random-numbers/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Remove-duplicate-elements b/Lang/Nu/Remove-duplicate-elements
    deleted file mode 120000
    index d498c34eae..0000000000
    --- a/Lang/Nu/Remove-duplicate-elements
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Remove-duplicate-elements/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Repeat-a-string b/Lang/Nu/Repeat-a-string
    deleted file mode 120000
    index 962454e331..0000000000
    --- a/Lang/Nu/Repeat-a-string
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Repeat-a-string/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Reverse-a-string b/Lang/Nu/Reverse-a-string
    deleted file mode 120000
    index 34f43d53f3..0000000000
    --- a/Lang/Nu/Reverse-a-string
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Reverse-a-string/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Rot-13 b/Lang/Nu/Rot-13
    deleted file mode 120000
    index d2902fe7ad..0000000000
    --- a/Lang/Nu/Rot-13
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Rot-13/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/SHA-256 b/Lang/Nu/SHA-256
    deleted file mode 120000
    index b58398940b..0000000000
    --- a/Lang/Nu/SHA-256
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/SHA-256/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Show-the-epoch b/Lang/Nu/Show-the-epoch
    deleted file mode 120000
    index 9547f199df..0000000000
    --- a/Lang/Nu/Show-the-epoch
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Show-the-epoch/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Sort-a-list-of-object-identifiers b/Lang/Nu/Sort-a-list-of-object-identifiers
    deleted file mode 120000
    index 9efe53a3b5..0000000000
    --- a/Lang/Nu/Sort-a-list-of-object-identifiers
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Sort-a-list-of-object-identifiers/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Sort-an-integer-array b/Lang/Nu/Sort-an-integer-array
    deleted file mode 120000
    index cff6ab8400..0000000000
    --- a/Lang/Nu/Sort-an-integer-array
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Sort-an-integer-array/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Split-a-character-string-based-on-change-of-character b/Lang/Nu/Split-a-character-string-based-on-change-of-character
    deleted file mode 120000
    index c6103b5715..0000000000
    --- a/Lang/Nu/Split-a-character-string-based-on-change-of-character
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Split-a-character-string-based-on-change-of-character/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Strip-whitespace-from-a-string-Top-and-tail b/Lang/Nu/Strip-whitespace-from-a-string-Top-and-tail
    deleted file mode 120000
    index c8922d283e..0000000000
    --- a/Lang/Nu/Strip-whitespace-from-a-string-Top-and-tail
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Strip-whitespace-from-a-string-Top-and-tail/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Substring-Top-and-tail b/Lang/Nu/Substring-Top-and-tail
    deleted file mode 120000
    index 8e1ec9809c..0000000000
    --- a/Lang/Nu/Substring-Top-and-tail
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Substring-Top-and-tail/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Sum-and-product-of-an-array b/Lang/Nu/Sum-and-product-of-an-array
    deleted file mode 120000
    index c3f15d2743..0000000000
    --- a/Lang/Nu/Sum-and-product-of-an-array
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Sum-and-product-of-an-array/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Sum-digits-of-an-integer b/Lang/Nu/Sum-digits-of-an-integer
    deleted file mode 120000
    index 41b99ca024..0000000000
    --- a/Lang/Nu/Sum-digits-of-an-integer
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Sum-digits-of-an-integer/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Sum-of-a-series b/Lang/Nu/Sum-of-a-series
    deleted file mode 120000
    index 8172f12fc3..0000000000
    --- a/Lang/Nu/Sum-of-a-series
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Sum-of-a-series/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Sum-of-squares b/Lang/Nu/Sum-of-squares
    deleted file mode 120000
    index d7b0eacde8..0000000000
    --- a/Lang/Nu/Sum-of-squares
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Sum-of-squares/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Terminal-control-Clear-the-screen b/Lang/Nu/Terminal-control-Clear-the-screen
    deleted file mode 120000
    index 929018a6f7..0000000000
    --- a/Lang/Nu/Terminal-control-Clear-the-screen
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Terminal-control-Clear-the-screen/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Terminal-control-Dimensions b/Lang/Nu/Terminal-control-Dimensions
    deleted file mode 120000
    index 6f437c04e4..0000000000
    --- a/Lang/Nu/Terminal-control-Dimensions
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Terminal-control-Dimensions/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Terminal-control-Display-an-extended-character b/Lang/Nu/Terminal-control-Display-an-extended-character
    deleted file mode 120000
    index e54390beea..0000000000
    --- a/Lang/Nu/Terminal-control-Display-an-extended-character
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Terminal-control-Display-an-extended-character/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Terminal-control-Hiding-the-cursor b/Lang/Nu/Terminal-control-Hiding-the-cursor
    deleted file mode 120000
    index e19aad16bb..0000000000
    --- a/Lang/Nu/Terminal-control-Hiding-the-cursor
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Terminal-control-Hiding-the-cursor/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Terminal-control-Inverse-video b/Lang/Nu/Terminal-control-Inverse-video
    deleted file mode 120000
    index dbb97c54ab..0000000000
    --- a/Lang/Nu/Terminal-control-Inverse-video
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Terminal-control-Inverse-video/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Terminal-control-Ringing-the-terminal-bell b/Lang/Nu/Terminal-control-Ringing-the-terminal-bell
    deleted file mode 120000
    index f67008c1f1..0000000000
    --- a/Lang/Nu/Terminal-control-Ringing-the-terminal-bell
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Terminal-control-Ringing-the-terminal-bell/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Time-a-function b/Lang/Nu/Time-a-function
    deleted file mode 120000
    index d32498490a..0000000000
    --- a/Lang/Nu/Time-a-function
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Time-a-function/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Tokenize-a-string b/Lang/Nu/Tokenize-a-string
    deleted file mode 120000
    index e254094f94..0000000000
    --- a/Lang/Nu/Tokenize-a-string
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Tokenize-a-string/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Word-frequency b/Lang/Nu/Word-frequency
    deleted file mode 120000
    index b6ff2592c2..0000000000
    --- a/Lang/Nu/Word-frequency
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Word-frequency/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Y-combinator b/Lang/Nu/Y-combinator
    deleted file mode 120000
    index 77e8ec4916..0000000000
    --- a/Lang/Nu/Y-combinator
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Y-combinator/Nu
    \ No newline at end of file
    diff --git a/Lang/Nu/Zero-to-the-zero-power b/Lang/Nu/Zero-to-the-zero-power
    deleted file mode 120000
    index 950e81f484..0000000000
    --- a/Lang/Nu/Zero-to-the-zero-power
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Zero-to-the-zero-power/Nu
    \ No newline at end of file
    diff --git a/Lang/OCaml/Anti-primes b/Lang/OCaml/Anti-primes
    deleted file mode 120000
    index 5c78fd8505..0000000000
    --- a/Lang/OCaml/Anti-primes
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Anti-primes/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Attractive-numbers b/Lang/OCaml/Attractive-numbers
    deleted file mode 120000
    index 7813955dbc..0000000000
    --- a/Lang/OCaml/Attractive-numbers
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Attractive-numbers/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Cuban-primes b/Lang/OCaml/Cuban-primes
    deleted file mode 120000
    index d69918cc8d..0000000000
    --- a/Lang/OCaml/Cuban-primes
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Cuban-primes/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Harmonic-series b/Lang/OCaml/Harmonic-series
    deleted file mode 120000
    index 7ea0abbec3..0000000000
    --- a/Lang/OCaml/Harmonic-series
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Harmonic-series/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Kosaraju b/Lang/OCaml/Kosaraju
    deleted file mode 120000
    index 7243692ec3..0000000000
    --- a/Lang/OCaml/Kosaraju
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Kosaraju/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Parse-an-IP-Address b/Lang/OCaml/Parse-an-IP-Address
    deleted file mode 120000
    index f01fc56f01..0000000000
    --- a/Lang/OCaml/Parse-an-IP-Address
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Parse-an-IP-Address/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Pseudo-random-numbers-Xorshift-star b/Lang/OCaml/Pseudo-random-numbers-Xorshift-star
    deleted file mode 120000
    index 3fd6f20cda..0000000000
    --- a/Lang/OCaml/Pseudo-random-numbers-Xorshift-star
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Pseudo-random-numbers-Xorshift-star/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Quaternion-type b/Lang/OCaml/Quaternion-type
    new file mode 120000
    index 0000000000..cc65de3875
    --- /dev/null
    +++ b/Lang/OCaml/Quaternion-type
    @@ -0,0 +1 @@
    +../../Task/Quaternion-type/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Sorting-algorithms-Sleep-sort b/Lang/OCaml/Sorting-algorithms-Sleep-sort
    deleted file mode 120000
    index 1cc75210f7..0000000000
    --- a/Lang/OCaml/Sorting-algorithms-Sleep-sort
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Sorting-algorithms-Sleep-sort/OCaml
    \ No newline at end of file
    diff --git a/Lang/OCaml/Strassens-algorithm b/Lang/OCaml/Strassens-algorithm
    deleted file mode 120000
    index f94e8ddb52..0000000000
    --- a/Lang/OCaml/Strassens-algorithm
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Strassens-algorithm/OCaml
    \ No newline at end of file
    diff --git a/Lang/OOC/00-LANG.txt b/Lang/OOC/00-LANG.txt
    index 65c190709f..6ab39964dc 100644
    --- a/Lang/OOC/00-LANG.txt
    +++ b/Lang/OOC/00-LANG.txt
    @@ -1,2 +1,2 @@
     {{stub}}{{language
    -|site=https://ooc-lang.github.io/}}
    \ No newline at end of file
    +|site=http://ooc-lang.org}}
    \ No newline at end of file
    diff --git a/Lang/OPL/00-LANG.txt b/Lang/OPL/00-LANG.txt
    index 5d7f1fba8f..8357c2d27a 100644
    --- a/Lang/OPL/00-LANG.txt
    +++ b/Lang/OPL/00-LANG.txt
    @@ -1,11 +1,3 @@
     {{stub}}
     {{language
    -|site=http://opl-dev.sourceforge.net/}}
    -
    -'''OPL (Open Programming Language'''; formerly '''Organiser Programming Language)''' is a high-level programming language designed primarily for use on mobile devices, particularly those running the Psion Series 3 and Series 5 operating systems. Developed in the early 1990s, '''OPL''' was created to provide a simple yet powerful environment for application development on handheld devices, allowing users to create software that could leverage the unique features of these portable platforms.
    -
    -OPL is known for its ease of use, making it accessible to both novice and experienced programmers. The language features a syntax that is similar to [[BASIC]], which helps in rapid application development. It supports structured programming concepts, including variables, control structures, and functions, enabling developers to write clear and maintainable code.
    -
    -One of the key strengths of OPL is its ability to interact seamlessly with the underlying operating system, allowing developers to access device-specific features such as file management, user interface elements, and hardware capabilities. This makes OPL particularly suitable for creating productivity applications, games, and utilities tailored for mobile users.
    -
    -Despite its niche status, OPL has garnered a dedicated community of enthusiasts and developers who continue to explore its capabilities and create innovative applications. As mobile computing continues to evolve, OPL remains a notable example of early efforts to bring programming to handheld devices, showcasing the potential of portable technology in software development.
    \ No newline at end of file
    +|site=http://opl-dev.sourceforge.net/}}
    \ No newline at end of file
    diff --git a/Lang/OPL/100-doors b/Lang/OPL/100-doors
    deleted file mode 120000
    index a3b7e045e6..0000000000
    --- a/Lang/OPL/100-doors
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/100-doors/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Arithmetic-Integer b/Lang/OPL/Arithmetic-Integer
    deleted file mode 120000
    index dfcb743d43..0000000000
    --- a/Lang/OPL/Arithmetic-Integer
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Arithmetic-Integer/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Array-length b/Lang/OPL/Array-length
    deleted file mode 120000
    index 691e5be366..0000000000
    --- a/Lang/OPL/Array-length
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Array-length/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Arrays b/Lang/OPL/Arrays
    deleted file mode 120000
    index f57347887c..0000000000
    --- a/Lang/OPL/Arrays
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Arrays/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Character-codes b/Lang/OPL/Character-codes
    deleted file mode 120000
    index 2dac3156b8..0000000000
    --- a/Lang/OPL/Character-codes
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Character-codes/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Comments b/Lang/OPL/Comments
    deleted file mode 120000
    index 8aec78d8aa..0000000000
    --- a/Lang/OPL/Comments
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Comments/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Compare-length-of-two-strings b/Lang/OPL/Compare-length-of-two-strings
    deleted file mode 120000
    index c36f1e31fc..0000000000
    --- a/Lang/OPL/Compare-length-of-two-strings
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Compare-length-of-two-strings/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Copy-a-string b/Lang/OPL/Copy-a-string
    deleted file mode 120000
    index 76609905e5..0000000000
    --- a/Lang/OPL/Copy-a-string
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Copy-a-string/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Draw-a-clock b/Lang/OPL/Draw-a-clock
    deleted file mode 120000
    index 438c8aadf3..0000000000
    --- a/Lang/OPL/Draw-a-clock
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Draw-a-clock/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Draw-a-pixel b/Lang/OPL/Draw-a-pixel
    deleted file mode 120000
    index d5c6ecea21..0000000000
    --- a/Lang/OPL/Draw-a-pixel
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Draw-a-pixel/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Empty-string b/Lang/OPL/Empty-string
    deleted file mode 120000
    index 9f6569303b..0000000000
    --- a/Lang/OPL/Empty-string
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Empty-string/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Factors-of-an-integer b/Lang/OPL/Factors-of-an-integer
    deleted file mode 120000
    index 2dc5a0a29e..0000000000
    --- a/Lang/OPL/Factors-of-an-integer
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Factors-of-an-integer/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Filter b/Lang/OPL/Filter
    deleted file mode 120000
    index 89ea7a2c54..0000000000
    --- a/Lang/OPL/Filter
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Filter/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Hello-world-Text b/Lang/OPL/Hello-world-Text
    deleted file mode 120000
    index a870057a16..0000000000
    --- a/Lang/OPL/Hello-world-Text
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Hello-world-Text/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Program-termination b/Lang/OPL/Program-termination
    deleted file mode 120000
    index 8287761646..0000000000
    --- a/Lang/OPL/Program-termination
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Program-termination/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Reverse-a-string b/Lang/OPL/Reverse-a-string
    deleted file mode 120000
    index 8dba18d4c9..0000000000
    --- a/Lang/OPL/Reverse-a-string
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Reverse-a-string/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Show-ASCII-table b/Lang/OPL/Show-ASCII-table
    deleted file mode 120000
    index 72f35c10c7..0000000000
    --- a/Lang/OPL/Show-ASCII-table
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Show-ASCII-table/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/String-length b/Lang/OPL/String-length
    deleted file mode 120000
    index ebd9f5ed88..0000000000
    --- a/Lang/OPL/String-length
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/String-length/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/String-prepend b/Lang/OPL/String-prepend
    deleted file mode 120000
    index 78cb69646e..0000000000
    --- a/Lang/OPL/String-prepend
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/String-prepend/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/Substring b/Lang/OPL/Substring
    deleted file mode 120000
    index 046b764f06..0000000000
    --- a/Lang/OPL/Substring
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/Substring/OPL
    \ No newline at end of file
    diff --git a/Lang/OPL/User-input-Text b/Lang/OPL/User-input-Text
    deleted file mode 120000
    index ad39694040..0000000000
    --- a/Lang/OPL/User-input-Text
    +++ /dev/null
    @@ -1 +0,0 @@
    -../../Task/User-input-Text/OPL
    \ No newline at end of file
    diff --git a/Lang/Oberon-07/00-LANG.txt b/Lang/Oberon-07/00-LANG.txt
    deleted file mode 100644
    index fecc62a2b8..0000000000
    --- a/Lang/Oberon-07/00-LANG.txt
    +++ /dev/null
    @@ -1,30 +0,0 @@
    -{{stub}}
    -{{language|Oberon-07
    -|strength=strong
    -|safety=safe
    -|express=explicit
    -|compat=structural
    -|checking=static
    -|parampass=both
    -|gc=yes
    -}}
    -
    -'''Oberon-07''' is a revision of the Oberon language by Niklaus Wirth. Oberon-07 is based on Wirth's original Oberon language (not [[Oberon-2]]), Wirth lists the changes [https://people.inf.ethz.ch/wirth/Oberon/Oberon07.pdf here], which are largely aimed at  simplification - in [https://people.inf.ethz.ch/wirth/Oberon/Oberon07.Report.pdf his defining document], Wirth quotes Einstein: "Make it as simple as possible, but not simpler".

    - -Oberon-07 contains a WHILE loop that allows multiple conditions and statements - similar to the loop in [[wp:Guarded_Command_Language|Edsgar Dijkstra's Guarded Command Language]], though with different syntax and without non-determinism. See [[Loops/N_plus_one_half#Oberon-07]] for an example. -

    -In addition to the samples below, many of the [[Oberon-2]] samples should work with Oberon-07, particularly if the Oberon-07 compiler you are using allows LONGINT as a synonym for INTEGER (LONGINT, SHORTINT, LONGREAL and SHORTREAL were dropped from Oberon-07). - -==Tasks not implemented in Oberon-07== -[[Tasks not implemented in Oberon-07]] - -== Library modules used in Rosetta Code samples == -* [[:Category:Oberon-07-primes|Prime related]] -* [[:Category:Oberon-07-words|Word related]] - -== See also == -* [[Oberon-2]] -* [[Modula-2]] -* [[Modula-3]] -* [[Component Pascal]] -* [[Zonnon]] \ No newline at end of file diff --git a/Lang/Oberon-07/00-META.yaml b/Lang/Oberon-07/00-META.yaml deleted file mode 100644 index df5ec38ad0..0000000000 --- a/Lang/Oberon-07/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Oberon-07 diff --git a/Lang/Oberon-07/Abundant-odd-numbers b/Lang/Oberon-07/Abundant-odd-numbers deleted file mode 120000 index 93003f8da4..0000000000 --- a/Lang/Oberon-07/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Additive-primes b/Lang/Oberon-07/Additive-primes deleted file mode 120000 index 29e374f522..0000000000 --- a/Lang/Oberon-07/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Almost-prime b/Lang/Oberon-07/Almost-prime deleted file mode 120000 index a487d08ae3..0000000000 --- a/Lang/Oberon-07/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Arithmetic-derivative b/Lang/Oberon-07/Arithmetic-derivative deleted file mode 120000 index 8a23f5aca7..0000000000 --- a/Lang/Oberon-07/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Arithmetic-numbers b/Lang/Oberon-07/Arithmetic-numbers deleted file mode 120000 index 12d1ac60ce..0000000000 --- a/Lang/Oberon-07/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Bell-numbers b/Lang/Oberon-07/Bell-numbers deleted file mode 120000 index e9a3518583..0000000000 --- a/Lang/Oberon-07/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Brilliant-numbers b/Lang/Oberon-07/Brilliant-numbers deleted file mode 120000 index 9a2690e4fa..0000000000 --- a/Lang/Oberon-07/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/CUSIP b/Lang/Oberon-07/CUSIP deleted file mode 120000 index fca08cc3e6..0000000000 --- a/Lang/Oberon-07/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Calculating-the-value-of-e b/Lang/Oberon-07/Calculating-the-value-of-e deleted file mode 120000 index 3693146162..0000000000 --- a/Lang/Oberon-07/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Carmichael-3-strong-pseudoprimes b/Lang/Oberon-07/Carmichael-3-strong-pseudoprimes deleted file mode 120000 index 1732f66395..0000000000 --- a/Lang/Oberon-07/Carmichael-3-strong-pseudoprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Carmichael-3-strong-pseudoprimes/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Catalan-numbers b/Lang/Oberon-07/Catalan-numbers deleted file mode 120000 index 97d7a62fcd..0000000000 --- a/Lang/Oberon-07/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Copy-stdin-to-stdout b/Lang/Oberon-07/Copy-stdin-to-stdout deleted file mode 120000 index 15b9092fd0..0000000000 --- a/Lang/Oberon-07/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Count-in-factors b/Lang/Oberon-07/Count-in-factors deleted file mode 120000 index 213e18b9fd..0000000000 --- a/Lang/Oberon-07/Count-in-factors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-factors/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Cumulative-standard-deviation b/Lang/Oberon-07/Cumulative-standard-deviation deleted file mode 120000 index 998c4d523e..0000000000 --- a/Lang/Oberon-07/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Day-of-the-week b/Lang/Oberon-07/Day-of-the-week deleted file mode 120000 index f4a166cd18..0000000000 --- a/Lang/Oberon-07/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Department-numbers b/Lang/Oberon-07/Department-numbers deleted file mode 120000 index ee00d69bb6..0000000000 --- a/Lang/Oberon-07/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Determine-if-a-string-has-all-the-same-characters b/Lang/Oberon-07/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index f2c11ea5d4..0000000000 --- a/Lang/Oberon-07/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Dice-game-probabilities b/Lang/Oberon-07/Dice-game-probabilities deleted file mode 120000 index 527f78ea60..0000000000 --- a/Lang/Oberon-07/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Empty-program b/Lang/Oberon-07/Empty-program deleted file mode 120000 index ba46e2aae6..0000000000 --- a/Lang/Oberon-07/Empty-program +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-program/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Equal-prime-and-composite-sums b/Lang/Oberon-07/Equal-prime-and-composite-sums deleted file mode 120000 index 91c57a6baf..0000000000 --- a/Lang/Oberon-07/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Ethiopian-multiplication b/Lang/Oberon-07/Ethiopian-multiplication deleted file mode 120000 index 13a766a6c8..0000000000 --- a/Lang/Oberon-07/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Euclid-Mullin-sequence b/Lang/Oberon-07/Euclid-Mullin-sequence deleted file mode 120000 index 81b23466eb..0000000000 --- a/Lang/Oberon-07/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Factorial b/Lang/Oberon-07/Factorial deleted file mode 120000 index 42b8c4919c..0000000000 --- a/Lang/Oberon-07/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Find-the-last-Sunday-of-each-month b/Lang/Oberon-07/Find-the-last-Sunday-of-each-month deleted file mode 120000 index 1d918212c0..0000000000 --- a/Lang/Oberon-07/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Giuga-numbers b/Lang/Oberon-07/Giuga-numbers deleted file mode 120000 index cce0bf5fc2..0000000000 --- a/Lang/Oberon-07/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Harmonic-series b/Lang/Oberon-07/Harmonic-series deleted file mode 120000 index 8e08686cfc..0000000000 --- a/Lang/Oberon-07/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Isqrt-integer-square-root-of-X b/Lang/Oberon-07/Isqrt-integer-square-root-of-X deleted file mode 120000 index a51f2f67a5..0000000000 --- a/Lang/Oberon-07/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Iterated-digits-squaring b/Lang/Oberon-07/Iterated-digits-squaring deleted file mode 120000 index 7a2da6ed31..0000000000 --- a/Lang/Oberon-07/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Jordan-P-lya-numbers b/Lang/Oberon-07/Jordan-P-lya-numbers deleted file mode 120000 index 9a4df048e8..0000000000 --- a/Lang/Oberon-07/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Julia-set b/Lang/Oberon-07/Julia-set deleted file mode 120000 index e864d34442..0000000000 --- a/Lang/Oberon-07/Julia-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Julia-set/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Knapsack-problem-Continuous b/Lang/Oberon-07/Knapsack-problem-Continuous deleted file mode 120000 index 43a5919216..0000000000 --- a/Lang/Oberon-07/Knapsack-problem-Continuous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Continuous/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Last-Friday-of-each-month b/Lang/Oberon-07/Last-Friday-of-each-month deleted file mode 120000 index e8c07d9c19..0000000000 --- a/Lang/Oberon-07/Last-Friday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-Friday-of-each-month/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Leap-year b/Lang/Oberon-07/Leap-year deleted file mode 120000 index 8797ca0922..0000000000 --- a/Lang/Oberon-07/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Legendre-prime-counting-function b/Lang/Oberon-07/Legendre-prime-counting-function deleted file mode 120000 index 7d4d3489c5..0000000000 --- a/Lang/Oberon-07/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Long-year b/Lang/Oberon-07/Long-year deleted file mode 120000 index a0709fd34e..0000000000 --- a/Lang/Oberon-07/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Loops-Break b/Lang/Oberon-07/Loops-Break deleted file mode 120000 index bcd210938e..0000000000 --- a/Lang/Oberon-07/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Loops-N-plus-one-half b/Lang/Oberon-07/Loops-N-plus-one-half deleted file mode 120000 index f9ed03d1cc..0000000000 --- a/Lang/Oberon-07/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Magic-8-ball b/Lang/Oberon-07/Magic-8-ball deleted file mode 120000 index 060c6dd973..0000000000 --- a/Lang/Oberon-07/Magic-8-ball +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-8-ball/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/McNuggets-problem b/Lang/Oberon-07/McNuggets-problem deleted file mode 120000 index f69d28cb85..0000000000 --- a/Lang/Oberon-07/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Motzkin-numbers b/Lang/Oberon-07/Motzkin-numbers deleted file mode 120000 index b3b2948803..0000000000 --- a/Lang/Oberon-07/Motzkin-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Motzkin-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Numbers-with-equal-rises-and-falls b/Lang/Oberon-07/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 5077c6cc5f..0000000000 --- a/Lang/Oberon-07/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/One-dimensional-cellular-automata b/Lang/Oberon-07/One-dimensional-cellular-automata deleted file mode 120000 index 95f88799f3..0000000000 --- a/Lang/Oberon-07/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Ordered-words b/Lang/Oberon-07/Ordered-words deleted file mode 120000 index 6b04795e94..0000000000 --- a/Lang/Oberon-07/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Pell-numbers b/Lang/Oberon-07/Pell-numbers deleted file mode 120000 index 7b4ee7e909..0000000000 --- a/Lang/Oberon-07/Pell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pell-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Primality-by-trial-division b/Lang/Oberon-07/Primality-by-trial-division deleted file mode 120000 index bbe4339271..0000000000 --- a/Lang/Oberon-07/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Rare-numbers b/Lang/Oberon-07/Rare-numbers deleted file mode 120000 index ee9d392e3c..0000000000 --- a/Lang/Oberon-07/Rare-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rare-numbers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Scope-modifiers b/Lang/Oberon-07/Scope-modifiers deleted file mode 120000 index 5c7c859780..0000000000 --- a/Lang/Oberon-07/Scope-modifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Scope-modifiers/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Semiprime b/Lang/Oberon-07/Semiprime deleted file mode 120000 index 46f4d8859c..0000000000 --- a/Lang/Oberon-07/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Sequence-of-non-squares b/Lang/Oberon-07/Sequence-of-non-squares deleted file mode 120000 index 45e81c48c5..0000000000 --- a/Lang/Oberon-07/Sequence-of-non-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-non-squares/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Sequence-of-primorial-primes b/Lang/Oberon-07/Sequence-of-primorial-primes deleted file mode 120000 index 7f1050cb25..0000000000 --- a/Lang/Oberon-07/Sequence-of-primorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primorial-primes/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Shoelace-formula-for-polygonal-area b/Lang/Oberon-07/Shoelace-formula-for-polygonal-area deleted file mode 120000 index b71cae6abb..0000000000 --- a/Lang/Oberon-07/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Sierpinski-triangle b/Lang/Oberon-07/Sierpinski-triangle deleted file mode 120000 index bdad2ec3ac..0000000000 --- a/Lang/Oberon-07/Sierpinski-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Sleeping-Beauty-problem b/Lang/Oberon-07/Sleeping-Beauty-problem deleted file mode 120000 index 94be576322..0000000000 --- a/Lang/Oberon-07/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Square-but-not-cube b/Lang/Oberon-07/Square-but-not-cube deleted file mode 120000 index 917704f475..0000000000 --- a/Lang/Oberon-07/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Stack b/Lang/Oberon-07/Stack deleted file mode 120000 index abb833bb1a..0000000000 --- a/Lang/Oberon-07/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Stirling-numbers-of-the-first-kind b/Lang/Oberon-07/Stirling-numbers-of-the-first-kind deleted file mode 120000 index fc333d5e86..0000000000 --- a/Lang/Oberon-07/Stirling-numbers-of-the-first-kind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stirling-numbers-of-the-first-kind/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Tau-number b/Lang/Oberon-07/Tau-number deleted file mode 120000 index c494dc7ed9..0000000000 --- a/Lang/Oberon-07/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Thue-Morse b/Lang/Oberon-07/Thue-Morse deleted file mode 120000 index 9ae7bad9e1..0000000000 --- a/Lang/Oberon-07/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Van-Eck-sequence b/Lang/Oberon-07/Van-Eck-sequence deleted file mode 120000 index 1d825043d7..0000000000 --- a/Lang/Oberon-07/Van-Eck-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-Eck-sequence/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Van-der-Corput-sequence b/Lang/Oberon-07/Van-der-Corput-sequence deleted file mode 120000 index 9bcb9702bb..0000000000 --- a/Lang/Oberon-07/Van-der-Corput-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-der-Corput-sequence/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Verhoeff-algorithm b/Lang/Oberon-07/Verhoeff-algorithm deleted file mode 120000 index 5e73a5c36f..0000000000 --- a/Lang/Oberon-07/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Yellowstone-sequence b/Lang/Oberon-07/Yellowstone-sequence deleted file mode 120000 index cf4e2d20b9..0000000000 --- a/Lang/Oberon-07/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon-07/Zeckendorf-number-representation b/Lang/Oberon-07/Zeckendorf-number-representation deleted file mode 120000 index 3ada43b974..0000000000 --- a/Lang/Oberon-07/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/Oberon-07 \ No newline at end of file diff --git a/Lang/Oberon/100-doors b/Lang/Oberon/100-doors new file mode 120000 index 0000000000..9d190b3c16 --- /dev/null +++ b/Lang/Oberon/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Abundant-deficient-and-perfect-number-classifications b/Lang/Oberon/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index e8005ff3ac..0000000000 --- a/Lang/Oberon/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Arithmetic-Integer b/Lang/Oberon/Arithmetic-Integer new file mode 120000 index 0000000000..e9f7a593d7 --- /dev/null +++ b/Lang/Oberon/Arithmetic-Integer @@ -0,0 +1 @@ +../../Task/Arithmetic-Integer/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Calkin-Wilf-sequence b/Lang/Oberon/Calkin-Wilf-sequence deleted file mode 120000 index 15bedf6a9d..0000000000 --- a/Lang/Oberon/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Cumulative-standard-deviation b/Lang/Oberon/Cumulative-standard-deviation deleted file mode 120000 index efd10bee3a..0000000000 --- a/Lang/Oberon/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Euclid-Mullin-sequence b/Lang/Oberon/Euclid-Mullin-sequence deleted file mode 120000 index 7808b89779..0000000000 --- a/Lang/Oberon/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Even-or-odd b/Lang/Oberon/Even-or-odd new file mode 120000 index 0000000000..02920c353c --- /dev/null +++ b/Lang/Oberon/Even-or-odd @@ -0,0 +1 @@ +../../Task/Even-or-odd/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Golden-ratio-Convergence b/Lang/Oberon/Golden-ratio-Convergence deleted file mode 120000 index dd21277799..0000000000 --- a/Lang/Oberon/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Greatest-common-divisor b/Lang/Oberon/Greatest-common-divisor new file mode 120000 index 0000000000..23dd5fc156 --- /dev/null +++ b/Lang/Oberon/Greatest-common-divisor @@ -0,0 +1 @@ +../../Task/Greatest-common-divisor/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Loops-Continue b/Lang/Oberon/Loops-Continue deleted file mode 120000 index 2ebf84aa8e..0000000000 --- a/Lang/Oberon/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Loops-For-with-a-specified-step b/Lang/Oberon/Loops-For-with-a-specified-step new file mode 120000 index 0000000000..e73c849d2b --- /dev/null +++ b/Lang/Oberon/Loops-For-with-a-specified-step @@ -0,0 +1 @@ +../../Task/Loops-For-with-a-specified-step/Oberon \ No newline at end of file diff --git a/Lang/Oberon/Rare-numbers b/Lang/Oberon/Rare-numbers deleted file mode 120000 index 9dc08ea100..0000000000 --- a/Lang/Oberon/Rare-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rare-numbers/Oberon \ No newline at end of file diff --git a/Lang/Objeck/Catalan-numbers-Pascals-triangle b/Lang/Objeck/Catalan-numbers-Pascals-triangle deleted file mode 120000 index bc3c684d61..0000000000 --- a/Lang/Objeck/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Copy-stdin-to-stdout b/Lang/Objeck/Copy-stdin-to-stdout deleted file mode 120000 index b358bbac43..0000000000 --- a/Lang/Objeck/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Disarium-numbers b/Lang/Objeck/Disarium-numbers deleted file mode 120000 index bc58c40d5c..0000000000 --- a/Lang/Objeck/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Distributed-programming b/Lang/Objeck/Distributed-programming deleted file mode 120000 index 728f38ee28..0000000000 --- a/Lang/Objeck/Distributed-programming +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distributed-programming/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Floyds-triangle b/Lang/Objeck/Floyds-triangle deleted file mode 120000 index 743553b677..0000000000 --- a/Lang/Objeck/Floyds-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyds-triangle/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Generate-lower-case-ASCII-alphabet b/Lang/Objeck/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 92f0212a12..0000000000 --- a/Lang/Objeck/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/Objeck \ No newline at end of file diff --git a/Lang/Objeck/HTTPS-Client-authenticated b/Lang/Objeck/HTTPS-Client-authenticated deleted file mode 120000 index 6f56878ef9..0000000000 --- a/Lang/Objeck/HTTPS-Client-authenticated +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS-Client-authenticated/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Hello-world-Standard-error b/Lang/Objeck/Hello-world-Standard-error deleted file mode 120000 index 49d3f16aa6..0000000000 --- a/Lang/Objeck/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Knuth-shuffle b/Lang/Objeck/Knuth-shuffle deleted file mode 120000 index a7bb43880d..0000000000 --- a/Lang/Objeck/Knuth-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuth-shuffle/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Mad-Libs b/Lang/Objeck/Mad-Libs deleted file mode 120000 index 39f19ea059..0000000000 --- a/Lang/Objeck/Mad-Libs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mad-Libs/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Magic-squares-of-doubly-even-order b/Lang/Objeck/Magic-squares-of-doubly-even-order deleted file mode 120000 index 526cd66745..0000000000 --- a/Lang/Objeck/Magic-squares-of-doubly-even-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-doubly-even-order/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Matrix-multiplication b/Lang/Objeck/Matrix-multiplication deleted file mode 120000 index e2801343eb..0000000000 --- a/Lang/Objeck/Matrix-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-multiplication/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Multiplication-tables b/Lang/Objeck/Multiplication-tables deleted file mode 120000 index 3bad27bce2..0000000000 --- a/Lang/Objeck/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Queue-Definition b/Lang/Objeck/Queue-Definition deleted file mode 120000 index 392e43e236..0000000000 --- a/Lang/Objeck/Queue-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Queue-Definition/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Roman-numerals-Decode b/Lang/Objeck/Roman-numerals-Decode deleted file mode 120000 index bd8b56a721..0000000000 --- a/Lang/Objeck/Roman-numerals-Decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roman-numerals-Decode/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Rosetta-Code-Find-unimplemented-tasks b/Lang/Objeck/Rosetta-Code-Find-unimplemented-tasks deleted file mode 120000 index 7e77326aa1..0000000000 --- a/Lang/Objeck/Rosetta-Code-Find-unimplemented-tasks +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Find-unimplemented-tasks/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Sorting-Algorithms-Circle-Sort b/Lang/Objeck/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..4475fe5763 --- /dev/null +++ b/Lang/Objeck/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Strip-a-set-of-characters-from-a-string b/Lang/Objeck/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index f651f9d55d..0000000000 --- a/Lang/Objeck/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/Objeck \ No newline at end of file diff --git a/Lang/Objeck/Take-notes-on-the-command-line b/Lang/Objeck/Take-notes-on-the-command-line deleted file mode 120000 index 5d55699b35..0000000000 --- a/Lang/Objeck/Take-notes-on-the-command-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Take-notes-on-the-command-line/Objeck \ No newline at end of file diff --git a/Lang/Object-Pascal-Implementations/00-LANG.txt b/Lang/Object-Pascal-Implementations/00-LANG.txt deleted file mode 100644 index 74167ef7a7..0000000000 --- a/Lang/Object-Pascal-Implementations/00-LANG.txt +++ /dev/null @@ -1,3 +0,0 @@ -{{language|Object Pascal}} -{{implementation cat|Object Pascal}} -{{implementation|Pascal}} \ No newline at end of file diff --git a/Lang/Object-Pascal-Implementations/00-META.yaml b/Lang/Object-Pascal-Implementations/00-META.yaml deleted file mode 100644 index 34f0628a46..0000000000 --- a/Lang/Object-Pascal-Implementations/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Object_Pascal_Implementations diff --git a/Lang/Object-Pascal/Sorting-algorithms-Shell-sort b/Lang/Object-Pascal/Sorting-algorithms-Shell-sort deleted file mode 120000 index 6ae9067d88..0000000000 --- a/Lang/Object-Pascal/Sorting-algorithms-Shell-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Shell-sort/Object-Pascal \ No newline at end of file diff --git a/Lang/Octave/Peripheral-drift-illusion b/Lang/Octave/Peripheral-drift-illusion deleted file mode 120000 index 9bda77fd28..0000000000 --- a/Lang/Octave/Peripheral-drift-illusion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peripheral-drift-illusion/Octave \ No newline at end of file diff --git a/Lang/Octave/Quaternion-type b/Lang/Octave/Quaternion-type new file mode 120000 index 0000000000..6dec972e26 --- /dev/null +++ b/Lang/Octave/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Octave \ No newline at end of file diff --git a/Lang/Odin/00-LANG.txt b/Lang/Odin/00-LANG.txt index 1a08002d21..2c96551228 100644 --- a/Lang/Odin/00-LANG.txt +++ b/Lang/Odin/00-LANG.txt @@ -1,24 +1 @@ -{{language -|exec=machine -|gc=no -|safety=unsafe -|parampass=reference -|checking=static -|compat=nominative -|strength=strong -|site=https://odin-lang.org/ -|tag=odin -}}{{language programming paradigm|Imperative}}{{Codepad}} - -'''Odin''' is a general-purpose, [[procedural programming|procedural]], [[imperative programming|imperative]] programming language developed by [https://www.gingerbill.org/ gingerBill] as a "C alternative for the joy of programming". - -Odin is distributed under [https://github.com/odin-lang/Odin/blob/master/LICENSE zlib license]. - -==Links== -* [https://odin-lang.org/docs/install/ Compiler installation instructions] -* [https://github.com/odin-lang/Odin Repository] -* [https://odin-lang.org/docs/overview/ Language overview] -* [https://pkg.odin-lang.org/ Standard library documentation] - -==Todo== -[[Tasks_not_implemented_in_Odin]] \ No newline at end of file +{{stub}}{{language|Odin}} \ No newline at end of file diff --git a/Lang/Odin/100-doors b/Lang/Odin/100-doors deleted file mode 120000 index 67c11787e6..0000000000 --- a/Lang/Odin/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Odin \ No newline at end of file diff --git a/Lang/Odin/Call-a-function-in-a-shared-library b/Lang/Odin/Call-a-function-in-a-shared-library deleted file mode 120000 index cf4ca70486..0000000000 --- a/Lang/Odin/Call-a-function-in-a-shared-library +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-function-in-a-shared-library/Odin \ No newline at end of file diff --git a/Lang/Odin/Character-codes b/Lang/Odin/Character-codes deleted file mode 120000 index 409b8a73d1..0000000000 --- a/Lang/Odin/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/Odin \ No newline at end of file diff --git a/Lang/Odin/Color-wheel b/Lang/Odin/Color-wheel deleted file mode 120000 index 5b87562427..0000000000 --- a/Lang/Odin/Color-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-wheel/Odin \ No newline at end of file diff --git a/Lang/Odin/Comments b/Lang/Odin/Comments deleted file mode 120000 index 69505856e6..0000000000 --- a/Lang/Odin/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Odin \ No newline at end of file diff --git a/Lang/Odin/Date-format b/Lang/Odin/Date-format deleted file mode 120000 index 63e481d689..0000000000 --- a/Lang/Odin/Date-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-format/Odin \ No newline at end of file diff --git a/Lang/Odin/Draw-a-clock b/Lang/Odin/Draw-a-clock deleted file mode 120000 index b014eb3c8e..0000000000 --- a/Lang/Odin/Draw-a-clock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-clock/Odin \ No newline at end of file diff --git a/Lang/Odin/Draw-a-cuboid b/Lang/Odin/Draw-a-cuboid deleted file mode 120000 index 124ff7cfe9..0000000000 --- a/Lang/Odin/Draw-a-cuboid +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-cuboid/Odin \ No newline at end of file diff --git a/Lang/Odin/Draw-a-sphere b/Lang/Odin/Draw-a-sphere deleted file mode 120000 index b20b72cdc0..0000000000 --- a/Lang/Odin/Draw-a-sphere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-sphere/Odin \ No newline at end of file diff --git a/Lang/Odin/Euler-method b/Lang/Odin/Euler-method deleted file mode 120000 index 2085f38551..0000000000 --- a/Lang/Odin/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/Odin \ No newline at end of file diff --git a/Lang/Odin/Execute-Brain- b/Lang/Odin/Execute-Brain- deleted file mode 120000 index 748dbb9c99..0000000000 --- a/Lang/Odin/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Odin \ No newline at end of file diff --git a/Lang/Odin/Fractran b/Lang/Odin/Fractran deleted file mode 120000 index 5bd1840a6a..0000000000 --- a/Lang/Odin/Fractran +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractran/Odin \ No newline at end of file diff --git a/Lang/Odin/Function-composition b/Lang/Odin/Function-composition deleted file mode 120000 index 27b230f571..0000000000 --- a/Lang/Odin/Function-composition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-composition/Odin \ No newline at end of file diff --git a/Lang/Odin/Hailstone-sequence b/Lang/Odin/Hailstone-sequence deleted file mode 120000 index 678ea867f0..0000000000 --- a/Lang/Odin/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/Odin \ No newline at end of file diff --git a/Lang/Odin/Hello-world-Graphical b/Lang/Odin/Hello-world-Graphical deleted file mode 120000 index 00108512b1..0000000000 --- a/Lang/Odin/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/Odin \ No newline at end of file diff --git a/Lang/Odin/Image-noise b/Lang/Odin/Image-noise deleted file mode 120000 index 9b2e03c5b6..0000000000 --- a/Lang/Odin/Image-noise +++ /dev/null @@ -1 +0,0 @@ -../../Task/Image-noise/Odin \ No newline at end of file diff --git a/Lang/Odin/Musical-scale b/Lang/Odin/Musical-scale deleted file mode 120000 index cd45a36de9..0000000000 --- a/Lang/Odin/Musical-scale +++ /dev/null @@ -1 +0,0 @@ -../../Task/Musical-scale/Odin \ No newline at end of file diff --git a/Lang/Odin/One-dimensional-cellular-automata b/Lang/Odin/One-dimensional-cellular-automata deleted file mode 120000 index 5cf45742c4..0000000000 --- a/Lang/Odin/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/Odin \ No newline at end of file diff --git a/Lang/Odin/Primality-by-trial-division b/Lang/Odin/Primality-by-trial-division deleted file mode 120000 index 8e356363dd..0000000000 --- a/Lang/Odin/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/Odin \ No newline at end of file diff --git a/Lang/Odin/Quine b/Lang/Odin/Quine deleted file mode 120000 index 53e4cf3687..0000000000 --- a/Lang/Odin/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/Odin \ No newline at end of file diff --git a/Lang/Odin/Read-a-configuration-file b/Lang/Odin/Read-a-configuration-file deleted file mode 120000 index fa189332d6..0000000000 --- a/Lang/Odin/Read-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-configuration-file/Odin \ No newline at end of file diff --git a/Lang/Odin/Reverse-words-in-a-string b/Lang/Odin/Reverse-words-in-a-string deleted file mode 120000 index 9648c360e7..0000000000 --- a/Lang/Odin/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/Odin \ No newline at end of file diff --git a/Lang/Odin/Runge-Kutta-method b/Lang/Odin/Runge-Kutta-method deleted file mode 120000 index 1b9162c995..0000000000 --- a/Lang/Odin/Runge-Kutta-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Runge-Kutta-method/Odin \ No newline at end of file diff --git a/Lang/Odin/Sieve-of-Eratosthenes b/Lang/Odin/Sieve-of-Eratosthenes deleted file mode 120000 index 265789a7db..0000000000 --- a/Lang/Odin/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/Odin \ No newline at end of file diff --git a/Lang/Odin/Sockets b/Lang/Odin/Sockets deleted file mode 120000 index ccedc5dd5d..0000000000 --- a/Lang/Odin/Sockets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sockets/Odin \ No newline at end of file diff --git a/Lang/Odin/Strip-a-set-of-characters-from-a-string b/Lang/Odin/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index b76ef81d13..0000000000 --- a/Lang/Odin/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/Odin \ No newline at end of file diff --git a/Lang/Odin/Unicode-variable-names b/Lang/Odin/Unicode-variable-names deleted file mode 120000 index f070da9637..0000000000 --- a/Lang/Odin/Unicode-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-variable-names/Odin \ No newline at end of file diff --git a/Lang/Odin/Write-entire-file b/Lang/Odin/Write-entire-file deleted file mode 120000 index 53b4243bae..0000000000 --- a/Lang/Odin/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/Odin \ No newline at end of file diff --git a/Lang/Oforth/Quaternion-type b/Lang/Oforth/Quaternion-type new file mode 120000 index 0000000000..51caedda0e --- /dev/null +++ b/Lang/Oforth/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Oforth \ No newline at end of file diff --git a/Lang/Ol/Quaternion-type b/Lang/Ol/Quaternion-type new file mode 120000 index 0000000000..a3e712c033 --- /dev/null +++ b/Lang/Ol/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Ol \ No newline at end of file diff --git a/Lang/Ol/Runge-Kutta-method b/Lang/Ol/Runge-Kutta-method deleted file mode 120000 index 55f8d1bf18..0000000000 --- a/Lang/Ol/Runge-Kutta-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Runge-Kutta-method/Ol \ No newline at end of file diff --git a/Lang/OmniMark/00-LANG.txt b/Lang/OmniMark/00-LANG.txt deleted file mode 100644 index 43585c3f19..0000000000 --- a/Lang/OmniMark/00-LANG.txt +++ /dev/null @@ -1,15 +0,0 @@ -{{language|OmniMark -|tags=omnimark -|site=https://www.stilo.com/omnimark/}} -'''OmniMark''' is a fourth-generation programming language used mostly in the publishing industry. It is currently a proprietary software product of Stilo International. The most recent release of OmniMark is 12.0 (as at 2024-06-25). - -For a brief period, in 1999-2000, OmniMark was available free of charge (versions 4 and 5, including a 'Lite edition' of version 4, which was limited to 200 actions). - -==Links== -* [[wp:OmniMark|Omnimark in Wikipedia]] -* [https://developers.stilo.com/docs/html/index.html Version 12.0 documentation] -* [https://developers.stilo.com/documentation/docs/html/index.htm Version 6.5 documentation] -* [https://developers.stilo.com/documentation/v4r0/index.htm Version 4.0 documentation] - -==Todo== -* [[Tasks not implemented in OmniMark]] \ No newline at end of file diff --git a/Lang/OmniMark/00-META.yaml b/Lang/OmniMark/00-META.yaml deleted file mode 100644 index 4f47c1011a..0000000000 --- a/Lang/OmniMark/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:OmniMark diff --git a/Lang/OmniMark/100-doors b/Lang/OmniMark/100-doors deleted file mode 120000 index 97ec6d7965..0000000000 --- a/Lang/OmniMark/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Array-concatenation b/Lang/OmniMark/Array-concatenation deleted file mode 120000 index 826b17e39e..0000000000 --- a/Lang/OmniMark/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Array-length b/Lang/OmniMark/Array-length deleted file mode 120000 index 47ea995113..0000000000 --- a/Lang/OmniMark/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/CSV-to-HTML-translation b/Lang/OmniMark/CSV-to-HTML-translation deleted file mode 120000 index 78c14aa62b..0000000000 --- a/Lang/OmniMark/CSV-to-HTML-translation +++ /dev/null @@ -1 +0,0 @@ -../../Task/CSV-to-HTML-translation/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Caesar-cipher b/Lang/OmniMark/Caesar-cipher deleted file mode 120000 index abca569385..0000000000 --- a/Lang/OmniMark/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Camel-case-and-snake-case b/Lang/OmniMark/Camel-case-and-snake-case deleted file mode 120000 index 977f7a6fec..0000000000 --- a/Lang/OmniMark/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Determine-if-a-string-has-all-the-same-characters b/Lang/OmniMark/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index c1672ea012..0000000000 --- a/Lang/OmniMark/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Hello-world-Standard-error b/Lang/OmniMark/Hello-world-Standard-error deleted file mode 120000 index 8ef2028e3a..0000000000 --- a/Lang/OmniMark/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Hex-words b/Lang/OmniMark/Hex-words deleted file mode 120000 index b43e37ad28..0000000000 --- a/Lang/OmniMark/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/ISBN13-check-digit b/Lang/OmniMark/ISBN13-check-digit deleted file mode 120000 index 5629e040c9..0000000000 --- a/Lang/OmniMark/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Input-loop b/Lang/OmniMark/Input-loop deleted file mode 120000 index c2f5884755..0000000000 --- a/Lang/OmniMark/Input-loop +++ /dev/null @@ -1 +0,0 @@ -../../Task/Input-loop/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Repeat-a-string b/Lang/OmniMark/Repeat-a-string deleted file mode 120000 index a5c79bdf8d..0000000000 --- a/Lang/OmniMark/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Reverse-a-string b/Lang/OmniMark/Reverse-a-string deleted file mode 120000 index ac30e9d9f0..0000000000 --- a/Lang/OmniMark/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Rot-13 b/Lang/OmniMark/Rot-13 deleted file mode 120000 index 34ecde427b..0000000000 --- a/Lang/OmniMark/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Strip-control-codes-and-extended-characters-from-a-string b/Lang/OmniMark/Strip-control-codes-and-extended-characters-from-a-string deleted file mode 120000 index e108d513e0..0000000000 --- a/Lang/OmniMark/Strip-control-codes-and-extended-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-control-codes-and-extended-characters-from-a-string/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Substring b/Lang/OmniMark/Substring deleted file mode 120000 index 3eb9323ac2..0000000000 --- a/Lang/OmniMark/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/Substring-Top-and-tail b/Lang/OmniMark/Substring-Top-and-tail deleted file mode 120000 index b88887f219..0000000000 --- a/Lang/OmniMark/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/OmniMark \ No newline at end of file diff --git a/Lang/OmniMark/XML-Input b/Lang/OmniMark/XML-Input deleted file mode 120000 index 56ac42b963..0000000000 --- a/Lang/OmniMark/XML-Input +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-Input/OmniMark \ No newline at end of file diff --git a/Lang/OoRexx/00-LANG.txt b/Lang/OoRexx/00-LANG.txt index 84a3f74109..8031f8ae00 100644 --- a/Lang/OoRexx/00-LANG.txt +++ b/Lang/OoRexx/00-LANG.txt @@ -10,7 +10,4 @@ open sourced, maintained by the [http://www.rexxla.org/ Rexx Language Associatio ooRexx can be used to run many programs shown here in the [[REXX]] category. See http://rosettacode.org/wiki/Rosetta_Code:Village_Pump/Dialects#REXX.2C_ooRexx.2C_and_others -for differences. - -== Rosetta Code tasks not implemented in OoRexx == -[[Tasks not implemented in OoRexx]] \ No newline at end of file +for differences. \ No newline at end of file diff --git a/Lang/OoRexx/Giuga-numbers b/Lang/OoRexx/Giuga-numbers deleted file mode 120000 index 86fe47decb..0000000000 --- a/Lang/OoRexx/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/OoRexx \ No newline at end of file diff --git a/Lang/OoRexx/Nth-root b/Lang/OoRexx/Nth-root deleted file mode 120000 index 05543d43a8..0000000000 --- a/Lang/OoRexx/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/OoRexx \ No newline at end of file diff --git a/Lang/OoRexx/Prime-decomposition b/Lang/OoRexx/Prime-decomposition deleted file mode 120000 index f16b4825fb..0000000000 --- a/Lang/OoRexx/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/OoRexx \ No newline at end of file diff --git a/Lang/OoRexx/Quaternion-type b/Lang/OoRexx/Quaternion-type new file mode 120000 index 0000000000..be3652b55d --- /dev/null +++ b/Lang/OoRexx/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/OoRexx \ No newline at end of file diff --git a/Lang/OoRexx/Sorting-algorithms-Merge-sort b/Lang/OoRexx/Sorting-algorithms-Merge-sort deleted file mode 120000 index ae6f4594d4..0000000000 --- a/Lang/OoRexx/Sorting-algorithms-Merge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Merge-sort/OoRexx \ No newline at end of file diff --git a/Lang/Openscad/Empty-program b/Lang/Openscad/Empty-program new file mode 120000 index 0000000000..89182791e6 --- /dev/null +++ b/Lang/Openscad/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Openscad \ No newline at end of file diff --git a/Lang/OxygenBasic/Array-length b/Lang/OxygenBasic/Array-length deleted file mode 120000 index 00db990da9..0000000000 --- a/Lang/OxygenBasic/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Blum-integer b/Lang/OxygenBasic/Blum-integer deleted file mode 120000 index 343ecf7af1..0000000000 --- a/Lang/OxygenBasic/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Cullen-and-Woodall-numbers b/Lang/OxygenBasic/Cullen-and-Woodall-numbers deleted file mode 120000 index 75020e6fa5..0000000000 --- a/Lang/OxygenBasic/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Determine-if-a-string-has-all-the-same-characters b/Lang/OxygenBasic/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 5577d0b0ab..0000000000 --- a/Lang/OxygenBasic/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Diversity-prediction-theorem b/Lang/OxygenBasic/Diversity-prediction-theorem deleted file mode 120000 index e07716f11a..0000000000 --- a/Lang/OxygenBasic/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Eban-numbers b/Lang/OxygenBasic/Eban-numbers deleted file mode 120000 index 4b362db2df..0000000000 --- a/Lang/OxygenBasic/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Evaluate-binomial-coefficients b/Lang/OxygenBasic/Evaluate-binomial-coefficients deleted file mode 120000 index 2fc6117dc9..0000000000 --- a/Lang/OxygenBasic/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/FizzBuzz b/Lang/OxygenBasic/FizzBuzz deleted file mode 120000 index 7f3e716c79..0000000000 --- a/Lang/OxygenBasic/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Generate-lower-case-ASCII-alphabet b/Lang/OxygenBasic/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index dc06638a04..0000000000 --- a/Lang/OxygenBasic/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Hello-world-Newline-omission b/Lang/OxygenBasic/Hello-world-Newline-omission deleted file mode 120000 index b315730342..0000000000 --- a/Lang/OxygenBasic/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Hello-world-Text b/Lang/OxygenBasic/Hello-world-Text deleted file mode 120000 index 0286beeff0..0000000000 --- a/Lang/OxygenBasic/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Hofstadter-Q-sequence b/Lang/OxygenBasic/Hofstadter-Q-sequence deleted file mode 120000 index 99d7dde29e..0000000000 --- a/Lang/OxygenBasic/Hofstadter-Q-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Q-sequence/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Jewels-and-stones b/Lang/OxygenBasic/Jewels-and-stones deleted file mode 120000 index af9c0e197d..0000000000 --- a/Lang/OxygenBasic/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Josephus-problem b/Lang/OxygenBasic/Josephus-problem deleted file mode 120000 index 26c79416e6..0000000000 --- a/Lang/OxygenBasic/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Leonardo-numbers b/Lang/OxygenBasic/Leonardo-numbers deleted file mode 120000 index 9d8949a99b..0000000000 --- a/Lang/OxygenBasic/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Loops-Continue b/Lang/OxygenBasic/Loops-Continue deleted file mode 120000 index df4c4e529e..0000000000 --- a/Lang/OxygenBasic/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Numbers-with-equal-rises-and-falls b/Lang/OxygenBasic/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 0060a020b0..0000000000 --- a/Lang/OxygenBasic/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Primality-by-trial-division b/Lang/OxygenBasic/Primality-by-trial-division deleted file mode 120000 index 90df6937ed..0000000000 --- a/Lang/OxygenBasic/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Repeat b/Lang/OxygenBasic/Repeat deleted file mode 120000 index 56b4dec43d..0000000000 --- a/Lang/OxygenBasic/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Sudan-function b/Lang/OxygenBasic/Sudan-function deleted file mode 120000 index 05a812bb81..0000000000 --- a/Lang/OxygenBasic/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/OxygenBasic \ No newline at end of file diff --git a/Lang/OxygenBasic/Tau-number b/Lang/OxygenBasic/Tau-number deleted file mode 120000 index 4f73054594..0000000000 --- a/Lang/OxygenBasic/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/OxygenBasic \ No newline at end of file diff --git a/Lang/Oz/FizzBuzz b/Lang/Oz/FizzBuzz new file mode 120000 index 0000000000..287980acd6 --- /dev/null +++ b/Lang/Oz/FizzBuzz @@ -0,0 +1 @@ +../../Task/FizzBuzz/Oz \ No newline at end of file diff --git a/Lang/Oz/Miller-Rabin-primality-test b/Lang/Oz/Miller-Rabin-primality-test new file mode 120000 index 0000000000..e6999d8858 --- /dev/null +++ b/Lang/Oz/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Oz \ No newline at end of file diff --git a/Lang/PARI-GP/00-LANG.txt b/Lang/PARI-GP/00-LANG.txt index 81b37f3de6..bacfec6d7d 100644 --- a/Lang/PARI-GP/00-LANG.txt +++ b/Lang/PARI-GP/00-LANG.txt @@ -17,7 +17,7 @@ PARI/GP is a widely used computer algebra system designed for fast computations PARI/GP is composed of two parts: a [[C]] library called PARI and an interface, gp, to this library. GP scripts are concise, easy to write, and resemble mathematical language. (Terminology: the scripting language of gp is called GP.) -PARI was written by Henri Cohen and others at Université de Bordeaux; Aurel Page is the current project leader. gp was originally written by Dominique Bernardi, then maintained and enhanced by Karim Belabas and Ilya Zakharevich, and finally rewritten by Bill Allombert. +PARI was written by Henri Cohen and others at Université de Bordeaux and is now maintained by Karim Belabas. gp was originally written by Dominique Bernardi, then maintained and enhanced by Karim Belabas and Ilya Zakharevich, and finally rewritten by Bill Allombert. == Getting PARI/GP == PARI/GP can be used in many different operating systems. This is a reasonably comprehensive list of currently-supported systems; for other systems, please use the [https://pari.math.u-bordeaux.fr/lists-index.html mailing lists]. @@ -219,16 +219,12 @@ If you want to program with PARI, many languages are supported: ** [https://pari.math.u-bordeaux.fr/Events/PARI2017c/talks/TAN2.pdf Théorie algébrique des nombres avancée] (22 pp.) ** [https://pari.math.u-bordeaux.fr/Events/PARI2017c/talks/ecc.pdf Courbes elliptiques sur les corps finis] (4 pp.) *[http://w3.countnumber.de/fischer/res-ZT2007/PariByExample.pdf Erste Schritte mit PARI/GP] by Lars Fischer (13 pp., 2007; German) -* [https://www.youtube.com/watch?v=I_GfMUGAlns Pari Gp مع NotPad++] by NoorDeen Rahmani (2020; 2:46; Arabic) -- setting up Notepad++ for syntax highlighting for PARI/GP. +*[https://www.youtube.com/watch?v=I_GfMUGAlns Pari Gp مع NotPad++] by NoorDeen Rahmani (2020; 2:46; Arabic) -- setting up Notepad++ for syntax highlighting for PARI/GP. ==== Video tutorials ==== * [https://www.youtube.com/watch?v=RQLqQHu7i0Y Pari/GP Tutorial: Basics] by Leandro Junes (2020, 19:04) -* [https://www.youtube.com/watch?v=FeG0BYRrDOE&t=12m Video demo of RSA in PARI/GP] by Maren1955 (2014, 17:39) -* Video tutorials, parts [http://www.youtube.com/watch?v=0G-9JzlrzBM 1] [http://www.youtube.com/watch?v=d7i0rv59hns 2] [http://www.youtube.com/watch?v=wCyU2n-G-pk 3] [http://www.youtube.com/watch?v=WOCuBvK8O6Q 4] (2011, appx. 20 minutes) - -== Syntax highlighting == -* [https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/UDLs/PARI-GP_by-third_maths.xml Notepad++] -* [https://www.youtube.com/watch?v=I_GfMUGAlns Pari Gp مع NotPad++] (Arabic tutorial) +*[https://www.youtube.com/watch?v=FeG0BYRrDOE&t=12m Video demo of RSA in PARI/GP] by Maren1955 (2014, 17:39) +*Video tutorials, parts [http://www.youtube.com/watch?v=0G-9JzlrzBM 1] [http://www.youtube.com/watch?v=d7i0rv59hns 2] [http://www.youtube.com/watch?v=wCyU2n-G-pk 3] [http://www.youtube.com/watch?v=WOCuBvK8O6Q 4] (2011, appx. 20 minutes) === Papers on PARI/GP === * Karim Belabas and Henri Cohen, [https://arxiv.org/abs/1810.00547 Modular Forms in Pari/GP], ''Research in the Mathematical Sciences'' '''5''':37 (2018) diff --git a/Lang/PARI-GP/4-rings-or-4-squares-puzzle b/Lang/PARI-GP/4-rings-or-4-squares-puzzle deleted file mode 120000 index b8cfa5a07c..0000000000 --- a/Lang/PARI-GP/4-rings-or-4-squares-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/4-rings-or-4-squares-puzzle/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Achilles-numbers b/Lang/PARI-GP/Achilles-numbers deleted file mode 120000 index 73f3f645b5..0000000000 --- a/Lang/PARI-GP/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Almkvist-Giullera-formula-for-pi b/Lang/PARI-GP/Almkvist-Giullera-formula-for-pi deleted file mode 120000 index 53d950c5f0..0000000000 --- a/Lang/PARI-GP/Almkvist-Giullera-formula-for-pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almkvist-Giullera-formula-for-pi/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Attractive-numbers b/Lang/PARI-GP/Attractive-numbers deleted file mode 120000 index 9c5ab01706..0000000000 --- a/Lang/PARI-GP/Attractive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Attractive-numbers/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Bell-numbers b/Lang/PARI-GP/Bell-numbers deleted file mode 120000 index c0de777713..0000000000 --- a/Lang/PARI-GP/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Disarium-numbers b/Lang/PARI-GP/Disarium-numbers deleted file mode 120000 index e21e95674b..0000000000 --- a/Lang/PARI-GP/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Empty-program b/Lang/PARI-GP/Empty-program new file mode 120000 index 0000000000..e5621857fc --- /dev/null +++ b/Lang/PARI-GP/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Gapful-numbers b/Lang/PARI-GP/Gapful-numbers deleted file mode 120000 index a3ce3c2de1..0000000000 --- a/Lang/PARI-GP/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Meissel-Mertens-constant b/Lang/PARI-GP/Meissel-Mertens-constant new file mode 120000 index 0000000000..b03a10e2fd --- /dev/null +++ b/Lang/PARI-GP/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Miller-Rabin-primality-test b/Lang/PARI-GP/Miller-Rabin-primality-test new file mode 120000 index 0000000000..6c17b6de21 --- /dev/null +++ b/Lang/PARI-GP/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Pell-numbers b/Lang/PARI-GP/Pell-numbers deleted file mode 120000 index 6dc31a644a..0000000000 --- a/Lang/PARI-GP/Pell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pell-numbers/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Prime-numbers-whose-neighboring-pairs-are-tetraprimes b/Lang/PARI-GP/Prime-numbers-whose-neighboring-pairs-are-tetraprimes deleted file mode 120000 index 497a956889..0000000000 --- a/Lang/PARI-GP/Prime-numbers-whose-neighboring-pairs-are-tetraprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-numbers-whose-neighboring-pairs-are-tetraprimes/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Quaternion-type b/Lang/PARI-GP/Quaternion-type new file mode 120000 index 0000000000..87636fd8d1 --- /dev/null +++ b/Lang/PARI-GP/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Sorting-Algorithms-Circle-Sort b/Lang/PARI-GP/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..2e42235ea5 --- /dev/null +++ b/Lang/PARI-GP/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/PARI-GP \ No newline at end of file diff --git a/Lang/PARI-GP/Tonelli-Shanks-algorithm b/Lang/PARI-GP/Tonelli-Shanks-algorithm deleted file mode 120000 index de551c5a5b..0000000000 --- a/Lang/PARI-GP/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/PARI-GP \ No newline at end of file diff --git a/Lang/PHP/00-LANG.txt b/Lang/PHP/00-LANG.txt index 894fa89337..ad1d2b043d 100644 --- a/Lang/PHP/00-LANG.txt +++ b/Lang/PHP/00-LANG.txt @@ -13,13 +13,4 @@ '''PHP''' (PHP: Hypertext Preprocessor) is a [[reflective programming]] language originally designed for producing dynamic Web pages. PHP is used mainly in server-side application software, but can be used from a command line interface or in standalone graphical applications. ==Citations== -* [[wp:PHP|Wikipedia:PHP]] - -==External links== -=== Online compilers === -* [https://onlinephp.io/ PHP Sandbox - Execute PHP code online through your browser] (online compiler) -* [https://www.mycompiler.io/new/php Create a new PHP program - myCompiler - myCompiler] (online compiler) - -=== Tutorials and manuals === -* [https://www.w3schools.com/php/default.asp PHP Tutorial] on [https://www.w3schools.com www.w3schools.com] -* [https://www.geeksforgeeks.org/php/php-tutorial/ PHP Tutorial - GeeksforGeeks] \ No newline at end of file +* [[wp:PHP|Wikipedia:PHP]] \ No newline at end of file diff --git a/Lang/PHP/AKS-test-for-primes b/Lang/PHP/AKS-test-for-primes deleted file mode 120000 index e35d324f89..0000000000 --- a/Lang/PHP/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/PHP \ No newline at end of file diff --git a/Lang/PHP/Abbreviations-automatic b/Lang/PHP/Abbreviations-automatic deleted file mode 120000 index 30112aa9b6..0000000000 --- a/Lang/PHP/Abbreviations-automatic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-automatic/PHP \ No newline at end of file diff --git a/Lang/PHP/Abundant-deficient-and-perfect-number-classifications b/Lang/PHP/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index c5476da28d..0000000000 --- a/Lang/PHP/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/PHP \ No newline at end of file diff --git a/Lang/PHP/Abundant-odd-numbers b/Lang/PHP/Abundant-odd-numbers deleted file mode 120000 index c610a0d9cd..0000000000 --- a/Lang/PHP/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/PHP \ No newline at end of file diff --git a/Lang/PHP/Angle-difference-between-two-bearings b/Lang/PHP/Angle-difference-between-two-bearings deleted file mode 120000 index 357602b50f..0000000000 --- a/Lang/PHP/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/PHP \ No newline at end of file diff --git a/Lang/PHP/Arithmetic-numbers b/Lang/PHP/Arithmetic-numbers deleted file mode 120000 index 21fbcc7304..0000000000 --- a/Lang/PHP/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/PHP \ No newline at end of file diff --git a/Lang/PHP/Bell-numbers b/Lang/PHP/Bell-numbers deleted file mode 120000 index 879d53dae5..0000000000 --- a/Lang/PHP/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/PHP \ No newline at end of file diff --git a/Lang/PHP/Brazilian-numbers b/Lang/PHP/Brazilian-numbers deleted file mode 120000 index 5bd899327e..0000000000 --- a/Lang/PHP/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/PHP \ No newline at end of file diff --git a/Lang/PHP/Diversity-prediction-theorem b/Lang/PHP/Diversity-prediction-theorem deleted file mode 120000 index a50f50e661..0000000000 --- a/Lang/PHP/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/PHP \ No newline at end of file diff --git a/Lang/PHP/Gamma-function b/Lang/PHP/Gamma-function deleted file mode 120000 index 4d00e2f50d..0000000000 --- a/Lang/PHP/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/PHP \ No newline at end of file diff --git a/Lang/PHP/Horizontal-sundial-calculations b/Lang/PHP/Horizontal-sundial-calculations deleted file mode 120000 index a385f37a68..0000000000 --- a/Lang/PHP/Horizontal-sundial-calculations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horizontal-sundial-calculations/PHP \ No newline at end of file diff --git a/Lang/PHP/Leonardo-numbers b/Lang/PHP/Leonardo-numbers deleted file mode 120000 index 4b3cefd6f0..0000000000 --- a/Lang/PHP/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/PHP \ No newline at end of file diff --git a/Lang/PHP/M-bius-function b/Lang/PHP/M-bius-function deleted file mode 120000 index 6f4e3a47bb..0000000000 --- a/Lang/PHP/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/PHP \ No newline at end of file diff --git a/Lang/PHP/Magic-constant b/Lang/PHP/Magic-constant deleted file mode 120000 index b67d20fb19..0000000000 --- a/Lang/PHP/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/PHP \ No newline at end of file diff --git a/Lang/PHP/Map-range b/Lang/PHP/Map-range deleted file mode 120000 index 07d5696e85..0000000000 --- a/Lang/PHP/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/PHP \ No newline at end of file diff --git a/Lang/PHP/Miller-Rabin-primality-test b/Lang/PHP/Miller-Rabin-primality-test new file mode 120000 index 0000000000..bff04d1a83 --- /dev/null +++ b/Lang/PHP/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/PHP \ No newline at end of file diff --git a/Lang/PHP/Multifactorial b/Lang/PHP/Multifactorial deleted file mode 120000 index a4051140a1..0000000000 --- a/Lang/PHP/Multifactorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multifactorial/PHP \ No newline at end of file diff --git a/Lang/PHP/Partial-function-application b/Lang/PHP/Partial-function-application deleted file mode 120000 index 8596466c3e..0000000000 --- a/Lang/PHP/Partial-function-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partial-function-application/PHP \ No newline at end of file diff --git a/Lang/PHP/Prime-decomposition b/Lang/PHP/Prime-decomposition deleted file mode 120000 index 6265ac9618..0000000000 --- a/Lang/PHP/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/PHP \ No newline at end of file diff --git a/Lang/PHP/Square-free-integers b/Lang/PHP/Square-free-integers deleted file mode 120000 index 49d9fb45c0..0000000000 --- a/Lang/PHP/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/PHP \ No newline at end of file diff --git a/Lang/PHP/Statistics-Basic b/Lang/PHP/Statistics-Basic deleted file mode 120000 index 199b45c315..0000000000 --- a/Lang/PHP/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/PHP \ No newline at end of file diff --git a/Lang/PHP/Statistics-Normal-distribution b/Lang/PHP/Statistics-Normal-distribution deleted file mode 120000 index e8fce08a80..0000000000 --- a/Lang/PHP/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/PHP \ No newline at end of file diff --git a/Lang/PHP/Tau-number b/Lang/PHP/Tau-number deleted file mode 120000 index 67a4445d30..0000000000 --- a/Lang/PHP/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/PHP \ No newline at end of file diff --git a/Lang/PHP/Water-collected-between-towers b/Lang/PHP/Water-collected-between-towers deleted file mode 120000 index 524c5ae99b..0000000000 --- a/Lang/PHP/Water-collected-between-towers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Water-collected-between-towers/PHP \ No newline at end of file diff --git a/Lang/PILOT/00-LANG.txt b/Lang/PILOT/00-LANG.txt index 5e238de7ae..742582e7c0 100644 --- a/Lang/PILOT/00-LANG.txt +++ b/Lang/PILOT/00-LANG.txt @@ -9,6 +9,4 @@ NO:Sorry, it was Napoleon Bonaparte. PILOT was also marketed in the 1980s as a first programming language for children and beginners, including in extended versions supporting turtle graphics; and it even found use as a scripting language under CP/M. -Keywords—written in block capitals in the example above—are case-insensitive and can usually be abbreviated to one or two letters (T for TYPE, JM for JUMPMATCH). The only data types supported are strings and integers. -=== External Links === -[https://handwiki.org/wiki/PILOT HandWiki PILOT], where you can find a list of PILOT implementations. \ No newline at end of file +Keywords—written in block capitals in the example above—are case-insensitive and can usually be abbreviated to one or two letters (T for TYPE, JM for JUMPMATCH). The only data types supported are strings and integers. \ No newline at end of file diff --git a/Lang/PL-I-80/Additive-primes b/Lang/PL-I-80/Additive-primes deleted file mode 120000 index a065cd3d8e..0000000000 --- a/Lang/PL-I-80/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/PL-I-80 \ No newline at end of file diff --git a/Lang/PL-I-80/Character-codes b/Lang/PL-I-80/Character-codes deleted file mode 120000 index c19a7eafa1..0000000000 --- a/Lang/PL-I-80/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/PL-I-80 \ No newline at end of file diff --git a/Lang/PL-I-80/Integer-overflow b/Lang/PL-I-80/Integer-overflow deleted file mode 120000 index f1947b64b4..0000000000 --- a/Lang/PL-I-80/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/PL-I-80 \ No newline at end of file diff --git a/Lang/PL-I-80/Square-free-integers b/Lang/PL-I-80/Square-free-integers deleted file mode 120000 index 6f8a00edb8..0000000000 --- a/Lang/PL-I-80/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/PL-I-80 \ No newline at end of file diff --git a/Lang/PL-I-80/Strip-whitespace-from-a-string-Top-and-tail b/Lang/PL-I-80/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index ac54cb4639..0000000000 --- a/Lang/PL-I-80/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/PL-I-80 \ No newline at end of file diff --git a/Lang/PL-I/00-LANG.txt b/Lang/PL-I/00-LANG.txt index 3b9ba57193..e9ccbaa140 100644 --- a/Lang/PL-I/00-LANG.txt +++ b/Lang/PL-I/00-LANG.txt @@ -84,8 +84,4 @@ The pre-processor keywords are prefixed with a   %   (perce ==See Also== * [[wp:PL/I|PL/I on Wikipedia]] * [[PL/M]] -* [[Polyglot:PL/I and PL/M]] - -==External links== -* [http://teampli.net/index.html Team PL/I] -** [http://teampli.net/candt.html PL/I Compilers and Tools] \ No newline at end of file +* [[Polyglot:PL/I and PL/M]] \ No newline at end of file diff --git a/Lang/PL-I/Abundant-odd-numbers b/Lang/PL-I/Abundant-odd-numbers deleted file mode 120000 index 666cd2c37f..0000000000 --- a/Lang/PL-I/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/PL-I \ No newline at end of file diff --git a/Lang/PL-I/Arithmetic-derivative b/Lang/PL-I/Arithmetic-derivative deleted file mode 120000 index 37f109623d..0000000000 --- a/Lang/PL-I/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/PL-I \ No newline at end of file diff --git a/Lang/PL-I/Arithmetic-numbers b/Lang/PL-I/Arithmetic-numbers deleted file mode 120000 index 6912369ef9..0000000000 --- a/Lang/PL-I/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/PL-I \ No newline at end of file diff --git a/Lang/PL-I/Bell-numbers b/Lang/PL-I/Bell-numbers deleted file mode 120000 index 4afaf5b11f..0000000000 --- a/Lang/PL-I/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/PL-I \ No newline at end of file diff --git a/Lang/PL-I/Diversity-prediction-theorem b/Lang/PL-I/Diversity-prediction-theorem deleted file mode 120000 index a449ec2ac9..0000000000 --- a/Lang/PL-I/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/PL-I \ No newline at end of file diff --git a/Lang/PL-I/Fairshare-between-two-and-more b/Lang/PL-I/Fairshare-between-two-and-more deleted file mode 120000 index 38f481a639..0000000000 --- a/Lang/PL-I/Fairshare-between-two-and-more +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fairshare-between-two-and-more/PL-I \ No newline at end of file diff --git a/Lang/PL-I/Quaternion-type b/Lang/PL-I/Quaternion-type new file mode 120000 index 0000000000..b86d406fec --- /dev/null +++ b/Lang/PL-I/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/PL-I \ No newline at end of file diff --git a/Lang/PL-I/Tau-number b/Lang/PL-I/Tau-number deleted file mode 120000 index 3dade8db80..0000000000 --- a/Lang/PL-I/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/PL-I \ No newline at end of file diff --git a/Lang/PL-I/Zeckendorf-number-representation b/Lang/PL-I/Zeckendorf-number-representation deleted file mode 120000 index eabc5808d1..0000000000 --- a/Lang/PL-I/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/PL-I \ No newline at end of file diff --git a/Lang/PL-M/100-doors b/Lang/PL-M/100-doors new file mode 120000 index 0000000000..fb7e956c0e --- /dev/null +++ b/Lang/PL-M/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/PL-M \ No newline at end of file diff --git a/Lang/PL-M/Arithmetic-derivative b/Lang/PL-M/Arithmetic-derivative deleted file mode 120000 index 13f3e396fe..0000000000 --- a/Lang/PL-M/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/PL-M \ No newline at end of file diff --git a/Lang/PL-M/Draw-a-cuboid b/Lang/PL-M/Draw-a-cuboid deleted file mode 120000 index c6084a0c66..0000000000 --- a/Lang/PL-M/Draw-a-cuboid +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-cuboid/PL-M \ No newline at end of file diff --git a/Lang/PL-M/Empty-program b/Lang/PL-M/Empty-program deleted file mode 120000 index 80a556ac57..0000000000 --- a/Lang/PL-M/Empty-program +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-program/PL-M \ No newline at end of file diff --git a/Lang/PL-M/Move-to-front-algorithm b/Lang/PL-M/Move-to-front-algorithm deleted file mode 120000 index 23bec2ef3f..0000000000 --- a/Lang/PL-M/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/PL-M \ No newline at end of file diff --git a/Lang/PL-M/Nested-function b/Lang/PL-M/Nested-function deleted file mode 120000 index 2fbc4399dd..0000000000 --- a/Lang/PL-M/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/PL-M \ No newline at end of file diff --git a/Lang/PL-M/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/PL-M/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/PL-M/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/PL-M/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/PL-M/Super-d-numbers b/Lang/PL-M/Super-d-numbers deleted file mode 120000 index bb5c98f089..0000000000 --- a/Lang/PL-M/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/PL-M \ No newline at end of file diff --git a/Lang/PL-M/The-Twelve-Days-of-Christmas b/Lang/PL-M/The-Twelve-Days-of-Christmas deleted file mode 120000 index a94c814e99..0000000000 --- a/Lang/PL-M/The-Twelve-Days-of-Christmas +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Twelve-Days-of-Christmas/PL-M \ No newline at end of file diff --git a/Lang/PL-M/Zeckendorf-number-representation b/Lang/PL-M/Zeckendorf-number-representation deleted file mode 120000 index 3d48575a07..0000000000 --- a/Lang/PL-M/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/PL-M \ No newline at end of file diff --git a/Lang/POV-Ray/Bitmap b/Lang/POV-Ray/Bitmap deleted file mode 120000 index 90fece7e75..0000000000 --- a/Lang/POV-Ray/Bitmap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap/POV-Ray \ No newline at end of file diff --git a/Lang/POV-Ray/Maze-generation b/Lang/POV-Ray/Maze-generation deleted file mode 120000 index 724f710098..0000000000 --- a/Lang/POV-Ray/Maze-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maze-generation/POV-Ray \ No newline at end of file diff --git a/Lang/PROMAL/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/PROMAL/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/PROMAL/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/PROMAL/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Pascal-P/00-LANG.txt b/Lang/Pascal-P/00-LANG.txt deleted file mode 100644 index ce87f461ab..0000000000 --- a/Lang/Pascal-P/00-LANG.txt +++ /dev/null @@ -1,23 +0,0 @@ -{{language|Pascal-P -|exec=bytecode -|strength=strong -|safety=safe -|express=explicit -|checking=static -|parampass=both -|gc=no -|LCT=yes -}}{{language programming paradigm|Procedural}} - -{{implementation|Pascal}}{{Compiler}} - -'''Pascal-P''' is a renowned [[:Category:Pascal|Pascal]] compiler designed to generate [[bytecode]], known as ''p-code'', and interpret the resulting code. The compilers and interpreters of Pascal-P are developed using the Pascal programming language. - -Originally developed in Zurich in 1973, the earliest iteration of Pascal-P, known as Pascal-P1, laid the foundation for subsequent versions, including P2, P3, and P4. While versions P1 and P3 are no longer accessible, P2 is still readily available and has notably served as the base for the UCSD system. Furthermore, there exist derivative versions, such as P5 and P6, which have evolved from the core Pascal-P compiler. - -Notably, Pascal-P is heralded for its portability, as it is capable of generating code suitable for a hypothetical stack computer system. This feature enhances its versatility and applicability across various platforms and environments. Additionally, Pascal-P has made significant contributions to the realm of education, often being utilized as an educational tool to impart knowledge and foster learning in the field of computer programming. - -== External links == -* [http://pascal.hansotten.com/niklaus-wirth/px-compilers Px compilers] on [http://pascal.hansotten.com/ Pascal for small machines] -* [https://sourceforge.net/projects/pascalp4/ Scott Moore's version of P4] The package includes crucial components essential for program execution on the MS-DOS platform - the compiler and the p-code interpreter executables. -* [https://www.moorecad.com/standardpascal/p4.html The P4 compiler] on [https://www.moorecad.com/ Scott Moore's page] \ No newline at end of file diff --git a/Lang/Pascal-P/00-META.yaml b/Lang/Pascal-P/00-META.yaml deleted file mode 100644 index 5af4159a1f..0000000000 --- a/Lang/Pascal-P/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Pascal-P diff --git a/Lang/Pascal-P/Abundant-deficient-and-perfect-number-classifications b/Lang/Pascal-P/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index 248c55dcbd..0000000000 --- a/Lang/Pascal-P/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Abundant-odd-numbers b/Lang/Pascal-P/Abundant-odd-numbers deleted file mode 120000 index 745698036f..0000000000 --- a/Lang/Pascal-P/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Angle-difference-between-two-bearings b/Lang/Pascal-P/Angle-difference-between-two-bearings deleted file mode 120000 index 506fbb7a95..0000000000 --- a/Lang/Pascal-P/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Anti-primes b/Lang/Pascal-P/Anti-primes deleted file mode 120000 index fe2e4f4a10..0000000000 --- a/Lang/Pascal-P/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Arithmetic-numbers b/Lang/Pascal-P/Arithmetic-numbers deleted file mode 120000 index 3ad1b31145..0000000000 --- a/Lang/Pascal-P/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Bell-numbers b/Lang/Pascal-P/Bell-numbers deleted file mode 120000 index fccbe75006..0000000000 --- a/Lang/Pascal-P/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Brazilian-numbers b/Lang/Pascal-P/Brazilian-numbers deleted file mode 120000 index f79a88ea27..0000000000 --- a/Lang/Pascal-P/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/CUSIP b/Lang/Pascal-P/CUSIP deleted file mode 120000 index 3a5ce6c0b7..0000000000 --- a/Lang/Pascal-P/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Catalan-numbers b/Lang/Pascal-P/Catalan-numbers deleted file mode 120000 index 9dee46f2ca..0000000000 --- a/Lang/Pascal-P/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Cistercian-numerals b/Lang/Pascal-P/Cistercian-numerals deleted file mode 120000 index 3169bb4737..0000000000 --- a/Lang/Pascal-P/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Day-of-the-week b/Lang/Pascal-P/Day-of-the-week deleted file mode 120000 index 04c1bf395c..0000000000 --- a/Lang/Pascal-P/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Diversity-prediction-theorem b/Lang/Pascal-P/Diversity-prediction-theorem deleted file mode 120000 index 1c77b9f4a8..0000000000 --- a/Lang/Pascal-P/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Dot-product b/Lang/Pascal-P/Dot-product deleted file mode 120000 index 1354e110a2..0000000000 --- a/Lang/Pascal-P/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Ethiopian-multiplication b/Lang/Pascal-P/Ethiopian-multiplication deleted file mode 120000 index cf25f4fb51..0000000000 --- a/Lang/Pascal-P/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Factors-of-an-integer b/Lang/Pascal-P/Factors-of-an-integer deleted file mode 120000 index db1f886bee..0000000000 --- a/Lang/Pascal-P/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/FizzBuzz b/Lang/Pascal-P/FizzBuzz deleted file mode 120000 index 8d0c857c1d..0000000000 --- a/Lang/Pascal-P/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Gamma-function b/Lang/Pascal-P/Gamma-function deleted file mode 120000 index b35d39ded3..0000000000 --- a/Lang/Pascal-P/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Generate-lower-case-ASCII-alphabet b/Lang/Pascal-P/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 54db5eb4c2..0000000000 --- a/Lang/Pascal-P/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Horners-rule-for-polynomial-evaluation b/Lang/Pascal-P/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 1bf2158b09..0000000000 --- a/Lang/Pascal-P/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Josephus-problem b/Lang/Pascal-P/Josephus-problem deleted file mode 120000 index ee86f2f03c..0000000000 --- a/Lang/Pascal-P/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Leap-year b/Lang/Pascal-P/Leap-year deleted file mode 120000 index e7c0275cd7..0000000000 --- a/Lang/Pascal-P/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Leonardo-numbers b/Lang/Pascal-P/Leonardo-numbers deleted file mode 120000 index 33730eb927..0000000000 --- a/Lang/Pascal-P/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Levenshtein-distance b/Lang/Pascal-P/Levenshtein-distance deleted file mode 120000 index 369c4fda51..0000000000 --- a/Lang/Pascal-P/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Long-year b/Lang/Pascal-P/Long-year deleted file mode 120000 index 4a8c200f91..0000000000 --- a/Lang/Pascal-P/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/M-bius-function b/Lang/Pascal-P/M-bius-function deleted file mode 120000 index 5ac8d7d007..0000000000 --- a/Lang/Pascal-P/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Magic-constant b/Lang/Pascal-P/Magic-constant deleted file mode 120000 index d71a46b136..0000000000 --- a/Lang/Pascal-P/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Map-range b/Lang/Pascal-P/Map-range deleted file mode 120000 index ecc77d75f6..0000000000 --- a/Lang/Pascal-P/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Multifactorial b/Lang/Pascal-P/Multifactorial deleted file mode 120000 index 3a5245db30..0000000000 --- a/Lang/Pascal-P/Multifactorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multifactorial/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Periodic-table b/Lang/Pascal-P/Periodic-table deleted file mode 120000 index d1e817f294..0000000000 --- a/Lang/Pascal-P/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Prime-decomposition b/Lang/Pascal-P/Prime-decomposition deleted file mode 120000 index b9ce930a04..0000000000 --- a/Lang/Pascal-P/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Ramer-Douglas-Peucker-line-simplification b/Lang/Pascal-P/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index 41e4d1e47d..0000000000 --- a/Lang/Pascal-P/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Square-free-integers b/Lang/Pascal-P/Square-free-integers deleted file mode 120000 index 011a7d78bb..0000000000 --- a/Lang/Pascal-P/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal-P/Tau-number b/Lang/Pascal-P/Tau-number deleted file mode 120000 index 23629ebb6c..0000000000 --- a/Lang/Pascal-P/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Pascal-P \ No newline at end of file diff --git a/Lang/Pascal/Abundant-odd-numbers b/Lang/Pascal/Abundant-odd-numbers new file mode 120000 index 0000000000..b58a9a885b --- /dev/null +++ b/Lang/Pascal/Abundant-odd-numbers @@ -0,0 +1 @@ +../../Task/Abundant-odd-numbers/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Bell-numbers b/Lang/Pascal/Bell-numbers new file mode 120000 index 0000000000..c4ab57da43 --- /dev/null +++ b/Lang/Pascal/Bell-numbers @@ -0,0 +1 @@ +../../Task/Bell-numbers/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Bioinformatics-base-count b/Lang/Pascal/Bioinformatics-base-count new file mode 120000 index 0000000000..97aaee2dbb --- /dev/null +++ b/Lang/Pascal/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Brazilian-numbers b/Lang/Pascal/Brazilian-numbers new file mode 120000 index 0000000000..152f3a22d2 --- /dev/null +++ b/Lang/Pascal/Brazilian-numbers @@ -0,0 +1 @@ +../../Task/Brazilian-numbers/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Count-the-coins b/Lang/Pascal/Count-the-coins deleted file mode 120000 index 8d7999b667..0000000000 --- a/Lang/Pascal/Count-the-coins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-the-coins/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Date-manipulation b/Lang/Pascal/Date-manipulation deleted file mode 120000 index 9edece533b..0000000000 --- a/Lang/Pascal/Date-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-manipulation/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Ethiopian-multiplication b/Lang/Pascal/Ethiopian-multiplication new file mode 120000 index 0000000000..53e5b905d2 --- /dev/null +++ b/Lang/Pascal/Ethiopian-multiplication @@ -0,0 +1 @@ +../../Task/Ethiopian-multiplication/Pascal \ No newline at end of file diff --git a/Lang/Pascal/FizzBuzz b/Lang/Pascal/FizzBuzz new file mode 120000 index 0000000000..786dae3647 --- /dev/null +++ b/Lang/Pascal/FizzBuzz @@ -0,0 +1 @@ +../../Task/FizzBuzz/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Gamma-function b/Lang/Pascal/Gamma-function new file mode 120000 index 0000000000..f83dad18cb --- /dev/null +++ b/Lang/Pascal/Gamma-function @@ -0,0 +1 @@ +../../Task/Gamma-function/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Leap-year b/Lang/Pascal/Leap-year new file mode 120000 index 0000000000..5eb674ed97 --- /dev/null +++ b/Lang/Pascal/Leap-year @@ -0,0 +1 @@ +../../Task/Leap-year/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Levenshtein-distance b/Lang/Pascal/Levenshtein-distance new file mode 120000 index 0000000000..aa9f13dc0f --- /dev/null +++ b/Lang/Pascal/Levenshtein-distance @@ -0,0 +1 @@ +../../Task/Levenshtein-distance/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Map-range b/Lang/Pascal/Map-range new file mode 120000 index 0000000000..71c05c40ec --- /dev/null +++ b/Lang/Pascal/Map-range @@ -0,0 +1 @@ +../../Task/Map-range/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Prime-decomposition b/Lang/Pascal/Prime-decomposition new file mode 120000 index 0000000000..7b392e005f --- /dev/null +++ b/Lang/Pascal/Prime-decomposition @@ -0,0 +1 @@ +../../Task/Prime-decomposition/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Pascal/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Pascal/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Pascal/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Pascal/Sorting-Algorithms-Circle-Sort b/Lang/Pascal/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..3100a6716d --- /dev/null +++ b/Lang/Pascal/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Pascal \ No newline at end of file diff --git a/Lang/Pascal/Square-free-integers b/Lang/Pascal/Square-free-integers new file mode 120000 index 0000000000..874a24625c --- /dev/null +++ b/Lang/Pascal/Square-free-integers @@ -0,0 +1 @@ +../../Task/Square-free-integers/Pascal \ No newline at end of file diff --git a/Lang/PascalABC.NET/00-LANG.txt b/Lang/PascalABC.NET/00-LANG.txt index 7f652b8be9..d9efe4d43e 100644 --- a/Lang/PascalABC.NET/00-LANG.txt +++ b/Lang/PascalABC.NET/00-LANG.txt @@ -1,4 +1,4 @@ -{{language|site=https://pascalabc.net/en/}} +{{language|PascalABC.NET}} {{implementation|Pascal}} PascalABC.NET is the new generation Pascal programming language that combines simplicity of classic Pascal, a great number of modern extensions and broad capabilities of Microsoft .NET Framework. @@ -16,5 +16,4 @@ begin end. -==Tasks not implemented in PascalABC.NET== -[[Tasks not implemented in PascalABC.NET]] \ No newline at end of file +{{unimpl_Page|PacalABC.NET}} \ No newline at end of file diff --git a/Lang/PascalABC.NET/100-doors b/Lang/PascalABC.NET/100-doors new file mode 120000 index 0000000000..ba816799a0 --- /dev/null +++ b/Lang/PascalABC.NET/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/15-puzzle-game b/Lang/PascalABC.NET/15-puzzle-game deleted file mode 120000 index caf890e56b..0000000000 --- a/Lang/PascalABC.NET/15-puzzle-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-game/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/15-puzzle-solver b/Lang/PascalABC.NET/15-puzzle-solver deleted file mode 120000 index 73063f2237..0000000000 --- a/Lang/PascalABC.NET/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/99-bottles-of-beer b/Lang/PascalABC.NET/99-bottles-of-beer deleted file mode 120000 index bc29442ab5..0000000000 --- a/Lang/PascalABC.NET/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/A+B b/Lang/PascalABC.NET/A+B deleted file mode 120000 index 7a5a9db498..0000000000 --- a/Lang/PascalABC.NET/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Abbreviations-easy b/Lang/PascalABC.NET/Abbreviations-easy deleted file mode 120000 index ea782fa0b0..0000000000 --- a/Lang/PascalABC.NET/Abbreviations-easy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-easy/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Abbreviations-simple b/Lang/PascalABC.NET/Abbreviations-simple deleted file mode 120000 index abc650feac..0000000000 --- a/Lang/PascalABC.NET/Abbreviations-simple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-simple/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Abstract-type b/Lang/PascalABC.NET/Abstract-type deleted file mode 120000 index 305270825e..0000000000 --- a/Lang/PascalABC.NET/Abstract-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abstract-type/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Accumulator-factory b/Lang/PascalABC.NET/Accumulator-factory deleted file mode 120000 index dd94a031d6..0000000000 --- a/Lang/PascalABC.NET/Accumulator-factory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Accumulator-factory/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Ackermann-function b/Lang/PascalABC.NET/Ackermann-function deleted file mode 120000 index c2fa2dd278..0000000000 --- a/Lang/PascalABC.NET/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Add-a-variable-to-a-class-instance-at-runtime b/Lang/PascalABC.NET/Add-a-variable-to-a-class-instance-at-runtime deleted file mode 120000 index ec0970f459..0000000000 --- a/Lang/PascalABC.NET/Add-a-variable-to-a-class-instance-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Add-a-variable-to-a-class-instance-at-runtime/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Additive-primes b/Lang/PascalABC.NET/Additive-primes deleted file mode 120000 index 0022732e2e..0000000000 --- a/Lang/PascalABC.NET/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Address-of-a-variable b/Lang/PascalABC.NET/Address-of-a-variable deleted file mode 120000 index 8477592c7b..0000000000 --- a/Lang/PascalABC.NET/Address-of-a-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Address-of-a-variable/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Amicable-pairs b/Lang/PascalABC.NET/Amicable-pairs deleted file mode 120000 index e8f5a09925..0000000000 --- a/Lang/PascalABC.NET/Amicable-pairs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amicable-pairs/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Anagrams b/Lang/PascalABC.NET/Anagrams deleted file mode 120000 index 2bec53abb4..0000000000 --- a/Lang/PascalABC.NET/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Angle-difference-between-two-bearings b/Lang/PascalABC.NET/Angle-difference-between-two-bearings deleted file mode 120000 index a9e8619c23..0000000000 --- a/Lang/PascalABC.NET/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Angles-geometric-normalization-and-conversion b/Lang/PascalABC.NET/Angles-geometric-normalization-and-conversion deleted file mode 120000 index 27c57b8ea0..0000000000 --- a/Lang/PascalABC.NET/Angles-geometric-normalization-and-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angles-geometric-normalization-and-conversion/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Anonymous-recursion b/Lang/PascalABC.NET/Anonymous-recursion deleted file mode 120000 index 7a2a34d4d5..0000000000 --- a/Lang/PascalABC.NET/Anonymous-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anonymous-recursion/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Anti-primes b/Lang/PascalABC.NET/Anti-primes deleted file mode 120000 index 0107c4a2bb..0000000000 --- a/Lang/PascalABC.NET/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Apply-a-callback-to-an-array b/Lang/PascalABC.NET/Apply-a-callback-to-an-array deleted file mode 120000 index 88f34b5a9e..0000000000 --- a/Lang/PascalABC.NET/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Approximate-equality b/Lang/PascalABC.NET/Approximate-equality deleted file mode 120000 index 9d80191945..0000000000 --- a/Lang/PascalABC.NET/Approximate-equality +++ /dev/null @@ -1 +0,0 @@ -../../Task/Approximate-equality/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Arbitrary-precision-integers-included- b/Lang/PascalABC.NET/Arbitrary-precision-integers-included- deleted file mode 120000 index 8e9998f39e..0000000000 --- a/Lang/PascalABC.NET/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Archimedean-spiral b/Lang/PascalABC.NET/Archimedean-spiral deleted file mode 120000 index 8c791b5144..0000000000 --- a/Lang/PascalABC.NET/Archimedean-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Archimedean-spiral/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Arithmetic-Complex b/Lang/PascalABC.NET/Arithmetic-Complex deleted file mode 120000 index bccd03a873..0000000000 --- a/Lang/PascalABC.NET/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Arithmetic-Integer b/Lang/PascalABC.NET/Arithmetic-Integer deleted file mode 120000 index 30d5138cbd..0000000000 --- a/Lang/PascalABC.NET/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Arithmetic-Rational b/Lang/PascalABC.NET/Arithmetic-Rational deleted file mode 120000 index e1c3c085b7..0000000000 --- a/Lang/PascalABC.NET/Arithmetic-Rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Rational/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Arithmetic-evaluation b/Lang/PascalABC.NET/Arithmetic-evaluation deleted file mode 120000 index 816270d1cc..0000000000 --- a/Lang/PascalABC.NET/Arithmetic-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-evaluation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Arithmetic-geometric-mean b/Lang/PascalABC.NET/Arithmetic-geometric-mean deleted file mode 120000 index de68d8badc..0000000000 --- a/Lang/PascalABC.NET/Arithmetic-geometric-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Arithmetic-numbers b/Lang/PascalABC.NET/Arithmetic-numbers deleted file mode 120000 index 91fbd5c07a..0000000000 --- a/Lang/PascalABC.NET/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Array-concatenation b/Lang/PascalABC.NET/Array-concatenation deleted file mode 120000 index bfe26798bc..0000000000 --- a/Lang/PascalABC.NET/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Arrays b/Lang/PascalABC.NET/Arrays deleted file mode 120000 index 62dfb07030..0000000000 --- a/Lang/PascalABC.NET/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Ascending-primes b/Lang/PascalABC.NET/Ascending-primes deleted file mode 120000 index 764168a0be..0000000000 --- a/Lang/PascalABC.NET/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Assertions b/Lang/PascalABC.NET/Assertions deleted file mode 120000 index bdc3ed57c2..0000000000 --- a/Lang/PascalABC.NET/Assertions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Assertions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Associative-array-Creation b/Lang/PascalABC.NET/Associative-array-Creation deleted file mode 120000 index fc1bef5cdb..0000000000 --- a/Lang/PascalABC.NET/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Associative-array-Iteration b/Lang/PascalABC.NET/Associative-array-Iteration deleted file mode 120000 index 2f1ab21d84..0000000000 --- a/Lang/PascalABC.NET/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Associative-array-Merging b/Lang/PascalABC.NET/Associative-array-Merging deleted file mode 120000 index debbdc2521..0000000000 --- a/Lang/PascalABC.NET/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Attractive-numbers b/Lang/PascalABC.NET/Attractive-numbers deleted file mode 120000 index 974a121495..0000000000 --- a/Lang/PascalABC.NET/Attractive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Attractive-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Averages-Arithmetic-mean b/Lang/PascalABC.NET/Averages-Arithmetic-mean deleted file mode 120000 index c13a81b3d2..0000000000 --- a/Lang/PascalABC.NET/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Averages-Mean-angle b/Lang/PascalABC.NET/Averages-Mean-angle deleted file mode 120000 index 1138410560..0000000000 --- a/Lang/PascalABC.NET/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Averages-Median b/Lang/PascalABC.NET/Averages-Median deleted file mode 120000 index 3e861f57c5..0000000000 --- a/Lang/PascalABC.NET/Averages-Median +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Median/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Averages-Mode b/Lang/PascalABC.NET/Averages-Mode deleted file mode 120000 index 73a256bfd8..0000000000 --- a/Lang/PascalABC.NET/Averages-Mode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mode/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Averages-Pythagorean-means b/Lang/PascalABC.NET/Averages-Pythagorean-means deleted file mode 120000 index d41041c28e..0000000000 --- a/Lang/PascalABC.NET/Averages-Pythagorean-means +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Pythagorean-means/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Averages-Root-mean-square b/Lang/PascalABC.NET/Averages-Root-mean-square deleted file mode 120000 index fcd93926c8..0000000000 --- a/Lang/PascalABC.NET/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Babbage-problem b/Lang/PascalABC.NET/Babbage-problem deleted file mode 120000 index 0c9b0d20ea..0000000000 --- a/Lang/PascalABC.NET/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Balanced-brackets b/Lang/PascalABC.NET/Balanced-brackets deleted file mode 120000 index 4b5678c4d8..0000000000 --- a/Lang/PascalABC.NET/Balanced-brackets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-brackets/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Bifid-cipher b/Lang/PascalABC.NET/Bifid-cipher deleted file mode 120000 index b627ea6e1a..0000000000 --- a/Lang/PascalABC.NET/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Binary-digits b/Lang/PascalABC.NET/Binary-digits deleted file mode 120000 index e0597a5dc1..0000000000 --- a/Lang/PascalABC.NET/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Binary-search b/Lang/PascalABC.NET/Binary-search deleted file mode 120000 index aa5ba91c87..0000000000 --- a/Lang/PascalABC.NET/Binary-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-search/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Bitwise-operations b/Lang/PascalABC.NET/Bitwise-operations deleted file mode 120000 index acc6123f1c..0000000000 --- a/Lang/PascalABC.NET/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Break-OO-privacy b/Lang/PascalABC.NET/Break-OO-privacy deleted file mode 120000 index 29ee336925..0000000000 --- a/Lang/PascalABC.NET/Break-OO-privacy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Break-OO-privacy/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/CRC-32 b/Lang/PascalABC.NET/CRC-32 deleted file mode 120000 index dfed202f62..0000000000 --- a/Lang/PascalABC.NET/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/CSV-data-manipulation b/Lang/PascalABC.NET/CSV-data-manipulation deleted file mode 120000 index ab9f191d41..0000000000 --- a/Lang/PascalABC.NET/CSV-data-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/CSV-data-manipulation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/CUSIP b/Lang/PascalABC.NET/CUSIP deleted file mode 120000 index 1b4c6de901..0000000000 --- a/Lang/PascalABC.NET/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Caesar-cipher b/Lang/PascalABC.NET/Caesar-cipher deleted file mode 120000 index 7b80169afb..0000000000 --- a/Lang/PascalABC.NET/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Calculating-the-value-of-e b/Lang/PascalABC.NET/Calculating-the-value-of-e deleted file mode 120000 index c544f3c00f..0000000000 --- a/Lang/PascalABC.NET/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Calendar---for-REAL-programmers b/Lang/PascalABC.NET/Calendar---for-REAL-programmers deleted file mode 120000 index aa32b573de..0000000000 --- a/Lang/PascalABC.NET/Calendar---for-REAL-programmers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calendar---for-REAL-programmers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Call-an-object-method b/Lang/PascalABC.NET/Call-an-object-method deleted file mode 120000 index 0c1cf230d7..0000000000 --- a/Lang/PascalABC.NET/Call-an-object-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-an-object-method/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Cartesian-product-of-two-or-more-lists b/Lang/PascalABC.NET/Cartesian-product-of-two-or-more-lists deleted file mode 120000 index e9abacde8d..0000000000 --- a/Lang/PascalABC.NET/Cartesian-product-of-two-or-more-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cartesian-product-of-two-or-more-lists/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Case-sensitivity-of-identifiers b/Lang/PascalABC.NET/Case-sensitivity-of-identifiers deleted file mode 120000 index b0fc4ead7c..0000000000 --- a/Lang/PascalABC.NET/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Casting-out-nines b/Lang/PascalABC.NET/Casting-out-nines deleted file mode 120000 index 2635cd3c59..0000000000 --- a/Lang/PascalABC.NET/Casting-out-nines +++ /dev/null @@ -1 +0,0 @@ -../../Task/Casting-out-nines/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Catalan-numbers b/Lang/PascalABC.NET/Catalan-numbers deleted file mode 120000 index a970e535cd..0000000000 --- a/Lang/PascalABC.NET/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Catalan-numbers-Pascals-triangle b/Lang/PascalABC.NET/Catalan-numbers-Pascals-triangle deleted file mode 120000 index 47a30d7f38..0000000000 --- a/Lang/PascalABC.NET/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Catamorphism b/Lang/PascalABC.NET/Catamorphism deleted file mode 120000 index 4cd74052dd..0000000000 --- a/Lang/PascalABC.NET/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Character-codes b/Lang/PascalABC.NET/Character-codes deleted file mode 120000 index 1888f78c06..0000000000 --- a/Lang/PascalABC.NET/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Check-input-device-is-a-terminal b/Lang/PascalABC.NET/Check-input-device-is-a-terminal deleted file mode 120000 index 942e91ecc8..0000000000 --- a/Lang/PascalABC.NET/Check-input-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-input-device-is-a-terminal/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Check-output-device-is-a-terminal b/Lang/PascalABC.NET/Check-output-device-is-a-terminal deleted file mode 120000 index ddcd688824..0000000000 --- a/Lang/PascalABC.NET/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Check-that-file-exists b/Lang/PascalABC.NET/Check-that-file-exists deleted file mode 120000 index 8a6772fd4b..0000000000 --- a/Lang/PascalABC.NET/Check-that-file-exists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-that-file-exists/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Cheryls-birthday b/Lang/PascalABC.NET/Cheryls-birthday deleted file mode 120000 index a54346abfd..0000000000 --- a/Lang/PascalABC.NET/Cheryls-birthday +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cheryls-birthday/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Chinese-remainder-theorem b/Lang/PascalABC.NET/Chinese-remainder-theorem deleted file mode 120000 index 72e58e3a4a..0000000000 --- a/Lang/PascalABC.NET/Chinese-remainder-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-remainder-theorem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Chinese-zodiac b/Lang/PascalABC.NET/Chinese-zodiac deleted file mode 120000 index f7393d9042..0000000000 --- a/Lang/PascalABC.NET/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Cholesky-decomposition b/Lang/PascalABC.NET/Cholesky-decomposition deleted file mode 120000 index 35182d3cfc..0000000000 --- a/Lang/PascalABC.NET/Cholesky-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cholesky-decomposition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Chowla-numbers b/Lang/PascalABC.NET/Chowla-numbers deleted file mode 120000 index 556f1a6dfd..0000000000 --- a/Lang/PascalABC.NET/Chowla-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chowla-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Circular-primes b/Lang/PascalABC.NET/Circular-primes deleted file mode 120000 index 5224e07ad0..0000000000 --- a/Lang/PascalABC.NET/Circular-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Circular-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Classes b/Lang/PascalABC.NET/Classes deleted file mode 120000 index 08756ef03a..0000000000 --- a/Lang/PascalABC.NET/Classes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Classes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Closest-pair-problem b/Lang/PascalABC.NET/Closest-pair-problem deleted file mode 120000 index 4b7bc32806..0000000000 --- a/Lang/PascalABC.NET/Closest-pair-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closest-pair-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Closures-Value-capture b/Lang/PascalABC.NET/Closures-Value-capture deleted file mode 120000 index 428138cdfe..0000000000 --- a/Lang/PascalABC.NET/Closures-Value-capture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closures-Value-capture/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Collections b/Lang/PascalABC.NET/Collections deleted file mode 120000 index c3fa3dc417..0000000000 --- a/Lang/PascalABC.NET/Collections +++ /dev/null @@ -1 +0,0 @@ -../../Task/Collections/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Color-of-a-screen-pixel b/Lang/PascalABC.NET/Color-of-a-screen-pixel deleted file mode 120000 index 45582746a3..0000000000 --- a/Lang/PascalABC.NET/Color-of-a-screen-pixel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-of-a-screen-pixel/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Color-wheel b/Lang/PascalABC.NET/Color-wheel deleted file mode 120000 index ea27bb369f..0000000000 --- a/Lang/PascalABC.NET/Color-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-wheel/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Colour-bars-Display b/Lang/PascalABC.NET/Colour-bars-Display deleted file mode 120000 index e504c543a7..0000000000 --- a/Lang/PascalABC.NET/Colour-bars-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-bars-Display/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Colour-pinstripe-Display b/Lang/PascalABC.NET/Colour-pinstripe-Display deleted file mode 120000 index c9febd7d37..0000000000 --- a/Lang/PascalABC.NET/Colour-pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-pinstripe-Display/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Combinations b/Lang/PascalABC.NET/Combinations deleted file mode 120000 index fad981495d..0000000000 --- a/Lang/PascalABC.NET/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Combinations-with-repetitions b/Lang/PascalABC.NET/Combinations-with-repetitions deleted file mode 120000 index f75050c914..0000000000 --- a/Lang/PascalABC.NET/Combinations-with-repetitions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations-with-repetitions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Command-line-arguments b/Lang/PascalABC.NET/Command-line-arguments deleted file mode 120000 index f229191025..0000000000 --- a/Lang/PascalABC.NET/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Comments b/Lang/PascalABC.NET/Comments deleted file mode 120000 index 5e528e6991..0000000000 --- a/Lang/PascalABC.NET/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Compare-a-list-of-strings b/Lang/PascalABC.NET/Compare-a-list-of-strings deleted file mode 120000 index b8b040023f..0000000000 --- a/Lang/PascalABC.NET/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Compare-length-of-two-strings b/Lang/PascalABC.NET/Compare-length-of-two-strings deleted file mode 120000 index 92be62a3df..0000000000 --- a/Lang/PascalABC.NET/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Compile-time-calculation b/Lang/PascalABC.NET/Compile-time-calculation deleted file mode 120000 index aa6140bdc4..0000000000 --- a/Lang/PascalABC.NET/Compile-time-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compile-time-calculation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k b/Lang/PascalABC.NET/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k deleted file mode 120000 index 54d237d7ab..0000000000 --- a/Lang/PascalABC.NET/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k +++ /dev/null @@ -1 +0,0 @@ -../../Task/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Compound-data-type b/Lang/PascalABC.NET/Compound-data-type deleted file mode 120000 index 89ad664595..0000000000 --- a/Lang/PascalABC.NET/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Concurrent-computing b/Lang/PascalABC.NET/Concurrent-computing deleted file mode 120000 index ced9fcccc5..0000000000 --- a/Lang/PascalABC.NET/Concurrent-computing +++ /dev/null @@ -1 +0,0 @@ -../../Task/Concurrent-computing/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Conditional-structures b/Lang/PascalABC.NET/Conditional-structures deleted file mode 120000 index 6186fdd1f8..0000000000 --- a/Lang/PascalABC.NET/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Constrained-genericity b/Lang/PascalABC.NET/Constrained-genericity deleted file mode 120000 index 4d89cf348d..0000000000 --- a/Lang/PascalABC.NET/Constrained-genericity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Constrained-genericity/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Constrained-random-points-on-a-circle b/Lang/PascalABC.NET/Constrained-random-points-on-a-circle deleted file mode 120000 index 5d3f518fc9..0000000000 --- a/Lang/PascalABC.NET/Constrained-random-points-on-a-circle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Constrained-random-points-on-a-circle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Continued-fraction b/Lang/PascalABC.NET/Continued-fraction deleted file mode 120000 index f6f45a7af5..0000000000 --- a/Lang/PascalABC.NET/Continued-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Continued-fraction-Arithmetic-Construct-from-rational-number b/Lang/PascalABC.NET/Continued-fraction-Arithmetic-Construct-from-rational-number deleted file mode 120000 index 2bab87463d..0000000000 --- a/Lang/PascalABC.NET/Continued-fraction-Arithmetic-Construct-from-rational-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-Construct-from-rational-number/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Convert-decimal-number-to-rational b/Lang/PascalABC.NET/Convert-decimal-number-to-rational deleted file mode 120000 index 7827892fb4..0000000000 --- a/Lang/PascalABC.NET/Convert-decimal-number-to-rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-decimal-number-to-rational/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Copy-a-string b/Lang/PascalABC.NET/Copy-a-string deleted file mode 120000 index d102da9b43..0000000000 --- a/Lang/PascalABC.NET/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Copy-stdin-to-stdout b/Lang/PascalABC.NET/Copy-stdin-to-stdout deleted file mode 120000 index 08f7b00296..0000000000 --- a/Lang/PascalABC.NET/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Count-in-factors b/Lang/PascalABC.NET/Count-in-factors deleted file mode 120000 index 42811aa9aa..0000000000 --- a/Lang/PascalABC.NET/Count-in-factors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-factors/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Count-in-octal b/Lang/PascalABC.NET/Count-in-octal deleted file mode 120000 index 8965e8c25f..0000000000 --- a/Lang/PascalABC.NET/Count-in-octal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-octal/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Count-occurrences-of-a-substring b/Lang/PascalABC.NET/Count-occurrences-of-a-substring deleted file mode 120000 index d67adab506..0000000000 --- a/Lang/PascalABC.NET/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Count-the-coins b/Lang/PascalABC.NET/Count-the-coins deleted file mode 120000 index 43a4fdb837..0000000000 --- a/Lang/PascalABC.NET/Count-the-coins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-the-coins/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Create-a-file b/Lang/PascalABC.NET/Create-a-file deleted file mode 120000 index 5f3fa97f14..0000000000 --- a/Lang/PascalABC.NET/Create-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Create-a-two-dimensional-array-at-runtime b/Lang/PascalABC.NET/Create-a-two-dimensional-array-at-runtime deleted file mode 120000 index 2c7befc65f..0000000000 --- a/Lang/PascalABC.NET/Create-a-two-dimensional-array-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-two-dimensional-array-at-runtime/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Create-an-object-at-a-given-address b/Lang/PascalABC.NET/Create-an-object-at-a-given-address deleted file mode 120000 index aa2e5f2ab2..0000000000 --- a/Lang/PascalABC.NET/Create-an-object-at-a-given-address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-object-at-a-given-address/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Cuban-primes b/Lang/PascalABC.NET/Cuban-primes deleted file mode 120000 index 844ac15cb4..0000000000 --- a/Lang/PascalABC.NET/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Cullen-and-Woodall-numbers b/Lang/PascalABC.NET/Cullen-and-Woodall-numbers deleted file mode 120000 index 714083d23b..0000000000 --- a/Lang/PascalABC.NET/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Cumulative-standard-deviation b/Lang/PascalABC.NET/Cumulative-standard-deviation deleted file mode 120000 index b6ef0ab016..0000000000 --- a/Lang/PascalABC.NET/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Currency b/Lang/PascalABC.NET/Currency deleted file mode 120000 index 2017d69d57..0000000000 --- a/Lang/PascalABC.NET/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Curzon-numbers b/Lang/PascalABC.NET/Curzon-numbers deleted file mode 120000 index 13437cd157..0000000000 --- a/Lang/PascalABC.NET/Curzon-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Curzon-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/DNS-query b/Lang/PascalABC.NET/DNS-query deleted file mode 120000 index 52bda8e0aa..0000000000 --- a/Lang/PascalABC.NET/DNS-query +++ /dev/null @@ -1 +0,0 @@ -../../Task/DNS-query/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Damm-algorithm b/Lang/PascalABC.NET/Damm-algorithm deleted file mode 120000 index 6fee5b0ddc..0000000000 --- a/Lang/PascalABC.NET/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Date-format b/Lang/PascalABC.NET/Date-format deleted file mode 120000 index 176b256586..0000000000 --- a/Lang/PascalABC.NET/Date-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-format/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Day-of-the-week b/Lang/PascalABC.NET/Day-of-the-week deleted file mode 120000 index 3300b037b4..0000000000 --- a/Lang/PascalABC.NET/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Deceptive-numbers b/Lang/PascalABC.NET/Deceptive-numbers deleted file mode 120000 index 007d2d649c..0000000000 --- a/Lang/PascalABC.NET/Deceptive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deceptive-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Deconvolution-1D b/Lang/PascalABC.NET/Deconvolution-1D deleted file mode 120000 index 9604235c77..0000000000 --- a/Lang/PascalABC.NET/Deconvolution-1D +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-1D/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Define-a-primitive-data-type b/Lang/PascalABC.NET/Define-a-primitive-data-type deleted file mode 120000 index 684571f697..0000000000 --- a/Lang/PascalABC.NET/Define-a-primitive-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Define-a-primitive-data-type/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Demings-funnel b/Lang/PascalABC.NET/Demings-funnel deleted file mode 120000 index 0255de8e51..0000000000 --- a/Lang/PascalABC.NET/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Department-numbers b/Lang/PascalABC.NET/Department-numbers deleted file mode 120000 index 1b068d9b34..0000000000 --- a/Lang/PascalABC.NET/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Descending-primes b/Lang/PascalABC.NET/Descending-primes deleted file mode 120000 index 5641c47c94..0000000000 --- a/Lang/PascalABC.NET/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Detect-division-by-zero b/Lang/PascalABC.NET/Detect-division-by-zero deleted file mode 120000 index a843cd631e..0000000000 --- a/Lang/PascalABC.NET/Detect-division-by-zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Detect-division-by-zero/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Determine-if-a-string-has-all-the-same-characters b/Lang/PascalABC.NET/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index bb838a1f25..0000000000 --- a/Lang/PascalABC.NET/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Determine-if-a-string-has-all-unique-characters b/Lang/PascalABC.NET/Determine-if-a-string-has-all-unique-characters deleted file mode 120000 index 7c66082879..0000000000 --- a/Lang/PascalABC.NET/Determine-if-a-string-has-all-unique-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-unique-characters/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Determine-if-a-string-is-collapsible b/Lang/PascalABC.NET/Determine-if-a-string-is-collapsible deleted file mode 120000 index d22cc466fc..0000000000 --- a/Lang/PascalABC.NET/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Determine-if-a-string-is-numeric b/Lang/PascalABC.NET/Determine-if-a-string-is-numeric deleted file mode 120000 index 3ddeb93c61..0000000000 --- a/Lang/PascalABC.NET/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Determine-sentence-type b/Lang/PascalABC.NET/Determine-sentence-type deleted file mode 120000 index dc0284a0e0..0000000000 --- a/Lang/PascalABC.NET/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Dice-game-probabilities b/Lang/PascalABC.NET/Dice-game-probabilities deleted file mode 120000 index e5f12572e0..0000000000 --- a/Lang/PascalABC.NET/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Digital-root b/Lang/PascalABC.NET/Digital-root deleted file mode 120000 index 2ade97cd7d..0000000000 --- a/Lang/PascalABC.NET/Digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Digital-root-Multiplicative-digital-root b/Lang/PascalABC.NET/Digital-root-Multiplicative-digital-root deleted file mode 120000 index 3dcbce4c26..0000000000 --- a/Lang/PascalABC.NET/Digital-root-Multiplicative-digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root-Multiplicative-digital-root/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Dijkstras-algorithm b/Lang/PascalABC.NET/Dijkstras-algorithm deleted file mode 120000 index d9c1782412..0000000000 --- a/Lang/PascalABC.NET/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Dinesmans-multiple-dwelling-problem b/Lang/PascalABC.NET/Dinesmans-multiple-dwelling-problem deleted file mode 120000 index b9659a07e6..0000000000 --- a/Lang/PascalABC.NET/Dinesmans-multiple-dwelling-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dinesmans-multiple-dwelling-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Disarium-numbers b/Lang/PascalABC.NET/Disarium-numbers deleted file mode 120000 index 25866ae831..0000000000 --- a/Lang/PascalABC.NET/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Distribution-of-0-digits-in-factorial-series b/Lang/PascalABC.NET/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index f8efbe37d1..0000000000 --- a/Lang/PascalABC.NET/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Diversity-prediction-theorem b/Lang/PascalABC.NET/Diversity-prediction-theorem deleted file mode 120000 index a1a0483997..0000000000 --- a/Lang/PascalABC.NET/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Doomsday-rule b/Lang/PascalABC.NET/Doomsday-rule deleted file mode 120000 index 4aed9db54a..0000000000 --- a/Lang/PascalABC.NET/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Dot-product b/Lang/PascalABC.NET/Dot-product deleted file mode 120000 index 75977e9d01..0000000000 --- a/Lang/PascalABC.NET/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Doubly-linked-list-Definition b/Lang/PascalABC.NET/Doubly-linked-list-Definition deleted file mode 120000 index f2561705cf..0000000000 --- a/Lang/PascalABC.NET/Doubly-linked-list-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Definition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Doubly-linked-list-Element-definition b/Lang/PascalABC.NET/Doubly-linked-list-Element-definition deleted file mode 120000 index 50c9d03e8c..0000000000 --- a/Lang/PascalABC.NET/Doubly-linked-list-Element-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Element-definition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Doubly-linked-list-Element-insertion b/Lang/PascalABC.NET/Doubly-linked-list-Element-insertion deleted file mode 120000 index 28af162224..0000000000 --- a/Lang/PascalABC.NET/Doubly-linked-list-Element-insertion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Element-insertion/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Doubly-linked-list-Traversal b/Lang/PascalABC.NET/Doubly-linked-list-Traversal deleted file mode 120000 index 9cc3d51b16..0000000000 --- a/Lang/PascalABC.NET/Doubly-linked-list-Traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Traversal/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Dragon-curve b/Lang/PascalABC.NET/Dragon-curve deleted file mode 120000 index 1a8a6239bd..0000000000 --- a/Lang/PascalABC.NET/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Draw-a-pixel b/Lang/PascalABC.NET/Draw-a-pixel deleted file mode 120000 index cdcb7e2918..0000000000 --- a/Lang/PascalABC.NET/Draw-a-pixel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-pixel/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Draw-a-rotating-cube b/Lang/PascalABC.NET/Draw-a-rotating-cube deleted file mode 120000 index 9092790488..0000000000 --- a/Lang/PascalABC.NET/Draw-a-rotating-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-rotating-cube/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Duffinian-numbers b/Lang/PascalABC.NET/Duffinian-numbers deleted file mode 120000 index ed0f087334..0000000000 --- a/Lang/PascalABC.NET/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Dutch-national-flag-problem b/Lang/PascalABC.NET/Dutch-national-flag-problem deleted file mode 120000 index 20b563dbd5..0000000000 --- a/Lang/PascalABC.NET/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Egyptian-division b/Lang/PascalABC.NET/Egyptian-division deleted file mode 120000 index d931ff8696..0000000000 --- a/Lang/PascalABC.NET/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Emirp-primes b/Lang/PascalABC.NET/Emirp-primes deleted file mode 120000 index 69e5f4d7f7..0000000000 --- a/Lang/PascalABC.NET/Emirp-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Emirp-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Empty-program b/Lang/PascalABC.NET/Empty-program deleted file mode 120000 index 9a2aa557cd..0000000000 --- a/Lang/PascalABC.NET/Empty-program +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-program/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Empty-string b/Lang/PascalABC.NET/Empty-string deleted file mode 120000 index 39d89b0e6b..0000000000 --- a/Lang/PascalABC.NET/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Entropy b/Lang/PascalABC.NET/Entropy deleted file mode 120000 index 792ccf7d2a..0000000000 --- a/Lang/PascalABC.NET/Entropy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Enumerations b/Lang/PascalABC.NET/Enumerations deleted file mode 120000 index 3fbeab7aac..0000000000 --- a/Lang/PascalABC.NET/Enumerations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enumerations/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Environment-variables b/Lang/PascalABC.NET/Environment-variables deleted file mode 120000 index a87e0f0eca..0000000000 --- a/Lang/PascalABC.NET/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Equal-prime-and-composite-sums b/Lang/PascalABC.NET/Equal-prime-and-composite-sums deleted file mode 120000 index e0ef8faaeb..0000000000 --- a/Lang/PascalABC.NET/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Equilibrium-index b/Lang/PascalABC.NET/Equilibrium-index deleted file mode 120000 index 1ebc161d1d..0000000000 --- a/Lang/PascalABC.NET/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Erd-s-Nicolas-numbers b/Lang/PascalABC.NET/Erd-s-Nicolas-numbers deleted file mode 120000 index 8d04b147b5..0000000000 --- a/Lang/PascalABC.NET/Erd-s-Nicolas-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Erd-s-Nicolas-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Ethiopian-multiplication b/Lang/PascalABC.NET/Ethiopian-multiplication deleted file mode 120000 index 225d8834fa..0000000000 --- a/Lang/PascalABC.NET/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Euclid-Mullin-sequence b/Lang/PascalABC.NET/Euclid-Mullin-sequence deleted file mode 120000 index c1a4f722c5..0000000000 --- a/Lang/PascalABC.NET/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Euler-method b/Lang/PascalABC.NET/Euler-method deleted file mode 120000 index d3b60b57ad..0000000000 --- a/Lang/PascalABC.NET/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Eulers-constant-0.5772... b/Lang/PascalABC.NET/Eulers-constant-0.5772... deleted file mode 120000 index 093c235349..0000000000 --- a/Lang/PascalABC.NET/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Eulers-identity b/Lang/PascalABC.NET/Eulers-identity deleted file mode 120000 index 05f2a3a1ec..0000000000 --- a/Lang/PascalABC.NET/Eulers-identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-identity/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Eulers-sum-of-powers-conjecture b/Lang/PascalABC.NET/Eulers-sum-of-powers-conjecture deleted file mode 120000 index a568356eba..0000000000 --- a/Lang/PascalABC.NET/Eulers-sum-of-powers-conjecture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-sum-of-powers-conjecture/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Evaluate-binomial-coefficients b/Lang/PascalABC.NET/Evaluate-binomial-coefficients deleted file mode 120000 index 6ad68ae41d..0000000000 --- a/Lang/PascalABC.NET/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Even-or-odd b/Lang/PascalABC.NET/Even-or-odd deleted file mode 120000 index 4191597943..0000000000 --- a/Lang/PascalABC.NET/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Events b/Lang/PascalABC.NET/Events deleted file mode 120000 index 75843719a2..0000000000 --- a/Lang/PascalABC.NET/Events +++ /dev/null @@ -1 +0,0 @@ -../../Task/Events/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Evolutionary-algorithm b/Lang/PascalABC.NET/Evolutionary-algorithm deleted file mode 120000 index bc9856dbc0..0000000000 --- a/Lang/PascalABC.NET/Evolutionary-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evolutionary-algorithm/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Exceptions b/Lang/PascalABC.NET/Exceptions deleted file mode 120000 index b4b7999bea..0000000000 --- a/Lang/PascalABC.NET/Exceptions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exceptions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Exceptions-Catch-an-exception-thrown-in-a-nested-call b/Lang/PascalABC.NET/Exceptions-Catch-an-exception-thrown-in-a-nested-call deleted file mode 120000 index 7cf9286a5e..0000000000 --- a/Lang/PascalABC.NET/Exceptions-Catch-an-exception-thrown-in-a-nested-call +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exceptions-Catch-an-exception-thrown-in-a-nested-call/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Execute-a-system-command b/Lang/PascalABC.NET/Execute-a-system-command deleted file mode 120000 index 7b3f5b40fe..0000000000 --- a/Lang/PascalABC.NET/Execute-a-system-command +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-a-system-command/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Exponentiation-order b/Lang/PascalABC.NET/Exponentiation-order deleted file mode 120000 index 7066d9dd6b..0000000000 --- a/Lang/PascalABC.NET/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Exponentiation-with-infix-operators-in-or-operating-on-the-base b/Lang/PascalABC.NET/Exponentiation-with-infix-operators-in-or-operating-on-the-base deleted file mode 120000 index cc33366128..0000000000 --- a/Lang/PascalABC.NET/Exponentiation-with-infix-operators-in-or-operating-on-the-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-with-infix-operators-in-or-operating-on-the-base/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Extend-your-language b/Lang/PascalABC.NET/Extend-your-language deleted file mode 120000 index ee51376fd1..0000000000 --- a/Lang/PascalABC.NET/Extend-your-language +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extend-your-language/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Extensible-prime-generator b/Lang/PascalABC.NET/Extensible-prime-generator deleted file mode 120000 index c255987252..0000000000 --- a/Lang/PascalABC.NET/Extensible-prime-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extensible-prime-generator/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Extreme-floating-point-values b/Lang/PascalABC.NET/Extreme-floating-point-values deleted file mode 120000 index 438be3c964..0000000000 --- a/Lang/PascalABC.NET/Extreme-floating-point-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extreme-floating-point-values/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Factorial b/Lang/PascalABC.NET/Factorial deleted file mode 120000 index 64716300fa..0000000000 --- a/Lang/PascalABC.NET/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Factorial-primes b/Lang/PascalABC.NET/Factorial-primes deleted file mode 120000 index 5b7eb12507..0000000000 --- a/Lang/PascalABC.NET/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Factorions b/Lang/PascalABC.NET/Factorions deleted file mode 120000 index 8d771f5a56..0000000000 --- a/Lang/PascalABC.NET/Factorions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Factors-of-a-Mersenne-number b/Lang/PascalABC.NET/Factors-of-a-Mersenne-number deleted file mode 120000 index 3160230a03..0000000000 --- a/Lang/PascalABC.NET/Factors-of-a-Mersenne-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-a-Mersenne-number/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Factors-of-an-integer b/Lang/PascalABC.NET/Factors-of-an-integer deleted file mode 120000 index b2f675ad56..0000000000 --- a/Lang/PascalABC.NET/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fairshare-between-two-and-more b/Lang/PascalABC.NET/Fairshare-between-two-and-more deleted file mode 120000 index c21d1ab427..0000000000 --- a/Lang/PascalABC.NET/Fairshare-between-two-and-more +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fairshare-between-two-and-more/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Farey-sequence b/Lang/PascalABC.NET/Farey-sequence deleted file mode 120000 index cd060f6fa5..0000000000 --- a/Lang/PascalABC.NET/Farey-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Farey-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fast-Fourier-transform b/Lang/PascalABC.NET/Fast-Fourier-transform deleted file mode 120000 index 2ebeb31f36..0000000000 --- a/Lang/PascalABC.NET/Fast-Fourier-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fast-Fourier-transform/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Feigenbaum-constant-calculation b/Lang/PascalABC.NET/Feigenbaum-constant-calculation deleted file mode 120000 index df0fd85992..0000000000 --- a/Lang/PascalABC.NET/Feigenbaum-constant-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Feigenbaum-constant-calculation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fermat-numbers b/Lang/PascalABC.NET/Fermat-numbers deleted file mode 120000 index 87303a8419..0000000000 --- a/Lang/PascalABC.NET/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fibonacci-word b/Lang/PascalABC.NET/Fibonacci-word deleted file mode 120000 index 6accc7df5c..0000000000 --- a/Lang/PascalABC.NET/Fibonacci-word +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-word/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fibonacci-word-fractal b/Lang/PascalABC.NET/Fibonacci-word-fractal deleted file mode 120000 index 32647433c7..0000000000 --- a/Lang/PascalABC.NET/Fibonacci-word-fractal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-word-fractal/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/File-input-output b/Lang/PascalABC.NET/File-input-output deleted file mode 120000 index aa29aa165d..0000000000 --- a/Lang/PascalABC.NET/File-input-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-input-output/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/File-modification-time b/Lang/PascalABC.NET/File-modification-time deleted file mode 120000 index f54091dc36..0000000000 --- a/Lang/PascalABC.NET/File-modification-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-modification-time/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/File-size b/Lang/PascalABC.NET/File-size deleted file mode 120000 index cb4f56c334..0000000000 --- a/Lang/PascalABC.NET/File-size +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-size/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Filter b/Lang/PascalABC.NET/Filter deleted file mode 120000 index b6b1f56f68..0000000000 --- a/Lang/PascalABC.NET/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Find-common-directory-path b/Lang/PascalABC.NET/Find-common-directory-path deleted file mode 120000 index 48495d80e3..0000000000 --- a/Lang/PascalABC.NET/Find-common-directory-path +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-common-directory-path/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Find-if-a-point-is-within-a-triangle b/Lang/PascalABC.NET/Find-if-a-point-is-within-a-triangle deleted file mode 120000 index 995f2a0af8..0000000000 --- a/Lang/PascalABC.NET/Find-if-a-point-is-within-a-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-if-a-point-is-within-a-triangle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Find-limit-of-recursion b/Lang/PascalABC.NET/Find-limit-of-recursion deleted file mode 120000 index 8e738ede74..0000000000 --- a/Lang/PascalABC.NET/Find-limit-of-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-limit-of-recursion/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Find-palindromic-numbers-in-both-binary-and-ternary-bases b/Lang/PascalABC.NET/Find-palindromic-numbers-in-both-binary-and-ternary-bases deleted file mode 120000 index d897fb9951..0000000000 --- a/Lang/PascalABC.NET/Find-palindromic-numbers-in-both-binary-and-ternary-bases +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-palindromic-numbers-in-both-binary-and-ternary-bases/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Find-the-intersection-of-a-line-with-a-plane b/Lang/PascalABC.NET/Find-the-intersection-of-a-line-with-a-plane deleted file mode 120000 index db54cce940..0000000000 --- a/Lang/PascalABC.NET/Find-the-intersection-of-a-line-with-a-plane +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-intersection-of-a-line-with-a-plane/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Find-the-intersection-of-two-lines b/Lang/PascalABC.NET/Find-the-intersection-of-two-lines deleted file mode 120000 index 654d760b69..0000000000 --- a/Lang/PascalABC.NET/Find-the-intersection-of-two-lines +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-intersection-of-two-lines/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Find-the-last-Sunday-of-each-month b/Lang/PascalABC.NET/Find-the-last-Sunday-of-each-month deleted file mode 120000 index 14b7c01559..0000000000 --- a/Lang/PascalABC.NET/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Find-the-missing-permutation b/Lang/PascalABC.NET/Find-the-missing-permutation deleted file mode 120000 index 74bb4ee6f0..0000000000 --- a/Lang/PascalABC.NET/Find-the-missing-permutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-missing-permutation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/First-class-functions b/Lang/PascalABC.NET/First-class-functions deleted file mode 120000 index d4c191f6d3..0000000000 --- a/Lang/PascalABC.NET/First-class-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/First-class-functions-Use-numbers-analogously b/Lang/PascalABC.NET/First-class-functions-Use-numbers-analogously deleted file mode 120000 index 60d3a6b1c4..0000000000 --- a/Lang/PascalABC.NET/First-class-functions-Use-numbers-analogously +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions-Use-numbers-analogously/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/First-perfect-square-in-base-n-with-n-unique-digits b/Lang/PascalABC.NET/First-perfect-square-in-base-n-with-n-unique-digits deleted file mode 120000 index dd9c2365f8..0000000000 --- a/Lang/PascalABC.NET/First-perfect-square-in-base-n-with-n-unique-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-perfect-square-in-base-n-with-n-unique-digits/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/First-power-of-2-that-has-leading-decimal-digits-of-12 b/Lang/PascalABC.NET/First-power-of-2-that-has-leading-decimal-digits-of-12 deleted file mode 120000 index 31a48a0c89..0000000000 --- a/Lang/PascalABC.NET/First-power-of-2-that-has-leading-decimal-digits-of-12 +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-power-of-2-that-has-leading-decimal-digits-of-12/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Five-weekends b/Lang/PascalABC.NET/Five-weekends deleted file mode 120000 index 868fa3eedb..0000000000 --- a/Lang/PascalABC.NET/Five-weekends +++ /dev/null @@ -1 +0,0 @@ -../../Task/Five-weekends/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fivenum b/Lang/PascalABC.NET/Fivenum deleted file mode 120000 index ef9246e91a..0000000000 --- a/Lang/PascalABC.NET/Fivenum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fivenum/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/FizzBuzz b/Lang/PascalABC.NET/FizzBuzz deleted file mode 120000 index 9af47ffeb0..0000000000 --- a/Lang/PascalABC.NET/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Flatten-a-list b/Lang/PascalABC.NET/Flatten-a-list deleted file mode 120000 index 951e9e626d..0000000000 --- a/Lang/PascalABC.NET/Flatten-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flatten-a-list/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Floyds-triangle b/Lang/PascalABC.NET/Floyds-triangle deleted file mode 120000 index 741db9a754..0000000000 --- a/Lang/PascalABC.NET/Floyds-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyds-triangle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fork b/Lang/PascalABC.NET/Fork deleted file mode 120000 index 21f23b18c9..0000000000 --- a/Lang/PascalABC.NET/Fork +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fork/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Formatted-numeric-output b/Lang/PascalABC.NET/Formatted-numeric-output deleted file mode 120000 index d5385037bc..0000000000 --- a/Lang/PascalABC.NET/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Forward-difference b/Lang/PascalABC.NET/Forward-difference deleted file mode 120000 index 6ba594a872..0000000000 --- a/Lang/PascalABC.NET/Forward-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Forward-difference/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fractal-tree b/Lang/PascalABC.NET/Fractal-tree deleted file mode 120000 index 1018455008..0000000000 --- a/Lang/PascalABC.NET/Fractal-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractal-tree/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Function-composition b/Lang/PascalABC.NET/Function-composition deleted file mode 120000 index 10938e885c..0000000000 --- a/Lang/PascalABC.NET/Function-composition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-composition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Function-definition b/Lang/PascalABC.NET/Function-definition deleted file mode 120000 index cc1ff414b4..0000000000 --- a/Lang/PascalABC.NET/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Fusc-sequence b/Lang/PascalABC.NET/Fusc-sequence deleted file mode 120000 index 30b9581633..0000000000 --- a/Lang/PascalABC.NET/Fusc-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fusc-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Gamma-function b/Lang/PascalABC.NET/Gamma-function deleted file mode 120000 index d0d1bc1bed..0000000000 --- a/Lang/PascalABC.NET/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Gapful-numbers b/Lang/PascalABC.NET/Gapful-numbers deleted file mode 120000 index c53e98533f..0000000000 --- a/Lang/PascalABC.NET/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Gauss-Jordan-matrix-inversion b/Lang/PascalABC.NET/Gauss-Jordan-matrix-inversion deleted file mode 120000 index af61f036c2..0000000000 --- a/Lang/PascalABC.NET/Gauss-Jordan-matrix-inversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gauss-Jordan-matrix-inversion/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Gaussian-elimination b/Lang/PascalABC.NET/Gaussian-elimination deleted file mode 120000 index 263ffc6099..0000000000 --- a/Lang/PascalABC.NET/Gaussian-elimination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gaussian-elimination/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/General-FizzBuzz b/Lang/PascalABC.NET/General-FizzBuzz deleted file mode 120000 index 655ae97e52..0000000000 --- a/Lang/PascalABC.NET/General-FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/General-FizzBuzz/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Generate-Chess960-starting-position b/Lang/PascalABC.NET/Generate-Chess960-starting-position deleted file mode 120000 index 0f95aaeb00..0000000000 --- a/Lang/PascalABC.NET/Generate-Chess960-starting-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-Chess960-starting-position/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Generate-lower-case-ASCII-alphabet b/Lang/PascalABC.NET/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 8ef0c3c6f0..0000000000 --- a/Lang/PascalABC.NET/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Generator-Exponential b/Lang/PascalABC.NET/Generator-Exponential deleted file mode 120000 index ca6d0b1093..0000000000 --- a/Lang/PascalABC.NET/Generator-Exponential +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generator-Exponential/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Generic-swap b/Lang/PascalABC.NET/Generic-swap deleted file mode 120000 index 35fd1c3542..0000000000 --- a/Lang/PascalABC.NET/Generic-swap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generic-swap/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Get-system-command-output b/Lang/PascalABC.NET/Get-system-command-output deleted file mode 120000 index 41cb609755..0000000000 --- a/Lang/PascalABC.NET/Get-system-command-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Get-system-command-output/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Giuga-numbers b/Lang/PascalABC.NET/Giuga-numbers deleted file mode 120000 index e5f281e7e3..0000000000 --- a/Lang/PascalABC.NET/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Globally-replace-text-in-several-files b/Lang/PascalABC.NET/Globally-replace-text-in-several-files deleted file mode 120000 index d8545a73f2..0000000000 --- a/Lang/PascalABC.NET/Globally-replace-text-in-several-files +++ /dev/null @@ -1 +0,0 @@ -../../Task/Globally-replace-text-in-several-files/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Goldbachs-comet b/Lang/PascalABC.NET/Goldbachs-comet deleted file mode 120000 index 01fcc2a336..0000000000 --- a/Lang/PascalABC.NET/Goldbachs-comet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Goldbachs-comet/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Golden-ratio-Convergence b/Lang/PascalABC.NET/Golden-ratio-Convergence deleted file mode 120000 index 375683d4e0..0000000000 --- a/Lang/PascalABC.NET/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Gray-code b/Lang/PascalABC.NET/Gray-code deleted file mode 120000 index 078fdc2c8b..0000000000 --- a/Lang/PascalABC.NET/Gray-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gray-code/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Greatest-common-divisor b/Lang/PascalABC.NET/Greatest-common-divisor deleted file mode 120000 index 27dc1c21f9..0000000000 --- a/Lang/PascalABC.NET/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Greatest-element-of-a-list b/Lang/PascalABC.NET/Greatest-element-of-a-list deleted file mode 120000 index b5185eb27d..0000000000 --- a/Lang/PascalABC.NET/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Greatest-subsequential-sum b/Lang/PascalABC.NET/Greatest-subsequential-sum deleted file mode 120000 index 10aeb8b0f0..0000000000 --- a/Lang/PascalABC.NET/Greatest-subsequential-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-subsequential-sum/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Guess-the-number b/Lang/PascalABC.NET/Guess-the-number deleted file mode 120000 index 7fff26f7e2..0000000000 --- a/Lang/PascalABC.NET/Guess-the-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/HTTP b/Lang/PascalABC.NET/HTTP deleted file mode 120000 index 28d630c27b..0000000000 --- a/Lang/PascalABC.NET/HTTP +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTP/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/HTTPS b/Lang/PascalABC.NET/HTTPS deleted file mode 120000 index 88259c85d4..0000000000 --- a/Lang/PascalABC.NET/HTTPS +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/HTTPS-Authenticated b/Lang/PascalABC.NET/HTTPS-Authenticated deleted file mode 120000 index 5f39b0a90c..0000000000 --- a/Lang/PascalABC.NET/HTTPS-Authenticated +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS-Authenticated/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hailstone-sequence b/Lang/PascalABC.NET/Hailstone-sequence deleted file mode 120000 index f83360c3ea..0000000000 --- a/Lang/PascalABC.NET/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Halt-and-catch-fire b/Lang/PascalABC.NET/Halt-and-catch-fire deleted file mode 120000 index 531d664087..0000000000 --- a/Lang/PascalABC.NET/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hamming-numbers b/Lang/PascalABC.NET/Hamming-numbers deleted file mode 120000 index bd37bceed8..0000000000 --- a/Lang/PascalABC.NET/Hamming-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hamming-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Handle-a-signal b/Lang/PascalABC.NET/Handle-a-signal deleted file mode 120000 index e3f3390134..0000000000 --- a/Lang/PascalABC.NET/Handle-a-signal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Handle-a-signal/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Happy-numbers b/Lang/PascalABC.NET/Happy-numbers deleted file mode 120000 index 2b0f0e30d5..0000000000 --- a/Lang/PascalABC.NET/Happy-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Happy-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Harmonic-series b/Lang/PascalABC.NET/Harmonic-series deleted file mode 120000 index c5dec236a3..0000000000 --- a/Lang/PascalABC.NET/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Harshad-or-Niven-series b/Lang/PascalABC.NET/Harshad-or-Niven-series deleted file mode 120000 index 4a30ac9f34..0000000000 --- a/Lang/PascalABC.NET/Harshad-or-Niven-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harshad-or-Niven-series/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hash-from-two-arrays b/Lang/PascalABC.NET/Hash-from-two-arrays deleted file mode 120000 index 06b09f8bf9..0000000000 --- a/Lang/PascalABC.NET/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Haversine-formula b/Lang/PascalABC.NET/Haversine-formula deleted file mode 120000 index 505d4c95b1..0000000000 --- a/Lang/PascalABC.NET/Haversine-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Haversine-formula/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hello-world-Line-printer b/Lang/PascalABC.NET/Hello-world-Line-printer deleted file mode 120000 index 87d7f6b37c..0000000000 --- a/Lang/PascalABC.NET/Hello-world-Line-printer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Line-printer/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hello-world-Newline-omission b/Lang/PascalABC.NET/Hello-world-Newline-omission deleted file mode 120000 index 2c094828d8..0000000000 --- a/Lang/PascalABC.NET/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hello-world-Standard-error b/Lang/PascalABC.NET/Hello-world-Standard-error deleted file mode 120000 index 4b2452f23e..0000000000 --- a/Lang/PascalABC.NET/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Here-document b/Lang/PascalABC.NET/Here-document deleted file mode 120000 index 073a394aa5..0000000000 --- a/Lang/PascalABC.NET/Here-document +++ /dev/null @@ -1 +0,0 @@ -../../Task/Here-document/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Heronian-triangles b/Lang/PascalABC.NET/Heronian-triangles deleted file mode 120000 index 38597384c9..0000000000 --- a/Lang/PascalABC.NET/Heronian-triangles +++ /dev/null @@ -1 +0,0 @@ -../../Task/Heronian-triangles/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hex-words b/Lang/PascalABC.NET/Hex-words deleted file mode 120000 index 487faee543..0000000000 --- a/Lang/PascalABC.NET/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hickerson-series-of-almost-integers b/Lang/PascalABC.NET/Hickerson-series-of-almost-integers deleted file mode 120000 index 8789a0cbe0..0000000000 --- a/Lang/PascalABC.NET/Hickerson-series-of-almost-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hickerson-series-of-almost-integers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Higher-order-functions b/Lang/PascalABC.NET/Higher-order-functions deleted file mode 120000 index c3ac017464..0000000000 --- a/Lang/PascalABC.NET/Higher-order-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Higher-order-functions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hilbert-curve b/Lang/PascalABC.NET/Hilbert-curve deleted file mode 120000 index 319eba89d6..0000000000 --- a/Lang/PascalABC.NET/Hilbert-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hilbert-curve/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hofstadter-Conway-$10-000-sequence b/Lang/PascalABC.NET/Hofstadter-Conway-$10-000-sequence deleted file mode 120000 index 6f07522b20..0000000000 --- a/Lang/PascalABC.NET/Hofstadter-Conway-$10-000-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Conway-$10-000-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hofstadter-Figure-Figure-sequences b/Lang/PascalABC.NET/Hofstadter-Figure-Figure-sequences deleted file mode 120000 index 658c56f7ad..0000000000 --- a/Lang/PascalABC.NET/Hofstadter-Figure-Figure-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Figure-Figure-sequences/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hofstadter-Q-sequence b/Lang/PascalABC.NET/Hofstadter-Q-sequence deleted file mode 120000 index 454e935a80..0000000000 --- a/Lang/PascalABC.NET/Hofstadter-Q-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Q-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Horizontal-sundial-calculations b/Lang/PascalABC.NET/Horizontal-sundial-calculations deleted file mode 120000 index 6ab4227b2a..0000000000 --- a/Lang/PascalABC.NET/Horizontal-sundial-calculations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horizontal-sundial-calculations/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Horners-rule-for-polynomial-evaluation b/Lang/PascalABC.NET/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 43a8514719..0000000000 --- a/Lang/PascalABC.NET/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Host-introspection b/Lang/PascalABC.NET/Host-introspection deleted file mode 120000 index 786a9617c6..0000000000 --- a/Lang/PascalABC.NET/Host-introspection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Host-introspection/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Hostname b/Lang/PascalABC.NET/Hostname deleted file mode 120000 index 89e14c01f4..0000000000 --- a/Lang/PascalABC.NET/Hostname +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hostname/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Humble-numbers b/Lang/PascalABC.NET/Humble-numbers deleted file mode 120000 index ee2cb9aa95..0000000000 --- a/Lang/PascalABC.NET/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/I-before-E-except-after-C b/Lang/PascalABC.NET/I-before-E-except-after-C deleted file mode 120000 index db9c4689f9..0000000000 --- a/Lang/PascalABC.NET/I-before-E-except-after-C +++ /dev/null @@ -1 +0,0 @@ -../../Task/I-before-E-except-after-C/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/IBAN b/Lang/PascalABC.NET/IBAN deleted file mode 120000 index 2a1610e29a..0000000000 --- a/Lang/PascalABC.NET/IBAN +++ /dev/null @@ -1 +0,0 @@ -../../Task/IBAN/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/ISBN13-check-digit b/Lang/PascalABC.NET/ISBN13-check-digit deleted file mode 120000 index 1cc5a9193a..0000000000 --- a/Lang/PascalABC.NET/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Identity-matrix b/Lang/PascalABC.NET/Identity-matrix deleted file mode 120000 index e498197ea6..0000000000 --- a/Lang/PascalABC.NET/Identity-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Identity-matrix/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Include-a-file b/Lang/PascalABC.NET/Include-a-file deleted file mode 120000 index 5762928418..0000000000 --- a/Lang/PascalABC.NET/Include-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Include-a-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Increasing-gaps-between-consecutive-Niven-numbers b/Lang/PascalABC.NET/Increasing-gaps-between-consecutive-Niven-numbers deleted file mode 120000 index cff91f6819..0000000000 --- a/Lang/PascalABC.NET/Increasing-gaps-between-consecutive-Niven-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increasing-gaps-between-consecutive-Niven-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Increment-a-numerical-string b/Lang/PascalABC.NET/Increment-a-numerical-string deleted file mode 120000 index 5570e6302a..0000000000 --- a/Lang/PascalABC.NET/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Infinity b/Lang/PascalABC.NET/Infinity deleted file mode 120000 index e5b6807ad7..0000000000 --- a/Lang/PascalABC.NET/Infinity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Infinity/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Inheritance-Multiple b/Lang/PascalABC.NET/Inheritance-Multiple deleted file mode 120000 index f3f065b097..0000000000 --- a/Lang/PascalABC.NET/Inheritance-Multiple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Multiple/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Inheritance-Single b/Lang/PascalABC.NET/Inheritance-Single deleted file mode 120000 index 2843b9d512..0000000000 --- a/Lang/PascalABC.NET/Inheritance-Single +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Single/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Input-loop b/Lang/PascalABC.NET/Input-loop deleted file mode 120000 index 8086164ab5..0000000000 --- a/Lang/PascalABC.NET/Input-loop +++ /dev/null @@ -1 +0,0 @@ -../../Task/Input-loop/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Integer-comparison b/Lang/PascalABC.NET/Integer-comparison deleted file mode 120000 index b60ac826c4..0000000000 --- a/Lang/PascalABC.NET/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Intersecting-number-wheels b/Lang/PascalABC.NET/Intersecting-number-wheels deleted file mode 120000 index 5d79870677..0000000000 --- a/Lang/PascalABC.NET/Intersecting-number-wheels +++ /dev/null @@ -1 +0,0 @@ -../../Task/Intersecting-number-wheels/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Isograms-and-heterograms b/Lang/PascalABC.NET/Isograms-and-heterograms deleted file mode 120000 index bf330eefcd..0000000000 --- a/Lang/PascalABC.NET/Isograms-and-heterograms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isograms-and-heterograms/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Isqrt-integer-square-root-of-X b/Lang/PascalABC.NET/Isqrt-integer-square-root-of-X deleted file mode 120000 index 5e922bc6f6..0000000000 --- a/Lang/PascalABC.NET/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Iterated-digits-squaring b/Lang/PascalABC.NET/Iterated-digits-squaring deleted file mode 120000 index d26b072d9f..0000000000 --- a/Lang/PascalABC.NET/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/JSON b/Lang/PascalABC.NET/JSON deleted file mode 120000 index e24e87ebee..0000000000 --- a/Lang/PascalABC.NET/JSON +++ /dev/null @@ -1 +0,0 @@ -../../Task/JSON/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Jacobi-symbol b/Lang/PascalABC.NET/Jacobi-symbol deleted file mode 120000 index beae5f110d..0000000000 --- a/Lang/PascalABC.NET/Jacobi-symbol +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobi-symbol/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Jacobsthal-numbers b/Lang/PascalABC.NET/Jacobsthal-numbers deleted file mode 120000 index 876df13cd2..0000000000 --- a/Lang/PascalABC.NET/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Jensens-Device b/Lang/PascalABC.NET/Jensens-Device deleted file mode 120000 index b995733017..0000000000 --- a/Lang/PascalABC.NET/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Jewels-and-stones b/Lang/PascalABC.NET/Jewels-and-stones deleted file mode 120000 index 3c21e35293..0000000000 --- a/Lang/PascalABC.NET/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/JortSort b/Lang/PascalABC.NET/JortSort deleted file mode 120000 index 7235c60479..0000000000 --- a/Lang/PascalABC.NET/JortSort +++ /dev/null @@ -1 +0,0 @@ -../../Task/JortSort/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Josephus-problem b/Lang/PascalABC.NET/Josephus-problem deleted file mode 120000 index b62f88327b..0000000000 --- a/Lang/PascalABC.NET/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Juggler-sequence b/Lang/PascalABC.NET/Juggler-sequence deleted file mode 120000 index 11d7432b3c..0000000000 --- a/Lang/PascalABC.NET/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Julia-set b/Lang/PascalABC.NET/Julia-set deleted file mode 120000 index 905a140bc7..0000000000 --- a/Lang/PascalABC.NET/Julia-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Julia-set/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Jump-anywhere b/Lang/PascalABC.NET/Jump-anywhere deleted file mode 120000 index cb395144b9..0000000000 --- a/Lang/PascalABC.NET/Jump-anywhere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jump-anywhere/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Kaprekar-numbers b/Lang/PascalABC.NET/Kaprekar-numbers deleted file mode 120000 index f1765dac14..0000000000 --- a/Lang/PascalABC.NET/Kaprekar-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kaprekar-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Kernighans-large-earthquake-problem b/Lang/PascalABC.NET/Kernighans-large-earthquake-problem deleted file mode 120000 index bfd99d6f53..0000000000 --- a/Lang/PascalABC.NET/Kernighans-large-earthquake-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kernighans-large-earthquake-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Keyboard-input-Obtain-a-Y-or-N-response b/Lang/PascalABC.NET/Keyboard-input-Obtain-a-Y-or-N-response deleted file mode 120000 index d70dc96806..0000000000 --- a/Lang/PascalABC.NET/Keyboard-input-Obtain-a-Y-or-N-response +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-input-Obtain-a-Y-or-N-response/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Knapsack-problem-0-1 b/Lang/PascalABC.NET/Knapsack-problem-0-1 deleted file mode 120000 index 2fbfd42a60..0000000000 --- a/Lang/PascalABC.NET/Knapsack-problem-0-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-0-1/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Knuth-shuffle b/Lang/PascalABC.NET/Knuth-shuffle deleted file mode 120000 index a80c329b34..0000000000 --- a/Lang/PascalABC.NET/Knuth-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuth-shuffle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Knuths-algorithm-S b/Lang/PascalABC.NET/Knuths-algorithm-S deleted file mode 120000 index 5898ddfb2a..0000000000 --- a/Lang/PascalABC.NET/Knuths-algorithm-S +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-algorithm-S/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Knuths-power-tree b/Lang/PascalABC.NET/Knuths-power-tree deleted file mode 120000 index 985187fb94..0000000000 --- a/Lang/PascalABC.NET/Knuths-power-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-power-tree/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Kolakoski-sequence b/Lang/PascalABC.NET/Kolakoski-sequence deleted file mode 120000 index 141e5ac2f1..0000000000 --- a/Lang/PascalABC.NET/Kolakoski-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kolakoski-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Kosaraju b/Lang/PascalABC.NET/Kosaraju deleted file mode 120000 index b461c7f092..0000000000 --- a/Lang/PascalABC.NET/Kosaraju +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kosaraju/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Kronecker-product b/Lang/PascalABC.NET/Kronecker-product deleted file mode 120000 index d78d832294..0000000000 --- a/Lang/PascalABC.NET/Kronecker-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Kronecker-product-based-fractals b/Lang/PascalABC.NET/Kronecker-product-based-fractals deleted file mode 120000 index 47d2054ae1..0000000000 --- a/Lang/PascalABC.NET/Kronecker-product-based-fractals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product-based-fractals/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/LZW-compression b/Lang/PascalABC.NET/LZW-compression deleted file mode 120000 index caca350ee1..0000000000 --- a/Lang/PascalABC.NET/LZW-compression +++ /dev/null @@ -1 +0,0 @@ -../../Task/LZW-compression/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Lah-numbers b/Lang/PascalABC.NET/Lah-numbers deleted file mode 120000 index 6d00cf7c92..0000000000 --- a/Lang/PascalABC.NET/Lah-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lah-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Langtons-ant b/Lang/PascalABC.NET/Langtons-ant deleted file mode 120000 index 7c98b40d3c..0000000000 --- a/Lang/PascalABC.NET/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Largest-int-from-concatenated-ints b/Lang/PascalABC.NET/Largest-int-from-concatenated-ints deleted file mode 120000 index 97fdfc9525..0000000000 --- a/Lang/PascalABC.NET/Largest-int-from-concatenated-ints +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-int-from-concatenated-ints/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Largest-number-divisible-by-its-digits b/Lang/PascalABC.NET/Largest-number-divisible-by-its-digits deleted file mode 120000 index 40a547007f..0000000000 --- a/Lang/PascalABC.NET/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Largest-proper-divisor-of-n b/Lang/PascalABC.NET/Largest-proper-divisor-of-n deleted file mode 120000 index 2988b13d98..0000000000 --- a/Lang/PascalABC.NET/Largest-proper-divisor-of-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-proper-divisor-of-n/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Last-Friday-of-each-month b/Lang/PascalABC.NET/Last-Friday-of-each-month deleted file mode 120000 index bcb04c8152..0000000000 --- a/Lang/PascalABC.NET/Last-Friday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-Friday-of-each-month/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Last-letter-first-letter b/Lang/PascalABC.NET/Last-letter-first-letter deleted file mode 120000 index 19b2a978ef..0000000000 --- a/Lang/PascalABC.NET/Last-letter-first-letter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-letter-first-letter/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Law-of-cosines---triples b/Lang/PascalABC.NET/Law-of-cosines---triples deleted file mode 120000 index c3f4700866..0000000000 --- a/Lang/PascalABC.NET/Law-of-cosines---triples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Law-of-cosines---triples/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Leap-year b/Lang/PascalABC.NET/Leap-year deleted file mode 120000 index 250d71014a..0000000000 --- a/Lang/PascalABC.NET/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Least-common-multiple b/Lang/PascalABC.NET/Least-common-multiple deleted file mode 120000 index 446b96ac48..0000000000 --- a/Lang/PascalABC.NET/Least-common-multiple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Least-common-multiple/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Left-factorials b/Lang/PascalABC.NET/Left-factorials deleted file mode 120000 index 8ed1d03134..0000000000 --- a/Lang/PascalABC.NET/Left-factorials +++ /dev/null @@ -1 +0,0 @@ -../../Task/Left-factorials/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Leonardo-numbers b/Lang/PascalABC.NET/Leonardo-numbers deleted file mode 120000 index 0895bc3d59..0000000000 --- a/Lang/PascalABC.NET/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Levenshtein-distance b/Lang/PascalABC.NET/Levenshtein-distance deleted file mode 120000 index e32fc71042..0000000000 --- a/Lang/PascalABC.NET/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Linear-congruential-generator b/Lang/PascalABC.NET/Linear-congruential-generator deleted file mode 120000 index 901b6b4116..0000000000 --- a/Lang/PascalABC.NET/Linear-congruential-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Linear-congruential-generator/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/List-comprehensions b/Lang/PascalABC.NET/List-comprehensions deleted file mode 120000 index e9fa93e9e6..0000000000 --- a/Lang/PascalABC.NET/List-comprehensions +++ /dev/null @@ -1 +0,0 @@ -../../Task/List-comprehensions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Literals-Floating-point b/Lang/PascalABC.NET/Literals-Floating-point deleted file mode 120000 index e11300a194..0000000000 --- a/Lang/PascalABC.NET/Literals-Floating-point +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Floating-point/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Literals-Integer b/Lang/PascalABC.NET/Literals-Integer deleted file mode 120000 index a9aac3cffe..0000000000 --- a/Lang/PascalABC.NET/Literals-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Integer/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Literals-String b/Lang/PascalABC.NET/Literals-String deleted file mode 120000 index 2f02c8af92..0000000000 --- a/Lang/PascalABC.NET/Literals-String +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-String/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Logistic-curve-fitting-in-epidemiology b/Lang/PascalABC.NET/Logistic-curve-fitting-in-epidemiology deleted file mode 120000 index 9ae308e46e..0000000000 --- a/Lang/PascalABC.NET/Logistic-curve-fitting-in-epidemiology +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logistic-curve-fitting-in-epidemiology/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Long-literals-with-continuations b/Lang/PascalABC.NET/Long-literals-with-continuations deleted file mode 120000 index cef817d9b6..0000000000 --- a/Lang/PascalABC.NET/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Long-multiplication b/Lang/PascalABC.NET/Long-multiplication deleted file mode 120000 index 3da90eb79b..0000000000 --- a/Lang/PascalABC.NET/Long-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-multiplication/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Long-primes b/Lang/PascalABC.NET/Long-primes deleted file mode 120000 index f90c1c5b51..0000000000 --- a/Lang/PascalABC.NET/Long-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Long-year b/Lang/PascalABC.NET/Long-year deleted file mode 120000 index cfbd0a990c..0000000000 --- a/Lang/PascalABC.NET/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Longest-common-subsequence b/Lang/PascalABC.NET/Longest-common-subsequence deleted file mode 120000 index 1dfbd5ef9d..0000000000 --- a/Lang/PascalABC.NET/Longest-common-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-common-subsequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Longest-common-substring b/Lang/PascalABC.NET/Longest-common-substring deleted file mode 120000 index c8e27105a8..0000000000 --- a/Lang/PascalABC.NET/Longest-common-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-common-substring/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Longest-increasing-subsequence b/Lang/PascalABC.NET/Longest-increasing-subsequence deleted file mode 120000 index 256a8afb28..0000000000 --- a/Lang/PascalABC.NET/Longest-increasing-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-increasing-subsequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Look-and-say-sequence b/Lang/PascalABC.NET/Look-and-say-sequence deleted file mode 120000 index a23016f201..0000000000 --- a/Lang/PascalABC.NET/Look-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Look-and-say-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loop-over-multiple-arrays-simultaneously b/Lang/PascalABC.NET/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index 52655fded4..0000000000 --- a/Lang/PascalABC.NET/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-Break b/Lang/PascalABC.NET/Loops-Break deleted file mode 120000 index 75f285786e..0000000000 --- a/Lang/PascalABC.NET/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-Continue b/Lang/PascalABC.NET/Loops-Continue deleted file mode 120000 index 75da2856ce..0000000000 --- a/Lang/PascalABC.NET/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-Do-while b/Lang/PascalABC.NET/Loops-Do-while deleted file mode 120000 index a15c938618..0000000000 --- a/Lang/PascalABC.NET/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-Downward-for b/Lang/PascalABC.NET/Loops-Downward-for deleted file mode 120000 index c2c6306f3a..0000000000 --- a/Lang/PascalABC.NET/Loops-Downward-for +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Downward-for/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-For b/Lang/PascalABC.NET/Loops-For deleted file mode 120000 index bf236f094e..0000000000 --- a/Lang/PascalABC.NET/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-For-with-a-specified-step b/Lang/PascalABC.NET/Loops-For-with-a-specified-step deleted file mode 120000 index 5244453d5c..0000000000 --- a/Lang/PascalABC.NET/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-Foreach b/Lang/PascalABC.NET/Loops-Foreach deleted file mode 120000 index 68b06931af..0000000000 --- a/Lang/PascalABC.NET/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-Increment-loop-index-within-loop-body b/Lang/PascalABC.NET/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index f5d20bce59..0000000000 --- a/Lang/PascalABC.NET/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-N-plus-one-half b/Lang/PascalABC.NET/Loops-N-plus-one-half deleted file mode 120000 index 95fe8496ec..0000000000 --- a/Lang/PascalABC.NET/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-Nested b/Lang/PascalABC.NET/Loops-Nested deleted file mode 120000 index d1a88ee15f..0000000000 --- a/Lang/PascalABC.NET/Loops-Nested +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Nested/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-While b/Lang/PascalABC.NET/Loops-While deleted file mode 120000 index 19d817b9f2..0000000000 --- a/Lang/PascalABC.NET/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-With-multiple-ranges b/Lang/PascalABC.NET/Loops-With-multiple-ranges deleted file mode 120000 index 1b3c0e8a85..0000000000 --- a/Lang/PascalABC.NET/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Loops-Wrong-ranges b/Lang/PascalABC.NET/Loops-Wrong-ranges deleted file mode 120000 index cd717ae408..0000000000 --- a/Lang/PascalABC.NET/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Lucas-Lehmer-test b/Lang/PascalABC.NET/Lucas-Lehmer-test deleted file mode 120000 index bec917b045..0000000000 --- a/Lang/PascalABC.NET/Lucas-Lehmer-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lucas-Lehmer-test/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Ludic-numbers b/Lang/PascalABC.NET/Ludic-numbers deleted file mode 120000 index 84c5abb4fd..0000000000 --- a/Lang/PascalABC.NET/Ludic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ludic-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Luhn-test-of-credit-card-numbers b/Lang/PascalABC.NET/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 00804b09b8..0000000000 --- a/Lang/PascalABC.NET/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Lychrel-numbers b/Lang/PascalABC.NET/Lychrel-numbers deleted file mode 120000 index c6935e364e..0000000000 --- a/Lang/PascalABC.NET/Lychrel-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lychrel-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/M-bius-function b/Lang/PascalABC.NET/M-bius-function deleted file mode 120000 index e6445ec3ed..0000000000 --- a/Lang/PascalABC.NET/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/MAC-vendor-lookup b/Lang/PascalABC.NET/MAC-vendor-lookup deleted file mode 120000 index d35cdd8c9b..0000000000 --- a/Lang/PascalABC.NET/MAC-vendor-lookup +++ /dev/null @@ -1 +0,0 @@ -../../Task/MAC-vendor-lookup/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/MD5 b/Lang/PascalABC.NET/MD5 deleted file mode 120000 index 375523a297..0000000000 --- a/Lang/PascalABC.NET/MD5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD5/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Magic-constant b/Lang/PascalABC.NET/Magic-constant deleted file mode 120000 index 822ebb4fb2..0000000000 --- a/Lang/PascalABC.NET/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Magic-squares-of-doubly-even-order b/Lang/PascalABC.NET/Magic-squares-of-doubly-even-order deleted file mode 120000 index b8c93bc64a..0000000000 --- a/Lang/PascalABC.NET/Magic-squares-of-doubly-even-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-doubly-even-order/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Magnanimous-numbers b/Lang/PascalABC.NET/Magnanimous-numbers deleted file mode 120000 index 0a895d4414..0000000000 --- a/Lang/PascalABC.NET/Magnanimous-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magnanimous-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Man-or-boy-test b/Lang/PascalABC.NET/Man-or-boy-test deleted file mode 120000 index f9b9ccb7a0..0000000000 --- a/Lang/PascalABC.NET/Man-or-boy-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Man-or-boy-test/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Map-range b/Lang/PascalABC.NET/Map-range deleted file mode 120000 index 2c5d9ac526..0000000000 --- a/Lang/PascalABC.NET/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Matrix-exponentiation-operator b/Lang/PascalABC.NET/Matrix-exponentiation-operator deleted file mode 120000 index 31137ceb77..0000000000 --- a/Lang/PascalABC.NET/Matrix-exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-exponentiation-operator/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Matrix-multiplication b/Lang/PascalABC.NET/Matrix-multiplication deleted file mode 120000 index ab9b502408..0000000000 --- a/Lang/PascalABC.NET/Matrix-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-multiplication/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Matrix-transposition b/Lang/PascalABC.NET/Matrix-transposition deleted file mode 120000 index 2ba6e5da4b..0000000000 --- a/Lang/PascalABC.NET/Matrix-transposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-transposition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Maximum-triangle-path-sum b/Lang/PascalABC.NET/Maximum-triangle-path-sum deleted file mode 120000 index d476233920..0000000000 --- a/Lang/PascalABC.NET/Maximum-triangle-path-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maximum-triangle-path-sum/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Maze-generation b/Lang/PascalABC.NET/Maze-generation deleted file mode 120000 index 147e928cb8..0000000000 --- a/Lang/PascalABC.NET/Maze-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maze-generation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/McNuggets-problem b/Lang/PascalABC.NET/McNuggets-problem deleted file mode 120000 index ceb4630090..0000000000 --- a/Lang/PascalABC.NET/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Memory-allocation b/Lang/PascalABC.NET/Memory-allocation deleted file mode 120000 index b7e94af0dd..0000000000 --- a/Lang/PascalABC.NET/Memory-allocation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Memory-allocation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Mertens-function b/Lang/PascalABC.NET/Mertens-function deleted file mode 120000 index f3e21033e6..0000000000 --- a/Lang/PascalABC.NET/Mertens-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mertens-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Metallic-ratios b/Lang/PascalABC.NET/Metallic-ratios deleted file mode 120000 index 1f47416b87..0000000000 --- a/Lang/PascalABC.NET/Metallic-ratios +++ /dev/null @@ -1 +0,0 @@ -../../Task/Metallic-ratios/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Metered-concurrency b/Lang/PascalABC.NET/Metered-concurrency deleted file mode 120000 index 925b288d53..0000000000 --- a/Lang/PascalABC.NET/Metered-concurrency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Metered-concurrency/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Mian-Chowla-sequence b/Lang/PascalABC.NET/Mian-Chowla-sequence deleted file mode 120000 index 8a0250e208..0000000000 --- a/Lang/PascalABC.NET/Mian-Chowla-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mian-Chowla-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Middle-three-digits b/Lang/PascalABC.NET/Middle-three-digits deleted file mode 120000 index 5e135c1794..0000000000 --- a/Lang/PascalABC.NET/Middle-three-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Middle-three-digits/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Minimum-multiple-of-m-where-digital-sum-equals-m b/Lang/PascalABC.NET/Minimum-multiple-of-m-where-digital-sum-equals-m deleted file mode 120000 index 97c186fb9d..0000000000 --- a/Lang/PascalABC.NET/Minimum-multiple-of-m-where-digital-sum-equals-m +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minimum-multiple-of-m-where-digital-sum-equals-m/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Modified-random-distribution b/Lang/PascalABC.NET/Modified-random-distribution deleted file mode 120000 index 0b45ed8c91..0000000000 --- a/Lang/PascalABC.NET/Modified-random-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modified-random-distribution/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Modular-exponentiation b/Lang/PascalABC.NET/Modular-exponentiation deleted file mode 120000 index 06db8e7a38..0000000000 --- a/Lang/PascalABC.NET/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Modular-inverse b/Lang/PascalABC.NET/Modular-inverse deleted file mode 120000 index cf592b925c..0000000000 --- a/Lang/PascalABC.NET/Modular-inverse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-inverse/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Monte-Carlo-methods b/Lang/PascalABC.NET/Monte-Carlo-methods deleted file mode 120000 index 097d7017f6..0000000000 --- a/Lang/PascalABC.NET/Monte-Carlo-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monte-Carlo-methods/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Monty-Hall-problem b/Lang/PascalABC.NET/Monty-Hall-problem deleted file mode 120000 index 194ee5c033..0000000000 --- a/Lang/PascalABC.NET/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Morse-code b/Lang/PascalABC.NET/Morse-code deleted file mode 120000 index 957358167f..0000000000 --- a/Lang/PascalABC.NET/Morse-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Morse-code/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Motzkin-numbers b/Lang/PascalABC.NET/Motzkin-numbers deleted file mode 120000 index 119a6ee6b9..0000000000 --- a/Lang/PascalABC.NET/Motzkin-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Motzkin-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Mouse-position b/Lang/PascalABC.NET/Mouse-position deleted file mode 120000 index 207ee7b935..0000000000 --- a/Lang/PascalABC.NET/Mouse-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mouse-position/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Move-to-front-algorithm b/Lang/PascalABC.NET/Move-to-front-algorithm deleted file mode 120000 index e365638bb3..0000000000 --- a/Lang/PascalABC.NET/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Multifactorial b/Lang/PascalABC.NET/Multifactorial deleted file mode 120000 index 1a4d72f284..0000000000 --- a/Lang/PascalABC.NET/Multifactorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multifactorial/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Multiple-regression b/Lang/PascalABC.NET/Multiple-regression deleted file mode 120000 index c2b1f827d2..0000000000 --- a/Lang/PascalABC.NET/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Multiplication-tables b/Lang/PascalABC.NET/Multiplication-tables deleted file mode 120000 index bbe1dc2627..0000000000 --- a/Lang/PascalABC.NET/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Multisplit b/Lang/PascalABC.NET/Multisplit deleted file mode 120000 index cacc0acc3b..0000000000 --- a/Lang/PascalABC.NET/Multisplit +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multisplit/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Munchausen-numbers b/Lang/PascalABC.NET/Munchausen-numbers deleted file mode 120000 index e5388bf0cf..0000000000 --- a/Lang/PascalABC.NET/Munchausen-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munchausen-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Musical-scale b/Lang/PascalABC.NET/Musical-scale deleted file mode 120000 index 33d370124c..0000000000 --- a/Lang/PascalABC.NET/Musical-scale +++ /dev/null @@ -1 +0,0 @@ -../../Task/Musical-scale/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Mutual-recursion b/Lang/PascalABC.NET/Mutual-recursion deleted file mode 120000 index ccdccec66f..0000000000 --- a/Lang/PascalABC.NET/Mutual-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mutual-recursion/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/N-queens-problem b/Lang/PascalABC.NET/N-queens-problem deleted file mode 120000 index d0df5430cc..0000000000 --- a/Lang/PascalABC.NET/N-queens-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/N-queens-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Named-parameters b/Lang/PascalABC.NET/Named-parameters deleted file mode 120000 index f91e295fc0..0000000000 --- a/Lang/PascalABC.NET/Named-parameters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Named-parameters/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Naming-conventions b/Lang/PascalABC.NET/Naming-conventions deleted file mode 120000 index 5fc365228c..0000000000 --- a/Lang/PascalABC.NET/Naming-conventions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Naming-conventions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Narcissistic-decimal-number b/Lang/PascalABC.NET/Narcissistic-decimal-number deleted file mode 120000 index 6e25078669..0000000000 --- a/Lang/PascalABC.NET/Narcissistic-decimal-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Narcissistic-decimal-number/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Nested-function b/Lang/PascalABC.NET/Nested-function deleted file mode 120000 index 406d1380f0..0000000000 --- a/Lang/PascalABC.NET/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Next-highest-int-from-digits b/Lang/PascalABC.NET/Next-highest-int-from-digits deleted file mode 120000 index f57c5311ba..0000000000 --- a/Lang/PascalABC.NET/Next-highest-int-from-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Next-highest-int-from-digits/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Nim-game b/Lang/PascalABC.NET/Nim-game deleted file mode 120000 index 11fed8b04f..0000000000 --- a/Lang/PascalABC.NET/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Non-continuous-subsequences b/Lang/PascalABC.NET/Non-continuous-subsequences deleted file mode 120000 index fb90313f8e..0000000000 --- a/Lang/PascalABC.NET/Non-continuous-subsequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-continuous-subsequences/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Nonoblock b/Lang/PascalABC.NET/Nonoblock deleted file mode 120000 index 27ec8aac45..0000000000 --- a/Lang/PascalABC.NET/Nonoblock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nonoblock/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Nth b/Lang/PascalABC.NET/Nth deleted file mode 120000 index 2151e00c8d..0000000000 --- a/Lang/PascalABC.NET/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Null-object b/Lang/PascalABC.NET/Null-object deleted file mode 120000 index 39b6da0acb..0000000000 --- a/Lang/PascalABC.NET/Null-object +++ /dev/null @@ -1 +0,0 @@ -../../Task/Null-object/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Numbers-which-are-not-the-sum-of-distinct-squares b/Lang/PascalABC.NET/Numbers-which-are-not-the-sum-of-distinct-squares deleted file mode 120000 index 11f633b289..0000000000 --- a/Lang/PascalABC.NET/Numbers-which-are-not-the-sum-of-distinct-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-which-are-not-the-sum-of-distinct-squares/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors b/Lang/PascalABC.NET/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors deleted file mode 120000 index 3b98dabeae..0000000000 --- a/Lang/PascalABC.NET/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-which-are-the-cube-roots-of-the-product-of-their-proper-divisors/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Numbers-with-equal-rises-and-falls b/Lang/PascalABC.NET/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 265a6e57f2..0000000000 --- a/Lang/PascalABC.NET/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Numeric-error-propagation b/Lang/PascalABC.NET/Numeric-error-propagation deleted file mode 120000 index b8b2e6d9b5..0000000000 --- a/Lang/PascalABC.NET/Numeric-error-propagation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numeric-error-propagation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Numerical-integration b/Lang/PascalABC.NET/Numerical-integration deleted file mode 120000 index dc5bfcc884..0000000000 --- a/Lang/PascalABC.NET/Numerical-integration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-integration/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Object-serialization b/Lang/PascalABC.NET/Object-serialization deleted file mode 120000 index 07426b45b7..0000000000 --- a/Lang/PascalABC.NET/Object-serialization +++ /dev/null @@ -1 +0,0 @@ -../../Task/Object-serialization/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Odd-word-problem b/Lang/PascalABC.NET/Odd-word-problem deleted file mode 120000 index b0936fb34b..0000000000 --- a/Lang/PascalABC.NET/Odd-word-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Odd-word-problem/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/One-dimensional-cellular-automata b/Lang/PascalABC.NET/One-dimensional-cellular-automata deleted file mode 120000 index 19b52c40ec..0000000000 --- a/Lang/PascalABC.NET/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/One-of-n-lines-in-a-file b/Lang/PascalABC.NET/One-of-n-lines-in-a-file deleted file mode 120000 index 6a1426ac8c..0000000000 --- a/Lang/PascalABC.NET/One-of-n-lines-in-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-of-n-lines-in-a-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/OpenWebNet-password b/Lang/PascalABC.NET/OpenWebNet-password deleted file mode 120000 index 41ce8aa36a..0000000000 --- a/Lang/PascalABC.NET/OpenWebNet-password +++ /dev/null @@ -1 +0,0 @@ -../../Task/OpenWebNet-password/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Operator-precedence b/Lang/PascalABC.NET/Operator-precedence deleted file mode 120000 index 08a1b040c3..0000000000 --- a/Lang/PascalABC.NET/Operator-precedence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Operator-precedence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Order-two-numerical-lists b/Lang/PascalABC.NET/Order-two-numerical-lists deleted file mode 120000 index 8f392c8ff3..0000000000 --- a/Lang/PascalABC.NET/Order-two-numerical-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-two-numerical-lists/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Ordered-words b/Lang/PascalABC.NET/Ordered-words deleted file mode 120000 index d3217a2d03..0000000000 --- a/Lang/PascalABC.NET/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Padovan-n-step-number-sequences b/Lang/PascalABC.NET/Padovan-n-step-number-sequences deleted file mode 120000 index 2e49ed2259..0000000000 --- a/Lang/PascalABC.NET/Padovan-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Padovan-n-step-number-sequences/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Padovan-sequence b/Lang/PascalABC.NET/Padovan-sequence deleted file mode 120000 index c2c68fb6dd..0000000000 --- a/Lang/PascalABC.NET/Padovan-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Padovan-sequence/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Palindrome-dates b/Lang/PascalABC.NET/Palindrome-dates deleted file mode 120000 index 09644b6a7c..0000000000 --- a/Lang/PascalABC.NET/Palindrome-dates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-dates/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Palindrome-detection b/Lang/PascalABC.NET/Palindrome-detection deleted file mode 120000 index cc92721e9f..0000000000 --- a/Lang/PascalABC.NET/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Palindromic-gapful-numbers b/Lang/PascalABC.NET/Palindromic-gapful-numbers deleted file mode 120000 index 532e5bda78..0000000000 --- a/Lang/PascalABC.NET/Palindromic-gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindromic-gapful-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pancake-numbers b/Lang/PascalABC.NET/Pancake-numbers deleted file mode 120000 index b4faf1b68d..0000000000 --- a/Lang/PascalABC.NET/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pangram-checker b/Lang/PascalABC.NET/Pangram-checker deleted file mode 120000 index 114e870600..0000000000 --- a/Lang/PascalABC.NET/Pangram-checker +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pangram-checker/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Paraffins b/Lang/PascalABC.NET/Paraffins deleted file mode 120000 index bafd6e0939..0000000000 --- a/Lang/PascalABC.NET/Paraffins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Paraffins/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Parallel-calculations b/Lang/PascalABC.NET/Parallel-calculations deleted file mode 120000 index e88e92c1df..0000000000 --- a/Lang/PascalABC.NET/Parallel-calculations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parallel-calculations/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Parametric-polymorphism b/Lang/PascalABC.NET/Parametric-polymorphism deleted file mode 120000 index 7c242be133..0000000000 --- a/Lang/PascalABC.NET/Parametric-polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parametric-polymorphism/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Parsing-RPN-calculator-algorithm b/Lang/PascalABC.NET/Parsing-RPN-calculator-algorithm deleted file mode 120000 index c4ae7949cd..0000000000 --- a/Lang/PascalABC.NET/Parsing-RPN-calculator-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-calculator-algorithm/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Partition-an-integer-x-into-n-primes b/Lang/PascalABC.NET/Partition-an-integer-x-into-n-primes deleted file mode 120000 index eb7a5e97f7..0000000000 --- a/Lang/PascalABC.NET/Partition-an-integer-x-into-n-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-an-integer-x-into-n-primes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Partition-function-P b/Lang/PascalABC.NET/Partition-function-P deleted file mode 120000 index e780cc5e40..0000000000 --- a/Lang/PascalABC.NET/Partition-function-P +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-function-P/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pascal-matrix-generation b/Lang/PascalABC.NET/Pascal-matrix-generation deleted file mode 120000 index c8097eca88..0000000000 --- a/Lang/PascalABC.NET/Pascal-matrix-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascal-matrix-generation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pascals-triangle b/Lang/PascalABC.NET/Pascals-triangle deleted file mode 120000 index 1089718a97..0000000000 --- a/Lang/PascalABC.NET/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pascals-triangle-Puzzle b/Lang/PascalABC.NET/Pascals-triangle-Puzzle deleted file mode 120000 index 8106a5db3a..0000000000 --- a/Lang/PascalABC.NET/Pascals-triangle-Puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle-Puzzle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pathological-floating-point-problems b/Lang/PascalABC.NET/Pathological-floating-point-problems deleted file mode 120000 index 7eaa34e4a8..0000000000 --- a/Lang/PascalABC.NET/Pathological-floating-point-problems +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pathological-floating-point-problems/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pells-equation b/Lang/PascalABC.NET/Pells-equation deleted file mode 120000 index 1729f4ebb8..0000000000 --- a/Lang/PascalABC.NET/Pells-equation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pells-equation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Perfect-shuffle b/Lang/PascalABC.NET/Perfect-shuffle deleted file mode 120000 index 5ea5d5cf28..0000000000 --- a/Lang/PascalABC.NET/Perfect-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-shuffle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Perfect-totient-numbers b/Lang/PascalABC.NET/Perfect-totient-numbers deleted file mode 120000 index 8aae312612..0000000000 --- a/Lang/PascalABC.NET/Perfect-totient-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-totient-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Permutation-test b/Lang/PascalABC.NET/Permutation-test deleted file mode 120000 index 38efc59733..0000000000 --- a/Lang/PascalABC.NET/Permutation-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutation-test/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Permutations b/Lang/PascalABC.NET/Permutations deleted file mode 120000 index e1329591d7..0000000000 --- a/Lang/PascalABC.NET/Permutations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Permutations-Derangements b/Lang/PascalABC.NET/Permutations-Derangements deleted file mode 120000 index 4c7dd2b64b..0000000000 --- a/Lang/PascalABC.NET/Permutations-Derangements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations-Derangements/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pick-random-element b/Lang/PascalABC.NET/Pick-random-element deleted file mode 120000 index 9dd6351bad..0000000000 --- a/Lang/PascalABC.NET/Pick-random-element +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pick-random-element/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Plot-coordinate-pairs b/Lang/PascalABC.NET/Plot-coordinate-pairs deleted file mode 120000 index 4d0282311b..0000000000 --- a/Lang/PascalABC.NET/Plot-coordinate-pairs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Plot-coordinate-pairs/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Pointers-and-references b/Lang/PascalABC.NET/Pointers-and-references deleted file mode 120000 index 6985ca1666..0000000000 --- a/Lang/PascalABC.NET/Pointers-and-references +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pointers-and-references/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Polymorphic-copy b/Lang/PascalABC.NET/Polymorphic-copy deleted file mode 120000 index 7ed8b814ad..0000000000 --- a/Lang/PascalABC.NET/Polymorphic-copy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polymorphic-copy/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Polymorphism b/Lang/PascalABC.NET/Polymorphism deleted file mode 120000 index 4996bdacfd..0000000000 --- a/Lang/PascalABC.NET/Polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polymorphism/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Population-count b/Lang/PascalABC.NET/Population-count deleted file mode 120000 index 742c56a591..0000000000 --- a/Lang/PascalABC.NET/Population-count +++ /dev/null @@ -1 +0,0 @@ -../../Task/Population-count/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Power-set b/Lang/PascalABC.NET/Power-set deleted file mode 120000 index 042d839f30..0000000000 --- a/Lang/PascalABC.NET/Power-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Power-set/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Primality-by-trial-division b/Lang/PascalABC.NET/Primality-by-trial-division deleted file mode 120000 index 62ca027b6e..0000000000 --- a/Lang/PascalABC.NET/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Prime-decomposition b/Lang/PascalABC.NET/Prime-decomposition deleted file mode 120000 index ea96188341..0000000000 --- a/Lang/PascalABC.NET/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Program-name b/Lang/PascalABC.NET/Program-name deleted file mode 120000 index 6bdce5a90a..0000000000 --- a/Lang/PascalABC.NET/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Program-termination b/Lang/PascalABC.NET/Program-termination deleted file mode 120000 index 63645717ea..0000000000 --- a/Lang/PascalABC.NET/Program-termination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-termination/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Queue-Definition b/Lang/PascalABC.NET/Queue-Definition deleted file mode 120000 index efb10e6df2..0000000000 --- a/Lang/PascalABC.NET/Queue-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Queue-Definition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Queue-Usage b/Lang/PascalABC.NET/Queue-Usage deleted file mode 120000 index eab42cf449..0000000000 --- a/Lang/PascalABC.NET/Queue-Usage +++ /dev/null @@ -1 +0,0 @@ -../../Task/Queue-Usage/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Quine b/Lang/PascalABC.NET/Quine deleted file mode 120000 index 98ce8f9f2f..0000000000 --- a/Lang/PascalABC.NET/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Quoting-constructs b/Lang/PascalABC.NET/Quoting-constructs deleted file mode 120000 index 971db935d4..0000000000 --- a/Lang/PascalABC.NET/Quoting-constructs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quoting-constructs/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/RPG-attributes-generator b/Lang/PascalABC.NET/RPG-attributes-generator deleted file mode 120000 index ddbe45c835..0000000000 --- a/Lang/PascalABC.NET/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Radical-of-an-integer b/Lang/PascalABC.NET/Radical-of-an-integer deleted file mode 120000 index 430a252ecf..0000000000 --- a/Lang/PascalABC.NET/Radical-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Radical-of-an-integer/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Ramer-Douglas-Peucker-line-simplification b/Lang/PascalABC.NET/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index 31e2b26ec5..0000000000 --- a/Lang/PascalABC.NET/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Random-numbers b/Lang/PascalABC.NET/Random-numbers deleted file mode 120000 index da187d2cc0..0000000000 --- a/Lang/PascalABC.NET/Random-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-numbers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Read-a-file-character-by-character-UTF8 b/Lang/PascalABC.NET/Read-a-file-character-by-character-UTF8 deleted file mode 120000 index a425a12499..0000000000 --- a/Lang/PascalABC.NET/Read-a-file-character-by-character-UTF8 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-character-by-character-UTF8/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Read-a-file-line-by-line b/Lang/PascalABC.NET/Read-a-file-line-by-line deleted file mode 120000 index bd96f90ae1..0000000000 --- a/Lang/PascalABC.NET/Read-a-file-line-by-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-line-by-line/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Read-a-specific-line-from-a-file b/Lang/PascalABC.NET/Read-a-specific-line-from-a-file deleted file mode 120000 index 28703147aa..0000000000 --- a/Lang/PascalABC.NET/Read-a-specific-line-from-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-specific-line-from-a-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Read-entire-file b/Lang/PascalABC.NET/Read-entire-file deleted file mode 120000 index 20a95b9d77..0000000000 --- a/Lang/PascalABC.NET/Read-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-entire-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Real-constants-and-functions b/Lang/PascalABC.NET/Real-constants-and-functions deleted file mode 120000 index a6e7dce16d..0000000000 --- a/Lang/PascalABC.NET/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Reflection-List-methods b/Lang/PascalABC.NET/Reflection-List-methods deleted file mode 120000 index 7e40bca2fa..0000000000 --- a/Lang/PascalABC.NET/Reflection-List-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-methods/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Reflection-List-properties b/Lang/PascalABC.NET/Reflection-List-properties deleted file mode 120000 index ed60f425f0..0000000000 --- a/Lang/PascalABC.NET/Reflection-List-properties +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reflection-List-properties/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Regular-expressions b/Lang/PascalABC.NET/Regular-expressions deleted file mode 120000 index a3ccbe1574..0000000000 --- a/Lang/PascalABC.NET/Regular-expressions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Regular-expressions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Remove-duplicate-elements b/Lang/PascalABC.NET/Remove-duplicate-elements deleted file mode 120000 index 6f37a5852e..0000000000 --- a/Lang/PascalABC.NET/Remove-duplicate-elements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Remove-duplicate-elements/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Remove-lines-from-a-file b/Lang/PascalABC.NET/Remove-lines-from-a-file deleted file mode 120000 index 6e76bee372..0000000000 --- a/Lang/PascalABC.NET/Remove-lines-from-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Remove-lines-from-a-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Rename-a-file b/Lang/PascalABC.NET/Rename-a-file deleted file mode 120000 index e7599165d6..0000000000 --- a/Lang/PascalABC.NET/Rename-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rename-a-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Repeat b/Lang/PascalABC.NET/Repeat deleted file mode 120000 index e16283f972..0000000000 --- a/Lang/PascalABC.NET/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Repeat-a-string b/Lang/PascalABC.NET/Repeat-a-string deleted file mode 120000 index c21e0bfde3..0000000000 --- a/Lang/PascalABC.NET/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Return-multiple-values b/Lang/PascalABC.NET/Return-multiple-values deleted file mode 120000 index 5178c8dd1d..0000000000 --- a/Lang/PascalABC.NET/Return-multiple-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Return-multiple-values/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Reverse-a-string b/Lang/PascalABC.NET/Reverse-a-string deleted file mode 120000 index 8e67838296..0000000000 --- a/Lang/PascalABC.NET/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Reverse-words-in-a-string b/Lang/PascalABC.NET/Reverse-words-in-a-string deleted file mode 120000 index aa82b64f3b..0000000000 --- a/Lang/PascalABC.NET/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Roman-numerals-Decode b/Lang/PascalABC.NET/Roman-numerals-Decode deleted file mode 120000 index 990d667ad0..0000000000 --- a/Lang/PascalABC.NET/Roman-numerals-Decode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roman-numerals-Decode/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Roman-numerals-Encode b/Lang/PascalABC.NET/Roman-numerals-Encode deleted file mode 120000 index c8f15e15fa..0000000000 --- a/Lang/PascalABC.NET/Roman-numerals-Encode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roman-numerals-Encode/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Roots-of-unity b/Lang/PascalABC.NET/Roots-of-unity deleted file mode 120000 index 31b7a73b39..0000000000 --- a/Lang/PascalABC.NET/Roots-of-unity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roots-of-unity/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Rosetta-Code-Rank-languages-by-popularity b/Lang/PascalABC.NET/Rosetta-Code-Rank-languages-by-popularity deleted file mode 120000 index 55aa7d4f0c..0000000000 --- a/Lang/PascalABC.NET/Rosetta-Code-Rank-languages-by-popularity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Rank-languages-by-popularity/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Rot-13 b/Lang/PascalABC.NET/Rot-13 deleted file mode 120000 index f7c9e778c9..0000000000 --- a/Lang/PascalABC.NET/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Scope-modifiers b/Lang/PascalABC.NET/Scope-modifiers deleted file mode 120000 index eb11f44070..0000000000 --- a/Lang/PascalABC.NET/Scope-modifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Scope-modifiers/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Search-a-list-of-records b/Lang/PascalABC.NET/Search-a-list-of-records deleted file mode 120000 index 7e72a33d4d..0000000000 --- a/Lang/PascalABC.NET/Search-a-list-of-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list-of-records/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Send-an-unknown-method-call b/Lang/PascalABC.NET/Send-an-unknown-method-call deleted file mode 120000 index 2e049c05b3..0000000000 --- a/Lang/PascalABC.NET/Send-an-unknown-method-call +++ /dev/null @@ -1 +0,0 @@ -../../Task/Send-an-unknown-method-call/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sequence-of-primes-by-trial-division b/Lang/PascalABC.NET/Sequence-of-primes-by-trial-division deleted file mode 120000 index 4182c218d4..0000000000 --- a/Lang/PascalABC.NET/Sequence-of-primes-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primes-by-trial-division/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Short-circuit-evaluation b/Lang/PascalABC.NET/Short-circuit-evaluation deleted file mode 120000 index 582c107471..0000000000 --- a/Lang/PascalABC.NET/Short-circuit-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Short-circuit-evaluation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sierpinski-triangle b/Lang/PascalABC.NET/Sierpinski-triangle deleted file mode 120000 index 7eb8f22264..0000000000 --- a/Lang/PascalABC.NET/Sierpinski-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sieve-of-Eratosthenes b/Lang/PascalABC.NET/Sieve-of-Eratosthenes deleted file mode 120000 index c9a2623742..0000000000 --- a/Lang/PascalABC.NET/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Simple-windowed-application b/Lang/PascalABC.NET/Simple-windowed-application deleted file mode 120000 index a619cd32f7..0000000000 --- a/Lang/PascalABC.NET/Simple-windowed-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-windowed-application/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Singly-linked-list-Element-definition b/Lang/PascalABC.NET/Singly-linked-list-Element-definition deleted file mode 120000 index 71d3f5d628..0000000000 --- a/Lang/PascalABC.NET/Singly-linked-list-Element-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-definition/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Singly-linked-list-Element-insertion b/Lang/PascalABC.NET/Singly-linked-list-Element-insertion deleted file mode 120000 index f60548d528..0000000000 --- a/Lang/PascalABC.NET/Singly-linked-list-Element-insertion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-insertion/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sleep b/Lang/PascalABC.NET/Sleep deleted file mode 120000 index d8f830cd4f..0000000000 --- a/Lang/PascalABC.NET/Sleep +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleep/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sort-an-array-of-composite-structures b/Lang/PascalABC.NET/Sort-an-array-of-composite-structures deleted file mode 120000 index e0459e8577..0000000000 --- a/Lang/PascalABC.NET/Sort-an-array-of-composite-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-array-of-composite-structures/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sort-an-integer-array b/Lang/PascalABC.NET/Sort-an-integer-array deleted file mode 120000 index e2137f1191..0000000000 --- a/Lang/PascalABC.NET/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sort-three-variables b/Lang/PascalABC.NET/Sort-three-variables deleted file mode 120000 index 2143247222..0000000000 --- a/Lang/PascalABC.NET/Sort-three-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-three-variables/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sort-using-a-custom-comparator b/Lang/PascalABC.NET/Sort-using-a-custom-comparator deleted file mode 120000 index a2ade4323b..0000000000 --- a/Lang/PascalABC.NET/Sort-using-a-custom-comparator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-using-a-custom-comparator/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sorting-algorithms-Bubble-sort b/Lang/PascalABC.NET/Sorting-algorithms-Bubble-sort deleted file mode 120000 index 75fb7e1472..0000000000 --- a/Lang/PascalABC.NET/Sorting-algorithms-Bubble-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bubble-sort/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sorting-algorithms-Quicksort b/Lang/PascalABC.NET/Sorting-algorithms-Quicksort deleted file mode 120000 index d84582d974..0000000000 --- a/Lang/PascalABC.NET/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Special-variables b/Lang/PascalABC.NET/Special-variables deleted file mode 120000 index 00db4953ba..0000000000 --- a/Lang/PascalABC.NET/Special-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Special-variables/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Split-a-character-string-based-on-change-of-character b/Lang/PascalABC.NET/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index b7c7bef74b..0000000000 --- a/Lang/PascalABC.NET/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Stack b/Lang/PascalABC.NET/Stack deleted file mode 120000 index 71f695fe1b..0000000000 --- a/Lang/PascalABC.NET/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Stack-traces b/Lang/PascalABC.NET/Stack-traces deleted file mode 120000 index b6976dc3e0..0000000000 --- a/Lang/PascalABC.NET/Stack-traces +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack-traces/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Statistics-Basic b/Lang/PascalABC.NET/Statistics-Basic deleted file mode 120000 index 5ef44d7d18..0000000000 --- a/Lang/PascalABC.NET/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/String-append b/Lang/PascalABC.NET/String-append deleted file mode 120000 index 78fd361243..0000000000 --- a/Lang/PascalABC.NET/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/String-case b/Lang/PascalABC.NET/String-case deleted file mode 120000 index 980e55192e..0000000000 --- a/Lang/PascalABC.NET/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/String-concatenation b/Lang/PascalABC.NET/String-concatenation deleted file mode 120000 index d7b52bf492..0000000000 --- a/Lang/PascalABC.NET/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/String-interpolation-included- b/Lang/PascalABC.NET/String-interpolation-included- deleted file mode 120000 index 6a1179d384..0000000000 --- a/Lang/PascalABC.NET/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/String-length b/Lang/PascalABC.NET/String-length deleted file mode 120000 index 1bc629e3ec..0000000000 --- a/Lang/PascalABC.NET/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/String-matching b/Lang/PascalABC.NET/String-matching deleted file mode 120000 index f031375ab5..0000000000 --- a/Lang/PascalABC.NET/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/String-prepend b/Lang/PascalABC.NET/String-prepend deleted file mode 120000 index 205b3e4638..0000000000 --- a/Lang/PascalABC.NET/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Strip-a-set-of-characters-from-a-string b/Lang/PascalABC.NET/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index 5548033cde..0000000000 --- a/Lang/PascalABC.NET/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Strip-block-comments b/Lang/PascalABC.NET/Strip-block-comments deleted file mode 120000 index 7a95085577..0000000000 --- a/Lang/PascalABC.NET/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Strip-comments-from-a-string b/Lang/PascalABC.NET/Strip-comments-from-a-string deleted file mode 120000 index c415553cce..0000000000 --- a/Lang/PascalABC.NET/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Strip-control-codes-and-extended-characters-from-a-string b/Lang/PascalABC.NET/Strip-control-codes-and-extended-characters-from-a-string deleted file mode 120000 index 3175c3c416..0000000000 --- a/Lang/PascalABC.NET/Strip-control-codes-and-extended-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-control-codes-and-extended-characters-from-a-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Strip-whitespace-from-a-string-Top-and-tail b/Lang/PascalABC.NET/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index 075fc6a71b..0000000000 --- a/Lang/PascalABC.NET/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Substitution-cipher b/Lang/PascalABC.NET/Substitution-cipher deleted file mode 120000 index 5c9f1bb54c..0000000000 --- a/Lang/PascalABC.NET/Substitution-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substitution-cipher/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Substring b/Lang/PascalABC.NET/Substring deleted file mode 120000 index f2a607112d..0000000000 --- a/Lang/PascalABC.NET/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Substring-Top-and-tail b/Lang/PascalABC.NET/Substring-Top-and-tail deleted file mode 120000 index b64b9c4948..0000000000 --- a/Lang/PascalABC.NET/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sudan-function b/Lang/PascalABC.NET/Sudan-function deleted file mode 120000 index 2a6cccd8a5..0000000000 --- a/Lang/PascalABC.NET/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sum-and-product-of-an-array b/Lang/PascalABC.NET/Sum-and-product-of-an-array deleted file mode 120000 index 5bf49387d6..0000000000 --- a/Lang/PascalABC.NET/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sum-digits-of-an-integer b/Lang/PascalABC.NET/Sum-digits-of-an-integer deleted file mode 120000 index 84d553224a..0000000000 --- a/Lang/PascalABC.NET/Sum-digits-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-digits-of-an-integer/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sum-multiples-of-3-and-5 b/Lang/PascalABC.NET/Sum-multiples-of-3-and-5 deleted file mode 120000 index 3792b87fe0..0000000000 --- a/Lang/PascalABC.NET/Sum-multiples-of-3-and-5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-multiples-of-3-and-5/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sum-of-a-series b/Lang/PascalABC.NET/Sum-of-a-series deleted file mode 120000 index 1c91b8532b..0000000000 --- a/Lang/PascalABC.NET/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sum-of-elements-below-main-diagonal-of-matrix b/Lang/PascalABC.NET/Sum-of-elements-below-main-diagonal-of-matrix deleted file mode 120000 index 055fd11a3e..0000000000 --- a/Lang/PascalABC.NET/Sum-of-elements-below-main-diagonal-of-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-elements-below-main-diagonal-of-matrix/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Sum-of-squares b/Lang/PascalABC.NET/Sum-of-squares deleted file mode 120000 index 0d6573d1ec..0000000000 --- a/Lang/PascalABC.NET/Sum-of-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-squares/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Symmetric-difference b/Lang/PascalABC.NET/Symmetric-difference deleted file mode 120000 index 6a0af3805f..0000000000 --- a/Lang/PascalABC.NET/Symmetric-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Symmetric-difference/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/System-time b/Lang/PascalABC.NET/System-time deleted file mode 120000 index b4cf3d92cb..0000000000 --- a/Lang/PascalABC.NET/System-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/System-time/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Take-notes-on-the-command-line b/Lang/PascalABC.NET/Take-notes-on-the-command-line deleted file mode 120000 index ce2c9c51c4..0000000000 --- a/Lang/PascalABC.NET/Take-notes-on-the-command-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Take-notes-on-the-command-line/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Tau-function b/Lang/PascalABC.NET/Tau-function deleted file mode 120000 index fcb633b959..0000000000 --- a/Lang/PascalABC.NET/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Tau-number b/Lang/PascalABC.NET/Tau-number deleted file mode 120000 index 4be8374dc0..0000000000 --- a/Lang/PascalABC.NET/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Teacup-rim-text b/Lang/PascalABC.NET/Teacup-rim-text deleted file mode 120000 index 408b28d813..0000000000 --- a/Lang/PascalABC.NET/Teacup-rim-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Teacup-rim-text/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Temperature-conversion b/Lang/PascalABC.NET/Temperature-conversion deleted file mode 120000 index 607c5a8aa1..0000000000 --- a/Lang/PascalABC.NET/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Terminal-control-Clear-the-screen b/Lang/PascalABC.NET/Terminal-control-Clear-the-screen deleted file mode 120000 index ba3f668e83..0000000000 --- a/Lang/PascalABC.NET/Terminal-control-Clear-the-screen +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Clear-the-screen/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Terminal-control-Coloured-text b/Lang/PascalABC.NET/Terminal-control-Coloured-text deleted file mode 120000 index 26edde266f..0000000000 --- a/Lang/PascalABC.NET/Terminal-control-Coloured-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Coloured-text/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Terminal-control-Cursor-movement b/Lang/PascalABC.NET/Terminal-control-Cursor-movement deleted file mode 120000 index 75b038bfd2..0000000000 --- a/Lang/PascalABC.NET/Terminal-control-Cursor-movement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Cursor-movement/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Terminal-control-Cursor-positioning b/Lang/PascalABC.NET/Terminal-control-Cursor-positioning deleted file mode 120000 index 440e989070..0000000000 --- a/Lang/PascalABC.NET/Terminal-control-Cursor-positioning +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Cursor-positioning/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Terminal-control-Dimensions b/Lang/PascalABC.NET/Terminal-control-Dimensions deleted file mode 120000 index 294b1506e4..0000000000 --- a/Lang/PascalABC.NET/Terminal-control-Dimensions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Dimensions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Terminal-control-Display-an-extended-character b/Lang/PascalABC.NET/Terminal-control-Display-an-extended-character deleted file mode 120000 index 51ff55a04f..0000000000 --- a/Lang/PascalABC.NET/Terminal-control-Display-an-extended-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Display-an-extended-character/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Terminal-control-Hiding-the-cursor b/Lang/PascalABC.NET/Terminal-control-Hiding-the-cursor deleted file mode 120000 index 0f79ee5b6d..0000000000 --- a/Lang/PascalABC.NET/Terminal-control-Hiding-the-cursor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Hiding-the-cursor/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Terminal-control-Ringing-the-terminal-bell b/Lang/PascalABC.NET/Terminal-control-Ringing-the-terminal-bell deleted file mode 120000 index dbea7c8c1b..0000000000 --- a/Lang/PascalABC.NET/Terminal-control-Ringing-the-terminal-bell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Ringing-the-terminal-bell/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Test-a-function b/Lang/PascalABC.NET/Test-a-function deleted file mode 120000 index 561aaeccdd..0000000000 --- a/Lang/PascalABC.NET/Test-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Test-a-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Time-a-function b/Lang/PascalABC.NET/Time-a-function deleted file mode 120000 index 2c161d3642..0000000000 --- a/Lang/PascalABC.NET/Time-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Time-a-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Tokenize-a-string b/Lang/PascalABC.NET/Tokenize-a-string deleted file mode 120000 index 790ef58cc8..0000000000 --- a/Lang/PascalABC.NET/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Top-rank-per-group b/Lang/PascalABC.NET/Top-rank-per-group deleted file mode 120000 index 09da721479..0000000000 --- a/Lang/PascalABC.NET/Top-rank-per-group +++ /dev/null @@ -1 +0,0 @@ -../../Task/Top-rank-per-group/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Totient-function b/Lang/PascalABC.NET/Totient-function deleted file mode 120000 index cbbd5dcdf5..0000000000 --- a/Lang/PascalABC.NET/Totient-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Totient-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Towers-of-Hanoi b/Lang/PascalABC.NET/Towers-of-Hanoi deleted file mode 120000 index 2c8ecfee74..0000000000 --- a/Lang/PascalABC.NET/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Trabb-Pardo-Knuth-algorithm b/Lang/PascalABC.NET/Trabb-Pardo-Knuth-algorithm deleted file mode 120000 index c211c9d9e3..0000000000 --- a/Lang/PascalABC.NET/Trabb-Pardo-Knuth-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trabb-Pardo-Knuth-algorithm/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Transliterate-English-text-using-the-Greek-alphabet b/Lang/PascalABC.NET/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index d24a02b5a0..0000000000 --- a/Lang/PascalABC.NET/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Tree-datastructures b/Lang/PascalABC.NET/Tree-datastructures deleted file mode 120000 index 2b711cc827..0000000000 --- a/Lang/PascalABC.NET/Tree-datastructures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-datastructures/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Tree-traversal b/Lang/PascalABC.NET/Tree-traversal deleted file mode 120000 index 7b8540d436..0000000000 --- a/Lang/PascalABC.NET/Tree-traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-traversal/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Trigonometric-functions b/Lang/PascalABC.NET/Trigonometric-functions deleted file mode 120000 index 90b97e3cc1..0000000000 --- a/Lang/PascalABC.NET/Trigonometric-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trigonometric-functions/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Truncate-a-file b/Lang/PascalABC.NET/Truncate-a-file deleted file mode 120000 index e41951adf8..0000000000 --- a/Lang/PascalABC.NET/Truncate-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncate-a-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Twos-complement b/Lang/PascalABC.NET/Twos-complement deleted file mode 120000 index b0daea87d5..0000000000 --- a/Lang/PascalABC.NET/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/URL-decoding b/Lang/PascalABC.NET/URL-decoding deleted file mode 120000 index bb79d3d611..0000000000 --- a/Lang/PascalABC.NET/URL-decoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-decoding/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/URL-encoding b/Lang/PascalABC.NET/URL-encoding deleted file mode 120000 index 4e193b1e1d..0000000000 --- a/Lang/PascalABC.NET/URL-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-encoding/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Undefined-values b/Lang/PascalABC.NET/Undefined-values deleted file mode 120000 index 799f03aa4e..0000000000 --- a/Lang/PascalABC.NET/Undefined-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Undefined-values/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Unicode-strings b/Lang/PascalABC.NET/Unicode-strings deleted file mode 120000 index 1596fd402d..0000000000 --- a/Lang/PascalABC.NET/Unicode-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-strings/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Unicode-variable-names b/Lang/PascalABC.NET/Unicode-variable-names deleted file mode 120000 index 356bcbe63e..0000000000 --- a/Lang/PascalABC.NET/Unicode-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-variable-names/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/User-input-Text b/Lang/PascalABC.NET/User-input-Text deleted file mode 120000 index c49d403c30..0000000000 --- a/Lang/PascalABC.NET/User-input-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Text/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Variables b/Lang/PascalABC.NET/Variables deleted file mode 120000 index fb0f3cb656..0000000000 --- a/Lang/PascalABC.NET/Variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variables/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Variadic-function b/Lang/PascalABC.NET/Variadic-function deleted file mode 120000 index c1bc454958..0000000000 --- a/Lang/PascalABC.NET/Variadic-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variadic-function/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Vector b/Lang/PascalABC.NET/Vector deleted file mode 120000 index d45a06a593..0000000000 --- a/Lang/PascalABC.NET/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Vector-products b/Lang/PascalABC.NET/Vector-products deleted file mode 120000 index 8bc6e1a1f1..0000000000 --- a/Lang/PascalABC.NET/Vector-products +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector-products/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Walk-a-directory-Non-recursively b/Lang/PascalABC.NET/Walk-a-directory-Non-recursively deleted file mode 120000 index 117d045320..0000000000 --- a/Lang/PascalABC.NET/Walk-a-directory-Non-recursively +++ /dev/null @@ -1 +0,0 @@ -../../Task/Walk-a-directory-Non-recursively/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Walk-a-directory-Recursively b/Lang/PascalABC.NET/Walk-a-directory-Recursively deleted file mode 120000 index 6fba185f99..0000000000 --- a/Lang/PascalABC.NET/Walk-a-directory-Recursively +++ /dev/null @@ -1 +0,0 @@ -../../Task/Walk-a-directory-Recursively/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Window-creation b/Lang/PascalABC.NET/Window-creation deleted file mode 120000 index c656ea2a7f..0000000000 --- a/Lang/PascalABC.NET/Window-creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-creation/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Word-frequency b/Lang/PascalABC.NET/Word-frequency deleted file mode 120000 index eed444f9fc..0000000000 --- a/Lang/PascalABC.NET/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Word-wrap b/Lang/PascalABC.NET/Word-wrap deleted file mode 120000 index b2cbb831f8..0000000000 --- a/Lang/PascalABC.NET/Word-wrap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wrap/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Write-entire-file b/Lang/PascalABC.NET/Write-entire-file deleted file mode 120000 index fb24fa3029..0000000000 --- a/Lang/PascalABC.NET/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Write-to-Windows-event-log b/Lang/PascalABC.NET/Write-to-Windows-event-log deleted file mode 120000 index 556c794eaf..0000000000 --- a/Lang/PascalABC.NET/Write-to-Windows-event-log +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-to-Windows-event-log/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/XML-DOM-serialization b/Lang/PascalABC.NET/XML-DOM-serialization deleted file mode 120000 index ac8822f809..0000000000 --- a/Lang/PascalABC.NET/XML-DOM-serialization +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-DOM-serialization/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/XML-Input b/Lang/PascalABC.NET/XML-Input deleted file mode 120000 index 6c693b433f..0000000000 --- a/Lang/PascalABC.NET/XML-Input +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-Input/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/XML-Output b/Lang/PascalABC.NET/XML-Output deleted file mode 120000 index c33649037e..0000000000 --- a/Lang/PascalABC.NET/XML-Output +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-Output/PascalABC.NET \ No newline at end of file diff --git a/Lang/PascalABC.NET/Zero-to-the-zero-power b/Lang/PascalABC.NET/Zero-to-the-zero-power deleted file mode 120000 index 315543b2a3..0000000000 --- a/Lang/PascalABC.NET/Zero-to-the-zero-power +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zero-to-the-zero-power/PascalABC.NET \ No newline at end of file diff --git a/Lang/Perl/Bioinformatics-base-count b/Lang/Perl/Bioinformatics-base-count new file mode 120000 index 0000000000..38044107bd --- /dev/null +++ b/Lang/Perl/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Perl \ No newline at end of file diff --git a/Lang/Perl/Compare-sorting-algorithms-performance b/Lang/Perl/Compare-sorting-algorithms-performance deleted file mode 120000 index a54a5351fe..0000000000 --- a/Lang/Perl/Compare-sorting-algorithms-performance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-sorting-algorithms-performance/Perl \ No newline at end of file diff --git a/Lang/Perl/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/Perl/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- deleted file mode 120000 index bc2932bdb0..0000000000 --- a/Lang/Perl/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/Perl \ No newline at end of file diff --git a/Lang/Perl/Execute-Computer-Zero b/Lang/Perl/Execute-Computer-Zero deleted file mode 120000 index f5f02da865..0000000000 --- a/Lang/Perl/Execute-Computer-Zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Computer-Zero/Perl \ No newline at end of file diff --git a/Lang/Perl/K-d-tree b/Lang/Perl/K-d-tree deleted file mode 120000 index 1cd4d50962..0000000000 --- a/Lang/Perl/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/Perl \ No newline at end of file diff --git a/Lang/Perl/Machine-code b/Lang/Perl/Machine-code deleted file mode 120000 index 4729cd6042..0000000000 --- a/Lang/Perl/Machine-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Machine-code/Perl \ No newline at end of file diff --git a/Lang/Perl/Meissel-Mertens-constant b/Lang/Perl/Meissel-Mertens-constant new file mode 120000 index 0000000000..d5ec169595 --- /dev/null +++ b/Lang/Perl/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Perl \ No newline at end of file diff --git a/Lang/Perl/Miller-Rabin-primality-test b/Lang/Perl/Miller-Rabin-primality-test new file mode 120000 index 0000000000..f2d8f376aa --- /dev/null +++ b/Lang/Perl/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Perl \ No newline at end of file diff --git a/Lang/Perl/Prime-numbers-whose-neighboring-pairs-are-tetraprimes b/Lang/Perl/Prime-numbers-whose-neighboring-pairs-are-tetraprimes deleted file mode 120000 index fc79cb9bd2..0000000000 --- a/Lang/Perl/Prime-numbers-whose-neighboring-pairs-are-tetraprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-numbers-whose-neighboring-pairs-are-tetraprimes/Perl \ No newline at end of file diff --git a/Lang/Perl/Quaternion-type b/Lang/Perl/Quaternion-type new file mode 120000 index 0000000000..6c26830ce6 --- /dev/null +++ b/Lang/Perl/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Perl \ No newline at end of file diff --git a/Lang/Perl/Search-in-paragraphs-text b/Lang/Perl/Search-in-paragraphs-text deleted file mode 120000 index 3327049060..0000000000 --- a/Lang/Perl/Search-in-paragraphs-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-in-paragraphs-text/Perl \ No newline at end of file diff --git a/Lang/Perl/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Perl/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Perl/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Perl/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Perl/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Perl/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Perl/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Perl/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Perl/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Perl/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Perl/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Perl/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Perl/Singular-value-decomposition b/Lang/Perl/Singular-value-decomposition deleted file mode 120000 index 0fe6468df6..0000000000 --- a/Lang/Perl/Singular-value-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singular-value-decomposition/Perl \ No newline at end of file diff --git a/Lang/Perl/Sorting-Algorithms-Circle-Sort b/Lang/Perl/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..dec6111fc4 --- /dev/null +++ b/Lang/Perl/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Perl \ No newline at end of file diff --git a/Lang/Perl/Steffensens-method b/Lang/Perl/Steffensens-method deleted file mode 120000 index 3b3d8146aa..0000000000 --- a/Lang/Perl/Steffensens-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Steffensens-method/Perl \ No newline at end of file diff --git a/Lang/Perl/Strassens-algorithm b/Lang/Perl/Strassens-algorithm deleted file mode 120000 index 013c3f70b0..0000000000 --- a/Lang/Perl/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Perl \ No newline at end of file diff --git a/Lang/Perl/Tropical-algebra-overloading b/Lang/Perl/Tropical-algebra-overloading deleted file mode 120000 index 380da329d3..0000000000 --- a/Lang/Perl/Tropical-algebra-overloading +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tropical-algebra-overloading/Perl \ No newline at end of file diff --git a/Lang/Phix/00-LANG.txt b/Lang/Phix/00-LANG.txt index 7a127fa93c..cbc88ce28e 100644 --- a/Lang/Phix/00-LANG.txt +++ b/Lang/Phix/00-LANG.txt @@ -11,13 +11,13 @@ |LCT=yes |bnf=http://phix.x10.mx/bnf.php }} -Phix is a self-hosted hybrid interpreter/compiler, developed by Pete Lomax.
    - +Phix is a self-hosted hybrid interpreter/compiler, developed by Pete Lomax. It is very easy to use, and similar to +[https://rosettacode.org/wiki/Category:Euphoria Euphoria]. -On 26th December 2021, Phix became the first language on this site to have [https://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity/Full_list?oldid=294533 submissions for 100%] of all tasks.
    -(On 20th June 2022 [[Wren]] became the second, albeit there are [https://www.rosettacode.org/wiki/Category:WrenGo 13]+[https://rosettacode.org/wiki/Special:Search?search=wren.h&wprov=acrw1_-1 66] of those I have never been able to run.) +On [https://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity/Full_list?oldid=294533 26th December 2021, Phix became the first programming language on this site to have submissions for 100% of all tasks].
    +(On 20th June 2022 [[Wren]] became the second, albeit with [https://www.rosettacode.org/wiki/Category:WrenGo 13]+[https://rosettacode.org/wiki/Special:Search?search=wren.h&wprov=acrw1_-1 66] of those embedded that I, for one, have been unable to run.) -[http://phix.x10.mx/download.php A simple 30MB download] contains a pre-compiled executable, all the sources, and'' '''everything''' ''needed to recompile them, in under 20 seconds. The download also contains a full-featured programmer's editor and about 1000 demos. +[http://phix.x10.mx/download.php A simple 30MB download] contains a pre-compiled executable, all the sources, and'' '''everything''' ''needed to recompile them, in under 20 seconds. The download also contains a full-featured programmer's editor and about 1000 demo programs. You can also [https://replit.com/@PeteLomax1/PhixInterpreter#main.sh run Phix on replit here] (1.0.3 Lnx 64 bit), and several manually transpiled and uploaded entries [https://rosettacode.org/wiki/Category:Phix/online here] diff --git a/Lang/Phix/Bioinformatics-base-count b/Lang/Phix/Bioinformatics-base-count new file mode 120000 index 0000000000..88d72c5b75 --- /dev/null +++ b/Lang/Phix/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Phix \ No newline at end of file diff --git a/Lang/Phix/Meissel-Mertens-constant b/Lang/Phix/Meissel-Mertens-constant new file mode 120000 index 0000000000..a9b8084fb5 --- /dev/null +++ b/Lang/Phix/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Phix \ No newline at end of file diff --git a/Lang/Phix/Miller-Rabin-primality-test b/Lang/Phix/Miller-Rabin-primality-test new file mode 120000 index 0000000000..440728dd57 --- /dev/null +++ b/Lang/Phix/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Phix \ No newline at end of file diff --git a/Lang/Phix/Quaternion-type b/Lang/Phix/Quaternion-type new file mode 120000 index 0000000000..bae473b66e --- /dev/null +++ b/Lang/Phix/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Phix \ No newline at end of file diff --git a/Lang/Phix/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Phix/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Phix/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Phix/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Phix/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Phix/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Phix/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Phix/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Phix/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Phix/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Phix/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Phix/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Phix/Sorting-Algorithms-Circle-Sort b/Lang/Phix/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..2aea38718d --- /dev/null +++ b/Lang/Phix/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Phix \ No newline at end of file diff --git a/Lang/Picat/Bioinformatics-base-count b/Lang/Picat/Bioinformatics-base-count new file mode 120000 index 0000000000..c724eb719d --- /dev/null +++ b/Lang/Picat/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Picat \ No newline at end of file diff --git a/Lang/Picat/Quaternion-type b/Lang/Picat/Quaternion-type new file mode 120000 index 0000000000..e15dda2aeb --- /dev/null +++ b/Lang/Picat/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Picat \ No newline at end of file diff --git a/Lang/Pico-8/00-LANG.txt b/Lang/Pico-8/00-LANG.txt deleted file mode 100644 index 017ddd4004..0000000000 --- a/Lang/Pico-8/00-LANG.txt +++ /dev/null @@ -1 +0,0 @@ -{{stub}}{{language|Pico-8}} \ No newline at end of file diff --git a/Lang/Pico-8/00-META.yaml b/Lang/Pico-8/00-META.yaml deleted file mode 100644 index 5d0c380905..0000000000 --- a/Lang/Pico-8/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Pico-8 diff --git a/Lang/Pico-8/Hello-world-Text b/Lang/Pico-8/Hello-world-Text deleted file mode 120000 index 8a6a254eaa..0000000000 --- a/Lang/Pico-8/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Pico-8 \ No newline at end of file diff --git a/Lang/PicoLisp/Bioinformatics-base-count b/Lang/PicoLisp/Bioinformatics-base-count new file mode 120000 index 0000000000..a4931ebf04 --- /dev/null +++ b/Lang/PicoLisp/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/PicoLisp \ No newline at end of file diff --git a/Lang/PicoLisp/Miller-Rabin-primality-test b/Lang/PicoLisp/Miller-Rabin-primality-test new file mode 120000 index 0000000000..eae524ec57 --- /dev/null +++ b/Lang/PicoLisp/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/PicoLisp \ No newline at end of file diff --git a/Lang/PicoLisp/Quaternion-type b/Lang/PicoLisp/Quaternion-type new file mode 120000 index 0000000000..2120681801 --- /dev/null +++ b/Lang/PicoLisp/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/PicoLisp \ No newline at end of file diff --git a/Lang/Pike/Execute-Brain- b/Lang/Pike/Execute-Brain- deleted file mode 120000 index dd7ee4c73b..0000000000 --- a/Lang/Pike/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Pike \ No newline at end of file diff --git a/Lang/Pike/Miller-Rabin-primality-test b/Lang/Pike/Miller-Rabin-primality-test new file mode 120000 index 0000000000..2cc78451b0 --- /dev/null +++ b/Lang/Pike/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Pike \ No newline at end of file diff --git a/Lang/Plain-English/00-LANG.txt b/Lang/Plain-English/00-LANG.txt index 087f59b9fa..ff86a2a8e2 100644 --- a/Lang/Plain-English/00-LANG.txt +++ b/Lang/Plain-English/00-LANG.txt @@ -25,19 +25,13 @@ or compiled to a self-contained Microsoft Windows .exe file. Here is a list of what you must understand from the start: '''Fully Implemented in Itself:''' It is a single executable, with one or more human readable libraries (also written in Plain English Programming Language) which produces a new stand alone .exe with your new program in it. -The project originally started as an IDE with a built-in compiler. -Over time, this evolved into a separate effort, resulting in a standalone compiler developed as an independent project. -Today, the ecosystem consists of two distinct components: -an IDE that includes its own integrated compiler, and a separate command-line compiler, each maintained independently. +It is NOT a compiler only that takes in source and produces compiled code. +It is NOT an IDE only, that shells out to a compiler. +It is both. There is NO complete source code in another language; the system was bootstrapped in a Pascal-like language (which is no longer available) and was later re-written entirely in Plain English. It is "Machine Code" Low Level: The bootstrap is very basic, only able to copy itself and add raw machine code in Intel hex format, make calls to the operating system, e.g. -Call "kernel32.dll" "SetFilePointer" with - the file [hFile] - and 0 [lDistanceToMove] - and 0 [lpDistanceToMoveHigh] - and 2 [file_end / dwMoveMethod] - returning a result number. +Call "kernel32.dll" "SetFilePointer" with the file and 0 and 0 and 2 [file_end] returning a result number. and call other DLLs e.g. @@ -49,25 +43,21 @@ and it can do a few other things. To run: - Start up. - Clear the screen. - Use medium letters. - Use the fat pen. - Pick a really dark color. - Loop. - Start in the center of the screen. - Turn left 1/32 of the way. - Turn right. - Move 2 inches. - Turn left. - Write "HELLO WORLD". - Refresh the screen. - Lighten the current color about 20 percent. - Add 1 to a count. - If the count is 32, break. - Repeat. - Wait for the escape key. - Shut down. +Start up. +Clear the screen. +Use medium letters. Use the fat pen. +Pick a really dark color. +Loop. +Start in the center of the screen. +Turn left 1/32 of the way. +Turn right. Move 2 inches. Turn left. +Write "HELLO WORLD". +Refresh the screen. +Lighten the current color about 20 percent. +Add 1 to a count. If the count is 32, break. +Repeat. +Wait for the escape key. +Shut down. Note that standard English punctuation, word types, and sentence structure are all used. @@ -89,10 +79,10 @@ Intel $8B85080000008B008B9D0C0000000103. And yes, that is 80x86 machine code in Intel hex format. It decompiles to -mov eax, [ebp+8] ; $8B8508000000 -> Load the value at (EBP + 8) into EAX (1st function argument) -mov eax, [eax] ; $8B00 -> Dereference EAX (load the value from the address stored in EAX) -mov ebx, [ebp+12] ; $8B9D0C000000-> Load the value at (EBP + 12) into EBX (2nd function argument) -add [ebx],eax ; $0103 -> Add EAX to the value stored at the address in EBX +mov eax, [ebp+8] ; $8B8508000000 -> load the current stack address + 8 into the accumulator +mov eax, [eax] ; $8B00 -> load memory pointed to by accumulator into accumulator +mov ebx, [ebp+12] ; $8B9D0C000000-> load the current stack address + 12 into working register +add [ebx],eax ; $0103 -> add accumulator to memory pointed to by working register So the language has stacked pointers (all parameters are passed by reference) to the two numbers via a number to another number and then it calls this code which gets the first number, and adds it to the second. Hopefully this example shows how high level and low level Plain English is at the same time. @@ -128,7 +118,7 @@ The great foo is a number. then values may be assigned, inside a routine -Put 0 into the great foo. +Put 0 into the great foo or be passed by address... @@ -182,8 +172,8 @@ Type reductions proceed, recursively, from left to right, until a match is found To decide if a number is greater than another number: - If the first number is greater than the second number, say yes. - Say no. +If the first number is greater than the second number, say yes. +Say no. '''Function:''' A routine that extracts, calculates, or otherwise derives a value from a passed parameter. Function headers take this form: @@ -197,14 +187,14 @@ Unlike procedures (which are called via imperative sentences) and deciders (whic '''Statements''' From the instruction manual (see link below): -(1) The compiler really only understand five kinds of sentences: -(a) Type definitions, which always start with A, AN, or SOME; -(b) Global variable definitions, which always start with THE; -(c) Routine headers, which always start with TO, which can contain: -(d) Conditional statements, which always start with IF; and -(e) Imperative statements, which start with anything else. +(1) I really only understand five kinds of sentences: +(a) type definitions, which always start with A, AN, or SOME; +(b) global variable definitions, which always start with THE; +(c) routine headers, which always start with TO, which can contain: +(d) conditional statements, which always start with IF; and +(e) imperative statements, which start with anything else. -(2) I treat as a name (that is, a variable, argument, parameter or a type) anything after A, AN, ANOTHER, SOME, or THE, up to: +(2) I treat as a name anything after A, AN, ANOTHER, SOME, or THE, up to: (a) any simple verb, like IS, ARE, CAN, or DO, or (b) any conjunction, like AND or OR, or @@ -221,9 +211,7 @@ From the instruction manual (see link below): The noodle built into Plain English is simply not useful enough by itself, and therefore libraries were created to assist in writing Rosetta Code tasks in Plain English. See also: -https://github.com/Folds/english A work in progress to normalize Plain English into a more standard compiler. -For documentation on the language in general, see the instructions.pdf file in the documentation folder. -The author objects (see the issues) +https://github.com/Folds/english A work in progress to normalize Plain English into a more standard compiler. For documentation on the language in general, see the instructions.pdf file in the documentation folder. The author objects (see the issues) https://forums.parallax.com/discussion/163792/plain-english-programming a long rambling and unproductive (but educational, so productive in that sense) discussion of Plain English with it's author and proponents of a bare metal processor. {| class="wikitable" @@ -245,219 +233,9 @@ https://forums.parallax.com/discussion/163792/plain-english-programming a long r * Complete IDE Download ** [http://www.Osmosian.com/cal-4700.zip cal-4700.zip] *** requires Microsoft Windows -* Plain English Compiler (CMD / Command Line) -** [https://github.com/elisson-zlq3x/Plain-English-Compiler GitHub repo] ==Discussion== * [https://forums.parallax.com/discussion/163792/plain-english-programming Plain English Programming] ==Todo== -[[Reports:Tasks_not_implemented_in_PlainEnglish]] - -=Plain English Sources= -[http://osmosian.com/cal-4700.zip IDE] -and [https://github.com/elisson-zlq3x/Plain-English-Compiler Compiler]. -==Creators== -* Gerry Rzeppa (Father) -[https://www.quora.com/profile/Gerry-Rzeppa Quora Profile] -[https://www.linkedin.com/in/gerry-rzeppa-17b8051b/ LinkedIn Profile] -[https://twitter.com/gerryrzeppa Twitter Profile] -[https://github.com/GerryRzeppa GitHub Profile] -* Dan Rzeppa (Son) -[https://github.com/danrzeppa GitHub Profile] - -==Contributors== -* Elender Góis Gallas (Plain Portuguese Creator) -[https://www.quora.com/profile/Elender-G%C3%B3is-Gallas-%E3%82%A8%E3%83%AC%E3%83%B3%E3%83%87-%E3%82%AC%E3%83%A9%E3%82%B9 Quora Profile] -[https://www.linkedin.com/in/elender/ LinkedIn Profile] -[https://twitter.com/elenderg Twitter Profile] -[https://github.com/elenderg GitHub Profile] -* Pablo Cayuela (Plain Spanish Creator) -[https://www.linkedin.com/in/pablo-cayuela-a42b019/ LinkedIn Profile] - -==Copyright Owner== -* The Osmosian Order -** [http://www.Osmosian.com/ The Osmosian Order of Plain English Programmers] Brochure -*** [http://www.osmosian.com/manifesto.pdf The Osmosian Manifesto] -** [https://OsmosianPlainEnglishProgramming.blog/ Wordpress Blog]
    In chronological order: -*** 2018 -**** 05 -***** 01 [https://OsmosianPlainEnglishProgramming.blog/2018/05/01/a-solution-to-the-fatal-flaw-in-relational-database-systems/ A Solution to the Fatal Flaw in Relational Database Systems] -***** 02 [https://OsmosianPlainEnglishProgramming.blog/2018/05/02/plain-english-programming-fractal-forests/ Fractal Forests] -***** 02 [https://OsmosianPlainEnglishProgramming.blog/2018/05/02/plain-english-programming-is-a-picture-worth-1000-words/ Plain English Programming — Is a Picture Worth 1000 Words?] -***** 03 [https://OsmosianPlainEnglishProgramming.blog/2018/05/03/plain-english-programming-robotics/ Robotics] -***** 03 [https://OsmosianPlainEnglishProgramming.blog/2018/05/03/plain-english-programming-a-wysiwyg-document-editor/ A WYSIWYG Document Editor] -***** 04 [https://OsmosianPlainEnglishProgramming.blog/2018/05/04/plain-english-programming-musings-on-the-a-in-ai/ Musings on the “A” in “AI”] -***** 04 [https://OsmosianPlainEnglishProgramming.blog/2018/05/04/plain-english-programming-a-simple-merge-sort/ Robotics] -***** 05 [https://OsmosianPlainEnglishProgramming.blog/2018/05/05/plain-english-programming-smoothing-polygons/ Plain English Programming — Smoothing Polygons] -***** 05 [https://OsmosianPlainEnglishProgramming.blog/2018/05/05/plain-english-programming-kobayashi-maru-primes/ Kobayashi Maru Primes] -***** 06 [https://OsmosianPlainEnglishProgramming.blog/2018/05/06/plain-english-programming-nested-ifs/ Plain English Programming — Nested IFs] -***** 06 [https://OsmosianPlainEnglishProgramming.blog/2018/05/06/plain-english-programming-the-malevolent-mathemagician/ Plain English Programming — The Malevolent Mathemagician] -***** 07 [https://OsmosianPlainEnglishProgramming.blog/2018/05/07/plain-english-programming-parsing-with-riders/ Parsing with Riders] -***** 07 [https://OsmosianPlainEnglishProgramming.blog/2018/05/07/plain-english-programming-jackson-pollocks-alphabet-soup/ Plain English Programming — Jackson Pollock’s Alphabet Soup] -***** 08 [https://OsmosianPlainEnglishProgramming.blog/2018/05/08/plain-english-programming-random-numbers/ Random Numbers] -***** 08 [https://OsmosianPlainEnglishProgramming.blog/2018/05/08/plain-english-programming-sierpinski-koch/ Sierpinski & Koch] -***** 09 [https://OsmosianPlainEnglishProgramming.blog/2018/05/09/plain-english-programming-the-travelling-salesman/ The Travelling Salesman] -***** 09 [https://OsmosianPlainEnglishProgramming.blog/2018/05/09/plain-english-programming-a-jigsaw-puzzle/ A Jigsaw Puzzle] -***** 10 [https://OsmosianPlainEnglishProgramming.blog/2018/05/10/plain-english-programming-anagrams/ Anagrams] -***** 11 [https://OsmosianPlainEnglishProgramming.blog/2018/05/11/plain-english-programming-the-amazing-multimaze/ The Amazing MultiMaze] -***** 12 [https://OsmosianPlainEnglishProgramming.blog/2018/05/12/plain-english-programming-painting-like-monet/ Painting Like Monet] -***** 13 [https://OsmosianPlainEnglishProgramming.blog/2018/05/13/plain-english-programming-bresenhams-circle-drawing-algorithm/ Bresenham’s Circle Drawing Algorithm] -***** 14 [https://OsmosianPlainEnglishProgramming.blog/2018/05/14/plain-english-programming-hiding-in-plain-sight/ Hiding in Plain Sight] -***** 14 [https://OsmosianPlainEnglishProgramming.blog/2018/05/14/plain-english-programming-sudoku-solver/ Sudoku Solver] -***** 15 [https://OsmosianPlainEnglishProgramming.blog/2018/05/15/plain-english-programming-teaching-kids/ Teaching Kids to Program] -***** 16 [https://OsmosianPlainEnglishProgramming.blog/2018/05/16/the-journey-begins/ Plain English Programming] -==IDE including Compiler== -===Creator supplied=== -*[http://www.osmosian.com/cal-3040.zip cal-3040] 2006/08/14 -**[http://www.osmosian.com/ebnf EBNF] -**[http://www.osmosian.com/instructions.pdf instructions] -*[http://www.osmosian.com/cal-4700.zip cal-4700] 2017/01/27 - -===GitHub=== -*[https://GitHub.com/GerryRzeppa/osmosian /GerryRzeppa/osmosian] cal-3040 -*[https://GitHub.com/Folds/osmosian /Folds/osmosian] cal-3040 (Unauthorized) -*[https://GitHub.com/elenderg/Portugues-Puro /elenderg/Portugues-Puro] cal-4700 Translated to Portuguese - -==Forums== -===[https://www.AnandTech.com/ AnandTech]=== -*[https://forums.anandtech.com/threads/natural-language-programming.2358744/ Natural Language Programming: Good Idea? Yes Maybe No] -*[https://forums.anandtech.com/threads/conversational-storytelling-with-javascript.2410448/ Conversational Storytelling with JavaScript] -*[https://forums.anandtech.com/threads/natural-language-programming-english-and-or-español.2559516/ Natural Language Programming -- English and/or Español] -*[https://forums.anandtech.com/threads/learning-programming.2406202/#post-36858285 Learning programming] -*[https://forums.anandtech.com/threads/official-free-tools-thread.199156/page-4#post-36861957 Official Free Tools Thread | Plain English contribution] -*[https://news.yCombinator.com/item?id=8719957 Plain English Programming (2013)] -*[https://news.yCombinator.com/item?id=19355965 Do You Approve the Plain English?] -===[https://Forum.Arduino.cc/ Arduino]=== -*[https://forum.arduino.cc/t/plain-english-programming/371096/15 Plain English Programming] -===[https://groups.google.com/g/comp.compilers/ comp.compilers]=== -*[https://groups.google.com/g/comp.compilers/c/p30I_zVRlps/m/9UshbYjqZzwJ Writing A Plain English Compiler] -*[https://groups.google.com/g/comp.compilers/c/4t3_Dq6foFA/m/CYfdnKMBkAsJ Re: A Plain English Compiler] -===[https://www.GeeksForGeeks.org/ GeeksForGeeks]=== -*[https://www.geeksforgeeks.org/the-malevolent-mathemagician-natural-language-programming/ The Malevolent Mathemagician | Natural Language Programming] -*[https://www.geeksforgeeks.org/creating-wysiwyg-document-editor/ Creating WYSIWYG Document Editor | Natural Language Programming] -*[https://www.geeksforgeeks.org/a-kobayashi-maru-approach-to-finding-primes/ A Kobayashi Maru Approach to Finding Primes] -*[https://www.geeksforgeeks.org/natural-language-programming-sorting/ Sorting | Natural Language Programming] -*[https://www.geeksforgeeks.org/natural-language-programming-teaching-kids/ Natural Language Programming — Teaching Kids] -*[https://www.geeksforgeeks.org/natural-language-programming/ Natural Language Programming] -===[https://IntFiction.org/ Interactive Fiction Community Forum]=== -*[https://intfiction.org/t/writer-wanted-for-a-conversational-storytelling-project/6169 Writer wanted for a “Conversational Storytelling” project] -*[https://intfiction.org/t/inform-system-developers-do-you-approve-the-plain-english-programming/42213 Inform system developers, do you approve the Plain English Programming?] -===[https://Forums.Parallax.com/ Parallax Forums]=== -*[https://forums.parallax.com/discussion/163792/plain-english-programming Plain English Programming] -===[https://www.PC-Control.co.uk/ PC Control Limited]=== -*[https://www.pc-control.co.uk/control/articles/article10.php Automated Maze solver using a servo hawk] -**[https://www.pc-control.co.uk/control/articles/images/photo%2009%20-%20definitions.png photo 09 - definitions] -**[https://www.pc-control.co.uk/control/articles/images/photo%2010%20-%20low-level%20helper%20routines.png photo 10 - low-level helper routines] -**[https://www.pc-control.co.uk/control/articles/images/photo%2011%20-%20mid-level%20helper%20routines.png photo 11 - mid-level helper routines] -**[https://www.pc-control.co.uk/control/articles/images/photo%2012%20-%20high-level%20helper%20routines.png photo 12 - high-level helper routines] -**[https://www.pc-control.co.uk/control/articles/images/photo%2013%20-%20main%20routine.png photo 13 - main routine] -**[https://www.pc-control.co.uk/control/articles/images/photo%2014%20-%20terminal%20output.png photo 14 - terminal output] -===[https://www.Quora.com/ Quora]=== -*Jul 06, 2021 - [https://www.quora.com/What-can-a-beginner-programmer-use-as-a-programming-IDE-I-tried-using-Visual-Studio-Express-but-it-was-too-hard-to-use-and-understand-Is-there-anything-else-I-can-use/answer/Gerry-Rzeppa What can a beginner programmer use as a programming IDE? I tried using Visual Studio Express but it was too hard to use and understand. Is there anything else I can use?] -**"To get started with Plain English, see here (it’s fast, friendly, and free):" -**Reference to another Gerry Rzeppa Quora article: Jun 27, 2021 - [https://www.quora.com/Is-there-a-right-way-to-learn-to-code-1/answer/Gerry-Rzeppa Is there a right way to learn to code?] -*Jul 06, 2021 - [https://www.quora.com/How-often-when-puzzling-out-a-solution-to-a-problem-do-you-think-or-say-aloud-Are-we-asking-the-right-question-questions/answer/Gerry-Rzeppa How often when puzzling out a solution to a problem, do you think or say aloud, “Are we asking the right question/questions?”] -**"Almost every time." -**Reference to another Gerry Rzeppa Quora article: May 11, 2021 [https://www.quora.com/What-IDE-has-impressed-you-with-its-ease-of-use-and-how-productive-were-you-with-it/answer/Gerry-Rzeppa What IDE has impressed you with its ease of use, and how productive were you with it?] -*Jul 06, 2021 - [https://www.quora.com/What-are-the-best-examples-of-poetry-written-in-programming-languages/answer/Gerry-Rzeppa What are the best examples of poetry written in programming languages?] -**A poem written in Plain English that, when run, makes the picture the poem describes. -*Jul 05, 2021 - [https://www.quora.com/What-is-the-character-limit-for-one-line-of-code-you-go-by/answer/Gerry-Rzeppa What is the character limit for one line of code you go by?] -**"... if handwritten code fits on the screen, it’s okay by me." -*Jul 05, 2021 - [https://www.quora.com/How-is-a-one-dimensional-character-array-and-a-string-similar/answer/Gerry-Rzeppa How is a one-dimensional character array and a string similar?] - -**Strings -**Substrings -**String Riders -*Jun 27, 2021 - [https://www.quora.com/Is-there-a-right-way-to-learn-to-code-1/answer/Gerry-Rzeppa Is there a right way to learn to code?] -**A offering of the Plain English IDE and personal tutoring. -*Jun 10, 2021 - [https://www.quora.com/Is-there-any-way-to-write-genuine-self-modifying-code-in-Windows/answer/Gerry-Rzeppa Is there any way to write genuine self-modifying code in Windows?] - -**Memory Map -**Memory Pointers -*Jun 10, 2021 - [https://www.quora.com/How-can-I-write-a-Python-program-where-a-bunch-of-students-will-be-assigned-thesis-themes-using-the-FIFO-method/answer/Gerry-Rzeppa How can I write a Python program where a bunch of students will be assigned thesis themes using the FIFO method?] -** Use of path variable. -** Iterative development. -** Relation of item in a list and the name of the list. -** Screen space management. -** Use of "backwards". -*Jun 09, 2021 - [https://www.quora.com/How-do-computers-execute-if-statements-to-the-core-machine-code-and-opcodes/answer/Gerry-Rzeppa How do computers execute if statements to the core machine code and opcodes?] - -** List command and explanation of display produced -** Memory Map -** Uses [https://defuse.ca/online-x86-assembler.htm Online x86 and x64 Intel Instruction Assembler] to disassemble code in the List output. -** Offers free “How to Write a Plain English Compiler in Plain English” course via email. -*Jun 08, 2021 - [https://www.quora.com/How-can-I-draw-the-flag-of-a-country-in-C-beginner/answer/Gerry-Rzeppa How can I draw the flag of a country in C#? (beginner)] -** Make a box -** Center the box -** Draw and fill the box -** Stroke -*Jun 07, 2021 - [https://www.quora.com/Is-it-wise-to-ask-query-like-why-curly-braces-are-preferred-in-C-instead-of-opening-and-closing-bracket-when-writing-functions-or-we-just-need-to-memorize-that-as-a-random-rule-Is-there-any-book-which-deals-with/answer/Gerry-Rzeppa Is it wise to ask query like why curly braces are preferred in C instead of opening and closing bracket when writing functions, or we just need to memorize that as a random rule? Is there any book which deals with such miscellaneous things about C?] -** “Arbitrary and unnecessary rule” -*Jun 06, 2021 - [https://www.quora.com/How-would-I-go-about-creating-dots-and-boxes-in-Java/answer/Gerry-Rzeppa How would I go about creating dots and boxes in Java?] -*Jun 06, 2021 - [https://www.quora.com/How-can-I-write-a-menu-driven-program-to-perform-following-operations-on-the-stack-using-array-a-i-Push-ii-Pop-iii-Peek/answer/Gerry-Rzeppa How can I write a menu-driven program to perform the following operations on the stack using array- a (i) Push (ii) Pop (iii) Peek?] -*Jun 06, 2021 - [https://www.quora.com/How-do-I-make-a-countdown-and-when-it-finishes-it-shows-a-text-in-coding-I-want-to-add-a-picture-as-a-border-or-what-else-to-countdown/answer/Gerry-Rzeppa How do I make a countdown and when it finishes, it shows a text in coding? I want to add a picture as a border or what else to countdown.] -*Jun 06, 2021 - [https://www.quora.com/What-is-recursion-Can-you-explain-the-main-principles-of-recursions-Can-you-do-the-code-algorithm-of-the-Fibonacci-series-using-recursion/answer/Gerry-Rzeppa What is recursion? Can you explain the main principles of recursions? Can you do the code/algorithm of the Fibonacci series using recursion?] -*Jun 06, 2021 - [https://www.quora.com/How-do-you-find-the-intersection-point-between-a-line-and-a-rectangle-algorithm-geometry-line-intersection-development/answer/Gerry-Rzeppa What is recursion? How do you find the intersection point between a line and a rectangle (algorithm, geometry, line, intersection, development)?] -*Jun 06, 2021 - [https://www.quora.com/How-do-you-handle-algorithms-to-create-polygons-no-Thiesen-Voronoi-Python-Shapely-Voronoi-development/answer/Gerry-Rzeppa How do you handle algorithms to create polygons (no Thiesen/Voronoi) (Python, Shapely, Voronoi, development)?] -*Jun 04, 2021 - [https://www.quora.com/I-want-to-get-into-programming-What-languages-should-I-learn-first/answer/Gerry-Rzeppa I want to get into programming. What languages should I learn first?] -*Jun 04, 2021 - [https://www.quora.com/How-do-I-make-a-programme-using-codes/answer/Gerry-Rzeppa How do I make a programme using codes?] -*Jun 04, 2021 - [https://www.quora.com/Why-is-Hello-World-the-default-line-in-programming-languages/answer/Gerry-Rzeppa Why is "Hello World" the default line in programming languages?] -*Jun 04, 2021 - [https://www.quora.com/Why-cant-I-find-any-real-photo-of-a-compiler-Is-it-too-small/answer/Gerry-Rzeppa Why can't I find any real photo of a compiler? Is it too small?] -*Jun 03, 2021 - [https://www.quora.com/Why-must-the-starting-value-of-a-control-variable-be-less-than-the-ending-value-in-a-for-loop-expression/answer/Gerry-Rzeppa Why must the starting value of a control variable be less than the ending value in a for loop expression?] -*Jun 03, 2021 - [https://www.quora.com/What-is-the-purpose-of-initialization-of-counter-variable-in-a-loop/answer/Gerry-Rzeppa What is the purpose of "initialization of counter variable" in a loop?] -*Jun 03, 2021 - [https://www.quora.com/What-is-the-nature-of-a-variable-with-real-life-examples/answer/Gerry-Rzeppa What is the nature of a variable with real life examples?] -*Jun 03, 2021 - [https://www.quora.com/Why-is-UML-a-significant-area-of-study/answer/Gerry-Rzeppa Why is UML a significant area of study?] -*May 29, 2021 [https://www.quora.com/Is-it-easier-to-write-an-interpreter-than-a-compiler-Why/answer/Gerry-Rzeppa Is it easier to write an interpreter than a compiler? Why?] -**"Yes. An interpreter can be written with less knowledge of the hardware and operating system." -**Reference to another Gerry Rzeppa Quora article: May 18, 2021 [https://www.quora.com/How-do-I-make-programming-language/answer/Gerry-Rzeppa How do I make programming language?] -*May 18, 2021 [https://www.quora.com/How-do-I-make-programming-language/answer/Gerry-Rzeppa How do I make programming language?] -**Reference to another Gerry Rzeppa Quora article: Dec 22, 2020 [https://www.quora.com/How-do-you-start-writing-your-interpreter-from-scratch/answer/Gerry-Rzeppa How do you start writing your interpreter from scratch?] -**Reference to another Gerry Rzeppa Quora article: Aug 30, 2020 [https://www.quora.com/What-is-a-compiler-and-the-stages-of-a-compiler/answer/Gerry-Rzeppa What is a compiler and the stages of a compiler?] -*May 11, 2021 [https://www.quora.com/What-IDE-has-impressed-you-with-its-ease-of-use-and-how-productive-were-you-with-it/answer/Gerry-Rzeppa What IDE has impressed you with its ease of use, and how productive were you with it?] -*Apr 28, 2021 - [https://www.quora.com/I-need-some-good-project-related-to-data-structure-I-am-a-2rd-year-computer-science-student-What-is-your-suggestion/answer/Gerry-Rzeppa I need some good project related to data structure. I am a 2rd year computer science student. What is your suggestion?] - -**Data types -***Fundamental -****byte -****record -***Pointers -****Generic -****Typed -***Strings -***Things -****Stacks -****Queues -****Hashed Indices -**Memory Map -**WYSIWYG document editor -*Apr 12, 2021 - [https://www.quora.com/What-is-the-relationship-between-a-compiler-algorithm-and-data-structure/answer/Gerry-Rzeppa What is the relationship between a compiler, algorithm, and data structure?] -** "A compiler uses data structures and algorithms to translate high-level source code into low-level executable machine code." -** Discussion of the Plain English compiler -*Mar 29, 2021 - [https://www.quora.com/What-is-the-most-interesting-Python-algorithm-in-less-than-ten-lines-of-code/answer/Gerry-Rzeppa What is the most interesting Python algorithm in less than ten lines of code?] -**Lindenmayer interpreter -*Mar 27, 2021 - [https://www.quora.com/What-is-the-best-way-to-present-an-algorithm/answer/Gerry-Rzeppa What is the best way to present an algorithm?] -**Three-step process -*Mar 24, 2021 - [https://www.quora.com/Why-is-it-hard-to-understand-linked-lists-in-programming/answer/Gerry-Rzeppa Why is it hard to understand linked lists in programming?] -**Discuss Plain English linked list. -*Dec 22, 2020 [https://www.quora.com/How-do-you-start-writing-your-interpreter-from-scratch/answer/Gerry-Rzeppa How do you start writing your interpreter from scratch?] -** “primitive” BASIC editor/interpreter -*Oct 03, 2020 - [https://www.quora.com/In-procedural-programming-how-do-you-plan-your-code-without-UML/answer/Gerry-Rzeppa In procedural programming, how do you plan your code without UML?] -**Osmosian maxim: “If it’s hard, it’s wrong.” -**Pair Programming -**"During the winter of 2005-2006, we wrote (and documented) 25,000 lines of Plain English code in just six months ..." -**'“Just tell us what you need, sonny, and we’ll show you how to live without it.”' -*Aug 30, 2020 [https://www.quora.com/What-is-a-compiler-and-the-stages-of-a-compiler/answer/Gerry-Rzeppa What is a compiler and the stages of a compiler?] -**Structure of the Plain English compiler. -*Jul 09, 2020 - [https://www.quora.com/Who-can-print-this-string-Hello-world-more-smartly-and-clearly/answer/Gerry-Rzeppa Who can print this string "Hello world" more smartly and clearly?] -**Plain English program to print in a circle. -**Español Llano (Plain Spanish) program to print in a circle. -*Jun 08, 2020 - [https://www.quora.com/Why-do-some-programmers-write-their-own-compilers/answer/Gerry-Rzeppa Why do some programmers write their own compilers?] -**'My elder son and I wrote our own Plain English compiler and IDE, in Plain English, originally, for three reasons. We wanted to know:' -***'1. Is it easier to program when you don’t have to translate your natural-language thoughts into an alternate syntax?' -***'2. Can natural languages be parsed in a relatively “sloppy” manner (as humans apparently parse them) and still provide a stable enough environment for productive programming?' -***'3. Can low-level programs (like compilers) be conveniently and efficiently written in high level languages (like English)? -**'Turns out the answers to all of three questions is, “Yes!”' - -==Successor Project (Trial)== -*[https://www.indiegogo.com/projects/the-hybrid-programming-language#/ The Hybrid Programming Language] - Plain English with snippets of formulas and graphics where needed \ No newline at end of file +[[Reports:Tasks_not_implemented_in_PlainEnglish]] \ No newline at end of file diff --git a/Lang/Pluto/00-LANG.txt b/Lang/Pluto/00-LANG.txt deleted file mode 100644 index 80e65c9293..0000000000 --- a/Lang/Pluto/00-LANG.txt +++ /dev/null @@ -1,47 +0,0 @@ -{{language|Pluto -|exec=interpreted -|strength=strong -|safety=safe -|express=implicit -|checking=dynamic -|gc=yes -|hopl=no -|site=https://pluto-lang.org/}} -Pluto is a superset of Lua 5.4 with a focus on general-purpose programming. While being remarkably compatible with Lua 5.4 source-code & bytecode, it enhances the standard library & adds more than a dozen highly-desired syntaxes such as switch statements, compound operators, classes, class inheritance, string interpolation, type hinting, enums, and so on. - -Pluto aspires to be a version of Lua with a larger feature-set, that is all. Pluto is not a Lua-killer, an attempted successor, or any of that. Many people (rightly so) love Lua precisely because of the design philosophy. And fundamentally, Pluto is a major deviation from Lua's design philosophy. Some may prefer this, some may not. - -The language is being developed on [https://github.com/PlutoLang/Pluto github] and pre-built binaries for 64-bit Linux, MacOS and Windows can be downloaded [https://github.com/PlutoLang/Pluto/releases here]. - -Here is a list of custom libraries used on Rosetta Code: -{|class="wikitable" -! No. !! Module name !! No. !! Module name -|- -| 1 || [[:Category:Pluto-fmt|fmt]] || 2 || [[:Category:Pluto-math2|math2]] -|- -| 3 || [[:Category:Pluto-int|int]] || 4 || [[:Category:Pluto-table2|table2]] -|- -| 5 || [[:Category:Pluto-complex|complex]] || 6 || [[:Category:Pluto-rat|rat]] -|- -| 7 || [[:Category:Pluto-queue|queue]] || 8 || [[:Category:Pluto-map|map]] -|- -| 9 || [[:Category:Pluto-list|list]] || 10 || [[:Category:Pluto-perm|perm]] -|- -|11 || [[:Category:Pluto-ansi|ansi]] || 12 || [[:Category:Pluto-io2|io2]] -|- -|13 || [[:Category:Pluto-uchar|uchar]] || 14 || [[:Category:Pluto-gchar|gchar]] -|- -|15 || [[:Category:Pluto-matrix|matrix]] || 16 || [[:Category:Pluto-poly|poly]] -|- -|17 || [[:Category:Pluto-audio|audio]] || 18 || [[:Category:Pluto-bitmap|bitmap]] -|- -|19 || [[:Category:Pluto-lsystem|lsystem]] || 20 || [[:Category:Pluto-bignum|bignum]] -|- -|} - -== To do == -[[Tasks not implemented in Pluto]] - -== See also == - -[[Lua]] \ No newline at end of file diff --git a/Lang/Pluto/00-META.yaml b/Lang/Pluto/00-META.yaml deleted file mode 100644 index 4169e06d3e..0000000000 --- a/Lang/Pluto/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Pluto diff --git a/Lang/Pluto/100-prisoners b/Lang/Pluto/100-prisoners deleted file mode 120000 index 2439d4fa2a..0000000000 --- a/Lang/Pluto/100-prisoners +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-prisoners/Pluto \ No newline at end of file diff --git a/Lang/Pluto/9-billion-names-of-God-the-integer b/Lang/Pluto/9-billion-names-of-God-the-integer deleted file mode 120000 index 03c26b8d5f..0000000000 --- a/Lang/Pluto/9-billion-names-of-God-the-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/9-billion-names-of-God-the-integer/Pluto \ No newline at end of file diff --git a/Lang/Pluto/99-bottles-of-beer b/Lang/Pluto/99-bottles-of-beer deleted file mode 120000 index cc21927564..0000000000 --- a/Lang/Pluto/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Pluto \ No newline at end of file diff --git a/Lang/Pluto/A+B b/Lang/Pluto/A+B deleted file mode 120000 index c26f431720..0000000000 --- a/Lang/Pluto/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Pluto \ No newline at end of file diff --git a/Lang/Pluto/ABC-problem b/Lang/Pluto/ABC-problem deleted file mode 120000 index 13affeffe2..0000000000 --- a/Lang/Pluto/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/AKS-test-for-primes b/Lang/Pluto/AKS-test-for-primes deleted file mode 120000 index 55e9fce3e0..0000000000 --- a/Lang/Pluto/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/ASCII-art-diagram-converter b/Lang/Pluto/ASCII-art-diagram-converter deleted file mode 120000 index 395927ab4a..0000000000 --- a/Lang/Pluto/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Abbreviations-automatic b/Lang/Pluto/Abbreviations-automatic deleted file mode 120000 index 1d471effa2..0000000000 --- a/Lang/Pluto/Abbreviations-automatic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-automatic/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Abbreviations-easy b/Lang/Pluto/Abbreviations-easy deleted file mode 120000 index 4e4f49cf5b..0000000000 --- a/Lang/Pluto/Abbreviations-easy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-easy/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Abbreviations-simple b/Lang/Pluto/Abbreviations-simple deleted file mode 120000 index d62c58f891..0000000000 --- a/Lang/Pluto/Abbreviations-simple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-simple/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Abelian-sandpile-model b/Lang/Pluto/Abelian-sandpile-model deleted file mode 120000 index 84e194b9d0..0000000000 --- a/Lang/Pluto/Abelian-sandpile-model +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Abelian-sandpile-model-Identity b/Lang/Pluto/Abelian-sandpile-model-Identity deleted file mode 120000 index 5258fd0a4e..0000000000 --- a/Lang/Pluto/Abelian-sandpile-model-Identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model-Identity/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Abstract-type b/Lang/Pluto/Abstract-type deleted file mode 120000 index f418e6a876..0000000000 --- a/Lang/Pluto/Abstract-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abstract-type/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Abundant-deficient-and-perfect-number-classifications b/Lang/Pluto/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index f5843a0883..0000000000 --- a/Lang/Pluto/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Abundant-odd-numbers b/Lang/Pluto/Abundant-odd-numbers deleted file mode 120000 index 18495df602..0000000000 --- a/Lang/Pluto/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Accumulator-factory b/Lang/Pluto/Accumulator-factory deleted file mode 120000 index 09dad4bd16..0000000000 --- a/Lang/Pluto/Accumulator-factory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Accumulator-factory/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Achilles-numbers b/Lang/Pluto/Achilles-numbers deleted file mode 120000 index 0121ec15f3..0000000000 --- a/Lang/Pluto/Achilles-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Achilles-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ackermann-function b/Lang/Pluto/Ackermann-function deleted file mode 120000 index b2e9e8bcf4..0000000000 --- a/Lang/Pluto/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Add-a-variable-to-a-class-instance-at-runtime b/Lang/Pluto/Add-a-variable-to-a-class-instance-at-runtime deleted file mode 120000 index 9c086b6c80..0000000000 --- a/Lang/Pluto/Add-a-variable-to-a-class-instance-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Add-a-variable-to-a-class-instance-at-runtime/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Additive-primes b/Lang/Pluto/Additive-primes deleted file mode 120000 index 5fa0027662..0000000000 --- a/Lang/Pluto/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Address-of-a-variable b/Lang/Pluto/Address-of-a-variable deleted file mode 120000 index db8c9fa74c..0000000000 --- a/Lang/Pluto/Address-of-a-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Address-of-a-variable/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Algebraic-data-types b/Lang/Pluto/Algebraic-data-types deleted file mode 120000 index a63223b643..0000000000 --- a/Lang/Pluto/Algebraic-data-types +++ /dev/null @@ -1 +0,0 @@ -../../Task/Algebraic-data-types/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Aliquot-sequence-classifications b/Lang/Pluto/Aliquot-sequence-classifications deleted file mode 120000 index 3d08da68d2..0000000000 --- a/Lang/Pluto/Aliquot-sequence-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Aliquot-sequence-classifications/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Almkvist-Giullera-formula-for-pi b/Lang/Pluto/Almkvist-Giullera-formula-for-pi deleted file mode 120000 index a4dbb156c2..0000000000 --- a/Lang/Pluto/Almkvist-Giullera-formula-for-pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almkvist-Giullera-formula-for-pi/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Almost-prime b/Lang/Pluto/Almost-prime deleted file mode 120000 index 8dfdefc597..0000000000 --- a/Lang/Pluto/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Amb b/Lang/Pluto/Amb deleted file mode 120000 index 5d885d9898..0000000000 --- a/Lang/Pluto/Amb +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amb/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Amicable-pairs b/Lang/Pluto/Amicable-pairs deleted file mode 120000 index 8f6d71ca71..0000000000 --- a/Lang/Pluto/Amicable-pairs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amicable-pairs/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Anagrams b/Lang/Pluto/Anagrams deleted file mode 120000 index ed05036541..0000000000 --- a/Lang/Pluto/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Anagrams-Deranged-anagrams b/Lang/Pluto/Anagrams-Deranged-anagrams deleted file mode 120000 index 15515547a0..0000000000 --- a/Lang/Pluto/Anagrams-Deranged-anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams-Deranged-anagrams/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Angle-difference-between-two-bearings b/Lang/Pluto/Angle-difference-between-two-bearings deleted file mode 120000 index e89e19b294..0000000000 --- a/Lang/Pluto/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Angles-geometric-normalization-and-conversion b/Lang/Pluto/Angles-geometric-normalization-and-conversion deleted file mode 120000 index bf11da216a..0000000000 --- a/Lang/Pluto/Angles-geometric-normalization-and-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angles-geometric-normalization-and-conversion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Anonymous-recursion b/Lang/Pluto/Anonymous-recursion deleted file mode 120000 index e9e2ff5cdd..0000000000 --- a/Lang/Pluto/Anonymous-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anonymous-recursion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Anti-primes b/Lang/Pluto/Anti-primes deleted file mode 120000 index 62e9118e82..0000000000 --- a/Lang/Pluto/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Approximate-equality b/Lang/Pluto/Approximate-equality deleted file mode 120000 index 65832f9c4c..0000000000 --- a/Lang/Pluto/Approximate-equality +++ /dev/null @@ -1 +0,0 @@ -../../Task/Approximate-equality/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arbitrary-precision-integers-included- b/Lang/Pluto/Arbitrary-precision-integers-included- deleted file mode 120000 index 63cf45fedf..0000000000 --- a/Lang/Pluto/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Archimedean-spiral b/Lang/Pluto/Archimedean-spiral deleted file mode 120000 index bf76191b73..0000000000 --- a/Lang/Pluto/Archimedean-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Archimedean-spiral/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arena-storage-pool b/Lang/Pluto/Arena-storage-pool deleted file mode 120000 index 2287439dec..0000000000 --- a/Lang/Pluto/Arena-storage-pool +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arena-storage-pool/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arithmetic-Complex b/Lang/Pluto/Arithmetic-Complex deleted file mode 120000 index e8437b9a01..0000000000 --- a/Lang/Pluto/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arithmetic-Integer b/Lang/Pluto/Arithmetic-Integer deleted file mode 120000 index 3b77091442..0000000000 --- a/Lang/Pluto/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arithmetic-Rational b/Lang/Pluto/Arithmetic-Rational deleted file mode 120000 index 497dafd0e0..0000000000 --- a/Lang/Pluto/Arithmetic-Rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Rational/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arithmetic-derivative b/Lang/Pluto/Arithmetic-derivative deleted file mode 120000 index 9254d1c7e4..0000000000 --- a/Lang/Pluto/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arithmetic-evaluation b/Lang/Pluto/Arithmetic-evaluation deleted file mode 120000 index 4f46626913..0000000000 --- a/Lang/Pluto/Arithmetic-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-evaluation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arithmetic-geometric-mean b/Lang/Pluto/Arithmetic-geometric-mean deleted file mode 120000 index 7f7bd49c54..0000000000 --- a/Lang/Pluto/Arithmetic-geometric-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arithmetic-geometric-mean-Calculate-Pi b/Lang/Pluto/Arithmetic-geometric-mean-Calculate-Pi deleted file mode 120000 index f64109ba32..0000000000 --- a/Lang/Pluto/Arithmetic-geometric-mean-Calculate-Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean-Calculate-Pi/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arithmetic-numbers b/Lang/Pluto/Arithmetic-numbers deleted file mode 120000 index 9d3c7548ad..0000000000 --- a/Lang/Pluto/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Array-concatenation b/Lang/Pluto/Array-concatenation deleted file mode 120000 index b151e60e5d..0000000000 --- a/Lang/Pluto/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Arrays b/Lang/Pluto/Arrays deleted file mode 120000 index 36aa2a73e2..0000000000 --- a/Lang/Pluto/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ascending-primes b/Lang/Pluto/Ascending-primes deleted file mode 120000 index b086dde9de..0000000000 --- a/Lang/Pluto/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Assertions b/Lang/Pluto/Assertions deleted file mode 120000 index 8561bd9006..0000000000 --- a/Lang/Pluto/Assertions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Assertions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Associative-array-Creation b/Lang/Pluto/Associative-array-Creation deleted file mode 120000 index dab36a66d3..0000000000 --- a/Lang/Pluto/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Associative-array-Iteration b/Lang/Pluto/Associative-array-Iteration deleted file mode 120000 index 5ced29976c..0000000000 --- a/Lang/Pluto/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Associative-array-Merging b/Lang/Pluto/Associative-array-Merging deleted file mode 120000 index e8bdf6f6ca..0000000000 --- a/Lang/Pluto/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Attractive-numbers b/Lang/Pluto/Attractive-numbers deleted file mode 120000 index cc6d5fdf22..0000000000 --- a/Lang/Pluto/Attractive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Attractive-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Average-loop-length b/Lang/Pluto/Average-loop-length deleted file mode 120000 index da02c11d74..0000000000 --- a/Lang/Pluto/Average-loop-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Average-loop-length/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Averages-Arithmetic-mean b/Lang/Pluto/Averages-Arithmetic-mean deleted file mode 120000 index a80eb1d9ce..0000000000 --- a/Lang/Pluto/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Averages-Mean-angle b/Lang/Pluto/Averages-Mean-angle deleted file mode 120000 index b2c7bb37d8..0000000000 --- a/Lang/Pluto/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Averages-Mean-time-of-day b/Lang/Pluto/Averages-Mean-time-of-day deleted file mode 120000 index 11b930dc65..0000000000 --- a/Lang/Pluto/Averages-Mean-time-of-day +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-time-of-day/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Averages-Median b/Lang/Pluto/Averages-Median deleted file mode 120000 index 4877cdaa55..0000000000 --- a/Lang/Pluto/Averages-Median +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Median/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Averages-Mode b/Lang/Pluto/Averages-Mode deleted file mode 120000 index 9ba2618c12..0000000000 --- a/Lang/Pluto/Averages-Mode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mode/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Averages-Pythagorean-means b/Lang/Pluto/Averages-Pythagorean-means deleted file mode 120000 index f4cb6461df..0000000000 --- a/Lang/Pluto/Averages-Pythagorean-means +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Pythagorean-means/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Averages-Root-mean-square b/Lang/Pluto/Averages-Root-mean-square deleted file mode 120000 index 744197c17a..0000000000 --- a/Lang/Pluto/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Averages-Simple-moving-average b/Lang/Pluto/Averages-Simple-moving-average deleted file mode 120000 index 79f88ee858..0000000000 --- a/Lang/Pluto/Averages-Simple-moving-average +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Simple-moving-average/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Babbage-problem b/Lang/Pluto/Babbage-problem deleted file mode 120000 index 7dd4f1e4c1..0000000000 --- a/Lang/Pluto/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Balanced-brackets b/Lang/Pluto/Balanced-brackets deleted file mode 120000 index e55ebe8e48..0000000000 --- a/Lang/Pluto/Balanced-brackets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-brackets/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Barnsley-fern b/Lang/Pluto/Barnsley-fern deleted file mode 120000 index a90021bfee..0000000000 --- a/Lang/Pluto/Barnsley-fern +++ /dev/null @@ -1 +0,0 @@ -../../Task/Barnsley-fern/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Base64-decode-data b/Lang/Pluto/Base64-decode-data deleted file mode 120000 index 9e79a215f0..0000000000 --- a/Lang/Pluto/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bell-numbers b/Lang/Pluto/Bell-numbers deleted file mode 120000 index 12ebb36a37..0000000000 --- a/Lang/Pluto/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Benfords-law b/Lang/Pluto/Benfords-law deleted file mode 120000 index b781bccffa..0000000000 --- a/Lang/Pluto/Benfords-law +++ /dev/null @@ -1 +0,0 @@ -../../Task/Benfords-law/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bernoulli-numbers b/Lang/Pluto/Bernoulli-numbers deleted file mode 120000 index def2b8378f..0000000000 --- a/Lang/Pluto/Bernoulli-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bernoulli-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Best-shuffle b/Lang/Pluto/Best-shuffle deleted file mode 120000 index eb98710b09..0000000000 --- a/Lang/Pluto/Best-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Best-shuffle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bifid-cipher b/Lang/Pluto/Bifid-cipher deleted file mode 120000 index 7fb890e12d..0000000000 --- a/Lang/Pluto/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bin-given-limits b/Lang/Pluto/Bin-given-limits deleted file mode 120000 index 89b9600240..0000000000 --- a/Lang/Pluto/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Binary-search b/Lang/Pluto/Binary-search deleted file mode 120000 index a0b45e9e17..0000000000 --- a/Lang/Pluto/Binary-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-search/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Binary-strings b/Lang/Pluto/Binary-strings deleted file mode 120000 index fbf99b0505..0000000000 --- a/Lang/Pluto/Binary-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-strings/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Biorhythms b/Lang/Pluto/Biorhythms deleted file mode 120000 index 22eb307022..0000000000 --- a/Lang/Pluto/Biorhythms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Biorhythms/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bitcoin-address-validation b/Lang/Pluto/Bitcoin-address-validation deleted file mode 120000 index 44983f1ea0..0000000000 --- a/Lang/Pluto/Bitcoin-address-validation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitcoin-address-validation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bitmap b/Lang/Pluto/Bitmap deleted file mode 120000 index 2eae4de5c9..0000000000 --- a/Lang/Pluto/Bitmap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bitmap-Bresenhams-line-algorithm b/Lang/Pluto/Bitmap-Bresenhams-line-algorithm deleted file mode 120000 index 648ca4156e..0000000000 --- a/Lang/Pluto/Bitmap-Bresenhams-line-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Bresenhams-line-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bitmap-Midpoint-circle-algorithm b/Lang/Pluto/Bitmap-Midpoint-circle-algorithm deleted file mode 120000 index 30e98198c1..0000000000 --- a/Lang/Pluto/Bitmap-Midpoint-circle-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Midpoint-circle-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Bitwise-operations b/Lang/Pluto/Bitwise-operations deleted file mode 120000 index 7aa2755b89..0000000000 --- a/Lang/Pluto/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Blum-integer b/Lang/Pluto/Blum-integer deleted file mode 120000 index 29fd128c56..0000000000 --- a/Lang/Pluto/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Box-the-compass b/Lang/Pluto/Box-the-compass deleted file mode 120000 index 06e763904d..0000000000 --- a/Lang/Pluto/Box-the-compass +++ /dev/null @@ -1 +0,0 @@ -../../Task/Box-the-compass/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Brazilian-numbers b/Lang/Pluto/Brazilian-numbers deleted file mode 120000 index 2847bc95cf..0000000000 --- a/Lang/Pluto/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Break-OO-privacy b/Lang/Pluto/Break-OO-privacy deleted file mode 120000 index 00a12e0cb3..0000000000 --- a/Lang/Pluto/Break-OO-privacy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Break-OO-privacy/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Brilliant-numbers b/Lang/Pluto/Brilliant-numbers deleted file mode 120000 index 3c956fa37f..0000000000 --- a/Lang/Pluto/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Burrows-Wheeler-transform b/Lang/Pluto/Burrows-Wheeler-transform deleted file mode 120000 index d346f62601..0000000000 --- a/Lang/Pluto/Burrows-Wheeler-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Burrows-Wheeler-transform/Pluto \ No newline at end of file diff --git a/Lang/Pluto/CRC-32 b/Lang/Pluto/CRC-32 deleted file mode 120000 index a2f9755cc8..0000000000 --- a/Lang/Pluto/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/Pluto \ No newline at end of file diff --git a/Lang/Pluto/CUSIP b/Lang/Pluto/CUSIP deleted file mode 120000 index ffc1be79c9..0000000000 --- a/Lang/Pluto/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Caesar-cipher b/Lang/Pluto/Caesar-cipher deleted file mode 120000 index 92165c560f..0000000000 --- a/Lang/Pluto/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Calculating-the-value-of-e b/Lang/Pluto/Calculating-the-value-of-e deleted file mode 120000 index c85ceb9feb..0000000000 --- a/Lang/Pluto/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Calkin-Wilf-sequence b/Lang/Pluto/Calkin-Wilf-sequence deleted file mode 120000 index e7c08bf16e..0000000000 --- a/Lang/Pluto/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Call-a-foreign-language-function b/Lang/Pluto/Call-a-foreign-language-function deleted file mode 120000 index f071bb1596..0000000000 --- a/Lang/Pluto/Call-a-foreign-language-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-foreign-language-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Call-a-function-in-a-shared-library b/Lang/Pluto/Call-a-function-in-a-shared-library deleted file mode 120000 index fb03a37240..0000000000 --- a/Lang/Pluto/Call-a-function-in-a-shared-library +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-function-in-a-shared-library/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Call-an-object-method b/Lang/Pluto/Call-an-object-method deleted file mode 120000 index 9b34265855..0000000000 --- a/Lang/Pluto/Call-an-object-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-an-object-method/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Camel-case-and-snake-case b/Lang/Pluto/Camel-case-and-snake-case deleted file mode 120000 index 63e934e944..0000000000 --- a/Lang/Pluto/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Canonicalize-CIDR b/Lang/Pluto/Canonicalize-CIDR deleted file mode 120000 index 47427dcbdb..0000000000 --- a/Lang/Pluto/Canonicalize-CIDR +++ /dev/null @@ -1 +0,0 @@ -../../Task/Canonicalize-CIDR/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cantor-set b/Lang/Pluto/Cantor-set deleted file mode 120000 index e41e42a9fe..0000000000 --- a/Lang/Pluto/Cantor-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cantor-set/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Carmichael-3-strong-pseudoprimes b/Lang/Pluto/Carmichael-3-strong-pseudoprimes deleted file mode 120000 index 15460b52f8..0000000000 --- a/Lang/Pluto/Carmichael-3-strong-pseudoprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Carmichael-3-strong-pseudoprimes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Case-sensitivity-of-identifiers b/Lang/Pluto/Case-sensitivity-of-identifiers deleted file mode 120000 index e37b951419..0000000000 --- a/Lang/Pluto/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Casting-out-nines b/Lang/Pluto/Casting-out-nines deleted file mode 120000 index f9d2b5090f..0000000000 --- a/Lang/Pluto/Casting-out-nines +++ /dev/null @@ -1 +0,0 @@ -../../Task/Casting-out-nines/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Catalan-numbers b/Lang/Pluto/Catalan-numbers deleted file mode 120000 index 13ef84ea7e..0000000000 --- a/Lang/Pluto/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Catalan-numbers-Pascals-triangle b/Lang/Pluto/Catalan-numbers-Pascals-triangle deleted file mode 120000 index ba6ed52865..0000000000 --- a/Lang/Pluto/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Catamorphism b/Lang/Pluto/Catamorphism deleted file mode 120000 index 5d492b9b1c..0000000000 --- a/Lang/Pluto/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Chaocipher b/Lang/Pluto/Chaocipher deleted file mode 120000 index a4b28d7a7d..0000000000 --- a/Lang/Pluto/Chaocipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaocipher/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Check-input-device-is-a-terminal b/Lang/Pluto/Check-input-device-is-a-terminal deleted file mode 120000 index 3b90efa3c8..0000000000 --- a/Lang/Pluto/Check-input-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-input-device-is-a-terminal/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Check-output-device-is-a-terminal b/Lang/Pluto/Check-output-device-is-a-terminal deleted file mode 120000 index fc1799c10c..0000000000 --- a/Lang/Pluto/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Check-that-file-exists b/Lang/Pluto/Check-that-file-exists deleted file mode 120000 index 4438ce2610..0000000000 --- a/Lang/Pluto/Check-that-file-exists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-that-file-exists/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Chernicks-Carmichael-numbers b/Lang/Pluto/Chernicks-Carmichael-numbers deleted file mode 120000 index 027fba1c47..0000000000 --- a/Lang/Pluto/Chernicks-Carmichael-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chernicks-Carmichael-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cheryls-birthday b/Lang/Pluto/Cheryls-birthday deleted file mode 120000 index 30af57e589..0000000000 --- a/Lang/Pluto/Cheryls-birthday +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cheryls-birthday/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Chinese-remainder-theorem b/Lang/Pluto/Chinese-remainder-theorem deleted file mode 120000 index 9b0d96ce42..0000000000 --- a/Lang/Pluto/Chinese-remainder-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-remainder-theorem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Chinese-zodiac b/Lang/Pluto/Chinese-zodiac deleted file mode 120000 index 9268137a2b..0000000000 --- a/Lang/Pluto/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cholesky-decomposition b/Lang/Pluto/Cholesky-decomposition deleted file mode 120000 index 87b60466d9..0000000000 --- a/Lang/Pluto/Cholesky-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cholesky-decomposition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Chowla-numbers b/Lang/Pluto/Chowla-numbers deleted file mode 120000 index b10ca6f6d9..0000000000 --- a/Lang/Pluto/Chowla-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chowla-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Church-numerals b/Lang/Pluto/Church-numerals deleted file mode 120000 index 1d195312b9..0000000000 --- a/Lang/Pluto/Church-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Church-numerals/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Circles-of-given-radius-through-two-points b/Lang/Pluto/Circles-of-given-radius-through-two-points deleted file mode 120000 index 95277c7cbf..0000000000 --- a/Lang/Pluto/Circles-of-given-radius-through-two-points +++ /dev/null @@ -1 +0,0 @@ -../../Task/Circles-of-given-radius-through-two-points/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Circular-primes b/Lang/Pluto/Circular-primes deleted file mode 120000 index 03acc9542a..0000000000 --- a/Lang/Pluto/Circular-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Circular-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Classes b/Lang/Pluto/Classes deleted file mode 120000 index 26462a13cb..0000000000 --- a/Lang/Pluto/Classes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Classes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Closest-pair-problem b/Lang/Pluto/Closest-pair-problem deleted file mode 120000 index 37a54ff46b..0000000000 --- a/Lang/Pluto/Closest-pair-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closest-pair-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Closures-Value-capture b/Lang/Pluto/Closures-Value-capture deleted file mode 120000 index 86d660ee42..0000000000 --- a/Lang/Pluto/Closures-Value-capture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closures-Value-capture/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Collections b/Lang/Pluto/Collections deleted file mode 120000 index 82a2dd2b4f..0000000000 --- a/Lang/Pluto/Collections +++ /dev/null @@ -1 +0,0 @@ -../../Task/Collections/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Color-wheel b/Lang/Pluto/Color-wheel deleted file mode 120000 index 1f743faae0..0000000000 --- a/Lang/Pluto/Color-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-wheel/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Colorful-numbers b/Lang/Pluto/Colorful-numbers deleted file mode 120000 index 6fd26697f2..0000000000 --- a/Lang/Pluto/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Combinations b/Lang/Pluto/Combinations deleted file mode 120000 index 1554032a2c..0000000000 --- a/Lang/Pluto/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Combinations-with-repetitions b/Lang/Pluto/Combinations-with-repetitions deleted file mode 120000 index 27271a521e..0000000000 --- a/Lang/Pluto/Combinations-with-repetitions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations-with-repetitions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Comma-quibbling b/Lang/Pluto/Comma-quibbling deleted file mode 120000 index d45769fa57..0000000000 --- a/Lang/Pluto/Comma-quibbling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comma-quibbling/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Command-line-arguments b/Lang/Pluto/Command-line-arguments deleted file mode 120000 index 0f5f02829e..0000000000 --- a/Lang/Pluto/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Commatizing-numbers b/Lang/Pluto/Commatizing-numbers deleted file mode 120000 index 703f59f582..0000000000 --- a/Lang/Pluto/Commatizing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Commatizing-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Comments b/Lang/Pluto/Comments deleted file mode 120000 index 8d1e636123..0000000000 --- a/Lang/Pluto/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Compare-a-list-of-strings b/Lang/Pluto/Compare-a-list-of-strings deleted file mode 120000 index 6f0ca59023..0000000000 --- a/Lang/Pluto/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Compare-length-of-two-strings b/Lang/Pluto/Compare-length-of-two-strings deleted file mode 120000 index a17ca1cb1f..0000000000 --- a/Lang/Pluto/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Compile-time-calculation b/Lang/Pluto/Compile-time-calculation deleted file mode 120000 index f08af0ba8e..0000000000 --- a/Lang/Pluto/Compile-time-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compile-time-calculation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Compiler-lexical-analyzer b/Lang/Pluto/Compiler-lexical-analyzer deleted file mode 120000 index 0e5b3d7d41..0000000000 --- a/Lang/Pluto/Compiler-lexical-analyzer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-lexical-analyzer/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Compound-data-type b/Lang/Pluto/Compound-data-type deleted file mode 120000 index d8d7d92b91..0000000000 --- a/Lang/Pluto/Compound-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compound-data-type/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Concurrent-computing b/Lang/Pluto/Concurrent-computing deleted file mode 120000 index edc4e372c5..0000000000 --- a/Lang/Pluto/Concurrent-computing +++ /dev/null @@ -1 +0,0 @@ -../../Task/Concurrent-computing/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Conditional-structures b/Lang/Pluto/Conditional-structures deleted file mode 120000 index 480797a688..0000000000 --- a/Lang/Pluto/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Conjugate-transpose b/Lang/Pluto/Conjugate-transpose deleted file mode 120000 index dfb7444c0e..0000000000 --- a/Lang/Pluto/Conjugate-transpose +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conjugate-transpose/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Consecutive-primes-with-ascending-or-descending-differences b/Lang/Pluto/Consecutive-primes-with-ascending-or-descending-differences deleted file mode 120000 index 855ac67f9b..0000000000 --- a/Lang/Pluto/Consecutive-primes-with-ascending-or-descending-differences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Consecutive-primes-with-ascending-or-descending-differences/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Constrained-genericity b/Lang/Pluto/Constrained-genericity deleted file mode 120000 index 27aef58dac..0000000000 --- a/Lang/Pluto/Constrained-genericity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Constrained-genericity/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Continued-fraction b/Lang/Pluto/Continued-fraction deleted file mode 120000 index 413f477143..0000000000 --- a/Lang/Pluto/Continued-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Continued-fraction-Arithmetic-Construct-from-rational-number b/Lang/Pluto/Continued-fraction-Arithmetic-Construct-from-rational-number deleted file mode 120000 index 4207df96c4..0000000000 --- a/Lang/Pluto/Continued-fraction-Arithmetic-Construct-from-rational-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-Construct-from-rational-number/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Convert-decimal-number-to-rational b/Lang/Pluto/Convert-decimal-number-to-rational deleted file mode 120000 index 67bc18205b..0000000000 --- a/Lang/Pluto/Convert-decimal-number-to-rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-decimal-number-to-rational/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Convert-seconds-to-compound-duration b/Lang/Pluto/Convert-seconds-to-compound-duration deleted file mode 120000 index 694dec3e9d..0000000000 --- a/Lang/Pluto/Convert-seconds-to-compound-duration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-seconds-to-compound-duration/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Count-in-factors b/Lang/Pluto/Count-in-factors deleted file mode 120000 index 875d6814c3..0000000000 --- a/Lang/Pluto/Count-in-factors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-factors/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Count-in-octal b/Lang/Pluto/Count-in-octal deleted file mode 120000 index c5624def8e..0000000000 --- a/Lang/Pluto/Count-in-octal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-octal/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Count-occurrences-of-a-substring b/Lang/Pluto/Count-occurrences-of-a-substring deleted file mode 120000 index 282d7ede4a..0000000000 --- a/Lang/Pluto/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Count-the-coins b/Lang/Pluto/Count-the-coins deleted file mode 120000 index 7996299523..0000000000 --- a/Lang/Pluto/Count-the-coins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-the-coins/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cramers-rule b/Lang/Pluto/Cramers-rule deleted file mode 120000 index 371e1d9db7..0000000000 --- a/Lang/Pluto/Cramers-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cramers-rule/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Create-a-file b/Lang/Pluto/Create-a-file deleted file mode 120000 index 1e22b0b1e3..0000000000 --- a/Lang/Pluto/Create-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-file/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Create-a-two-dimensional-array-at-runtime b/Lang/Pluto/Create-a-two-dimensional-array-at-runtime deleted file mode 120000 index 4da351e86e..0000000000 --- a/Lang/Pluto/Create-a-two-dimensional-array-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-two-dimensional-array-at-runtime/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cuban-primes b/Lang/Pluto/Cuban-primes deleted file mode 120000 index 6b91d15127..0000000000 --- a/Lang/Pluto/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cullen-and-Woodall-numbers b/Lang/Pluto/Cullen-and-Woodall-numbers deleted file mode 120000 index 663a789226..0000000000 --- a/Lang/Pluto/Cullen-and-Woodall-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cullen-and-Woodall-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cumulative-standard-deviation b/Lang/Pluto/Cumulative-standard-deviation deleted file mode 120000 index bfd250d57c..0000000000 --- a/Lang/Pluto/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Currency b/Lang/Pluto/Currency deleted file mode 120000 index 022bd123d4..0000000000 --- a/Lang/Pluto/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Currying b/Lang/Pluto/Currying deleted file mode 120000 index 98e5282551..0000000000 --- a/Lang/Pluto/Currying +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currying/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Curzon-numbers b/Lang/Pluto/Curzon-numbers deleted file mode 120000 index 19e831cce8..0000000000 --- a/Lang/Pluto/Curzon-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Curzon-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cut-a-rectangle b/Lang/Pluto/Cut-a-rectangle deleted file mode 120000 index 503ba83f0f..0000000000 --- a/Lang/Pluto/Cut-a-rectangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cut-a-rectangle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Cyclops-numbers b/Lang/Pluto/Cyclops-numbers deleted file mode 120000 index c731e7f9d2..0000000000 --- a/Lang/Pluto/Cyclops-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclops-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/DNS-query b/Lang/Pluto/DNS-query deleted file mode 120000 index abafcfbe46..0000000000 --- a/Lang/Pluto/DNS-query +++ /dev/null @@ -1 +0,0 @@ -../../Task/DNS-query/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Damm-algorithm b/Lang/Pluto/Damm-algorithm deleted file mode 120000 index 4db0c540c5..0000000000 --- a/Lang/Pluto/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Date-format b/Lang/Pluto/Date-format deleted file mode 120000 index e6307f8af0..0000000000 --- a/Lang/Pluto/Date-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-format/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Date-manipulation b/Lang/Pluto/Date-manipulation deleted file mode 120000 index 541e3b8538..0000000000 --- a/Lang/Pluto/Date-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-manipulation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Day-of-the-week b/Lang/Pluto/Day-of-the-week deleted file mode 120000 index c857bee861..0000000000 --- a/Lang/Pluto/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Pluto \ No newline at end of file diff --git a/Lang/Pluto/De-Bruijn-sequences b/Lang/Pluto/De-Bruijn-sequences deleted file mode 120000 index 7208c6eb97..0000000000 --- a/Lang/Pluto/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Deceptive-numbers b/Lang/Pluto/Deceptive-numbers deleted file mode 120000 index f13a36d2f4..0000000000 --- a/Lang/Pluto/Deceptive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deceptive-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Deepcopy b/Lang/Pluto/Deepcopy deleted file mode 120000 index 066df45f7c..0000000000 --- a/Lang/Pluto/Deepcopy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deepcopy/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Delegates b/Lang/Pluto/Delegates deleted file mode 120000 index 52103da749..0000000000 --- a/Lang/Pluto/Delegates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delegates/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Delete-a-file b/Lang/Pluto/Delete-a-file deleted file mode 120000 index b17ce9999b..0000000000 --- a/Lang/Pluto/Delete-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delete-a-file/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Demings-funnel b/Lang/Pluto/Demings-funnel deleted file mode 120000 index 56a8ba2ece..0000000000 --- a/Lang/Pluto/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Department-numbers b/Lang/Pluto/Department-numbers deleted file mode 120000 index 1666a30ed8..0000000000 --- a/Lang/Pluto/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Descending-primes b/Lang/Pluto/Descending-primes deleted file mode 120000 index c35e1667b5..0000000000 --- a/Lang/Pluto/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Detect-division-by-zero b/Lang/Pluto/Detect-division-by-zero deleted file mode 120000 index 36d9e93987..0000000000 --- a/Lang/Pluto/Detect-division-by-zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Detect-division-by-zero/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Determinant-and-permanent b/Lang/Pluto/Determinant-and-permanent deleted file mode 120000 index e1b29bc12a..0000000000 --- a/Lang/Pluto/Determinant-and-permanent +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determinant-and-permanent/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Determine-if-a-string-has-all-the-same-characters b/Lang/Pluto/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 030ea85992..0000000000 --- a/Lang/Pluto/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Determine-if-a-string-has-all-unique-characters b/Lang/Pluto/Determine-if-a-string-has-all-unique-characters deleted file mode 120000 index 79e7e032c2..0000000000 --- a/Lang/Pluto/Determine-if-a-string-has-all-unique-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-unique-characters/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Determine-if-a-string-is-collapsible b/Lang/Pluto/Determine-if-a-string-is-collapsible deleted file mode 120000 index dac3838017..0000000000 --- a/Lang/Pluto/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Determine-if-a-string-is-numeric b/Lang/Pluto/Determine-if-a-string-is-numeric deleted file mode 120000 index f3177e5d6e..0000000000 --- a/Lang/Pluto/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Determine-if-a-string-is-squeezable b/Lang/Pluto/Determine-if-a-string-is-squeezable deleted file mode 120000 index 17dbb0267a..0000000000 --- a/Lang/Pluto/Determine-if-a-string-is-squeezable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-squeezable/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Determine-if-two-triangles-overlap b/Lang/Pluto/Determine-if-two-triangles-overlap deleted file mode 120000 index d35e94d3a0..0000000000 --- a/Lang/Pluto/Determine-if-two-triangles-overlap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-two-triangles-overlap/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Determine-sentence-type b/Lang/Pluto/Determine-sentence-type deleted file mode 120000 index d97a791028..0000000000 --- a/Lang/Pluto/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Dice-game-probabilities b/Lang/Pluto/Dice-game-probabilities deleted file mode 120000 index b6d7ab05ea..0000000000 --- a/Lang/Pluto/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Digital-root b/Lang/Pluto/Digital-root deleted file mode 120000 index fb194db4fd..0000000000 --- a/Lang/Pluto/Digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Digital-root-Multiplicative-digital-root b/Lang/Pluto/Digital-root-Multiplicative-digital-root deleted file mode 120000 index 27b8582991..0000000000 --- a/Lang/Pluto/Digital-root-Multiplicative-digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root-Multiplicative-digital-root/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Disarium-numbers b/Lang/Pluto/Disarium-numbers deleted file mode 120000 index fd659f8581..0000000000 --- a/Lang/Pluto/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Discordian-date b/Lang/Pluto/Discordian-date deleted file mode 120000 index eef2a0d868..0000000000 --- a/Lang/Pluto/Discordian-date +++ /dev/null @@ -1 +0,0 @@ -../../Task/Discordian-date/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Display-a-linear-combination b/Lang/Pluto/Display-a-linear-combination deleted file mode 120000 index b9e618e087..0000000000 --- a/Lang/Pluto/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Distribution-of-0-digits-in-factorial-series b/Lang/Pluto/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index a06ffa876b..0000000000 --- a/Lang/Pluto/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Diversity-prediction-theorem b/Lang/Pluto/Diversity-prediction-theorem deleted file mode 120000 index 1855763e0b..0000000000 --- a/Lang/Pluto/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Doomsday-rule b/Lang/Pluto/Doomsday-rule deleted file mode 120000 index 0bae1c428f..0000000000 --- a/Lang/Pluto/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Doubly-linked-list-Definition b/Lang/Pluto/Doubly-linked-list-Definition deleted file mode 120000 index 2c673acc7c..0000000000 --- a/Lang/Pluto/Doubly-linked-list-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Definition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Doubly-linked-list-Element-definition b/Lang/Pluto/Doubly-linked-list-Element-definition deleted file mode 120000 index 7b2f1839e3..0000000000 --- a/Lang/Pluto/Doubly-linked-list-Element-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Element-definition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Doubly-linked-list-Element-insertion b/Lang/Pluto/Doubly-linked-list-Element-insertion deleted file mode 120000 index 566d3ce443..0000000000 --- a/Lang/Pluto/Doubly-linked-list-Element-insertion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Element-insertion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Doubly-linked-list-Traversal b/Lang/Pluto/Doubly-linked-list-Traversal deleted file mode 120000 index 9a9262d67b..0000000000 --- a/Lang/Pluto/Doubly-linked-list-Traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Traversal/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Dragon-curve b/Lang/Pluto/Dragon-curve deleted file mode 120000 index f1e72e5ef1..0000000000 --- a/Lang/Pluto/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Draw-a-sphere b/Lang/Pluto/Draw-a-sphere deleted file mode 120000 index 639e598bda..0000000000 --- a/Lang/Pluto/Draw-a-sphere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-sphere/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Dutch-national-flag-problem b/Lang/Pluto/Dutch-national-flag-problem deleted file mode 120000 index 4ca6eb0344..0000000000 --- a/Lang/Pluto/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Dynamic-variable-names b/Lang/Pluto/Dynamic-variable-names deleted file mode 120000 index 9f84b3a575..0000000000 --- a/Lang/Pluto/Dynamic-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dynamic-variable-names/Pluto \ No newline at end of file diff --git a/Lang/Pluto/EKG-sequence-convergence b/Lang/Pluto/EKG-sequence-convergence deleted file mode 120000 index 5e7a87aa27..0000000000 --- a/Lang/Pluto/EKG-sequence-convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/EKG-sequence-convergence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Earliest-difference-between-prime-gaps b/Lang/Pluto/Earliest-difference-between-prime-gaps deleted file mode 120000 index 7c35dd843e..0000000000 --- a/Lang/Pluto/Earliest-difference-between-prime-gaps +++ /dev/null @@ -1 +0,0 @@ -../../Task/Earliest-difference-between-prime-gaps/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Eban-numbers b/Lang/Pluto/Eban-numbers deleted file mode 120000 index 3c27b7fc5e..0000000000 --- a/Lang/Pluto/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Egyptian-division b/Lang/Pluto/Egyptian-division deleted file mode 120000 index 1935b9a4b4..0000000000 --- a/Lang/Pluto/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Element-wise-operations b/Lang/Pluto/Element-wise-operations deleted file mode 120000 index a809ac3319..0000000000 --- a/Lang/Pluto/Element-wise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Element-wise-operations/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Elementary-cellular-automaton-Random-number-generator b/Lang/Pluto/Elementary-cellular-automaton-Random-number-generator deleted file mode 120000 index c9e4dd2c5e..0000000000 --- a/Lang/Pluto/Elementary-cellular-automaton-Random-number-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elementary-cellular-automaton-Random-number-generator/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Elliptic-curve-arithmetic b/Lang/Pluto/Elliptic-curve-arithmetic deleted file mode 120000 index 01ab3acc14..0000000000 --- a/Lang/Pluto/Elliptic-curve-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-curve-arithmetic/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Emirp-primes b/Lang/Pluto/Emirp-primes deleted file mode 120000 index 70bc487ce4..0000000000 --- a/Lang/Pluto/Emirp-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Emirp-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Entropy b/Lang/Pluto/Entropy deleted file mode 120000 index ad4816da25..0000000000 --- a/Lang/Pluto/Entropy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Entropy-Narcissist b/Lang/Pluto/Entropy-Narcissist deleted file mode 120000 index b44bd0dceb..0000000000 --- a/Lang/Pluto/Entropy-Narcissist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Entropy-Narcissist/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Enumerations b/Lang/Pluto/Enumerations deleted file mode 120000 index f1e25dcea7..0000000000 --- a/Lang/Pluto/Enumerations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enumerations/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Environment-variables b/Lang/Pluto/Environment-variables deleted file mode 120000 index 544499e35f..0000000000 --- a/Lang/Pluto/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Equal-prime-and-composite-sums b/Lang/Pluto/Equal-prime-and-composite-sums deleted file mode 120000 index 5924d0c24d..0000000000 --- a/Lang/Pluto/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Equilibrium-index b/Lang/Pluto/Equilibrium-index deleted file mode 120000 index d670c800de..0000000000 --- a/Lang/Pluto/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Erd-s-Selfridge-categorization-of-primes b/Lang/Pluto/Erd-s-Selfridge-categorization-of-primes deleted file mode 120000 index ee9715de69..0000000000 --- a/Lang/Pluto/Erd-s-Selfridge-categorization-of-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Erd-s-Selfridge-categorization-of-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Esthetic-numbers b/Lang/Pluto/Esthetic-numbers deleted file mode 120000 index 5b009a94ca..0000000000 --- a/Lang/Pluto/Esthetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Esthetic-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ethiopian-multiplication b/Lang/Pluto/Ethiopian-multiplication deleted file mode 120000 index b71d5e1260..0000000000 --- a/Lang/Pluto/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Euclid-Mullin-sequence b/Lang/Pluto/Euclid-Mullin-sequence deleted file mode 120000 index 4b920b7289..0000000000 --- a/Lang/Pluto/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Euler-method b/Lang/Pluto/Euler-method deleted file mode 120000 index b7dbfe93a0..0000000000 --- a/Lang/Pluto/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Eulers-constant-0.5772... b/Lang/Pluto/Eulers-constant-0.5772... deleted file mode 120000 index 43d30a3576..0000000000 --- a/Lang/Pluto/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../Pluto \ No newline at end of file diff --git a/Lang/Pluto/Eulers-identity b/Lang/Pluto/Eulers-identity deleted file mode 120000 index 97a4ba8ed8..0000000000 --- a/Lang/Pluto/Eulers-identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-identity/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Eulers-sum-of-powers-conjecture b/Lang/Pluto/Eulers-sum-of-powers-conjecture deleted file mode 120000 index d14dd7e926..0000000000 --- a/Lang/Pluto/Eulers-sum-of-powers-conjecture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-sum-of-powers-conjecture/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Evaluate-binomial-coefficients b/Lang/Pluto/Evaluate-binomial-coefficients deleted file mode 120000 index 00328c39e4..0000000000 --- a/Lang/Pluto/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Even-or-odd b/Lang/Pluto/Even-or-odd deleted file mode 120000 index fc5cc6a785..0000000000 --- a/Lang/Pluto/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Exceptions b/Lang/Pluto/Exceptions deleted file mode 120000 index d201ead5a3..0000000000 --- a/Lang/Pluto/Exceptions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exceptions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Exceptions-Catch-an-exception-thrown-in-a-nested-call b/Lang/Pluto/Exceptions-Catch-an-exception-thrown-in-a-nested-call deleted file mode 120000 index eeff87c8ee..0000000000 --- a/Lang/Pluto/Exceptions-Catch-an-exception-thrown-in-a-nested-call +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exceptions-Catch-an-exception-thrown-in-a-nested-call/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Execute-Brain- b/Lang/Pluto/Execute-Brain- deleted file mode 120000 index 19151dc329..0000000000 --- a/Lang/Pluto/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Execute-Computer-Zero b/Lang/Pluto/Execute-Computer-Zero deleted file mode 120000 index 23a9487cf2..0000000000 --- a/Lang/Pluto/Execute-Computer-Zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Computer-Zero/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Execute-a-system-command b/Lang/Pluto/Execute-a-system-command deleted file mode 120000 index 005fc83a4b..0000000000 --- a/Lang/Pluto/Execute-a-system-command +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-a-system-command/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Exponentiation-operator b/Lang/Pluto/Exponentiation-operator deleted file mode 120000 index ebdd988197..0000000000 --- a/Lang/Pluto/Exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-operator/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Exponentiation-order b/Lang/Pluto/Exponentiation-order deleted file mode 120000 index 9327e0a3aa..0000000000 --- a/Lang/Pluto/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Exponentiation-with-infix-operators-in-or-operating-on-the-base b/Lang/Pluto/Exponentiation-with-infix-operators-in-or-operating-on-the-base deleted file mode 120000 index 3b14bba6bd..0000000000 --- a/Lang/Pluto/Exponentiation-with-infix-operators-in-or-operating-on-the-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-with-infix-operators-in-or-operating-on-the-base/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Extensible-prime-generator b/Lang/Pluto/Extensible-prime-generator deleted file mode 120000 index e39589d864..0000000000 --- a/Lang/Pluto/Extensible-prime-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extensible-prime-generator/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Extreme-floating-point-values b/Lang/Pluto/Extreme-floating-point-values deleted file mode 120000 index f7dff2ba0b..0000000000 --- a/Lang/Pluto/Extreme-floating-point-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extreme-floating-point-values/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Factorial b/Lang/Pluto/Factorial deleted file mode 120000 index 26b76cb13d..0000000000 --- a/Lang/Pluto/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Factorial-primes b/Lang/Pluto/Factorial-primes deleted file mode 120000 index b57eac84ac..0000000000 --- a/Lang/Pluto/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Factorions b/Lang/Pluto/Factorions deleted file mode 120000 index 0d6fdce25f..0000000000 --- a/Lang/Pluto/Factorions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Factors-of-a-Mersenne-number b/Lang/Pluto/Factors-of-a-Mersenne-number deleted file mode 120000 index d60ce6e99f..0000000000 --- a/Lang/Pluto/Factors-of-a-Mersenne-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-a-Mersenne-number/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Factors-of-an-integer b/Lang/Pluto/Factors-of-an-integer deleted file mode 120000 index cc13f27676..0000000000 --- a/Lang/Pluto/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fairshare-between-two-and-more b/Lang/Pluto/Fairshare-between-two-and-more deleted file mode 120000 index bfe6b9462c..0000000000 --- a/Lang/Pluto/Fairshare-between-two-and-more +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fairshare-between-two-and-more/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Farey-sequence b/Lang/Pluto/Farey-sequence deleted file mode 120000 index d29c19b41e..0000000000 --- a/Lang/Pluto/Farey-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Farey-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fast-Fourier-transform b/Lang/Pluto/Fast-Fourier-transform deleted file mode 120000 index d83789d068..0000000000 --- a/Lang/Pluto/Fast-Fourier-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fast-Fourier-transform/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Feigenbaum-constant-calculation b/Lang/Pluto/Feigenbaum-constant-calculation deleted file mode 120000 index 256bf8cb19..0000000000 --- a/Lang/Pluto/Feigenbaum-constant-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Feigenbaum-constant-calculation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fermat-numbers b/Lang/Pluto/Fermat-numbers deleted file mode 120000 index 45d4d630d7..0000000000 --- a/Lang/Pluto/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fibonacci-n-step-number-sequences b/Lang/Pluto/Fibonacci-n-step-number-sequences deleted file mode 120000 index 82a6f3ddc3..0000000000 --- a/Lang/Pluto/Fibonacci-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-n-step-number-sequences/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fibonacci-sequence b/Lang/Pluto/Fibonacci-sequence deleted file mode 120000 index efff8e1eb6..0000000000 --- a/Lang/Pluto/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fibonacci-word b/Lang/Pluto/Fibonacci-word deleted file mode 120000 index cbcb68d78f..0000000000 --- a/Lang/Pluto/Fibonacci-word +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-word/Pluto \ No newline at end of file diff --git a/Lang/Pluto/File-extension-is-in-extensions-list b/Lang/Pluto/File-extension-is-in-extensions-list deleted file mode 120000 index 7414b8a00c..0000000000 --- a/Lang/Pluto/File-extension-is-in-extensions-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-extension-is-in-extensions-list/Pluto \ No newline at end of file diff --git a/Lang/Pluto/File-modification-time b/Lang/Pluto/File-modification-time deleted file mode 120000 index b0430abc54..0000000000 --- a/Lang/Pluto/File-modification-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-modification-time/Pluto \ No newline at end of file diff --git a/Lang/Pluto/File-size b/Lang/Pluto/File-size deleted file mode 120000 index 998a7a784d..0000000000 --- a/Lang/Pluto/File-size +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-size/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Filter b/Lang/Pluto/Filter deleted file mode 120000 index 98b0321ee6..0000000000 --- a/Lang/Pluto/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Find-if-a-point-is-within-a-triangle b/Lang/Pluto/Find-if-a-point-is-within-a-triangle deleted file mode 120000 index 2f4b95698d..0000000000 --- a/Lang/Pluto/Find-if-a-point-is-within-a-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-if-a-point-is-within-a-triangle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Find-the-last-Sunday-of-each-month b/Lang/Pluto/Find-the-last-Sunday-of-each-month deleted file mode 120000 index dbefdf7ab1..0000000000 --- a/Lang/Pluto/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/Pluto \ No newline at end of file diff --git a/Lang/Pluto/First-class-functions b/Lang/Pluto/First-class-functions deleted file mode 120000 index 0fe40c3eac..0000000000 --- a/Lang/Pluto/First-class-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/First-class-functions-Use-numbers-analogously b/Lang/Pluto/First-class-functions-Use-numbers-analogously deleted file mode 120000 index 8d26dcc696..0000000000 --- a/Lang/Pluto/First-class-functions-Use-numbers-analogously +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions-Use-numbers-analogously/Pluto \ No newline at end of file diff --git a/Lang/Pluto/First-perfect-square-in-base-n-with-n-unique-digits b/Lang/Pluto/First-perfect-square-in-base-n-with-n-unique-digits deleted file mode 120000 index 5163776997..0000000000 --- a/Lang/Pluto/First-perfect-square-in-base-n-with-n-unique-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-perfect-square-in-base-n-with-n-unique-digits/Pluto \ No newline at end of file diff --git a/Lang/Pluto/First-power-of-2-that-has-leading-decimal-digits-of-12 b/Lang/Pluto/First-power-of-2-that-has-leading-decimal-digits-of-12 deleted file mode 120000 index e709baba03..0000000000 --- a/Lang/Pluto/First-power-of-2-that-has-leading-decimal-digits-of-12 +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-power-of-2-that-has-leading-decimal-digits-of-12/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Five-weekends b/Lang/Pluto/Five-weekends deleted file mode 120000 index 00a410b463..0000000000 --- a/Lang/Pluto/Five-weekends +++ /dev/null @@ -1 +0,0 @@ -../../Task/Five-weekends/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fivenum b/Lang/Pluto/Fivenum deleted file mode 120000 index a69f6ae762..0000000000 --- a/Lang/Pluto/Fivenum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fivenum/Pluto \ No newline at end of file diff --git a/Lang/Pluto/FizzBuzz b/Lang/Pluto/FizzBuzz deleted file mode 120000 index bd54d0d8bb..0000000000 --- a/Lang/Pluto/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Flatten-a-list b/Lang/Pluto/Flatten-a-list deleted file mode 120000 index 821ee95cae..0000000000 --- a/Lang/Pluto/Flatten-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flatten-a-list/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Floyd-Warshall-algorithm b/Lang/Pluto/Floyd-Warshall-algorithm deleted file mode 120000 index 7df2d45291..0000000000 --- a/Lang/Pluto/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Floyds-triangle b/Lang/Pluto/Floyds-triangle deleted file mode 120000 index 7d85d7bf3e..0000000000 --- a/Lang/Pluto/Floyds-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyds-triangle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Formatted-numeric-output b/Lang/Pluto/Formatted-numeric-output deleted file mode 120000 index ca4bc2e2c0..0000000000 --- a/Lang/Pluto/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fortunate-numbers b/Lang/Pluto/Fortunate-numbers deleted file mode 120000 index 78cf9f5f36..0000000000 --- a/Lang/Pluto/Fortunate-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fortunate-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Forward-difference b/Lang/Pluto/Forward-difference deleted file mode 120000 index f75e0263fe..0000000000 --- a/Lang/Pluto/Forward-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Forward-difference/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Four-is-magic b/Lang/Pluto/Four-is-magic deleted file mode 120000 index 8f0564da6b..0000000000 --- a/Lang/Pluto/Four-is-magic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Four-is-magic/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Function-composition b/Lang/Pluto/Function-composition deleted file mode 120000 index 89443d02fb..0000000000 --- a/Lang/Pluto/Function-composition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-composition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Function-definition b/Lang/Pluto/Function-definition deleted file mode 120000 index 8c3e064f65..0000000000 --- a/Lang/Pluto/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Fusc-sequence b/Lang/Pluto/Fusc-sequence deleted file mode 120000 index af89d11bec..0000000000 --- a/Lang/Pluto/Fusc-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fusc-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Gamma-function b/Lang/Pluto/Gamma-function deleted file mode 120000 index 8b7dee23dc..0000000000 --- a/Lang/Pluto/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Gapful-numbers b/Lang/Pluto/Gapful-numbers deleted file mode 120000 index 0b3bce275e..0000000000 --- a/Lang/Pluto/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Gauss-Jordan-matrix-inversion b/Lang/Pluto/Gauss-Jordan-matrix-inversion deleted file mode 120000 index 75ed24ffd1..0000000000 --- a/Lang/Pluto/Gauss-Jordan-matrix-inversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gauss-Jordan-matrix-inversion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/General-FizzBuzz b/Lang/Pluto/General-FizzBuzz deleted file mode 120000 index a7cf491b38..0000000000 --- a/Lang/Pluto/General-FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/General-FizzBuzz/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Generate-lower-case-ASCII-alphabet b/Lang/Pluto/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 64f2576fe0..0000000000 --- a/Lang/Pluto/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Generator-Exponential b/Lang/Pluto/Generator-Exponential deleted file mode 120000 index 26eb55a2a0..0000000000 --- a/Lang/Pluto/Generator-Exponential +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generator-Exponential/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Giuga-numbers b/Lang/Pluto/Giuga-numbers deleted file mode 120000 index 221b7a2689..0000000000 --- a/Lang/Pluto/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Goldbachs-comet b/Lang/Pluto/Goldbachs-comet deleted file mode 120000 index ff1cca329d..0000000000 --- a/Lang/Pluto/Goldbachs-comet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Goldbachs-comet/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Golden-ratio-Convergence b/Lang/Pluto/Golden-ratio-Convergence deleted file mode 120000 index 15a2256122..0000000000 --- a/Lang/Pluto/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Gray-code b/Lang/Pluto/Gray-code deleted file mode 120000 index afd6df8f4b..0000000000 --- a/Lang/Pluto/Gray-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gray-code/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Greatest-common-divisor b/Lang/Pluto/Greatest-common-divisor deleted file mode 120000 index a4feeee2fd..0000000000 --- a/Lang/Pluto/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Greatest-element-of-a-list b/Lang/Pluto/Greatest-element-of-a-list deleted file mode 120000 index 85148f8e2b..0000000000 --- a/Lang/Pluto/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Greatest-subsequential-sum b/Lang/Pluto/Greatest-subsequential-sum deleted file mode 120000 index 308ac33a20..0000000000 --- a/Lang/Pluto/Greatest-subsequential-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-subsequential-sum/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Greedy-algorithm-for-Egyptian-fractions b/Lang/Pluto/Greedy-algorithm-for-Egyptian-fractions deleted file mode 120000 index 97dc6bbde7..0000000000 --- a/Lang/Pluto/Greedy-algorithm-for-Egyptian-fractions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greedy-algorithm-for-Egyptian-fractions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Guess-the-number b/Lang/Pluto/Guess-the-number deleted file mode 120000 index f68fa3fc41..0000000000 --- a/Lang/Pluto/Guess-the-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hailstone-sequence b/Lang/Pluto/Hailstone-sequence deleted file mode 120000 index 0c70c36e8a..0000000000 --- a/Lang/Pluto/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Halt-and-catch-fire b/Lang/Pluto/Halt-and-catch-fire deleted file mode 120000 index f8e69baccf..0000000000 --- a/Lang/Pluto/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Happy-numbers b/Lang/Pluto/Happy-numbers deleted file mode 120000 index 8184fae2dd..0000000000 --- a/Lang/Pluto/Happy-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Happy-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Harmonic-series b/Lang/Pluto/Harmonic-series deleted file mode 120000 index 9e5681ab0c..0000000000 --- a/Lang/Pluto/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Harshad-or-Niven-series b/Lang/Pluto/Harshad-or-Niven-series deleted file mode 120000 index 8a3855605b..0000000000 --- a/Lang/Pluto/Harshad-or-Niven-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harshad-or-Niven-series/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hash-from-two-arrays b/Lang/Pluto/Hash-from-two-arrays deleted file mode 120000 index 5612dbf1a3..0000000000 --- a/Lang/Pluto/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hash-join b/Lang/Pluto/Hash-join deleted file mode 120000 index 857fcc5b68..0000000000 --- a/Lang/Pluto/Hash-join +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-join/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Haversine-formula b/Lang/Pluto/Haversine-formula deleted file mode 120000 index b9fcee8ac0..0000000000 --- a/Lang/Pluto/Haversine-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Haversine-formula/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hello-world-Graphical b/Lang/Pluto/Hello-world-Graphical deleted file mode 120000 index b0cbed710e..0000000000 --- a/Lang/Pluto/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hello-world-Newbie b/Lang/Pluto/Hello-world-Newbie deleted file mode 120000 index d7c1d093e2..0000000000 --- a/Lang/Pluto/Hello-world-Newbie +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newbie/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hello-world-Newline-omission b/Lang/Pluto/Hello-world-Newline-omission deleted file mode 120000 index 5020503885..0000000000 --- a/Lang/Pluto/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hello-world-Standard-error b/Lang/Pluto/Hello-world-Standard-error deleted file mode 120000 index 2b41d962cc..0000000000 --- a/Lang/Pluto/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hello-world-Text b/Lang/Pluto/Hello-world-Text deleted file mode 120000 index 6d5bb1406f..0000000000 --- a/Lang/Pluto/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hex-words b/Lang/Pluto/Hex-words deleted file mode 120000 index 62ff8632b8..0000000000 --- a/Lang/Pluto/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hickerson-series-of-almost-integers b/Lang/Pluto/Hickerson-series-of-almost-integers deleted file mode 120000 index 1706eca746..0000000000 --- a/Lang/Pluto/Hickerson-series-of-almost-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hickerson-series-of-almost-integers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Higher-order-functions b/Lang/Pluto/Higher-order-functions deleted file mode 120000 index 532e183ee0..0000000000 --- a/Lang/Pluto/Higher-order-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Higher-order-functions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hofstadter-Q-sequence b/Lang/Pluto/Hofstadter-Q-sequence deleted file mode 120000 index 55c19c4e5e..0000000000 --- a/Lang/Pluto/Hofstadter-Q-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Q-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Home-primes b/Lang/Pluto/Home-primes deleted file mode 120000 index 66e3e487a6..0000000000 --- a/Lang/Pluto/Home-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Home-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Horners-rule-for-polynomial-evaluation b/Lang/Pluto/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 02512d6f7e..0000000000 --- a/Lang/Pluto/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Hostname b/Lang/Pluto/Hostname deleted file mode 120000 index c1fe0db0ef..0000000000 --- a/Lang/Pluto/Hostname +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hostname/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Humble-numbers b/Lang/Pluto/Humble-numbers deleted file mode 120000 index f616a12fe9..0000000000 --- a/Lang/Pluto/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/IBAN b/Lang/Pluto/IBAN deleted file mode 120000 index 3c48349f04..0000000000 --- a/Lang/Pluto/IBAN +++ /dev/null @@ -1 +0,0 @@ -../../Task/IBAN/Pluto \ No newline at end of file diff --git a/Lang/Pluto/ISBN13-check-digit b/Lang/Pluto/ISBN13-check-digit deleted file mode 120000 index 18cc8cf2ba..0000000000 --- a/Lang/Pluto/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Identity-matrix b/Lang/Pluto/Identity-matrix deleted file mode 120000 index 755ad3b6ef..0000000000 --- a/Lang/Pluto/Identity-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Identity-matrix/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Idiomatically-determine-all-the-lowercase-and-uppercase-letters b/Lang/Pluto/Idiomatically-determine-all-the-lowercase-and-uppercase-letters deleted file mode 120000 index 1ce83f951b..0000000000 --- a/Lang/Pluto/Idiomatically-determine-all-the-lowercase-and-uppercase-letters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Increment-a-numerical-string b/Lang/Pluto/Increment-a-numerical-string deleted file mode 120000 index 5413743d7c..0000000000 --- a/Lang/Pluto/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Index-finite-lists-of-positive-integers b/Lang/Pluto/Index-finite-lists-of-positive-integers deleted file mode 120000 index 44f395ae80..0000000000 --- a/Lang/Pluto/Index-finite-lists-of-positive-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Index-finite-lists-of-positive-integers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Infinity b/Lang/Pluto/Infinity deleted file mode 120000 index cb81bde8e2..0000000000 --- a/Lang/Pluto/Infinity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Infinity/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Inheritance-Multiple b/Lang/Pluto/Inheritance-Multiple deleted file mode 120000 index 8172d1b878..0000000000 --- a/Lang/Pluto/Inheritance-Multiple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Multiple/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Inheritance-Single b/Lang/Pluto/Inheritance-Single deleted file mode 120000 index 978ce6e7cf..0000000000 --- a/Lang/Pluto/Inheritance-Single +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Single/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Integer-overflow b/Lang/Pluto/Integer-overflow deleted file mode 120000 index 21ae81881b..0000000000 --- a/Lang/Pluto/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Inverted-syntax b/Lang/Pluto/Inverted-syntax deleted file mode 120000 index 689ac95819..0000000000 --- a/Lang/Pluto/Inverted-syntax +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inverted-syntax/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Isqrt-integer-square-root-of-X b/Lang/Pluto/Isqrt-integer-square-root-of-X deleted file mode 120000 index e61bc6f394..0000000000 --- a/Lang/Pluto/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Iterated-digits-squaring b/Lang/Pluto/Iterated-digits-squaring deleted file mode 120000 index 1e0c30dec8..0000000000 --- a/Lang/Pluto/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/Pluto \ No newline at end of file diff --git a/Lang/Pluto/JSON b/Lang/Pluto/JSON deleted file mode 120000 index bc77142a3f..0000000000 --- a/Lang/Pluto/JSON +++ /dev/null @@ -1 +0,0 @@ -../../Task/JSON/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Jacobi-symbol b/Lang/Pluto/Jacobi-symbol deleted file mode 120000 index 004a1623cc..0000000000 --- a/Lang/Pluto/Jacobi-symbol +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobi-symbol/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Jacobsthal-numbers b/Lang/Pluto/Jacobsthal-numbers deleted file mode 120000 index 310c137dfd..0000000000 --- a/Lang/Pluto/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Jaro-Winkler-distance b/Lang/Pluto/Jaro-Winkler-distance deleted file mode 120000 index c18faa1587..0000000000 --- a/Lang/Pluto/Jaro-Winkler-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-Winkler-distance/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Jaro-similarity b/Lang/Pluto/Jaro-similarity deleted file mode 120000 index 7fbb18452a..0000000000 --- a/Lang/Pluto/Jaro-similarity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-similarity/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Jensens-Device b/Lang/Pluto/Jensens-Device deleted file mode 120000 index 1f301e92cb..0000000000 --- a/Lang/Pluto/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Jewels-and-stones b/Lang/Pluto/Jewels-and-stones deleted file mode 120000 index 0d8632e132..0000000000 --- a/Lang/Pluto/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Jordan-P-lya-numbers b/Lang/Pluto/Jordan-P-lya-numbers deleted file mode 120000 index 69c05770d3..0000000000 --- a/Lang/Pluto/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/JortSort b/Lang/Pluto/JortSort deleted file mode 120000 index 2f3a60be62..0000000000 --- a/Lang/Pluto/JortSort +++ /dev/null @@ -1 +0,0 @@ -../../Task/JortSort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Josephus-problem b/Lang/Pluto/Josephus-problem deleted file mode 120000 index c17c5c052c..0000000000 --- a/Lang/Pluto/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Juggler-sequence b/Lang/Pluto/Juggler-sequence deleted file mode 120000 index 55e904505f..0000000000 --- a/Lang/Pluto/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Julia-set b/Lang/Pluto/Julia-set deleted file mode 120000 index 47c2b492f2..0000000000 --- a/Lang/Pluto/Julia-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Julia-set/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Jump-anywhere b/Lang/Pluto/Jump-anywhere deleted file mode 120000 index 0cc6c03c6c..0000000000 --- a/Lang/Pluto/Jump-anywhere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jump-anywhere/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Kaprekar-numbers b/Lang/Pluto/Kaprekar-numbers deleted file mode 120000 index 1c32b1316d..0000000000 --- a/Lang/Pluto/Kaprekar-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kaprekar-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Knapsack-problem-0-1 b/Lang/Pluto/Knapsack-problem-0-1 deleted file mode 120000 index 154c3bec73..0000000000 --- a/Lang/Pluto/Knapsack-problem-0-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-0-1/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Knapsack-problem-Bounded b/Lang/Pluto/Knapsack-problem-Bounded deleted file mode 120000 index fdfd53d307..0000000000 --- a/Lang/Pluto/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Knapsack-problem-Continuous b/Lang/Pluto/Knapsack-problem-Continuous deleted file mode 120000 index afd8aad5a0..0000000000 --- a/Lang/Pluto/Knapsack-problem-Continuous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Continuous/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Knapsack-problem-Unbounded b/Lang/Pluto/Knapsack-problem-Unbounded deleted file mode 120000 index a47d914c76..0000000000 --- a/Lang/Pluto/Knapsack-problem-Unbounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Unbounded/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Knuth-shuffle b/Lang/Pluto/Knuth-shuffle deleted file mode 120000 index e7dddcd355..0000000000 --- a/Lang/Pluto/Knuth-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuth-shuffle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Knuths-algorithm-S b/Lang/Pluto/Knuths-algorithm-S deleted file mode 120000 index 541d484707..0000000000 --- a/Lang/Pluto/Knuths-algorithm-S +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuths-algorithm-S/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Kronecker-product b/Lang/Pluto/Kronecker-product deleted file mode 120000 index 3e6a6e5b94..0000000000 --- a/Lang/Pluto/Kronecker-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Kronecker-product-based-fractals b/Lang/Pluto/Kronecker-product-based-fractals deleted file mode 120000 index 3cfc235117..0000000000 --- a/Lang/Pluto/Kronecker-product-based-fractals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product-based-fractals/Pluto \ No newline at end of file diff --git a/Lang/Pluto/LU-decomposition b/Lang/Pluto/LU-decomposition deleted file mode 120000 index 6a8af92062..0000000000 --- a/Lang/Pluto/LU-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/LU-decomposition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/LZW-compression b/Lang/Pluto/LZW-compression deleted file mode 120000 index 50427fda5c..0000000000 --- a/Lang/Pluto/LZW-compression +++ /dev/null @@ -1 +0,0 @@ -../../Task/LZW-compression/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Lah-numbers b/Lang/Pluto/Lah-numbers deleted file mode 120000 index f5d9d24027..0000000000 --- a/Lang/Pluto/Lah-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lah-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Langtons-ant b/Lang/Pluto/Langtons-ant deleted file mode 120000 index fbf8c4cec8..0000000000 --- a/Lang/Pluto/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Largest-number-divisible-by-its-digits b/Lang/Pluto/Largest-number-divisible-by-its-digits deleted file mode 120000 index 0399c7d845..0000000000 --- a/Lang/Pluto/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Largest-proper-divisor-of-n b/Lang/Pluto/Largest-proper-divisor-of-n deleted file mode 120000 index d21ea35abe..0000000000 --- a/Lang/Pluto/Largest-proper-divisor-of-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-proper-divisor-of-n/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Last-Friday-of-each-month b/Lang/Pluto/Last-Friday-of-each-month deleted file mode 120000 index 34cb3bb01f..0000000000 --- a/Lang/Pluto/Last-Friday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-Friday-of-each-month/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Leap-year b/Lang/Pluto/Leap-year deleted file mode 120000 index 9574544885..0000000000 --- a/Lang/Pluto/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Least-common-multiple b/Lang/Pluto/Least-common-multiple deleted file mode 120000 index 315d9ee3c1..0000000000 --- a/Lang/Pluto/Least-common-multiple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Least-common-multiple/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Legendre-prime-counting-function b/Lang/Pluto/Legendre-prime-counting-function deleted file mode 120000 index f91e3cb00d..0000000000 --- a/Lang/Pluto/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Leonardo-numbers b/Lang/Pluto/Leonardo-numbers deleted file mode 120000 index 6a0846d95e..0000000000 --- a/Lang/Pluto/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/List-comprehensions b/Lang/Pluto/List-comprehensions deleted file mode 120000 index e183959a9e..0000000000 --- a/Lang/Pluto/List-comprehensions +++ /dev/null @@ -1 +0,0 @@ -../../Task/List-comprehensions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Literals-Floating-point b/Lang/Pluto/Literals-Floating-point deleted file mode 120000 index f40aa2eb22..0000000000 --- a/Lang/Pluto/Literals-Floating-point +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Floating-point/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Literals-Integer b/Lang/Pluto/Literals-Integer deleted file mode 120000 index 2ca0134201..0000000000 --- a/Lang/Pluto/Literals-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Integer/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Logistic-curve-fitting-in-epidemiology b/Lang/Pluto/Logistic-curve-fitting-in-epidemiology deleted file mode 120000 index 5620c74aa1..0000000000 --- a/Lang/Pluto/Logistic-curve-fitting-in-epidemiology +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logistic-curve-fitting-in-epidemiology/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Long-year b/Lang/Pluto/Long-year deleted file mode 120000 index e81c486cc5..0000000000 --- a/Lang/Pluto/Long-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-year/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Longest-increasing-subsequence b/Lang/Pluto/Longest-increasing-subsequence deleted file mode 120000 index 24fdc53a13..0000000000 --- a/Lang/Pluto/Longest-increasing-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-increasing-subsequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Longest-string-challenge b/Lang/Pluto/Longest-string-challenge deleted file mode 120000 index 8e8deb88da..0000000000 --- a/Lang/Pluto/Longest-string-challenge +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-string-challenge/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loop-over-multiple-arrays-simultaneously b/Lang/Pluto/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index cebc902b5b..0000000000 --- a/Lang/Pluto/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Break b/Lang/Pluto/Loops-Break deleted file mode 120000 index 2b3657d2de..0000000000 --- a/Lang/Pluto/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Continue b/Lang/Pluto/Loops-Continue deleted file mode 120000 index 5f41db6125..0000000000 --- a/Lang/Pluto/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Do-while b/Lang/Pluto/Loops-Do-while deleted file mode 120000 index a265d4decf..0000000000 --- a/Lang/Pluto/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Downward-for b/Lang/Pluto/Loops-Downward-for deleted file mode 120000 index 6302a5cc0d..0000000000 --- a/Lang/Pluto/Loops-Downward-for +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Downward-for/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-For b/Lang/Pluto/Loops-For deleted file mode 120000 index 9f83ae12bd..0000000000 --- a/Lang/Pluto/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-For-with-a-specified-step b/Lang/Pluto/Loops-For-with-a-specified-step deleted file mode 120000 index 508122a2e3..0000000000 --- a/Lang/Pluto/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Foreach b/Lang/Pluto/Loops-Foreach deleted file mode 120000 index 9dbfba413e..0000000000 --- a/Lang/Pluto/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Increment-loop-index-within-loop-body b/Lang/Pluto/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index f1ce9d6778..0000000000 --- a/Lang/Pluto/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Infinite b/Lang/Pluto/Loops-Infinite deleted file mode 120000 index 50986dd414..0000000000 --- a/Lang/Pluto/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-N-plus-one-half b/Lang/Pluto/Loops-N-plus-one-half deleted file mode 120000 index 433e3f6336..0000000000 --- a/Lang/Pluto/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Nested b/Lang/Pluto/Loops-Nested deleted file mode 120000 index 96f4c43c62..0000000000 --- a/Lang/Pluto/Loops-Nested +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Nested/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-While b/Lang/Pluto/Loops-While deleted file mode 120000 index 3aa5f84aba..0000000000 --- a/Lang/Pluto/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-With-multiple-ranges b/Lang/Pluto/Loops-With-multiple-ranges deleted file mode 120000 index b1ef3af096..0000000000 --- a/Lang/Pluto/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Loops-Wrong-ranges b/Lang/Pluto/Loops-Wrong-ranges deleted file mode 120000 index 7b8bd4ecb0..0000000000 --- a/Lang/Pluto/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Lucas-Lehmer-test b/Lang/Pluto/Lucas-Lehmer-test deleted file mode 120000 index 247c0bbafb..0000000000 --- a/Lang/Pluto/Lucas-Lehmer-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lucas-Lehmer-test/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Luhn-test-of-credit-card-numbers b/Lang/Pluto/Luhn-test-of-credit-card-numbers deleted file mode 120000 index c06ed72be3..0000000000 --- a/Lang/Pluto/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/M-bius-function b/Lang/Pluto/M-bius-function deleted file mode 120000 index 99da13a437..0000000000 --- a/Lang/Pluto/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/MD4 b/Lang/Pluto/MD4 deleted file mode 120000 index b6660e39bc..0000000000 --- a/Lang/Pluto/MD4 +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD4/Pluto \ No newline at end of file diff --git a/Lang/Pluto/MD5 b/Lang/Pluto/MD5 deleted file mode 120000 index c54a09dd7b..0000000000 --- a/Lang/Pluto/MD5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD5/Pluto \ No newline at end of file diff --git a/Lang/Pluto/MD5-Implementation b/Lang/Pluto/MD5-Implementation deleted file mode 120000 index 6cfead7533..0000000000 --- a/Lang/Pluto/MD5-Implementation +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD5-Implementation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Machine-code b/Lang/Pluto/Machine-code deleted file mode 120000 index 82c80d52fd..0000000000 --- a/Lang/Pluto/Machine-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Machine-code/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Magic-8-ball b/Lang/Pluto/Magic-8-ball deleted file mode 120000 index e4c5118cb4..0000000000 --- a/Lang/Pluto/Magic-8-ball +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-8-ball/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Magic-constant b/Lang/Pluto/Magic-constant deleted file mode 120000 index 640896b2e7..0000000000 --- a/Lang/Pluto/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Magic-squares-of-doubly-even-order b/Lang/Pluto/Magic-squares-of-doubly-even-order deleted file mode 120000 index 357d3e5480..0000000000 --- a/Lang/Pluto/Magic-squares-of-doubly-even-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-doubly-even-order/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Magic-squares-of-odd-order b/Lang/Pluto/Magic-squares-of-odd-order deleted file mode 120000 index 5df4846612..0000000000 --- a/Lang/Pluto/Magic-squares-of-odd-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-odd-order/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Magic-squares-of-singly-even-order b/Lang/Pluto/Magic-squares-of-singly-even-order deleted file mode 120000 index 2430b82023..0000000000 --- a/Lang/Pluto/Magic-squares-of-singly-even-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-singly-even-order/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Man-or-boy-test b/Lang/Pluto/Man-or-boy-test deleted file mode 120000 index a1f41c4398..0000000000 --- a/Lang/Pluto/Man-or-boy-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Man-or-boy-test/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Mandelbrot-set b/Lang/Pluto/Mandelbrot-set deleted file mode 120000 index 3e79f825ad..0000000000 --- a/Lang/Pluto/Mandelbrot-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mandelbrot-set/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Map-range b/Lang/Pluto/Map-range deleted file mode 120000 index a57c07d536..0000000000 --- a/Lang/Pluto/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Matrix-exponentiation-operator b/Lang/Pluto/Matrix-exponentiation-operator deleted file mode 120000 index 1f6eb5cbaa..0000000000 --- a/Lang/Pluto/Matrix-exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-exponentiation-operator/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Matrix-multiplication b/Lang/Pluto/Matrix-multiplication deleted file mode 120000 index 61008dcc0b..0000000000 --- a/Lang/Pluto/Matrix-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-multiplication/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Matrix-transposition b/Lang/Pluto/Matrix-transposition deleted file mode 120000 index aaa00341d6..0000000000 --- a/Lang/Pluto/Matrix-transposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-transposition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Maximum-triangle-path-sum b/Lang/Pluto/Maximum-triangle-path-sum deleted file mode 120000 index 916e59e364..0000000000 --- a/Lang/Pluto/Maximum-triangle-path-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maximum-triangle-path-sum/Pluto \ No newline at end of file diff --git a/Lang/Pluto/McNuggets-problem b/Lang/Pluto/McNuggets-problem deleted file mode 120000 index 2540339e72..0000000000 --- a/Lang/Pluto/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Menu b/Lang/Pluto/Menu deleted file mode 120000 index 058fd3fb23..0000000000 --- a/Lang/Pluto/Menu +++ /dev/null @@ -1 +0,0 @@ -../../Task/Menu/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Mian-Chowla-sequence b/Lang/Pluto/Mian-Chowla-sequence deleted file mode 120000 index f966e85ca5..0000000000 --- a/Lang/Pluto/Mian-Chowla-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mian-Chowla-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Middle-three-digits b/Lang/Pluto/Middle-three-digits deleted file mode 120000 index 8d3393e673..0000000000 --- a/Lang/Pluto/Middle-three-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Middle-three-digits/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Mind-boggling-card-trick b/Lang/Pluto/Mind-boggling-card-trick deleted file mode 120000 index 230afb38bb..0000000000 --- a/Lang/Pluto/Mind-boggling-card-trick +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mind-boggling-card-trick/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Modified-random-distribution b/Lang/Pluto/Modified-random-distribution deleted file mode 120000 index a50baa585f..0000000000 --- a/Lang/Pluto/Modified-random-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modified-random-distribution/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Modular-exponentiation b/Lang/Pluto/Modular-exponentiation deleted file mode 120000 index 5694ee1899..0000000000 --- a/Lang/Pluto/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Modular-inverse b/Lang/Pluto/Modular-inverse deleted file mode 120000 index 339ad0f426..0000000000 --- a/Lang/Pluto/Modular-inverse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-inverse/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Monads-Maybe-monad b/Lang/Pluto/Monads-Maybe-monad deleted file mode 120000 index 38ba5a7df2..0000000000 --- a/Lang/Pluto/Monads-Maybe-monad +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monads-Maybe-monad/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Monte-Carlo-methods b/Lang/Pluto/Monte-Carlo-methods deleted file mode 120000 index 8639690631..0000000000 --- a/Lang/Pluto/Monte-Carlo-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monte-Carlo-methods/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Monty-Hall-problem b/Lang/Pluto/Monty-Hall-problem deleted file mode 120000 index dac7cd8df3..0000000000 --- a/Lang/Pluto/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Morse-code b/Lang/Pluto/Morse-code deleted file mode 120000 index cf03e5492b..0000000000 --- a/Lang/Pluto/Morse-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Morse-code/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Motzkin-numbers b/Lang/Pluto/Motzkin-numbers deleted file mode 120000 index 32bef98749..0000000000 --- a/Lang/Pluto/Motzkin-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Motzkin-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Move-to-front-algorithm b/Lang/Pluto/Move-to-front-algorithm deleted file mode 120000 index 2cc1837031..0000000000 --- a/Lang/Pluto/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Multi-dimensional-array b/Lang/Pluto/Multi-dimensional-array deleted file mode 120000 index 53ab69b153..0000000000 --- a/Lang/Pluto/Multi-dimensional-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-dimensional-array/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Multifactorial b/Lang/Pluto/Multifactorial deleted file mode 120000 index db75308a5f..0000000000 --- a/Lang/Pluto/Multifactorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multifactorial/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Multiple-distinct-objects b/Lang/Pluto/Multiple-distinct-objects deleted file mode 120000 index 3449d4226d..0000000000 --- a/Lang/Pluto/Multiple-distinct-objects +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-distinct-objects/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Multiple-regression b/Lang/Pluto/Multiple-regression deleted file mode 120000 index 41b57d2c96..0000000000 --- a/Lang/Pluto/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Multiplication-tables b/Lang/Pluto/Multiplication-tables deleted file mode 120000 index 98a4d7bd3c..0000000000 --- a/Lang/Pluto/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Munchausen-numbers b/Lang/Pluto/Munchausen-numbers deleted file mode 120000 index 9b090f8c02..0000000000 --- a/Lang/Pluto/Munchausen-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munchausen-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Munching-squares b/Lang/Pluto/Munching-squares deleted file mode 120000 index 71dcd71a08..0000000000 --- a/Lang/Pluto/Munching-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munching-squares/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Musical-scale b/Lang/Pluto/Musical-scale deleted file mode 120000 index 9692211175..0000000000 --- a/Lang/Pluto/Musical-scale +++ /dev/null @@ -1 +0,0 @@ -../../Task/Musical-scale/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Mutual-recursion b/Lang/Pluto/Mutual-recursion deleted file mode 120000 index 3866a9925a..0000000000 --- a/Lang/Pluto/Mutual-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mutual-recursion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/N-queens-problem b/Lang/Pluto/N-queens-problem deleted file mode 120000 index a29c7467b2..0000000000 --- a/Lang/Pluto/N-queens-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/N-queens-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Named-parameters b/Lang/Pluto/Named-parameters deleted file mode 120000 index 8f0b72ba9b..0000000000 --- a/Lang/Pluto/Named-parameters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Named-parameters/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Narcissistic-decimal-number b/Lang/Pluto/Narcissistic-decimal-number deleted file mode 120000 index feead3c3a0..0000000000 --- a/Lang/Pluto/Narcissistic-decimal-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Narcissistic-decimal-number/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Nested-function b/Lang/Pluto/Nested-function deleted file mode 120000 index ea9816ec32..0000000000 --- a/Lang/Pluto/Nested-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Nested-templated-data b/Lang/Pluto/Nested-templated-data deleted file mode 120000 index d56f50a5d8..0000000000 --- a/Lang/Pluto/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Non-continuous-subsequences b/Lang/Pluto/Non-continuous-subsequences deleted file mode 120000 index f226b8c60b..0000000000 --- a/Lang/Pluto/Non-continuous-subsequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-continuous-subsequences/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Non-decimal-radices-Convert b/Lang/Pluto/Non-decimal-radices-Convert deleted file mode 120000 index e1fddc5a20..0000000000 --- a/Lang/Pluto/Non-decimal-radices-Convert +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-decimal-radices-Convert/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Non-decimal-radices-Input b/Lang/Pluto/Non-decimal-radices-Input deleted file mode 120000 index e530fe6bb6..0000000000 --- a/Lang/Pluto/Non-decimal-radices-Input +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-decimal-radices-Input/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Non-decimal-radices-Output b/Lang/Pluto/Non-decimal-radices-Output deleted file mode 120000 index 8cfb1c729a..0000000000 --- a/Lang/Pluto/Non-decimal-radices-Output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-decimal-radices-Output/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Nonoblock b/Lang/Pluto/Nonoblock deleted file mode 120000 index 733d16326f..0000000000 --- a/Lang/Pluto/Nonoblock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nonoblock/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Nth b/Lang/Pluto/Nth deleted file mode 120000 index 54dfb50037..0000000000 --- a/Lang/Pluto/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Number-names b/Lang/Pluto/Number-names deleted file mode 120000 index 1ede3bfc36..0000000000 --- a/Lang/Pluto/Number-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Number-names/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Numbers-with-equal-rises-and-falls b/Lang/Pluto/Numbers-with-equal-rises-and-falls deleted file mode 120000 index b08f5ff647..0000000000 --- a/Lang/Pluto/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Numeric-error-propagation b/Lang/Pluto/Numeric-error-propagation deleted file mode 120000 index 2f5e41e871..0000000000 --- a/Lang/Pluto/Numeric-error-propagation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numeric-error-propagation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Numerical-integration b/Lang/Pluto/Numerical-integration deleted file mode 120000 index e89c1b753a..0000000000 --- a/Lang/Pluto/Numerical-integration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-integration/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Old-Russian-measure-of-length b/Lang/Pluto/Old-Russian-measure-of-length deleted file mode 120000 index 9f7493d0af..0000000000 --- a/Lang/Pluto/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Old-lady-swallowed-a-fly b/Lang/Pluto/Old-lady-swallowed-a-fly deleted file mode 120000 index e29df6472a..0000000000 --- a/Lang/Pluto/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/Pluto \ No newline at end of file diff --git a/Lang/Pluto/One-dimensional-cellular-automata b/Lang/Pluto/One-dimensional-cellular-automata deleted file mode 120000 index b90efd8831..0000000000 --- a/Lang/Pluto/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Order-by-pair-comparisons b/Lang/Pluto/Order-by-pair-comparisons deleted file mode 120000 index 1c7665f6b2..0000000000 --- a/Lang/Pluto/Order-by-pair-comparisons +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-by-pair-comparisons/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ordered-words b/Lang/Pluto/Ordered-words deleted file mode 120000 index 018c8529a3..0000000000 --- a/Lang/Pluto/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ormiston-triples b/Lang/Pluto/Ormiston-triples deleted file mode 120000 index e6fe78c60e..0000000000 --- a/Lang/Pluto/Ormiston-triples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ormiston-triples/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Palindrome-detection b/Lang/Pluto/Palindrome-detection deleted file mode 120000 index 755083778a..0000000000 --- a/Lang/Pluto/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pancake-numbers b/Lang/Pluto/Pancake-numbers deleted file mode 120000 index 129dac7c77..0000000000 --- a/Lang/Pluto/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Paraffins b/Lang/Pluto/Paraffins deleted file mode 120000 index 4b8b6e0ba9..0000000000 --- a/Lang/Pluto/Paraffins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Paraffins/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Parametric-polymorphism b/Lang/Pluto/Parametric-polymorphism deleted file mode 120000 index bdc68d3723..0000000000 --- a/Lang/Pluto/Parametric-polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parametric-polymorphism/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Parsing-RPN-calculator-algorithm b/Lang/Pluto/Parsing-RPN-calculator-algorithm deleted file mode 120000 index f120a8c76e..0000000000 --- a/Lang/Pluto/Parsing-RPN-calculator-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-calculator-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Parsing-Shunting-yard-algorithm b/Lang/Pluto/Parsing-Shunting-yard-algorithm deleted file mode 120000 index 6a968b87bd..0000000000 --- a/Lang/Pluto/Parsing-Shunting-yard-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-Shunting-yard-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Partial-function-application b/Lang/Pluto/Partial-function-application deleted file mode 120000 index bc39fe1347..0000000000 --- a/Lang/Pluto/Partial-function-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partial-function-application/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Partition-an-integer-x-into-n-primes b/Lang/Pluto/Partition-an-integer-x-into-n-primes deleted file mode 120000 index b3156a2b19..0000000000 --- a/Lang/Pluto/Partition-an-integer-x-into-n-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-an-integer-x-into-n-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Partition-function-P b/Lang/Pluto/Partition-function-P deleted file mode 120000 index 74dceccc52..0000000000 --- a/Lang/Pluto/Partition-function-P +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-function-P/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pascal-matrix-generation b/Lang/Pluto/Pascal-matrix-generation deleted file mode 120000 index 08137286fd..0000000000 --- a/Lang/Pluto/Pascal-matrix-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascal-matrix-generation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pascals-triangle b/Lang/Pluto/Pascals-triangle deleted file mode 120000 index b148762a81..0000000000 --- a/Lang/Pluto/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pascals-triangle-Puzzle b/Lang/Pluto/Pascals-triangle-Puzzle deleted file mode 120000 index 312b0f9b1b..0000000000 --- a/Lang/Pluto/Pascals-triangle-Puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle-Puzzle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pells-equation b/Lang/Pluto/Pells-equation deleted file mode 120000 index 330936d009..0000000000 --- a/Lang/Pluto/Pells-equation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pells-equation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Perfect-numbers b/Lang/Pluto/Perfect-numbers deleted file mode 120000 index c44c743521..0000000000 --- a/Lang/Pluto/Perfect-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Perfect-shuffle b/Lang/Pluto/Perfect-shuffle deleted file mode 120000 index 1dd4b8c882..0000000000 --- a/Lang/Pluto/Perfect-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-shuffle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Perfect-totient-numbers b/Lang/Pluto/Perfect-totient-numbers deleted file mode 120000 index ff9d8e3ace..0000000000 --- a/Lang/Pluto/Perfect-totient-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-totient-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Periodic-table b/Lang/Pluto/Periodic-table deleted file mode 120000 index 9aa6afb48f..0000000000 --- a/Lang/Pluto/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Peripheral-drift-illusion b/Lang/Pluto/Peripheral-drift-illusion deleted file mode 120000 index 28e04374ac..0000000000 --- a/Lang/Pluto/Peripheral-drift-illusion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peripheral-drift-illusion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Perlin-noise b/Lang/Pluto/Perlin-noise deleted file mode 120000 index 9a99043b16..0000000000 --- a/Lang/Pluto/Perlin-noise +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perlin-noise/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Permutations b/Lang/Pluto/Permutations deleted file mode 120000 index 750604fad2..0000000000 --- a/Lang/Pluto/Permutations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pernicious-numbers b/Lang/Pluto/Pernicious-numbers deleted file mode 120000 index 29e4a1f27e..0000000000 --- a/Lang/Pluto/Pernicious-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pernicious-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Phrase-reversals b/Lang/Pluto/Phrase-reversals deleted file mode 120000 index 8398529c2c..0000000000 --- a/Lang/Pluto/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pick-random-element b/Lang/Pluto/Pick-random-element deleted file mode 120000 index f181e160e5..0000000000 --- a/Lang/Pluto/Pick-random-element +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pick-random-element/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pisano-period b/Lang/Pluto/Pisano-period deleted file mode 120000 index 377c8913e0..0000000000 --- a/Lang/Pluto/Pisano-period +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pisano-period/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pointers-and-references b/Lang/Pluto/Pointers-and-references deleted file mode 120000 index e2ffa489f1..0000000000 --- a/Lang/Pluto/Pointers-and-references +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pointers-and-references/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Polynomial-long-division b/Lang/Pluto/Polynomial-long-division deleted file mode 120000 index feb0f9bb3e..0000000000 --- a/Lang/Pluto/Polynomial-long-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polynomial-long-division/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Polynomial-regression b/Lang/Pluto/Polynomial-regression deleted file mode 120000 index 11b7492061..0000000000 --- a/Lang/Pluto/Polynomial-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polynomial-regression/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Population-count b/Lang/Pluto/Population-count deleted file mode 120000 index c275fa8665..0000000000 --- a/Lang/Pluto/Population-count +++ /dev/null @@ -1 +0,0 @@ -../../Task/Population-count/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Power-set b/Lang/Pluto/Power-set deleted file mode 120000 index 72362c1ec0..0000000000 --- a/Lang/Pluto/Power-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Power-set/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Price-fraction b/Lang/Pluto/Price-fraction deleted file mode 120000 index 1ac1f34fe5..0000000000 --- a/Lang/Pluto/Price-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Price-fraction/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Primality-by-Wilsons-theorem b/Lang/Pluto/Primality-by-Wilsons-theorem deleted file mode 120000 index 9b5599f64b..0000000000 --- a/Lang/Pluto/Primality-by-Wilsons-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-Wilsons-theorem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Primality-by-trial-division b/Lang/Pluto/Primality-by-trial-division deleted file mode 120000 index 01622c5c43..0000000000 --- a/Lang/Pluto/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Prime-conspiracy b/Lang/Pluto/Prime-conspiracy deleted file mode 120000 index fb52d53fda..0000000000 --- a/Lang/Pluto/Prime-conspiracy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-conspiracy/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Prime-decomposition b/Lang/Pluto/Prime-decomposition deleted file mode 120000 index 3af54a0bb5..0000000000 --- a/Lang/Pluto/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Prime-triangle b/Lang/Pluto/Prime-triangle deleted file mode 120000 index 9d4d789f0f..0000000000 --- a/Lang/Pluto/Prime-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-triangle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Primes---allocate-descendants-to-their-ancestors b/Lang/Pluto/Primes---allocate-descendants-to-their-ancestors deleted file mode 120000 index f8c226f8bd..0000000000 --- a/Lang/Pluto/Primes---allocate-descendants-to-their-ancestors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primes---allocate-descendants-to-their-ancestors/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Primorial-numbers b/Lang/Pluto/Primorial-numbers deleted file mode 120000 index c8bd364676..0000000000 --- a/Lang/Pluto/Primorial-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primorial-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Priority-queue b/Lang/Pluto/Priority-queue deleted file mode 120000 index ad7bed4159..0000000000 --- a/Lang/Pluto/Priority-queue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Priority-queue/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Program-name b/Lang/Pluto/Program-name deleted file mode 120000 index 6b084789ed..0000000000 --- a/Lang/Pluto/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Program-termination b/Lang/Pluto/Program-termination deleted file mode 120000 index 50e8764745..0000000000 --- a/Lang/Pluto/Program-termination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-termination/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Proper-divisors b/Lang/Pluto/Proper-divisors deleted file mode 120000 index 8bb1a6945e..0000000000 --- a/Lang/Pluto/Proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Proper-divisors/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pseudo-random-numbers-Middle-square-method b/Lang/Pluto/Pseudo-random-numbers-Middle-square-method deleted file mode 120000 index 13c5850baa..0000000000 --- a/Lang/Pluto/Pseudo-random-numbers-Middle-square-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Middle-square-method/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pseudo-random-numbers-PCG32 b/Lang/Pluto/Pseudo-random-numbers-PCG32 deleted file mode 120000 index a7591cbf7d..0000000000 --- a/Lang/Pluto/Pseudo-random-numbers-PCG32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-PCG32/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pseudo-random-numbers-Splitmix64 b/Lang/Pluto/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index 5899b47f2e..0000000000 --- a/Lang/Pluto/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pythagoras-tree b/Lang/Pluto/Pythagoras-tree deleted file mode 120000 index 08b1af9c83..0000000000 --- a/Lang/Pluto/Pythagoras-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagoras-tree/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Pythagorean-triples b/Lang/Pluto/Pythagorean-triples deleted file mode 120000 index 8be426ea15..0000000000 --- a/Lang/Pluto/Pythagorean-triples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagorean-triples/Pluto \ No newline at end of file diff --git a/Lang/Pluto/QR-decomposition b/Lang/Pluto/QR-decomposition deleted file mode 120000 index 6d72ede0a4..0000000000 --- a/Lang/Pluto/QR-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/QR-decomposition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Queue-Definition b/Lang/Pluto/Queue-Definition deleted file mode 120000 index 8cf42a0b6a..0000000000 --- a/Lang/Pluto/Queue-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Queue-Definition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Queue-Usage b/Lang/Pluto/Queue-Usage deleted file mode 120000 index 6d7d7a3b25..0000000000 --- a/Lang/Pluto/Queue-Usage +++ /dev/null @@ -1 +0,0 @@ -../../Task/Queue-Usage/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Quoting-constructs b/Lang/Pluto/Quoting-constructs deleted file mode 120000 index 21c1cfccbd..0000000000 --- a/Lang/Pluto/Quoting-constructs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quoting-constructs/Pluto \ No newline at end of file diff --git a/Lang/Pluto/RIPEMD-160 b/Lang/Pluto/RIPEMD-160 deleted file mode 120000 index 18207c76aa..0000000000 --- a/Lang/Pluto/RIPEMD-160 +++ /dev/null @@ -1 +0,0 @@ -../../Task/RIPEMD-160/Pluto \ No newline at end of file diff --git a/Lang/Pluto/RPG-attributes-generator b/Lang/Pluto/RPG-attributes-generator deleted file mode 120000 index 94703dd51c..0000000000 --- a/Lang/Pluto/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/Pluto \ No newline at end of file diff --git a/Lang/Pluto/RSA-code b/Lang/Pluto/RSA-code deleted file mode 120000 index fa27ed3ec1..0000000000 --- a/Lang/Pluto/RSA-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/RSA-code/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ramanujans-constant b/Lang/Pluto/Ramanujans-constant deleted file mode 120000 index c98dc7a621..0000000000 --- a/Lang/Pluto/Ramanujans-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramanujans-constant/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ramer-Douglas-Peucker-line-simplification b/Lang/Pluto/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index f3927eff81..0000000000 --- a/Lang/Pluto/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Random-number-generator-device- b/Lang/Pluto/Random-number-generator-device- deleted file mode 120000 index 6f23d7dfa7..0000000000 --- a/Lang/Pluto/Random-number-generator-device- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-number-generator-device-/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Random-numbers b/Lang/Pluto/Random-numbers deleted file mode 120000 index 7bda811b12..0000000000 --- a/Lang/Pluto/Random-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Range-expansion b/Lang/Pluto/Range-expansion deleted file mode 120000 index c486f1e65b..0000000000 --- a/Lang/Pluto/Range-expansion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-expansion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Range-extraction b/Lang/Pluto/Range-extraction deleted file mode 120000 index c2738db56f..0000000000 --- a/Lang/Pluto/Range-extraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-extraction/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Rare-numbers b/Lang/Pluto/Rare-numbers deleted file mode 120000 index f80bc44b48..0000000000 --- a/Lang/Pluto/Rare-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rare-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Read-a-configuration-file b/Lang/Pluto/Read-a-configuration-file deleted file mode 120000 index 90fb599972..0000000000 --- a/Lang/Pluto/Read-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-configuration-file/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Read-a-file-line-by-line b/Lang/Pluto/Read-a-file-line-by-line deleted file mode 120000 index d35b8cfbc4..0000000000 --- a/Lang/Pluto/Read-a-file-line-by-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-file-line-by-line/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Read-entire-file b/Lang/Pluto/Read-entire-file deleted file mode 120000 index f49bee994d..0000000000 --- a/Lang/Pluto/Read-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-entire-file/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Real-constants-and-functions b/Lang/Pluto/Real-constants-and-functions deleted file mode 120000 index 0f3f45eaa6..0000000000 --- a/Lang/Pluto/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Recamans-sequence b/Lang/Pluto/Recamans-sequence deleted file mode 120000 index b47a985a96..0000000000 --- a/Lang/Pluto/Recamans-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Recamans-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Reduced-row-echelon-form b/Lang/Pluto/Reduced-row-echelon-form deleted file mode 120000 index 8086c26ac8..0000000000 --- a/Lang/Pluto/Reduced-row-echelon-form +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reduced-row-echelon-form/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Rename-a-file b/Lang/Pluto/Rename-a-file deleted file mode 120000 index dd234bb854..0000000000 --- a/Lang/Pluto/Rename-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rename-a-file/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Repeat b/Lang/Pluto/Repeat deleted file mode 120000 index a6a3c03575..0000000000 --- a/Lang/Pluto/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Repeat-a-string b/Lang/Pluto/Repeat-a-string deleted file mode 120000 index 7cea8b7235..0000000000 --- a/Lang/Pluto/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Repunit-primes b/Lang/Pluto/Repunit-primes deleted file mode 120000 index 7e185e6e79..0000000000 --- a/Lang/Pluto/Repunit-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repunit-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Resistor-mesh b/Lang/Pluto/Resistor-mesh deleted file mode 120000 index e4f455a984..0000000000 --- a/Lang/Pluto/Resistor-mesh +++ /dev/null @@ -1 +0,0 @@ -../../Task/Resistor-mesh/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Return-multiple-values b/Lang/Pluto/Return-multiple-values deleted file mode 120000 index 18f6c32d09..0000000000 --- a/Lang/Pluto/Return-multiple-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Return-multiple-values/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Reverse-a-string b/Lang/Pluto/Reverse-a-string deleted file mode 120000 index dc5b2e2493..0000000000 --- a/Lang/Pluto/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Reverse-words-in-a-string b/Lang/Pluto/Reverse-words-in-a-string deleted file mode 120000 index 378e6ea4b7..0000000000 --- a/Lang/Pluto/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Roman-numerals-Encode b/Lang/Pluto/Roman-numerals-Encode deleted file mode 120000 index d12a85d68f..0000000000 --- a/Lang/Pluto/Roman-numerals-Encode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roman-numerals-Encode/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Roots-of-a-function b/Lang/Pluto/Roots-of-a-function deleted file mode 120000 index a5bb6f8f20..0000000000 --- a/Lang/Pluto/Roots-of-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roots-of-a-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Roots-of-a-quadratic-function b/Lang/Pluto/Roots-of-a-quadratic-function deleted file mode 120000 index 8e5bf4c688..0000000000 --- a/Lang/Pluto/Roots-of-a-quadratic-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roots-of-a-quadratic-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Roots-of-unity b/Lang/Pluto/Roots-of-unity deleted file mode 120000 index e0f1ada438..0000000000 --- a/Lang/Pluto/Roots-of-unity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roots-of-unity/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Rot-13 b/Lang/Pluto/Rot-13 deleted file mode 120000 index ca2ef70221..0000000000 --- a/Lang/Pluto/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Runge-Kutta-method b/Lang/Pluto/Runge-Kutta-method deleted file mode 120000 index 1f412f01e7..0000000000 --- a/Lang/Pluto/Runge-Kutta-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Runge-Kutta-method/Pluto \ No newline at end of file diff --git a/Lang/Pluto/SEDOLs b/Lang/Pluto/SEDOLs deleted file mode 120000 index 4a14938cfb..0000000000 --- a/Lang/Pluto/SEDOLs +++ /dev/null @@ -1 +0,0 @@ -../../Task/SEDOLs/Pluto \ No newline at end of file diff --git a/Lang/Pluto/SHA-1 b/Lang/Pluto/SHA-1 deleted file mode 120000 index b2417e97b6..0000000000 --- a/Lang/Pluto/SHA-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-1/Pluto \ No newline at end of file diff --git a/Lang/Pluto/SHA-256 b/Lang/Pluto/SHA-256 deleted file mode 120000 index 69f9d4a47c..0000000000 --- a/Lang/Pluto/SHA-256 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-256/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Safe-primes-and-unsafe-primes b/Lang/Pluto/Safe-primes-and-unsafe-primes deleted file mode 120000 index 0dd190920e..0000000000 --- a/Lang/Pluto/Safe-primes-and-unsafe-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Safe-primes-and-unsafe-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sailors-coconuts-and-a-monkey-problem b/Lang/Pluto/Sailors-coconuts-and-a-monkey-problem deleted file mode 120000 index 29da882738..0000000000 --- a/Lang/Pluto/Sailors-coconuts-and-a-monkey-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sailors-coconuts-and-a-monkey-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Search-a-list b/Lang/Pluto/Search-a-list deleted file mode 120000 index 7284791eca..0000000000 --- a/Lang/Pluto/Search-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Search-a-list-of-records b/Lang/Pluto/Search-a-list-of-records deleted file mode 120000 index 53af5de4bf..0000000000 --- a/Lang/Pluto/Search-a-list-of-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list-of-records/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Selectively-replace-multiple-instances-of-a-character-within-a-string b/Lang/Pluto/Selectively-replace-multiple-instances-of-a-character-within-a-string deleted file mode 120000 index b494f69bf0..0000000000 --- a/Lang/Pluto/Selectively-replace-multiple-instances-of-a-character-within-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Selectively-replace-multiple-instances-of-a-character-within-a-string/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Self-numbers b/Lang/Pluto/Self-numbers deleted file mode 120000 index 6ddaee76e3..0000000000 --- a/Lang/Pluto/Self-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Self-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Semiprime b/Lang/Pluto/Semiprime deleted file mode 120000 index 8587fb750c..0000000000 --- a/Lang/Pluto/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Semordnilap b/Lang/Pluto/Semordnilap deleted file mode 120000 index 92f96e5b0c..0000000000 --- a/Lang/Pluto/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sequence-of-non-squares b/Lang/Pluto/Sequence-of-non-squares deleted file mode 120000 index ffd6b85122..0000000000 --- a/Lang/Pluto/Sequence-of-non-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-non-squares/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sequence-of-primes-by-trial-division b/Lang/Pluto/Sequence-of-primes-by-trial-division deleted file mode 120000 index 0a541cb28c..0000000000 --- a/Lang/Pluto/Sequence-of-primes-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primes-by-trial-division/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sequence-of-primorial-primes b/Lang/Pluto/Sequence-of-primorial-primes deleted file mode 120000 index cc2120f894..0000000000 --- a/Lang/Pluto/Sequence-of-primorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primorial-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Pluto/Sequence:-smallest-number-with-exactly-n-divisors deleted file mode 120000 index ac5bc99ced..0000000000 --- a/Lang/Pluto/Sequence:-smallest-number-with-exactly-n-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence:-smallest-number-with-exactly-n-divisors/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Set b/Lang/Pluto/Set deleted file mode 120000 index 9bbe04e32f..0000000000 --- a/Lang/Pluto/Set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Set-consolidation b/Lang/Pluto/Set-consolidation deleted file mode 120000 index af203f8560..0000000000 --- a/Lang/Pluto/Set-consolidation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-consolidation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Set-of-real-numbers b/Lang/Pluto/Set-of-real-numbers deleted file mode 120000 index 80d4d8a2d1..0000000000 --- a/Lang/Pluto/Set-of-real-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-of-real-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Set-right-adjacent-bits b/Lang/Pluto/Set-right-adjacent-bits deleted file mode 120000 index 7f599e0236..0000000000 --- a/Lang/Pluto/Set-right-adjacent-bits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-right-adjacent-bits/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sexy-primes b/Lang/Pluto/Sexy-primes deleted file mode 120000 index 2ab94558b6..0000000000 --- a/Lang/Pluto/Sexy-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sexy-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Shoelace-formula-for-polygonal-area b/Lang/Pluto/Shoelace-formula-for-polygonal-area deleted file mode 120000 index beae637d82..0000000000 --- a/Lang/Pluto/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Show-ASCII-table b/Lang/Pluto/Show-ASCII-table deleted file mode 120000 index cac0997662..0000000000 --- a/Lang/Pluto/Show-ASCII-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Show-ASCII-table/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sierpinski-arrowhead-curve b/Lang/Pluto/Sierpinski-arrowhead-curve deleted file mode 120000 index 18f606e730..0000000000 --- a/Lang/Pluto/Sierpinski-arrowhead-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-arrowhead-curve/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sierpinski-square-curve b/Lang/Pluto/Sierpinski-square-curve deleted file mode 120000 index 35f7d5150e..0000000000 --- a/Lang/Pluto/Sierpinski-square-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-square-curve/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sierpinski-triangle-Graphical b/Lang/Pluto/Sierpinski-triangle-Graphical deleted file mode 120000 index 008a1742b1..0000000000 --- a/Lang/Pluto/Sierpinski-triangle-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle-Graphical/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Simple-turtle-graphics b/Lang/Pluto/Simple-turtle-graphics deleted file mode 120000 index 0cf7b3ba67..0000000000 --- a/Lang/Pluto/Simple-turtle-graphics +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-turtle-graphics/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Singleton b/Lang/Pluto/Singleton deleted file mode 120000 index b0a6a2c730..0000000000 --- a/Lang/Pluto/Singleton +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singleton/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Singly-linked-list-Element-definition b/Lang/Pluto/Singly-linked-list-Element-definition deleted file mode 120000 index 1f46e7b961..0000000000 --- a/Lang/Pluto/Singly-linked-list-Element-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-definition/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Singly-linked-list-Element-insertion b/Lang/Pluto/Singly-linked-list-Element-insertion deleted file mode 120000 index 27b69c63f5..0000000000 --- a/Lang/Pluto/Singly-linked-list-Element-insertion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-insertion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Singly-linked-list-Traversal b/Lang/Pluto/Singly-linked-list-Traversal deleted file mode 120000 index a9f1239636..0000000000 --- a/Lang/Pluto/Singly-linked-list-Traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Traversal/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sleep b/Lang/Pluto/Sleep deleted file mode 120000 index fe338781ff..0000000000 --- a/Lang/Pluto/Sleep +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleep/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sleeping-Beauty-problem b/Lang/Pluto/Sleeping-Beauty-problem deleted file mode 120000 index 34cc3d8c3d..0000000000 --- a/Lang/Pluto/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k b/Lang/Pluto/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k deleted file mode 120000 index b69fb666de..0000000000 --- a/Lang/Pluto/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smallest-number-k-such-that-k+2^m-is-composite-for-all-m-less-than-k/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Smarandache-Wellin-primes b/Lang/Pluto/Smarandache-Wellin-primes deleted file mode 120000 index 44308127bf..0000000000 --- a/Lang/Pluto/Smarandache-Wellin-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smarandache-Wellin-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Smarandache-prime-digital-sequence b/Lang/Pluto/Smarandache-prime-digital-sequence deleted file mode 120000 index c1bae0f65e..0000000000 --- a/Lang/Pluto/Smarandache-prime-digital-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smarandache-prime-digital-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sockets b/Lang/Pluto/Sockets deleted file mode 120000 index 50dbde578c..0000000000 --- a/Lang/Pluto/Sockets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sockets/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sokoban b/Lang/Pluto/Sokoban deleted file mode 120000 index 542f29a2fd..0000000000 --- a/Lang/Pluto/Sokoban +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sokoban/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Soloways-recurring-rainfall b/Lang/Pluto/Soloways-recurring-rainfall deleted file mode 120000 index 3292890eaf..0000000000 --- a/Lang/Pluto/Soloways-recurring-rainfall +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soloways-recurring-rainfall/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Solve-a-Numbrix-puzzle b/Lang/Pluto/Solve-a-Numbrix-puzzle deleted file mode 120000 index a0c76a1703..0000000000 --- a/Lang/Pluto/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sort-a-list-of-object-identifiers b/Lang/Pluto/Sort-a-list-of-object-identifiers deleted file mode 120000 index 243d019eeb..0000000000 --- a/Lang/Pluto/Sort-a-list-of-object-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-a-list-of-object-identifiers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sort-an-array-of-composite-structures b/Lang/Pluto/Sort-an-array-of-composite-structures deleted file mode 120000 index 11ca6daaca..0000000000 --- a/Lang/Pluto/Sort-an-array-of-composite-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-array-of-composite-structures/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sort-an-integer-array b/Lang/Pluto/Sort-an-integer-array deleted file mode 120000 index 43fcfc8222..0000000000 --- a/Lang/Pluto/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sort-disjoint-sublist b/Lang/Pluto/Sort-disjoint-sublist deleted file mode 120000 index 43eaf99d0d..0000000000 --- a/Lang/Pluto/Sort-disjoint-sublist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-disjoint-sublist/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sort-numbers-lexicographically b/Lang/Pluto/Sort-numbers-lexicographically deleted file mode 120000 index e54ac23b46..0000000000 --- a/Lang/Pluto/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sort-using-a-custom-comparator b/Lang/Pluto/Sort-using-a-custom-comparator deleted file mode 120000 index 017bd9f879..0000000000 --- a/Lang/Pluto/Sort-using-a-custom-comparator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-using-a-custom-comparator/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Bead-sort b/Lang/Pluto/Sorting-algorithms-Bead-sort deleted file mode 120000 index 732611b770..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Bead-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bead-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Bogosort b/Lang/Pluto/Sorting-algorithms-Bogosort deleted file mode 120000 index 2902c3ee3a..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Bogosort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bogosort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Bubble-sort b/Lang/Pluto/Sorting-algorithms-Bubble-sort deleted file mode 120000 index c4cdca7c13..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Bubble-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bubble-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Cocktail-sort b/Lang/Pluto/Sorting-algorithms-Cocktail-sort deleted file mode 120000 index 468360189f..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Cocktail-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Cocktail-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Cocktail-sort-with-shifting-bounds b/Lang/Pluto/Sorting-algorithms-Cocktail-sort-with-shifting-bounds deleted file mode 120000 index c01e910e78..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Cocktail-sort-with-shifting-bounds +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Cocktail-sort-with-shifting-bounds/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Comb-sort b/Lang/Pluto/Sorting-algorithms-Comb-sort deleted file mode 120000 index b6f9e143fc..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Comb-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Comb-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Counting-sort b/Lang/Pluto/Sorting-algorithms-Counting-sort deleted file mode 120000 index d4c1acd3d5..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Counting-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Counting-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Gnome-sort b/Lang/Pluto/Sorting-algorithms-Gnome-sort deleted file mode 120000 index 77a2f09b42..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Gnome-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Gnome-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Heapsort b/Lang/Pluto/Sorting-algorithms-Heapsort deleted file mode 120000 index 4be9369490..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Heapsort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Heapsort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Insertion-sort b/Lang/Pluto/Sorting-algorithms-Insertion-sort deleted file mode 120000 index 2f3123eb14..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Insertion-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Insertion-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Merge-sort b/Lang/Pluto/Sorting-algorithms-Merge-sort deleted file mode 120000 index e46aac85a3..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Merge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Merge-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Pancake-sort b/Lang/Pluto/Sorting-algorithms-Pancake-sort deleted file mode 120000 index 857f218dec..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Pancake-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Pancake-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Patience-sort b/Lang/Pluto/Sorting-algorithms-Patience-sort deleted file mode 120000 index bf8f7e3856..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Patience-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Patience-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Permutation-sort b/Lang/Pluto/Sorting-algorithms-Permutation-sort deleted file mode 120000 index a892e63103..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Permutation-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Permutation-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Quicksort b/Lang/Pluto/Sorting-algorithms-Quicksort deleted file mode 120000 index dcb1016c3c..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Radix-sort b/Lang/Pluto/Sorting-algorithms-Radix-sort deleted file mode 120000 index 2aa1cd2582..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Radix-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Radix-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Selection-sort b/Lang/Pluto/Sorting-algorithms-Selection-sort deleted file mode 120000 index 7993c7d392..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Selection-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Selection-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Shell-sort b/Lang/Pluto/Sorting-algorithms-Shell-sort deleted file mode 120000 index aa83ab75ed..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Shell-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Shell-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Sleep-sort b/Lang/Pluto/Sorting-algorithms-Sleep-sort deleted file mode 120000 index 2b4156ef57..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Sleep-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Sleep-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Stooge-sort b/Lang/Pluto/Sorting-algorithms-Stooge-sort deleted file mode 120000 index adcd800531..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Stooge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Stooge-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sorting-algorithms-Strand-sort b/Lang/Pluto/Sorting-algorithms-Strand-sort deleted file mode 120000 index a3576da55b..0000000000 --- a/Lang/Pluto/Sorting-algorithms-Strand-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Strand-sort/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sparkline-in-unicode b/Lang/Pluto/Sparkline-in-unicode deleted file mode 120000 index d4375bf194..0000000000 --- a/Lang/Pluto/Sparkline-in-unicode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sparkline-in-unicode/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Spelling-of-ordinal-numbers b/Lang/Pluto/Spelling-of-ordinal-numbers deleted file mode 120000 index 707c9a5de7..0000000000 --- a/Lang/Pluto/Spelling-of-ordinal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spelling-of-ordinal-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Spiral-matrix b/Lang/Pluto/Spiral-matrix deleted file mode 120000 index ab63b333d6..0000000000 --- a/Lang/Pluto/Spiral-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spiral-matrix/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Square-but-not-cube b/Lang/Pluto/Square-but-not-cube deleted file mode 120000 index 93ef364cf3..0000000000 --- a/Lang/Pluto/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Square-free-integers b/Lang/Pluto/Square-free-integers deleted file mode 120000 index bd620174b2..0000000000 --- a/Lang/Pluto/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Stack b/Lang/Pluto/Stack deleted file mode 120000 index b73a91dd58..0000000000 --- a/Lang/Pluto/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Start-from-a-main-routine b/Lang/Pluto/Start-from-a-main-routine deleted file mode 120000 index cbf12fbc14..0000000000 --- a/Lang/Pluto/Start-from-a-main-routine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Start-from-a-main-routine/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Statistics-Basic b/Lang/Pluto/Statistics-Basic deleted file mode 120000 index 4f94a6e6d7..0000000000 --- a/Lang/Pluto/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Statistics-Normal-distribution b/Lang/Pluto/Statistics-Normal-distribution deleted file mode 120000 index bc2d3ac3d4..0000000000 --- a/Lang/Pluto/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Stem-and-leaf-plot b/Lang/Pluto/Stem-and-leaf-plot deleted file mode 120000 index cc3ba5ca9e..0000000000 --- a/Lang/Pluto/Stem-and-leaf-plot +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stem-and-leaf-plot/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Stirling-numbers-of-the-first-kind b/Lang/Pluto/Stirling-numbers-of-the-first-kind deleted file mode 120000 index 0c81546d18..0000000000 --- a/Lang/Pluto/Stirling-numbers-of-the-first-kind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stirling-numbers-of-the-first-kind/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Stirling-numbers-of-the-second-kind b/Lang/Pluto/Stirling-numbers-of-the-second-kind deleted file mode 120000 index 05d2a235b3..0000000000 --- a/Lang/Pluto/Stirling-numbers-of-the-second-kind +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stirling-numbers-of-the-second-kind/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Straddling-checkerboard b/Lang/Pluto/Straddling-checkerboard deleted file mode 120000 index d74538b05d..0000000000 --- a/Lang/Pluto/Straddling-checkerboard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Straddling-checkerboard/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Strassens-algorithm b/Lang/Pluto/Strassens-algorithm deleted file mode 120000 index 79ee4e726f..0000000000 --- a/Lang/Pluto/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/String-append b/Lang/Pluto/String-append deleted file mode 120000 index e24995b130..0000000000 --- a/Lang/Pluto/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/Pluto \ No newline at end of file diff --git a/Lang/Pluto/String-interpolation-included- b/Lang/Pluto/String-interpolation-included- deleted file mode 120000 index 7953b3790b..0000000000 --- a/Lang/Pluto/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/Pluto \ No newline at end of file diff --git a/Lang/Pluto/String-length b/Lang/Pluto/String-length deleted file mode 120000 index 9313ae7886..0000000000 --- a/Lang/Pluto/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/Pluto \ No newline at end of file diff --git a/Lang/Pluto/String-matching b/Lang/Pluto/String-matching deleted file mode 120000 index 422a3c7f0c..0000000000 --- a/Lang/Pluto/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/Pluto \ No newline at end of file diff --git a/Lang/Pluto/String-prepend b/Lang/Pluto/String-prepend deleted file mode 120000 index 84229275c1..0000000000 --- a/Lang/Pluto/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Strip-a-set-of-characters-from-a-string b/Lang/Pluto/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index 805462a850..0000000000 --- a/Lang/Pluto/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Strip-whitespace-from-a-string-Top-and-tail b/Lang/Pluto/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index f8b3fd3947..0000000000 --- a/Lang/Pluto/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Subleq b/Lang/Pluto/Subleq deleted file mode 120000 index 100b00d22e..0000000000 --- a/Lang/Pluto/Subleq +++ /dev/null @@ -1 +0,0 @@ -../../Task/Subleq/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Substring b/Lang/Pluto/Substring deleted file mode 120000 index 830ca3e467..0000000000 --- a/Lang/Pluto/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Substring-Top-and-tail b/Lang/Pluto/Substring-Top-and-tail deleted file mode 120000 index ac12380468..0000000000 --- a/Lang/Pluto/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Successive-prime-differences b/Lang/Pluto/Successive-prime-differences deleted file mode 120000 index 17a80e33ef..0000000000 --- a/Lang/Pluto/Successive-prime-differences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Successive-prime-differences/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sudan-function b/Lang/Pluto/Sudan-function deleted file mode 120000 index 18faadc2cc..0000000000 --- a/Lang/Pluto/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sudoku b/Lang/Pluto/Sudoku deleted file mode 120000 index 0219f968ec..0000000000 --- a/Lang/Pluto/Sudoku +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudoku/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Suffixation-of-decimal-numbers b/Lang/Pluto/Suffixation-of-decimal-numbers deleted file mode 120000 index c7008ba8db..0000000000 --- a/Lang/Pluto/Suffixation-of-decimal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Suffixation-of-decimal-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sum-and-product-of-an-array b/Lang/Pluto/Sum-and-product-of-an-array deleted file mode 120000 index de37da7c3f..0000000000 --- a/Lang/Pluto/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sum-and-product-puzzle b/Lang/Pluto/Sum-and-product-puzzle deleted file mode 120000 index b5887c9a13..0000000000 --- a/Lang/Pluto/Sum-and-product-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-puzzle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sum-digits-of-an-integer b/Lang/Pluto/Sum-digits-of-an-integer deleted file mode 120000 index 0c6a6782ed..0000000000 --- a/Lang/Pluto/Sum-digits-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-digits-of-an-integer/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sum-multiples-of-3-and-5 b/Lang/Pluto/Sum-multiples-of-3-and-5 deleted file mode 120000 index 7476a45c41..0000000000 --- a/Lang/Pluto/Sum-multiples-of-3-and-5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-multiples-of-3-and-5/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sum-of-elements-below-main-diagonal-of-matrix b/Lang/Pluto/Sum-of-elements-below-main-diagonal-of-matrix deleted file mode 120000 index 45a9f51475..0000000000 --- a/Lang/Pluto/Sum-of-elements-below-main-diagonal-of-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-elements-below-main-diagonal-of-matrix/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Summarize-and-say-sequence b/Lang/Pluto/Summarize-and-say-sequence deleted file mode 120000 index fc93ce6bcc..0000000000 --- a/Lang/Pluto/Summarize-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-and-say-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Summarize-primes b/Lang/Pluto/Summarize-primes deleted file mode 120000 index ecbdeed375..0000000000 --- a/Lang/Pluto/Summarize-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Super-d-numbers b/Lang/Pluto/Super-d-numbers deleted file mode 120000 index f56d2824e5..0000000000 --- a/Lang/Pluto/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Superellipse b/Lang/Pluto/Superellipse deleted file mode 120000 index 71cba61449..0000000000 --- a/Lang/Pluto/Superellipse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Superellipse/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Sylvesters-sequence b/Lang/Pluto/Sylvesters-sequence deleted file mode 120000 index 27749333cd..0000000000 --- a/Lang/Pluto/Sylvesters-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sylvesters-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Symmetric-difference b/Lang/Pluto/Symmetric-difference deleted file mode 120000 index 09ce1d13b8..0000000000 --- a/Lang/Pluto/Symmetric-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Symmetric-difference/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Synchronous-concurrency b/Lang/Pluto/Synchronous-concurrency deleted file mode 120000 index 4eb3a63418..0000000000 --- a/Lang/Pluto/Synchronous-concurrency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Synchronous-concurrency/Pluto \ No newline at end of file diff --git a/Lang/Pluto/System-time b/Lang/Pluto/System-time deleted file mode 120000 index 8575dc8b3a..0000000000 --- a/Lang/Pluto/System-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/System-time/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Tau-function b/Lang/Pluto/Tau-function deleted file mode 120000 index 03b50006f6..0000000000 --- a/Lang/Pluto/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Tau-number b/Lang/Pluto/Tau-number deleted file mode 120000 index 532021c510..0000000000 --- a/Lang/Pluto/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Temperature-conversion b/Lang/Pluto/Temperature-conversion deleted file mode 120000 index dfda68998c..0000000000 --- a/Lang/Pluto/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Clear-the-screen b/Lang/Pluto/Terminal-control-Clear-the-screen deleted file mode 120000 index edabc9ce73..0000000000 --- a/Lang/Pluto/Terminal-control-Clear-the-screen +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Clear-the-screen/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Coloured-text b/Lang/Pluto/Terminal-control-Coloured-text deleted file mode 120000 index 378909157d..0000000000 --- a/Lang/Pluto/Terminal-control-Coloured-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Coloured-text/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Cursor-movement b/Lang/Pluto/Terminal-control-Cursor-movement deleted file mode 120000 index bf8c8572a2..0000000000 --- a/Lang/Pluto/Terminal-control-Cursor-movement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Cursor-movement/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Cursor-positioning b/Lang/Pluto/Terminal-control-Cursor-positioning deleted file mode 120000 index feeca5cd4b..0000000000 --- a/Lang/Pluto/Terminal-control-Cursor-positioning +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Cursor-positioning/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Dimensions b/Lang/Pluto/Terminal-control-Dimensions deleted file mode 120000 index 79b01b1a8a..0000000000 --- a/Lang/Pluto/Terminal-control-Dimensions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Dimensions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Display-an-extended-character b/Lang/Pluto/Terminal-control-Display-an-extended-character deleted file mode 120000 index d9f4ec60f5..0000000000 --- a/Lang/Pluto/Terminal-control-Display-an-extended-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Display-an-extended-character/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Hiding-the-cursor b/Lang/Pluto/Terminal-control-Hiding-the-cursor deleted file mode 120000 index 5126fbbc31..0000000000 --- a/Lang/Pluto/Terminal-control-Hiding-the-cursor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Hiding-the-cursor/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Inverse-video b/Lang/Pluto/Terminal-control-Inverse-video deleted file mode 120000 index a011de6856..0000000000 --- a/Lang/Pluto/Terminal-control-Inverse-video +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Inverse-video/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Preserve-screen b/Lang/Pluto/Terminal-control-Preserve-screen deleted file mode 120000 index 4985e385ae..0000000000 --- a/Lang/Pluto/Terminal-control-Preserve-screen +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Preserve-screen/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Ringing-the-terminal-bell b/Lang/Pluto/Terminal-control-Ringing-the-terminal-bell deleted file mode 120000 index c14ff1f9fd..0000000000 --- a/Lang/Pluto/Terminal-control-Ringing-the-terminal-bell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Ringing-the-terminal-bell/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Terminal-control-Unicode-output b/Lang/Pluto/Terminal-control-Unicode-output deleted file mode 120000 index c67e68f15d..0000000000 --- a/Lang/Pluto/Terminal-control-Unicode-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Unicode-output/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ternary-logic b/Lang/Pluto/Ternary-logic deleted file mode 120000 index ca522a2f56..0000000000 --- a/Lang/Pluto/Ternary-logic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ternary-logic/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Test-integerness b/Lang/Pluto/Test-integerness deleted file mode 120000 index 9a3717f805..0000000000 --- a/Lang/Pluto/Test-integerness +++ /dev/null @@ -1 +0,0 @@ -../../Task/Test-integerness/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Textonyms b/Lang/Pluto/Textonyms deleted file mode 120000 index 4c3ea903b1..0000000000 --- a/Lang/Pluto/Textonyms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Textonyms/Pluto \ No newline at end of file diff --git a/Lang/Pluto/The-Name-Game b/Lang/Pluto/The-Name-Game deleted file mode 120000 index de7bc541a3..0000000000 --- a/Lang/Pluto/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/Pluto \ No newline at end of file diff --git a/Lang/Pluto/The-Twelve-Days-of-Christmas b/Lang/Pluto/The-Twelve-Days-of-Christmas deleted file mode 120000 index 0c2a346005..0000000000 --- a/Lang/Pluto/The-Twelve-Days-of-Christmas +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Twelve-Days-of-Christmas/Pluto \ No newline at end of file diff --git a/Lang/Pluto/The-sieve-of-Sundaram b/Lang/Pluto/The-sieve-of-Sundaram deleted file mode 120000 index bf60d24d46..0000000000 --- a/Lang/Pluto/The-sieve-of-Sundaram +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-sieve-of-Sundaram/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Thue-Morse b/Lang/Pluto/Thue-Morse deleted file mode 120000 index b1a06a67e8..0000000000 --- a/Lang/Pluto/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Time-a-function b/Lang/Pluto/Time-a-function deleted file mode 120000 index 1ca7d0a7b7..0000000000 --- a/Lang/Pluto/Time-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Time-a-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Tokenize-a-string-with-escaping b/Lang/Pluto/Tokenize-a-string-with-escaping deleted file mode 120000 index ba51452013..0000000000 --- a/Lang/Pluto/Tokenize-a-string-with-escaping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string-with-escaping/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Top-rank-per-group b/Lang/Pluto/Top-rank-per-group deleted file mode 120000 index c27cb54f5d..0000000000 --- a/Lang/Pluto/Top-rank-per-group +++ /dev/null @@ -1 +0,0 @@ -../../Task/Top-rank-per-group/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Total-circles-area b/Lang/Pluto/Total-circles-area deleted file mode 120000 index 2f856ad28d..0000000000 --- a/Lang/Pluto/Total-circles-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Total-circles-area/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Totient-function b/Lang/Pluto/Totient-function deleted file mode 120000 index 73b5eb6381..0000000000 --- a/Lang/Pluto/Totient-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Totient-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Towers-of-Hanoi b/Lang/Pluto/Towers-of-Hanoi deleted file mode 120000 index 9b1428dcf0..0000000000 --- a/Lang/Pluto/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Trabb-Pardo-Knuth-algorithm b/Lang/Pluto/Trabb-Pardo-Knuth-algorithm deleted file mode 120000 index e85f9f54de..0000000000 --- a/Lang/Pluto/Trabb-Pardo-Knuth-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trabb-Pardo-Knuth-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Transliterate-English-text-using-the-Greek-alphabet b/Lang/Pluto/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index 329d1e52f1..0000000000 --- a/Lang/Pluto/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Trigonometric-functions b/Lang/Pluto/Trigonometric-functions deleted file mode 120000 index 8bcbebbd97..0000000000 --- a/Lang/Pluto/Trigonometric-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trigonometric-functions/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Truncatable-primes b/Lang/Pluto/Truncatable-primes deleted file mode 120000 index e57c3ab40f..0000000000 --- a/Lang/Pluto/Truncatable-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncatable-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Truncate-a-file b/Lang/Pluto/Truncate-a-file deleted file mode 120000 index f472b828c2..0000000000 --- a/Lang/Pluto/Truncate-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncate-a-file/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Truth-table b/Lang/Pluto/Truth-table deleted file mode 120000 index e15e65e09d..0000000000 --- a/Lang/Pluto/Truth-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truth-table/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Twelve-statements b/Lang/Pluto/Twelve-statements deleted file mode 120000 index f003bdd498..0000000000 --- a/Lang/Pluto/Twelve-statements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twelve-statements/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Twos-complement b/Lang/Pluto/Twos-complement deleted file mode 120000 index 5830145b21..0000000000 --- a/Lang/Pluto/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Pluto \ No newline at end of file diff --git a/Lang/Pluto/UPC b/Lang/Pluto/UPC deleted file mode 120000 index 477e69b6c6..0000000000 --- a/Lang/Pluto/UPC +++ /dev/null @@ -1 +0,0 @@ -../../Task/UPC/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Ultra-useful-primes b/Lang/Pluto/Ultra-useful-primes deleted file mode 120000 index 5db52360c1..0000000000 --- a/Lang/Pluto/Ultra-useful-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ultra-useful-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Unbias-a-random-generator b/Lang/Pluto/Unbias-a-random-generator deleted file mode 120000 index 14b505ac5e..0000000000 --- a/Lang/Pluto/Unbias-a-random-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unbias-a-random-generator/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Unicode-strings b/Lang/Pluto/Unicode-strings deleted file mode 120000 index 482c486148..0000000000 --- a/Lang/Pluto/Unicode-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-strings/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Unprimeable-numbers b/Lang/Pluto/Unprimeable-numbers deleted file mode 120000 index ec55975821..0000000000 --- a/Lang/Pluto/Unprimeable-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unprimeable-numbers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/User-input-Text b/Lang/Pluto/User-input-Text deleted file mode 120000 index 6c3afd2860..0000000000 --- a/Lang/Pluto/User-input-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Text/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Vampire-number b/Lang/Pluto/Vampire-number deleted file mode 120000 index 39b76c4ae2..0000000000 --- a/Lang/Pluto/Vampire-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vampire-number/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Van-Eck-sequence b/Lang/Pluto/Van-Eck-sequence deleted file mode 120000 index d053bbc892..0000000000 --- a/Lang/Pluto/Van-Eck-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-Eck-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Van-der-Corput-sequence b/Lang/Pluto/Van-der-Corput-sequence deleted file mode 120000 index e6ce56ddef..0000000000 --- a/Lang/Pluto/Van-der-Corput-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-der-Corput-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Variable-declaration-reset b/Lang/Pluto/Variable-declaration-reset deleted file mode 120000 index 26738839ca..0000000000 --- a/Lang/Pluto/Variable-declaration-reset +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-declaration-reset/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Variable-length-quantity b/Lang/Pluto/Variable-length-quantity deleted file mode 120000 index 3f78793bbd..0000000000 --- a/Lang/Pluto/Variable-length-quantity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-length-quantity/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Variadic-function b/Lang/Pluto/Variadic-function deleted file mode 120000 index 8d2be144f4..0000000000 --- a/Lang/Pluto/Variadic-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variadic-function/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Vector b/Lang/Pluto/Vector deleted file mode 120000 index fd56d6c8ab..0000000000 --- a/Lang/Pluto/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Vector-products b/Lang/Pluto/Vector-products deleted file mode 120000 index 83a09bc1a3..0000000000 --- a/Lang/Pluto/Vector-products +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector-products/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Verhoeff-algorithm b/Lang/Pluto/Verhoeff-algorithm deleted file mode 120000 index 1b001cd3c1..0000000000 --- a/Lang/Pluto/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Voronoi-diagram b/Lang/Pluto/Voronoi-diagram deleted file mode 120000 index 50678561e7..0000000000 --- a/Lang/Pluto/Voronoi-diagram +++ /dev/null @@ -1 +0,0 @@ -../../Task/Voronoi-diagram/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Wagstaff-primes b/Lang/Pluto/Wagstaff-primes deleted file mode 120000 index d8a1a2f0da..0000000000 --- a/Lang/Pluto/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Water-collected-between-towers b/Lang/Pluto/Water-collected-between-towers deleted file mode 120000 index 94e32bc8f3..0000000000 --- a/Lang/Pluto/Water-collected-between-towers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Water-collected-between-towers/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Wieferich-primes b/Lang/Pluto/Wieferich-primes deleted file mode 120000 index 453231fbab..0000000000 --- a/Lang/Pluto/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Wilson-primes-of-order-n b/Lang/Pluto/Wilson-primes-of-order-n deleted file mode 120000 index 9bafdd051b..0000000000 --- a/Lang/Pluto/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Wireworld b/Lang/Pluto/Wireworld deleted file mode 120000 index 1eed665c2c..0000000000 --- a/Lang/Pluto/Wireworld +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wireworld/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Word-wheel b/Lang/Pluto/Word-wheel deleted file mode 120000 index c83ad2ab7f..0000000000 --- a/Lang/Pluto/Word-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wheel/Pluto \ No newline at end of file diff --git a/Lang/Pluto/World-Cup-group-stage b/Lang/Pluto/World-Cup-group-stage deleted file mode 120000 index 1c8f3e8b53..0000000000 --- a/Lang/Pluto/World-Cup-group-stage +++ /dev/null @@ -1 +0,0 @@ -../../Task/World-Cup-group-stage/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Write-entire-file b/Lang/Pluto/Write-entire-file deleted file mode 120000 index be63715e40..0000000000 --- a/Lang/Pluto/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Write-float-arrays-to-a-text-file b/Lang/Pluto/Write-float-arrays-to-a-text-file deleted file mode 120000 index eaa4582b34..0000000000 --- a/Lang/Pluto/Write-float-arrays-to-a-text-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-float-arrays-to-a-text-file/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Write-language-name-in-3D-ASCII b/Lang/Pluto/Write-language-name-in-3D-ASCII deleted file mode 120000 index 54358f8cdd..0000000000 --- a/Lang/Pluto/Write-language-name-in-3D-ASCII +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-language-name-in-3D-ASCII/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Y-combinator b/Lang/Pluto/Y-combinator deleted file mode 120000 index b356912f44..0000000000 --- a/Lang/Pluto/Y-combinator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Y-combinator/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Yellowstone-sequence b/Lang/Pluto/Yellowstone-sequence deleted file mode 120000 index f4fb013414..0000000000 --- a/Lang/Pluto/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Zebra-puzzle b/Lang/Pluto/Zebra-puzzle deleted file mode 120000 index d1dee531e9..0000000000 --- a/Lang/Pluto/Zebra-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zebra-puzzle/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Zeckendorf-number-representation b/Lang/Pluto/Zeckendorf-number-representation deleted file mode 120000 index 6f7ac19b32..0000000000 --- a/Lang/Pluto/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Zero-to-the-zero-power b/Lang/Pluto/Zero-to-the-zero-power deleted file mode 120000 index 88cbcf1376..0000000000 --- a/Lang/Pluto/Zero-to-the-zero-power +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zero-to-the-zero-power/Pluto \ No newline at end of file diff --git a/Lang/Pluto/Zig-zag-matrix b/Lang/Pluto/Zig-zag-matrix deleted file mode 120000 index 49521638f6..0000000000 --- a/Lang/Pluto/Zig-zag-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zig-zag-matrix/Pluto \ No newline at end of file diff --git a/Lang/PostScript/Sieve-of-Eratosthenes b/Lang/PostScript/Sieve-of-Eratosthenes deleted file mode 120000 index bf5fd9fe66..0000000000 --- a/Lang/PostScript/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/PostScript \ No newline at end of file diff --git a/Lang/PowerShell/AKS-test-for-primes b/Lang/PowerShell/AKS-test-for-primes deleted file mode 120000 index d5622ba541..0000000000 --- a/Lang/PowerShell/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Abundant-odd-numbers b/Lang/PowerShell/Abundant-odd-numbers deleted file mode 120000 index fa7795f731..0000000000 --- a/Lang/PowerShell/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Anti-primes b/Lang/PowerShell/Anti-primes deleted file mode 120000 index f56c16a315..0000000000 --- a/Lang/PowerShell/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Base64-decode-data b/Lang/PowerShell/Base64-decode-data deleted file mode 120000 index 64cfcd61a8..0000000000 --- a/Lang/PowerShell/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Bell-numbers b/Lang/PowerShell/Bell-numbers deleted file mode 120000 index 175671e690..0000000000 --- a/Lang/PowerShell/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Brazilian-numbers b/Lang/PowerShell/Brazilian-numbers deleted file mode 120000 index 93e2e48db6..0000000000 --- a/Lang/PowerShell/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Call-a-foreign-language-function b/Lang/PowerShell/Call-a-foreign-language-function deleted file mode 120000 index b222a9fc7d..0000000000 --- a/Lang/PowerShell/Call-a-foreign-language-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-foreign-language-function/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Department-numbers b/Lang/PowerShell/Department-numbers deleted file mode 120000 index 089828bb9a..0000000000 --- a/Lang/PowerShell/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Gray-code b/Lang/PowerShell/Gray-code deleted file mode 120000 index c7adcf7cdb..0000000000 --- a/Lang/PowerShell/Gray-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gray-code/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Hello-world-Web-server b/Lang/PowerShell/Hello-world-Web-server deleted file mode 120000 index 3b4f878f34..0000000000 --- a/Lang/PowerShell/Hello-world-Web-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Web-server/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Leonardo-numbers b/Lang/PowerShell/Leonardo-numbers deleted file mode 120000 index fda0fa0dbc..0000000000 --- a/Lang/PowerShell/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/M-bius-function b/Lang/PowerShell/M-bius-function deleted file mode 120000 index a50c276864..0000000000 --- a/Lang/PowerShell/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Mayan-numerals b/Lang/PowerShell/Mayan-numerals deleted file mode 120000 index 24e3ef5efb..0000000000 --- a/Lang/PowerShell/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Multifactorial b/Lang/PowerShell/Multifactorial deleted file mode 120000 index 45d4ca2539..0000000000 --- a/Lang/PowerShell/Multifactorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multifactorial/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Periodic-table b/Lang/PowerShell/Periodic-table deleted file mode 120000 index bcfd7f5cf0..0000000000 --- a/Lang/PowerShell/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Quaternion-type b/Lang/PowerShell/Quaternion-type new file mode 120000 index 0000000000..60f8156bec --- /dev/null +++ b/Lang/PowerShell/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Statistics-Basic b/Lang/PowerShell/Statistics-Basic deleted file mode 120000 index 604034a29d..0000000000 --- a/Lang/PowerShell/Statistics-Basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Basic/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Statistics-Normal-distribution b/Lang/PowerShell/Statistics-Normal-distribution deleted file mode 120000 index 9ce69e4094..0000000000 --- a/Lang/PowerShell/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/PowerShell \ No newline at end of file diff --git a/Lang/PowerShell/Strassens-algorithm b/Lang/PowerShell/Strassens-algorithm deleted file mode 120000 index 1b221ce844..0000000000 --- a/Lang/PowerShell/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/PowerShell \ No newline at end of file diff --git a/Lang/ProDOS/00-LANG.txt b/Lang/ProDOS/00-LANG.txt index d4852ff3b2..3affb9c53a 100644 --- a/Lang/ProDOS/00-LANG.txt +++ b/Lang/ProDOS/00-LANG.txt @@ -4,18 +4,18 @@ ProDOS is an open-source command-based programming language created by Riley Hou ===Overview=== ProDOS is a command-based language. This term refers to any form of language that uses built-in commands to function, instead of strings of keywords to function. For example: -printline Hello, World! +printline Hello, World! The command "printline" is used to display the line "Hello, World". For clarification, in Java the alternative would be: -public class HelloWorld +public class HelloWorld { public static void main(String[] args) { System.out.println("Goodbye, World!"); } -} +} -As you can see, the difference is quite significant. The command "printline" is pre-defined, this means that the user does not have to define classes,etc. +As you can see, the difference is quite significant. The command "printline" is pre-defined, this means that the user does not have to define classes,etc. ===Future Implementations=== ProDOS has not yet reached a release stage, but due to it being only a few months left until it is able to be released, ProDOS 1 will be ready to be released for public distribution by early 2012. \ No newline at end of file diff --git a/Lang/Prog8/Quine b/Lang/Prog8/Quine deleted file mode 120000 index d19dfe3196..0000000000 --- a/Lang/Prog8/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/Prog8 \ No newline at end of file diff --git a/Lang/ProgressBASIC/00-LANG.txt b/Lang/ProgressBASIC/00-LANG.txt deleted file mode 100644 index d243dbaa3d..0000000000 --- a/Lang/ProgressBASIC/00-LANG.txt +++ /dev/null @@ -1,3 +0,0 @@ -{{language}} -ProgressBASIC is a BASIC-like programming language used in the mobile/steam game Progressbar95. To get acses to the programming language. You must unlock the 8-bit category of systems. -To understand how this programming language works, [https://progressbar95.fandom.com/wiki/ProgressBASIC#Commands click this] \ No newline at end of file diff --git a/Lang/ProgressBASIC/00-META.yaml b/Lang/ProgressBASIC/00-META.yaml deleted file mode 100644 index 82857e2590..0000000000 --- a/Lang/ProgressBASIC/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:ProgressBASIC diff --git a/Lang/Prolog/100-prisoners b/Lang/Prolog/100-prisoners deleted file mode 120000 index f105600099..0000000000 --- a/Lang/Prolog/100-prisoners +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-prisoners/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Boolean-values b/Lang/Prolog/Boolean-values deleted file mode 120000 index a4d04329bd..0000000000 --- a/Lang/Prolog/Boolean-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boolean-values/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Damm-algorithm b/Lang/Prolog/Damm-algorithm deleted file mode 120000 index beadc26281..0000000000 --- a/Lang/Prolog/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Determine-sentence-type b/Lang/Prolog/Determine-sentence-type deleted file mode 120000 index d87bf5b582..0000000000 --- a/Lang/Prolog/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Evaluate-binomial-coefficients b/Lang/Prolog/Evaluate-binomial-coefficients deleted file mode 120000 index 15602e690b..0000000000 --- a/Lang/Prolog/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Hello-world-Newline-omission b/Lang/Prolog/Hello-world-Newline-omission deleted file mode 120000 index c1a7a16c3a..0000000000 --- a/Lang/Prolog/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Prolog \ No newline at end of file diff --git a/Lang/Prolog/ISBN13-check-digit b/Lang/Prolog/ISBN13-check-digit deleted file mode 120000 index a76610ede1..0000000000 --- a/Lang/Prolog/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Integer-comparison b/Lang/Prolog/Integer-comparison deleted file mode 120000 index 700709dfc3..0000000000 --- a/Lang/Prolog/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Iterated-digits-squaring b/Lang/Prolog/Iterated-digits-squaring deleted file mode 120000 index 2783b6cb96..0000000000 --- a/Lang/Prolog/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Josephus-problem b/Lang/Prolog/Josephus-problem deleted file mode 120000 index f88549c05c..0000000000 --- a/Lang/Prolog/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Magic-8-ball b/Lang/Prolog/Magic-8-ball deleted file mode 120000 index 6daea6349e..0000000000 --- a/Lang/Prolog/Magic-8-ball +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-8-ball/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Map-range b/Lang/Prolog/Map-range deleted file mode 120000 index 09c2135423..0000000000 --- a/Lang/Prolog/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Miller-Rabin-primality-test b/Lang/Prolog/Miller-Rabin-primality-test new file mode 120000 index 0000000000..77f0bc56fd --- /dev/null +++ b/Lang/Prolog/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Old-Russian-measure-of-length b/Lang/Prolog/Old-Russian-measure-of-length deleted file mode 120000 index d1594e7647..0000000000 --- a/Lang/Prolog/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Order-by-pair-comparisons b/Lang/Prolog/Order-by-pair-comparisons deleted file mode 120000 index b08bc67036..0000000000 --- a/Lang/Prolog/Order-by-pair-comparisons +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-by-pair-comparisons/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Phrase-reversals b/Lang/Prolog/Phrase-reversals deleted file mode 120000 index 1afa8eb5f5..0000000000 --- a/Lang/Prolog/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Population-count b/Lang/Prolog/Population-count deleted file mode 120000 index 1ffa420c15..0000000000 --- a/Lang/Prolog/Population-count +++ /dev/null @@ -1 +0,0 @@ -../../Task/Population-count/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Quaternion-type b/Lang/Prolog/Quaternion-type new file mode 120000 index 0000000000..458f5f70bc --- /dev/null +++ b/Lang/Prolog/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Prolog \ No newline at end of file diff --git a/Lang/Prolog/RPG-attributes-generator b/Lang/Prolog/RPG-attributes-generator deleted file mode 120000 index cde5e146a7..0000000000 --- a/Lang/Prolog/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/Prolog \ No newline at end of file diff --git a/Lang/Prolog/SEDOLs b/Lang/Prolog/SEDOLs deleted file mode 120000 index 21d9643112..0000000000 --- a/Lang/Prolog/SEDOLs +++ /dev/null @@ -1 +0,0 @@ -../../Task/SEDOLs/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Semordnilap b/Lang/Prolog/Semordnilap deleted file mode 120000 index c4e2d18fc4..0000000000 --- a/Lang/Prolog/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Sort-three-variables b/Lang/Prolog/Sort-three-variables deleted file mode 120000 index 8518a9819c..0000000000 --- a/Lang/Prolog/Sort-three-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-three-variables/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Stem-and-leaf-plot b/Lang/Prolog/Stem-and-leaf-plot deleted file mode 120000 index 8a3d5cbab0..0000000000 --- a/Lang/Prolog/Stem-and-leaf-plot +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stem-and-leaf-plot/Prolog \ No newline at end of file diff --git a/Lang/Prolog/String-concatenation b/Lang/Prolog/String-concatenation deleted file mode 120000 index 47d572fb22..0000000000 --- a/Lang/Prolog/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Thue-Morse b/Lang/Prolog/Thue-Morse deleted file mode 120000 index c42ff58a18..0000000000 --- a/Lang/Prolog/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Topswops b/Lang/Prolog/Topswops deleted file mode 120000 index 20c5cfbba8..0000000000 --- a/Lang/Prolog/Topswops +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topswops/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Trabb-Pardo-Knuth-algorithm b/Lang/Prolog/Trabb-Pardo-Knuth-algorithm deleted file mode 120000 index dcd294e9ea..0000000000 --- a/Lang/Prolog/Trabb-Pardo-Knuth-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trabb-Pardo-Knuth-algorithm/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Twos-complement b/Lang/Prolog/Twos-complement deleted file mode 120000 index 1ba2d1e131..0000000000 --- a/Lang/Prolog/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Wireworld b/Lang/Prolog/Wireworld deleted file mode 120000 index b45eaa2601..0000000000 --- a/Lang/Prolog/Wireworld +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wireworld/Prolog \ No newline at end of file diff --git a/Lang/Prolog/Zero-to-the-zero-power b/Lang/Prolog/Zero-to-the-zero-power deleted file mode 120000 index 5d3d1cb814..0000000000 --- a/Lang/Prolog/Zero-to-the-zero-power +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zero-to-the-zero-power/Prolog \ No newline at end of file diff --git a/Lang/PureBasic/ASCII-art-diagram-converter b/Lang/PureBasic/ASCII-art-diagram-converter deleted file mode 120000 index 33f4c7eea5..0000000000 --- a/Lang/PureBasic/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Bioinformatics-base-count b/Lang/PureBasic/Bioinformatics-base-count new file mode 120000 index 0000000000..16be5f27be --- /dev/null +++ b/Lang/PureBasic/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Blum-integer b/Lang/PureBasic/Blum-integer deleted file mode 120000 index d3f0a3d564..0000000000 --- a/Lang/PureBasic/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Determine-if-a-string-has-all-the-same-characters b/Lang/PureBasic/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 8ce6b940bc..0000000000 --- a/Lang/PureBasic/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Determine-sentence-type b/Lang/PureBasic/Determine-sentence-type deleted file mode 120000 index 58f4c9411b..0000000000 --- a/Lang/PureBasic/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Generate-Chess960-starting-position b/Lang/PureBasic/Generate-Chess960-starting-position deleted file mode 120000 index d1a0ea8b2a..0000000000 --- a/Lang/PureBasic/Generate-Chess960-starting-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-Chess960-starting-position/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Jewels-and-stones b/Lang/PureBasic/Jewels-and-stones deleted file mode 120000 index 90d847c8e7..0000000000 --- a/Lang/PureBasic/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/M-bius-function b/Lang/PureBasic/M-bius-function deleted file mode 120000 index 86603635cf..0000000000 --- a/Lang/PureBasic/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Meissel-Mertens-constant b/Lang/PureBasic/Meissel-Mertens-constant new file mode 120000 index 0000000000..81f0bd26b3 --- /dev/null +++ b/Lang/PureBasic/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Miller-Rabin-primality-test b/Lang/PureBasic/Miller-Rabin-primality-test new file mode 120000 index 0000000000..af69162304 --- /dev/null +++ b/Lang/PureBasic/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Numerical-and-alphabetical-suffixes b/Lang/PureBasic/Numerical-and-alphabetical-suffixes deleted file mode 120000 index 1544fa8d4a..0000000000 --- a/Lang/PureBasic/Numerical-and-alphabetical-suffixes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-and-alphabetical-suffixes/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Periodic-table b/Lang/PureBasic/Periodic-table deleted file mode 120000 index d212a3056c..0000000000 --- a/Lang/PureBasic/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Quaternion-type b/Lang/PureBasic/Quaternion-type new file mode 120000 index 0000000000..6551ed8e89 --- /dev/null +++ b/Lang/PureBasic/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/PureBasic/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/PureBasic/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/PureBasic/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/PureBasic/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/PureBasic/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/PureBasic/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/PureBasic/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/PureBasic/The-Name-Game b/Lang/PureBasic/The-Name-Game deleted file mode 120000 index 50ae0fd1b6..0000000000 --- a/Lang/PureBasic/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/PureBasic \ No newline at end of file diff --git a/Lang/PureBasic/Twos-complement b/Lang/PureBasic/Twos-complement deleted file mode 120000 index dfe56459f4..0000000000 --- a/Lang/PureBasic/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/PureBasic \ No newline at end of file diff --git a/Lang/Python/Bioinformatics-base-count b/Lang/Python/Bioinformatics-base-count new file mode 120000 index 0000000000..7f8a0873e8 --- /dev/null +++ b/Lang/Python/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Python \ No newline at end of file diff --git a/Lang/Python/Compile-time-calculation b/Lang/Python/Compile-time-calculation deleted file mode 120000 index 33879ac69d..0000000000 --- a/Lang/Python/Compile-time-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compile-time-calculation/Python \ No newline at end of file diff --git a/Lang/Python/Constrained-genericity b/Lang/Python/Constrained-genericity deleted file mode 120000 index 3ac238c57a..0000000000 --- a/Lang/Python/Constrained-genericity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Constrained-genericity/Python \ No newline at end of file diff --git a/Lang/Python/Dominoes b/Lang/Python/Dominoes deleted file mode 120000 index 648f074afc..0000000000 --- a/Lang/Python/Dominoes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dominoes/Python \ No newline at end of file diff --git a/Lang/Python/Erd-s-Selfridge-categorization-of-primes b/Lang/Python/Erd-s-Selfridge-categorization-of-primes deleted file mode 120000 index fd2fdbcb3f..0000000000 --- a/Lang/Python/Erd-s-Selfridge-categorization-of-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Erd-s-Selfridge-categorization-of-primes/Python \ No newline at end of file diff --git a/Lang/Python/Execute-Brain- b/Lang/Python/Execute-Brain- deleted file mode 120000 index ad83d880d6..0000000000 --- a/Lang/Python/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Python \ No newline at end of file diff --git a/Lang/Python/Im-a-software-engineer-get-me-out-of-here b/Lang/Python/Im-a-software-engineer-get-me-out-of-here deleted file mode 120000 index d238ff00d2..0000000000 --- a/Lang/Python/Im-a-software-engineer-get-me-out-of-here +++ /dev/null @@ -1 +0,0 @@ -../../Task/Im-a-software-engineer-get-me-out-of-here/Python \ No newline at end of file diff --git a/Lang/Python/Isograms-and-heterograms b/Lang/Python/Isograms-and-heterograms deleted file mode 120000 index f277330152..0000000000 --- a/Lang/Python/Isograms-and-heterograms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isograms-and-heterograms/Python \ No newline at end of file diff --git a/Lang/Python/Meissel-Mertens-constant b/Lang/Python/Meissel-Mertens-constant new file mode 120000 index 0000000000..04fd530b92 --- /dev/null +++ b/Lang/Python/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Python \ No newline at end of file diff --git a/Lang/Python/Miller-Rabin-primality-test b/Lang/Python/Miller-Rabin-primality-test new file mode 120000 index 0000000000..4ec507954a --- /dev/null +++ b/Lang/Python/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Python \ No newline at end of file diff --git a/Lang/Python/Multi-base-primes b/Lang/Python/Multi-base-primes deleted file mode 120000 index 6190bc944f..0000000000 --- a/Lang/Python/Multi-base-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-base-primes/Python \ No newline at end of file diff --git a/Lang/Python/Numbers-which-are-not-the-sum-of-distinct-squares b/Lang/Python/Numbers-which-are-not-the-sum-of-distinct-squares deleted file mode 120000 index 3a47a71cf2..0000000000 --- a/Lang/Python/Numbers-which-are-not-the-sum-of-distinct-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-which-are-not-the-sum-of-distinct-squares/Python \ No newline at end of file diff --git a/Lang/Python/P-Adic-square-roots b/Lang/Python/P-Adic-square-roots deleted file mode 120000 index 3ecdf0d3ca..0000000000 --- a/Lang/Python/P-Adic-square-roots +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-square-roots/Python \ No newline at end of file diff --git a/Lang/Python/Parametric-polymorphism b/Lang/Python/Parametric-polymorphism deleted file mode 120000 index b6d5668cdf..0000000000 --- a/Lang/Python/Parametric-polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parametric-polymorphism/Python \ No newline at end of file diff --git a/Lang/Python/Peripheral-drift-illusion b/Lang/Python/Peripheral-drift-illusion deleted file mode 120000 index 4e0e7d7c77..0000000000 --- a/Lang/Python/Peripheral-drift-illusion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peripheral-drift-illusion/Python \ No newline at end of file diff --git a/Lang/Python/Prime-numbers-whose-neighboring-pairs-are-tetraprimes b/Lang/Python/Prime-numbers-whose-neighboring-pairs-are-tetraprimes deleted file mode 120000 index 9997b73880..0000000000 --- a/Lang/Python/Prime-numbers-whose-neighboring-pairs-are-tetraprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-numbers-whose-neighboring-pairs-are-tetraprimes/Python \ No newline at end of file diff --git a/Lang/Python/Quaternion-type b/Lang/Python/Quaternion-type new file mode 120000 index 0000000000..4219e34b85 --- /dev/null +++ b/Lang/Python/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Python \ No newline at end of file diff --git a/Lang/Python/Ramanujan-primes-twins b/Lang/Python/Ramanujan-primes-twins deleted file mode 120000 index 8b76bc210b..0000000000 --- a/Lang/Python/Ramanujan-primes-twins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramanujan-primes-twins/Python \ No newline at end of file diff --git a/Lang/Python/Rhonda-numbers b/Lang/Python/Rhonda-numbers deleted file mode 120000 index 26cc73526d..0000000000 --- a/Lang/Python/Rhonda-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rhonda-numbers/Python \ No newline at end of file diff --git a/Lang/Python/Ruth-Aaron-numbers b/Lang/Python/Ruth-Aaron-numbers deleted file mode 120000 index 933b3d03bc..0000000000 --- a/Lang/Python/Ruth-Aaron-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ruth-Aaron-numbers/Python \ No newline at end of file diff --git a/Lang/Python/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Python/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Python/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Python/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Python/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Python/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Python/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Python/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Python/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Python/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Python/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Python/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Python/Smarandache-Wellin-primes b/Lang/Python/Smarandache-Wellin-primes deleted file mode 120000 index 87eea97b5c..0000000000 --- a/Lang/Python/Smarandache-Wellin-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smarandache-Wellin-primes/Python \ No newline at end of file diff --git a/Lang/Python/Sorting-Algorithms-Circle-Sort b/Lang/Python/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..3e7a80b339 --- /dev/null +++ b/Lang/Python/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Python \ No newline at end of file diff --git a/Lang/Python/Square-form-factorization b/Lang/Python/Square-form-factorization deleted file mode 120000 index 38da301a59..0000000000 --- a/Lang/Python/Square-form-factorization +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-form-factorization/Python \ No newline at end of file diff --git a/Lang/Python/Start-from-a-main-routine b/Lang/Python/Start-from-a-main-routine deleted file mode 120000 index e9c472aaa4..0000000000 --- a/Lang/Python/Start-from-a-main-routine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Start-from-a-main-routine/Python \ No newline at end of file diff --git a/Lang/Python/Untouchable-numbers b/Lang/Python/Untouchable-numbers deleted file mode 120000 index c4bd0ba9e1..0000000000 --- a/Lang/Python/Untouchable-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Untouchable-numbers/Python \ No newline at end of file diff --git a/Lang/Python/Wasteful-equidigital-and-frugal-numbers b/Lang/Python/Wasteful-equidigital-and-frugal-numbers deleted file mode 120000 index c89de12312..0000000000 --- a/Lang/Python/Wasteful-equidigital-and-frugal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wasteful-equidigital-and-frugal-numbers/Python \ No newline at end of file diff --git a/Lang/Q/00-LANG.txt b/Lang/Q/00-LANG.txt index 1cf9ed3990..761de14eda 100644 --- a/Lang/Q/00-LANG.txt +++ b/Lang/Q/00-LANG.txt @@ -1,6 +1,5 @@ -{{language}} -Q is another vector language (in the family of [[APL]], [[J]], [[K]], and [[Nial]]) +{{language}}Q is another vector language (in the family of [[APL]] [[J]] [[K]] and [[Nial]]) -There is a totally unrelated language called Q [http://q-lang.sourceforge.net/ here]. (It is an equational programming language.) +There is a totally unrelated language called Q [http://q-lang.sourceforge.net/ here]. (It is an equational programming language) -Documentation: [https://code.kx.com/q4m3/ Q for Mortals] An introduction to q programming \ No newline at end of file +Q [https://code.kx.com/trac/wiki/QforMortals docs](anonymous/anonymous) \ No newline at end of file diff --git a/Lang/Q/Euler-method b/Lang/Q/Euler-method deleted file mode 120000 index 093ad80e13..0000000000 --- a/Lang/Q/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/Q \ No newline at end of file diff --git a/Lang/QB64/Averages-Mean-angle b/Lang/QB64/Averages-Mean-angle deleted file mode 120000 index aab53ced3a..0000000000 --- a/Lang/QB64/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/QB64 \ No newline at end of file diff --git a/Lang/QB64/Blum-integer b/Lang/QB64/Blum-integer deleted file mode 120000 index 6d55cd1ae1..0000000000 --- a/Lang/QB64/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/QB64 \ No newline at end of file diff --git a/Lang/QB64/Determine-if-a-string-has-all-the-same-characters b/Lang/QB64/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index e5cb75941f..0000000000 --- a/Lang/QB64/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/QB64 \ No newline at end of file diff --git a/Lang/QB64/Fibonacci-n-step-number-sequences b/Lang/QB64/Fibonacci-n-step-number-sequences deleted file mode 120000 index dbe9d19cad..0000000000 --- a/Lang/QB64/Fibonacci-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-n-step-number-sequences/QB64 \ No newline at end of file diff --git a/Lang/QB64/Hello-world-Newline-omission b/Lang/QB64/Hello-world-Newline-omission deleted file mode 120000 index 355c4d1286..0000000000 --- a/Lang/QB64/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/QB64 \ No newline at end of file diff --git a/Lang/QB64/Hofstadter-Q-sequence b/Lang/QB64/Hofstadter-Q-sequence deleted file mode 120000 index 636c2bd5e2..0000000000 --- a/Lang/QB64/Hofstadter-Q-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hofstadter-Q-sequence/QB64 \ No newline at end of file diff --git a/Lang/QB64/Intersecting-number-wheels b/Lang/QB64/Intersecting-number-wheels deleted file mode 120000 index 226a608551..0000000000 --- a/Lang/QB64/Intersecting-number-wheels +++ /dev/null @@ -1 +0,0 @@ -../../Task/Intersecting-number-wheels/QB64 \ No newline at end of file diff --git a/Lang/QB64/Mayan-calendar b/Lang/QB64/Mayan-calendar deleted file mode 120000 index 13deaa3e8a..0000000000 --- a/Lang/QB64/Mayan-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-calendar/QB64 \ No newline at end of file diff --git a/Lang/QB64/Multiple-regression b/Lang/QB64/Multiple-regression deleted file mode 120000 index f5a655fb07..0000000000 --- a/Lang/QB64/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/QB64 \ No newline at end of file diff --git a/Lang/QB64/Perfect-numbers b/Lang/QB64/Perfect-numbers deleted file mode 120000 index 313898bfff..0000000000 --- a/Lang/QB64/Perfect-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-numbers/QB64 \ No newline at end of file diff --git a/Lang/QB64/Price-fraction b/Lang/QB64/Price-fraction deleted file mode 120000 index b2a7164220..0000000000 --- a/Lang/QB64/Price-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Price-fraction/QB64 \ No newline at end of file diff --git a/Lang/QB64/Safe-primes-and-unsafe-primes b/Lang/QB64/Safe-primes-and-unsafe-primes deleted file mode 120000 index 2fe9c13027..0000000000 --- a/Lang/QB64/Safe-primes-and-unsafe-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Safe-primes-and-unsafe-primes/QB64 \ No newline at end of file diff --git a/Lang/QB64/Sum-of-a-series b/Lang/QB64/Sum-of-a-series deleted file mode 120000 index 67ad320160..0000000000 --- a/Lang/QB64/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/QB64 \ No newline at end of file diff --git a/Lang/QB64/Tau-number b/Lang/QB64/Tau-number deleted file mode 120000 index 0690f3645f..0000000000 --- a/Lang/QB64/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/QB64 \ No newline at end of file diff --git a/Lang/QB64/Trabb-Pardo-Knuth-algorithm b/Lang/QB64/Trabb-Pardo-Knuth-algorithm deleted file mode 120000 index bd61960412..0000000000 --- a/Lang/QB64/Trabb-Pardo-Knuth-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trabb-Pardo-Knuth-algorithm/QB64 \ No newline at end of file diff --git a/Lang/QB64/Twos-complement b/Lang/QB64/Twos-complement deleted file mode 120000 index fd393f8160..0000000000 --- a/Lang/QB64/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/QB64 \ No newline at end of file diff --git a/Lang/QB64/Web-scraping b/Lang/QB64/Web-scraping deleted file mode 120000 index bdf604fdc3..0000000000 --- a/Lang/QB64/Web-scraping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Web-scraping/QB64 \ No newline at end of file diff --git a/Lang/QBasic/00-LANG.txt b/Lang/QBasic/00-LANG.txt index 66c4f1d834..4ab26db45d 100644 --- a/Lang/QBasic/00-LANG.txt +++ b/Lang/QBasic/00-LANG.txt @@ -1,4 +1,3 @@ {{language}} -{{implementation|BASIC}} QBasic is a BASIC that was written by Microsoft and normally executes under Windows. \ No newline at end of file diff --git a/Lang/QBasic/15-puzzle-game b/Lang/QBasic/15-puzzle-game deleted file mode 120000 index 4cdffaba3f..0000000000 --- a/Lang/QBasic/15-puzzle-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-game/QBasic \ No newline at end of file diff --git a/Lang/QBasic/ASCII-art-diagram-converter b/Lang/QBasic/ASCII-art-diagram-converter deleted file mode 120000 index 75bc551903..0000000000 --- a/Lang/QBasic/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Associative-array-Merging b/Lang/QBasic/Associative-array-Merging deleted file mode 120000 index 7cdfcc0848..0000000000 --- a/Lang/QBasic/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Averages-Mean-angle b/Lang/QBasic/Averages-Mean-angle deleted file mode 120000 index 499df28583..0000000000 --- a/Lang/QBasic/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Determine-sentence-type b/Lang/QBasic/Determine-sentence-type deleted file mode 120000 index 5f23645126..0000000000 --- a/Lang/QBasic/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Dinesmans-multiple-dwelling-problem b/Lang/QBasic/Dinesmans-multiple-dwelling-problem new file mode 120000 index 0000000000..58659e8fb4 --- /dev/null +++ b/Lang/QBasic/Dinesmans-multiple-dwelling-problem @@ -0,0 +1 @@ +../../Task/Dinesmans-multiple-dwelling-problem/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Display-a-linear-combination b/Lang/QBasic/Display-a-linear-combination deleted file mode 120000 index e9d158c960..0000000000 --- a/Lang/QBasic/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Diversity-prediction-theorem b/Lang/QBasic/Diversity-prediction-theorem deleted file mode 120000 index 01e16fde09..0000000000 --- a/Lang/QBasic/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Evaluate-binomial-coefficients b/Lang/QBasic/Evaluate-binomial-coefficients deleted file mode 120000 index 86b00c5e75..0000000000 --- a/Lang/QBasic/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Fibonacci-n-step-number-sequences b/Lang/QBasic/Fibonacci-n-step-number-sequences deleted file mode 120000 index 77136c7137..0000000000 --- a/Lang/QBasic/Fibonacci-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-n-step-number-sequences/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Horizontal-sundial-calculations b/Lang/QBasic/Horizontal-sundial-calculations deleted file mode 120000 index 48a7ed5986..0000000000 --- a/Lang/QBasic/Horizontal-sundial-calculations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horizontal-sundial-calculations/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Jensens-Device b/Lang/QBasic/Jensens-Device deleted file mode 120000 index 199e4d7809..0000000000 --- a/Lang/QBasic/Jensens-Device +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jensens-Device/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Leonardo-numbers b/Lang/QBasic/Leonardo-numbers deleted file mode 120000 index d0e3199c8a..0000000000 --- a/Lang/QBasic/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Loops-Continue b/Lang/QBasic/Loops-Continue deleted file mode 120000 index eeea4ac585..0000000000 --- a/Lang/QBasic/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Map-range b/Lang/QBasic/Map-range deleted file mode 120000 index be9705365d..0000000000 --- a/Lang/QBasic/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Nested-templated-data b/Lang/QBasic/Nested-templated-data deleted file mode 120000 index ddf5a87c1b..0000000000 --- a/Lang/QBasic/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Numbers-with-equal-rises-and-falls b/Lang/QBasic/Numbers-with-equal-rises-and-falls deleted file mode 120000 index 8e3ab8bbe9..0000000000 --- a/Lang/QBasic/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Phrase-reversals b/Lang/QBasic/Phrase-reversals deleted file mode 120000 index 7f3671bcb7..0000000000 --- a/Lang/QBasic/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Pinstripe-Display b/Lang/QBasic/Pinstripe-Display deleted file mode 120000 index f245a0ccf2..0000000000 --- a/Lang/QBasic/Pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pinstripe-Display/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Ramer-Douglas-Peucker-line-simplification b/Lang/QBasic/Ramer-Douglas-Peucker-line-simplification deleted file mode 120000 index 574b7acaf0..0000000000 --- a/Lang/QBasic/Ramer-Douglas-Peucker-line-simplification +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramer-Douglas-Peucker-line-simplification/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Repeat-a-string b/Lang/QBasic/Repeat-a-string new file mode 120000 index 0000000000..4c99978a73 --- /dev/null +++ b/Lang/QBasic/Repeat-a-string @@ -0,0 +1 @@ +../../Task/Repeat-a-string/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Rot-13 b/Lang/QBasic/Rot-13 deleted file mode 120000 index 8ebe820c50..0000000000 --- a/Lang/QBasic/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/QBasic/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/QBasic/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/QBasic/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/QBasic/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/QBasic/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/QBasic/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/QBasic/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/QBasic/Soundex b/Lang/QBasic/Soundex deleted file mode 120000 index 2d904fe964..0000000000 --- a/Lang/QBasic/Soundex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soundex/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Split-a-character-string-based-on-change-of-character b/Lang/QBasic/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 5e5ffa8a44..0000000000 --- a/Lang/QBasic/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Statistics-Normal-distribution b/Lang/QBasic/Statistics-Normal-distribution deleted file mode 120000 index 9e5e8f24f2..0000000000 --- a/Lang/QBasic/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/QBasic \ No newline at end of file diff --git a/Lang/QBasic/The-Name-Game b/Lang/QBasic/The-Name-Game deleted file mode 120000 index f7f2e9b30b..0000000000 --- a/Lang/QBasic/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/QBasic \ No newline at end of file diff --git a/Lang/QBasic/Vector b/Lang/QBasic/Vector deleted file mode 120000 index 7bbf551f69..0000000000 --- a/Lang/QBasic/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/QBasic \ No newline at end of file diff --git a/Lang/Quackery/00-LANG.txt b/Lang/Quackery/00-LANG.txt index b70d597b46..498188387d 100644 --- a/Lang/Quackery/00-LANG.txt +++ b/Lang/Quackery/00-LANG.txt @@ -1,9 +1,9 @@ {{language|Quackery}} {{language programming paradigm|Concatenative}} {{language programming paradigm|Imperative}} -Quackery is an open-source, lightweight, entry-level concatenative language for educational and recreational programming, and an extensible compiler for a hypothetical processor, the Quackery Engine. +Quackery is an open-source, lightweight, entry-level concatenative language for educational and recreational programming. -It is coded as a Python 3 function in about 50k of Pythonscript, about half of which is a string of Quackery code. +It is coded as a Python 3 function in under 48k of Pythonscript, about half of which is a string of Quackery code. The Quackery GitHub repository, which includes the Quackery manual "The Book of Quackery" as a pdf, is at [https://github.com/GordonCharlton/Quackery github.com/GordonCharlton/Quackery]. @@ -19,7 +19,7 @@ To compile this definition of quackery, build takes a The words is, [, and ] are builders; they can be found in the builders dictionary, which extends the functionality of build beyond building a flat nest for do to evaluate. is takes the item that do most recently added to its output nest, and adds it to the names dictionary, along with the string that follows it, "quackery" as its name. The syntax of Quackery is; words and numbers are sequences of printable characters, separated by spaces and carriage returns unless a builder treats the text that follows it otherwise. The builder builds is equivalent to is for adding new words and behaviours to the builders dictionary. -Evaluation of a nest proceeds from left to right unless a control flow operator redirects it. done causes doto stop evaluating a nest and return to the nest that pointed to it immediately, rather than at the end of the nest. again restarts the evaluation of that nest, non-recursively. The word recurse does it recursively. if and iff conditionally (depending on the item on the top of the Quackery stack) skip over the next one and two items in the nest respectively. else skips over one item, unconditionally. As with the other provided control flow operators, these words are nests, not operators, that make use of the "meta-control flow" operators, which grant the behaviours described above to words that use them. (They modify items on the return stack, rather than acting on the Quackery engine's various registers directly, so their changes are enacted upon exiting the nest that called them.) +Evaluation of a nest proceeds from left to right unless a control flow operator redirects it. done causes doto stop evaluating a nest and return to the nest that pointed to it immediately, rather than at the end of the nest. again restarts the evaluation of that nest, non-recursively. The word recurse does it recursively. if and iff conditionally (depending on the item on the top of the Quackery stack) skip over the next one and two items in the nest respectively. else skips over one item, unconditionally. As with the other provided control flow operators, these words are nests, not operators, that make use of the "meta-control flow" operators, which grant the behaviours described above to words that use them. (They modify items on the return stack, rather than acting on the Quackery engine's various pointers registers directly, so their changes are enacted upon exiting the nest that called them.) There are no variables in Quackery. Instead, there are stack management words to rearrange the uppermost items on the Quackery stack as required, and nameable ancillary stacks that fulfil the roles of variables. @@ -27,28 +27,8 @@ Everything is code except when it is data. When do does a number, t Conceptually, the Quackery engine is a stack based processor which does not have direct access to physical memory but has a memory management co-processor that intermediates, that takes care of the nests and bignums, provides pointers to the Quackery engine CPU on request, and garbage collects continuously. -Quackery is not intended to be a super-fast enterprise-level language; it is intended as an exploration of a novel architecture, and a fun programming project straight out of a textbook. (The textbook is included in the download.) +Quackery is not intended to be a super-fast enterprise-level language; it is intended as a fun programming project straight out of a textbook. (The textbook is included in the download.) -Why not try your hand at one of the [[Tasks not implemented in Quackery]]. +If your language supports bignums, first-class functions and dynamic arrays of bignums, functions and dynamic arrays, and has automatic garbage collection, and if you can code depth-first traversal of a tree you can implement Quackery in your preferred language with reasonable ease, and modify it as you please. -== Selected Quackery Examples == - -Rosetta Code has hundreds of Quackery examples. Here’s a curated set that showcases some of Quackery's strengths: - -* [[99 bottles of beer#Quackery|99 bottles of beer]] Shows simple, readable control flow and output. -* [[Gosper's hack#Quackery|Gosper's hack]] A nifty one-liner. -* [[Temperature conversion#Quackery|Temperature conversion]] Co-operative brevity. -* [[Balanced brackets#Quackery|Balanced brackets]] Demonstrates natural stack use for classic problems. -* [[Loops/Increment loop index within loop body#Quackery|Increment loop index within loop body]] You want a loop that's indexed ''and'' indefinite? Here's how. -* [[Quine#Quackery|Quine]] Illustrates code-as-data and quotation handling. -* [[Bacon cipher#Quackery|Bacon cipher]] Highlights clear text manipulation with minimal code. -* [[Permutations#Quackery|Permutations]] Uses recursion and stack shuffling expressively. -* [[Sorting algorithms/Insertion sort#Quackery|Insertion sort]] Demonstrates some built-in higher-order functions. -* [[Higher-order functions#Quackery|Higher-order functions]] Defining and using fold, map, and filter. -* [[Conway's Game of Life#Quackery|Conway's Game of Life]] Handles structured simulation with clarity. -* [[Execute Brain****#Quackery|Brainf*** interpreter]] Demonstrates interpreter-building and extensibility. -* [[Dinesman's multiple-dwelling problem#Quackery|Dinesman's multiple-dwelling problem]] Crafting a Domain Specific Language. - -== The Task that Nearly Broke the Author == - -* [[Zeckendorf arithmetic#Quackery|Zeckendorf arithmetic]] Forget everything you thought you knew about arithmetic… \ No newline at end of file +Or try your hand at one of the [[Tasks not implemented in Quackery]]. \ No newline at end of file diff --git a/Lang/Quackery/4-rings-or-4-squares-puzzle b/Lang/Quackery/4-rings-or-4-squares-puzzle deleted file mode 120000 index 786cc93b7f..0000000000 --- a/Lang/Quackery/4-rings-or-4-squares-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/4-rings-or-4-squares-puzzle/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Balanced-ternary b/Lang/Quackery/Balanced-ternary deleted file mode 120000 index c02c0b6483..0000000000 --- a/Lang/Quackery/Balanced-ternary +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-ternary/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Benfords-law b/Lang/Quackery/Benfords-law deleted file mode 120000 index 83c8fdffec..0000000000 --- a/Lang/Quackery/Benfords-law +++ /dev/null @@ -1 +0,0 @@ -../../Task/Benfords-law/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Bioinformatics-base-count b/Lang/Quackery/Bioinformatics-base-count new file mode 120000 index 0000000000..65cab8d1ed --- /dev/null +++ b/Lang/Quackery/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Chowla-numbers b/Lang/Quackery/Chowla-numbers deleted file mode 120000 index 017749c553..0000000000 --- a/Lang/Quackery/Chowla-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chowla-numbers/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Combinations-and-permutations b/Lang/Quackery/Combinations-and-permutations deleted file mode 120000 index fc6f331f4d..0000000000 --- a/Lang/Quackery/Combinations-and-permutations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations-and-permutations/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Cuban-primes b/Lang/Quackery/Cuban-primes deleted file mode 120000 index 8c512d4853..0000000000 --- a/Lang/Quackery/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Dice-game-probabilities b/Lang/Quackery/Dice-game-probabilities deleted file mode 120000 index 87d28dc799..0000000000 --- a/Lang/Quackery/Dice-game-probabilities +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dice-game-probabilities/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Dinesmans-multiple-dwelling-problem b/Lang/Quackery/Dinesmans-multiple-dwelling-problem deleted file mode 120000 index 2061e87b20..0000000000 --- a/Lang/Quackery/Dinesmans-multiple-dwelling-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dinesmans-multiple-dwelling-problem/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Distribution-of-0-digits-in-factorial-series b/Lang/Quackery/Distribution-of-0-digits-in-factorial-series deleted file mode 120000 index 8627f3195b..0000000000 --- a/Lang/Quackery/Distribution-of-0-digits-in-factorial-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Distribution-of-0-digits-in-factorial-series/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Doomsday-rule b/Lang/Quackery/Doomsday-rule deleted file mode 120000 index f3df2f0b9b..0000000000 --- a/Lang/Quackery/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Dutch-national-flag-problem b/Lang/Quackery/Dutch-national-flag-problem deleted file mode 120000 index 133393cf2e..0000000000 --- a/Lang/Quackery/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Execute-Computer-Zero b/Lang/Quackery/Execute-Computer-Zero deleted file mode 120000 index bffceead11..0000000000 --- a/Lang/Quackery/Execute-Computer-Zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Computer-Zero/Quackery \ No newline at end of file diff --git a/Lang/Quackery/First-class-functions-Use-numbers-analogously b/Lang/Quackery/First-class-functions-Use-numbers-analogously deleted file mode 120000 index c8416f6780..0000000000 --- a/Lang/Quackery/First-class-functions-Use-numbers-analogously +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions-Use-numbers-analogously/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Flipping-bits-game b/Lang/Quackery/Flipping-bits-game deleted file mode 120000 index fd3aa38458..0000000000 --- a/Lang/Quackery/Flipping-bits-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flipping-bits-game/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Golden-ratio-Convergence b/Lang/Quackery/Golden-ratio-Convergence deleted file mode 120000 index 177994dc3e..0000000000 --- a/Lang/Quackery/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Menu b/Lang/Quackery/Menu deleted file mode 120000 index 07087595bc..0000000000 --- a/Lang/Quackery/Menu +++ /dev/null @@ -1 +0,0 @@ -../../Task/Menu/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Miller-Rabin-primality-test b/Lang/Quackery/Miller-Rabin-primality-test new file mode 120000 index 0000000000..d8e4ec56b5 --- /dev/null +++ b/Lang/Quackery/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Minimum-multiple-of-m-where-digital-sum-equals-m b/Lang/Quackery/Minimum-multiple-of-m-where-digital-sum-equals-m deleted file mode 120000 index ddb9ece049..0000000000 --- a/Lang/Quackery/Minimum-multiple-of-m-where-digital-sum-equals-m +++ /dev/null @@ -1 +0,0 @@ -../../Task/Minimum-multiple-of-m-where-digital-sum-equals-m/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Old-lady-swallowed-a-fly b/Lang/Quackery/Old-lady-swallowed-a-fly deleted file mode 120000 index 0d6823a2fd..0000000000 --- a/Lang/Quackery/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Password-generator b/Lang/Quackery/Password-generator deleted file mode 120000 index 8d0efee13f..0000000000 --- a/Lang/Quackery/Password-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Password-generator/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Pseudo-random-numbers-Xorshift-star b/Lang/Quackery/Pseudo-random-numbers-Xorshift-star deleted file mode 120000 index 0d802ea7eb..0000000000 --- a/Lang/Quackery/Pseudo-random-numbers-Xorshift-star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Xorshift-star/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Quackery/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Quackery/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Quackery/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Quackery/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Quackery/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Quackery/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Quackery/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Quackery/Sleep b/Lang/Quackery/Sleep deleted file mode 120000 index 7cd0464b5f..0000000000 --- a/Lang/Quackery/Sleep +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleep/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Solve-the-no-connection-puzzle b/Lang/Quackery/Solve-the-no-connection-puzzle deleted file mode 120000 index d37f201a93..0000000000 --- a/Lang/Quackery/Solve-the-no-connection-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-the-no-connection-puzzle/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Sorting-Algorithms-Circle-Sort b/Lang/Quackery/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..e4abaee49d --- /dev/null +++ b/Lang/Quackery/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Square-free-integers b/Lang/Quackery/Square-free-integers deleted file mode 120000 index 1d2a5a3f4e..0000000000 --- a/Lang/Quackery/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Sum-of-elements-below-main-diagonal-of-matrix b/Lang/Quackery/Sum-of-elements-below-main-diagonal-of-matrix deleted file mode 120000 index 1f9736ed88..0000000000 --- a/Lang/Quackery/Sum-of-elements-below-main-diagonal-of-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-elements-below-main-diagonal-of-matrix/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Two-bullet-roulette b/Lang/Quackery/Two-bullet-roulette deleted file mode 120000 index 24f00326c1..0000000000 --- a/Lang/Quackery/Two-bullet-roulette +++ /dev/null @@ -1 +0,0 @@ -../../Task/Two-bullet-roulette/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Ultra-useful-primes b/Lang/Quackery/Ultra-useful-primes deleted file mode 120000 index d6fc3551e1..0000000000 --- a/Lang/Quackery/Ultra-useful-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ultra-useful-primes/Quackery \ No newline at end of file diff --git a/Lang/Quackery/Universal-Turing-machine b/Lang/Quackery/Universal-Turing-machine deleted file mode 120000 index 9346211d7e..0000000000 --- a/Lang/Quackery/Universal-Turing-machine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Universal-Turing-machine/Quackery \ No newline at end of file diff --git a/Lang/QuickBASIC/AKS-test-for-primes b/Lang/QuickBASIC/AKS-test-for-primes deleted file mode 120000 index 3fb1fc33c1..0000000000 --- a/Lang/QuickBASIC/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Abundant-odd-numbers b/Lang/QuickBASIC/Abundant-odd-numbers deleted file mode 120000 index baf10a6d8e..0000000000 --- a/Lang/QuickBASIC/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Arithmetic-numbers b/Lang/QuickBASIC/Arithmetic-numbers deleted file mode 120000 index e7076b98ae..0000000000 --- a/Lang/QuickBASIC/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Brazilian-numbers b/Lang/QuickBASIC/Brazilian-numbers deleted file mode 120000 index 28cd1e19d8..0000000000 --- a/Lang/QuickBASIC/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/CUSIP b/Lang/QuickBASIC/CUSIP deleted file mode 120000 index cb4c762939..0000000000 --- a/Lang/QuickBASIC/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Catalan-numbers b/Lang/QuickBASIC/Catalan-numbers deleted file mode 120000 index d84bc84044..0000000000 --- a/Lang/QuickBASIC/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Cumulative-standard-deviation b/Lang/QuickBASIC/Cumulative-standard-deviation deleted file mode 120000 index 969c73b001..0000000000 --- a/Lang/QuickBASIC/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Determine-if-a-string-is-collapsible b/Lang/QuickBASIC/Determine-if-a-string-is-collapsible deleted file mode 120000 index d58e5303fd..0000000000 --- a/Lang/QuickBASIC/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Dutch-national-flag-problem b/Lang/QuickBASIC/Dutch-national-flag-problem deleted file mode 120000 index f213f50587..0000000000 --- a/Lang/QuickBASIC/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Equilibrium-index b/Lang/QuickBASIC/Equilibrium-index deleted file mode 120000 index d38cfdf137..0000000000 --- a/Lang/QuickBASIC/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Ethiopian-multiplication b/Lang/QuickBASIC/Ethiopian-multiplication deleted file mode 120000 index 8a8cc43790..0000000000 --- a/Lang/QuickBASIC/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Function-definition b/Lang/QuickBASIC/Function-definition deleted file mode 120000 index 0251617973..0000000000 --- a/Lang/QuickBASIC/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Gamma-function b/Lang/QuickBASIC/Gamma-function deleted file mode 120000 index 6180b04d53..0000000000 --- a/Lang/QuickBASIC/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Knights-tour b/Lang/QuickBASIC/Knights-tour deleted file mode 120000 index 7c54f50c61..0000000000 --- a/Lang/QuickBASIC/Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knights-tour/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Langtons-ant b/Lang/QuickBASIC/Langtons-ant deleted file mode 120000 index c0bbe5661c..0000000000 --- a/Lang/QuickBASIC/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/M-bius-function b/Lang/QuickBASIC/M-bius-function deleted file mode 120000 index 8f60fadaa9..0000000000 --- a/Lang/QuickBASIC/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Monty-Hall-problem b/Lang/QuickBASIC/Monty-Hall-problem deleted file mode 120000 index 5a322fee75..0000000000 --- a/Lang/QuickBASIC/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Multifactorial b/Lang/QuickBASIC/Multifactorial deleted file mode 120000 index 1f38ec7f4d..0000000000 --- a/Lang/QuickBASIC/Multifactorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multifactorial/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Nth-root b/Lang/QuickBASIC/Nth-root deleted file mode 120000 index db6d881466..0000000000 --- a/Lang/QuickBASIC/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Prime-decomposition b/Lang/QuickBASIC/Prime-decomposition deleted file mode 120000 index 1a12af5b95..0000000000 --- a/Lang/QuickBASIC/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Random-numbers b/Lang/QuickBASIC/Random-numbers deleted file mode 120000 index 8332f543fa..0000000000 --- a/Lang/QuickBASIC/Random-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-numbers/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Repeat-a-string b/Lang/QuickBASIC/Repeat-a-string deleted file mode 120000 index f019b580c1..0000000000 --- a/Lang/QuickBASIC/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Semiprime b/Lang/QuickBASIC/Semiprime deleted file mode 120000 index ded745aaee..0000000000 --- a/Lang/QuickBASIC/Semiprime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semiprime/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Shoelace-formula-for-polygonal-area b/Lang/QuickBASIC/Shoelace-formula-for-polygonal-area deleted file mode 120000 index dc63463382..0000000000 --- a/Lang/QuickBASIC/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/QuickBASIC \ No newline at end of file diff --git a/Lang/QuickBASIC/Sorting-algorithms-Quicksort b/Lang/QuickBASIC/Sorting-algorithms-Quicksort deleted file mode 120000 index 573bd236b2..0000000000 --- a/Lang/QuickBASIC/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/QuickBASIC \ No newline at end of file diff --git a/Lang/Quite-BASIC/Determine-sentence-type b/Lang/Quite-BASIC/Determine-sentence-type deleted file mode 120000 index 6c274b9228..0000000000 --- a/Lang/Quite-BASIC/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Quite-BASIC \ No newline at end of file diff --git a/Lang/Quite-BASIC/Empty-program b/Lang/Quite-BASIC/Empty-program new file mode 120000 index 0000000000..fb2bfba5b2 --- /dev/null +++ b/Lang/Quite-BASIC/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Quite-BASIC \ No newline at end of file diff --git a/Lang/R/15-puzzle-solver b/Lang/R/15-puzzle-solver deleted file mode 120000 index f3e79214e0..0000000000 --- a/Lang/R/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/R \ No newline at end of file diff --git a/Lang/R/ADFGVX-cipher b/Lang/R/ADFGVX-cipher deleted file mode 120000 index 78a519cccb..0000000000 --- a/Lang/R/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/R \ No newline at end of file diff --git a/Lang/R/Angle-difference-between-two-bearings b/Lang/R/Angle-difference-between-two-bearings deleted file mode 120000 index a27ae03f18..0000000000 --- a/Lang/R/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/R \ No newline at end of file diff --git a/Lang/R/Angles-geometric-normalization-and-conversion b/Lang/R/Angles-geometric-normalization-and-conversion deleted file mode 120000 index d1e56f507e..0000000000 --- a/Lang/R/Angles-geometric-normalization-and-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angles-geometric-normalization-and-conversion/R \ No newline at end of file diff --git a/Lang/R/Arithmetic-derivative b/Lang/R/Arithmetic-derivative deleted file mode 120000 index b37750c7e7..0000000000 --- a/Lang/R/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/R \ No newline at end of file diff --git a/Lang/R/Balanced-ternary b/Lang/R/Balanced-ternary deleted file mode 120000 index 593bb03a22..0000000000 --- a/Lang/R/Balanced-ternary +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-ternary/R \ No newline at end of file diff --git a/Lang/R/Bioinformatics-Sequence-mutation b/Lang/R/Bioinformatics-Sequence-mutation deleted file mode 120000 index 2779ce82b8..0000000000 --- a/Lang/R/Bioinformatics-Sequence-mutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bioinformatics-Sequence-mutation/R \ No newline at end of file diff --git a/Lang/R/Bioinformatics-base-count b/Lang/R/Bioinformatics-base-count new file mode 120000 index 0000000000..2ca416a985 --- /dev/null +++ b/Lang/R/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/R \ No newline at end of file diff --git a/Lang/R/Boyer-Moore-string-search b/Lang/R/Boyer-Moore-string-search deleted file mode 120000 index 32fa72f304..0000000000 --- a/Lang/R/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/R \ No newline at end of file diff --git a/Lang/R/Brazilian-numbers b/Lang/R/Brazilian-numbers deleted file mode 120000 index 87e6a7046a..0000000000 --- a/Lang/R/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/R \ No newline at end of file diff --git a/Lang/R/CUSIP b/Lang/R/CUSIP deleted file mode 120000 index e43a376539..0000000000 --- a/Lang/R/CUSIP +++ /dev/null @@ -1 +0,0 @@ -../../Task/CUSIP/R \ No newline at end of file diff --git a/Lang/R/Call-a-foreign-language-function b/Lang/R/Call-a-foreign-language-function deleted file mode 120000 index 606c52dbec..0000000000 --- a/Lang/R/Call-a-foreign-language-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-foreign-language-function/R \ No newline at end of file diff --git a/Lang/R/Camel-case-and-snake-case b/Lang/R/Camel-case-and-snake-case deleted file mode 120000 index e76dd2d66a..0000000000 --- a/Lang/R/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/R \ No newline at end of file diff --git a/Lang/R/Catalan-numbers-Pascals-triangle b/Lang/R/Catalan-numbers-Pascals-triangle deleted file mode 120000 index dbe83426e3..0000000000 --- a/Lang/R/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/R \ No newline at end of file diff --git a/Lang/R/Chinese-zodiac b/Lang/R/Chinese-zodiac deleted file mode 120000 index 55811323ec..0000000000 --- a/Lang/R/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/R \ No newline at end of file diff --git a/Lang/R/Colour-pinstripe-Display b/Lang/R/Colour-pinstripe-Display deleted file mode 120000 index 88bf4afbbd..0000000000 --- a/Lang/R/Colour-pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-pinstripe-Display/R \ No newline at end of file diff --git a/Lang/R/Compare-length-of-two-strings b/Lang/R/Compare-length-of-two-strings deleted file mode 120000 index 834feb9f20..0000000000 --- a/Lang/R/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/R \ No newline at end of file diff --git a/Lang/R/Compare-sorting-algorithms-performance b/Lang/R/Compare-sorting-algorithms-performance deleted file mode 120000 index 61629d6cd5..0000000000 --- a/Lang/R/Compare-sorting-algorithms-performance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-sorting-algorithms-performance/R \ No newline at end of file diff --git a/Lang/R/Conjugate-transpose b/Lang/R/Conjugate-transpose deleted file mode 120000 index 573e26fb04..0000000000 --- a/Lang/R/Conjugate-transpose +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conjugate-transpose/R \ No newline at end of file diff --git a/Lang/R/Continued-fraction b/Lang/R/Continued-fraction deleted file mode 120000 index 8e8db83048..0000000000 --- a/Lang/R/Continued-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction/R \ No newline at end of file diff --git a/Lang/R/Continued-fraction-Arithmetic-Construct-from-rational-number b/Lang/R/Continued-fraction-Arithmetic-Construct-from-rational-number deleted file mode 120000 index 6bffaf9997..0000000000 --- a/Lang/R/Continued-fraction-Arithmetic-Construct-from-rational-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-Construct-from-rational-number/R \ No newline at end of file diff --git a/Lang/R/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/R/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- deleted file mode 120000 index 794241b476..0000000000 --- a/Lang/R/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/R \ No newline at end of file diff --git a/Lang/R/Convert-seconds-to-compound-duration b/Lang/R/Convert-seconds-to-compound-duration deleted file mode 120000 index 85f297d7da..0000000000 --- a/Lang/R/Convert-seconds-to-compound-duration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-seconds-to-compound-duration/R \ No newline at end of file diff --git a/Lang/R/Convex-hull b/Lang/R/Convex-hull deleted file mode 120000 index 8db2946ae1..0000000000 --- a/Lang/R/Convex-hull +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convex-hull/R \ No newline at end of file diff --git a/Lang/R/Count-in-octal b/Lang/R/Count-in-octal deleted file mode 120000 index 37edd3a31e..0000000000 --- a/Lang/R/Count-in-octal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-octal/R \ No newline at end of file diff --git a/Lang/R/Cramers-rule b/Lang/R/Cramers-rule deleted file mode 120000 index 839896c59f..0000000000 --- a/Lang/R/Cramers-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cramers-rule/R \ No newline at end of file diff --git a/Lang/R/Create-an-HTML-table b/Lang/R/Create-an-HTML-table deleted file mode 120000 index 209500efb4..0000000000 --- a/Lang/R/Create-an-HTML-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-HTML-table/R \ No newline at end of file diff --git a/Lang/R/Curzon-numbers b/Lang/R/Curzon-numbers deleted file mode 120000 index a381ff9f97..0000000000 --- a/Lang/R/Curzon-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Curzon-numbers/R \ No newline at end of file diff --git a/Lang/R/De-Bruijn-sequences b/Lang/R/De-Bruijn-sequences deleted file mode 120000 index bd74daf8c7..0000000000 --- a/Lang/R/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/R \ No newline at end of file diff --git a/Lang/R/Deceptive-numbers b/Lang/R/Deceptive-numbers deleted file mode 120000 index 68b87065ac..0000000000 --- a/Lang/R/Deceptive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deceptive-numbers/R \ No newline at end of file diff --git a/Lang/R/Deepcopy b/Lang/R/Deepcopy deleted file mode 120000 index 85c0e9d496..0000000000 --- a/Lang/R/Deepcopy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deepcopy/R \ No newline at end of file diff --git a/Lang/R/Demings-funnel b/Lang/R/Demings-funnel deleted file mode 120000 index ae9cefb48f..0000000000 --- a/Lang/R/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/R \ No newline at end of file diff --git a/Lang/R/Determine-sentence-type b/Lang/R/Determine-sentence-type deleted file mode 120000 index b5e3ac4763..0000000000 --- a/Lang/R/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/R \ No newline at end of file diff --git a/Lang/R/Digital-root-Multiplicative-digital-root b/Lang/R/Digital-root-Multiplicative-digital-root deleted file mode 120000 index 09c29b1f07..0000000000 --- a/Lang/R/Digital-root-Multiplicative-digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root-Multiplicative-digital-root/R \ No newline at end of file diff --git a/Lang/R/Dijkstras-algorithm b/Lang/R/Dijkstras-algorithm deleted file mode 120000 index 3bff2fae1d..0000000000 --- a/Lang/R/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/R \ No newline at end of file diff --git a/Lang/R/Disarium-numbers b/Lang/R/Disarium-numbers deleted file mode 120000 index 233dce846c..0000000000 --- a/Lang/R/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/R \ No newline at end of file diff --git a/Lang/R/Display-a-linear-combination b/Lang/R/Display-a-linear-combination deleted file mode 120000 index c292ce3aec..0000000000 --- a/Lang/R/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/R \ No newline at end of file diff --git a/Lang/R/Doomsday-rule b/Lang/R/Doomsday-rule deleted file mode 120000 index d2c2b8b054..0000000000 --- a/Lang/R/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/R \ No newline at end of file diff --git a/Lang/R/Draw-a-cuboid b/Lang/R/Draw-a-cuboid deleted file mode 120000 index b0d15ca88e..0000000000 --- a/Lang/R/Draw-a-cuboid +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-cuboid/R \ No newline at end of file diff --git a/Lang/R/Draw-a-pixel b/Lang/R/Draw-a-pixel deleted file mode 120000 index 64a7037eb8..0000000000 --- a/Lang/R/Draw-a-pixel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-pixel/R \ No newline at end of file diff --git a/Lang/R/Draw-a-sphere b/Lang/R/Draw-a-sphere deleted file mode 120000 index 5508f91f81..0000000000 --- a/Lang/R/Draw-a-sphere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-sphere/R \ No newline at end of file diff --git a/Lang/R/Dutch-national-flag-problem b/Lang/R/Dutch-national-flag-problem deleted file mode 120000 index 422342365f..0000000000 --- a/Lang/R/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/R \ No newline at end of file diff --git a/Lang/R/Equilibrium-index b/Lang/R/Equilibrium-index deleted file mode 120000 index 7c36abe0f6..0000000000 --- a/Lang/R/Equilibrium-index +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equilibrium-index/R \ No newline at end of file diff --git a/Lang/R/Euclid-Mullin-sequence b/Lang/R/Euclid-Mullin-sequence deleted file mode 120000 index 3929a900d8..0000000000 --- a/Lang/R/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/R \ No newline at end of file diff --git a/Lang/R/Execute-HQ9+ b/Lang/R/Execute-HQ9+ deleted file mode 120000 index 0972c0bb4f..0000000000 --- a/Lang/R/Execute-HQ9+ +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-HQ9+/R \ No newline at end of file diff --git a/Lang/R/Factorial-primes b/Lang/R/Factorial-primes deleted file mode 120000 index 90b75c9d38..0000000000 --- a/Lang/R/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/R \ No newline at end of file diff --git a/Lang/R/Factorions b/Lang/R/Factorions deleted file mode 120000 index 351fcd0d06..0000000000 --- a/Lang/R/Factorions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorions/R \ No newline at end of file diff --git a/Lang/R/Factors-of-a-Mersenne-number b/Lang/R/Factors-of-a-Mersenne-number deleted file mode 120000 index 7aad181edd..0000000000 --- a/Lang/R/Factors-of-a-Mersenne-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-a-Mersenne-number/R \ No newline at end of file diff --git a/Lang/R/Fermat-numbers b/Lang/R/Fermat-numbers deleted file mode 120000 index 17ea6a5311..0000000000 --- a/Lang/R/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/R \ No newline at end of file diff --git a/Lang/R/Fibonacci-n-step-number-sequences b/Lang/R/Fibonacci-n-step-number-sequences deleted file mode 120000 index 1cf227761a..0000000000 --- a/Lang/R/Fibonacci-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-n-step-number-sequences/R \ No newline at end of file diff --git a/Lang/R/File-extension-is-in-extensions-list b/Lang/R/File-extension-is-in-extensions-list deleted file mode 120000 index 154f141040..0000000000 --- a/Lang/R/File-extension-is-in-extensions-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-extension-is-in-extensions-list/R \ No newline at end of file diff --git a/Lang/R/Find-palindromic-numbers-in-both-binary-and-ternary-bases b/Lang/R/Find-palindromic-numbers-in-both-binary-and-ternary-bases deleted file mode 120000 index 1adf6989fe..0000000000 --- a/Lang/R/Find-palindromic-numbers-in-both-binary-and-ternary-bases +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-palindromic-numbers-in-both-binary-and-ternary-bases/R \ No newline at end of file diff --git a/Lang/R/Flipping-bits-game b/Lang/R/Flipping-bits-game deleted file mode 120000 index 45f9cba067..0000000000 --- a/Lang/R/Flipping-bits-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flipping-bits-game/R \ No newline at end of file diff --git a/Lang/R/Floyd-Warshall-algorithm b/Lang/R/Floyd-Warshall-algorithm deleted file mode 120000 index f0f7534bc6..0000000000 --- a/Lang/R/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/R \ No newline at end of file diff --git a/Lang/R/Fractran b/Lang/R/Fractran deleted file mode 120000 index 4684d03d23..0000000000 --- a/Lang/R/Fractran +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractran/R \ No newline at end of file diff --git a/Lang/R/Gapful-numbers b/Lang/R/Gapful-numbers deleted file mode 120000 index d00abda6e0..0000000000 --- a/Lang/R/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/R \ No newline at end of file diff --git a/Lang/R/Gauss-Jordan-matrix-inversion b/Lang/R/Gauss-Jordan-matrix-inversion deleted file mode 120000 index abdff0e0d3..0000000000 --- a/Lang/R/Gauss-Jordan-matrix-inversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gauss-Jordan-matrix-inversion/R \ No newline at end of file diff --git a/Lang/R/Giuga-numbers b/Lang/R/Giuga-numbers deleted file mode 120000 index e45399fcf4..0000000000 --- a/Lang/R/Giuga-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Giuga-numbers/R \ No newline at end of file diff --git a/Lang/R/Golden-ratio-Convergence b/Lang/R/Golden-ratio-Convergence deleted file mode 120000 index c3444860a4..0000000000 --- a/Lang/R/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/R \ No newline at end of file diff --git a/Lang/R/Greedy-algorithm-for-Egyptian-fractions b/Lang/R/Greedy-algorithm-for-Egyptian-fractions deleted file mode 120000 index 142b97c38d..0000000000 --- a/Lang/R/Greedy-algorithm-for-Egyptian-fractions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greedy-algorithm-for-Egyptian-fractions/R \ No newline at end of file diff --git a/Lang/R/Halt-and-catch-fire b/Lang/R/Halt-and-catch-fire deleted file mode 120000 index f754df332d..0000000000 --- a/Lang/R/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/R \ No newline at end of file diff --git a/Lang/R/Harshad-or-Niven-series b/Lang/R/Harshad-or-Niven-series deleted file mode 120000 index 30268e28d1..0000000000 --- a/Lang/R/Harshad-or-Niven-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harshad-or-Niven-series/R \ No newline at end of file diff --git a/Lang/R/Hello-world-Newbie b/Lang/R/Hello-world-Newbie deleted file mode 120000 index af7f835953..0000000000 --- a/Lang/R/Hello-world-Newbie +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newbie/R \ No newline at end of file diff --git a/Lang/R/Hex-words b/Lang/R/Hex-words deleted file mode 120000 index f38acbfb8b..0000000000 --- a/Lang/R/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/R \ No newline at end of file diff --git a/Lang/R/Humble-numbers b/Lang/R/Humble-numbers deleted file mode 120000 index 66447beec9..0000000000 --- a/Lang/R/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/R \ No newline at end of file diff --git a/Lang/R/ISBN13-check-digit b/Lang/R/ISBN13-check-digit deleted file mode 120000 index 2ffb9a42ca..0000000000 --- a/Lang/R/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/R \ No newline at end of file diff --git a/Lang/R/Integer-overflow b/Lang/R/Integer-overflow deleted file mode 120000 index 35a7fbe410..0000000000 --- a/Lang/R/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/R \ No newline at end of file diff --git a/Lang/R/Isqrt-integer-square-root-of-X b/Lang/R/Isqrt-integer-square-root-of-X deleted file mode 120000 index 3aa4e6becf..0000000000 --- a/Lang/R/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/R \ No newline at end of file diff --git a/Lang/R/Kernighans-large-earthquake-problem b/Lang/R/Kernighans-large-earthquake-problem deleted file mode 120000 index e4a703f050..0000000000 --- a/Lang/R/Kernighans-large-earthquake-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kernighans-large-earthquake-problem/R \ No newline at end of file diff --git a/Lang/R/LZW-compression b/Lang/R/LZW-compression deleted file mode 120000 index 52a9a7c425..0000000000 --- a/Lang/R/LZW-compression +++ /dev/null @@ -1 +0,0 @@ -../../Task/LZW-compression/R \ No newline at end of file diff --git a/Lang/R/Literals-Floating-point b/Lang/R/Literals-Floating-point deleted file mode 120000 index 45971f0459..0000000000 --- a/Lang/R/Literals-Floating-point +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Floating-point/R \ No newline at end of file diff --git a/Lang/R/Loops-With-multiple-ranges b/Lang/R/Loops-With-multiple-ranges deleted file mode 120000 index b09ac16be3..0000000000 --- a/Lang/R/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/R \ No newline at end of file diff --git a/Lang/R/M-bius-function b/Lang/R/M-bius-function deleted file mode 120000 index 54d202ad87..0000000000 --- a/Lang/R/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/R \ No newline at end of file diff --git a/Lang/R/Magic-constant b/Lang/R/Magic-constant deleted file mode 120000 index 42b2f79fd6..0000000000 --- a/Lang/R/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/R \ No newline at end of file diff --git a/Lang/R/Make-directory-path b/Lang/R/Make-directory-path deleted file mode 120000 index 4c5b0435c3..0000000000 --- a/Lang/R/Make-directory-path +++ /dev/null @@ -1 +0,0 @@ -../../Task/Make-directory-path/R \ No newline at end of file diff --git a/Lang/R/Middle-three-digits b/Lang/R/Middle-three-digits deleted file mode 120000 index d0b65517a3..0000000000 --- a/Lang/R/Middle-three-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Middle-three-digits/R \ No newline at end of file diff --git a/Lang/R/Modular-arithmetic b/Lang/R/Modular-arithmetic deleted file mode 120000 index d91672ac00..0000000000 --- a/Lang/R/Modular-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-arithmetic/R \ No newline at end of file diff --git a/Lang/R/Modular-exponentiation b/Lang/R/Modular-exponentiation deleted file mode 120000 index 00a5ab3605..0000000000 --- a/Lang/R/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/R \ No newline at end of file diff --git a/Lang/R/Move-to-front-algorithm b/Lang/R/Move-to-front-algorithm deleted file mode 120000 index 4c2217c694..0000000000 --- a/Lang/R/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/R \ No newline at end of file diff --git a/Lang/R/Multi-dimensional-array b/Lang/R/Multi-dimensional-array deleted file mode 120000 index c00f08cfcf..0000000000 --- a/Lang/R/Multi-dimensional-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multi-dimensional-array/R \ No newline at end of file diff --git a/Lang/R/Munchausen-numbers b/Lang/R/Munchausen-numbers deleted file mode 120000 index aa4d45945f..0000000000 --- a/Lang/R/Munchausen-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munchausen-numbers/R \ No newline at end of file diff --git a/Lang/R/Munching-squares b/Lang/R/Munching-squares deleted file mode 120000 index 5c31288892..0000000000 --- a/Lang/R/Munching-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munching-squares/R \ No newline at end of file diff --git a/Lang/R/Naming-conventions b/Lang/R/Naming-conventions deleted file mode 120000 index 6ca70fbd5c..0000000000 --- a/Lang/R/Naming-conventions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Naming-conventions/R \ No newline at end of file diff --git a/Lang/R/Numbers-with-equal-rises-and-falls b/Lang/R/Numbers-with-equal-rises-and-falls deleted file mode 120000 index bd2b09b1a8..0000000000 --- a/Lang/R/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/R \ No newline at end of file diff --git a/Lang/R/Numeric-error-propagation b/Lang/R/Numeric-error-propagation deleted file mode 120000 index b4d737b26d..0000000000 --- a/Lang/R/Numeric-error-propagation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numeric-error-propagation/R \ No newline at end of file diff --git a/Lang/R/Old-Russian-measure-of-length b/Lang/R/Old-Russian-measure-of-length deleted file mode 120000 index 10e03acc09..0000000000 --- a/Lang/R/Old-Russian-measure-of-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-Russian-measure-of-length/R \ No newline at end of file diff --git a/Lang/R/Order-two-numerical-lists b/Lang/R/Order-two-numerical-lists deleted file mode 120000 index 7823304c26..0000000000 --- a/Lang/R/Order-two-numerical-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Order-two-numerical-lists/R \ No newline at end of file diff --git a/Lang/R/Padovan-n-step-number-sequences b/Lang/R/Padovan-n-step-number-sequences deleted file mode 120000 index bb121da853..0000000000 --- a/Lang/R/Padovan-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Padovan-n-step-number-sequences/R \ No newline at end of file diff --git a/Lang/R/Parse-an-IP-Address b/Lang/R/Parse-an-IP-Address deleted file mode 120000 index 9f23986592..0000000000 --- a/Lang/R/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/R \ No newline at end of file diff --git a/Lang/R/Parsing-RPN-calculator-algorithm b/Lang/R/Parsing-RPN-calculator-algorithm deleted file mode 120000 index 121dbc0d6c..0000000000 --- a/Lang/R/Parsing-RPN-calculator-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-calculator-algorithm/R \ No newline at end of file diff --git a/Lang/R/Parsing-Shunting-yard-algorithm b/Lang/R/Parsing-Shunting-yard-algorithm deleted file mode 120000 index ceae410d30..0000000000 --- a/Lang/R/Parsing-Shunting-yard-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-Shunting-yard-algorithm/R \ No newline at end of file diff --git a/Lang/R/Pernicious-numbers b/Lang/R/Pernicious-numbers deleted file mode 120000 index e0d8d55200..0000000000 --- a/Lang/R/Pernicious-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pernicious-numbers/R \ No newline at end of file diff --git a/Lang/R/Phrase-reversals b/Lang/R/Phrase-reversals deleted file mode 120000 index a54a2683b7..0000000000 --- a/Lang/R/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/R \ No newline at end of file diff --git a/Lang/R/Pig-the-dice-game b/Lang/R/Pig-the-dice-game deleted file mode 120000 index eb7f5b9e91..0000000000 --- a/Lang/R/Pig-the-dice-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pig-the-dice-game/R \ No newline at end of file diff --git a/Lang/R/Pinstripe-Display b/Lang/R/Pinstripe-Display deleted file mode 120000 index ecca9291db..0000000000 --- a/Lang/R/Pinstripe-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pinstripe-Display/R \ No newline at end of file diff --git a/Lang/R/Plasma-effect b/Lang/R/Plasma-effect deleted file mode 120000 index 0d663e21d0..0000000000 --- a/Lang/R/Plasma-effect +++ /dev/null @@ -1 +0,0 @@ -../../Task/Plasma-effect/R \ No newline at end of file diff --git a/Lang/R/Poker-hand-analyser b/Lang/R/Poker-hand-analyser deleted file mode 120000 index 1291d08bb2..0000000000 --- a/Lang/R/Poker-hand-analyser +++ /dev/null @@ -1 +0,0 @@ -../../Task/Poker-hand-analyser/R \ No newline at end of file diff --git a/Lang/R/Pseudo-random-numbers-Middle-square-method b/Lang/R/Pseudo-random-numbers-Middle-square-method deleted file mode 120000 index 27657f10ef..0000000000 --- a/Lang/R/Pseudo-random-numbers-Middle-square-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Middle-square-method/R \ No newline at end of file diff --git a/Lang/R/Quaternion-type b/Lang/R/Quaternion-type new file mode 120000 index 0000000000..2e826895b9 --- /dev/null +++ b/Lang/R/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/R \ No newline at end of file diff --git a/Lang/R/Quickselect-algorithm b/Lang/R/Quickselect-algorithm deleted file mode 120000 index 996073d670..0000000000 --- a/Lang/R/Quickselect-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quickselect-algorithm/R \ No newline at end of file diff --git a/Lang/R/Rename-a-file b/Lang/R/Rename-a-file deleted file mode 120000 index d3214c3f95..0000000000 --- a/Lang/R/Rename-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rename-a-file/R \ No newline at end of file diff --git a/Lang/R/Rep-string b/Lang/R/Rep-string deleted file mode 120000 index 6f2483d2e5..0000000000 --- a/Lang/R/Rep-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rep-string/R \ No newline at end of file diff --git a/Lang/R/Repunit-primes b/Lang/R/Repunit-primes deleted file mode 120000 index 9ae6100164..0000000000 --- a/Lang/R/Repunit-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repunit-primes/R \ No newline at end of file diff --git a/Lang/R/Retrieve-and-search-chat-history b/Lang/R/Retrieve-and-search-chat-history deleted file mode 120000 index 6f350b7b8c..0000000000 --- a/Lang/R/Retrieve-and-search-chat-history +++ /dev/null @@ -1 +0,0 @@ -../../Task/Retrieve-and-search-chat-history/R \ No newline at end of file diff --git a/Lang/R/Search-a-list-of-records b/Lang/R/Search-a-list-of-records deleted file mode 120000 index ee8b509a32..0000000000 --- a/Lang/R/Search-a-list-of-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list-of-records/R \ No newline at end of file diff --git a/Lang/R/Self-describing-numbers b/Lang/R/Self-describing-numbers deleted file mode 120000 index 3e9383f257..0000000000 --- a/Lang/R/Self-describing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Self-describing-numbers/R \ No newline at end of file diff --git a/Lang/R/Semordnilap b/Lang/R/Semordnilap deleted file mode 120000 index 8ef388caef..0000000000 --- a/Lang/R/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/R \ No newline at end of file diff --git a/Lang/R/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/R/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/R/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/R/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/R/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/R/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/R/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/R/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/R/Shoelace-formula-for-polygonal-area b/Lang/R/Shoelace-formula-for-polygonal-area deleted file mode 120000 index 8e6ea3fcc6..0000000000 --- a/Lang/R/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/R \ No newline at end of file diff --git a/Lang/R/Soloways-recurring-rainfall b/Lang/R/Soloways-recurring-rainfall deleted file mode 120000 index 33b1f84311..0000000000 --- a/Lang/R/Soloways-recurring-rainfall +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soloways-recurring-rainfall/R \ No newline at end of file diff --git a/Lang/R/Sort-numbers-lexicographically b/Lang/R/Sort-numbers-lexicographically deleted file mode 120000 index 77a76317d2..0000000000 --- a/Lang/R/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/R \ No newline at end of file diff --git a/Lang/R/Sorting-algorithms-Bead-sort b/Lang/R/Sorting-algorithms-Bead-sort deleted file mode 120000 index 4be00936ef..0000000000 --- a/Lang/R/Sorting-algorithms-Bead-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bead-sort/R \ No newline at end of file diff --git a/Lang/R/Sorting-algorithms-Patience-sort b/Lang/R/Sorting-algorithms-Patience-sort deleted file mode 120000 index bcaf3b078e..0000000000 --- a/Lang/R/Sorting-algorithms-Patience-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Patience-sort/R \ No newline at end of file diff --git a/Lang/R/Sorting-algorithms-Strand-sort b/Lang/R/Sorting-algorithms-Strand-sort deleted file mode 120000 index 80a612e755..0000000000 --- a/Lang/R/Sorting-algorithms-Strand-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Strand-sort/R \ No newline at end of file diff --git a/Lang/R/Spinning-rod-animation-Text b/Lang/R/Spinning-rod-animation-Text deleted file mode 120000 index 3083d1bb50..0000000000 --- a/Lang/R/Spinning-rod-animation-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spinning-rod-animation-Text/R \ No newline at end of file diff --git a/Lang/R/Split-a-character-string-based-on-change-of-character b/Lang/R/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 16a92812f1..0000000000 --- a/Lang/R/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/R \ No newline at end of file diff --git a/Lang/R/Square-free-integers b/Lang/R/Square-free-integers deleted file mode 120000 index a07b4300b5..0000000000 --- a/Lang/R/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/R \ No newline at end of file diff --git a/Lang/R/Start-from-a-main-routine b/Lang/R/Start-from-a-main-routine deleted file mode 120000 index 915851ff80..0000000000 --- a/Lang/R/Start-from-a-main-routine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Start-from-a-main-routine/R \ No newline at end of file diff --git a/Lang/R/Strassens-algorithm b/Lang/R/Strassens-algorithm deleted file mode 120000 index e4aa0075a9..0000000000 --- a/Lang/R/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/R \ No newline at end of file diff --git a/Lang/R/String-interpolation-included- b/Lang/R/String-interpolation-included- deleted file mode 120000 index f311002546..0000000000 --- a/Lang/R/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/R \ No newline at end of file diff --git a/Lang/R/String-matching b/Lang/R/String-matching deleted file mode 120000 index 2461134ac0..0000000000 --- a/Lang/R/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/R \ No newline at end of file diff --git a/Lang/R/Strip-a-set-of-characters-from-a-string b/Lang/R/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index b83d60c994..0000000000 --- a/Lang/R/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/R \ No newline at end of file diff --git a/Lang/R/Strip-block-comments b/Lang/R/Strip-block-comments deleted file mode 120000 index 17c55383a8..0000000000 --- a/Lang/R/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/R \ No newline at end of file diff --git a/Lang/R/Substitution-cipher b/Lang/R/Substitution-cipher deleted file mode 120000 index ce3c7f1ac2..0000000000 --- a/Lang/R/Substitution-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substitution-cipher/R \ No newline at end of file diff --git a/Lang/R/Substring-Top-and-tail b/Lang/R/Substring-Top-and-tail deleted file mode 120000 index 271cd3b15f..0000000000 --- a/Lang/R/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/R \ No newline at end of file diff --git a/Lang/R/Superellipse b/Lang/R/Superellipse deleted file mode 120000 index 3b8dc95f89..0000000000 --- a/Lang/R/Superellipse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Superellipse/R \ No newline at end of file diff --git a/Lang/R/Sylvesters-sequence b/Lang/R/Sylvesters-sequence deleted file mode 120000 index 29d289c6ff..0000000000 --- a/Lang/R/Sylvesters-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sylvesters-sequence/R \ No newline at end of file diff --git a/Lang/R/Textonyms b/Lang/R/Textonyms deleted file mode 120000 index a6ba4b7c41..0000000000 --- a/Lang/R/Textonyms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Textonyms/R \ No newline at end of file diff --git a/Lang/R/The-Name-Game b/Lang/R/The-Name-Game deleted file mode 120000 index a5e981bf52..0000000000 --- a/Lang/R/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/R \ No newline at end of file diff --git a/Lang/R/Tonelli-Shanks-algorithm b/Lang/R/Tonelli-Shanks-algorithm deleted file mode 120000 index 2ad48c9cd5..0000000000 --- a/Lang/R/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/R \ No newline at end of file diff --git a/Lang/R/Transliterate-English-text-using-the-Greek-alphabet b/Lang/R/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index 0b8d7b7463..0000000000 --- a/Lang/R/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/R \ No newline at end of file diff --git a/Lang/R/Twelve-statements b/Lang/R/Twelve-statements deleted file mode 120000 index 89536cfc68..0000000000 --- a/Lang/R/Twelve-statements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twelve-statements/R \ No newline at end of file diff --git a/Lang/R/Van-der-Corput-sequence b/Lang/R/Van-der-Corput-sequence deleted file mode 120000 index 66a8a345d5..0000000000 --- a/Lang/R/Van-der-Corput-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-der-Corput-sequence/R \ No newline at end of file diff --git a/Lang/R/Variable-declaration-reset b/Lang/R/Variable-declaration-reset deleted file mode 120000 index d5c07caba9..0000000000 --- a/Lang/R/Variable-declaration-reset +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-declaration-reset/R \ No newline at end of file diff --git a/Lang/R/Vector b/Lang/R/Vector deleted file mode 120000 index 3d5cfd297c..0000000000 --- a/Lang/R/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/R \ No newline at end of file diff --git a/Lang/R/Verhoeff-algorithm b/Lang/R/Verhoeff-algorithm deleted file mode 120000 index 2838835d10..0000000000 --- a/Lang/R/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/R \ No newline at end of file diff --git a/Lang/R/Wieferich-primes b/Lang/R/Wieferich-primes deleted file mode 120000 index 1c103bdf36..0000000000 --- a/Lang/R/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/R \ No newline at end of file diff --git a/Lang/R/Wilson-primes-of-order-n b/Lang/R/Wilson-primes-of-order-n deleted file mode 120000 index 0638b273a2..0000000000 --- a/Lang/R/Wilson-primes-of-order-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wilson-primes-of-order-n/R \ No newline at end of file diff --git a/Lang/R/Write-entire-file b/Lang/R/Write-entire-file deleted file mode 120000 index 2972bb07fe..0000000000 --- a/Lang/R/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/R \ No newline at end of file diff --git a/Lang/REBOL/00-LANG.txt b/Lang/REBOL/00-LANG.txt new file mode 100644 index 0000000000..0117c8198c --- /dev/null +++ b/Lang/REBOL/00-LANG.txt @@ -0,0 +1,3 @@ +{{stub}}{{language|REBOL +|site=http://rebol.com}} +REBOL stands for Relative Expression Based Object Language. \ No newline at end of file diff --git a/Lang/REBOL/00-META.yaml b/Lang/REBOL/00-META.yaml new file mode 100644 index 0000000000..58070bb517 --- /dev/null +++ b/Lang/REBOL/00-META.yaml @@ -0,0 +1,2 @@ +--- +from: http://rosettacode.org/wiki/Category:REBOL diff --git a/Lang/REBOL/100-doors b/Lang/REBOL/100-doors new file mode 120000 index 0000000000..3c604849c4 --- /dev/null +++ b/Lang/REBOL/100-doors @@ -0,0 +1 @@ +../../Task/100-doors/REBOL \ No newline at end of file diff --git a/Lang/REBOL/15-puzzle-game b/Lang/REBOL/15-puzzle-game new file mode 120000 index 0000000000..ca19266202 --- /dev/null +++ b/Lang/REBOL/15-puzzle-game @@ -0,0 +1 @@ +../../Task/15-puzzle-game/REBOL \ No newline at end of file diff --git a/Lang/REBOL/99-bottles-of-beer b/Lang/REBOL/99-bottles-of-beer new file mode 120000 index 0000000000..464d38e243 --- /dev/null +++ b/Lang/REBOL/99-bottles-of-beer @@ -0,0 +1 @@ +../../Task/99-bottles-of-beer/REBOL \ No newline at end of file diff --git a/Lang/REBOL/A+B b/Lang/REBOL/A+B new file mode 120000 index 0000000000..a6531c3ec1 --- /dev/null +++ b/Lang/REBOL/A+B @@ -0,0 +1 @@ +../../Task/A+B/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Abstract-type b/Lang/REBOL/Abstract-type new file mode 120000 index 0000000000..c01205f584 --- /dev/null +++ b/Lang/REBOL/Abstract-type @@ -0,0 +1 @@ +../../Task/Abstract-type/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Accumulator-factory b/Lang/REBOL/Accumulator-factory new file mode 120000 index 0000000000..9f94ac82f1 --- /dev/null +++ b/Lang/REBOL/Accumulator-factory @@ -0,0 +1 @@ +../../Task/Accumulator-factory/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Add-a-variable-to-a-class-instance-at-runtime b/Lang/REBOL/Add-a-variable-to-a-class-instance-at-runtime new file mode 120000 index 0000000000..901f7e7487 --- /dev/null +++ b/Lang/REBOL/Add-a-variable-to-a-class-instance-at-runtime @@ -0,0 +1 @@ +../../Task/Add-a-variable-to-a-class-instance-at-runtime/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Align-columns b/Lang/REBOL/Align-columns new file mode 120000 index 0000000000..67ffa18d54 --- /dev/null +++ b/Lang/REBOL/Align-columns @@ -0,0 +1 @@ +../../Task/Align-columns/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Amicable-pairs b/Lang/REBOL/Amicable-pairs new file mode 120000 index 0000000000..238ed42eb6 --- /dev/null +++ b/Lang/REBOL/Amicable-pairs @@ -0,0 +1 @@ +../../Task/Amicable-pairs/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Animation b/Lang/REBOL/Animation new file mode 120000 index 0000000000..0fccfbad33 --- /dev/null +++ b/Lang/REBOL/Animation @@ -0,0 +1 @@ +../../Task/Animation/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Anonymous-recursion b/Lang/REBOL/Anonymous-recursion new file mode 120000 index 0000000000..5c9e13cbb0 --- /dev/null +++ b/Lang/REBOL/Anonymous-recursion @@ -0,0 +1 @@ +../../Task/Anonymous-recursion/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Apply-a-callback-to-an-array b/Lang/REBOL/Apply-a-callback-to-an-array new file mode 120000 index 0000000000..a9a331e92d --- /dev/null +++ b/Lang/REBOL/Apply-a-callback-to-an-array @@ -0,0 +1 @@ +../../Task/Apply-a-callback-to-an-array/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Arithmetic-Integer b/Lang/REBOL/Arithmetic-Integer new file mode 120000 index 0000000000..acafb7724e --- /dev/null +++ b/Lang/REBOL/Arithmetic-Integer @@ -0,0 +1 @@ +../../Task/Arithmetic-Integer/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Array-concatenation b/Lang/REBOL/Array-concatenation new file mode 120000 index 0000000000..679c10ed62 --- /dev/null +++ b/Lang/REBOL/Array-concatenation @@ -0,0 +1 @@ +../../Task/Array-concatenation/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Array-length b/Lang/REBOL/Array-length new file mode 120000 index 0000000000..d083adde64 --- /dev/null +++ b/Lang/REBOL/Array-length @@ -0,0 +1 @@ +../../Task/Array-length/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Arrays b/Lang/REBOL/Arrays new file mode 120000 index 0000000000..9fc95551ee --- /dev/null +++ b/Lang/REBOL/Arrays @@ -0,0 +1 @@ +../../Task/Arrays/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Averages-Arithmetic-mean b/Lang/REBOL/Averages-Arithmetic-mean new file mode 120000 index 0000000000..de8cb5e395 --- /dev/null +++ b/Lang/REBOL/Averages-Arithmetic-mean @@ -0,0 +1 @@ +../../Task/Averages-Arithmetic-mean/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Averages-Median b/Lang/REBOL/Averages-Median new file mode 120000 index 0000000000..96ef2cd694 --- /dev/null +++ b/Lang/REBOL/Averages-Median @@ -0,0 +1 @@ +../../Task/Averages-Median/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Calendar b/Lang/REBOL/Calendar new file mode 120000 index 0000000000..f396941538 --- /dev/null +++ b/Lang/REBOL/Calendar @@ -0,0 +1 @@ +../../Task/Calendar/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Check-that-file-exists b/Lang/REBOL/Check-that-file-exists new file mode 120000 index 0000000000..70f5435458 --- /dev/null +++ b/Lang/REBOL/Check-that-file-exists @@ -0,0 +1 @@ +../../Task/Check-that-file-exists/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Classes b/Lang/REBOL/Classes new file mode 120000 index 0000000000..f823823847 --- /dev/null +++ b/Lang/REBOL/Classes @@ -0,0 +1 @@ +../../Task/Classes/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Comma-quibbling b/Lang/REBOL/Comma-quibbling new file mode 120000 index 0000000000..b2f7530541 --- /dev/null +++ b/Lang/REBOL/Comma-quibbling @@ -0,0 +1 @@ +../../Task/Comma-quibbling/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Comments b/Lang/REBOL/Comments new file mode 120000 index 0000000000..2dad54191c --- /dev/null +++ b/Lang/REBOL/Comments @@ -0,0 +1 @@ +../../Task/Comments/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Copy-a-string b/Lang/REBOL/Copy-a-string new file mode 120000 index 0000000000..8babad9959 --- /dev/null +++ b/Lang/REBOL/Copy-a-string @@ -0,0 +1 @@ +../../Task/Copy-a-string/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Create-a-file b/Lang/REBOL/Create-a-file new file mode 120000 index 0000000000..3089537d01 --- /dev/null +++ b/Lang/REBOL/Create-a-file @@ -0,0 +1 @@ +../../Task/Create-a-file/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Date-format b/Lang/REBOL/Date-format new file mode 120000 index 0000000000..33ce065e87 --- /dev/null +++ b/Lang/REBOL/Date-format @@ -0,0 +1 @@ +../../Task/Date-format/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Date-manipulation b/Lang/REBOL/Date-manipulation new file mode 120000 index 0000000000..2722a008ce --- /dev/null +++ b/Lang/REBOL/Date-manipulation @@ -0,0 +1 @@ +../../Task/Date-manipulation/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Day-of-the-week b/Lang/REBOL/Day-of-the-week new file mode 120000 index 0000000000..82d7509a60 --- /dev/null +++ b/Lang/REBOL/Day-of-the-week @@ -0,0 +1 @@ +../../Task/Day-of-the-week/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Delete-a-file b/Lang/REBOL/Delete-a-file new file mode 120000 index 0000000000..66f14845d7 --- /dev/null +++ b/Lang/REBOL/Delete-a-file @@ -0,0 +1 @@ +../../Task/Delete-a-file/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Detect-division-by-zero b/Lang/REBOL/Detect-division-by-zero new file mode 120000 index 0000000000..b0ccafd718 --- /dev/null +++ b/Lang/REBOL/Detect-division-by-zero @@ -0,0 +1 @@ +../../Task/Detect-division-by-zero/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Determine-if-a-string-is-numeric b/Lang/REBOL/Determine-if-a-string-is-numeric new file mode 120000 index 0000000000..045a0ae13f --- /dev/null +++ b/Lang/REBOL/Determine-if-a-string-is-numeric @@ -0,0 +1 @@ +../../Task/Determine-if-a-string-is-numeric/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Documentation b/Lang/REBOL/Documentation new file mode 120000 index 0000000000..daa69740d8 --- /dev/null +++ b/Lang/REBOL/Documentation @@ -0,0 +1 @@ +../../Task/Documentation/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Dot-product b/Lang/REBOL/Dot-product new file mode 120000 index 0000000000..0e405ceca0 --- /dev/null +++ b/Lang/REBOL/Dot-product @@ -0,0 +1 @@ +../../Task/Dot-product/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Dynamic-variable-names b/Lang/REBOL/Dynamic-variable-names new file mode 120000 index 0000000000..dc26f8842e --- /dev/null +++ b/Lang/REBOL/Dynamic-variable-names @@ -0,0 +1 @@ +../../Task/Dynamic-variable-names/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Echo-server b/Lang/REBOL/Echo-server new file mode 120000 index 0000000000..e5f15ce096 --- /dev/null +++ b/Lang/REBOL/Echo-server @@ -0,0 +1 @@ +../../Task/Echo-server/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Empty-program b/Lang/REBOL/Empty-program new file mode 120000 index 0000000000..15b162acc2 --- /dev/null +++ b/Lang/REBOL/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Environment-variables b/Lang/REBOL/Environment-variables new file mode 120000 index 0000000000..1742700711 --- /dev/null +++ b/Lang/REBOL/Environment-variables @@ -0,0 +1 @@ +../../Task/Environment-variables/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Execute-Brain- b/Lang/REBOL/Execute-Brain- new file mode 120000 index 0000000000..5d49896311 --- /dev/null +++ b/Lang/REBOL/Execute-Brain- @@ -0,0 +1 @@ +../../Task/Execute-Brain-/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Execute-a-system-command b/Lang/REBOL/Execute-a-system-command new file mode 120000 index 0000000000..6177e36583 --- /dev/null +++ b/Lang/REBOL/Execute-a-system-command @@ -0,0 +1 @@ +../../Task/Execute-a-system-command/REBOL \ No newline at end of file diff --git a/Lang/REBOL/FTP b/Lang/REBOL/FTP new file mode 120000 index 0000000000..7ab1c53c58 --- /dev/null +++ b/Lang/REBOL/FTP @@ -0,0 +1 @@ +../../Task/FTP/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Factorial b/Lang/REBOL/Factorial new file mode 120000 index 0000000000..8643656c0a --- /dev/null +++ b/Lang/REBOL/Factorial @@ -0,0 +1 @@ +../../Task/Factorial/REBOL \ No newline at end of file diff --git a/Lang/REBOL/File-input-output b/Lang/REBOL/File-input-output new file mode 120000 index 0000000000..30e510fb5d --- /dev/null +++ b/Lang/REBOL/File-input-output @@ -0,0 +1 @@ +../../Task/File-input-output/REBOL \ No newline at end of file diff --git a/Lang/REBOL/File-size b/Lang/REBOL/File-size new file mode 120000 index 0000000000..61c4252f32 --- /dev/null +++ b/Lang/REBOL/File-size @@ -0,0 +1 @@ +../../Task/File-size/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Filter b/Lang/REBOL/Filter new file mode 120000 index 0000000000..d25c807398 --- /dev/null +++ b/Lang/REBOL/Filter @@ -0,0 +1 @@ +../../Task/Filter/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Find-the-last-Sunday-of-each-month b/Lang/REBOL/Find-the-last-Sunday-of-each-month new file mode 120000 index 0000000000..c54d330170 --- /dev/null +++ b/Lang/REBOL/Find-the-last-Sunday-of-each-month @@ -0,0 +1 @@ +../../Task/Find-the-last-Sunday-of-each-month/REBOL \ No newline at end of file diff --git a/Lang/REBOL/First-class-functions b/Lang/REBOL/First-class-functions new file mode 120000 index 0000000000..729d2ef773 --- /dev/null +++ b/Lang/REBOL/First-class-functions @@ -0,0 +1 @@ +../../Task/First-class-functions/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Fixed-length-records b/Lang/REBOL/Fixed-length-records new file mode 120000 index 0000000000..c6d6d1ea72 --- /dev/null +++ b/Lang/REBOL/Fixed-length-records @@ -0,0 +1 @@ +../../Task/Fixed-length-records/REBOL \ No newline at end of file diff --git a/Lang/REBOL/FizzBuzz b/Lang/REBOL/FizzBuzz new file mode 120000 index 0000000000..5fada5dc79 --- /dev/null +++ b/Lang/REBOL/FizzBuzz @@ -0,0 +1 @@ +../../Task/FizzBuzz/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Flatten-a-list b/Lang/REBOL/Flatten-a-list new file mode 120000 index 0000000000..c63e60f1ae --- /dev/null +++ b/Lang/REBOL/Flatten-a-list @@ -0,0 +1 @@ +../../Task/Flatten-a-list/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Flow-control-structures b/Lang/REBOL/Flow-control-structures new file mode 120000 index 0000000000..02978f970b --- /dev/null +++ b/Lang/REBOL/Flow-control-structures @@ -0,0 +1 @@ +../../Task/Flow-control-structures/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Formatted-numeric-output b/Lang/REBOL/Formatted-numeric-output new file mode 120000 index 0000000000..6231201b56 --- /dev/null +++ b/Lang/REBOL/Formatted-numeric-output @@ -0,0 +1 @@ +../../Task/Formatted-numeric-output/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Function-composition b/Lang/REBOL/Function-composition new file mode 120000 index 0000000000..00fbef410f --- /dev/null +++ b/Lang/REBOL/Function-composition @@ -0,0 +1 @@ +../../Task/Function-composition/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Function-definition b/Lang/REBOL/Function-definition new file mode 120000 index 0000000000..24045b17c8 --- /dev/null +++ b/Lang/REBOL/Function-definition @@ -0,0 +1 @@ +../../Task/Function-definition/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Generic-swap b/Lang/REBOL/Generic-swap new file mode 120000 index 0000000000..252d05095f --- /dev/null +++ b/Lang/REBOL/Generic-swap @@ -0,0 +1 @@ +../../Task/Generic-swap/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Greatest-common-divisor b/Lang/REBOL/Greatest-common-divisor new file mode 120000 index 0000000000..66251fda3d --- /dev/null +++ b/Lang/REBOL/Greatest-common-divisor @@ -0,0 +1 @@ +../../Task/Greatest-common-divisor/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Greatest-element-of-a-list b/Lang/REBOL/Greatest-element-of-a-list new file mode 120000 index 0000000000..bf835b648c --- /dev/null +++ b/Lang/REBOL/Greatest-element-of-a-list @@ -0,0 +1 @@ +../../Task/Greatest-element-of-a-list/REBOL \ No newline at end of file diff --git a/Lang/REBOL/HTTP b/Lang/REBOL/HTTP new file mode 120000 index 0000000000..7ade844f73 --- /dev/null +++ b/Lang/REBOL/HTTP @@ -0,0 +1 @@ +../../Task/HTTP/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Hailstone-sequence b/Lang/REBOL/Hailstone-sequence new file mode 120000 index 0000000000..f668d98fe0 --- /dev/null +++ b/Lang/REBOL/Hailstone-sequence @@ -0,0 +1 @@ +../../Task/Hailstone-sequence/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Hello-world-Graphical b/Lang/REBOL/Hello-world-Graphical new file mode 120000 index 0000000000..65375f6063 --- /dev/null +++ b/Lang/REBOL/Hello-world-Graphical @@ -0,0 +1 @@ +../../Task/Hello-world-Graphical/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Hello-world-Newline-omission b/Lang/REBOL/Hello-world-Newline-omission new file mode 120000 index 0000000000..a1ab230770 --- /dev/null +++ b/Lang/REBOL/Hello-world-Newline-omission @@ -0,0 +1 @@ +../../Task/Hello-world-Newline-omission/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Hello-world-Text b/Lang/REBOL/Hello-world-Text new file mode 120000 index 0000000000..417f675e90 --- /dev/null +++ b/Lang/REBOL/Hello-world-Text @@ -0,0 +1 @@ +../../Task/Hello-world-Text/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Higher-order-functions b/Lang/REBOL/Higher-order-functions new file mode 120000 index 0000000000..e0da7764d4 --- /dev/null +++ b/Lang/REBOL/Higher-order-functions @@ -0,0 +1 @@ +../../Task/Higher-order-functions/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Horners-rule-for-polynomial-evaluation b/Lang/REBOL/Horners-rule-for-polynomial-evaluation new file mode 120000 index 0000000000..3ed4d272a6 --- /dev/null +++ b/Lang/REBOL/Horners-rule-for-polynomial-evaluation @@ -0,0 +1 @@ +../../Task/Horners-rule-for-polynomial-evaluation/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Hostname b/Lang/REBOL/Hostname new file mode 120000 index 0000000000..00509fe88c --- /dev/null +++ b/Lang/REBOL/Hostname @@ -0,0 +1 @@ +../../Task/Hostname/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Increment-a-numerical-string b/Lang/REBOL/Increment-a-numerical-string new file mode 120000 index 0000000000..0b8ae5b473 --- /dev/null +++ b/Lang/REBOL/Increment-a-numerical-string @@ -0,0 +1 @@ +../../Task/Increment-a-numerical-string/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Inheritance-Single b/Lang/REBOL/Inheritance-Single new file mode 120000 index 0000000000..8790c38450 --- /dev/null +++ b/Lang/REBOL/Inheritance-Single @@ -0,0 +1 @@ +../../Task/Inheritance-Single/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Input-loop b/Lang/REBOL/Input-loop new file mode 120000 index 0000000000..81d9914a81 --- /dev/null +++ b/Lang/REBOL/Input-loop @@ -0,0 +1 @@ +../../Task/Input-loop/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Integer-comparison b/Lang/REBOL/Integer-comparison new file mode 120000 index 0000000000..6f12d33801 --- /dev/null +++ b/Lang/REBOL/Integer-comparison @@ -0,0 +1 @@ +../../Task/Integer-comparison/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Interactive-programming-repl- b/Lang/REBOL/Interactive-programming-repl- new file mode 120000 index 0000000000..a2a59ee516 --- /dev/null +++ b/Lang/REBOL/Interactive-programming-repl- @@ -0,0 +1 @@ +../../Task/Interactive-programming-repl-/REBOL \ No newline at end of file diff --git a/Lang/REBOL/JSON b/Lang/REBOL/JSON new file mode 120000 index 0000000000..bbdd962074 --- /dev/null +++ b/Lang/REBOL/JSON @@ -0,0 +1 @@ +../../Task/JSON/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Josephus-problem b/Lang/REBOL/Josephus-problem new file mode 120000 index 0000000000..d092745290 --- /dev/null +++ b/Lang/REBOL/Josephus-problem @@ -0,0 +1 @@ +../../Task/Josephus-problem/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Keyboard-macros b/Lang/REBOL/Keyboard-macros new file mode 120000 index 0000000000..4c918106f7 --- /dev/null +++ b/Lang/REBOL/Keyboard-macros @@ -0,0 +1 @@ +../../Task/Keyboard-macros/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Knuth-shuffle b/Lang/REBOL/Knuth-shuffle new file mode 120000 index 0000000000..e1ef5ac835 --- /dev/null +++ b/Lang/REBOL/Knuth-shuffle @@ -0,0 +1 @@ +../../Task/Knuth-shuffle/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Last-Friday-of-each-month b/Lang/REBOL/Last-Friday-of-each-month new file mode 120000 index 0000000000..592b3befd7 --- /dev/null +++ b/Lang/REBOL/Last-Friday-of-each-month @@ -0,0 +1 @@ +../../Task/Last-Friday-of-each-month/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Leap-year b/Lang/REBOL/Leap-year new file mode 120000 index 0000000000..e1fde0d2a0 --- /dev/null +++ b/Lang/REBOL/Leap-year @@ -0,0 +1 @@ +../../Task/Leap-year/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Literals-Integer b/Lang/REBOL/Literals-Integer new file mode 120000 index 0000000000..c018808d2d --- /dev/null +++ b/Lang/REBOL/Literals-Integer @@ -0,0 +1 @@ +../../Task/Literals-Integer/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Logical-operations b/Lang/REBOL/Logical-operations new file mode 120000 index 0000000000..b2be03cb20 --- /dev/null +++ b/Lang/REBOL/Logical-operations @@ -0,0 +1 @@ +../../Task/Logical-operations/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-Break b/Lang/REBOL/Loops-Break new file mode 120000 index 0000000000..b12b588bcd --- /dev/null +++ b/Lang/REBOL/Loops-Break @@ -0,0 +1 @@ +../../Task/Loops-Break/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-Continue b/Lang/REBOL/Loops-Continue new file mode 120000 index 0000000000..620f8d42c2 --- /dev/null +++ b/Lang/REBOL/Loops-Continue @@ -0,0 +1 @@ +../../Task/Loops-Continue/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-Do-while b/Lang/REBOL/Loops-Do-while new file mode 120000 index 0000000000..a092621ef7 --- /dev/null +++ b/Lang/REBOL/Loops-Do-while @@ -0,0 +1 @@ +../../Task/Loops-Do-while/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-Downward-for b/Lang/REBOL/Loops-Downward-for new file mode 120000 index 0000000000..e956288e68 --- /dev/null +++ b/Lang/REBOL/Loops-Downward-for @@ -0,0 +1 @@ +../../Task/Loops-Downward-for/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-For b/Lang/REBOL/Loops-For new file mode 120000 index 0000000000..9c59f991f0 --- /dev/null +++ b/Lang/REBOL/Loops-For @@ -0,0 +1 @@ +../../Task/Loops-For/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-For-with-a-specified-step b/Lang/REBOL/Loops-For-with-a-specified-step new file mode 120000 index 0000000000..3174e4899e --- /dev/null +++ b/Lang/REBOL/Loops-For-with-a-specified-step @@ -0,0 +1 @@ +../../Task/Loops-For-with-a-specified-step/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-Foreach b/Lang/REBOL/Loops-Foreach new file mode 120000 index 0000000000..98cc61392e --- /dev/null +++ b/Lang/REBOL/Loops-Foreach @@ -0,0 +1 @@ +../../Task/Loops-Foreach/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-Infinite b/Lang/REBOL/Loops-Infinite new file mode 120000 index 0000000000..cd80f1fc2f --- /dev/null +++ b/Lang/REBOL/Loops-Infinite @@ -0,0 +1 @@ +../../Task/Loops-Infinite/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-N-plus-one-half b/Lang/REBOL/Loops-N-plus-one-half new file mode 120000 index 0000000000..530a004b19 --- /dev/null +++ b/Lang/REBOL/Loops-N-plus-one-half @@ -0,0 +1 @@ +../../Task/Loops-N-plus-one-half/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-Nested b/Lang/REBOL/Loops-Nested new file mode 120000 index 0000000000..fad704e1b5 --- /dev/null +++ b/Lang/REBOL/Loops-Nested @@ -0,0 +1 @@ +../../Task/Loops-Nested/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Loops-While b/Lang/REBOL/Loops-While new file mode 120000 index 0000000000..7caecdb43d --- /dev/null +++ b/Lang/REBOL/Loops-While @@ -0,0 +1 @@ +../../Task/Loops-While/REBOL \ No newline at end of file diff --git a/Lang/REBOL/MD5 b/Lang/REBOL/MD5 new file mode 120000 index 0000000000..5cb019110c --- /dev/null +++ b/Lang/REBOL/MD5 @@ -0,0 +1 @@ +../../Task/MD5/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Mad-Libs b/Lang/REBOL/Mad-Libs new file mode 120000 index 0000000000..db4b8d6171 --- /dev/null +++ b/Lang/REBOL/Mad-Libs @@ -0,0 +1 @@ +../../Task/Mad-Libs/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Menu b/Lang/REBOL/Menu new file mode 120000 index 0000000000..3b0b7dc2de --- /dev/null +++ b/Lang/REBOL/Menu @@ -0,0 +1 @@ +../../Task/Menu/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Multiplication-tables b/Lang/REBOL/Multiplication-tables new file mode 120000 index 0000000000..1b70d39ee9 --- /dev/null +++ b/Lang/REBOL/Multiplication-tables @@ -0,0 +1 @@ +../../Task/Multiplication-tables/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Mutual-recursion b/Lang/REBOL/Mutual-recursion new file mode 120000 index 0000000000..cb2de22d29 --- /dev/null +++ b/Lang/REBOL/Mutual-recursion @@ -0,0 +1 @@ +../../Task/Mutual-recursion/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Null-object b/Lang/REBOL/Null-object new file mode 120000 index 0000000000..0b324069d2 --- /dev/null +++ b/Lang/REBOL/Null-object @@ -0,0 +1 @@ +../../Task/Null-object/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Number-reversal-game b/Lang/REBOL/Number-reversal-game new file mode 120000 index 0000000000..a23e4203b5 --- /dev/null +++ b/Lang/REBOL/Number-reversal-game @@ -0,0 +1 @@ +../../Task/Number-reversal-game/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Palindrome-detection b/Lang/REBOL/Palindrome-detection new file mode 120000 index 0000000000..45e3490dd4 --- /dev/null +++ b/Lang/REBOL/Palindrome-detection @@ -0,0 +1 @@ +../../Task/Palindrome-detection/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Percentage-difference-between-images b/Lang/REBOL/Percentage-difference-between-images new file mode 120000 index 0000000000..47e0c29027 --- /dev/null +++ b/Lang/REBOL/Percentage-difference-between-images @@ -0,0 +1 @@ +../../Task/Percentage-difference-between-images/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Perfect-numbers b/Lang/REBOL/Perfect-numbers new file mode 120000 index 0000000000..888589d0dd --- /dev/null +++ b/Lang/REBOL/Perfect-numbers @@ -0,0 +1 @@ +../../Task/Perfect-numbers/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Primality-by-trial-division b/Lang/REBOL/Primality-by-trial-division new file mode 120000 index 0000000000..6e14471054 --- /dev/null +++ b/Lang/REBOL/Primality-by-trial-division @@ -0,0 +1 @@ +../../Task/Primality-by-trial-division/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Program-termination b/Lang/REBOL/Program-termination new file mode 120000 index 0000000000..7c4ce8b3c8 --- /dev/null +++ b/Lang/REBOL/Program-termination @@ -0,0 +1 @@ +../../Task/Program-termination/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Queue-Definition b/Lang/REBOL/Queue-Definition new file mode 120000 index 0000000000..aa21697e36 --- /dev/null +++ b/Lang/REBOL/Queue-Definition @@ -0,0 +1 @@ +../../Task/Queue-Definition/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Queue-Usage b/Lang/REBOL/Queue-Usage new file mode 120000 index 0000000000..488c4682f8 --- /dev/null +++ b/Lang/REBOL/Queue-Usage @@ -0,0 +1 @@ +../../Task/Queue-Usage/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Quine b/Lang/REBOL/Quine new file mode 120000 index 0000000000..391f27dc9c --- /dev/null +++ b/Lang/REBOL/Quine @@ -0,0 +1 @@ +../../Task/Quine/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Read-a-specific-line-from-a-file b/Lang/REBOL/Read-a-specific-line-from-a-file new file mode 120000 index 0000000000..fc3cb7c086 --- /dev/null +++ b/Lang/REBOL/Read-a-specific-line-from-a-file @@ -0,0 +1 @@ +../../Task/Read-a-specific-line-from-a-file/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Read-entire-file b/Lang/REBOL/Read-entire-file new file mode 120000 index 0000000000..8d1ffdb8c8 --- /dev/null +++ b/Lang/REBOL/Read-entire-file @@ -0,0 +1 @@ +../../Task/Read-entire-file/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Regular-expressions b/Lang/REBOL/Regular-expressions new file mode 120000 index 0000000000..cc056f3dfc --- /dev/null +++ b/Lang/REBOL/Regular-expressions @@ -0,0 +1 @@ +../../Task/Regular-expressions/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Remove-duplicate-elements b/Lang/REBOL/Remove-duplicate-elements new file mode 120000 index 0000000000..989597f93c --- /dev/null +++ b/Lang/REBOL/Remove-duplicate-elements @@ -0,0 +1 @@ +../../Task/Remove-duplicate-elements/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Rename-a-file b/Lang/REBOL/Rename-a-file new file mode 120000 index 0000000000..d5b1f76dba --- /dev/null +++ b/Lang/REBOL/Rename-a-file @@ -0,0 +1 @@ +../../Task/Rename-a-file/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Repeat-a-string b/Lang/REBOL/Repeat-a-string new file mode 120000 index 0000000000..df3bda003c --- /dev/null +++ b/Lang/REBOL/Repeat-a-string @@ -0,0 +1 @@ +../../Task/Repeat-a-string/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Reverse-a-string b/Lang/REBOL/Reverse-a-string new file mode 120000 index 0000000000..4fa66fa042 --- /dev/null +++ b/Lang/REBOL/Reverse-a-string @@ -0,0 +1 @@ +../../Task/Reverse-a-string/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Rot-13 b/Lang/REBOL/Rot-13 new file mode 120000 index 0000000000..344b9949b8 --- /dev/null +++ b/Lang/REBOL/Rot-13 @@ -0,0 +1 @@ +../../Task/Rot-13/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Runtime-evaluation b/Lang/REBOL/Runtime-evaluation new file mode 120000 index 0000000000..4f29a7904a --- /dev/null +++ b/Lang/REBOL/Runtime-evaluation @@ -0,0 +1 @@ +../../Task/Runtime-evaluation/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Runtime-evaluation-In-an-environment b/Lang/REBOL/Runtime-evaluation-In-an-environment new file mode 120000 index 0000000000..00ac88948d --- /dev/null +++ b/Lang/REBOL/Runtime-evaluation-In-an-environment @@ -0,0 +1 @@ +../../Task/Runtime-evaluation-In-an-environment/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Search-a-list b/Lang/REBOL/Search-a-list new file mode 120000 index 0000000000..30c4450829 --- /dev/null +++ b/Lang/REBOL/Search-a-list @@ -0,0 +1 @@ +../../Task/Search-a-list/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Send-email b/Lang/REBOL/Send-email new file mode 120000 index 0000000000..7a102c33ea --- /dev/null +++ b/Lang/REBOL/Send-email @@ -0,0 +1 @@ +../../Task/Send-email/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Shell-one-liner b/Lang/REBOL/Shell-one-liner new file mode 120000 index 0000000000..3efd76bee3 --- /dev/null +++ b/Lang/REBOL/Shell-one-liner @@ -0,0 +1 @@ +../../Task/Shell-one-liner/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Simple-database b/Lang/REBOL/Simple-database new file mode 120000 index 0000000000..2171f3e8b2 --- /dev/null +++ b/Lang/REBOL/Simple-database @@ -0,0 +1 @@ +../../Task/Simple-database/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Simple-windowed-application b/Lang/REBOL/Simple-windowed-application new file mode 120000 index 0000000000..3eb2f5011a --- /dev/null +++ b/Lang/REBOL/Simple-windowed-application @@ -0,0 +1 @@ +../../Task/Simple-windowed-application/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Sleep b/Lang/REBOL/Sleep new file mode 120000 index 0000000000..49498dee8f --- /dev/null +++ b/Lang/REBOL/Sleep @@ -0,0 +1 @@ +../../Task/Sleep/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Sort-an-integer-array b/Lang/REBOL/Sort-an-integer-array new file mode 120000 index 0000000000..be40906bd3 --- /dev/null +++ b/Lang/REBOL/Sort-an-integer-array @@ -0,0 +1 @@ +../../Task/Sort-an-integer-array/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Sort-stability b/Lang/REBOL/Sort-stability new file mode 120000 index 0000000000..7a6119bc4e --- /dev/null +++ b/Lang/REBOL/Sort-stability @@ -0,0 +1 @@ +../../Task/Sort-stability/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Sorting-algorithms-Insertion-sort b/Lang/REBOL/Sorting-algorithms-Insertion-sort new file mode 120000 index 0000000000..5a9f9f2f24 --- /dev/null +++ b/Lang/REBOL/Sorting-algorithms-Insertion-sort @@ -0,0 +1 @@ +../../Task/Sorting-algorithms-Insertion-sort/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Stack b/Lang/REBOL/Stack new file mode 120000 index 0000000000..70bb3936ee --- /dev/null +++ b/Lang/REBOL/Stack @@ -0,0 +1 @@ +../../Task/Stack/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Stair-climbing-puzzle b/Lang/REBOL/Stair-climbing-puzzle new file mode 120000 index 0000000000..935f1a3925 --- /dev/null +++ b/Lang/REBOL/Stair-climbing-puzzle @@ -0,0 +1 @@ +../../Task/Stair-climbing-puzzle/REBOL \ No newline at end of file diff --git a/Lang/REBOL/String-case b/Lang/REBOL/String-case new file mode 120000 index 0000000000..2279191d8d --- /dev/null +++ b/Lang/REBOL/String-case @@ -0,0 +1 @@ +../../Task/String-case/REBOL \ No newline at end of file diff --git a/Lang/REBOL/String-concatenation b/Lang/REBOL/String-concatenation new file mode 120000 index 0000000000..8be78ed69f --- /dev/null +++ b/Lang/REBOL/String-concatenation @@ -0,0 +1 @@ +../../Task/String-concatenation/REBOL \ No newline at end of file diff --git a/Lang/REBOL/String-interpolation-included- b/Lang/REBOL/String-interpolation-included- new file mode 120000 index 0000000000..1158cc37bc --- /dev/null +++ b/Lang/REBOL/String-interpolation-included- @@ -0,0 +1 @@ +../../Task/String-interpolation-included-/REBOL \ No newline at end of file diff --git a/Lang/REBOL/String-length b/Lang/REBOL/String-length new file mode 120000 index 0000000000..06c8f5cbd6 --- /dev/null +++ b/Lang/REBOL/String-length @@ -0,0 +1 @@ +../../Task/String-length/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Substring b/Lang/REBOL/Substring new file mode 120000 index 0000000000..ae87eb5a53 --- /dev/null +++ b/Lang/REBOL/Substring @@ -0,0 +1 @@ +../../Task/Substring/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Sum-and-product-of-an-array b/Lang/REBOL/Sum-and-product-of-an-array new file mode 120000 index 0000000000..5ce08d6535 --- /dev/null +++ b/Lang/REBOL/Sum-and-product-of-an-array @@ -0,0 +1 @@ +../../Task/Sum-and-product-of-an-array/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Symmetric-difference b/Lang/REBOL/Symmetric-difference new file mode 120000 index 0000000000..27c9c680ad --- /dev/null +++ b/Lang/REBOL/Symmetric-difference @@ -0,0 +1 @@ +../../Task/Symmetric-difference/REBOL \ No newline at end of file diff --git a/Lang/REBOL/System-time b/Lang/REBOL/System-time new file mode 120000 index 0000000000..7ea31d4a27 --- /dev/null +++ b/Lang/REBOL/System-time @@ -0,0 +1 @@ +../../Task/System-time/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Take-notes-on-the-command-line b/Lang/REBOL/Take-notes-on-the-command-line new file mode 120000 index 0000000000..f00a0f5d0a --- /dev/null +++ b/Lang/REBOL/Take-notes-on-the-command-line @@ -0,0 +1 @@ +../../Task/Take-notes-on-the-command-line/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Tokenize-a-string b/Lang/REBOL/Tokenize-a-string new file mode 120000 index 0000000000..ee10fb0551 --- /dev/null +++ b/Lang/REBOL/Tokenize-a-string @@ -0,0 +1 @@ +../../Task/Tokenize-a-string/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Towers-of-Hanoi b/Lang/REBOL/Towers-of-Hanoi new file mode 120000 index 0000000000..a173272546 --- /dev/null +++ b/Lang/REBOL/Towers-of-Hanoi @@ -0,0 +1 @@ +../../Task/Towers-of-Hanoi/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Tree-traversal b/Lang/REBOL/Tree-traversal new file mode 120000 index 0000000000..0c44bbca9b --- /dev/null +++ b/Lang/REBOL/Tree-traversal @@ -0,0 +1 @@ +../../Task/Tree-traversal/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Trigonometric-functions b/Lang/REBOL/Trigonometric-functions new file mode 120000 index 0000000000..8f4c11188c --- /dev/null +++ b/Lang/REBOL/Trigonometric-functions @@ -0,0 +1 @@ +../../Task/Trigonometric-functions/REBOL \ No newline at end of file diff --git a/Lang/REBOL/User-input-Graphical b/Lang/REBOL/User-input-Graphical new file mode 120000 index 0000000000..001538e055 --- /dev/null +++ b/Lang/REBOL/User-input-Graphical @@ -0,0 +1 @@ +../../Task/User-input-Graphical/REBOL \ No newline at end of file diff --git a/Lang/REBOL/User-input-Text b/Lang/REBOL/User-input-Text new file mode 120000 index 0000000000..b81fcf9c85 --- /dev/null +++ b/Lang/REBOL/User-input-Text @@ -0,0 +1 @@ +../../Task/User-input-Text/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Variadic-function b/Lang/REBOL/Variadic-function new file mode 120000 index 0000000000..c3eb7c285d --- /dev/null +++ b/Lang/REBOL/Variadic-function @@ -0,0 +1 @@ +../../Task/Variadic-function/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Web-scraping b/Lang/REBOL/Web-scraping new file mode 120000 index 0000000000..4c37db2bfe --- /dev/null +++ b/Lang/REBOL/Web-scraping @@ -0,0 +1 @@ +../../Task/Web-scraping/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Window-creation b/Lang/REBOL/Window-creation new file mode 120000 index 0000000000..d3c3450624 --- /dev/null +++ b/Lang/REBOL/Window-creation @@ -0,0 +1 @@ +../../Task/Window-creation/REBOL \ No newline at end of file diff --git a/Lang/REBOL/XML-Input b/Lang/REBOL/XML-Input new file mode 120000 index 0000000000..f96cb4fd5e --- /dev/null +++ b/Lang/REBOL/XML-Input @@ -0,0 +1 @@ +../../Task/XML-Input/REBOL \ No newline at end of file diff --git a/Lang/REBOL/Y-combinator b/Lang/REBOL/Y-combinator new file mode 120000 index 0000000000..492c58627d --- /dev/null +++ b/Lang/REBOL/Y-combinator @@ -0,0 +1 @@ +../../Task/Y-combinator/REBOL \ No newline at end of file diff --git a/Lang/REXX/00-LANG.txt b/Lang/REXX/00-LANG.txt index 592349f719..26a483d9aa 100644 --- a/Lang/REXX/00-LANG.txt +++ b/Lang/REXX/00-LANG.txt @@ -26,21 +26,6 @@ The '''REXX''' language was influenced by the computer programming languages:   '''ALGOL,   PL/I,   EXEC,'''  and  '''EXEC 2.''' -Using Classic REXX closely resembles pseudo code and many languages like Basic or Julia. Experienced programmers should have no problem reading REXX code and translating it to other languages.
    -Some items that might differ from what you are familiar with.
    -* Caseless, fully free format. -* Code blocks delimited by do...end, no brackets (){}. -* A programs starts always with line 1, so you'll need 'exit' before the code for procedures and routines. -* Usual control structures present: do...by...to, do while/until, select, leave, iterate, call, return, exit, & (and), \ (not). -* No data types, no declarations, everything is string. String functions such as 'Left()' or 'Substr()' may be applied on numbers. -* All arithmetic is decimal based, not binary. So stuff like bit shifting or multiply/divide by 2 using exponent add/subtract does not apply. -* Exponentiation is designated by '**' thus x^2 = x**2. -* Integer division is designated by '%' thus 13%3 = 4. -* Modulo division (remainder) is designated by '//' thus 13//3 = 1 ('13 mod 3'). -* Arrays (here called 'stems') are designated by something like 'stem.a.b. etc' (stem = name array; a, b etc any value; 'associative arrays'). -* Precision is unlimited (default 9 digits), but you have to specify it yourself ('numeric digits nn'). -* Parameter passing always by value. Stems cannot be passed, but must be made available with 'expose'. - Versions of REXX: * '''[[wp:ARexx|ARexx]]'''   is a classic REXX implementation (with extensions) for the AmigaOS,   given in bundle since AmigaOS 2.   (Regina REXX has specific support for the extended functions that were introduced in ARexx.)   ARexx was written in 1987 by William S. Hawes. @@ -51,7 +36,7 @@ Some items that might differ from what you are familiar with.
    * '''[[CRX REXX]]'''   (Compact REXX) is a classic REXX first written by Dr. Brian Marks. -* '''[[REXX/2]]'''   is a classic REXX that is bundled with PC/SPF and written by Command Technology Corporation,   a license is required to use this product.   This version of REXX can only be used under PC/SPF and it's panels.   PC/SPF resembles the IBM program product SPF (which has other names and versions). The last version was published in 1996. Company CTC doesn't exist anymore. +* '''[[CTC REXX]]'''   is a classic REXX that is bundled with PC/SPF and written by Command Technology Corporation,   a license is required to use this product.   This version of REXX can only be used under PC/SPF and it's panels.   PC/SPF resembles the IBM program product SPF (which has other names and versions). * '''[[KEXX]]'''   is a subset of REXX that is bundled with KEDIT and written by Keven J. Kearney of Mansfield Software Group, Inc., a license is required to use this product.   KEXX only executes under the KEDIT licensed product.   KEDIT is an XEDIT clone (an editor from IBM for VM/CMS program products). @@ -90,7 +75,7 @@ Some items that might differ from what you are familiar with.
    * '''[[Regina REXX]]'''   is an implementation first created by Anders Christensen (in 1992) and is now maintained by others, notably Mark Hessling.   Regina REXX runs on more different platforms than any other REXX,   too many to name here.   It can be downloaded freely. -* '''[[Reginald REXX]]'''   is a REXX developed by Jeff Glatt.   It can be downloaded freely. According to Rexxinfo.org, Reginald is out of maintenance. +* '''[[Reginald REXX]]'''   is a REXX developed by Jeff Glatt.   It can be downloaded freely. * '''[[REXX/imc]]'''   a classic REXX developed by Ian M. Collier (imc) for Linux/Unix. @@ -99,10 +84,10 @@ Some items that might differ from what you are familiar with.
    * '''REXX/Personal'''   is another name for   '''Personal REXX'''     (see above). -* '''[[ROO oo-REXX]]'''   an object-oriented REXX developed by Keith Watts of Kilowatt Software, Inc.     It can be downloaded freely.   '''ROO'''   is also known as   '''ROO!'''. According to Rexxinfo.org, Roo! is out of maintenance. +* '''[[ROO oo-REXX]]'''   an object-oriented REXX developed by Keith Watts of Kilowatt Software, Inc.     It can be downloaded freely.   '''ROO'''   is also known as   '''ROO!'''. -* '''[[R4 REXX]]'''   a classic REXX developed by Keith Watts of Kilowatt Software, Inc.     It was also known as '''Portable REXX'''.   It can be downloaded freely. According to Rexxinfo.org, R4 is out of maintenance. +* '''[[R4 REXX]]'''   a classic REXX developed by Keith Watts of Kilowatt Software, Inc.     It was also known as '''Portable REXX'''.   It can be downloaded freely. * '''[[T/REXX, a REXX compiler for CMS]]'''   is an implementation of classic REXX written by Leigh Lundin and Mark Woodruff   (according to Wikipedia). @@ -127,7 +112,16 @@ Some items that might differ from what you are familiar with.
    * [http://www.rexxla.org The Rexx Language Association - www.rexxla.org] * [http://regina-rexx.sourceforge.net/index.html Regina Rexx Interpreter] * [http://www.kedit.com/ Mansfield Software Group, Inc. (KEDIT)] +* [http://www.quercus-sys.com/ Personal REXX, Quercus Systems] +* [http://www.commandtechnology.com/ CTC Command Technology] * [http://www.rexxla.org/ CRX Open Source (right column side)] +* [http://www.kilowattsoftware.com/r4Page.htm R4, Kilowatt Software] +* [http://www.kilowattsoftware.com/rooPage.htm ROO, Kilowatt Software] +* [http://publib.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/HCSE2C00/CCONTENTS?SHELF=hcsh2ab0&DN=SC24-6221-00&DT=20090724140455 z/VM V6R1 REXX/VM Reference] +* [http://publib.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/HCSB3C00/CCONTENTS?SHELF=hcsh2ab0&DN=SC24-6222-00&DT=20090724131829 z/VM V6R1 REXX/VM User's Guide] +* [http://www.rexxinfo.org/html/rexxinfo1.html#Rexx-Manuals {many references to REXX manuals}] + + == Rosetta Code tasks not implemented in REXX == -[[Tasks not implemented in REXX]] \ No newline at end of file +[[Reports:Tasks_not_implemented_in_REXX]] \ No newline at end of file diff --git a/Lang/REXX/Arithmetic-numbers b/Lang/REXX/Arithmetic-numbers deleted file mode 120000 index 71a3332017..0000000000 --- a/Lang/REXX/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/REXX \ No newline at end of file diff --git a/Lang/REXX/Ascending-primes b/Lang/REXX/Ascending-primes deleted file mode 120000 index bbc0af4983..0000000000 --- a/Lang/REXX/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/REXX \ No newline at end of file diff --git a/Lang/REXX/Base64-decode-data b/Lang/REXX/Base64-decode-data deleted file mode 120000 index 226b0ce798..0000000000 --- a/Lang/REXX/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/REXX \ No newline at end of file diff --git a/Lang/REXX/Bioinformatics-base-count b/Lang/REXX/Bioinformatics-base-count new file mode 120000 index 0000000000..c722864481 --- /dev/null +++ b/Lang/REXX/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/REXX \ No newline at end of file diff --git a/Lang/REXX/Blum-integer b/Lang/REXX/Blum-integer deleted file mode 120000 index 2aa27c2ff0..0000000000 --- a/Lang/REXX/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/REXX \ No newline at end of file diff --git a/Lang/REXX/Chernicks-Carmichael-numbers b/Lang/REXX/Chernicks-Carmichael-numbers deleted file mode 120000 index 4050cb562e..0000000000 --- a/Lang/REXX/Chernicks-Carmichael-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chernicks-Carmichael-numbers/REXX \ No newline at end of file diff --git a/Lang/REXX/Deceptive-numbers b/Lang/REXX/Deceptive-numbers deleted file mode 120000 index 3f3cdd6f00..0000000000 --- a/Lang/REXX/Deceptive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deceptive-numbers/REXX \ No newline at end of file diff --git a/Lang/REXX/Descending-primes b/Lang/REXX/Descending-primes deleted file mode 120000 index c55d765868..0000000000 --- a/Lang/REXX/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/REXX \ No newline at end of file diff --git a/Lang/REXX/Euclid-Mullin-sequence b/Lang/REXX/Euclid-Mullin-sequence deleted file mode 120000 index 3ded1fce93..0000000000 --- a/Lang/REXX/Euclid-Mullin-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euclid-Mullin-sequence/REXX \ No newline at end of file diff --git a/Lang/REXX/Eulers-constant-0.5772... b/Lang/REXX/Eulers-constant-0.5772... deleted file mode 120000 index 4dd79a59f3..0000000000 --- a/Lang/REXX/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../REXX \ No newline at end of file diff --git a/Lang/REXX/Find-largest-left-truncatable-prime-in-a-given-base b/Lang/REXX/Find-largest-left-truncatable-prime-in-a-given-base deleted file mode 120000 index 528dd8a890..0000000000 --- a/Lang/REXX/Find-largest-left-truncatable-prime-in-a-given-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-largest-left-truncatable-prime-in-a-given-base/REXX \ No newline at end of file diff --git a/Lang/REXX/Goldbachs-comet b/Lang/REXX/Goldbachs-comet deleted file mode 120000 index ddf76b927f..0000000000 --- a/Lang/REXX/Goldbachs-comet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Goldbachs-comet/REXX \ No newline at end of file diff --git a/Lang/REXX/Jacobsthal-numbers b/Lang/REXX/Jacobsthal-numbers deleted file mode 120000 index 7f86ce7033..0000000000 --- a/Lang/REXX/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/REXX \ No newline at end of file diff --git a/Lang/REXX/Legendre-prime-counting-function b/Lang/REXX/Legendre-prime-counting-function deleted file mode 120000 index 74d1b424e1..0000000000 --- a/Lang/REXX/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/REXX \ No newline at end of file diff --git a/Lang/REXX/Magic-constant b/Lang/REXX/Magic-constant deleted file mode 120000 index 13d81a62dd..0000000000 --- a/Lang/REXX/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/REXX \ No newline at end of file diff --git a/Lang/REXX/Miller-Rabin-primality-test b/Lang/REXX/Miller-Rabin-primality-test new file mode 120000 index 0000000000..6b9607754b --- /dev/null +++ b/Lang/REXX/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/REXX \ No newline at end of file diff --git a/Lang/REXX/Primes---allocate-descendants-to-their-ancestors b/Lang/REXX/Primes---allocate-descendants-to-their-ancestors deleted file mode 120000 index e6293c9090..0000000000 --- a/Lang/REXX/Primes---allocate-descendants-to-their-ancestors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primes---allocate-descendants-to-their-ancestors/REXX \ No newline at end of file diff --git a/Lang/REXX/Quaternion-type b/Lang/REXX/Quaternion-type new file mode 120000 index 0000000000..18e452fac4 --- /dev/null +++ b/Lang/REXX/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/REXX \ No newline at end of file diff --git a/Lang/REXX/Ramanujan-primes-twins b/Lang/REXX/Ramanujan-primes-twins deleted file mode 120000 index 09da3d7f76..0000000000 --- a/Lang/REXX/Ramanujan-primes-twins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramanujan-primes-twins/REXX \ No newline at end of file diff --git a/Lang/REXX/Sequence:-nth-number-with-exactly-n-divisors b/Lang/REXX/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/REXX/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/REXX/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/REXX/Sequence-of-primorial-primes b/Lang/REXX/Sequence-of-primorial-primes deleted file mode 120000 index cd4ebe8c73..0000000000 --- a/Lang/REXX/Sequence-of-primorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primorial-primes/REXX \ No newline at end of file diff --git a/Lang/REXX/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/REXX/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/REXX/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/REXX/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/REXX/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/REXX/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/REXX/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/REXX/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/REXX/Sieve-of-Pritchard b/Lang/REXX/Sieve-of-Pritchard deleted file mode 120000 index 601b18d906..0000000000 --- a/Lang/REXX/Sieve-of-Pritchard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Pritchard/REXX \ No newline at end of file diff --git a/Lang/REXX/Sorting-Algorithms-Circle-Sort b/Lang/REXX/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..383d356065 --- /dev/null +++ b/Lang/REXX/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/REXX \ No newline at end of file diff --git a/Lang/REXX/Verhoeff-algorithm b/Lang/REXX/Verhoeff-algorithm deleted file mode 120000 index 0bc439ccea..0000000000 --- a/Lang/REXX/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/REXX \ No newline at end of file diff --git a/Lang/REXX/Web-scraping b/Lang/REXX/Web-scraping deleted file mode 120000 index 818c9c985e..0000000000 --- a/Lang/REXX/Web-scraping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Web-scraping/REXX \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/00-LANG.txt b/Lang/RISC-V-Assembly/00-LANG.txt index 3f4a6ea98e..f524ed95fb 100644 --- a/Lang/RISC-V-Assembly/00-LANG.txt +++ b/Lang/RISC-V-Assembly/00-LANG.txt @@ -1,79 +1,4 @@ {{language|RISC-V Assembly}}[https://riscv.org Risc-V] is an open source hardware instruction set architecture based on the principle of a '''R'''educed '''I'''nstruction '''S'''et '''C'''omputer. The project was started by the university of California, Berkeley in 2010. This site refers to the Risc-V assembly language. ([https://en.wikipedia.org/wiki/RISC-V#Software Wikipedia page]), Website: [https://riscv.org https://riscv.org]. -'''Riscv on raspberry pico 2''' - -A pico2 with the chip rp2335 contains 2 cores hazard3 with risc v assembly -it is possible to programm assembly riscv with the sdk C++ and a compiler riscv32-unknown-elf-as.exe - -It is also possible to programm without SDK but it is necessary to write functions for init -the clocks and to communicate for usb connexion. - -install under Windows11 (or see documentation raspberry py pico SDK) : - -Create main folder (ex : \pico2) - -install SDK C++ (see instructions in raspberry pi pico2 SDK documentation) - -install toolchaine under \Pico2\tools\bin from - -https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-win.zip - - -Create work folder (ex : \pico2\hello) - -Create file CMakeLists.txt (see instructions in raspberry pi pico2 SDK documentation) - -Create program hello.s with a editor - -Copy a file pico_sdk_import.cmake from \pico2\pico-sdk\external - -Create a folder build under \pico2\hello - -Go to this folder - -Compile program with : - - cmake -DPICO_PLATFORM=rp2350-riscv -DPICO_TOOLCHAIN_PATH=E:\Pico2\tools\bin -G "NMake Makefiles" .. - -and - nmake - -copy the file .uf2 to raspberry pico2 (see documentation raspberry pi pico2) - -Start serial connexion on host (ex: putty on windows11) - -Example CMakeLists.txt : - -cmake_minimum_required(VERSION 3.13) - -include(pico_sdk_import.cmake) - -project(hello C CXX ASM) - -set(CMAKE_C_STANDARD 11) - -set(CMAKE_CXX_STANDARD 17) - -pico_sdk_init() - -add_executable(hello -hello.s # pgm source assembly riscv -) - -target_link_libraries(hello pico_stdlib) - -pico_enable_stdio_usb(hello 1) - -pico_enable_stdio_uart(hello 0) - -pico_add_extra_outputs(hello) - - -see source program on hello world rosetta code - -cmake -DPython3_EXECUTABLE=C:\Users\Vincent\AppData\Local\Microsoft\WindowsApps\python3.10.exe -DPICO_PLATFORM=rp2350-riscv -DPICO_TOOLCHAIN_PATH=E:\Pico2\tools\bin -DPICO_SDK_PATH=..\..\..\pico-sdk -G "NMake Makefiles" .. - -see instructions list on chapter 3.8.1.6. Alphabetical list of instructions on rp2350 datasheet - [[Category:Assembler language]] [[Category:Assembly]] \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Address-of-a-variable b/Lang/RISC-V-Assembly/Address-of-a-variable deleted file mode 120000 index 7e7b85f7fc..0000000000 --- a/Lang/RISC-V-Assembly/Address-of-a-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Address-of-a-variable/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Arithmetic-Integer b/Lang/RISC-V-Assembly/Arithmetic-Integer deleted file mode 120000 index 41172f4754..0000000000 --- a/Lang/RISC-V-Assembly/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Array-length b/Lang/RISC-V-Assembly/Array-length deleted file mode 120000 index 51b567c37e..0000000000 --- a/Lang/RISC-V-Assembly/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Binary-digits b/Lang/RISC-V-Assembly/Binary-digits deleted file mode 120000 index 45c4e871d7..0000000000 --- a/Lang/RISC-V-Assembly/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Binary-search b/Lang/RISC-V-Assembly/Binary-search deleted file mode 120000 index ad0fc6f909..0000000000 --- a/Lang/RISC-V-Assembly/Binary-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-search/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Bitwise-operations b/Lang/RISC-V-Assembly/Bitwise-operations deleted file mode 120000 index d2de2c0d91..0000000000 --- a/Lang/RISC-V-Assembly/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Compare-length-of-two-strings b/Lang/RISC-V-Assembly/Compare-length-of-two-strings deleted file mode 120000 index b61a06982a..0000000000 --- a/Lang/RISC-V-Assembly/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Conditional-structures b/Lang/RISC-V-Assembly/Conditional-structures deleted file mode 120000 index 2fb608a736..0000000000 --- a/Lang/RISC-V-Assembly/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Count-in-octal b/Lang/RISC-V-Assembly/Count-in-octal deleted file mode 120000 index bf7e472328..0000000000 --- a/Lang/RISC-V-Assembly/Count-in-octal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-octal/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Determine-if-a-string-is-numeric b/Lang/RISC-V-Assembly/Determine-if-a-string-is-numeric deleted file mode 120000 index fe9d1269a0..0000000000 --- a/Lang/RISC-V-Assembly/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Doubly-linked-list-Definition b/Lang/RISC-V-Assembly/Doubly-linked-list-Definition deleted file mode 120000 index f016184b4e..0000000000 --- a/Lang/RISC-V-Assembly/Doubly-linked-list-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Definition/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Factorial b/Lang/RISC-V-Assembly/Factorial deleted file mode 120000 index d4cbcd152f..0000000000 --- a/Lang/RISC-V-Assembly/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Factors-of-an-integer b/Lang/RISC-V-Assembly/Factors-of-an-integer deleted file mode 120000 index e6286a7691..0000000000 --- a/Lang/RISC-V-Assembly/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/FizzBuzz b/Lang/RISC-V-Assembly/FizzBuzz deleted file mode 120000 index fa85a0bece..0000000000 --- a/Lang/RISC-V-Assembly/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Guess-the-number b/Lang/RISC-V-Assembly/Guess-the-number deleted file mode 120000 index 3c820e8397..0000000000 --- a/Lang/RISC-V-Assembly/Guess-the-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Hello-world-Newbie b/Lang/RISC-V-Assembly/Hello-world-Newbie deleted file mode 120000 index 5721ad4125..0000000000 --- a/Lang/RISC-V-Assembly/Hello-world-Newbie +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newbie/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Include-a-file b/Lang/RISC-V-Assembly/Include-a-file deleted file mode 120000 index 2742cb0a60..0000000000 --- a/Lang/RISC-V-Assembly/Include-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Include-a-file/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Integer-comparison b/Lang/RISC-V-Assembly/Integer-comparison deleted file mode 120000 index c89ef738d7..0000000000 --- a/Lang/RISC-V-Assembly/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Jump-anywhere b/Lang/RISC-V-Assembly/Jump-anywhere deleted file mode 120000 index 97bc1d7493..0000000000 --- a/Lang/RISC-V-Assembly/Jump-anywhere +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jump-anywhere/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Logical-operations b/Lang/RISC-V-Assembly/Logical-operations deleted file mode 120000 index c149f117e3..0000000000 --- a/Lang/RISC-V-Assembly/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Loops-Do-while b/Lang/RISC-V-Assembly/Loops-Do-while deleted file mode 120000 index c6ea94d0bd..0000000000 --- a/Lang/RISC-V-Assembly/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Loops-For b/Lang/RISC-V-Assembly/Loops-For deleted file mode 120000 index eb2a1946a7..0000000000 --- a/Lang/RISC-V-Assembly/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Loops-While b/Lang/RISC-V-Assembly/Loops-While deleted file mode 120000 index aefdc14d66..0000000000 --- a/Lang/RISC-V-Assembly/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Loops-With-multiple-ranges b/Lang/RISC-V-Assembly/Loops-With-multiple-ranges deleted file mode 120000 index e4ac51774c..0000000000 --- a/Lang/RISC-V-Assembly/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Primality-by-trial-division b/Lang/RISC-V-Assembly/Primality-by-trial-division deleted file mode 120000 index 2d5326d125..0000000000 --- a/Lang/RISC-V-Assembly/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sieve-of-Eratosthenes b/Lang/RISC-V-Assembly/Sieve-of-Eratosthenes deleted file mode 120000 index 048e79765f..0000000000 --- a/Lang/RISC-V-Assembly/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Singly-linked-list-Element-definition b/Lang/RISC-V-Assembly/Singly-linked-list-Element-definition deleted file mode 120000 index c46a1c1483..0000000000 --- a/Lang/RISC-V-Assembly/Singly-linked-list-Element-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-definition/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Singly-linked-list-Element-insertion b/Lang/RISC-V-Assembly/Singly-linked-list-Element-insertion deleted file mode 120000 index 3942e77b33..0000000000 --- a/Lang/RISC-V-Assembly/Singly-linked-list-Element-insertion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-insertion/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Singly-linked-list-Traversal b/Lang/RISC-V-Assembly/Singly-linked-list-Traversal deleted file mode 120000 index 704ea88764..0000000000 --- a/Lang/RISC-V-Assembly/Singly-linked-list-Traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Traversal/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sorting-algorithms-Bubble-sort b/Lang/RISC-V-Assembly/Sorting-algorithms-Bubble-sort deleted file mode 120000 index eb7e9f655b..0000000000 --- a/Lang/RISC-V-Assembly/Sorting-algorithms-Bubble-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bubble-sort/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sorting-algorithms-Heapsort b/Lang/RISC-V-Assembly/Sorting-algorithms-Heapsort deleted file mode 120000 index 623c46da1a..0000000000 --- a/Lang/RISC-V-Assembly/Sorting-algorithms-Heapsort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Heapsort/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sorting-algorithms-Insertion-sort b/Lang/RISC-V-Assembly/Sorting-algorithms-Insertion-sort deleted file mode 120000 index 3748bff361..0000000000 --- a/Lang/RISC-V-Assembly/Sorting-algorithms-Insertion-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Insertion-sort/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sorting-algorithms-Merge-sort b/Lang/RISC-V-Assembly/Sorting-algorithms-Merge-sort deleted file mode 120000 index e189625c7b..0000000000 --- a/Lang/RISC-V-Assembly/Sorting-algorithms-Merge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Merge-sort/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sorting-algorithms-Patience-sort b/Lang/RISC-V-Assembly/Sorting-algorithms-Patience-sort deleted file mode 120000 index ff4a528100..0000000000 --- a/Lang/RISC-V-Assembly/Sorting-algorithms-Patience-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Patience-sort/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sorting-algorithms-Quicksort b/Lang/RISC-V-Assembly/Sorting-algorithms-Quicksort deleted file mode 120000 index 61ec2d6c95..0000000000 --- a/Lang/RISC-V-Assembly/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sorting-algorithms-Selection-sort b/Lang/RISC-V-Assembly/Sorting-algorithms-Selection-sort deleted file mode 120000 index dc2705e303..0000000000 --- a/Lang/RISC-V-Assembly/Sorting-algorithms-Selection-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Selection-sort/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Sorting-algorithms-Shell-sort b/Lang/RISC-V-Assembly/Sorting-algorithms-Shell-sort deleted file mode 120000 index 3181770874..0000000000 --- a/Lang/RISC-V-Assembly/Sorting-algorithms-Shell-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Shell-sort/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/String-append b/Lang/RISC-V-Assembly/String-append deleted file mode 120000 index c4e4abff3f..0000000000 --- a/Lang/RISC-V-Assembly/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/String-comparison b/Lang/RISC-V-Assembly/String-comparison deleted file mode 120000 index 05a600887a..0000000000 --- a/Lang/RISC-V-Assembly/String-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-comparison/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/String-concatenation b/Lang/RISC-V-Assembly/String-concatenation deleted file mode 120000 index 14bea49904..0000000000 --- a/Lang/RISC-V-Assembly/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/String-interpolation-included- b/Lang/RISC-V-Assembly/String-interpolation-included- deleted file mode 120000 index d5a6926006..0000000000 --- a/Lang/RISC-V-Assembly/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/String-length b/Lang/RISC-V-Assembly/String-length deleted file mode 120000 index 9f0b9ba1b7..0000000000 --- a/Lang/RISC-V-Assembly/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/String-matching b/Lang/RISC-V-Assembly/String-matching deleted file mode 120000 index daa67c8da0..0000000000 --- a/Lang/RISC-V-Assembly/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/String-prepend b/Lang/RISC-V-Assembly/String-prepend deleted file mode 120000 index 4cf66d1f37..0000000000 --- a/Lang/RISC-V-Assembly/String-prepend +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-prepend/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Substring b/Lang/RISC-V-Assembly/Substring deleted file mode 120000 index 346f148efa..0000000000 --- a/Lang/RISC-V-Assembly/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Tree-traversal b/Lang/RISC-V-Assembly/Tree-traversal deleted file mode 120000 index e386a26400..0000000000 --- a/Lang/RISC-V-Assembly/Tree-traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-traversal/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RISC-V-Assembly/Visualize-a-tree b/Lang/RISC-V-Assembly/Visualize-a-tree deleted file mode 120000 index 20ab2b2342..0000000000 --- a/Lang/RISC-V-Assembly/Visualize-a-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Visualize-a-tree/RISC-V-Assembly \ No newline at end of file diff --git a/Lang/RPL/Guess-the-number b/Lang/RPL/Guess-the-number new file mode 120000 index 0000000000..c108a4519e --- /dev/null +++ b/Lang/RPL/Guess-the-number @@ -0,0 +1 @@ +../../Task/Guess-the-number/RPL \ No newline at end of file diff --git a/Lang/RTL-2/00-LANG.txt b/Lang/RTL-2/00-LANG.txt index 1ed7c9f33f..4f020fcdf0 100644 --- a/Lang/RTL-2/00-LANG.txt +++ b/Lang/RTL-2/00-LANG.txt @@ -52,9 +52,6 @@ While the specifics varied by operating system the following is an example of a This code insert moves the value of a variable passed into the RTL/2 procedure into a variable called COUNTER in a data brick called MYDATA. -== Design and Rationale == -J. G. P. Barnes describes RTL/2 and the reasons behind some of the design decisions made during its development in his 1976 book RTL/2 Design and Philosophy. - == Reserved Words == ABS AND @@ -86,7 +83,6 @@ LENGTH LET LOR MOD -MODE NEV NOT OCT diff --git a/Lang/Racket/Arithmetic-derivative b/Lang/Racket/Arithmetic-derivative deleted file mode 120000 index 67478aafca..0000000000 --- a/Lang/Racket/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Racket \ No newline at end of file diff --git a/Lang/Racket/Bioinformatics-base-count b/Lang/Racket/Bioinformatics-base-count new file mode 120000 index 0000000000..e2d3d89548 --- /dev/null +++ b/Lang/Racket/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Racket \ No newline at end of file diff --git a/Lang/Racket/Miller-Rabin-primality-test b/Lang/Racket/Miller-Rabin-primality-test new file mode 120000 index 0000000000..db07b51bff --- /dev/null +++ b/Lang/Racket/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Racket \ No newline at end of file diff --git a/Lang/Racket/Quaternion-type b/Lang/Racket/Quaternion-type new file mode 120000 index 0000000000..88e3ea41c9 --- /dev/null +++ b/Lang/Racket/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Racket \ No newline at end of file diff --git a/Lang/Racket/Sorting-Algorithms-Circle-Sort b/Lang/Racket/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..4c351d18cc --- /dev/null +++ b/Lang/Racket/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Racket \ No newline at end of file diff --git a/Lang/Racket/Strassens-algorithm b/Lang/Racket/Strassens-algorithm deleted file mode 120000 index c6d669358e..0000000000 --- a/Lang/Racket/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Racket \ No newline at end of file diff --git a/Lang/Racket/Twos-complement b/Lang/Racket/Twos-complement deleted file mode 120000 index 0d85b62ede..0000000000 --- a/Lang/Racket/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Racket \ No newline at end of file diff --git a/Lang/Raku/Bioinformatics-base-count b/Lang/Raku/Bioinformatics-base-count new file mode 120000 index 0000000000..7d4ea3da69 --- /dev/null +++ b/Lang/Raku/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Raku \ No newline at end of file diff --git a/Lang/Raku/Catmull-Clark-subdivision-surface b/Lang/Raku/Catmull-Clark-subdivision-surface deleted file mode 120000 index ca92993d5e..0000000000 --- a/Lang/Raku/Catmull-Clark-subdivision-surface +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catmull-Clark-subdivision-surface/Raku \ No newline at end of file diff --git a/Lang/Raku/Dominoes b/Lang/Raku/Dominoes deleted file mode 120000 index 48ba3c99bf..0000000000 --- a/Lang/Raku/Dominoes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dominoes/Raku \ No newline at end of file diff --git a/Lang/Raku/Meissel-Mertens-constant b/Lang/Raku/Meissel-Mertens-constant new file mode 120000 index 0000000000..5a835b7f73 --- /dev/null +++ b/Lang/Raku/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Raku \ No newline at end of file diff --git a/Lang/Raku/Miller-Rabin-primality-test b/Lang/Raku/Miller-Rabin-primality-test new file mode 120000 index 0000000000..5ec2c83bd9 --- /dev/null +++ b/Lang/Raku/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Raku \ No newline at end of file diff --git a/Lang/Raku/Play-recorded-sounds b/Lang/Raku/Play-recorded-sounds deleted file mode 120000 index 7d18ecbdee..0000000000 --- a/Lang/Raku/Play-recorded-sounds +++ /dev/null @@ -1 +0,0 @@ -../../Task/Play-recorded-sounds/Raku \ No newline at end of file diff --git a/Lang/Raku/Quaternion-type b/Lang/Raku/Quaternion-type new file mode 120000 index 0000000000..3333adafb6 --- /dev/null +++ b/Lang/Raku/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Raku \ No newline at end of file diff --git a/Lang/Raku/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Raku/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Raku/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Raku/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Raku/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Raku/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Raku/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Raku/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Raku/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Raku/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Raku/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Raku/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Raku/Simple-turtle-graphics b/Lang/Raku/Simple-turtle-graphics deleted file mode 120000 index 496cec69f4..0000000000 --- a/Lang/Raku/Simple-turtle-graphics +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-turtle-graphics/Raku \ No newline at end of file diff --git a/Lang/Raku/Sorting-Algorithms-Circle-Sort b/Lang/Raku/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..1ba8b44162 --- /dev/null +++ b/Lang/Raku/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Raku \ No newline at end of file diff --git a/Lang/RapidQ/Levenshtein-distance b/Lang/RapidQ/Levenshtein-distance deleted file mode 120000 index 43ee94415c..0000000000 --- a/Lang/RapidQ/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/RapidQ \ No newline at end of file diff --git a/Lang/RapidQ/Map-range b/Lang/RapidQ/Map-range deleted file mode 120000 index a3da155381..0000000000 --- a/Lang/RapidQ/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/RapidQ \ No newline at end of file diff --git a/Lang/RapidQ/Nth-root b/Lang/RapidQ/Nth-root deleted file mode 120000 index f4c270323f..0000000000 --- a/Lang/RapidQ/Nth-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth-root/RapidQ \ No newline at end of file diff --git a/Lang/RapidQ/Temperature-conversion b/Lang/RapidQ/Temperature-conversion deleted file mode 120000 index 757db1c288..0000000000 --- a/Lang/RapidQ/Temperature-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Temperature-conversion/RapidQ \ No newline at end of file diff --git a/Lang/Rebol/00-LANG.txt b/Lang/Rebol/00-LANG.txt deleted file mode 100644 index 4aa183678a..0000000000 --- a/Lang/Rebol/00-LANG.txt +++ /dev/null @@ -1,32 +0,0 @@ -{{language|Rebol -|site=http://rebol.com -|strength=strong -|checking=dynamic -|gc=yes -|exec=interpreted -|tags=rebol, REBOL}} - -{{Language programming paradigm|Dynamic}} -{{Language programming paradigm|Declarative}} -{{Language programming paradigm|Functional}} -{{Language programming paradigm|Event-driven}} -{{Language programming paradigm|Reflective}} -{{Language programming paradigm|Procedural}} -{{Language programming paradigm|Imperative}} -{{Language programming paradigm|Concurrent}} -{{Language programming paradigm|Distributed}} - -Another entry (before merge) is available at [https://rosettacode.org/wiki/Category:REBOL Category:REBOL] - -'''Rebol''' (originally named '''REBOL''') stands for Relative Expression Based Object Language and was designed by Carl Sassenrath to combat unnecessary software complexity through a language-centric approach. Rebol has been around since about 1998, with [https://www.rebol.com/downloads.html Rebol 2 widely available] and free to use across many platforms. In December 2012, the Rebol 3 (R3) interpreter was [https://github.com/rebol/rebol/ released as open source] under the Apache 2.0 license. Today, an actively maintained community fork of Rebol 3 is available at https://github.com/Oldes/Rebol3/ with [https://github.com/Oldes/Rebol3/releases current releases and binaries]. This fork's goal is to keep the code close to the original design while improving usability, maintainability, and buildability. - -The functions dictionary for the latest available Rebol version can be found at: https://rebol.tech/docs/functions.html - -==Todo== -[https://rosettacode.org/wiki/Tasks_not_implemented_in_Rebol Tasks not implemented in Rebol] - -==Useful links== -* [http://www.rebol.com Original (outdated) Rebol site] -* [https://github.com/Oldes/Rebol3 Rebol3 source] on Github (active development). -* [https://rebol.zulipchat.com/ Rebol Zulip chat]. -* [https://app.element.io/#/room/#Rebol3:gitter.im Rebol Matrix chat]. \ No newline at end of file diff --git a/Lang/Rebol/00-META.yaml b/Lang/Rebol/00-META.yaml deleted file mode 100644 index 1edb7cbb3e..0000000000 --- a/Lang/Rebol/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Rebol diff --git a/Lang/Rebol/100-doors b/Lang/Rebol/100-doors deleted file mode 120000 index 5b331a9eba..0000000000 --- a/Lang/Rebol/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Rebol \ No newline at end of file diff --git a/Lang/Rebol/100-prisoners b/Lang/Rebol/100-prisoners deleted file mode 120000 index 97501a6eb7..0000000000 --- a/Lang/Rebol/100-prisoners +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-prisoners/Rebol \ No newline at end of file diff --git a/Lang/Rebol/15-puzzle-game b/Lang/Rebol/15-puzzle-game deleted file mode 120000 index 067f887d80..0000000000 --- a/Lang/Rebol/15-puzzle-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-game/Rebol \ No newline at end of file diff --git a/Lang/Rebol/21-game b/Lang/Rebol/21-game deleted file mode 120000 index 26c96de104..0000000000 --- a/Lang/Rebol/21-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/21-game/Rebol \ No newline at end of file diff --git a/Lang/Rebol/24-game b/Lang/Rebol/24-game deleted file mode 120000 index da2db22523..0000000000 --- a/Lang/Rebol/24-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game/Rebol \ No newline at end of file diff --git a/Lang/Rebol/9-billion-names-of-God-the-integer b/Lang/Rebol/9-billion-names-of-God-the-integer deleted file mode 120000 index 73577ad2b4..0000000000 --- a/Lang/Rebol/9-billion-names-of-God-the-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/9-billion-names-of-God-the-integer/Rebol \ No newline at end of file diff --git a/Lang/Rebol/99-bottles-of-beer b/Lang/Rebol/99-bottles-of-beer deleted file mode 120000 index 5fa8a19390..0000000000 --- a/Lang/Rebol/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Rebol \ No newline at end of file diff --git a/Lang/Rebol/A+B b/Lang/Rebol/A+B deleted file mode 120000 index b25e6fbd34..0000000000 --- a/Lang/Rebol/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Rebol \ No newline at end of file diff --git a/Lang/Rebol/ABC-problem b/Lang/Rebol/ABC-problem deleted file mode 120000 index 4e6e666878..0000000000 --- a/Lang/Rebol/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Abbreviations-automatic b/Lang/Rebol/Abbreviations-automatic deleted file mode 120000 index 85b470e105..0000000000 --- a/Lang/Rebol/Abbreviations-automatic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-automatic/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Abbreviations-easy b/Lang/Rebol/Abbreviations-easy deleted file mode 120000 index f54524f132..0000000000 --- a/Lang/Rebol/Abbreviations-easy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-easy/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Abbreviations-simple b/Lang/Rebol/Abbreviations-simple deleted file mode 120000 index 1036d0a126..0000000000 --- a/Lang/Rebol/Abbreviations-simple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-simple/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Abelian-sandpile-model-Identity b/Lang/Rebol/Abelian-sandpile-model-Identity deleted file mode 120000 index fa169923d8..0000000000 --- a/Lang/Rebol/Abelian-sandpile-model-Identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model-Identity/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Abstract-type b/Lang/Rebol/Abstract-type deleted file mode 120000 index 98f9214f95..0000000000 --- a/Lang/Rebol/Abstract-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abstract-type/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Abundant-odd-numbers b/Lang/Rebol/Abundant-odd-numbers deleted file mode 120000 index 3a7c4247e0..0000000000 --- a/Lang/Rebol/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Accumulator-factory b/Lang/Rebol/Accumulator-factory deleted file mode 120000 index 2ad70f64ad..0000000000 --- a/Lang/Rebol/Accumulator-factory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Accumulator-factory/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Ackermann-function b/Lang/Rebol/Ackermann-function deleted file mode 120000 index 699a619796..0000000000 --- a/Lang/Rebol/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Add-a-variable-to-a-class-instance-at-runtime b/Lang/Rebol/Add-a-variable-to-a-class-instance-at-runtime deleted file mode 120000 index a74659ec86..0000000000 --- a/Lang/Rebol/Add-a-variable-to-a-class-instance-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Add-a-variable-to-a-class-instance-at-runtime/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Additive-primes b/Lang/Rebol/Additive-primes deleted file mode 120000 index 1f4da61e10..0000000000 --- a/Lang/Rebol/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Align-columns b/Lang/Rebol/Align-columns deleted file mode 120000 index f1de5b19b7..0000000000 --- a/Lang/Rebol/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Almost-prime b/Lang/Rebol/Almost-prime deleted file mode 120000 index 485728d591..0000000000 --- a/Lang/Rebol/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Amb b/Lang/Rebol/Amb deleted file mode 120000 index ada18b3a53..0000000000 --- a/Lang/Rebol/Amb +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amb/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Amicable-pairs b/Lang/Rebol/Amicable-pairs deleted file mode 120000 index 7715d03a59..0000000000 --- a/Lang/Rebol/Amicable-pairs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amicable-pairs/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Anagrams b/Lang/Rebol/Anagrams deleted file mode 120000 index 19dbe7b94f..0000000000 --- a/Lang/Rebol/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Anagrams-Deranged-anagrams b/Lang/Rebol/Anagrams-Deranged-anagrams deleted file mode 120000 index dc92d83901..0000000000 --- a/Lang/Rebol/Anagrams-Deranged-anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams-Deranged-anagrams/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Animation b/Lang/Rebol/Animation deleted file mode 120000 index 9bc983a74f..0000000000 --- a/Lang/Rebol/Animation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Animation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Anonymous-recursion b/Lang/Rebol/Anonymous-recursion deleted file mode 120000 index bb89ba8ad2..0000000000 --- a/Lang/Rebol/Anonymous-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anonymous-recursion/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Anti-primes b/Lang/Rebol/Anti-primes deleted file mode 120000 index a605291c15..0000000000 --- a/Lang/Rebol/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Apply-a-callback-to-an-array b/Lang/Rebol/Apply-a-callback-to-an-array deleted file mode 120000 index 846524932e..0000000000 --- a/Lang/Rebol/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Archimedean-spiral b/Lang/Rebol/Archimedean-spiral deleted file mode 120000 index 485754061d..0000000000 --- a/Lang/Rebol/Archimedean-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Archimedean-spiral/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Arena-storage-pool b/Lang/Rebol/Arena-storage-pool deleted file mode 120000 index 261e2b68b6..0000000000 --- a/Lang/Rebol/Arena-storage-pool +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arena-storage-pool/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Arithmetic-Integer b/Lang/Rebol/Arithmetic-Integer deleted file mode 120000 index beda640d8b..0000000000 --- a/Lang/Rebol/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Arithmetic-evaluation b/Lang/Rebol/Arithmetic-evaluation deleted file mode 120000 index eace662534..0000000000 --- a/Lang/Rebol/Arithmetic-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-evaluation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Array-concatenation b/Lang/Rebol/Array-concatenation deleted file mode 120000 index 54981e3b27..0000000000 --- a/Lang/Rebol/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Array-length b/Lang/Rebol/Array-length deleted file mode 120000 index b057893924..0000000000 --- a/Lang/Rebol/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Arrays b/Lang/Rebol/Arrays deleted file mode 120000 index c2505cc17f..0000000000 --- a/Lang/Rebol/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Assertions b/Lang/Rebol/Assertions deleted file mode 120000 index 410d203693..0000000000 --- a/Lang/Rebol/Assertions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Assertions/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Associative-array-Creation b/Lang/Rebol/Associative-array-Creation deleted file mode 120000 index ed84b3cd74..0000000000 --- a/Lang/Rebol/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Attractive-numbers b/Lang/Rebol/Attractive-numbers deleted file mode 120000 index bd3dc833b3..0000000000 --- a/Lang/Rebol/Attractive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Attractive-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Averages-Arithmetic-mean b/Lang/Rebol/Averages-Arithmetic-mean deleted file mode 120000 index 1b2f7cd050..0000000000 --- a/Lang/Rebol/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Averages-Median b/Lang/Rebol/Averages-Median deleted file mode 120000 index 308cc999e7..0000000000 --- a/Lang/Rebol/Averages-Median +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Median/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Babbage-problem b/Lang/Rebol/Babbage-problem deleted file mode 120000 index da5afb5375..0000000000 --- a/Lang/Rebol/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Babylonian-spiral b/Lang/Rebol/Babylonian-spiral deleted file mode 120000 index 18aac82eae..0000000000 --- a/Lang/Rebol/Babylonian-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babylonian-spiral/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Balanced-brackets b/Lang/Rebol/Balanced-brackets deleted file mode 120000 index 99271027bc..0000000000 --- a/Lang/Rebol/Balanced-brackets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-brackets/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Barnsley-fern b/Lang/Rebol/Barnsley-fern deleted file mode 120000 index e98ef998d2..0000000000 --- a/Lang/Rebol/Barnsley-fern +++ /dev/null @@ -1 +0,0 @@ -../../Task/Barnsley-fern/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Base64-decode-data b/Lang/Rebol/Base64-decode-data deleted file mode 120000 index 0ea7b555cb..0000000000 --- a/Lang/Rebol/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bifid-cipher b/Lang/Rebol/Bifid-cipher deleted file mode 120000 index b00839dd98..0000000000 --- a/Lang/Rebol/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Binary-digits b/Lang/Rebol/Binary-digits deleted file mode 120000 index 7cb2d23198..0000000000 --- a/Lang/Rebol/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Binary-strings b/Lang/Rebol/Binary-strings deleted file mode 120000 index 9671e7ddf3..0000000000 --- a/Lang/Rebol/Binary-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-strings/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Biorhythms b/Lang/Rebol/Biorhythms deleted file mode 120000 index 7e80c97327..0000000000 --- a/Lang/Rebol/Biorhythms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Biorhythms/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitcoin-address-validation b/Lang/Rebol/Bitcoin-address-validation deleted file mode 120000 index 9344a9c4c3..0000000000 --- a/Lang/Rebol/Bitcoin-address-validation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitcoin-address-validation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitmap b/Lang/Rebol/Bitmap deleted file mode 120000 index 629709bef1..0000000000 --- a/Lang/Rebol/Bitmap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitmap-Flood-fill b/Lang/Rebol/Bitmap-Flood-fill deleted file mode 120000 index af82299463..0000000000 --- a/Lang/Rebol/Bitmap-Flood-fill +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Flood-fill/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitmap-Histogram b/Lang/Rebol/Bitmap-Histogram deleted file mode 120000 index 3dc33a01e1..0000000000 --- a/Lang/Rebol/Bitmap-Histogram +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Histogram/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitmap-Midpoint-circle-algorithm b/Lang/Rebol/Bitmap-Midpoint-circle-algorithm deleted file mode 120000 index d8a14cc133..0000000000 --- a/Lang/Rebol/Bitmap-Midpoint-circle-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Midpoint-circle-algorithm/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitmap-Read-a-PPM-file b/Lang/Rebol/Bitmap-Read-a-PPM-file deleted file mode 120000 index 4c8503a5c6..0000000000 --- a/Lang/Rebol/Bitmap-Read-a-PPM-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Read-a-PPM-file/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitmap-Write-a-PPM-file b/Lang/Rebol/Bitmap-Write-a-PPM-file deleted file mode 120000 index f47ca4a660..0000000000 --- a/Lang/Rebol/Bitmap-Write-a-PPM-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Write-a-PPM-file/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitwise-IO b/Lang/Rebol/Bitwise-IO deleted file mode 120000 index d928c50478..0000000000 --- a/Lang/Rebol/Bitwise-IO +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-IO/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bitwise-operations b/Lang/Rebol/Bitwise-operations deleted file mode 120000 index ed4b6220a6..0000000000 --- a/Lang/Rebol/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Box-the-compass b/Lang/Rebol/Box-the-compass deleted file mode 120000 index 8772a92d1c..0000000000 --- a/Lang/Rebol/Box-the-compass +++ /dev/null @@ -1 +0,0 @@ -../../Task/Box-the-compass/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bulls-and-cows b/Lang/Rebol/Bulls-and-cows deleted file mode 120000 index acbfc00124..0000000000 --- a/Lang/Rebol/Bulls-and-cows +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bulls-and-cows/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Bulls-and-cows-Player b/Lang/Rebol/Bulls-and-cows-Player deleted file mode 120000 index 3cce956d9f..0000000000 --- a/Lang/Rebol/Bulls-and-cows-Player +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bulls-and-cows-Player/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Burrows-Wheeler-transform b/Lang/Rebol/Burrows-Wheeler-transform deleted file mode 120000 index 0a3a26dcec..0000000000 --- a/Lang/Rebol/Burrows-Wheeler-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Burrows-Wheeler-transform/Rebol \ No newline at end of file diff --git a/Lang/Rebol/CRC-32 b/Lang/Rebol/CRC-32 deleted file mode 120000 index 634c717528..0000000000 --- a/Lang/Rebol/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/Rebol \ No newline at end of file diff --git a/Lang/Rebol/CSV-data-manipulation b/Lang/Rebol/CSV-data-manipulation deleted file mode 120000 index 7ac497a786..0000000000 --- a/Lang/Rebol/CSV-data-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/CSV-data-manipulation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/CSV-to-HTML-translation b/Lang/Rebol/CSV-to-HTML-translation deleted file mode 120000 index f5ad170ee4..0000000000 --- a/Lang/Rebol/CSV-to-HTML-translation +++ /dev/null @@ -1 +0,0 @@ -../../Task/CSV-to-HTML-translation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Caesar-cipher b/Lang/Rebol/Caesar-cipher deleted file mode 120000 index a6b4726d60..0000000000 --- a/Lang/Rebol/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Calendar b/Lang/Rebol/Calendar deleted file mode 120000 index ab6fe69315..0000000000 --- a/Lang/Rebol/Calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calendar/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Calendar---for-REAL-programmers b/Lang/Rebol/Calendar---for-REAL-programmers deleted file mode 120000 index af1c969dec..0000000000 --- a/Lang/Rebol/Calendar---for-REAL-programmers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calendar---for-REAL-programmers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Catalan-numbers b/Lang/Rebol/Catalan-numbers deleted file mode 120000 index 0e39f685c0..0000000000 --- a/Lang/Rebol/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Catalan-numbers-Pascals-triangle b/Lang/Rebol/Catalan-numbers-Pascals-triangle deleted file mode 120000 index 6b1b6d4970..0000000000 --- a/Lang/Rebol/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Character-codes b/Lang/Rebol/Character-codes deleted file mode 120000 index 3daa301cb2..0000000000 --- a/Lang/Rebol/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Check-input-device-is-a-terminal b/Lang/Rebol/Check-input-device-is-a-terminal deleted file mode 120000 index 82d5a1e6e2..0000000000 --- a/Lang/Rebol/Check-input-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-input-device-is-a-terminal/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Check-that-file-exists b/Lang/Rebol/Check-that-file-exists deleted file mode 120000 index 83129a7375..0000000000 --- a/Lang/Rebol/Check-that-file-exists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-that-file-exists/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Chinese-zodiac b/Lang/Rebol/Chinese-zodiac deleted file mode 120000 index e983432942..0000000000 --- a/Lang/Rebol/Chinese-zodiac +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chinese-zodiac/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Classes b/Lang/Rebol/Classes deleted file mode 120000 index 19c13253ee..0000000000 --- a/Lang/Rebol/Classes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Classes/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Closures-Value-capture b/Lang/Rebol/Closures-Value-capture deleted file mode 120000 index c746b0b21a..0000000000 --- a/Lang/Rebol/Closures-Value-capture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closures-Value-capture/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Color-quantization b/Lang/Rebol/Color-quantization deleted file mode 120000 index fca9b62778..0000000000 --- a/Lang/Rebol/Color-quantization +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-quantization/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Comma-quibbling b/Lang/Rebol/Comma-quibbling deleted file mode 120000 index 8f9382035d..0000000000 --- a/Lang/Rebol/Comma-quibbling +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comma-quibbling/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Comments b/Lang/Rebol/Comments deleted file mode 120000 index 1a45f1afdb..0000000000 --- a/Lang/Rebol/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Compare-a-list-of-strings b/Lang/Rebol/Compare-a-list-of-strings deleted file mode 120000 index 8b48806d25..0000000000 --- a/Lang/Rebol/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Conways-Game-of-Life b/Lang/Rebol/Conways-Game-of-Life deleted file mode 120000 index 1be297f380..0000000000 --- a/Lang/Rebol/Conways-Game-of-Life +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conways-Game-of-Life/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Copy-a-string b/Lang/Rebol/Copy-a-string deleted file mode 120000 index 713a966385..0000000000 --- a/Lang/Rebol/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Create-a-file b/Lang/Rebol/Create-a-file deleted file mode 120000 index eb56f3709c..0000000000 --- a/Lang/Rebol/Create-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-file/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Create-a-two-dimensional-array-at-runtime b/Lang/Rebol/Create-a-two-dimensional-array-at-runtime deleted file mode 120000 index 2338b1da0a..0000000000 --- a/Lang/Rebol/Create-a-two-dimensional-array-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-two-dimensional-array-at-runtime/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Create-an-HTML-table b/Lang/Rebol/Create-an-HTML-table deleted file mode 120000 index 479c62b61c..0000000000 --- a/Lang/Rebol/Create-an-HTML-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-HTML-table/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Currency b/Lang/Rebol/Currency deleted file mode 120000 index 918d212fb1..0000000000 --- a/Lang/Rebol/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Currying b/Lang/Rebol/Currying deleted file mode 120000 index 8810de2a28..0000000000 --- a/Lang/Rebol/Currying +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currying/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Date-format b/Lang/Rebol/Date-format deleted file mode 120000 index bbad545c0e..0000000000 --- a/Lang/Rebol/Date-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-format/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Date-manipulation b/Lang/Rebol/Date-manipulation deleted file mode 120000 index 0ef2caa486..0000000000 --- a/Lang/Rebol/Date-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-manipulation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Day-of-the-week b/Lang/Rebol/Day-of-the-week deleted file mode 120000 index 27a96c7aab..0000000000 --- a/Lang/Rebol/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Deal-cards-for-FreeCell b/Lang/Rebol/Deal-cards-for-FreeCell deleted file mode 120000 index 6092f801ff..0000000000 --- a/Lang/Rebol/Deal-cards-for-FreeCell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deal-cards-for-FreeCell/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Delete-a-file b/Lang/Rebol/Delete-a-file deleted file mode 120000 index 60299e91d7..0000000000 --- a/Lang/Rebol/Delete-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delete-a-file/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Detect-division-by-zero b/Lang/Rebol/Detect-division-by-zero deleted file mode 120000 index fb477e9779..0000000000 --- a/Lang/Rebol/Detect-division-by-zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Detect-division-by-zero/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Determine-if-a-string-is-numeric b/Lang/Rebol/Determine-if-a-string-is-numeric deleted file mode 120000 index 6a7216a9d5..0000000000 --- a/Lang/Rebol/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Digital-root b/Lang/Rebol/Digital-root deleted file mode 120000 index c70057beb3..0000000000 --- a/Lang/Rebol/Digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Display-a-linear-combination b/Lang/Rebol/Display-a-linear-combination deleted file mode 120000 index 701713c8e0..0000000000 --- a/Lang/Rebol/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Documentation b/Lang/Rebol/Documentation deleted file mode 120000 index 92c3f85b3b..0000000000 --- a/Lang/Rebol/Documentation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Documentation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Dot-product b/Lang/Rebol/Dot-product deleted file mode 120000 index a29d1db870..0000000000 --- a/Lang/Rebol/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Dragon-curve b/Lang/Rebol/Dragon-curve deleted file mode 120000 index e192bc1b6c..0000000000 --- a/Lang/Rebol/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Draw-a-clock b/Lang/Rebol/Draw-a-clock deleted file mode 120000 index 9c767ac91b..0000000000 --- a/Lang/Rebol/Draw-a-clock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-clock/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Draw-a-pixel b/Lang/Rebol/Draw-a-pixel deleted file mode 120000 index 4424b2ecc5..0000000000 --- a/Lang/Rebol/Draw-a-pixel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-pixel/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Dynamic-variable-names b/Lang/Rebol/Dynamic-variable-names deleted file mode 120000 index 36e09e119f..0000000000 --- a/Lang/Rebol/Dynamic-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dynamic-variable-names/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Echo-server b/Lang/Rebol/Echo-server deleted file mode 120000 index cdc4b2fda6..0000000000 --- a/Lang/Rebol/Echo-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Echo-server/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Empty-directory b/Lang/Rebol/Empty-directory deleted file mode 120000 index 2945783dae..0000000000 --- a/Lang/Rebol/Empty-directory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-directory/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Empty-program b/Lang/Rebol/Empty-program deleted file mode 120000 index f34c1f5023..0000000000 --- a/Lang/Rebol/Empty-program +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-program/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Empty-string b/Lang/Rebol/Empty-string deleted file mode 120000 index 33318a0a63..0000000000 --- a/Lang/Rebol/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Enumerations b/Lang/Rebol/Enumerations deleted file mode 120000 index ba3f469c4e..0000000000 --- a/Lang/Rebol/Enumerations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enumerations/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Environment-variables b/Lang/Rebol/Environment-variables deleted file mode 120000 index 5354438b20..0000000000 --- a/Lang/Rebol/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Ethiopian-multiplication b/Lang/Rebol/Ethiopian-multiplication deleted file mode 120000 index 1671fc4362..0000000000 --- a/Lang/Rebol/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Euler-method b/Lang/Rebol/Euler-method deleted file mode 120000 index d587d93232..0000000000 --- a/Lang/Rebol/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Eulers-constant-0.5772... b/Lang/Rebol/Eulers-constant-0.5772... deleted file mode 120000 index 02917c130f..0000000000 --- a/Lang/Rebol/Eulers-constant-0.5772... +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eulers-constant-0.5772.../Rebol \ No newline at end of file diff --git a/Lang/Rebol/Evolutionary-algorithm b/Lang/Rebol/Evolutionary-algorithm deleted file mode 120000 index ccdf89518f..0000000000 --- a/Lang/Rebol/Evolutionary-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evolutionary-algorithm/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Execute-Brain- b/Lang/Rebol/Execute-Brain- deleted file mode 120000 index 60bfe033c3..0000000000 --- a/Lang/Rebol/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Execute-a-system-command b/Lang/Rebol/Execute-a-system-command deleted file mode 120000 index 14651b49c9..0000000000 --- a/Lang/Rebol/Execute-a-system-command +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-a-system-command/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Exponentiation-order b/Lang/Rebol/Exponentiation-order deleted file mode 120000 index 852ef49526..0000000000 --- a/Lang/Rebol/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/Rebol \ No newline at end of file diff --git a/Lang/Rebol/FASTA-format b/Lang/Rebol/FASTA-format deleted file mode 120000 index 40d663436d..0000000000 --- a/Lang/Rebol/FASTA-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/FASTA-format/Rebol \ No newline at end of file diff --git a/Lang/Rebol/FTP b/Lang/Rebol/FTP deleted file mode 120000 index 3480e1937d..0000000000 --- a/Lang/Rebol/FTP +++ /dev/null @@ -1 +0,0 @@ -../../Task/FTP/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Factorial b/Lang/Rebol/Factorial deleted file mode 120000 index 359724a1fc..0000000000 --- a/Lang/Rebol/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Factors-of-an-integer b/Lang/Rebol/Factors-of-an-integer deleted file mode 120000 index 9d42008357..0000000000 --- a/Lang/Rebol/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Fibonacci-sequence b/Lang/Rebol/Fibonacci-sequence deleted file mode 120000 index f57b59f681..0000000000 --- a/Lang/Rebol/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Rebol \ No newline at end of file diff --git a/Lang/Rebol/File-input-output b/Lang/Rebol/File-input-output deleted file mode 120000 index b8c077dcb5..0000000000 --- a/Lang/Rebol/File-input-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-input-output/Rebol \ No newline at end of file diff --git a/Lang/Rebol/File-size b/Lang/Rebol/File-size deleted file mode 120000 index 896b2c8e3b..0000000000 --- a/Lang/Rebol/File-size +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-size/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Filter b/Lang/Rebol/Filter deleted file mode 120000 index eaf8ebe826..0000000000 --- a/Lang/Rebol/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Find-the-last-Sunday-of-each-month b/Lang/Rebol/Find-the-last-Sunday-of-each-month deleted file mode 120000 index d3b115bfb8..0000000000 --- a/Lang/Rebol/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/Rebol \ No newline at end of file diff --git a/Lang/Rebol/First-class-functions b/Lang/Rebol/First-class-functions deleted file mode 120000 index 5b2c2417e0..0000000000 --- a/Lang/Rebol/First-class-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions/Rebol \ No newline at end of file diff --git a/Lang/Rebol/First-class-functions-Use-numbers-analogously b/Lang/Rebol/First-class-functions-Use-numbers-analogously deleted file mode 120000 index de2ebe8414..0000000000 --- a/Lang/Rebol/First-class-functions-Use-numbers-analogously +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions-Use-numbers-analogously/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Five-weekends b/Lang/Rebol/Five-weekends deleted file mode 120000 index 01c1c36611..0000000000 --- a/Lang/Rebol/Five-weekends +++ /dev/null @@ -1 +0,0 @@ -../../Task/Five-weekends/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Fixed-length-records b/Lang/Rebol/Fixed-length-records deleted file mode 120000 index 9039851f51..0000000000 --- a/Lang/Rebol/Fixed-length-records +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fixed-length-records/Rebol \ No newline at end of file diff --git a/Lang/Rebol/FizzBuzz b/Lang/Rebol/FizzBuzz deleted file mode 120000 index eab06ab9bd..0000000000 --- a/Lang/Rebol/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Flatten-a-list b/Lang/Rebol/Flatten-a-list deleted file mode 120000 index c1a20ef65d..0000000000 --- a/Lang/Rebol/Flatten-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flatten-a-list/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Flow-control-structures b/Lang/Rebol/Flow-control-structures deleted file mode 120000 index 07ef2d4ad0..0000000000 --- a/Lang/Rebol/Flow-control-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flow-control-structures/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Formatted-numeric-output b/Lang/Rebol/Formatted-numeric-output deleted file mode 120000 index 7f83bb070c..0000000000 --- a/Lang/Rebol/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Fractal-tree b/Lang/Rebol/Fractal-tree deleted file mode 120000 index dc8b11466f..0000000000 --- a/Lang/Rebol/Fractal-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractal-tree/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Fraction-reduction b/Lang/Rebol/Fraction-reduction deleted file mode 120000 index b0104cd06a..0000000000 --- a/Lang/Rebol/Fraction-reduction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fraction-reduction/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Fractran b/Lang/Rebol/Fractran deleted file mode 120000 index 9377d42c62..0000000000 --- a/Lang/Rebol/Fractran +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractran/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Function-composition b/Lang/Rebol/Function-composition deleted file mode 120000 index 76d75e3285..0000000000 --- a/Lang/Rebol/Function-composition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-composition/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Function-definition b/Lang/Rebol/Function-definition deleted file mode 120000 index 70c2821920..0000000000 --- a/Lang/Rebol/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Gapful-numbers b/Lang/Rebol/Gapful-numbers deleted file mode 120000 index 68fbc7017f..0000000000 --- a/Lang/Rebol/Gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gapful-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Generic-swap b/Lang/Rebol/Generic-swap deleted file mode 120000 index 283afac298..0000000000 --- a/Lang/Rebol/Generic-swap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generic-swap/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Get-system-command-output b/Lang/Rebol/Get-system-command-output deleted file mode 120000 index 62cff72de6..0000000000 --- a/Lang/Rebol/Get-system-command-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Get-system-command-output/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Globally-replace-text-in-several-files b/Lang/Rebol/Globally-replace-text-in-several-files deleted file mode 120000 index 03354f183a..0000000000 --- a/Lang/Rebol/Globally-replace-text-in-several-files +++ /dev/null @@ -1 +0,0 @@ -../../Task/Globally-replace-text-in-several-files/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Go-Fish b/Lang/Rebol/Go-Fish deleted file mode 120000 index 7c0ef6e6d5..0000000000 --- a/Lang/Rebol/Go-Fish +++ /dev/null @@ -1 +0,0 @@ -../../Task/Go-Fish/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Greatest-common-divisor b/Lang/Rebol/Greatest-common-divisor deleted file mode 120000 index e924b899c0..0000000000 --- a/Lang/Rebol/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Greatest-element-of-a-list b/Lang/Rebol/Greatest-element-of-a-list deleted file mode 120000 index e262faf6c6..0000000000 --- a/Lang/Rebol/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/Rebol \ No newline at end of file diff --git a/Lang/Rebol/HTTP b/Lang/Rebol/HTTP deleted file mode 120000 index f7583ff32a..0000000000 --- a/Lang/Rebol/HTTP +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTP/Rebol \ No newline at end of file diff --git a/Lang/Rebol/HTTPS b/Lang/Rebol/HTTPS deleted file mode 120000 index 39a4cf4015..0000000000 --- a/Lang/Rebol/HTTPS +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS/Rebol \ No newline at end of file diff --git a/Lang/Rebol/HTTPS-Authenticated b/Lang/Rebol/HTTPS-Authenticated deleted file mode 120000 index 325f33d148..0000000000 --- a/Lang/Rebol/HTTPS-Authenticated +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS-Authenticated/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Hailstone-sequence b/Lang/Rebol/Hailstone-sequence deleted file mode 120000 index 52670d11f8..0000000000 --- a/Lang/Rebol/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Halt-and-catch-fire b/Lang/Rebol/Halt-and-catch-fire deleted file mode 120000 index 4e21d500fa..0000000000 --- a/Lang/Rebol/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Handle-a-signal b/Lang/Rebol/Handle-a-signal deleted file mode 120000 index 67b30c2214..0000000000 --- a/Lang/Rebol/Handle-a-signal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Handle-a-signal/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Hash-from-two-arrays b/Lang/Rebol/Hash-from-two-arrays deleted file mode 120000 index de8389960e..0000000000 --- a/Lang/Rebol/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Hash-join b/Lang/Rebol/Hash-join deleted file mode 120000 index 02b63d13c7..0000000000 --- a/Lang/Rebol/Hash-join +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-join/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Hello-world-Graphical b/Lang/Rebol/Hello-world-Graphical deleted file mode 120000 index e8f4608f84..0000000000 --- a/Lang/Rebol/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Hello-world-Newline-omission b/Lang/Rebol/Hello-world-Newline-omission deleted file mode 120000 index 2762747194..0000000000 --- a/Lang/Rebol/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Hello-world-Text b/Lang/Rebol/Hello-world-Text deleted file mode 120000 index 2b783947da..0000000000 --- a/Lang/Rebol/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Higher-order-functions b/Lang/Rebol/Higher-order-functions deleted file mode 120000 index 6c4634db1c..0000000000 --- a/Lang/Rebol/Higher-order-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Higher-order-functions/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Horners-rule-for-polynomial-evaluation b/Lang/Rebol/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 2e9d363a9e..0000000000 --- a/Lang/Rebol/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Hostname b/Lang/Rebol/Hostname deleted file mode 120000 index 3effe6dbed..0000000000 --- a/Lang/Rebol/Hostname +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hostname/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Huffman-coding b/Lang/Rebol/Huffman-coding deleted file mode 120000 index 545f0a329b..0000000000 --- a/Lang/Rebol/Huffman-coding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Huffman-coding/Rebol \ No newline at end of file diff --git a/Lang/Rebol/I-before-E-except-after-C b/Lang/Rebol/I-before-E-except-after-C deleted file mode 120000 index e2b7750d9c..0000000000 --- a/Lang/Rebol/I-before-E-except-after-C +++ /dev/null @@ -1 +0,0 @@ -../../Task/I-before-E-except-after-C/Rebol \ No newline at end of file diff --git a/Lang/Rebol/ISBN13-check-digit b/Lang/Rebol/ISBN13-check-digit deleted file mode 120000 index aef47eac0f..0000000000 --- a/Lang/Rebol/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Identity-matrix b/Lang/Rebol/Identity-matrix deleted file mode 120000 index 6dfa288d93..0000000000 --- a/Lang/Rebol/Identity-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Identity-matrix/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Image-noise b/Lang/Rebol/Image-noise deleted file mode 120000 index a58b511104..0000000000 --- a/Lang/Rebol/Image-noise +++ /dev/null @@ -1 +0,0 @@ -../../Task/Image-noise/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Increment-a-numerical-string b/Lang/Rebol/Increment-a-numerical-string deleted file mode 120000 index 1d874b5b6c..0000000000 --- a/Lang/Rebol/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Inheritance-Single b/Lang/Rebol/Inheritance-Single deleted file mode 120000 index 0d3eb9573f..0000000000 --- a/Lang/Rebol/Inheritance-Single +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Single/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Input-loop b/Lang/Rebol/Input-loop deleted file mode 120000 index 62007f0b87..0000000000 --- a/Lang/Rebol/Input-loop +++ /dev/null @@ -1 +0,0 @@ -../../Task/Input-loop/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Integer-comparison b/Lang/Rebol/Integer-comparison deleted file mode 120000 index 7349100994..0000000000 --- a/Lang/Rebol/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Integer-overflow b/Lang/Rebol/Integer-overflow deleted file mode 120000 index 8caca51571..0000000000 --- a/Lang/Rebol/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Interactive-programming-repl- b/Lang/Rebol/Interactive-programming-repl- deleted file mode 120000 index e63ccabe70..0000000000 --- a/Lang/Rebol/Interactive-programming-repl- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Interactive-programming-repl-/Rebol \ No newline at end of file diff --git a/Lang/Rebol/JSON b/Lang/Rebol/JSON deleted file mode 120000 index 8bd9ae2a02..0000000000 --- a/Lang/Rebol/JSON +++ /dev/null @@ -1 +0,0 @@ -../../Task/JSON/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Jacobsthal-numbers b/Lang/Rebol/Jacobsthal-numbers deleted file mode 120000 index 0faf5cccbd..0000000000 --- a/Lang/Rebol/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Jewels-and-stones b/Lang/Rebol/Jewels-and-stones deleted file mode 120000 index b876a95e71..0000000000 --- a/Lang/Rebol/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Josephus-problem b/Lang/Rebol/Josephus-problem deleted file mode 120000 index 0a4a059418..0000000000 --- a/Lang/Rebol/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Keyboard-macros b/Lang/Rebol/Keyboard-macros deleted file mode 120000 index 6090099e1c..0000000000 --- a/Lang/Rebol/Keyboard-macros +++ /dev/null @@ -1 +0,0 @@ -../../Task/Keyboard-macros/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Knapsack-problem-0-1 b/Lang/Rebol/Knapsack-problem-0-1 deleted file mode 120000 index a86da2e20d..0000000000 --- a/Lang/Rebol/Knapsack-problem-0-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-0-1/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Knapsack-problem-Bounded b/Lang/Rebol/Knapsack-problem-Bounded deleted file mode 120000 index 75ecc0ad88..0000000000 --- a/Lang/Rebol/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Knapsack-problem-Continuous b/Lang/Rebol/Knapsack-problem-Continuous deleted file mode 120000 index d2d9139eb3..0000000000 --- a/Lang/Rebol/Knapsack-problem-Continuous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Continuous/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Knapsack-problem-Unbounded b/Lang/Rebol/Knapsack-problem-Unbounded deleted file mode 120000 index 05a28b3b91..0000000000 --- a/Lang/Rebol/Knapsack-problem-Unbounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Unbounded/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Knights-tour b/Lang/Rebol/Knights-tour deleted file mode 120000 index 71e91ef802..0000000000 --- a/Lang/Rebol/Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knights-tour/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Knuth-shuffle b/Lang/Rebol/Knuth-shuffle deleted file mode 120000 index 34c5744ed5..0000000000 --- a/Lang/Rebol/Knuth-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuth-shuffle/Rebol \ No newline at end of file diff --git a/Lang/Rebol/LZW-compression b/Lang/Rebol/LZW-compression deleted file mode 120000 index 6ef643485d..0000000000 --- a/Lang/Rebol/LZW-compression +++ /dev/null @@ -1 +0,0 @@ -../../Task/LZW-compression/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Largest-number-divisible-by-its-digits b/Lang/Rebol/Largest-number-divisible-by-its-digits deleted file mode 120000 index ded7dc4f52..0000000000 --- a/Lang/Rebol/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Last-Friday-of-each-month b/Lang/Rebol/Last-Friday-of-each-month deleted file mode 120000 index 22f9e289f1..0000000000 --- a/Lang/Rebol/Last-Friday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-Friday-of-each-month/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Leap-year b/Lang/Rebol/Leap-year deleted file mode 120000 index fe28d10471..0000000000 --- a/Lang/Rebol/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Letter-frequency b/Lang/Rebol/Letter-frequency deleted file mode 120000 index f821174d22..0000000000 --- a/Lang/Rebol/Letter-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Letter-frequency/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Levenshtein-distance b/Lang/Rebol/Levenshtein-distance deleted file mode 120000 index 8eb20cd9e5..0000000000 --- a/Lang/Rebol/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Literals-Floating-point b/Lang/Rebol/Literals-Floating-point deleted file mode 120000 index 446f0ca13c..0000000000 --- a/Lang/Rebol/Literals-Floating-point +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Floating-point/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Literals-Integer b/Lang/Rebol/Literals-Integer deleted file mode 120000 index 61eb2276ad..0000000000 --- a/Lang/Rebol/Literals-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Integer/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Logical-operations b/Lang/Rebol/Logical-operations deleted file mode 120000 index 4ccc093b6a..0000000000 --- a/Lang/Rebol/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Look-and-say-sequence b/Lang/Rebol/Look-and-say-sequence deleted file mode 120000 index 5af8fa2fe8..0000000000 --- a/Lang/Rebol/Look-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Look-and-say-sequence/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loop-over-multiple-arrays-simultaneously b/Lang/Rebol/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index 7e8df4a406..0000000000 --- a/Lang/Rebol/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Break b/Lang/Rebol/Loops-Break deleted file mode 120000 index a7d70b8ddf..0000000000 --- a/Lang/Rebol/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Continue b/Lang/Rebol/Loops-Continue deleted file mode 120000 index eb55ae4a46..0000000000 --- a/Lang/Rebol/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Do-while b/Lang/Rebol/Loops-Do-while deleted file mode 120000 index 7b9c11e6c9..0000000000 --- a/Lang/Rebol/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Downward-for b/Lang/Rebol/Loops-Downward-for deleted file mode 120000 index aabadccc5d..0000000000 --- a/Lang/Rebol/Loops-Downward-for +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Downward-for/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-For b/Lang/Rebol/Loops-For deleted file mode 120000 index 3441cbf3e4..0000000000 --- a/Lang/Rebol/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-For-with-a-specified-step b/Lang/Rebol/Loops-For-with-a-specified-step deleted file mode 120000 index 48cddeed7c..0000000000 --- a/Lang/Rebol/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Foreach b/Lang/Rebol/Loops-Foreach deleted file mode 120000 index 5113646d4a..0000000000 --- a/Lang/Rebol/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Increment-loop-index-within-loop-body b/Lang/Rebol/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index 2a105f8219..0000000000 --- a/Lang/Rebol/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Infinite b/Lang/Rebol/Loops-Infinite deleted file mode 120000 index b9782bb44c..0000000000 --- a/Lang/Rebol/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-N-plus-one-half b/Lang/Rebol/Loops-N-plus-one-half deleted file mode 120000 index fde94d5278..0000000000 --- a/Lang/Rebol/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Nested b/Lang/Rebol/Loops-Nested deleted file mode 120000 index 8570918c54..0000000000 --- a/Lang/Rebol/Loops-Nested +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Nested/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-While b/Lang/Rebol/Loops-While deleted file mode 120000 index d6ae658607..0000000000 --- a/Lang/Rebol/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-With-multiple-ranges b/Lang/Rebol/Loops-With-multiple-ranges deleted file mode 120000 index 1444c994ba..0000000000 --- a/Lang/Rebol/Loops-With-multiple-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-With-multiple-ranges/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Loops-Wrong-ranges b/Lang/Rebol/Loops-Wrong-ranges deleted file mode 120000 index 8c6fabb9b5..0000000000 --- a/Lang/Rebol/Loops-Wrong-ranges +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Wrong-ranges/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Ludic-numbers b/Lang/Rebol/Ludic-numbers deleted file mode 120000 index a4ebabb376..0000000000 --- a/Lang/Rebol/Ludic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ludic-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Luhn-test-of-credit-card-numbers b/Lang/Rebol/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 54db6d0086..0000000000 --- a/Lang/Rebol/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Lychrel-numbers b/Lang/Rebol/Lychrel-numbers deleted file mode 120000 index a9ccc00139..0000000000 --- a/Lang/Rebol/Lychrel-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lychrel-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/MAC-vendor-lookup b/Lang/Rebol/MAC-vendor-lookup deleted file mode 120000 index ea5da48c4a..0000000000 --- a/Lang/Rebol/MAC-vendor-lookup +++ /dev/null @@ -1 +0,0 @@ -../../Task/MAC-vendor-lookup/Rebol \ No newline at end of file diff --git a/Lang/Rebol/MD5 b/Lang/Rebol/MD5 deleted file mode 120000 index 8e783d3330..0000000000 --- a/Lang/Rebol/MD5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD5/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Mad-Libs b/Lang/Rebol/Mad-Libs deleted file mode 120000 index e503266ac3..0000000000 --- a/Lang/Rebol/Mad-Libs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mad-Libs/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Mandelbrot-set b/Lang/Rebol/Mandelbrot-set deleted file mode 120000 index 9795649798..0000000000 --- a/Lang/Rebol/Mandelbrot-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mandelbrot-set/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Mayan-numerals b/Lang/Rebol/Mayan-numerals deleted file mode 120000 index f3c3f1ac1b..0000000000 --- a/Lang/Rebol/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Maze-generation b/Lang/Rebol/Maze-generation deleted file mode 120000 index 16909e3bd3..0000000000 --- a/Lang/Rebol/Maze-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maze-generation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Menu b/Lang/Rebol/Menu deleted file mode 120000 index 0970cb6584..0000000000 --- a/Lang/Rebol/Menu +++ /dev/null @@ -1 +0,0 @@ -../../Task/Menu/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Morse-code b/Lang/Rebol/Morse-code deleted file mode 120000 index 9b184a4368..0000000000 --- a/Lang/Rebol/Morse-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Morse-code/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Multiplication-tables b/Lang/Rebol/Multiplication-tables deleted file mode 120000 index 19c593899a..0000000000 --- a/Lang/Rebol/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Mutual-recursion b/Lang/Rebol/Mutual-recursion deleted file mode 120000 index 3927e2e3d0..0000000000 --- a/Lang/Rebol/Mutual-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mutual-recursion/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Nim-game b/Lang/Rebol/Nim-game deleted file mode 120000 index 3d509e2da0..0000000000 --- a/Lang/Rebol/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Null-object b/Lang/Rebol/Null-object deleted file mode 120000 index 6d91c61493..0000000000 --- a/Lang/Rebol/Null-object +++ /dev/null @@ -1 +0,0 @@ -../../Task/Null-object/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Number-reversal-game b/Lang/Rebol/Number-reversal-game deleted file mode 120000 index 225b967208..0000000000 --- a/Lang/Rebol/Number-reversal-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Number-reversal-game/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Object-serialization b/Lang/Rebol/Object-serialization deleted file mode 120000 index b546950e51..0000000000 --- a/Lang/Rebol/Object-serialization +++ /dev/null @@ -1 +0,0 @@ -../../Task/Object-serialization/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Ordered-words b/Lang/Rebol/Ordered-words deleted file mode 120000 index 62492c8748..0000000000 --- a/Lang/Rebol/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Padovan-n-step-number-sequences b/Lang/Rebol/Padovan-n-step-number-sequences deleted file mode 120000 index 6ce6076d9f..0000000000 --- a/Lang/Rebol/Padovan-n-step-number-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Padovan-n-step-number-sequences/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Palindrome-detection b/Lang/Rebol/Palindrome-detection deleted file mode 120000 index 976abf960a..0000000000 --- a/Lang/Rebol/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Palindromic-gapful-numbers b/Lang/Rebol/Palindromic-gapful-numbers deleted file mode 120000 index ce1a9844df..0000000000 --- a/Lang/Rebol/Palindromic-gapful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindromic-gapful-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Parsing-Shunting-yard-algorithm b/Lang/Rebol/Parsing-Shunting-yard-algorithm deleted file mode 120000 index b48c2dd4c0..0000000000 --- a/Lang/Rebol/Parsing-Shunting-yard-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-Shunting-yard-algorithm/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Pentagram b/Lang/Rebol/Pentagram deleted file mode 120000 index 707cf04e6c..0000000000 --- a/Lang/Rebol/Pentagram +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pentagram/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Percentage-difference-between-images b/Lang/Rebol/Percentage-difference-between-images deleted file mode 120000 index 4b4ccc789a..0000000000 --- a/Lang/Rebol/Percentage-difference-between-images +++ /dev/null @@ -1 +0,0 @@ -../../Task/Percentage-difference-between-images/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Perfect-numbers b/Lang/Rebol/Perfect-numbers deleted file mode 120000 index cc7bf3b1d8..0000000000 --- a/Lang/Rebol/Perfect-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Permutation-test b/Lang/Rebol/Permutation-test deleted file mode 120000 index 33aca0c009..0000000000 --- a/Lang/Rebol/Permutation-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutation-test/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Pick-random-element b/Lang/Rebol/Pick-random-element deleted file mode 120000 index a63070b88e..0000000000 --- a/Lang/Rebol/Pick-random-element +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pick-random-element/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Playing-cards b/Lang/Rebol/Playing-cards deleted file mode 120000 index 77a603d4f6..0000000000 --- a/Lang/Rebol/Playing-cards +++ /dev/null @@ -1 +0,0 @@ -../../Task/Playing-cards/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Poker-hand-analyser b/Lang/Rebol/Poker-hand-analyser deleted file mode 120000 index cd92bc4893..0000000000 --- a/Lang/Rebol/Poker-hand-analyser +++ /dev/null @@ -1 +0,0 @@ -../../Task/Poker-hand-analyser/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Polyspiral b/Lang/Rebol/Polyspiral deleted file mode 120000 index a68aec96f7..0000000000 --- a/Lang/Rebol/Polyspiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polyspiral/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Primality-by-trial-division b/Lang/Rebol/Primality-by-trial-division deleted file mode 120000 index efa17720e9..0000000000 --- a/Lang/Rebol/Primality-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-trial-division/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Program-termination b/Lang/Rebol/Program-termination deleted file mode 120000 index 24f49d0325..0000000000 --- a/Lang/Rebol/Program-termination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-termination/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Pythagoras-tree b/Lang/Rebol/Pythagoras-tree deleted file mode 120000 index f30dc63938..0000000000 --- a/Lang/Rebol/Pythagoras-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagoras-tree/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Queue-Definition b/Lang/Rebol/Queue-Definition deleted file mode 120000 index 162ba667c2..0000000000 --- a/Lang/Rebol/Queue-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Queue-Definition/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Queue-Usage b/Lang/Rebol/Queue-Usage deleted file mode 120000 index f4c7c7a4c3..0000000000 --- a/Lang/Rebol/Queue-Usage +++ /dev/null @@ -1 +0,0 @@ -../../Task/Queue-Usage/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Quine b/Lang/Rebol/Quine deleted file mode 120000 index 27b88ad2ff..0000000000 --- a/Lang/Rebol/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Quoting-constructs b/Lang/Rebol/Quoting-constructs deleted file mode 120000 index cfd2d459f0..0000000000 --- a/Lang/Rebol/Quoting-constructs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quoting-constructs/Rebol \ No newline at end of file diff --git a/Lang/Rebol/RPG-attributes-generator b/Lang/Rebol/RPG-attributes-generator deleted file mode 120000 index b156c392e1..0000000000 --- a/Lang/Rebol/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Read-a-specific-line-from-a-file b/Lang/Rebol/Read-a-specific-line-from-a-file deleted file mode 120000 index 14a1597027..0000000000 --- a/Lang/Rebol/Read-a-specific-line-from-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-specific-line-from-a-file/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Read-entire-file b/Lang/Rebol/Read-entire-file deleted file mode 120000 index 28b35bf7cc..0000000000 --- a/Lang/Rebol/Read-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-entire-file/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Recamans-sequence b/Lang/Rebol/Recamans-sequence deleted file mode 120000 index bfdd733327..0000000000 --- a/Lang/Rebol/Recamans-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Recamans-sequence/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Reduced-row-echelon-form b/Lang/Rebol/Reduced-row-echelon-form deleted file mode 120000 index 743fe9cee3..0000000000 --- a/Lang/Rebol/Reduced-row-echelon-form +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reduced-row-echelon-form/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Regular-expressions b/Lang/Rebol/Regular-expressions deleted file mode 120000 index 8b6a46c176..0000000000 --- a/Lang/Rebol/Regular-expressions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Regular-expressions/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Remove-duplicate-elements b/Lang/Rebol/Remove-duplicate-elements deleted file mode 120000 index e15cb15fa9..0000000000 --- a/Lang/Rebol/Remove-duplicate-elements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Remove-duplicate-elements/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Rename-a-file b/Lang/Rebol/Rename-a-file deleted file mode 120000 index b1a36bd846..0000000000 --- a/Lang/Rebol/Rename-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rename-a-file/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Repeat-a-string b/Lang/Rebol/Repeat-a-string deleted file mode 120000 index ef9fbbc4ad..0000000000 --- a/Lang/Rebol/Repeat-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat-a-string/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Reverse-a-string b/Lang/Rebol/Reverse-a-string deleted file mode 120000 index 58f8abd089..0000000000 --- a/Lang/Rebol/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Rock-paper-scissors b/Lang/Rebol/Rock-paper-scissors deleted file mode 120000 index cda68fe0a1..0000000000 --- a/Lang/Rebol/Rock-paper-scissors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rock-paper-scissors/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Rosetta-Code-Count-examples b/Lang/Rebol/Rosetta-Code-Count-examples deleted file mode 120000 index d0380c9f7b..0000000000 --- a/Lang/Rebol/Rosetta-Code-Count-examples +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Count-examples/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Rosetta-Code-Find-unimplemented-tasks b/Lang/Rebol/Rosetta-Code-Find-unimplemented-tasks deleted file mode 120000 index 24ea450c68..0000000000 --- a/Lang/Rebol/Rosetta-Code-Find-unimplemented-tasks +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Find-unimplemented-tasks/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Rosetta-Code-Rank-languages-by-popularity b/Lang/Rebol/Rosetta-Code-Rank-languages-by-popularity deleted file mode 120000 index fab9075fea..0000000000 --- a/Lang/Rebol/Rosetta-Code-Rank-languages-by-popularity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Rank-languages-by-popularity/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Rot-13 b/Lang/Rebol/Rot-13 deleted file mode 120000 index 237e499a3f..0000000000 --- a/Lang/Rebol/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Runtime-evaluation b/Lang/Rebol/Runtime-evaluation deleted file mode 120000 index b5e1f8ecde..0000000000 --- a/Lang/Rebol/Runtime-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Runtime-evaluation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Runtime-evaluation-In-an-environment b/Lang/Rebol/Runtime-evaluation-In-an-environment deleted file mode 120000 index f0cf1819d7..0000000000 --- a/Lang/Rebol/Runtime-evaluation-In-an-environment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Runtime-evaluation-In-an-environment/Rebol \ No newline at end of file diff --git a/Lang/Rebol/SHA-1 b/Lang/Rebol/SHA-1 deleted file mode 120000 index 6006c706a1..0000000000 --- a/Lang/Rebol/SHA-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-1/Rebol \ No newline at end of file diff --git a/Lang/Rebol/SHA-256 b/Lang/Rebol/SHA-256 deleted file mode 120000 index a282c64fe3..0000000000 --- a/Lang/Rebol/SHA-256 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-256/Rebol \ No newline at end of file diff --git a/Lang/Rebol/SHA-256-Merkle-tree b/Lang/Rebol/SHA-256-Merkle-tree deleted file mode 120000 index 3ec6fddf77..0000000000 --- a/Lang/Rebol/SHA-256-Merkle-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-256-Merkle-tree/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Search-a-list b/Lang/Rebol/Search-a-list deleted file mode 120000 index 318894f6a3..0000000000 --- a/Lang/Rebol/Search-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Search-a-list/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Self-describing-numbers b/Lang/Rebol/Self-describing-numbers deleted file mode 120000 index e068493027..0000000000 --- a/Lang/Rebol/Self-describing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Self-describing-numbers/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Semordnilap b/Lang/Rebol/Semordnilap deleted file mode 120000 index 0da3f78b6d..0000000000 --- a/Lang/Rebol/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Send-email b/Lang/Rebol/Send-email deleted file mode 120000 index bdcdb84d73..0000000000 --- a/Lang/Rebol/Send-email +++ /dev/null @@ -1 +0,0 @@ -../../Task/Send-email/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Shell-one-liner b/Lang/Rebol/Shell-one-liner deleted file mode 120000 index d93fe376ad..0000000000 --- a/Lang/Rebol/Shell-one-liner +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shell-one-liner/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Show-ASCII-table b/Lang/Rebol/Show-ASCII-table deleted file mode 120000 index 73b59f4704..0000000000 --- a/Lang/Rebol/Show-ASCII-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Show-ASCII-table/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sieve-of-Eratosthenes b/Lang/Rebol/Sieve-of-Eratosthenes deleted file mode 120000 index 304a7c5cc4..0000000000 --- a/Lang/Rebol/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sieve-of-Pritchard b/Lang/Rebol/Sieve-of-Pritchard deleted file mode 120000 index ae2da5fd4b..0000000000 --- a/Lang/Rebol/Sieve-of-Pritchard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Pritchard/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Simple-database b/Lang/Rebol/Simple-database deleted file mode 120000 index 91cc755165..0000000000 --- a/Lang/Rebol/Simple-database +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-database/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Simple-windowed-application b/Lang/Rebol/Simple-windowed-application deleted file mode 120000 index 9329534018..0000000000 --- a/Lang/Rebol/Simple-windowed-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-windowed-application/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sleep b/Lang/Rebol/Sleep deleted file mode 120000 index 93ccbde879..0000000000 --- a/Lang/Rebol/Sleep +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleep/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sort-an-integer-array b/Lang/Rebol/Sort-an-integer-array deleted file mode 120000 index 964bc28a49..0000000000 --- a/Lang/Rebol/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sort-stability b/Lang/Rebol/Sort-stability deleted file mode 120000 index 398ebf99ce..0000000000 --- a/Lang/Rebol/Sort-stability +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-stability/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sorting-algorithms-Gnome-sort b/Lang/Rebol/Sorting-algorithms-Gnome-sort deleted file mode 120000 index 5a1b4b5c4b..0000000000 --- a/Lang/Rebol/Sorting-algorithms-Gnome-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Gnome-sort/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sorting-algorithms-Insertion-sort b/Lang/Rebol/Sorting-algorithms-Insertion-sort deleted file mode 120000 index 542842155d..0000000000 --- a/Lang/Rebol/Sorting-algorithms-Insertion-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Insertion-sort/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sorting-algorithms-Merge-sort b/Lang/Rebol/Sorting-algorithms-Merge-sort deleted file mode 120000 index c0e13b1fde..0000000000 --- a/Lang/Rebol/Sorting-algorithms-Merge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Merge-sort/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sorting-algorithms-Stooge-sort b/Lang/Rebol/Sorting-algorithms-Stooge-sort deleted file mode 120000 index 330c056497..0000000000 --- a/Lang/Rebol/Sorting-algorithms-Stooge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Stooge-sort/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Spiral-matrix b/Lang/Rebol/Spiral-matrix deleted file mode 120000 index 5be66bebd7..0000000000 --- a/Lang/Rebol/Spiral-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spiral-matrix/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Stack b/Lang/Rebol/Stack deleted file mode 120000 index 4ddf42dff7..0000000000 --- a/Lang/Rebol/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Stair-climbing-puzzle b/Lang/Rebol/Stair-climbing-puzzle deleted file mode 120000 index 30110c39ff..0000000000 --- a/Lang/Rebol/Stair-climbing-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stair-climbing-puzzle/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Statistics-Normal-distribution b/Lang/Rebol/Statistics-Normal-distribution deleted file mode 120000 index c2c6f8e607..0000000000 --- a/Lang/Rebol/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Straddling-checkerboard b/Lang/Rebol/Straddling-checkerboard deleted file mode 120000 index b2cd63efdf..0000000000 --- a/Lang/Rebol/Straddling-checkerboard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Straddling-checkerboard/Rebol \ No newline at end of file diff --git a/Lang/Rebol/String-case b/Lang/Rebol/String-case deleted file mode 120000 index 99d32eb89d..0000000000 --- a/Lang/Rebol/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/Rebol \ No newline at end of file diff --git a/Lang/Rebol/String-concatenation b/Lang/Rebol/String-concatenation deleted file mode 120000 index 60e5df3a60..0000000000 --- a/Lang/Rebol/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/String-interpolation-included- b/Lang/Rebol/String-interpolation-included- deleted file mode 120000 index 0d16a99c3d..0000000000 --- a/Lang/Rebol/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/Rebol \ No newline at end of file diff --git a/Lang/Rebol/String-length b/Lang/Rebol/String-length deleted file mode 120000 index 4008031d32..0000000000 --- a/Lang/Rebol/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Strip-comments-from-a-string b/Lang/Rebol/Strip-comments-from-a-string deleted file mode 120000 index 7d0be8f55b..0000000000 --- a/Lang/Rebol/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Substring b/Lang/Rebol/Substring deleted file mode 120000 index 16d8520df3..0000000000 --- a/Lang/Rebol/Substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Sum-and-product-of-an-array b/Lang/Rebol/Sum-and-product-of-an-array deleted file mode 120000 index f0691c6c52..0000000000 --- a/Lang/Rebol/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Symmetric-difference b/Lang/Rebol/Symmetric-difference deleted file mode 120000 index ead8d7c53a..0000000000 --- a/Lang/Rebol/Symmetric-difference +++ /dev/null @@ -1 +0,0 @@ -../../Task/Symmetric-difference/Rebol \ No newline at end of file diff --git a/Lang/Rebol/System-time b/Lang/Rebol/System-time deleted file mode 120000 index 26192d37e7..0000000000 --- a/Lang/Rebol/System-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/System-time/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Take-notes-on-the-command-line b/Lang/Rebol/Take-notes-on-the-command-line deleted file mode 120000 index 686f0e9609..0000000000 --- a/Lang/Rebol/Take-notes-on-the-command-line +++ /dev/null @@ -1 +0,0 @@ -../../Task/Take-notes-on-the-command-line/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Terminal-control-Clear-the-screen b/Lang/Rebol/Terminal-control-Clear-the-screen deleted file mode 120000 index 26092c08d5..0000000000 --- a/Lang/Rebol/Terminal-control-Clear-the-screen +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Clear-the-screen/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Terminal-control-Coloured-text b/Lang/Rebol/Terminal-control-Coloured-text deleted file mode 120000 index 91c395fe7a..0000000000 --- a/Lang/Rebol/Terminal-control-Coloured-text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Coloured-text/Rebol \ No newline at end of file diff --git a/Lang/Rebol/The-Twelve-Days-of-Christmas b/Lang/Rebol/The-Twelve-Days-of-Christmas deleted file mode 120000 index 1cd8cfb663..0000000000 --- a/Lang/Rebol/The-Twelve-Days-of-Christmas +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Twelve-Days-of-Christmas/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Tokenize-a-string b/Lang/Rebol/Tokenize-a-string deleted file mode 120000 index 683933fc1a..0000000000 --- a/Lang/Rebol/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Towers-of-Hanoi b/Lang/Rebol/Towers-of-Hanoi deleted file mode 120000 index 256a976fba..0000000000 --- a/Lang/Rebol/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Transliterate-English-text-using-the-Greek-alphabet b/Lang/Rebol/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index 6cd5a9fcd9..0000000000 --- a/Lang/Rebol/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Tree-traversal b/Lang/Rebol/Tree-traversal deleted file mode 120000 index a9acbc3e12..0000000000 --- a/Lang/Rebol/Tree-traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-traversal/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Trigonometric-functions b/Lang/Rebol/Trigonometric-functions deleted file mode 120000 index 31689c9f7b..0000000000 --- a/Lang/Rebol/Trigonometric-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trigonometric-functions/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Truncate-a-file b/Lang/Rebol/Truncate-a-file deleted file mode 120000 index a6b1c49090..0000000000 --- a/Lang/Rebol/Truncate-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncate-a-file/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Twos-complement b/Lang/Rebol/Twos-complement deleted file mode 120000 index 7d177dca86..0000000000 --- a/Lang/Rebol/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Rebol \ No newline at end of file diff --git a/Lang/Rebol/URL-decoding b/Lang/Rebol/URL-decoding deleted file mode 120000 index 13aaaaf76d..0000000000 --- a/Lang/Rebol/URL-decoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-decoding/Rebol \ No newline at end of file diff --git a/Lang/Rebol/URL-encoding b/Lang/Rebol/URL-encoding deleted file mode 120000 index f2738b2378..0000000000 --- a/Lang/Rebol/URL-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-encoding/Rebol \ No newline at end of file diff --git a/Lang/Rebol/User-input-Graphical b/Lang/Rebol/User-input-Graphical deleted file mode 120000 index 9826592fbf..0000000000 --- a/Lang/Rebol/User-input-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Graphical/Rebol \ No newline at end of file diff --git a/Lang/Rebol/User-input-Text b/Lang/Rebol/User-input-Text deleted file mode 120000 index 61cd5bb640..0000000000 --- a/Lang/Rebol/User-input-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Text/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Validate-International-Securities-Identification-Number b/Lang/Rebol/Validate-International-Securities-Identification-Number deleted file mode 120000 index c8f6432cf5..0000000000 --- a/Lang/Rebol/Validate-International-Securities-Identification-Number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Validate-International-Securities-Identification-Number/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Variadic-function b/Lang/Rebol/Variadic-function deleted file mode 120000 index eb753c87ca..0000000000 --- a/Lang/Rebol/Variadic-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variadic-function/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Vigen-re-cipher b/Lang/Rebol/Vigen-re-cipher deleted file mode 120000 index e4c0684470..0000000000 --- a/Lang/Rebol/Vigen-re-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Walk-a-directory-Non-recursively b/Lang/Rebol/Walk-a-directory-Non-recursively deleted file mode 120000 index 7d9b757781..0000000000 --- a/Lang/Rebol/Walk-a-directory-Non-recursively +++ /dev/null @@ -1 +0,0 @@ -../../Task/Walk-a-directory-Non-recursively/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Walk-a-directory-Recursively b/Lang/Rebol/Walk-a-directory-Recursively deleted file mode 120000 index 6bdc6972ee..0000000000 --- a/Lang/Rebol/Walk-a-directory-Recursively +++ /dev/null @@ -1 +0,0 @@ -../../Task/Walk-a-directory-Recursively/Rebol \ No newline at end of file diff --git a/Lang/Rebol/War-card-game b/Lang/Rebol/War-card-game deleted file mode 120000 index 25923c64aa..0000000000 --- a/Lang/Rebol/War-card-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/War-card-game/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Web-scraping b/Lang/Rebol/Web-scraping deleted file mode 120000 index 4e9367ba38..0000000000 --- a/Lang/Rebol/Web-scraping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Web-scraping/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Window-creation b/Lang/Rebol/Window-creation deleted file mode 120000 index bd0bbb0b87..0000000000 --- a/Lang/Rebol/Window-creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-creation/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Word-frequency b/Lang/Rebol/Word-frequency deleted file mode 120000 index 520eed281f..0000000000 --- a/Lang/Rebol/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/Rebol \ No newline at end of file diff --git a/Lang/Rebol/XML-Input b/Lang/Rebol/XML-Input deleted file mode 120000 index 014dc4f1f1..0000000000 --- a/Lang/Rebol/XML-Input +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-Input/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Y-combinator b/Lang/Rebol/Y-combinator deleted file mode 120000 index dcc94474b6..0000000000 --- a/Lang/Rebol/Y-combinator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Y-combinator/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Zero-to-the-zero-power b/Lang/Rebol/Zero-to-the-zero-power deleted file mode 120000 index 8722267184..0000000000 --- a/Lang/Rebol/Zero-to-the-zero-power +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zero-to-the-zero-power/Rebol \ No newline at end of file diff --git a/Lang/Rebol/Zig-zag-matrix b/Lang/Rebol/Zig-zag-matrix deleted file mode 120000 index ff69ef9beb..0000000000 --- a/Lang/Rebol/Zig-zag-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zig-zag-matrix/Rebol \ No newline at end of file diff --git a/Lang/Red/00-LANG.txt b/Lang/Red/00-LANG.txt index bde0f4b81e..1cb6089084 100644 --- a/Lang/Red/00-LANG.txt +++ b/Lang/Red/00-LANG.txt @@ -8,9 +8,6 @@ Like Rebol, Red has a low memory footprint, is garbage collected, and has a [htt Red embeds several DSLs, among which Red/System (C semantics meet Red syntax), dedicated to low-level and system programming. It is also used as an intermediate language (IL) when Red is compiled. The Red executable is able to build Red/System files directly (`*.reds`) as well as Red files (`*.red`), and Red/System code may be embedded freely in Red code. -==Todo== -[https://rosettacode.org/wiki/Tasks_not_implemented_in_Red Tasks not implemented in Red] - ==Useful links== * [http://www.red-lang.org Red Language Website] * [https://twitter.com/red_lang @red_lang] on Twitter. diff --git a/Lang/Red/Accumulator-factory b/Lang/Red/Accumulator-factory deleted file mode 120000 index 73cf9ffff0..0000000000 --- a/Lang/Red/Accumulator-factory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Accumulator-factory/Red \ No newline at end of file diff --git a/Lang/Red/Address-of-a-variable b/Lang/Red/Address-of-a-variable deleted file mode 120000 index 81b5a1a171..0000000000 --- a/Lang/Red/Address-of-a-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Address-of-a-variable/Red \ No newline at end of file diff --git a/Lang/Red/Angle-difference-between-two-bearings b/Lang/Red/Angle-difference-between-two-bearings deleted file mode 120000 index e218e0c4ee..0000000000 --- a/Lang/Red/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Red \ No newline at end of file diff --git a/Lang/Red/Angles-geometric-normalization-and-conversion b/Lang/Red/Angles-geometric-normalization-and-conversion deleted file mode 120000 index f969ff2c56..0000000000 --- a/Lang/Red/Angles-geometric-normalization-and-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angles-geometric-normalization-and-conversion/Red \ No newline at end of file diff --git a/Lang/Red/Arithmetic-Integer b/Lang/Red/Arithmetic-Integer deleted file mode 120000 index cb3f74d046..0000000000 --- a/Lang/Red/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Red \ No newline at end of file diff --git a/Lang/Red/Arithmetic-evaluation b/Lang/Red/Arithmetic-evaluation deleted file mode 120000 index c6c5c304b5..0000000000 --- a/Lang/Red/Arithmetic-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-evaluation/Red \ No newline at end of file diff --git a/Lang/Red/Boolean-values b/Lang/Red/Boolean-values deleted file mode 120000 index 3df0e7a087..0000000000 --- a/Lang/Red/Boolean-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boolean-values/Red \ No newline at end of file diff --git a/Lang/Red/Calendar b/Lang/Red/Calendar deleted file mode 120000 index 3283fd5906..0000000000 --- a/Lang/Red/Calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calendar/Red \ No newline at end of file diff --git a/Lang/Red/Calendar---for-REAL-programmers b/Lang/Red/Calendar---for-REAL-programmers deleted file mode 120000 index e0db1bd24f..0000000000 --- a/Lang/Red/Calendar---for-REAL-programmers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calendar---for-REAL-programmers/Red \ No newline at end of file diff --git a/Lang/Red/Call-a-function b/Lang/Red/Call-a-function deleted file mode 120000 index 2907d38f1e..0000000000 --- a/Lang/Red/Call-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-function/Red \ No newline at end of file diff --git a/Lang/Red/Call-an-object-method b/Lang/Red/Call-an-object-method deleted file mode 120000 index 50c2f71ec1..0000000000 --- a/Lang/Red/Call-an-object-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-an-object-method/Red \ No newline at end of file diff --git a/Lang/Red/Case-sensitivity-of-identifiers b/Lang/Red/Case-sensitivity-of-identifiers deleted file mode 120000 index 1f46e1aec5..0000000000 --- a/Lang/Red/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/Red \ No newline at end of file diff --git a/Lang/Red/Classes b/Lang/Red/Classes deleted file mode 120000 index 5db3a1a49b..0000000000 --- a/Lang/Red/Classes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Classes/Red \ No newline at end of file diff --git a/Lang/Red/Compare-length-of-two-strings b/Lang/Red/Compare-length-of-two-strings deleted file mode 120000 index 0a8b824021..0000000000 --- a/Lang/Red/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Red \ No newline at end of file diff --git a/Lang/Red/Compiler-AST-interpreter b/Lang/Red/Compiler-AST-interpreter deleted file mode 120000 index 38de1297c9..0000000000 --- a/Lang/Red/Compiler-AST-interpreter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-AST-interpreter/Red \ No newline at end of file diff --git a/Lang/Red/Compiler-code-generator b/Lang/Red/Compiler-code-generator deleted file mode 120000 index 7af219c35c..0000000000 --- a/Lang/Red/Compiler-code-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-code-generator/Red \ No newline at end of file diff --git a/Lang/Red/Compiler-lexical-analyzer b/Lang/Red/Compiler-lexical-analyzer deleted file mode 120000 index 6b88c28f94..0000000000 --- a/Lang/Red/Compiler-lexical-analyzer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-lexical-analyzer/Red \ No newline at end of file diff --git a/Lang/Red/Compiler-syntax-analyzer b/Lang/Red/Compiler-syntax-analyzer deleted file mode 120000 index 406b1710ff..0000000000 --- a/Lang/Red/Compiler-syntax-analyzer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-syntax-analyzer/Red \ No newline at end of file diff --git a/Lang/Red/Compiler-virtual-machine-interpreter b/Lang/Red/Compiler-virtual-machine-interpreter deleted file mode 120000 index 85d28b0fea..0000000000 --- a/Lang/Red/Compiler-virtual-machine-interpreter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-virtual-machine-interpreter/Red \ No newline at end of file diff --git a/Lang/Red/Currying b/Lang/Red/Currying deleted file mode 120000 index a40d4bf838..0000000000 --- a/Lang/Red/Currying +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currying/Red \ No newline at end of file diff --git a/Lang/Red/Dot-product b/Lang/Red/Dot-product deleted file mode 120000 index 7a0eb69ac3..0000000000 --- a/Lang/Red/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Red \ No newline at end of file diff --git a/Lang/Red/Empty-directory b/Lang/Red/Empty-directory deleted file mode 120000 index 171a4f4f65..0000000000 --- a/Lang/Red/Empty-directory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-directory/Red \ No newline at end of file diff --git a/Lang/Red/Execute-Brain- b/Lang/Red/Execute-Brain- deleted file mode 120000 index 603437fa06..0000000000 --- a/Lang/Red/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Red \ No newline at end of file diff --git a/Lang/Red/Extend-your-language b/Lang/Red/Extend-your-language deleted file mode 120000 index af9a4e8c46..0000000000 --- a/Lang/Red/Extend-your-language +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extend-your-language/Red \ No newline at end of file diff --git a/Lang/Red/First-class-functions b/Lang/Red/First-class-functions deleted file mode 120000 index fbfe38fd28..0000000000 --- a/Lang/Red/First-class-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/First-class-functions/Red \ No newline at end of file diff --git a/Lang/Red/Five-weekends b/Lang/Red/Five-weekends deleted file mode 120000 index 4b364097a6..0000000000 --- a/Lang/Red/Five-weekends +++ /dev/null @@ -1 +0,0 @@ -../../Task/Five-weekends/Red \ No newline at end of file diff --git a/Lang/Red/Function-composition b/Lang/Red/Function-composition deleted file mode 120000 index 880a1c6e87..0000000000 --- a/Lang/Red/Function-composition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-composition/Red \ No newline at end of file diff --git a/Lang/Red/HTTP b/Lang/Red/HTTP deleted file mode 120000 index f7d36ebcff..0000000000 --- a/Lang/Red/HTTP +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTP/Red \ No newline at end of file diff --git a/Lang/Red/Leap-year b/Lang/Red/Leap-year deleted file mode 120000 index cb911ae827..0000000000 --- a/Lang/Red/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/Red \ No newline at end of file diff --git a/Lang/Red/Logical-operations b/Lang/Red/Logical-operations deleted file mode 120000 index b02eaed36f..0000000000 --- a/Lang/Red/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/Red \ No newline at end of file diff --git a/Lang/Red/Metaprogramming b/Lang/Red/Metaprogramming deleted file mode 120000 index 764ff52337..0000000000 --- a/Lang/Red/Metaprogramming +++ /dev/null @@ -1 +0,0 @@ -../../Task/Metaprogramming/Red \ No newline at end of file diff --git a/Lang/Red/Parsing-RPN-calculator-algorithm b/Lang/Red/Parsing-RPN-calculator-algorithm deleted file mode 120000 index f68a7bf5c6..0000000000 --- a/Lang/Red/Parsing-RPN-calculator-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-calculator-algorithm/Red \ No newline at end of file diff --git a/Lang/Red/Parsing-RPN-to-infix-conversion b/Lang/Red/Parsing-RPN-to-infix-conversion deleted file mode 120000 index 27fb99e707..0000000000 --- a/Lang/Red/Parsing-RPN-to-infix-conversion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-to-infix-conversion/Red \ No newline at end of file diff --git a/Lang/Red/Parsing-Shunting-yard-algorithm b/Lang/Red/Parsing-Shunting-yard-algorithm deleted file mode 120000 index 64583c9508..0000000000 --- a/Lang/Red/Parsing-Shunting-yard-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-Shunting-yard-algorithm/Red \ No newline at end of file diff --git a/Lang/Red/Partial-function-application b/Lang/Red/Partial-function-application deleted file mode 120000 index dbffa4d18e..0000000000 --- a/Lang/Red/Partial-function-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partial-function-application/Red \ No newline at end of file diff --git a/Lang/Red/Quaternion-type b/Lang/Red/Quaternion-type new file mode 120000 index 0000000000..7b5fc87ddd --- /dev/null +++ b/Lang/Red/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Red \ No newline at end of file diff --git a/Lang/Red/Rosetta-Code-Find-unimplemented-tasks b/Lang/Red/Rosetta-Code-Find-unimplemented-tasks deleted file mode 120000 index 53726178b5..0000000000 --- a/Lang/Red/Rosetta-Code-Find-unimplemented-tasks +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Find-unimplemented-tasks/Red \ No newline at end of file diff --git a/Lang/Red/Runtime-evaluation-In-an-environment b/Lang/Red/Runtime-evaluation-In-an-environment deleted file mode 120000 index ee82b72bbd..0000000000 --- a/Lang/Red/Runtime-evaluation-In-an-environment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Runtime-evaluation-In-an-environment/Red \ No newline at end of file diff --git a/Lang/Red/Towers-of-Hanoi b/Lang/Red/Towers-of-Hanoi deleted file mode 120000 index 112b276dee..0000000000 --- a/Lang/Red/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/Red \ No newline at end of file diff --git a/Lang/Red/Vector-products b/Lang/Red/Vector-products deleted file mode 120000 index 28d3b45939..0000000000 --- a/Lang/Red/Vector-products +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector-products/Red \ No newline at end of file diff --git a/Lang/Red/Word-frequency b/Lang/Red/Word-frequency deleted file mode 120000 index 535322fbdc..0000000000 --- a/Lang/Red/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/Red \ No newline at end of file diff --git a/Lang/Refal/Align-columns b/Lang/Refal/Align-columns deleted file mode 120000 index 8c214d7af1..0000000000 --- a/Lang/Refal/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/Refal \ No newline at end of file diff --git a/Lang/Refal/Arbitrary-precision-integers-included- b/Lang/Refal/Arbitrary-precision-integers-included- deleted file mode 120000 index f00d324a4e..0000000000 --- a/Lang/Refal/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/Refal \ No newline at end of file diff --git a/Lang/Refal/Arithmetic-derivative b/Lang/Refal/Arithmetic-derivative deleted file mode 120000 index c88f60d44d..0000000000 --- a/Lang/Refal/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Refal \ No newline at end of file diff --git a/Lang/Refal/Bell-numbers b/Lang/Refal/Bell-numbers deleted file mode 120000 index a73ced2740..0000000000 --- a/Lang/Refal/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Refal \ No newline at end of file diff --git a/Lang/Refal/Case-sensitivity-of-identifiers b/Lang/Refal/Case-sensitivity-of-identifiers deleted file mode 120000 index 7def95d498..0000000000 --- a/Lang/Refal/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/Refal \ No newline at end of file diff --git a/Lang/Refal/Combinations b/Lang/Refal/Combinations deleted file mode 120000 index d4a5475872..0000000000 --- a/Lang/Refal/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/Refal \ No newline at end of file diff --git a/Lang/Refal/Copy-stdin-to-stdout b/Lang/Refal/Copy-stdin-to-stdout deleted file mode 120000 index 974e13964c..0000000000 --- a/Lang/Refal/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/Refal \ No newline at end of file diff --git a/Lang/Refal/Damm-algorithm b/Lang/Refal/Damm-algorithm deleted file mode 120000 index 9b99056b8a..0000000000 --- a/Lang/Refal/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/Refal \ No newline at end of file diff --git a/Lang/Refal/Determine-sentence-type b/Lang/Refal/Determine-sentence-type deleted file mode 120000 index 13809ebd86..0000000000 --- a/Lang/Refal/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Refal \ No newline at end of file diff --git a/Lang/Refal/Disarium-numbers b/Lang/Refal/Disarium-numbers deleted file mode 120000 index 7389ead892..0000000000 --- a/Lang/Refal/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/Refal \ No newline at end of file diff --git a/Lang/Refal/Discordian-date b/Lang/Refal/Discordian-date deleted file mode 120000 index e18bd824ca..0000000000 --- a/Lang/Refal/Discordian-date +++ /dev/null @@ -1 +0,0 @@ -../../Task/Discordian-date/Refal \ No newline at end of file diff --git a/Lang/Refal/Display-a-linear-combination b/Lang/Refal/Display-a-linear-combination deleted file mode 120000 index fc164db566..0000000000 --- a/Lang/Refal/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Refal \ No newline at end of file diff --git a/Lang/Refal/Doomsday-rule b/Lang/Refal/Doomsday-rule deleted file mode 120000 index 87fb488eaa..0000000000 --- a/Lang/Refal/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/Refal \ No newline at end of file diff --git a/Lang/Refal/Duffinian-numbers b/Lang/Refal/Duffinian-numbers deleted file mode 120000 index 7aec5bb21b..0000000000 --- a/Lang/Refal/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/Refal \ No newline at end of file diff --git a/Lang/Refal/Factors-of-an-integer b/Lang/Refal/Factors-of-an-integer deleted file mode 120000 index b8b431c369..0000000000 --- a/Lang/Refal/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Refal \ No newline at end of file diff --git a/Lang/Refal/Flatten-a-list b/Lang/Refal/Flatten-a-list deleted file mode 120000 index b2445ac726..0000000000 --- a/Lang/Refal/Flatten-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flatten-a-list/Refal \ No newline at end of file diff --git a/Lang/Refal/Fractran b/Lang/Refal/Fractran deleted file mode 120000 index 30b9e7a511..0000000000 --- a/Lang/Refal/Fractran +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractran/Refal \ No newline at end of file diff --git a/Lang/Refal/General-FizzBuzz b/Lang/Refal/General-FizzBuzz deleted file mode 120000 index 019727fd06..0000000000 --- a/Lang/Refal/General-FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/General-FizzBuzz/Refal \ No newline at end of file diff --git a/Lang/Refal/Horners-rule-for-polynomial-evaluation b/Lang/Refal/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 29b0a0f26a..0000000000 --- a/Lang/Refal/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/Refal \ No newline at end of file diff --git a/Lang/Refal/Isqrt-integer-square-root-of-X b/Lang/Refal/Isqrt-integer-square-root-of-X deleted file mode 120000 index 812b5e86d3..0000000000 --- a/Lang/Refal/Isqrt-integer-square-root-of-X +++ /dev/null @@ -1 +0,0 @@ -../../Task/Isqrt-integer-square-root-of-X/Refal \ No newline at end of file diff --git a/Lang/Refal/Lah-numbers b/Lang/Refal/Lah-numbers deleted file mode 120000 index a761f59719..0000000000 --- a/Lang/Refal/Lah-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Lah-numbers/Refal \ No newline at end of file diff --git a/Lang/Refal/Letter-frequency b/Lang/Refal/Letter-frequency deleted file mode 120000 index e9c48e99dd..0000000000 --- a/Lang/Refal/Letter-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Letter-frequency/Refal \ No newline at end of file diff --git a/Lang/Refal/Loops-Infinite b/Lang/Refal/Loops-Infinite deleted file mode 120000 index 536c01c9bd..0000000000 --- a/Lang/Refal/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Refal \ No newline at end of file diff --git a/Lang/Refal/McNuggets-problem b/Lang/Refal/McNuggets-problem deleted file mode 120000 index 90628a4989..0000000000 --- a/Lang/Refal/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/Refal \ No newline at end of file diff --git a/Lang/Refal/Modular-exponentiation b/Lang/Refal/Modular-exponentiation deleted file mode 120000 index 68c13863de..0000000000 --- a/Lang/Refal/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/Refal \ No newline at end of file diff --git a/Lang/Refal/Move-to-front-algorithm b/Lang/Refal/Move-to-front-algorithm deleted file mode 120000 index e69e4f5498..0000000000 --- a/Lang/Refal/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/Refal \ No newline at end of file diff --git a/Lang/Refal/Narcissistic-decimal-number b/Lang/Refal/Narcissistic-decimal-number deleted file mode 120000 index 3c509c9753..0000000000 --- a/Lang/Refal/Narcissistic-decimal-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Narcissistic-decimal-number/Refal \ No newline at end of file diff --git a/Lang/Refal/Nested-templated-data b/Lang/Refal/Nested-templated-data deleted file mode 120000 index ceaf039a10..0000000000 --- a/Lang/Refal/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/Refal \ No newline at end of file diff --git a/Lang/Refal/Old-lady-swallowed-a-fly b/Lang/Refal/Old-lady-swallowed-a-fly deleted file mode 120000 index 63d7ebf658..0000000000 --- a/Lang/Refal/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/Refal \ No newline at end of file diff --git a/Lang/Refal/One-dimensional-cellular-automata b/Lang/Refal/One-dimensional-cellular-automata deleted file mode 120000 index 89b9ba280e..0000000000 --- a/Lang/Refal/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/Refal \ No newline at end of file diff --git a/Lang/Refal/Ordered-words b/Lang/Refal/Ordered-words deleted file mode 120000 index b546984c01..0000000000 --- a/Lang/Refal/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Refal \ No newline at end of file diff --git a/Lang/Refal/Palindrome-detection b/Lang/Refal/Palindrome-detection deleted file mode 120000 index 87f1ace89c..0000000000 --- a/Lang/Refal/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/Refal \ No newline at end of file diff --git a/Lang/Refal/Population-count b/Lang/Refal/Population-count deleted file mode 120000 index 3cdd939b69..0000000000 --- a/Lang/Refal/Population-count +++ /dev/null @@ -1 +0,0 @@ -../../Task/Population-count/Refal \ No newline at end of file diff --git a/Lang/Refal/Power-set b/Lang/Refal/Power-set deleted file mode 120000 index f50da086ad..0000000000 --- a/Lang/Refal/Power-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Power-set/Refal \ No newline at end of file diff --git a/Lang/Refal/Repeat b/Lang/Refal/Repeat deleted file mode 120000 index 1cdb36e096..0000000000 --- a/Lang/Refal/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Refal \ No newline at end of file diff --git a/Lang/Refal/Roman-numerals-Encode b/Lang/Refal/Roman-numerals-Encode deleted file mode 120000 index a35e7a2ee0..0000000000 --- a/Lang/Refal/Roman-numerals-Encode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Roman-numerals-Encode/Refal \ No newline at end of file diff --git a/Lang/Refal/Run-length-encoding b/Lang/Refal/Run-length-encoding deleted file mode 120000 index afeb7091c3..0000000000 --- a/Lang/Refal/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/Refal \ No newline at end of file diff --git a/Lang/Refal/Sierpinski-triangle b/Lang/Refal/Sierpinski-triangle deleted file mode 120000 index 078d645de8..0000000000 --- a/Lang/Refal/Sierpinski-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle/Refal \ No newline at end of file diff --git a/Lang/Refal/Split-a-character-string-based-on-change-of-character b/Lang/Refal/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 8a3aec8866..0000000000 --- a/Lang/Refal/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/Refal \ No newline at end of file diff --git a/Lang/Refal/Square-but-not-cube b/Lang/Refal/Square-but-not-cube deleted file mode 120000 index a50417a708..0000000000 --- a/Lang/Refal/Square-but-not-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-but-not-cube/Refal \ No newline at end of file diff --git a/Lang/Refal/Strip-comments-from-a-string b/Lang/Refal/Strip-comments-from-a-string deleted file mode 120000 index 6f86213c31..0000000000 --- a/Lang/Refal/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/Refal \ No newline at end of file diff --git a/Lang/Refal/Super-d-numbers b/Lang/Refal/Super-d-numbers deleted file mode 120000 index 923b4678f8..0000000000 --- a/Lang/Refal/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/Refal \ No newline at end of file diff --git a/Lang/Refal/Tokenize-a-string b/Lang/Refal/Tokenize-a-string deleted file mode 120000 index f8ac7459de..0000000000 --- a/Lang/Refal/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/Refal \ No newline at end of file diff --git a/Lang/Refal/Word-ladder b/Lang/Refal/Word-ladder deleted file mode 120000 index b43f6deb31..0000000000 --- a/Lang/Refal/Word-ladder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-ladder/Refal \ No newline at end of file diff --git a/Lang/Refal/Zeckendorf-number-representation b/Lang/Refal/Zeckendorf-number-representation deleted file mode 120000 index 70b5a3265e..0000000000 --- a/Lang/Refal/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/Refal \ No newline at end of file diff --git a/Lang/Retro/Sieve-of-Eratosthenes b/Lang/Retro/Sieve-of-Eratosthenes deleted file mode 120000 index d5617b7054..0000000000 --- a/Lang/Retro/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/Retro \ No newline at end of file diff --git a/Lang/Retro/String-append b/Lang/Retro/String-append deleted file mode 120000 index db032f3f0a..0000000000 --- a/Lang/Retro/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/Retro \ No newline at end of file diff --git a/Lang/Retro/Sum-multiples-of-3-and-5 b/Lang/Retro/Sum-multiples-of-3-and-5 deleted file mode 120000 index cb0c42540d..0000000000 --- a/Lang/Retro/Sum-multiples-of-3-and-5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-multiples-of-3-and-5/Retro \ No newline at end of file diff --git a/Lang/Rhombus/00-LANG.txt b/Lang/Rhombus/00-LANG.txt deleted file mode 100644 index ef9932595f..0000000000 --- a/Lang/Rhombus/00-LANG.txt +++ /dev/null @@ -1,5 +0,0 @@ -{{language -|exec=both -|gc=yes -|site=https://rhombus-lang.org/ -}} \ No newline at end of file diff --git a/Lang/Rhombus/00-META.yaml b/Lang/Rhombus/00-META.yaml deleted file mode 100644 index 732b96d2eb..0000000000 --- a/Lang/Rhombus/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Rhombus diff --git a/Lang/Rhombus/99-bottles-of-beer b/Lang/Rhombus/99-bottles-of-beer deleted file mode 120000 index bcb9ee7049..0000000000 --- a/Lang/Rhombus/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Arbitrary-precision-integers-included- b/Lang/Rhombus/Arbitrary-precision-integers-included- deleted file mode 120000 index 31558e19d7..0000000000 --- a/Lang/Rhombus/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Caesar-cipher b/Lang/Rhombus/Caesar-cipher deleted file mode 120000 index dd9f5453ed..0000000000 --- a/Lang/Rhombus/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Factorial b/Lang/Rhombus/Factorial deleted file mode 120000 index 92b62c830f..0000000000 --- a/Lang/Rhombus/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Fibonacci-sequence b/Lang/Rhombus/Fibonacci-sequence deleted file mode 120000 index d496e8a0b2..0000000000 --- a/Lang/Rhombus/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/FizzBuzz b/Lang/Rhombus/FizzBuzz deleted file mode 120000 index 5740514b72..0000000000 --- a/Lang/Rhombus/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Guess-the-number-With-feedback b/Lang/Rhombus/Guess-the-number-With-feedback deleted file mode 120000 index c51dd719ba..0000000000 --- a/Lang/Rhombus/Guess-the-number-With-feedback +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number-With-feedback/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Hello-world-Text b/Lang/Rhombus/Hello-world-Text deleted file mode 120000 index 11fb03859d..0000000000 --- a/Lang/Rhombus/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Inheritance-Single b/Lang/Rhombus/Inheritance-Single deleted file mode 120000 index 2f478862d8..0000000000 --- a/Lang/Rhombus/Inheritance-Single +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Single/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Polymorphism b/Lang/Rhombus/Polymorphism deleted file mode 120000 index a5540935b5..0000000000 --- a/Lang/Rhombus/Polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polymorphism/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Rot-13 b/Lang/Rhombus/Rot-13 deleted file mode 120000 index 369226ff2f..0000000000 --- a/Lang/Rhombus/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/Rhombus \ No newline at end of file diff --git a/Lang/Rhombus/Y-combinator b/Lang/Rhombus/Y-combinator deleted file mode 120000 index 745c50d95d..0000000000 --- a/Lang/Rhombus/Y-combinator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Y-combinator/Rhombus \ No newline at end of file diff --git a/Lang/Ring/Bioinformatics-base-count b/Lang/Ring/Bioinformatics-base-count new file mode 120000 index 0000000000..291f269ac6 --- /dev/null +++ b/Lang/Ring/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Ring \ No newline at end of file diff --git a/Lang/Ring/Brilliant-numbers b/Lang/Ring/Brilliant-numbers deleted file mode 120000 index 4e2621cdb9..0000000000 --- a/Lang/Ring/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/Ring \ No newline at end of file diff --git a/Lang/Ring/Colorful-numbers b/Lang/Ring/Colorful-numbers deleted file mode 120000 index 0882269c01..0000000000 --- a/Lang/Ring/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/Ring \ No newline at end of file diff --git a/Lang/Ring/Compare-a-list-of-strings b/Lang/Ring/Compare-a-list-of-strings deleted file mode 120000 index 308f7db9af..0000000000 --- a/Lang/Ring/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/Ring \ No newline at end of file diff --git a/Lang/Ring/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k b/Lang/Ring/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k deleted file mode 120000 index cd105cb2cf..0000000000 --- a/Lang/Ring/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k +++ /dev/null @@ -1 +0,0 @@ -../../Task/Composite-numbers-k-with-no-single-digit-factors-whose-factors-are-all-substrings-of-k/Ring \ No newline at end of file diff --git a/Lang/Ring/Draw-a-clock b/Lang/Ring/Draw-a-clock deleted file mode 120000 index d4e59a0d8d..0000000000 --- a/Lang/Ring/Draw-a-clock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-clock/Ring \ No newline at end of file diff --git a/Lang/Ring/Duffinian-numbers b/Lang/Ring/Duffinian-numbers deleted file mode 120000 index 297b9a5500..0000000000 --- a/Lang/Ring/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/Ring \ No newline at end of file diff --git a/Lang/Ring/Empty-program b/Lang/Ring/Empty-program new file mode 120000 index 0000000000..05941ac0c2 --- /dev/null +++ b/Lang/Ring/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Ring \ No newline at end of file diff --git a/Lang/Ring/Miller-Rabin-primality-test b/Lang/Ring/Miller-Rabin-primality-test new file mode 120000 index 0000000000..dd0885b5c9 --- /dev/null +++ b/Lang/Ring/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Ring \ No newline at end of file diff --git a/Lang/Ring/Selectively-replace-multiple-instances-of-a-character-within-a-string b/Lang/Ring/Selectively-replace-multiple-instances-of-a-character-within-a-string deleted file mode 120000 index 238083a2d3..0000000000 --- a/Lang/Ring/Selectively-replace-multiple-instances-of-a-character-within-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Selectively-replace-multiple-instances-of-a-character-within-a-string/Ring \ No newline at end of file diff --git a/Lang/Ring/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Ring/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Ring/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Ring/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Ring/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Ring/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Ring/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Ring/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Ring/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Ring/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Ring/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Ring/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Ring/Sorting-Algorithms-Circle-Sort b/Lang/Ring/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..de0338125a --- /dev/null +++ b/Lang/Ring/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Ring \ No newline at end of file diff --git a/Lang/Ring/Sorting-algorithms-Bead-sort b/Lang/Ring/Sorting-algorithms-Bead-sort deleted file mode 120000 index eea2153977..0000000000 --- a/Lang/Ring/Sorting-algorithms-Bead-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bead-sort/Ring \ No newline at end of file diff --git a/Lang/Ring/Special-characters b/Lang/Ring/Special-characters deleted file mode 120000 index 0dd3c257c9..0000000000 --- a/Lang/Ring/Special-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Special-characters/Ring \ No newline at end of file diff --git a/Lang/Ring/Truth-table b/Lang/Ring/Truth-table deleted file mode 120000 index b2ddf39eb1..0000000000 --- a/Lang/Ring/Truth-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truth-table/Ring \ No newline at end of file diff --git a/Lang/Ring/Twelve-statements b/Lang/Ring/Twelve-statements deleted file mode 120000 index 539ba91df6..0000000000 --- a/Lang/Ring/Twelve-statements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twelve-statements/Ring \ No newline at end of file diff --git a/Lang/Ring/Universal-Turing-machine b/Lang/Ring/Universal-Turing-machine deleted file mode 120000 index 1e0cfd8b67..0000000000 --- a/Lang/Ring/Universal-Turing-machine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Universal-Turing-machine/Ring \ No newline at end of file diff --git a/Lang/Ring/Wagstaff-primes b/Lang/Ring/Wagstaff-primes deleted file mode 120000 index 877433f537..0000000000 --- a/Lang/Ring/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Ring \ No newline at end of file diff --git a/Lang/Ring/Wieferich-primes b/Lang/Ring/Wieferich-primes deleted file mode 120000 index 4a7c97a04d..0000000000 --- a/Lang/Ring/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/Ring \ No newline at end of file diff --git a/Lang/Ring/Yin-and-yang b/Lang/Ring/Yin-and-yang deleted file mode 120000 index b4e272e04d..0000000000 --- a/Lang/Ring/Yin-and-yang +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yin-and-yang/Ring \ No newline at end of file diff --git a/Lang/Robotic/Empty-program b/Lang/Robotic/Empty-program new file mode 120000 index 0000000000..5e2d95817a --- /dev/null +++ b/Lang/Robotic/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Robotic \ No newline at end of file diff --git a/Lang/Rockstar/00-LANG.txt b/Lang/Rockstar/00-LANG.txt index c22e2c3636..9dc3cbc2f7 100644 --- a/Lang/Rockstar/00-LANG.txt +++ b/Lang/Rockstar/00-LANG.txt @@ -1,8 +1,4 @@ -{{stub}} -{{language|Rockstar -|site=https://codewithrockstar.com/ -|hopl=no -}} +{{stub}}{{language|Rockstar}} Rockstar was created by a rockin' dude named Dylan Beattie. diff --git a/Lang/Rocq/00-LANG.txt b/Lang/Rocq/00-LANG.txt deleted file mode 100644 index 3a6e02cc5b..0000000000 --- a/Lang/Rocq/00-LANG.txt +++ /dev/null @@ -1,9 +0,0 @@ -{{language|Rocq -|site=https://rocq-prover.org/ -}} -The '''Rocq Prover''' (previously known as '''Coq''') is a proof assistant application. It allows the expression of mathematical assertions, mechanically checks proofs of these assertions, helps to find formal proofs, and extracts a certified program from the constructive proof of its formal specification. Rocq works within the theory of the calculus of inductive constructions, a derivative of the calculus of constructions. Rocq is not an automated [[wp:Theorem_prover|theorem prover]] but includes automatic theorem proving tactics and various decision procedures. - -==Citations== -* [[wp:Rocq|Rocq]] - -[[Category:Mathematical programming languages]] \ No newline at end of file diff --git a/Lang/Rocq/00-META.yaml b/Lang/Rocq/00-META.yaml deleted file mode 100644 index 7a4ef3c3e3..0000000000 --- a/Lang/Rocq/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Rocq diff --git a/Lang/Rocq/100-doors b/Lang/Rocq/100-doors deleted file mode 120000 index ddc9d15706..0000000000 --- a/Lang/Rocq/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Ackermann-function b/Lang/Rocq/Ackermann-function deleted file mode 120000 index 2c359313d3..0000000000 --- a/Lang/Rocq/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Extend-your-language b/Lang/Rocq/Extend-your-language deleted file mode 120000 index 7a189585f3..0000000000 --- a/Lang/Rocq/Extend-your-language +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extend-your-language/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Factorial b/Lang/Rocq/Factorial deleted file mode 120000 index 73a7e2f546..0000000000 --- a/Lang/Rocq/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Fibonacci-sequence b/Lang/Rocq/Fibonacci-sequence deleted file mode 120000 index a31a4762d2..0000000000 --- a/Lang/Rocq/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Rocq \ No newline at end of file diff --git a/Lang/Rocq/FizzBuzz b/Lang/Rocq/FizzBuzz deleted file mode 120000 index 3dc20e67b5..0000000000 --- a/Lang/Rocq/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Hello-world-Newbie b/Lang/Rocq/Hello-world-Newbie deleted file mode 120000 index f8f6323716..0000000000 --- a/Lang/Rocq/Hello-world-Newbie +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newbie/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Hello-world-Text b/Lang/Rocq/Hello-world-Text deleted file mode 120000 index 3d91fcb1de..0000000000 --- a/Lang/Rocq/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Loops-For b/Lang/Rocq/Loops-For deleted file mode 120000 index ea834fd5b7..0000000000 --- a/Lang/Rocq/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Tree-traversal b/Lang/Rocq/Tree-traversal deleted file mode 120000 index 944802a525..0000000000 --- a/Lang/Rocq/Tree-traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-traversal/Rocq \ No newline at end of file diff --git a/Lang/Rocq/Variadic-function b/Lang/Rocq/Variadic-function deleted file mode 120000 index 0c5215f0a1..0000000000 --- a/Lang/Rocq/Variadic-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variadic-function/Rocq \ No newline at end of file diff --git a/Lang/Ruby/Bioinformatics-base-count b/Lang/Ruby/Bioinformatics-base-count new file mode 120000 index 0000000000..af92d7709c --- /dev/null +++ b/Lang/Ruby/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Ruby \ No newline at end of file diff --git a/Lang/Ruby/Miller-Rabin-primality-test b/Lang/Ruby/Miller-Rabin-primality-test new file mode 120000 index 0000000000..d7cbf43733 --- /dev/null +++ b/Lang/Ruby/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Ruby \ No newline at end of file diff --git a/Lang/Ruby/Quaternion-type b/Lang/Ruby/Quaternion-type new file mode 120000 index 0000000000..c1af2a1904 --- /dev/null +++ b/Lang/Ruby/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Ruby \ No newline at end of file diff --git a/Lang/Ruby/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Ruby/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Ruby/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Ruby/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Ruby/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Ruby/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Ruby/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Ruby/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Ruby/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Ruby/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Ruby/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Ruby/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Ruby/Sorting-Algorithms-Circle-Sort b/Lang/Ruby/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..022b44ef66 --- /dev/null +++ b/Lang/Ruby/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Ruby \ No newline at end of file diff --git a/Lang/Ruby/Strassens-algorithm b/Lang/Ruby/Strassens-algorithm deleted file mode 120000 index ecb75a8f11..0000000000 --- a/Lang/Ruby/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Ruby \ No newline at end of file diff --git a/Lang/Ruby/Variable-declaration-reset b/Lang/Ruby/Variable-declaration-reset deleted file mode 120000 index 42ba082e34..0000000000 --- a/Lang/Ruby/Variable-declaration-reset +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-declaration-reset/Ruby \ No newline at end of file diff --git a/Lang/Run-BASIC/Determine-sentence-type b/Lang/Run-BASIC/Determine-sentence-type deleted file mode 120000 index 5db5f89e0c..0000000000 --- a/Lang/Run-BASIC/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/Josephus-problem b/Lang/Run-BASIC/Josephus-problem deleted file mode 120000 index d5ce7e543e..0000000000 --- a/Lang/Run-BASIC/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/Meissel-Mertens-constant b/Lang/Run-BASIC/Meissel-Mertens-constant new file mode 120000 index 0000000000..44168b020e --- /dev/null +++ b/Lang/Run-BASIC/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/Miller-Rabin-primality-test b/Lang/Run-BASIC/Miller-Rabin-primality-test new file mode 120000 index 0000000000..13b7319b57 --- /dev/null +++ b/Lang/Run-BASIC/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/Nested-templated-data b/Lang/Run-BASIC/Nested-templated-data deleted file mode 120000 index e2c607e939..0000000000 --- a/Lang/Run-BASIC/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/Numbers-with-equal-rises-and-falls b/Lang/Run-BASIC/Numbers-with-equal-rises-and-falls deleted file mode 120000 index b0e664881e..0000000000 --- a/Lang/Run-BASIC/Numbers-with-equal-rises-and-falls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-with-equal-rises-and-falls/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/Pancake-numbers b/Lang/Run-BASIC/Pancake-numbers deleted file mode 120000 index 8078e50109..0000000000 --- a/Lang/Run-BASIC/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/Phrase-reversals b/Lang/Run-BASIC/Phrase-reversals deleted file mode 120000 index db249e8a6e..0000000000 --- a/Lang/Run-BASIC/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Run-BASIC/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Run-BASIC/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Run-BASIC/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Run-BASIC/Split-a-character-string-based-on-change-of-character b/Lang/Run-BASIC/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index afd1d6a928..0000000000 --- a/Lang/Run-BASIC/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/Run-BASIC \ No newline at end of file diff --git a/Lang/Run-BASIC/The-Name-Game b/Lang/Run-BASIC/The-Name-Game deleted file mode 120000 index a0ca866e4a..0000000000 --- a/Lang/Run-BASIC/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/Run-BASIC \ No newline at end of file diff --git a/Lang/Rust/Almkvist-Giullera-formula-for-pi b/Lang/Rust/Almkvist-Giullera-formula-for-pi deleted file mode 120000 index 495c52095c..0000000000 --- a/Lang/Rust/Almkvist-Giullera-formula-for-pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almkvist-Giullera-formula-for-pi/Rust \ No newline at end of file diff --git a/Lang/Rust/Ascending-primes b/Lang/Rust/Ascending-primes deleted file mode 120000 index 84fdafe351..0000000000 --- a/Lang/Rust/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Rust \ No newline at end of file diff --git a/Lang/Rust/B-zier-curves-Intersections b/Lang/Rust/B-zier-curves-Intersections deleted file mode 120000 index 732ede6e4e..0000000000 --- a/Lang/Rust/B-zier-curves-Intersections +++ /dev/null @@ -1 +0,0 @@ -../../Task/B-zier-curves-Intersections/Rust \ No newline at end of file diff --git a/Lang/Rust/Bifid-cipher b/Lang/Rust/Bifid-cipher deleted file mode 120000 index 8ddce2026b..0000000000 --- a/Lang/Rust/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Rust \ No newline at end of file diff --git a/Lang/Rust/Bioinformatics-Global-alignment b/Lang/Rust/Bioinformatics-Global-alignment deleted file mode 120000 index 3bbbc3b358..0000000000 --- a/Lang/Rust/Bioinformatics-Global-alignment +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bioinformatics-Global-alignment/Rust \ No newline at end of file diff --git a/Lang/Rust/Bioinformatics-base-count b/Lang/Rust/Bioinformatics-base-count new file mode 120000 index 0000000000..412ded1361 --- /dev/null +++ b/Lang/Rust/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Rust \ No newline at end of file diff --git a/Lang/Rust/Biorhythms b/Lang/Rust/Biorhythms deleted file mode 120000 index 8d5ffa21d8..0000000000 --- a/Lang/Rust/Biorhythms +++ /dev/null @@ -1 +0,0 @@ -../../Task/Biorhythms/Rust \ No newline at end of file diff --git a/Lang/Rust/Blum-integer b/Lang/Rust/Blum-integer deleted file mode 120000 index 7a0e8a69ae..0000000000 --- a/Lang/Rust/Blum-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Blum-integer/Rust \ No newline at end of file diff --git a/Lang/Rust/Boyer-Moore-string-search b/Lang/Rust/Boyer-Moore-string-search deleted file mode 120000 index b70383335b..0000000000 --- a/Lang/Rust/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Rust \ No newline at end of file diff --git a/Lang/Rust/Break-OO-privacy b/Lang/Rust/Break-OO-privacy deleted file mode 120000 index 37b6e0d417..0000000000 --- a/Lang/Rust/Break-OO-privacy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Break-OO-privacy/Rust \ No newline at end of file diff --git a/Lang/Rust/Calendar---for-REAL-programmers b/Lang/Rust/Calendar---for-REAL-programmers deleted file mode 120000 index 5bd1cebf14..0000000000 --- a/Lang/Rust/Calendar---for-REAL-programmers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calendar---for-REAL-programmers/Rust \ No newline at end of file diff --git a/Lang/Rust/Camel-case-and-snake-case b/Lang/Rust/Camel-case-and-snake-case deleted file mode 120000 index 5c92d90b28..0000000000 --- a/Lang/Rust/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Rust \ No newline at end of file diff --git a/Lang/Rust/Color-quantization b/Lang/Rust/Color-quantization deleted file mode 120000 index 76c5471c0f..0000000000 --- a/Lang/Rust/Color-quantization +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-quantization/Rust \ No newline at end of file diff --git a/Lang/Rust/Commatizing-numbers b/Lang/Rust/Commatizing-numbers deleted file mode 120000 index 5df0e95315..0000000000 --- a/Lang/Rust/Commatizing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Commatizing-numbers/Rust \ No newline at end of file diff --git a/Lang/Rust/Compare-sorting-algorithms-performance b/Lang/Rust/Compare-sorting-algorithms-performance deleted file mode 120000 index 7676ca3dd8..0000000000 --- a/Lang/Rust/Compare-sorting-algorithms-performance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-sorting-algorithms-performance/Rust \ No newline at end of file diff --git a/Lang/Rust/Compiler-AST-interpreter b/Lang/Rust/Compiler-AST-interpreter deleted file mode 120000 index 2028e35209..0000000000 --- a/Lang/Rust/Compiler-AST-interpreter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-AST-interpreter/Rust \ No newline at end of file diff --git a/Lang/Rust/Compiler-code-generator b/Lang/Rust/Compiler-code-generator deleted file mode 120000 index fa460708f3..0000000000 --- a/Lang/Rust/Compiler-code-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-code-generator/Rust \ No newline at end of file diff --git a/Lang/Rust/Compiler-lexical-analyzer b/Lang/Rust/Compiler-lexical-analyzer deleted file mode 120000 index b603fdc69a..0000000000 --- a/Lang/Rust/Compiler-lexical-analyzer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-lexical-analyzer/Rust \ No newline at end of file diff --git a/Lang/Rust/Compiler-syntax-analyzer b/Lang/Rust/Compiler-syntax-analyzer deleted file mode 120000 index 4fa6fc40a8..0000000000 --- a/Lang/Rust/Compiler-syntax-analyzer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compiler-syntax-analyzer/Rust \ No newline at end of file diff --git a/Lang/Rust/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/Rust/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- deleted file mode 120000 index 7e0955d429..0000000000 --- a/Lang/Rust/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/Rust \ No newline at end of file diff --git a/Lang/Rust/Cyclops-numbers b/Lang/Rust/Cyclops-numbers deleted file mode 120000 index 044bb62e43..0000000000 --- a/Lang/Rust/Cyclops-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclops-numbers/Rust \ No newline at end of file diff --git a/Lang/Rust/Cyclotomic-polynomial b/Lang/Rust/Cyclotomic-polynomial deleted file mode 120000 index 8ff16fabbb..0000000000 --- a/Lang/Rust/Cyclotomic-polynomial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclotomic-polynomial/Rust \ No newline at end of file diff --git a/Lang/Rust/De-Bruijn-sequences b/Lang/Rust/De-Bruijn-sequences deleted file mode 120000 index 69c62c6871..0000000000 --- a/Lang/Rust/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/Rust \ No newline at end of file diff --git a/Lang/Rust/Deconvolution-1D b/Lang/Rust/Deconvolution-1D deleted file mode 120000 index d02a914ea3..0000000000 --- a/Lang/Rust/Deconvolution-1D +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-1D/Rust \ No newline at end of file diff --git a/Lang/Rust/Deconvolution-2D+ b/Lang/Rust/Deconvolution-2D+ deleted file mode 120000 index 4b9cb470ba..0000000000 --- a/Lang/Rust/Deconvolution-2D+ +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-2D+/Rust \ No newline at end of file diff --git a/Lang/Rust/Demings-funnel b/Lang/Rust/Demings-funnel deleted file mode 120000 index 295d5542ba..0000000000 --- a/Lang/Rust/Demings-funnel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Demings-funnel/Rust \ No newline at end of file diff --git a/Lang/Rust/Descending-primes b/Lang/Rust/Descending-primes deleted file mode 120000 index fc953fbf4e..0000000000 --- a/Lang/Rust/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Rust \ No newline at end of file diff --git a/Lang/Rust/Determine-if-two-triangles-overlap b/Lang/Rust/Determine-if-two-triangles-overlap deleted file mode 120000 index 2bc1e5e063..0000000000 --- a/Lang/Rust/Determine-if-two-triangles-overlap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-two-triangles-overlap/Rust \ No newline at end of file diff --git a/Lang/Rust/Determine-sentence-type b/Lang/Rust/Determine-sentence-type deleted file mode 120000 index caee594e4d..0000000000 --- a/Lang/Rust/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Rust \ No newline at end of file diff --git a/Lang/Rust/Doubly-linked-list-Definition b/Lang/Rust/Doubly-linked-list-Definition deleted file mode 120000 index 9eb9054258..0000000000 --- a/Lang/Rust/Doubly-linked-list-Definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Definition/Rust \ No newline at end of file diff --git a/Lang/Rust/Doubly-linked-list-Traversal b/Lang/Rust/Doubly-linked-list-Traversal deleted file mode 120000 index b44bd60c3c..0000000000 --- a/Lang/Rust/Doubly-linked-list-Traversal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doubly-linked-list-Traversal/Rust \ No newline at end of file diff --git a/Lang/Rust/Duffinian-numbers b/Lang/Rust/Duffinian-numbers deleted file mode 120000 index 5a84e9b8ff..0000000000 --- a/Lang/Rust/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/Rust \ No newline at end of file diff --git a/Lang/Rust/Eban-numbers b/Lang/Rust/Eban-numbers deleted file mode 120000 index cf564cdce5..0000000000 --- a/Lang/Rust/Eban-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eban-numbers/Rust \ No newline at end of file diff --git a/Lang/Rust/Elliptic-Curve-Digital-Signature-Algorithm b/Lang/Rust/Elliptic-Curve-Digital-Signature-Algorithm deleted file mode 120000 index f6d4ecb90e..0000000000 --- a/Lang/Rust/Elliptic-Curve-Digital-Signature-Algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-Curve-Digital-Signature-Algorithm/Rust \ No newline at end of file diff --git a/Lang/Rust/Elliptic-curve-arithmetic b/Lang/Rust/Elliptic-curve-arithmetic deleted file mode 120000 index cb1c49b6dd..0000000000 --- a/Lang/Rust/Elliptic-curve-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-curve-arithmetic/Rust \ No newline at end of file diff --git a/Lang/Rust/Faulhabers-formula b/Lang/Rust/Faulhabers-formula deleted file mode 120000 index f7691b3566..0000000000 --- a/Lang/Rust/Faulhabers-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Faulhabers-formula/Rust \ No newline at end of file diff --git a/Lang/Rust/Faulhabers-triangle b/Lang/Rust/Faulhabers-triangle deleted file mode 120000 index 49b5537877..0000000000 --- a/Lang/Rust/Faulhabers-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Faulhabers-triangle/Rust \ No newline at end of file diff --git a/Lang/Rust/Find-largest-left-truncatable-prime-in-a-given-base b/Lang/Rust/Find-largest-left-truncatable-prime-in-a-given-base deleted file mode 120000 index e7da5ced0b..0000000000 --- a/Lang/Rust/Find-largest-left-truncatable-prime-in-a-given-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-largest-left-truncatable-prime-in-a-given-base/Rust \ No newline at end of file diff --git a/Lang/Rust/Fractran b/Lang/Rust/Fractran deleted file mode 120000 index 46ed1ab96e..0000000000 --- a/Lang/Rust/Fractran +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractran/Rust \ No newline at end of file diff --git a/Lang/Rust/French-Republican-calendar b/Lang/Rust/French-Republican-calendar deleted file mode 120000 index 60dfe0f429..0000000000 --- a/Lang/Rust/French-Republican-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/French-Republican-calendar/Rust \ No newline at end of file diff --git a/Lang/Rust/Functional-coverage-tree b/Lang/Rust/Functional-coverage-tree deleted file mode 120000 index fab149755e..0000000000 --- a/Lang/Rust/Functional-coverage-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Functional-coverage-tree/Rust \ No newline at end of file diff --git a/Lang/Rust/Graph-colouring b/Lang/Rust/Graph-colouring deleted file mode 120000 index acb44a12b7..0000000000 --- a/Lang/Rust/Graph-colouring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Graph-colouring/Rust \ No newline at end of file diff --git a/Lang/Rust/Hex-words b/Lang/Rust/Hex-words deleted file mode 120000 index 9322882ab9..0000000000 --- a/Lang/Rust/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/Rust \ No newline at end of file diff --git a/Lang/Rust/Humble-numbers b/Lang/Rust/Humble-numbers deleted file mode 120000 index 001b631312..0000000000 --- a/Lang/Rust/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/Rust \ No newline at end of file diff --git a/Lang/Rust/Knapsack-problem-Bounded b/Lang/Rust/Knapsack-problem-Bounded deleted file mode 120000 index db57c7551f..0000000000 --- a/Lang/Rust/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/Rust \ No newline at end of file diff --git a/Lang/Rust/Kosaraju b/Lang/Rust/Kosaraju deleted file mode 120000 index 69a0c5ef3e..0000000000 --- a/Lang/Rust/Kosaraju +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kosaraju/Rust \ No newline at end of file diff --git a/Lang/Rust/Latin-Squares-in-reduced-form b/Lang/Rust/Latin-Squares-in-reduced-form deleted file mode 120000 index 17d284a00f..0000000000 --- a/Lang/Rust/Latin-Squares-in-reduced-form +++ /dev/null @@ -1 +0,0 @@ -../../Task/Latin-Squares-in-reduced-form/Rust \ No newline at end of file diff --git a/Lang/Rust/List-rooted-trees b/Lang/Rust/List-rooted-trees deleted file mode 120000 index ef07119312..0000000000 --- a/Lang/Rust/List-rooted-trees +++ /dev/null @@ -1 +0,0 @@ -../../Task/List-rooted-trees/Rust \ No newline at end of file diff --git a/Lang/Rust/Long-literals-with-continuations b/Lang/Rust/Long-literals-with-continuations deleted file mode 120000 index ad69d0820b..0000000000 --- a/Lang/Rust/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/Rust \ No newline at end of file diff --git a/Lang/Rust/Mayan-calendar b/Lang/Rust/Mayan-calendar deleted file mode 120000 index 8da8002279..0000000000 --- a/Lang/Rust/Mayan-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-calendar/Rust \ No newline at end of file diff --git a/Lang/Rust/Median-filter b/Lang/Rust/Median-filter deleted file mode 120000 index 1cdae0e790..0000000000 --- a/Lang/Rust/Median-filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Median-filter/Rust \ No newline at end of file diff --git a/Lang/Rust/Miller-Rabin-primality-test b/Lang/Rust/Miller-Rabin-primality-test new file mode 120000 index 0000000000..937aebe94f --- /dev/null +++ b/Lang/Rust/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Rust \ No newline at end of file diff --git a/Lang/Rust/Modular-arithmetic b/Lang/Rust/Modular-arithmetic deleted file mode 120000 index bf3b8fce76..0000000000 --- a/Lang/Rust/Modular-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-arithmetic/Rust \ No newline at end of file diff --git a/Lang/Rust/Multiple-regression b/Lang/Rust/Multiple-regression deleted file mode 120000 index 84425ee458..0000000000 --- a/Lang/Rust/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/Rust \ No newline at end of file diff --git a/Lang/Rust/Natural-sorting b/Lang/Rust/Natural-sorting deleted file mode 120000 index 77b1a7de05..0000000000 --- a/Lang/Rust/Natural-sorting +++ /dev/null @@ -1 +0,0 @@ -../../Task/Natural-sorting/Rust \ No newline at end of file diff --git a/Lang/Rust/Non-continuous-subsequences b/Lang/Rust/Non-continuous-subsequences deleted file mode 120000 index 7152418d6c..0000000000 --- a/Lang/Rust/Non-continuous-subsequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-continuous-subsequences/Rust \ No newline at end of file diff --git a/Lang/Rust/Nonogram-solver b/Lang/Rust/Nonogram-solver deleted file mode 120000 index 670a3f0f6a..0000000000 --- a/Lang/Rust/Nonogram-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nonogram-solver/Rust \ No newline at end of file diff --git a/Lang/Rust/Numerical-and-alphabetical-suffixes b/Lang/Rust/Numerical-and-alphabetical-suffixes deleted file mode 120000 index 0446d710e5..0000000000 --- a/Lang/Rust/Numerical-and-alphabetical-suffixes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-and-alphabetical-suffixes/Rust \ No newline at end of file diff --git a/Lang/Rust/OpenWebNet-password b/Lang/Rust/OpenWebNet-password deleted file mode 120000 index 24be1f8b4a..0000000000 --- a/Lang/Rust/OpenWebNet-password +++ /dev/null @@ -1 +0,0 @@ -../../Task/OpenWebNet-password/Rust \ No newline at end of file diff --git a/Lang/Rust/P-Adic-numbers-basic b/Lang/Rust/P-Adic-numbers-basic deleted file mode 120000 index 2ccd34b2fd..0000000000 --- a/Lang/Rust/P-Adic-numbers-basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-numbers-basic/Rust \ No newline at end of file diff --git a/Lang/Rust/P-Adic-square-roots b/Lang/Rust/P-Adic-square-roots deleted file mode 120000 index ed4fb995e0..0000000000 --- a/Lang/Rust/P-Adic-square-roots +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-square-roots/Rust \ No newline at end of file diff --git a/Lang/Rust/Permutations-Derangements b/Lang/Rust/Permutations-Derangements deleted file mode 120000 index 9efa9a4159..0000000000 --- a/Lang/Rust/Permutations-Derangements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations-Derangements/Rust \ No newline at end of file diff --git a/Lang/Rust/Playfair-cipher b/Lang/Rust/Playfair-cipher deleted file mode 120000 index f3e93df373..0000000000 --- a/Lang/Rust/Playfair-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Playfair-cipher/Rust \ No newline at end of file diff --git a/Lang/Rust/Polynomial-regression b/Lang/Rust/Polynomial-regression deleted file mode 120000 index cdb9cdc8ff..0000000000 --- a/Lang/Rust/Polynomial-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polynomial-regression/Rust \ No newline at end of file diff --git a/Lang/Rust/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a b/Lang/Rust/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a deleted file mode 120000 index a557952f5e..0000000000 --- a/Lang/Rust/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Combined-recursive-generator-MRG32k3a/Rust \ No newline at end of file diff --git a/Lang/Rust/Pseudo-random-numbers-Middle-square-method b/Lang/Rust/Pseudo-random-numbers-Middle-square-method deleted file mode 120000 index 07d7dfdf71..0000000000 --- a/Lang/Rust/Pseudo-random-numbers-Middle-square-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Middle-square-method/Rust \ No newline at end of file diff --git a/Lang/Rust/Pseudo-random-numbers-Splitmix64 b/Lang/Rust/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index af868efefa..0000000000 --- a/Lang/Rust/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/Rust \ No newline at end of file diff --git a/Lang/Rust/QR-decomposition b/Lang/Rust/QR-decomposition deleted file mode 120000 index b6ec08cee6..0000000000 --- a/Lang/Rust/QR-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/QR-decomposition/Rust \ No newline at end of file diff --git a/Lang/Rust/Quaternion-type b/Lang/Rust/Quaternion-type new file mode 120000 index 0000000000..92c25b946f --- /dev/null +++ b/Lang/Rust/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Rust \ No newline at end of file diff --git a/Lang/Rust/Ramanujan-primes-twins b/Lang/Rust/Ramanujan-primes-twins deleted file mode 120000 index ec360cedbc..0000000000 --- a/Lang/Rust/Ramanujan-primes-twins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ramanujan-primes-twins/Rust \ No newline at end of file diff --git a/Lang/Rust/Rendezvous b/Lang/Rust/Rendezvous deleted file mode 120000 index 2ae4407138..0000000000 --- a/Lang/Rust/Rendezvous +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rendezvous/Rust \ No newline at end of file diff --git a/Lang/Rust/Resistor-mesh b/Lang/Rust/Resistor-mesh deleted file mode 120000 index 245eca7f06..0000000000 --- a/Lang/Rust/Resistor-mesh +++ /dev/null @@ -1 +0,0 @@ -../../Task/Resistor-mesh/Rust \ No newline at end of file diff --git a/Lang/Rust/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Rust/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Rust/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Rust/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Rust/Shoelace-formula-for-polygonal-area b/Lang/Rust/Shoelace-formula-for-polygonal-area deleted file mode 120000 index 4ce5ca075a..0000000000 --- a/Lang/Rust/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/Rust \ No newline at end of file diff --git a/Lang/Rust/Singleton b/Lang/Rust/Singleton deleted file mode 120000 index 480988c162..0000000000 --- a/Lang/Rust/Singleton +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singleton/Rust \ No newline at end of file diff --git a/Lang/Rust/Sokoban b/Lang/Rust/Sokoban deleted file mode 120000 index 57d1bc73b3..0000000000 --- a/Lang/Rust/Sokoban +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sokoban/Rust \ No newline at end of file diff --git a/Lang/Rust/Solve-a-Holy-Knights-tour b/Lang/Rust/Solve-a-Holy-Knights-tour deleted file mode 120000 index 7d376bff89..0000000000 --- a/Lang/Rust/Solve-a-Holy-Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Holy-Knights-tour/Rust \ No newline at end of file diff --git a/Lang/Rust/Solve-a-Hopido-puzzle b/Lang/Rust/Solve-a-Hopido-puzzle deleted file mode 120000 index 13eae5b688..0000000000 --- a/Lang/Rust/Solve-a-Hopido-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hopido-puzzle/Rust \ No newline at end of file diff --git a/Lang/Rust/Solve-a-Numbrix-puzzle b/Lang/Rust/Solve-a-Numbrix-puzzle deleted file mode 120000 index 6da0fac9a0..0000000000 --- a/Lang/Rust/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/Rust \ No newline at end of file diff --git a/Lang/Rust/Sorting-Algorithms-Circle-Sort b/Lang/Rust/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..924c0eb5ac --- /dev/null +++ b/Lang/Rust/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Rust \ No newline at end of file diff --git a/Lang/Rust/Sorting-algorithms-Bead-sort b/Lang/Rust/Sorting-algorithms-Bead-sort deleted file mode 120000 index 1096740d47..0000000000 --- a/Lang/Rust/Sorting-algorithms-Bead-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Bead-sort/Rust \ No newline at end of file diff --git a/Lang/Rust/Sorting-algorithms-Patience-sort b/Lang/Rust/Sorting-algorithms-Patience-sort deleted file mode 120000 index 98bfba78ce..0000000000 --- a/Lang/Rust/Sorting-algorithms-Patience-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Patience-sort/Rust \ No newline at end of file diff --git a/Lang/Rust/Sorting-algorithms-Permutation-sort b/Lang/Rust/Sorting-algorithms-Permutation-sort deleted file mode 120000 index 0bbf7e172b..0000000000 --- a/Lang/Rust/Sorting-algorithms-Permutation-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Permutation-sort/Rust \ No newline at end of file diff --git a/Lang/Rust/Sorting-algorithms-Strand-sort b/Lang/Rust/Sorting-algorithms-Strand-sort deleted file mode 120000 index c01a273a80..0000000000 --- a/Lang/Rust/Sorting-algorithms-Strand-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Strand-sort/Rust \ No newline at end of file diff --git a/Lang/Rust/Special-characters b/Lang/Rust/Special-characters deleted file mode 120000 index 7cb915367e..0000000000 --- a/Lang/Rust/Special-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Special-characters/Rust \ No newline at end of file diff --git a/Lang/Rust/Stable-marriage-problem b/Lang/Rust/Stable-marriage-problem deleted file mode 120000 index 98e509ab20..0000000000 --- a/Lang/Rust/Stable-marriage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stable-marriage-problem/Rust \ No newline at end of file diff --git a/Lang/Rust/State-name-puzzle b/Lang/Rust/State-name-puzzle deleted file mode 120000 index a88b598d4b..0000000000 --- a/Lang/Rust/State-name-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/State-name-puzzle/Rust \ No newline at end of file diff --git a/Lang/Rust/Steffensens-method b/Lang/Rust/Steffensens-method deleted file mode 120000 index 4aa426ad52..0000000000 --- a/Lang/Rust/Steffensens-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Steffensens-method/Rust \ No newline at end of file diff --git a/Lang/Rust/Stem-and-leaf-plot b/Lang/Rust/Stem-and-leaf-plot deleted file mode 120000 index c5e2a0d27c..0000000000 --- a/Lang/Rust/Stem-and-leaf-plot +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stem-and-leaf-plot/Rust \ No newline at end of file diff --git a/Lang/Rust/Stern-Brocot-sequence b/Lang/Rust/Stern-Brocot-sequence deleted file mode 120000 index 72080b645a..0000000000 --- a/Lang/Rust/Stern-Brocot-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stern-Brocot-sequence/Rust \ No newline at end of file diff --git a/Lang/Rust/Strassens-algorithm b/Lang/Rust/Strassens-algorithm deleted file mode 120000 index 059089e819..0000000000 --- a/Lang/Rust/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Rust \ No newline at end of file diff --git a/Lang/Rust/Stream-merge b/Lang/Rust/Stream-merge deleted file mode 120000 index 101f42c85a..0000000000 --- a/Lang/Rust/Stream-merge +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stream-merge/Rust \ No newline at end of file diff --git a/Lang/Rust/Strip-block-comments b/Lang/Rust/Strip-block-comments deleted file mode 120000 index c9f77902d0..0000000000 --- a/Lang/Rust/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/Rust \ No newline at end of file diff --git a/Lang/Rust/Strip-control-codes-and-extended-characters-from-a-string b/Lang/Rust/Strip-control-codes-and-extended-characters-from-a-string deleted file mode 120000 index 56a1876479..0000000000 --- a/Lang/Rust/Strip-control-codes-and-extended-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-control-codes-and-extended-characters-from-a-string/Rust \ No newline at end of file diff --git a/Lang/Rust/Subleq b/Lang/Rust/Subleq deleted file mode 120000 index cc28544f34..0000000000 --- a/Lang/Rust/Subleq +++ /dev/null @@ -1 +0,0 @@ -../../Task/Subleq/Rust \ No newline at end of file diff --git a/Lang/Rust/Substitution-cipher b/Lang/Rust/Substitution-cipher deleted file mode 120000 index aa3ad1011d..0000000000 --- a/Lang/Rust/Substitution-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substitution-cipher/Rust \ No newline at end of file diff --git a/Lang/Rust/Sudan-function b/Lang/Rust/Sudan-function deleted file mode 120000 index 29cdeee99f..0000000000 --- a/Lang/Rust/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/Rust \ No newline at end of file diff --git a/Lang/Rust/Suffixation-of-decimal-numbers b/Lang/Rust/Suffixation-of-decimal-numbers deleted file mode 120000 index 2428a135a4..0000000000 --- a/Lang/Rust/Suffixation-of-decimal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Suffixation-of-decimal-numbers/Rust \ No newline at end of file diff --git a/Lang/Rust/Summarize-and-say-sequence b/Lang/Rust/Summarize-and-say-sequence deleted file mode 120000 index 030276987c..0000000000 --- a/Lang/Rust/Summarize-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-and-say-sequence/Rust \ No newline at end of file diff --git a/Lang/Rust/Superpermutation-minimisation b/Lang/Rust/Superpermutation-minimisation deleted file mode 120000 index 8b214e27cd..0000000000 --- a/Lang/Rust/Superpermutation-minimisation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Superpermutation-minimisation/Rust \ No newline at end of file diff --git a/Lang/Rust/The-Name-Game b/Lang/Rust/The-Name-Game deleted file mode 120000 index 92835f00de..0000000000 --- a/Lang/Rust/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/Rust \ No newline at end of file diff --git a/Lang/Rust/Tonelli-Shanks-algorithm b/Lang/Rust/Tonelli-Shanks-algorithm deleted file mode 120000 index b90bd71718..0000000000 --- a/Lang/Rust/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/Rust \ No newline at end of file diff --git a/Lang/Rust/Tree-datastructures b/Lang/Rust/Tree-datastructures deleted file mode 120000 index 37b567712c..0000000000 --- a/Lang/Rust/Tree-datastructures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-datastructures/Rust \ No newline at end of file diff --git a/Lang/Rust/Tropical-algebra-overloading b/Lang/Rust/Tropical-algebra-overloading deleted file mode 120000 index 271296f0b3..0000000000 --- a/Lang/Rust/Tropical-algebra-overloading +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tropical-algebra-overloading/Rust \ No newline at end of file diff --git a/Lang/Rust/Twos-complement b/Lang/Rust/Twos-complement deleted file mode 120000 index 086c8719d1..0000000000 --- a/Lang/Rust/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Rust \ No newline at end of file diff --git a/Lang/Rust/UPC b/Lang/Rust/UPC deleted file mode 120000 index 775faf96be..0000000000 --- a/Lang/Rust/UPC +++ /dev/null @@ -1 +0,0 @@ -../../Task/UPC/Rust \ No newline at end of file diff --git a/Lang/Rust/Ukkonen-s-suffix-tree-construction b/Lang/Rust/Ukkonen-s-suffix-tree-construction deleted file mode 120000 index 684e412fed..0000000000 --- a/Lang/Rust/Ukkonen-s-suffix-tree-construction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ukkonen-s-suffix-tree-construction/Rust \ No newline at end of file diff --git a/Lang/Rust/Verhoeff-algorithm b/Lang/Rust/Verhoeff-algorithm deleted file mode 120000 index fd5322e5ec..0000000000 --- a/Lang/Rust/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/Rust \ No newline at end of file diff --git a/Lang/Rust/Vogels-approximation-method b/Lang/Rust/Vogels-approximation-method deleted file mode 120000 index 377b0aef0a..0000000000 --- a/Lang/Rust/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/Rust \ No newline at end of file diff --git a/Lang/Rust/War-card-game b/Lang/Rust/War-card-game deleted file mode 120000 index bc45c42250..0000000000 --- a/Lang/Rust/War-card-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/War-card-game/Rust \ No newline at end of file diff --git a/Lang/Rust/Word-ladder b/Lang/Rust/Word-ladder deleted file mode 120000 index 9973e5c323..0000000000 --- a/Lang/Rust/Word-ladder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-ladder/Rust \ No newline at end of file diff --git a/Lang/Rust/Word-search b/Lang/Rust/Word-search deleted file mode 120000 index 737b35c0c7..0000000000 --- a/Lang/Rust/Word-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-search/Rust \ No newline at end of file diff --git a/Lang/Rust/Word-wheel b/Lang/Rust/Word-wheel deleted file mode 120000 index 3c8a9835e5..0000000000 --- a/Lang/Rust/Word-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wheel/Rust \ No newline at end of file diff --git a/Lang/Rust/Wordiff b/Lang/Rust/Wordiff deleted file mode 120000 index 44e42a760a..0000000000 --- a/Lang/Rust/Wordiff +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wordiff/Rust \ No newline at end of file diff --git a/Lang/Rust/Xiaolin-Wus-line-algorithm b/Lang/Rust/Xiaolin-Wus-line-algorithm deleted file mode 120000 index 68352a1cb5..0000000000 --- a/Lang/Rust/Xiaolin-Wus-line-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Xiaolin-Wus-line-algorithm/Rust \ No newline at end of file diff --git a/Lang/Rust/Zebra-puzzle b/Lang/Rust/Zebra-puzzle deleted file mode 120000 index 2b9c2729f7..0000000000 --- a/Lang/Rust/Zebra-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zebra-puzzle/Rust \ No newline at end of file diff --git a/Lang/Rye/00-LANG.txt b/Lang/Rye/00-LANG.txt deleted file mode 100644 index 10b016e264..0000000000 --- a/Lang/Rye/00-LANG.txt +++ /dev/null @@ -1,11 +0,0 @@ -{{stub}}{{language|rye}} -Rye is a flexible, high-level programming language designed for predictable state management. Rye takes ideas from Rebol, and adds few from Factor, Linux shell, and Go. Written in Go, Rye doubles as a scripting companion for Go programs. Go's libraries integrate seamlessly, and Rye can be embedded as a scripting or config language for Go programs. - -As a high-level language, Rye explores bridging coding and user interfaces. Its interactive console features syntax highlighting, history, tab completion, and tools to explore the language and environment you’re crafting. - -==Todo== -[https://rosettacode.org/wiki/Tasks_not_implemented_in_Rye Tasks not implemented in Rye] - -==Links== -*[https://ryelang.org/ Homepage] -*[https://github.com/refaktor/rye Github repository] \ No newline at end of file diff --git a/Lang/Rye/00-META.yaml b/Lang/Rye/00-META.yaml deleted file mode 100644 index c4fbe956c0..0000000000 --- a/Lang/Rye/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Rye diff --git a/Lang/Rye/100-doors b/Lang/Rye/100-doors deleted file mode 120000 index 438aa2dd57..0000000000 --- a/Lang/Rye/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Rye \ No newline at end of file diff --git a/Lang/Rye/99-bottles-of-beer b/Lang/Rye/99-bottles-of-beer deleted file mode 120000 index bd33c6e283..0000000000 --- a/Lang/Rye/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Rye \ No newline at end of file diff --git a/Lang/Rye/A+B b/Lang/Rye/A+B deleted file mode 120000 index cd82f2f9d7..0000000000 --- a/Lang/Rye/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Rye \ No newline at end of file diff --git a/Lang/Rye/Arithmetic-Integer b/Lang/Rye/Arithmetic-Integer deleted file mode 120000 index 3854f98ef8..0000000000 --- a/Lang/Rye/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Rye \ No newline at end of file diff --git a/Lang/Rye/Array-concatenation b/Lang/Rye/Array-concatenation deleted file mode 120000 index e06de8357b..0000000000 --- a/Lang/Rye/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/Rye \ No newline at end of file diff --git a/Lang/Rye/Array-length b/Lang/Rye/Array-length deleted file mode 120000 index f3ddf845d5..0000000000 --- a/Lang/Rye/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Rye \ No newline at end of file diff --git a/Lang/Rye/Arrays b/Lang/Rye/Arrays deleted file mode 120000 index 0051f3551e..0000000000 --- a/Lang/Rye/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Rye \ No newline at end of file diff --git a/Lang/Rye/Assertions b/Lang/Rye/Assertions deleted file mode 120000 index 55dc6c4a1c..0000000000 --- a/Lang/Rye/Assertions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Assertions/Rye \ No newline at end of file diff --git a/Lang/Rye/Associative-array-Creation b/Lang/Rye/Associative-array-Creation deleted file mode 120000 index 6d8b394caa..0000000000 --- a/Lang/Rye/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Rye \ No newline at end of file diff --git a/Lang/Rye/Catamorphism b/Lang/Rye/Catamorphism deleted file mode 120000 index 1cc0f4cd16..0000000000 --- a/Lang/Rye/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/Rye \ No newline at end of file diff --git a/Lang/Rye/Check-that-file-exists b/Lang/Rye/Check-that-file-exists deleted file mode 120000 index 0f1689d415..0000000000 --- a/Lang/Rye/Check-that-file-exists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-that-file-exists/Rye \ No newline at end of file diff --git a/Lang/Rye/Collections b/Lang/Rye/Collections deleted file mode 120000 index 8619dddf36..0000000000 --- a/Lang/Rye/Collections +++ /dev/null @@ -1 +0,0 @@ -../../Task/Collections/Rye \ No newline at end of file diff --git a/Lang/Rye/Compare-length-of-two-strings b/Lang/Rye/Compare-length-of-two-strings deleted file mode 120000 index 3ee03067fd..0000000000 --- a/Lang/Rye/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Rye \ No newline at end of file diff --git a/Lang/Rye/Copy-a-string b/Lang/Rye/Copy-a-string deleted file mode 120000 index 5130e809be..0000000000 --- a/Lang/Rye/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/Rye \ No newline at end of file diff --git a/Lang/Rye/Create-a-file b/Lang/Rye/Create-a-file deleted file mode 120000 index 933dfda3ec..0000000000 --- a/Lang/Rye/Create-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-file/Rye \ No newline at end of file diff --git a/Lang/Rye/DNS-query b/Lang/Rye/DNS-query deleted file mode 120000 index 25d8db99dd..0000000000 --- a/Lang/Rye/DNS-query +++ /dev/null @@ -1 +0,0 @@ -../../Task/DNS-query/Rye \ No newline at end of file diff --git a/Lang/Rye/Date-format b/Lang/Rye/Date-format deleted file mode 120000 index 3a4d47e12d..0000000000 --- a/Lang/Rye/Date-format +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-format/Rye \ No newline at end of file diff --git a/Lang/Rye/Date-manipulation b/Lang/Rye/Date-manipulation deleted file mode 120000 index aae44dde34..0000000000 --- a/Lang/Rye/Date-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Date-manipulation/Rye \ No newline at end of file diff --git a/Lang/Rye/Day-of-the-week b/Lang/Rye/Day-of-the-week deleted file mode 120000 index 39e63de9c9..0000000000 --- a/Lang/Rye/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Rye \ No newline at end of file diff --git a/Lang/Rye/Delete-a-file b/Lang/Rye/Delete-a-file deleted file mode 120000 index 9eea0e6587..0000000000 --- a/Lang/Rye/Delete-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delete-a-file/Rye \ No newline at end of file diff --git a/Lang/Rye/Detect-division-by-zero b/Lang/Rye/Detect-division-by-zero deleted file mode 120000 index f063a804c3..0000000000 --- a/Lang/Rye/Detect-division-by-zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Detect-division-by-zero/Rye \ No newline at end of file diff --git a/Lang/Rye/Determine-if-a-string-is-numeric b/Lang/Rye/Determine-if-a-string-is-numeric deleted file mode 120000 index 921464be9b..0000000000 --- a/Lang/Rye/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Rye \ No newline at end of file diff --git a/Lang/Rye/Dot-product b/Lang/Rye/Dot-product deleted file mode 120000 index ae39c4baea..0000000000 --- a/Lang/Rye/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Rye \ No newline at end of file diff --git a/Lang/Rye/Empty-string b/Lang/Rye/Empty-string deleted file mode 120000 index f9e83f3c4d..0000000000 --- a/Lang/Rye/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/Rye \ No newline at end of file diff --git a/Lang/Rye/Environment-variables b/Lang/Rye/Environment-variables deleted file mode 120000 index 61b0fc4a40..0000000000 --- a/Lang/Rye/Environment-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Environment-variables/Rye \ No newline at end of file diff --git a/Lang/Rye/Even-or-odd b/Lang/Rye/Even-or-odd deleted file mode 120000 index 8e627fbc05..0000000000 --- a/Lang/Rye/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/Rye \ No newline at end of file diff --git a/Lang/Rye/Exceptions b/Lang/Rye/Exceptions deleted file mode 120000 index 98c5a1f0b9..0000000000 --- a/Lang/Rye/Exceptions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exceptions/Rye \ No newline at end of file diff --git a/Lang/Rye/Execute-a-system-command b/Lang/Rye/Execute-a-system-command deleted file mode 120000 index 6ef49fa4fa..0000000000 --- a/Lang/Rye/Execute-a-system-command +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-a-system-command/Rye \ No newline at end of file diff --git a/Lang/Rye/File-input-output b/Lang/Rye/File-input-output deleted file mode 120000 index 92a41d1ae9..0000000000 --- a/Lang/Rye/File-input-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-input-output/Rye \ No newline at end of file diff --git a/Lang/Rye/File-size b/Lang/Rye/File-size deleted file mode 120000 index 434016471c..0000000000 --- a/Lang/Rye/File-size +++ /dev/null @@ -1 +0,0 @@ -../../Task/File-size/Rye \ No newline at end of file diff --git a/Lang/Rye/Filter b/Lang/Rye/Filter deleted file mode 120000 index be25d82950..0000000000 --- a/Lang/Rye/Filter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Filter/Rye \ No newline at end of file diff --git a/Lang/Rye/Function-definition b/Lang/Rye/Function-definition deleted file mode 120000 index aacf81b6b4..0000000000 --- a/Lang/Rye/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/Rye \ No newline at end of file diff --git a/Lang/Rye/Get-system-command-output b/Lang/Rye/Get-system-command-output deleted file mode 120000 index 0faad90e64..0000000000 --- a/Lang/Rye/Get-system-command-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Get-system-command-output/Rye \ No newline at end of file diff --git a/Lang/Rye/Globally-replace-text-in-several-files b/Lang/Rye/Globally-replace-text-in-several-files deleted file mode 120000 index 3bc1b5796d..0000000000 --- a/Lang/Rye/Globally-replace-text-in-several-files +++ /dev/null @@ -1 +0,0 @@ -../../Task/Globally-replace-text-in-several-files/Rye \ No newline at end of file diff --git a/Lang/Rye/Greatest-element-of-a-list b/Lang/Rye/Greatest-element-of-a-list deleted file mode 120000 index 3f8290710b..0000000000 --- a/Lang/Rye/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/Rye \ No newline at end of file diff --git a/Lang/Rye/Guess-the-number b/Lang/Rye/Guess-the-number deleted file mode 120000 index 3554ecb000..0000000000 --- a/Lang/Rye/Guess-the-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number/Rye \ No newline at end of file diff --git a/Lang/Rye/Hello-world-Graphical b/Lang/Rye/Hello-world-Graphical deleted file mode 120000 index 8ba960fd9f..0000000000 --- a/Lang/Rye/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/Rye \ No newline at end of file diff --git a/Lang/Rye/Hello-world-Newbie b/Lang/Rye/Hello-world-Newbie deleted file mode 120000 index 404d5bf799..0000000000 --- a/Lang/Rye/Hello-world-Newbie +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newbie/Rye \ No newline at end of file diff --git a/Lang/Rye/Hello-world-Newline-omission b/Lang/Rye/Hello-world-Newline-omission deleted file mode 120000 index 8978311a91..0000000000 --- a/Lang/Rye/Hello-world-Newline-omission +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Newline-omission/Rye \ No newline at end of file diff --git a/Lang/Rye/Hello-world-Text b/Lang/Rye/Hello-world-Text deleted file mode 120000 index 527e3f5d07..0000000000 --- a/Lang/Rye/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Rye \ No newline at end of file diff --git a/Lang/Rye/Hello-world-Web-server b/Lang/Rye/Hello-world-Web-server deleted file mode 120000 index 3eb3a08cd7..0000000000 --- a/Lang/Rye/Hello-world-Web-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Web-server/Rye \ No newline at end of file diff --git a/Lang/Rye/Hostname b/Lang/Rye/Hostname deleted file mode 120000 index 794d1a04af..0000000000 --- a/Lang/Rye/Hostname +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hostname/Rye \ No newline at end of file diff --git a/Lang/Rye/Include-a-file b/Lang/Rye/Include-a-file deleted file mode 120000 index 075626de41..0000000000 --- a/Lang/Rye/Include-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Include-a-file/Rye \ No newline at end of file diff --git a/Lang/Rye/Increment-a-numerical-string b/Lang/Rye/Increment-a-numerical-string deleted file mode 120000 index a92efbbcc7..0000000000 --- a/Lang/Rye/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/Rye \ No newline at end of file diff --git a/Lang/Rye/Integer-comparison b/Lang/Rye/Integer-comparison deleted file mode 120000 index b464263441..0000000000 --- a/Lang/Rye/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/Rye \ No newline at end of file diff --git a/Lang/Rye/Jewels-and-stones b/Lang/Rye/Jewels-and-stones deleted file mode 120000 index 2e39bc84a7..0000000000 --- a/Lang/Rye/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/Rye \ No newline at end of file diff --git a/Lang/Rye/Loops-Do-while b/Lang/Rye/Loops-Do-while deleted file mode 120000 index fb7d5e8d59..0000000000 --- a/Lang/Rye/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/Rye \ No newline at end of file diff --git a/Lang/Rye/Loops-For b/Lang/Rye/Loops-For deleted file mode 120000 index 3149a28871..0000000000 --- a/Lang/Rye/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Rye \ No newline at end of file diff --git a/Lang/Rye/Loops-Foreach b/Lang/Rye/Loops-Foreach deleted file mode 120000 index 5feb6cdb06..0000000000 --- a/Lang/Rye/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/Rye \ No newline at end of file diff --git a/Lang/Rye/Loops-Infinite b/Lang/Rye/Loops-Infinite deleted file mode 120000 index 7267542117..0000000000 --- a/Lang/Rye/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Rye \ No newline at end of file diff --git a/Lang/Rye/Loops-While b/Lang/Rye/Loops-While deleted file mode 120000 index 376326123c..0000000000 --- a/Lang/Rye/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Rye \ No newline at end of file diff --git a/Lang/Rye/Nth b/Lang/Rye/Nth deleted file mode 120000 index 5490f22f35..0000000000 --- a/Lang/Rye/Nth +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nth/Rye \ No newline at end of file diff --git a/Lang/Rye/Operator-precedence b/Lang/Rye/Operator-precedence deleted file mode 120000 index 43eb0d7842..0000000000 --- a/Lang/Rye/Operator-precedence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Operator-precedence/Rye \ No newline at end of file diff --git a/Lang/Rye/Ordered-words b/Lang/Rye/Ordered-words deleted file mode 120000 index c1d477486c..0000000000 --- a/Lang/Rye/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Rye \ No newline at end of file diff --git a/Lang/Rye/Partial-function-application b/Lang/Rye/Partial-function-application deleted file mode 120000 index ae25414b27..0000000000 --- a/Lang/Rye/Partial-function-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partial-function-application/Rye \ No newline at end of file diff --git a/Lang/Rye/RPG-attributes-generator b/Lang/Rye/RPG-attributes-generator deleted file mode 120000 index fa9afbb45f..0000000000 --- a/Lang/Rye/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/Rye \ No newline at end of file diff --git a/Lang/Rye/Read-entire-file b/Lang/Rye/Read-entire-file deleted file mode 120000 index 345a900f2b..0000000000 --- a/Lang/Rye/Read-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-entire-file/Rye \ No newline at end of file diff --git a/Lang/Rye/Remove-duplicate-elements b/Lang/Rye/Remove-duplicate-elements deleted file mode 120000 index c6a95084fa..0000000000 --- a/Lang/Rye/Remove-duplicate-elements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Remove-duplicate-elements/Rye \ No newline at end of file diff --git a/Lang/Rye/Rename-a-file b/Lang/Rye/Rename-a-file deleted file mode 120000 index 3dce3fa2f0..0000000000 --- a/Lang/Rye/Rename-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rename-a-file/Rye \ No newline at end of file diff --git a/Lang/Rye/Return-multiple-values b/Lang/Rye/Return-multiple-values deleted file mode 120000 index 9f9f2d8ad1..0000000000 --- a/Lang/Rye/Return-multiple-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Return-multiple-values/Rye \ No newline at end of file diff --git a/Lang/Rye/Reverse-a-string b/Lang/Rye/Reverse-a-string deleted file mode 120000 index 71a229a461..0000000000 --- a/Lang/Rye/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/Rye \ No newline at end of file diff --git a/Lang/Rye/Sleep b/Lang/Rye/Sleep deleted file mode 120000 index caf7749aa7..0000000000 --- a/Lang/Rye/Sleep +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleep/Rye \ No newline at end of file diff --git a/Lang/Rye/Sort-an-integer-array b/Lang/Rye/Sort-an-integer-array deleted file mode 120000 index 8cac11dd37..0000000000 --- a/Lang/Rye/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/Rye \ No newline at end of file diff --git a/Lang/Rye/String-append b/Lang/Rye/String-append deleted file mode 120000 index 7184f2004b..0000000000 --- a/Lang/Rye/String-append +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-append/Rye \ No newline at end of file diff --git a/Lang/Rye/String-case b/Lang/Rye/String-case deleted file mode 120000 index d596578a64..0000000000 --- a/Lang/Rye/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/Rye \ No newline at end of file diff --git a/Lang/Rye/String-concatenation b/Lang/Rye/String-concatenation deleted file mode 120000 index 7a56a81ca6..0000000000 --- a/Lang/Rye/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Rye \ No newline at end of file diff --git a/Lang/Rye/String-interpolation-included- b/Lang/Rye/String-interpolation-included- deleted file mode 120000 index 8918c4450c..0000000000 --- a/Lang/Rye/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/Rye \ No newline at end of file diff --git a/Lang/Rye/String-length b/Lang/Rye/String-length deleted file mode 120000 index bf2836e136..0000000000 --- a/Lang/Rye/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/Rye \ No newline at end of file diff --git a/Lang/Rye/Strip-a-set-of-characters-from-a-string b/Lang/Rye/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index a8703fda98..0000000000 --- a/Lang/Rye/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/Rye \ No newline at end of file diff --git a/Lang/Rye/Strip-whitespace-from-a-string-Top-and-tail b/Lang/Rye/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index d53cb2cf57..0000000000 --- a/Lang/Rye/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/Rye \ No newline at end of file diff --git a/Lang/Rye/Substring-Top-and-tail b/Lang/Rye/Substring-Top-and-tail deleted file mode 120000 index 1cf4555801..0000000000 --- a/Lang/Rye/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/Rye \ No newline at end of file diff --git a/Lang/Rye/Sum-and-product-of-an-array b/Lang/Rye/Sum-and-product-of-an-array deleted file mode 120000 index 95d8d590bc..0000000000 --- a/Lang/Rye/Sum-and-product-of-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-and-product-of-an-array/Rye \ No newline at end of file diff --git a/Lang/Rye/System-time b/Lang/Rye/System-time deleted file mode 120000 index 14391ca376..0000000000 --- a/Lang/Rye/System-time +++ /dev/null @@ -1 +0,0 @@ -../../Task/System-time/Rye \ No newline at end of file diff --git a/Lang/Rye/Tokenize-a-string b/Lang/Rye/Tokenize-a-string deleted file mode 120000 index 404261ec01..0000000000 --- a/Lang/Rye/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/Rye \ No newline at end of file diff --git a/Lang/Rye/User-input-Text b/Lang/Rye/User-input-Text deleted file mode 120000 index 8cd3ad9295..0000000000 --- a/Lang/Rye/User-input-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Text/Rye \ No newline at end of file diff --git a/Lang/Rye/Variables b/Lang/Rye/Variables deleted file mode 120000 index d50ac89ca0..0000000000 --- a/Lang/Rye/Variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variables/Rye \ No newline at end of file diff --git a/Lang/Rye/Window-creation b/Lang/Rye/Window-creation deleted file mode 120000 index 334b72f881..0000000000 --- a/Lang/Rye/Window-creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-creation/Rye \ No newline at end of file diff --git a/Lang/Rye/Write-entire-file b/Lang/Rye/Write-entire-file deleted file mode 120000 index 7a14255070..0000000000 --- a/Lang/Rye/Write-entire-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Write-entire-file/Rye \ No newline at end of file diff --git a/Lang/Rye/Zero-to-the-zero-power b/Lang/Rye/Zero-to-the-zero-power deleted file mode 120000 index 2c54da2a61..0000000000 --- a/Lang/Rye/Zero-to-the-zero-power +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zero-to-the-zero-power/Rye \ No newline at end of file diff --git a/Lang/S-BASIC/00-LANG.txt b/Lang/S-BASIC/00-LANG.txt index cb4f4a5c14..7e71ba9085 100644 --- a/Lang/S-BASIC/00-LANG.txt +++ b/Lang/S-BASIC/00-LANG.txt @@ -1,5 +1,4 @@ {{stub}}{{language|S-BASIC}} -{{implementation|BASIC}} S-BASIC (the S stands for "structured") was a native-code compiler for an ALGOL-like dialect of the BASIC programming language, and ran on 8-bit microcomputers using the Z80 CPU and diff --git a/Lang/S-BASIC/Additive-primes b/Lang/S-BASIC/Additive-primes deleted file mode 120000 index b90d39a158..0000000000 --- a/Lang/S-BASIC/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Address-of-a-variable b/Lang/S-BASIC/Address-of-a-variable deleted file mode 120000 index e42c14ed1b..0000000000 --- a/Lang/S-BASIC/Address-of-a-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Address-of-a-variable/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Case-sensitivity-of-identifiers b/Lang/S-BASIC/Case-sensitivity-of-identifiers deleted file mode 120000 index cf49bbdc11..0000000000 --- a/Lang/S-BASIC/Case-sensitivity-of-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Case-sensitivity-of-identifiers/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Character-codes b/Lang/S-BASIC/Character-codes deleted file mode 120000 index f408189f94..0000000000 --- a/Lang/S-BASIC/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Copy-a-string b/Lang/S-BASIC/Copy-a-string deleted file mode 120000 index cf54fdae2e..0000000000 --- a/Lang/S-BASIC/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Determine-if-a-string-has-all-unique-characters b/Lang/S-BASIC/Determine-if-a-string-has-all-unique-characters deleted file mode 120000 index f2a5cead6b..0000000000 --- a/Lang/S-BASIC/Determine-if-a-string-has-all-unique-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-unique-characters/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Factorial b/Lang/S-BASIC/Factorial deleted file mode 120000 index 3c6e9121ba..0000000000 --- a/Lang/S-BASIC/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Golden-ratio-Convergence b/Lang/S-BASIC/Golden-ratio-Convergence deleted file mode 120000 index 4ad7ad99cc..0000000000 --- a/Lang/S-BASIC/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Harmonic-series b/Lang/S-BASIC/Harmonic-series deleted file mode 120000 index 32781a4eaa..0000000000 --- a/Lang/S-BASIC/Harmonic-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Harmonic-series/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Hello-world-Line-printer b/Lang/S-BASIC/Hello-world-Line-printer deleted file mode 120000 index c091e2e975..0000000000 --- a/Lang/S-BASIC/Hello-world-Line-printer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Line-printer/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Integer-overflow b/Lang/S-BASIC/Integer-overflow deleted file mode 120000 index 60893ea23b..0000000000 --- a/Lang/S-BASIC/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Loops-Break b/Lang/S-BASIC/Loops-Break deleted file mode 120000 index 4109f93543..0000000000 --- a/Lang/S-BASIC/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Loops-Do-while b/Lang/S-BASIC/Loops-Do-while deleted file mode 120000 index 026ddb5c46..0000000000 --- a/Lang/S-BASIC/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Loops-Increment-loop-index-within-loop-body b/Lang/S-BASIC/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index 0b105df636..0000000000 --- a/Lang/S-BASIC/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Loops-While b/Lang/S-BASIC/Loops-While deleted file mode 120000 index cf0317c07f..0000000000 --- a/Lang/S-BASIC/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Real-constants-and-functions b/Lang/S-BASIC/Real-constants-and-functions deleted file mode 120000 index dd7abd08ca..0000000000 --- a/Lang/S-BASIC/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Rename-a-file b/Lang/S-BASIC/Rename-a-file deleted file mode 120000 index 918d2d7e4f..0000000000 --- a/Lang/S-BASIC/Rename-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rename-a-file/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Sort-an-integer-array b/Lang/S-BASIC/Sort-an-integer-array deleted file mode 120000 index ee8b6cb035..0000000000 --- a/Lang/S-BASIC/Sort-an-integer-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-an-integer-array/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Sorting-algorithms-Insertion-sort b/Lang/S-BASIC/Sorting-algorithms-Insertion-sort deleted file mode 120000 index 60391d0e75..0000000000 --- a/Lang/S-BASIC/Sorting-algorithms-Insertion-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Insertion-sort/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Square-free-integers b/Lang/S-BASIC/Square-free-integers deleted file mode 120000 index d6296e2f26..0000000000 --- a/Lang/S-BASIC/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/String-interpolation-included- b/Lang/S-BASIC/String-interpolation-included- deleted file mode 120000 index c71873859b..0000000000 --- a/Lang/S-BASIC/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Strip-whitespace-from-a-string-Top-and-tail b/Lang/S-BASIC/Strip-whitespace-from-a-string-Top-and-tail deleted file mode 120000 index e52fe4d75d..0000000000 --- a/Lang/S-BASIC/Strip-whitespace-from-a-string-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-whitespace-from-a-string-Top-and-tail/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Sum-of-a-series b/Lang/S-BASIC/Sum-of-a-series deleted file mode 120000 index 1396d4d958..0000000000 --- a/Lang/S-BASIC/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Variables b/Lang/S-BASIC/Variables deleted file mode 120000 index 09187048df..0000000000 --- a/Lang/S-BASIC/Variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variables/S-BASIC \ No newline at end of file diff --git a/Lang/S-BASIC/Zero-to-the-zero-power b/Lang/S-BASIC/Zero-to-the-zero-power deleted file mode 120000 index e660e2efea..0000000000 --- a/Lang/S-BASIC/Zero-to-the-zero-power +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zero-to-the-zero-power/S-BASIC \ No newline at end of file diff --git a/Lang/SETL/Arbitrary-precision-integers-included- b/Lang/SETL/Arbitrary-precision-integers-included- deleted file mode 120000 index 36386fe719..0000000000 --- a/Lang/SETL/Arbitrary-precision-integers-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arbitrary-precision-integers-included-/SETL \ No newline at end of file diff --git a/Lang/SETL/Arithmetic-derivative b/Lang/SETL/Arithmetic-derivative deleted file mode 120000 index 56f987cef7..0000000000 --- a/Lang/SETL/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/SETL \ No newline at end of file diff --git a/Lang/SETL/Bell-numbers b/Lang/SETL/Bell-numbers deleted file mode 120000 index 32b1473efe..0000000000 --- a/Lang/SETL/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/SETL \ No newline at end of file diff --git a/Lang/SETL/Best-shuffle b/Lang/SETL/Best-shuffle deleted file mode 120000 index 25f39d305e..0000000000 --- a/Lang/SETL/Best-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Best-shuffle/SETL \ No newline at end of file diff --git a/Lang/SETL/Brilliant-numbers b/Lang/SETL/Brilliant-numbers deleted file mode 120000 index 8c8cbe8558..0000000000 --- a/Lang/SETL/Brilliant-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brilliant-numbers/SETL \ No newline at end of file diff --git a/Lang/SETL/Calculating-the-value-of-e b/Lang/SETL/Calculating-the-value-of-e deleted file mode 120000 index 751e6b54b5..0000000000 --- a/Lang/SETL/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/SETL \ No newline at end of file diff --git a/Lang/SETL/Damm-algorithm b/Lang/SETL/Damm-algorithm deleted file mode 120000 index 8e8b8d193a..0000000000 --- a/Lang/SETL/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/SETL \ No newline at end of file diff --git a/Lang/SETL/Doomsday-rule b/Lang/SETL/Doomsday-rule deleted file mode 120000 index b9fa54eb7b..0000000000 --- a/Lang/SETL/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/SETL \ No newline at end of file diff --git a/Lang/SETL/Duffinian-numbers b/Lang/SETL/Duffinian-numbers deleted file mode 120000 index 93694a20c6..0000000000 --- a/Lang/SETL/Duffinian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Duffinian-numbers/SETL \ No newline at end of file diff --git a/Lang/SETL/Fractran b/Lang/SETL/Fractran deleted file mode 120000 index 20f759abeb..0000000000 --- a/Lang/SETL/Fractran +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fractran/SETL \ No newline at end of file diff --git a/Lang/SETL/General-FizzBuzz b/Lang/SETL/General-FizzBuzz deleted file mode 120000 index c26977365f..0000000000 --- a/Lang/SETL/General-FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/General-FizzBuzz/SETL \ No newline at end of file diff --git a/Lang/SETL/Gray-code b/Lang/SETL/Gray-code deleted file mode 120000 index a07e0b4e7b..0000000000 --- a/Lang/SETL/Gray-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gray-code/SETL \ No newline at end of file diff --git a/Lang/SETL/Horners-rule-for-polynomial-evaluation b/Lang/SETL/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index c30c2e1637..0000000000 --- a/Lang/SETL/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/SETL \ No newline at end of file diff --git a/Lang/SETL/Largest-proper-divisor-of-n b/Lang/SETL/Largest-proper-divisor-of-n deleted file mode 120000 index a82ec82f9e..0000000000 --- a/Lang/SETL/Largest-proper-divisor-of-n +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-proper-divisor-of-n/SETL \ No newline at end of file diff --git a/Lang/SETL/Levenshtein-distance b/Lang/SETL/Levenshtein-distance deleted file mode 120000 index 5a234fcd60..0000000000 --- a/Lang/SETL/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/SETL \ No newline at end of file diff --git a/Lang/SETL/Loops-Do-while b/Lang/SETL/Loops-Do-while deleted file mode 120000 index 8e0329f189..0000000000 --- a/Lang/SETL/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/SETL \ No newline at end of file diff --git a/Lang/SETL/Loops-Increment-loop-index-within-loop-body b/Lang/SETL/Loops-Increment-loop-index-within-loop-body deleted file mode 120000 index 21b3e5953d..0000000000 --- a/Lang/SETL/Loops-Increment-loop-index-within-loop-body +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Increment-loop-index-within-loop-body/SETL \ No newline at end of file diff --git a/Lang/SETL/Loops-Infinite b/Lang/SETL/Loops-Infinite deleted file mode 120000 index 582c03e313..0000000000 --- a/Lang/SETL/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/SETL \ No newline at end of file diff --git a/Lang/SETL/Loops-N-plus-one-half b/Lang/SETL/Loops-N-plus-one-half deleted file mode 120000 index 111820383b..0000000000 --- a/Lang/SETL/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/SETL \ No newline at end of file diff --git a/Lang/SETL/Luhn-test-of-credit-card-numbers b/Lang/SETL/Luhn-test-of-credit-card-numbers deleted file mode 120000 index d5c47a10ed..0000000000 --- a/Lang/SETL/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/SETL \ No newline at end of file diff --git a/Lang/SETL/Matrix-transposition b/Lang/SETL/Matrix-transposition deleted file mode 120000 index 9a975d9213..0000000000 --- a/Lang/SETL/Matrix-transposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-transposition/SETL \ No newline at end of file diff --git a/Lang/SETL/Mayan-numerals b/Lang/SETL/Mayan-numerals deleted file mode 120000 index fd50100876..0000000000 --- a/Lang/SETL/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/SETL \ No newline at end of file diff --git a/Lang/SETL/Modular-exponentiation b/Lang/SETL/Modular-exponentiation deleted file mode 120000 index fcea778ebb..0000000000 --- a/Lang/SETL/Modular-exponentiation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-exponentiation/SETL \ No newline at end of file diff --git a/Lang/SETL/Monte-Carlo-methods b/Lang/SETL/Monte-Carlo-methods deleted file mode 120000 index da6adaf82b..0000000000 --- a/Lang/SETL/Monte-Carlo-methods +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monte-Carlo-methods/SETL \ No newline at end of file diff --git a/Lang/SETL/Monty-Hall-problem b/Lang/SETL/Monty-Hall-problem deleted file mode 120000 index 0740052c5e..0000000000 --- a/Lang/SETL/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/SETL \ No newline at end of file diff --git a/Lang/SETL/Move-to-front-algorithm b/Lang/SETL/Move-to-front-algorithm deleted file mode 120000 index 7a6129ce08..0000000000 --- a/Lang/SETL/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/SETL \ No newline at end of file diff --git a/Lang/SETL/Nested-templated-data b/Lang/SETL/Nested-templated-data deleted file mode 120000 index 58fd3f508a..0000000000 --- a/Lang/SETL/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/SETL \ No newline at end of file diff --git a/Lang/SETL/Old-lady-swallowed-a-fly b/Lang/SETL/Old-lady-swallowed-a-fly deleted file mode 120000 index 948ed47605..0000000000 --- a/Lang/SETL/Old-lady-swallowed-a-fly +++ /dev/null @@ -1 +0,0 @@ -../../Task/Old-lady-swallowed-a-fly/SETL \ No newline at end of file diff --git a/Lang/SETL/Ordered-words b/Lang/SETL/Ordered-words deleted file mode 120000 index efd35b209e..0000000000 --- a/Lang/SETL/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/SETL \ No newline at end of file diff --git a/Lang/SETL/Partition-function-P b/Lang/SETL/Partition-function-P deleted file mode 120000 index f47b3bd593..0000000000 --- a/Lang/SETL/Partition-function-P +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-function-P/SETL \ No newline at end of file diff --git a/Lang/SETL/Pisano-period b/Lang/SETL/Pisano-period deleted file mode 120000 index 735d169166..0000000000 --- a/Lang/SETL/Pisano-period +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pisano-period/SETL \ No newline at end of file diff --git a/Lang/SETL/RPG-attributes-generator b/Lang/SETL/RPG-attributes-generator deleted file mode 120000 index 86469ad6af..0000000000 --- a/Lang/SETL/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/SETL \ No newline at end of file diff --git a/Lang/SETL/Radical-of-an-integer b/Lang/SETL/Radical-of-an-integer deleted file mode 120000 index 7020a7b45c..0000000000 --- a/Lang/SETL/Radical-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Radical-of-an-integer/SETL \ No newline at end of file diff --git a/Lang/SETL/Range-consolidation b/Lang/SETL/Range-consolidation deleted file mode 120000 index b24d504011..0000000000 --- a/Lang/SETL/Range-consolidation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-consolidation/SETL \ No newline at end of file diff --git a/Lang/SETL/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/SETL/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/SETL/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/SETL/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/SETL/Show-ASCII-table b/Lang/SETL/Show-ASCII-table deleted file mode 120000 index 5c4e8348ce..0000000000 --- a/Lang/SETL/Show-ASCII-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Show-ASCII-table/SETL \ No newline at end of file diff --git a/Lang/SETL/Sleeping-Beauty-problem b/Lang/SETL/Sleeping-Beauty-problem deleted file mode 120000 index cf1ef983c1..0000000000 --- a/Lang/SETL/Sleeping-Beauty-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sleeping-Beauty-problem/SETL \ No newline at end of file diff --git a/Lang/SETL/Split-a-character-string-based-on-change-of-character b/Lang/SETL/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index ff9aa0b4dd..0000000000 --- a/Lang/SETL/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/SETL \ No newline at end of file diff --git a/Lang/SETL/Square-free-integers b/Lang/SETL/Square-free-integers deleted file mode 120000 index 328ef78775..0000000000 --- a/Lang/SETL/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/SETL \ No newline at end of file diff --git a/Lang/SETL/Strip-comments-from-a-string b/Lang/SETL/Strip-comments-from-a-string deleted file mode 120000 index 6397b858bf..0000000000 --- a/Lang/SETL/Strip-comments-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-comments-from-a-string/SETL \ No newline at end of file diff --git a/Lang/SETL/Super-d-numbers b/Lang/SETL/Super-d-numbers deleted file mode 120000 index 0f77d4c38c..0000000000 --- a/Lang/SETL/Super-d-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Super-d-numbers/SETL \ No newline at end of file diff --git a/Lang/SETL/Tokenize-a-string b/Lang/SETL/Tokenize-a-string deleted file mode 120000 index bd55474aef..0000000000 --- a/Lang/SETL/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/SETL \ No newline at end of file diff --git a/Lang/SETL/Vector-products b/Lang/SETL/Vector-products deleted file mode 120000 index 936d45f3d5..0000000000 --- a/Lang/SETL/Vector-products +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector-products/SETL \ No newline at end of file diff --git a/Lang/SETL/Word-ladder b/Lang/SETL/Word-ladder deleted file mode 120000 index c8dccafa85..0000000000 --- a/Lang/SETL/Word-ladder +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-ladder/SETL \ No newline at end of file diff --git a/Lang/SETL/Zeckendorf-number-representation b/Lang/SETL/Zeckendorf-number-representation deleted file mode 120000 index 536fc12840..0000000000 --- a/Lang/SETL/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/SETL \ No newline at end of file diff --git a/Lang/SIL/00-LANG.txt b/Lang/SIL/00-LANG.txt deleted file mode 100644 index 2639d4af86..0000000000 --- a/Lang/SIL/00-LANG.txt +++ /dev/null @@ -1,8 +0,0 @@ -{{stub}}{{language|sil}} -SIL (Simple Interpreted Language) is designed for a nostalgic view of the past. It is simple and minimalist, but remains capable of universal computation. SIL used to be known as S.I.L.O.S. - -=== Todo === -[[Tasks not implemented in SIL]] - -==Links== -*[https://github.com/rjhunjhunwala/SIL-S.I.L.O.S SIL on GitHub] \ No newline at end of file diff --git a/Lang/SIL/00-META.yaml b/Lang/SIL/00-META.yaml deleted file mode 100644 index ac7ba9e679..0000000000 --- a/Lang/SIL/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:SIL diff --git a/Lang/SIL/Apply-a-callback-to-an-array b/Lang/SIL/Apply-a-callback-to-an-array deleted file mode 120000 index c6346f2693..0000000000 --- a/Lang/SIL/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/SIL \ No newline at end of file diff --git a/Lang/SIL/Arithmetic-Integer b/Lang/SIL/Arithmetic-Integer deleted file mode 120000 index 0359dfe6a8..0000000000 --- a/Lang/SIL/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/SIL \ No newline at end of file diff --git a/Lang/SIL/Function-definition b/Lang/SIL/Function-definition deleted file mode 120000 index 1ed935d033..0000000000 --- a/Lang/SIL/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/SIL \ No newline at end of file diff --git a/Lang/SIL/Hello-world-Text b/Lang/SIL/Hello-world-Text deleted file mode 120000 index 67a60a7cc4..0000000000 --- a/Lang/SIL/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/SIL \ No newline at end of file diff --git a/Lang/SIL/Loops-Do-while b/Lang/SIL/Loops-Do-while deleted file mode 120000 index 226040ebd7..0000000000 --- a/Lang/SIL/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/SIL \ No newline at end of file diff --git a/Lang/SIL/Loops-For b/Lang/SIL/Loops-For deleted file mode 120000 index f6976d2ec6..0000000000 --- a/Lang/SIL/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/SIL \ No newline at end of file diff --git a/Lang/SIL/Loops-Infinite b/Lang/SIL/Loops-Infinite deleted file mode 120000 index 923cceed13..0000000000 --- a/Lang/SIL/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/SIL \ No newline at end of file diff --git a/Lang/SIL/Loops-N-plus-one-half b/Lang/SIL/Loops-N-plus-one-half deleted file mode 120000 index 8adce730cd..0000000000 --- a/Lang/SIL/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/SIL \ No newline at end of file diff --git a/Lang/SIL/Loops-While b/Lang/SIL/Loops-While deleted file mode 120000 index 401dee2479..0000000000 --- a/Lang/SIL/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/SIL \ No newline at end of file diff --git a/Lang/SNOBOL4/Find-the-intersection-of-two-lines b/Lang/SNOBOL4/Find-the-intersection-of-two-lines deleted file mode 120000 index b2451a2b39..0000000000 --- a/Lang/SNOBOL4/Find-the-intersection-of-two-lines +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-intersection-of-two-lines/SNOBOL4 \ No newline at end of file diff --git a/Lang/SNOBOL4/Multiplication-tables b/Lang/SNOBOL4/Multiplication-tables deleted file mode 120000 index 756425cd3a..0000000000 --- a/Lang/SNOBOL4/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/SNOBOL4 \ No newline at end of file diff --git a/Lang/SQL/Factorial b/Lang/SQL/Factorial deleted file mode 120000 index c6f45973cd..0000000000 --- a/Lang/SQL/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/SQL \ No newline at end of file diff --git a/Lang/SapbotVM/00-LANG.txt b/Lang/SapbotVM/00-LANG.txt deleted file mode 100644 index a83fdbd907..0000000000 --- a/Lang/SapbotVM/00-LANG.txt +++ /dev/null @@ -1,4 +0,0 @@ -{{stub}}{{language|SapbotVM}} -SapbotVM is easy-to-implement virtual machine architecture, made by Romarchive, that's not compilable, but only have interpreted Assembler. Also, this language have two formats: SVM1, SVM2. First, is based on JSON, second is custom. - -SapbotVM have limited support for monitor, no internet and plug and play devices. So only serial port. \ No newline at end of file diff --git a/Lang/SapbotVM/00-META.yaml b/Lang/SapbotVM/00-META.yaml deleted file mode 100644 index f50043dbce..0000000000 --- a/Lang/SapbotVM/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:SapbotVM diff --git a/Lang/SapbotVM/Guess-the-number-With-feedback b/Lang/SapbotVM/Guess-the-number-With-feedback deleted file mode 120000 index 0038e4427f..0000000000 --- a/Lang/SapbotVM/Guess-the-number-With-feedback +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number-With-feedback/SapbotVM \ No newline at end of file diff --git a/Lang/SapbotVM/Hello-world-Text b/Lang/SapbotVM/Hello-world-Text deleted file mode 120000 index c695d3ee98..0000000000 --- a/Lang/SapbotVM/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/SapbotVM \ No newline at end of file diff --git a/Lang/Scala/Additive-primes b/Lang/Scala/Additive-primes deleted file mode 120000 index ba2692b54f..0000000000 --- a/Lang/Scala/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/Scala \ No newline at end of file diff --git a/Lang/Scala/Boyer-Moore-string-search b/Lang/Scala/Boyer-Moore-string-search deleted file mode 120000 index 58b64a7997..0000000000 --- a/Lang/Scala/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Scala \ No newline at end of file diff --git a/Lang/Scala/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/Scala/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- deleted file mode 120000 index 03b359aab4..0000000000 --- a/Lang/Scala/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/Scala \ No newline at end of file diff --git a/Lang/Scala/Descending-primes b/Lang/Scala/Descending-primes deleted file mode 120000 index 461c6bfefd..0000000000 --- a/Lang/Scala/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Scala \ No newline at end of file diff --git a/Lang/Scala/ISBN13-check-digit b/Lang/Scala/ISBN13-check-digit deleted file mode 120000 index b0dc1022b2..0000000000 --- a/Lang/Scala/ISBN13-check-digit +++ /dev/null @@ -1 +0,0 @@ -../../Task/ISBN13-check-digit/Scala \ No newline at end of file diff --git a/Lang/Scala/Miller-Rabin-primality-test b/Lang/Scala/Miller-Rabin-primality-test new file mode 120000 index 0000000000..28de5ef463 --- /dev/null +++ b/Lang/Scala/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Scala \ No newline at end of file diff --git a/Lang/Scala/Parallel-calculations b/Lang/Scala/Parallel-calculations deleted file mode 120000 index 525e6ca1ba..0000000000 --- a/Lang/Scala/Parallel-calculations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parallel-calculations/Scala \ No newline at end of file diff --git a/Lang/Scala/Quaternion-type b/Lang/Scala/Quaternion-type new file mode 120000 index 0000000000..15f3eda4c9 --- /dev/null +++ b/Lang/Scala/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Scala \ No newline at end of file diff --git a/Lang/Scala/Sorting-Algorithms-Circle-Sort b/Lang/Scala/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..5b9f057951 --- /dev/null +++ b/Lang/Scala/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Scala \ No newline at end of file diff --git a/Lang/Scala/Tonelli-Shanks-algorithm b/Lang/Scala/Tonelli-Shanks-algorithm deleted file mode 120000 index a29f0a9b6f..0000000000 --- a/Lang/Scala/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/Scala \ No newline at end of file diff --git a/Lang/Scala/UPC b/Lang/Scala/UPC deleted file mode 120000 index bc3faec2ef..0000000000 --- a/Lang/Scala/UPC +++ /dev/null @@ -1 +0,0 @@ -../../Task/UPC/Scala \ No newline at end of file diff --git a/Lang/Scheme/Cantor-set b/Lang/Scheme/Cantor-set deleted file mode 120000 index a799296687..0000000000 --- a/Lang/Scheme/Cantor-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cantor-set/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Cholesky-decomposition b/Lang/Scheme/Cholesky-decomposition deleted file mode 120000 index ade9e83803..0000000000 --- a/Lang/Scheme/Cholesky-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cholesky-decomposition/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Circular-primes b/Lang/Scheme/Circular-primes deleted file mode 120000 index 9f4430f520..0000000000 --- a/Lang/Scheme/Circular-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Circular-primes/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Compare-length-of-two-strings b/Lang/Scheme/Compare-length-of-two-strings deleted file mode 120000 index d6e6006fa7..0000000000 --- a/Lang/Scheme/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Conjugate-transpose b/Lang/Scheme/Conjugate-transpose deleted file mode 120000 index ef50892884..0000000000 --- a/Lang/Scheme/Conjugate-transpose +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conjugate-transpose/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Egyptian-division b/Lang/Scheme/Egyptian-division deleted file mode 120000 index ca3a36ae83..0000000000 --- a/Lang/Scheme/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Empty-program b/Lang/Scheme/Empty-program new file mode 120000 index 0000000000..ee1ee662be --- /dev/null +++ b/Lang/Scheme/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Find-the-missing-permutation b/Lang/Scheme/Find-the-missing-permutation deleted file mode 120000 index 8f7e82d271..0000000000 --- a/Lang/Scheme/Find-the-missing-permutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-missing-permutation/Scheme \ No newline at end of file diff --git a/Lang/Scheme/French-Republican-calendar b/Lang/Scheme/French-Republican-calendar deleted file mode 120000 index f19a245ee9..0000000000 --- a/Lang/Scheme/French-Republican-calendar +++ /dev/null @@ -1 +0,0 @@ -../../Task/French-Republican-calendar/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Kronecker-product b/Lang/Scheme/Kronecker-product deleted file mode 120000 index 58539a69b9..0000000000 --- a/Lang/Scheme/Kronecker-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Kronecker-product-based-fractals b/Lang/Scheme/Kronecker-product-based-fractals deleted file mode 120000 index c27228f2e0..0000000000 --- a/Lang/Scheme/Kronecker-product-based-fractals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product-based-fractals/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Last-letter-first-letter b/Lang/Scheme/Last-letter-first-letter deleted file mode 120000 index a5c5c31b6e..0000000000 --- a/Lang/Scheme/Last-letter-first-letter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-letter-first-letter/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Miller-Rabin-primality-test b/Lang/Scheme/Miller-Rabin-primality-test new file mode 120000 index 0000000000..644cc32269 --- /dev/null +++ b/Lang/Scheme/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Own-digits-power-sum b/Lang/Scheme/Own-digits-power-sum deleted file mode 120000 index 0897a09d02..0000000000 --- a/Lang/Scheme/Own-digits-power-sum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Own-digits-power-sum/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Pick-random-element b/Lang/Scheme/Pick-random-element deleted file mode 120000 index 5745ea287d..0000000000 --- a/Lang/Scheme/Pick-random-element +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pick-random-element/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Pseudo-random-numbers-Splitmix64 b/Lang/Scheme/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index 730c9170c9..0000000000 --- a/Lang/Scheme/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Runge-Kutta-method b/Lang/Scheme/Runge-Kutta-method deleted file mode 120000 index 55b6f782a6..0000000000 --- a/Lang/Scheme/Runge-Kutta-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Runge-Kutta-method/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Sierpinski-triangle-Graphical b/Lang/Scheme/Sierpinski-triangle-Graphical deleted file mode 120000 index 13f8e60559..0000000000 --- a/Lang/Scheme/Sierpinski-triangle-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle-Graphical/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Tau-number b/Lang/Scheme/Tau-number deleted file mode 120000 index fe45f01d25..0000000000 --- a/Lang/Scheme/Tau-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-number/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Unicode-variable-names b/Lang/Scheme/Unicode-variable-names deleted file mode 120000 index e5f49b3fae..0000000000 --- a/Lang/Scheme/Unicode-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-variable-names/Scheme \ No newline at end of file diff --git a/Lang/Scheme/Word-frequency b/Lang/Scheme/Word-frequency deleted file mode 120000 index 109edef2da..0000000000 --- a/Lang/Scheme/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/Scheme \ No newline at end of file diff --git a/Lang/Scilab/Empty-program b/Lang/Scilab/Empty-program new file mode 120000 index 0000000000..0cb8f21cc3 --- /dev/null +++ b/Lang/Scilab/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Scilab \ No newline at end of file diff --git a/Lang/Sed/00-LANG.txt b/Lang/Sed/00-LANG.txt index 5d2641e2db..23390cea6c 100644 --- a/Lang/Sed/00-LANG.txt +++ b/Lang/Sed/00-LANG.txt @@ -6,7 +6,5 @@ a non interactive tool for text manipulation and filtering. One implementation is [[GNU Sed]] -See [[Tasks not implemented in sed]] - [[Category:Editor]] [[Category:Utility]] \ No newline at end of file diff --git a/Lang/Seed7/Miller-Rabin-primality-test b/Lang/Seed7/Miller-Rabin-primality-test new file mode 120000 index 0000000000..298c8872f9 --- /dev/null +++ b/Lang/Seed7/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Seed7 \ No newline at end of file diff --git a/Lang/Seed7/Quaternion-type b/Lang/Seed7/Quaternion-type new file mode 120000 index 0000000000..d621b24ce0 --- /dev/null +++ b/Lang/Seed7/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Seed7 \ No newline at end of file diff --git a/Lang/SequenceL/00-LANG.txt b/Lang/SequenceL/00-LANG.txt index 5e5a95101f..3c3098bf74 100644 --- a/Lang/SequenceL/00-LANG.txt +++ b/Lang/SequenceL/00-LANG.txt @@ -3,7 +3,7 @@ |strength=strong |safety=safe |checking=static -|site= +|site=http://sequencel.com |tags=sequencel |hopl=no}} {{language programming paradigm|Declarative}} diff --git a/Lang/Set-lang/Empty-program b/Lang/Set-lang/Empty-program new file mode 120000 index 0000000000..e6f84e5a85 --- /dev/null +++ b/Lang/Set-lang/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Set-lang \ No newline at end of file diff --git a/Lang/SheerPower-4GL/00-LANG.txt b/Lang/SheerPower-4GL/00-LANG.txt index fc11170935..bd4b7049ad 100644 --- a/Lang/SheerPower-4GL/00-LANG.txt +++ b/Lang/SheerPower-4GL/00-LANG.txt @@ -1,6 +1,6 @@ {{stub}} {{language -|site=https://sheerpower.ttinet.com/index.html/ +|site=http://www.sp4gl.com/ }} SheerPower 4GL is a Fourth-generation programming language developed by Touch Technologies, Inc. @@ -16,7 +16,4 @@ SheerPower 4GL has several key features: #There is also a Common Gateway Interface (CGI) interface built into SheerPower, along with many other built-in functions designed for high-performance and increased programmer productivity. == See Also == -[[wp:SheerPower4GL|Wikipedia:SheerPower4GL]] - -==Todo== -[[Tasks_not_implemented_in_SheerPower_4GL]] \ No newline at end of file +[[wp:SheerPower4GL|Wikipedia:SheerPower4GL]] \ No newline at end of file diff --git a/Lang/SheerPower-4GL/99-bottles-of-beer b/Lang/SheerPower-4GL/99-bottles-of-beer deleted file mode 120000 index 71e6136936..0000000000 --- a/Lang/SheerPower-4GL/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/SheerPower-4GL \ No newline at end of file diff --git a/Lang/SheerPower-4GL/Caesar-cipher b/Lang/SheerPower-4GL/Caesar-cipher deleted file mode 120000 index b9d2a1d1d1..0000000000 --- a/Lang/SheerPower-4GL/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/SheerPower-4GL \ No newline at end of file diff --git a/Lang/SheerPower-4GL/FizzBuzz b/Lang/SheerPower-4GL/FizzBuzz deleted file mode 120000 index 339e329e2c..0000000000 --- a/Lang/SheerPower-4GL/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/SheerPower-4GL \ No newline at end of file diff --git a/Lang/SheerPower-4GL/Towers-of-Hanoi b/Lang/SheerPower-4GL/Towers-of-Hanoi deleted file mode 120000 index a6bc7f6597..0000000000 --- a/Lang/SheerPower-4GL/Towers-of-Hanoi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Towers-of-Hanoi/SheerPower-4GL \ No newline at end of file diff --git a/Lang/Sidef/00-LANG.txt b/Lang/Sidef/00-LANG.txt index 03c8af9ab7..a63ddf8a52 100644 --- a/Lang/Sidef/00-LANG.txt +++ b/Lang/Sidef/00-LANG.txt @@ -18,11 +18,14 @@ [https://tio.run/#sidef Try Sidef on tio.run] {{infobox_end}} -Sidef is a modern, expressive programming language that combines the elegance of [[derived from::Ruby]], the versatility of [[derived from::Raku]], and the mathematical power of a built-in computer algebra system. +Sidef is a modern, dynamic, object-oriented programming language, focusing on simplicity, readability and elegance, taking the best from languages like [[derived from::Ruby]], [[derived from::Go]], [[derived from::Raku]] and [[derived from::Julia]]. The language is mostly used as a research programming language. -For more details, see: [https://github.com/trizen/sidef https://github.com/trizen/sidef] +For more details, see: +* Gitbook: [https://trizen.gitbook.io/sidef-lang/ https://trizen.gitbook.io/sidef-lang/] +* Tutorial: [https://notabug.org/trizen/sidef/wiki https://notabug.org/trizen/sidef/wiki] +* Development page: [https://github.com/trizen/sidef https://github.com/trizen/sidef] ==Todo== diff --git a/Lang/Sidef/Arithmetic-derivative b/Lang/Sidef/Arithmetic-derivative deleted file mode 120000 index bdcd1874e7..0000000000 --- a/Lang/Sidef/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Arithmetic-numbers b/Lang/Sidef/Arithmetic-numbers deleted file mode 120000 index 672bca881d..0000000000 --- a/Lang/Sidef/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Binary-strings b/Lang/Sidef/Binary-strings deleted file mode 120000 index 86bf141c80..0000000000 --- a/Lang/Sidef/Binary-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-strings/Sidef \ No newline at end of file diff --git a/Lang/Sidef/CRC-32 b/Lang/Sidef/CRC-32 deleted file mode 120000 index 7abbf21ee3..0000000000 --- a/Lang/Sidef/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Empty-program b/Lang/Sidef/Empty-program new file mode 120000 index 0000000000..c7465e3077 --- /dev/null +++ b/Lang/Sidef/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Increasing-gaps-between-consecutive-Niven-numbers b/Lang/Sidef/Increasing-gaps-between-consecutive-Niven-numbers deleted file mode 120000 index b80a20c4f5..0000000000 --- a/Lang/Sidef/Increasing-gaps-between-consecutive-Niven-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increasing-gaps-between-consecutive-Niven-numbers/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Jaro-Winkler-distance b/Lang/Sidef/Jaro-Winkler-distance deleted file mode 120000 index 48f92f7ccd..0000000000 --- a/Lang/Sidef/Jaro-Winkler-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-Winkler-distance/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Jordan-P-lya-numbers b/Lang/Sidef/Jordan-P-lya-numbers deleted file mode 120000 index b084543da1..0000000000 --- a/Lang/Sidef/Jordan-P-lya-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jordan-P-lya-numbers/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Meissel-Mertens-constant b/Lang/Sidef/Meissel-Mertens-constant new file mode 120000 index 0000000000..7eda1518da --- /dev/null +++ b/Lang/Sidef/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Miller-Rabin-primality-test b/Lang/Sidef/Miller-Rabin-primality-test new file mode 120000 index 0000000000..5bb5523a0e --- /dev/null +++ b/Lang/Sidef/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Pell-numbers b/Lang/Sidef/Pell-numbers deleted file mode 120000 index af14680327..0000000000 --- a/Lang/Sidef/Pell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pell-numbers/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Prime-numbers-whose-neighboring-pairs-are-tetraprimes b/Lang/Sidef/Prime-numbers-whose-neighboring-pairs-are-tetraprimes deleted file mode 120000 index 1f840ef9e4..0000000000 --- a/Lang/Sidef/Prime-numbers-whose-neighboring-pairs-are-tetraprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-numbers-whose-neighboring-pairs-are-tetraprimes/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Quaternion-type b/Lang/Sidef/Quaternion-type new file mode 120000 index 0000000000..5e28a5e41d --- /dev/null +++ b/Lang/Sidef/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Sidef/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Sidef/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Sidef/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Sidef/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Sidef/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Sidef/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Sidef/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Sidef/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Sidef/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Sidef/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Sidef/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Sidef/Smarandache-Wellin-primes b/Lang/Sidef/Smarandache-Wellin-primes deleted file mode 120000 index 056e5bc295..0000000000 --- a/Lang/Sidef/Smarandache-Wellin-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smarandache-Wellin-primes/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Sorting-Algorithms-Circle-Sort b/Lang/Sidef/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..e866329cad --- /dev/null +++ b/Lang/Sidef/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Sidef \ No newline at end of file diff --git a/Lang/Sidef/Wagstaff-primes b/Lang/Sidef/Wagstaff-primes deleted file mode 120000 index d0053cfbed..0000000000 --- a/Lang/Sidef/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Sidef \ No newline at end of file diff --git a/Lang/SimpleCode/Empty-program b/Lang/SimpleCode/Empty-program new file mode 120000 index 0000000000..dc55c70d09 --- /dev/null +++ b/Lang/SimpleCode/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/SimpleCode \ No newline at end of file diff --git a/Lang/Slate/Empty-program b/Lang/Slate/Empty-program new file mode 120000 index 0000000000..cea8e90b74 --- /dev/null +++ b/Lang/Slate/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Slate \ No newline at end of file diff --git a/Lang/Smalltalk/Miller-Rabin-primality-test b/Lang/Smalltalk/Miller-Rabin-primality-test new file mode 120000 index 0000000000..e3a303744d --- /dev/null +++ b/Lang/Smalltalk/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Smalltalk \ No newline at end of file diff --git a/Lang/SmileBASIC/Execute-Brain- b/Lang/SmileBASIC/Execute-Brain- deleted file mode 120000 index f5b6561ddd..0000000000 --- a/Lang/SmileBASIC/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/SmileBASIC \ No newline at end of file diff --git a/Lang/Sparkling/Empty-program b/Lang/Sparkling/Empty-program new file mode 120000 index 0000000000..519287810d --- /dev/null +++ b/Lang/Sparkling/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Sparkling \ No newline at end of file diff --git a/Lang/Standard-ML/Averages-Mean-angle b/Lang/Standard-ML/Averages-Mean-angle deleted file mode 120000 index 38ef0bd393..0000000000 --- a/Lang/Standard-ML/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/Averages-Simple-moving-average b/Lang/Standard-ML/Averages-Simple-moving-average deleted file mode 120000 index 6dd59a5e2f..0000000000 --- a/Lang/Standard-ML/Averages-Simple-moving-average +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Simple-moving-average/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/Box-the-compass b/Lang/Standard-ML/Box-the-compass deleted file mode 120000 index bdb5283192..0000000000 --- a/Lang/Standard-ML/Box-the-compass +++ /dev/null @@ -1 +0,0 @@ -../../Task/Box-the-compass/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/Call-a-foreign-language-function b/Lang/Standard-ML/Call-a-foreign-language-function deleted file mode 120000 index 1f398efa97..0000000000 --- a/Lang/Standard-ML/Call-a-foreign-language-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-foreign-language-function/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/Knuth-shuffle b/Lang/Standard-ML/Knuth-shuffle deleted file mode 120000 index da7fa35b79..0000000000 --- a/Lang/Standard-ML/Knuth-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuth-shuffle/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/Last-Friday-of-each-month b/Lang/Standard-ML/Last-Friday-of-each-month deleted file mode 120000 index 39c2756109..0000000000 --- a/Lang/Standard-ML/Last-Friday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-Friday-of-each-month/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/Miller-Rabin-primality-test b/Lang/Standard-ML/Miller-Rabin-primality-test new file mode 120000 index 0000000000..ba4b002043 --- /dev/null +++ b/Lang/Standard-ML/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/Pi b/Lang/Standard-ML/Pi deleted file mode 120000 index f806ddbcae..0000000000 --- a/Lang/Standard-ML/Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pi/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/Pseudo-random-numbers-Splitmix64 b/Lang/Standard-ML/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index bce7d31edd..0000000000 --- a/Lang/Standard-ML/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/Standard-ML \ No newline at end of file diff --git a/Lang/Standard-ML/URL-encoding b/Lang/Standard-ML/URL-encoding deleted file mode 120000 index f4e1b1b4e1..0000000000 --- a/Lang/Standard-ML/URL-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/URL-encoding/Standard-ML \ No newline at end of file diff --git a/Lang/Stax/00-LANG.txt b/Lang/Stax/00-LANG.txt index 9436dc0940..daeb2cc2d2 100644 --- a/Lang/Stax/00-LANG.txt +++ b/Lang/Stax/00-LANG.txt @@ -1,2 +1 @@ -[https://github.com/tomtheisen/stax Github] -{{language|site=https://staxlang.xyz/}} \ No newline at end of file +{{stub}}{{language|Stax}} \ No newline at end of file diff --git a/Lang/SuperCollider/00-LANG.txt b/Lang/SuperCollider/00-LANG.txt index d6b538fcd2..f804a4a144 100644 --- a/Lang/SuperCollider/00-LANG.txt +++ b/Lang/SuperCollider/00-LANG.txt @@ -9,130 +9,4 @@ The programming language was originally devised by James McCartney and has been [https://github.com/supercollider/supercollider SuperCollider at GitHub] -[http://supercollider.github.io/ SuperCollider Homepage] - - -

    -Some additional notes on SuperCollider 2024-06-21 - -From the SuperCollider GitHub website: https://supercollider.github.io/ :
    -Quote:
    -A PLATFORM FOR AUDIO SYNTHESIS AND ALGORITHMIC COMPOSITION,
    -      USED BY MUSICIANS, ARTISTS AND RESEARCHERS WORKING WITH SOUND. -

    -FREE AND OPEN SOURCE SOFTWARE FOR WINDOWS, MACOS AND LINUX. -

    -SuperCollider features three major components:
    -scsynth – A real-time audio server
    -sclang – An interpreted programming language
    -scide – An editor for sclang with an integrated help system
    -End-Quote.
    -
    -Some people try to squeeze a musical composition into 140 characters: (but just for the challenge):
    -Don't judge SuperCollider or the language by these examples, they are just for fun.
    - -f={|t|Pbind(\note,Pseq([-1,1,6,8,9,1,-1,8,6,1,9,8]+5,319),\dur,t)};Ptpar([0,f.(1/6),12,f.(0.1672)],1).play - -Listen to the results here: https://supercollider.github.io/assets/audio/sc-140/06_batuhanbozkurt_celesteh.mp3
    -You can see/hear more at: https://supercollider.github.io/sc-140.html
    -
    -
    -As of today (2024-06-21) the current version of SuperCollider for all supported platforms is: 3.13.0 -

    -While SClang (SuperCollider language) and its companion components are designed for the creation of sounds and music, the language is a full featured programming language. -

    -The language is OO, to the extent that everything is an object, even numbers.
    -In this snippet: 123 + 456 the 123 is an object, + is a method on the class of that object, and 456 is a parameter to that method.
    -Even though + is a method the syntax of the addition is what you would typically expect. -

    -The print function in SClang is a method called postln, which first appears in the root of the class tree: Object.
    -
    -Some examples, showing two possible call formats: - -postln("Hello World"); // prints: Hello World -"Hello World".postln; // prints: Hello World -postln(1001); // prints: 1001 -1001.postln; // prints: 1001 -postln(123 + 456); // prints: 579 -(123 + 456).postln; // prints: 579 - - -The method postln, adds a new-line after printing the text, if you don't want the new-line, use: post. -

    - -SuperCollider from the command line (not used much) - -SuperCollider scripts are stored in files with an extension of .scd. -These are typically referred to as supercollider documents, hence .scd. -

    -99.99% of the time, you will execute code from within the IDE (scide).
    -
    -It is possible but not typical, to run a script from the command line, for example:
    - > sclang.exe ABC_problem.scd
    -This will output the expected results. -See code at: https://rosettacode.org/wiki/ABC_problem#SuperCollider

    -However, before executing your code, sclang will compile its class library, and you will see all of the messages about the compilation, before you see the output from your code. -

    -Also, once your code is finished, you will be stuck as sclang is still waiting for more input from a file, not the keyboard. The second problem can be solved by adding exit(0); to the end of your script (.scd file); -

    -SuperCollider comes packaged with QT, and has classes that represent GUI objects, for example:
    - > sclang.exe Barnsley_fern.scd
    -Will open a window and draw the Barnsley Fern.
    -See code at: https://rosettacode.org/wiki/Barnsley_fern#SuperCollider
    -You will have to use Ctrl-c to kill the sclang process, you cannot add exit(0) to you script as the exit would happen before the GUI was fully created. -

    -It is theoretically possible to create a thread within your script which waits until all work is done and then for it to execute exit(0); but you are just giving yourself extra work. -

    -You can also run sclang without giving it a file, then it will accept input from the keyboard. - > sclang.exe
    -You will get this prompt sc3> now you can type in ONE LINE OF CODE. -For example, the following line of code has three statements, the end result is printing the sum of the two numbers:
    -sc3> var v1=123; var v2=456; postf("v1+v2=%\n", v1+v2);
    -v1+v2=579
    --> v1+v2=579
    -
    -The line with the arrow: -> v1+v2=579, is sclang printing the value of the last expression executed -

    -Summary: You can start sclang from the command line and type in some code, or you could give sclang a script to run, both will work, but it is much more productive to use scide. -Using sclang from the command line is like playing your guitar with winter gloves on, you could do it, but why make life difficult? -

    -If you have composed (written code for) a long piece of music, and now you want to execute the code from the command line, yes, you can do it, but it isn't going to sound any different than it would if you execute the code from within scide.

    -Also, scide offers the ability to 'live code', i.e. execute some code to make some music, and change the code as the music is playing, so the music evolves as you change the code. -

    - -SuperCollider from the IDE
    -Start scide, or 'open' a SuperCollider Document (*.scd), if scide is 'associated' with that file type.
    -See: https://doc.sccode.org/Guides/SCIde.html
    -After you start scide, it starts sclang, which compiles the SuperCollider classes.
    -Now you can start coding.
    -
    -How to execute code (borrowed from the page at the URL above)
    -
    -To evaluate code, use one of the following keyboard commands:
    -Ctrl+Return
    -Most used, "smart" code evaluation:
    -Normally, the current line will be evaluated (where the cursor is).
    -If the cursor is within a region, the entire region will be evaluated. See below for explanation of regions.
    -If some code is selected, the selection will be evaluated.
    -
    -Shift+Return -

    -Evaluates either the current line, or the selection (if any). Use this to evaluate a single line within a region without the need to select it.
    -Regions make it quick and easy to evaluate larger portions of code. A region is surrounded by parentheses; to be interpreted as a region, the parenthesis must each be the only character on a line.
    - -( -Pbind( - \degree, Pseries(0, 1, 8), - \dur, 0.25 -).play; -) - -If the cursor is anywhere between the outermost parentheses, pressing Ctrl+Return will automatically evaluate the entire contents within the parentheses, starting with Pbind and ending with play;.
    -

    -To quickly evaluate a portion of code, you can also double-click on any bracket (round, squared, or curly), which will select everything between this and the other matching bracket, so you can quickly evaluate it. -

    -To stop any running code, use the Ctrl+. shortcut (Ctrl+Period).
    -This will stop all the code scheduled on the clocks, as well as all the sound processes on the audio server. -

    - -... more coming soon ... \ No newline at end of file +[http://supercollider.github.io/ SuperCollider Homepage] \ No newline at end of file diff --git a/Lang/SuperCollider/Averages-Pythagorean-means b/Lang/SuperCollider/Averages-Pythagorean-means deleted file mode 120000 index 9ee9ff6fef..0000000000 --- a/Lang/SuperCollider/Averages-Pythagorean-means +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Pythagorean-means/SuperCollider \ No newline at end of file diff --git a/Lang/SuperCollider/Catalan-numbers b/Lang/SuperCollider/Catalan-numbers deleted file mode 120000 index 3ee9240cf0..0000000000 --- a/Lang/SuperCollider/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/SuperCollider \ No newline at end of file diff --git a/Lang/SuperCollider/Golden-ratio-Convergence b/Lang/SuperCollider/Golden-ratio-Convergence deleted file mode 120000 index 77807cac46..0000000000 --- a/Lang/SuperCollider/Golden-ratio-Convergence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Golden-ratio-Convergence/SuperCollider \ No newline at end of file diff --git a/Lang/SuperCollider/Iterated-digits-squaring b/Lang/SuperCollider/Iterated-digits-squaring deleted file mode 120000 index 197266fc01..0000000000 --- a/Lang/SuperCollider/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/SuperCollider \ No newline at end of file diff --git a/Lang/SuperCollider/Multiplication-tables b/Lang/SuperCollider/Multiplication-tables deleted file mode 120000 index f5418ea2b2..0000000000 --- a/Lang/SuperCollider/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/SuperCollider \ No newline at end of file diff --git a/Lang/SuperCollider/Semordnilap b/Lang/SuperCollider/Semordnilap new file mode 120000 index 0000000000..ace051dba8 --- /dev/null +++ b/Lang/SuperCollider/Semordnilap @@ -0,0 +1 @@ +../../Task/Semordnilap/SuperCollider \ No newline at end of file diff --git a/Lang/SuperCollider/Vampire-number b/Lang/SuperCollider/Vampire-number deleted file mode 120000 index 96124ca653..0000000000 --- a/Lang/SuperCollider/Vampire-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vampire-number/SuperCollider \ No newline at end of file diff --git a/Lang/Swift/AVL-tree b/Lang/Swift/AVL-tree deleted file mode 120000 index ff46aae38e..0000000000 --- a/Lang/Swift/AVL-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/AVL-tree/Swift \ No newline at end of file diff --git a/Lang/Swift/Bioinformatics-base-count b/Lang/Swift/Bioinformatics-base-count new file mode 120000 index 0000000000..c497b7a9fe --- /dev/null +++ b/Lang/Swift/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Swift \ No newline at end of file diff --git a/Lang/Swift/Boyer-Moore-string-search b/Lang/Swift/Boyer-Moore-string-search deleted file mode 120000 index d0d21c21e5..0000000000 --- a/Lang/Swift/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Swift \ No newline at end of file diff --git a/Lang/Swift/Chaocipher b/Lang/Swift/Chaocipher deleted file mode 120000 index 6e9ab31392..0000000000 --- a/Lang/Swift/Chaocipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaocipher/Swift \ No newline at end of file diff --git a/Lang/Swift/Compare-length-of-two-strings b/Lang/Swift/Compare-length-of-two-strings deleted file mode 120000 index d53f307b7e..0000000000 --- a/Lang/Swift/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Swift \ No newline at end of file diff --git a/Lang/Swift/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- b/Lang/Swift/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- deleted file mode 120000 index bfa2341e33..0000000000 --- a/Lang/Swift/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction-Arithmetic-G-matrix-ng-continued-fraction-n-/Swift \ No newline at end of file diff --git a/Lang/Swift/De-Bruijn-sequences b/Lang/Swift/De-Bruijn-sequences deleted file mode 120000 index 0fbdf1e9f8..0000000000 --- a/Lang/Swift/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/Swift \ No newline at end of file diff --git a/Lang/Swift/Empty-program b/Lang/Swift/Empty-program new file mode 120000 index 0000000000..2c1baaa481 --- /dev/null +++ b/Lang/Swift/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Swift \ No newline at end of file diff --git a/Lang/Swift/Floyd-Warshall-algorithm b/Lang/Swift/Floyd-Warshall-algorithm deleted file mode 120000 index d1366dce22..0000000000 --- a/Lang/Swift/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/Swift \ No newline at end of file diff --git a/Lang/Swift/K-d-tree b/Lang/Swift/K-d-tree deleted file mode 120000 index a4758e806b..0000000000 --- a/Lang/Swift/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/Swift \ No newline at end of file diff --git a/Lang/Swift/M-bius-function b/Lang/Swift/M-bius-function deleted file mode 120000 index cd32d72e63..0000000000 --- a/Lang/Swift/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Swift \ No newline at end of file diff --git a/Lang/Swift/Miller-Rabin-primality-test b/Lang/Swift/Miller-Rabin-primality-test new file mode 120000 index 0000000000..08a41b9961 --- /dev/null +++ b/Lang/Swift/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Swift \ No newline at end of file diff --git a/Lang/Swift/Parse-an-IP-Address b/Lang/Swift/Parse-an-IP-Address deleted file mode 120000 index b157f3f9a2..0000000000 --- a/Lang/Swift/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Swift \ No newline at end of file diff --git a/Lang/Swift/Pseudo-random-numbers-Splitmix64 b/Lang/Swift/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index 7f3d66c35a..0000000000 --- a/Lang/Swift/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/Swift \ No newline at end of file diff --git a/Lang/Swift/Quaternion-type b/Lang/Swift/Quaternion-type new file mode 120000 index 0000000000..d74f88c4be --- /dev/null +++ b/Lang/Swift/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Swift \ No newline at end of file diff --git a/Lang/Swift/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Swift/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Swift/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Swift/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Swift/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Swift/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Swift/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Swift/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Swift/Sorting-Algorithms-Circle-Sort b/Lang/Swift/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..367310fdad --- /dev/null +++ b/Lang/Swift/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Swift \ No newline at end of file diff --git a/Lang/Swift/Tonelli-Shanks-algorithm b/Lang/Swift/Tonelli-Shanks-algorithm deleted file mode 120000 index 9e28b1de2a..0000000000 --- a/Lang/Swift/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/Swift \ No newline at end of file diff --git a/Lang/Symsyn/Empty-program b/Lang/Symsyn/Empty-program new file mode 120000 index 0000000000..73cbdf1eb6 --- /dev/null +++ b/Lang/Symsyn/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Symsyn \ No newline at end of file diff --git a/Lang/TAV/00-LANG.txt b/Lang/TAV/00-LANG.txt deleted file mode 100644 index bb9d8890a2..0000000000 --- a/Lang/TAV/00-LANG.txt +++ /dev/null @@ -1,46 +0,0 @@ -{{language|TAV -|site=https://tavpl.de -|untyped=yes -|exec=machine -|gc=no -|parampass=reference -|checking=dynamic -|safety=safe -}} -{{language programming paradigm|Procedural}} -{{CompileOnline}} - -'''TAV''' is the '''terse and verbose''' -language that borrows from [[Python]], Stage2, [[Genie]] and more. - -Its most outstanding feature is the use of templates for function calls instead of the -traditional function_name(parameter, parameter, ...) form. -Matched parenthesis are consequently rarely necessary. - -Summary of important points: - -* C precompiler, should work on any system with a reasonable C compiler -* Block structuring by indentation, like in Python; line oriented -* No keywords in the core language, only symbols (i.e. bigraphs) -* Variables are of any kind (type) dynamically; no declarations necessary -* Function definition and calls by word sequences with interspersed parameters, often no parenthesis needed -* Maps (dictionaries) with all kinds of keys (except floating-point numbers) -* Rows (arrays) if the keys are dense integers, dynamically expanding -* Arbitrary precision integer numbers -* Dynamic Unicode strings -* Fields for extra data in rows and maps -* Attributes for information about an item -* Fault items for reliable error handling -* Reference counting avoids unsolicited delays for garbage-collection -* Basic support for object-oriented programming (no inheritance) -* Discretionary type system specified, but not yet tested -* Publication syntax with common English keywords instead of symbols -* Bindings to SDL, Cairo and GTK (proof-of-concept level) - -Many examples can be run via copy and paste in the Playground. - -Because there are no keywords and rarely nested parenthesis (of any kind), -syntax highlighting is not used. - -==Links== -*[[https://tavpl.de/TAV-Online TAV Online Playground]] \ No newline at end of file diff --git a/Lang/TAV/00-META.yaml b/Lang/TAV/00-META.yaml deleted file mode 100644 index 94650f22a2..0000000000 --- a/Lang/TAV/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:TAV diff --git a/Lang/TAV/A+B b/Lang/TAV/A+B deleted file mode 120000 index a5e97665e3..0000000000 --- a/Lang/TAV/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/TAV \ No newline at end of file diff --git a/Lang/TAV/Ackermann-function b/Lang/TAV/Ackermann-function deleted file mode 120000 index 237de07217..0000000000 --- a/Lang/TAV/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/TAV \ No newline at end of file diff --git a/Lang/TAV/Anagrams b/Lang/TAV/Anagrams deleted file mode 120000 index 335a62bd1c..0000000000 --- a/Lang/TAV/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/TAV \ No newline at end of file diff --git a/Lang/TAV/Arithmetic-Integer b/Lang/TAV/Arithmetic-Integer deleted file mode 120000 index b9d994e37f..0000000000 --- a/Lang/TAV/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/TAV \ No newline at end of file diff --git a/Lang/TAV/Array-concatenation b/Lang/TAV/Array-concatenation deleted file mode 120000 index a1b0d9260d..0000000000 --- a/Lang/TAV/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/TAV \ No newline at end of file diff --git a/Lang/TAV/Array-length b/Lang/TAV/Array-length deleted file mode 120000 index 0d849f41e8..0000000000 --- a/Lang/TAV/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/TAV \ No newline at end of file diff --git a/Lang/TAV/Ascending-primes b/Lang/TAV/Ascending-primes deleted file mode 120000 index b4add5cfb9..0000000000 --- a/Lang/TAV/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/TAV \ No newline at end of file diff --git a/Lang/TAV/Associative-array-Iteration b/Lang/TAV/Associative-array-Iteration deleted file mode 120000 index 48bdb805ad..0000000000 --- a/Lang/TAV/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/TAV \ No newline at end of file diff --git a/Lang/TAV/Averages-Root-mean-square b/Lang/TAV/Averages-Root-mean-square deleted file mode 120000 index 75f73fbdb8..0000000000 --- a/Lang/TAV/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/TAV \ No newline at end of file diff --git a/Lang/TAV/Babbage-problem b/Lang/TAV/Babbage-problem deleted file mode 120000 index 141507242e..0000000000 --- a/Lang/TAV/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/TAV \ No newline at end of file diff --git a/Lang/TAV/Bernoulli-numbers b/Lang/TAV/Bernoulli-numbers deleted file mode 120000 index 164f4e8e6c..0000000000 --- a/Lang/TAV/Bernoulli-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bernoulli-numbers/TAV \ No newline at end of file diff --git a/Lang/TAV/Character-codes b/Lang/TAV/Character-codes deleted file mode 120000 index 46e37f6e83..0000000000 --- a/Lang/TAV/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/TAV \ No newline at end of file diff --git a/Lang/TAV/Command-line-arguments b/Lang/TAV/Command-line-arguments deleted file mode 120000 index 72fc191937..0000000000 --- a/Lang/TAV/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/TAV \ No newline at end of file diff --git a/Lang/TAV/Conditional-structures b/Lang/TAV/Conditional-structures deleted file mode 120000 index bf797da6e6..0000000000 --- a/Lang/TAV/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/TAV \ No newline at end of file diff --git a/Lang/TAV/Convert-decimal-number-to-rational b/Lang/TAV/Convert-decimal-number-to-rational deleted file mode 120000 index c7b635149b..0000000000 --- a/Lang/TAV/Convert-decimal-number-to-rational +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-decimal-number-to-rational/TAV \ No newline at end of file diff --git a/Lang/TAV/Copy-a-string b/Lang/TAV/Copy-a-string deleted file mode 120000 index 3ca111af72..0000000000 --- a/Lang/TAV/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/TAV \ No newline at end of file diff --git a/Lang/TAV/Create-a-two-dimensional-array-at-runtime b/Lang/TAV/Create-a-two-dimensional-array-at-runtime deleted file mode 120000 index ec0fae01dd..0000000000 --- a/Lang/TAV/Create-a-two-dimensional-array-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-two-dimensional-array-at-runtime/TAV \ No newline at end of file diff --git a/Lang/TAV/Empty-string b/Lang/TAV/Empty-string deleted file mode 120000 index c001916e31..0000000000 --- a/Lang/TAV/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/TAV \ No newline at end of file diff --git a/Lang/TAV/Factorial b/Lang/TAV/Factorial deleted file mode 120000 index 005136367e..0000000000 --- a/Lang/TAV/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/TAV \ No newline at end of file diff --git a/Lang/TAV/Fibonacci-sequence b/Lang/TAV/Fibonacci-sequence deleted file mode 120000 index e65f13e72b..0000000000 --- a/Lang/TAV/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/TAV \ No newline at end of file diff --git a/Lang/TAV/Formatted-numeric-output b/Lang/TAV/Formatted-numeric-output deleted file mode 120000 index efbc60523a..0000000000 --- a/Lang/TAV/Formatted-numeric-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Formatted-numeric-output/TAV \ No newline at end of file diff --git a/Lang/TAV/Greatest-element-of-a-list b/Lang/TAV/Greatest-element-of-a-list deleted file mode 120000 index b4f81674a0..0000000000 --- a/Lang/TAV/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/TAV \ No newline at end of file diff --git a/Lang/TAV/Guess-the-number-With-feedback b/Lang/TAV/Guess-the-number-With-feedback deleted file mode 120000 index 5779e4d532..0000000000 --- a/Lang/TAV/Guess-the-number-With-feedback +++ /dev/null @@ -1 +0,0 @@ -../../Task/Guess-the-number-With-feedback/TAV \ No newline at end of file diff --git a/Lang/TAV/HTTPS b/Lang/TAV/HTTPS deleted file mode 120000 index 3b5c7b8988..0000000000 --- a/Lang/TAV/HTTPS +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS/TAV \ No newline at end of file diff --git a/Lang/TAV/Halt-and-catch-fire b/Lang/TAV/Halt-and-catch-fire deleted file mode 120000 index 802c4aa7b1..0000000000 --- a/Lang/TAV/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/TAV \ No newline at end of file diff --git a/Lang/TAV/Hello-world-Graphical b/Lang/TAV/Hello-world-Graphical deleted file mode 120000 index 5207716bc0..0000000000 --- a/Lang/TAV/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/TAV \ No newline at end of file diff --git a/Lang/TAV/Hello-world-Text b/Lang/TAV/Hello-world-Text deleted file mode 120000 index 3fd6788564..0000000000 --- a/Lang/TAV/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/TAV \ No newline at end of file diff --git a/Lang/TAV/Letter-frequency b/Lang/TAV/Letter-frequency deleted file mode 120000 index 891b699844..0000000000 --- a/Lang/TAV/Letter-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Letter-frequency/TAV \ No newline at end of file diff --git a/Lang/TAV/Loop-over-multiple-arrays-simultaneously b/Lang/TAV/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index b6133fd1e3..0000000000 --- a/Lang/TAV/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/TAV \ No newline at end of file diff --git a/Lang/TAV/Loops-Break b/Lang/TAV/Loops-Break deleted file mode 120000 index 9576a14c29..0000000000 --- a/Lang/TAV/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/TAV \ No newline at end of file diff --git a/Lang/TAV/Loops-Do-while b/Lang/TAV/Loops-Do-while deleted file mode 120000 index 1fc4e33872..0000000000 --- a/Lang/TAV/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/TAV \ No newline at end of file diff --git a/Lang/TAV/Loops-Downward-for b/Lang/TAV/Loops-Downward-for deleted file mode 120000 index 414c0842ce..0000000000 --- a/Lang/TAV/Loops-Downward-for +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Downward-for/TAV \ No newline at end of file diff --git a/Lang/TAV/Loops-For b/Lang/TAV/Loops-For deleted file mode 120000 index b5f2be83c7..0000000000 --- a/Lang/TAV/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/TAV \ No newline at end of file diff --git a/Lang/TAV/Loops-Infinite b/Lang/TAV/Loops-Infinite deleted file mode 120000 index 6ab04989e3..0000000000 --- a/Lang/TAV/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/TAV \ No newline at end of file diff --git a/Lang/TAV/Loops-N-plus-one-half b/Lang/TAV/Loops-N-plus-one-half deleted file mode 120000 index eaeea87dec..0000000000 --- a/Lang/TAV/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/TAV \ No newline at end of file diff --git a/Lang/TAV/Loops-While b/Lang/TAV/Loops-While deleted file mode 120000 index b408169718..0000000000 --- a/Lang/TAV/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/TAV \ No newline at end of file diff --git a/Lang/TAV/Multiplication-tables b/Lang/TAV/Multiplication-tables deleted file mode 120000 index 294070cfc4..0000000000 --- a/Lang/TAV/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/TAV \ No newline at end of file diff --git a/Lang/TAV/Ordered-words b/Lang/TAV/Ordered-words deleted file mode 120000 index 1dd34f0734..0000000000 --- a/Lang/TAV/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/TAV \ No newline at end of file diff --git a/Lang/TAV/Permutations b/Lang/TAV/Permutations deleted file mode 120000 index c61f5ead43..0000000000 --- a/Lang/TAV/Permutations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations/TAV \ No newline at end of file diff --git a/Lang/TAV/Real-constants-and-functions b/Lang/TAV/Real-constants-and-functions deleted file mode 120000 index 074b803009..0000000000 --- a/Lang/TAV/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/TAV \ No newline at end of file diff --git a/Lang/TAV/Reverse-a-string b/Lang/TAV/Reverse-a-string deleted file mode 120000 index ded0969ffb..0000000000 --- a/Lang/TAV/Reverse-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-a-string/TAV \ No newline at end of file diff --git a/Lang/TAV/Semordnilap b/Lang/TAV/Semordnilap deleted file mode 120000 index 2269a5f472..0000000000 --- a/Lang/TAV/Semordnilap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Semordnilap/TAV \ No newline at end of file diff --git a/Lang/TAV/Show-ASCII-table b/Lang/TAV/Show-ASCII-table deleted file mode 120000 index f220b6d5c2..0000000000 --- a/Lang/TAV/Show-ASCII-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Show-ASCII-table/TAV \ No newline at end of file diff --git a/Lang/TAV/Simple-windowed-application b/Lang/TAV/Simple-windowed-application deleted file mode 120000 index 16b1926606..0000000000 --- a/Lang/TAV/Simple-windowed-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-windowed-application/TAV \ No newline at end of file diff --git a/Lang/TAV/Stack b/Lang/TAV/Stack deleted file mode 120000 index a05bead248..0000000000 --- a/Lang/TAV/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/TAV \ No newline at end of file diff --git a/Lang/TAV/String-length b/Lang/TAV/String-length deleted file mode 120000 index 6374cb4fac..0000000000 --- a/Lang/TAV/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/TAV \ No newline at end of file diff --git a/Lang/TAV/Sudoku b/Lang/TAV/Sudoku deleted file mode 120000 index c7ddc3598c..0000000000 --- a/Lang/TAV/Sudoku +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudoku/TAV \ No newline at end of file diff --git a/Lang/TAV/Tic-tac-toe b/Lang/TAV/Tic-tac-toe deleted file mode 120000 index c75d3a40ab..0000000000 --- a/Lang/TAV/Tic-tac-toe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tic-tac-toe/TAV \ No newline at end of file diff --git a/Lang/TAV/Tokenize-a-string b/Lang/TAV/Tokenize-a-string deleted file mode 120000 index 8b4118dfbe..0000000000 --- a/Lang/TAV/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/TAV \ No newline at end of file diff --git a/Lang/TAV/Twelve-statements b/Lang/TAV/Twelve-statements deleted file mode 120000 index 0036358c10..0000000000 --- a/Lang/TAV/Twelve-statements +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twelve-statements/TAV \ No newline at end of file diff --git a/Lang/TAV/Window-creation b/Lang/TAV/Window-creation deleted file mode 120000 index 83a0431016..0000000000 --- a/Lang/TAV/Window-creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-creation/TAV \ No newline at end of file diff --git a/Lang/TAV/Word-frequency b/Lang/TAV/Word-frequency deleted file mode 120000 index 569f86daf5..0000000000 --- a/Lang/TAV/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/TAV \ No newline at end of file diff --git a/Lang/TI-83-BASIC/00-LANG.txt b/Lang/TI-83-BASIC/00-LANG.txt index a8830c103d..571b0d2a73 100644 --- a/Lang/TI-83-BASIC/00-LANG.txt +++ b/Lang/TI-83-BASIC/00-LANG.txt @@ -8,24 +8,24 @@ The language contains control flow for structured programming. The main control flow statements are: ====If==== -If condition +If condition Then ... Else ... -End +End ====For==== -For(variable,start,stop,step) +For(variable,start,stop,step) ... -End +End ====While==== -While condition +While condition ... -End +End ====Repeat==== -Repeat condition +Repeat condition ... -End +End ===Data types=== '''TI-BASIC''' is a strongly and dynamically-typed language Variables are global. There is no local variables. So programs cannot be recursive, even if a program can call itself. @@ -37,11 +37,11 @@ Variables are global. There is no local variables. So programs cannot be recursi ==Example== One popular example is the quadratic formula program. -Prompt A,B,C +Prompt A,B,C B²-4AC->D (-B-sqrt(D))/(2A)->Y (-B+sqrt(D))/(2A)->X -{Y,X} +{Y,X} As far there is a complex mode and variable can be real or complex, this program is very ubiquitous. diff --git a/Lang/TXR/Cheryls-birthday b/Lang/TXR/Cheryls-birthday deleted file mode 120000 index 3755473e4e..0000000000 --- a/Lang/TXR/Cheryls-birthday +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cheryls-birthday/TXR \ No newline at end of file diff --git a/Lang/Tailspin/00-LANG.txt b/Lang/Tailspin/00-LANG.txt index 02c82847dd..a8437326e6 100644 --- a/Lang/Tailspin/00-LANG.txt +++ b/Lang/Tailspin/00-LANG.txt @@ -18,6 +18,4 @@ The inspiration comes mostly from xslt, but data structures are json-like. The m [https://github.com/tobega/tailspin-v0/blob/master/TailspinReference.md Syntax reference] -Development page, also how to run Tailspin programs [https://github.com/tobega/tailspin-v0 on github] - -Next version v0.5 [https://github.com/tobega/tailspin-v0.5 under development] \ No newline at end of file +Development page, also how to run Tailspin programs [https://github.com/tobega/tailspin-v0 on github] \ No newline at end of file diff --git a/Lang/Tailspin/Combinations b/Lang/Tailspin/Combinations deleted file mode 120000 index 987b496fbb..0000000000 --- a/Lang/Tailspin/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/Tailspin \ No newline at end of file diff --git a/Lang/Tailspin/Sierpinski-triangle b/Lang/Tailspin/Sierpinski-triangle deleted file mode 120000 index b603b111a2..0000000000 --- a/Lang/Tailspin/Sierpinski-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-triangle/Tailspin \ No newline at end of file diff --git a/Lang/Tcl/Ascending-primes b/Lang/Tcl/Ascending-primes deleted file mode 120000 index aad1d565ea..0000000000 --- a/Lang/Tcl/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Bioinformatics-base-count b/Lang/Tcl/Bioinformatics-base-count new file mode 120000 index 0000000000..2d2ea8e987 --- /dev/null +++ b/Lang/Tcl/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Chaocipher b/Lang/Tcl/Chaocipher deleted file mode 120000 index 8d836b3e4a..0000000000 --- a/Lang/Tcl/Chaocipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaocipher/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Character-codes b/Lang/Tcl/Character-codes new file mode 120000 index 0000000000..3f7702eaa9 --- /dev/null +++ b/Lang/Tcl/Character-codes @@ -0,0 +1 @@ +../../Task/Character-codes/Tcl \ No newline at end of file diff --git a/Lang/Tcl/De-Bruijn-sequences b/Lang/Tcl/De-Bruijn-sequences deleted file mode 120000 index b3e1240d2e..0000000000 --- a/Lang/Tcl/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Descending-primes b/Lang/Tcl/Descending-primes deleted file mode 120000 index 11b4ea6aa0..0000000000 --- a/Lang/Tcl/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Find-if-a-point-is-within-a-triangle b/Lang/Tcl/Find-if-a-point-is-within-a-triangle deleted file mode 120000 index 340eb44d03..0000000000 --- a/Lang/Tcl/Find-if-a-point-is-within-a-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-if-a-point-is-within-a-triangle/Tcl \ No newline at end of file diff --git a/Lang/Tcl/M-bius-function b/Lang/Tcl/M-bius-function deleted file mode 120000 index 1c7ccdef59..0000000000 --- a/Lang/Tcl/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Miller-Rabin-primality-test b/Lang/Tcl/Miller-Rabin-primality-test new file mode 120000 index 0000000000..5e3095425f --- /dev/null +++ b/Lang/Tcl/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Quaternion-type b/Lang/Tcl/Quaternion-type new file mode 120000 index 0000000000..50905d75b8 --- /dev/null +++ b/Lang/Tcl/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Tcl/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Tcl/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Tcl/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Tcl/Strassens-algorithm b/Lang/Tcl/Strassens-algorithm deleted file mode 120000 index 8ac35c1ae0..0000000000 --- a/Lang/Tcl/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Tcl \ No newline at end of file diff --git a/Lang/Tcl/Unicode-strings b/Lang/Tcl/Unicode-strings deleted file mode 120000 index 5d3bbc0431..0000000000 --- a/Lang/Tcl/Unicode-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unicode-strings/Tcl \ No newline at end of file diff --git a/Lang/Tiny-BASIC/Leonardo-numbers b/Lang/Tiny-BASIC/Leonardo-numbers deleted file mode 120000 index 731e542c2f..0000000000 --- a/Lang/Tiny-BASIC/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Tiny-BASIC \ No newline at end of file diff --git a/Lang/Tiny-BASIC/Magic-constant b/Lang/Tiny-BASIC/Magic-constant deleted file mode 120000 index e64a075712..0000000000 --- a/Lang/Tiny-BASIC/Magic-constant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-constant/Tiny-BASIC \ No newline at end of file diff --git a/Lang/Tiny-BASIC/Mandelbrot-set b/Lang/Tiny-BASIC/Mandelbrot-set deleted file mode 120000 index 9aab104307..0000000000 --- a/Lang/Tiny-BASIC/Mandelbrot-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mandelbrot-set/Tiny-BASIC \ No newline at end of file diff --git a/Lang/Tiny-BASIC/The-Twelve-Days-of-Christmas b/Lang/Tiny-BASIC/The-Twelve-Days-of-Christmas deleted file mode 120000 index 8dad6cc4e9..0000000000 --- a/Lang/Tiny-BASIC/The-Twelve-Days-of-Christmas +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Twelve-Days-of-Christmas/Tiny-BASIC \ No newline at end of file diff --git a/Lang/Transd/Compare-length-of-two-strings b/Lang/Transd/Compare-length-of-two-strings new file mode 120000 index 0000000000..28f3956c3e --- /dev/null +++ b/Lang/Transd/Compare-length-of-two-strings @@ -0,0 +1 @@ +../../Task/Compare-length-of-two-strings/Transd \ No newline at end of file diff --git a/Lang/Trith/Empty-program b/Lang/Trith/Empty-program new file mode 120000 index 0000000000..a3056b4a8b --- /dev/null +++ b/Lang/Trith/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Trith \ No newline at end of file diff --git a/Lang/True-BASIC/00-LANG.txt b/Lang/True-BASIC/00-LANG.txt index 7ebdbc548e..765d6ad0cc 100644 --- a/Lang/True-BASIC/00-LANG.txt +++ b/Lang/True-BASIC/00-LANG.txt @@ -2,7 +2,6 @@ |exec=interpreted |tags=basic,TrueBasic |site=http://www.truebasic.com/}} -{{implementation|BASIC}} True BASIC is a variant of the BASIC programming language descended from Dartmouth BASIC, the original BASIC. It was invented by college professors John G. Kemeny and Thomas E. Kurtz. It is an interpreted, procedural language and sold as a commercial product. Versions have existed for Microsoft Windows, Apple Mac OS, MS-DOS, OS/2, and the Atari ST. The latest version of the language is 6.007 and currently only runs on Microsoft Windows. diff --git a/Lang/True-BASIC/100-prisoners b/Lang/True-BASIC/100-prisoners deleted file mode 120000 index b793e357f7..0000000000 --- a/Lang/True-BASIC/100-prisoners +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-prisoners/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Determine-sentence-type b/Lang/True-BASIC/Determine-sentence-type deleted file mode 120000 index 988197fd95..0000000000 --- a/Lang/True-BASIC/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Diversity-prediction-theorem b/Lang/True-BASIC/Diversity-prediction-theorem deleted file mode 120000 index 85980181c1..0000000000 --- a/Lang/True-BASIC/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Evaluate-binomial-coefficients b/Lang/True-BASIC/Evaluate-binomial-coefficients deleted file mode 120000 index 8a2a036883..0000000000 --- a/Lang/True-BASIC/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Greatest-element-of-a-list b/Lang/True-BASIC/Greatest-element-of-a-list deleted file mode 120000 index 3c9a45a72c..0000000000 --- a/Lang/True-BASIC/Greatest-element-of-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-element-of-a-list/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Leonardo-numbers b/Lang/True-BASIC/Leonardo-numbers deleted file mode 120000 index 7faae2372e..0000000000 --- a/Lang/True-BASIC/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Loop-over-multiple-arrays-simultaneously b/Lang/True-BASIC/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index 0cb7e37da5..0000000000 --- a/Lang/True-BASIC/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Meissel-Mertens-constant b/Lang/True-BASIC/Meissel-Mertens-constant new file mode 120000 index 0000000000..fd72ec2c53 --- /dev/null +++ b/Lang/True-BASIC/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Multiple-regression b/Lang/True-BASIC/Multiple-regression deleted file mode 120000 index ca0e5c404e..0000000000 --- a/Lang/True-BASIC/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Phrase-reversals b/Lang/True-BASIC/Phrase-reversals deleted file mode 120000 index 564680054e..0000000000 --- a/Lang/True-BASIC/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/True-BASIC/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/True-BASIC/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/True-BASIC/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/True-BASIC/Soundex b/Lang/True-BASIC/Soundex deleted file mode 120000 index 33e7fb68ee..0000000000 --- a/Lang/True-BASIC/Soundex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soundex/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Split-a-character-string-based-on-change-of-character b/Lang/True-BASIC/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index e25a5cf6f3..0000000000 --- a/Lang/True-BASIC/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/The-Name-Game b/Lang/True-BASIC/The-Name-Game deleted file mode 120000 index bf4d14fb81..0000000000 --- a/Lang/True-BASIC/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/True-BASIC \ No newline at end of file diff --git a/Lang/True-BASIC/Vector b/Lang/True-BASIC/Vector deleted file mode 120000 index 4da227d0fe..0000000000 --- a/Lang/True-BASIC/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/True-BASIC \ No newline at end of file diff --git a/Lang/TypeScript/Additive-primes b/Lang/TypeScript/Additive-primes deleted file mode 120000 index 698823ecab..0000000000 --- a/Lang/TypeScript/Additive-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Additive-primes/TypeScript \ No newline at end of file diff --git a/Lang/TypeScript/Arithmetic-numbers b/Lang/TypeScript/Arithmetic-numbers deleted file mode 120000 index 0a37af8cff..0000000000 --- a/Lang/TypeScript/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/TypeScript \ No newline at end of file diff --git a/Lang/TypeScript/Deal-cards-for-FreeCell b/Lang/TypeScript/Deal-cards-for-FreeCell deleted file mode 120000 index 04eefe17ef..0000000000 --- a/Lang/TypeScript/Deal-cards-for-FreeCell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deal-cards-for-FreeCell/TypeScript \ No newline at end of file diff --git a/Lang/TypeScript/Leonardo-numbers b/Lang/TypeScript/Leonardo-numbers deleted file mode 120000 index 501c953b40..0000000000 --- a/Lang/TypeScript/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/TypeScript \ No newline at end of file diff --git a/Lang/TypeScript/Map-range b/Lang/TypeScript/Map-range deleted file mode 120000 index 50eeda25cd..0000000000 --- a/Lang/TypeScript/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/TypeScript \ No newline at end of file diff --git a/Lang/TypeScript/Sum-of-a-series b/Lang/TypeScript/Sum-of-a-series deleted file mode 120000 index 810faf05f3..0000000000 --- a/Lang/TypeScript/Sum-of-a-series +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-a-series/TypeScript \ No newline at end of file diff --git a/Lang/UNIX-Shell/CRC-32 b/Lang/UNIX-Shell/CRC-32 deleted file mode 120000 index 7be1bb462f..0000000000 --- a/Lang/UNIX-Shell/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/UNIX-Shell \ No newline at end of file diff --git a/Lang/UNIX-Shell/Color-of-a-screen-pixel b/Lang/UNIX-Shell/Color-of-a-screen-pixel deleted file mode 120000 index 8344bcd2f2..0000000000 --- a/Lang/UNIX-Shell/Color-of-a-screen-pixel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-of-a-screen-pixel/UNIX-Shell \ No newline at end of file diff --git a/Lang/UNIX-Shell/Color-quantization b/Lang/UNIX-Shell/Color-quantization deleted file mode 120000 index 6c518f1af5..0000000000 --- a/Lang/UNIX-Shell/Color-quantization +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-quantization/UNIX-Shell \ No newline at end of file diff --git a/Lang/UNIX-Shell/Copy-stdin-to-stdout b/Lang/UNIX-Shell/Copy-stdin-to-stdout deleted file mode 120000 index 217727646b..0000000000 --- a/Lang/UNIX-Shell/Copy-stdin-to-stdout +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-stdin-to-stdout/UNIX-Shell \ No newline at end of file diff --git a/Lang/UNIX-Shell/Horners-rule-for-polynomial-evaluation b/Lang/UNIX-Shell/Horners-rule-for-polynomial-evaluation deleted file mode 120000 index 18a4ccc4dc..0000000000 --- a/Lang/UNIX-Shell/Horners-rule-for-polynomial-evaluation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Horners-rule-for-polynomial-evaluation/UNIX-Shell \ No newline at end of file diff --git a/Lang/UNIX-Shell/Pi b/Lang/UNIX-Shell/Pi deleted file mode 120000 index 854a52d02a..0000000000 --- a/Lang/UNIX-Shell/Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pi/UNIX-Shell \ No newline at end of file diff --git a/Lang/UNIX-Shell/Trabb-Pardo-Knuth-algorithm b/Lang/UNIX-Shell/Trabb-Pardo-Knuth-algorithm deleted file mode 120000 index d9c18fe35b..0000000000 --- a/Lang/UNIX-Shell/Trabb-Pardo-Knuth-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trabb-Pardo-Knuth-algorithm/UNIX-Shell \ No newline at end of file diff --git a/Lang/Uiua/00-LANG.txt b/Lang/Uiua/00-LANG.txt index f3cc2f1ee5..2a4f3f689f 100644 --- a/Lang/Uiua/00-LANG.txt +++ b/Lang/Uiua/00-LANG.txt @@ -1,15 +1,7 @@ {{language -|exec=bytecode -|site=https://www.uiua.org/ -|checking=dynamic -|gc=yes -|express=implicit -|LCT=yes}} -{{language programming paradigm|array}} -{{language programming paradigm|functional|array}} -From [https://www.uiua.org uiua.org]: - -"Uiua (''wee-wuh'') is a general purpose, stack-based, array-oriented programming language with a focus on simplicity, beauty, and tacit code. +|site=https://www.uiua.org/}} +{{language programming paradigm|functional}} +Uiua (''wee-wuh'') is a general purpose, stack-based, array-oriented programming language with a focus on simplicity, beauty, and tacit code. Uiua has a simple, context-free, LL(3) grammar. Code runs from right to left, top to bottom, with only one precedence rule. As operators are to the left of their operands, Uiua code reads a little bit like a Lisp, but with fewer parentheses. @@ -19,10 +11,4 @@ Uiua's one and only composite data type, the array, is based on those of APL, J, Unlike other array languages, Uiua does not have monadic and dyadic versions of each glyph. Every glyph does only one thing, so you don't need to parse an entire expression to know which version it is. -Find out more, and run code in your browser at [https://www.uiua.org https://www.uiua.org]." - -===Note=== -The Uiua programming language uses a custom font and colorful syntax highlighting to increase the readability of its code. As such syntax highlighting is not possible to display on this wiki, it is recommended to paste code into [https://www.uiua.org/pad the online Uiua pad] (or a [https://www.uiua.org/install#editor-support supported editor]) to view code more easily. - -==Todo== -[https://rosettacode.org/wiki/Tasks_not_implemented_in_Uiua Tasks not implemented in Uiua] \ No newline at end of file +Find out more, and run code in your browser at https://www.uiua.org \ No newline at end of file diff --git a/Lang/Uiua/100-doors b/Lang/Uiua/100-doors deleted file mode 120000 index 58d6cad56c..0000000000 --- a/Lang/Uiua/100-doors +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-doors/Uiua \ No newline at end of file diff --git a/Lang/Uiua/15-puzzle-solver b/Lang/Uiua/15-puzzle-solver deleted file mode 120000 index d2c4541287..0000000000 --- a/Lang/Uiua/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/Uiua \ No newline at end of file diff --git a/Lang/Uiua/21-game b/Lang/Uiua/21-game deleted file mode 120000 index 629762436d..0000000000 --- a/Lang/Uiua/21-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/21-game/Uiua \ No newline at end of file diff --git a/Lang/Uiua/4-rings-or-4-squares-puzzle b/Lang/Uiua/4-rings-or-4-squares-puzzle deleted file mode 120000 index a31782d205..0000000000 --- a/Lang/Uiua/4-rings-or-4-squares-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/4-rings-or-4-squares-puzzle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/99-bottles-of-beer b/Lang/Uiua/99-bottles-of-beer deleted file mode 120000 index bd1d75c2c7..0000000000 --- a/Lang/Uiua/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/Uiua \ No newline at end of file diff --git a/Lang/Uiua/A+B b/Lang/Uiua/A+B deleted file mode 120000 index df9da8c183..0000000000 --- a/Lang/Uiua/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Uiua \ No newline at end of file diff --git a/Lang/Uiua/ABC-problem b/Lang/Uiua/ABC-problem deleted file mode 120000 index e3c88d305a..0000000000 --- a/Lang/Uiua/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/Uiua \ No newline at end of file diff --git a/Lang/Uiua/ADFGVX-cipher b/Lang/Uiua/ADFGVX-cipher deleted file mode 120000 index 3b808ce65e..0000000000 --- a/Lang/Uiua/ADFGVX-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/ADFGVX-cipher/Uiua \ No newline at end of file diff --git a/Lang/Uiua/ASCII-art-diagram-converter b/Lang/Uiua/ASCII-art-diagram-converter deleted file mode 120000 index 7868ebc205..0000000000 --- a/Lang/Uiua/ASCII-art-diagram-converter +++ /dev/null @@ -1 +0,0 @@ -../../Task/ASCII-art-diagram-converter/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Abbreviations-automatic b/Lang/Uiua/Abbreviations-automatic deleted file mode 120000 index 4ed38ebb71..0000000000 --- a/Lang/Uiua/Abbreviations-automatic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abbreviations-automatic/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Abelian-sandpile-model b/Lang/Uiua/Abelian-sandpile-model deleted file mode 120000 index 511d6d21ce..0000000000 --- a/Lang/Uiua/Abelian-sandpile-model +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Abundant-deficient-and-perfect-number-classifications b/Lang/Uiua/Abundant-deficient-and-perfect-number-classifications deleted file mode 120000 index 4ea7de4aaa..0000000000 --- a/Lang/Uiua/Abundant-deficient-and-perfect-number-classifications +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-deficient-and-perfect-number-classifications/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Abundant-odd-numbers b/Lang/Uiua/Abundant-odd-numbers deleted file mode 120000 index 15f27f9ef1..0000000000 --- a/Lang/Uiua/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Ackermann-function b/Lang/Uiua/Ackermann-function deleted file mode 120000 index 94bc0faf99..0000000000 --- a/Lang/Uiua/Ackermann-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ackermann-function/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Align-columns b/Lang/Uiua/Align-columns deleted file mode 120000 index 90d8156011..0000000000 --- a/Lang/Uiua/Align-columns +++ /dev/null @@ -1 +0,0 @@ -../../Task/Align-columns/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Almost-prime b/Lang/Uiua/Almost-prime deleted file mode 120000 index 392773baf7..0000000000 --- a/Lang/Uiua/Almost-prime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Almost-prime/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Amicable-pairs b/Lang/Uiua/Amicable-pairs deleted file mode 120000 index 8c9ce68129..0000000000 --- a/Lang/Uiua/Amicable-pairs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Amicable-pairs/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Anagrams b/Lang/Uiua/Anagrams deleted file mode 120000 index a823cee1f3..0000000000 --- a/Lang/Uiua/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Angle-difference-between-two-bearings b/Lang/Uiua/Angle-difference-between-two-bearings deleted file mode 120000 index ee9bbb083d..0000000000 --- a/Lang/Uiua/Angle-difference-between-two-bearings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Angle-difference-between-two-bearings/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Anonymous-recursion b/Lang/Uiua/Anonymous-recursion deleted file mode 120000 index 8c1b1c25c3..0000000000 --- a/Lang/Uiua/Anonymous-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anonymous-recursion/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Anti-primes b/Lang/Uiua/Anti-primes deleted file mode 120000 index caaf04d665..0000000000 --- a/Lang/Uiua/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Apply-a-callback-to-an-array b/Lang/Uiua/Apply-a-callback-to-an-array deleted file mode 120000 index 685e6558c3..0000000000 --- a/Lang/Uiua/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Arithmetic-Complex b/Lang/Uiua/Arithmetic-Complex deleted file mode 120000 index acbbaad1bb..0000000000 --- a/Lang/Uiua/Arithmetic-Complex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Complex/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Arithmetic-Integer b/Lang/Uiua/Arithmetic-Integer deleted file mode 120000 index 8f8007cc44..0000000000 --- a/Lang/Uiua/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Arithmetic-derivative b/Lang/Uiua/Arithmetic-derivative deleted file mode 120000 index 940b88708d..0000000000 --- a/Lang/Uiua/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Arithmetic-geometric-mean b/Lang/Uiua/Arithmetic-geometric-mean deleted file mode 120000 index 6adeb66a11..0000000000 --- a/Lang/Uiua/Arithmetic-geometric-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Arithmetic-geometric-mean-Calculate-Pi b/Lang/Uiua/Arithmetic-geometric-mean-Calculate-Pi deleted file mode 120000 index e30c23f938..0000000000 --- a/Lang/Uiua/Arithmetic-geometric-mean-Calculate-Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean-Calculate-Pi/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Arithmetic-numbers b/Lang/Uiua/Arithmetic-numbers deleted file mode 120000 index e537c98fb0..0000000000 --- a/Lang/Uiua/Arithmetic-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Array-concatenation b/Lang/Uiua/Array-concatenation deleted file mode 120000 index 48fabf1a40..0000000000 --- a/Lang/Uiua/Array-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-concatenation/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Array-length b/Lang/Uiua/Array-length deleted file mode 120000 index 7c3be21b34..0000000000 --- a/Lang/Uiua/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Arrays b/Lang/Uiua/Arrays deleted file mode 120000 index ae2ca1c8a6..0000000000 --- a/Lang/Uiua/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Ascending-primes b/Lang/Uiua/Ascending-primes deleted file mode 120000 index 83b9f7be7a..0000000000 --- a/Lang/Uiua/Ascending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ascending-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Assertions b/Lang/Uiua/Assertions deleted file mode 120000 index b370cee8a3..0000000000 --- a/Lang/Uiua/Assertions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Assertions/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Associative-array-Creation b/Lang/Uiua/Associative-array-Creation deleted file mode 120000 index 8f5e350a55..0000000000 --- a/Lang/Uiua/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Associative-array-Iteration b/Lang/Uiua/Associative-array-Iteration deleted file mode 120000 index 5ba8f9745a..0000000000 --- a/Lang/Uiua/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Associative-array-Merging b/Lang/Uiua/Associative-array-Merging deleted file mode 120000 index d769831c9b..0000000000 --- a/Lang/Uiua/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Attractive-numbers b/Lang/Uiua/Attractive-numbers deleted file mode 120000 index d36ccc01ec..0000000000 --- a/Lang/Uiua/Attractive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Attractive-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Averages-Arithmetic-mean b/Lang/Uiua/Averages-Arithmetic-mean deleted file mode 120000 index b50b3b064d..0000000000 --- a/Lang/Uiua/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Averages-Mean-time-of-day b/Lang/Uiua/Averages-Mean-time-of-day deleted file mode 120000 index 970582690e..0000000000 --- a/Lang/Uiua/Averages-Mean-time-of-day +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-time-of-day/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Averages-Median b/Lang/Uiua/Averages-Median deleted file mode 120000 index 254605ff30..0000000000 --- a/Lang/Uiua/Averages-Median +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Median/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Averages-Mode b/Lang/Uiua/Averages-Mode deleted file mode 120000 index 13987f5b7d..0000000000 --- a/Lang/Uiua/Averages-Mode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mode/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Averages-Pythagorean-means b/Lang/Uiua/Averages-Pythagorean-means deleted file mode 120000 index a42d46aee7..0000000000 --- a/Lang/Uiua/Averages-Pythagorean-means +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Pythagorean-means/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Averages-Root-mean-square b/Lang/Uiua/Averages-Root-mean-square deleted file mode 120000 index 681a323abf..0000000000 --- a/Lang/Uiua/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Babbage-problem b/Lang/Uiua/Babbage-problem deleted file mode 120000 index 485d090cb5..0000000000 --- a/Lang/Uiua/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Barnsley-fern b/Lang/Uiua/Barnsley-fern deleted file mode 120000 index 39f57d2d79..0000000000 --- a/Lang/Uiua/Barnsley-fern +++ /dev/null @@ -1 +0,0 @@ -../../Task/Barnsley-fern/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Bell-numbers b/Lang/Uiua/Bell-numbers deleted file mode 120000 index 88832c268c..0000000000 --- a/Lang/Uiua/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Benfords-law b/Lang/Uiua/Benfords-law deleted file mode 120000 index c9f7d29ef6..0000000000 --- a/Lang/Uiua/Benfords-law +++ /dev/null @@ -1 +0,0 @@ -../../Task/Benfords-law/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Bifid-cipher b/Lang/Uiua/Bifid-cipher deleted file mode 120000 index 7118fdadf7..0000000000 --- a/Lang/Uiua/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Bin-given-limits b/Lang/Uiua/Bin-given-limits deleted file mode 120000 index 66cb90c004..0000000000 --- a/Lang/Uiua/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Binary-digits b/Lang/Uiua/Binary-digits deleted file mode 120000 index 126c2d6665..0000000000 --- a/Lang/Uiua/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Bitmap b/Lang/Uiua/Bitmap deleted file mode 120000 index 6ff7a055f3..0000000000 --- a/Lang/Uiua/Bitmap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Bitmap-Flood-fill b/Lang/Uiua/Bitmap-Flood-fill deleted file mode 120000 index 8833733b75..0000000000 --- a/Lang/Uiua/Bitmap-Flood-fill +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap-Flood-fill/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Bitwise-operations b/Lang/Uiua/Bitwise-operations deleted file mode 120000 index 1b1bf97751..0000000000 --- a/Lang/Uiua/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Boolean-values b/Lang/Uiua/Boolean-values deleted file mode 120000 index ac8910eee9..0000000000 --- a/Lang/Uiua/Boolean-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boolean-values/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Bulls-and-cows-Player b/Lang/Uiua/Bulls-and-cows-Player deleted file mode 120000 index b45c91dd88..0000000000 --- a/Lang/Uiua/Bulls-and-cows-Player +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bulls-and-cows-Player/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Burrows-Wheeler-transform b/Lang/Uiua/Burrows-Wheeler-transform deleted file mode 120000 index d53398fc74..0000000000 --- a/Lang/Uiua/Burrows-Wheeler-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Burrows-Wheeler-transform/Uiua \ No newline at end of file diff --git a/Lang/Uiua/CRC-32 b/Lang/Uiua/CRC-32 deleted file mode 120000 index 063f3e4ee3..0000000000 --- a/Lang/Uiua/CRC-32 +++ /dev/null @@ -1 +0,0 @@ -../../Task/CRC-32/Uiua \ No newline at end of file diff --git a/Lang/Uiua/CSV-data-manipulation b/Lang/Uiua/CSV-data-manipulation deleted file mode 120000 index 78747e6f49..0000000000 --- a/Lang/Uiua/CSV-data-manipulation +++ /dev/null @@ -1 +0,0 @@ -../../Task/CSV-data-manipulation/Uiua \ No newline at end of file diff --git a/Lang/Uiua/CSV-to-HTML-translation b/Lang/Uiua/CSV-to-HTML-translation deleted file mode 120000 index cd311bcc18..0000000000 --- a/Lang/Uiua/CSV-to-HTML-translation +++ /dev/null @@ -1 +0,0 @@ -../../Task/CSV-to-HTML-translation/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Caesar-cipher b/Lang/Uiua/Caesar-cipher deleted file mode 120000 index ef50c0e2e1..0000000000 --- a/Lang/Uiua/Caesar-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Caesar-cipher/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Calculating-the-value-of-e b/Lang/Uiua/Calculating-the-value-of-e deleted file mode 120000 index d7cc261bf8..0000000000 --- a/Lang/Uiua/Calculating-the-value-of-e +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calculating-the-value-of-e/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Calkin-Wilf-sequence b/Lang/Uiua/Calkin-Wilf-sequence deleted file mode 120000 index 23330ada15..0000000000 --- a/Lang/Uiua/Calkin-Wilf-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Calkin-Wilf-sequence/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Call-a-function b/Lang/Uiua/Call-a-function deleted file mode 120000 index 1d6b22e4f5..0000000000 --- a/Lang/Uiua/Call-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Call-a-function/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Cantor-set b/Lang/Uiua/Cantor-set deleted file mode 120000 index 1c94d38d0e..0000000000 --- a/Lang/Uiua/Cantor-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cantor-set/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Cartesian-product-of-two-or-more-lists b/Lang/Uiua/Cartesian-product-of-two-or-more-lists deleted file mode 120000 index bff2250b36..0000000000 --- a/Lang/Uiua/Cartesian-product-of-two-or-more-lists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cartesian-product-of-two-or-more-lists/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Catalan-numbers b/Lang/Uiua/Catalan-numbers deleted file mode 120000 index 39a3cbd336..0000000000 --- a/Lang/Uiua/Catalan-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Catalan-numbers-Pascals-triangle b/Lang/Uiua/Catalan-numbers-Pascals-triangle deleted file mode 120000 index d4426dbc39..0000000000 --- a/Lang/Uiua/Catalan-numbers-Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catalan-numbers-Pascals-triangle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Catamorphism b/Lang/Uiua/Catamorphism deleted file mode 120000 index f0a8a02f45..0000000000 --- a/Lang/Uiua/Catamorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Catamorphism/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Character-codes b/Lang/Uiua/Character-codes deleted file mode 120000 index 511eef1d48..0000000000 --- a/Lang/Uiua/Character-codes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Character-codes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Check-output-device-is-a-terminal b/Lang/Uiua/Check-output-device-is-a-terminal deleted file mode 120000 index 9599dac818..0000000000 --- a/Lang/Uiua/Check-output-device-is-a-terminal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-output-device-is-a-terminal/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Check-that-file-exists b/Lang/Uiua/Check-that-file-exists deleted file mode 120000 index 2ad54c3db1..0000000000 --- a/Lang/Uiua/Check-that-file-exists +++ /dev/null @@ -1 +0,0 @@ -../../Task/Check-that-file-exists/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Circular-primes b/Lang/Uiua/Circular-primes deleted file mode 120000 index 65d19beab0..0000000000 --- a/Lang/Uiua/Circular-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Circular-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Cistercian-numerals b/Lang/Uiua/Cistercian-numerals deleted file mode 120000 index 7a072fe82a..0000000000 --- a/Lang/Uiua/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Collections b/Lang/Uiua/Collections deleted file mode 120000 index 3ea461802a..0000000000 --- a/Lang/Uiua/Collections +++ /dev/null @@ -1 +0,0 @@ -../../Task/Collections/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Color-wheel b/Lang/Uiua/Color-wheel deleted file mode 120000 index f9a74260bf..0000000000 --- a/Lang/Uiua/Color-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-wheel/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Colorful-numbers b/Lang/Uiua/Colorful-numbers deleted file mode 120000 index b2f820f214..0000000000 --- a/Lang/Uiua/Colorful-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colorful-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Colour-bars-Display b/Lang/Uiua/Colour-bars-Display deleted file mode 120000 index dbff1dc862..0000000000 --- a/Lang/Uiua/Colour-bars-Display +++ /dev/null @@ -1 +0,0 @@ -../../Task/Colour-bars-Display/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Combinations b/Lang/Uiua/Combinations deleted file mode 120000 index 1300366dbb..0000000000 --- a/Lang/Uiua/Combinations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Combinations-and-permutations b/Lang/Uiua/Combinations-and-permutations deleted file mode 120000 index c2af258e0d..0000000000 --- a/Lang/Uiua/Combinations-and-permutations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Combinations-and-permutations/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Command-line-arguments b/Lang/Uiua/Command-line-arguments deleted file mode 120000 index d8dd4a464b..0000000000 --- a/Lang/Uiua/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Comments b/Lang/Uiua/Comments deleted file mode 120000 index c903ca1910..0000000000 --- a/Lang/Uiua/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Compare-a-list-of-strings b/Lang/Uiua/Compare-a-list-of-strings deleted file mode 120000 index 7a7f8f4123..0000000000 --- a/Lang/Uiua/Compare-a-list-of-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-a-list-of-strings/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Compare-length-of-two-strings b/Lang/Uiua/Compare-length-of-two-strings deleted file mode 120000 index ca614fc73a..0000000000 --- a/Lang/Uiua/Compare-length-of-two-strings +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-length-of-two-strings/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Continued-fraction b/Lang/Uiua/Continued-fraction deleted file mode 120000 index e2c428ddc0..0000000000 --- a/Lang/Uiua/Continued-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Continued-fraction/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Convert-seconds-to-compound-duration b/Lang/Uiua/Convert-seconds-to-compound-duration deleted file mode 120000 index 7c892696f2..0000000000 --- a/Lang/Uiua/Convert-seconds-to-compound-duration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-seconds-to-compound-duration/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Conways-Game-of-Life b/Lang/Uiua/Conways-Game-of-Life deleted file mode 120000 index 577dcf20b1..0000000000 --- a/Lang/Uiua/Conways-Game-of-Life +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conways-Game-of-Life/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Copy-a-string b/Lang/Uiua/Copy-a-string deleted file mode 120000 index ecc8029f9f..0000000000 --- a/Lang/Uiua/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Count-in-factors b/Lang/Uiua/Count-in-factors deleted file mode 120000 index fee553f727..0000000000 --- a/Lang/Uiua/Count-in-factors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-factors/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Count-in-octal b/Lang/Uiua/Count-in-octal deleted file mode 120000 index 8d3356f54e..0000000000 --- a/Lang/Uiua/Count-in-octal +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-in-octal/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Count-occurrences-of-a-substring b/Lang/Uiua/Count-occurrences-of-a-substring deleted file mode 120000 index 5aa05050f1..0000000000 --- a/Lang/Uiua/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Count-the-coins b/Lang/Uiua/Count-the-coins deleted file mode 120000 index 061cac0c44..0000000000 --- a/Lang/Uiua/Count-the-coins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-the-coins/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Cramers-rule b/Lang/Uiua/Cramers-rule deleted file mode 120000 index cdb9c1d147..0000000000 --- a/Lang/Uiua/Cramers-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cramers-rule/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Create-a-two-dimensional-array-at-runtime b/Lang/Uiua/Create-a-two-dimensional-array-at-runtime deleted file mode 120000 index 4ef285f54f..0000000000 --- a/Lang/Uiua/Create-a-two-dimensional-array-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-a-two-dimensional-array-at-runtime/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Cuban-primes b/Lang/Uiua/Cuban-primes deleted file mode 120000 index 36dfb34863..0000000000 --- a/Lang/Uiua/Cuban-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cuban-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Cut-a-rectangle b/Lang/Uiua/Cut-a-rectangle deleted file mode 120000 index c91aef1334..0000000000 --- a/Lang/Uiua/Cut-a-rectangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cut-a-rectangle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Damm-algorithm b/Lang/Uiua/Damm-algorithm deleted file mode 120000 index af8244172d..0000000000 --- a/Lang/Uiua/Damm-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Damm-algorithm/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Day-of-the-week b/Lang/Uiua/Day-of-the-week deleted file mode 120000 index 3e8980f9e6..0000000000 --- a/Lang/Uiua/Day-of-the-week +++ /dev/null @@ -1 +0,0 @@ -../../Task/Day-of-the-week/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Delete-a-file b/Lang/Uiua/Delete-a-file deleted file mode 120000 index a33b49cc5b..0000000000 --- a/Lang/Uiua/Delete-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Delete-a-file/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Department-numbers b/Lang/Uiua/Department-numbers deleted file mode 120000 index d3bc5b010c..0000000000 --- a/Lang/Uiua/Department-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Department-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Descending-primes b/Lang/Uiua/Descending-primes deleted file mode 120000 index 9ae82c1998..0000000000 --- a/Lang/Uiua/Descending-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Descending-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Detect-division-by-zero b/Lang/Uiua/Detect-division-by-zero deleted file mode 120000 index 40e2698013..0000000000 --- a/Lang/Uiua/Detect-division-by-zero +++ /dev/null @@ -1 +0,0 @@ -../../Task/Detect-division-by-zero/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Determine-if-a-string-has-all-the-same-characters b/Lang/Uiua/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index 55e1bace7e..0000000000 --- a/Lang/Uiua/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Determine-if-a-string-has-all-unique-characters b/Lang/Uiua/Determine-if-a-string-has-all-unique-characters deleted file mode 120000 index 76105a59e1..0000000000 --- a/Lang/Uiua/Determine-if-a-string-has-all-unique-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-unique-characters/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Determine-if-a-string-is-collapsible b/Lang/Uiua/Determine-if-a-string-is-collapsible deleted file mode 120000 index 9891000cca..0000000000 --- a/Lang/Uiua/Determine-if-a-string-is-collapsible +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-collapsible/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Determine-if-a-string-is-numeric b/Lang/Uiua/Determine-if-a-string-is-numeric deleted file mode 120000 index 12d7b2bbd9..0000000000 --- a/Lang/Uiua/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Digital-root b/Lang/Uiua/Digital-root deleted file mode 120000 index 709355d0c9..0000000000 --- a/Lang/Uiua/Digital-root +++ /dev/null @@ -1 +0,0 @@ -../../Task/Digital-root/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Dijkstras-algorithm b/Lang/Uiua/Dijkstras-algorithm deleted file mode 120000 index f3d03f9e62..0000000000 --- a/Lang/Uiua/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Disarium-numbers b/Lang/Uiua/Disarium-numbers deleted file mode 120000 index 28107527a2..0000000000 --- a/Lang/Uiua/Disarium-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Disarium-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Dominoes b/Lang/Uiua/Dominoes deleted file mode 120000 index bd5d6f0291..0000000000 --- a/Lang/Uiua/Dominoes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dominoes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Doomsday-rule b/Lang/Uiua/Doomsday-rule deleted file mode 120000 index d408a1ec32..0000000000 --- a/Lang/Uiua/Doomsday-rule +++ /dev/null @@ -1 +0,0 @@ -../../Task/Doomsday-rule/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Dot-product b/Lang/Uiua/Dot-product deleted file mode 120000 index 920d49c003..0000000000 --- a/Lang/Uiua/Dot-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dot-product/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Dutch-national-flag-problem b/Lang/Uiua/Dutch-national-flag-problem deleted file mode 120000 index 198949a01a..0000000000 --- a/Lang/Uiua/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Earliest-difference-between-prime-gaps b/Lang/Uiua/Earliest-difference-between-prime-gaps deleted file mode 120000 index 3fd8b6678f..0000000000 --- a/Lang/Uiua/Earliest-difference-between-prime-gaps +++ /dev/null @@ -1 +0,0 @@ -../../Task/Earliest-difference-between-prime-gaps/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Echo-server b/Lang/Uiua/Echo-server deleted file mode 120000 index 13818666c0..0000000000 --- a/Lang/Uiua/Echo-server +++ /dev/null @@ -1 +0,0 @@ -../../Task/Echo-server/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Emirp-primes b/Lang/Uiua/Emirp-primes deleted file mode 120000 index 277723b92d..0000000000 --- a/Lang/Uiua/Emirp-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Emirp-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Empty-string b/Lang/Uiua/Empty-string deleted file mode 120000 index 9b9da2a9b4..0000000000 --- a/Lang/Uiua/Empty-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Empty-string/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Enforced-immutability b/Lang/Uiua/Enforced-immutability deleted file mode 120000 index 243ebb8f2a..0000000000 --- a/Lang/Uiua/Enforced-immutability +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enforced-immutability/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Enumerations b/Lang/Uiua/Enumerations deleted file mode 120000 index 08a4a901fa..0000000000 --- a/Lang/Uiua/Enumerations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enumerations/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Ethiopian-multiplication b/Lang/Uiua/Ethiopian-multiplication deleted file mode 120000 index 4091de8f8e..0000000000 --- a/Lang/Uiua/Ethiopian-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ethiopian-multiplication/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Exceptions b/Lang/Uiua/Exceptions deleted file mode 120000 index 4cf4e7dfeb..0000000000 --- a/Lang/Uiua/Exceptions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exceptions/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Exponentiation-operator b/Lang/Uiua/Exponentiation-operator deleted file mode 120000 index bf3e3a41e0..0000000000 --- a/Lang/Uiua/Exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-operator/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Exponentiation-order b/Lang/Uiua/Exponentiation-order deleted file mode 120000 index 8518c14141..0000000000 --- a/Lang/Uiua/Exponentiation-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-order/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Extreme-floating-point-values b/Lang/Uiua/Extreme-floating-point-values deleted file mode 120000 index 05ab571554..0000000000 --- a/Lang/Uiua/Extreme-floating-point-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Extreme-floating-point-values/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Factorial b/Lang/Uiua/Factorial deleted file mode 120000 index 5664c30904..0000000000 --- a/Lang/Uiua/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Factors-of-an-integer b/Lang/Uiua/Factors-of-an-integer deleted file mode 120000 index c83bd4a95a..0000000000 --- a/Lang/Uiua/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Find-the-missing-permutation b/Lang/Uiua/Find-the-missing-permutation deleted file mode 120000 index e1361833f3..0000000000 --- a/Lang/Uiua/Find-the-missing-permutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-missing-permutation/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Flatten-a-list b/Lang/Uiua/Flatten-a-list deleted file mode 120000 index 8d22eb4f6e..0000000000 --- a/Lang/Uiua/Flatten-a-list +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flatten-a-list/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Flipping-bits-game b/Lang/Uiua/Flipping-bits-game deleted file mode 120000 index 4647df0617..0000000000 --- a/Lang/Uiua/Flipping-bits-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flipping-bits-game/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Forest-fire b/Lang/Uiua/Forest-fire deleted file mode 120000 index 1c1ded9f8f..0000000000 --- a/Lang/Uiua/Forest-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Forest-fire/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Greatest-common-divisor b/Lang/Uiua/Greatest-common-divisor deleted file mode 120000 index ed42b8017f..0000000000 --- a/Lang/Uiua/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Hailstone-sequence b/Lang/Uiua/Hailstone-sequence deleted file mode 120000 index eb6ae1ccd8..0000000000 --- a/Lang/Uiua/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Halt-and-catch-fire b/Lang/Uiua/Halt-and-catch-fire deleted file mode 120000 index 098009e021..0000000000 --- a/Lang/Uiua/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Hash-from-two-arrays b/Lang/Uiua/Hash-from-two-arrays deleted file mode 120000 index 63b4a8d5f8..0000000000 --- a/Lang/Uiua/Hash-from-two-arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-from-two-arrays/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Hickerson-series-of-almost-integers b/Lang/Uiua/Hickerson-series-of-almost-integers deleted file mode 120000 index d1dde8e508..0000000000 --- a/Lang/Uiua/Hickerson-series-of-almost-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hickerson-series-of-almost-integers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Identity-matrix b/Lang/Uiua/Identity-matrix deleted file mode 120000 index 73bc76c89c..0000000000 --- a/Lang/Uiua/Identity-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Identity-matrix/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Include-a-file b/Lang/Uiua/Include-a-file deleted file mode 120000 index 2dd83554d2..0000000000 --- a/Lang/Uiua/Include-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Include-a-file/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Increment-a-numerical-string b/Lang/Uiua/Increment-a-numerical-string deleted file mode 120000 index 5102531751..0000000000 --- a/Lang/Uiua/Increment-a-numerical-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Increment-a-numerical-string/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Infinity b/Lang/Uiua/Infinity deleted file mode 120000 index 13e94dd0ff..0000000000 --- a/Lang/Uiua/Infinity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Infinity/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Integer-sequence b/Lang/Uiua/Integer-sequence deleted file mode 120000 index 71a2ec5539..0000000000 --- a/Lang/Uiua/Integer-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-sequence/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Iterated-digits-squaring b/Lang/Uiua/Iterated-digits-squaring deleted file mode 120000 index e658bdae0a..0000000000 --- a/Lang/Uiua/Iterated-digits-squaring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Iterated-digits-squaring/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Jacobi-symbol b/Lang/Uiua/Jacobi-symbol deleted file mode 120000 index c75e72b791..0000000000 --- a/Lang/Uiua/Jacobi-symbol +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobi-symbol/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Jacobsthal-numbers b/Lang/Uiua/Jacobsthal-numbers deleted file mode 120000 index 18c3697b6e..0000000000 --- a/Lang/Uiua/Jacobsthal-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jacobsthal-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Langtons-ant b/Lang/Uiua/Langtons-ant deleted file mode 120000 index ea25fbedff..0000000000 --- a/Lang/Uiua/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Largest-int-from-concatenated-ints b/Lang/Uiua/Largest-int-from-concatenated-ints deleted file mode 120000 index 1440573f32..0000000000 --- a/Lang/Uiua/Largest-int-from-concatenated-ints +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-int-from-concatenated-ints/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Largest-number-divisible-by-its-digits b/Lang/Uiua/Largest-number-divisible-by-its-digits deleted file mode 120000 index acf7bb2c5f..0000000000 --- a/Lang/Uiua/Largest-number-divisible-by-its-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-number-divisible-by-its-digits/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Leap-year b/Lang/Uiua/Leap-year deleted file mode 120000 index 526002b745..0000000000 --- a/Lang/Uiua/Leap-year +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leap-year/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Least-common-multiple b/Lang/Uiua/Least-common-multiple deleted file mode 120000 index 83973eef06..0000000000 --- a/Lang/Uiua/Least-common-multiple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Least-common-multiple/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Levenshtein-distance b/Lang/Uiua/Levenshtein-distance deleted file mode 120000 index 2d4dd26520..0000000000 --- a/Lang/Uiua/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Uiua \ No newline at end of file diff --git a/Lang/Uiua/List-comprehensions b/Lang/Uiua/List-comprehensions deleted file mode 120000 index bf7b708e56..0000000000 --- a/Lang/Uiua/List-comprehensions +++ /dev/null @@ -1 +0,0 @@ -../../Task/List-comprehensions/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Literals-Floating-point b/Lang/Uiua/Literals-Floating-point deleted file mode 120000 index 47d46d3181..0000000000 --- a/Lang/Uiua/Literals-Floating-point +++ /dev/null @@ -1 +0,0 @@ -../../Task/Literals-Floating-point/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Look-and-say-sequence b/Lang/Uiua/Look-and-say-sequence deleted file mode 120000 index f3d748e2f9..0000000000 --- a/Lang/Uiua/Look-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Look-and-say-sequence/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Loop-over-multiple-arrays-simultaneously b/Lang/Uiua/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index 59937c5207..0000000000 --- a/Lang/Uiua/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Loops-Break b/Lang/Uiua/Loops-Break deleted file mode 120000 index 34504412c0..0000000000 --- a/Lang/Uiua/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Loops-While b/Lang/Uiua/Loops-While deleted file mode 120000 index d29e38976b..0000000000 --- a/Lang/Uiua/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Luhn-test-of-credit-card-numbers b/Lang/Uiua/Luhn-test-of-credit-card-numbers deleted file mode 120000 index 6eae093c92..0000000000 --- a/Lang/Uiua/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/M-bius-function b/Lang/Uiua/M-bius-function deleted file mode 120000 index 5b29f0bb61..0000000000 --- a/Lang/Uiua/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Mandelbrot-set b/Lang/Uiua/Mandelbrot-set deleted file mode 120000 index da1b6d50fa..0000000000 --- a/Lang/Uiua/Mandelbrot-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mandelbrot-set/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Matrix-multiplication b/Lang/Uiua/Matrix-multiplication deleted file mode 120000 index 8ecd583efc..0000000000 --- a/Lang/Uiua/Matrix-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-multiplication/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Matrix-transposition b/Lang/Uiua/Matrix-transposition deleted file mode 120000 index 877ca2d6ea..0000000000 --- a/Lang/Uiua/Matrix-transposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-transposition/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Maze-solving b/Lang/Uiua/Maze-solving deleted file mode 120000 index 02af57731f..0000000000 --- a/Lang/Uiua/Maze-solving +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maze-solving/Uiua \ No newline at end of file diff --git a/Lang/Uiua/McNuggets-problem b/Lang/Uiua/McNuggets-problem deleted file mode 120000 index 93b54a1053..0000000000 --- a/Lang/Uiua/McNuggets-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/McNuggets-problem/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Mertens-function b/Lang/Uiua/Mertens-function deleted file mode 120000 index 8c5970d27b..0000000000 --- a/Lang/Uiua/Mertens-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mertens-function/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Middle-three-digits b/Lang/Uiua/Middle-three-digits deleted file mode 120000 index 5c8f171c17..0000000000 --- a/Lang/Uiua/Middle-three-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Middle-three-digits/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Modular-inverse b/Lang/Uiua/Modular-inverse deleted file mode 120000 index 70c091b2ce..0000000000 --- a/Lang/Uiua/Modular-inverse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-inverse/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Motzkin-numbers b/Lang/Uiua/Motzkin-numbers deleted file mode 120000 index bef04d5aa9..0000000000 --- a/Lang/Uiua/Motzkin-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Motzkin-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Multifactorial b/Lang/Uiua/Multifactorial deleted file mode 120000 index cd3719d315..0000000000 --- a/Lang/Uiua/Multifactorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multifactorial/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Munchausen-numbers b/Lang/Uiua/Munchausen-numbers deleted file mode 120000 index 2170e259d6..0000000000 --- a/Lang/Uiua/Munchausen-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munchausen-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Munching-squares b/Lang/Uiua/Munching-squares deleted file mode 120000 index 65b5e765bd..0000000000 --- a/Lang/Uiua/Munching-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munching-squares/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Musical-scale b/Lang/Uiua/Musical-scale deleted file mode 120000 index 1f1e1695ce..0000000000 --- a/Lang/Uiua/Musical-scale +++ /dev/null @@ -1 +0,0 @@ -../../Task/Musical-scale/Uiua \ No newline at end of file diff --git a/Lang/Uiua/N-queens-problem b/Lang/Uiua/N-queens-problem deleted file mode 120000 index d8b56e5e2a..0000000000 --- a/Lang/Uiua/N-queens-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/N-queens-problem/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Narcissistic-decimal-number b/Lang/Uiua/Narcissistic-decimal-number deleted file mode 120000 index fa8d4f2d6a..0000000000 --- a/Lang/Uiua/Narcissistic-decimal-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Narcissistic-decimal-number/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Next-highest-int-from-digits b/Lang/Uiua/Next-highest-int-from-digits deleted file mode 120000 index c924583411..0000000000 --- a/Lang/Uiua/Next-highest-int-from-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Next-highest-int-from-digits/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Non-continuous-subsequences b/Lang/Uiua/Non-continuous-subsequences deleted file mode 120000 index cbb45eef3a..0000000000 --- a/Lang/Uiua/Non-continuous-subsequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-continuous-subsequences/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Non-decimal-radices-Input b/Lang/Uiua/Non-decimal-radices-Input deleted file mode 120000 index 4980368463..0000000000 --- a/Lang/Uiua/Non-decimal-radices-Input +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-decimal-radices-Input/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Non-decimal-radices-Output b/Lang/Uiua/Non-decimal-radices-Output deleted file mode 120000 index 8d901b62f2..0000000000 --- a/Lang/Uiua/Non-decimal-radices-Output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Non-decimal-radices-Output/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Numbers-which-are-not-the-sum-of-distinct-squares b/Lang/Uiua/Numbers-which-are-not-the-sum-of-distinct-squares deleted file mode 120000 index fd1772b308..0000000000 --- a/Lang/Uiua/Numbers-which-are-not-the-sum-of-distinct-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numbers-which-are-not-the-sum-of-distinct-squares/Uiua \ No newline at end of file diff --git a/Lang/Uiua/One-dimensional-cellular-automata b/Lang/Uiua/One-dimensional-cellular-automata deleted file mode 120000 index 5df7e9b84a..0000000000 --- a/Lang/Uiua/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Ordered-words b/Lang/Uiua/Ordered-words deleted file mode 120000 index 7046edd964..0000000000 --- a/Lang/Uiua/Ordered-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ordered-words/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Padovan-sequence b/Lang/Uiua/Padovan-sequence deleted file mode 120000 index 5ff77d41cb..0000000000 --- a/Lang/Uiua/Padovan-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Padovan-sequence/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Pangram-checker b/Lang/Uiua/Pangram-checker deleted file mode 120000 index f48b39bf42..0000000000 --- a/Lang/Uiua/Pangram-checker +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pangram-checker/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Parsing-RPN-calculator-algorithm b/Lang/Uiua/Parsing-RPN-calculator-algorithm deleted file mode 120000 index 650f272e3c..0000000000 --- a/Lang/Uiua/Parsing-RPN-calculator-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-calculator-algorithm/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Particle-fountain b/Lang/Uiua/Particle-fountain deleted file mode 120000 index 5a4eedea1a..0000000000 --- a/Lang/Uiua/Particle-fountain +++ /dev/null @@ -1 +0,0 @@ -../../Task/Particle-fountain/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Partition-an-integer-x-into-n-primes b/Lang/Uiua/Partition-an-integer-x-into-n-primes deleted file mode 120000 index b54ce3d232..0000000000 --- a/Lang/Uiua/Partition-an-integer-x-into-n-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-an-integer-x-into-n-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Partition-function-P b/Lang/Uiua/Partition-function-P deleted file mode 120000 index e15b2a3f0a..0000000000 --- a/Lang/Uiua/Partition-function-P +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partition-function-P/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Pascal-matrix-generation b/Lang/Uiua/Pascal-matrix-generation deleted file mode 120000 index d6006d5f28..0000000000 --- a/Lang/Uiua/Pascal-matrix-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascal-matrix-generation/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Pascals-triangle b/Lang/Uiua/Pascals-triangle deleted file mode 120000 index d3ded33bae..0000000000 --- a/Lang/Uiua/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Pascals-triangle-Puzzle b/Lang/Uiua/Pascals-triangle-Puzzle deleted file mode 120000 index 9d1c439151..0000000000 --- a/Lang/Uiua/Pascals-triangle-Puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle-Puzzle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Password-generator b/Lang/Uiua/Password-generator deleted file mode 120000 index 0a559819ad..0000000000 --- a/Lang/Uiua/Password-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Password-generator/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Peaceful-chess-queen-armies b/Lang/Uiua/Peaceful-chess-queen-armies deleted file mode 120000 index e3e9bf7f31..0000000000 --- a/Lang/Uiua/Peaceful-chess-queen-armies +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peaceful-chess-queen-armies/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Perfect-numbers b/Lang/Uiua/Perfect-numbers deleted file mode 120000 index 45883a0ea8..0000000000 --- a/Lang/Uiua/Perfect-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Perfect-shuffle b/Lang/Uiua/Perfect-shuffle deleted file mode 120000 index 85b9185041..0000000000 --- a/Lang/Uiua/Perfect-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-shuffle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Perfect-totient-numbers b/Lang/Uiua/Perfect-totient-numbers deleted file mode 120000 index 473a593e75..0000000000 --- a/Lang/Uiua/Perfect-totient-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Perfect-totient-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Periodic-table b/Lang/Uiua/Periodic-table deleted file mode 120000 index 5e6b72eb1b..0000000000 --- a/Lang/Uiua/Periodic-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Periodic-table/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Peripheral-drift-illusion b/Lang/Uiua/Peripheral-drift-illusion deleted file mode 120000 index 6946c8b8f1..0000000000 --- a/Lang/Uiua/Peripheral-drift-illusion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peripheral-drift-illusion/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Permutations b/Lang/Uiua/Permutations deleted file mode 120000 index 850f4f7144..0000000000 --- a/Lang/Uiua/Permutations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Pernicious-numbers b/Lang/Uiua/Pernicious-numbers deleted file mode 120000 index bcc3ebf322..0000000000 --- a/Lang/Uiua/Pernicious-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pernicious-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Phrase-reversals b/Lang/Uiua/Phrase-reversals deleted file mode 120000 index 4584c0fe62..0000000000 --- a/Lang/Uiua/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Pick-random-element b/Lang/Uiua/Pick-random-element deleted file mode 120000 index e85c1a21e1..0000000000 --- a/Lang/Uiua/Pick-random-element +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pick-random-element/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Pisano-period b/Lang/Uiua/Pisano-period deleted file mode 120000 index 2e3ec789ad..0000000000 --- a/Lang/Uiua/Pisano-period +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pisano-period/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Plasma-effect b/Lang/Uiua/Plasma-effect deleted file mode 120000 index ca73067f67..0000000000 --- a/Lang/Uiua/Plasma-effect +++ /dev/null @@ -1 +0,0 @@ -../../Task/Plasma-effect/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Population-count b/Lang/Uiua/Population-count deleted file mode 120000 index 601ac5e44a..0000000000 --- a/Lang/Uiua/Population-count +++ /dev/null @@ -1 +0,0 @@ -../../Task/Population-count/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Power-set b/Lang/Uiua/Power-set deleted file mode 120000 index 21a40d792f..0000000000 --- a/Lang/Uiua/Power-set +++ /dev/null @@ -1 +0,0 @@ -../../Task/Power-set/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Primality-by-Wilsons-theorem b/Lang/Uiua/Primality-by-Wilsons-theorem deleted file mode 120000 index 8e83e31c35..0000000000 --- a/Lang/Uiua/Primality-by-Wilsons-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primality-by-Wilsons-theorem/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Prime-conspiracy b/Lang/Uiua/Prime-conspiracy deleted file mode 120000 index d1cad5b5e0..0000000000 --- a/Lang/Uiua/Prime-conspiracy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-conspiracy/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Prime-decomposition b/Lang/Uiua/Prime-decomposition deleted file mode 120000 index bdff89da46..0000000000 --- a/Lang/Uiua/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Prime-numbers-whose-neighboring-pairs-are-tetraprimes b/Lang/Uiua/Prime-numbers-whose-neighboring-pairs-are-tetraprimes deleted file mode 120000 index fead595d8f..0000000000 --- a/Lang/Uiua/Prime-numbers-whose-neighboring-pairs-are-tetraprimes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-numbers-whose-neighboring-pairs-are-tetraprimes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Prime-triangle b/Lang/Uiua/Prime-triangle deleted file mode 120000 index 59527b37eb..0000000000 --- a/Lang/Uiua/Prime-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-triangle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Program-termination b/Lang/Uiua/Program-termination deleted file mode 120000 index 58f6f7fb66..0000000000 --- a/Lang/Uiua/Program-termination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-termination/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Proper-divisors b/Lang/Uiua/Proper-divisors deleted file mode 120000 index 94a040a034..0000000000 --- a/Lang/Uiua/Proper-divisors +++ /dev/null @@ -1 +0,0 @@ -../../Task/Proper-divisors/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Quoting-constructs b/Lang/Uiua/Quoting-constructs deleted file mode 120000 index 0a39b9c1b8..0000000000 --- a/Lang/Uiua/Quoting-constructs +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quoting-constructs/Uiua \ No newline at end of file diff --git a/Lang/Uiua/RPG-attributes-generator b/Lang/Uiua/RPG-attributes-generator deleted file mode 120000 index 96e8262b6d..0000000000 --- a/Lang/Uiua/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Radical-of-an-integer b/Lang/Uiua/Radical-of-an-integer deleted file mode 120000 index dd623262df..0000000000 --- a/Lang/Uiua/Radical-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Radical-of-an-integer/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Random-Latin-squares b/Lang/Uiua/Random-Latin-squares deleted file mode 120000 index 1244042116..0000000000 --- a/Lang/Uiua/Random-Latin-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-Latin-squares/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Random-numbers b/Lang/Uiua/Random-numbers deleted file mode 120000 index bc115ba91a..0000000000 --- a/Lang/Uiua/Random-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Real-constants-and-functions b/Lang/Uiua/Real-constants-and-functions deleted file mode 120000 index fb71bc51b7..0000000000 --- a/Lang/Uiua/Real-constants-and-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Real-constants-and-functions/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Recamans-sequence b/Lang/Uiua/Recamans-sequence deleted file mode 120000 index fdc4665a6a..0000000000 --- a/Lang/Uiua/Recamans-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Recamans-sequence/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Repeat b/Lang/Uiua/Repeat deleted file mode 120000 index e75d6dc3ae..0000000000 --- a/Lang/Uiua/Repeat +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repeat/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Reverse-words-in-a-string b/Lang/Uiua/Reverse-words-in-a-string deleted file mode 120000 index a6f43bc773..0000000000 --- a/Lang/Uiua/Reverse-words-in-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Reverse-words-in-a-string/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Rosetta-Code-Rank-languages-by-popularity b/Lang/Uiua/Rosetta-Code-Rank-languages-by-popularity deleted file mode 120000 index 582776a4d1..0000000000 --- a/Lang/Uiua/Rosetta-Code-Rank-languages-by-popularity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rosetta-Code-Rank-languages-by-popularity/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Run-length-encoding b/Lang/Uiua/Run-length-encoding deleted file mode 120000 index b6eee5ca86..0000000000 --- a/Lang/Uiua/Run-length-encoding +++ /dev/null @@ -1 +0,0 @@ -../../Task/Run-length-encoding/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Ruth-Aaron-numbers b/Lang/Uiua/Ruth-Aaron-numbers deleted file mode 120000 index bbf8bc039a..0000000000 --- a/Lang/Uiua/Ruth-Aaron-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ruth-Aaron-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Self-describing-numbers b/Lang/Uiua/Self-describing-numbers deleted file mode 120000 index 158e71854a..0000000000 --- a/Lang/Uiua/Self-describing-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Self-describing-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Sequence-of-primes-by-trial-division b/Lang/Uiua/Sequence-of-primes-by-trial-division deleted file mode 120000 index d94d81ea51..0000000000 --- a/Lang/Uiua/Sequence-of-primes-by-trial-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sequence-of-primes-by-trial-division/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Set-puzzle b/Lang/Uiua/Set-puzzle deleted file mode 120000 index 3e3bc1d78f..0000000000 --- a/Lang/Uiua/Set-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-puzzle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Set-right-adjacent-bits b/Lang/Uiua/Set-right-adjacent-bits deleted file mode 120000 index 902c125b59..0000000000 --- a/Lang/Uiua/Set-right-adjacent-bits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Set-right-adjacent-bits/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Sexy-primes b/Lang/Uiua/Sexy-primes deleted file mode 120000 index 8d61a811ee..0000000000 --- a/Lang/Uiua/Sexy-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sexy-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Shoelace-formula-for-polygonal-area b/Lang/Uiua/Shoelace-formula-for-polygonal-area deleted file mode 120000 index d0a37fe60f..0000000000 --- a/Lang/Uiua/Shoelace-formula-for-polygonal-area +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shoelace-formula-for-polygonal-area/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Smith-numbers b/Lang/Uiua/Smith-numbers deleted file mode 120000 index 3e4afb53bf..0000000000 --- a/Lang/Uiua/Smith-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Smith-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Solve-a-Hidato-puzzle b/Lang/Uiua/Solve-a-Hidato-puzzle deleted file mode 120000 index 961a795fe0..0000000000 --- a/Lang/Uiua/Solve-a-Hidato-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Hidato-puzzle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Solve-a-Numbrix-puzzle b/Lang/Uiua/Solve-a-Numbrix-puzzle deleted file mode 120000 index d5e755e9d5..0000000000 --- a/Lang/Uiua/Solve-a-Numbrix-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Numbrix-puzzle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Sort-disjoint-sublist b/Lang/Uiua/Sort-disjoint-sublist deleted file mode 120000 index 247b8fbb37..0000000000 --- a/Lang/Uiua/Sort-disjoint-sublist +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-disjoint-sublist/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Spiral-matrix b/Lang/Uiua/Spiral-matrix deleted file mode 120000 index 58fe68a534..0000000000 --- a/Lang/Uiua/Spiral-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spiral-matrix/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Split-a-character-string-based-on-change-of-character b/Lang/Uiua/Split-a-character-string-based-on-change-of-character deleted file mode 120000 index 61d4dd8555..0000000000 --- a/Lang/Uiua/Split-a-character-string-based-on-change-of-character +++ /dev/null @@ -1 +0,0 @@ -../../Task/Split-a-character-string-based-on-change-of-character/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Square-free-integers b/Lang/Uiua/Square-free-integers deleted file mode 120000 index 7a649e9779..0000000000 --- a/Lang/Uiua/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Stem-and-leaf-plot b/Lang/Uiua/Stem-and-leaf-plot deleted file mode 120000 index cfafe7201a..0000000000 --- a/Lang/Uiua/Stem-and-leaf-plot +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stem-and-leaf-plot/Uiua \ No newline at end of file diff --git a/Lang/Uiua/String-case b/Lang/Uiua/String-case deleted file mode 120000 index 4362c13413..0000000000 --- a/Lang/Uiua/String-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-case/Uiua \ No newline at end of file diff --git a/Lang/Uiua/String-concatenation b/Lang/Uiua/String-concatenation deleted file mode 120000 index cd5c2325bd..0000000000 --- a/Lang/Uiua/String-concatenation +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-concatenation/Uiua \ No newline at end of file diff --git a/Lang/Uiua/String-interpolation-included- b/Lang/Uiua/String-interpolation-included- deleted file mode 120000 index e880f170b4..0000000000 --- a/Lang/Uiua/String-interpolation-included- +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-interpolation-included-/Uiua \ No newline at end of file diff --git a/Lang/Uiua/String-matching b/Lang/Uiua/String-matching deleted file mode 120000 index d45ce27782..0000000000 --- a/Lang/Uiua/String-matching +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-matching/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Strip-a-set-of-characters-from-a-string b/Lang/Uiua/Strip-a-set-of-characters-from-a-string deleted file mode 120000 index 951d176969..0000000000 --- a/Lang/Uiua/Strip-a-set-of-characters-from-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-a-set-of-characters-from-a-string/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Sudan-function b/Lang/Uiua/Sudan-function deleted file mode 120000 index afedd391cb..0000000000 --- a/Lang/Uiua/Sudan-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudan-function/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Sudoku b/Lang/Uiua/Sudoku deleted file mode 120000 index be7e18a94a..0000000000 --- a/Lang/Uiua/Sudoku +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudoku/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Sum-multiples-of-3-and-5 b/Lang/Uiua/Sum-multiples-of-3-and-5 deleted file mode 120000 index 1949126562..0000000000 --- a/Lang/Uiua/Sum-multiples-of-3-and-5 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-multiples-of-3-and-5/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Sum-of-elements-below-main-diagonal-of-matrix b/Lang/Uiua/Sum-of-elements-below-main-diagonal-of-matrix deleted file mode 120000 index 37e45429c6..0000000000 --- a/Lang/Uiua/Sum-of-elements-below-main-diagonal-of-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-elements-below-main-diagonal-of-matrix/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Summarize-primes b/Lang/Uiua/Summarize-primes deleted file mode 120000 index 4ad940883d..0000000000 --- a/Lang/Uiua/Summarize-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Sylvesters-sequence b/Lang/Uiua/Sylvesters-sequence deleted file mode 120000 index 859c7ca10b..0000000000 --- a/Lang/Uiua/Sylvesters-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sylvesters-sequence/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Tau-function b/Lang/Uiua/Tau-function deleted file mode 120000 index 314431f8dd..0000000000 --- a/Lang/Uiua/Tau-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tau-function/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Test-a-function b/Lang/Uiua/Test-a-function deleted file mode 120000 index 4e61b05504..0000000000 --- a/Lang/Uiua/Test-a-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Test-a-function/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Tic-tac-toe b/Lang/Uiua/Tic-tac-toe deleted file mode 120000 index fc3b26168b..0000000000 --- a/Lang/Uiua/Tic-tac-toe +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tic-tac-toe/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Totient-function b/Lang/Uiua/Totient-function deleted file mode 120000 index 838bb52e2f..0000000000 --- a/Lang/Uiua/Totient-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Totient-function/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Trigonometric-functions b/Lang/Uiua/Trigonometric-functions deleted file mode 120000 index 07a1fc051e..0000000000 --- a/Lang/Uiua/Trigonometric-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Trigonometric-functions/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Truncatable-primes b/Lang/Uiua/Truncatable-primes deleted file mode 120000 index b02bf04462..0000000000 --- a/Lang/Uiua/Truncatable-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Truncatable-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Unprimeable-numbers b/Lang/Uiua/Unprimeable-numbers deleted file mode 120000 index 5a99955431..0000000000 --- a/Lang/Uiua/Unprimeable-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unprimeable-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Validate-International-Securities-Identification-Number b/Lang/Uiua/Validate-International-Securities-Identification-Number deleted file mode 120000 index 6d28391590..0000000000 --- a/Lang/Uiua/Validate-International-Securities-Identification-Number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Validate-International-Securities-Identification-Number/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Voronoi-diagram b/Lang/Uiua/Voronoi-diagram deleted file mode 120000 index d3162948cc..0000000000 --- a/Lang/Uiua/Voronoi-diagram +++ /dev/null @@ -1 +0,0 @@ -../../Task/Voronoi-diagram/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Water-collected-between-towers b/Lang/Uiua/Water-collected-between-towers deleted file mode 120000 index cfd5fa722a..0000000000 --- a/Lang/Uiua/Water-collected-between-towers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Water-collected-between-towers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Weird-numbers b/Lang/Uiua/Weird-numbers deleted file mode 120000 index 3d24f8a95b..0000000000 --- a/Lang/Uiua/Weird-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Weird-numbers/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Wieferich-primes b/Lang/Uiua/Wieferich-primes deleted file mode 120000 index b9d2d78697..0000000000 --- a/Lang/Uiua/Wieferich-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wieferich-primes/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Wireworld b/Lang/Uiua/Wireworld deleted file mode 120000 index eaa729b6f4..0000000000 --- a/Lang/Uiua/Wireworld +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wireworld/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Word-frequency b/Lang/Uiua/Word-frequency deleted file mode 120000 index f59b23af8e..0000000000 --- a/Lang/Uiua/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Word-wheel b/Lang/Uiua/Word-wheel deleted file mode 120000 index f8bafcb6c7..0000000000 --- a/Lang/Uiua/Word-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-wheel/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Yellowstone-sequence b/Lang/Uiua/Yellowstone-sequence deleted file mode 120000 index 0bae4da70f..0000000000 --- a/Lang/Uiua/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Zebra-puzzle b/Lang/Uiua/Zebra-puzzle deleted file mode 120000 index cd343323b4..0000000000 --- a/Lang/Uiua/Zebra-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zebra-puzzle/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Zeckendorf-number-representation b/Lang/Uiua/Zeckendorf-number-representation deleted file mode 120000 index 1748bf90ef..0000000000 --- a/Lang/Uiua/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Zhang-Suen-thinning-algorithm b/Lang/Uiua/Zhang-Suen-thinning-algorithm deleted file mode 120000 index a7e773ae5b..0000000000 --- a/Lang/Uiua/Zhang-Suen-thinning-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zhang-Suen-thinning-algorithm/Uiua \ No newline at end of file diff --git a/Lang/Uiua/Zig-zag-matrix b/Lang/Uiua/Zig-zag-matrix deleted file mode 120000 index 3d79e2a814..0000000000 --- a/Lang/Uiua/Zig-zag-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zig-zag-matrix/Uiua \ No newline at end of file diff --git a/Lang/Ultimate++/00-LANG.txt b/Lang/Ultimate++/00-LANG.txt index a819e23329..b340f85de9 100644 --- a/Lang/Ultimate++/00-LANG.txt +++ b/Lang/Ultimate++/00-LANG.txt @@ -23,7 +23,7 @@ https://www.ultimatepp.org/www$uppweb$overview$en-us.html ==Language== This example is a hello world using the Upp namespace. -
    +
     #include 
     #include 
     
    @@ -39,7 +39,7 @@ CONSOLE_APP_MAIN
     	for(int i = 0; i < cmdline.GetCount(); i++) {
     	}
     }
    -
    + {{out}} @@ -51,7 +51,7 @@ and Hello World '''A+B B-A'''   -
    +
     #include 
     #include 
     #include 
    @@ -69,7 +69,7 @@ CONSOLE_APP_MAIN
     	for(int i = 0; i < cmdline.GetCount(); i++) {
     	}
     }
    -
    + {{out}} @@ -84,7 +84,7 @@ CONSOLE_APP_MAIN '''Conditional loop''' -
    +
     #include 
     #include 
     #include 
    @@ -108,7 +108,7 @@ CONSOLE_APP_MAIN
     	for(int i = 0; i < cmdline.GetCount(); i++) {
     	}
     }
    -
    + diff --git a/Lang/Unicon/Circular-primes b/Lang/Unicon/Circular-primes deleted file mode 120000 index 2ebcc862f3..0000000000 --- a/Lang/Unicon/Circular-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Circular-primes/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Deceptive-numbers b/Lang/Unicon/Deceptive-numbers deleted file mode 120000 index 74debdb49f..0000000000 --- a/Lang/Unicon/Deceptive-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deceptive-numbers/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Emirp-primes b/Lang/Unicon/Emirp-primes deleted file mode 120000 index 63628f22b5..0000000000 --- a/Lang/Unicon/Emirp-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Emirp-primes/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Equal-prime-and-composite-sums b/Lang/Unicon/Equal-prime-and-composite-sums deleted file mode 120000 index 108da6ee4a..0000000000 --- a/Lang/Unicon/Equal-prime-and-composite-sums +++ /dev/null @@ -1 +0,0 @@ -../../Task/Equal-prime-and-composite-sums/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Factorial-primes b/Lang/Unicon/Factorial-primes deleted file mode 120000 index 2f492134d2..0000000000 --- a/Lang/Unicon/Factorial-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial-primes/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Fermat-numbers b/Lang/Unicon/Fermat-numbers deleted file mode 120000 index 18314c4e86..0000000000 --- a/Lang/Unicon/Fermat-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fermat-numbers/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Pell-numbers b/Lang/Unicon/Pell-numbers deleted file mode 120000 index 1e5fe97247..0000000000 --- a/Lang/Unicon/Pell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pell-numbers/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Repunit-primes b/Lang/Unicon/Repunit-primes deleted file mode 120000 index a063ca9ca3..0000000000 --- a/Lang/Unicon/Repunit-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Repunit-primes/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Ultra-useful-primes b/Lang/Unicon/Ultra-useful-primes deleted file mode 120000 index c78c99febd..0000000000 --- a/Lang/Unicon/Ultra-useful-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Ultra-useful-primes/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Unix-ls b/Lang/Unicon/Unix-ls deleted file mode 120000 index 4501440ef6..0000000000 --- a/Lang/Unicon/Unix-ls +++ /dev/null @@ -1 +0,0 @@ -../../Task/Unix-ls/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Vector b/Lang/Unicon/Vector deleted file mode 120000 index 2c82c9664f..0000000000 --- a/Lang/Unicon/Vector +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vector/Unicon \ No newline at end of file diff --git a/Lang/Unicon/Wagstaff-primes b/Lang/Unicon/Wagstaff-primes deleted file mode 120000 index 9aef3c7dca..0000000000 --- a/Lang/Unicon/Wagstaff-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Wagstaff-primes/Unicon \ No newline at end of file diff --git a/Lang/Unison/Spiral-matrix b/Lang/Unison/Spiral-matrix deleted file mode 120000 index 423c950e4b..0000000000 --- a/Lang/Unison/Spiral-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spiral-matrix/Unison \ No newline at end of file diff --git a/Lang/UnixPipes/00-LANG.txt b/Lang/UnixPipes/00-LANG.txt index 421b024690..8a315a0473 100644 --- a/Lang/UnixPipes/00-LANG.txt +++ b/Lang/UnixPipes/00-LANG.txt @@ -13,7 +13,7 @@ Using utilities from, [http://packages.debian.org/unstable/utils/moreutils moreu Defining unfold as the opposite of xargs, i.e take a list of arguments and send them one at a time. The definition would be - + |cat unfold num=$1 while read xxx; do @@ -27,7 +27,7 @@ done 4 5 6 7 8 - + == Deleted solutions == We delete a UnixPipes solution when it is too similar to its UNIX Shell equivalent, or when it is incorrect (but the UNIX Shell solution is correct). diff --git a/Lang/Ursalang/Anagrams b/Lang/Ursalang/Anagrams deleted file mode 120000 index 955e3f6b2d..0000000000 --- a/Lang/Ursalang/Anagrams +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anagrams/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Averages-Arithmetic-mean b/Lang/Ursalang/Averages-Arithmetic-mean deleted file mode 120000 index 47e790e66c..0000000000 --- a/Lang/Ursalang/Averages-Arithmetic-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Arithmetic-mean/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Averages-Mode b/Lang/Ursalang/Averages-Mode deleted file mode 120000 index 3250a246da..0000000000 --- a/Lang/Ursalang/Averages-Mode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mode/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Averages-Root-mean-square b/Lang/Ursalang/Averages-Root-mean-square deleted file mode 120000 index 1acc742630..0000000000 --- a/Lang/Ursalang/Averages-Root-mean-square +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Root-mean-square/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/FizzBuzz b/Lang/Ursalang/FizzBuzz deleted file mode 120000 index 7a0a8b495c..0000000000 --- a/Lang/Ursalang/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Generator-Exponential b/Lang/Ursalang/Generator-Exponential deleted file mode 120000 index 4533fcc114..0000000000 --- a/Lang/Ursalang/Generator-Exponential +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generator-Exponential/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Hailstone-sequence b/Lang/Ursalang/Hailstone-sequence deleted file mode 120000 index fd3a016859..0000000000 --- a/Lang/Ursalang/Hailstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hailstone-sequence/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Loops-Break b/Lang/Ursalang/Loops-Break deleted file mode 120000 index 9956e0ecbe..0000000000 --- a/Lang/Ursalang/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Loops-Continue b/Lang/Ursalang/Loops-Continue deleted file mode 120000 index b92db2e19a..0000000000 --- a/Lang/Ursalang/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Loops-For b/Lang/Ursalang/Loops-For deleted file mode 120000 index 11a1ba7e0e..0000000000 --- a/Lang/Ursalang/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Loops-While b/Lang/Ursalang/Loops-While deleted file mode 120000 index 45dc0e4ade..0000000000 --- a/Lang/Ursalang/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Ursalang \ No newline at end of file diff --git a/Lang/Ursalang/Man-or-boy-test b/Lang/Ursalang/Man-or-boy-test deleted file mode 120000 index 14bf7f1c8c..0000000000 --- a/Lang/Ursalang/Man-or-boy-test +++ /dev/null @@ -1 +0,0 @@ -../../Task/Man-or-boy-test/Ursalang \ No newline at end of file diff --git a/Lang/Uxntal/00-LANG.txt b/Lang/Uxntal/00-LANG.txt index 29f2256564..d0204e9b73 100644 --- a/Lang/Uxntal/00-LANG.txt +++ b/Lang/Uxntal/00-LANG.txt @@ -1,7 +1,5 @@ {{language|Uxntal}} -''For unimplemented tasks see: [https://rosettacode.org/wiki/Tasks_not_implemented_in_Uxntal Uxntal Unimplemened]'' - '''Uxntal''' is the assembly language for the Uxn virtual machine. The VM has 64KiB of addressable memory, two 256-byte stacks (data and return), and a 256-byte block of I/O ports, divided into 16 devices with 16 ports each. The Uxntal assembler features sub-labels, simple lambdas, user-defined macros, and shorthands for common immediate operations. == Uxn VM == @@ -14,23 +12,10 @@ The 256 opcodes are divided into 8 special instructions, and 31 regular instruct == Syntax == -
    -In concatenative programming, there are no precedence rules, the calculations are merely performed in the sequence in which they are presented. The order with which elements come off a stack is known as last in, first out. '''''— [https://wiki.xxiivv.com/site/uxntal_syntax.html Uxntal Syntax]''''' -
    - Instructions are written in uppercase, followed by any combination of the three flags 2kr. Hex values are written with lowercase a-f. Code can be placed at specific addresses with the | rune, which is especially important for assembling the reset vector at address 0x100 (|0100) and for defining devices and zero-page variables. Padding can be inserted with the $ rune. Labels are created with @ and &. The difference is that @ creates a label with the given name, while & creates a sub-label by prefixing the most recent @label and a slash. -For further details on Uxntal syntax, see the [https://wiki.xxiivv.com/site/uxntal_syntax.html syntax page] on the XXIIVV wiki. - -[[Category:Assembler_language]] -[[Category:Assembly]] -[[Category:Esoteric_Languages]] -[[Category:Execution_method/Compiled/Bytecode]] -[[Category:Programming_paradigm/Object-oriented]] -[[Category:Programming_paradigm/Concatenative]] -[[Category:Typing/Unsafe]] -[[Category:Typing/Untyped]] \ No newline at end of file +For further details on Uxntal syntax, see the [https://wiki.xxiivv.com/site/uxntal_syntax.html syntax page] on the XXIIVV wiki. \ No newline at end of file diff --git a/Lang/Uxntal/Array-length b/Lang/Uxntal/Array-length deleted file mode 120000 index 438c43e439..0000000000 --- a/Lang/Uxntal/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Chaos-game b/Lang/Uxntal/Chaos-game deleted file mode 120000 index 80920dd6ff..0000000000 --- a/Lang/Uxntal/Chaos-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chaos-game/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Comments b/Lang/Uxntal/Comments deleted file mode 120000 index b23db936ba..0000000000 --- a/Lang/Uxntal/Comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Comments/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Conditional-structures b/Lang/Uxntal/Conditional-structures deleted file mode 120000 index 75d2f67746..0000000000 --- a/Lang/Uxntal/Conditional-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conditional-structures/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Copy-a-string b/Lang/Uxntal/Copy-a-string deleted file mode 120000 index 00610fac74..0000000000 --- a/Lang/Uxntal/Copy-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Copy-a-string/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Draw-a-pixel b/Lang/Uxntal/Draw-a-pixel new file mode 120000 index 0000000000..68f5f2e311 --- /dev/null +++ b/Lang/Uxntal/Draw-a-pixel @@ -0,0 +1 @@ +../../Task/Draw-a-pixel/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Fibonacci-sequence b/Lang/Uxntal/Fibonacci-sequence deleted file mode 120000 index 7795c4564a..0000000000 --- a/Lang/Uxntal/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Flow-control-structures b/Lang/Uxntal/Flow-control-structures deleted file mode 120000 index db95ed817d..0000000000 --- a/Lang/Uxntal/Flow-control-structures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flow-control-structures/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Hello-world-Graphical b/Lang/Uxntal/Hello-world-Graphical deleted file mode 120000 index 2a5fadb101..0000000000 --- a/Lang/Uxntal/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Hello-world-Standard-error b/Lang/Uxntal/Hello-world-Standard-error deleted file mode 120000 index be0ab3efa0..0000000000 --- a/Lang/Uxntal/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Hello-world-Text b/Lang/Uxntal/Hello-world-Text new file mode 120000 index 0000000000..9024a6cde4 --- /dev/null +++ b/Lang/Uxntal/Hello-world-Text @@ -0,0 +1 @@ +../../Task/Hello-world-Text/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Integer-sequence b/Lang/Uxntal/Integer-sequence deleted file mode 120000 index 6d76150081..0000000000 --- a/Lang/Uxntal/Integer-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-sequence/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Loops-Break b/Lang/Uxntal/Loops-Break deleted file mode 120000 index 5d6d57196c..0000000000 --- a/Lang/Uxntal/Loops-Break +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Break/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Loops-Continue b/Lang/Uxntal/Loops-Continue deleted file mode 120000 index 88d5768874..0000000000 --- a/Lang/Uxntal/Loops-Continue +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Continue/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Loops-Do-while b/Lang/Uxntal/Loops-Do-while deleted file mode 120000 index a3d655278d..0000000000 --- a/Lang/Uxntal/Loops-Do-while +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Do-while/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Loops-For-with-a-specified-step b/Lang/Uxntal/Loops-For-with-a-specified-step deleted file mode 120000 index 4f79f37c9f..0000000000 --- a/Lang/Uxntal/Loops-For-with-a-specified-step +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For-with-a-specified-step/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Loops-Foreach b/Lang/Uxntal/Loops-Foreach deleted file mode 120000 index f8f61da6a7..0000000000 --- a/Lang/Uxntal/Loops-Foreach +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Foreach/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Loops-N-plus-one-half b/Lang/Uxntal/Loops-N-plus-one-half deleted file mode 120000 index f7ee606c95..0000000000 --- a/Lang/Uxntal/Loops-N-plus-one-half +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-N-plus-one-half/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Loops-While b/Lang/Uxntal/Loops-While deleted file mode 120000 index f8307c2951..0000000000 --- a/Lang/Uxntal/Loops-While +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-While/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Quine b/Lang/Uxntal/Quine deleted file mode 120000 index 9f3a4ca4d4..0000000000 --- a/Lang/Uxntal/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Stack-traces b/Lang/Uxntal/Stack-traces deleted file mode 120000 index 0b9cf24839..0000000000 --- a/Lang/Uxntal/Stack-traces +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack-traces/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/String-length b/Lang/Uxntal/String-length deleted file mode 120000 index 8dd88d3b90..0000000000 --- a/Lang/Uxntal/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/Uxntal \ No newline at end of file diff --git a/Lang/Uxntal/Weird-numbers b/Lang/Uxntal/Weird-numbers deleted file mode 120000 index 1bddac81d2..0000000000 --- a/Lang/Uxntal/Weird-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Weird-numbers/Uxntal \ No newline at end of file diff --git a/Lang/V-(Vlang)/00-LANG.txt b/Lang/V-(Vlang)/00-LANG.txt index 56c1cc8279..9a2f5797f1 100644 --- a/Lang/V-(Vlang)/00-LANG.txt +++ b/Lang/V-(Vlang)/00-LANG.txt @@ -13,7 +13,7 @@ ''Simple, fast, safe, compiled. For developing maintainable software.''

    -'''Note: V (or Vlang). There was a language naming collision, so V (Vlang) was chosen.''' +'''Note: V is also known as Vlang. There was a language naming collision, so V (Vlang) was chosen.''' V (Vlang) is used here on Rosetta Code to disambiguate from the other language called [[:Category:V|V]]. @@ -21,15 +21,13 @@ V is an easier to learn, read, and use language. [https://vlang.io V] first appeared in 2019 in a trial web sandbox, "The V Playground". -V's design and history has been influenced by Go, C, Oberon, Rust, Swift, Kotlin, and Python. +V's design has been influenced by Go, Oberon, Rust, Swift, Kotlin, and Python. [https://github.com/vlang/v/wiki/FAQ For V's FAQ] -V's sources are published at [https://github.com/vlang/v GitHub], presently on version [https://github.com/vlang/v/releases 0.5.x]. - -V's [https://github.com/vlang/v/wiki/FAQ FAQ] and [https://github.com/vlang/v/blob/master/ROADMAP.md roadmap] to see its validity, promise, and delivery of features. +V's sources are published at [https://github.com/vlang/v GitHub], presently on version [https://github.com/vlang/v/releases 0.4.x]. V's compiler tool is similar in implementation to a multi purpose command processor: ''prompt$ v help'' -V language review and documentation is [https://github.com/vlang/v/blob/master/doc/docs.md here] for the professional, student, or as a hobby. +V language review and documentation are [https://github.com/vlang/v/blob/master/doc/docs.md here]. ==Helpful links== * [https://en.everybodywiki.com/V_(programming_language) V in Wiki] @@ -37,45 +35,59 @@ V language review and documentation is [https://github.com/vlang/v/blob/master/d * [https://www.youtube.com/watch?v=pchEsYwA74Q V language overview and introduction] on behalf of the Sydney Computing Society * [https://www.youtube.com/watch?v=_dIAcNp9bJs V language overview and presentation] for IBM * Some of the code snippets are available at the archived [//github.com/v-community/v_rosetta V-Community (V Rosetta) GitHub] -* For venturing into how to contribute, join, or help the V project can be found [https://github.com/vlang/v/blob/master/CONTRIBUTING.md#how-to-help-and-contribute-to-the-v-project here]. * More info on the below can be found at [https://modules.vlang.io/ modules used by V] {| class="wikitable" -! No. !! Module name !! !! No. !! Module name !! !! No. !! Module name +! No. !! Module name !! !! No. !! Module name |- -| 1 || [https://modules.vlang.io/arrays.html arrays] || || 2 || [https://modules.vlang.io/benchmark.html benchmark] || || 3 || [https://modules.vlang.io/bitfield.html bifield] +| 1 || [https://rosettacode.org/wiki/Category:Vlang-arrays arrays] || || 2 || [https://rosettacode.org/wiki/Category:Vlang-benchmark benchmark] |- -| 4 || [https://modules.vlang.io/cli.html cli] || || 5 || [https://modules.vlang.io/clipboard.html clipboard] || || 6 || [https://modules.vlang.io/compress.html compress] +| 3 || [https://rosettacode.org/wiki/Category:Vlang-bifield bifield] || || 4 || [https://rosettacode.org/wiki/Category:Vlang-cli cli] |- -| 7 || [https://modules.vlang.io/context.html context] || || 8 || [https://modules.vlang.io/crypto.html crypto] || || 9 || [https://modules.vlang.io/net.websocket.html websocket] +| 5 || [https://rosettacode.org/wiki/Category:Vlang-clipboard clipboard] || || 6 || [https://rosettacode.org/wiki/Category:Vlang-compress compress] |- -| 10 || [https://modules.vlang.io/datatypes.html datatypes] || || 11 || [https://modules.vlang.io/main.html main] || || 12 || [https://modules.vlang.io/dl.html dl] +| 7 || [https://rosettacode.org/wiki/Category:Vlang-context context] || || 8 || [https://rosettacode.org/wiki/Category:Vlang-crypto crypto] |- -| 13 || [https://modules.vlang.io/dlmalloc.html dlmalloc] || || 14 || [https://modules.vlang.io/encoding.html encoding] || || 15 || [https://modules.vlang.io/eventbus.html eventbus] +| 9 || [https://rosettacode.org/wiki/Category:Vlang-darwin darwin] || || 10 || [https://rosettacode.org/wiki/Category:Vlang-datatypes datatypes] |- -| 16 || [https://modules.vlang.io/flag.html flag] || || 17 || [https://modules.vlang.io/fontstash.html fontstash] || || 18 || [https://modules.vlang.io/gg.html gg] +| 11 || [https://rosettacode.org/wiki/Category:Vlang-main main] || || 12 || [https://rosettacode.org/wiki/Category:Vlang-dl dl] |- -| 19 || [https://modules.vlang.io/gx.html gx] || || 20 || [https://modules.vlang.io/hash.html hash] || || 21 || [https://modules.vlang.io/io.html io] +| 13 || [https://rosettacode.org/wiki/Category:Vlang-dlmalloc dlmalloc] || || 14 || [https://rosettacode.org/wiki/Category:Vlang-encoding encoding] |- -| 22 || [https://modules.vlang.io/json.html json] || || 23 || [https://modules.vlang.io/log.html log] || || 24 || [https://modules.vlang.io/math.html math] +| 15 || [https://rosettacode.org/wiki/Category:Vlang-eventbus eventbus] || || 16 || [https://rosettacode.org/wiki/Category:Vlang-flag flag] |- -| 25 || [https://modules.vlang.io/db.mssql.html mssql] || || 26 || [https://modules.vlang.io/db.mysql.html mysql] || || 27 || [https://modules.vlang.io/net.html net] +| 17 || [https://rosettacode.org/wiki/Category:Vlang-fontstash fontstash] || || 18 || [https://rosettacode.org/wiki/Category:Vlang-gg gg] |- -| 28 || [https://modules.vlang.io/orm.html orm] || || 29 || [https://modules.vlang.io/os.html os] || || 30 || [https://modules.vlang.io/pg.html pg] +| 19 || [https://rosettacode.org/wiki/Category:Vlang-gx gx] || || 20 || [https://rosettacode.org/wiki/Category:Vlang-crypto hash] |- -| 31 || [https://modules.vlang.io/picoev.html picoev] || || 32 || [https://modules.vlang.io/veb.html veb] || || 33 || [https://modules.vlang.io/picohttpparser.html picohttpparser] +| 21 || [https://rosettacode.org/wiki/Category:Vlang-io io] || || 22 || [https://rosettacode.org/wiki/Category:Vlang-json json] |- -| 34 || [https://modules.vlang.io/rand.html rand]|| || 35 || [https://modules.vlang.io/readline.html readline] || || 36 || [https://modules.vlang.io/regex.html regex] +| 23 || [https://rosettacode.org/wiki/Category:Vlang-log log] || || 24 || [https://rosettacode.org/wiki/Category:Vlang-math math] |- -| 37 || [https://modules.vlang.io/runtime.html runtime] || || 38 || [https://modules.vlang.io/semver.html semver] || || 39 || [https://modules.vlang.io/sokol.sapp.html sokol.sapp] +| 25 || [https://rosettacode.org/wiki/Category:Vlang-mssql mssql] || || 26 || [https://rosettacode.org/wiki/Category:Vlang-mysql mysql] |- -| 40 || [https://modules.vlang.io/db.sqlite.html sqlite] || || 41 || [https://modules.vlang.io/stbi.html stbi] || || 42 || [https://modules.vlang.io/strconv.html strconv] +| 27 || [https://rosettacode.org/wiki/Category:Vlang-net net] || || 28 || [https://rosettacode.org/wiki/Category:Vlang-orm orm] |- -| 43 || [https://modules.vlang.io/strings.html strings] || || 44 || [https://modules.vlang.io/sync.html sync] || || 45 || [https://modules.vlang.io/szip.html szip] +| 29 || [https://rosettacode.org/wiki/Category:Vlang-os os] || || 30 || [https://rosettacode.org/wiki/Category:Vlang-pg pg] |- -| 46 || [https://modules.vlang.io/term.html term] || || 47 || [https://modules.vlang.io/time.html time] || || 48 || [https://modules.vlang.io/toml.html toml] +| 31 || [https://rosettacode.org/wiki/Category:Vlang-picoev picoev] || || 32 || [https://rosettacode.org/wiki/Category:Vlang-event picoev] |- -| 49 || [https://modules.vlang.io/vweb.html vweb] || || 50 || [https://modules.vlang.io/wasm.html wasm] || || 51 || [https://modules.vlang.io/maps.html maps] +| 33 || [https://rosettacode.org/wiki/Category:Vlang-picohttpparser picohttpparser] || || 34 || [https://rosettacode.org/wiki/Category:Vlang-rand rand] +|- +| 35 || [https://rosettacode.org/wiki/Category:Vlang-readline readline] || || 36 || [https://rosettacode.org/wiki/Category:Vlang-regex regex] +|- +| 37 || [https://rosettacode.org/wiki/Category:Vlang-runtime runtime] || || 38 || [https://rosettacode.org/wiki/Category:Vlang-semver semver] +|- +| 39 || [https://rosettacode.org/wiki/Category:Vlang-sokol sokol] || || 40 || [https://rosettacode.org/wiki/Category:Vlang-sqlite sqlite] +|- +| 41 || [https://rosettacode.org/wiki/Category:Vlang-stbi stbi] || || 42 || [https://rosettacode.org/wiki/Category:Vlang-strconv strconv] +|- +| 43 || [https://rosettacode.org/wiki/Category:Vlang-strings strings] || || 44 || [https://rosettacode.org/wiki/Category:Vlang-sync sync] +|- +| 45 || [https://rosettacode.org/wiki/Category:Vlang-szip szip] || || 46 || [https://rosettacode.org/wiki/Category:Vlang-term term] +|- +| 47 || [https://rosettacode.org/wiki/Category:Vlang-time time] || || 48 || [https://rosettacode.org/wiki/Category:Vlang-toml toml] +|- +| 49 || [https://rosettacode.org/wiki/Category:Vlang-vweb vweb] || || 50 || [https://rosettacode.org/wiki/Category:Vlang-wasm wasm] |- -| 52 || [https://modules.vlang.io/sokol.audio.html sokol.audio] || || 53 || [https://modules.vlang.io/x.ttf.html ttf] || || 54 || [https://modules.vlang.io/x.json2.html json2] |} \ No newline at end of file diff --git a/Lang/V-(Vlang)/15-puzzle-solver b/Lang/V-(Vlang)/15-puzzle-solver deleted file mode 120000 index 9193bcde1c..0000000000 --- a/Lang/V-(Vlang)/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Accumulator-factory b/Lang/V-(Vlang)/Accumulator-factory deleted file mode 120000 index 20257d9d8b..0000000000 --- a/Lang/V-(Vlang)/Accumulator-factory +++ /dev/null @@ -1 +0,0 @@ -../../Task/Accumulator-factory/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Add-a-variable-to-a-class-instance-at-runtime b/Lang/V-(Vlang)/Add-a-variable-to-a-class-instance-at-runtime deleted file mode 120000 index dccc76d376..0000000000 --- a/Lang/V-(Vlang)/Add-a-variable-to-a-class-instance-at-runtime +++ /dev/null @@ -1 +0,0 @@ -../../Task/Add-a-variable-to-a-class-instance-at-runtime/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Animate-a-pendulum b/Lang/V-(Vlang)/Animate-a-pendulum deleted file mode 120000 index 87bb2b5f80..0000000000 --- a/Lang/V-(Vlang)/Animate-a-pendulum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Animate-a-pendulum/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Apply-a-callback-to-an-array b/Lang/V-(Vlang)/Apply-a-callback-to-an-array deleted file mode 120000 index 8b7f34e888..0000000000 --- a/Lang/V-(Vlang)/Apply-a-callback-to-an-array +++ /dev/null @@ -1 +0,0 @@ -../../Task/Apply-a-callback-to-an-array/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Approximate-equality b/Lang/V-(Vlang)/Approximate-equality deleted file mode 120000 index ba99a599b6..0000000000 --- a/Lang/V-(Vlang)/Approximate-equality +++ /dev/null @@ -1 +0,0 @@ -../../Task/Approximate-equality/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Archimedean-spiral b/Lang/V-(Vlang)/Archimedean-spiral deleted file mode 120000 index 0915aa0768..0000000000 --- a/Lang/V-(Vlang)/Archimedean-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Archimedean-spiral/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Arithmetic-derivative b/Lang/V-(Vlang)/Arithmetic-derivative deleted file mode 120000 index 0d28ff0c59..0000000000 --- a/Lang/V-(Vlang)/Arithmetic-derivative +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-derivative/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Best-shuffle b/Lang/V-(Vlang)/Best-shuffle deleted file mode 120000 index a5a48fba81..0000000000 --- a/Lang/V-(Vlang)/Best-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Best-shuffle/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Bioinformatics-base-count b/Lang/V-(Vlang)/Bioinformatics-base-count new file mode 120000 index 0000000000..93867218eb --- /dev/null +++ b/Lang/V-(Vlang)/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Bitcoin-address-validation b/Lang/V-(Vlang)/Bitcoin-address-validation deleted file mode 120000 index 28da42f695..0000000000 --- a/Lang/V-(Vlang)/Bitcoin-address-validation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitcoin-address-validation/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Bitwise-operations b/Lang/V-(Vlang)/Bitwise-operations deleted file mode 120000 index e781b4c06c..0000000000 --- a/Lang/V-(Vlang)/Bitwise-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitwise-operations/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Box-the-compass b/Lang/V-(Vlang)/Box-the-compass deleted file mode 120000 index 8aa45acb1f..0000000000 --- a/Lang/V-(Vlang)/Box-the-compass +++ /dev/null @@ -1 +0,0 @@ -../../Task/Box-the-compass/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Burrows-Wheeler-transform b/Lang/V-(Vlang)/Burrows-Wheeler-transform deleted file mode 120000 index c6a4d26892..0000000000 --- a/Lang/V-(Vlang)/Burrows-Wheeler-transform +++ /dev/null @@ -1 +0,0 @@ -../../Task/Burrows-Wheeler-transform/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Canonicalize-CIDR b/Lang/V-(Vlang)/Canonicalize-CIDR deleted file mode 120000 index 42ce54344e..0000000000 --- a/Lang/V-(Vlang)/Canonicalize-CIDR +++ /dev/null @@ -1 +0,0 @@ -../../Task/Canonicalize-CIDR/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Classes b/Lang/V-(Vlang)/Classes deleted file mode 120000 index a7d339230e..0000000000 --- a/Lang/V-(Vlang)/Classes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Classes/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Closures-Value-capture b/Lang/V-(Vlang)/Closures-Value-capture deleted file mode 120000 index d671104741..0000000000 --- a/Lang/V-(Vlang)/Closures-Value-capture +++ /dev/null @@ -1 +0,0 @@ -../../Task/Closures-Value-capture/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Color-wheel b/Lang/V-(Vlang)/Color-wheel deleted file mode 120000 index b828d5a770..0000000000 --- a/Lang/V-(Vlang)/Color-wheel +++ /dev/null @@ -1 +0,0 @@ -../../Task/Color-wheel/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Compile-time-calculation b/Lang/V-(Vlang)/Compile-time-calculation deleted file mode 120000 index 1ec9e378fa..0000000000 --- a/Lang/V-(Vlang)/Compile-time-calculation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compile-time-calculation/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Constrained-genericity b/Lang/V-(Vlang)/Constrained-genericity deleted file mode 120000 index af413abe8c..0000000000 --- a/Lang/V-(Vlang)/Constrained-genericity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Constrained-genericity/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Convert-seconds-to-compound-duration b/Lang/V-(Vlang)/Convert-seconds-to-compound-duration deleted file mode 120000 index 90e9599792..0000000000 --- a/Lang/V-(Vlang)/Convert-seconds-to-compound-duration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convert-seconds-to-compound-duration/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Create-an-object-at-a-given-address b/Lang/V-(Vlang)/Create-an-object-at-a-given-address deleted file mode 120000 index 2a735f50a4..0000000000 --- a/Lang/V-(Vlang)/Create-an-object-at-a-given-address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-object-at-a-given-address/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/De-Bruijn-sequences b/Lang/V-(Vlang)/De-Bruijn-sequences deleted file mode 120000 index 03d47939a3..0000000000 --- a/Lang/V-(Vlang)/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Death-Star b/Lang/V-(Vlang)/Death-Star deleted file mode 120000 index ed8ea3e0a6..0000000000 --- a/Lang/V-(Vlang)/Death-Star +++ /dev/null @@ -1 +0,0 @@ -../../Task/Death-Star/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Define-a-primitive-data-type b/Lang/V-(Vlang)/Define-a-primitive-data-type deleted file mode 120000 index aebf4cbe69..0000000000 --- a/Lang/V-(Vlang)/Define-a-primitive-data-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Define-a-primitive-data-type/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Dijkstras-algorithm b/Lang/V-(Vlang)/Dijkstras-algorithm deleted file mode 120000 index c6cb06de44..0000000000 --- a/Lang/V-(Vlang)/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Dragon-curve b/Lang/V-(Vlang)/Dragon-curve deleted file mode 120000 index ea14877291..0000000000 --- a/Lang/V-(Vlang)/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Draw-a-cuboid b/Lang/V-(Vlang)/Draw-a-cuboid deleted file mode 120000 index 675b202e8b..0000000000 --- a/Lang/V-(Vlang)/Draw-a-cuboid +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-cuboid/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Draw-a-rotating-cube b/Lang/V-(Vlang)/Draw-a-rotating-cube deleted file mode 120000 index c731b8a529..0000000000 --- a/Lang/V-(Vlang)/Draw-a-rotating-cube +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-rotating-cube/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Dutch-national-flag-problem b/Lang/V-(Vlang)/Dutch-national-flag-problem deleted file mode 120000 index 826568fc3d..0000000000 --- a/Lang/V-(Vlang)/Dutch-national-flag-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dutch-national-flag-problem/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Dynamic-variable-names b/Lang/V-(Vlang)/Dynamic-variable-names deleted file mode 120000 index 59780bc7d8..0000000000 --- a/Lang/V-(Vlang)/Dynamic-variable-names +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dynamic-variable-names/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Eertree b/Lang/V-(Vlang)/Eertree deleted file mode 120000 index df3a9103a6..0000000000 --- a/Lang/V-(Vlang)/Eertree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eertree/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Elementary-cellular-automaton-Random-number-generator b/Lang/V-(Vlang)/Elementary-cellular-automaton-Random-number-generator deleted file mode 120000 index d02a93aeca..0000000000 --- a/Lang/V-(Vlang)/Elementary-cellular-automaton-Random-number-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elementary-cellular-automaton-Random-number-generator/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Enumerations b/Lang/V-(Vlang)/Enumerations deleted file mode 120000 index 711e1f8ea0..0000000000 --- a/Lang/V-(Vlang)/Enumerations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Enumerations/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Execute-HQ9+ b/Lang/V-(Vlang)/Execute-HQ9+ deleted file mode 120000 index cecaa41a14..0000000000 --- a/Lang/V-(Vlang)/Execute-HQ9+ +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-HQ9+/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Exponentiation-with-infix-operators-in-or-operating-on-the-base b/Lang/V-(Vlang)/Exponentiation-with-infix-operators-in-or-operating-on-the-base deleted file mode 120000 index 119da73572..0000000000 --- a/Lang/V-(Vlang)/Exponentiation-with-infix-operators-in-or-operating-on-the-base +++ /dev/null @@ -1 +0,0 @@ -../../Task/Exponentiation-with-infix-operators-in-or-operating-on-the-base/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Find-Chess960-starting-position-identifier b/Lang/V-(Vlang)/Find-Chess960-starting-position-identifier deleted file mode 120000 index b88e0a4eb1..0000000000 --- a/Lang/V-(Vlang)/Find-Chess960-starting-position-identifier +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-Chess960-starting-position-identifier/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Find-the-last-Sunday-of-each-month b/Lang/V-(Vlang)/Find-the-last-Sunday-of-each-month deleted file mode 120000 index 8c3dbc9a79..0000000000 --- a/Lang/V-(Vlang)/Find-the-last-Sunday-of-each-month +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-last-Sunday-of-each-month/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Five-weekends b/Lang/V-(Vlang)/Five-weekends deleted file mode 120000 index ed2a49051d..0000000000 --- a/Lang/V-(Vlang)/Five-weekends +++ /dev/null @@ -1 +0,0 @@ -../../Task/Five-weekends/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Fivenum b/Lang/V-(Vlang)/Fivenum deleted file mode 120000 index 77154f6b56..0000000000 --- a/Lang/V-(Vlang)/Fivenum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fivenum/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Flipping-bits-game b/Lang/V-(Vlang)/Flipping-bits-game deleted file mode 120000 index f272f02e11..0000000000 --- a/Lang/V-(Vlang)/Flipping-bits-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Flipping-bits-game/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Floyds-triangle b/Lang/V-(Vlang)/Floyds-triangle deleted file mode 120000 index cc0e0a9649..0000000000 --- a/Lang/V-(Vlang)/Floyds-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyds-triangle/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Galton-box-animation b/Lang/V-(Vlang)/Galton-box-animation deleted file mode 120000 index 2caf8cb18c..0000000000 --- a/Lang/V-(Vlang)/Galton-box-animation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Galton-box-animation/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Generate-random-chess-position b/Lang/V-(Vlang)/Generate-random-chess-position deleted file mode 120000 index 7687c7236a..0000000000 --- a/Lang/V-(Vlang)/Generate-random-chess-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-random-chess-position/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Get-system-command-output b/Lang/V-(Vlang)/Get-system-command-output deleted file mode 120000 index 1b29764574..0000000000 --- a/Lang/V-(Vlang)/Get-system-command-output +++ /dev/null @@ -1 +0,0 @@ -../../Task/Get-system-command-output/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Hash-join b/Lang/V-(Vlang)/Hash-join deleted file mode 120000 index a28257577b..0000000000 --- a/Lang/V-(Vlang)/Hash-join +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hash-join/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Hello-world-Standard-error b/Lang/V-(Vlang)/Hello-world-Standard-error deleted file mode 120000 index f1aa7945d1..0000000000 --- a/Lang/V-(Vlang)/Hello-world-Standard-error +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Standard-error/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Higher-order-functions b/Lang/V-(Vlang)/Higher-order-functions deleted file mode 120000 index a6c0b9843e..0000000000 --- a/Lang/V-(Vlang)/Higher-order-functions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Higher-order-functions/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Hilbert-curve b/Lang/V-(Vlang)/Hilbert-curve deleted file mode 120000 index d691e8f108..0000000000 --- a/Lang/V-(Vlang)/Hilbert-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hilbert-curve/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Humble-numbers b/Lang/V-(Vlang)/Humble-numbers deleted file mode 120000 index c32de84293..0000000000 --- a/Lang/V-(Vlang)/Humble-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Humble-numbers/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Idiomatically-determine-all-the-lowercase-and-uppercase-letters b/Lang/V-(Vlang)/Idiomatically-determine-all-the-lowercase-and-uppercase-letters deleted file mode 120000 index efa66c489c..0000000000 --- a/Lang/V-(Vlang)/Idiomatically-determine-all-the-lowercase-and-uppercase-letters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Include-a-file b/Lang/V-(Vlang)/Include-a-file deleted file mode 120000 index 439a7ac6c3..0000000000 --- a/Lang/V-(Vlang)/Include-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Include-a-file/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Inheritance-Multiple b/Lang/V-(Vlang)/Inheritance-Multiple deleted file mode 120000 index 5c8421d069..0000000000 --- a/Lang/V-(Vlang)/Inheritance-Multiple +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Multiple/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Inheritance-Single b/Lang/V-(Vlang)/Inheritance-Single deleted file mode 120000 index e9a1dd6d9f..0000000000 --- a/Lang/V-(Vlang)/Inheritance-Single +++ /dev/null @@ -1 +0,0 @@ -../../Task/Inheritance-Single/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Integer-comparison b/Lang/V-(Vlang)/Integer-comparison deleted file mode 120000 index 0152b2d289..0000000000 --- a/Lang/V-(Vlang)/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Juggler-sequence b/Lang/V-(Vlang)/Juggler-sequence deleted file mode 120000 index 56d41efb28..0000000000 --- a/Lang/V-(Vlang)/Juggler-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Juggler-sequence/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Knights-tour b/Lang/V-(Vlang)/Knights-tour deleted file mode 120000 index 542607dce0..0000000000 --- a/Lang/V-(Vlang)/Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knights-tour/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/LU-decomposition b/Lang/V-(Vlang)/LU-decomposition deleted file mode 120000 index 1eb080d8ba..0000000000 --- a/Lang/V-(Vlang)/LU-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/LU-decomposition/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/LZW-compression b/Lang/V-(Vlang)/LZW-compression deleted file mode 120000 index 36e201b60a..0000000000 --- a/Lang/V-(Vlang)/LZW-compression +++ /dev/null @@ -1 +0,0 @@ -../../Task/LZW-compression/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Langtons-ant b/Lang/V-(Vlang)/Langtons-ant deleted file mode 120000 index ccce40cc4e..0000000000 --- a/Lang/V-(Vlang)/Langtons-ant +++ /dev/null @@ -1 +0,0 @@ -../../Task/Langtons-ant/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Legendre-prime-counting-function b/Lang/V-(Vlang)/Legendre-prime-counting-function deleted file mode 120000 index ca54942178..0000000000 --- a/Lang/V-(Vlang)/Legendre-prime-counting-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Legendre-prime-counting-function/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Logical-operations b/Lang/V-(Vlang)/Logical-operations deleted file mode 120000 index bed3efe6b2..0000000000 --- a/Lang/V-(Vlang)/Logical-operations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Logical-operations/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/MD4 b/Lang/V-(Vlang)/MD4 deleted file mode 120000 index 4ef84d93a7..0000000000 --- a/Lang/V-(Vlang)/MD4 +++ /dev/null @@ -1 +0,0 @@ -../../Task/MD4/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Magic-8-ball b/Lang/V-(Vlang)/Magic-8-ball deleted file mode 120000 index 01ad1da8ee..0000000000 --- a/Lang/V-(Vlang)/Magic-8-ball +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-8-ball/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Magic-squares-of-odd-order b/Lang/V-(Vlang)/Magic-squares-of-odd-order deleted file mode 120000 index 15a07e422e..0000000000 --- a/Lang/V-(Vlang)/Magic-squares-of-odd-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-odd-order/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Map-range b/Lang/V-(Vlang)/Map-range deleted file mode 120000 index bd9191a4a1..0000000000 --- a/Lang/V-(Vlang)/Map-range +++ /dev/null @@ -1 +0,0 @@ -../../Task/Map-range/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Matrix-chain-multiplication b/Lang/V-(Vlang)/Matrix-chain-multiplication deleted file mode 120000 index 6f5b000cff..0000000000 --- a/Lang/V-(Vlang)/Matrix-chain-multiplication +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-chain-multiplication/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Matrix-transposition b/Lang/V-(Vlang)/Matrix-transposition deleted file mode 120000 index f283dea370..0000000000 --- a/Lang/V-(Vlang)/Matrix-transposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-transposition/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Mayan-numerals b/Lang/V-(Vlang)/Mayan-numerals deleted file mode 120000 index 005198e98f..0000000000 --- a/Lang/V-(Vlang)/Mayan-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mayan-numerals/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Maze-generation b/Lang/V-(Vlang)/Maze-generation deleted file mode 120000 index 62cabc5306..0000000000 --- a/Lang/V-(Vlang)/Maze-generation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maze-generation/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Maze-solving b/Lang/V-(Vlang)/Maze-solving deleted file mode 120000 index 1dd904fdc6..0000000000 --- a/Lang/V-(Vlang)/Maze-solving +++ /dev/null @@ -1 +0,0 @@ -../../Task/Maze-solving/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Memory-allocation b/Lang/V-(Vlang)/Memory-allocation deleted file mode 120000 index 28b226407c..0000000000 --- a/Lang/V-(Vlang)/Memory-allocation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Memory-allocation/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Metaprogramming b/Lang/V-(Vlang)/Metaprogramming deleted file mode 120000 index 6b8564d95e..0000000000 --- a/Lang/V-(Vlang)/Metaprogramming +++ /dev/null @@ -1 +0,0 @@ -../../Task/Metaprogramming/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Mind-boggling-card-trick b/Lang/V-(Vlang)/Mind-boggling-card-trick deleted file mode 120000 index 765932978d..0000000000 --- a/Lang/V-(Vlang)/Mind-boggling-card-trick +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mind-boggling-card-trick/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Monads-List-monad b/Lang/V-(Vlang)/Monads-List-monad deleted file mode 120000 index 60c249323a..0000000000 --- a/Lang/V-(Vlang)/Monads-List-monad +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monads-List-monad/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Monads-Maybe-monad b/Lang/V-(Vlang)/Monads-Maybe-monad deleted file mode 120000 index bcf0927f50..0000000000 --- a/Lang/V-(Vlang)/Monads-Maybe-monad +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monads-Maybe-monad/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Morse-code b/Lang/V-(Vlang)/Morse-code deleted file mode 120000 index ac98ffd266..0000000000 --- a/Lang/V-(Vlang)/Morse-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Morse-code/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Multiplication-tables b/Lang/V-(Vlang)/Multiplication-tables deleted file mode 120000 index 3bdff7103e..0000000000 --- a/Lang/V-(Vlang)/Multiplication-tables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiplication-tables/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/N-queens-problem b/Lang/V-(Vlang)/N-queens-problem deleted file mode 120000 index 50b06d4a76..0000000000 --- a/Lang/V-(Vlang)/N-queens-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/N-queens-problem/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Nonoblock b/Lang/V-(Vlang)/Nonoblock deleted file mode 120000 index 930ce96e10..0000000000 --- a/Lang/V-(Vlang)/Nonoblock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nonoblock/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/One-dimensional-cellular-automata b/Lang/V-(Vlang)/One-dimensional-cellular-automata deleted file mode 120000 index 7b9510a27e..0000000000 --- a/Lang/V-(Vlang)/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Operator-precedence b/Lang/V-(Vlang)/Operator-precedence deleted file mode 120000 index 749797e963..0000000000 --- a/Lang/V-(Vlang)/Operator-precedence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Operator-precedence/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Optional-parameters b/Lang/V-(Vlang)/Optional-parameters deleted file mode 120000 index 34451b5a74..0000000000 --- a/Lang/V-(Vlang)/Optional-parameters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Optional-parameters/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Palindrome-dates b/Lang/V-(Vlang)/Palindrome-dates deleted file mode 120000 index 58cd472885..0000000000 --- a/Lang/V-(Vlang)/Palindrome-dates +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-dates/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Pancake-numbers b/Lang/V-(Vlang)/Pancake-numbers deleted file mode 120000 index 03055f6721..0000000000 --- a/Lang/V-(Vlang)/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Pangram-checker b/Lang/V-(Vlang)/Pangram-checker deleted file mode 120000 index 281ca7e770..0000000000 --- a/Lang/V-(Vlang)/Pangram-checker +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pangram-checker/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Parametric-polymorphism b/Lang/V-(Vlang)/Parametric-polymorphism deleted file mode 120000 index 2fba74d455..0000000000 --- a/Lang/V-(Vlang)/Parametric-polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parametric-polymorphism/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Partial-function-application b/Lang/V-(Vlang)/Partial-function-application deleted file mode 120000 index 2ab67a8d88..0000000000 --- a/Lang/V-(Vlang)/Partial-function-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Partial-function-application/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Pascals-triangle b/Lang/V-(Vlang)/Pascals-triangle deleted file mode 120000 index 91982b11d4..0000000000 --- a/Lang/V-(Vlang)/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Password-generator b/Lang/V-(Vlang)/Password-generator deleted file mode 120000 index 7e3dac059f..0000000000 --- a/Lang/V-(Vlang)/Password-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Password-generator/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Peano-curve b/Lang/V-(Vlang)/Peano-curve deleted file mode 120000 index 859acf6031..0000000000 --- a/Lang/V-(Vlang)/Peano-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Peano-curve/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Permutations-by-swapping b/Lang/V-(Vlang)/Permutations-by-swapping deleted file mode 120000 index 247ffcc655..0000000000 --- a/Lang/V-(Vlang)/Permutations-by-swapping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations-by-swapping/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Polymorphic-copy b/Lang/V-(Vlang)/Polymorphic-copy deleted file mode 120000 index d1d9a95084..0000000000 --- a/Lang/V-(Vlang)/Polymorphic-copy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polymorphic-copy/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Polymorphism b/Lang/V-(Vlang)/Polymorphism deleted file mode 120000 index 1ca2c9e1ef..0000000000 --- a/Lang/V-(Vlang)/Polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polymorphism/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Polyspiral b/Lang/V-(Vlang)/Polyspiral deleted file mode 120000 index f6495b4e02..0000000000 --- a/Lang/V-(Vlang)/Polyspiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polyspiral/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Price-fraction b/Lang/V-(Vlang)/Price-fraction deleted file mode 120000 index 065a5d4d27..0000000000 --- a/Lang/V-(Vlang)/Price-fraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Price-fraction/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Prime-decomposition b/Lang/V-(Vlang)/Prime-decomposition deleted file mode 120000 index 092f726639..0000000000 --- a/Lang/V-(Vlang)/Prime-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Prime-decomposition/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Probabilistic-choice b/Lang/V-(Vlang)/Probabilistic-choice deleted file mode 120000 index 5f44e37240..0000000000 --- a/Lang/V-(Vlang)/Probabilistic-choice +++ /dev/null @@ -1 +0,0 @@ -../../Task/Probabilistic-choice/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Program-name b/Lang/V-(Vlang)/Program-name deleted file mode 120000 index 9b2935c679..0000000000 --- a/Lang/V-(Vlang)/Program-name +++ /dev/null @@ -1 +0,0 @@ -../../Task/Program-name/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Pseudo-random-numbers-Splitmix64 b/Lang/V-(Vlang)/Pseudo-random-numbers-Splitmix64 deleted file mode 120000 index 05590ef252..0000000000 --- a/Lang/V-(Vlang)/Pseudo-random-numbers-Splitmix64 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Splitmix64/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Quine b/Lang/V-(Vlang)/Quine deleted file mode 120000 index a258f08a53..0000000000 --- a/Lang/V-(Vlang)/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/RPG-attributes-generator b/Lang/V-(Vlang)/RPG-attributes-generator deleted file mode 120000 index e14499c2a5..0000000000 --- a/Lang/V-(Vlang)/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Range-extraction b/Lang/V-(Vlang)/Range-extraction deleted file mode 120000 index 76ae7cce99..0000000000 --- a/Lang/V-(Vlang)/Range-extraction +++ /dev/null @@ -1 +0,0 @@ -../../Task/Range-extraction/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Read-a-specific-line-from-a-file b/Lang/V-(Vlang)/Read-a-specific-line-from-a-file deleted file mode 120000 index 8f9a931625..0000000000 --- a/Lang/V-(Vlang)/Read-a-specific-line-from-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-specific-line-from-a-file/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Regular-expressions b/Lang/V-(Vlang)/Regular-expressions deleted file mode 120000 index bc8ed031b0..0000000000 --- a/Lang/V-(Vlang)/Regular-expressions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Regular-expressions/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Respond-to-an-unknown-method-call b/Lang/V-(Vlang)/Respond-to-an-unknown-method-call deleted file mode 120000 index 3cfbcab7fa..0000000000 --- a/Lang/V-(Vlang)/Respond-to-an-unknown-method-call +++ /dev/null @@ -1 +0,0 @@ -../../Task/Respond-to-an-unknown-method-call/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Return-multiple-values b/Lang/V-(Vlang)/Return-multiple-values deleted file mode 120000 index ddbdb0227d..0000000000 --- a/Lang/V-(Vlang)/Return-multiple-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Return-multiple-values/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/SEDOLs b/Lang/V-(Vlang)/SEDOLs deleted file mode 120000 index 3d43f78e48..0000000000 --- a/Lang/V-(Vlang)/SEDOLs +++ /dev/null @@ -1 +0,0 @@ -../../Task/SEDOLs/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Scope-modifiers b/Lang/V-(Vlang)/Scope-modifiers deleted file mode 120000 index 429eb578e5..0000000000 --- a/Lang/V-(Vlang)/Scope-modifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Scope-modifiers/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Send-an-unknown-method-call b/Lang/V-(Vlang)/Send-an-unknown-method-call deleted file mode 120000 index 682a1fe636..0000000000 --- a/Lang/V-(Vlang)/Send-an-unknown-method-call +++ /dev/null @@ -1 +0,0 @@ -../../Task/Send-an-unknown-method-call/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sierpinski-arrowhead-curve b/Lang/V-(Vlang)/Sierpinski-arrowhead-curve deleted file mode 120000 index ce49e15c40..0000000000 --- a/Lang/V-(Vlang)/Sierpinski-arrowhead-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-arrowhead-curve/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sierpinski-square-curve b/Lang/V-(Vlang)/Sierpinski-square-curve deleted file mode 120000 index c9f1debc78..0000000000 --- a/Lang/V-(Vlang)/Sierpinski-square-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-square-curve/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sieve-of-Pritchard b/Lang/V-(Vlang)/Sieve-of-Pritchard deleted file mode 120000 index c1742abeaf..0000000000 --- a/Lang/V-(Vlang)/Sieve-of-Pritchard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Pritchard/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Singly-linked-list-Element-definition b/Lang/V-(Vlang)/Singly-linked-list-Element-definition deleted file mode 120000 index 4870f24a23..0000000000 --- a/Lang/V-(Vlang)/Singly-linked-list-Element-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Singly-linked-list-Element-definition/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sokoban b/Lang/V-(Vlang)/Sokoban deleted file mode 120000 index ac9a6fb995..0000000000 --- a/Lang/V-(Vlang)/Sokoban +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sokoban/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Solve-a-Holy-Knights-tour b/Lang/V-(Vlang)/Solve-a-Holy-Knights-tour deleted file mode 120000 index 4753f7fb1d..0000000000 --- a/Lang/V-(Vlang)/Solve-a-Holy-Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Holy-Knights-tour/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sort-a-list-of-object-identifiers b/Lang/V-(Vlang)/Sort-a-list-of-object-identifiers deleted file mode 120000 index f40fb70fcb..0000000000 --- a/Lang/V-(Vlang)/Sort-a-list-of-object-identifiers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-a-list-of-object-identifiers/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sort-numbers-lexicographically b/Lang/V-(Vlang)/Sort-numbers-lexicographically deleted file mode 120000 index 05897e6739..0000000000 --- a/Lang/V-(Vlang)/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sorting-Algorithms-Circle-Sort b/Lang/V-(Vlang)/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..90876b0ca9 --- /dev/null +++ b/Lang/V-(Vlang)/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Special-variables b/Lang/V-(Vlang)/Special-variables deleted file mode 120000 index cf6afb2ad0..0000000000 --- a/Lang/V-(Vlang)/Special-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Special-variables/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Spiral-matrix b/Lang/V-(Vlang)/Spiral-matrix deleted file mode 120000 index 3966b6fb8b..0000000000 --- a/Lang/V-(Vlang)/Spiral-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Spiral-matrix/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Stair-climbing-puzzle b/Lang/V-(Vlang)/Stair-climbing-puzzle deleted file mode 120000 index f0a6ae3661..0000000000 --- a/Lang/V-(Vlang)/Stair-climbing-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stair-climbing-puzzle/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Straddling-checkerboard b/Lang/V-(Vlang)/Straddling-checkerboard deleted file mode 120000 index fcc5be8fde..0000000000 --- a/Lang/V-(Vlang)/Straddling-checkerboard +++ /dev/null @@ -1 +0,0 @@ -../../Task/Straddling-checkerboard/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Substring-Top-and-tail b/Lang/V-(Vlang)/Substring-Top-and-tail deleted file mode 120000 index 6ff0a67c24..0000000000 --- a/Lang/V-(Vlang)/Substring-Top-and-tail +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substring-Top-and-tail/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sudoku b/Lang/V-(Vlang)/Sudoku deleted file mode 120000 index 930f85b4d1..0000000000 --- a/Lang/V-(Vlang)/Sudoku +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudoku/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Sum-of-squares b/Lang/V-(Vlang)/Sum-of-squares deleted file mode 120000 index bdf6276079..0000000000 --- a/Lang/V-(Vlang)/Sum-of-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sum-of-squares/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Summarize-and-say-sequence b/Lang/V-(Vlang)/Summarize-and-say-sequence deleted file mode 120000 index 6bf589b063..0000000000 --- a/Lang/V-(Vlang)/Summarize-and-say-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Summarize-and-say-sequence/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Superellipse b/Lang/V-(Vlang)/Superellipse deleted file mode 120000 index f4877a60ae..0000000000 --- a/Lang/V-(Vlang)/Superellipse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Superellipse/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Superpermutation-minimisation b/Lang/V-(Vlang)/Superpermutation-minimisation deleted file mode 120000 index 8aeb5ea4bd..0000000000 --- a/Lang/V-(Vlang)/Superpermutation-minimisation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Superpermutation-minimisation/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Table-creation-Postal-addresses b/Lang/V-(Vlang)/Table-creation-Postal-addresses deleted file mode 120000 index 07c82be810..0000000000 --- a/Lang/V-(Vlang)/Table-creation-Postal-addresses +++ /dev/null @@ -1 +0,0 @@ -../../Task/Table-creation-Postal-addresses/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Taxicab-numbers b/Lang/V-(Vlang)/Taxicab-numbers deleted file mode 120000 index d3f4a716c8..0000000000 --- a/Lang/V-(Vlang)/Taxicab-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Taxicab-numbers/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/The-Twelve-Days-of-Christmas b/Lang/V-(Vlang)/The-Twelve-Days-of-Christmas deleted file mode 120000 index ac2e9fb7b5..0000000000 --- a/Lang/V-(Vlang)/The-Twelve-Days-of-Christmas +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Twelve-Days-of-Christmas/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Thue-Morse b/Lang/V-(Vlang)/Thue-Morse deleted file mode 120000 index 82f9127b9d..0000000000 --- a/Lang/V-(Vlang)/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Topic-variable b/Lang/V-(Vlang)/Topic-variable deleted file mode 120000 index 99a32af3bb..0000000000 --- a/Lang/V-(Vlang)/Topic-variable +++ /dev/null @@ -1 +0,0 @@ -../../Task/Topic-variable/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Transliterate-English-text-using-the-Greek-alphabet b/Lang/V-(Vlang)/Transliterate-English-text-using-the-Greek-alphabet deleted file mode 120000 index 9c6f1c38d1..0000000000 --- a/Lang/V-(Vlang)/Transliterate-English-text-using-the-Greek-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Transliterate-English-text-using-the-Greek-alphabet/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Twos-complement b/Lang/V-(Vlang)/Twos-complement deleted file mode 120000 index b9ca937183..0000000000 --- a/Lang/V-(Vlang)/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/UPC b/Lang/V-(Vlang)/UPC deleted file mode 120000 index bb6c7d3bca..0000000000 --- a/Lang/V-(Vlang)/UPC +++ /dev/null @@ -1 +0,0 @@ -../../Task/UPC/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/User-input-Graphical b/Lang/V-(Vlang)/User-input-Graphical deleted file mode 120000 index d985c46dcb..0000000000 --- a/Lang/V-(Vlang)/User-input-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Graphical/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Variable-length-quantity b/Lang/V-(Vlang)/Variable-length-quantity deleted file mode 120000 index e0a7eee24f..0000000000 --- a/Lang/V-(Vlang)/Variable-length-quantity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Variable-length-quantity/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/War-card-game b/Lang/V-(Vlang)/War-card-game deleted file mode 120000 index b1fa28907b..0000000000 --- a/Lang/V-(Vlang)/War-card-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/War-card-game/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Word-frequency b/Lang/V-(Vlang)/Word-frequency deleted file mode 120000 index 7472df9d00..0000000000 --- a/Lang/V-(Vlang)/Word-frequency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Word-frequency/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Yin-and-yang b/Lang/V-(Vlang)/Yin-and-yang deleted file mode 120000 index bfc21b3e37..0000000000 --- a/Lang/V-(Vlang)/Yin-and-yang +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yin-and-yang/V-(Vlang) \ No newline at end of file diff --git a/Lang/V-(Vlang)/Zhang-Suen-thinning-algorithm b/Lang/V-(Vlang)/Zhang-Suen-thinning-algorithm deleted file mode 120000 index b0618c7785..0000000000 --- a/Lang/V-(Vlang)/Zhang-Suen-thinning-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zhang-Suen-thinning-algorithm/V-(Vlang) \ No newline at end of file diff --git a/Lang/V/00-LANG.txt b/Lang/V/00-LANG.txt index 6de2ee34df..c4203ea969 100644 --- a/Lang/V/00-LANG.txt +++ b/Lang/V/00-LANG.txt @@ -5,7 +5,6 @@ |site=http://code.google.com/p/v-language/ |LCT=yes}} {{language programming paradigm|concatenative}} -''Note: There is another language called V at Rosetta Code, it can be found at [[:Category:V_(Vlang)|V (Vlang)]].'' - '''V''' is a simple, stack-based (concatenative), dynamic language. It is similar to [[Joy]] and [[PostScript]]. -
    \ No newline at end of file +
    +Note: There is another language called V at Rosetta Code, it can be found over [[:Category:V_(Vlang)|here]]. \ No newline at end of file diff --git a/Lang/V/99-bottles-of-beer b/Lang/V/99-bottles-of-beer deleted file mode 120000 index 9e72431c34..0000000000 --- a/Lang/V/99-bottles-of-beer +++ /dev/null @@ -1 +0,0 @@ -../../Task/99-bottles-of-beer/V \ No newline at end of file diff --git a/Lang/VBA/Abundant-odd-numbers b/Lang/VBA/Abundant-odd-numbers deleted file mode 120000 index 634e142877..0000000000 --- a/Lang/VBA/Abundant-odd-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abundant-odd-numbers/VBA \ No newline at end of file diff --git a/Lang/VBA/Bell-numbers b/Lang/VBA/Bell-numbers deleted file mode 120000 index 825db8e67d..0000000000 --- a/Lang/VBA/Bell-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bell-numbers/VBA \ No newline at end of file diff --git a/Lang/VBA/Brazilian-numbers b/Lang/VBA/Brazilian-numbers deleted file mode 120000 index 3b990aab5c..0000000000 --- a/Lang/VBA/Brazilian-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Brazilian-numbers/VBA \ No newline at end of file diff --git a/Lang/VBA/Deal-cards-for-FreeCell b/Lang/VBA/Deal-cards-for-FreeCell deleted file mode 120000 index 33506ab6dc..0000000000 --- a/Lang/VBA/Deal-cards-for-FreeCell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deal-cards-for-FreeCell/VBA \ No newline at end of file diff --git a/Lang/VBA/Gamma-function b/Lang/VBA/Gamma-function deleted file mode 120000 index 75f8622191..0000000000 --- a/Lang/VBA/Gamma-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gamma-function/VBA \ No newline at end of file diff --git a/Lang/VBA/M-bius-function b/Lang/VBA/M-bius-function deleted file mode 120000 index eb8fdee7b1..0000000000 --- a/Lang/VBA/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/VBA \ No newline at end of file diff --git a/Lang/VBA/Monty-Hall-problem b/Lang/VBA/Monty-Hall-problem deleted file mode 120000 index cbcc810f65..0000000000 --- a/Lang/VBA/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/VBA \ No newline at end of file diff --git a/Lang/VBA/Quaternion-type b/Lang/VBA/Quaternion-type new file mode 120000 index 0000000000..b9d823193e --- /dev/null +++ b/Lang/VBA/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/VBA \ No newline at end of file diff --git a/Lang/VBScript/Bioinformatics-base-count b/Lang/VBScript/Bioinformatics-base-count new file mode 120000 index 0000000000..27b49dfc57 --- /dev/null +++ b/Lang/VBScript/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/VBScript \ No newline at end of file diff --git a/Lang/VBScript/Simple-windowed-application b/Lang/VBScript/Simple-windowed-application deleted file mode 120000 index 99e416c344..0000000000 --- a/Lang/VBScript/Simple-windowed-application +++ /dev/null @@ -1 +0,0 @@ -../../Task/Simple-windowed-application/VBScript \ No newline at end of file diff --git a/Lang/VTL-2/RPG-attributes-generator b/Lang/VTL-2/RPG-attributes-generator deleted file mode 120000 index 1167e48571..0000000000 --- a/Lang/VTL-2/RPG-attributes-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/RPG-attributes-generator/VTL-2 \ No newline at end of file diff --git a/Lang/VTL-2/Zeckendorf-number-representation b/Lang/VTL-2/Zeckendorf-number-representation deleted file mode 120000 index f281019c65..0000000000 --- a/Lang/VTL-2/Zeckendorf-number-representation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zeckendorf-number-representation/VTL-2 \ No newline at end of file diff --git a/Lang/Vala/Execute-Brain- b/Lang/Vala/Execute-Brain- deleted file mode 120000 index ae24a4e37d..0000000000 --- a/Lang/Vala/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Vala \ No newline at end of file diff --git a/Lang/Verilog/Leonardo-numbers b/Lang/Verilog/Leonardo-numbers deleted file mode 120000 index fdea2f05f8..0000000000 --- a/Lang/Verilog/Leonardo-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Leonardo-numbers/Verilog \ No newline at end of file diff --git a/Lang/Verilog/Loops-Infinite b/Lang/Verilog/Loops-Infinite deleted file mode 120000 index 07545a5d7e..0000000000 --- a/Lang/Verilog/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/Verilog \ No newline at end of file diff --git a/Lang/Verilog/Pancake-numbers b/Lang/Verilog/Pancake-numbers deleted file mode 120000 index f9cd19af94..0000000000 --- a/Lang/Verilog/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/Verilog \ No newline at end of file diff --git a/Lang/Verilog/Twos-complement b/Lang/Verilog/Twos-complement deleted file mode 120000 index 8527a62e79..0000000000 --- a/Lang/Verilog/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Verilog \ No newline at end of file diff --git a/Lang/Vim-Script/Hello-world-Graphical b/Lang/Vim-Script/Hello-world-Graphical deleted file mode 120000 index 799696cc16..0000000000 --- a/Lang/Vim-Script/Hello-world-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Graphical/Vim-Script \ No newline at end of file diff --git a/Lang/Vim-Script/Here-document b/Lang/Vim-Script/Here-document deleted file mode 120000 index 4f2967d090..0000000000 --- a/Lang/Vim-Script/Here-document +++ /dev/null @@ -1 +0,0 @@ -../../Task/Here-document/Vim-Script \ No newline at end of file diff --git a/Lang/Vim-Script/Loop-over-multiple-arrays-simultaneously b/Lang/Vim-Script/Loop-over-multiple-arrays-simultaneously deleted file mode 120000 index 3e8729e53b..0000000000 --- a/Lang/Vim-Script/Loop-over-multiple-arrays-simultaneously +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loop-over-multiple-arrays-simultaneously/Vim-Script \ No newline at end of file diff --git a/Lang/Vim-Script/Loops-For b/Lang/Vim-Script/Loops-For deleted file mode 120000 index 427dcdb8bf..0000000000 --- a/Lang/Vim-Script/Loops-For +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-For/Vim-Script \ No newline at end of file diff --git a/Lang/Vim-Script/XML-Input b/Lang/Vim-Script/XML-Input deleted file mode 120000 index 57be30dc70..0000000000 --- a/Lang/Vim-Script/XML-Input +++ /dev/null @@ -1 +0,0 @@ -../../Task/XML-Input/Vim-Script \ No newline at end of file diff --git a/Lang/Visual-Basic-.NET/Execute-Brain- b/Lang/Visual-Basic-.NET/Execute-Brain- deleted file mode 120000 index 40c465e5ff..0000000000 --- a/Lang/Visual-Basic-.NET/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Visual-Basic-.NET \ No newline at end of file diff --git a/Lang/Visual-Basic-.NET/Quaternion-type b/Lang/Visual-Basic-.NET/Quaternion-type new file mode 120000 index 0000000000..111784d7c2 --- /dev/null +++ b/Lang/Visual-Basic-.NET/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Visual-Basic-.NET \ No newline at end of file diff --git a/Lang/Vyxal/00-LANG.txt b/Lang/Vyxal/00-LANG.txt deleted file mode 100644 index 0acceafc9b..0000000000 --- a/Lang/Vyxal/00-LANG.txt +++ /dev/null @@ -1,3 +0,0 @@ -{{language|Vyxal}} - -Vyxal is an esoteric golfing language designed to make code golf challenges fun, and to allow code golfers to win said challenges. \ No newline at end of file diff --git a/Lang/Vyxal/00-META.yaml b/Lang/Vyxal/00-META.yaml deleted file mode 100644 index a5968dda5e..0000000000 --- a/Lang/Vyxal/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Vyxal diff --git a/Lang/Vyxal/Arithmetic-geometric-mean b/Lang/Vyxal/Arithmetic-geometric-mean deleted file mode 120000 index 5c957e3635..0000000000 --- a/Lang/Vyxal/Arithmetic-geometric-mean +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean/Vyxal \ No newline at end of file diff --git a/Lang/Vyxal/Execute-Brain- b/Lang/Vyxal/Execute-Brain- deleted file mode 120000 index 76839bca71..0000000000 --- a/Lang/Vyxal/Execute-Brain- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-Brain-/Vyxal \ No newline at end of file diff --git a/Lang/Vyxal/Factorial b/Lang/Vyxal/Factorial deleted file mode 120000 index 1cdfde0f4b..0000000000 --- a/Lang/Vyxal/Factorial +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorial/Vyxal \ No newline at end of file diff --git a/Lang/Vyxal/Factorions b/Lang/Vyxal/Factorions deleted file mode 120000 index df658fe37b..0000000000 --- a/Lang/Vyxal/Factorions +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factorions/Vyxal \ No newline at end of file diff --git a/Lang/Vyxal/FizzBuzz b/Lang/Vyxal/FizzBuzz deleted file mode 120000 index 22964032ea..0000000000 --- a/Lang/Vyxal/FizzBuzz +++ /dev/null @@ -1 +0,0 @@ -../../Task/FizzBuzz/Vyxal \ No newline at end of file diff --git a/Lang/Vyxal/Linear-congruential-generator b/Lang/Vyxal/Linear-congruential-generator deleted file mode 120000 index 7a8e447f9f..0000000000 --- a/Lang/Vyxal/Linear-congruential-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Linear-congruential-generator/Vyxal \ No newline at end of file diff --git a/Lang/Vyxal/Narcissistic-decimal-number b/Lang/Vyxal/Narcissistic-decimal-number deleted file mode 120000 index 4f717275c0..0000000000 --- a/Lang/Vyxal/Narcissistic-decimal-number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Narcissistic-decimal-number/Vyxal \ No newline at end of file diff --git a/Lang/Waduzitdo/00-LANG.txt b/Lang/Waduzitdo/00-LANG.txt deleted file mode 100644 index 140eff39b3..0000000000 --- a/Lang/Waduzitdo/00-LANG.txt +++ /dev/null @@ -1,7 +0,0 @@ -{{stub}} -{{language|Waduzitdo -|site=https://waduzitdo.org/ -|hopl=no -}} - -Waduzitdo is a programming language created by Larry Kheriaty and published in the popular computer culture magazine BYTE in 1978. It very closely resembles [[PILOT]], but is even more simplified and has been proven to not be Turing complete. It appears to have been created as an attempt to create an extremely small compiler, as well as being a good language for demonstrating basic functions; the language only has eight commands, which demonstrate input and output, along with basic pattern-matching and decision-making. The language gets its name from the fact that it was designed for demonstrating a computer to people who had never used one before who are asking "What does it do?" \ No newline at end of file diff --git a/Lang/Waduzitdo/00-META.yaml b/Lang/Waduzitdo/00-META.yaml deleted file mode 100644 index 7c62d1f448..0000000000 --- a/Lang/Waduzitdo/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:Waduzitdo diff --git a/Lang/Waduzitdo/Hello-world-Text b/Lang/Waduzitdo/Hello-world-Text deleted file mode 120000 index 4d7c98308f..0000000000 --- a/Lang/Waduzitdo/Hello-world-Text +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hello-world-Text/Waduzitdo \ No newline at end of file diff --git a/Lang/Waduzitdo/Nim-game b/Lang/Waduzitdo/Nim-game deleted file mode 120000 index d8c3766378..0000000000 --- a/Lang/Waduzitdo/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/Waduzitdo \ No newline at end of file diff --git a/Lang/Wee-Basic/Empty-program b/Lang/Wee-Basic/Empty-program new file mode 120000 index 0000000000..132197773e --- /dev/null +++ b/Lang/Wee-Basic/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Wee-Basic \ No newline at end of file diff --git a/Lang/Wisp/Knuth-shuffle b/Lang/Wisp/Knuth-shuffle deleted file mode 120000 index 14993ebaba..0000000000 --- a/Lang/Wisp/Knuth-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuth-shuffle/Wisp \ No newline at end of file diff --git a/Lang/Wisp/Levenshtein-distance b/Lang/Wisp/Levenshtein-distance deleted file mode 120000 index 4fa74a1890..0000000000 --- a/Lang/Wisp/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/Wisp \ No newline at end of file diff --git a/Lang/Wren/00-LANG.txt b/Lang/Wren/00-LANG.txt index 2d52115f0a..1dbc2e611b 100644 --- a/Lang/Wren/00-LANG.txt +++ b/Lang/Wren/00-LANG.txt @@ -15,7 +15,7 @@ It is under development on [https://github.com/wren-lang/wren GitHub] and is ful The CLI tool (Wren CLI) has its own repository and is the main focus of examples written for RC. The latest version 0.4.0 is available as a pre-built standalone executable for 64-bit Linux, MacOS and Windows and can be downloaded from [https://github.com/wren-lang/wren-cli/releases here]. -As a language mainly designed for embedding, Wren's standard library is (of necessity) quite small and I ([[User:PureFox|PureFox]]) have therefore decided to create some additional modules to assist with writing Rosetta Code tasks so the same code does not have to be written or copy/pasted time and time again thereby bloating a task's script code unnecessarily. The ones written so far are listed below: +As a language mainly designed for embedding, Wren's standard library is (of necessity) quite small and I have therefore decided to create some additional modules to assist with writing Rosetta Code tasks so the same code does not have to be written or copy/pasted time and time again thereby bloating a task's script code unnecessarily. The ones written so far are listed below: {| class="wikitable" ! No. !! Module name !! !! No. !! Module name @@ -64,11 +64,7 @@ As a language mainly designed for embedding, Wren's standard library is (of nece |- | 43 || [[:Category:Wren-vector|vector]] || || 44 || [[:Category:Wren-ordered|ordered]] |- -| 45 || [[:Category:Wren-psieve|psieve]] || || 46 || [[:Category:Wren-hash|hash]] -|- -| 47 || [[:Category:Wren-roman|roman]] || || 48 || [[:Category:Wren-std|std]] -|- -| 49 || [[:Category:Wren-ansi|ansi]] || || || +| 45 || [[:Category:Wren-psieve|psieve]] || || || |}
    To use a class or classes from a module (say ''fmt''), you need to import them into your script with Wren code such as the following. To use more than one class separate their names with commas: @@ -95,7 +91,5 @@ There are also a number of third-party modules available for Wren of which the f
    For further information and licensing requirements, please consult their individual pages. -Finally, there are some RC tasks which require a special C executable to solve but where it is not worthwhile to create a dedicated module to house the Wren source code. See [[:Category:libwren|libwren]] for details. - ==Todo== * [[Tasks not implemented in Wren]] \ No newline at end of file diff --git a/Lang/Wren/Bioinformatics-base-count b/Lang/Wren/Bioinformatics-base-count new file mode 120000 index 0000000000..620c92bb71 --- /dev/null +++ b/Lang/Wren/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Wren \ No newline at end of file diff --git a/Lang/Wren/Empty-program b/Lang/Wren/Empty-program new file mode 120000 index 0000000000..e0842518a1 --- /dev/null +++ b/Lang/Wren/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Wren \ No newline at end of file diff --git a/Lang/Wren/Meissel-Mertens-constant b/Lang/Wren/Meissel-Mertens-constant new file mode 120000 index 0000000000..2a9c71a439 --- /dev/null +++ b/Lang/Wren/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Wren \ No newline at end of file diff --git a/Lang/Wren/Miller-Rabin-primality-test b/Lang/Wren/Miller-Rabin-primality-test new file mode 120000 index 0000000000..26f77867d2 --- /dev/null +++ b/Lang/Wren/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Wren \ No newline at end of file diff --git a/Lang/Wren/Quaternion-type b/Lang/Wren/Quaternion-type new file mode 120000 index 0000000000..42a26f0111 --- /dev/null +++ b/Lang/Wren/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Wren \ No newline at end of file diff --git a/Lang/Wren/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Wren/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Wren/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Wren/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Wren/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Wren/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Wren/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Wren/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Wren/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Wren/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Wren/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Wren/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Wren/Sorting-Algorithms-Circle-Sort b/Lang/Wren/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..3d8f8916cb --- /dev/null +++ b/Lang/Wren/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Wren \ No newline at end of file diff --git a/Lang/X-script/00-LANG.txt b/Lang/X-script/00-LANG.txt deleted file mode 100644 index af743e22c3..0000000000 --- a/Lang/X-script/00-LANG.txt +++ /dev/null @@ -1,38 +0,0 @@ -{{language|X-script}} -X-script is a minimalistic programming language which is characterised by user friendlyness and simplicity. -All data are strings. It can also handle binary data, which are then encoded as hexadecimal strings. -It can read from and write to files and serial devices like TCP/IP ports and serial ports. -It has a window that has similarities with consoles, where you can start programs, call functions and call states or just write code (like in Python). - -Here is an example of an x-script that implements a chemical calculator: -[[Chemical_calculator#X-script]]. - -The development of X-script started around 1980 and the language has been improved ever since. Originally, the goal was to enable the creation of rapid prototypes of programs, to test ideas before the real programming started. - -The "Hello world" program looks like this: - - -In x-script, you can develop an application in two different ways. One is as a function, which is similar to functions in other languages, except that all data are strings. - -The other is as a state, which is a list of inputs and outputs. -A state is mostly the quickest way to solve a programming problem. It is also easy to read, since it is a list of inputs and the corresponding outputs or actions. The inputs are surrounded by ?"..."? and the corresponding outputs or actions by !"..."!. If you for example want to read a comma-separated account from a bank, the state could look like this: - -accountStatement.x ------------------- -(* Titles *) -?"TransactionDate;Reference;Amount -"? -!""! - -(* Example: 2023-09-04;Accessa Finance Inc 305653152413;-3850.00 *) -?";; -"? -!" you '<0,payed to,earned from>

    :

    dollars."! - -?""? -!""! - - -Function calls have this format: . - -The example above calls the library functions , , , ,

    , and .

    , , and are "pattern functions" which are used to match input strings.

    ,

    and are ordinary functions. prints a string to the X-window.

    retrieves stringparts identified in the input file. returns from the state, \ No newline at end of file diff --git a/Lang/X-script/00-META.yaml b/Lang/X-script/00-META.yaml deleted file mode 100644 index 2fd50d732b..0000000000 --- a/Lang/X-script/00-META.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -from: http://rosettacode.org/wiki/Category:X-script diff --git a/Lang/X86-64-Assembly/A+B b/Lang/X86-64-Assembly/A+B deleted file mode 120000 index 8da0da2282..0000000000 --- a/Lang/X86-64-Assembly/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Binary-digits b/Lang/X86-64-Assembly/Binary-digits deleted file mode 120000 index 1eb48aa18a..0000000000 --- a/Lang/X86-64-Assembly/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Command-line-arguments b/Lang/X86-64-Assembly/Command-line-arguments deleted file mode 120000 index 112452a5d5..0000000000 --- a/Lang/X86-64-Assembly/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Create-an-HTML-table b/Lang/X86-64-Assembly/Create-an-HTML-table deleted file mode 120000 index e10bb5efed..0000000000 --- a/Lang/X86-64-Assembly/Create-an-HTML-table +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-HTML-table/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Generate-lower-case-ASCII-alphabet b/Lang/X86-64-Assembly/Generate-lower-case-ASCII-alphabet deleted file mode 120000 index 0146a7c580..0000000000 --- a/Lang/X86-64-Assembly/Generate-lower-case-ASCII-alphabet +++ /dev/null @@ -1 +0,0 @@ -../../Task/Generate-lower-case-ASCII-alphabet/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/HTTPS b/Lang/X86-64-Assembly/HTTPS deleted file mode 120000 index 2a06876bd2..0000000000 --- a/Lang/X86-64-Assembly/HTTPS +++ /dev/null @@ -1 +0,0 @@ -../../Task/HTTPS/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Include-a-file b/Lang/X86-64-Assembly/Include-a-file deleted file mode 120000 index b94c0093ef..0000000000 --- a/Lang/X86-64-Assembly/Include-a-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Include-a-file/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Magic-8-ball b/Lang/X86-64-Assembly/Magic-8-ball deleted file mode 120000 index 63e5e8cfbb..0000000000 --- a/Lang/X86-64-Assembly/Magic-8-ball +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-8-ball/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Password-generator b/Lang/X86-64-Assembly/Password-generator deleted file mode 120000 index e8e77773e7..0000000000 --- a/Lang/X86-64-Assembly/Password-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Password-generator/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Pseudo-random-numbers-Middle-square-method b/Lang/X86-64-Assembly/Pseudo-random-numbers-Middle-square-method deleted file mode 120000 index 9ff7bee727..0000000000 --- a/Lang/X86-64-Assembly/Pseudo-random-numbers-Middle-square-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pseudo-random-numbers-Middle-square-method/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Random-number-generator-device- b/Lang/X86-64-Assembly/Random-number-generator-device- deleted file mode 120000 index 17f5db574d..0000000000 --- a/Lang/X86-64-Assembly/Random-number-generator-device- +++ /dev/null @@ -1 +0,0 @@ -../../Task/Random-number-generator-device-/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Rot-13 b/Lang/X86-64-Assembly/Rot-13 deleted file mode 120000 index 498ce19193..0000000000 --- a/Lang/X86-64-Assembly/Rot-13 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rot-13/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Sieve-of-Eratosthenes b/Lang/X86-64-Assembly/Sieve-of-Eratosthenes deleted file mode 120000 index 2ec4e68176..0000000000 --- a/Lang/X86-64-Assembly/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Stack b/Lang/X86-64-Assembly/Stack deleted file mode 120000 index f458d7ec5f..0000000000 --- a/Lang/X86-64-Assembly/Stack +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stack/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/String-length b/Lang/X86-64-Assembly/String-length deleted file mode 120000 index d3dacaf4b5..0000000000 --- a/Lang/X86-64-Assembly/String-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/String-length/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Terminal-control-Clear-the-screen b/Lang/X86-64-Assembly/Terminal-control-Clear-the-screen deleted file mode 120000 index 8974ae4cd4..0000000000 --- a/Lang/X86-64-Assembly/Terminal-control-Clear-the-screen +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Clear-the-screen/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-64-Assembly/Twos-complement b/Lang/X86-64-Assembly/Twos-complement deleted file mode 120000 index 03daa00fb9..0000000000 --- a/Lang/X86-64-Assembly/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/X86-64-Assembly \ No newline at end of file diff --git a/Lang/X86-Assembly/Pythagoras-tree b/Lang/X86-Assembly/Pythagoras-tree deleted file mode 120000 index 2ed69a8164..0000000000 --- a/Lang/X86-Assembly/Pythagoras-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pythagoras-tree/X86-Assembly \ No newline at end of file diff --git a/Lang/X86-Assembly/Stack b/Lang/X86-Assembly/Stack new file mode 120000 index 0000000000..c0f7dc8fa0 --- /dev/null +++ b/Lang/X86-Assembly/Stack @@ -0,0 +1 @@ +../../Task/Stack/X86-Assembly \ No newline at end of file diff --git a/Lang/XBS/00-LANG.txt b/Lang/XBS/00-LANG.txt index 87ee4c9802..46cebd0203 100644 --- a/Lang/XBS/00-LANG.txt +++ b/Lang/XBS/00-LANG.txt @@ -1,8 +1,29 @@ {{language|XBS}} == What is XBS? == +XBS is an interpreted language written in [[JavaScript]]. XBS has similarities to JavaScript and Python, as well as some other languages. XBS can be used for any web page with the correct library. -XBS is an interpreted language written in [[JavaScript]]. The language does not have its own sandbox, and relies on methods passed down from JavaScript. XBS was created originally to help its creator understand how to create a basic programming language, and later branched out its syntax in creative ways. +---- + +== Details == + +XBS has a github page and is currently open-sourced. The github page has a wiki for the documentation; but just know, this language still isn't done. It has most features a programming language has, except for some minor details that I need to fix. + +---- + +== Code Examples == + +Variable declaration + +set x = "Hello, world!"; +log(x) + +Functions + +func FirstFunction(a,b){ + send a+b; #Add a and b +} +log(FirstFunction(1,2)); ---- @@ -13,5 +34,4 @@ XBS is an interpreted language written in [[JavaScript]]. The language does not == Notes == -* XBS was re-written back in 2021 as the language had a lot of issues with expressional parsing priorities. Most XBS examples on this site are outdated. -* XBS is a slow language, as it is interpreted using [[JavaScript]] \ No newline at end of file +XBS is currently going through a rewrite, and the wiki has not been rewritten yet. \ No newline at end of file diff --git a/Lang/XBasic/AKS-test-for-primes b/Lang/XBasic/AKS-test-for-primes deleted file mode 120000 index dcd18f7155..0000000000 --- a/Lang/XBasic/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Associative-array-Merging b/Lang/XBasic/Associative-array-Merging deleted file mode 120000 index 9fcd826207..0000000000 --- a/Lang/XBasic/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Determine-sentence-type b/Lang/XBasic/Determine-sentence-type deleted file mode 120000 index ea580ad280..0000000000 --- a/Lang/XBasic/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Diversity-prediction-theorem b/Lang/XBasic/Diversity-prediction-theorem deleted file mode 120000 index 76939265dd..0000000000 --- a/Lang/XBasic/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Euler-method b/Lang/XBasic/Euler-method deleted file mode 120000 index 546ca521e8..0000000000 --- a/Lang/XBasic/Euler-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Euler-method/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Jewels-and-stones b/Lang/XBasic/Jewels-and-stones deleted file mode 120000 index b0451efebb..0000000000 --- a/Lang/XBasic/Jewels-and-stones +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jewels-and-stones/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Josephus-problem b/Lang/XBasic/Josephus-problem deleted file mode 120000 index 425d14bd16..0000000000 --- a/Lang/XBasic/Josephus-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Josephus-problem/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Levenshtein-distance b/Lang/XBasic/Levenshtein-distance deleted file mode 120000 index 57fd900b58..0000000000 --- a/Lang/XBasic/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Loops-Infinite b/Lang/XBasic/Loops-Infinite deleted file mode 120000 index b803a965e4..0000000000 --- a/Lang/XBasic/Loops-Infinite +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Infinite/XBasic \ No newline at end of file diff --git a/Lang/XBasic/M-bius-function b/Lang/XBasic/M-bius-function deleted file mode 120000 index 09886c7873..0000000000 --- a/Lang/XBasic/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Nim-game b/Lang/XBasic/Nim-game deleted file mode 120000 index 49a494ab0c..0000000000 --- a/Lang/XBasic/Nim-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nim-game/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Pancake-numbers b/Lang/XBasic/Pancake-numbers deleted file mode 120000 index ba6560d347..0000000000 --- a/Lang/XBasic/Pancake-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pancake-numbers/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/XBasic/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/XBasic/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/XBasic/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/XBasic/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/XBasic/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/XBasic/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/XBasic/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/XBasic/Sorting-algorithms-Quicksort b/Lang/XBasic/Sorting-algorithms-Quicksort deleted file mode 120000 index baefc61c90..0000000000 --- a/Lang/XBasic/Sorting-algorithms-Quicksort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Quicksort/XBasic \ No newline at end of file diff --git a/Lang/XBasic/The-Name-Game b/Lang/XBasic/The-Name-Game deleted file mode 120000 index bc5b69cbc8..0000000000 --- a/Lang/XBasic/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/XBasic \ No newline at end of file diff --git a/Lang/XBasic/Twos-complement b/Lang/XBasic/Twos-complement deleted file mode 120000 index 651db096a5..0000000000 --- a/Lang/XBasic/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/XBasic \ No newline at end of file diff --git a/Lang/XPL0/AKS-test-for-primes b/Lang/XPL0/AKS-test-for-primes deleted file mode 120000 index 16474e53df..0000000000 --- a/Lang/XPL0/AKS-test-for-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/AKS-test-for-primes/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Arithmetic-geometric-mean-Calculate-Pi b/Lang/XPL0/Arithmetic-geometric-mean-Calculate-Pi deleted file mode 120000 index 34337f3f2d..0000000000 --- a/Lang/XPL0/Arithmetic-geometric-mean-Calculate-Pi +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-geometric-mean-Calculate-Pi/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Average-loop-length b/Lang/XPL0/Average-loop-length deleted file mode 120000 index b29c22437d..0000000000 --- a/Lang/XPL0/Average-loop-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Average-loop-length/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Bifid-cipher b/Lang/XPL0/Bifid-cipher deleted file mode 120000 index 224f51d976..0000000000 --- a/Lang/XPL0/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Bin-given-limits b/Lang/XPL0/Bin-given-limits deleted file mode 120000 index d093bfd306..0000000000 --- a/Lang/XPL0/Bin-given-limits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bin-given-limits/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Bioinformatics-base-count b/Lang/XPL0/Bioinformatics-base-count new file mode 120000 index 0000000000..485c648b6c --- /dev/null +++ b/Lang/XPL0/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Cistercian-numerals b/Lang/XPL0/Cistercian-numerals deleted file mode 120000 index c2ce89db06..0000000000 --- a/Lang/XPL0/Cistercian-numerals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cistercian-numerals/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Count-the-coins b/Lang/XPL0/Count-the-coins deleted file mode 120000 index 7a91396756..0000000000 --- a/Lang/XPL0/Count-the-coins +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-the-coins/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Create-an-object-at-a-given-address b/Lang/XPL0/Create-an-object-at-a-given-address deleted file mode 120000 index 10ca5e5926..0000000000 --- a/Lang/XPL0/Create-an-object-at-a-given-address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Create-an-object-at-a-given-address/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Currency b/Lang/XPL0/Currency deleted file mode 120000 index 05aee1c3b1..0000000000 --- a/Lang/XPL0/Currency +++ /dev/null @@ -1 +0,0 @@ -../../Task/Currency/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Determinant-and-permanent b/Lang/XPL0/Determinant-and-permanent deleted file mode 120000 index ffda863c8d..0000000000 --- a/Lang/XPL0/Determinant-and-permanent +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determinant-and-permanent/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Display-a-linear-combination b/Lang/XPL0/Display-a-linear-combination deleted file mode 120000 index bd14d58a74..0000000000 --- a/Lang/XPL0/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Draw-a-clock b/Lang/XPL0/Draw-a-clock deleted file mode 120000 index 7d1040eda3..0000000000 --- a/Lang/XPL0/Draw-a-clock +++ /dev/null @@ -1 +0,0 @@ -../../Task/Draw-a-clock/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Find-common-directory-path b/Lang/XPL0/Find-common-directory-path deleted file mode 120000 index 29427fdf4b..0000000000 --- a/Lang/XPL0/Find-common-directory-path +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-common-directory-path/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Fivenum b/Lang/XPL0/Fivenum deleted file mode 120000 index 2bd4e43614..0000000000 --- a/Lang/XPL0/Fivenum +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fivenum/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Floyd-Warshall-algorithm b/Lang/XPL0/Floyd-Warshall-algorithm deleted file mode 120000 index ffd21f6111..0000000000 --- a/Lang/XPL0/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/GUI-component-interaction b/Lang/XPL0/GUI-component-interaction deleted file mode 120000 index 8745be4ca4..0000000000 --- a/Lang/XPL0/GUI-component-interaction +++ /dev/null @@ -1 +0,0 @@ -../../Task/GUI-component-interaction/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Gaussian-elimination b/Lang/XPL0/Gaussian-elimination deleted file mode 120000 index 6a178b8f16..0000000000 --- a/Lang/XPL0/Gaussian-elimination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gaussian-elimination/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Hex-words b/Lang/XPL0/Hex-words deleted file mode 120000 index 4ed3e2b550..0000000000 --- a/Lang/XPL0/Hex-words +++ /dev/null @@ -1 +0,0 @@ -../../Task/Hex-words/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/I-before-E-except-after-C b/Lang/XPL0/I-before-E-except-after-C deleted file mode 120000 index 4eed624cc7..0000000000 --- a/Lang/XPL0/I-before-E-except-after-C +++ /dev/null @@ -1 +0,0 @@ -../../Task/I-before-E-except-after-C/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/IBAN b/Lang/XPL0/IBAN deleted file mode 120000 index ce771b5589..0000000000 --- a/Lang/XPL0/IBAN +++ /dev/null @@ -1 +0,0 @@ -../../Task/IBAN/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Joystick-position b/Lang/XPL0/Joystick-position deleted file mode 120000 index 0ba634deb3..0000000000 --- a/Lang/XPL0/Joystick-position +++ /dev/null @@ -1 +0,0 @@ -../../Task/Joystick-position/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Knapsack-problem-Bounded b/Lang/XPL0/Knapsack-problem-Bounded deleted file mode 120000 index 3ed5296747..0000000000 --- a/Lang/XPL0/Knapsack-problem-Bounded +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-Bounded/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Largest-int-from-concatenated-ints b/Lang/XPL0/Largest-int-from-concatenated-ints deleted file mode 120000 index c906e77c82..0000000000 --- a/Lang/XPL0/Largest-int-from-concatenated-ints +++ /dev/null @@ -1 +0,0 @@ -../../Task/Largest-int-from-concatenated-ints/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Last-letter-first-letter b/Lang/XPL0/Last-letter-first-letter deleted file mode 120000 index f77624cd59..0000000000 --- a/Lang/XPL0/Last-letter-first-letter +++ /dev/null @@ -1 +0,0 @@ -../../Task/Last-letter-first-letter/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Left-factorials b/Lang/XPL0/Left-factorials deleted file mode 120000 index c9ff64d1b6..0000000000 --- a/Lang/XPL0/Left-factorials +++ /dev/null @@ -1 +0,0 @@ -../../Task/Left-factorials/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Levenshtein-distance b/Lang/XPL0/Levenshtein-distance deleted file mode 120000 index 0172b975ff..0000000000 --- a/Lang/XPL0/Levenshtein-distance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Levenshtein-distance/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Long-literals-with-continuations b/Lang/XPL0/Long-literals-with-continuations deleted file mode 120000 index d850e008c5..0000000000 --- a/Lang/XPL0/Long-literals-with-continuations +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-literals-with-continuations/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Long-primes b/Lang/XPL0/Long-primes deleted file mode 120000 index 4b515cb676..0000000000 --- a/Lang/XPL0/Long-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Long-primes/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Longest-increasing-subsequence b/Lang/XPL0/Longest-increasing-subsequence deleted file mode 120000 index bed908bffb..0000000000 --- a/Lang/XPL0/Longest-increasing-subsequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-increasing-subsequence/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Longest-string-challenge b/Lang/XPL0/Longest-string-challenge deleted file mode 120000 index 08f945d149..0000000000 --- a/Lang/XPL0/Longest-string-challenge +++ /dev/null @@ -1 +0,0 @@ -../../Task/Longest-string-challenge/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Magic-squares-of-doubly-even-order b/Lang/XPL0/Magic-squares-of-doubly-even-order deleted file mode 120000 index 31327c15e8..0000000000 --- a/Lang/XPL0/Magic-squares-of-doubly-even-order +++ /dev/null @@ -1 +0,0 @@ -../../Task/Magic-squares-of-doubly-even-order/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Meissel-Mertens-constant b/Lang/XPL0/Meissel-Mertens-constant new file mode 120000 index 0000000000..8f73d24896 --- /dev/null +++ b/Lang/XPL0/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Modified-random-distribution b/Lang/XPL0/Modified-random-distribution deleted file mode 120000 index dfbceea492..0000000000 --- a/Lang/XPL0/Modified-random-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modified-random-distribution/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Numerical-integration-Gauss-Legendre-Quadrature b/Lang/XPL0/Numerical-integration-Gauss-Legendre-Quadrature deleted file mode 120000 index a05d2a56e6..0000000000 --- a/Lang/XPL0/Numerical-integration-Gauss-Legendre-Quadrature +++ /dev/null @@ -1 +0,0 @@ -../../Task/Numerical-integration-Gauss-Legendre-Quadrature/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Phrase-reversals b/Lang/XPL0/Phrase-reversals deleted file mode 120000 index 2aa0453c8b..0000000000 --- a/Lang/XPL0/Phrase-reversals +++ /dev/null @@ -1 +0,0 @@ -../../Task/Phrase-reversals/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Poker-hand-analyser b/Lang/XPL0/Poker-hand-analyser deleted file mode 120000 index 5fc0329088..0000000000 --- a/Lang/XPL0/Poker-hand-analyser +++ /dev/null @@ -1 +0,0 @@ -../../Task/Poker-hand-analyser/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Polynomial-regression b/Lang/XPL0/Polynomial-regression deleted file mode 120000 index 01f5c8d75a..0000000000 --- a/Lang/XPL0/Polynomial-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Polynomial-regression/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Primorial-numbers b/Lang/XPL0/Primorial-numbers deleted file mode 120000 index 6512549f63..0000000000 --- a/Lang/XPL0/Primorial-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Primorial-numbers/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Quaternion-type b/Lang/XPL0/Quaternion-type new file mode 120000 index 0000000000..03ac35a45d --- /dev/null +++ b/Lang/XPL0/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Read-a-configuration-file b/Lang/XPL0/Read-a-configuration-file deleted file mode 120000 index 338d315c72..0000000000 --- a/Lang/XPL0/Read-a-configuration-file +++ /dev/null @@ -1 +0,0 @@ -../../Task/Read-a-configuration-file/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Rep-string b/Lang/XPL0/Rep-string deleted file mode 120000 index d90ffe53d7..0000000000 --- a/Lang/XPL0/Rep-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Rep-string/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/XPL0/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/XPL0/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/XPL0/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/XPL0/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/XPL0/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/XPL0/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/XPL0/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/XPL0/Sierpinski-square-curve b/Lang/XPL0/Sierpinski-square-curve deleted file mode 120000 index f8060a7322..0000000000 --- a/Lang/XPL0/Sierpinski-square-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sierpinski-square-curve/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Sort-numbers-lexicographically b/Lang/XPL0/Sort-numbers-lexicographically deleted file mode 120000 index f415eaee2b..0000000000 --- a/Lang/XPL0/Sort-numbers-lexicographically +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-numbers-lexicographically/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Sort-three-variables b/Lang/XPL0/Sort-three-variables deleted file mode 120000 index 6a041ebc3e..0000000000 --- a/Lang/XPL0/Sort-three-variables +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sort-three-variables/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Sorting-Algorithms-Circle-Sort b/Lang/XPL0/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..a68d7b0426 --- /dev/null +++ b/Lang/XPL0/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Sorting-algorithms-Patience-sort b/Lang/XPL0/Sorting-algorithms-Patience-sort deleted file mode 120000 index 5ca2b1424f..0000000000 --- a/Lang/XPL0/Sorting-algorithms-Patience-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Patience-sort/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Sorting-algorithms-Permutation-sort b/Lang/XPL0/Sorting-algorithms-Permutation-sort deleted file mode 120000 index a50b3c1c69..0000000000 --- a/Lang/XPL0/Sorting-algorithms-Permutation-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Permutation-sort/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Square-free-integers b/Lang/XPL0/Square-free-integers deleted file mode 120000 index 791b667893..0000000000 --- a/Lang/XPL0/Square-free-integers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Square-free-integers/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Stern-Brocot-sequence b/Lang/XPL0/Stern-Brocot-sequence deleted file mode 120000 index a67d0ce67d..0000000000 --- a/Lang/XPL0/Stern-Brocot-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stern-Brocot-sequence/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Strip-block-comments b/Lang/XPL0/Strip-block-comments deleted file mode 120000 index 734cf1b909..0000000000 --- a/Lang/XPL0/Strip-block-comments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strip-block-comments/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Substitution-cipher b/Lang/XPL0/Substitution-cipher deleted file mode 120000 index e26a399b99..0000000000 --- a/Lang/XPL0/Substitution-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Substitution-cipher/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Subtractive-generator b/Lang/XPL0/Subtractive-generator deleted file mode 120000 index e69b094ce6..0000000000 --- a/Lang/XPL0/Subtractive-generator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Subtractive-generator/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Text-processing-1 b/Lang/XPL0/Text-processing-1 deleted file mode 120000 index 395543f260..0000000000 --- a/Lang/XPL0/Text-processing-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Text-processing-1/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Text-processing-2 b/Lang/XPL0/Text-processing-2 deleted file mode 120000 index 8d2b9925ef..0000000000 --- a/Lang/XPL0/Text-processing-2 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Text-processing-2/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Thieles-interpolation-formula b/Lang/XPL0/Thieles-interpolation-formula deleted file mode 120000 index fcd209a547..0000000000 --- a/Lang/XPL0/Thieles-interpolation-formula +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thieles-interpolation-formula/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/User-input-Graphical b/Lang/XPL0/User-input-Graphical deleted file mode 120000 index 9b08de25b4..0000000000 --- a/Lang/XPL0/User-input-Graphical +++ /dev/null @@ -1 +0,0 @@ -../../Task/User-input-Graphical/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Visualize-a-tree b/Lang/XPL0/Visualize-a-tree deleted file mode 120000 index 022c2d2ff2..0000000000 --- a/Lang/XPL0/Visualize-a-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Visualize-a-tree/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/Window-creation b/Lang/XPL0/Window-creation deleted file mode 120000 index 8cbc53df4a..0000000000 --- a/Lang/XPL0/Window-creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Window-creation/XPL0 \ No newline at end of file diff --git a/Lang/XPL0/World-Cup-group-stage b/Lang/XPL0/World-Cup-group-stage deleted file mode 120000 index 4312a43d55..0000000000 --- a/Lang/XPL0/World-Cup-group-stage +++ /dev/null @@ -1 +0,0 @@ -../../Task/World-Cup-group-stage/XPL0 \ No newline at end of file diff --git a/Lang/YAMLScript/00-LANG.txt b/Lang/YAMLScript/00-LANG.txt index 7e44330500..1ead096361 100644 --- a/Lang/YAMLScript/00-LANG.txt +++ b/Lang/YAMLScript/00-LANG.txt @@ -4,33 +4,22 @@ {{language programming paradigm|hosted}} {{implementation|Lisp}} -'''[https://yamlscript.org YS (pronounced "wise", aka YAMLScript)]''' is a new programming language that uses [https://yaml.org/ YAML] as its syntax. It is a complete, functional, general purpose language, but can also be easily embedded in YAML files to make them dynamic at load time. Most existing YAML files and all JSON files are already valid YS programs. +'''[https://yamlscript.org YAMLScript]''' is a new programming language that uses [https://yaml.org/ YAML] as its syntax. It is a complete, functional, general purpose language, but can also be easily embedded in YAML files to make them dynamic at load time. Most existing YAML files and all JSON files are already valid YAMLScript programs. YAMLScript has a compiler/interpreter CLI program called [https://github.com/yaml/yamlscript/releases ys] and is also available in several programming languages as a binding module to the [https://github.com/yaml/yamlscript/releases libyamlscript.so] shared library: -You can learn YS for free (with help from experienced mentors) at [https://exercism.org/tracks/yamlscript Exercism]. - -YS has a compiler/interpreter CLI program called [https://github.com/yaml/yamlscript/releases ys] and is also available in several programming languages as a binding module to the [https://github.com/yaml/yamlscript/releases libys.so] shared library: - -* [https://www.nuget.org/packages/YAMLScript/ C#] * [https://clojars.org/org.yamlscript/clj-yamlscript Clojure] -* [https://shardbox.org/shards/yamlscript Crystal] -* [https://github.com/yaml/yamlscript-go Go] -* [https://hackage.haskell.org/package/yamlscript Haskell] * [https://clojars.org/org.yamlscript/yamlscript Java] -* [https://juliahub.com/ui/Packages/General/YAMLScript Julia] -* [https://luarocks.org/modules/ingy/yamlscript Lua] * [https://www.npmjs.com/package/@yaml/yamlscript NodeJS] * [https://metacpan.org/pod/YAMLScript Perl] -* [https://packagist.org/packages/yaml/yamlscript PHP] * [https://pypi.org/project/yamlscript/ Python] * [https://raku.land/zef:ingy/YAMLScript Raku] * [https://rubygems.org/gems/yamlscript Ruby] * [https://crates.io/crates/yamlscript Rust] -==Installing YS== +==Installing YAMLScript== -Run this command to install the ys command line YS runner/loader/compiler binary. +Run this command to install the ys command line YAMLScript runner/loader/compiler program. - curl https://getys.org/ys | bash + curl -sSL yamlscript.org/install | bash That will install $HOME/.local/bin/ys. If $HOME/.local/bin is not in your PATH, run: @@ -39,77 +28,14 @@ That will install $HOME/.local/bin/ys. If $HOME/.local/bin -#!/usr/bin/env ys-0 - -# Create a Rosetta Code entry for a YS program: - -defn main(program *args): - say: |- - - =={{header|YAMLScript}}== - - $chomp(program:read) - - - when-not ENV.NO_OUT.?: - command =: "ys $program$fmt-args(args)" - output =: bash(command).out:chomp - say: |- - - {{out}} -

    -      $ $command
    -      $output
    -      </pre>
    -
    -defn fmt-args(args):
    -  args =: !:joins
    -    map _ args:
    -      \(re-matches(/[-+,.:\w]+/ _:S)
    -        .if(_ pr-str(_)))
    -  when args.?: " $args"
    -
    - -You run it like this: - -
    -$ ys rosetta-code-ys-entry fibonacci-sequence.ys 5
    -
    -=={{header|YAMLScript}}==
    -
    -!YS-v0
    -
    -defn main(n=10):
    -  loop a 0, b 1, i 1:
    -    say: a
    -    when i < n:
    -      recur: b, (a + b), i.++
    -
    -
    -{{out}}
    -
    -$ ys fibonacci-sequence.ys 5
    -0
    -1
    -1
    -2
    -3
    -</pre>
    -
    \ No newline at end of file +See https://yamlscript.org for more information. \ No newline at end of file diff --git a/Lang/YAMLScript/100-prisoners b/Lang/YAMLScript/100-prisoners deleted file mode 120000 index bebf8d5d8f..0000000000 --- a/Lang/YAMLScript/100-prisoners +++ /dev/null @@ -1 +0,0 @@ -../../Task/100-prisoners/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/21-game b/Lang/YAMLScript/21-game deleted file mode 120000 index 80f0a3594c..0000000000 --- a/Lang/YAMLScript/21-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/21-game/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Array-length b/Lang/YAMLScript/Array-length deleted file mode 120000 index 6ab2707560..0000000000 --- a/Lang/YAMLScript/Array-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Array-length/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Average-loop-length b/Lang/YAMLScript/Average-loop-length deleted file mode 120000 index 21710eecef..0000000000 --- a/Lang/YAMLScript/Average-loop-length +++ /dev/null @@ -1 +0,0 @@ -../../Task/Average-loop-length/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Base64-decode-data b/Lang/YAMLScript/Base64-decode-data deleted file mode 120000 index 0f66fa60fa..0000000000 --- a/Lang/YAMLScript/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Best-shuffle b/Lang/YAMLScript/Best-shuffle deleted file mode 120000 index 99ffbfc9b1..0000000000 --- a/Lang/YAMLScript/Best-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Best-shuffle/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Conways-Game-of-Life b/Lang/YAMLScript/Conways-Game-of-Life deleted file mode 120000 index 3153c05b26..0000000000 --- a/Lang/YAMLScript/Conways-Game-of-Life +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conways-Game-of-Life/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Dragon-curve b/Lang/YAMLScript/Dragon-curve deleted file mode 120000 index 7f9deedb82..0000000000 --- a/Lang/YAMLScript/Dragon-curve +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dragon-curve/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Even-or-odd b/Lang/YAMLScript/Even-or-odd deleted file mode 120000 index 95556dd2eb..0000000000 --- a/Lang/YAMLScript/Even-or-odd +++ /dev/null @@ -1 +0,0 @@ -../../Task/Even-or-odd/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Floyds-triangle b/Lang/YAMLScript/Floyds-triangle deleted file mode 120000 index 9c388f69f3..0000000000 --- a/Lang/YAMLScript/Floyds-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyds-triangle/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Function-definition b/Lang/YAMLScript/Function-definition deleted file mode 120000 index cc6f6727f4..0000000000 --- a/Lang/YAMLScript/Function-definition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Function-definition/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Greatest-common-divisor b/Lang/YAMLScript/Greatest-common-divisor deleted file mode 120000 index 134280cc97..0000000000 --- a/Lang/YAMLScript/Greatest-common-divisor +++ /dev/null @@ -1 +0,0 @@ -../../Task/Greatest-common-divisor/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Integer-comparison b/Lang/YAMLScript/Integer-comparison deleted file mode 120000 index 47b0c04990..0000000000 --- a/Lang/YAMLScript/Integer-comparison +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-comparison/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Integer-overflow b/Lang/YAMLScript/Integer-overflow deleted file mode 120000 index fe6aaac55c..0000000000 --- a/Lang/YAMLScript/Integer-overflow +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-overflow/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/JortSort b/Lang/YAMLScript/JortSort deleted file mode 120000 index 28bb797476..0000000000 --- a/Lang/YAMLScript/JortSort +++ /dev/null @@ -1 +0,0 @@ -../../Task/JortSort/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Knuth-shuffle b/Lang/YAMLScript/Knuth-shuffle deleted file mode 120000 index 676dc89553..0000000000 --- a/Lang/YAMLScript/Knuth-shuffle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knuth-shuffle/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Luhn-test-of-credit-card-numbers b/Lang/YAMLScript/Luhn-test-of-credit-card-numbers deleted file mode 120000 index f96e4c4d21..0000000000 --- a/Lang/YAMLScript/Luhn-test-of-credit-card-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Luhn-test-of-credit-card-numbers/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Munching-squares b/Lang/YAMLScript/Munching-squares deleted file mode 120000 index 2b7870226f..0000000000 --- a/Lang/YAMLScript/Munching-squares +++ /dev/null @@ -1 +0,0 @@ -../../Task/Munching-squares/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Next-highest-int-from-digits b/Lang/YAMLScript/Next-highest-int-from-digits deleted file mode 120000 index 6dd0221650..0000000000 --- a/Lang/YAMLScript/Next-highest-int-from-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Next-highest-int-from-digits/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/One-dimensional-cellular-automata b/Lang/YAMLScript/One-dimensional-cellular-automata deleted file mode 120000 index 74c105b72e..0000000000 --- a/Lang/YAMLScript/One-dimensional-cellular-automata +++ /dev/null @@ -1 +0,0 @@ -../../Task/One-dimensional-cellular-automata/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Palindrome-detection b/Lang/YAMLScript/Palindrome-detection deleted file mode 120000 index fc4c1cdd2f..0000000000 --- a/Lang/YAMLScript/Palindrome-detection +++ /dev/null @@ -1 +0,0 @@ -../../Task/Palindrome-detection/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Quickselect-algorithm b/Lang/YAMLScript/Quickselect-algorithm deleted file mode 120000 index 978322a04a..0000000000 --- a/Lang/YAMLScript/Quickselect-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quickselect-algorithm/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Sieve-of-Eratosthenes b/Lang/YAMLScript/Sieve-of-Eratosthenes deleted file mode 120000 index b42b0394f6..0000000000 --- a/Lang/YAMLScript/Sieve-of-Eratosthenes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sieve-of-Eratosthenes/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Sparkline-in-unicode b/Lang/YAMLScript/Sparkline-in-unicode deleted file mode 120000 index ae2a07413c..0000000000 --- a/Lang/YAMLScript/Sparkline-in-unicode +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sparkline-in-unicode/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Terminal-control-Ringing-the-terminal-bell b/Lang/YAMLScript/Terminal-control-Ringing-the-terminal-bell deleted file mode 120000 index 21baf990a9..0000000000 --- a/Lang/YAMLScript/Terminal-control-Ringing-the-terminal-bell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Terminal-control-Ringing-the-terminal-bell/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Tokenize-a-string b/Lang/YAMLScript/Tokenize-a-string deleted file mode 120000 index 4c9f0efdcc..0000000000 --- a/Lang/YAMLScript/Tokenize-a-string +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tokenize-a-string/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Undefined-values b/Lang/YAMLScript/Undefined-values deleted file mode 120000 index ff7699a995..0000000000 --- a/Lang/YAMLScript/Undefined-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Undefined-values/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Validate-International-Securities-Identification-Number b/Lang/YAMLScript/Validate-International-Securities-Identification-Number deleted file mode 120000 index 40c80b8d7d..0000000000 --- a/Lang/YAMLScript/Validate-International-Securities-Identification-Number +++ /dev/null @@ -1 +0,0 @@ -../../Task/Validate-International-Securities-Identification-Number/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Van-der-Corput-sequence b/Lang/YAMLScript/Van-der-Corput-sequence deleted file mode 120000 index 654ffd3cbb..0000000000 --- a/Lang/YAMLScript/Van-der-Corput-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Van-der-Corput-sequence/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Weird-numbers b/Lang/YAMLScript/Weird-numbers deleted file mode 120000 index bf5aa481d4..0000000000 --- a/Lang/YAMLScript/Weird-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Weird-numbers/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Xiaolin-Wus-line-algorithm b/Lang/YAMLScript/Xiaolin-Wus-line-algorithm deleted file mode 120000 index be316f6902..0000000000 --- a/Lang/YAMLScript/Xiaolin-Wus-line-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Xiaolin-Wus-line-algorithm/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Yellowstone-sequence b/Lang/YAMLScript/Yellowstone-sequence deleted file mode 120000 index efac2d410f..0000000000 --- a/Lang/YAMLScript/Yellowstone-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Yellowstone-sequence/YAMLScript \ No newline at end of file diff --git a/Lang/YAMLScript/Zig-zag-matrix b/Lang/YAMLScript/Zig-zag-matrix deleted file mode 120000 index 691eda7cd9..0000000000 --- a/Lang/YAMLScript/Zig-zag-matrix +++ /dev/null @@ -1 +0,0 @@ -../../Task/Zig-zag-matrix/YAMLScript \ No newline at end of file diff --git a/Lang/Yabasic/Associative-array-Merging b/Lang/Yabasic/Associative-array-Merging deleted file mode 120000 index 446716ab58..0000000000 --- a/Lang/Yabasic/Associative-array-Merging +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Merging/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Averages-Mean-angle b/Lang/Yabasic/Averages-Mean-angle deleted file mode 120000 index ee2478f1ef..0000000000 --- a/Lang/Yabasic/Averages-Mean-angle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Averages-Mean-angle/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Determine-if-a-string-has-all-the-same-characters b/Lang/Yabasic/Determine-if-a-string-has-all-the-same-characters deleted file mode 120000 index c1da4813dd..0000000000 --- a/Lang/Yabasic/Determine-if-a-string-has-all-the-same-characters +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-has-all-the-same-characters/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Determine-sentence-type b/Lang/Yabasic/Determine-sentence-type deleted file mode 120000 index 54129c23c0..0000000000 --- a/Lang/Yabasic/Determine-sentence-type +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-sentence-type/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Display-a-linear-combination b/Lang/Yabasic/Display-a-linear-combination deleted file mode 120000 index 3089327b6e..0000000000 --- a/Lang/Yabasic/Display-a-linear-combination +++ /dev/null @@ -1 +0,0 @@ -../../Task/Display-a-linear-combination/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Diversity-prediction-theorem b/Lang/Yabasic/Diversity-prediction-theorem deleted file mode 120000 index 5dec4248b2..0000000000 --- a/Lang/Yabasic/Diversity-prediction-theorem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Diversity-prediction-theorem/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Empty-program b/Lang/Yabasic/Empty-program new file mode 120000 index 0000000000..86460983fb --- /dev/null +++ b/Lang/Yabasic/Empty-program @@ -0,0 +1 @@ +../../Task/Empty-program/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Evaluate-binomial-coefficients b/Lang/Yabasic/Evaluate-binomial-coefficients deleted file mode 120000 index 2d010b1897..0000000000 --- a/Lang/Yabasic/Evaluate-binomial-coefficients +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evaluate-binomial-coefficients/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Kronecker-product b/Lang/Yabasic/Kronecker-product deleted file mode 120000 index 64e2f55421..0000000000 --- a/Lang/Yabasic/Kronecker-product +++ /dev/null @@ -1 +0,0 @@ -../../Task/Kronecker-product/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Meissel-Mertens-constant b/Lang/Yabasic/Meissel-Mertens-constant new file mode 120000 index 0000000000..2300a0e96d --- /dev/null +++ b/Lang/Yabasic/Meissel-Mertens-constant @@ -0,0 +1 @@ +../../Task/Meissel-Mertens-constant/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Modular-inverse b/Lang/Yabasic/Modular-inverse deleted file mode 120000 index 996963babe..0000000000 --- a/Lang/Yabasic/Modular-inverse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-inverse/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Multiple-regression b/Lang/Yabasic/Multiple-regression deleted file mode 120000 index 047c89f1aa..0000000000 --- a/Lang/Yabasic/Multiple-regression +++ /dev/null @@ -1 +0,0 @@ -../../Task/Multiple-regression/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Nested-templated-data b/Lang/Yabasic/Nested-templated-data deleted file mode 120000 index 026a122d79..0000000000 --- a/Lang/Yabasic/Nested-templated-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Nested-templated-data/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Pascals-triangle b/Lang/Yabasic/Pascals-triangle deleted file mode 120000 index 9cb7c7cced..0000000000 --- a/Lang/Yabasic/Pascals-triangle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pascals-triangle/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Yabasic/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Yabasic/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Yabasic/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Yabasic/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Yabasic/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Yabasic/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Yabasic/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Yabasic/Sexy-primes b/Lang/Yabasic/Sexy-primes deleted file mode 120000 index a3fa026246..0000000000 --- a/Lang/Yabasic/Sexy-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sexy-primes/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Shell-one-liner b/Lang/Yabasic/Shell-one-liner deleted file mode 120000 index 04ae90ab0a..0000000000 --- a/Lang/Yabasic/Shell-one-liner +++ /dev/null @@ -1 +0,0 @@ -../../Task/Shell-one-liner/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Sorting-algorithms-Counting-sort b/Lang/Yabasic/Sorting-algorithms-Counting-sort deleted file mode 120000 index c5fee45d6b..0000000000 --- a/Lang/Yabasic/Sorting-algorithms-Counting-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Counting-sort/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Sorting-algorithms-Stooge-sort b/Lang/Yabasic/Sorting-algorithms-Stooge-sort deleted file mode 120000 index 920cab2b30..0000000000 --- a/Lang/Yabasic/Sorting-algorithms-Stooge-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Stooge-sort/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Soundex b/Lang/Yabasic/Soundex deleted file mode 120000 index 154bd39b85..0000000000 --- a/Lang/Yabasic/Soundex +++ /dev/null @@ -1 +0,0 @@ -../../Task/Soundex/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Statistics-Normal-distribution b/Lang/Yabasic/Statistics-Normal-distribution deleted file mode 120000 index f9d32e077f..0000000000 --- a/Lang/Yabasic/Statistics-Normal-distribution +++ /dev/null @@ -1 +0,0 @@ -../../Task/Statistics-Normal-distribution/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/The-Name-Game b/Lang/Yabasic/The-Name-Game deleted file mode 120000 index 97bfdf9347..0000000000 --- a/Lang/Yabasic/The-Name-Game +++ /dev/null @@ -1 +0,0 @@ -../../Task/The-Name-Game/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Tree-datastructures b/Lang/Yabasic/Tree-datastructures deleted file mode 120000 index da4a839e0d..0000000000 --- a/Lang/Yabasic/Tree-datastructures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-datastructures/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Twos-complement b/Lang/Yabasic/Twos-complement deleted file mode 120000 index 3889fdcaf6..0000000000 --- a/Lang/Yabasic/Twos-complement +++ /dev/null @@ -1 +0,0 @@ -../../Task/Twos-complement/Yabasic \ No newline at end of file diff --git a/Lang/Yabasic/Web-scraping b/Lang/Yabasic/Web-scraping deleted file mode 120000 index 2a4cb5ee13..0000000000 --- a/Lang/Yabasic/Web-scraping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Web-scraping/Yabasic \ No newline at end of file diff --git a/Lang/ZED/00-LANG.txt b/Lang/ZED/00-LANG.txt index 5b0358bc17..b0cb425a84 100644 --- a/Lang/ZED/00-LANG.txt +++ b/Lang/ZED/00-LANG.txt @@ -12,9 +12,8 @@ Development of ZEDc is also happening on GitHub: https://github.com/zelah/ZEDc ZED can be seen compiling itself here: http://ideone.com/ARpMCM -(begin (define (ZED* ZEDnumber1 ZEDnumber2) (cond (#t (* ZEDnumber1 ZEDnumber2)) (else err))) (define (ZED+ ZEDnumber1 ZEDnumber2) (cond (#t (+ ZEDnumber1 ZEDnumber2)) (else err))) (define (ZED- ZEDnumber1 ZEDnumber2) (cond (#t (- ZEDnumber1 ZEDnumber2)) (else err))) (define (ZED/ ZEDnumber1 ZEDnumber2) (cond (#t (/ ZEDnumber1 ZEDnumber2)) (else err))) (define (ZED= value1 value2) (cond (#t (eqv? value1 value2)) (else err))) (define (ZEDadd-between! item list collect) (cond ((null? list) collect) ((null? (cdr list)) (cons (car list) collect)) (#t (ZEDadd-between! item (cdr list) (cons item (cons (car list) collect)))) (else err))) (define (ZEDadd-between item list) (cond (#t (reverse (ZEDadd-between! item list (quote ())))) (else err))) (define (ZEDadd-between-ra list item) (cond (#t (reverse (ZEDadd-between! item list (quote ())))) (else err))) (define (ZEDalpha) (cond (#t (ZEDwrite-all (ZEDrd (quote ()) append (ZEDrd (quote ()) append (ZEDnewlines (ZEDby-four (ZEDfunction-sort (ZEDsentences (ZEDleading-newline (ZEDspace-newline (ZEDtab-replace (ZEDnewline-space-tab-repeats (ZEDnewline-space (ZEDfilter ZEDnot-return? (ZEDreplace-trailing-white-space (ZEDread-all)))))))))))))))) (else err))) (define (ZEDapplication? expression) (cond (#t (and (not (null? expression)) (pair? (car expression)) (null? (cdar expression)))) (else err))) (define (ZEDarity arity-hash function) (cond (#t (cdr (assoc function arity-hash))) (else err))) (define (ZEDarity-hash! clause) (cond (#t (cons (ZEDclause-name clause) (ZEDclause-arity clause))) (else err))) (define (ZEDarity-hash program) (cond (#t (append (map ZEDarity-hash! program) (append (list (cons (quote ZED1) 1) (cons (quote ZED!) 1) (cons (quote ZED001) 1) (cons (quote or) 2) (cons (quote and) 2) (cons (quote begin) 2) (cons (quote ZEDc) 2) (cons (quote quote) 1)) (list (cons (quote ZED002) 2) (cons (quote ZED003) 3) (cons (quote ZED004) 4) (cons (quote ZED005) 5) (cons (quote ZED006) 6) (cons (quote ZED007) 7) (cons (quote ZED008) 8) (cons (quote ZED009) 9) (cons (quote ZED010) 10) (cons (quote ZED011) 11) (cons (quote ZED012) 12) (cons (quote ZED013) 13) (cons (quote ZED014) 14) (cons (quote ZED015) 15) (cons (quote ZED016) 16) (cons (quote ZED017) 17) (cons (quote ZED018) 18) (cons (quote ZED019) 19) (cons (quote ZED020) 20) (cons (quote ZED021) 21) (cons (quote ZED022) 22) (cons (quote ZED023) 23) (cons (quote ZED024) 24) (cons (quote ZED025) 25) (cons (quote ZED026) 26) (cons (quote ZED027) 27) (cons (quote ZED028) 28) (cons (quote ZED029) 29) (cons (quote ZED030) 30) (cons (quote ZED031) 31) (cons (quote ZED032) 32) (cons (quote ZED033) 33) (cons (quote ZED034) 34) (cons (quote ZED035) 35) (cons (quote ZED036) 36) (cons (quote ZED037) 37) (cons (quote ZED038) 38) (cons (quote ZED039) 39) (cons (quote ZED040) 40) (cons (quote ZED041) 41) (cons (quote ZED042) 42) (cons (quote ZED043) 43) (cons (quote ZED044) 44) (cons (quote ZED045) 45) (cons (quote ZED046) 46) (cons (quote ZED047) 47) (cons (quote ZED048) 48) (cons (quote ZED049) 49) (cons (quote ZED050) 50) (cons (quote ZED051) 51) (cons (quote ZED052) 52) (cons (quote ZED053) 53) (cons (quote ZED054) 54) (cons (quote ZED055) 55) (cons (quote ZED056) 56) (cons (quote ZED057) 57) (cons (quote ZED058) 58) (cons (quote ZED059) 59) (cons (quote ZED060) 60) (cons (quote ZED061) 61) (cons (quote ZED062) 62) (cons (quote ZED063) 63) (cons (quote ZED064) 64) (cons (quote ZED065) 65) (cons (quote ZED066) 66) (cons (quote ZED067) 67) (cons (quote ZED068) 68) (cons (quote ZED069) 69) (cons (quote ZED070) 70) (cons (quote ZED071) 71) (cons (quote ZED072) 72) (cons (quote ZED073) 73) (cons (quote ZED074) 74) (cons (quote ZED075) 75) (cons (quote ZED076) 76) (cons (quote ZED077) 77) (cons (quote ZED078) 78) (cons (quote ZED079) 79) (cons (quote ZED080) 80) (cons (quote ZED081) 81) (cons (quote ZED082) 82) (cons (quote ZED083) 83) (cons (quote ZED084) 84) (cons (quote ZED085) 85) (cons (quote ZED086) 86) (cons (quote ZED087) 87) (cons (quote ZED088) 88) (cons (quote ZED089) 89) (cons (quote ZED090) 90) (cons (quote ZED091) 91) (cons (quote ZED092) 92) (cons (quote ZED093) 93) (cons (quote ZED094) 94) (cons (quote ZED095) 95) (cons (quote ZED096) 96) (cons (quote ZED097) 97) (cons (quote ZED098) 98) (cons (quote ZED099) 99))))) (else err))) (define (ZEDby-four! sentences collect) (cond ((null? sentences) collect) (#t (ZEDby-four! (cddddr sentences) (cons (list (car sentences) (cadr sentences) (caddr sentences) (cadddr sentences)) collect))) (else err))) (define (ZEDby-four sentences) (cond (#t (reverse (ZEDby-four! sentences (quote ())))) (else err))) (define (ZEDby-three! sentences collect) (cond ((null? sentences) collect) (#t (ZEDby-three! (cdddr sentences) (cons (list (car sentences) (cadr sentences) (caddr sentences)) collect))) (else err))) (define (ZEDby-three sentences) (cond (#t (reverse (ZEDby-three! sentences (quote ())))) (else err))) (define (ZEDcharacter-less? character1 character2) (cond (#t (< (char->integer character1) (char->integer character2))) (else err))) (define (ZEDclause-arguments clause) (cond (#t (cadr clause)) (else err))) (define (ZEDclause-arguments-agree clause1 clause2) (cond ((equal? (ZEDclause-arguments clause1) (ZEDclause-arguments clause2)) (ZEDclause-arguments clause1)) (else err))) (define (ZEDclause-arity clause) (cond (#t (length (ZEDclause-arguments clause))) (else err))) (define (ZEDclause-body clause) (cond (#t (cddr clause)) (else err))) (define (ZEDclause-less? clause1 clause2) (cond (#t (ZEDsentence-less? (car clause1) (car clause2))) (else err))) (define (ZEDclause-name clause) (cond (#t (car clause)) (else err))) (define (ZEDclause-name-agree clause1 clause2) (cond ((eq? (ZEDclause-name clause1) (ZEDclause-name clause2)) (ZEDclause-name clause1)) (else err))) (define (ZEDcombine-all! program collect) (cond ((null? program) collect) ((null? (cdr program)) (cons (car program) collect)) ((eq? (ZEDclause-name (car program)) (ZEDclause-name (cadr program))) (ZEDcombine-all! (ZEDcombine-head-clauses program) collect)) (#t (ZEDcombine-all! (cdr program) (cons (car program) collect))) (else err))) (define (ZEDcombine-all program) (cond (#t (reverse (ZEDcombine-all! program (quote ())))) (else err))) (define (ZEDcombine-clauses clause1 clause2) (cond (#t (cons (ZEDclause-name-agree clause1 clause2) (cons (ZEDclause-arguments-agree clause1 clause2) (append (ZEDclause-body clause1) (ZEDclause-body clause2))))) (else err))) (define (ZEDcombine-head-clauses program) (cond (#t (cons (ZEDcombine-clauses (car program) (cadr program)) (cddr program))) (else err))) (define (ZEDcombine-program-clauses program) (cond (#t (ZEDcombine-all (ZEDready-program program))) (else err))) (define (ZEDcomp!) (cond (#t (ZEDcomp!a (ZEDcombine-program-clauses (ZEDby-three (ZEDread-sentences (ZEDdiscard-comments (ZEDfunction-sort (ZEDsentences (ZEDleading-newline (ZEDspace-newline (ZEDtab-replace (ZEDnewline-space-tab-repeats (ZEDnewline-space (ZEDfilter ZEDnot-return? (ZEDreplace-trailing-white-space (ZEDread-all)))))))))))))))) (else err))) (define (ZEDcomp!a combined) (cond (#t (ZEDcomp!aa (ZEDprogramize combined (ZEDarity-hash combined)))) (else err))) (define (ZEDcomp!aa programized) (cond (#t (write programized)) (else err))) (define (ZEDcomp) (cond (#t (ZEDcomp!)) (else err))) (define (ZEDcondefy! expressions collect) (cond ((null? expressions) collect) (#t (ZEDcondefy! (cddr expressions) (cons (append (car expressions) (cadr expressions)) collect))) (else err))) (define (ZEDcondefy expressions) (cond (#t (reverse (ZEDcondefy! expressions (quote ())))) (else err))) (define (ZEDcons ZEDvalue1 ZEDvalue2) (cond (#t (cons ZEDvalue1 ZEDvalue2)) (else err))) (define (ZEDcount ZEDnumber) (cond (#t (cons (delay ZEDnumber) (delay (ZEDcount (ZED+ ZEDnumber 1))))) (else err))) (define (ZEDcount-by ZEDstep ZEDnumber) (cond (#t (cons (delay ZEDnumber) (delay (ZEDcount-by ZEDstep (ZED+ ZEDnumber ZEDstep))))) (else err))) (define (ZEDdelay-wrap expression) (cond (#t (list (quote delay) expression)) (else err))) (define (ZEDdigit? character) (cond (#t (or (eqv? #\0 character) (eqv? #\1 character) (eqv? #\2 character) (eqv? #\3 character) (eqv? #\4 character) (eqv? #\5 character) (eqv? #\6 character) (eqv? #\7 character) (eqv? #\8 character) (eqv? #\9 character))) (else err))) (define (ZEDdiscard-comments! program collect) (cond ((null? program) collect) (#t (ZEDdiscard-comments! (cddddr program) (cons (cadddr program) (cons (caddr program) (cons (car program) collect))))) (else err))) (define (ZEDdiscard-comments program) (cond (#t (reverse (ZEDdiscard-comments! program (quote ())))) (else err))) (define (ZEDdr! value) (cond ((pair? value) (ZEDmp ZEDdr! (ZEDfirst 64 value))) (#t value) (else err))) (define (ZEDdr value) (cond (#t (begin (display (ZEDpr (ZEDdr! value))) (newline) (newline) value)) (else err))) (define (ZEDdrr value) (cond (#t (begin (display (ZEDpr value)) (newline) (newline) value)) (else err))) (define (ZEDfalse? noun-list) (cond (#t (equal? noun-list (list ## #\f #\a #\l #\s #\e))) (else err))) (define (ZEDfi function list) (cond ((null? list) (quote ())) ((function (if (promise? (car list)) (force (car list)) (car list))) (cons (delay (if (promise? (car list)) (force (car list)) (car list))) (delay (ZEDfi function (if (promise? (cdr list)) (force (cdr list)) (cdr list)))))) (#t (ZEDfi function (if (promise? (cdr list)) (force (cdr list)) (cdr list)))) (else err))) (define (ZEDfilter! predicate list collect) (cond ((null? list) collect) ((predicate (car list)) (ZEDfilter! predicate (cdr list) (cons (car list) collect))) (#t (ZEDfilter! predicate (cdr list) collect)) (else err))) (define (ZEDfilter predicate list) (cond (#t (reverse (ZEDfilter! predicate list (quote ())))) (else err))) (define (ZEDfirst! integer list collect) (cond ((or (zero? integer) (null? list)) (reverse collect)) ((not (pair? list)) (reverse (cons list collect))) ((> integer 0) (ZEDfirst! (- integer 1) (if (promise? (cdr list)) (force (cdr list)) (cdr list)) (cons (if (promise? (car list)) (force (car list)) (car list)) collect))) (else err))) (define (ZEDfirst integer list) (cond ((not (pair? list)) list) (#t (ZEDfirst! integer list (quote ()))) (else err))) (define (ZEDflatten! ZEDlist ZEDsub-list-found? ZEDcollect) (cond ((and (ZEDnull? ZEDlist) (ZEDnot ZEDsub-list-found?)) (ZEDreverse ZEDcollect)) ((ZEDnull? ZEDlist) (ZEDflatten! (ZEDreverse ZEDcollect) #f (quote ()))) ((ZEDnot (ZEDpair? ZEDlist)) (ZEDflatten! (quote ()) ZEDsub-list-found? (ZEDcons ZEDlist ZEDcollect))) ((ZEDpair? (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist))) (ZEDflatten! (if (promise? (cdr ZEDlist)) (force (cdr ZEDlist)) (cdr ZEDlist)) #t (ZEDcons (if (promise? (cdr (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist)))) (force (cdr (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist)))) (cdr (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist)))) (ZEDcons (if (promise? (car (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist)))) (force (car (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist)))) (car (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist)))) ZEDcollect)))) ((ZEDnull? (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist))) (ZEDflatten! (if (promise? (cdr ZEDlist)) (force (cdr ZEDlist)) (cdr ZEDlist)) ZEDsub-list-found? ZEDcollect)) (#t (ZEDflatten! (if (promise? (cdr ZEDlist)) (force (cdr ZEDlist)) (cdr ZEDlist)) ZEDsub-list-found? (ZEDcons (if (promise? (car ZEDlist)) (force (car ZEDlist)) (car ZEDlist)) ZEDcollect))) (else err))) (define (ZEDflatten ZEDlist) (cond (#t (ZEDflatten! ZEDlist #f (quote ()))) (else err))) (define (ZEDfor-each ZEDeffect ZEDlist) (cond (#t (for-each ZEDeffect ZEDlist)) (else err))) (define (ZEDfunction expression) (cond (#t (caar expression)) (else err))) (define (ZEDfunction-sort sentences) (cond (#t (ZEDrd (quote ()) append (ZEDsort ZEDclause-less? (ZEDby-four sentences)))) (else err))) (define (ZEDfunctionize clause arity-hash) (cond (#t (list (quote define) (cons (ZEDclause-name clause) (ZEDclause-arguments clause)) (cons (quote cond) (append (ZEDcondefy (ZEDmap-with ZEDschemefy (ZEDclause-body clause) arity-hash)) (list (list (quote else) (quote err))))))) (else err))) (define (ZEDgather-count?! candidate) (cond (#t (and (= 6 (length candidate)) (eqv? #\Z (car candidate)) (eqv? #\E (cadr candidate)) (eqv? #\D (caddr candidate)) (eqv? #\0 (cadddr candidate)) (ZEDdigit? (car (cddddr candidate))) (ZEDdigit? (cadr (cddddr candidate))))) (else err))) (define (ZEDgather-count? symbol) (cond (#t (ZEDgather-count?! (string->list (symbol->string symbol)))) (else err))) (define (ZEDgather-noun sentence) (cond ((null? sentence) (quote ())) ((eqv? #\space (car sentence)) (quote ())) (#t (cons (car sentence) (ZEDgather-noun (cdr sentence)))) (else err))) (define (ZEDgather-verb sentence) (cond ((eqv? #) (car sentence)) (quote ())) (#t (cons (car sentence) (ZEDgather-verb (cdr sentence)))) (else err))) (define (ZEDgr garbage value) (cond (#t (begin (ZEDdr garbage) value)) (else err))) (define (ZEDgrr garbage value) (cond (#t (begin (ZEDdrr garbage) value)) (else err))) (define (ZEDleading-newline program) (cond ((null? program) (quote ())) ((eqv? #\newline (car program)) (cdr program)) (#t program) (else err))) (define (ZEDliteral? literal-list) (cond (#t (eqv? #" (car literal-list))) (else err))) (define (ZEDmake-ZED ZED-list) (cond ((equal? ZED-list (list #\e #\r #\r)) "'err") ((equal? ZED-list (list #\n #\i #\l)) "'()") ((equal? ZED-list (list #\a #\n #\d)) "and") ((equal? ZED-list (list #\o #\r)) "or") ((equal? ZED-list (list #\q #\u #\o #\t #\e)) "quote") ((equal? ZED-list (list #\s #\e)) "begin") (#t (list->string (append (list #\Z #\E #\D) ZED-list))) (else err))) (define (ZEDmake-character noun-list) (cond (#t (list->string (cons ## (cons # -(cdr noun-list))))) (else err))) (define (ZEDmake-exact exact-list) (cond (#t (list->string (append (list ## #\e) exact-list))) (else err))) (define (ZEDmake-literal literal-list) (cond (#t (list->string (cdr (reverse (cdr (reverse literal-list)))))) (else err))) (define (ZEDmake-number-character noun-list) (cond (#t (list->string (list ## # -(integer->char (string->number (list->string (cddr noun-list))))))) (else err))) (define (ZEDmap-with! function list extra collect) (cond ((null? list) collect) (#t (ZEDmap-with! function (cdr list) extra (cons (function (car list) extra) collect))) (else err))) (define (ZEDmap-with function list extra) (cond (#t (reverse (ZEDmap-with! function list extra (quote ())))) (else err))) (define (ZEDmerge! comparator list1 list2 collect) (cond ((null? list2) (append (reverse collect) list1)) ((null? list1) (append (reverse collect) list2)) ((comparator (car list2) (car list1)) (ZEDmerge! comparator list1 (cdr list2) (cons (car list2) collect))) (#t (ZEDmerge! comparator (cdr list1) list2 (cons (car list1) collect))) (else err))) (define (ZEDmerge comparator list1 list2) (cond (#t (ZEDmerge! comparator list1 list2 (quote ()))) (else err))) (define (ZEDmp function list) (cond ((null? list) (quote ())) ((pair? list) (cons (delay (function (if (promise? (car list)) (force (car list)) (car list)))) (delay (ZEDmp function (if (promise? (cdr list)) (force (cdr list)) (cdr list)))))) (#t (function list)) (else err))) (define (ZEDnewline-space! program) (cond (#t (cons #\newline (ZEDnewline-space!a program))) (else err))) (define (ZEDnewline-space!a program) (cond (#t (ZEDnewline-space!aa program (reverse (ZEDnewline-space!ab program (quote ()))))) (else err))) (define (ZEDnewline-space!aa program transformed) (cond ((equal? program transformed) program) (#t (ZEDnewline-space!a transformed)) (else err))) (define (ZEDnewline-space!ab program collect) (cond ((null? program) collect) ((null? (cdr program)) (cons (car program) collect)) ((and (eqv? #\newline (car program)) (or (eqv? #\space (cadr program)) (eqv? #\ht (cadr program)))) (ZEDnewline-space!ab (cdr program) collect)) (#t (ZEDnewline-space!ab (cdr program) (cons (car program) collect))) (else err))) (define (ZEDnewline-space program) (cond (#t (ZEDnewline-space! program)) (else err))) (define (ZEDnewline-space-tab-repeats! program collect) (cond ((or (null? program) (null? (cdr program))) (append program collect)) ((and (eqv? #\newline (car program)) (eqv? #\newline (cadr program))) (ZEDnewline-space-tab-repeats! (cdr program) collect)) ((and (or (eqv? #\space (car program)) (eqv? #\ht (car program))) (or (eqv? #\space (cadr program)) (eqv? #\ht (cadr program)))) (ZEDnewline-space-tab-repeats! (cdr program) collect)) (#t (ZEDnewline-space-tab-repeats! (cdr program) (cons (car program) collect))) (else err))) (define (ZEDnewline-space-tab-repeats program) (cond (#t (reverse (ZEDnewline-space-tab-repeats! program (quote ())))) (else err))) (define (ZEDnewlines clauses) (cond (#t (ZEDadd-between-ra (ZEDmap-with ZEDadd-between-ra clauses (list #\newline)) (list (list #\newline #\newline)))) (else err))) (define (ZEDnormal-character? noun-list) (cond (#t (eqv? (car noun-list) ##)) (else err))) (define (ZEDnot ZEDvalue) (cond (#t (not ZEDvalue)) (else err))) (define (ZEDnot-return? character) (cond (#t (not (eqv? #\cr character))) (else err))) (define (ZEDnoun! noun-list number?) (cond (number? (ZEDmake-exact noun-list)) ((ZEDliteral? noun-list) (ZEDmake-literal noun-list)) ((ZEDtrue? noun-list) "#t") ((ZEDfalse? noun-list) "#f") ((ZEDnumber-character? noun-list) (ZEDmake-number-character noun-list)) ((ZEDnormal-character? noun-list) (ZEDmake-character noun-list)) (#t (ZEDmake-ZED noun-list)) (else err))) (define (ZEDnoun noun-list) (cond (#t (ZEDnoun! noun-list (string->number (list->string noun-list)))) (else err))) (define (ZEDnull? ZEDvalue) (cond (#t (null? ZEDvalue)) (else err))) (define (ZEDnumber-character? noun-list) (cond (#t (and (eqv? (car noun-list) ##) (eqv? (cadr noun-list) #\0) (not (null? (cddr noun-list))))) (else err))) (define (ZEDpair? ZEDvalue) (cond (#t (pair? ZEDvalue)) (else err))) (define (ZEDpop stack) (cond (#t (cdr stack)) (else err))) (define (ZEDpr! value output-string) (cond (#t (begin (display (ZEDpr!a value (quote ())) output-string) (ZEDpr!b output-string (get-output-string output-string)))) (else err))) (define (ZEDpr!a value collect) (cond ((char? value) (ZEDpr!aa (list->string (list ## value)) collect)) ((string? value) (ZEDpr!aa (string-append """ value """) collect)) ((symbol? value) (ZEDpr!aa (symbol->string value) collect)) ((number? value) (ZEDpr!aa (number->string value) collect)) ((and (boolean? value) value) (ZEDpr!aa "#true" collect)) ((boolean? value) (ZEDpr!aa "#false" collect)) ((null? value) (reverse collect)) (#t (ZEDpr!a (if (promise? (cdr value)) (force (cdr value)) (cdr value)) (cons (ZEDpr!a (if (promise? (car value)) (force (car value)) (car value)) (quote ())) collect))) (else err))) (define (ZEDpr!aa string collect) (cond ((null? collect) string) (#t (reverse (cons string (cons "." collect)))) (else err))) (define (ZEDpr!b output-string value) (cond (#t (begin (close-output-port output-string) value)) (else err))) (define (ZEDpr value) (cond (#t (ZEDpr! value (open-output-string))) (else err))) (define (ZEDprogramize program arity-hash) (cond (#t (cons (quote begin) (ZEDmap-with ZEDfunctionize program arity-hash))) (else err))) (define (ZEDpush object stack) (cond (#t (cons object stack)) (else err))) (define (ZEDrd! function list) (cond ((null? (if (promise? (cdr list)) (force (cdr list)) (cdr list))) (if (promise? (car list)) (force (car list)) (car list))) (#t (ZEDrd! function (cons (function (if (promise? (car (if (promise? (cdr list)) (force (cdr list)) (cdr list)))) (force (car (if (promise? (cdr list)) (force (cdr list)) (cdr list)))) (car (if (promise? (cdr list)) (force (cdr list)) (cdr list)))) (if (promise? (car list)) (force (car list)) (car list))) (if (promise? (cdr (if (promise? (cdr list)) (force (cdr list)) (cdr list)))) (force (cdr (if (promise? (cdr list)) (force (cdr list)) (cdr list)))) (cdr (if (promise? (cdr list)) (force (cdr list)) (cdr list))))))) (else err))) (define (ZEDrd final function list) (cond (#t (ZEDrd! function (cons final (reverse list)))) (else err))) (define (ZEDread-all! collect) (cond (#t (ZEDread-all!a (read-char) collect)) (else err))) (define (ZEDread-all!a character collect) (cond ((eof-object? character) collect) (#t (ZEDread-all! (cons character collect))) (else err))) (define (ZEDread-all) (cond (#t (reverse (ZEDread-all! (quote ())))) (else err))) (define (ZEDread-sentence!a sentence collect) (cond ((null? sentence) collect) ((eqv? #\space (car sentence)) (ZEDread-sentence!a (cdr sentence) collect)) ((eqv? #( (car sentence)) (ZEDread-sentence!aa sentence (ZEDgather-verb (cdr sentence)) collect)) (#t (ZEDread-sentence!ab sentence (ZEDgather-noun sentence) collect)) (else err))) (define (ZEDread-sentence!aa sentence gather-verb collect) (cond (#t (ZEDread-sentence!a (ZEDtails (+ 2 (length gather-verb)) sentence) (cons (ZEDverb gather-verb) collect))) (else err))) (define (ZEDread-sentence!ab sentence gather-noun collect) (cond (#t (ZEDread-sentence!a (ZEDtails (length gather-noun) sentence) (cons (ZEDnoun gather-noun) collect))) (else err))) (define (ZEDread-sentence!b list output-string) (cond (#t (begin (display list output-string) (ZEDread-sentence!ba output-string (get-output-string output-string)))) (else err))) (define (ZEDread-sentence!ba output-string get-output-string) (cond (#t (begin (close-output-port output-string) (ZEDread-sentence!baa (open-input-string get-output-string)))) (else err))) (define (ZEDread-sentence!baa input-string) (cond (#t (ZEDread-sentence!baaa input-string (read input-string))) (else err))) (define (ZEDread-sentence!baaa input-string answer) (cond (#t (begin (close-input-port input-string) answer)) (else err))) (define (ZEDread-sentence sentence) (cond (#t (ZEDread-sentence!b (reverse (ZEDread-sentence!a sentence (quote ()))) (open-output-string))) (else err))) (define (ZEDread-sentences sentences) (cond (#t (map ZEDread-sentence sentences)) (else err))) (define (ZEDready-clause clause) (cond (#t (cons (caaar clause) (cons (cdar clause) (cdr clause)))) (else err))) (define (ZEDready-program program) (cond (#t (map ZEDready-clause program)) (else err))) (define (ZEDreplace-trailing-white-space! program) (cond ((null? program) (quote ())) ((or (eqv? (car program) #\space) (eqv? (car program) #\ht) (eqv? (car program) #\cr) (eqv? (car program) #\newline)) (ZEDreplace-trailing-white-space! (cdr program))) (#t (cons #\newline program)) (else err))) (define (ZEDreplace-trailing-white-space program) (cond (#t (reverse (ZEDreplace-trailing-white-space! (reverse program)))) (else err))) (define (ZEDreverse ZEDlist) (cond (#t (reverse ZEDlist)) (else err))) (define (ZEDschemefy! expression arity-hash stack) (cond ((null? expression) (ZEDtop stack)) ((ZEDapplication? expression) (ZEDschemefy!a expression arity-hash stack (ZEDfunction expression))) (#t (ZEDschemefy! (cdr expression) arity-hash (ZEDpush (car expression) stack))) (else err))) (define (ZEDschemefy!a expression arity-hash stack function) (cond (#t (ZEDschemefy!aa expression arity-hash stack function (ZEDarity arity-hash function))) (else err))) (define (ZEDschemefy!aa expression arity-hash stack function arity) (cond ((ZEDgather-count? function) (ZEDschemefy! (cdr expression) arity-hash (ZEDpush (ZEDfirst arity stack) (ZEDtails arity stack)))) ((eq? function (quote ZED1)) (ZEDschemefy! (cdr expression) arity-hash (ZEDpush (list (quote if) (list (quote promise?) (cons (quote car) (ZEDfirst arity stack))) (list (quote force) (cons (quote car) (ZEDfirst arity stack))) (cons (quote car) (ZEDfirst arity stack))) (ZEDtails arity stack)))) ((eq? function (quote ZED!)) (ZEDschemefy! (cdr expression) arity-hash (ZEDpush (list (quote if) (list (quote promise?) (cons (quote cdr) (ZEDfirst arity stack))) (list (quote force) (cons (quote cdr) (ZEDfirst arity stack))) (cons (quote cdr) (ZEDfirst arity stack))) (ZEDtails arity stack)))) ((eq? function (quote ZEDc)) (ZEDschemefy! (cdr expression) arity-hash (ZEDpush (cons (quote cons) (map ZEDdelay-wrap (ZEDfirst arity stack))) (ZEDtails arity stack)))) (#t (ZEDschemefy! (cdr expression) arity-hash (ZEDpush (cons function (ZEDfirst arity stack)) (ZEDtails arity stack)))) (else err))) (define (ZEDschemefy expression arity-hash) (cond (#t (list (ZEDschemefy! (reverse expression) arity-hash (ZEDstack)))) (else err))) (define (ZEDsentence-less? sentence1 sentence2) (cond ((null? sentence2) #f) ((null? sentence1) #t) ((ZEDcharacter-less? (car sentence1) (car sentence2)) #t) ((ZEDcharacter-less? (car sentence2) (car sentence1)) #f) (#t (ZEDsentence-less? (cdr sentence1) (cdr sentence2))) (else err))) (define (ZEDsentences! program collect1 collect2) (cond ((null? program) collect2) ((eqv? #\newline (car program)) (ZEDsentences! (cdr program) (quote ()) (cons (reverse collect1) collect2))) (#t (ZEDsentences! (cdr program) (cons (car program) collect1) collect2)) (else err))) (define (ZEDsentences program) (cond (#t (reverse (ZEDsentences! program (quote ()) (quote ())))) (else err))) (define (ZEDsort!a jumble) (cond (#t (map list jumble)) (else err))) (define (ZEDsort!b comparator jumble) (cond ((null? jumble) (quote ())) ((null? (cdr jumble)) jumble) (#t (ZEDsort!b comparator (cons (ZEDmerge comparator (car jumble) (cadr jumble)) (ZEDsort!b comparator (cddr jumble))))) (else err))) (define (ZEDsort comparator jumble) (cond (#t (car (ZEDsort!b comparator (ZEDsort!a jumble)))) (else err))) (define (ZEDspace-newline! program collect) (cond ((or (null? program) (null? (cdr program))) (append program collect)) ((and (eqv? #\space (car program)) (eqv? #\newline (cadr program))) (ZEDspace-newline! (cdr program) collect)) (#t (ZEDspace-newline! (cdr program) (cons (car program) collect))) (else err))) (define (ZEDspace-newline program) (cond (#t (reverse (ZEDspace-newline! program (quote ())))) (else err))) (define (ZEDstack) (cond (#t (quote ())) (else err))) (define (ZEDtab-replace! program collect) (cond ((null? program) collect) ((eqv? #\ht (car program)) (ZEDtab-replace! (cdr program) (cons #\space collect))) (#t (ZEDtab-replace! (cdr program) (cons (car program) collect))) (else err))) (define (ZEDtab-replace program) (cond (#t (reverse (ZEDtab-replace! program (quote ())))) (else err))) (define (ZEDtails number list) (cond ((null? list) (quote ())) ((zero? number) list) ((> number 0) (ZEDtails (- number 1) (cdr list))) (else err))) (define (ZEDtop stack) (cond (#t (car stack)) (else err))) (define (ZEDtrue? noun-list) (cond (#t (equal? noun-list (list ## #\t #\r #\u #\e))) (else err))) (define (ZEDverb verb-list) (cond ((ZEDliteral? verb-list) (list (ZEDmake-literal verb-list))) (#t (list (ZEDmake-ZED verb-list))) (else err))) (define (ZEDwrite-all program) (cond ((null? program) (quote err)) (#t (ZEDwrite-all (begin (write-char (car program)) (cdr program)))) (else err))) (define (ZEDzed->scheme! value collect) (cond ((null? value) (reverse collect)) (#t (ZEDzed->scheme! (if (promise? (cdr value)) (force (cdr value)) (cdr value)) (cons (ZEDzed->scheme (if (promise? (car value)) (force (car value)) (car value))) collect))) (else err))) (define (ZEDzed->scheme value) (cond ((not (pair? value)) value) (#t (ZEDzed->scheme! value (quote ()))) (else err)))) (ZEDcomp) Language author on RC: [[User:Zelah|Zelah]] ([[User_talk:Zelah|talk]] | [[Special:Contributions/Zelah|contribs]]) + +165x2 194x2 207x2 . \ No newline at end of file diff --git a/Lang/ZX-Spectrum-Basic/Sorting-Algorithms-Circle-Sort b/Lang/ZX-Spectrum-Basic/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..c34f35480d --- /dev/null +++ b/Lang/ZX-Spectrum-Basic/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/ZX-Spectrum-Basic \ No newline at end of file diff --git a/Lang/Zig/15-puzzle-game b/Lang/Zig/15-puzzle-game deleted file mode 120000 index 67842297fa..0000000000 --- a/Lang/Zig/15-puzzle-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-game/Zig \ No newline at end of file diff --git a/Lang/Zig/15-puzzle-solver b/Lang/Zig/15-puzzle-solver deleted file mode 120000 index 31e2e98f6a..0000000000 --- a/Lang/Zig/15-puzzle-solver +++ /dev/null @@ -1 +0,0 @@ -../../Task/15-puzzle-solver/Zig \ No newline at end of file diff --git a/Lang/Zig/2048 b/Lang/Zig/2048 deleted file mode 120000 index d2ac81be16..0000000000 --- a/Lang/Zig/2048 +++ /dev/null @@ -1 +0,0 @@ -../../Task/2048/Zig \ No newline at end of file diff --git a/Lang/Zig/24-game b/Lang/Zig/24-game deleted file mode 120000 index 7b40225753..0000000000 --- a/Lang/Zig/24-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game/Zig \ No newline at end of file diff --git a/Lang/Zig/24-game-Solve b/Lang/Zig/24-game-Solve deleted file mode 120000 index cf80fe1aa1..0000000000 --- a/Lang/Zig/24-game-Solve +++ /dev/null @@ -1 +0,0 @@ -../../Task/24-game-Solve/Zig \ No newline at end of file diff --git a/Lang/Zig/9-billion-names-of-God-the-integer b/Lang/Zig/9-billion-names-of-God-the-integer deleted file mode 120000 index 891e6336a6..0000000000 --- a/Lang/Zig/9-billion-names-of-God-the-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/9-billion-names-of-God-the-integer/Zig \ No newline at end of file diff --git a/Lang/Zig/A+B b/Lang/Zig/A+B deleted file mode 120000 index 99c5298cb2..0000000000 --- a/Lang/Zig/A+B +++ /dev/null @@ -1 +0,0 @@ -../../Task/A+B/Zig \ No newline at end of file diff --git a/Lang/Zig/ABC-problem b/Lang/Zig/ABC-problem deleted file mode 120000 index 4f4592d850..0000000000 --- a/Lang/Zig/ABC-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/ABC-problem/Zig \ No newline at end of file diff --git a/Lang/Zig/AVL-tree b/Lang/Zig/AVL-tree deleted file mode 120000 index 05056fdece..0000000000 --- a/Lang/Zig/AVL-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/AVL-tree/Zig \ No newline at end of file diff --git a/Lang/Zig/Abelian-sandpile-model b/Lang/Zig/Abelian-sandpile-model deleted file mode 120000 index aff7b1b955..0000000000 --- a/Lang/Zig/Abelian-sandpile-model +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model/Zig \ No newline at end of file diff --git a/Lang/Zig/Abelian-sandpile-model-Identity b/Lang/Zig/Abelian-sandpile-model-Identity deleted file mode 120000 index 5a22dd3380..0000000000 --- a/Lang/Zig/Abelian-sandpile-model-Identity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Abelian-sandpile-model-Identity/Zig \ No newline at end of file diff --git a/Lang/Zig/Anti-primes b/Lang/Zig/Anti-primes deleted file mode 120000 index bde3882591..0000000000 --- a/Lang/Zig/Anti-primes +++ /dev/null @@ -1 +0,0 @@ -../../Task/Anti-primes/Zig \ No newline at end of file diff --git a/Lang/Zig/Arithmetic-Integer b/Lang/Zig/Arithmetic-Integer deleted file mode 120000 index 3faa5af494..0000000000 --- a/Lang/Zig/Arithmetic-Integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arithmetic-Integer/Zig \ No newline at end of file diff --git a/Lang/Zig/Arrays b/Lang/Zig/Arrays deleted file mode 120000 index 8271fea84a..0000000000 --- a/Lang/Zig/Arrays +++ /dev/null @@ -1 +0,0 @@ -../../Task/Arrays/Zig \ No newline at end of file diff --git a/Lang/Zig/Associative-array-Creation b/Lang/Zig/Associative-array-Creation deleted file mode 120000 index 9dff0b181f..0000000000 --- a/Lang/Zig/Associative-array-Creation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Creation/Zig \ No newline at end of file diff --git a/Lang/Zig/Associative-array-Iteration b/Lang/Zig/Associative-array-Iteration deleted file mode 120000 index 0120ea3ca0..0000000000 --- a/Lang/Zig/Associative-array-Iteration +++ /dev/null @@ -1 +0,0 @@ -../../Task/Associative-array-Iteration/Zig \ No newline at end of file diff --git a/Lang/Zig/Babbage-problem b/Lang/Zig/Babbage-problem deleted file mode 120000 index c79a638466..0000000000 --- a/Lang/Zig/Babbage-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babbage-problem/Zig \ No newline at end of file diff --git a/Lang/Zig/Babylonian-spiral b/Lang/Zig/Babylonian-spiral deleted file mode 120000 index 518c958994..0000000000 --- a/Lang/Zig/Babylonian-spiral +++ /dev/null @@ -1 +0,0 @@ -../../Task/Babylonian-spiral/Zig \ No newline at end of file diff --git a/Lang/Zig/Balanced-brackets b/Lang/Zig/Balanced-brackets deleted file mode 120000 index 0a6293637f..0000000000 --- a/Lang/Zig/Balanced-brackets +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-brackets/Zig \ No newline at end of file diff --git a/Lang/Zig/Balanced-ternary b/Lang/Zig/Balanced-ternary deleted file mode 120000 index aaf8a47b9b..0000000000 --- a/Lang/Zig/Balanced-ternary +++ /dev/null @@ -1 +0,0 @@ -../../Task/Balanced-ternary/Zig \ No newline at end of file diff --git a/Lang/Zig/Base64-decode-data b/Lang/Zig/Base64-decode-data deleted file mode 120000 index 9291a91364..0000000000 --- a/Lang/Zig/Base64-decode-data +++ /dev/null @@ -1 +0,0 @@ -../../Task/Base64-decode-data/Zig \ No newline at end of file diff --git a/Lang/Zig/Bifid-cipher b/Lang/Zig/Bifid-cipher deleted file mode 120000 index c3e619eb90..0000000000 --- a/Lang/Zig/Bifid-cipher +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bifid-cipher/Zig \ No newline at end of file diff --git a/Lang/Zig/Binary-digits b/Lang/Zig/Binary-digits deleted file mode 120000 index 6e0bd7354f..0000000000 --- a/Lang/Zig/Binary-digits +++ /dev/null @@ -1 +0,0 @@ -../../Task/Binary-digits/Zig \ No newline at end of file diff --git a/Lang/Zig/Bitcoin-address-validation b/Lang/Zig/Bitcoin-address-validation deleted file mode 120000 index 582e8551db..0000000000 --- a/Lang/Zig/Bitcoin-address-validation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitcoin-address-validation/Zig \ No newline at end of file diff --git a/Lang/Zig/Bitmap b/Lang/Zig/Bitmap deleted file mode 120000 index ef66b502ad..0000000000 --- a/Lang/Zig/Bitmap +++ /dev/null @@ -1 +0,0 @@ -../../Task/Bitmap/Zig \ No newline at end of file diff --git a/Lang/Zig/Boolean-values b/Lang/Zig/Boolean-values deleted file mode 120000 index 8bbec67819..0000000000 --- a/Lang/Zig/Boolean-values +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boolean-values/Zig \ No newline at end of file diff --git a/Lang/Zig/Boyer-Moore-string-search b/Lang/Zig/Boyer-Moore-string-search deleted file mode 120000 index 9c6dd89c45..0000000000 --- a/Lang/Zig/Boyer-Moore-string-search +++ /dev/null @@ -1 +0,0 @@ -../../Task/Boyer-Moore-string-search/Zig \ No newline at end of file diff --git a/Lang/Zig/Break-OO-privacy b/Lang/Zig/Break-OO-privacy deleted file mode 120000 index 535f70b15b..0000000000 --- a/Lang/Zig/Break-OO-privacy +++ /dev/null @@ -1 +0,0 @@ -../../Task/Break-OO-privacy/Zig \ No newline at end of file diff --git a/Lang/Zig/Camel-case-and-snake-case b/Lang/Zig/Camel-case-and-snake-case deleted file mode 120000 index ab00dfd34b..0000000000 --- a/Lang/Zig/Camel-case-and-snake-case +++ /dev/null @@ -1 +0,0 @@ -../../Task/Camel-case-and-snake-case/Zig \ No newline at end of file diff --git a/Lang/Zig/Canonicalize-CIDR b/Lang/Zig/Canonicalize-CIDR deleted file mode 120000 index 792c271f68..0000000000 --- a/Lang/Zig/Canonicalize-CIDR +++ /dev/null @@ -1 +0,0 @@ -../../Task/Canonicalize-CIDR/Zig \ No newline at end of file diff --git a/Lang/Zig/Cholesky-decomposition b/Lang/Zig/Cholesky-decomposition deleted file mode 120000 index 7fbe65969f..0000000000 --- a/Lang/Zig/Cholesky-decomposition +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cholesky-decomposition/Zig \ No newline at end of file diff --git a/Lang/Zig/Chowla-numbers b/Lang/Zig/Chowla-numbers deleted file mode 120000 index 034b021f26..0000000000 --- a/Lang/Zig/Chowla-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Chowla-numbers/Zig \ No newline at end of file diff --git a/Lang/Zig/Command-line-arguments b/Lang/Zig/Command-line-arguments deleted file mode 120000 index 5b9231a470..0000000000 --- a/Lang/Zig/Command-line-arguments +++ /dev/null @@ -1 +0,0 @@ -../../Task/Command-line-arguments/Zig \ No newline at end of file diff --git a/Lang/Zig/Compare-sorting-algorithms-performance b/Lang/Zig/Compare-sorting-algorithms-performance deleted file mode 120000 index 2f98698afb..0000000000 --- a/Lang/Zig/Compare-sorting-algorithms-performance +++ /dev/null @@ -1 +0,0 @@ -../../Task/Compare-sorting-algorithms-performance/Zig \ No newline at end of file diff --git a/Lang/Zig/Convex-hull b/Lang/Zig/Convex-hull deleted file mode 120000 index bb63712423..0000000000 --- a/Lang/Zig/Convex-hull +++ /dev/null @@ -1 +0,0 @@ -../../Task/Convex-hull/Zig \ No newline at end of file diff --git a/Lang/Zig/Conways-Game-of-Life b/Lang/Zig/Conways-Game-of-Life deleted file mode 120000 index d6337a8a7a..0000000000 --- a/Lang/Zig/Conways-Game-of-Life +++ /dev/null @@ -1 +0,0 @@ -../../Task/Conways-Game-of-Life/Zig \ No newline at end of file diff --git a/Lang/Zig/Count-occurrences-of-a-substring b/Lang/Zig/Count-occurrences-of-a-substring deleted file mode 120000 index 820b93c2bb..0000000000 --- a/Lang/Zig/Count-occurrences-of-a-substring +++ /dev/null @@ -1 +0,0 @@ -../../Task/Count-occurrences-of-a-substring/Zig \ No newline at end of file diff --git a/Lang/Zig/Cumulative-standard-deviation b/Lang/Zig/Cumulative-standard-deviation deleted file mode 120000 index 225e824146..0000000000 --- a/Lang/Zig/Cumulative-standard-deviation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cumulative-standard-deviation/Zig \ No newline at end of file diff --git a/Lang/Zig/Cyclops-numbers b/Lang/Zig/Cyclops-numbers deleted file mode 120000 index 625d97b345..0000000000 --- a/Lang/Zig/Cyclops-numbers +++ /dev/null @@ -1 +0,0 @@ -../../Task/Cyclops-numbers/Zig \ No newline at end of file diff --git a/Lang/Zig/De-Bruijn-sequences b/Lang/Zig/De-Bruijn-sequences deleted file mode 120000 index 1e82ee12c7..0000000000 --- a/Lang/Zig/De-Bruijn-sequences +++ /dev/null @@ -1 +0,0 @@ -../../Task/De-Bruijn-sequences/Zig \ No newline at end of file diff --git a/Lang/Zig/Deal-cards-for-FreeCell b/Lang/Zig/Deal-cards-for-FreeCell deleted file mode 120000 index 8f0b26df35..0000000000 --- a/Lang/Zig/Deal-cards-for-FreeCell +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deal-cards-for-FreeCell/Zig \ No newline at end of file diff --git a/Lang/Zig/Deconvolution-1D b/Lang/Zig/Deconvolution-1D deleted file mode 120000 index 26b778762a..0000000000 --- a/Lang/Zig/Deconvolution-1D +++ /dev/null @@ -1 +0,0 @@ -../../Task/Deconvolution-1D/Zig \ No newline at end of file diff --git a/Lang/Zig/Determinant-and-permanent b/Lang/Zig/Determinant-and-permanent deleted file mode 120000 index 6aec06c204..0000000000 --- a/Lang/Zig/Determinant-and-permanent +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determinant-and-permanent/Zig \ No newline at end of file diff --git a/Lang/Zig/Determine-if-a-string-is-numeric b/Lang/Zig/Determine-if-a-string-is-numeric deleted file mode 120000 index 1317ba1b29..0000000000 --- a/Lang/Zig/Determine-if-a-string-is-numeric +++ /dev/null @@ -1 +0,0 @@ -../../Task/Determine-if-a-string-is-numeric/Zig \ No newline at end of file diff --git a/Lang/Zig/Dijkstras-algorithm b/Lang/Zig/Dijkstras-algorithm deleted file mode 120000 index e85779f749..0000000000 --- a/Lang/Zig/Dijkstras-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Dijkstras-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Eertree b/Lang/Zig/Eertree deleted file mode 120000 index 297f5d26a6..0000000000 --- a/Lang/Zig/Eertree +++ /dev/null @@ -1 +0,0 @@ -../../Task/Eertree/Zig \ No newline at end of file diff --git a/Lang/Zig/Egyptian-division b/Lang/Zig/Egyptian-division deleted file mode 120000 index fbc8453acb..0000000000 --- a/Lang/Zig/Egyptian-division +++ /dev/null @@ -1 +0,0 @@ -../../Task/Egyptian-division/Zig \ No newline at end of file diff --git a/Lang/Zig/Elliptic-Curve-Digital-Signature-Algorithm b/Lang/Zig/Elliptic-Curve-Digital-Signature-Algorithm deleted file mode 120000 index 8631c5bdb3..0000000000 --- a/Lang/Zig/Elliptic-Curve-Digital-Signature-Algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-Curve-Digital-Signature-Algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Elliptic-curve-arithmetic b/Lang/Zig/Elliptic-curve-arithmetic deleted file mode 120000 index 6d1206bc71..0000000000 --- a/Lang/Zig/Elliptic-curve-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Elliptic-curve-arithmetic/Zig \ No newline at end of file diff --git a/Lang/Zig/Evolutionary-algorithm b/Lang/Zig/Evolutionary-algorithm deleted file mode 120000 index 59ff814ffb..0000000000 --- a/Lang/Zig/Evolutionary-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Evolutionary-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Execute-a-Markov-algorithm b/Lang/Zig/Execute-a-Markov-algorithm deleted file mode 120000 index 5b70cd7b50..0000000000 --- a/Lang/Zig/Execute-a-Markov-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Execute-a-Markov-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Factors-of-an-integer b/Lang/Zig/Factors-of-an-integer deleted file mode 120000 index 9bd33985d3..0000000000 --- a/Lang/Zig/Factors-of-an-integer +++ /dev/null @@ -1 +0,0 @@ -../../Task/Factors-of-an-integer/Zig \ No newline at end of file diff --git a/Lang/Zig/Farey-sequence b/Lang/Zig/Farey-sequence deleted file mode 120000 index 44274502d4..0000000000 --- a/Lang/Zig/Farey-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Farey-sequence/Zig \ No newline at end of file diff --git a/Lang/Zig/Fibonacci-sequence b/Lang/Zig/Fibonacci-sequence deleted file mode 120000 index 8c7ee19f72..0000000000 --- a/Lang/Zig/Fibonacci-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-sequence/Zig \ No newline at end of file diff --git a/Lang/Zig/Fibonacci-word b/Lang/Zig/Fibonacci-word deleted file mode 120000 index e5d3567eb0..0000000000 --- a/Lang/Zig/Fibonacci-word +++ /dev/null @@ -1 +0,0 @@ -../../Task/Fibonacci-word/Zig \ No newline at end of file diff --git a/Lang/Zig/Find-the-missing-permutation b/Lang/Zig/Find-the-missing-permutation deleted file mode 120000 index 720e08365d..0000000000 --- a/Lang/Zig/Find-the-missing-permutation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Find-the-missing-permutation/Zig \ No newline at end of file diff --git a/Lang/Zig/Floyd-Warshall-algorithm b/Lang/Zig/Floyd-Warshall-algorithm deleted file mode 120000 index e20cfd03e2..0000000000 --- a/Lang/Zig/Floyd-Warshall-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Floyd-Warshall-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Gray-code b/Lang/Zig/Gray-code deleted file mode 120000 index f2147c406a..0000000000 --- a/Lang/Zig/Gray-code +++ /dev/null @@ -1 +0,0 @@ -../../Task/Gray-code/Zig \ No newline at end of file diff --git a/Lang/Zig/Halt-and-catch-fire b/Lang/Zig/Halt-and-catch-fire deleted file mode 120000 index c9706c0075..0000000000 --- a/Lang/Zig/Halt-and-catch-fire +++ /dev/null @@ -1 +0,0 @@ -../../Task/Halt-and-catch-fire/Zig \ No newline at end of file diff --git a/Lang/Zig/Integer-sequence b/Lang/Zig/Integer-sequence deleted file mode 120000 index 43f4f97f8b..0000000000 --- a/Lang/Zig/Integer-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Integer-sequence/Zig \ No newline at end of file diff --git a/Lang/Zig/Jaro-similarity b/Lang/Zig/Jaro-similarity deleted file mode 120000 index 26cb0df4ff..0000000000 --- a/Lang/Zig/Jaro-similarity +++ /dev/null @@ -1 +0,0 @@ -../../Task/Jaro-similarity/Zig \ No newline at end of file diff --git a/Lang/Zig/K-d-tree b/Lang/Zig/K-d-tree deleted file mode 120000 index 3fd542d0d2..0000000000 --- a/Lang/Zig/K-d-tree +++ /dev/null @@ -1 +0,0 @@ -../../Task/K-d-tree/Zig \ No newline at end of file diff --git a/Lang/Zig/Knapsack-problem-0-1 b/Lang/Zig/Knapsack-problem-0-1 deleted file mode 120000 index 95f8fcd9fc..0000000000 --- a/Lang/Zig/Knapsack-problem-0-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knapsack-problem-0-1/Zig \ No newline at end of file diff --git a/Lang/Zig/Knights-tour b/Lang/Zig/Knights-tour deleted file mode 120000 index a8fa50bb64..0000000000 --- a/Lang/Zig/Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Knights-tour/Zig \ No newline at end of file diff --git a/Lang/Zig/LZW-compression b/Lang/Zig/LZW-compression deleted file mode 120000 index fd9ce93698..0000000000 --- a/Lang/Zig/LZW-compression +++ /dev/null @@ -1 +0,0 @@ -../../Task/LZW-compression/Zig \ No newline at end of file diff --git a/Lang/Zig/Latin-Squares-in-reduced-form b/Lang/Zig/Latin-Squares-in-reduced-form deleted file mode 120000 index 4ae8de3ec8..0000000000 --- a/Lang/Zig/Latin-Squares-in-reduced-form +++ /dev/null @@ -1 +0,0 @@ -../../Task/Latin-Squares-in-reduced-form/Zig \ No newline at end of file diff --git a/Lang/Zig/Loops-Nested b/Lang/Zig/Loops-Nested deleted file mode 120000 index a78e39957d..0000000000 --- a/Lang/Zig/Loops-Nested +++ /dev/null @@ -1 +0,0 @@ -../../Task/Loops-Nested/Zig \ No newline at end of file diff --git a/Lang/Zig/M-bius-function b/Lang/Zig/M-bius-function deleted file mode 120000 index b4ad984b09..0000000000 --- a/Lang/Zig/M-bius-function +++ /dev/null @@ -1 +0,0 @@ -../../Task/M-bius-function/Zig \ No newline at end of file diff --git a/Lang/Zig/Main-step-of-GOST-28147-89 b/Lang/Zig/Main-step-of-GOST-28147-89 deleted file mode 120000 index 433b294fbc..0000000000 --- a/Lang/Zig/Main-step-of-GOST-28147-89 +++ /dev/null @@ -1 +0,0 @@ -../../Task/Main-step-of-GOST-28147-89/Zig \ No newline at end of file diff --git a/Lang/Zig/Matrix-exponentiation-operator b/Lang/Zig/Matrix-exponentiation-operator deleted file mode 120000 index 273e429228..0000000000 --- a/Lang/Zig/Matrix-exponentiation-operator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Matrix-exponentiation-operator/Zig \ No newline at end of file diff --git a/Lang/Zig/Modular-arithmetic b/Lang/Zig/Modular-arithmetic deleted file mode 120000 index a64c6161fe..0000000000 --- a/Lang/Zig/Modular-arithmetic +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-arithmetic/Zig \ No newline at end of file diff --git a/Lang/Zig/Modular-inverse b/Lang/Zig/Modular-inverse deleted file mode 120000 index f96c2102b0..0000000000 --- a/Lang/Zig/Modular-inverse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Modular-inverse/Zig \ No newline at end of file diff --git a/Lang/Zig/Monty-Hall-problem b/Lang/Zig/Monty-Hall-problem deleted file mode 120000 index 5c32ef8986..0000000000 --- a/Lang/Zig/Monty-Hall-problem +++ /dev/null @@ -1 +0,0 @@ -../../Task/Monty-Hall-problem/Zig \ No newline at end of file diff --git a/Lang/Zig/Move-to-front-algorithm b/Lang/Zig/Move-to-front-algorithm deleted file mode 120000 index 820f21fe3e..0000000000 --- a/Lang/Zig/Move-to-front-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Move-to-front-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Mutual-recursion b/Lang/Zig/Mutual-recursion deleted file mode 120000 index ad6fe03709..0000000000 --- a/Lang/Zig/Mutual-recursion +++ /dev/null @@ -1 +0,0 @@ -../../Task/Mutual-recursion/Zig \ No newline at end of file diff --git a/Lang/Zig/Natural-sorting b/Lang/Zig/Natural-sorting deleted file mode 120000 index ce3fd8d2e1..0000000000 --- a/Lang/Zig/Natural-sorting +++ /dev/null @@ -1 +0,0 @@ -../../Task/Natural-sorting/Zig \ No newline at end of file diff --git a/Lang/Zig/P-Adic-numbers-basic b/Lang/Zig/P-Adic-numbers-basic deleted file mode 120000 index 7be77909db..0000000000 --- a/Lang/Zig/P-Adic-numbers-basic +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-numbers-basic/Zig \ No newline at end of file diff --git a/Lang/Zig/P-Adic-square-roots b/Lang/Zig/P-Adic-square-roots deleted file mode 120000 index bf2f9425e2..0000000000 --- a/Lang/Zig/P-Adic-square-roots +++ /dev/null @@ -1 +0,0 @@ -../../Task/P-Adic-square-roots/Zig \ No newline at end of file diff --git a/Lang/Zig/Parametric-polymorphism b/Lang/Zig/Parametric-polymorphism deleted file mode 120000 index 76dd4a7ae3..0000000000 --- a/Lang/Zig/Parametric-polymorphism +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parametric-polymorphism/Zig \ No newline at end of file diff --git a/Lang/Zig/Parse-an-IP-Address b/Lang/Zig/Parse-an-IP-Address deleted file mode 120000 index dcc1d9a064..0000000000 --- a/Lang/Zig/Parse-an-IP-Address +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parse-an-IP-Address/Zig \ No newline at end of file diff --git a/Lang/Zig/Parsing-RPN-calculator-algorithm b/Lang/Zig/Parsing-RPN-calculator-algorithm deleted file mode 120000 index 64d52e74e9..0000000000 --- a/Lang/Zig/Parsing-RPN-calculator-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-RPN-calculator-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Parsing-Shunting-yard-algorithm b/Lang/Zig/Parsing-Shunting-yard-algorithm deleted file mode 120000 index 36cb3a3892..0000000000 --- a/Lang/Zig/Parsing-Shunting-yard-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Parsing-Shunting-yard-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Pells-equation b/Lang/Zig/Pells-equation deleted file mode 120000 index dc6754d05f..0000000000 --- a/Lang/Zig/Pells-equation +++ /dev/null @@ -1 +0,0 @@ -../../Task/Pells-equation/Zig \ No newline at end of file diff --git a/Lang/Zig/Permutations-by-swapping b/Lang/Zig/Permutations-by-swapping deleted file mode 120000 index 5e667cc7e2..0000000000 --- a/Lang/Zig/Permutations-by-swapping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Permutations-by-swapping/Zig \ No newline at end of file diff --git a/Lang/Zig/Quickselect-algorithm b/Lang/Zig/Quickselect-algorithm deleted file mode 120000 index 7dbb81ef78..0000000000 --- a/Lang/Zig/Quickselect-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quickselect-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Quine b/Lang/Zig/Quine deleted file mode 120000 index 20f1f12898..0000000000 --- a/Lang/Zig/Quine +++ /dev/null @@ -1 +0,0 @@ -../../Task/Quine/Zig \ No newline at end of file diff --git a/Lang/Zig/SHA-1 b/Lang/Zig/SHA-1 deleted file mode 120000 index 374af24054..0000000000 --- a/Lang/Zig/SHA-1 +++ /dev/null @@ -1 +0,0 @@ -../../Task/SHA-1/Zig \ No newline at end of file diff --git a/Lang/Zig/Sisyphus-sequence b/Lang/Zig/Sisyphus-sequence deleted file mode 120000 index 58dd5ff994..0000000000 --- a/Lang/Zig/Sisyphus-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sisyphus-sequence/Zig \ No newline at end of file diff --git a/Lang/Zig/Solve-a-Holy-Knights-tour b/Lang/Zig/Solve-a-Holy-Knights-tour deleted file mode 120000 index b0fe3fcb9a..0000000000 --- a/Lang/Zig/Solve-a-Holy-Knights-tour +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-a-Holy-Knights-tour/Zig \ No newline at end of file diff --git a/Lang/Zig/Solve-the-no-connection-puzzle b/Lang/Zig/Solve-the-no-connection-puzzle deleted file mode 120000 index 4b3367c677..0000000000 --- a/Lang/Zig/Solve-the-no-connection-puzzle +++ /dev/null @@ -1 +0,0 @@ -../../Task/Solve-the-no-connection-puzzle/Zig \ No newline at end of file diff --git a/Lang/Zig/Sorting-algorithms-Patience-sort b/Lang/Zig/Sorting-algorithms-Patience-sort deleted file mode 120000 index a696e81abf..0000000000 --- a/Lang/Zig/Sorting-algorithms-Patience-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Patience-sort/Zig \ No newline at end of file diff --git a/Lang/Zig/Sorting-algorithms-Strand-sort b/Lang/Zig/Sorting-algorithms-Strand-sort deleted file mode 120000 index 67361c524c..0000000000 --- a/Lang/Zig/Sorting-algorithms-Strand-sort +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sorting-algorithms-Strand-sort/Zig \ No newline at end of file diff --git a/Lang/Zig/Stern-Brocot-sequence b/Lang/Zig/Stern-Brocot-sequence deleted file mode 120000 index 4e68e871bc..0000000000 --- a/Lang/Zig/Stern-Brocot-sequence +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stern-Brocot-sequence/Zig \ No newline at end of file diff --git a/Lang/Zig/Strassens-algorithm b/Lang/Zig/Strassens-algorithm deleted file mode 120000 index f02a6cb05a..0000000000 --- a/Lang/Zig/Strassens-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Strassens-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Stream-merge b/Lang/Zig/Stream-merge deleted file mode 120000 index 83ddc64918..0000000000 --- a/Lang/Zig/Stream-merge +++ /dev/null @@ -1 +0,0 @@ -../../Task/Stream-merge/Zig \ No newline at end of file diff --git a/Lang/Zig/Sudoku b/Lang/Zig/Sudoku deleted file mode 120000 index cc0b8be01d..0000000000 --- a/Lang/Zig/Sudoku +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sudoku/Zig \ No newline at end of file diff --git a/Lang/Zig/Sutherland-Hodgman-polygon-clipping b/Lang/Zig/Sutherland-Hodgman-polygon-clipping deleted file mode 120000 index 2e08ab9fc7..0000000000 --- a/Lang/Zig/Sutherland-Hodgman-polygon-clipping +++ /dev/null @@ -1 +0,0 @@ -../../Task/Sutherland-Hodgman-polygon-clipping/Zig \ No newline at end of file diff --git a/Lang/Zig/Tarjan b/Lang/Zig/Tarjan deleted file mode 120000 index 47db828add..0000000000 --- a/Lang/Zig/Tarjan +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tarjan/Zig \ No newline at end of file diff --git a/Lang/Zig/Thue-Morse b/Lang/Zig/Thue-Morse deleted file mode 120000 index 514eeceeed..0000000000 --- a/Lang/Zig/Thue-Morse +++ /dev/null @@ -1 +0,0 @@ -../../Task/Thue-Morse/Zig \ No newline at end of file diff --git a/Lang/Zig/Tonelli-Shanks-algorithm b/Lang/Zig/Tonelli-Shanks-algorithm deleted file mode 120000 index 364e6278fd..0000000000 --- a/Lang/Zig/Tonelli-Shanks-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tonelli-Shanks-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Tree-datastructures b/Lang/Zig/Tree-datastructures deleted file mode 120000 index 2483259e7c..0000000000 --- a/Lang/Zig/Tree-datastructures +++ /dev/null @@ -1 +0,0 @@ -../../Task/Tree-datastructures/Zig \ No newline at end of file diff --git a/Lang/Zig/Verhoeff-algorithm b/Lang/Zig/Verhoeff-algorithm deleted file mode 120000 index d90fb8e2ca..0000000000 --- a/Lang/Zig/Verhoeff-algorithm +++ /dev/null @@ -1 +0,0 @@ -../../Task/Verhoeff-algorithm/Zig \ No newline at end of file diff --git a/Lang/Zig/Vigen-re-cipher-Cryptanalysis b/Lang/Zig/Vigen-re-cipher-Cryptanalysis deleted file mode 120000 index 7fd7d3aa92..0000000000 --- a/Lang/Zig/Vigen-re-cipher-Cryptanalysis +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vigen-re-cipher-Cryptanalysis/Zig \ No newline at end of file diff --git a/Lang/Zig/Vogels-approximation-method b/Lang/Zig/Vogels-approximation-method deleted file mode 120000 index af40cfb307..0000000000 --- a/Lang/Zig/Vogels-approximation-method +++ /dev/null @@ -1 +0,0 @@ -../../Task/Vogels-approximation-method/Zig \ No newline at end of file diff --git a/Lang/Zig/War-card-game b/Lang/Zig/War-card-game deleted file mode 120000 index 6bc9afa5bf..0000000000 --- a/Lang/Zig/War-card-game +++ /dev/null @@ -1 +0,0 @@ -../../Task/War-card-game/Zig \ No newline at end of file diff --git a/Lang/Zig/Y-combinator b/Lang/Zig/Y-combinator deleted file mode 120000 index 1478dbbdb7..0000000000 --- a/Lang/Zig/Y-combinator +++ /dev/null @@ -1 +0,0 @@ -../../Task/Y-combinator/Zig \ No newline at end of file diff --git a/Lang/Zkl/Bioinformatics-base-count b/Lang/Zkl/Bioinformatics-base-count new file mode 120000 index 0000000000..f344937ca4 --- /dev/null +++ b/Lang/Zkl/Bioinformatics-base-count @@ -0,0 +1 @@ +../../Task/Bioinformatics-base-count/Zkl \ No newline at end of file diff --git a/Lang/Zkl/Miller-Rabin-primality-test b/Lang/Zkl/Miller-Rabin-primality-test new file mode 120000 index 0000000000..92bfcfa6ff --- /dev/null +++ b/Lang/Zkl/Miller-Rabin-primality-test @@ -0,0 +1 @@ +../../Task/Miller-Rabin-primality-test/Zkl \ No newline at end of file diff --git a/Lang/Zkl/Quaternion-type b/Lang/Zkl/Quaternion-type new file mode 120000 index 0000000000..d36f19dd00 --- /dev/null +++ b/Lang/Zkl/Quaternion-type @@ -0,0 +1 @@ +../../Task/Quaternion-type/Zkl \ No newline at end of file diff --git a/Lang/Zkl/Sequence:-nth-number-with-exactly-n-divisors b/Lang/Zkl/Sequence-nth-number-with-exactly-n-divisors similarity index 100% rename from Lang/Zkl/Sequence:-nth-number-with-exactly-n-divisors rename to Lang/Zkl/Sequence-nth-number-with-exactly-n-divisors diff --git a/Lang/Zkl/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors b/Lang/Zkl/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors similarity index 100% rename from Lang/Zkl/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors rename to Lang/Zkl/Sequence-smallest-number-greater-than-previous-term-with-exactly-n-divisors diff --git a/Lang/Zkl/Sequence:-smallest-number-with-exactly-n-divisors b/Lang/Zkl/Sequence-smallest-number-with-exactly-n-divisors similarity index 100% rename from Lang/Zkl/Sequence:-smallest-number-with-exactly-n-divisors rename to Lang/Zkl/Sequence-smallest-number-with-exactly-n-divisors diff --git a/Lang/Zkl/Sorting-Algorithms-Circle-Sort b/Lang/Zkl/Sorting-Algorithms-Circle-Sort new file mode 120000 index 0000000000..6de597a14d --- /dev/null +++ b/Lang/Zkl/Sorting-Algorithms-Circle-Sort @@ -0,0 +1 @@ +../../Task/Sorting-Algorithms-Circle-Sort/Zkl \ No newline at end of file diff --git a/Lang/Zonnon/00-LANG.txt b/Lang/Zonnon/00-LANG.txt index e4a45b3fa4..8a95e192c9 100644 --- a/Lang/Zonnon/00-LANG.txt +++ b/Lang/Zonnon/00-LANG.txt @@ -3,11 +3,4 @@ |site=http://www.zonnon.ethz.ch/ |LCT=yes }} -Zonnon is a general-purpose programming language in the [[Pascal]], [[Modula-2]] and [[Oberon]] family. It retains an emphasis on simplicity, clear syntax and separation of concerns whilst focusing on concurrency and ease of composition and expression. Unification of abstractions is at the heart of its design and this is reflected in its conceptual model based on modules, objects, definitions and implementations. Zonnon offers a new computing model based on active objects with their interaction defined by syntax controlled dialogs. It also introduces new features including operator overloading and exception handling, and is specifically designed to be platform independent. - -===See also=== -* [[Oberon-07]] -* [[Oberon-2]] -* [[Component Pascal]] -* [[Modula-2]] -* [[Modula-3]] \ No newline at end of file +Zonnon is a general-purpose programming language in the [[Pascal]], [[Modula-2]] and [[Oberon]] family. It retains an emphasis on simplicity, clear syntax and separation of concerns whilst focusing on concurrency and ease of composition and expression. Unification of abstractions is at the heart of its design and this is reflected in its conceptual model based on modules, objects, definitions and implementations. Zonnon offers a new computing model based on active objects with their interaction defined by syntax controlled dialogs. It also introduces new features including operator overloading and exception handling, and is specifically designed to be platform independent. \ No newline at end of file diff --git a/Task/100-doors/00-TASK.txt b/Task/100-doors/00-TASK.txt index 83471393d8..fd7471448b 100644 --- a/Task/100-doors/00-TASK.txt +++ b/Task/100-doors/00-TASK.txt @@ -2,26 +2,21 @@ There are 100 doors in a row that are all initially closed. You make 100 [[task feature::Rosetta Code:multiple passes|passes]] by the doors. -The first time through, visit every door and ''toggle'' the door (if the door is closed, open it; if it is open, close it). +The first time through, visit every door and  ''toggle''  the door  (if the door is closed,  open it;   if it is open,  close it). -The second time, only visit every 2nd door (door #2, #4, #6, ...), and toggle it. +The second time, only visit every 2nd door   (door #2, #4, #6, ...),   and toggle it. -The third time, visit every 3rd door (door #3, #6, #9, ...), etc, until you only visit the 100th door. +The third time, visit every 3rd door   (door #3, #6, #9, ...), etc,   until you only visit the 100th door. ;Task: -Answer the question: what state are the doors in after the last pass? Which are open, which are closed? +Answer the question:   what state are the doors in after the last pass?   Which are open, which are closed? '''[[task feature::Rosetta Code:extra credit|Alternate]]:''' -As noted in this page's [[Talk:100 doors|discussion page]], the only doors that remain open are those whose numbers are perfect squares. +As noted in this page's   [[Talk:100 doors|discussion page]],   the only doors that remain open are those whose numbers are perfect squares. -Opening only those doors is an [[task feature::Rosetta Code:optimization|optimization]] that may also be expressed; +Opening only those doors is an   [[task feature::Rosetta Code:optimization|optimization]]   that may also be expressed; however, as should be obvious, this defeats the intent of comparing implementations across programming languages.

    -;Why doesn't syntax highlighting work on this page ?: -Currently, there is a limit on how many <syntaxhighlight> tags can appear on a page, so only the first few languages get highlighting, the rest are shown in monochrome.
    -You could try "manual highlighting", possibly using one of the highlighters on [[Syntax highlighting using Mediawiki formatting]] or something similar. - - diff --git a/Task/100-doors/11l/100-doors.11l b/Task/100-doors/11l/100-doors.11l index 2808744415..3783f3ff5a 100644 --- a/Task/100-doors/11l/100-doors.11l +++ b/Task/100-doors/11l/100-doors.11l @@ -1,5 +1,5 @@ V doors = [0B] * 100 -L(i) 0.<100 +L(i) 100 L(j) (i .< 100).step(i + 1) doors[j] = !doors[j] print(‘Door ’(i + 1)‘: ’(I doors[i] {‘open’} E ‘close’)) diff --git a/Task/100-doors/8080-Assembly/100-doors-2.8080 b/Task/100-doors/8080-Assembly/100-doors-2.8080 deleted file mode 100644 index d5cb28c55f..0000000000 --- a/Task/100-doors/8080-Assembly/100-doors-2.8080 +++ /dev/null @@ -1,79 +0,0 @@ -wboot equ 0 ; jump to BIOS warm boot routine -bdos equ 5 ; BDOS entry -conout equ 2 ; BDOS console output function -putstr equ 9 ; BDOS print string function -ndoors equ 100 ; number of doors - ; - org 100h - lxi sp,stack ; set our own stack - lxi d,intro ; print introductory message - mvi c,putstr - call bdos - ; - ; generate sequence of squares to specified limit - ; HL holds the current square - ; DE holds the increment - ; BC holds the negative of the limit - ; -gensqr: lxi h,1 ; starting value of square - lxi d,3 ; starting value of increment - lxi b,-ndoors -sqrs2: call putdec ; otherwise print current square - mvi a,' ' ; separate with a space - call putchr - push h ; have we reached the limit? - dad b - pop h - jc done ; CY if HL > limit - dad d ; square += incrememnt - inx d ; increment += 2 - inx d - jmp sqrs2 ; repeat until finished - ; -done: jmp wboot ; exit with warm boot - ;--------------------------------------------------- - ; console output of char in A register - ;--------------------------------------------------- -putchr: push h - push d - push b - mov e,a - mvi c,conout - call bdos - pop b - pop d - pop h - ret - ;--------------------------------------------------- - ; Output decimal number to console - ; HL holds 16-bit unsigned binary number to print - ;--------------------------------------------------- -putdec: push b - push d - push h - lxi b,-10 - lxi d,-1 -putdec2: - dad b - inx d - jc putdec2 - lxi b,10 - dad b - xchg - mov a,h - ora l - cnz putdec ; recursive call - mov a,e - adi '0' - call putchr - pop h - pop d - pop b - ret - ;--------------------------------------------------- - ; data area and stack - ;--------------------------------------------------- -intro: db 'The open doors are: $' -stack equ $+128 ; 64-level stack - ; - end diff --git a/Task/100-doors/8080-Assembly/100-doors-1.8080 b/Task/100-doors/8080-Assembly/100-doors.8080 similarity index 100% rename from Task/100-doors/8080-Assembly/100-doors-1.8080 rename to Task/100-doors/8080-Assembly/100-doors.8080 diff --git a/Task/100-doors/ANSI-BASIC/100-doors.basic b/Task/100-doors/ANSI-BASIC/100-doors.basic deleted file mode 100644 index eec806c191..0000000000 --- a/Task/100-doors/ANSI-BASIC/100-doors.basic +++ /dev/null @@ -1,21 +0,0 @@ -100 REM 100 doors -110 REM The unoptimised door flipping method -120 REM which simulates the process -130 DIM IsDoorOpen(1 TO 100) -140 LET DoorMax = UBOUND(IsDoorOpen) -150 REM Set all doors to closed -160 FOR I = 1 TO DoorMax -170 LET IsDoorOpen(I) = 0 -180 NEXT I -190 REM Repeatedly flip the doors -200 FOR I = 1 TO DoorMax -210 FOR J = I TO DoorMax STEP I -220 LET IsDoorOpen(J) = 1 - IsDoorOpen(J) -230 NEXT J -240 NEXT I -250 REM Display the results -260 FOR I = 1 TO DoorMax -270 IF IsDoorOpen(I) <> 0 THEN PRINT I; -280 NEXT I -290 PRINT -300 END diff --git a/Task/100-doors/APL/100-doors-2.apl b/Task/100-doors/APL/100-doors-2.apl index bff8982b24..ba6d739dae 100644 --- a/Task/100-doors/APL/100-doors-2.apl +++ b/Task/100-doors/APL/100-doors-2.apl @@ -1 +1,3 @@ -≠⌿0=(⍳100)∘.|⍳100 +⍝⍝ Also works with GNU APL after introduction of +⍝⍝ the ⍸ function with SVN r1368, Dec 03 2020 +⍸≠⌿0=(⍳100)∘.|⍳100 diff --git a/Task/100-doors/APL/100-doors-3.apl b/Task/100-doors/APL/100-doors-3.apl deleted file mode 100644 index 5fcad5e104..0000000000 --- a/Task/100-doors/APL/100-doors-3.apl +++ /dev/null @@ -1 +0,0 @@ -⍸≠⌿0=(⍳100)∘.|⍳100 diff --git a/Task/100-doors/AWK/100-doors-1.awk b/Task/100-doors/AWK/100-doors-1.awk new file mode 100644 index 0000000000..1c2a279c09 --- /dev/null +++ b/Task/100-doors/AWK/100-doors-1.awk @@ -0,0 +1,17 @@ +BEGIN { + for(i=1; i <= 100; i++) + { + doors[i] = 0 # close the doors + } + for(i=1; i <= 100; i++) + { + for(j=i; j <= 100; j += i) + { + doors[j] = (doors[j]+1) % 2 + } + } + for(i=1; i <= 100; i++) + { + print i, doors[i] ? "open" : "close" + } +} diff --git a/Task/100-doors/AWK/100-doors-2.awk b/Task/100-doors/AWK/100-doors-2.awk new file mode 100644 index 0000000000..9344bbec27 --- /dev/null +++ b/Task/100-doors/AWK/100-doors-2.awk @@ -0,0 +1,14 @@ +BEGIN { + for(i=1; i <= 100; i++) { + doors[i] = 0 # close the doors + } + for(i=1; i <= 100; i++) { + if ( int(sqrt(i)) == sqrt(i) ) { + doors[i] = 1 + } + } + for(i=1; i <= 100; i++) + { + print i, doors[i] ? "open" : "close" + } +} diff --git a/Task/100-doors/Ada/100-doors-1.adb b/Task/100-doors/Ada/100-doors-1.ada similarity index 100% rename from Task/100-doors/Ada/100-doors-1.adb rename to Task/100-doors/Ada/100-doors-1.ada diff --git a/Task/100-doors/Ada/100-doors-2.adb b/Task/100-doors/Ada/100-doors-2.ada similarity index 100% rename from Task/100-doors/Ada/100-doors-2.adb rename to Task/100-doors/Ada/100-doors-2.ada diff --git a/Task/100-doors/Adina/100-doors-1.adina b/Task/100-doors/Adina/100-doors-1.adina deleted file mode 100644 index 0e7190c89e..0000000000 --- a/Task/100-doors/Adina/100-doors-1.adina +++ /dev/null @@ -1,16 +0,0 @@ -двери = новый-массив 100 ложь - -цикл - шаг - в-диапазоне 1 101 - цикл - номер - в-диапазоне (шаг - 1) 100 шаг - двери[номер] := не двери[номер] - -цикл - номер 100 - вывести/перенос - формат «Дверь ~a ~a» - номер + 1 - двери[номер] ? «открыта» «закрыта» diff --git a/Task/100-doors/Adina/100-doors-2.adina b/Task/100-doors/Adina/100-doors-2.adina deleted file mode 100644 index 6286140dc0..0000000000 --- a/Task/100-doors/Adina/100-doors-2.adina +++ /dev/null @@ -1,17 +0,0 @@ -english() -doors = make-vector 100 #f - -for - $ step - in-range 1 101 - for - $ number - in-range (step - 1) 100 step - doors[number] := not doors[number] - -for - $ number 100 - displayln - format "Door ~a ~a" - number + 1 - if doors[number] "open" "closed" diff --git a/Task/100-doors/Agena/100-doors.agena b/Task/100-doors/Agena/100-doors.agena new file mode 100644 index 0000000000..18c9cb1963 --- /dev/null +++ b/Task/100-doors/Agena/100-doors.agena @@ -0,0 +1,19 @@ +# find the first few squares via the unoptimised door flipping method +scope + + local doorMax := 100; + local door; + create register door( doorMax ); + + # set all doors to closed + for i to doorMax do door[ i ] := false od; + + # repeatedly flip the doors + for i to doorMax do + for j from i to doorMax by i do door[ j ] := not door[ j ] od + od; + + # display the results + for i to doorMax do if door[ i ] then write( " ", i ) fi od; print() + +epocs diff --git a/Task/100-doors/ArkScript/100-doors-1.ark b/Task/100-doors/ArkScript/100-doors-1.ark deleted file mode 100644 index 713e3b360f..0000000000 --- a/Task/100-doors/ArkScript/100-doors-1.ark +++ /dev/null @@ -1,21 +0,0 @@ -(import std.Range :range :forEach) -(import std.List) - -(mut doors (list:fill 100 false)) -(let r (range 0 100)) - -(forEach r - (fun (i) { - (mut j i) - (while (< j 100) { - (@= doors j (not (@ doors j))) - (set j (+ j i 1)) }) - (print doors) })) - -(print - (list:map - (list:filter - (list:zipWithIndex doors) - (fun (e) - (@ e 1))) - (fun (e) (@ e 0)))) diff --git a/Task/100-doors/ArkScript/100-doors-2.ark b/Task/100-doors/ArkScript/100-doors-2.ark deleted file mode 100644 index b1cb4380b2..0000000000 --- a/Task/100-doors/ArkScript/100-doors-2.ark +++ /dev/null @@ -1,4 +0,0 @@ -[true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true true] -... -[true false false true false false false false true false false false false false false true false false false false false false false false true false false false false false false false false false false true false false false false false false false false false false false false true false false false false false false false false false false false false false false true false false false false false false false false false false false false false false false false true false false false false false false false false false false false false false false false false false false true] -[0 3 8 15 24 35 48 63 80 99] diff --git a/Task/100-doors/AutoIt/100-doors.au3 b/Task/100-doors/AutoIt/100-doors.autoit similarity index 100% rename from Task/100-doors/AutoIt/100-doors.au3 rename to Task/100-doors/AutoIt/100-doors.autoit diff --git a/Task/100-doors/AutoLISP/100-doors.lsp b/Task/100-doors/AutoLISP/100-doors.lsp deleted file mode 100644 index d4a0ebbe77..0000000000 --- a/Task/100-doors/AutoLISP/100-doors.lsp +++ /dev/null @@ -1,18 +0,0 @@ -(defun CreateDoors (n / doors) - (repeat n - (setq doors (cons nil doors)) - ) -) - -(defun Doors (doors / cnt) - (setq cnt 0) - (mapcar - '(lambda (d) - (zerop (rem (sqrt (setq cnt (1+ cnt))) 1)) - ) - doors - ) -) - -> (Doors (CreateDoors 100)) -(T nil nil T nil nil nil nil T nil nil nil nil nil nil T nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil T nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil T nil nil nil nil) diff --git a/Task/100-doors/BQN/100-doors-4.bqn b/Task/100-doors/BQN/100-doors-4.bqn deleted file mode 100644 index cfab61e191..0000000000 --- a/Task/100-doors/BQN/100-doors-4.bqn +++ /dev/null @@ -1,3 +0,0 @@ -F ← {1+ / 2| +˝ 0= |⌜˜ 1+↕𝕩} -F 100 -# ⟨ 1 4 9 16 25 36 49 64 81 100 ⟩ diff --git a/Task/100-doors/BQN/100-doors-5.bqn b/Task/100-doors/BQN/100-doors-5.bqn deleted file mode 100644 index b78e4f3de6..0000000000 --- a/Task/100-doors/BQN/100-doors-5.bqn +++ /dev/null @@ -1,3 +0,0 @@ -F ← {ט1+↕⌊√𝕩} -F 100 -# ⟨ 1 4 9 16 25 36 49 64 81 100 ⟩ diff --git a/Task/100-doors/Ballerina/100-doors.ballerina b/Task/100-doors/Ballerina/100-doors.ballerina deleted file mode 100644 index 35d7c63798..0000000000 --- a/Task/100-doors/Ballerina/100-doors.ballerina +++ /dev/null @@ -1,16 +0,0 @@ -// https://rosettacode.org/wiki/100_doors -import ballerina/io; - -public function main() { - boolean[100] doors = []; - foreach int i in int:range(0,100,1) { - foreach int j in int:range(i, 100, i+1) { - doors[j] = ! doors[j]; - } - } - foreach int i in int:range(0,doors.length(),1) { - if doors[i] { - io:println("Door #",i+1," is ","open"); - } - } -} diff --git a/Task/100-doors/C-sharp/100-doors-1.cs b/Task/100-doors/C-sharp/100-doors-1.cs index 3e031cc721..d06413f95c 100644 --- a/Task/100-doors/C-sharp/100-doors-1.cs +++ b/Task/100-doors/C-sharp/100-doors-1.cs @@ -5,10 +5,11 @@ namespace ConsoleApplication1 { static void Main(string[] args) { - // Arrays are initialized to their type default values; the default for bool is false - // Use false to indicate closed door bool[] doors = new bool[100]; + //Close all doors to start. + for (int d = 0; d < 100; d++) doors[d] = false; + //For each pass... for (int p = 0; p < 100; p++)//number of passes { @@ -23,7 +24,7 @@ namespace ConsoleApplication1 } //Output the results. - Console.WriteLine("Passes Completed!!! Here are the results:"); + Console.WriteLine("Passes Completed!!! Here are the results: \r\n"); for (int d = 0; d < 100; d++) { if (doors[d]) diff --git a/Task/100-doors/C/100-doors-3.c b/Task/100-doors/C/100-doors-3.c index d8fed2c66e..fb7f7feb29 100644 --- a/Task/100-doors/C/100-doors-3.c +++ b/Task/100-doors/C/100-doors-3.c @@ -1,14 +1,19 @@ #include -#include -int main() { - uint32_t doorBytes[4] = {0}; - - for (uint32_t i = 1; i <= 100; ++i) - for (uint32_t j = i - 1; j <= 99; j += i) - doorBytes[j % 4] ^= (uint32_t)1 << j / 4; - - for (uint32_t i = 0; i <= 99; doorBytes[i++ % 4] >>= 1) - if (doorBytes[i % 4] & 1) - printf("door %d is open\n", i + 1); +int main() +{ + int square = 1, increment = 3, door; + for (door = 1; door <= 100; ++door) + { + printf("door #%d", door); + if (door == square) + { + printf(" is open.\n"); + square += increment; + increment += 2; + } + else + printf(" is closed.\n"); + } + return 0; } diff --git a/Task/100-doors/C/100-doors-4.c b/Task/100-doors/C/100-doors-4.c index fb7f7feb29..a1972a382b 100644 --- a/Task/100-doors/C/100-doors-4.c +++ b/Task/100-doors/C/100-doors-4.c @@ -2,18 +2,8 @@ int main() { - int square = 1, increment = 3, door; - for (door = 1; door <= 100; ++door) - { - printf("door #%d", door); - if (door == square) - { - printf(" is open.\n"); - square += increment; - increment += 2; - } - else - printf(" is closed.\n"); - } + int door, square, increment; + for (door = 1, square = 1, increment = 1; door <= 100; door++ == square && (square += increment += 2)) + printf("door #%d is %s.\n", door, (door == square? "open" : "closed")); return 0; } diff --git a/Task/100-doors/C/100-doors-5.c b/Task/100-doors/C/100-doors-5.c index a1972a382b..4988099e36 100644 --- a/Task/100-doors/C/100-doors-5.c +++ b/Task/100-doors/C/100-doors-5.c @@ -2,8 +2,9 @@ int main() { - int door, square, increment; - for (door = 1, square = 1, increment = 1; door <= 100; door++ == square && (square += increment += 2)) - printf("door #%d is %s.\n", door, (door == square? "open" : "closed")); - return 0; + int i; + for (i = 1; i * i <= 100; i++) + printf("door %d open\n", i * i); + + return 0; } diff --git a/Task/100-doors/C/100-doors-6.c b/Task/100-doors/C/100-doors-6.c deleted file mode 100644 index 4988099e36..0000000000 --- a/Task/100-doors/C/100-doors-6.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -int main() -{ - int i; - for (i = 1; i * i <= 100; i++) - printf("door %d open\n", i * i); - - return 0; -} diff --git a/Task/100-doors/CBASIC/100-doors.basic b/Task/100-doors/CBASIC/100-doors.basic deleted file mode 100644 index f81972b2ae..0000000000 --- a/Task/100-doors/CBASIC/100-doors.basic +++ /dev/null @@ -1,27 +0,0 @@ -dim doors%(100) - -print "Finding solution to the 100 Doors Problem" - -rem - all doors are initially closed -for i% = 1 to 100 - doors%(i%) = 0 -next i% - -rem - pass through at increasing intervals -for i% = 1 to 100 - for j% = i% to 100 step i% - rem - flip each door encountered - doors%(j%) = 1 - doors%(j%) - next j% -next i% - -rem - show which doors are open -print "The open doors are: "; -for i% = 1 to 100 - if doors%(i%) = 1 then print i%; -next i% - -print -print "Thanks for consulting the puzzle guru!" - -end diff --git a/Task/100-doors/COBOL/100-doors.cob b/Task/100-doors/COBOL/100-doors.cobol similarity index 100% rename from Task/100-doors/COBOL/100-doors.cob rename to Task/100-doors/COBOL/100-doors.cobol diff --git a/Task/100-doors/Component-Pascal/100-doors.pas b/Task/100-doors/Component-Pascal/100-doors.pas new file mode 100644 index 0000000000..0e11914244 --- /dev/null +++ b/Task/100-doors/Component-Pascal/100-doors.pas @@ -0,0 +1,26 @@ +MODULE Doors100; +IMPORT StdLog; + +PROCEDURE Do*; +VAR + i,j: INTEGER; + closed: ARRAY 101 OF BOOLEAN; +BEGIN + (* initialization of closed to true *) + FOR i := 0 TO LEN(closed) - 1 DO closed[i] := TRUE END; + (* process *) + FOR i := 1 TO LEN(closed) DO; + j := 1; + WHILE j < LEN(closed) DO + IF j MOD i = 0 THEN closed[j] := ~closed[j] END;INC(j) + END + END; + (* print results *) + i := 1; + WHILE i < LEN(closed) DO + IF (i - 1) MOD 10 = 0 THEN StdLog.Ln END; + IF closed[i] THEN StdLog.String("C ") ELSE StdLog.String("O ") END; + INC(i) + END; +END Do; +END Doors100. diff --git a/Task/100-doors/Rocq/100-doors-1.rocq b/Task/100-doors/Coq/100-doors-1.coq similarity index 100% rename from Task/100-doors/Rocq/100-doors-1.rocq rename to Task/100-doors/Coq/100-doors-1.coq diff --git a/Task/100-doors/Rocq/100-doors-2.rocq b/Task/100-doors/Coq/100-doors-2.coq similarity index 100% rename from Task/100-doors/Rocq/100-doors-2.rocq rename to Task/100-doors/Coq/100-doors-2.coq diff --git a/Task/100-doors/Rocq/100-doors-3.rocq b/Task/100-doors/Coq/100-doors-3.coq similarity index 100% rename from Task/100-doors/Rocq/100-doors-3.rocq rename to Task/100-doors/Coq/100-doors-3.coq diff --git a/Task/100-doors/Rocq/100-doors-4.rocq b/Task/100-doors/Coq/100-doors-4.coq similarity index 100% rename from Task/100-doors/Rocq/100-doors-4.rocq rename to Task/100-doors/Coq/100-doors-4.coq diff --git a/Task/100-doors/Crystal/100-doors.cr b/Task/100-doors/Crystal/100-doors.crystal similarity index 100% rename from Task/100-doors/Crystal/100-doors.cr rename to Task/100-doors/Crystal/100-doors.crystal diff --git a/Task/100-doors/DuckDB/100-doors.duckdb b/Task/100-doors/DuckDB/100-doors.duckdb deleted file mode 100644 index aa3716882e..0000000000 --- a/Task/100-doors/DuckDB/100-doors.duckdb +++ /dev/null @@ -1,19 +0,0 @@ -# Show the state of n doors after n iterations -create or replace function doors(n) as ( - with recursive cte(ix,d) as ( - select 0 as ix, list_transform(range(0, n), x -> false) as d - union all - select ix+1, - list_transform(d, (x,i) -> if (i % (ix + 1) = 0, NOT x, x)) - from cte - where ix < n - ) - select last(d order by ix) - from cte -); - -# For brevity, we just show the indices of the doors that are open after all -# have been visited: -select ix -from (select unnest(generate_series(1,100)) as ix, unnest(doors(100)) as d) -where d = true; diff --git a/Task/100-doors/EMal/100-doors.emal b/Task/100-doors/EMal/100-doors.emal index f7294803da..6f7b1360d1 100644 --- a/Task/100-doors/EMal/100-doors.emal +++ b/Task/100-doors/EMal/100-doors.emal @@ -4,7 +4,7 @@ type Door model int id Door:State state - new by int ←id, Door:State ←state do end + new by int =id, Door:State =state do end fun toggle ← <|me.state ← when(me.state æ Door:State.CLOSED, Door:State.OPEN, Door:State.CLOSED) fun asText ← <|"Door #" + me.id + " is " + when(me.state æ Door:State.CLOSED, "closed", "open") end @@ -13,7 +13,7 @@ type Main List doors ← Door[].with(100, false); for(int i := 0; i < 100; i++) @@ -14,8 +14,8 @@ public Program() for(int i := 0; i < 100; i++) { - Console.printLine("Door #",i + 1," :",Doors[i].iif("Open","Closed")) + console.printLine("Door #",i + 1," :",Doors[i].iif("Open","Closed")) }; - Console.readChar() + console.readChar() } diff --git a/Task/100-doors/Elixir/100-doors.ex b/Task/100-doors/Elixir/100-doors.elixir similarity index 100% rename from Task/100-doors/Elixir/100-doors.ex rename to Task/100-doors/Elixir/100-doors.elixir diff --git a/Task/100-doors/Emacs-Lisp/100-doors-2.el b/Task/100-doors/Emacs-Lisp/100-doors-2.el deleted file mode 100644 index 66b2cff437..0000000000 --- a/Task/100-doors/Emacs-Lisp/100-doors-2.el +++ /dev/null @@ -1,16 +0,0 @@ -(defun one-hundred-doors(initial-state) - "Turn doors in INITIAL-STATE according to 100 Doors problem." - (interactive "nEnter initial doors' state (as a number): ") - (cl-loop for x from 1 to 100 - do (cl-loop for y from (1- x) to 99 by x - do (setq initial-state (logxor initial-state (ash 1 y))))) - (let ((counter 1) - (open-doors nil)) - (while (> initial-state 0) - (when (eq (mod initial-state 2) 1) - (push counter open-doors)) - (cl-incf counter) - (setq initial-state (/ initial-state 2))) - (message "Open doors are %s" (reverse open-doors)))) - -(one-hundred-doors 0) diff --git a/Task/100-doors/Emacs-Lisp/100-doors-1.el b/Task/100-doors/Emacs-Lisp/100-doors.l similarity index 100% rename from Task/100-doors/Emacs-Lisp/100-doors-1.el rename to Task/100-doors/Emacs-Lisp/100-doors.l diff --git a/Task/100-doors/Euphoria/100-doors.eu b/Task/100-doors/Euphoria/100-doors.euphoria similarity index 100% rename from Task/100-doors/Euphoria/100-doors.eu rename to Task/100-doors/Euphoria/100-doors.euphoria diff --git a/Task/100-doors/Excel/100-doors-4.excel b/Task/100-doors/Excel/100-doors-4.excel deleted file mode 100644 index 619e31a91c..0000000000 --- a/Task/100-doors/Excel/100-doors-4.excel +++ /dev/null @@ -1 +0,0 @@ -=LET(i, SEQUENCE(100), root, SQRT(i), "Door " & i & ": " & IF(root = INT(root), "open", "close")) diff --git a/Task/100-doors/F-Sharp/100-doors-2.fs b/Task/100-doors/F-Sharp/100-doors-2.fs index abda597121..dff5b85a51 100644 --- a/Task/100-doors/F-Sharp/100-doors-2.fs +++ b/Task/100-doors/F-Sharp/100-doors-2.fs @@ -1 +1,6 @@ -[1..100] |> List.fold (fun doors pass->List.mapi (fun i x->if ((i + 1) % pass)=0 then not x else x) doors) (List.init 100 (fun _->false)) +open System +let answer2 = + let PerfectSquare n = + let sqrt = int(Math.Sqrt(float n)) + n = sqrt * sqrt + [| for i in 1..100 do yield PerfectSquare i |] diff --git a/Task/100-doors/F-Sharp/100-doors-3.fs b/Task/100-doors/F-Sharp/100-doors-3.fs index 0e020e7034..abda597121 100644 --- a/Task/100-doors/F-Sharp/100-doors-3.fs +++ b/Task/100-doors/F-Sharp/100-doors-3.fs @@ -1,8 +1 @@ -let X q=not q -let mutable q = false -let mutable doors = [] -for n in 1..100 do - for g in 1..n do if n%g=0 then q<-X(q) - if q then doors<-n::doors - q<-false -printfn "%A" (doors|>List.rev) +[1..100] |> List.fold (fun doors pass->List.mapi (fun i x->if ((i + 1) % pass)=0 then not x else x) doors) (List.init 100 (fun _->false)) diff --git a/Task/100-doors/Fennel/100-doors.fennel b/Task/100-doors/Fennel/100-doors.fennel deleted file mode 100644 index b6e72cb03e..0000000000 --- a/Task/100-doors/Fennel/100-doors.fennel +++ /dev/null @@ -1,15 +0,0 @@ -(do ;;; find the first few squares via the unoptimised door flipping method - - (local door-max 100) - - ; repeatedly flip the doors and show the ones that are left open - (var door {}) - (for [i 1 door-max] - (for [j i door-max i] - (tset door j (not (. door j))) - ) - (when (. door i) - (io.write (.. " " i)) - ) - ) -) diff --git a/Task/100-doors/Fortran/100-doors-3.f b/Task/100-doors/Fortran/100-doors-3.f deleted file mode 100644 index 2041b696fe..0000000000 --- a/Task/100-doors/Fortran/100-doors-3.f +++ /dev/null @@ -1,73 +0,0 @@ -! ============================================================================= -! DOORS PROBLEM -! ============================================================================= -! -! PROBLEM STATEMENT: -! 100 doors are all initially closed. We make 100 passes. -! Pass 1 toggles every door (1, 2, 3, ..., 100). -! Pass 2 toggles every 2nd (2, 4, 6, ..., 100). -! Pass k toggles every k-th (k, 2k, 3k, ...). -! Pass 100 toggles only door 100. -! What state is each door in after all 100 passes? -! -! ALGORITHM -- DIVISOR COUNTING: -! Door number D is toggled on pass k if and only if k divides D evenly, -! i.e. mod(D, k) == 0. So the total number of toggles that door D receives -! equals the number of divisors of D (including 1 and D itself). -! -! Example: door 6 -! Divisors of 6 are 1, 2, 3, 6 => 4 toggles => even => CLOSED -! -! Example: door 9 -! Divisors of 9 are 1, 3, 9 => 3 toggles => odd => OPEN -! -! A door ends up OPEN when its divisor count is ODD. -! A door ends up CLOSED when its divisor count is EVEN. -! -! KEY MATHEMATICAL INSIGHT (why the pattern is perfect squares): -! Divisors normally come in pairs: if j divides D then (D/j) also divides D, -! giving an even count. The only exception is when j == D/j, i.e. j*j == D. -! That "pairing trick" breaks at the square root, leaving one unpaired divisor -! and making the total ODD. This happens exactly when D is a perfect square. -! So doors 1, 4, 9, 16, 25, 36, 49, 64, 81, 100 are open; all others closed. -! -! This program proves the result by brute-force divisor counting, rather than -! assuming the mathematical conclusion up front. -! ============================================================================= - -program doors - implicit none - - integer, parameter :: n = 100 ! total number of doors (and passes) - integer :: door ! current door being evaluated (1..n) - integer :: pass ! current pass number being tested (1..n) - integer :: toggles ! number of times this door was toggled - character(6) :: state ! final state label: 'open' or 'closed' - - ! --- outer loop: consider each door in turn --- - do door = 1, n - - toggles = 0 ! reset the toggle counter for this door - - ! --- inner loop: check every pass to see if it touches this door --- - ! Pass number 'pass' visits door 'door' only when 'pass' is a divisor - ! of 'door'. mod(door, pass) == 0 means pass divides door exactly. - do pass = 1, n - if (mod(door, pass) == 0) toggles = toggles + 1 - end do - - ! --- determine final state from parity of toggle count --- - ! Starting closed, an odd number of toggles leaves the door open; - ! an even number returns it to closed. - if (mod(toggles, 2) == 1) then - state = 'open' - else - state = 'closed' - end if - - ! --- report result for this door --- - write(*, '(A, I3, A, A)') 'Door', door, ' is ', trim(state) - - end do - -end program doors diff --git a/Task/100-doors/Goboscript/100-doors.gobo b/Task/100-doors/Goboscript/100-doors.gobo deleted file mode 100644 index f0bc39fd44..0000000000 --- a/Task/100-doors/Goboscript/100-doors.gobo +++ /dev/null @@ -1,37 +0,0 @@ -costumes "assets/blank.svg"; - -list doors; - -proc do_100_doors { - delete doors; - repeat 100 {add false to doors;} - - local pass_i = 1; - repeat 100 { - local i = 0; - repeat length doors / pass_i { - i += pass_i; - doors[i] = not doors[i]; - } - - pass_i++; - } -} - -onflag{main;} -proc main { - do_100_doors; - - show doors; - local i = 1; - repeat length doors { - if doors[i] { - local state = "open"; - } else { - local state = "closed"; - } - - log "Door " & i & " is " & state; - i++; - } -} diff --git a/Task/100-doors/Haskell/100-doors-3.hs b/Task/100-doors/Haskell/100-doors-3.hs index 3b66096632..2cea247dfd 100644 --- a/Task/100-doors/Haskell/100-doors-3.hs +++ b/Task/100-doors/Haskell/100-doors-3.hs @@ -1,9 +1,6 @@ -isDoorOpen :: Integral a => a -> Bool --- In Haskell, we are too lazy to open and close doors. Instead we --- count how many times we would have toggled them, and then check if --- that number is odd. -isDoorOpen doorNumber = odd numToggles - where numToggles = length [ 1 | x <- [1..doorNumber], doorNumber `rem` x == 0] +gate :: Eq a => [a] -> [a] -> [Door] +gate (x:xs) (y:ys) | x == y = Open : gate xs ys +gate (x:xs) ys = Closed : gate xs ys +gate [] _ = [] -main = do - print $ "Open doors are " ++ show [x | x <- [0..100], isDoorOpen x] +run n = gate [1..n] [k*k | k <- [1..]] diff --git a/Task/100-doors/Haskell/100-doors-4.hs b/Task/100-doors/Haskell/100-doors-4.hs index 2cea247dfd..44f44aa391 100644 --- a/Task/100-doors/Haskell/100-doors-4.hs +++ b/Task/100-doors/Haskell/100-doors-4.hs @@ -1,6 +1 @@ -gate :: Eq a => [a] -> [a] -> [Door] -gate (x:xs) (y:ys) | x == y = Open : gate xs ys -gate (x:xs) ys = Closed : gate xs ys -gate [] _ = [] - -run n = gate [1..n] [k*k | k <- [1..]] +run n = takeWhile (< n) [k*k | k <- [1..]] diff --git a/Task/100-doors/Haskell/100-doors-5.hs b/Task/100-doors/Haskell/100-doors-5.hs deleted file mode 100644 index 44f44aa391..0000000000 --- a/Task/100-doors/Haskell/100-doors-5.hs +++ /dev/null @@ -1 +0,0 @@ -run n = takeWhile (< n) [k*k | k <- [1..]] diff --git a/Task/100-doors/Haxe/100-doors-1.hx b/Task/100-doors/Haxe/100-doors-1.haxe similarity index 100% rename from Task/100-doors/Haxe/100-doors-1.hx rename to Task/100-doors/Haxe/100-doors-1.haxe diff --git a/Task/100-doors/Haxe/100-doors-2.hx b/Task/100-doors/Haxe/100-doors-2.haxe similarity index 100% rename from Task/100-doors/Haxe/100-doors-2.hx rename to Task/100-doors/Haxe/100-doors-2.haxe diff --git a/Task/100-doors/Informix-4GL/100-doors-2.4gl b/Task/100-doors/Informix-4GL/100-doors-2.4gl index 6a8949775e..77483d70d0 100644 --- a/Task/100-doors/Informix-4GL/100-doors-2.4gl +++ b/Task/100-doors/Informix-4GL/100-doors-2.4gl @@ -2,7 +2,7 @@ (for i (range 1 101) i2 (range (dec i) 100 i) - (var! doors (set-at [i2] (not (i2 doors)))) + (var! doors (set-at [i2] (! (i2 doors)))) (continue)) (-> (xmap vec doors) diff --git a/Task/100-doors/Julia/100-doors-1.jl b/Task/100-doors/Julia/100-doors-1.julia similarity index 100% rename from Task/100-doors/Julia/100-doors-1.jl rename to Task/100-doors/Julia/100-doors-1.julia diff --git a/Task/100-doors/Julia/100-doors-2.jl b/Task/100-doors/Julia/100-doors-2.julia similarity index 100% rename from Task/100-doors/Julia/100-doors-2.jl rename to Task/100-doors/Julia/100-doors-2.julia diff --git a/Task/100-doors/Kotlin/100-doors.kts b/Task/100-doors/Kotlin/100-doors.kotlin similarity index 100% rename from Task/100-doors/Kotlin/100-doors.kts rename to Task/100-doors/Kotlin/100-doors.kotlin diff --git a/Task/100-doors/Langur/100-doors-1.langur b/Task/100-doors/Langur/100-doors-1.langur index caac5fccf7..48e130366a 100644 --- a/Task/100-doors/Langur/100-doors-1.langur +++ b/Task/100-doors/Langur/100-doors-1.langur @@ -1,9 +1,9 @@ -var doors = [false] * 100 +var .doors = [false] * 100 -for i of doors { - for j = i; j <= len(doors); j += i { - doors[j] = not doors[j] +for .i of .doors { + for .j = .i; .j <= len(.doors); .j += .i { + .doors[.j] = not .doors[.j] } } -writeln for[=[]] i of doors { if doors[i]: _for = more(_for, i) } +writeln for[=[]] .i of .doors { if(.doors[.i]: _for ~= [.i]) } diff --git a/Task/100-doors/Langur/100-doors-2.langur b/Task/100-doors/Langur/100-doors-2.langur index 1933c0187f..f120dd60c3 100644 --- a/Task/100-doors/Langur/100-doors-2.langur +++ b/Task/100-doors/Langur/100-doors-2.langur @@ -1 +1 @@ -writeln fold(doors, series(1..len(doors)), by=fn(a, b, c) { if(b: a~[c]; a) }, init=[]) +writeln foldfrom(fn(.a, .b, .c) if(.b: .a~[.c]; .a), [], .doors, series 1..len .doors) diff --git a/Task/100-doors/Langur/100-doors-3.langur b/Task/100-doors/Langur/100-doors-3.langur index 61d90f3fb8..d1c575957b 100644 --- a/Task/100-doors/Langur/100-doors-3.langur +++ b/Task/100-doors/Langur/100-doors-3.langur @@ -1 +1 @@ -writeln map(1..10, by=fn{^2}) +writeln map fn{^2}, 1..10 diff --git a/Task/100-doors/Lua/100-doors.lua b/Task/100-doors/Lua/100-doors.lua new file mode 100644 index 0000000000..3183bc7730 --- /dev/null +++ b/Task/100-doors/Lua/100-doors.lua @@ -0,0 +1,11 @@ +local is_open = {} + +for pass = 1,100 do + for door = pass,100,pass do + is_open[door] = not is_open[door] + end +end + +for i,v in next,is_open do + print ('Door '..i..':',v and 'open' or 'close') +end diff --git a/Task/100-doors/MoonRock/100-doors.moonrock b/Task/100-doors/MoonRock/100-doors.moonrock deleted file mode 100644 index f942ba2444..0000000000 --- a/Task/100-doors/MoonRock/100-doors.moonrock +++ /dev/null @@ -1,35 +0,0 @@ -' 100 doors - -BEGIN DEF -%DoorMax = 100 -%LastI = %DoorMax - 1 -DIM DoorOpen%[%DoorMax] - -BEGIN CODE -' The unoptimised door flipping method -' which simulates the process -' Set all doors to closed -FOR I% = 0 TO %LastI - DoorOpen%[I%] = FALSE -NEXT -' Repeatedly flip the doors -FOR I% = 1 TO %DoorMax - J% = I% - 1 - WHILE J% < %DoorMax - IF DoorOpen%[J%] = TRUE THEN - DoorOpen%[J%] = FALSE - ELSE - DoorOpen%[J%] = TRUE - ENDIF - J% = J% + I% - WEND -NEXT -' Display the results -FOR I% = 0 TO %LastI - IF DoorOpen%[I%] = TRUE THEN - IPl1% = I% + 1 - PRINT " " + IPl1% - ENDIF -NEXT -PRINT "\n" -END diff --git a/Task/100-doors/OCaml/100-doors-1.ml b/Task/100-doors/OCaml/100-doors-1.ocaml similarity index 100% rename from Task/100-doors/OCaml/100-doors-1.ml rename to Task/100-doors/OCaml/100-doors-1.ocaml diff --git a/Task/100-doors/OCaml/100-doors-2.ml b/Task/100-doors/OCaml/100-doors-2.ocaml similarity index 100% rename from Task/100-doors/OCaml/100-doors-2.ml rename to Task/100-doors/OCaml/100-doors-2.ocaml diff --git a/Task/100-doors/OCaml/100-doors-3.ml b/Task/100-doors/OCaml/100-doors-3.ocaml similarity index 100% rename from Task/100-doors/OCaml/100-doors-3.ml rename to Task/100-doors/OCaml/100-doors-3.ocaml diff --git a/Task/100-doors/OPL/100-doors.opl b/Task/100-doors/OPL/100-doors.opl deleted file mode 100644 index 097dc00ccd..0000000000 --- a/Task/100-doors/OPL/100-doors.opl +++ /dev/null @@ -1,27 +0,0 @@ -REM https://github.com/Eva-Broccoli/OPL-Rosetta-Code/blob/main/A100door.opl -PROC main: - LOCAL door%(100),i%,j% - i%=1 - j%=1 - WHILE j%<101 - WHILE i%<101 - IF door%(i%)=0 - door%(i%)=1 - ELSE - door%(i%)=0 - ENDIF - i%=i%+j% - ENDWH - j%=j%+1 - i%=0+j% - ENDWH - PRINT "Open doors:", - i%=1 - WHILE i%<101 - IF door%(i%)=1 - PRINT i%, - ENDIF - i%=i%+1 - ENDWH - GET -ENDP diff --git a/Task/100-doors/Oberon/100-doors.oberon b/Task/100-doors/Oberon/100-doors.oberon new file mode 100644 index 0000000000..ddec2b2de8 --- /dev/null +++ b/Task/100-doors/Oberon/100-doors.oberon @@ -0,0 +1,27 @@ +MODULE Doors; + IMPORT Out; + + PROCEDURE Do*; (* In Oberon an asterisk after an identifier is an export mark *) + CONST N = 100; len = N + 1; + VAR i, j: INTEGER; + closed: ARRAY len OF BOOLEAN; (* Arrays in Oberon always start with index 0; closed[0] is not used *) + BEGIN + FOR i := 1 TO N DO closed[i] := TRUE END; + FOR i := 1 TO N DO + j := 1; + WHILE j < len DO + IF j MOD i = 0 THEN closed[j] := ~closed[j] END; INC(j) (* ~ = NOT *) + END + END; + (* Print a state diagram of all doors *) + FOR i := 1 TO N DO + IF (i - 1) MOD 10 = 0 THEN Out.Ln END; + IF closed[i] THEN Out.String("- ") ELSE Out.String("+ ") END + END; Out.Ln; + (* Print the numbers of the open doors *) + FOR i := 1 TO N DO + IF ~closed[i] THEN Out.Int(i, 0); Out.Char(" ") END + END; Out.Ln + END Do; + +END Doors. diff --git a/Task/100-doors/Odin/100-doors-1.odin b/Task/100-doors/Odin/100-doors-1.odin deleted file mode 100644 index 7169d3893a..0000000000 --- a/Task/100-doors/Odin/100-doors-1.odin +++ /dev/null @@ -1,22 +0,0 @@ -package doors - -import "core:fmt" - -main :: proc() { - doors: [100]bool - - for every_n := 1; every_n < len(doors); every_n += 1 { - i := every_n - 1 - for true { - if i >= len(doors) do break - - doors[i] = !doors[i] - - i += every_n - } - } - - for &door, i in doors { - if door do fmt.printf("%d ", i + 1) - } -} diff --git a/Task/100-doors/Odin/100-doors-2.odin b/Task/100-doors/Odin/100-doors-2.odin deleted file mode 100644 index b4fcc95bd6..0000000000 --- a/Task/100-doors/Odin/100-doors-2.odin +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import "core:fmt" - -main :: proc() { - using fmt - - Door_State :: enum {Closed, Open} - - doors := [?]Door_State { 0..<100 = .Closed } - - for i in 1..=100 { - for j := i-1; j < 100; j += i { - if doors[j] == .Closed { - doors[j] = .Open - } else { - doors[j] = .Closed - } - } - } - for state, i in doors { - println("Door: ",int(i+1)," -> ",state) - } -} diff --git a/Task/100-doors/Odin/100-doors-3.odin b/Task/100-doors/Odin/100-doors-3.odin deleted file mode 100644 index 77e9cd99ef..0000000000 --- a/Task/100-doors/Odin/100-doors-3.odin +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import "core:fmt" -import "core:math" - -main :: proc() { - using fmt - - Door_State :: enum {Closed, Open} - - doors := [?]Door_State { 0..<100 = .Closed } - - for i in 1..=100 { - res := math.sqrt_f64( f64(i) ) - if math.mod_f64( res, 1) == 0 { - doors[i-1] = .Open - } else { - doors[i-1] = .Closed - } - println("Door: ", i, " -> ", doors[i-1]) - } -} diff --git a/Task/100-doors/OmniMark/100-doors-1.xom b/Task/100-doors/OmniMark/100-doors-1.xom deleted file mode 100644 index 8a04ae39c7..0000000000 --- a/Task/100-doors/OmniMark/100-doors-1.xom +++ /dev/null @@ -1,18 +0,0 @@ -process - local switch doors size 100 ; all initialised ('1st pass' to false) - - repeat over doors - repeat for integer door from #item to 100 by #item - do when doors[door] = false - activate doors[door] ; illustrating alternative to set ... to - else - set doors[door] to false - done - again - again - - repeat over doors - do when doors = true - put #error '%d(#item)%n' - done - again diff --git a/Task/100-doors/OmniMark/100-doors-2.xom b/Task/100-doors/OmniMark/100-doors-2.xom deleted file mode 100644 index 8c4bd45aa7..0000000000 --- a/Task/100-doors/OmniMark/100-doors-2.xom +++ /dev/null @@ -1,10 +0,0 @@ -process - local integer door initial {1} - local integer step initial {3} - - repeat - output "Door %d(door) is open%n" - increment door by step - increment step by 2 - exit when door > 100 - again diff --git a/Task/100-doors/PL-M/100-doors.plm b/Task/100-doors/PL-M/100-doors.plm new file mode 100644 index 0000000000..0013832477 --- /dev/null +++ b/Task/100-doors/PL-M/100-doors.plm @@ -0,0 +1,55 @@ +100H: /* FIND THE FIRST FEW SQUARES VIA THE UNOPTIMISED DOOR FLIPPING METHOD */ + + /* BDOS SYSTEM CALL */ + BDOS: PROCEDURE( FN, ARG ); + DECLARE FN BYTE, ARG ADDRESS; + GO TO 5; + END BDOS; + + /* PRINTS A BYTE AS A CHARACTER */ + PRINT$CHAR: PROCEDURE( CH ); + DECLARE CH BYTE; + CALL BDOS( 2, CH ); + END PRINT$CHAR; + + /* PRINTS A BYTE AS A NUMBER */ + PRINT$BYTE: PROCEDURE( N ); + DECLARE N BYTE; + DECLARE ( V, D3, D2 ) BYTE; + V = N; + D3 = V MOD 10; + IF ( V := V / 10 ) <> 0 THEN DO; + D2 = V MOD 10; + IF ( V := V / 10 ) <> 0 THEN CALL PRINT$CHAR( '0' + V ); + CALL PRINT$CHAR( '0' + D2 ); + END; + CALL PRINT$CHAR( '0' + D3 ); + END PRINT$BYTE; + + DECLARE DOOR$DCL LITERALLY '101'; + DECLARE FALSE LITERALLY '0'; + DECLARE CR LITERALLY '0DH'; + DECLARE LF LITERALLY '0AH'; + + /* ARRAY OF DOORS - DOOR( I ) IS TRUE IF OPEN, FALSE IF CLOSED */ + DECLARE DOOR( DOOR$DCL ) BYTE; + DECLARE ( I, J ) BYTE; + + /* SET ALL DOORS TO CLOSED */ + DO I = 0 TO LAST( DOOR ); DOOR( I ) = FALSE; END; + /* REPEATEDLY FLIP THE DOORS */ + DO I = 1 TO LAST( DOOR ); + DO J = I TO LAST( DOOR ) BY I; + DOOR( J ) = NOT DOOR( J ); + END; + END; + /* DISPLAY THE RESULTS */ + DO I = 1 TO LAST( DOOR ); + IF DOOR( I ) THEN DO; + CALL PRINT$CHAR( ' ' ); + CALL PRINT$BYTE( I ); + END; + END; + CALL PRINT$CHAR( CR ); + CALL PRINT$CHAR( LF ); +EOF diff --git a/Task/100-doors/PascalABC.NET/100-doors.pas b/Task/100-doors/PascalABC.NET/100-doors.pas new file mode 100644 index 0000000000..fab41ed069 --- /dev/null +++ b/Task/100-doors/PascalABC.NET/100-doors.pas @@ -0,0 +1,8 @@ +// 100 doors. Nigel Galloway: January 1th., 2023 +type doorState=(Open,Closed); +function flip(n:doorState):doorState:=if n=Open then Closed else Open; +var Doors:Array of doorState:=ArrFill(100,Closed); +begin + for var n:=1 to 100 do for var g:=n-1 to 99 step n do Doors[g]:=flip(Doors[g]); + for var n:=0 to 99 do if Doors[n]=Open then write(n+1,' '); writeLn +end. diff --git a/Task/100-doors/Plain-English/100-doors.plain b/Task/100-doors/Plain-English/100-doors.plain index 2ebc38ce0b..f6ee5c1b2e 100644 --- a/Task/100-doors/Plain-English/100-doors.plain +++ b/Task/100-doors/Plain-English/100-doors.plain @@ -1,57 +1,51 @@ -A flag list is a doubly linked list with a flag. -A door is a flag list. -A pass is a number. - -To run: - Start up. - Pass doors given 1000 and 1000 passes. - Shut down. - -To pass doors given a count and some passes: - Create some doors given the count. - Loop. - Add 1 to a counter. - If the counter is greater than the passes, break. - Go through the doors given the counter and the passes. - Repeat. - Output the states of the doors. - Destroy the doors. - To create some doors given a count: - Loop. - Add 1 to a counter. - If the counter is greater than the count, exit. - Allocate memory for a door. - Clear the door's flag. - Append the door to the doors. - Repeat. +Loop. +If a counter is past the count, exit. +Allocate memory for a door. +Clear the door's flag. +Append the door to the doors. +Repeat. + +A door is a flag thing. To go through some doors given a number and some passes: - Put 0 into a counter. - Loop. - Add the number to the counter. - If the counter is greater than the passes, exit. - Pick a door from the doors given the number. - Invert the door's flag. - Repeat. - -To pick a door from some doors given a number: - Loop. - Add 1 to a counter. - If the counter is greater than the number, exit. - Get the door from the doors. - If the door is nil, exit. - Repeat. +Put 0 into a counter. +Loop. +Add the number to the counter. +If the counter is greater than the passes, exit. +Pick a door from the doors given the number. +Invert the door's flag. +Repeat. To output the states of some doors: - Loop. - Bump a counter. - Get a door from the doors. - If the door is nil, exit. - If the door's flag is set, - Write "Door " then the counter then " is open" - then the CRLF string to StdOut; - Repeat. - \Write "Door " then the counter then " is closed" - \then the CRLF string to StdOut. - Repeat. +Loop. +Bump a counter. +Get a door from the doors. +If the door is nil, exit. +If the door's flag is set, write "Door " then the counter then " is open" to the output; repeat. +Write "Door " then the counter then " is closed" to the output. +Repeat. + +To pass doors given a count and some passes: +Create some doors given the count. +Loop. +If a counter is past the passes, break. +Go through the doors given the counter and the passes. +Repeat. +Output the states of the doors. +Destroy the doors. + +A pass is a number. + +To pick a door from some doors given a number: +Loop. +If a counter is past the number, exit. +Get the door from the doors. +If the door is nil, exit. +Repeat. + +To run: +Start up. +Pass doors given 100 and 100 passes. +Wait for the escape key. +Shut down. diff --git a/Task/100-doors/PowerShell/100-doors-1.ps1 b/Task/100-doors/PowerShell/100-doors-1.psh similarity index 100% rename from Task/100-doors/PowerShell/100-doors-1.ps1 rename to Task/100-doors/PowerShell/100-doors-1.psh diff --git a/Task/100-doors/PowerShell/100-doors-2.ps1 b/Task/100-doors/PowerShell/100-doors-2.psh similarity index 100% rename from Task/100-doors/PowerShell/100-doors-2.ps1 rename to Task/100-doors/PowerShell/100-doors-2.psh diff --git a/Task/100-doors/PowerShell/100-doors-3.ps1 b/Task/100-doors/PowerShell/100-doors-3.psh similarity index 100% rename from Task/100-doors/PowerShell/100-doors-3.ps1 rename to Task/100-doors/PowerShell/100-doors-3.psh diff --git a/Task/100-doors/PowerShell/100-doors-4.ps1 b/Task/100-doors/PowerShell/100-doors-4.psh similarity index 100% rename from Task/100-doors/PowerShell/100-doors-4.ps1 rename to Task/100-doors/PowerShell/100-doors-4.psh diff --git a/Task/100-doors/PowerShell/100-doors-5.ps1 b/Task/100-doors/PowerShell/100-doors-5.psh similarity index 100% rename from Task/100-doors/PowerShell/100-doors-5.ps1 rename to Task/100-doors/PowerShell/100-doors-5.psh diff --git a/Task/100-doors/PowerShell/100-doors-6.ps1 b/Task/100-doors/PowerShell/100-doors-6.psh similarity index 100% rename from Task/100-doors/PowerShell/100-doors-6.ps1 rename to Task/100-doors/PowerShell/100-doors-6.psh diff --git a/Task/100-doors/PowerShell/100-doors-7.ps1 b/Task/100-doors/PowerShell/100-doors-7.psh similarity index 100% rename from Task/100-doors/PowerShell/100-doors-7.ps1 rename to Task/100-doors/PowerShell/100-doors-7.psh diff --git a/Task/100-doors/Pyret/100-doors.arr b/Task/100-doors/Pyret/100-doors.pyret similarity index 100% rename from Task/100-doors/Pyret/100-doors.arr rename to Task/100-doors/Pyret/100-doors.pyret diff --git a/Task/100-doors/Python/100-doors-5.py b/Task/100-doors/Python/100-doors-5.py index 96e57804d7..c3f39a49a6 100644 --- a/Task/100-doors/Python/100-doors-5.py +++ b/Task/100-doors/Python/100-doors-5.py @@ -1,2 +1,6 @@ for i in range(1, 101): - print(f"Door {i}:{"closed" if i**0.5 % 1 else "open"}") + if i**0.5 % 1: + state='closed' + else: + state='open' + print("Door {}:{}".format(i, state)) diff --git a/Task/100-doors/Python/100-doors-6.py b/Task/100-doors/Python/100-doors-6.py index b42230ac44..7524fc9970 100644 --- a/Task/100-doors/Python/100-doors-6.py +++ b/Task/100-doors/Python/100-doors-6.py @@ -1 +1 @@ -for i in range(1,11): print(f"Door {i**2} is open") +for i in range(1,11): print("Door %s is open" % i**2) diff --git a/Task/100-doors/Quackery/100-doors-1.quackery b/Task/100-doors/Quackery/100-doors-1.quackery deleted file mode 100644 index e3d105d0cd..0000000000 --- a/Task/100-doors/Quackery/100-doors-1.quackery +++ /dev/null @@ -1,17 +0,0 @@ - [ bit ^ ] is toggle ( f n --> f ) - - [ 0 - 100 times - [ i^ 1+ swap - 101 times - [ i^ toggle over step ] - nip ] ] is toggledoors ( --> f ) - - [ 100 times - [ 1 >> dup 1 & - if [ i^ 1+ echo sp ] ] - drop ] is echodoors ( f --> ) - - toggledoors - say " These doors are open: " echodoors cr - say " The rest are closed." cr diff --git a/Task/100-doors/Quackery/100-doors-2.quackery b/Task/100-doors/Quackery/100-doors-2.quackery deleted file mode 100644 index 85074cd60f..0000000000 --- a/Task/100-doors/Quackery/100-doors-2.quackery +++ /dev/null @@ -1 +0,0 @@ - 10 times [ i^ 1+ 2 ** echo sp ] diff --git a/Task/100-doors/Quackery/100-doors.quackery b/Task/100-doors/Quackery/100-doors.quackery new file mode 100644 index 0000000000..5577d1c6c4 --- /dev/null +++ b/Task/100-doors/Quackery/100-doors.quackery @@ -0,0 +1,22 @@ +/O> [ bit ^ ] is toggle ( f n --> f ) +... +... [ 0 +... 100 times +... [ i^ 1+ swap +... 101 times +... [ i^ toggle over step ] +... nip ] ] is toggledoors ( --> f ) +... +... [ 100 times +... [ 1 >> dup 1 & +... if [ i^ 1+ echo sp ] ] +... drop ] is echodoors ( f --> ) +... +... toggledoors +... say " These doors are open: " echodoors cr +... say " The rest are closed." cr +... + These doors are open: 1 4 9 16 25 36 49 64 81 100 + The rest are closed. + +Stack empty. diff --git a/Task/100-doors/Rebol/100-doors-1.rebol b/Task/100-doors/REBOL/100-doors-1.rebol similarity index 100% rename from Task/100-doors/Rebol/100-doors-1.rebol rename to Task/100-doors/REBOL/100-doors-1.rebol diff --git a/Task/100-doors/REBOL/100-doors-2.rebol b/Task/100-doors/REBOL/100-doors-2.rebol new file mode 100644 index 0000000000..73f1f448f3 --- /dev/null +++ b/Task/100-doors/REBOL/100-doors-2.rebol @@ -0,0 +1,2 @@ +doors: array/initial 100 'closed +repeat i 10 [doors/(i * i): 'open] diff --git a/Task/100-doors/Rebol/100-doors-2.rebol b/Task/100-doors/Rebol/100-doors-2.rebol deleted file mode 100644 index b8428a69d9..0000000000 --- a/Task/100-doors/Rebol/100-doors-2.rebol +++ /dev/null @@ -1,26 +0,0 @@ -;; Create a bitset with capacity for 100 bits (representing 100 doors) -;; Each bit represents a door state: 0 = closed, 1 = open -doors: make bitset! 100 - -;; Outer loop: Make 100 passes (i = 1 to 100) -repeat i 100 [ - ;; Inner loop: Check each door position (j = 1 to 100) - repeat j 100 [ - ;; If door j index is divisible by pass number i (no remainder) - if zero? (j // i) [ - ;; Toggle the door's bit: - ;; doors/:j accesses door j in the bitset - ;; 'not' flips the bit value (0 -> 1, 1 -> 0) - doors/:j: not doors/:j - ] - ] -] - -;; Final loop: Check which doors are open, print their numbers -repeat i 100 [ - ;; If door i's bit is set (open) - if doors/:i [ - ;; Print the door's number and that it is open - print ["door" i "is open"] - ] -] diff --git a/Task/100-doors/Rebol/100-doors-3.rebol b/Task/100-doors/Rebol/100-doors-3.rebol deleted file mode 100644 index 318cdd4a11..0000000000 --- a/Task/100-doors/Rebol/100-doors-3.rebol +++ /dev/null @@ -1,6 +0,0 @@ -;; Loop variable i from 1 to 10 (since 10^2 = 100, covers doors 1 to 100) -repeat i 10 [ - ;; Print that door number (i squared) is open - ;; These are exactly the doors with perfect square numbers: 1, 4, 9, ..., 100 - print ["door" (i * i) "is open"] -] diff --git a/Task/100-doors/Rust/100-doors-1.rs b/Task/100-doors/Rust/100-doors-1.rust similarity index 100% rename from Task/100-doors/Rust/100-doors-1.rs rename to Task/100-doors/Rust/100-doors-1.rust diff --git a/Task/100-doors/Rust/100-doors-2.rs b/Task/100-doors/Rust/100-doors-2.rust similarity index 100% rename from Task/100-doors/Rust/100-doors-2.rs rename to Task/100-doors/Rust/100-doors-2.rust diff --git a/Task/100-doors/Rust/100-doors-3.rs b/Task/100-doors/Rust/100-doors-3.rust similarity index 100% rename from Task/100-doors/Rust/100-doors-3.rs rename to Task/100-doors/Rust/100-doors-3.rust diff --git a/Task/100-doors/Rust/100-doors-4.rs b/Task/100-doors/Rust/100-doors-4.rust similarity index 100% rename from Task/100-doors/Rust/100-doors-4.rs rename to Task/100-doors/Rust/100-doors-4.rust diff --git a/Task/100-doors/Rye/100-doors.rye b/Task/100-doors/Rye/100-doors.rye deleted file mode 100644 index 1bd595c1c9..0000000000 --- a/Task/100-doors/Rye/100-doors.rye +++ /dev/null @@ -1,8 +0,0 @@ -replicate 100 { false } -|walk\pos 'p { - .map\pos 'r { ::d , - either r .is-multiple-of p { not d } { d } } - |at p } -|map\pos 'p { .either { p } { false } } -|filter { .is-integer } -|for { .embed "Door {} is open." |print } diff --git a/Task/100-doors/Scheme/100-doors-1.scm b/Task/100-doors/Scheme/100-doors-1.ss similarity index 100% rename from Task/100-doors/Scheme/100-doors-1.scm rename to Task/100-doors/Scheme/100-doors-1.ss diff --git a/Task/100-doors/Scheme/100-doors-2.scm b/Task/100-doors/Scheme/100-doors-2.ss similarity index 100% rename from Task/100-doors/Scheme/100-doors-2.scm rename to Task/100-doors/Scheme/100-doors-2.ss diff --git a/Task/100-doors/Scheme/100-doors-3.scm b/Task/100-doors/Scheme/100-doors-3.ss similarity index 100% rename from Task/100-doors/Scheme/100-doors-3.scm rename to Task/100-doors/Scheme/100-doors-3.ss diff --git a/Task/100-doors/Scheme/100-doors-4.scm b/Task/100-doors/Scheme/100-doors-4.scm deleted file mode 100644 index a65ab0f484..0000000000 --- a/Task/100-doors/Scheme/100-doors-4.scm +++ /dev/null @@ -1,17 +0,0 @@ -(define (doors-toggle door-state) - (define (doors-toggle-helper door-state num-doors step counter) - (cond ((> step num-doors) door-state) - ((> counter (1- num-doors)) - (doors-toggle-helper door-state num-doors (1+ step) step)) - (else (vector-set! door-state - counter - (not (array-ref door-state counter))) - (doors-toggle-helper door-state - num-doors - step - (+ step counter))))) - (let ((step 1) - (num-doors (vector-length door-state))) - (doors-toggle-helper door-state num-doors step (1- step)))) - -(doors-toggle (make-vector 100 #f)) ;; #t is an open door, #f a closed one diff --git a/Task/100-doors/Tailspin/100-doors-1.tailspin b/Task/100-doors/Tailspin/100-doors-1.tailspin deleted file mode 100644 index 3a2f81f4c2..0000000000 --- a/Task/100-doors/Tailspin/100-doors-1.tailspin +++ /dev/null @@ -1,14 +0,0 @@ -source hundredDoors - @: [ 1..100 -> 0 ]; - templates toggle - def jump: $; - $jump..100:$jump -> \( - when )> do @hundredDoors($): 1; - otherwise @hundredDoors($): 0; - \) -> !VOID - end toggle - 1..100 -> toggle -> !VOID - $@ -> \[i](<=1> ' $i;' !\) ! -end hundredDoors - -$hundredDoors -> 'Open doors:$...;' -> !OUT::write diff --git a/Task/100-doors/Tailspin/100-doors-2.tailspin b/Task/100-doors/Tailspin/100-doors-2.tailspin deleted file mode 100644 index fb29ae1395..0000000000 --- a/Task/100-doors/Tailspin/100-doors-2.tailspin +++ /dev/null @@ -1,14 +0,0 @@ -hundredDoors source - @ set [ 1..100 -> 0 ]; - toggle templates - jump is $; - $jump..100:$jump -> templates - when <|?($@hundredDoors($) matches <|=0>)> do @hundredDoors($) set 1; - otherwise @hundredDoors($) set 0; - end -> !VOID - end toggle - 1..100 -> toggle -> !VOID - $@(.. as i; -> if <|=1> -> ' $i;') ! -end hundredDoors - -$hundredDoors -> 'Open doors:$...;' ! diff --git a/Task/100-doors/Tailspin/100-doors.tailspin b/Task/100-doors/Tailspin/100-doors.tailspin new file mode 100644 index 0000000000..8ea97723d3 --- /dev/null +++ b/Task/100-doors/Tailspin/100-doors.tailspin @@ -0,0 +1,11 @@ +source hundredDoors + @: [ 1..100 -> 0 ]; + templates toggle + def jump: $; + $jump..100:$jump -> \(when )> do @hundredDoors($): 1; otherwise @hundredDoors($): 0;\) -> !VOID + end toggle + 1..100 -> toggle -> !VOID + $@ -> \[i](<=1> ' $i;' !\) ! +end hundredDoors + +$hundredDoors -> 'Open doors:$...;' -> !OUT::write diff --git a/Task/100-doors/Tcl/100-doors-1.tcl b/Task/100-doors/Tcl/100-doors-1.tcl index 71a614db6d..43badf3380 100644 --- a/Task/100-doors/Tcl/100-doors-1.tcl +++ b/Task/100-doors/Tcl/100-doors-1.tcl @@ -1,85 +1,11 @@ -#!/usr/bin/env tclsh - -# 100 doors - -proc seq { m n } { - set r {} - for {set i $m} {$i <= $n} {incr i} { - lappend r $i - } - return $r -} - -proc toggle {val a b} { - # expr has ternary operators - return [expr { - ${val} == ${a}? ${b} : - ${val} == ${b}? ${a} : - [error "bad value: ${val}"] - }] -} - -proc multiples {n max} { - set ret {} - set x $n - - # maximum multiple - set mid [expr $max / 2] - - if {$x>=$mid && $x<$max} { return $x } - - # calculate multiples - if {[expr $x <= $mid]} { - for {set i 1} {$i <= $max } {incr i} { - - set x [expr $i * $n] - - if {$x > $max} { break } - - lappend ret $x - } - } - - return $ret -} - -# states -array set state { - open "open" - closed "closed" - unknown "?" -} - -# ============================== -# start program - -# 100 doors -variable MAX 100 - -variable mid [expr int($MAX / 2)] - -variable Seq_100 [seq 1 $MAX] - -# initialize doors closed -foreach n $Seq_100 { - set door($n) $state(closed) -} - -# do for 1 .. 100 -foreach m $Seq_100 { - - set mults [multiples $m $MAX] - - foreach d $mults { - set door($d) [toggle $door($d) $state(open) $state(closed)] +package require Tcl 8.5 +set n 100 +set doors [concat - [lrepeat $n 0]] +for {set step 1} {$step <= $n} {incr step} { + for {set i $step} {$i <= $n} {incr i $step} { + lset doors $i [expr { ! [lindex $doors $i]}] } } - -# output -foreach n $Seq_100 { - if { $door($n) eq $state(open) } { - puts stdout "$n: $door($n)" - } +for {set i 1} {$i <= $n} {incr i} { + puts [format "door %d is %s" $i [expr {[lindex $doors $i] ? "open" : "closed"}]] } - -# end diff --git a/Task/100-doors/Tcl/100-doors-2.tcl b/Task/100-doors/Tcl/100-doors-2.tcl index 43badf3380..df7078d750 100644 --- a/Task/100-doors/Tcl/100-doors-2.tcl +++ b/Task/100-doors/Tcl/100-doors-2.tcl @@ -1,11 +1,8 @@ package require Tcl 8.5 -set n 100 -set doors [concat - [lrepeat $n 0]] -for {set step 1} {$step <= $n} {incr step} { - for {set i $step} {$i <= $n} {incr i $step} { - lset doors $i [expr { ! [lindex $doors $i]}] - } +set doors [lrepeat [expr {$n + 1}] closed] +for {set i 1} {$i <= sqrt($n)} {incr i} { + lset doors [expr {$i ** 2}] open } for {set i 1} {$i <= $n} {incr i} { - puts [format "door %d is %s" $i [expr {[lindex $doors $i] ? "open" : "closed"}]] + puts [format "door %d is %s" $i [lindex $doors $i]] } diff --git a/Task/100-doors/Tcl/100-doors-3.tcl b/Task/100-doors/Tcl/100-doors-3.tcl index df7078d750..8e3db5488e 100644 --- a/Task/100-doors/Tcl/100-doors-3.tcl +++ b/Task/100-doors/Tcl/100-doors-3.tcl @@ -1,8 +1,46 @@ package require Tcl 8.5 -set doors [lrepeat [expr {$n + 1}] closed] -for {set i 1} {$i <= sqrt($n)} {incr i} { - lset doors [expr {$i ** 2}] open +package require Tk + +array set door_status {} + +# create the gui +set doors [list x] +for {set i 0} {$i < 10} {incr i} { + for {set j 0} {$j < 10} {incr j} { + set k [expr {1 + $j + 10*$i}] + lappend doors [radiobutton .d_$k -text $k -variable door_status($k) \ + -indicatoron no -offrelief flat -width 3 -value open] + grid [lindex $doors $k] -column $j -row $i + } } -for {set i 1} {$i <= $n} {incr i} { - puts [format "door %d is %s" $i [lindex $doors $i]] + +# create the controls +button .start -command go -text Start +label .i_label -text " door:" +entry .i -textvariable i -width 4 +label .step_label -text " step:" +entry .step -textvariable step -width 4 +grid .start - .i_label - .i - .step_label - .step - -row $i +grid configure .start -sticky ew +grid configure .i_label .step_label -sticky e +grid configure .i .step -sticky w + +proc go {} { + global doors door_status i step + + # initialize the door_status (all closed) + for {set d 1} {$d <= 100} {incr d} { + set door_status($d) closed + } + + # now, begin opening and closing + for {set step 1} {$step <= 100} {incr step} { + for {set i 1} {$i <= 100} {incr i} { + if {$i % $step == 0} { + [lindex $doors $i] [expr {$door_status($i) eq "open" ? "deselect" : "select"}] + update + after 50 + } + } + } } diff --git a/Task/100-doors/Tcl/100-doors-4.tcl b/Task/100-doors/Tcl/100-doors-4.tcl deleted file mode 100644 index 8e3db5488e..0000000000 --- a/Task/100-doors/Tcl/100-doors-4.tcl +++ /dev/null @@ -1,46 +0,0 @@ -package require Tcl 8.5 -package require Tk - -array set door_status {} - -# create the gui -set doors [list x] -for {set i 0} {$i < 10} {incr i} { - for {set j 0} {$j < 10} {incr j} { - set k [expr {1 + $j + 10*$i}] - lappend doors [radiobutton .d_$k -text $k -variable door_status($k) \ - -indicatoron no -offrelief flat -width 3 -value open] - grid [lindex $doors $k] -column $j -row $i - } -} - -# create the controls -button .start -command go -text Start -label .i_label -text " door:" -entry .i -textvariable i -width 4 -label .step_label -text " step:" -entry .step -textvariable step -width 4 -grid .start - .i_label - .i - .step_label - .step - -row $i -grid configure .start -sticky ew -grid configure .i_label .step_label -sticky e -grid configure .i .step -sticky w - -proc go {} { - global doors door_status i step - - # initialize the door_status (all closed) - for {set d 1} {$d <= 100} {incr d} { - set door_status($d) closed - } - - # now, begin opening and closing - for {set step 1} {$step <= 100} {incr step} { - for {set i 1} {$i <= 100} {incr i} { - if {$i % $step == 0} { - [lindex $doors $i] [expr {$door_status($i) eq "open" ? "deselect" : "select"}] - update - after 50 - } - } - } -} diff --git a/Task/100-doors/Uiua/100-doors-1.uiua b/Task/100-doors/Uiua/100-doors-1.uiua deleted file mode 100644 index a9b6f157a4..0000000000 --- a/Task/100-doors/Uiua/100-doors-1.uiua +++ /dev/null @@ -1,6 +0,0 @@ -◿2/+=0⊞◿.+1⇡100 - +1⇡100 # 1-100 - ⊞◿. # Mod each with 1-100 - =0 # Find where mod = 0, aka the divisors - /+ # Sum to get num of divisors -◿2 # Num divisors is odd diff --git a/Task/100-doors/Uiua/100-doors-2.uiua b/Task/100-doors/Uiua/100-doors-2.uiua deleted file mode 100644 index c1e094976b..0000000000 --- a/Task/100-doors/Uiua/100-doors-2.uiua +++ /dev/null @@ -1 +0,0 @@ -⊜∘/≠±⊞◿..+1⇡100 diff --git a/Task/100-doors/Uiua/100-doors-3.uiua b/Task/100-doors/Uiua/100-doors-3.uiua deleted file mode 100644 index 35552aab2a..0000000000 --- a/Task/100-doors/Uiua/100-doors-3.uiua +++ /dev/null @@ -1 +0,0 @@ -×.+1⇡⌊√ 100 diff --git a/Task/100-doors/Unison/100-doors.u b/Task/100-doors/Unison/100-doors.unison similarity index 100% rename from Task/100-doors/Unison/100-doors.u rename to Task/100-doors/Unison/100-doors.unison diff --git a/Task/100-doors/V-(Vlang)/100-doors-2.v b/Task/100-doors/V-(Vlang)/100-doors-2.v index 35ff929ac5..6ec392d9a6 100644 --- a/Task/100-doors/V-(Vlang)/100-doors-2.v +++ b/Task/100-doors/V-(Vlang)/100-doors-2.v @@ -11,10 +11,11 @@ fn main(){ doors[current - 1] = true increment++ door_nbr += 2 * increment + 1 - print('O') - } else { - print('=') - } + } } + doors.map( fn( it bool) bool { // graphically represent opened doors + print( if it {( 'O')} else {('=')} ) + return it + }) println('') } diff --git a/Task/100-doors/V-(Vlang)/100-doors-3.v b/Task/100-doors/V-(Vlang)/100-doors-3.v deleted file mode 100644 index 8f720ebff3..0000000000 --- a/Task/100-doors/V-(Vlang)/100-doors-3.v +++ /dev/null @@ -1,11 +0,0 @@ -import math - -const number_doors = 101 - -fn main() { - max_i := int(math.sqrt(f64(number_doors - 1))) + 1 - for i in 1..max_i { - door := i * i - println("Door ${door} open") - } -} diff --git a/Task/100-doors/V-(Vlang)/100-doors-4.v b/Task/100-doors/V-(Vlang)/100-doors-4.v deleted file mode 100644 index bce04b6c59..0000000000 --- a/Task/100-doors/V-(Vlang)/100-doors-4.v +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - for i in 1..11 { - print ( " Door ${i*i} is open.\n" ) - } -} diff --git a/Task/100-doors/VBScript/100-doors.vbs b/Task/100-doors/VBScript/100-doors.vb similarity index 100% rename from Task/100-doors/VBScript/100-doors.vbs rename to Task/100-doors/VBScript/100-doors.vb diff --git a/Task/100-doors/VHDL/100-doors-1.vhd b/Task/100-doors/VHDL/100-doors-1.vhdl similarity index 100% rename from Task/100-doors/VHDL/100-doors-1.vhd rename to Task/100-doors/VHDL/100-doors-1.vhdl diff --git a/Task/100-doors/VHDL/100-doors-2.vhd b/Task/100-doors/VHDL/100-doors-2.vhdl similarity index 100% rename from Task/100-doors/VHDL/100-doors-2.vhd rename to Task/100-doors/VHDL/100-doors-2.vhdl diff --git a/Task/100-doors/YAMLScript/100-doors.ys b/Task/100-doors/YAMLScript/100-doors.ys index 7e63c2a67d..d5248aee43 100644 --- a/Task/100-doors/YAMLScript/100-doors.ys +++ b/Task/100-doors/YAMLScript/100-doors.ys @@ -1,14 +1,16 @@ -!YS-v0 +!yamlscript/v0 defn main(): - open =: - reduce _ vec([true] * 100) (1 .. 100): - fn(doors i): - loop j i, doors doors: - if j < 100: - recur (j + i).++: - update-in doors [j]: \(doors.$j.!) - else: doors - say: -"Open doors after 100 passes:\ " + - (1 .. 100).map(\(_.--:open && _)) - .filter(a).join(', ') + say: |- + Open doors after 100 passes: + $(apply str interpose(', ' open-doors())) + +defn open-doors(): + for [[d n] map(vector doors() iterate(inc 1)) :when d]: + n + +defn doors(): + reduce: + fn(doors idx): assoc(doors idx true) + into []: repeat(100 false) + map \(dec (%1 * %1)): 1 .. 10 diff --git a/Task/100-doors/Zig/100-doors-4.zig b/Task/100-doors/Zig/100-doors-4.zig index 14d911f591..53b792a533 100644 --- a/Task/100-doors/Zig/100-doors-4.zig +++ b/Task/100-doors/Zig/100-doors-4.zig @@ -1,7 +1,8 @@ pub fn main() !void { const stdout = @import("std").io.getStdOut().writer(); - for(1..11) |door| { + var door: u8 = 1; + while (door * door <= 100) : (door += 1) { try stdout.print("Door {d} is open\n", .{door * door}); } } diff --git a/Task/100-prisoners/11l/100-prisoners.11l b/Task/100-prisoners/11l/100-prisoners.11l index 0bacfb4489..f8e57ab878 100644 --- a/Task/100-prisoners/11l/100-prisoners.11l +++ b/Task/100-prisoners/11l/100-prisoners.11l @@ -5,7 +5,7 @@ F play_random(n) L 0 .< n random:shuffle(&in_drawer) V found = 0B - L(prisoner) 0.<100 + L(prisoner) 100 found = 0B L(reveal) random:sample(sampler, 50) V card = in_drawer[reveal] @@ -24,7 +24,7 @@ F play_optimal(n) L 0 .< n random:shuffle(&in_drawer) V found = 0B - L(prisoner) 0.<100 + L(prisoner) 100 V reveal = prisoner found = 0B L 50 diff --git a/Task/100-prisoners/ALGOL-68/100-prisoners.alg b/Task/100-prisoners/ALGOL-68/100-prisoners.alg deleted file mode 100644 index e8858ff506..0000000000 --- a/Task/100-prisoners/ALGOL-68/100-prisoners.alg +++ /dev/null @@ -1,66 +0,0 @@ -BEGIN # 100 prisoners # - -CO begin code from the Knuth shuffle task CO -PROC between = (INT a, b)INT : -( - ENTIER (random * ABS (b-a+1) + (a ?n 1) do - (bind ?k (+ 1 (random ?n))) - (bind ?tmp (nth$ ?n ?lst)) - (bind ?lst (replace$ ?lst ?n ?n (nth$ ?k ?lst))) - (bind ?lst (replace$ ?lst ?k ?k ?tmp)) - (bind ?n (- ?n 1))) - ?lst) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Create a random permutation of 1..100 representing box contents -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(deffunction random-permutation () - (shuffle (create$ 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 28 29 30 - 31 32 33 34 35 36 37 38 39 40 - 41 42 43 44 45 46 47 48 49 50 - 51 52 53 54 55 56 57 58 59 60 - 61 62 63 64 65 66 67 68 69 70 - 71 72 73 74 75 76 77 78 79 80 - 81 82 83 84 85 86 87 88 89 90 - 91 92 93 94 95 96 97 98 99 100))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Prisoner loop strategy: -;; Start at your own number, open that box, then follow the chain. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(deffunction prisoner-succeeds (?id ?perm) - (bind ?next ?id) - (bind ?opens 0) - (while (< ?opens MAX-OPENS) do - (bind ?opens (+ ?opens 1)) - (bind ?found (nth$ ?next ?perm)) - (if (= ?found ?id) then - (return TRUE)) - (bind ?next ?found)) - FALSE) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Run one full trial: all prisoners must succeed -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(deffunction run-trial () - (bind ?perm (random-permutation)) - (foreach ?p (create$ 1 to NUM-PRISONERS) do - (if (not (prisoner-succeeds ?p ?perm)) then - (return FALSE))) - TRUE) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Run many trials to estimate probability -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(deffunction simulate (?trials) - (bind ?wins 0) - (loop-for-count (?i 1 ?trials) do - (if (run-trial) then - (bind ?wins (+ ?wins 1)))) - (printout t "Trials: " ?trials crlf) - (printout t "Successful trials: " ?wins crlf) - (printout t "Estimated probability: " - (/ (float ?wins) (float ?trials)) crlf)) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Entry point -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(reset) -(simulate 1000) diff --git a/Task/100-prisoners/C++/100-prisoners-1.cpp b/Task/100-prisoners/C++/100-prisoners.cpp similarity index 100% rename from Task/100-prisoners/C++/100-prisoners-1.cpp rename to Task/100-prisoners/C++/100-prisoners.cpp diff --git a/Task/100-prisoners/Crystal/100-prisoners.cr b/Task/100-prisoners/Crystal/100-prisoners.crystal similarity index 100% rename from Task/100-prisoners/Crystal/100-prisoners.cr rename to Task/100-prisoners/Crystal/100-prisoners.crystal diff --git a/Task/100-prisoners/D/100-prisoners.d b/Task/100-prisoners/D/100-prisoners.d index 5c70291510..04986ae37c 100644 --- a/Task/100-prisoners/D/100-prisoners.d +++ b/Task/100-prisoners/D/100-prisoners.d @@ -37,7 +37,7 @@ bool playRandom() { double exec(const size_t n, bool function() play) { size_t success = 0; - for (size_t i = n; i > 0; i--) { + for (int i = n; i > 0; i--) { if (play()) { success++; } diff --git a/Task/100-prisoners/EasyLang/100-prisoners.easy b/Task/100-prisoners/EasyLang/100-prisoners.easy index d43959b394..6bdc815b68 100644 --- a/Task/100-prisoners/EasyLang/100-prisoners.easy +++ b/Task/100-prisoners/EasyLang/100-prisoners.easy @@ -1,51 +1,60 @@ -global drawer[] sampler[] . -proc init . - for i = 1 to 100 - drawer[] &= i - sampler[] &= i - . +for i = 1 to 100 + drawer[] &= i + sampler[] &= i . -init -proc shuffle_drawer . +subr shuffle_drawer for i = len drawer[] downto 2 - r = random 1 i + r = randint i swap drawer[r] drawer[i] . . -func play_random . +subr play_random shuffle_drawer for prisoner = 1 to 100 + found = 0 for i = 1 to 50 - r = random 1 (100 - i + 1) + r = randint (100 - i) card = drawer[sampler[r]] - swap sampler[r] sampler[100 - i + 1] - if card = prisoner : break 1 + swap sampler[r] sampler[100 - i - 1] + if card = prisoner + found = 1 + break 1 + . + . + if found = 0 + break 1 . - if i > 50 : return 0 . - return 1 . -func play_optimal . +subr play_optimal shuffle_drawer for prisoner = 1 to 100 reveal = prisoner + found = 0 for i = 1 to 50 card = drawer[reveal] - if card = prisoner : break 1 + if card = prisoner + found = 1 + break 1 + . reveal = card . - if i > 50 : return 0 + if found = 0 + break 1 + . . - return 1 . -n = 100000 -for i to n - win += play_random +n = 10000 +win = 0 +for _ = 1 to n + play_random + win += found . print "random: " & 100.0 * win / n & "%" # win = 0 -for i to n - win += play_optimal +for _ = 1 to n + play_optimal + win += found . print "optimal: " & 100.0 * win / n & "%" diff --git a/Task/100-prisoners/Ecstasy/100-prisoners.ecstasy b/Task/100-prisoners/Ecstasy/100-prisoners.ecstasy deleted file mode 100644 index 9f66539ddd..0000000000 --- a/Task/100-prisoners/Ecstasy/100-prisoners.ecstasy +++ /dev/null @@ -1,49 +0,0 @@ -module OneHundredPrisoners { - @Inject Console console; - - void run() { - console.print($"# of executions: {attempts}"); - console.print($"Optimal play success rate: {simulate(tryOpt)}%"); - console.print($" Random play success rate: {simulate(tryRnd)}%"); - } - - Int attempts = 10000; - - Dec simulate(function Boolean(Int[]) allFoundNumber) { - Int[] drawers = new Int[100](i->i); - Int pardoned = 0; - for (Int i : 1..attempts) { - if (allFoundNumber(drawers.shuffled())) { - ++pardoned; - } - } - return (pardoned * 1000000 / attempts).toDec() / 10000; - } - - Boolean tryRnd(Int[] drawers) { - Inmates: for (Int inmate : 0..<100) { - Int[] choices = drawers.shuffled(); - for (Int attempt : 0..<50) { - if (drawers[choices[attempt]] == inmate) { - continue Inmates; - } - } - return False; - } - return True; - } - - Boolean tryOpt(Int[] drawers) { - Inmates: for (Int inmate : 0..<100) { - Int choice = inmate; - for (Int attempt : 0..<50) { - if (drawers[choice] == inmate) { - continue Inmates; - } - choice = drawers[choice]; - } - return False; - } - return True; - } -} diff --git a/Task/100-prisoners/Elixir/100-prisoners.ex b/Task/100-prisoners/Elixir/100-prisoners.elixir similarity index 100% rename from Task/100-prisoners/Elixir/100-prisoners.ex rename to Task/100-prisoners/Elixir/100-prisoners.elixir diff --git a/Task/100-prisoners/Icon/100-prisoners.icon b/Task/100-prisoners/Icon/100-prisoners.icon deleted file mode 100644 index adcfba193c..0000000000 --- a/Task/100-prisoners/Icon/100-prisoners.icon +++ /dev/null @@ -1,40 +0,0 @@ -link "numbers" -global lp # lucky prisoner list -global p # starting prisoner list -global pardoned # Count of trials with all prisoners pardoned - -procedure main(A) - n := \A[1] | 100 - runs := \A[2] | 3000 - - write(runs," runs using ",n," prisoners.") - every (pardoned := 0, 1 to runs) do - runTrial(simplePrisoner, n) - write("Simple: ",fix(100*pardoned,runs,6,2),"%") - every (pardoned := 0, 1 to runs) do - runTrial(smartPrisoner, n) - write("Smart: ",fix(100*pardoned,runs,6,2),"%") -end - -procedure runTrial(pCode,n) - d := mkDrawers(n) - p := set([: 1 to n :]) - lp := set() - every pCode(d, !p) - if *lp = n then pardoned +:= 1 -end - -procedure mkDrawers(n) - d := [: 1 to n :] - every !d :=: ?d - return d -end - -procedure simplePrisoner(d, n) - every 1 to *d/2 do if n = (i := ?d) then break (insert(lp,n)) -end - -procedure smartPrisoner(d, n) - i := n - every 1 to *d/2 do if n = (i := d[i]) then break (insert(lp,n)) -end diff --git a/Task/100-prisoners/Julia/100-prisoners.jl b/Task/100-prisoners/Julia/100-prisoners.julia similarity index 100% rename from Task/100-prisoners/Julia/100-prisoners.jl rename to Task/100-prisoners/Julia/100-prisoners.julia diff --git a/Task/100-prisoners/Kotlin/100-prisoners.kts b/Task/100-prisoners/Kotlin/100-prisoners.kotlin similarity index 100% rename from Task/100-prisoners/Kotlin/100-prisoners.kts rename to Task/100-prisoners/Kotlin/100-prisoners.kotlin diff --git a/Task/100-prisoners/Pluto/100-prisoners.pluto b/Task/100-prisoners/Pluto/100-prisoners.pluto deleted file mode 100644 index 029aec0590..0000000000 --- a/Task/100-prisoners/Pluto/100-prisoners.pluto +++ /dev/null @@ -1,55 +0,0 @@ -local fmt = require "fmt" -require "table2" - -local function do_trials(trials, np, strategy) - local pardoned = 0 - for _ = 1, trials do - local drawers = table.create(100) - for i = 1, 100 do drawers[i] = i end - drawers:shuffle() - local next_trial = false - for p = 1, np do - local next_prisoner = false - if strategy == "optimal" then - local prev = p - for __ = 1, 50 do - local curr = drawers[prev] - if curr == p then - next_prisoner = true - break - end - prev = curr - end - else - local opened = table.rep(100, false) - for ___ = 1, 50 do - local n - while true do - n = math.random(100) - if !opened[n] then - opened[n] = true - break - end - end - if drawers[n] == p then - next_prisoner = true - break - end - end - end - if !next_prisoner then - next_trial = true - break - end - end - if !next_trial then pardoned += 1 end - end - local rf = pardoned / trials * 100 - fmt.print(" strategy = %-7s pardoned = %,6s relative frequency = %5.2f%%\n", strategy, pardoned, rf) -end - -local trials = 1e5 -for {10, 100} as np do - fmt.print("Results from %,s trials with %d prisoners:\n", trials, np) - for {"random", "optimal"} as strategy do do_trials(trials, np, strategy) end -end diff --git a/Task/100-prisoners/PowerShell/100-prisoners.ps1 b/Task/100-prisoners/PowerShell/100-prisoners.psh similarity index 100% rename from Task/100-prisoners/PowerShell/100-prisoners.ps1 rename to Task/100-prisoners/PowerShell/100-prisoners.psh diff --git a/Task/100-prisoners/Prolog/100-prisoners.pro b/Task/100-prisoners/Prolog/100-prisoners.pro deleted file mode 100644 index 375a4acfc8..0000000000 --- a/Task/100-prisoners/Prolog/100-prisoners.pro +++ /dev/null @@ -1,43 +0,0 @@ -:- use_module(library(aggregate)). -:- use_module(library(lists)). -:- use_module(library(random)). - -random_subset(Length, List, Subset) :- - random_permutation(List, Shuffled), - length(Subset, Length), - prefix(Subset, Shuffled). - -random_play :- - numlist(1, 100, Prisoners), - random_permutation(Prisoners, Drawers), - forall(member(Prisoner, Prisoners), ( - random_subset(50, Drawers, CheckedDrawers), - memberchk(Prisoner, CheckedDrawers) - )). - -optimal_play :- - numlist(1, 100, Prisoners), - random_permutation(Prisoners, Drawers), - forall(member(Prisoner, Prisoners), optimal_play(50, Prisoner, Prisoner, Drawers)). - -optimal_play(ChecksRemaining, Prisoner, NumberToCheck, Drawers) :- - ChecksRemaining > 0, - nth1(NumberToCheck, Drawers, NumberInDrawer), - ( NumberInDrawer = Prisoner - -> true - ; ChecksRemaining0 is ChecksRemaining - 1, - optimal_play(ChecksRemaining0, Prisoner, NumberInDrawer, Drawers) - ). - -:- meta_predicate play_n_times(+, 0, -). -play_n_times(PlayCount, Play, Percentage) :- - aggregate_all(count, ( between(1, PlayCount, _), call(Play) ), Victories), - Percentage is Victories / PlayCount * 100. - -main(SimulationCount) :- - play_n_times(SimulationCount, random_play, RandomPlayPercent), - play_n_times(SimulationCount, optimal_play, OptimalPlayPercent), - format("Simulation count: ~d\nRandom play wins: ~f% of the simulations.\nOptimal play wins ~f% of the simulations.", - [SimulationCount, RandomPlayPercent, OptimalPlayPercent]). - -:- main(100_000). diff --git a/Task/100-prisoners/Rebol/100-prisoners.rebol b/Task/100-prisoners/Rebol/100-prisoners.rebol deleted file mode 100644 index e7378827ab..0000000000 --- a/Task/100-prisoners/Rebol/100-prisoners.rebol +++ /dev/null @@ -1,77 +0,0 @@ -Rebol [ - title: "Rosetta code: 100 prisoners" - file: %100_prisoners.r3 - url: https://rosettacode.org/wiki/100_prisoners - needs: 3.0.0 - note: "Based on Red language implementation!" -] - -random/seed 1 -prisoners: 100 ;; Total number of prisoners in the puzzle -K_runs: 10000 ;; Number of simulation runs to perform - -rand_arr: make block! prisoners ;; Will hold the numbers 1..100 -repeat n prisoners [append rand_arr n] ;; Fill rand_arr with [1 2 3 ... 100] - -;; -------------------------------------------------- -;; strat_optimal: "optimal" strategy from the puzzle -;; Each prisoner starts at the locker with their own number, -;; then follows the chain inside the lockers until they find their number -;; or until they have opened 50 lockers. -;; Returns TRUE if the prisoner finds their own number, FALSE otherwise. -;; -------------------------------------------------- -strat_optimal: func [pris /local locker][ - locker: pris ;; Start at 'own-numbered' locker - loop 50 [ - if Board/:locker = pris [ return true ] ;; Found prisoner's number? -> success - locker: Board/:locker ;; Move to the locker whose number was inside - ] - false ;; Not found within 50 tries -> fail -] - -;; -------------------------------------------------- -;; strat_rand: "random" strategy -;; Each prisoner picks a random permutation of lockers, -;; then opens the first 50 in that random order, checking for their number. -;; Returns TRUE if found, FALSE if not. -;; -------------------------------------------------- -strat_rand: func [pris][ - random rand_arr ;; Randomize the locker opening order - repeat n 50 [ - if Board/(rand_arr/:n) = pris [ return true ];; Check the nth randomly chosen locker - ] ;; If found -> success - false ;; Not found in 50 tries -> fail -] - -;; -------------------------------------------------- -;; check_board: Runs a strategy for the entire set of prisoners -;; Returns TRUE if *every prisoner* finds their number, FALSE if any fail. -;; Argument 'strat' is the symbol 'optimal or 'rand -;; -------------------------------------------------- -check_board: func [strat][ - ;; Choose which strategy function to run - strat: either strat = 'optimal [:strat_optimal] [:strat_rand] - - ;; Test each prisoner with the chosen strategy - repeat pris prisoners [ - unless strat pris [return false] ;; If any fail, run ends -> false - ] - true ;; All prisoners succeeded -> true -] - -saved: saved_rand: 0 ;; Counters for the number of successful runs per strategy - -;; -------------------------------------------------- -;; Run the given number of simulations -;; -------------------------------------------------- -loop K_runs [ - Board: random copy rand_arr ;; Create a random locker arrangement for this run - if check_board 'optimal [saved: saved + 1] ;; Attempt "optimal" strategy, count full successes - if check_board 'rand [saved_rand: saved_rand + 1] ;; Attempt "random" strategy, count full successes -] - -;; At this point: -;; - 'saved' = number of runs where *all prisoners* survived using optimal strategy -;; - 'saved_rand' = number of runs where *all prisoners* survived using random strategy -print ["runs" k_runs newline "Percent saved opt.strategy:" saved * 100.0 / k_runs ] -print ["Percent saved random strategy:" saved_rand * 100.0 / k_runs ] diff --git a/Task/100-prisoners/Rust/100-prisoners-1.rs b/Task/100-prisoners/Rust/100-prisoners-1.rust similarity index 100% rename from Task/100-prisoners/Rust/100-prisoners-1.rs rename to Task/100-prisoners/Rust/100-prisoners-1.rust diff --git a/Task/100-prisoners/Rust/100-prisoners-2.rs b/Task/100-prisoners/Rust/100-prisoners-2.rust similarity index 100% rename from Task/100-prisoners/Rust/100-prisoners-2.rs rename to Task/100-prisoners/Rust/100-prisoners-2.rust diff --git a/Task/100-prisoners/True-BASIC/100-prisoners.basic b/Task/100-prisoners/True-BASIC/100-prisoners.basic deleted file mode 100644 index eacc0cac4a..0000000000 --- a/Task/100-prisoners/True-BASIC/100-prisoners.basic +++ /dev/null @@ -1,40 +0,0 @@ -FUNCTION trials(prisoners, iterations, optimal) - DIM drawers(100) - FOR i = 1 TO prisoners - LET drawers(i) = i - NEXT i - FOR i = 1 TO iterations - FOR k = 1 TO prisoners - LET x = RND+1 - LET p = drawers(x) - LET drawers(x) = drawers(k) - LET drawers(k) = p - NEXT k - FOR prisoner = 1 TO prisoners - LET found = false - IF optimal<>0 THEN LET drawer = prisoner ELSE LET drawer = RND+1 - FOR j = 1 TO prisoners/2 - LET drawer = drawers(drawer) - IF drawer = prisoner THEN - LET found = true - EXIT FOR - END IF - IF (NOT optimal<>0) THEN LET drawer = RND+1 - NEXT j - IF (NOT found<>0) THEN EXIT FOR - NEXT prisoner - LET pardoned = pardoned+found - NEXT i - LET trials = (100*pardoned/iterations) -END FUNCTION - -LET false = 0 -LET true = 1 -LET iterations = 10000 -PRINT "Simulation count: "; iterations -FOR prisoners = 10 TO 100 STEP 90 - LET randon = trials(prisoners,iterations,false) - LET optimal = trials(prisoners,iterations,true) - PRINT "Prisoners: "; prisoners; ", random: "; randon; ", optimal: "; optimal -NEXT prisoners -END diff --git a/Task/100-prisoners/VBScript/100-prisoners.vbs b/Task/100-prisoners/VBScript/100-prisoners.vb similarity index 100% rename from Task/100-prisoners/VBScript/100-prisoners.vbs rename to Task/100-prisoners/VBScript/100-prisoners.vb diff --git a/Task/100-prisoners/YAMLScript/100-prisoners.ys b/Task/100-prisoners/YAMLScript/100-prisoners.ys deleted file mode 100644 index d44a0487cc..0000000000 --- a/Task/100-prisoners/YAMLScript/100-prisoners.ys +++ /dev/null @@ -1,79 +0,0 @@ -!YS-v0 - -defn main(n=5000): - :: https://rosettacode.org/wiki/100_prisoners - - random-successes optimal-successes run-count =: - simulate-n-runs(n) - .slice(q(random-successes optimal-successes run-count)) - - say: "Probability of survival with random search: $F(random-successes / run-count)" - - say: "Probability of survival with ordered search: $F(optimal-successes / run-count)" - -defn simulate-n-runs(n): - :: Simulate n runs of the 100 prisoner problem and returns a success count - for each search method. - - loop random-successes 0, optimal-successes 0, run-count 0: - # If we've done the loop n times - if n == run-count: - # return results - then:: - random-successes :: random-successes - optimal-successes :: optimal-successes - run-count :: run-count - - # Otherwise, run for another batch of prisoners - else: - next-result =: simulate-100-prisoners() - recur: - (random-successes + next-result.random) - (optimal-successes + next-result.optimal) - run-count.++ - -defn simulate-100-prisoners(): - :: Simulates all prisoners searching the same drawers by both strategies, - returns map showing whether each was successful. - - # Create 100 drawers with randomly ordered prisoner numbers: - drawers =: random-drawers() - hash-map: - :random try-luck(drawers search-50-random-drawers) - :optimal try-luck(drawers search-50-optimal-drawers) - -defn try-luck(drawers drawer-searching-function): - :: Returns 1 if all prisoners find their number otherwise 0. - - loop prisoners range(100): - if prisoners.?: - if prisoners.0.drawer-searching-function(drawers): - recur: rest(prisoners) - else: 0 - else: 1 - -defn search-50-optimal-drawers(prisoner-number drawers): - :: Open 50 drawers according to the agreed strategy, returning true if - prisoner's number was found. - - loop next-drawer prisoner-number, drawers-opened 0: - when drawers-opened != 50: - result =: drawers.$next-drawer - result == prisoner-number ||: - recur: result drawers-opened.++ - -defn search-50-random-drawers(prisoner-number drawers): - :: Select 50 random drawers and return true if the prisoner's number was - found. - - drawers: - .shuffle() - .take(50) - .filter(eq(prisoner-number)) - .count() - .eq(1) - -defn random-drawers(): - :: Returns a list of shuffled numbers. - - shuffle: range(100) diff --git a/Task/15-puzzle-game/Ada/15-puzzle-game-1.adb b/Task/15-puzzle-game/Ada/15-puzzle-game-1.ada similarity index 100% rename from Task/15-puzzle-game/Ada/15-puzzle-game-1.adb rename to Task/15-puzzle-game/Ada/15-puzzle-game-1.ada diff --git a/Task/15-puzzle-game/Ada/15-puzzle-game-2.adb b/Task/15-puzzle-game/Ada/15-puzzle-game-2.ada similarity index 100% rename from Task/15-puzzle-game/Ada/15-puzzle-game-2.adb rename to Task/15-puzzle-game/Ada/15-puzzle-game-2.ada diff --git a/Task/15-puzzle-game/Ada/15-puzzle-game-3.adb b/Task/15-puzzle-game/Ada/15-puzzle-game-3.ada similarity index 100% rename from Task/15-puzzle-game/Ada/15-puzzle-game-3.adb rename to Task/15-puzzle-game/Ada/15-puzzle-game-3.ada diff --git a/Task/15-puzzle-game/Ada/15-puzzle-game-4.adb b/Task/15-puzzle-game/Ada/15-puzzle-game-4.ada similarity index 100% rename from Task/15-puzzle-game/Ada/15-puzzle-game-4.adb rename to Task/15-puzzle-game/Ada/15-puzzle-game-4.ada diff --git a/Task/15-puzzle-game/Arturo/15-puzzle-game.arturo b/Task/15-puzzle-game/Arturo/15-puzzle-game.arturo index 9dcfaaed59..4d08ffb095 100644 --- a/Task/15-puzzle-game/Arturo/15-puzzle-game.arturo +++ b/Task/15-puzzle-game/Arturo/15-puzzle-game.arturo @@ -107,13 +107,17 @@ validMovement?: $[ movement :literal ][ pos: game\playerPosition - case movement [ - 'up -> return (not? in? pos [0..3]) - 'down -> return (not? in? pos [12..15]) - 'left -> return (not? in? pos [0 4 8 12]) - 'right -> return (not? in? pos [3 7 11 15]) - any -> return false - ] + case [movement] + when? [='up] + -> return (not? in? pos [0..3]) + when? [='down] + -> return (not? in? pos [12..15]) + when? [='left] + -> return (not? in? pos [0 4 8 12]) + when? [='right] + -> return (not? in? pos [3 7 11 15]) + else + -> return false ] @@ -126,14 +130,13 @@ validMovement?: $[ ;; will be returned the same input as a :string parseInput: $[inp :string][ lowerInp: lower inp - case lowerInp [ - "w" -> return 'up - "a" -> return 'left - "s" -> return 'down - "d" -> return 'right - "q" -> return 'quit - any -> return inp - ] + case [lowerInp] + when? [="w"] -> return 'up + when? [="a"] -> return 'left + when? [="s"] -> return 'down + when? [="d"] -> return 'right + when? [="q"] -> return 'quit + else -> return inp ] ;; Moves the player in Game's Table @@ -152,7 +155,7 @@ movePlayer: $[ playerPosition :integer relativePosition :integer ][ - if throws? [ + try [ ; 'otherPosition is the real index of the 'relativePosition otherPosition: + playerPosition relativePosition @@ -165,16 +168,20 @@ movePlayer: $[ ; -- Updates player's status game\playerPosition: otherPosition game\movements: inc game\movements - ] -> panic "'movement didn't checked." + ] else -> panic "'movement didn't checked." ] - case movement [ - 'up -> updateGame game position neg 4 - 'down -> updateGame game position 4 - 'left -> updateGame game position neg 1 - 'right -> updateGame game position 1 - any -> panic "movement didn't check." - ] + case [movement] + when? [='up] + -> (updateGame game position (neg 4)) + when? [='down] + -> (updateGame game position (4)) + when? [='left] + -> (updateGame game position (neg 1)) + when? [='right] + -> (updateGame game position (1)) + else -> panic "'movement didn't checked." + ] endGame: $[ @@ -202,12 +209,13 @@ runGame: $[sampleTable :block][ -> endGame "Exiting game..." validInp: validInput? command - switch validInp [ + if? validInp [ validMov: validMovement? game command (validMov)? -> movePlayer game command -> printWrongMovement command - ] -> printWrongInput command + ] else + -> printWrongInput command if sampleTable = game -> endGame "Congratulations! You won!" diff --git a/Task/15-puzzle-game/COBOL/15-puzzle-game.cob b/Task/15-puzzle-game/COBOL/15-puzzle-game.cobol similarity index 100% rename from Task/15-puzzle-game/COBOL/15-puzzle-game.cob rename to Task/15-puzzle-game/COBOL/15-puzzle-game.cobol diff --git a/Task/15-puzzle-game/Delphi/15-puzzle-game.pas b/Task/15-puzzle-game/Delphi/15-puzzle-game.delphi similarity index 100% rename from Task/15-puzzle-game/Delphi/15-puzzle-game.pas rename to Task/15-puzzle-game/Delphi/15-puzzle-game.delphi diff --git a/Task/15-puzzle-game/EasyLang/15-puzzle-game.easy b/Task/15-puzzle-game/EasyLang/15-puzzle-game.easy index 17beb79a5a..e10e23f2a7 100644 --- a/Task/15-puzzle-game/EasyLang/15-puzzle-game.easy +++ b/Task/15-puzzle-game/EasyLang/15-puzzle-game.easy @@ -1,53 +1,68 @@ -sysconf topleft -gbackground 432 -gtextsize 13 +sys topleft +background 432 +textsize 13 len f[] 16 -proc draw . - gclear +proc draw . . + clear for i = 1 to 16 - v = f[i] - if v < 16 + h = f[i] + if h < 16 x = (i - 1) mod 4 * 24 + 3 y = (i - 1) div 4 * 24 + 3 - gcolor 210 - grect x y 22 22 - if v < 10 : x += 2 - gcolor 885 - gtext x + 4 y + 6 v + color 210 + move x y + rect 22 22 + move x + 4 y + 6 + if h < 10 + move x + 6 y + 6 + . + color 885 + text h . . . -proc smiley . +global done . +proc smiley . . s = 3.5 x = 86 y = 86 - gcolor 983 - gcircle x y 2.8 * s - gcolor 000 - gcircle (x - s) (y - s) (s / 3) - gcircle x + 3.5 y - 3.5 s / 3 - glinewidth s / 3 - gcurve [ x - s y + s x y + 2 * s x + s y + s ] + move x y + color 983 + circle 2.8 * s + color 000 + move x - s y - s + circle s / 3 + move x + 3.5 y - 3.5 + circle s / 3 + linewidth s / 3 + curve [ x - s y + s x y + 2 * s x + s y + s ] . -global done . -proc init . +proc init . . done = 0 - for i = 1 to 16 : f[i] = i + for i = 1 to 16 + f[i] = i + . # shuffle for i = 15 downto 2 - r = random 1 i + r = randint i swap f[r] f[i] . # make it solvable inv = 0 - for i = 1 to 15 : for j = 1 to i - 1 - if f[j] > f[i] : inv += 1 + for i = 1 to 15 + for j = 1 to i - 1 + if f[j] > f[i] + inv += 1 + . + . . - if inv mod 2 <> 0 : swap f[1] f[2] - gtextsize 12 + if inv mod 2 <> 0 + swap f[1] f[2] + . + textsize 12 draw . -proc move_tile . +proc move_tile . . c = mouse_x div 25 r = mouse_y div 25 i = r * 4 + c + 1 @@ -62,7 +77,9 @@ proc move_tile . . draw for i = 1 to 15 - if f[i] > f[i + 1] : return + if f[i] > f[i + 1] + return + . . done = 1 timer 0.5 @@ -70,7 +87,7 @@ proc move_tile . on mouse_down if done = 0 move_tile - elif done = 3 and mouse_x > 75 and mouse_y > 75 + elif done = 3 init . . diff --git a/Task/15-puzzle-game/FuncSug/15-puzzle-game-1.funcsug b/Task/15-puzzle-game/FuncSug/15-puzzle-game-1.funcsug deleted file mode 100644 index 9bbdbf9e3e..0000000000 --- a/Task/15-puzzle-game/FuncSug/15-puzzle-game-1.funcsug +++ /dev/null @@ -1,33 +0,0 @@ -#--------------- -# Prepare game -#--------------- -# 'import' imports from JavaScript code -var buttonList := import('buttonList') -var emptyButton := import('emptyButton') - -#--------------- -# Shuffle cards -#--------------- -repeat 100: - var adj := calljs getAdjacentButtons(emptyButton) - var button := calljs randomChoose(adj) - waitSeconds(0) - calljs exchange(button, emptyButton) - emptyButton := button - -#--------------- -# Play -#--------------- -while not (calljs isOrdered(buttonList)): - var adj := listToPar(calljs getAdjacentButtons(emptyButton)) - parallel(for button in adj, select 1): - select: - awaitClickBeep(button) - do: - calljs exchange(button, emptyButton) - emptyButton := button - -#---------- -# Success -#---------- -displayNewMessage('Congratulations! You succeeded!') diff --git a/Task/15-puzzle-game/FuncSug/15-puzzle-game-2.funcsug b/Task/15-puzzle-game/FuncSug/15-puzzle-game-2.funcsug deleted file mode 100644 index 18dae3021f..0000000000 --- a/Task/15-puzzle-game/FuncSug/15-puzzle-game-2.funcsug +++ /dev/null @@ -1,53 +0,0 @@ -const $ = document.getElementById.bind(document) - -// Parameters -//------------ -const width = 4 -const height = 4 -const size = width*height-1 - -// Make cards -//------------ -const gameTable = $('gameTable') -gameTable.style.gridTemplateColumns = 'repeat(' + width + ', 60px)' -for (let i=0; i' + (i+1) + '' -} -gameTable.innerHTML += '' -const buttonList = document.querySelectorAll('#gameTable > button') -const emptyButton = $(''+size) - -// Utils functions -//----------------- -function idToXy(id) { - return [id%width, Math.floor(id/width)] -} - -function xyToId(x,y) { - return '' + (width*y + x) -} - -function getAdjacentButtons(button) { - const [x,y] = idToXy(button.id) - const inTheXFrame = n=>(0<=n && n (0<=n && n $(xyToId(coord[0],coord[1])) - const horizAdj = [x-1,x+1].filter(inTheXFrame).map(e=>[e,y]) - const verticAdj = [y-1,y+1].filter(inTheYFrame).map(e=>[x,e]) - return [...horizAdj, ...verticAdj].map( coordToButton ) -} - -function exchange(button, empty) { - empty.innerHTML = button.innerHTML - button.innerHTML = '' -} - -function randomChoose(array) { - const index = Math.floor(Math.random()*array.length) - return array[index] -} - -function isOrdered(buttonList) { - const isAtRightPlace = button=>(button.innerHTML=='' || button.innerHTML==(1*button.id+1)) - return Array.from(buttonList).every(isAtRightPlace) -} diff --git a/Task/15-puzzle-game/FuncSug/15-puzzle-game-3.funcsug b/Task/15-puzzle-game/FuncSug/15-puzzle-game-3.funcsug deleted file mode 100644 index fd210e543c..0000000000 --- a/Task/15-puzzle-game/FuncSug/15-puzzle-game-3.funcsug +++ /dev/null @@ -1,13 +0,0 @@ -#gameTable { - display: inline-grid; - row-gap: 10px; -} - -#gameTable > button { - width: 50px; - height: 50px; -} - -#gameTable > button:empty { - visibility: hidden; -} diff --git a/Task/15-puzzle-game/Jq/15-puzzle-game.jq b/Task/15-puzzle-game/Jq/15-puzzle-game.jq deleted file mode 100644 index 6ae4fa4c93..0000000000 --- a/Task/15-puzzle-game/Jq/15-puzzle-game.jq +++ /dev/null @@ -1,93 +0,0 @@ -include "MRG32k3a" {search: "."}; # see above - -# The following may be omitted if using the C implementation of jq -def _nwise($n): - def n: if length <= $n then . else .[0:$n] , (.[$n:] | n) end; - n; - -### Generic utilities - -def lpad($len): tostring | ($len - length) as $l | (" " * $l) + .; - -# tabular print -def tprint($columns; $width): - reduce _nwise($columns) as $row (""; - . + ($row|map(lpad($width)) | join(" ")) + "\n" ); - -def array_swap($i; $j): - if $j < $i then array_swap($j;$i) - elif $i == $j then . - else .[:$i] + [.[$j]] + .[$i+1:$j] + [.[$i]] + .[$j+1:] - end ; - -### Pre-requisite: MRG32k3a -# Input: an array to be shuffled -# Output: the shuffled array using a seed based on `now` -def shuffle: - { prng: (seed(now | tostring | sub("^.*[.]";"") | tonumber)), - array: . } - | knuthShuffle - | .array; - -### 15-Puzzle - -# Pretty-print the board -def pp: - .board | map(if . == 0 then "" end) | tprint(4;3); - -def row: ./4 | floor; -def col: . % 4; - -def move($p): - .zero as $zero - | (.board |= array_swap($zero; $p)) - | .zero = $p - | .n += 1 ; - -def SolvedBoard: [range(1;16), 0]; - -# Output: {goal, n, board, zero} -def init($easy): - SolvedBoard as $init - | { goal: $init, - n: 0, # number of moves so far - board: ($init | if $easy then array_swap(14;15) else shuffle end) - } - | .zero = (.board|index(0)) ; - -# If $m is a valid single-letter move, then emit the corresponding -# index of the proposed new position. -# Input must include .zero -def isValidMove($m): - if ($m == "u") then if (.zero|row) != 0 then .zero - 4 else false end - elif ($m == "d") then if (.zero|row) != 3 then .zero + 4 else false end - elif ($m == "r") then if (.zero|col) != 3 then .zero + 1 else false end - elif ($m == "l") then if (.zero|col) != 0 then .zero - 1 else false end - else false - end; - -def instructions: - "Please enter \"u\", \"d\", \"l\", or \"r\" to move the empty cell", - "up, down, left, or right. You can also enter \"q\" to quit.", - "Upper or lowercase is accepted and only the first character", - "is important, so for example you could enter `up` instead of `u`."; - -def play($easy): - def prompt: - pp, - if .board == .goal then "Congratulations. You solved the puzzle in \(.n) moves." - else - "Enter move #\(.n + 1) (u, d, l, r or q): ", - ( (limit(1;inputs)[:1]|ascii_downcase) as $m - | if $m == "q" then halt - else isValidMove($m) as $p - | if $p then move($p) | prompt - else "Invalid move.", prompt - end - end) - end; - - instructions, - (init($easy) | prompt); - -play(ARGS.named.easy) diff --git a/Task/15-puzzle-game/Julia/15-puzzle-game.jl b/Task/15-puzzle-game/Julia/15-puzzle-game.julia similarity index 100% rename from Task/15-puzzle-game/Julia/15-puzzle-game.jl rename to Task/15-puzzle-game/Julia/15-puzzle-game.julia diff --git a/Task/15-puzzle-game/Kotlin/15-puzzle-game.kts b/Task/15-puzzle-game/Kotlin/15-puzzle-game.kotlin similarity index 100% rename from Task/15-puzzle-game/Kotlin/15-puzzle-game.kts rename to Task/15-puzzle-game/Kotlin/15-puzzle-game.kotlin diff --git a/Task/15-puzzle-game/OCaml/15-puzzle-game.ml b/Task/15-puzzle-game/OCaml/15-puzzle-game.ocaml similarity index 100% rename from Task/15-puzzle-game/OCaml/15-puzzle-game.ml rename to Task/15-puzzle-game/OCaml/15-puzzle-game.ocaml diff --git a/Task/15-puzzle-game/PascalABC.NET/15-puzzle-game.pas b/Task/15-puzzle-game/PascalABC.NET/15-puzzle-game.pas deleted file mode 100644 index 2d5275fb8f..0000000000 --- a/Task/15-puzzle-game/PascalABC.NET/15-puzzle-game.pas +++ /dev/null @@ -1,178 +0,0 @@ -// Игра в 15 PABCWork.NET\Samples\Games\15.pas -uses GraphABC,ABCObjects,ABCButtons; - -const -/// размер поля - n = 4; -/// размер фишки - sz = 100; -/// зазор между фишками - zz = 10; -/// отступ от левого и правого краев - x0 = 20; -/// отступ от верхнего и нижнего краев - y0 = 20; - -var - p: array [1..n,1..n] of SquareABC; - digits: array [1..n*n-1] of integer; - - MeshButton: ButtonABC; - StatusRect: RectangleABC; - - EmptyCellX,EmptyCellY: integer; - MovesCount: integer; - EndOfGame: boolean; // True если все фишки стоят на своих местах - -// Поменять местами две фишки -procedure Swap(var p,p1: SquareABC); -begin - PABCSystem.Swap(p,p1); - var i := p.Left; - p.Left := p1.Left; - p1.Left := i; - i := p.Top; - p.Top := p1.Top; - p1.Top := i; -end; - -// Определить, являются ли клетки соседями -function Neighbours(x1,y1,x2,y2: integer): boolean; -begin - Result := (Abs(x1-x2)=1) and (y1=y2) or (Abs(y1-y2)=1) and (x1=x2) -end; - -// Заполнить вспомогательный массив цифр -procedure FillDigitsArr; -begin - for var i:=1 to n*n-1 do - digits[i] := i; -end; - -// Перемешать вспомогательный массив цифр. Количество обменов должно быть четным -procedure MixDigitsArr; -var x: integer; -begin - for var i:=1 to n*n-1 do - begin - repeat - x := Random(15)+1; - until x<>i; - Swap(digits[i],digits[x]); - end; - if n mod 2=0 then - Swap(digits[1],digits[2]); // количество обменов должно быть четным -end; - -// Заполнить двумерный массив фишек. Вместо пустой ячейки - белая фишка с числом 0 -procedure Fill15ByDigitsArr; -begin - Swap(p[EmptyCellY,EmptyCellX],p[n,n]); // Переместить пустую фишку в правый нижний угол - EmptyCellX := n; - EmptyCellY := n; - var i := 1; - for var y:=1 to n do - for var x:=1 to n do - begin - if x*y=n*n then exit; - p[y,x].Number := digits[i]; - i += 1; - end; -end; - -// Перемешать массив фишек -procedure Mix15; -begin - MixDigitsArr; - Fill15ByDigitsArr; - MovesCount := 0; - EndOfGame := False; - StatusRect.Text := 'Количество ходов: '+IntToStr(MovesCount); - StatusRect.Color := RGB(200,200,255); -end; - -// Создать массив фишек -procedure Create15; -begin - EmptyCellX := n; - EmptyCellY := n; - for var x:=1 to n do - for var y:=1 to n do - begin - p[y,x] := new SquareABC(x0+(x-1)*(sz+zz),y0+(y-1)*(sz+zz),sz,clMoneyGreen); - p[y,x].BorderColor := clGreen; - p[y,x].BorderWidth := 2; - p[y,x].TextScale := 0.7; - end; - p[EmptyCellY,EmptyCellX].Color := clWhite; - p[EmptyCellY,EmptyCellX].BorderColor := clWhite; - FillDigitsArr; - MixDigitsArr; - Fill15ByDigitsArr; -end; - -// Проверить, все ли фишки стоят на своих местах -function IsSolution: boolean; -begin - Result:=True; - var i:=1; - for var y:=1 to n do - for var x:=1 to n do - begin - if p[y,x].Number<>i then - begin - Result:=False; - break; - end; - i += 1; - if i=n*n then i:=0; - end; -end; - -procedure MouseDown(x,y,mb: integer); -begin - if EndOfGame then // Если все фишки на своих местах, то не реагировать на мышь и ждать нажатия кнопки "Перемешать" - exit; - if ObjectUnderPoint(x,y)=nil then // Eсли мы щелкнули не на объекте, то не реагировать на мышь - exit; - var fx := (x-x0) div (sz+zz) + 1; // Вычислить координаты на доске для ячейки, на которой мы щелкнули мышью - var fy := (y-y0) div (sz+zz) + 1; - if (fx>n) or (fy>n) then - exit; - if Neighbours(fx,fy,EmptyCellX,EmptyCellY) then // Если ячейка соседствует с пустой, то поменять их местами - begin - Swap(p[EmptyCellY,EmptyCellX],p[fy,fx]); - EmptyCellX := fx; - EmptyCellY := fy; - Inc(MovesCount); - StatusRect.Text := 'Количество ходов: ' + MovesCount; - if IsSolution then - begin - StatusRect.Text := 'Победа! Сделано ходов: ' + MovesCount; - StatusRect.Color := RGB(255,200,200); - EndOfGame := True; - end - end; -end; - -begin - SetSmoothingOff; - Window.Title := 'Игра в 15'; - Window.IsFixedSize := True; - SetWindowSize(2*x0+(sz+zz)*n-zz,2*y0+(sz+zz)*n-zz+90); - - EndOfGame := False; - Create15; - - MeshButton := ButtonABC.Create((WindowWidth-200) div 2,2*y0+(sz+zz)*n-zz,200,'Перемешать',clLightGray); - MeshButton.OnClick := Mix15; - StatusRect := new RectangleABC(0,WindowHeight-40,WindowWidth,40,RGB(200,200,255)); - StatusRect.TextVisible := True; - StatusRect.Text := 'Количество ходов: '+IntToStr(MovesCount); - StatusRect.BorderWidth := 2; - StatusRect.BorderColor := RGB(80,80,255); - - MovesCount := 0; - - OnMouseDown := MouseDown; -end. diff --git a/Task/15-puzzle-game/PowerShell/15-puzzle-game.ps1 b/Task/15-puzzle-game/PowerShell/15-puzzle-game.psh similarity index 100% rename from Task/15-puzzle-game/PowerShell/15-puzzle-game.ps1 rename to Task/15-puzzle-game/PowerShell/15-puzzle-game.psh diff --git a/Task/15-puzzle-game/QBasic/15-puzzle-game.basic b/Task/15-puzzle-game/QBasic/15-puzzle-game.basic deleted file mode 100644 index 14a9e86aef..0000000000 --- a/Task/15-puzzle-game/QBasic/15-puzzle-game.basic +++ /dev/null @@ -1,133 +0,0 @@ -DECLARE SUB printPuzzle () -DECLARE SUB buildBoard (level AS INTEGER) -DECLARE FUNCTION introAndLevel! () -DECLARE FUNCTION isMoveValid! (piece AS INTEGER, piecePos AS INTEGER, emptyPos AS INTEGER) -DECLARE FUNCTION piecePosition! (piece AS INTEGER) -DECLARE FUNCTION isPuzzleComplete! () - -DIM SHARED d(16) AS INTEGER -DIM SHARED dbp$(16) ' Board pieces -DIM SHARED sh(3) AS INTEGER -DIM level AS INTEGER, x AS INTEGER, y AS INTEGER, z AS INTEGER - -' Main Program -level = introAndLevel -buildBoard (level) -DO - printPuzzle - PRINT "To move a piece, enter its number (0 to quit): " - INPUT x - IF x = 0 THEN END - - WHILE isMoveValid(x, y, z) = 0 - PRINT "Wrong move." - printPuzzle - PRINT "To move a piece, enter its number (0 to quit): " - INPUT x - IF x = 0 THEN END - WEND - - d(z) = x - d(y) = 0 - CLS -LOOP UNTIL isPuzzleComplete -PRINT "YOU WON!" -END - -SUB buildBoard (level AS INTEGER) - ' Set pieces in correct order first - FOR p = 1 TO 15 - d(p) = p - NEXT p - d(16) = 0 ' 0 = empty piece/slot - z = 16 ' z = empty position - - PRINT - PRINT "Shuffling pieces"; - RANDOMIZE TIMER - FOR n = 1 TO sh(level) - PRINT "."; - DO - x = INT(RND * 4) + 1 - r = 0 - SELECT CASE x - CASE 1: r = z - 4 - CASE 2: r = z + 4 - CASE 3: IF (z - 1) MOD 4 <> 0 THEN r = z - 1 - CASE 4: IF z MOD 4 <> 0 THEN r = z + 1 - END SELECT - LOOP WHILE (r < 1) OR (r > 16) - d(z) = d(r) - z = r - d(z) = 0 - NEXT n - CLS -END SUB - -FUNCTION introAndLevel - CLS - sh(1) = 10 - sh(2) = 50 - sh(3) = 100 - PRINT "15 PUZZLE GAME": PRINT: PRINT - PRINT "Please enter level of difficulty," - DO - PRINT "1 (easy), 2 (medium) or 3 (hard): "; - INPUT level - LOOP WHILE (level < 1) OR (level > 3) - introAndLevel = level -END FUNCTION - -FUNCTION isMoveValid (piece AS INTEGER, piecePos AS INTEGER, emptyPos AS INTEGER) - mv = 0 - IF (piece >= 1) AND (piece <= 15) THEN - piecePos = piecePosition(piece) - emptyPos = piecePosition(0) - IF (piecePos - 4 = emptyPos) OR (piecePos + 4 = emptyPos) OR ((piecePos - 1 = emptyPos) AND (emptyPos MOD 4 <> 0)) OR ((piecePos + 1 = emptyPos) AND (piecePos MOD 4 <> 0)) THEN - mv = 1 - END IF - END IF - isMoveValid = mv -END FUNCTION - -FUNCTION isPuzzleComplete - pc = 0 - p = 1 - WHILE (p < 16) AND (d(p) = p) - p = p + 1 - WEND - IF p = 16 THEN pc = 1 - isPuzzleComplete = pc -END FUNCTION - -FUNCTION piecePosition (piece AS INTEGER) - p = 1 - WHILE d(p) <> piece - p = p + 1 - IF p > 16 THEN - PRINT "UH OH!" - STOP - END IF - WEND - piecePosition = p -END FUNCTION - -SUB printPuzzle - FOR p = 1 TO 16 - IF d(p) = 0 THEN - dbp$(p) = " " - ELSE - dbp$(p) = RIGHT$(" " + LTRIM$(STR$(d(p))), 3) + " " - END IF - NEXT p - - PRINT "+-----+-----+-----+-----+" - PRINT "|"; dbp$(1); "|"; dbp$(2); "|"; dbp$(3); "|"; dbp$(4); "|" - PRINT "+-----+-----+-----+-----+" - PRINT "|"; dbp$(5); "|"; dbp$(6); "|"; dbp$(7); "|"; dbp$(8); "|" - PRINT "+-----+-----+-----+-----+" - PRINT "|"; dbp$(9); "|"; dbp$(10); "|"; dbp$(11); "|"; dbp$(12); "|" - PRINT "+-----+-----+-----+-----+" - PRINT "|"; dbp$(13); "|"; dbp$(14); "|"; dbp$(15); "|"; dbp$(16); "|" - PRINT "+-----+-----+-----+-----+" -END SUB diff --git a/Task/15-puzzle-game/Rebol/15-puzzle-game.rebol b/Task/15-puzzle-game/REBOL/15-puzzle-game.rebol similarity index 100% rename from Task/15-puzzle-game/Rebol/15-puzzle-game.rebol rename to Task/15-puzzle-game/REBOL/15-puzzle-game.rebol diff --git a/Task/15-puzzle-game/Rust/15-puzzle-game.rs b/Task/15-puzzle-game/Rust/15-puzzle-game.rust similarity index 100% rename from Task/15-puzzle-game/Rust/15-puzzle-game.rs rename to Task/15-puzzle-game/Rust/15-puzzle-game.rust diff --git a/Task/15-puzzle-game/Scheme/15-puzzle-game.scm b/Task/15-puzzle-game/Scheme/15-puzzle-game.ss similarity index 100% rename from Task/15-puzzle-game/Scheme/15-puzzle-game.scm rename to Task/15-puzzle-game/Scheme/15-puzzle-game.ss diff --git a/Task/15-puzzle-game/VBScript/15-puzzle-game.vbs b/Task/15-puzzle-game/VBScript/15-puzzle-game.vb similarity index 100% rename from Task/15-puzzle-game/VBScript/15-puzzle-game.vbs rename to Task/15-puzzle-game/VBScript/15-puzzle-game.vb diff --git a/Task/15-puzzle-game/Zig/15-puzzle-game.zig b/Task/15-puzzle-game/Zig/15-puzzle-game.zig deleted file mode 100644 index 431b73eab5..0000000000 --- a/Task/15-puzzle-game/Zig/15-puzzle-game.zig +++ /dev/null @@ -1,91 +0,0 @@ -const std = @import("std"); -const stdout = std.io.getStdOut().writer(); - -const tokens = [16][]const u8{ " 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9", "10", "11", "12", "13", "14", "15", " " }; - -const empty_token = 15; -var empty: u8 = empty_token; -var cells: [16]u8 = undefined; -var invalid: bool = false; - -const Move = enum { no, up, down, left, right }; - -fn showBoard() !void { - try stdout.writeAll("\n"); - - var solved = true; - var i: u8 = 0; - while (i < 16) : (i += 1) { - try stdout.print(" {s} ", .{tokens[cells[i]]}); - if ((i + 1) % 4 == 0) try stdout.writeAll("\n"); - if (i != cells[i]) solved = false; - } - - try stdout.writeAll("\n"); - - if (solved) { - try stdout.writeAll("\n\n** You did it! **\n\n"); - std.posix.exit(0); - } -} - -fn updateToken(move: Move) !void { - const newEmpty = switch (move) { - Move.up => if (empty / 4 < 3) empty + 4 else empty, - Move.down => if (empty / 4 > 0) empty - 4 else empty, - Move.left => if (empty % 4 < 3) empty + 1 else empty, - Move.right => if (empty % 4 > 0) empty - 1 else empty, - else => empty, - }; - - if (empty == newEmpty) { - invalid = true; - } else { - invalid = false; - cells[empty] = cells[newEmpty]; - cells[newEmpty] = empty_token; - empty = newEmpty; - } -} - -fn waitForMove() !Move { - const reader = std.io.getStdIn().reader(); - if (invalid) try stdout.writeAll("(invalid) "); - try stdout.writeAll("enter u/d/l/r or q: "); - const input = try reader.readBytesNoEof(2); - switch (std.ascii.toLower(input[0])) { - 'q' => std.posix.exit(0), - 'u' => return Move.up, - 'd' => return Move.down, - 'l' => return Move.left, - 'r' => return Move.right, - else => return Move.no, - } -} - -fn shuffle(moves: u8) !void { - var random = std.Random.DefaultPrng.init(@intCast(std.time.microTimestamp())); - const rand = random.random(); - var n: u8 = 0; - while (n < moves) { - const move: Move = rand.enumValue(Move); - try updateToken(move); - if (!invalid) n += 1; - } - invalid = false; -} - -pub fn main() !void { - var n: u8 = 0; - while (n < 16) : (n += 1) { - cells[n] = n; - } - - try shuffle(50); - try showBoard(); - - while (true) { - try updateToken(try waitForMove()); - try showBoard(); - } -} diff --git a/Task/15-puzzle-solver/Ada/15-puzzle-solver.adb b/Task/15-puzzle-solver/Ada/15-puzzle-solver.ada similarity index 100% rename from Task/15-puzzle-solver/Ada/15-puzzle-solver.adb rename to Task/15-puzzle-solver/Ada/15-puzzle-solver.ada diff --git a/Task/15-puzzle-solver/C-sharp/15-puzzle-solver.cs b/Task/15-puzzle-solver/C-sharp/15-puzzle-solver.cs index 591dbc1385..16d2c2a882 100644 --- a/Task/15-puzzle-solver/C-sharp/15-puzzle-solver.cs +++ b/Task/15-puzzle-solver/C-sharp/15-puzzle-solver.cs @@ -1,97 +1,1466 @@ -// Translated from C++ by Nigel Galloway +using System; +using System.IO; +using System.IO.Compression; +using System.Runtime.InteropServices; +using System.Text; -new FifteenSolver(8, 0xFE169B4C0A73D852).Solve(); - -class FifteenSolver +public static class Program { - readonly int[] RowIndex = [3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3]; - readonly int[] ColIndex = [3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2]; - int n = 0, maxCost = 0; - readonly int[] Hole = new int[100]; - readonly char[] Move = new char[100]; - readonly int[] Cost = new int[100]; - readonly ulong[] State = new ulong[100]; - - bool Scan() + public static void Main(string[] args) { - if (Cost[n] < maxCost) - return Explore(); - - if (State[n] == 0x123456789ABCDEF0) + byte[] t = new byte[] { - Console.WriteLine($"Solution found in {n} moves :"); + 15, 14, 1, 6, + 9, 11, 4, 12, + 0, 10, 7, 3, + 13, 8, 5, 2, + }; - for (var g = 1; g <= n; ++g) - Console.Write(Move[g]); - - Console.WriteLine(); - return true; - } - - if (Cost[n] == maxCost) - return Explore(); - - return false; - } - - bool Explore() - { - if (Move[n] != 'u' && Hole[n] / 4 < 3) { Down(); ++n; if (Scan()) return true; --n; } - if (Move[n] != 'd' && Hole[n] / 4 > 0) { Up(); ++n; if (Scan()) return true; --n; } - if (Move[n] != 'l' && Hole[n] % 4 < 3) { Right(); ++n; if (Scan()) return true; --n; } - if (Move[n] != 'r' && Hole[n] % 4 > 0) { Left(); ++n; if (Scan()) return true; --n; } - return false; - } - - void Down() - { - var shift = (11 - Hole[n]) * 4; - var a = State[n] & (0xFUL << shift); - Hole[n + 1] = Hole[n] + 4; - State[n + 1] = State[n] - a + (a << 16); - Move[n + 1] = 'd'; - Cost[n + 1] = Cost[n] + (RowIndex[a >> shift] <= Hole[n] / 4 ? 0 : 1); - } - - void Up() - { - var shift = (19 - Hole[n]) * 4; - var a = State[n] & (0xFUL << shift); - Hole[n + 1] = Hole[n] - 4; - State[n + 1] = State[n] - a + (a >> 16); - Move[n + 1] = 'u'; - Cost[n + 1] = Cost[n] + (RowIndex[a >> shift] >= Hole[n] / 4 ? 0 : 1); - } - - void Right() - { - var shift = (14 - Hole[n]) * 4; - var a = State[n] & (0xFUL << shift); - Hole[n + 1] = Hole[n] + 1; - State[n + 1] = State[n] - a + (a << 4); - Move[n + 1] = 'r'; - Cost[n + 1] = Cost[n] + (ColIndex[a >> shift] <= Hole[n] % 4 ? 0 : 1); - } - - void Left() - { - int shift = (16 - Hole[n]) * 4; - ulong a = State[n] & (0xFUL << shift); - Hole[n + 1] = Hole[n] - 1; - State[n + 1] = State[n] - a + (a >> 4); - Move[n + 1] = 'l'; - Cost[n + 1] = Cost[n] + (ColIndex[a >> shift] >= Hole[n] % 4 ? 0 : 1); - } - - public FifteenSolver(int n, ulong g) - { - Hole[0] = n; - State[0] = g; - } - - public void Solve() - { - for (; !Scan(); ++maxCost) - ; + Ultimate.SolvePuzzle15(t); + } +} + +public static class NativeLibraryHelper +{ + [DllImport("kernel32.dll")] + public static extern IntPtr LoadLibrary(string DllToLoad); + + [DllImport("kernel32.dll")] + public static extern IntPtr GetProcAddress(IntPtr DllHandle, string ProcedureName); + + [DllImport("kernel32.dll")] + public static extern bool FreeLibrary(IntPtr DllHandle); + + public static T GetMethod(IntPtr DllHandle, string MethodName) where T : class + { + T Method = null; + + IntPtr MethodHandle = NativeLibraryHelper.GetProcAddress(DllHandle, MethodName); + if (MethodHandle != IntPtr.Zero) + { + Method = (T)((Object)Marshal.GetDelegateForFunctionPointer(MethodHandle, typeof(T))); + } + + return Method; + } +} + +public static class Ultimate +{ + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.LPWStr)] + private delegate string GetSolverName(); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + [return: MarshalAs(UnmanagedType.LPWStr)] + private delegate string CallSolver([In] [Out] byte[] Array, int Len); + + public static void SolvePuzzle15(byte[] t) + { + string LibPath = "Solver.dll"; + + byte[] ZipedData = Convert.FromBase64String(Data.ToString()); + byte[] UnzipedData = DecompressGZipArhive(new MemoryStream(ZipedData)); + File.WriteAllBytes(LibPath, UnzipedData); + + IntPtr DllHandle = NativeLibraryHelper.LoadLibrary(LibPath); + + GetSolverName GetSolverName = NativeLibraryHelper.GetMethod(DllHandle, "GetSolverName"); + Console.WriteLine("Hi! My name is {0}.", GetSolverName()); + Console.WriteLine(); + + Console.WriteLine("And I try solve puzzle15 with board:"); + for (int i = 0; i < t.Length; i += 4) Console.WriteLine("{0} {1} {2} {3}", t[i], t[i + 1], t[i + 2], t[i + 3]); + Console.WriteLine(); + + CallSolver SolveThis = NativeLibraryHelper.GetMethod(DllHandle, "SolvePuzzle15"); + + DateTime StartTime = DateTime.Now; + string Path = SolveThis(t, t.Length); + + if (!String.IsNullOrEmpty(Path)) + { + Path = Path.Trim(); + Console.WriteLine("Ready! Solution path is : {0}", Path); + Console.WriteLine("Moves {0} and Time: {1}", Path.Length, (DateTime.Now - StartTime).ToString()); + Console.WriteLine(); + Console.WriteLine("Bye bye :)"); + } + else + { + Console.WriteLine("Sorry! I do know a solution :("); + } + + NativeLibraryHelper.FreeLibrary(DllHandle); + File.Delete(LibPath); + + Console.ReadKey(); + } + + private static byte[] DecompressGZipArhive(Stream FStream) + { + if (FStream == null) return new byte[0]; + + FStream.Seek(0, SeekOrigin.Begin); + MemoryStream OutStream = new MemoryStream(); + + using (GZipStream DecompressedStream = new GZipStream(FStream, CompressionMode.Decompress)) + { + byte[] Buffer = new byte[1024]; + int CountReadingBytes = 0; + + while ((CountReadingBytes = DecompressedStream.Read(Buffer, 0, Buffer.Length)) > 0) + { + OutStream.Write(Buffer, 0, CountReadingBytes); + } + } + return OutStream.ToArray(); + } + + // no way make normal long string literal + private delegate StringBuilder AppendDelegate(string v); + private static StringBuilder Data = new StringBuilder(100000); + static Ultimate() + { + AppendDelegate a = Data.Append; + a("H4sICB6/w2MCAFBhc2NhbFNvbHZlci54ODYtNjQuZGxsAOxaZ3QbRRC+kyVHFg7nBAdCaDYYiKg21ab6ggR7cKL3HgJHDcWRqK"); + a("5RDDof4on26I/OAx79QTDVkmwcOTTboTgxxYQm+yimOcYU8c2eZORLaP/xi253dmdnZmdnZmd3EzgxJhQIguDEL5MRhHbB+qsV"); + a("/vmvGb/1t3hxfeHZojfL20X1zfKjzzl3UdnFdRedXTd/YdmC+RdeeFGw7IyzyupCF5ade2GZ77CjyhZedOZZO02f7qnI0jjcLw"); + a("hnXl00he6osNOW6zkKNozf7hC6thGE448RhJINBXzww1cUsnWHJTfBztzgIWcO4PPi3Tn8/AqKKS1POYVzqLzHKRw+RZgC4avd"); + a("8uC4Uzh9tvCf/8653ynMLvjr/p2CZ10eRIk5WwLdSZObilMmCKfvdOb84HzUoRfIDJy5JLNjCl4tyOxUR4jg6xGhE/QXo0ythV"); + a("e708UcD3O05irsgfIdlHa8MxYtQpWvhVDpXLc9EN8Djjya6m76xIBHLD0o7fKda/HdfTrXOQwJZfE68M7KzoOvUZbeHJR2+erO"); + a("uuCiBQLWhq8RcFBuuhbePOH/vyl/ma3PuNE5BT7RBh9pgw+2wfNs8F42eBcbvJ0N3tIGz7HBM22wxwY7bPDEDVPh723wiA1ebY"); + a("NX2eB+G7zcBidt8Is2+Bkb/KgNvs8G326Db7DBbTZ4sQ2+0gbX2eDzbPAZNvhEG3ykDT7YBs+zwXvZ4F1s8HY2eEsbPMcGz7TB"); + a("HhvssMET19vW3waP2ODVNniVDe63wcttcNIGv2iDn7HBj9rg+2zw7Tb4BhvcZoMX2+ArbXCdDT7PBp9hg0+0wUfa4INt8DwbvJ"); + a("cN3sUGb2eDt7TBc2zwTBvsscEOGzwRs62/DR6xwatt8Cob3G+Dl/8DnLTBL/4D/IwNftQG32eDb7fBN9jgNhu82AZfOQVuc213"); + a("h0OIuHZD3tEJmEXPrBhgeqrb1YIMRGS6a9XGTkGfVbqTU1B112Yo0qlMJsOi0/tucwhp9S1s8zRoLkbz8a6Nl4NUjv4xTH+Tuo"); + a("dYdFYZOlg0MJ5+/qrsoLJTcoh5+J9TT5zpp6SZHhpl+us+vZst84/zjEKNulb2ZMnEThOEqvjZ0WMzrf31e8ntGfzJ4bioGoFx"); + a("ZUHKLy0tLQosSCmJTxwv7IPBqrdHWbE6oK9Q9ZWsKIFZ+mqSTW/GGEA9KbdT2pVe7ytRQMtweh7N0oAQBoSIniVA1KnzgQSbVw"); + a("okymh6llVJp+9keVOzzWdI1ntzE0E5mi3TKIjlck7yl9+J7THjnOyFmkMAMMpJlx8sAPCnWWs8NA16TuzgFJjeyYU9i4TVByDv"); + a("0J+yCrn1TD/Ukr9K+X8s/NXcTH+MhbusrrPYve5sF8FgMDRlCDOcFfkNqh5n3j5pyfWoLypiYkpavBCZphIed0vXLkDjWHJacM"); + a("+xpBgsbnPOUDKpiIOFk+JY0hGUNAMt4bRD06nNMZZ0BqdbTU7e4gzoCSUx7ApVW5WC4KwYAwLjvW4l0xMaVcJD0wKt8cZSaYtm"); + a("kgdMwCGTBKfQD51Ky8+UNdcVMVRKIOGuGFjGDN+MIdU4egYMbN6Qqh+ZBilqHKXGcTSOonE8tALEtzDD7aAgSFsswRflbOcMab"); + a("ZvRi1rSRJDsPmKtYwQ8fZawKBfqxrqjDiRSqlS58FxfI5MUVsvtQ1QWy+1DWSoNSsJtQ5RaxptWUGobRQfiPKw0pImHkrLOBVS"); + a("+GwsuPTE6PBKmIsqJknf9fNJ13uQrtdjmeU5dXNVs/CII0/dXNVoc06qO6fqfXOqLkW3m7QN3UDhf2p6jqZpOW1osTxGdn2PZj"); + a("J1u4EK1/dsmlEJVDsbqi3J6tutGqUz0OZW9Zmhd0nbww2YF1d4dj2h2+Z8tVv6Tubpe4Tru5roV5LGqkljldQ2l9rKqG0utZVx"); + a("fWclodbZ1FqCNksQanLjMzP0qF3b52W1/R603WnznwkYep1AyEMZKl4Qs38B6cnEWGJasGosgRXxRUQWTuA3Io4lHMFizadTg4"); + a("NWZizhBAKHnbQqDHEivHp/lkgXhra3gGkACoLTYyrHcjPo4UfW2t/I6WYSWIbQT51sX9L+or3zVgjItaoux/FL4deL3wAGoxjC"); + a("L43fKH7joffNW6QtfBY+dIAB+KToQ7ZKYzgwRJ80fcgwMe5tUssJmUm1aLJ0YUrRU5p0eg8LfzIKGakanAfCJZp0cY+gSRdhsD"); + a("ehSUH83o+vGNqarh5WpM1Z0hY0/iKnm5Bz/Yh2Hlaz/LLPWTiV6ZRejrOoTxxlNclLv+nM5zc/x49zCR5BNHK85LG4GDpak0JT"); + a("OfYNm+U5XXGTq7X4M1IxsNfNvy9NEoyTBF91alLTck265Ds3Pv34mIBs82Jiv7+q39yE9Gubn5wYKSHcviFfUa+sJ/vSvvLerY"); + a("/BGdvi2bf2nFnfeL4FKmsGgptghqo3yenPk5Y6xXl7OR0hxMd4aLQq3ommYgfzpviw8L7n3oQjdNA1mikyHZki6aZ4Pjn0K7y/"); + a("cJQBoYDZMNDvnewXqV+0+YOeepH2YXbDqJRwZDhTe7+IMtsft/dfM0PvzW9j1/QB0aODUBaewfIxpCfSBOTBozbYUpc9vxhd2T"); + a("CuGf7xrenSy9oyp/ZLT5wyjn6rK1/+jZl+LgLW/BJVPxfB7JIyVb9iLtMvqWX6FQzrVOFmulxJ+yTK6h+kpksOx+eK03/wSU3y"); + a("xfTVKaJR5fpYtnLbPdnKvU9lK4/Es5Wne7OVF4b4dG4bRbHyhR/xxdoK4Qkx3C8gRBgbMwNyGZDLgFwG5DIglwG5DMhlzK/8Qb"); + a("qIRLmIi3IRRMGXi0IViGJVIIpVgShWBaJYFYhiVbKiXE+iDK5e+QgJk5lfTWo67thcBsmi++5cQRlK9wseGsceZMbhs5k+61y0"); + a("olqC6oVWtQzVRRw3kTbfzKUqp54GgkfxZEtPhcc3qDsknN7i0s3DaTFYFU4fHqwIp8uD24bT2wS3DKc3Cm5tbo/4IT2fcIUpDu"); + a("md5haAtZfOEswNtZj2kksw16eyQDALUeqvI5dwPb4LuLbGgx5j+rxyp5DpNSmz2h9VTZ9t5XEnTbEfanqYRdWKMn9V/MVKyhh/"); + a("/jmT4S3pb7/NZAxfRS0feHznZP7VvG/F9eQ0c9INv2Uymu7SAKavR113nY8q5ExvINhSNJu9aoarEqia7h83XHugpvt/Hfz0jp"); + a("ULx6UnjvnVMtMcP9naitKnQbJ8mvb+wyZy/fZ88Rd7R+4P8VW67k4eLGnv20K67lIAsvR8XNYRzj4pkYsS/vIeFeufGCpTixCb"); + a("EwwAkgeGwOlNsr4hZImmlN3fJ7fBmtRlPyh6v9K3WgmvHleiTo/pAQ9VL6JgTN0/wvExOkdKB6nVjPDWA94UOnlCHxWo6kdyBD"); + a("mfAAQKNFx+wQ1A8SaU8CfTlL7hgDel9H2iiD1mtU96fmPp+TmKdzCgrwq0DgY3D7T2NxSzZXGKasNdGNcu4jP8Yk4HSQfxVWp6"); + a("LusM6J1K36dK+NPxQLR4vUkILMyAPmBuS/MhP80jv57cTscxs8Si5abJEq33AWcJiK8rNa/XFSl9Q6DqNvdVliVgORlzN9qvIK"); + a("+I35yAdyCgJwMw5VkkcFFWYHNDLq0p5cv5elV80qiPyvnr66qeqG2rqpWWdrOa3saC2sh7VFejtSLTV6VLf8xkaiO7Zj0Tw3Pj"); + a("jztWPlo+hnspJ9Kt6m/7pKXb4LezsqBLWfAmlpsozgKE0icdtho1WIKsv4v8UQfv79Ee2tYfSZ8tI36KLHqYmDXRrenDoqUF6R"); + a("t/gPqbAPEREzRi77wRh6w9Yj5G+CM4Dx2F/kNz/emD0WzWrKOjCh1/L4MEjLMPiDp3iBRYsUE+RT751NP+1EYuXklLN5aWOryd"); + a("odlQgxhYEIf6efqXVsfh9J1aTB+wRZd8/2OtPcFSxBeGrZT/NaUfGIPUjqq43SuxzlTQiBKKawznX61lHxkZxI+d1vrQiF64Vi"); + a("B6oqjqg0BtmNldsCMLd4rkmWsG4KJmgaIjzf+E6W9pPI9QcRxtf/MN64+tWc0SIwVMf5+Fu0V2/vse8m9vL5hVRgoV/WfWmgm9"); + a("yfRRZBkwFtW7iom9qjeO08ImDJMXEzFzpkW3rTBSwDmHvxFZzXd136reQTkyh2SsJE1m5X1K0fsC0SNEHNaZ/inTP+KM1y0Tyc"); + a("Py5GH58gxYYmzGxYDezQ1ycsiRAmVSkB/qvgl4V/gjGxPzw0kQu39gYitg3QGqrKKNyvEdHbm/Qw+l5gyRBPcNBTL3N2XFkFqU"); + a("jJQW5PmLPZ7rgXFNn36y4aAtdGEu0QA5nDrI4hrdcjuVWswXESbH/ylNn6onIQ1cvqEwUBW34rHYWEgnDFhKPyyvSKnpa3Ch05"); + a("zNIW9foCbRUJytYzCnrUYPhrkfnjN3ueUTKlSxJ73F6FrbgLQ0EU7PD4/PWeTm1TLTEUlxD7FQfJFJOuFxsb7Sp8fJImPYtcE2"); + a("jmVFzJXU6KzwtQ7hoLZiz4GRYhEL6QR20yotlmO0zv3q7sxa8nSLJe0zUK5Ff6t10e+c1F+kpGW15ddMlPmBM50Yt1PP+c8DFU"); + a("OIuDkboAiHmKXo42QGd/yKo+HSQlYz0HAQSjIObzJH+9qKMhGUr4HcanQJBxT9uxep08oYXplAD+JNGbekifRCwLEYcSxDwjBp"); + a("h/9Bnpf+hTxrfv8reXa0yfPhz/9GHpgzMxxwgzJjl4BRoiRGymSjmukVFbLe6YOM0pODBOk/+Mv7FenJVQSUI2OYAJDkwFh5hk"); + a("lPrmGJb8rKx2TaXJtV8T1ZX8W/SUX8nsiXx1VxgCXMsvJBJg4QHxBUxV6mi1LHkW5Z6qh1i73heK2my27/kp7gpswQaeDWRDC0"); + a("PkEi4uO5blHQ+FqX2OaUiz9Mf0/qcO3XhuSsY9ZFcNKzfVFniSbXpOpdWtWgeYgqdfQoUkccWQRrr7nu02r8W19ZM4zLk/1Vcb"); + a("mGwCV1JNn58ZkBYKlinGEAspOgS2vpBPeWX6qERpf2UpUQQ08nu41nyWzNz+TZ1NB+tmb9KWvSLDHhUBJpEE7yIPytQ0OE2xnJ"); + a("rnp+fDauVlt1h3Cw4XQwvfBgw+fAEeRAN1VKUCkZvkjkuQocmw475/dhxPSjMMK6TMNq88sYqs2lWgnVKsFBuk4XBIj6rYi8eh"); + a("mzWHm4TkBa6ji6olLs1cBBa6mvQC4c3OtPtE9BX41CoujR2CefFsm+qtNvkt0iRa6GoFTWkqDDz4ILH9mLka5HuGTFkGJ9oJS4"); + a("OcpjQIGeltH+hi1L05fxk1uW2UP6X8u055+UmyyZSqbKVLMumcytWr60GLxNDPyWtjwWiofLhBP9853oOwF9bU7HEpwimPQqtp"); + a("lC6Dpm30jy4z/cqfd3cuC7yjJUvDKXF89VolD1B6t58XgtL55jvHjlcBSarL+t6e9rkrfXp7/ODH8l01vPQQeq1aheTDgtmQGh"); + a("0al1DAia3JIRm5umaXIHkoeNNX9rpqFQ81dlzOnUlYH9UZegr4JuCq7B4cIoRmKCKY1dDcBnnLkYl4a7f01ADfKCw76zSECMN8"); + a("1tZawGrg5RvOPtRdNroPmbQ2gAzVdodM2w5pPUYaYvbP5emtF6OWRra23Ct6JZutkfl55vbQSQSDu3zkwT6FyD8xjHymU9ksDK"); + a("4dn+CH6IL+jH2UdraRiHsbTew++2GkZRvZm2Af+tAgy23qctg+mKAhVziWp9Ra3mw7eaRf23Zm39ZlKZry2AO1quMrpAfxYngi"); + a("VxqXUrp8AHVws5Gnw4w/dMTuqCisp/IHWbC8eDwQKMhKyZaZasXHObQ7V3tOLoNiB1FC+mr2+xQ0yF407ob1lMWurHTRC/HvEm"); + a("EUD4/EJVXIC5WKJmDJ3CV+p4PY/vdwXguwAfxKfJMSf//ZhXaMzOWVnhLJswA7p+Mff/YlhRLylfe2k9wdwW0x7FamKZ4Imv9I"); + a("ZcfN9o3x8fBgtAVtviHxcFBg5sxVmjiGGuDCiH47tpXiycgd++nZn6zbTWeNNs4gPSQwzNKNPaMv8AzimHSR3HjMvtnVnx3nLQ"); + a("GiZY9JgUomf6NOxOEBSIoZl2AmapGvWngEmPJUP+yp70fOxd3Zg5SRRIszUr8S40pKwYBs6tSK6J/jfrccvrgvBoAek0bCvqxg"); + a("pA3HRunPySldPhLGciIwWdU3B52qOWr0RGau7N80lEbYZ3JiYux3lSc3E1pDBW0VcoK0zp+UCXL3Ly9FsxjJX3YRh01QUz3ffT"); + a("TMNGQH2LDgcI+6d0qTUrG104ZYcep2Y1eoJIYnThCNi0AZqlmxNWfibrKfN0LebXl+NVydzfpyfAXhZTct9IHntZf92vd/v0lf"); + a("KKb3yR73BSPKVrXkTd7Faf3ucrT4CIJYidV6PLj3vPR7UYiuC2aO3mgRerQ2e4plloCMcdpDrq6/a5bkOOp+0d6mrYnFQu+jg9"); + a("9ELXpGh/EVRK+Tc56WF5bqkZpH042qRTgccAbIcsCq68bhcrdFneGuL5sebbe2FXw2Z8rf1Sx5v5jN9wc8axtb34bzgjmaSe6n"); + a("Uzf0GkZzArdBtW6Das0G1YoduwQrdhhW6Dh24rvbfyWdhrcQUEjUsd/bK3V0bte2k7/E5wNYQdwvdM2iGuQfGNG0odvejBlfLO"); + a("iSsdwWlYWNrHgU9k3J1554l78L4Ik25AShjCJf9ZA6q+EEYaSjOcM3iamMS031KNhZUI7GdVa7K0tAEhcyxE4Xzc9FA0j4uox0"); + a("meF8jEvAkI+RmBsrcLAf0TCuifQLLPsL/4xaEACaKvTLMfaGt6VRR419ZZjxwFh24WLS5QsENkU+xTvwamX/yC7GAs6MOn0UNo"); + a("3c6C7U13trYjNpJuys/MrbQYuHdLHe+LtCb8mIFLiffntZVuh8MVT0xgUE2rmIHJG5i8gckbmLyByRuYPNf6uvZfrBDtv5fzoq"); + a("EZWotAazFoDT4aukfVGx62NHdMXIUDRd4GOdLcwmpSXy0+AQYLOhwu0K4ZpxyPqffI0p3LaHdcs1KL5YyxB4bYS9HGwNvux24e"); + a("bp7Savzt9dNAw99uuqh4CtPsgvqtf5osxqGDX0WcAVHGSRe0CjzeepOIrwR5E7jD1GpWaZK6SmsdpL1cHIhhTYhXHAeC9FPfQd"); + a("tYFurdNrsqKX7BYxwTx8o44LsrsivTZQJX/ChWuyQTXD+H0+107GgW50FlGq0M5vp1YylWqxDnbfS+Rb0Rp2cKaiVHzU5jBjre"); + a("gwToKNnJ6sA2Z1ZoMen5JAg5C8+OskofRhPSvEixQEj4JIlEzbuNhfi+09RPaoLT8N2GZuX961nxq9lvRvis4DN5kvk5bT9NNE"); + a("8sTDQP2p7jIB63Sx3+p7yc2dw8ZoRHzErymLVYzLQYYuhT4WFRa+2pr9ReymTono4n/cgXpaU+V+/Z0cPzJluanWzNyqaV2Fwt"); + a("mzRgkwZs0oBNGrBJAzZpwCZzBm235zLLng+38snjrXzydCufPMfKJy+28snLeQHylnm3B/Quf+RNnkzCNGHLtZrRkLPte7r9cS"); + a("RXDwuYJjRxD6XW3XDbBjc2bORI5kEI+tUNMrZOQI2zVCBVw/6eIrNPf/wxTV7gvpDdEaqpgzvDLgU8MoO4CBxSsNuiEloPOeoY"); + a("MlNYyJba3qdUN5bCR0LVlgjVSI1k/X3Tje9HlMxiZMN0OkLxY4E/YhZCtAjfwSNwtHsa3KjdQz2I79UUTyi5OiYG6B7Qi5FD+S"); + a("O87VaY4mvAeE9MUnZLk01Cpnsws42wqBFCF1Oo3SqmyE/FJKgks7ES8qQoakvXliJrwXCpY7k3BUOF6Q4g3KoDNMcCTVzFMEjR"); + a("yU3bVX11uuibP910B5tBt5NB88npyaynzklnbRom/HVwg6wxtpMJa1bcRP7X5n8Y55FTzLk5k6ObsUQON1JckvWvTu6i33CfHm"); + a("vqN6uAD7ZPwSUduSEkB4Y41jnkbXwzjTuuS2wFOoDYWe9Y8CXE9om/Q26+HlDUki/RkRsBx7QiAxQegcK3+wtNHBPJEpxJBAtC"); + a("ES1mTVYztwPtfBej0MSnW+rOk71lYYwzwYNXU59ZnX2HmDpvGkk8EdT+YuTbKG+FmNv+lZi3ZsU8/wvuA/Ajsc2PNbdc1LBc1L"); + a("Bc1LBc1LBc1LBcFBHA7u15+/1Q7v9HkRu3nVKpIX31GyWaX3fjMaantm03z5LBkFLb/LszdIACU2Th4QJsDispv9yFGprrPb+7"); + a("67aVUQ0PY3GHeajtCa6HJHHlvOZ95hQFR6gh5KxdWhQDIZe0+F7Kt6x662LUlwxKS66kNj/dWINqj2aoHuTon4g4mJ2OnspBc4"); + a("b1rt4yIgoQbXnbph5CpGyTxECy2eBcMhj8COLuYh5g7qRl38lJIJpKs9Mj8nIfj2dRiYyh4QTlKW5zQ+iVODf1dzvQskzADNpF"); + a("So/s/29rbf3FoL8Udv5e6HAAO/8Qdv60mtUnLn+QqPvaQpX0/1iW3773Io+/qsdf9bX+tqkpdAu98yHnLlz86tBMZc1qVexnfa"); + a("twxbgZPV+dmyR85k3obystE3ysm8bq75o7qHrfnyPZmk9wWMiOlJGN66lz44Qve5PA5jETmziStk5KFXnIvFsgxSBeLxkLzqRk"); + a("K1QMu+12FqL1ZSv9km6OR3gq20kHc35pRcNBya8PcyInciJi1yTmIO2qhFmQxZT1nzlmZRaT+qFRZFdQlwF1GVCXAXXZNPyX9s"); + a("kwPdgolipE9w/9Zo0svZIIufj9dnmcHy3Ojffh6I27umLMMJl9lp+17+UOwbd38eI6XGJQMhDzw1Qk1CeKhAa0vVgEe4TRrzDV"); + a("nN2QnZE57uDTl/PXgjWr8U6gr9AHzo970OZN0rUdft8zcTRSKsr6SlPKNvXj3aLbyTXZ3/SsDC3aLSm335LfYooRmFAM07wVJn"); + a("QPTOhhmNBT2F3brWm/H9BfU/UAaawSx9LPrJjw4gYUGI5cDQp0QZPJhFwdG/MrWISScLVQL/Ga4aZDqr83+4ZHVatdwE7H9ASd"); + a("WGMydIenmz/fRRTYFebb7qEh0pO9uOhXojLu4ZMR36xP1/2E0kfnzed8OrGLG6F4oPXrYGG4m/ZlVBv2D3e7WDjjbijscPNX6g"); + a("XdzDuOGwuq1IxL6hraA0r035Ff+bwTei/FQ/NMJDe8cpLh7xW7zVl8fUCVhREL0YlT46eVKMPjrvo0fwVVvWlQ9elpGmf4Uzh7"); + a("boIiPO5sXI8jULsWA4EUyebz/u6nS8pb0VM1eLY/epkD5Hw1ow1FkAQWXSfGlAXdzfWuT3av28aqra5ZtL6y4D16JGmGPkRzOt"); + a("ohyepKfsiPhX8RQ4dkUStDsrlBdn/w6aNcXhkTQB3dn9YER1CTlqI5HEfj96TgrADu3DwnVYSKWjPUuAHdA3kI8A7J4rKYT/8i"); + a("pgLHgJEgF/jtczwPfgelS9GX8ywi5MSV8zTQPjt6/C+tg/WlZ0eP+D17qW/4ByhhNees1bYjW0BJkd5J5W0yNwllDQgmKftMEB"); + a("Zln0hV1QV/ed+8NrZDWtqX5eDHWJzTSrXYn22VaJPDy0RMtH4Yj6nHiT4ILtf01h8k6+/JeG6j/UDmClqYEvkyh0r+HL8TpwmW"); + a("PdBu29GuT7Oc3Wj314w2vRaDPeE1J7Tln2N2tOQoyZejDG3YG75hBrzUgJca8FIDXmrASw14qQEvXWt/kOl0L3Q7BLlb8DTX4K"); + a("IJT530buix4ouCzQeyzQjULK/fyA9uB+LVb4YcnigKfoZvWfCj4Ae8uQ2tzRPb120uN49sHyzF1xGaqcWwUxEJcxrslyogpdYs"); + a("l64lG5YxDsOaJyqkxRHAzSMVwS2aR8TgdvSpah7xBKubR+YG12seKZNaNb4XQ8wSojN8HEDQBOzgDA7mfW5e30+LWXwad1PwqG"); + a("oZCckdnjg+OC08cXnQEZoDTAdRw1zXnzrf7FgPyde8z4zK4AjpZK33f7j961bIC1R9VjWGZ1j+kkSX7RXpB3Dfreh+cJ2m7I3i"); + a("2rtFLi9o+oXmfabhnlMx/ALDwkrXhdHHcgd+dFZKrRejSVnmB0yXnHwsaKkgb/1Hh6p+tua75vqKMk9oI2kpOLIXcm/n2GaHX+"); + a("NP5UmCh18gPwffgNBWLC3pkZY8R1yGK6XFJ/FK0aUbNg+7645oHnZdWtY8vEndQVTbzqylMWBaLIWHK+VIytwVMky2Ib/akxo3"); + a("12L5bcdRmwf6PArtT5XE8NzGxUZofguP7b69oKFFdJZOUfbgRTr0fZ1LrUkt8kCJwzy3ilEvE99Swn4BayEpe4N6dG9MJacQRf"); + a("8RU68Qgi5lzQdajNdDMtdGcC+GkFa/G8PVZXB9/i3F1xGcY5Yp0qtdit5lbkS2KHXw+npUX0BVDZchQzH+MJ/7bw78PRzWTx7g"); + a("wVNyQFL7AlKgt2rQ+q+tSdE8JPf/sMXatl1qq7uDOwF3QA6b8+XwL3MWOXco47790WRLYW3zN2gDaqgUvHOEGJ7mlZpVTc/j01"); + a("jCDaHlC/oy76hZGPCmVD2OZ/W8fCP3Jq7SSdaYqSK5EhPpk/vwgGm5ed77efSIja33zq9PIkuDooSgnxk+Mie8IAIvB5QIOUAz"); + a("ZmXSBYKml1jgslqHiLGozuYN3dwmeTXvFfkoS7hwjRCEVCKLHp9my8CA2F7lFuo3oTHRQ/7g7DrAm6qi8EvTphMTaauIiqhVW2"); + a("dxEmtHsMX3NEHcuP0cce/E2aVFbXxG87n93Ip7T9xSCi24KM4qqJWqvBpHnBQpjf859+UtUxx+n80b995z7rnnnHvWfRRoHR+n"); + a("0/BiiimgNvdIHstWIeLM/8PCEfS6KCU1F6GpnNKOxRgGbGd9D4xauWaXyFbYPxF7K5U7WlNSawkKYFLaNuiHsQh0kO0as87Hft"); + a("7hvU31Yw4LxUVKe23T7Ocd7nHa1wIDEYZcYjkFoVlPQyR4zFMmSRI0dQqmKAObhXu4VhqhEIoNaC9tRu9xDRrkhlRlGEnuRsry"); + a("4Vm6/Lw/3eIARwBTcZqtFk6w6a/AoYHD9DqZJdBhCPnBqHwXqGrhWthnhai+y1nphiySPw+zpCy8g0uKoq5QOx2nYfCQZDysbv"); + a("r5twAOA3Y5VaB40H8wWQxFqJ1UJknUNUZBgMh47l2m7WTre6/e9wusj9n3Z60qa99fe619T6K+aEE5OMYXRki4ydv4bbjJ/1uU"); + a("omcLIihWXd3knfuOEktRav/AUSqocoHohGspXlLM8B10HzpV6FfgIZ6j9fP0/AD9eWwYXSK5stoA0iM0kUJLcavEFio19dHTZf"); + a("9owHtjz77xsu0wACxV7SCkWshv2TqI4PtkRfWCg+kYy7g/V7tR6Yaen055X9thBGCWkUqLN7k4KI9XIAIAcON30Vi0dFPLZ6hl"); + a("zR7RwyyAvisyetvgXG+Fs3ANsflRYnhRL0RtzqI2UxajwRw0SB5iGfYGDJulx15Gj/PQYwysNzSwDqERBoQ/+2FT9TxtdLwk6S"); + a("r22MAxzmoy53mjlDZjoi5/TRNNscuaXz5H+CcJiOCtMge0T3oY/gl8kyiCTi2wzEMQyUP6grCowerv/P08EgwzOmk0HlI1AMyf"); + a("A+ZD+7hFvgX5BYrsgtOKIRnaIKnFpn7KLBfr+p8sQOWET2T/IYuaizEWarP26pMimnJCr1zTtKi1VB/2KBo2lcN8hdhjfxjGGw"); + a("lYKbN5eUIrXmjl85ZB5vOj+xvmumgolYKJJfO1PNQA6aJZzj1pT9OWLLD2DQzq8gWjdH+XGl3kf897zYmcSns30PGDC/YO4b0Q"); + a("Ay/EwITxfClShzsDzF2+DBhDDk+3wfh8BWBA+H6NeBqq00lPotH/Y9tjwAVxde8V10lCa2Lez2MBoZsa/Wuag/Bczk4bdHPA35"); + a("rvQoBf1sVLvy9cRexxGpqkmCkewVCAk2zrBhydrHlUx6OGUoaKROsB6MimfhlP0+Wh393S0MUQZ30ZC7Cm0X70z2jmxtgoVm2A"); + a("nA/v7JPxANQ20KAXNb5oPi0y+ujzaBxrHqCc6FIQnUB4yCrqKCi+gARtILYqWYAxCP+3+Xc0WqxPogHvRfsccKKhb6a8r4YW+X"); + a("9u3h4e3llWeCHAA6fNUHPnhah9CO3hwaASoW2AhiQxfsfD7hHufcF4xUS1BainmxUd9QY73rvOJ8VWYVVwgB+M7+2Cr0aqeRQK"); + a("XHEtZ7x/MugP6f6YpHuyV+J779xD+gNPuzQf7nkbXbkqneYtatIIb1EQNkgph/ghpSqkVIWUqpBSx3blPH9Yt4FdDZj779MQ/j"); + a("4Ifz+EfwDCr0H4UzA4sblB3BcY5ykxC1D6YyDk1OpXLPNe24MmaP4NuGOAokuWfe/8Lq5HWZgsBL+rO3z9pZtafk+b3UXj0Auv"); + a("bHK8t73989ze/32kQN+ydgQm2MdpjSqR3SXq9nnoF6Hyfhr1+l6iFe2Lx2nJauxJTIG9QAEKwVoZhIvhPsVWt0BYBMf9olsEb4"); + a("4yubGyoIsaHQC5NZBbD+7Y7aX3UA8NLorm9XiQqBIWlwnBjyB+EGUzh7qAnbaqJ53unGTWejrtC4sJBvR7w5RU3wDz1nRabjOP"); + a("dEiv0CG1t30BdKmEGvYY+IwosgGCHyHkVjeV1VIqWSYr6HIARQvv3E+I154vyRwfsO8hgJ+pzW7oNKGX6dDLtMfetMLelGBjVA"); + a("DlOhTtDjfR1505cxoCKRs6q024e2XgTiaojnpwk93AWHnt9SKOUS7zjqq7Y9ppS2ge3ebyVxFI5EKCVs4z9O2aN2x8dMbnOt+p"); + a("G+h8ctpCrsvNbLG3F1tsafsO65QXdG8B0lEN8pKCvAyLCSBBRsbg1U3VsM+rMrPYSoFf6xJT0R58j+cAVysdLVHiR1W4knn8Y8"); + a("7qoBwxqxmELRmWlEW1yNOWYl4LxLy2unG5myUPAMTUtOsXZOb1Ec2ru0j3N4C2CrRVoK0CbdUoJc6iL85Cpp73jJNwYSqOsc9f"); + a("f+A4r2yeU74fI2BqPNotYthhKLlXhtaCa7YGcvTGeFCOB0GIqaGXafdC1JEk6sBhPkTcBwISm5WjTauP36uAs/FiJi3L707GKW"); + a("eR2Xfym3By/F9EC6ekh+aL86kwmfPIDltP7u1l9/9R8Ry+Tl+BCKfb9NTtr9nWoWSZm3XRnIIsOu3s12y8OPAZ67RvonthvQBY"); + a("zNS6e8D9kauohJMCrhU00c2grAiXXRfR1HoRe9EfnD/KD6CVx2Jdp34R0tYIKlJQdEOOodQhDkBCkcfF6h7yTBx+xGOv2ua7Ce"); + a("ZArgdp2tgsbegNwMA1uZmu6FF8pU1gE5eKjX8M4i0AxveZQBXksv+D5s0gBJO9116ZOanRJaMglo6ALB2WEQM8V/jd5SHdq0bs"); + a("H8N5EslZhOYxKUITjwmQejA53Q1aODZNw72p4RFtZR28JujdvzfonYEg/XrcWjuri2VEuxLj8PAYmrq6hnvENGIXDScLqMWJaP"); + a("EP+pLUnnrOMLXu+UkshlocjE93kT+Uy5AuHEYjgeM+Gq3aOJ4A+rgtStH4z4wHqBtRSIDPs7uYtpEi7bI0czp40zwckoW/g7He"); + a("UOyd0JQfUAbswlK35CIHnrBxmX+guRCuyzY4MNo63voGYXtEdmgn2SUY+0r7CZlneGxE2S2Rt6wLxr6jnaUS29F+OOUCmoViJ6"); + a("Fyb7oGDmniCW4PSgRj243Fk058EQZkURDgAUhwRoguWsSBLIhCBm3kzk/hh5/oD9uGbd2rekPx49Iz4mfkpJN7ZuKTC1yBq5uk"); + a("Pd3RCqvUYSqE7udQmqRUcGDzWzpzhvYLXUH/ypZeXIMyznngTKVC5xZmKJwUEbYzIl3NtWg/Ix7MSZtKyz+/eSsFUUqBB5gysG"); + a("dhNB+6rFuP7aJF20pc0zlNZ/0+pFscl5qSttJAruWjHzi+5ZEgwNhl8JIkhmt/tGNW0YKluH6Zptf6nUVJzOF6fppHFn/waVFv"); + a("LOC+oPFPH6kjFbljFFfIvW6h5lEQJ44DxCXmR8BGXgzVhKg6nq/VfsBGhxy/id7SvrbxKn6im7w75JKcCTAqgxGKekx7CNwcVL"); + a("cER0byQipK4xT/b95r6Dg2eNZ77aW4YG1GB+xZZ782Qvw3gCgg0iot48Sl0Ai9xvPm3ehUj35bpSsMDkWX1UGGMxGB9iFyy/sV"); + a("CPgLSagDMuqr/hTWj3b/n9kUhPP7H9+b2+i/zi8vUWIfBi2fNLEZ3lQWcY6Lp9+W/4aL9yoFZ4lt9q3/1xbgfz75XjRR6wCY4g"); + a("RCjaYwAP/J3hcX1YpaUqF95DK3M2GDIF+g3f2Cvp/V8n7mw3fgkjuTXn5QNO9x+Ndni/Y9Yu/YbeADtll+JxOFcCCG2CSH59K6"); + a("pRyLVEwm2Bnq5yCYGkR+S0RPdv3O6YFgvSxxlg8RfcNCUQe09nDrflpe7KF7iEvugvZCcQTjJXtYwd2wUoCjIFfvEMc7oQLpSy"); + a("ta/3e6O7YZ+HXdiW7TPyBzGvKjc0t0mHqWGsoBXEYFXtqZ0D+mX5Cd/yn8oosfRsPmQgNWYEDcZazYj4RERHwAosR4T7r8FRA/"); + a("4WRR8lI8YTWgJfMRmZnxvlviVHp3dv/xmCGTf8f+/k449rHBrE2wgScBCcQSengIFZYFUZGE8zoMl/TSVTlYj7bG2DkaU/aKbB"); + a("/Tce4XAlRjJw551CDqcAPBy+yv/h7v7MulLPZa8lmb/XLUUje1+T0cS6FMzWJfdz9rs9V2RTuqdSwmgy2SB0M16QahMb1oKWAK"); + a("e6dQn0KyWGg47QswiH3LMPIP2gp8f4i9Ve3ld0hX59QD/b/HmzOZsvbadnIJIpvEPpuyWHvhBd3woc1qH+3BNK1tso4YeymWaq"); + a("ZHmE11exvpik2FfbN0MDYhk4/IpZe4zE3maSdiBDMXUW2eZ8xQmmgc2SbRXrv6QEKjCByr1QOLZIncsV0u3U0BMMGXZibC5H8x"); + a("gB8NmeVUZUReOqRtyntGj/AY8bQBTzU6Q6xgGmgK4XtrLjVxniTOzp9vfPvP/KmLUZfBoj1uSbjrGfhCR/h74LL3ZNTB7EHSJ1"); + a("1g47yqJegQPwSBgru/whXV9ws1kfpJ1wsnZ+deJ/+aHr7Mwd52YI/UHMltQRM2txFl6fdke9WDD9eGY8MoXTb5eMunbfx543ts"); + a("h/8EFysU+4qyG5D5dPnaAfjn63IInPpFYPIt65ZVwES3qlCvcQgpkXfXCOmx5zRuecomUwUClxXYKy1B7WkriIKrkUyGfkmXnw"); + a("7MoFOd+si0p01sZunKrAbtMaAlFrDjK2zPCDWozcSuQ5iWCqUHFiKUr6ZNJ+E0r8fKd3lnNwt/D+bE7FMpv1tbMJMYvlIRdnF+"); + a("k9qAhSHjltY8SGoCMqhoW4ywDDbgKbXzqAeCl9iopG/kjsHhpYSh9jzEqIBaXjtiUf8O/MJMDhFlCYsRw7FqvbVTXv1vRfMQdN"); + a("g1oQjONrEm29FAwz8vAtMRp2cIAU16kx0KizthrofwFtm2GpR0T9FHW/2RnBnxwE0mWi2fAVpF95A7dszF7sy6aJYH7pb2Wx06"); + a("+bsvKMVjXUXR1GtZ6XV4codOQ38ar5jH6xYOnFUiA45HZKT5h1vzsNLJ8r+/Q8Es4DIPfKZd+RytDQHcnoefpGPhRu0v413BeJ"); + a("fRMEtXxi4aSQivbxRGnZ1zeDW0K+eN9b2LdnhpHq6/6mYzvmO1O0LZwN/ecku8xRa/bdtizf3g/Wft+8EvU9e5HxiqfqJQ9QfV"); + a("Gqp+mu7KzvI5UtQiK33xW/asdI41K830GGM/+E/56cG5Zn56w9r/l59+c66DzOvWnw1fGfpTOAekPOtM5WnEMFY+atOdsxZn1Z"); + a("2HL8+iO7Pryw1cY+jLO//Ipi9PftSmL/sXZdOX4z+36csPlmXRlw79ZZqTIPo06BKhs4SHa+qbi7B1ZNtOs41n1WM+7O0OLWgO"); + a("uqVt0LHHGy8KCYq5kOAL1s009py1jl3emW+328BEJJ+u9m+jKF2O0P3RUl0vz6aHP4gaJxtPKLG1aAeSIPAJfR89QPavotTzfv"); + a("Gy7QmR7XJE3nkTeHf0wRh3KeyQUIxmqtU/hUGp8sp4F0ICF29IcW1BL9kBramJ7pEZbrkrS2sYS789yQ4Awif6NjWIB8l6wU69"); + a("MBszA9yOAWwNX0HDbPDvw3NBPjMz7LSPdgQ7/uf8T8iS/oGPDKGyJn1aAxQZeuFXIVF2Pm97yCZnqYVuiXw9dEC+hZyrdPmJ/W"); + a("6RjzG1twgQuuiLBHly/FhXAnLBc/yFA7yvPAHKoUpQrvqMaBAvOYb8nzlP67ZXcXpdORvH/riTvj8KCbEGVhxb4zdznVujPf7X"); + a("l9EGqzgO8Qfrwxp9i5T/pM7uIVLrhq9wEK5ssdH398BbqmA5ePxERD7P2wC1bZO9V96CTiAKnngvV43vLuRNtcVD3Ymhs/X9c9"); + a("lqIyTqtjryrQHrA7F7plrzENNKlto8URRTgRDgUeygILsIlDY9DvISO46sNiKlbnnpt7J7l3CvR0xLxErRph9txLbxD/YmIjns"); + a("FUwLJzJ0iexuCaN6eS69iKHqYkPi/spjIpJKkM7iBjVKbASMaVeN2et1UkGQpgDhRIrv51ZQi6GhPDA23dFah6YsC035Q+nt1Z"); + a("1j7+yX89BmhCsOGmmiR1UUTL+6YuPGzsH2wfZoTaB9BCWEdDxyeXhabJNzFRSq0o0S+zJZnvUxfUVm6DEM2Ng5QN9aKac8More"); + a("lg5eNjgKqJ39FBzs7Kbhtf3im4AwScQG374gX3wsJqHEL0qjvtp1Xh0+VqXnsxUsG9piKSMVBVdvMqmh84uG9m/bcfSiPZofvm"); + a("ywQYoUhGJ9nDsP+j+5cAl+A6/T1hLkPJTLe7kLKBGoyC78109/vbPbMLi4ynPpV5d/Iq5yvFcuxNXQIpeEseqJlq/jMsE4hKep"); + a("m0wCYDp+uqxr0COfsEyJfZ55ddQkF97VSzJeBguTeKN0rG3zXtViDAX8Mt+hsI3nFeOVZB3PhIVBba9znOCQRM6XpAu2xMUoqH"); + a("D+RFxI/YB3+WpAp9df4uaq76UMQuHEEJ78DZ98AXP8OvApyYbPutF1/x1dSXLhQ6mEWNonXVAgkErur1z2A72R40ekg/5fL9gh"); + a("GEvKXcki+bJumo3Be/T4skE6X09vlksSBk2OD7m6wYGUy83MEaJxgTcU+yk8PbY9d8R80Sro/+WCwpD/U+9Va8isQB5bjpVVDD"); + a("2Zgz66XBzMcjGxsXNF+4r26DYsF+N0tv9QwQm8YssNy8Cxpgys732xb+mKy1Yw//cx/8+nYTRsg24qvkdBsYX/ZfD/6jH4/2Di"); + a("/4mdn6F7+5/t0aJw7LPwZSvs/L/Uxv+oWf8TXN2FwQEK/M9//fhr8D9d5Yn3aHmLuAL/X0H832nyf4vg/4N5GUsm4mAT8f/irq"); + a("+wyIuV2LuZV8GJLrzjFV4cLBzCG8H/tTb+30nwv208rxivJOt4JiwManud4wQ3Nv+/bOX/x638f7f0d3zyBczx68CnJBs+60bX"); + a("7UB3TP73ElMlC238mw/+pcfgW2bZ49BF4TwcYtsq/qfv+GQtoHPaS+v9+i/jSYaBJAw4z+/pNEcQovRMRATE9srD9iIHYi9CQT"); + a("JUYdNfZJCElY3kUDyvGIFHsnsygag1fW7ky7Hv0Z6+ETqmeciISKtwfLrzN90W2skZh7LUP7fX9tXRpjb7QbZK8j5AgQ3hM04d"); + a("1w8HMd0HXzQJgOXv4w547HJ2joTAY/NJ3PoBs/WjeuuuJKE3B3faVSdyo3az0RW2IdvEkJPFkFViyAPN1ofZhjyAhtwVQ2pP3W"); + a("+4yN9JuF9SZXORTf98g7TTcbS//2N07Pd5n3JMMm/Fu266e0zcnfEe3639ie/eE++8Kb5bJO7WF3f7oqU5KhmXebIaGO7WDx7Y"); + a("ATr5qSUFnhoWPCWi2udlZM4txy9C5qoeuRTtwfvssYKeSuJ9etlaR0Zg+GF2vndGwRFO34Dz47vmwO8qkyIbyuo+BfyRRnU6wh"); + a("0+8kWmbiZMx3N2MAK4gmuAjRrVy0Mc+PYB32Ga3M6AGz88BWQJsXEOxHaoJBmll62FZLD98BARXkVXsx7Dnqsmu+8W0El37paP"); + a("sl9oD8KMXb96K0h4D0j4MFyYp+HCoHY1Oi/In7kIDXChdhOyayENB1KoVLFlgnbkvQbGiwnjS7dhesPDAOXghbiQ8szhs3Qqvj"); + a("uuTpU7LgEZC3FXFlQrk25KrHN1pQ9HNFAfGz/e11T9R6YWMnosvaQr6AJQlnKGXAIzZzuu9UvpBVvfgLPpFF0l9sf8juFxEfzx"); + a("4ZSN+O5NXPbRMEFVCoIkhVRCH3jRNZSA/GaGF3W3RLFHqfK6kGBlaiE7NLgh4hsbpHXQHLvZ15gsBsngU6bjQ4VcPqLDQcCIW6"); + a("szCxhIja9lffGgoUBkSHuS+WLq1fAiMPsmKskRCM8khAG8gCqRCu4h/dtYkYJL1zqJGqC/D57bBKqJQsaVC55W3EexACJCjRw/"); + a("Jg3XsnlnubeHZIbWA/ocepRpbBkhB3l7bREKWpHjbFuGdhkqzIGZwvajgTJUrD4P7+xDXWQxjPia8VH7lj6pddOg/6S+1g21GX"); + a("fbmeGsrUiuDKJdMSn7gK0zCO2pVj4QfQSOJhnFGlbND8anuQjzNzbG+IInqL51W1gQTwGulcxYRIDI8cZvxotMSw9a8qagBhgP"); + a("ATIeMMAF0VtHB+Bgq4gmROdL7hWspjhYzU97BzE52I1ahzDgNB/OxDjQV6r6qIqBOLFtoq6bBHOBnRKgZ7+r9XDCWrCeS4QJmq"); + a("cba0n2mlhPFM0C0MfW9WQgcZmA9UNNpQnMBKwl1pfqfTk0s5PRgRg8lsO3dJpbsLANdqCA1g96QYVeUKEXVOgFFXpBhV5ANe86"); + a("ziMv0urvZHbwvjhu66k5ErhCO3pLY8dxxC/hP0+g7QsWaBH6aM/xJ4ciuUgU5lQbn2G160/xRUbqWgE9TL1auFe0XFtwh8GJy4"); + a("gTv96C66MM1Zk9P1eOYdh/ltKQQKHKwwkjZOGItwJiFzcFjXQE/x6vK6KQpOpBowSDWM8KIpywxuwc+xlWIgaOgm0dLaclohI9"); + a("QEwfeAoxC8t0S0qKzAJsHCIg3qBfrKL+oh4/wxKJFUZCfwKZ6JSoykW8KaWVtr6deVxCUy+g/Mh6WCZ66gygO+f3R+t6bDW504"); + a("mEUf/nxXPMWzyfeU7CmKCDfl7MhvMxOuxsFkXyAP37uOrhM5uQlorvjU8FYu4dF02GzkaIJaTKPsW1FPEn+CckP/MqAxBXOlCO"); + a("U3IX+7DXBNWAL6RKtNdgL+vifA5ezZSij3Tb49FqqQgPTd8qkwwQWXByLCfjLeSf9tcLma8nIWI/U4qM0yOmB2IBxPz3l9X9Gg"); + a("jKdO3d8aJgD4ztV90nI/CAU7o7BV6j1dLPPyxwoeQWH++GIdvoLoEMe/T79MHu3Eb/yrblVDfFMSNrhMbJv9r8XK5n0L6rMPPH"); + a("2eO/Qyea/95HUD2/MoTlqg+oHtT3n5J+M83zwEmD2DBhoahBTy7N77xeUdo1TjxHMNhTktwq4F974QfMi5f6eFvf24fVpC8nC7"); + a("0VvQvnKhFcskdW/zE+PXQqo9hg4LdPBj9Bu4SFbkpNs6ckOgl3Aq9G4Kt/ZFWLz0H4sRL4oergwrfXhefNqDt3IpnlvBoXaMEB"); + a("D7TD+7ryerTgAF9Q3WKomXyVkIpPndH2cIQSjxYhWtskQY/GuqHB5Tct+hv0hWpGEL9I26hHEBYIecRg8V19yVrSDWQJFFFE0f"); + a("tiQxEZof41OI+tgDMxiSIFPJGZhSgz9F7RzDG4P4KxVPZzTiiakNotIoYdcCrdZvvesdowQVBxn/sNc1+8V5UJ2vELGW3vjbZv"); + a("ZJPKq0pukNBFD8MbdBaSl0ex46/wBx27q81KvezxxnlMbzl2cEWlmsOfSdXJvfNQm/BX1dbJIeQj1lPibQUBNZ/aTE3mAxxdoO"); + a("3UkxHZAfXr3mC+oW3zhB5iFLyrrinLj26u3wfVM/JhoEJuCEQlguzBmJbuS/oT2DoXKR2tNB9FnW5SvAeM6b3iEgzLPVhE9S0h"); + a("0Z6p4miwroB9fjC757F5Lj4TLMdurKjEr70E8e17afgbuQVN+x7hz2Des2jeGwbgtETW55nPrqhGIyJEsggE0O9V8YMvGRAZ9m"); + a("cyhC10wAmjfKH1noYFCT6stBNkjkBOFcgZZGkIE11eGpsuRwBOppcMJGiUDHX+ou1a4KKssvgMMDoIOOODQtMaFQ1MDCoNQmpG"); + a("wQaFwtXssWvauo6WbRrMoG2K4mAxflJTmWuvrX202267ZZkJPQVKqLby0cOsLSWrD2czMsO3s/9z7jffnRlG2Mdv/RVzz73nnv"); + a("s6332ce+45G6h32CwcIsM7KFIf+OJAjlOpsjtJbwPn3Y6+ROE46zulEAFRtlOWjT01nfvflscdxZgf5xmHrV0C9owJisGBY9Yo"); + a("gGZUhez/o7OVRAdeSvXDypGAGOAgR/xGIzGnvJ+Q56sWiH3E08QMFlHsZK6HYR7a8SqTbZjqx5LPjFL8sdTUIJKgC+jPDRzl06"); + a("LS2n8txpIbYMRX17t9NXeMgNEmiipnPuc4LE/G7RwNTqOeUEqgPYrvIVDmVGYiPT4sXU8EkUA25e+abRDT7YJOdQJbwWJN9DVE"); + a("bP1ovnZJ2TEWTjbWnuaTM7r3PMcLxsAMTQlpJPP1m8U+TVGY7RM4at8Aal+HUmSDyZFyHPPPC7xfVLPffS6i0I+0s47HztriVP"); + a("Bfb7HVQt0g8+yqktNd/ZBHq8es6HoM6a4eFxV7lxuYu4sMIQ4jGymR1UsOr153dZPyk5lnkq/EXq9XRqzXZcVKrxKshHjPsmyG"); + a("tqYYxHq9cGtGad0vesEKxYR0rjeEdbLe50VEmxH9FvXJJydpyDw5fqzlK7Z0s0a6k3jHY1m9BGXGXtZj17/mjPW/Lnb9aYVL01"); + a("a4tLAWDItMkG34ETsypIs2bPp32lBxxjZEjlfejgiHTFgaI9+bSe1yPosoZlYWV1+APimHNIXVX+BZja4zjjKi/L/wELgTIMk3"); + a("1cfZDSt15uB0clKiXrRe8kys/ThrjXz7IOzZbMMkfh7AZPU0QDLd0i+k+cQ78jnoH19HLA2Gnvf3LZPMhNYyKZl+hLRWhZS3h3"); + a("1/1/0FzqjqF+tkk6LSvUvNGGYhBFuQKl31iP6afJhKxA0zqeZwvSLSIQ0thNBTczT055fjQ46G/ogg2EGWqeMPlPh3SPxKxgcz"); + a("FezKJCW2kYSC3YfTVqjYh4hDvTmYugWJDZ/wfnMAqgr0wgyge5JF5O6BOMfAcljKFYhVbxkgWyP7WzHd/5ZegyMv6TU4jKBTSU"); + a("P3ghrrro1G/sC13jvTDB4Tlkiwdidyz5C5G2TuFzn3dMzwVrA9VJuScTSxqS1w2q3Zn5gwiGSWpvvOjxPdH8kXsn8Ot+r0r5f0"); + a("ZxL9FkYEznaJM1LiDJc4stkx5Ml0h//599EMwekkVEujtp++N2Y6OzwqmJPBirV0RE69BuHI82RXfHsY/rh/A98Whp/aLb6j/m"); + a("QQ/1Jfb4g3xOLvYOrm6JSo9Loe0mf1kL68h/R5XdJjv3feJe9vusqv6e5GXtwQ/jN7dOX0YKqxQXsG/JS4RpGqvDH615LR+IPl"); + a("hlbu3CfqZeW0dHoNQ4n4AcIKiRBqb33s9sTOf2WX/Ju39DAePaQv7yF9dQ/pv+whfSTSD1lukEetqHRTD/l/fLH79He7pEfLFz"); + a("CeI+Ngoz9eShei0velc7pRpjP9abgHcBjFxrQ5Ap5rN5P8RZ6ra8m7Cs7hfJJaY5iQaFmVjDlvTJ9K2xijOwP/Z+P/GfjfOibO"); + a("nTvG5DaPibesVlEOW8pr/5rXgtfTKLxH2zeDrlpJHAipwrawuHIt7nmO42MlBLaoHHnnGQjZ8WUG9yDIQYWp8hedxpC+UByScX"); + a("iaaEZuvs2wPNhr5eWQFC0g/VXSBJlNAaiA9Kc/Q+lPBv25OFDsp3sPyMIpT4D1sRleauaI0aiHgK0MD9bhNIb7ABavaukRU5e9"); + a("eWz/YM66KWjURDRqAizDzR/i9LbYHN6TxmXpMLDpJ/sLdKVFtwm8ibViCQhuB5IV1gJWRG1mo8bTntwcud+LKtHYCNEbaQu5C0"); + a("nX9SEYw0OfkUwAVz/0tBAii2WZxUKwrb0v5HuKo/BTs42qhF0616c07/CK/XKjFlt/cwaYJo6Y5mUDM835Y3Da+hPCYBiE3Vfg"); + a("/wFgnEvBOEnEOA+I85cm6OVtagn8oWgHehufDwC0L5R6K+CRyWgc9DcgpIEWN/NIL41HyiSPkLAGtGaF05qDVY6uDfkMQUzgTk"); + a("U0xQStPLbAST4WqQYq9ZVl8/ibSHRfguaUURMPA0/7Lm4luBUwmjlnjEkLx+Os+bFoA+uXvYA2tUh4wS7AWyTsfBfwnwSMNtwR"); + a("3obk00hTRNp//M2Al4WIn3d3yaBHUSw/Rzn9wsu5BLdwgVGiT65TER7MYU5Xe7chIlHo0x0J6cp1ww+9RYddzDyADvpOdNh0/L"); + a("+Q4F2iw2ZTh70sOuz89p3avJCkHt2ENjeH9dffAW8SMKUv3Qn497H76zO6R7v7v+afrHBatpOSfy7lScKdrTEQ3yUEhov6bthH"); + a("jghFuOQbhDXeMhyRvBXjPC9lHCGPVOKxxPVQvxTixRW9V7KC/FjtKTTe47a8KeRJ/M7Xp+K7fYOnEpzJbqKnozDTsj/KqJ3812"); + a("P5cVT+J8f+u/Ib//fy47n9/2X5t5/6N8r3pTy8Md6QQ07boNhxD8LOua2FSuGak+RhpP3cwpzGm9+a5+t9KzmKMLbiBZUvYU3B"); + a("InTMsr+3mN6Gl7DFCEui9aHzNJlC3Q6pTD5IKiX3JfiawE5jARQpCX7f2942uHXaU932xUbzQ3D3RgsWuasKrnAkwqWJWpjThH"); + a("ogx8lnoXN88braS3qhro2ICFCEb2BtQZsBddhQTz/h5b2DdL281wD8Z+Wt1cpzY/C4vDtD5d0WR+UpqbdQASk2bC592717yTnV"); + a("SCJavY9pthHNxB072nNaLzYt2gwk04/Y7bWYHj9PnHBi7m+UoTVI9pqW469RMS3ZEG/IN+UMjTN4zNUnbkfG8hFKyk2IVUsw/x"); + a("1JnYmgYirbQOT7AO1lGgR/9Qn80PuIJUDK+bTFdAGRE/0DB2p1pmefQbaBG3zbG9WknO2+psa23tVtK2eOeSynybejcZ+F2rDt"); + a("u5wdvtZGtX9Oq9xHxTqfs7093zb1MvpphDMcm7NeN8E5rNGZ+D2dyVPo7PKQ88gJCPRJWAIwYgrAusyPUXqXKMZiBfoVEk4sVU"); + a("hMCraOA2pM/RXF9NlL+pnv9j/rZ77bEHRV5+K4dJ5li9W3i1/FqNkrQneymIymm7hfIi9kpT6LenEtkJWhP3sa9JV8Vte9IKfT"); + a("L/QYOlhw7Z0Qz+cxhoLQc/RVmPEaYQnrMXgLDIPYcXYw9WhanLSZE2v/u810GCjGbaZ/0I+6VErnNP5ARXb9BQ+QMlH+QjMqsJ"); + a("vP/o1tqMQyKwRSVhmFeztrmp9f8yzZETWE8jz9hwa93449pPdbJ4LVS83PY7H2jARWVYOu07ULSVKn611A6uIJfOy+XpI6d71O"); + a("6pz1ktQoYF0sSR19MJzUIUDqSJDyAytF0lr1hE5rxRORtL6p12n9DEmS1kxA6if5glZjvU5r2+91Ws0IhtN6RNJ6AkmS1sOA1D"); + a("rQijhnT2dzDrvxgQUKcD/I7ZflHPyjXk4AQWY7jN2fzoojIcej+KF/GCva4RbcS7Dn1ZUF488mThlO7Ze16a/VpjmQ6awbmgwo"); + a("YANGYIte2pzH9dJmIQhUEJ1CRC01r3A5n2MCO3BlHEKHoKi3Es+46AFsLlBETJWdd5wf6yizCqjCqb2AIe5k1q7VHURSekGBMN"); + a("U1bwKTB+qnqRpqMHU7coXh9tNw84DLr2xNzwIXWRaAy9Xfx3HR6yYjip9Etwk0tQ9+8fZkOlYv9TRmYbSpE32JNi2mCw7THgDa"); + a("ZdIUvkwK2RkH5feQhtsjYUkvAxGvigg25jctldv2Fy2qJaHJIOZG3CPhrWHKfUhQxwAJQ1WNMP3De/PB2lVRBhnbOIM8/Wuq7L"); + a("RpwIx5PvalPHg/aG+X33Us+e07oscHK+hxCqEz0EGT0EHiJq76ri4iXDlfhbYO6K3rUomb+rLZgEMkCHEiwuUb6hhIXT1uNP8U"); + a("fElDrJge3ayz0/eSeYmP+YBgBRUxmhfP4L6CFPHYAAwfPbboMqfp5wVt91si3G0hRE3LUC1spZDiFMRhrC8Pyt1zjPkdi8yyO+"); + a("Sczf5g5YQdiQ/funOoYlM5A3uuO6p5hzuqrudXLxRpugBIQuHJtBf9gvZkUrYZpyPtBse2p8IedDqghKj6QX93S9F+g67uZVat"); + a("Y6H8XvRB+1KOY3d1u1EFlRX0BlAVvMtV8LFIp/i6D0A2mPrrAfThrAbA0iv09od5hIKan8wNqdMU+b1F+42ob3H/OINyzX7n3C"); + a("YnvPv2Wrn8A4Mno/o4rfQrbFxuftHuyrPUYVhHEOyoTGq/DaWo/cjmSXQbEYrtbwSMdB6qhTuMYOrZA4TP+u+W6EpNu4gjLdGd"); + a("Fq0PiqedK3HheQ3N/5v0mS33N+HKxBcBAp/PncTKxJ+hvcA2Sew+SJezcgIgteVSejkBtM+f19G+fCyc6D8AQXURBBVB8AWJ2Y"); + a("A0SXATILXyUka6VyKtiyB3DyCaJydyHXMFyZsktisCew4X3gHMvgLzUok5IQJzvKB7t6C7V9QiUWL3jcA2E/bcFmDOvIwxv3hO"); + a("x9z/aDjm54BA9wpBt1bQfU5iv4h02QUbAakPjGektRLpvgiSiiC5384kxwmSN0rsuREkZxFJO0g2fEmM0hn9DrurfE8dvohl8D"); + a("RqO9WRAOTeJSb+odvC8E094mP/GUwdz3NffAhTyh+zkNCt/LOH9K8GdJ/+YQ/pr/aQvryH9HlnSr82tF9/34n191l9sl/3N32y"); + a("vw9BZ93GreL6xamQ7q89je3WzbQ1mBD9g/NJbdM+m8jH7l+cRyT5cZL8RUTeJKhDF3sKqP8E1OEU02lTytJ805OVMptvulWxW3"); + a("3xLZMSiKp+yzdQ/KSJnyHixyZ+0uknetCh92ODt4FbRZIjlwSK1W17YYmVDhjevXuLja3QgC1RijPYhWc77DYmv+XyC5FQv2IY"); + a("AVWmmfGGw1rqm2LleKseb0W8GfHmAI4nTtgYS4QYsjhva0VjbPvrtPtZGKR5v4qIhPeub2JaIAmSE4S8wrdtVZqOkgYUK1C4/C"); + a("qbYVmi9+l1QDICJm1O6Iq0wdbVA9sRpx4ItzkRXj401/hV5l6jO8V7l5/yO70jTgcmKAzkm/amxBkqrAIH1npNhr5xhsoU7Mao"); + a("3hfTw9l+LBuaZIayoUZBltTlPrUVfcVtIJv8E9MwzFBUK7NxH9r0eBsNP+LTAhY+sHBnrHqKWmLvuj8Cz0zLoDENeoaL8fRRHi"); + a("dEV/sSPBbQFuG9sDgY+DLiPQLuwp97QrM8MsyvtepvYjRwd4l2HQkkIX9lWqDN5c8ha1QxpigSFkPLkzin1NdIznW8xzLKF5TU"); + a("DQRPNBd7v0zwmK+qGwILrUl+LaI08Z1S3w3I1b9EYxf07znsWhe0SEHbRM0tbpnIjMxK9lPSeLuVCKDEN81GOuVggO3NsC7X3f"); + a("04lGfE+IqL6tc7WfaiRaNPSPlgJsJtCaRxOtWaAHOTxg66kWUOQhnMdv0l29nAdjbQIL7T+dGms6wF9MygHxozyQ4R80H2p+g3"); + a("qkOC51wttJcFtMpECsd5zMxfm4z+WvkgO1q+8Bzv9iZRBrNnBNiUDhyZ21C6oGHVxrSdt2Y/SDuKVJ/Y+nzMF6VQECOr//D4dj"); + a("k53RBzhdKbexJy8fNPwwSEGeI23G/7Lg+UFcOTrDlQ7GIcmkHg4ykvsCSnNO9g+ZhS34WEmch3GL5eAQ4U0yNl7zP8wdDDnPlk"); + a("XD4F/HGSKJOZA7/ObVEKkrH1UXGmAifgAVEuGxdy4HRnhTmS4pY3xJvnbxWv+KRT+sQZys/m4wMsDmjKakfRQai0n9wMrT4iHk"); + a("n9gnf49RsB4d0PQvUcSvHWEyGolr7PeClj/oSF/E/9OJyNPOojZg6nU/i8RBy8Cp5CkHVROSEJUFj56p2icDZ0t4h9l8zKgFoT"); + a("zYeQV0bOh9BzQsi0ACSAkiZQouZDxfsEUwGm92UKGtxJWmSJb4EVLlKsBg4/TVF+1Ohmqmo6msDtv8IoX97nOk3sdwza1ro5rk"); + a("43nIwqpCCozjkiq07aniiG4hmx/TbdaUi+aYs5zrAEHJryDAJqpp7NXYJV8WHEcRZ/oCCUYT1lGI4MdZThaKee4RxkuCOUIZAi"); + a("bgp3i3RU3zNGxGzTc3gGryzY8msMgLs3bOA+hsY1vEN1f+EQMNDVof7oqd+ov3gAvbxSs8jfiLHRluz8PpXgbIIxBtwKUDKw/i"); + a("EtQijFZmDyncWNX5sYoSSzA4ZJKzUdmnTUx1Gfi+DUugkZ4H7ha0XqZUGFz/u2kdTj6cFp4tsoqZSmqhlE6RBMa5b3u6ouObvE"); + a("58Tn5UB9WwOwP5D8A0WUku0viqU5YMIPXi8vltUv008tczNbmKx+GcOHfwm86omxNOKH9Yo4j4HDgeupPUH8K65bnou6iu7wHs"); + a("ilWRPVxM0RPc/QFqjrzDQRVTfRfIhWcUfwIxJnGl9ImRlw2FC3OBCTt4g93wdgrGmeajxoAl98/6S+2f5Ikw210A6rYDugEiX9"); + a("CFn2GMnKdfCqV+r7qjjzTXxGeKdwdbG31GD0PssTEtp3BU1K/cUDl/6Co2qEMdr25awjJ2Q4hHXrCb58QLlsBfum0rpb01vh9s"); + a("JmSTOQxWtzMZDRAQlHnHWikxIsaXGsGxUaYTT47nCmShNMlebMn2KuBA9SBOtVwuGRjWSbPd6XhOZGLNrVJ+jbrUxbWfDcOpqG"); + a("Vp+DT0Cw3HNszk0xNfxB77ff/E702zbqt3EbANECsgF7TiwETuUuGkL2IxUYH3rnlH+ddclw6lmqqbU4f0a6taI/eoQS3IP8DX"); + a("2EDIkmMTgg4xfBq99a0kqLwjk4mwh7+6OOh3pR85+JN/BQJNS0CS1QAgxffimaFl8RLRff/oiI2jOB88h8y0yacrwl6Vbc263n"); + a("vjZOTGMrIE50s9NcSSsvETFLBhSdK+3f0wNl02tG/lBOQ0JnWDIYd4XnO0fS5hldRj114ynmkgAu8U+3ViQh/VJe2jkV98ucGr"); + a("4MR+1X6lI+IwnttUnEDTMzWGh9P61BxAEiZhWDOJcT4m1AlLQizhtA8RNKElA04Tdo1QtaaQSCFoFAnE+Iw5O6nhai9ovx9OHo"); + a("u4wMkvtXf8PNz2uFwRfvbcSeR4FkYrcYLZPE1OqbbhbmV7Drc/qGNDozG3YjnrdQK87nn+VJgieHwiE62zGbcRhMlqTZ/v4YHd"); + a("d1+xnbvp9Shd3PN9iu32h29yVKB3iBPRn4KZ8NvDdZT/GrQpOYjhzadISKTdP3mACm2GiuNKtrO/kUrW3SkmGzJtnTWx2F2iE9"); + a("82VqR0zrLLHrV1dB5s8xNZC+oBnfVOAa/jZM436rf4ODHw+fuwYCwvxA5VA2pRdqQfqiddNVmn5OcePeYCvpBJcK+Mz1kfwWGC"); + a("bk85uIoTCc4AcvB0Wfx4MSVkKxAfpEZzKZX08027M7A6PQDnDSUBI/bTALSbUfEwXiEinuDcTZXzTaa6X+4pnqw0wpTn71sj4D"); + a("RH3qo+oj+V1Lw1kGZT5IUiurVo8Noh7VFDfBHEs/CuzJ9pIS/erU07EtIcnzDoawCQsdzKHytw0bR81iEkDQHPv8r24WVv9oiA"); + a("dRlTZTlXRruS0uPpd0KbPLfheWIoqy9wt196Wox1Hek1+KgFaD6uM0M1nuTjMCqJtyPh/98hotd5OKBRT+24OkSHOc52TCtiK6"); + a("Igk0278Wcfzt1GEurLsOluu/ROYTSwbAXBUCuyv6EIVXNb0LU/VvdHGG61FdnAE5F82GVMeSusVqcX6l2bLax3lgmqwEH+SxQ6"); + a("xMnVKsHcPA6qCX90UF7nHuEnKQ4yWZB6JXQmdoJcQ+EbWq6Ie5ncj9ik358xsCkb0k8zuncWlE3kQ9L1pQWBtDpTy2fJb44lxp"); + a("fZcUNi6AOCGkkLRCmsFCRXawsaZ4fhqnvTm8nF9beG6gjE2nuJ5wcWuLQ6cPDBmKdNqced9XmEEhEE8zVN77TsuVx1QvU9tGHW"); + a("wRjyNw1aA+dhPmR4Dsj4vfpiqRlvUFv7mqCxofpjpWjQDj1yKoxpswBNWmvyBspC+1giLHmrSx3PyoPv88jAS+V6PhHLoOkOb/"); + a("RKUJeggMJwL/w5NGRHs3REqYZPktJgeXD9QbJOkrIkjnRZFunMukfyVJ03qIO3wd43FgyOKkfAXN3fkQFbeiDCW3IMhN9COgvh"); + a("PPtfjgESnffihCvg0IPjzULw/yVVpF0Chk+gsR0O0RNnfhD1i67HccjpEL3gFvjDAaEPo7QoMQov6cJ4ub8lB4owsBobojuLpV"); + a("Q1GBA6S2MC9eTFWzsBGi36/w6yft8YzQPkupModm/xRtStwIa+sB3HCPOu30naZ3VXs0xmzBaZf/UVH1GyjOck8V91aqgsMQZf"); + a("7hW52/Lib9+g0UPTkNXWBGkN9Bm4KMu9iKfhBHIUCmA4iEb5zqrNnAM1IJM0UJ65rRmiHUmo/B4OSXGnAywfMBg4Zk1Jjybfh8"); + a("VwtO8Sj8zccntmDqkwj41bN3IOlQFg9k0sP6rPNErT7rPFYrbpO5abl2+m2m+4+HdOQHJLK/lpqVpmbfiMIY70WJt1DiLSC8C9"); + a("KQvl6m58v0XEEH7wvQSKZzm8QbUanj2RD0pXWZ2iX/osXNoMV89zICdJf0gOiJT09q/LgLAYr/6Rf8lSTIkho88j0BguLYhaxL"); + a("USvWr1i8IVJfG65V8d+OFpxiRBXo2SZdRb6ENZpuL3qHPuvcZv3+EF5ES5RrclnUQs89g6m3gxHk7VakvN3z6x70qXtIn9dD+q"); + a("we0ot6SM/qIT21h/RT62OmR9gT3mTEIExar41rPgK1zX58FunY1o0E1DBCXB0AK5WxkoKpKYyFca7dLb+WGOU/ub4Hffge0j09"); + a("pM/qIb2oh/SsHtJTe0g/9WD36V/1kP7ugz3py7P/dV7Slel4InQJMsDHbjIv5wdi2IdWht5xF7TD8qHotGxwTif0KUj0W9gMka"); + a("WZ7dPnHVlxoIsdbpkfJY4Vdo4UM+q3jndJgCBmM5MNyLmTzNoevuH6YFCvyvsRBCPq0776jPW568z1kfMtP4EpWUfyS96NDt1I"); + a("4aePyjVWvKdTUrYgwWc2pj6L39j2xdXDZcEgT4FTjxoN1blE25PU0AYM9Y4vhJwhBymo20tloYXHM15J/RlINtgJreknenwfkd"); + a("EuprpjRygfbacWAQV9iCn+wbKY1nil/tYbR/RqDFHPJtJK6kbE+eKwKF3L9qdPS38RXfW/avT8bitAD9dB/Xwa8vD6DrjFQMmS"); + a("QJS+ibrvatL/A3KuyNwIGCNNDRymvnGa2zZUJP1RJDWQ/EltpxHAfvI5RJJaYkK+HES9fvs79fqNof1YJ9O5EVlYtkSPtaqnaf"); + a("IdToOUJXtaLP0awFuFdyftnTEYkRYDBKwUyKb17359tZm6SF9tnAiSaaYkEpFlqznMORic2jZNKZriM9Q/z9SKtaP+PfuDkU6d"); + a("3i1U5mHR8eSqo9BbLaZXOozc5Q1p7E+CSvHlsp+bReLbudbaUnRSjGLRSW5EoQ8dh2v5VGSDsWmq3WXMf804gCexPdl9zFNK0U"); + a("mHr5dvdw/uTri/eHQnobWk344e72J/BkvoQJRyxvdnw95SE3pIP3x1t+niEesXV/PxordaWRoM0htamSOa3iVXdUMPp5x42GQB"); + a("2mOy2Mj867qvj1rTXbo6uTQqtau/QU13qKVot8GqqwftheYQlIlaiv4prDPXle6GPuYPRoOjvhciwNOPlqDlvdRrWqTuzhnkoW"); + a("zrufo0Twkp6v6rmAtw8g2kOnwd2TsbDAlgqn+IaJwSxd1QMPXpe+MN9Na8DyD4d4v2MRPln+O3PdpTjDKniPuUXHXJVcKWPOuj"); + a("8X0dvVHNRskG92BEMu2f/05oPwHjfNbqE4/37uxiA7Gb94JVq/6r+n1cyvU7B1XBWYwpzfitXps8rb4r76H69hGNqEFkT/WT/P"); + a("FibP6Q7697SF//P6a7Snt47x/mM7SwlvzNNbARuap/8D1ThNVw8pEKH04BC6LIwuXIzCpytL3Pbg46YLEByvUkg3Ec2W03d1oe"); + a("bKpuI/DIHmKvFSUsFaJLPZ816mVXV32SJHX2FHFaPPsf4ZNQ7PexWB2yS2QrY6XbZHr0+q49nk+CCa9fTeWn/MOz6FzqHpC1in"); + a("7SskgS6R4UOB98+VocG7Hy53QGbCwwhx2L1/ipxntOTJqwEJUoYODGfM+M7gOf5ezEPHrrVFmnsPEq7n48Z07tPn1U9+kvsfOV"); + a("+6ZIpKj8lV2SosYH7xmUeIJZr1kE2b4mu7EyrUcMoGePMeQX0D4BrRHQDwKqEZDpOENVAvq1SFspoEEi7RYBXSCgWwVUICCXgK"); + a("4W0BwB3SSgGwQ0/QRDMwT0lYCuEtC1JxlyCuhmAU0U0J0CmiCgOgGNF9DjAsoW0HM/MjRaQLs6GUoX0GaRdq6Azj7CUJqA7hBU"); + a("+gvohICSBTT0FEO9BHShgAwCcgjo+BqGfi+gwwLaLKCDAmoRkCqgTwTUJqCAgD4T0CkBfcRQyuuQTqh9DoFXir7Xtr+3+vSd0j"); + a("CXvlM6F0EIHGajlci2HQ8f1IrJfLFAuJCvpv6d4r7gOFMuaIQ+Z2wnSXmowL2GDwwNvcSZkRTNJD+GbOe+fgfqs2ay5M0u/vke"); + a("6eG9+NuR78UPAj/cOO+NVEDmZOmB9jHdA602uWv12UnoqRcSep+I+nC68PmhdhTJlCh9caSYt2K2lMmx37+vi9ke6CM/Ifw7qv"); + a("yzuYN/3tMbpxYVspd6IiKUxw//msS62O1Suu70USkSjvd4Kqruz88DWgstr8PnegNtU9RSVBRyZniEFO/rQaUEmZgm1JdJs0S9"); + a("HpWE9jKFdbtnD16rLY9jeHkU9VS4njHs/aLnBwaM0C8+1Z2/mO1ifaKFofM6cdQIiXgcvpPwGW1ZW8nWroP4J94VD4Brd5eSMN"); + a("EFN5sVM0ZS1Sy/N2V8YzRUTLbXdHrGCSN7nix2SLGjTWjgt35IDbpS81kgnnwmTJV+EzS6LQkTf2agR8oPYJ4/0521Mz+l/Wsj"); + a("VKwQ6KBAIgJHEJAmns6g39oU5M2veHeqzpjEtrGS1YUT6bmV+gGOfGd+n9UKAoW+bXr/lJD6PbaBbJ9vIlPqpw4TlNaAUvs1QM"); + a("p3p2dY7pmKEO2+2XnJ5w5eCy/L/lSdiwoUbMQesjw96zn8VA7KunA0oLNgSqoyJav3+wj3QXiJyb/J6CI5UIIPBEnbX4japP3F"); + a("1sh6qQtEjQaq9zqoRt5jv3Sb1R+m8R5Q5g9bH5E9XWRHwNEQJ7bKDmoPCBfwFvgs1SEqn6LmMln1t6AYbscw0j/jU9qT3Vz0W2"); + a("Ht+74OKAUZoU8wHUg4MhZsxIOhZcOy6Mc9Ee1clupV41aw/WUnvQYa6/KL9/Om4hp9ivy8XJ8iPy1nCa7L0H7MSFt9BU2y1x4n"); + a("jstVzwLjk37ufiOpJ2NvAPH779ogfB5pheAdulIz1qTeD7h2e3qHOxnm8G2QSx8H45qFSf3AJchwO2fIRoZsTuBdyjlIuI4T7E"); + a("iwGzx9ChVTC8rhvYl3b/yyAuojtgdGf0YEssjGznNo5ktsReBcF8HPa7A90JfhTRq8lfrJSrJsUZypXtyKoFGu6jzSx1gIWJlq"); + a("rj5GJC1rTwKsbqewm/QlLGsDiECgajD+uEe2f8bZUzZ/ST2R1P4uT9USflWDnxSwqBm1JfT+GaxhTxNTHE6gYs5z0kCHz320sy"); + a("NOIfazc2VVt50vt6q/NhjpjlXztTIIulqDUZSbx3klRkkr0a8hJALhGLrXM0DdeTlzWf7VjER8UpKPMXaniAJ2QcYfmieuE7NE"); + a("l/1u8ASzwVNtzAbd67MXsmWp6dmU70+0Z5iLI86kDKemHh3KLOmz/Z1CZLOFsm0/IbLlT7K5R6Bcf7W0n7NY2s9ZzIw7DySjaE"); + a("feb9NHQuO6bEwW/QiesuIjcQ+g/TF9TbBl+JrRit8c/Brxm0nfyyBZ7DNS+PI0guJ7WS2KnL4UMxLmsKLst9TJaDBwXuclZ1IZ"); + a("KsZjXH0nM64nhfZfIs0eKAbQqQEo7emVeml2WVoBgvxg1DOYembycT4Q9kXKyyKrE2Mnd/IxxoMu8UDaoO65kgfxy708iBorsK"); + a("6IkfXrluFDAcFsWf9cxfQjsEPf4UC21xcY53e1eJcC2diH+qlOoTBEPQ9b4wziYXg2OBzfo46X0sVHm/Q/DdbVHZ6pqCG5FuOl"); + a("Wix5mx+kDr1zqbMOJgIa7GITBrqVoKu9f7MhyFzbzfn7dPm/ba8ndNB+Z5n0J4tPR+wa/hhlsSf2e4O9VfpQen6pD2U5gjyUun"); + a("0N5kyefW5ERBZ9v1W9wZien7j8YBmCPb1JGDLdzt91vmn8F0bMTwgUUMCCQCEFejFSmRxTfA78m0G/fDak+V9W6/Nb5fyPIPh5"); + a("Pu4WY38/vo/0ZWa4WGYm0TJzFi0z/YT9hGDEOrNvuV5OpSynAkHx3bDvCjxJjq6nS/Eui8cPu3fWfeo9kB8MIopsNbiUcaYbsE"); + a("V3+TYRIjc6FwUulgWaZIFxCIq31r1Fx8jvJGq8smX+Nxfq+ZsQFJ/eWcK+hVjSXsKwQF51Wm5zuo7/Mjn+kl75Qn3854nx18bY"); + a("PT00P6Qj8+9l5lyZedxC7r2bDQGSOq+QOAMlTj8EeSQDsBsi2EZWMbb/figX+iBuXUC6zjaoZQbyhcpaNsFwUTClLnkUfNSpv8"); + a("EqBPWOUuM/S4wLbYK2wLQyZibe3n1YnHdq2dau+Ul94kZaxYx32rrKVqLl98xwTGSpRrolcAX1v6TL5tznfuyoJ+5RH4BIIvO0"); + a("c24LXhXErJnv47wjqFd0/o+0/NOLabHpdBorbFLcH27fbKnTwHL9YJmca5sjxrvjV/pwrL5ZH45VN+vjfW/0934DIsRqdCG+Jc"); + a("9VLj+8dGOypHIfuCNOXKcXs+bVnSj+J9wuZ2CK0P+RxZ0lixuAoOAQ4qJZEufQAh3nuwWxvvXY73Wx/kkaz0gaTy/Qm7WODbuG"); + a("2vRzvU2XUptmuvyWF892zoWX+Kbl/eASwLcns4nUdfqjWdze3ny4QQz50dHa9uQdepmXyTIvRVC2rVrinCVxBsi2yXE803pw8N"); + a("bu/BVi3JdjaD0q7kc6urgqJP2MpfK92nz5Xm2+3jOjjaTfo1wZ6pvOUN9YalqElVvL6jYEXBGOD33NcKjf13cocw9dkBxgv78w"); + a("oHsP7T1Jm/apVTwVRvpCrBgfPj9+NYPmx/wtND+6L8ep+W6EdPcO891iTQvJCXqDZ+jYXAqK7KmQyt2J3Rd0qTgXqsaIny8AIo"); + a("YSyZuQDF7WxuvHJXpPrJFil7td4eO1Q+K4JM5clxwvWlp/Knze4ytF3yvoe2WeXGblfgFYYSxaKUknSdJmV2jmHu3X3v0fczTw"); + a("pkLz7/wMC3wPcSK+tODJsBfsgm9il9dLlvfIPL28DfN6Ku+9yPLujVme/P4Ka6mwhyr1wsbKwi6Yp3PZBtpaVmlrCAIbQ2vIbJ"); + a("nz8C/0nN8jKNaHnwMnX+JslzjvIihG7nKXH977qizz66YH6SP96XEe99DDq/wy67LeiA/OtPs5Tsyt9toJcJAx2Wbs5j6eOxMz"); + a("GvhqrAnSt9tZIpmPHQEqUPOD2DpXnxZfzgJq40GeVszeg3QOvN5P8k6BZmfTn8FU6h+Xj7cPgSJKfyyUHsfpfWU68XDwoLhXAa"); + a("JbIDppv9rgArLaf2ssv96+1pFB5BYStMa2PonbpbNl+pcjJSY9wXK+gW5PzlbB5NHp/284JN/8xW4jyzeTuso3Wd8Eyd3qE50p"); + a("XTEWmHAMt6wKAsjiYM0HPPWlWWqaObDIUrNGmwxrHgoFFmuBVaF58q67Qkm/DAXcIuCeT38u46ibQ2krOTDfne9VCyw1t1Dhvz"); + a("KS97klIXo0yDy/+etb8bfZ5a/PxjdKv29p8Nva78Va/EXab472+7GWnqHBuzX4E+13j/Zr1NKDvP5LZmF+8u4zYmcaxzQhXNoX"); + a("R9BFISiBoOwQZCbo4hBk1TG9e206jZY4Lu6M7wuhevYRyZB8b5XmBKtzJ5VN3kvPA+1QOEgLDMA94tEdJGJwBVM7EICgeVhnib"); + a("FT6UVuGlpg06vU8Yr008D+OeAFLKF47hsldWOaHNXLDZTqHuiAAvKUuoHZtIPp/bi4X0VcwlV1E7Jx/0SOO0jPqiT2O8Mu+te6"); + a("WZucTtzorLopnlOlCt0MCNrqE4wGticwNhhEtbduK4QHVge9v3di1bwfidiGCN9kpkJQwEMDOl2mqy3jMDfHjWXhf/52owEm+t"); + a("v7AJ3Wtz7S7iIcGlEvwG1ueYeDLVp+x2u3PTtY6jsM9XX4mXWs6TXBWJ4zxlaZCIt5/fjMZa8JurPgkJJkVY6VVcbh7kRE2S3r"); + a("WgLJRDfQy+VHsp/CRNfzEr1bA79T5X2HqPIfAuBivoYeTe0cthBTooxpap+h+QER5eZp5Q4KXKiVW4AER22RgeyvBUZ1KX8gl4"); + a("85T6KF1eMvjm1F+D4EiIXmBK2C447N5uLZL1RjWzyE40cQo07cyXKFAKdikBI6UDVpmuYMD8oi7JuyQQ6WgOYvti37GYeU62zz"); + a("62aavW1HGcSDbf51zkVAlH4Hlf4GxFd6AoYZG35OVlJuQDJF1CU3kq7/p9gniXOwQ9QUCR3OuezyWa3aEe5ZOEo+QPcLOIRuM3"); + a("3zrpGsoN2H/D6TsguaSEWHCRf2qBBFb6jatJkplf4s5gnpEZpuBvN+UN1yAfrR9P1tfIk1ZTGqP+4yFjGP9gdTnwcNEAziX/sB"); + a("1t+CjxatBPXbJ1HB9l1EvmDvFHwEML4+ki+wd/uKDre/ZGD638DFoNBlGvoBa7Fe8z4KFnVAj6g3xmMtnIg4lz9kexFIdkJy9w"); + a("VCCyPkAPaT/tcO1m1aNVroNl2vtoJoALIJb0EWmmBwTxNvT6oXoSG35nFDbKC3/b0QvSVMrxGwX/3pZu5/ddMefHN98afFtP+X"); + a("2tdsumyn0DBSig5ryiRS/tD+pNh1TycrUyPd6DuYWC0grZGqgfgoBiCmniBnJj+gw066AphTs5F2pIIvD/cuokxNkCypH+bQQX"); + a("Tc50hA+scifSvStyVYDU5o7yOGiHkuXFmQ9ncjy93qUh8HQlHOWxByvXrKSDPNa2Npj0D2wQmf65eJUkmUabl3WjBCR66rPW7K"); + a("UzUKdK/U6c4TdF2gC6r5hCHGB1CWgCLXWZACgY9YUFdmR/AdEXQi6A9ysAx5vy8XeaW8Fen1J3CndeKfLKp8IShEfTRdqwelUE"); + a("PXj+ZO6NfQCTz12gyeKjciDkn1nNS/4UdKmiCSnkScH2l/1dIOU5pNpD1EaXgP+Tbx5GrwMtu/WSjfB8yMeB8ASJ2M7GT/RiIl"); + a("TA9HOv0TIA0TSLdIpNenhiM1AEKrm46j1aZ/Mu7lEnfE1eG4QwEBdz3hfhJg3P4S9+Mrw3F3AALuLYT7N+C2/yiatO8WPcO2q8"); + a("IzbAVUgvuQd4yGl2hHq35zmEvYKDOYImoenMIZypBBiJ1eFBlWyAyFEVW6HBAyXKhnWC0yXCUzNE8Lz/AqIGQ4+HYowwyRYajM"); + a("MPya8AxDACHDu3qGEcggOTOW/s5WIW9yFfpIgYcuPnIJI+LWlyNCq3qRb59ly/vCgI47E5KnuSpOGjB5TPP4AwvZzWDV+K6ECn"); + a("23pmeErMaGE7kQRBDv8i1VhUKkXJKi9xv6NaULxxSusMvX4SoYbSgvcmWNhmzDlRX3Rnke/hoqL3BlxcP3AYXd5/HfQa4sz+Dy"); + a("c1xZiTBY4soad165hQ7qSxL9sCkdSGLf0MIvQ+xGv4f6FsJ/420Z1OoOnFXw/lztWEFN7qw6v9Dnpgb25gZGZChABiS4Wuzqxg"); + a("RxLykX3qj722VCeentlfiN8uU/LMJjv5IU0j/4/DqyX4he1OVGkl65Ru9X/wG9e4jeQ+H0uun/6tPtpzwm6sBeove677uLzg/v"); + a("u3VLRN+dd+a+MyKDP7rPZPsuqtTb1Uuxn3TuUKllI0TLEPUTRB0Ia9vz18ZjPsiQbYvq/zbPf0bv50Tvl7Hpwb5Af7qfHER/bP"); + a("jjGUFr7NWjWMsiQPKh6Vq4D8KXpnPYsqVZkoqWv2L+guBcySX99vE5n3qb2X4hokiAekkTaGr6+33J5Io6kFrj3cYmmz0H8r5Y"); + a("8Z7LT/o6J4S+zgxeYM87zdB2Af1WQG8L6EsBvSGgN0W+8dcwNF/TYxJQ3imGRgvoTgGlC+hbQWUUIHXaSGqlaY+DRBmmffjZmI"); + a("CAikD7KRfsbyKA9AP4kad8VsUrwzKYGveW0YCgHcGPibhid4Ly37EKdNHvXVnwQTPtdUYrpmXI5T0aVzEAI7YY8idhIvrrbLIy"); + a("3WI6DrEK/XPR+tfM69/L2vr3C7n+RaxEmwCpf/xKrH8SKaEkYv2bCqRqgXSLRLrQEY6UCUj9mUAqkkijneFI6YDUSwWSTSJ5Cs"); + a("ORFgFS+wPJ5cf+2g7gSVvU7N9V3wOvlPUPVX0T+KBGgrAMvCN1CHXO1xFL2+dXxJ4nZ6fjeWP7b7m/fNvXlCRkuOCoYqTF4Kjd"); + a("Wtua3uGobazBfnSMzd1vjNWdMibbPWyM353TTrIirDJbXSN7Q6egl8FhWdfUfi3T1OKTEZ/A8Xxms7y4dfXWY24c7uIwdg7L/U"); + a("2BC2iOXnnU4hnknAsHrYUJmZor2zR4tDLhJXVgMD27Ti3K3umH/8Gimp3uRO9xi2XtdOxC+JW11CmJtR7iVDTnOCtFscUfGMV+"); + a("hd3QNdyjPUqiq3+6s90NWB01GueOwvTJRsx+OZ3FLTjXauc+9CCpCKxNz+BLA+FOTr1reOipg7tEro91wtMdz3wE2DQgm4A0Dc"); + a("goUWqYGKnrK6AnztSFoAizCkhrJUQFuALN6RVRMCL1CkdAGaQwP+uDRqNh+VTMAfmPpm9Hcnki3FlZ7ilF7xTmHVwxEFMF7l7o"); + a("iEYS7fXPsY1wZWA6FJf01viSmxx0Hm0/m3L5VD8rlkGGpC9o0v4/68dCvWHtt5qSjZH1zJWplwhV/XXY0+qqNdld7p/LMN9Id2"); + a("185XzRMIp6Id3PfkMfTd+A3xJ01FMMHxdIWadZRYE64wlOX8v4jnr8Ed9+AwlYVM9QTdK7MSHylprirkPh1AJ9PQPpbM24SiN0"); + a("cUux3fnAJghw8VH6sPX4Vt1zdDHuJ9N0Me5HCGKshLUJfhBipd8MHJKHUCAbKTYK5LawVgo7IpJmYoShpC6NeWqI9rE7m2P4/8"); + a("Ry+kGp703oKJUolTayU0GmeAqVqmyEc5n5qi8nOpaahcI0Dxe5DY3nCwrImM9Hr7Kx4Fmv07R6NqQgnxzZbSnGIB8KphYjkkj6"); + a("2fuch2QZlpoHQQLlWcFNLF3Hbu8+rBoOiKw+Xd5LLcpClRuod9Upz7L6JD/i94H7Ksya3twkW6HvziGaMT906bDZepfeVaZ3qR"); + a("dBZn9SbzGdulHH+bnEmU04vjRqknEN/sRyNdpVPifVJrFd/RhdWOp7T7kywbvX5ZlTfQWJTj2DipW6o9SIJ4UCSGIR7IN5ybY6"); + a("OwI5hqajnOeM6jzQwft+O3/RCGRwv+MKFgcVB/BLfMdKyb7yuTiuFADmcmyWmpw4bvoo2Szlar1ZtQhqX34ZxoXdtKz+s5FzHJ"); + a("6l57i5SM/hQpDQ7UASNVSnniSNzSN7LMVNviZy6ZnLBB4VONBD+NaoGVy+/UvawNUwgogJYskBSquOchVQnApXh5lcaKstvYjQ"); + a("MOsJpMwvxcZ0GmT2oYK6ZILc5RWjISzXD20i1zltsgjv0iF4yH0Hs8c6jlEmDiG56LbVncvmsXV5aq2TO0f8GruWSPIpDUkZ2K"); + a("SVfklk6R6t9Mf2YdoSyHnbVvzF5Q/rqWOBUDdcqWEvArZL4R6jnU0HvlllLUPqQKisBGbgkxr9CkC3PVQd8tUWCgufbbJjZBgv"); + a("Jn942aj5cHuLZFAi+BqCWD9BErlh84SXtSiXpd36r91Y7HtfsyBnB7uzZgV7pi2huyS6ujdDkufwfVikuJwO8TVYVo8DWvu5LE"); + a("sDb+dCEpkQ8hFdNyGuMH+RuTwdf5MrzlWwYhvdJqzqlf3VjfcJL2obasD15PUcOAmWVTtEyGzx0uRHfj1rXkPAoX1zOLvwElvL"); + a("H96YI/zhJWsOdNtzjJQlrjKP1HDtJWDwW47pDF6o9C7G5hixDhR7uxqyQeJJJbF5YDbLl8keX/xkM1JAB1uSRkFJ+5jVR/hLF4"); + a("5qgN/1oy6Fr056/6dZG3x6MMvXqADqm8J8m2UV2e9hQV+JuLXTutW3i+8/eB8fux8Tyq+knqmA+1x829SNnvH5sxPK++XPNlck"); + a("i/GwebJR3nwHamt0+CY7Q931hIGmlWRqW3C7P6w+5Q8AI5fnxLIIRpHnmX/RdiXwURVnfDcX4dxFCARFCQoaBDF4JgZ1Q7K6kQ"); + a("2NAooWlTY1YuuBklWsIQmGaJY1uPWqtrXiVW3VitaD4pUETKJVDIgaATUq6ksXNaJCuLL9f9/Me/P2vc2GXvx+ZOfN+c3MN9/M"); + a("fPMdwOl3R/FoIfQGhco809nlq2dB7JXFV9vl7vqggd7g1PdXlu/d8lvV3yjYoyujugWCky406FfX2Qb9+hJBslRw/eF6viEqX5"); + a("PK9yqCwlLBjnlG+m9U+kpRD9nToPP1rVCHrDl91YvMG0MPv8pg/dhFxZQrifVbiyWpTZ2JEGzib/cRs3kYPrCGr8dV0AFZaxde"); + a("YrRB8EZE7/+3I/zHG/EnjxQiinbgz2tf4s9pzBlPna0A084yAPsCQeF8YgRgGN+IBrdcIvRRqvkmtQOQm0ccNb3hY9jWmfULMx"); + a("Pr+5zSZ7rir+MRlPFZG5OprHbL8qMS119ArlLQh+hoWzbpP9GaYNV36Cf9/X7SW/pJ/1PidODFHJBX7ZrPVDa7/arQ4e8QGoXw"); + a("5rEoWrfL5i892KN7yYdXahhpW58VGR4uxvZCusfLoTFFUSqT24+l2JnXW73erE8p4L0lmmi+lGNuJSnPjl3v7kas9uHNxFGuEz"); + a("of3h4IzHSn8FmypBscw8XvOHGWlHbPutDpLRc6HWwnG/yPr8mvilf4kfonfQLSuenaBT8YGHEQ7V+YsP0Rpva/0tD+Rf23/8H3"); + a("RvvKH6fS9o3nvzhhOgBnIULccNnddybCMrOejqufNcmsH++MhnscKiWu/JxqIpnrofd9Fl9Mskazg2q2BKQibebe4srLBnqk1O"); + a("6yXiTWVA5EgBzsVE3GUD++WQ31L3Ig4eG6gIeaBIlYwlfTloJWhblxbrmbZxIVh1BxzHwvEvpEj/PPK6uFWtEa/PiDjzbyz1Nt"); + a("/PN8O/+80iFO0jg6lHuD66FAtIs1KEdDybkncliYxZ9qfy18IM9QPpC9iF3aA+lwei/6DuDme3sCm0TciewAcLUYnn2+BtQQSv"); + a("KLCJzYaXNFV/LaA4Nkc8AjUuA9wut6cX1x2Xs4/qIGMb509r2bpIoiF5pw2AUc1giH765mHEaYnUUAhzWJwxoG9p1/qIE96kvg"); + a("8D3n6wP7tBzYCVCIC9V1sjCVGLWQGLWQGLWQGLWQGLWQGLUQj5oY+INf711VidZbmQnWG74ArP+c2+96u7xbrXeTfjSQeinrSE"); + a("Mer8dw4GBDvSlo9bhNqtUucOS1u+ZYUS+pm8+uwR5oBNPuobDQzZICWAtoMYQWQ2gxhBYtwt6J5QVhT0HBiGuapNOQkSou24xX"); + a("SDTsndSpN5lOh+bg617nDghGVKSCV1L9HkLcF6dpBF8hitU229qXU76lvljF5mA7QQFtk38MlXRqK29MoI9e0k1rhSwBFJCynQ"); + a("HDQCwLmBzXloWpO95OXktc3Zl/5xiNBfnu4Oc4fCgQzPLkbRgZ40mAeBPSG/g6JlGEQJq4DO8sous52zPEd3z77rBjrl23gDiv"); + a("UdgRbFTyuab0mxOkA5qyTWxm0mEhrH3Ru9BMtojyNiqFEtxxmKYtbWqaNkwDyo0/zzpNt38tZA8UqnUoghcfvxT8Oy+1i1gp+F"); + a("ZhvjoxX5ofS7C8CJMHmgXx2xGYgk5MENKaouct5PlCSqdDiE+Fw1iuHXSOoIX9gpM1LGndenlGcXC4CbkoD/WMC1acyW5iKnIp"); + a("A9XOg1bPKuciZQTa6zCnli7A+wP6rk2twwxSrESKWHnc1dolBX3hY42tfwCK7V/228+7nKqfsnlY/XMT1mpXocFyYHj5REf0+s"); + a("NcL87tLsI5lD3bfAY8EBXOSI9kUBJH/9QUzVXBMUPUVdfBxt7gBycauIKJpNPQX/U2ou01gwmjP17oBOXnriYjiPTVSG9Hettg"); + a("QTLX0DvveoVJUz7Fgn+xVMekByUmeSPYOS7vu6GAauh3l/fZ0ABTQ09QQ7NsDW37p1R5mY3F97/Ag5mAXDu61oIHB+1fnxaedu"); + a("rFABPO+4bR7jpQOdSPo//EhKYUV3CPe53uL0Gl83dmfPus2MGhwkZvcrPRaCZM7Fadg7e4Si+E5yiFIyeBcGxA0lKXKQqi2WF8"); + a("pvMnfPyWtWiXuaJRkplKLswE5zAT7xnd8aBFD72s81KwTHPC45r8HRQZS+Zx6R2PDeE6yVVDZmQA0RLnuZmqD2Z+uIWm8hgSM5"); + a("/dXABWENRPMKcG81Nxxs3/+tl/6blvKSxpp7GCkYelc4LthEJNe4AfnybD74WvqScJ/ASMThqp8lXBB2FrVTJcF1BEatTFBu67"); + a("idSnYdQgUpwWSPOHytIjZ/saQGVDo7Qb7jOMfJ9ILVYRvT22WSHvER8BeZ/xW+ntOI3pLWTr+9jL+8c3tmeIEH5BDI+A/hgh3n"); + a("BCvCEG4tl07+znfd3YuE8y2gEo6ptl7Gjx90eeOS2b90GyCV+YiRF0Vw1iZGM8SuCvVvm4IpwaAKmkTMfSAfR+Xgh9g7Kv/Mll"); + a("mf78MnfVaPzNqhoK5ju1thYPqkgPlpH6Zjq36WyGWydiLv1xSDSKlMyC4AG8x9i1eGLpuaatzO/LPkCNOM+vEef5RnGebxPn+X"); + a("Zxnu8Q53nd+ZwuB1C04qocOg+zKJR0IgHQvh9A2YA+eECs24Q07/KvWYhSiQcY4vh+cbKWUvn8noG7jzx7M+DvFSEqByZQ+Our"); + a("c8VRRj/eDlbH2wmNCgu7O4GFg2fqWLhcYuF94FpHCk1QLOVK0lQln7xmosNUScs5eiWvy0rmoBJeXehqtuhqNnf13X+rq68cZu"); + a("vqPwvNXd1f2mdX80xQphKUWedYu/rX7f119YdXVSWNn6CSrcXWrl6BSsJ6X/1p9IjTAlKarZWm6UabSyDCd+ReuTMFWTldoFJI"); + a("oFJIoFJIoFJIoFKIUUms/MTnJ79xfBppP1aU6+eK22LOT/K4NP8qfqnNIn2abujTkAWi1MdOTsZ3SY5xUN6137qZzhBbZr5tM3"); + a("WNS7yf7vsc0/r+Tf/FfpqtnQrPjxzoTUGAKd1JVwlK5yJKN8igdIreqP0zK8R7q/1+oWlVd6r1b6cPHdrVpybSv2KZWxomSqDu"); + a("gWz7cgDciyhGhzGK4oGiHHxPJumB93X3hhBaPX0RclJkE6PcXA3FurXdAaeDDogYMOGp03Ub6dDAXaLy1wlfhuQDMeSF34WUZr"); + a("xFkLJUyrTGSDIu/TW5rsDF1Lo/RE1pobnINbKdK7+oSnINphspKe1grU/GuuNO3wglSJ5J2SFc32jUP8USOIzObl2fYlDyL97u"); + a("uv0Gk52xh3WDXmuFglS7mOnY+YXiPC2a33KF6obBQjnHEfc3mwYlG87o2JkL6jbfefXi81DcNM8J9UfUbrWR9kejZMx5pFO8zx"); + a("fBvA2em7R5qfygZ7tvgcUcgx/t2iwI5vOYeUWgR5uOgMIYtZ+E+9pPfKy4Byxqp+w6NiktPvJXliaGSRqI/xniiLnD90/B+ZmF"); + a("YUJUBw+VJvALvaaLROrOgUl86RWl2rVfohSS2xkfG4hy7IFsr+C6aV/ngkCOh9AUKDDRJu1JrDMZ5oyN2kVnyIn+rrcPuqbWuB"); + a("r/2iXZjsAwDKmdpRj3PpmlbUpWOazpbJ8YlcEgEYF0zNlGVp4fLK5WDz2m980Padf5B1g2VaPEcqQb1CFESO8QtEfWQ0SQw8IP"); + a("20BeRSkYLh6FENYAJwJzcH/CB5KBarVFuuPRTDFHwylB5HTIM5kaKFv/yPMImBi0FbFvFF4B9vFQ+GjtAknSKETsix8U6DTGIU"); + a("je35/SnHQA1yaW86seqzmZ4eYTephH4FlOAsrfh40Oj4MRJzwK58IUI99ia707nJxtcpTNtobm7uDMYxmRmnW07iS7ORfvqG7n"); + a("sTw+Sn6+aBfioo2QvBA8I4Aph4pQCVOCkL3/PVTyIPvPtJs2B/ZPODGsyLXqJMA93CGn+a6oevSJby94lJQ3nJmlHcMEpEl7p5"); + a("w9sHEb1V9YZBnt66MqrXZhNmz/8FoZRBW8ut9sg9a+X8JJOTb6XyC+9qZsCDuQvjYdpocXsC0a/nty5Gx6l8WAB7cY7HXth0KH"); + a("g2whmOKTKX4bxY+yx69HvKK5cd4Lgu1ouDKtKN/jrjwEVLyEGJQZX+ANUVuYpDBXwS9MaZCuFt1Fx+/CNmS/c8bkz1/srkxnJu"); + a("qAKpw1BuPiiiYeoiZSqYn8xSMryAaCFNyi25m2LQTkXDzSqNhcX90uo7qRRnWzn0N1L/DbPdqrOhWVVg0S9vQXISvFHeUrK2Tp"); + a("MNbhSSLwQzPd0NNpI2I0aBDNGa5D9s4c5H1uiXGfm/WLg7zPxa8ft7D8wpGBwVTpbKEvxsDOxuXspHak1ha6nX34B2Lcqhgr4G"); + a("jBKInQlRSS7kUtCG25HxrXQ7KXV/srt9PPo9ZSPKmxuKkzmS5vrKXlb06XCNAwslvb1tsbDRWOPN0BcKuOaNKS6D45auOvRvrK"); + a("Zo80ZjVthVoXgDw+fTOZyaLtr0FdGtzyvF8cbNfP+i9vJvtpp5tZ/yk4Isfy/a/pUETANt5isJemwf9R5ALYRRmJ1PSqAaTy5I"); + a("zk8neNo2oQOtekJcMp8EREgeWuRyUh6pDam0ZSETebglpLTOZk9Bpj+CMIASr22dgy0xqL4Gs1klzb6CzIa8IlGd5XC4KNM/NH"); + a("NgciiKlOW8P0GNnj6jdjDaQSTqv1dAItgOfpNCfRJ50AGClwf+nkPmZxDmYRrK9gN+mxwR5XL+ZHTmtwejfhWSL/xbU3uh3sH8"); + a("0F9tHlDaVRbbN0iBPs27+lM0r2s2t7oxVifbJ9KcsAmfnr++xvxnZ66gY9nSepqIvp53j+eyL0ta001JMcn4ZmJ8enoW78jXM/"); + a("SVf3k3jvG7V7nYEMfXc3rnndrnF8vAC4lfo9D9wk4/hRcWk0quP2om2Y0TJEcA3gC1NepMnzyZnifJKr9nkzn7RH3Os0lSrudU"); + a("e9j9NhL06HfDSSq6J/+ibIylDz6Z/isAcfLsYKYn/iYVj7FH+x2t1adp7Twct+HAKCDJ18qSCMbiKMgw3CaKEJdnuPHfxj5tk0"); + a("eHv4ZJyxqRejdPhCNhpofvMcpr95PvjzRG+ehz2lGAeXvouqHsqzvnnmQC+R+xrI0HO+t4Xeyy6mGpk9K7j+p+6luRLAWrgCB9"); + a("+fJOpPyeV992fjzxL1Z+aTqj+3b0JVm3Kt/VnwruxPxXgD9Pn7hdNZOvIEBvH0XXEq62nau2P3XyUuQ3gPh3F34fT5THJXiwWC"); + a("NYjjxTScM9c5Sa4cx01faJY7uEX7C7sLhUvaLi8z2+DzqRhHS3fd1uot5WGrJydF/8zPZC1krL2VcGlErKhBO+GnWdRAnfcO5f"); + a("Me819ZZBQG0ukDV2TeZPnM96kiXnb6K5pH69ouloaXX2t7CLWjFRnoi0FrDGAUJP/dfvfW25jS6CmJ97vqjQn2Oz9zvdJJW/Ux"); + a("iBTS4B1iGzxF7/5z+nZXPPp210Xi2iXZ1ly+wZep7b9P0b15HejjE3v/t3RvMvkaSrtCp3uJ3q+7tVfNoC27T7EG/sP7KKqcad"); + a("xG4UFdu+oiY0SORJCvKjdilEQPR4l+uGJvnmEz0LMlsBdCP6IpUzsAX3imPVed77kH4+6zbKEqvWbJFJiVafFMPbLFc/yUFk/O"); + a("6aGMBb9xOqD02+KZ4kRx0vj96x7MyH0TUIusRre37SRfqtAVl9F9789ZuE/THQvyl/yyPZg/yuEShX27ay9zNFmaW5wVGcdIKe"); + a("+aLMNAHPiIsOhmQc4E7xuZjHYzqQNf96ADa3IEf2oYTj8+arT1KNxbS0KFHoqk08Lh9GdK5DSGifSfqdiDyMX2FkTcQxTXQHEj"); + a("jLgNFHcj4sJ9ne93FxQRkYbp43X6d7rlO0l9W/HxYyyWvvmd4Ice2b+8BT9t6Pfj47BeuOY5VHPsSsJwR46kXMTX1Mqg3G9dT2"); + a("GS3uZ6vBXsTHcjI7AP482x394qb9/n22/f6v0Uqk2ptb6ipHW1C4oOqPT4+JMp8CdTu3OkwB/+OPoCHX8qRxr4kxnJioc/mZGB"); + a("2tFuJwfVLMW33zV1/EHb7xIQmvl+Whh6ZmYBnGBr7bdOWDg5UbdwUiTsm2DfE/y/Hs5KFdBeTFUcB2YzmTLpYPtlL8vhRG/7sm"); + a("Gl5Pd8zgTye6sl27K2GgM6FT7bM1ngKuPtD2h9XEiHDiKfF2RSu5kusbrXRTL+5owMN48nWN8PrKufPyGL7NvzQYQV7iom5LBp"); + a("Y6k/yaLsFOuRKgh7SE/+R5IbGGDaZkotlwsL/qr9sUjuiw77vviHVnTgq+MT74uXv2mgoxqvdMt42fnRdvwYNg6dAwBaKgLife"); + a("uIWIwx+8NZA3xBPwJtwJd2yG91+MG/i8UbvVfGKgVWsNXqCbj9sI/mpd04XFA/qnvMuAXd9eLar53QWK+cXtzaQvhl2JXxsuFr"); + a("WsUm/PJqhga139npb5iQW5L3Y3U7vwcL5Z+U4kn7CY/xbkt8kZunENKdEr9R120PoFajYY/eLhoVYKp2e4x2xZN7hRunDiIXeG"); + a("vV7v+mNxr2O79UrQhROdBjf1539RACL7iHz8QT2T1qj7NyLMYlXIx1RDvujBVzjozWY+NsQYHOag2dct1+jemdI188b0CnDXMR"); + a("wlyEMBchzAWYlAn9y+g37lg5PvRBRYQRAU8gUIPiOM0Fi/IWP712e0nQzmwpIS2VDlyIpEo7YkLHwCheVao/78ulI/zsRHs8lA"); + a("Rgo6crJB6mv2D5DBjUQUe/qTxkBpRIJ0drewaREulQKJF+UZx/RGC0nw0aFK+Jin/V2q/ApI14Ea2di2dp/MLuZsmkznMa5hwV"); + a("xTuCNhPKTVThsBk1lZOjQwNp1EJ5mKJcHDUoMICi0HZJ8HjPi3D5m8DCkk1/j/Vx3sXZ00/6h35ilOcCoauGx/Q/r2cpyDZ1eg"); + a("q9nefs6nqK0Cv0Ex+cMfOb/Bbgo+FuKz+mMFgpFJ9/RMVVxcEf/Zjzy/EqjV/Mi7mnP5tG5iB9NEpoC6d10yh5pyJtKhG/ySiL"); + a("X0vZiShbHDrbp6wQOFsNR/nBpIIX4IW2266WZ32/HDYw0X7eqf310AT7T4lG+3lRPV/9OplahLnW+nSwquj8eAh90lI3NvSw8S"); + a("rMsXyo+/BbkMxHYJyAhnIO34ukCJosrbZ6/kgnN024p3byhXHyAV6N70RO7LucuQBD+KUotIlXZJf+8uhQp4SE5zkfudngFVaw"); + a("2qn90yy1Gf/8Z+SHHIK2Nia/zP2mcEmj3T9FbQIHx+/lI+0YPsU6hvCRZIivAR8nZrONeT6ycHqm1jlYT8fHCE6X7JBR8CSQgE"); + a("/8392/wvHuXyOhKa2Ng9doebfK5BqkWq64mBWNlcEWz3GO2KuXR1xM8mxXr3DCu9fT69Doip/a7159+WeOPT3FfJGZJT2iDRFW"); + a("fQJ7fSA6eoFSrg81BPcq0bU4dVjX6yV4GEokb9A7qq/1ukr4wwu0W9atkD3gyjemINTnulUx+q7YYXrzUjulc11MVoeMzltXNd"); + a("1WR3CdrYrLG0Ymx+TLEe8Otoz6i2E5STUoPSHIM4D+Br3bg80xRdxCP6QI6fJK0SHTjANvh6ldTE00PA9lIKdQ/YS+d1+jU4pb"); + a("EBCe/DCgdn8qtMxrLaJvlvXTSWb0j0eExML48utkfiyx/EgnzSXxa4rqgetUZlCyPo0jYoVt+E1KRak546VS24xL9li3nm6dvB"); + a("MTFnQ2q2Q1Z/DKhgk6udW7jSaoXMqdbHMyGS7zboNISWy5Uh7wbcR342H+NkYURI0vkd2jrL5q4r/ndvsbZqBjGVc+43Sw/YSf"); + a("ybth4SLLUok7vkv5jRvnZQ0LWA41C7MLrswSWAj8KpnUvjdfwyKc2Kaljv/s7b1RlMPnp8gLMDwExhersdfVCyfrqAwJWP+k0D"); + a("5BR638qOxzaCk/XON8qMn+2+/jszBgCe7b6l0+8KZ4l284S7zLb1BC1RrXtNkR7/4NIClCW+GZUj9jivqaWj9jqvo6vn7G8eor"); + a("p35Gjv4V8niCMzxiTZX6JCfLp31wSDSqshQFZxTJLJkMSz2EZWVEFkecCuMWtrs/6WHL/Tvm1f/NiWpRmd4ja286CfbdMNrPOp"); + a("neegSO1hae5FTcKvN7+kn8nn4Szp4IC9mTHCF74lE3NUXf+T6LkR78Bmb4aC/fYFxSdpNss9SvA4zi83GIW9avq+/ox343+jJ1"); + a("uBQLmjjchq12+t4IfGUaD7zrwP0OeBvQjPtdd4xcEBxTWjc3davO6wn8HGMjuAVzC16JsYf6Ou5VmhQh4hJUoR9LAtHimtdtum"); + a("5BKJL444eL090Q2EX9tvol1A0PmDx5Q8j0ST3JLzcC45mgAuNxGwL0oYDC/Pjyd7N6E8vffePi8WvXvnDZx89+nqVtMai2Rfy2"); + a("q+3xWSI4QDJjl1DbircT+4rcU1QijwCw3FYAcjmWenj3Rx2cl6SsYuoAmWi3Fshycnyntf5sEd9hjc/SV8tLOqHZRIEE48v+xo"); + a("b140+kzcRwaiKMMISzzG7dbh2cDH/IexEp3brdY3XrZj8v8V1XuzgiWEFy5Wxo430H1USGy6h/tOpRqFCtqPj9+XiovT92+X8r"); + a("L21aNJIM/WO1XmiFVE2Ghls8tpk6FzILjNC+ObZoII01m6U9eIRQkZLfN42I3b/eQcLPxKgIQ6J3AUZisswr3LkOMcOmbQ1HBs"); + a("p9eZ0zhgJ0UP861DI3969H5lT9iy0aSHtJ9S+f+tdxkP07Y4jkZ52MgOrowe7Pdj4Wy8Pc+xW0laFORHwhTJqVJ+R6YSZLLstn"); + a("41+CVhG/pyC4Hj7tKqeWlL2lUhm4DlzJxda90zLTFZk2PKlu4MnmsXDxXCfY3a33D0At58eOfyPU3YGpUF53YEt8PDNfK1T9bb"); + a("TC3qEurDPfYyTzSF1KVFn7fK0cdLD86fg4mWHDyWTgpL/scyNe8d+K89ZXjjXHIw50QI6PuAz8Gzi7gWfkOMbO+Lzs2PP8iXZ1"); + a("dPt5/YgzE6xPde+ik1fB37McSuf0QIvQOR0KP9Os21e0gi/UYpsboBPvlYpDEbf9P57Rb/v+YLz2l8r2G1pk+4TfNl5Ktw7HLT"); + a("Y4bPef2f2PF/Rn8HKdiP80NT3BfdbOf+JrT2ACdY+qh10xdAEzOghH34Lobwj8rt1C54Cb/+RHrp4VGwrRlL7xY993Svtz2Hqb"); + a("OgcFvW/5yua+5UvGDo/sxKn5HvZEGMbfjZbi7nyDmuOOYh9/S9095TUq6N3sK0O809uxbGk7hu/MpSkbL2uHiP7mfO9bFfdSIt"); + a("cyqRlBUqDWG1qBhmwzQTaPZAbAfnmGJDB/FLLZ2m5PkdtBPuCoUA74O2zLkLP8Xm379vno/SHBfGRkTU7iRrXLz5Vi6yvTEumz"); + a("SnxT8xPLb/gZNwaNTopC9U3HJrHiJjUhafElkIbXT2FQ7aQ4457fxvOy3leG/8ksjo6SGZX2SsagEqnm0o5xxfSsjzM9b3FFTm"); + a("/7sqVtPD2pGy9rKw9jLvO96yvCnIoKMD9iHvUGB9sbfPwkMQt+yF2L4zDG7PseaqWRAcFGka6zioFXjTDpTZZhikIljX6ky4Nk"); + a("t+b63uEwT+chtUsbHa4Hmnn4ZnwudOJRP32OgFaFaTArJtnAGn6SQFQbIjFefH9A4tAghSA2/Ph4Z+LzdlWKSk98vlZocNHO/+"); + a("xcrZa46ehrrSeMOD+G33Qk1vb0yJ5mRWXgVEXOLPeLPCT0e7+G+YCoIqUnNAlSOqOJSakWtt1c3brs/+1oNyH/Z0PuQdPzWCCe"); + a("ahRAvNKYiJ5nJh08PS9U9DyB//8keX4LJP1X91X7Oc4LxvVhfsjCq0MXg9/1kqTn8p2yErqxCR4pO4trdzhLyFVx7X/yXvg6hd"); + a("246Orv4x+9jH4meiyc/xG/NLgLgsyNojJ/pjIleT9Uh3S+4otYcv3egO30ODwxycHD/gGcI+O7Bt88+q38Dfz9xiE3qS8cieeD"); + a("34dXYz7WYD4aMR9tmA/MS6DDUE3t64nY2Hwx5AGM002Z1O/nuN8VRTyg0i5MllMNqKJ/UEA/QnfOlV5Cw4xYfXyXvsRwz9Wozl"); + a("Xb+Nytibneo+V87XDQcY0ciw0sgUPfHnqF7euB+B7zhJvmu1PNt66sOJWosIRce3MH6ukLvo/W9jf/W8X8Q8bCmH8qg3fhWP23"); + a("owQOrAYOrAEONKJjbcAB4ALmQOKA/f0/2nuw/j7JFslgLjQwAsEaDuLo4EcNAExHerUf3BnfBehsf6i4NNhORrZKQmOd6qs4NN"); + a("+JSS0oLQhuLG76NMWLF5Kmz1JmhUa6ZwVHcsr4TRDAR0IT0pHgT0/HI6wbSeeWwmoxVeIPjk2inN7xjcX4PCc435EeK5IRWkbP"); + a("POylJsl1RyPkKYMYJl8p1LlQKUAaqL4A0kDU7rODNBwgDUSKDaSBBNJwKgSQmpFGIA0HrsYHSfELQ6Xzl+2lk0TlOF/Zm8XBth"); + a("LUCRsBxbARUOJsK4aNAL+zKfhmZBj5pGPR/EgylD90JcEcq/RHXH33DRBurV+fXzXP1UC+FmtevYXyVJSGzpp3eVHDwmhB3gHX"); + a("bdc66Bnl0qhxrw+dXxrsoOElj5CY83mQrjdH+pPStRS8HRbkfVT9DunjnmCqr3Ii1RWOV48b9VCZz1EmWDUPNHp7wMXP5rhpyS"); + a("5Zdejt9nTxDA/VSfEgny0esENAgho2kQyVUVoXec2BYf6G06sPEAGAh9zISGHWIeT2h9ZSRo4lRYKyd3GYIrGM6ry8j10rh7Ld"); + a("oW5Ihof8lJ8c77dDaGgluZuB8AGnwUdTtJ18WH/CewkKbCsKflUQ/LEoGCku+6G47G14f/JNatKq/YDF2Q3vSWW6XUnT/Tyvt2"); + a("os1bc3tq3qAZHPwEOOOPM+XpoRB5bq7QxHR3Avw5G3O5ACDZDUvO9dRbvz9lX/mXoFfCerSnntlaMxL2dhEDBWRcHPuCaNzF9J"); + a("h0UwL43Bqh4Dl0JOzoS9SmSq7WVa04epXhs+4z2a8dKndK9s8ihtuskCEwshF/lDhfPyC+cLvY9t+0nvY97SE6H3Mc/Q+8A2Mb"); + a("sUXwKZ5iSR6HppsJs/nU3a6H/0EqzIpEe2kr6kQ8UwCoIDqN22l3C5sBR6Ik1fYrH+Iie9tnCesQnkJMVKwKj3AEj9uZBrLWti"); + a("pKVhJgeJt/C9qUozyfp+MBHP6QtgrwTgLoQMSHT2AkPpgK5qnwxh/OnrPSFwCDRAFzlAhkO+JbiSKn3zePzPNmHbAugkpAgeAl"); + a("zc0yjenDCAI3NpM7ltT2/UzKEJFcyPpZcF88zfNv05P2pV4wekzElXT/7x/RlqS4R8Fnkl8laxRgV1flMH3UeE4NEu0DeFEeYW"); + a("MG85NG+be3qjtklSnNt44yGln+Rw3Nl3E8HKnPT4dSt/XExL66JLR/DBLOP+avQDwzm0g3TTq+a7VpL1A3jfpS1A2kufTXzByg"); + a("lZmEdRaKEs1PEBpVSVOipgAXY+kJPetWeVwpEokzPN14a+lp01H9VJt12CAiDdyT67RoMXTyVAvbTIebxOpdmas0qDVfO7qgEL"); + a("AdVwPQI4ZU2qrZrnqHKjbbyEAmU/2MNlqAou72s9q5QN1niBPZxJew5ZYrpThnwCylZekAzpH1sFINqjnKpACAu6YZ8f83oaZp"); + a("6PyBD7FKDwQegvsrEOLXmPrjK4Z1v/ujrx5XVrX6LDQlLFQFAkumBHCkj+03yFKE1iueFJoVriKuCEdzI5zE+LZEam0N06I/VG"); + a("A793vkf4De6+kLHq0HduD6qgkVLQ2MeHCcA8R8WksIVUGt0diUtpvAGLow95n9OM+VaiiLqW/NgbrXlJHA1Gi1S10R+W4uR3z1"); + a("/Ncyaky5zdbV64I3O0qtdZL88Mp+q1fb0Wmdbr50gENpI+p6NP+ENDktSXPwR4CQDUAbTFmiMIZ4VSsHGnmCBDrUgGArvJCQCW"); + a("PmqQZmCDqM8gmThg5PZFF+LrC/+tnobw0NrepIBLLzgPBem8Q2mq94n0meeRPnPGYTcJAYQnoPSk7POZ91PdA3PNq8t56k4g2j"); + a("K/XTyAsVTBHu3+p4wHsEIZdc6TRhRbtzg2tsTvVYnhMupeowTQ2Lw7Hsz93B9c2s0W/N8nSzLenCjd6FrZqx3VPf8Hvu+QXcfi"); + a("G5UG2P1AWq3baTVgdcn9tKZgPVJcEQ2+PkxFRi7jcxXMivLhq9lHZ/quM33ON30b94L9RjT2Anke9YdSkvDMrFfiE7I+RF0G4L"); + a("hU5oyMwc+voogIuApedNa+RovdWeTyfh725n2x9PfUhaJgVlF9T1+3cH9oqfUmZKc3vKH+9HsegOGCyGh/AJeOSc+R8UlPYFAr"); + a("olk+JmynIvb9V5K0AG2+bdcbxGkutIoiU4Qy7rwq7E/dSH98CadruUiMedbx2JE/Pv28aZ6zqqDmpTpKCQzUyenxlsMeBteDBr"); + a("4T5PrQH2IpmYlOx9qnoCuVXNFOdRfz4XYmSatdhUCVBxI9g0HTcy5IsuaM//77bfz7MvyWHGB9SI1/nu/Gj1WhApvPBKH92EPa"); + a("j+/CU5UMU9U0CTU4i0Xc9AXoICfh0L5Be1Yjhp3E/hzM34OpAjSl3cKV1SFsVaUEBqY6rlMLyU8mpW+NOuRCekAupIzfSVbmEL"); + a("62i36EuB8Sbe32bEge6ICSUounb3CQ+rh23dv38JdVbp88oNsiaD6qP1sE/55+6s/XkT/CKX3rp047JpF+6hPXqkH99reo6oRe"); + a("h0U/tRHKbNw/pW972QPIOY+9DxWywjrLILe++j/Qt72jGVV/NLnv/vzs6ET92bpI9Wcc9efnB6z96f6t7E/FeAP0HY3Cfoahb5"); + a("uu7dnn6EffVvEjpK/D2ipUOh2qtumGqu1UVrUNCz3bdMjLz3iZoHgd+gksOLGTBOKhGMOKth9a+QT28yX47MTCGm4yrNTmULe2"); + a("k/Yrn54J1n+kr/XfKOZHE/PT3Wtf/1itcul3TDCWPqaOVv4tOHEplXQhClDMDEQJqoZIIZh8gkEGGlJ/Cy69kMBLU9aUvlPWlB"); + a("4A+dD5gyfKhS0mpdtu6S3++0C3X5j87ha23ohxrRlC2hrbetPYBIyU0e6krUhm7CHLohQnBa81ofPaTTqv6hlB6byyzKnlkYHl"); + a("rk+9B6N2yFTMkMVg8r9rn7Jq3H9hzyS02B05XNiZvD6dLUy2eqCpII0EJO9BAAeEj/uyZ4IVI5zdXXgEmyp08+hA7V6hnWqPbb"); + a("Ff646kUFtKL1yKWTh4599ugdlGn4Hufh/bF/L68n1uLE8Y50Cr7sgkXwh/B/Cd7zz0BarJ5L/El9cU+MaXf056gPit6aSy7MVR"); + a("cIB2yxEWO0Dx1sfQzv2w6vzSc2qJ2OwdSdY/8j5Heas5b+3p9+CDkSK1ASEfaAChc8TF8Hm7EZFOEQJDhskoNxuR+0TH78UC75"); + a("RUvh0+D7V5WAL4tFmoRNrJC1yLEsOoxId/E1B27wOUgWNhr/D2F0z2KP/mxE/qI/jhmSGfJK3IybAPfQUhTWzLzch8PgpqNx4m"); + a("GpErxM3gz7GAH5/+/HFXAvn9oQuosfy/9d0/5JlOeQZQHmmWfOihFFOnv97eFpWBhy1Pevb3xVT3XpqsjIH8cwhThRzVtEVeHQ"); + a("P4NDLChGMYRd/bw0U37FFFs8P6kGaSRaUTeZSatHwdoJsVQPHtsaGFEm5hHNubatSre4OqewQJVN0OED47P1KREFaEeWwUMrNq"); + a("VoHr7vUVk7Fas3E5ID7IbYfGJLmRlCmkg7QmeLANQxY15kbEvkp9+ee6A8mrnety1OnIZH+F4w7eHmWmtvtQnbfx1KH98zYS6X"); + a("9+0RtFIEdLRcA6dYnlG/k24QdS+YNvaKOonhDqGUr1sM5QYCIWStUzaqHcvJoXyk2r1UIpzBT9+WCvvkBKUECbl8m2d0gNic8Y"); + a("GkTh8ZGNjxxtK30E6ZFwsVg5x9LK6VNCEO/7tTdmMs+UDEHPcAM3+tCv0dqFqbjICcjD+sq8QbcyrcbnRlb6wt4BkEGNCRtW7h"); + a("V6271E+d/C8PP6AXLAlEDcC5LFfuPKz3v7knew2VuVYiz/rt3VMOWUpCYTv93c8Ml/YMG2dt3Yu7YckEh50v+NHfNayJpplxzd"); + a("tz37EMCYmplIHqRNu/qz3gT6SGabAG2GTQAaOC1VHHI7DBHsLuKJyP1EKgp0aJfu5xm9lCN5ozwGwQ6kZ3HzLmEzoE0UwiidgQ"); + a("MV7Q3HoePtjsAoHbdX3gm0XTaK22wP03Bw9759lnk13NaI/QIilOyApbwKDDNXgnMeiWd73MLSauVpOJbH6CNprI+kBZu5yunP"); + a("8FIRI+3LJCQcCNZf/sVa9WYR6cnkrgTyZK/S4Ztfh/PLO8hfe4aySGJY8kAE/FMIeA179i0wosgf5fhY4d3B3A21tuLbAwxk6q"); + a("0todZ+lSEuO6hXt3bT8Uzf9lMVPVYk0GUmgahH3EFOp2sHj9uSKNQMpgqjBGSPgNrB45bmXi3HaugpPyQ5aKg+hrwgzBHgvsA3"); + a("lZ98qx8ML8tIREclMbf3F1ThpX2MQ4PF+Yz3l9XKpp08/4EG5QgDY0NgCyxHu/5pm3Ux+U/kTMY1GgQrB/RqXWJ7Ejmm8U7/Dc"); + a("Z73wge7xwx3jk03gt5HC6xWIuw3Y82ag8Ukl/EQo8OlDW9WqTPiJveOoMNtzNMFROobe2dZ/lymMP4OJyjpo9k+305cez32ez/"); + a("5ToqpqBQrnarqCeX6xnDUT+M4HrYce+ystIobetx62P3tR3iPuaplyY48kgSaG0U6eIx44WveqPsC4C3I98oYV9lhGf5LhyKg/"); + a("AkIP2+Mj48wj5/MYyW87brxVKPtmOJYiTZ02dob/WV3gDzrdGPeqMy0WbvQspz446cSbAlh5Z4ykOzPcGe8rxmWFupL2IbFldF"); + a("DRsW85UNi9G9IjYXsdKGheAZnI9TK7+1t1PnQoUzmr51L4O0Oz7yelStp8at9dMDfdSaJWu1W8aw84fQdT3COl5EhrUd29SQ2P"); + a("1RcPnaBaW968zfvlJnHP9whrV/eGwPDJHL9f40QChQ9vwwoSoRlKKGBVH4vdbtqeYQLVn/BNlZ7+FiTYaSSgGkwahUUf4Cd6Vb"); + a("lhey/1h/EP9f+pqZgNj5Z29PV+hghxf4uhzHx9qZpbgJ1paVfisgPZMuZadRa4r8TRbkj/1I6jC7ATOg9dTzWeWhqKB9H8XQNL"); + a("O8Pcvaq2MwkY4SrVfYB38OsBFtvABTjBcnyAQ/ezffQs8yWbMPWE3iH32pOv89WwvqNDTisFiz/z1c3hh65odjXfIalKYL4VzB"); + a("0NWLZFCiziYGfRbR+AIwGdhd5ZT+BUFW09McCPGxUInBSfzwrIvFn9ds95VVdv0Q5WKBBuKX8jEkdCe/+/3Ul39JZmCu9BHxQr"); + a("Lg4XiNwUEV1sF5Y74anLtvpveNLuvgVC2n8+XuwlIW3z1KDNJYGiA208HoqMaI6FMC5RDLfamdHJ1AyIjKLrIxyvvi916nMv43"); + a("/KIlNn5Rq2eO02ByDaVirGbrx0jGspA8gg2QZ2MhhRPykL6vxXl0w2EWHpLt/YxsebiEroc6b2CbL2KfxVW5gP0qxJKrbiw+oU"); + a("Jynng7zwWT8v7HWI1Xfl3zZ8ZKqPAKtnZxKGUCCIesShwIDqGq8ue5qwZynfPcLOsDTZanfA2zcrUnv3Rw+xUOLpTJYzMrk9bm"); + a("M/xmwVZG7tGEAbzhJLY6RICv+FqK/Kj53O0pJd5VYDBdii9HyMjbF/8+MonkXHkTb/0LX5Tkgtuzm/mYjMrc7gJxLtmszhtx71"); + a("tAawbBA/qWLijbyQZRYw+eR7P+kaG/hKYh+XHanwRj4FkkwTvnl+VhddOync+26FPZCOhYEVBFtSNqtTOSlNOoAFXyZaZqilvX"); + a("OyT5KxVwFodjqW9eATj40q9wi6C/mKDwo8yxLg6VMC392e1EKQKpJcEdkfSivN3V7wrfO1YTkWgqsT24DpxipTfjtxFU0MfZX3"); + a("Ma+6lPjcdClnWfJd8YIRmvaKy0b/sjTzQo65/QrE6VhgoJEcR6IHJh95SpwOujP2JtGPlRHQh60S6DoN+HZkUbiN/WQyJ8ZxlA"); + a("vqEDGZ+DG+99HMvIx1bYZvmEexwsPB+TiVwsZrdymeMeSoblY5+4/w38arPjVwJ4RtvhcQOcwxQ4TW6+aRDRSH0pyeOoiYXMQq"); + a("9rl6BSN5vICXlE99IjqWuiynNtv/ndtvz281q884N2K2dsoZuycnaDDNYd8Na5ageM3EDvnZ9Zd8DKpTT53byN96PPPXTVF+Bk"); + a("/uMpxVIwv8/GeT8rIfbnr6jQ9SgEZOTXgn/+ic06f+MEAfqZdCdAejw7+B6+g/3raBOZCHnZEaC8RzTQ1U+7cmsvve1QmFVwhg"); + a("zmSXML/yXkLFCbtJRkxAI72C4ImJY924lpeZ5kx0bwBQbpdvzwzvY4xgfN4kUsh30YDH1TZFjHP0rVpVu0MIZaaK0kWmRWYu3S"); + a("3mWIkM3yMJdgPEtpaG560jKedv8NBPYEynv8k2oYH35UDeN5PIwMk2UcP3qEQPGkMy//KHSQIttEZKbq1Tjq1Xc3yXF7ydq3sy"); + a("Xz3OKswdqfGgyZ9sQTqj92+zZL29GnDhzWuF90nkE5H5Wb/YTqW+sjqm+zYvk1tTAzhPMXO1HDGYb3R7DScQTAKsaSIrlHYquY"); + a("/NmMEf3SqtehX0gTfSqM6iwXsJ8AFsT4UafqWrz7zbQo0OnvnxM6zQTcqxHSDqPBLOv2AVofwD2RLMuhHfouDm4L7kS+eso3W0"); + a("AZbZc2yQaUh5G/+gM+//TYCI2dPyzHCxAcQxAEDl8jV/a5y4TtkAcfZo/pg5BabvD6JzyIZX92stAyQi7xujnDLbmW3fRIFgb6"); + a("sDhiWrn06zH09c8AsgcV5nt3VE0QC+MZirvtIUKFUi7PLLsnBvACbEWGMGUYLAudKQpVUtwFXGhup3hVmuEOHCkSL6XE05CoQ8"); + a("JKVTcC2sgkUvEQufIo1y8eQ+RITr8Q6dpy8jR/KVnd6FvftkObmpxIP7VHnqe1Fjhb4qMtfNqHLhOUh85rTFsHOVhFjY3B6KP6"); + a("/kqMasFdguMYFsdgN7c4PYhIRswkRrMro4DbTWxLNAJ5CDc+neEV3u12fbbUrE5+tBnT2f97j8IHlNM+4XKf4kc99gj1STdg4P"); + a("fZeu8O+f7EaC9bt9ozueStft7fOwV91/AjAHjXIBSenF3gt2HR3UeSdHntFeX4JKKLGe+uuFDcQdnfNXuqdEcgCin8ywAkTz3b"); + a("3pIenUenonoRxkmHIVv/Hr+AsCodbPWQasw0JHvSW7hbJ3MdSBUQhgChnfja7eFeDUF21r+6TARg3xwBNQI2ewasb6XUxFHgJh"); + a("Swq1rhlkXXj12Rn5K7iHPoDeN7Fh8ArFcIpXcBwZDl+JCErBOSWXJbzxSGRjLm0vLN7mAmgc9V9L2ouSKV3kOe5J5PjuobONOw"); + a("OPRL6XFguqReRqm0l/D3qUQhR2/rpYY9LzpQbQlnqVmCi97RltzA/O2rANAx2ISDLXWNHtfdrZhXFMqUOT1KG4+Ux6A1UrahuL"); + a("bLaVRknEe1E7aQ1PUusMP4wJJyhsjT4OsRz/ifASizVLN9fbdpsyz6Vbb3j2g/7xuKBvjxrNHi3eaQasfSOjfw2FW3X/eEdPtv"); + a("6MDK547lCOatc9V16mmLEYGJG4w6nF1vIlbR4HlBjNk6iHIRGTBiZ1DsUyK2LezHfPuFSax2mtb1gup0Sr3QNopbLdpqpwcNPp"); + a("pw4wxQG+LaVFzeusBJtpx4shW5QGcRz/bFD39YPLikEdiRFPwVu+PduhWaJ/llYpv9ZSIuvX31QOL3NqkPi7HWaJxj/Xqfe73Q"); + a("iX3jfHwSXZVMig56MzIEiqTnOo03MUwSt3v0xfKkcpXlEVvaHy8/nbfG6JYkno+t2FBqoYuP8FgKP5YPovNQGEid+iSy6AB5QM"); + a("i0yQ9y0ZO2ctGLKfsSyp78IGW/mGpsTb0D0fhHwd9yUPVq369RyZeruJJLt6rKP6f4DSL+bFGLf0ts0UWb+UX3CvzIvmP/Zleq"); + a("y5o7RZavPwQ82fuoKxmf4nqIqEMxjNrru23W1+znz3a0p+17UG2RlnQPpW+1pSt5FGo8cppKt79nBzTsT74PeX8q+NC0P6H6c6"); + a("n6+Q+qY1/779Sx75hW73469oW8+/k8u1+cZ4f+TjAn5qLL+YH91Z0868cgIyp0UIX5SEH4hw46L4twD4WPQnjaJphmPfYTHqY7"); + a("CfgNeVQw9cWNScxOHBQauh/R0fbIAIz7HoY3Xevay7XcQQU+QhiFz6LwtZt5Cn6J2rEbPbynl06HIaRAHgj5b6Y8B+5TvtNy0C"); + a("WD32LqF/KeT3mn3Sf6diPayL94f/U2JJxOCQsRAfQ4DmH6R+9tFH2uiD5aRrekXgp3D046b1J/k1epgb3hPjWwUwkKdZ62jO9T"); + a("9woYftxjHt+vDvCQ5VC9N73LEDz3AY2vmPuhH9DHQ7kk4ozR/DO+hPyNJwfI/Tt8yqfSbPDDmHqWZ9GdD8NViURH4E10oxoh48"); + a("Jxj2jwaap37e96ibAOw/c19H1oLpW1XFit/rbV+4RExn/w8xPvPsQU0+bcJV6ksumhUvf3gzjehMpJ98/1Gv5MdNSQsf3migHl"); + a("y7CYotWcVI7b4tH4UzGw/LhodYUrMiZsXMMjF4fLEc6ODojMxt5YvuzKCdmO6aLY6W9HK8eiXPVon+s1euTZ/aHv3SvRHhVA0S"); + a("yVLa389N4BVYN2utypH0I2PzLPt/EXyBh2vYgc9CqUA8H6k2QAVeDd048gb6ED2zgeTxtjEIHYtXIwanwD2zmpHLOGH9Qu2Doe"); + a("ucEqfoUcriYxNIZZh3JqgGDIktTFnj/FnD+kcvZVf7o5v89agIJtMfkHqfz68+JoXegod11c+Y6ig/Kn2xjPn+6QXcAJPs2Rz+"); + a("8XihRD5c1fgM6+0u6wqExMvpLv4dSGvGul+4QdOMiHGL7/y+Z2a8vGWiVBCgQH/jSbJEh5OKEsyA1oUzsvRcmCHLz8Zmj2WLz6"); + a("TAIRomXglM5tFOODj+zD4JwNsEMK82tm8POT/h2Qqe1f1tM+307z/LleUPNteZ+WsrrQhBqrLECa/BfMs7+p2O1fvZbg/JdIf0"); + a("a9RUHDJMcQMhZ+5mVf+fl1Qvf0blfdsyqWYS6obykvCnaXT3Q5XK81BtP+zD47loes2YKtUJO/biZ02mx+RTibNNX6amNwQOTc"); + a("sNkGAKpF3OlGnAdxiCC9nnMLFZJO/DmQNHODFUlvuYJoqNk63gJhTZTMoWodr/ZG46d1aS8jTdgfwJrrXxvHNF8L1Hwlsues/W"); + a("Uf+2oqa5d8Xunv9ny4vYsx/WGX/1LnvRaLLzhr+lnUBjDve5fbTm+Qfj7SfVc0uo+hgVM5jPRTkM4JO80V2Nabl152/8hWObUB"); + a("FWPZ0dwv6a9reYWITak4q6uBOqO2J545ZfsO0VKIfTzdNEOjinjNmEciMkv3Q/MnkpMa8wrUXPINnzPnUVwqxSnfNJdQ3Hcv95"); + a("p909xBcR8hLvzvrN9X447fCziKAkNVgnV+9iSen/fjp9vt37+U6L7BsmvGnVznckm5AzY3jyxkgjiUxAbIJKIjwbjDInBpWNBy"); + a("kJNrdhGveFttTzQwGQtNO1MttJcvweg9/aZ1oR1ejo64XvBucz3h3RFZwYefKwaQv1UkaA/09korjBP5qLvDTLrj2/PEotyvP+"); + a("ukmDEllDp+itOR791fQTTg6zMUaOMJtJE20G6+jGmAMiFifz+Sk74uMV4G26DOSnrX14+Ki54Kn8z8CH6dKajtGXJdJtbBkIo0"); + a("/E0PDGH7u7vp0BwBL0A0oredZtozgusAe9m70md1GkCo21qFt97RwsKgkdnKQbDTm9OotVbxBPTNe6gnyv0AtSnY2Gnph53i2O"); + a("v75y5V36vbEtXXv33hDWt6haGg1xHo194mAWFzEINT4InCVxxGjd+FoNHEWCRB0cT5Yli54e/OlxK7x+H0rZm3rQje0JWh5hqn"); + a("Lfdn5twGftORPaE9W/iverE3gf1UzazjELY54K/tyXDd6sBOO74RaB7B25evLOVmqKJGccbr+krYk46Mlv00l653WiJkP7bY2u"); + a("gC+0suLPTqaSdiVjqZ15Mk435Pcb8WcSky7laKKxdxg2TcYoo7j+Okwftu2ZKkQzz/L/RGu44zvFXf/gM/mG5hfSMqf4hRXlss"); + a("0zZ+RqkZlPqDzpu6gNKaRco+6sUWh1GO2BWSX9V1vbLfZxsOnFFqe5IXj7AOHMoZ4/EAIccwY3y1aB/j+pllXOPmctUtAdLYck"); + a("bGq3E9nr6Hh9emy+9xUs6C9SsOMMbJC6JVXhH7t7RsE8lneJftc6DWqgGv0k8kKfix5Fj6eqCryxdFxeHUN79J30M1rkVILKaw"); + a("xGIC+6o4X/YYInLFwR+67hLn78Kx+YVZlXNICL6IRY1msrtkZfmwMKtO6GvvyVM0vQSnX82z3krT/3op0fTWwrG8QnCwx/F+Uj"); + a("u0tWHWu8jl/5ZagXPrsWSIoKTsdUhTaTPreqNFzl+NhWWaYuf6oknf1kVdt5fHcSCGw12PZTDt9o+fO1h7V/bDJ+v//U3p6dXr"); + a("lq7ui2vpKr7+zt8Oun2J5zYwzAblEKj+WPBD+4Lhv7hvtsW7b/7hK/N986xT1JRfdD75e222TvlLF/N9sygkFJ7U1VAiqWh8Rr"); + a("a8epZqa4+2XjtniKtlvu3aiXoT3jujaFvb8mOv/d558Po2DTNLtbMBEhA/W6tC76W+KEJ0u3TR7XKQcbtUZwkbvwJdu32pEmaN"); + a("l16dID3kwxB5sg0+s5m/QfbHlAu5DwOYiLu+tZ5Q4+JboEd3BIuaC7MN8pbXzce0P52s5vfXc1DtVY3W+d0KhZHIcKMCRTBRfS"); + a("igVmR8/ZfVvcIQbN3qBOcHm/85MVsrvDnFIebkFQsFwZ7ikJMwuDhUQJ+aVP5QZmOFeKDfF7qT7ERww1OuIFhJzHMnQzSWv0va"); + a("ycZQ6Svi8eEwJvIw10TKMyEqKszm5tBdU/F3lU+2+PIHaO0Mk5qVfTwe16qe5vFYrQUQSDgeNRiPVfY3C9qkk+jBhnU68Zwj33"); + a("6RC9DxKDViOB6Xw7JaH5Y2rPdJ+u0ixGY0GI6hC3kqV9PSZQj3X87j8zh5MMt5WQgH133rkCWBpOLXo1CJXLqVxk2tlw221LgR"); + a("cgLfTjlR4dsgHD60A69Y8e1XFwLfxtjqk3hnlF5+NfnT/6xXvICr7CAS5iKOWBB45pEnOreNJ/YMMBEEYapX0573sn4rOpOTMQ"); + a("9qvu3rVR0YlHvZuPK4Ldi/QfHW0Oom37mh+nZ+eeSH0Wa56leo++zB+RcPWgSU/vGCSUBpmDaW1elAmwk+7w7w05Y4Ko7wNSAY"); + a("5PNEqMaQ1/LyIpi9pGbpDkfFsSS/NU1N109LMeCzXrZO18sXJBA7stt/xXMeACVjGtp1IqwR0OUI25eDuf8eYX9jEf+8skSY4a"); + a("jBjz/4aD3/PBXmn+fv5Z9XVh0gAN9SVknrqFUZpEZ5aRTDYJcHa+MATqElIYSLQze4u7YlGedQP+uCn5/N4J8JMItrX57Ay6si"); + a("szh024TVPHpe8upTEL2LU4CNs9hZOUnlT+/UvQC6lr/PyHgWuzKtewPP85sisPQ1vOa0YYEj0AZJLOZA6JtN08KI6Dyct3E2Pi"); + a("NJL+WGsilKvUGlBtXkjXLVXeOMm6ad/5V4mG0oHON6YfYY3EHoNRyPmxhwkmpgjNHCt/aaxRzkXGx5jk4Ar/AQBX6hxPvsgPvI"); + a("dVKwjiYcY0rTL+xNNFAQ6NM2VaHP2Fm0Xtfq6POoRJ+lc7GNYfy6JRwkcb8HTUOiZ5Q+JPQErW2noaA7h8lciguF1hAqXf45da"); + a("SOwoCnUcCzRsKDBFFzXbtIaFOArhGARqcoQBeXANCzDEAbJKCbocDd9TfKoiZKe/o7APVHEZmtBBpQHnwhnHpp0qvxTfm165oY"); + a("iMfZRuWs7JK6Nypgj7S4hw6+k5rwl11AoSJ9In7zd+K3Ma7yWi0pe5tEGVRb+kpaiIz+EIf9PEvnA/0aqCHt8PUYXxZRZ+3mV1"); + a("+jtbELZxpX3ZG0QEB8PFr2GnnS/QkrVIhFFhKLLCQWWUgsspBYZCGxyEK0yNRaT0wfJVGLm96j0s33F9bJkAcPtaEohKxNF6KR"); + a("VrHTRSa8e2QmpvOGNfp0viqnM3W27XYW976/VD9D2Q5AeM/sHRhIhYPRyEm1vekI5UQjRDTPMyHT0dT6mBetRPPW80haqIcBCC"); + a("01naOs9HLWY/3wIwIxdwppnVq7IMt6kYDB08BAivKsyGEon5ysoKw5B1AufsEK5afnShmMhYjwuF5oAbwW9WubP+rX/iN4jxmv"); + a("4E0Lefb7NmoK4vKQgHjvsQriDcWAuOl5K8TH6xDT/dH1oh1gO7+MOXVsGp4AOaKHzesUI147oYLuspHTFV9qFXCMUtZcxzSdOA"); + a("34Zpt1XpfIcmA/S+F0Ufg3g0XcG7tZQvEVvbEc2di1SE/kz5EZMhi3GbnSeybOx6Uk5Xev9v4W+34Zz97+sEd7hX+r1EdVgbj7"); + a("aylGDFNUo9jWVh9XDd52JkNSozhbOk0ljvB2jpOrmRl6MiKXzqMy7EZ4Daq7l6vTncvx+fIDJ2J2QwiSX6mS8KM0tkfL9mhHbd"); + a("dO3yCM5kfSdQajUDiqu8uhF1qzhnfnUwymIwoKdwml40kIqUlUWN8oPWfJgYY/xzV6dUAARWXYdQRdk+sliakHMl51tELGgrOJ"); + a("v/2cjoxNEhkfmgX8ifWLea90mUdzKnuYC9jfd8honOkpqet1EwPVgP6OLCZ2q2Uve7iXE2RnHE7d0BMyGB3q4Tu07FMJaqHCq6"); + a("OlxAdYhfFOkT5AvKuWQaeSbbFRQT8EJ5B5la+1mTkDSFfkFx8ozX0iRczIWGF9vUs7JJn1BdO0K9DxsFb4JTDO0Ad7j3WZZBnD"); + a("Dshc0h+/gWf0XuE/olmJq5S0et9SfiHhZ4PlRN4KNnPO5c1c7PHdnjnci9Ho9eO8Nn79awb5cWqpPJx/8Vssd61jV93vCfuklY"); + a("BYM0Uep4FCjKMVR8nBXSXmvd2PnGpwKQ/6B6y0+SNl2b8ZmwBHvlcLHEtpGGAHjYEar8+ccrzySmi8RnyhxiswXIiPk26AtsXP"); + a("eMRuPriOCpekBxrRA/RNjmsSd3/w9WoIj5VDiDym8eNsRYFolMrQ+HzOddgdxYmKF5Qe4BLPBlTFk/S5CVvr3QGqSUW4XjHuSa"); + a("ax9OWCUdTGsEsKYXgZKdcpQGCoubNjZEEfFdKuWkz01dVA1h64vbEmqE41uuux9XdOBdsK0CvTTro2GgWMLP8e08JhSGC+kw7N"); + a("ACHyOojR7uL3MEvarfCfoP38cwTDQj9hr9x3qhAQIwhKypuO5D/p4q8QUtbue4kNlz+73MniXf/s6GWXm9fp4ie7PaJhN8hDj4"); + a("M2wcHaF5uJfrcmE17qjGCmwjmb9E9FgGsIbU5EKyxqKfnI3SqfTqQh9ByG0LJiacn9g3BBijjmSFTrBKrlYuuw+zeJZPD6FDxy"); + a("imrWcsEPZ5L1TjfvfJ/zx80pxraQwxREbRGdsY8pPZIe6u1jHHIEVnRTjwBKTmwBh4muRtwMj3QjffgeqadTJEDR+GN3sjzwDp"); + a("OKJYaKyhBOv/U73Qar3d8+M9fKXdWwJ6+OhWZuSGpgHO3u62BIKCY1nXDcNaklMpySaVXs9LmObaQo/O8Ol7uuQZ38XIipOPj2"); + a("XIFjbIdTFSHlaFzZMLfF9kbx8T2aRYQru8XeqIGvG3BpQfmzzE250ZSMVU2pCOnBA0+nGXRMmibcXUg5BmUOg3Ht4Ps3PJCduH"); + a("+Z+sC6qYPk72Vnn+Pa9/k++L79iN9a17inwgXZCbw8XYc/aXsqnD2Lx3DG4E68qFJ2g1ryKXVOljoYZON9XjvsCespNQgfu/aj"); + a("fwL+rQ0w8m1x80XiUaxiKEl1ZNGfEyPFYVNeJbzTEplvjpcCPBRfpOLlDojI44H76EpwnOrKxWegK6V/sXblVS/bdO+Ozw3uF5"); + a("9G9IdPPolPwwifPmU3Bo02RLLLbzDU2neajUUu00EYNlsS4/Ovr14j+dev3ycVNfzPyhfxhz9SJ+o45+kF4jx9L1BsFabxcYFi"); + a("sRxrpbDBNU77SNihW5MK8AOETAMOVzOwdTrJaz9unYHpRbqRybWZ1On9V/ILhlbRTVIA/BL991NNL9Hc0tlg2fAxBKOa/5EoMG"); + a("IUeBlH8hmQ8xSa8oyWeb7NQJ5ep253sfQAPety7okfqdxdEDro6pCXnP3EIZCZPKZM6ynT3/hNnPNtNuXr2aby/YHyhaQv5mi6"); + a("626RJcNU1Y3bBHTnEnQLZLsn7TPVZ8rsp/ryVbt/wI7tym7jfGFTvgmUb4TKl4J8ICdNnPFWU8Z9W5Hxn4Ytyin7TPkeMOV7l/"); + a("I16/kQ26nlHGJSxKk1dfoxynuPKW+HttwtrgKc91RT3puQN3KVzIf3jRGcr53zXWPKN5vyeZWcMEQPgX2NDnG2bQS23WjCtqtO"); + a("o/fdx3Rsa5HYtqHA8BP4rjC+gXM7EDwEBOelb9FvWnkPr5Y1Wp0IPK5VisC92mIRWKX9EgFjIan1g8Vu3EWVehPf7UwPHPfK31"); + a("VCxEq/m3KnzXfSbtOds5NSjAcBvoIGSN7eeWcS633o54eOtczL+90yvne1E3PibJoCrDXuwYPgyeP7Xr9QdOkAF6+kTBo45p61"); + a("P8oZVjEk/MKA9Xk3pmGSuZqLZDXmXO8jV9dOcf1k1i0AkA8b6doVG1BAv8aGOf/1GxnGNurKxGedND/rsJTpWPlEkn4HbMNZko"); + a("839+7gU0+bwTVuJHZuUk2uKzBCmEMDoVu8jatsjKTraIIkQDz0DuK9XNZGh9aA1xhw/Ma8+wCfJo1R+HR4Lgq5H7FSr6oz5d2m"); + a("keal61ZMut7L2rdtvQy3G72sGOUX9wjh5/6WZCz9JuRRUytvNOrBGKXN6U5Rcw3VbH5wd628ETE5m2gMq51iDC93qjF01V2IL8"); + a("FPiIAnPFPwIMOE5uL9aA80c8TRNJ38Pxai52lvM0v7EBFdmsVr4rs7xcP1GnPzgaONoneHiQscgkqkDMsmtNz7pdVwug5wBcG6"); + a("eVHmbRMbh22Hgw95qNOBhIUiYYGR4NUQu0TELlKxYfl8WI/prhGcjgaqDRPZOVpN5JxTSP/uYX0iA3Iinz8doJa+D9w+IxzJRz"); + a("W8FGvW8ExUHC7qL02PcXOoCTO3qVruGSg8ggo7BW15UYjPqvvTGro/5da/63mBNflyAStd0zsczDCagkZUNJDF+G7wPa6tuKM3"); + a("yl8tntUOGXjOUT9/QpbIU6v5WSdB/yqlr2xTffWdDlP9flqi8huMkk6ZUNpt5BDnGP6sWbLaUTG/ZslzjsD58SEMAcI2qIIRDp"); + a("yoZ+EFcPObvACsxbQVb1PZOYgMzmgLczI1UDHJlNOn4I9Zlbh+Ao/1O58PxyeL/FtY8gvfC0vq/PJmScFn/5kDjdpF4g27TXsm"); + a("rAi37fyTFeX3OsFWfGUe/zwPJKT3uoX889Qi/nmeUNHsRLDbzHZkGDIBg6L9ghgpk5C11W4HyyfdmKHQ9KkTgaarHrDSm2H5gt"); + a("6MNtM92PMpWJEyYYpzeqbrVg9uqROjwkeq43jTwQnjFudyMiCwQPcs+RAcOyC8n0lD3WvCBZK/zLtfmvd4dhNo1KQUJo1TRypQ"); + a("kwjUH/9oBbXsNBCXvcniNPMl6vaXNcqaFlJNnyQbZxMfLLpB7FVPLqbkRlnyrdi04yjtEZm2QKO0F/W04ZRWL9LQkTatfSfrkr"); + a("eRTP4Pb5Do8X6IHvNYXzXCxP88AR04ydaBh/JorE0D8MxG1J8t236um89JzTLtPQ1pQ0TaWqI+2olwEEkNh94kdPcNND88xkxE"); + a("KcBQY+OnRmjviz9fQ+NcJmHH9gXMuKxgXwQV3IwKWBlXzm3LdxgJdm8BaobThXebJBLebv0ZPcwarnvYu/+W6J2UtWbpNmwXpw"); + a("gXNunYsAzH/4Tj4iRSyJIsUiJrcBJBg2gByiICZTfvPcacVKYJk6W8Sp9u6CWwMpnIjjdx6ENZzhho+IocJm63rPqLLagavABZ"); + a("b6O2PZ254fowZnyO9EojfY22fACnr5Hpl32C9PlG+iotBRgK0FfJ9Lk7kI4bS9w5uO6SWm1oxUC6smZHzisP22ZEVFKCrW7pO1"); + a("KOtI882lukDih0B8d/iRXTJkxUeoR94g0XKjT97ALWZt16gck+sYfa9minPiRdD3xTHLw+hyalOHiWuzhYlakP++vfiqVQ3DAr"); + a("W8u9DVvVz8V5f+x3VFQftmHAvojPOGMXuF5ImQDeNohVWB60w1g83cMVVCmgMdoHv7c+Hlx2CnZAYa+XWYqCkIYEIQ0JQhoShD"); + a("QkCGkIhDSxvReQpas/jPatr56a81tdDRV+LAw11J8j6KvNBT/SYJ5egCd2nW/a6vFRPXqtFvmvFXKvqBOBRq0SASbqi1ckvj8L"); + a("eZd7Y68B7QbpV1uBOv7HPYx2moXRsUTarI9Y7UDb7ZjkbfZHLJaDzGVu/g8vRKNASClq3CS2U166wArbA0DXd8qfC3Gy3fz0sE"); + a("2cSjkrPIbWtiUHZ5RKDgBVwwO0NdgrOJYPfYC5ivzasDvT6eQzO948MCl1C5ziMagM7rv/LiwY1JGMkHyz0Tb/slcIddyNWDHi"); + a("Tpw32ZkYf41AvHzMWYPeP06NK88S3gZKpfn6e1TIgN2EWukGYO2r1Ndn+/LqWSLdFHaTPfi7DNQadL+BWgMQBGpB2AhZnlVZvv"); + a("qDkWU7guIkj/7O8EXGGHrteWRPCqJanIqksM4fNtDU81N6LFiaaUs49ULm75oZynq49pzSZJPN5G6dO6zeRGSEeBdJ3X+nAfU0"); + a("BfVUBHnN+GR2nzIAfTJmXL1r0bzK9thE8/QLWAHa4BjnX9xZvRWwGvIZ2gooVkfAN2P3vB/hQ6CpeJ94hWTXtK9OQL7mNxEU7/"); + a("coJqaM15OiEXZ7JA/0Sv/cj0p7JG/dksgeibSfaTC3NLMDaPXMb2esgpdaMQTKNxXgqo6sSAqU2HmqbK+uNjrSVfc8r49RDNi2"); + a("Z8SMA7cZPj8A1Z0trwKsXfVUf09tzyGo9WjUyrwAo85FTrEEperQBvQ3ciFlzzBl7zayL5EPCzL7J4/0ChmPqwcpCj5jEhDx5L"); + a("utx5+Hc+Sb0O8w5GarnWr47fITl9RJ7uLcOjkROx7ue/zNYy/H2joHvEcthINEDMgeWJrVRoJ3vHg+xRKvD4MfyKNeF6wZgtwx"); + a("Q7VQDhWDcdlqMezM38ModF2J7HLOYgY3cr4u1LGJxYcQrttEt9vzeIqGiruxkkyBmEflUdM2hWubIR86DK6R/Ugt90LHKj1a7g"); + a("0WFffmtVd/JnlO74ihNA2jVf5/uRy/R/8gx2/I8sT4e7BjOGFrvDH82CHGcErMGHZbx5CH7cinMWx1yJEIKbVtD9PZQh/Dlfvj"); + a("jGHXn3ppFBC5lSJ/2lO7z1l5/DRlRxN5fnysl9x5skxn2TvlOIj4MZ5Bf2lv3j5FT15LgJqJ5Lk6lLyWRT61nX9esYipqrGlA2"); + a("lDQ48hgng4jlJ0OCZonE59yz2CTTQBRTJ8+YXpFS7kcFMO4X9ZZppI/TzwtBCvDO7B0ls1DSvx9y8xq2UA5rbHyDsep2RN93cZ"); + a("6hZHsR79dKycL40kskp2s6mmc7mmQIlxnJOOn6T8qOSRaEKE8A8piiI4jkHp5Dt0ivCypAi/gS8yaRYL48THOZvIrM0+KXuCPr"); + a("Rrpe5P2h9anFNStws8KbY3e30SLnBTC+DD3lv3deX5MfZUiZQWtST5Q1nSslEY4853qgvW8hiNQxjwXZEDcH8hooZwVn9wQU9k"); + a("ahjevatftNrNcsBuViPLlqbmoKAvr8NVdzlatVk5Ndu/2OkaXmQy/wQH9wyowzeefMMP4cuUSGrSTvJNjOKyUa7zZLKU+Qhkd9"); + a("3dVB5CSjnOJLddSixy2nxhBmNAhY/vEhDozcZVaiEltSKjc3rEJe1gAFxYsRAtZcfUWtEp08ORE8rDXC5aHTmGyyHsmC6KbNRs"); + a("piyykWf5GxXp5cv8yFcT5owMIVkKJUvq0uBHWSlRJGA64nLkKesniOvD/kV5ELqn/CeOJYx0p02eknLG5k6Jk9u0njlzbIn0OC"); + a("XE+ywWMS7rQglbmwQskoU6hEUMWzn1gv2/toex/1mzflKLU626h44ke1YN1n34sEkHaw/j2g97/0f2MC5Hm9qMpt7/wB6G/uUw"); + a("jF8MNYxfdHfo2kn3PNu/7Qvze+gwwrZzB5vwII6/zJ99g8++MCe+vuxfK/v0lxl/P2D+H5FMQxXRG3zL2Ggh+H5qsGcofdR79z"); + a("Mzzaz5zfDsbmV5Ihf83etj5eP9c5huve/C53ut1vvSbpHHF+ypvx7E8tpZFL4aYaUfbCfLfMtWpvxi35edKNzn+/L2gbZEla7t"); + a("sqb27d9dqL+z2q52+0DdR3KqsIevTFLw2NgVuu3+7AeyfDr+RobSJ9OmUweanXUkkHdpAxXYICFKpZIHUB5x3xFMG8G1twqUyP"); + a("Io+b1rOPYyWdZFZZtQln1lo+zJVJZL9W8fe62bSteitG/NzAtvyX3/9atO8u3+0tf0z8FU1aGoylgFqv2d5vaHUw0FVIMOwPa9"); + a("dgDs5/NXb+xXvtniFhKTxCUfOQGNicNF8bkgVJtvEbpnhxA4QwmcZ7HpddG7pl7kWlXkfVK+eVAVkfNWTUUCpiJnqCLrqMjVso"); + a("iaeT+KRLx6/mEq/2zKf4bMP0SQmXGUOZPKIoD3uwHcEs/XALlwtmFxWMSsE/mz6a2pPAl/q6unUq28Ca5NI0m0CrkR2Rd81zX0"); + a("tazXURONVh6FQBQqFdWHUvlkKv9rlHe9yKYPXuvB1bgQWWiDrjwSASzr6uoxlDeF8s5CXtGB9cgqujaCEk5OM7q2pceEPzb4q2"); + a("+YbEDu6AfyyMUS2hsUtG+lGtAOJxBOk0DeoID8c6oO5DgDyFGUEE5V428GMoG/6W5sEMbbYtWhxlR6VVW/TCVaYKDhZHyqmq34"); + a("f30s/ifQN9cdUquVoHP230AvC1427OmvdxYFO4M7a3vGXZ/cE0l2Pdy8+AgvG0XnJreuFsZ/eH5RksvsH1fZIlD0SUQJf1Z2lX"); + a("GFkHZ7pPoA7ZYDVN2zjFXCqnl60wjO8Sk0vZV9T+9oyjqEsu5K1gnzlbC+ARcTI4UvGUWcDT/XOf3Y71h7CFX4KCqUwKWFqqEQ"); + a("8a2ofihXf32Gbs1jp53891d/Bs8/1686L2p/+keufbS9dobfVr9d/6NB4Yddv5dtXVnoYyhtYtSFWb2NbFSQvtRixLKFoioZuO"); + a("0qpwisrNSTPtcDu/TA83ogxSkDozmQrNeTWsHWjqYjrWL2cRF+N6Z3hS6XeF9R+J+EyBncX+mvnCKm8fDiwjlkLZ3Bms1Hj66R"); + a("+ENp7X+PSSulNPSS035AWr2RlElJHzlknUti68ylxEZZbizSIJ+kp2VT2iMyLQtpLGskE7Mo8Vbl08RjSc8hpP1lubEnrQJMvL"); + a("Q4XXC72FawvPCCUKVJR9IO5Uj6vD1KC3fqaNJvqtXP3Ovkmfuxw5Wfua3CDgbb6FLr0X4+kQYoyPlNuvan46JRtiKhziV9+3uK"); + a("XEo0IbifzslsXGJSc3HZel9e89JhMGjBFiiEvybD+oSzuQQZMEIbZsD4xKSvipxlY6mIs4XNYWQGhqpjOB9Lq1dZDKTbzs/1MT"); + a("cpZx8n6P7pT1Xaa/QTTkR4Doq+/J/uX5WPxtiH+EHhwpEZwIXjaqz3r98f1rd9CM1iH6LFk+P8X/im/Aptas1/+0/uXzXk/mUQ"); + a("G4O4Fl2VNODoR/u9byXilzmciew5XHsqnQe7E9pzUPNXJP2F9j9/iyzzR5feHnqaUab33f8j+4+Hkv3HZ/sdbwyrD1wkn7E0Co"); + a("KNcPilD0RnAQZiMONNI9/QzNnn2V3A2PXdjrg6gb1F8/6zYm7/tiU6dPtVs8Xo+LmJl65ijqUHzEM8l3GU7xqmox0x7xzdQkNF"); + a("Y7sSnTJJqbsK+wJRK2209GfWVf+P/lwg+lPKTUSutPVnydV99YctyH+oPYawrUeSR59v7VNifrKVSsbzh/T446gS7oDV9Md/34"); + a("Y8+oP92+MLtgt7GfjhkerQ0W/aFKDfH8DIpvEKC8Pfc7Wo0u8y3pOD3u38rd4Us0HfYrUg3frT6EXKJHhf/c9U/bfo//7qoO0J"); + a("LfuM9g39WezugLG1a8EsCckqMTUJ9Hevrv132kODXGrNLaqx6XpjD1sbi79/x6BRm/TCdQ7tzQ/hERMPhd862f+W+b7A8uK4ps"); + a("AHImWcdAqLerP+bpqQLnofqeQLcWOYvtrwZd+/7f5IfWw75jyD7ij/PM21e6NQymstZBeorYWlBE1knMooJ5w9kwRnZwKzgoWl"); + a("8f2VUmSb4d91nqNijnD7N5JcjQMNt2SSvcz7mR2fx97/mBPewCxl5uMX5kqG+cwF5M9LPmPMnsfGlsnrtr4v5cb3D058UDxf78"); + a("O0WPW9Mg19L/WG34Fwbt/rSTnw75ThTIt6Vwe7osfLegoHhP8C3HqNj6/ER7dS6pJabHElOjSdfOboruNPVUts7myJ0B1chr1e"); + a("/VQp+HE1av/RNQfzIFoi9Blrve2m9/h2o4TyxNSkzbufDKS3s383IbUNmYLPr9eR7KcK3WPGt4OkFGwyElK3jsKhuZuDpXNE6K"); + a("1gaalZ3y5sHW+rCp0BKcabq/DMCXo3i1Ap9CDDZmkdCsMhowoyQtPQKx1TAK0zzJWsBCFo3ih6L/qd0FrEeU/ZEchCwr6SqCGS"); + a("oeODXukwoxb02NA15r7jxLiR/QySlrsXRAy/Yhoy9VrUNiTnBy7pSq7EzOsVpcuK5h2wVGRGq26JPfw+zYELew3ssZxXQE3F2s"); + a("wKnVX6Z9GFP2cx+1mQC2myOjJ891nUQ45I4b1QpGeECufkF5YGBnA1AdgYbUsqDxeFZs5Rb+dKNE6USa0tnOMMS+ZMiVRnScVv"); + a("zU1ZsF8vE7YfiM8AYugFo5b3GL7/hTxKPe9g7I95VL6Y9LJNRhafrSp7ffEyx02f1096pyNxuuaw75+sxND7WmJ+lVxT0hhvDy"); + a("mvbn1I+mOrmk9O4aTQTpH0AhZm/198lMbqGwn6QPvfKvYNmCnj/aGUdoO0kQwlOW8nPzWG/32EbeSuXRhVszrQUf3hFutyUVzS"); + a("aQ10B4JFdxMZ1B4p642aOmovby2wGAUoTpJXzW6MBVVZ/fW/+nMWq6jXvDdxoEabzoGGJVTlKk5tWEThu0R4IYWzl3F4AYXHij"); + a("CDsEjkyabwL0S4vRfh+ns43EbhShEmezOaR+RZReEJf+LwGsqTLeIbKTwWYQW9zX5UDf+UaLpVNZMsYb38rRG/rCIhg4tUcKEK"); + a("LlDBHBXMVkF0Rg+2qSC6wkG9J6fhbonoNSpHowyGDQ//ruWrRgm6Z9HZ0am9j12nz6JdBmo8rrprkT2s45j2GKsN1nkAmlBKud"); + a("4NSn2tJOFerppThTUFNDdNlPdqqBj0bzIHpZI0m+TQJEVmRGc/ReTDZzv78NnuIDhWOCBRP9p165cZSqJ+lMMkUa/guxWC+tis"); + a("apZuh100iZSZlKpdxSntkUFiI5uAMISY872bA4NPJya/q+5WVK9P/jhIjYo9oHQyaLeOH+m/JPtIPMLy2O7BVUcvtOJnVOhuhG"); + a("3rQe043J/pTtfN6AD6VZE9RdpQp982+k1yLa+n3yHi4t31Af4Y+yaJCOrWudK1e1ey7YpGRFZkkXhxqGRzdG4jKwhJaVLtX7Rd"); + a("C3xT1Rlv0geFFlKBQgGBIoWCPGx9QSlqAw2mkkyePgBxs1rYg+mwUaYtrYRuDbEY3XROh7KNaTenq9NhcQotdW15iEXYrOKjzt"); + a("etAa3KpOJo9v++c27uzU2atJvj96O55/Wd73Xe53zfjTiP6vwZYGBSwBG3UsQmHlssO2Xcp18g7oci7jkZtxC2duEDhM0RXvkw"); + a("T0kHksYkOkllYGpcJRKAJZ3aXSV/FtYxR3nOJ3m36pcE4n76ZvAHv4rMJtXWSOepYfwblO1K2BXC2ZutnqWbESLdy2RanX+MJl"); + a("+hzg1ZX1hWiETYuLfVl1jOs9XdMco1ksBYqu5FLXeVtwkV2IyAiu/Zq40qwEJOXMsq0GBQAVnop9ezCtRHUwFg4axnFvyyu3cW"); + a("gP6hTL9D7nfxXds1uDXC5I+UlWdQMpJ8igNJ/jTdS0Yf/TZXvUl9gGyAa+NK59prOEquBWw+XgHgYzuvCSQ6tzi80o6fvGUMUy"); + a("/ApfJFKgqurRwqDbjk23yWzU4Kucu3x5WqZKRBOx1IV+2qVcAhTeWL+EThn4wbqnF556qIXH60JBqXJ6yOyWWJz9Je8PkUN5jl"); + a("t655Ty2JDpedy49Rk3JfDUuMqs/ZZxnkKSrd8ZjWLuTwNwFMYSmP1ktZHRBvRQG9mst48WSw+btMAiLwI6A9s5aPYlWF356mU/"); + a("ifpWmimLYyoiiG3xRNFA+sii0KqXwbqPev4dFQp2rVNEqGa9sGH6BSVm4oaWkxeHvAYmwr1Ur+E720lUolE0n+dI2FFAnm7bqN"); + a("tx8q7V4UX4WAjm3ftejYtsqise3ktRHZ9lZxNLZdv7IvbFtezdSfb4lCva/zlSEG2sVc6eCTQDVcieTs6Smk+jM0Dsh4smdQxq"); + a("ghhB8B6kdlIaxYPUTHisVDNFZ0XhORFa/eEI0Vy1bEZgXS16q6UDgkhi7sGcy/ZP/gpTjV/sGb2uKyCV4QlUNrwuwfwMOqxkMx"); + a("o3rwOZ7Q0DdmPXHIiVCtCCWLUJ0IpSHE3C40cJvhLAqBo/To4XT16OF0I+QfLg03Bm0x3DKNuyuKQxLhYa3nhNdmIIEOO/enam"); + a("K44eqIYlj4nWhiePma2GIACnGqGMo/jzZ25aeGjt03PxKcN7IObaYt5JAR3ClyiPede8nOZxL5+90iZpbPCiWg8kgyUdJ0mfRL"); + a("TuKCao68vZbNmzjaKWaX+dbZlqpbOGYehZJdJXKeym+oJQuu4Ha2jb4ZoEyV7JvOqfxNJo2vKxZtYqwEJHHH+UaKvYU/hU25Fy"); + a("kRjWYnQmrWfE63bE5P0YT25PKIQnvg+mhCy7g6ttDUBHL5DQcMIekFscasW/mKm26+//ZAsP6urYL1y42paxOQWixTHeZgqmZb"); + a("jaVh67ZsnolU1txJ+NB4aMePkU2fDOQcdgEomV9AvYE4XvFxn9W1jPggCnv46XrnQXHPmUVAuWCrGHykL1mM2Zi+kd5cHF7OB0"); + a("5cEMrIOsPenSdTpNSDsNLKQyjWeadksfAIzbldmZFqemEaalqDIv6Fvqhg5yOPzMCIMEFqDM30UzCYZoIH5yAM6igaj8sk/bTM"); + a("Qp8XpDoT+hFaAV4zLiJcji2Tb+8YgVDLBXcma5o5bGlEzfz3qmiauXFZbM2UmInzlhP46H2M8w8QXJYMmR3QKlX3AI4vgRBlng"); + a("LkwfGLAW1e+ttWMXfxzTZ0uUdN3JDNFg7qEJLv3NRNDu0hW9lV2qRM12/dj/4HH7zl7eMOSFL05gm5K+j+BDH6VvL5AHD/Eq9o"); + a("JWeBMgY7OwTspQArrMxhF8jOaWJfsobgKIGfBqh01ZEkTU7fXxxRTstWRpPTP5bElpOR05tQkU9jEE07r0Q3pSf++g8l8c3gAv"); + a("yxTEsKHQ8sD3Bvj7f9kXj62f2cmoFUv4VJKi7IoggGL37yuTDuF8rV+75EjRPfWRSRE1esiMaJg4v7pLGZKomr/DHWr7MSQ2n2"); + a("bxU93v1V7/dIsseGkL0/mKGjR5qu73JvyIqTEdpkbQtDmMOxrsHBqVhzgsaC1VdGZMHl10Zjwb5FsVmw5X7ULThwx3tR2+ysBO"); + a("O8lPfk3n+A+2T6xjxgKOO8rRUh2ox+bRPsorPv9RezaKwSRT67TlhP+SCeh+BWMUDTD98boB7BHpxZ7DbOLL643zCz2HsGzfnE"); + a("XaL9PRQyfbCr0wd32PThR/rpwxrqbQ3Th5QB0aYPJ5JCpg/jVorpwzgJSCIIfhnnD/aQ+YNdPzD+3awJfJ0zosCvujqawNu/1a"); + a("/5w+tZ/Z0/XGAWWEeeA6Src4BUczhx3YAdHO79Jv1wb3KGDfcvsz+82OP91gnoe991/lfj/R+c/RnvD04ke+HO2OP9Uuf/fbz/"); + a("NuHid/Q+3nvjNE2auDCiJqUuj6ZJWx39G+8PfRCt7+Ch48BH/JKiUrMMH/t86JYY5z8bYqRX6tLdndeQu8/tKEP/KNzZchu1Sy"); + a("38kSE84HZ9OKMzOzM0/JEh/PgEfTitc83K0HD2qtDwRwjr6Vc+vCuKf0k+n+pQznfzqsm7ygz7XuXsYX0PTKAjqhV7hko89ubC"); + a("DZSGvR88UELHmF/uIbPH/tUlvqLiZrwLJYcQhxXcioSBwMaOBIB+/wW0xELvdHNJYd4nrgm4ki0TDrzAryTMyejo6Q30E0vRNr"); + a("J8Jda8f92avMZWU5pl8ietsdaUZQUK806VPyouzKUX9YS/CAy/bzJkTdT7Jp4jutvj+7nEmyhB4zI648Yb2Tgka93vuFNpN1w4"); + a("CffPVRLr/QbqLPQ0h1V7k6wWzthQ8+O6mh+WNRvfQBjlYb1avWni9DTbPK+wPcXLAdWdj+HvR1QZrDPhXqFqjm59oRmVtHCMbP"); + a("QQGO6+m8oW2HJPSLsQVvffTJadA6yW3ybdOrFg85euEQR4Mq8wh8GphL2mzBwo2El5Ck3d1TiIbjHZ8o7zeaTghPV6TURSP627"); + a("yEIBeqC3b0IPlBd83amdj+eyS/OqfeIBMo7K5Qvl27rteW87LI5mh8XZxP7xQM14+9QvcHuyfAC/+/QPwffGAbyvg7ekr3raQv"); + a("xzCi7l7cdxyTH/AOWPZ/eQW8F2eZcG98OKPK1csRMMKfIcRsXCj4Yzr9FpcRx2WpxtucecVa9uXORfUOLbYirYcn7B7ObSmbCC"); + a("1G51+79jdX89+taE6fBljpi3gzFJBZWfIA5ZXcN5H6rRZHfvxf8mU1HeG/wOFr8bLXyUddeH9Hdql3+8c2qrs6ohSBq+Q0gDUR"); + a("H6v0D6YCsJdy+QLx9QL7kClAfUy6KqJyE1/wcFfcxP/NlnV32LWN1fmcqTcxo6t5F+QQ1snv1W92lcqr+bL4sd81lBH9SmNKuo"); + a("+Jhl56pRAbef2LE+1f31OHrs7s9EyHJfA3TTb8fdwbHIV1k2KjDTNcyGA6uLbHmvWx5tAGSaA2VrQHLcXw9aP9ztPysSMBRMRX"); + a("5b3huWe+4U8yfJKKP/i0JDe438fh/vTRT4N+wKXgkPtt+qgCtxD/EInZ7swFZg7bSmsGZNwFb1vuXuDdSGXtTscVB74vsV6OZQ"); + a("pqj4ZfvU/eS5wf2uBQ2ivBFZtqQmVzvSAvbGTxKoKR30X0x36nFo1WFBh7kCWSw7h5vVq3iDeLaG42ZvPGOwT8mw9XBhXHVztX"); + a("AnkhQIfYjv8IIg7zpDb2K4/2mwX/AGuSHaxS+IsmkvwtNc4i3vLsGbyvm6F+zX8XX+FO06//xD2h6r5RI09yuWqnusf5N7rO0n"); + a("0Aa7wg0FaO8DPUfQUTpqUItA4DHsI5R46QVz1asWW5P2sM5433BetPutTFvk53R/QUFPu7sbmnxaPP0oTac/q/jtB/kB7fwn/q"); + a("hvGTRrPEbyE17WyE8jE7sLlxhtMb0OX1rsLTMWrO59GqyX8gErsNgIq+Y4zSyh77FgHT+gwdpAsJ4Jg2U9rhp4eTzcLkak8a9e"); + a("6SmQ/uf+xR81lSio/Pha/q7m8w+RwaccLTBIxmjfr0fY9+sR9v16hH2/HmHfj0MHQj3XuXJ0JvzqxG8V1S8/qXr9Eai8eX+wwG"); + a("AwRHq462De8O11zVpgZ0Wqup7wp6jrCmTlS3b5yxsqUghUZVlaYJLrQ3wi0ta+MceBq0LSgKsDP9RYmQdpoA4RPoyksuWutkKv"); + a("fbIk3BCYUR8J4EP8WqtfmjvJsmkYhDh9kmXz14PwO770SrogcHu8uChwXoL4/Yh+kyybr04S4XsSxQWChQPxiydLgSQRbjGJcA"); + a("XiO58fRPrMBpzY/m4KXzpaJO/ptfJ0rdhhTg6ag/LpzEH9LVMIHp2Salj0c7uIYohKwlVQ8hYURBAPbAVZN0eqw1uIuaA3cjWr"); + a("w6vxhlSzjXZSi+GK6vmzZB0poo4r+1zH6fFhdWSH1JFH+8Le5Ts8bafaLUVtnuU77MVshLdOUyIyPLi8luIqZ88onQYp1z6fg7"); + a("pY7rVLucf2OZDMYCH5Gy8Df+idtB1ZyVMXZ1ebzW1cAt9sArJO7j1WLkaZ+IG8pg7KbcygcHq9vYltSDit+ZfraXUuQxWtBrHV"); + a("D+yn2GaFV3N0gb6aD2nSf6NebMv6W8eRcWF13BJSxybUUWKUm207KqjTzN9MbSMDaHgfoknr9OJwae28BGzx0Btl4kuqxHl7Mu"); + a("O8IGg611OaNSUCAWmFcH6Dm51qDRnZ+EAN3HPmzwXomQBN3IiXkBcki62uEYiPDh3XSOJCwdMNTeVfk3VVtOejigNi71WPf8cA"); + a("xv9y3Iigk/he0bfusgBjKKFKwNV66HcQ9HVJoQRUATSfDSE+KnjgnxwGf5Ye/mjAx95xSjj+mQL/+X3iP/SEYT88SQd79xzg/n"); + a("RiKO77UBMfKSb2gfnJetgVetg3zGG8lyaG4b02qX98j1f58k6WDr6ZcP9XQijugyXubyX0ne8a/D16+L/JY/x/lqDiH6ykNpHx"); + a("t/e5ggS1gtX6Cqx5IOBCSYDKG0eiIOBsxMfkjxH8nok68P+czfgfiVfxD7pZVxIY/3P0MHlLQjWInT0PmDWbRC9olqX+HKGUZa"); + a("eu1I+olE+WSpKlymLV9QSVWiFLDVLbvyh1UXgpOceqEgc29K0CWkKjw1kS0EAJ6Ex8OCDLczpAjqVhgAYu1o0BFgno2fgYdBxZ"); + a("hFL3yVIpstRGUersiKWUgllkm4zyD5X5vyXyj++tFj4f959HCjNYFhkjioyJXMWJMqNNdOrvoVgwPFw6jLx/5NtqywfxwIAEsm"); + a("nrrAWoelIh0acq1y4AZXebhJ4mymp3QC3CqrTWp4lBnIejCSP1ltbr2D4gjfpWgNLmXSvNjP9YPTDWb1511qbxPhtyB0fKc0WB"); + a("cRFaxGwqMZ5KTAeuwfGb9tCj5WbqwYeN07GDYauFpQSVhCEjwkhIIRI2Sq8JvFswkPxj2d0I0VyG1hSN75rFWuPIP+15p29Pss"); + a("PVT9lbajXlA5ANDuN8VNt2XW3b08Nq23Yp5D0M7ZcisFb5+1IsXZIv6gm4y3cExClP6ESsGKN8XpulZgfbS/5VnOtKijJO1vDY"); + a("TCeoVq1etSefdGn4JOBpVOt3xgb343Bw/7hEnfkvD4K7AeBK5FoAaRz3LREnjXh28G1sdXGw9SdfyNPUDXzpBmslYcKXf7BWEi"); + a("Z8DQY5xXqa7b7lHBPmz9wbagMui+rHC2n2Vv9gNVhLQTXQSrtWiGjTIvLtSsUQsgMPISfY84cnl06ykWFymWNR9y42S1JFz49l"); + a("dWvbTH7zM6bqdoM9HCN+tAvfUlBLszsu2VKwQ/e9nb4xHE+hXwm5AGxS6yUz95VlZqzEEp6Z5M+DwzuFDCbQb3ec+N0uf6fgN6"); + a("QcrBmaA4ppGEwqNFl2Nunx1JvNs4ZUNNM1XwIpUFFBLuUJkwTu3jAFB9MSe1QpjQPRg0COxGGDZ9524669Vp/yHT0k9LzhpXeo"); + a("0MVbs97ez6DPS80yoj+D3NQnZBH2zQW/MvG3Sok/VZfEIJIJanR+zClNFRz4PXUKBsIFn0Lzu5ZqfMoIybKLlzvWT4I6VFwwRS"); + a("PfM69WT3eoEAw8MNij/VZOtP16tDendA4jvbsQbpYqJ9ChkESP3te1+4eVaH7q1MpDMuUvaqhIow5iS2FaYG7e7Qlzc249bMyx"); + a("caQWA7p5vCk6Ie06Gjl2rqVqlkmrUjTkIVrOa9r8o3ShWh1utUbc2iuS7PnXKJHq33dcX3/NUhPobdNl68LxhBhGEszoBcWeJz"); + a("7oEZuSBr8RtHF2uf8mX8Qyzm4afTzWKf5VEdORSBsm3jjYcPDnaTC4y3mPMmToMmSEoz/oOLWFELl0euNCJNgOBnSU/1CNwdWa"); + a("DvzSfk0wCkE9aNaeRWJQUMi/uNiXHFLAMd1ApQRnpbAdedvEcIw2+LG/zltFrLKyF79BGDLRNtiM51Wt2Korx9aj7BwblTYSTK"); + a("/7cdLL9/dnaCre9/019p/RI/xn8M+LlZylppZ/+DIUWYqweV722nJwOP0gRXhds/XO70FhwZaC+GrbSZAKfZgmbOokSgs6MwbK"); + a("j5OD5McsTOI6t46gfahCTxd2X9dnIt41ht9lnwmUJuHvsI2Z1heHCZsRI0p8wXjLxmTri5Y4raxl07/jJNyH5Rbut+DPzlL1gc"); + a("BtW628XVI0HYMsjSTEWnbbwrfEaCXNB1yLBlhZbkUtDbzT8EuIvfNrROhgJPYGY0Uc3pk0CDhJztx9KpBlBGSnuA8hU2UZ3rkN"); + a("COOvJxGWJehhz80TSb1YBmKbg9IVz0VaLO90PIglhP+6Ej2NN02LQWNyCI3wtwOt8Y8CDAFYTH2FXcKprPb3UzR7dcosfQPgRD"); + a("BN76V++1zyUt9CVznODEfFApTSiYVqUfFrW5wn+ZTDWNRGRW9CUZQMWLZWoOSamtvNOK07B7z6/oFBWgl7cTMMOZsDpla3koO3"); + a("1s0mLS24p4NMZKunWV+shXxeiVEPc/0m+6l2TxPOrhFffARn1ziY4Umjm0xYf33asvUOfFCk+2OTxn/lFqwoq45Z7u4ExjjxKa"); + a("YTn7JLd3OLBi4qvV/lEb2vSJbhhRSIp6M/65ZlaYHqZckBK85MrXknKw6APrXQS3l6Jln5jEmjAJgK7MdSWf9Iwv21EFEpbnAw"); + a("rECOpYoVN5xLhGDefsvWN0OTa6ymLWDwHNtJy+ZGGsd/4Sg+UHRKtRhUk77KbsIPK6qyaCCqhFIK9qgd0MfnEyL87SxuKUI7lJ"); + a("xQGoCiSu/R2cwk4v/Uw0FWDQJZjuImx9S9YD0x7CxmmFro0dl6Jrm/DpRmqkmbQ+C5O03NMPidA30OJ93zD3+Cz/2JCcZ6hofo"); + a("FnOs9IOQOMkNVzwXKB3u7jG5srUclXNmuDIkDuDOanLd/d0paOr1Z5EG/UOnPedfjOhfIxrzBqN2SRnuQUuBgQqD5iomgdjBsH"); + a("gVuXERof1IQAMPIrWEaa4xCKEnMJTKRyn/OaRlY2ldFzHPSOQxApVIvkL3vf6axv3cN9BXb5vcv776xGwwORDaV187uZ99dS0B"); + a("eb6ffXXT2Eh99VvnGfrq43PB3u+E9NW7JvWvrx44m/rqsXL+Gd5f/xjpeg1Ff63vvme4snTBDeaZruFqI7oMI8uW5SerF5n9E/"); + a("V5TDidV/OMUfOYfJG78ocuDo4Cz+CRDjoss5enC+7uhI2pvFkn5w8Ru6UWOksp5nT6qplnIlMs91OYwbC77qdIBMU1FNR3Th/N"); + a("1zqnZxIidU7OmfrOSe2YskngSUA2Qr86bVZPb4hilMks4pZnlmXkQc0pauo7Bwu7DU8SlqYg7lsfQXykjvonNBkqp7Gk807xdk"); + a("llGyb5DFeyzT9STRgKfg7VEtS2dVxtW/fItnUFt62/G9qWdWKveucQAhB6R/ahIfTOw4bypolR25WEgXYFAMsJgA8AZGwv7Sn3"); + a("VWpKG0ZHakr3TTc0pV/noSldBj7pcFp3Tp9p2nshsvpCGoprVITmdC7vyUSe8Tx1QVDXW1K0Gc+pXB6M0EwwekGeT6T0TZ4WyN"); + a("PyX8vzRxP6THvzBRHkmTuh7/KsuqAf8qzNiCTPveca5Hl4Vrg8t2X2mabPz++bPFdc0Ls8386V8izNUGU5LUc/5/CP1vpFbQcQ"); + a("ox9KWd2fxvtX8j06QwtXx/AZ/LyjAJ1uXOlM+rLsXGTW9U7nnRupd/IAYR8Bt7oDporHOq8j69qaLg2TgBI8bapCjdY6CIu+gw"); + a("Bv+6lTY8f3mf/rcyPo1Fvj+q5Tubn90KllIyLp1A+nGHSq/KJwnSoa12eaHskx6tQMy8+bXKMjqFU8sEc9kfXqJ+eF6dWRGQa9"); + a("Ch9jMPgF9Wq+1Kuo+vNpdiT9KcrV68/uSBXhCt/GUZuPlabLMrQ/sYlPV0Gub/MxSxUdLPH6HnGlI2CxYg7+r6bLJo/RRRk6M1"); + a("X55PByTrZmp0pon3IruN75myQeE5HKz5g0TLR8CynfHcF8wjRVVZt4oTV5Lr/Qag+dPHju7xBPtiiXBkoOxvszAXAq4ac1XQ3i"); + a("0XwNolZdNHh3ZPK54muJkiEFprkWy09bEzWrJEpcqJ9PVFMjqqkLraYewRCkGgRSFSJ3q8CizoAFb7CfRMPks2UBf50o0RYKv9"); + a("0APypdvyGIJkCMwPch+f3n+xKC93SCAZ4Ro3ZRwZPwDx4DPzPB+w7BQ/5LRP46I7h6HQM0fp43JyY/d5DaxSeo/ByLEmHo9k9P"); + a("lowj+gHcF8IyydEX8vqrd+ZxRH84PKPIGfx1eTH5+eexdF4cL/g5Q+SvMwq4XoB7ajYnN+jqisHPZQT9GbPKz5dn96r/eIcqoR"); + a("srj6r/Z5P+S/h6CdUJmP/GTnmv+nDZ7Jj68HOC/4WJ4asANOiPSOhGjCX8d2bFhH8hwf9Zb/Av1eAj5JvVf/4cHQP4F5h65c/c"); + a("kBoOXdxf+ZYS/CNxqnyfjAIg8RYkRmn7916s19UGQ228z56E2vxrkdd2cTRWJCaJ5MhtYmrseh4ZTX07Hfx0w7Z76ZzexsoJoQ"); + a("vqobphcyHgqLbZrleiHtSyr1X+EZvu3hcrDae3hvc3D8qjgCO2nBPy7Kw7wSXfByQ+b9YdtRUUbNmAVekFuBOuvqP4R1mJo+YG"); + a("eS+9CHZPHUim7DiHLzhp3ZWJ4mQh3I5zh0kXYSOr4+SZALmXsiNDi5Y+RWlBwnzsxE4OWH6LeZTVct/fbh2AuxN5H1Y8Dtptm0"); + a("+Ujg/iVzocky79TOl1zFJ8hdUKn1Ks1R6LGO/jt9KFX+/yHJwZzabpGhUWXqYcZJa0kZzaKWd/pJ2JGO57s81CWZ4MP3UTkIRI"); + a("QF77UGW73r9BQTXuibcQUHoHM5mmjpd+Do6Y2v0TcBYh+Fgw58J8V5K9JiHfn0pvYSrn5se5Ps5tMPg2CD3fpe3AZ9CdGw8rtf"); + a("vvB9xNCezvi/xjsTlo4OwZbXeDqQnMWuNherh/Bok82RnPrcyPK51OFJR9RjK9xQQ7t/cG2NcdLWPOcmDTXPhsSIElSLb3362R"); + a("YMQfjenZbDPee6h3RBuVox+ekeRE848B/x140QJXeyQKAS59DnoiBzk2w6sIuefympXehAEFe1VALLHEPbDPixAFZRLHanQhRj"); + a("NRb3zvBvkXevbhdl6OvXifswa7wUBTs+4oxW30NzE0hr1i6CTec+0nsNobguJXi0xtUpf0dnsIV2UlQOLX8lz6r0+b6HKU0olF"); + a("CncPldHtJw9um2yG/8G3zmgo6fBBeh2lf5/T3ZfcgUCcK1O9479qLHunXo4f6WfWk3gNsnDFv+CKE+0c5soN/qQuxpdRmuH45V"); + a("D9X7+p4Wc8T0eeVMrTwnm8gz+dhMBDlxJDmugghfZ+W2wnA/jntp00AaWXkQM3bE7avak4ck7fzUEbggl7g+9CwcqrvjLFwULg"); + a("EmR5WJ/Fg567/GRc6VQkbOIEJxISb8cnO/xN2I+E7yIkXkmYscZgl4W72H/UXyGX/OtOWu65WbwhgivExOPdmkc43wjmqQc/wv"); + a("kF1QfwGQBIrShZ3Qyg/0hTAPnnc038BAPFP8syx0kF/xI8AD/eQYyyBUdvVBpjythDiEB8C8WvRzyw/StHwUfT8CZU9SRCQrPS"); + a("WJLrxEjXrR0kR5FXJYFdeKxXffo2pY85JvTpnKwQfXp2FNP+5CidPsVlhepT10SDPhnqp/zKgTd6rb9jIun7G6L+5yeG1H90JN"); + a("f/8khd/Q9ODK2/Okb9lQR/oaF+4/0P5LuG8g2jfFI5ae/OdhJC9dhOQqbd55iBS+pe5bKxcXHQt8T170JoQ6nUi/lSuctmwgkd"); + a("l1X9bXeRfp9AUXIOSPqtfHs+2X3uqngP8NVrJ+Q3b05QZXafE1SZprmy1zgXQDVxc3ut196bAUm2brCMKmpJOMx1dyeu/4joR5"); + a("zivStk3OHySPvBUAz4n0KbiH7K59bn0/7lNjT1Ot5U7bNsvhFx9Xq6JT4vTSDFvfCwPe8L14CC50x+a4mP8HoHnGufQPXhTKmq"); + a("oSz7eaZF+O9N3E2livcXeS9spYJJVDDZBw++HQU5gYJq4xCl2UNXJ0oOvL11Y+ybhHt29J5sCt3/akU+MptyF37VgaizlJj8Cb"); + a("vB2xvM+QjnLB2k/J0T4v2LlTtPh2a5U81yw2mRZaYy5UxolmvULJYzIguMLl+gVuzFr2ZcXa+v6ZnoY9jd4JqrIj+eCtdfl8I6"); + a("7GlzeJo0f8NwIawOfpnSCnpIf+WJF32IPRMypOgiRDeavLggu9ee11g2EE9DE/Em0x+PZ5v0unOqo1gWWZRJZon5fe0zJn+K4n"); + a("j3DHoz2jYqqH5bnQdnBwKQFr34Y1davfsLeGpQH/zhQbiGN9WCNITIAYj1Ljw2pk3EQ9LrcSD9siSokf7Rl3xrXQG8en9qHel9"); + a("+aC++ytjPG2elxyeV/BYLQa2zuKDQWzvTQzDNu8Ly5Vv45Uz5mlNmKexIZkb0EFJHxlXMx1h3spi0/N29v/Ibw/uvkpu41aUwP"); + a("/1hMjcvisCt43vc7O/Sf4ydpK7QezyE3rl7jBwt+hwh8pg0+tnAv3mr9eaFsXf46EBfZhfRiWFwazZHQg6yBiTLceF+wyzycj+"); + a("FXj96kqXrgK6gm5+uoRv6644YYIfdEsL5fJdKU+G3vnUFEfN3Ub79dISsfAvRrnxI0CUWoX36zmUl7IZ/f50C78/ipYu/P5UwO"); + a("WPsuIKEESxhqE8nB4F9HTRrTSqVfguUhisSpTCvosU0FSm0tQRQhN3YU5FpUfR09Mh6VEEPV2CHoWyGenpEvR0aOmCnj89DXq2"); + a("FAl6lFj0SH9MffanVRvqjwmZQI5nXpr46vLM48JYAMMxMVIuqcPat2z8DNqS3Zg6Y9ZXCJ2Fk5+KVOEqKznOPwiwxbfBbVaB4E"); + a("NemCOn6H6c/lRH9NsNfpzC18Nea4aH9iG8RcML0YDUOV9mCs/5RuGHpGJYkkT0N5MQw79ROdqZqx39Rwfe9ytyUSqdBstW56hZ"); + a("1+1AezoHsPDLnt1O08nEBGwOYe3xxnETt0Jayo3DvpTw3hXeSvECQ+kZHfbamD1KLJjCU7wubcn7/vmGnOxf04EYJ8U4KcY7gv"); + a("ul7x5V+6VAj+obCXR5QZcXdHnXyQFWv3/ELNKTW+T5FxF5SbyByLmjiKL2SF0PkCWazwVN+AQn2mCPiajMGK1y3eCsnQq3UcAY"); + a("Nu53iI5PXylrq2VTIz5n0GfpEj6tLKfw7K+QVPWY9h4/XkycuybzToLOxZ1Sk0tsjW+O+5T+Fpj+yj/mPZ13q+/vzaLss+FlF6"); + a("tlA6Jsj38F6tOVqQwvM1Yt0yPKBPyTZRk5uXeEl+mkS+nqdo42/va5vy4N6a+pT7XWK2f4/PLQaWEwDi3a0EXPE91wflgXDbhR"); + a("++hjf0Sb3lkYuY+W7VltwHuSuQHXJ/OiLWIDXlOTsMTdYG7qTT++IX50Cn7s/uob58eBJ8CPx+b3iR+WgcyP5IHR+dHUx/ai1/"); + a("2TE8P06t6ZkXU/ZOew0NNwuIM/w+cj6K0OF3qaHJ79uPN9+L28JsuV7ZgmJWOapLz/yhkxJeoOpbioGJLaC9/Zl7FNqG6REAs+"); + a("BmJs0x3jRwAKSjbZD39dmNdkRYViTqaU9lJfPXUOvfqPXd1z5puYb516VptvPTE2+nyr//q6IUxfoak3YjyQmipdKsE63jc1zx"); + a("r5e+js5wVGnQ1vvwNE+x1g1Nfe+L11TIz1RCuvyRuDLHcW76OZOQYT9weoJH0btttCh8HDHXLMHDpBjJmagtdNYwUPWcrSsDke"); + a("pnGcFMkmnSjSO4xHzvNePhP0IztfiE+OlWH25IAk4QaEoZBFpsaiw1/RDPit9wnLT0+ZVFZ42kKaTxxWzEb9j95+5VhyYWZY+z"); + a("18rmH86cWf/Adow9iPPtyR12q5stFe3Oow7fNPk/svQNpsbVSSbdWmIizpHXn7bksu3GJGEHcdhU0qMyJvf03yQcITDbKBH3N2"); + a("gpRWkFKY14AG2YAKimpSi/xZ4hzJ02az7EyzNv4zGb8FJpuprcTmYbAAz6Df1LO4/ulo7fWp099Ie738aa29fj0qSns16Ht2Eu"); + a("t7ZlKf9D29cpxJ1PdRdpT9mVj2pcLnnzOyAVi54WOcTHrexZEH7QzoDy8EaZ85PYqyDmcJ0oPXetVB5LWxjT9FpqdurKTn1Pz+"); + a("0xORFjyQcA0GqujQln51JuC/xge3yLI9zxsr2zNqlBr/DvjIU9GviESlch+dVQkx/pzSr+xk4/zkqRicAUtCPbDlRCBcEB27/T"); + a("17dvj8L9swl4v8ftVrNuz9KyYcjPkvFPux/Kah1brl7IEO71B8ObyjnRR2DDLNr05NkcnVqwaarJgGoYlVvIwK/qf5z0uG8YS4"); + a("Xb2dKLoH7j+Vc3FmIIpuag06v6umT+VmJPFgU9kuqxehN2UI9/SwAvizCeuEwh8EoTxIRW88BFmFDE4FYgDKCxucoo9Nd/4GOF"); + a("41J9LYZFzPaE6XB+udLqOMl8lt+B7h6GXSljG+Xsa1FmzYI/f1cWTrgSm1HzRleLqhD03skNOf5nN6jju96+Ic2L4duARaWXXC"); + a("ddwdsJS9QsepQ+hUfWDQbXPktU/E8a8cDHN1A3HspgLNdn5vefAMLSLhffBm9qLfouJfAPxxWurApqsblqg2zlJL3I4SMB7Xna"); + a("6dTZGjeiWQYHRnsQ43G4P8aINXGO/VqTgPg1P8CW2uqwmqazCSScCKFVB9Ko926Hh3DfjlHyr0WY27EXGyIBr3xSiKa6W3v6s4"); + a("8OVN/HJ9XJzp8lSx56ugPeLXZZi5RezfmTc5ryo3mYmSZrvqwd97FdBuWE9ol5Z4Ex/A19QFqUrPAdS7EUQMV4lYhRjlI/yBbF"); + a("V22REEH1NV2hTwQeXJv9f2CAhzZDeaHy/m/OeCwS3DNQZPjAeDH4k3Mjj1UeLTdf2iD5KuMjF9VLOl6o/Ip+L/wn7gPxIIs4nh"); + a("Ep+Sgm81sQKJ/M5WCuHR78o7pz8junbx65BpiMNVXne3+dZpIKFQR8K3zWTv32wkoegR6IhaxVyq/xf4w8xj4V7LtcL0NYH/AQ"); + a("LuBakmA82x5Hl/nCrP0qUsy/dvYVkucP8w1cT8L1ExeGgf65JrrBJHdf2Vu6LbgjQ/sZZpltKqoUGPZdU0TCP0dhMI/dxkJPTb"); + a("24yyCutP0NTovLjHxAe6g7yDpx/DXKDNP4DuD+HTOxtrFE+3mOKl5p4WE6TM3P3iIwsfjUpOrpyMWD1HrY3HE6y5R63u9y2wgc"); + a("sdjf9s4G/12pLzE3ffjDPOBPQFPupsFAtIR0+DN1P55WmuN/FpqfqFuH9SekWweB7eZcnyG6l8ZlGNM9mbfgO+lW2tWCY15190"); + a("EyUMsHrK0/wWAfuZVobtai7x0c/8Xew5xukkS+t/o4zWFlsqsRrn2TcT6rZkpwflHkY524T3r6hxvJfh8HysrES4yGNjm+4exd"); + a("D1af6Pj9CFqREt89NYKa9qpV6hDa7lPPOTfZofY7395mR7C2uQUjRZO3nU0nEwlSZH/DRyflcHoxI5DTJf5PGS94cdfdofLtX2"); + a("h6Vtaih+R1aP6gEimSck93SdCYTuDF8mxrrZYTvDUfeFf/Ewxrj1Fxj3hY3z4TblkU8N8+Hw/WKH9N+v2iyMvW/885B9Yx9t2o"); + a("LYLyb2sOMjB5YSRCzX/8NGnki3MTRwQakhhNheG4p+I3vE3ofAi5LzDXvE/6s8N0SSZ9pEvTwBxpumvPCJUaQFQnB5YSKNvtff"); + a("9EvQ8UiuQaYGeR468X+Q54MR5TnxHCFPSSiJlVF4eI9BpM+fkCJdHCZSq+DInDCRlkSX6XMPghf35RhlatTvDmX38cj82JFVJ+"); + a("wVtAlDBe38Iy23dkhjAyn2Gr6ArtTjAaX8xsybAd/0JcSKusUtnMS3B9PVT2LG/GT8QrlJaz7TLkP/rksyYRWri6jXy/Vq2Ov7"); + a("q0pyYzoI0lA+BqM12yvafU0QQcWLPIeEDWGn52DlJXOvBgyy5ZI4rFuMMYO9gzPeozEG10b8U+01Y4ci5M9Ejs9OBUehkneCo1"); + a("AxPpEVwxAGvSGgC903+mVMye8tB9cPzuUFobg5uIfniVjkiAy3UIYnkMFaPwdoiMhjlYh8AJEOstdVhoCHAwAx+Po2ej8xjl3H"); + a("X1/keavIOwQXQAF4QVaPHvBIArwExYDSb1NNErKJYuci1uldkCyiPqGoqbKys6iysxHoJA0WNaZvpvmmViMArggCrKMCftywCe"); + a("Kxe2IIHvdQhv35jEd+sNiPKfbZfFHpr+5E4HEE/JMF+AuC+RZTvrtlvlLKV4EAcqn8DKS/vRyIavWNpxIrZIl5VMKJQFVg42JY"); + a("MAhUfVlWJJcZBbTOIEh4EO8d/pKE5guFdpgApEpoJ+9AIIBlUF5PRRPGWmD6dApJ/g3kfJxy/hOJNAXaTzn/joAPKse3ZPVXap"); + a("+X6xyyP+Bpc36/IcNRM/incHt3uWVnqslR3Agz564RWtIPkLSwJsHURGVOjytrMVz4Yf3mKzbqep/NJpeRrY/SITP2k3oP4G8/"); + a("fN9Neitgiut8CTjh+136pqU12aeQvidGO9grpz1ZXA0ecpoazEud9yEE/7IE2my5OxUhTGlLbya4t/E50I/V52tl6kcFfwyEyz"); + a("f+WG7ZXKUmVasf/yHuusOjKoL4vcu95JIQLpBEo4LGDoKaKGpE0BwkkkBi7/WzECsWSLAFOIloHkf07FhQbFiwYCGCSkzRJEiL"); + a("IIrYAgK+4yxBWgrh/M3s3r13zxyI+un9cW9md3a2zc622V1vCLg/BDwYAh4JATTe8j/JOg5lvvJWYNOAAS4YC9gj4AWlgEsE3O"); + a("sWwNcKeD3RXCLg+YADZ4u6O/JWwCMEXAv6wEkCPpfcjxawRvDBAp5B8N6y3glOFPCn4Omjtc29QmPdd79EuX3ZxuUWOD681YSD"); + a("bZlhK1s2r0Xow5HqULi7KNzEdg7nBnU6NM6kzWGNk7o2rHF6ASymsRlb3/5OU+K9HpJDtGwpZxb70VNdSEGtfrTFjNSi/1fp1R"); + a("ui9Yc+sV9bClNo6pNY5WPmfQZnkLJA02nZF2irmZnSUzyszAoetk/y9muMmtVfxxoZX70BGZ+7jTqUhsB+8DyzxPBcQJ7ztrKn"); + a("dlk6Jg/tPHmg3kLPeFAuJZ4QDO27ljaL7iGafc36riBbcK1cb8mo9f5reqoVWZ6JJYJXkO05WFKbF75+vshYUjOMurTV6OyY+e"); + a("0YlPHIhA4ipNlvkqugaxBnwAU6wkCrnwE6seZl3BPeBIY1VFK0Lw64mQ3kJ8iy5QKsQRlVjjHKKH4Nnf/gMqot0lqKpqwrUYtw"); + a("X5ivUFtLiLMAxupOyKv+2wOywDZwd4rceZE7L3LnRe4M+0UI2ZaFbNK5BH0esCrIM7BlZ5DiUM+41Yi85Cu6f2ILe3s6FVtDTj"); + a("qRJN1ikFxHkr1lM5OMkSTgCZEll1HgCWxQJ2N9CWtUe7cjrFVYDXlG00gVjBSYK8YD1F+kfXLEazjbybkSzmYmcj6krzyUjXz5"); + a("EQqn3kiYNx19uHkqJO0XZYx9l1/NSWvEh36BVLn+Ms5JWn/LKaT96RmM0p/N712waqZKzrRJ60aPzbjGVms+lKSnVnccWAN98A"); + a("B453kdnvK1MSiSW4F5U32YadF7IUnDWhRa8NNHviFFN3uX/Fmo7l7L7Dc6DlwOhplgmOt1hDm2/sAcPwBJjb75dYOt8TP4Z4QV"); + a("l54NUmilWDKVDKhsXSpDdk/fNnvX9KvyMI+kQyDU+R7iBaBvRRANTIYScWlvfetrzCK+EQRyVA1fo2Yt+m4Wgls8LfXJTVm+GH"); + a("E7Py/WWuoCrnsRNB6vvdUY01nUZCR/1MIhc0wxRLdPtO3h+xZLta9gQlcEHqEl+1xtrdaOgXEREvrWmyiVemz5Dsa9OnTBDEcy"); + a("34EVpk5lYiotxbu1rzmEXs60PuhJmj1SNhUkJpAIB1o2OGeNHGCP2uXuhFyfz62o54GRW1yzth0iiH292KlwCtgrVvFBW/NqfN"); + a("T935auXd/3N0HaOC4K5z8rmLWNxj4NitZK73VuUzAZKqtrs5VmCpXLjLdu7OIdJqJJmk40lYW1sD9CfDzkCziJx864svc508Vw"); + a("0thIH9k2mz9a979++KfpLURayssm7wiWZpmSeyont6gN88Knng4Geah9ECi13Ad3/P306vrO77t2995G+D7FrG94HFyv8MN+V2"); + a("/lMqujJGUj1+z4ABwbc5F4/Mo748pwH/3r8GrAFvEWWErNp37qg8RkSMT62SwRo30NNBzAdG4Lz+USQMAJU0WGdTGsfPmpIGSz"); + a("XI8pb4sZl4W8Y3YYdGMh73chYNx+4YzuKuQcw/sls4394pig9U0Mq7xVtiG4Hog4r2Odz4qJ7IIWMa3Vxf17rYxhasvvPnNhaY"); + a("uygqzv5f5EYUM2bhwbkevGGFVbHYrrgB18opJg2iUEkf4zoqcA0xpoUkVhsiPDBDojwgg6fS6ClQd7lEGcikPxinud1Pwn5sdR"); + a("sW5vx3KmYN1GrPPQQLMMvg9b+DKRfmk4OZmKDHOEEeZySxgm0vtzWuJc00hP0m7c0VTtffl+DgSoOFWlt2mS6nbS3d98f7Fklx"); + a("xmh8o8LVlvwbEjJn2fSTNMpOs7zKTp+lyQUlSDKar9KapxHFUshz99B4XvZwr/UkT4DL00FFUuk/Y3kd4ZQdpPHxkizeok0kNN"); + a("pKczKcNoFpumB2nbIrG4kd8cV64NpIOQwEKMl7pobkcJ3XdeV1A+yU3NXbK6en2XKdZM8QDgDwikb/y2O/pBEfTZgn4Z0X/A6S"); + a("2i5pVqSusL7eZsOfVx38hsXdRB2drPRHp7uzlb+yJbFaJcj2bSPibSogjS3x6nOlCoYgZSxbgov6vbydFOjkeRY09y/JQdY5jr"); + a("1+3EdR8T1+1tZq5PMFdHmGsPYnAPM4jjpt6Pm5Voq17RVr2irXq5rcrmb+7/X0bmaathySjwciK8+b2tJl6sQCd+M8gyl7uq6n"); + a("KnFjoOwxefwwOFpBcrmnKzm8b2z6tocnuwgVxRF3qPzVOn5FEI12w1uQjjqezm2wLQSZ46u6ejx7hkCzMfOcbn3YP3uu5ZWPqa"); + a("ZYBljEfTOMH6zlldWI9poPsHMb4o1urnH8H6Er70Aq26+hfFNn8kn4cPOTXBqVF9G//xDhug2QTZCHoJEKvb6bN48JQZsskoxl"); + a("bAwZp6N/wxAA1CtWrq7UDYF6PFBC1tDFCf6/1F+keQZn5/yDP0ErjZSmL1V1E14T2DyP5y/+1R+x/jPMwi83tPCCWazeZOCLx5"); + a("HBuUk6LQe3nDVtJyCw9CbA7aEIFZ1nwbdT79nucdqokDqEvlffmrmml0VHx32Zk7k2x0Iw+7MZ5gw92Buh0op7iskzd7Q2Ok77"); + a("bJYRGNMo3zMVb5Kp4ZbXxJfUs+L9yqlb+ivORgnJYzxBrgUy9i6wXZ1NS3YbgM6BBNfV9A/TR1gYAGamo9IBJgfCjgIPc8D++P"); + a("ot4Z14fN7QpWqK+zf9KCdvh5ZlJe1P6/ilWDPpgE9QUMLm+S9xrh3YFqxHmuoW6EjB2XCDkZKZIOtyPJbWxK+dBBAJSxCY3qdH"); + a("jayZMyNg+AJcPh+WKBjc8fOxR5/hjHlhH/d3AOTTfuXqHY2F+/7wVIex2cqkUofda6aOVpka8v5fw9DUDU+TvLm/l8Chu5LfVO"); + a("yLTM2nnpZnx6kVZLtmQPVis2Mm8JpsV9rtB+GqwKxu9XoG0izxLh2cpnVn5qZn9okDHPdAmLDimkM5ZLIZWO4dPS/Qohm0Whd/"); + a("vYjpyCQKlfjyBaB8u0fj8kmcy8SEDlKZ1OUnDGYRdDHi357W4+UYj9XuOgt7Y41zsmE4meN4MEoQQG/ho94Km1423nXG2jSMJJ"); + a("SELhVa0F5b/a9UkgRB5OoLWDcYDL224v3TdXu/GQjCI2hJKbvhW8rN7g008X9HH6vfy+eKHW2t3MotC8TS3P3y+XZxTpfCLeuq"); + a("wZl+LWagsr+87AkuwIbx9vXvzqYt+UmrEtuTRPlM9CxuV5C3YUfO6XL0YCzQGqw4vqIq0XajEkeypgnTYRrFJ2tmG50oyAhq3/"); + a("MZSzo2DaT9+qH6maU4xLJ7yJIc6zm8H5y+ewtJMgXjTrWAHRlNpxd/yXgpa+50XnP4r4P2bi/6SZv+jPUACCPcvgPs1SBsPsUG"); + a("b9IOTy5EJBWPR+W6bAoEDUe8rMsOgZvVS3/Ocv+6v8H1gmbQBEFHOetUZh8A+/JABe0PAEhlJ2RzfB5G+X4U0xHx+VBYdH2jlc"); + a("roblCjALxRx8xhqse3pTTIufiRKTVd70d5Am84qT1X9sN/67bS9jzoreXkTdmJ9XDbWUn5YYLeUbwPqszmDU/k0t4LO3qn2xQt"); + a("iHAushsKQuxmIFdrnAbAJ7W2AdixiL2cnYFoEdJ7BfBXaNwHSBaQJbK7APBfatwJYI7EuB/QBMxlcfeR66BjpQ92wQmxx7R25y"); + a("9F9DoeoD2eFlK2+sltvNcn36hcai5os1CLlMhOQl3aTX5sLlyBjeKoMN113p81NAujn/JV+oFnOs5mjGe9HrRcpi6YYcXuTPBf"); + a("9u34+429+Cj/8T186gGf/Cgq+z4I5vgpH+VnxVJL7la8Zl+g6D3YGu0ND9Wz/f3fOSKOlnBrNEnBBkbCYw/aktoDpsK/42bSP6"); + a("7Uz/6c9Msf8wI1fW97Af2gjyvvTXVkNh0h7cxCWdkAOuW3FlJeCJbsD7LO0ieDLBSQKeRbAi4NcInrKB4LSTf2cWL6+FTL/DLN"); + a("IGCKcXyelZwXU6hahfwiFKOth7JXl7RIjrdrDTsHVwGiOc7hVOl9Ps4iLB5CqCJ4KJ3F637Cf42nm9YTp/Fszkz9xX2nm9YQ7v"); + a("+nw2NS+zsHJGDSMp7obhThv+4vHu5PCEvIrhofcuK6cQReGJq8ZnNEyZBxC7pTAWn0vg/IVC4vyz7Xx3LmzxT1KvPw2mR5JW6Y"); + a("Z2EtO6PXclYHCfN3iUc0JsQXkgOfBoUeXwZLerangCMjwaTKY67O6KnHj31OFOfJ3wyomH10XwclXDz1V9dmL/5toWUH2S76pu"); + a("ElenrmgpODgGjcQ9NSd+CJ5zjUN0uKrwgIFyb4++LkV8J+Hr36BQesBteGJ5jQMxJSKmMxIhRM1FHFMydCucE9yeGxIUymP/Vd"); + a("QCa9cmw8S/QLMVuKpzEtkirAPmQGtj4Jpf22aH82KiW7ERtTUarJDG1F50z/wD4xSa2OGUJe4RvEbc0SXi1yPiPyMcvxKK326K"); + a("f+MexL++0BT/tM02I/6fbKb4axQZPxhWpjUXipIu152h+B3m/DtM8WOVyCFWiTheDCBX6PR+hYjXoeCyZLzNbIr3ZnO8ekS8F4"); + a("TjdYTidZrz/RfiVU3xlsXJOAvK65P9A/jZDdEwvKJheEXD8HLDMLUmqc+N5rSIVyn3gUhBNiugvMN4rqu6hx1/6o1AsAl3KH14"); + a("M+IG9Fcgu64mP5YNzQesUfAZYs+vxKt2oUZhJkgAgWcIbvh0VvS9DGyKfbhNircI4Q+NHn39v1W/CQaE4n35hXs2X+HHdXEcSy"); + a("9DQGOPke3AkvJxfYL+MDyQsSGA5X3bWFfroPswBwBGDVaot8CvQdXwj89D4vMUPkGxSOtVgyqVyhlOXqt1ggcn+sIviDOAOVh8"); + a("oLFMbUsGrCgzqH9GABk4rQ4wB4wLBcwIBbzNFDBGnQ9ChH2ewqqd+Kdxi0fdBEjhcPmwRnRVqbWcmrSRI2nen1rHXm/Ai5a7jW"); + a("vTyndCiSwlS1i246A7vmiuNTU3G7PhpcQCtT4LX0hirJDEirTxwBHDW/jgpQpXVdpojivpe1w+UOHo5apKOocd1O/gMDXtfBXO"); + a("qU5wShsiCKdASvUM2IIgbH/htPx7zNscDyK2bGJbgwI/GsAQdeLhlISDI5IA1s+D3tvD90FwEirpXLDy5Z+40/XASWIc5xmqII"); + a("BtQjLDK5GMSa5pX6GXbVBfARL0qM/ho4DPYHyRiof5k7SYEpyaPDjVWZaOHE5wcBkez3FN1pfS4wH7wX20cN9fuIs0fA5Pz9CR"); + a("8FHLZjaoborG51FPpHgQ5Bh8jVbg+F60AmGrAe+UCO/13yn48DN56tcxdhJV9XN8ga7GR3YVp+RjMMVXR6UNcnAhHulgIdLXN9"); + a("KWuToDtMkIOouCem3ovV4fgd7rHQSIEQF2wEcshm7cjjy8gXA+z9ApcFVd004J8o3CoF4JB/2WBrmYcw3afJQJNI9vjCGJMR5B"); + a("cn3buVVpSIJekswd/xvCaRY5XQEnwB/YEdWUT7sIvoyivQOwL8KemSMJWw+Q6cKjaLEw9PCc3Lv0BK1tSrDsYDr5v3+xLwdX+1"); + a("F/WygbASaHr4JfwA25kPM/oLD3yyzA2n0vN3ZLlf5fBbDuiN6njp41wUwNr0xMCU76GX2Q3OHcsDS0vmKxD/mzfVxoZ1Q0OTlb"); + a("Le3Bu1L8CAP0NjxpLUss3A0Gb0pmnY2zlJf1C9N6Tupdmk0LBN6k6TQ0Ongir57HZQXZTkf43Es+8ezjmnIpnPmdlcB5RVDGvQ"); + a("JZbNO8SZiWba5DNGCQ4Mb6mHLNsMoh/dA/xRYqrXTKB8sP9LJ/OTaLY92ek22ljQT2lAsU9+GZU63Rp7V1a5Jl/Fiyz0Qjc9vR"); + a("pdVHKx+csTPnf0mXyBKPzyi6eWyiQi9F9Ibg9wYrSiKZ21dOtGMx6Xg3lFjZiXlZ6+j9pE8Q3+kDRCZ7ikyWHA2xbcOoYwACDg"); + a("iHb8zDhY5LaV3Fr6ceTHHVk73BtCwkKkrW5P6tq2rYETAyKG+JKdmXrKomS1us8f3wV7K3f7w4u+8dlo6jhVPT/cWMA+Wd8Ir6"); + a("wAUGBzoLkMikGm3/4iCAkh8DzCsXBWhOLKhjy1uUkmR+IQ9uQWQQnHqaENSv8Qph1PNEKNHineJqRNfH5ydjoBODJkRi/dujXa"); + a("F7rYgqR1BZyp3M6V3v52HB+JOC8k/tgRO5nsipX375kAZbaQ+GC7WBDSxv0A6i3F1VNhOL8p8VnJ6bhNbbrj9+IBc+ieN9Fot7"); + a("pN+SdlguBJHw25PzYYjYB9c6yAzoa/qQ1cleRBMLicG0r5F6i8irHsP2+/pZHdTOajHk4vvVLOsCFvuYeL0+aEzho9s3vYIhxx"); + a("wMOeZhybAGS4ZNhTDxKsQyIsxks75BDiihTZgUk/RlrnMvoMHd1LghEKEGOXgv5m/JSL5/3F5y0cB41+TX2G38EcBPhvtRRDdR"); + a("0k8W38n3iu995I52sMCJr/9W/AFWCB4tYDvBFxJMRX8JVHnu1Ozcijbwjx1oH58QSBb0ASdoBS/oUDoCCGPFEoirw+165JPAvq"); + a("E43O8pgSQJI0uo82LvqUcUHxpjc00bS3MhBN2n+EgF6FVAGbq/nRJxDtC8e9aJ0wm5mk4X90+7D47UiPaiv0PJLHIQxsklw/03"); + a("2UWbOtVJOspVTRLjvxCOhtvH7JZndruKnY6JCOtNx/j8ALsRZ0q0ODsUUzhXFfPaEOH2PrstJzdLnNXKn+KcDSdT+RQPVWylCU"); + a("RBttuBngXe2PwYIF4b4ZAcqKxTRbtHPZebCul7+ahBGv31owSfRAk+zf8p1av3vAzauQme20qGJJyYN6zuQeH+aKQ7BpnkOknM"); + a("XQx3OAL3X2NKwsUyCb3p70BKQiYl4aRAns8SeeBYhLVEHDgAbhGRQoaMyIp9LBd3meK7WcaXQH+9AlchPISgnkKez/DHBPsCIy"); + a("PuIzl1AIqSjf0chrVkTq6x7rQuSPsnS4JBcZSqVh6lSsMpLJ/YJoBBH5q0F03aiybtRZP2oknTGrz1OJzVvhPZmsA2nlAGcrhS"); + a("KIYrDX2oZ0R+eqJNjY0t11U0q3FO90dOanix7o8otUQ4ozvCsYPJa3IfsTP0JDZ/p5J2SB1ovy0j/+6f+GTWR3bi1MtHuI1wRd"); + a("SpkCg79Vzp3HORLwH3jgXg3yRMpFq4yAciDPdn9HcQVfGRVMXZ/hQhx5BcvKiWmp5TMdhvg1MIL9YG+1ttBg50DfFlXEFJZKMt"); + a("LLOkh/vBBCbhxkAXH8QAEY2BbtNwl+9wlh4ZbhIQPSmgBRqJjX8COBKKLoHQm4CaiF0gdmttUsYCZ2sdITB/d/LS6jbk5T0yGT"); + a("h/kVVe1o/mwyCoci+qnAUEVR7tPii9od3SmVj8q7oM/2jyZdz3JGXLULtoN6x2ewu1eyNQgib2DlxNykaBWGf7n2HdHkUXyeJ3"); + a("morfXJZmzdAYON8Ej0Kd7q48a3KM8rx6B8oz7jNreT56Nbe/NvPtT1yce1AeaGsmae/N0j5GjtNSA8XFvrA4yrLYA1m0FIYhhY"); + a("HzDBH8K7rokVOMsrigE2XR2WQtC+0qlEW0gmB5IVvGlAjzXqt9Jq7L1Gu72OybDnjvQ5MRnLnqSaOfJzZ1YY29VGU7O0xUzEaa"); + a("Uh4fM3b69qj8xQwr+2fMsLwjpHDeK4UzTQjnbSHh7Ou/kRvwCAgo+stkhNV3BjAXmEE5Q3iznIJKVg31mUBk1XCfOSI8Vs71js"); + a("hAFkMt/TwDttTNiO7qJv1ko24+oh3/yxutdfPLFVHq5q+Wzyb9g70wArQN6ema3IeWbXuWJA90uu5ZR9o4UbHq7FSW4rukFO8v"); + a("xndCz/ZIh9TpizeixFbssW6NrlXvi9SqtwPdbfseYpTbPW0ot8MbrOVGrwT4AkfxGZQ17Qb5kidBnv4pyCNONt8L8uLuylnK57"); + a("Yo+2uW83i8PwwA8S/ZzXkFn7BnbOLPAusxPa47eYIgbAAqhH0UzEhoYP1jKldrnGvymbRCH1dy6UC7657rFB7cx6Oa+/uz7aEz"); + a("J5ymW1W++kSXawxXLkVNpoHEJ2g4A985maZF0kxcAZpNCmiM9lUV2b5eNtrX0wDRcNAlZ8rw+1cj/NvK321f/dG+WFbk6UQIiI"); + a("Qk/+oF4H8m+O+K6AkiorGGtT3yeQ0pV82Qq4rBhqAM3Eb7hfVWubr0MsiV/wch/39V50SoHO+7SA33B/+JzrHm8cUTjTzmb0Ue"); + a("A3XWPN5x6U55P+IBYq2/SRjydXOm03oeaWkzy3+LPvezPZH/uc0mwc9rCx1YMs6qQo1t7hWS9yKTvI8xy/sgu7jbh1OQQmc3cY"); + a("JVLinlogz8KfzeDdNwcg/4nGlWSZo5caD5LYpOfFfqxIP8r1KSpEpEaGkP9+MHqNd3lOj9vG7Rizrd8GDSiwMkLza7pELWfWBZ"); + a("WDmFYKEzW4Pn6v7TEMefSEeDFFJPcIjuME6LVZc2o1CbpDw0QR5KTjDkIXsz8vFNjVUerruYZP4rW/flclu4rxhjKhc+7j9zDo"); + a("rkWRHu75VJssw35Rd5CpxLCHgzkr+7vE0/3sjbJb+TfcjH1rxVXhSS9WPNsg6BlEK+a33//RKp7497azf7RR7kbB765xo056bd"); + a("6fjzPxM6PtgzJPNZCst8LyzQJEHeCyDvh/r7KBH6/TkM+qV+19MWouh3gKNJtysxYd2uzyXl/y38/964qWqhHDf9LzqsZZCp/2"); + a("+l/r/6T/3/BaF6HcUVirL3ouy9KHuu1Sj12XOxrM/Rb/xb9blJPzEpVItHi1pMQS26UIunoxYH+PfldsrXx9Zw3AsbWCvpUit9"); + a("BqN2/1bBrINT+Qd7VxnjRBCFt6UNxdLC4RYCxa24BooXL+6kBAnuxaVoIAfkgAQLrgf8oLgEOQiB4sWdKxa6HFLcKW92vrLtQP"); + a("HAHybZ++abeTO7M/Pe7t7s64ztRMSt7Y2W+ZNI0jdtU3yPe35Ytc2/8X+JOIbvS6pjmPCIxrDzbnEMn7QMjWGraGMojl+Vgxi/"); + a("Vev/pD3mP87tsV+qKPZYkEaylmiPaV+q9sieh6I93nxH+bBH57HfssfJx/6lPdpLqGP5/AGN5dxd4ljmbfFL9tj3AMbz/No/Z4"); + a("9rU0Sxx+I0ivW/tMfhngh7rPhKtMfuRyLs8TKN60/b48Ej/9YeexdXx9CSRGN4doc4hp2a/Yg94v3Owb9XzKPhWNrNONaZwMeE"); + a("NoktM5VURJ1LSo4p/KxczV9rQlP4y6k2WdZg0J4n57ORqe8Eg5/3UM1NRzHspdpI1mNenk1A0ea4Fvk5FQan81rkOwI/F8Ztxk"); + a("IS7Xd2SN7H3/+Qnljgegc/CdeiPx31F5MkRYjy5blc7sfnt1griqEVtW+jFdnpym3sK0t/9nVFyxejkSvxutXBdZpgjtSugHKf"); + a("wWCHklKwfvqKvNKkBxLk1aTL0jfkd38pv1aQz49MapwvsY/vegcf6yQf66RN9yXek86IapjOJfa5dL3DJSZ5iUlOgWRSo26YV/"); + a("/2+5y/iKqj0/yko8W3iTq6x046SnXSjZF0L5bpXj9nAvRTvF8oH9LClJPKXfhi/jpRg/lrRR9Ph/Sxi56P5KibYfqYj46SdFSh"); + a("o6n8UAMbV/St7aFnxrSSfIkSP6eltcgege8Im+cmpSxC28pp5RWR8+GsfU+NbfQ2WZJIpmgCkxmr+dl7hzL/r+PN2OpDM7LRpd"); + a("dhCtkPCjmXUM7NrDJCX6hBJzGyso7rIyVdCCU9+Zp+0XU/YZnnuGIg6SlL2v8t+ZVfys8U5LMqmegXi5/3i5fd+3qiZCgzhmU2"); + a("oE5jmQ1/6HuOvZCqd+nZAhfbN4t6V6sRn6dTPuSE6dyPfK85nIw/osiBNOIFYBFeADLzO+OM0AtAaXmCBH2oY2gw3WyhRSOME7"); + a("ezlwtaRYL2R6pLHhd0G6phIJnQM+VfzG+WL6j227U7bP3FTWK/pWkY9bvGT86/Z1SsdTSesGZ5kBRhM7bY5GQlvN3VDfxd6def"); + a("s/SMDeuTt4j/iC7pCqh94rlNfdJro9gnb+pHm/MV13/nm4Y5C7Pnt1mt1z+J6i3lFic5l6He16hP3H8M6hibZkd+Kj+b+2bx99"); + a("VghpWUJuwWFrX8FFa+GZXnhZWfYA2OUt42vYnBNqGi5ExGCyWxffpitchF/oQKoby0lEeg38l818Qlg5NScH9ritIuaOmpR2Yx"); + a("sc5e5mdbt1Jqk/Nu2PeGbUG+97+uxJmkGLribiTLHSB15NijIR3xYro33B/srOIo5d9Jf7AWZ7u4BrH52JotKRrGdjG/ZpvC1i"); + a("XHk6QK1M8ZaalmpcJYxc2upplbEvtN4eHWim+VURWKraxlvkUPFI8oPTmujN479bXgAfZd/zfrbWX4L+dl/m+y4uB2ncXnLWbx"); + a("DJ3uKNkjrmnIn5Gyo+8nQ9sHxhQlMjgL9U1Kivm7dmdurfq3RbiUul4bvjcKzitR19dY/J31ydV1GaizuJ/sTrPy++IN3J0sM/"); + a("32ja/Hc4SatPgdZbVZQv52qbFOj78wnYLv79U2GMRv8oZi/ylh8fLv7m9DLhIB+PbSBl5KrQsX0TKgJV4yh7DmJYKhz95WZU5R"); + a("Xfo6Iy3mwdaV0zymtULHxNBK48oPZ5W8rG7mD8hUxdb5UIMKvlF6knHuoz8NjI1f8fXQF9I/FFMDX9uapoGw0VoQQZIE/j/8kS"); + a("D2pcOtNWkIA0DJxzHXRnAEXyYJHCEkb9EpaIK8QTif421kucB7cCG4PkSm51rL63MP42gazjEunuNSoO+Dhpf7yDFuHPKBWha/"); + a("y+OtiyT74twhbr3AZL4f+qO9OnbNiLuS0fWVVuNLy6lxSyU1nlBFjdurUxzX50DcwOoPi7sQ17F2hcWXhsVNtVT5XGFxixKHfB"); + a("Me94uNgezvBK30b4M4ZiVjhIQsorwQjh33HLl4ynPi5NVLVy4fvXb9RqLv5u1zd+7K95MesH5fBL38weBYCvlfDCaBP1+Q/fLs"); + a("ysbqK5Ltaxdf+EOen61PJya4vidhAgplhIw/dX/WSL8Xkv2kvKVEyVKly5QtV75Cteo1ataqnZI0OC3VkkHSKUcMOyjNTKjUX7"); + a("dvt4jzNerUN6K+YYM85uMdx8/5yPnqIPSw6fVcvVMVuHUa6TuQ3jCnc2Vbb4GDacCPAs/OGtRjvtm8ri74NWDyDjlmzXg0a/Yk"); + a("8EdABNd+cDVYh1TslerGe6SnQ+rmDMmPjDw5N6E8uBnYtHej1dbKqdcMBi8LrF8xx/29xjtxbnAbsP2SeSsGLjj0MiMMfwvSJ4"); + a("5/MO9evVsPe0OdumNgK1U9dCbxnGdirw+cN8B1jR9b0lpg4L6pGd5xPu9jpE5ogpJGQ3+IqC2kKFgQcqCRISUdXejws/tyfrr/"); + a("TdZI1upGyTWHZqNuvtBLRxdU+lzj8CX2mJpnq4b4AG0Uu3Rzu7Zv4hjYDL4F9r6NYy7waMG+EuVXfF1uSkwfazh3H4U80HqMow"); + a("PoAiaE8AZHL9AHDAClRI4mYC6gBWgF2oEOYLT3h6XveL4b6AUGgKb3qB9oB/YHxgHdQC8wFBzt1GdaQI2TIqrx8NDcXtsSzn3Z"); + a("8MzPzjEX0Ap0AF3A7wWNvkgxbdGKRfq34vJxQDfQB5Ra43xAK7A7cAowHugB+oGGNhwLAG3A7sApwHigB+gHGtpytADtwP7AOK"); + a("Ab6AUGgJnbcSwPdACnAOOBHqAfaGiP6wbagN2BU4DxQA8wAMzcAecFlhSfr0j/W8H1k+fLC4xDua0oPA/8OfhS8INazuPBveA7"); + a("wG+CJ4AnxwPPA94U3AveHPwSeCtwH3hrcD94G/AAeFvw1+DtwQ0dOe8AbgLv+Im9u4xxIorCMDy4u0tgcAlSHIK7BtcQ3N2h+O"); + a("DuVrxYcCjuUNyCuxd3ggYnwLlvA5xgP/jJTdiP59zpdK5Md7c0AcfH9bCN6+O0uAF24YY4N26CC+GmuBRuiSviVrg+no/b40XY"); + a("wevwWLwee3HI0KwHjod9uDP24y74OO6KA7gbford2Kpn3B1Hxz2wjXtiF+6FC+HeuCL24fp4FW6Pb2AH38Rj8S3sxbexD9/Bfn"); + a("wXH8f3cADfx0/xA2zVN64UhvHjI5HYTzh6GuYDx8AuHBMXwrFwfRwbt8dxsIPj4rE4Hvbi+NiHE+LjOBkO4FT4Kc6IrQbcHzg6"); + a("boBt3BC7cCAT48PXcSlsl2e8yu1xMuzg5HisshenwD6cEvtxKnwcD8MBPBw/xSOw1dB4JI6OZ2Mbp6rA+HFGXAhnwRVxDlwT58"); + a("T1cW7cHOfD7XF+7MZFsINL46F4Dx6L92MPPoC9uEEl5hM3xQdwf3weD8EBPBbfw4vxU7wVv8F7cPhGXA+Ojs9gGyerzHzjFLgQ"); + a("blmN+cYr2zG/2Ifb41XYwavxWLwGe/Fa7MPrsB+vx8fxBhzAG/FTvAlbjY234Oh4K7bxNuzC23EhXLoD48f7JjN+nGEP48cZsY"); + a("Mz4bE4C/bibNiHc2A/fr6P8eMXOIBfYauJ8WscHr/F0fF7HB9fPsR84ABOix9jFz5wlPnBnrPMD15ylfnBS3F7vAw7eDkei1dg"); + a("L16JfdiH/XgVPo5X4wBeg5/iex+Zr6bG93F4rN8fSEu9FNmc/O73ob5/+Q4Hx+t+Hk87QNbMzPweDyl5kHohl6m7T5v6Ier+gh"); + a("xP/UjwfNl5HaR+lLovBz8PnjH1Y9TfZDX18ydN/Tj1QDZTf8PxJ6lXLMbxp0z9FHV3Ec5/zNRPU2+fm+MZ11nqT/Pz/Zb6Oepp"); + a("s3CfnzD18xaN4z2c/wLlRYUYL+e5SP18Aa6HebhE3ZWX52W8l6nHz0edcV1R9dzUr6q6m+e9puobmbeAqp+nfl3VPdRvUq9flP"); + a("lnvLeohy/JeZif28HxluJ5Ge9d6mMLczz1e9QPlGZ+GNd96nYJzkP9AfWNZbhO6g+pLyrLPFB/RD13ca6f51VNv9tYyAph+fVd"); + a("FFK93yd15adXt05zV88e04jjQ3xpIb+0UF+aFSLk93/CRIkSIVy0aJG+/gkbNWpEK4Q5LDTNihQr6s/e+PR0ZV7I8+QbMtjid2"); + a("O/kDVJN+khN5LnyTdkfDePJ2uSbtJDbiTPk2+C9e6Sv2x2D173u5Nk3Qntw8t+ob+mytGdB0WR+cZ+lXvSrZHHN+9pnFZl1rc5"); + a("ZWne4EUq1yTtGEleL3oZu1RWWfEhojw/XqQyZtJSkeV1qDePUxmzQnrpd/VhnqgH84z/slyfh/7mKlenuyTjC9/X+Dj1YDZyV5"); + a("Trd9NfSOWElRPMz3V4kcqToRLI9VV0jG2VVedGlmX1Y0dll5YJpN/uZ/zUIcn4c+eZ1wP6a6q8MNuR9bX6Gx+gHswkVc1vfg79"); + a("uVXODCyKLOuDN6rc/dC8g1xzAPtC5dxlO+X6N+KhKhc/SxRWxjeQcVEPZughD6Tfob+iysZh9oaT/Yc3qmz8IryMr/0g9o3KSD"); + a("nfRJD1w4tUxt4SyoxvMOumMmW9PDK/B/BYlXtfXZP94xpibKlcXfKInN+Lm6vcMyVKGHn9GWp8nnowJ+aZEVHWn/76KlcP3GTW"); + a("f5ixn3owq+aaIfPnpr+QyvKfroWR9ccbVbaN4JXrTzvCuBTZnPzbNvQPx3tH/eF8o9nXo0hyQOLWZv3pz63y6O4Ncv3n8SKVod"); + a("3Xosr6jTEOr3L+oGwhZP5xfZWZlg6LaG5Qrot6MLO2eSL7uzn9uVW2iOZI/wHsUZmyYy05f6FxzI/KeRMWy/V7cHuVsc+3N+uL"); + a("D6jMMO50BNn/441tlYsmJYgm9zceqrLghwzy+PgTjO9RD+aCzSNkfdz0l/qWnD+U7M8A9qks5h8YRcY/0Ti+ypeJysn8eXB7lS"); + a("tiNJH78w0+oHJtnTNhZH0mGbtUTox+Web3OPaqzJEqpHx/yT2ZfaOyW+nX0u/BzVXuybhQ1jf8FK6LejCL3HfJ/Lanv5DKlL7j"); + a("oeX6sFflnv6f5PEuj7Gl8tXh8+b+w81VZv3YXM7/Bh9X2fhMdpn/+lON06q8US2yjO889qhccWVkNFnfacybyqPNm5nfg7Bb5c"); + a("sH5h+A7ensO+rBbHv6k6zfIvorqsw0arqsf6kZxgHqwUzSoqFc/z36HZWj4/WW668509hWOfrBLZmfjXioyg+pd8hypJ1l/JR6"); + a("ME+drS/736G/psrSVT7J4wPYp/J1/IGhZH5nG0dXWTfrKfP9CbdXmfxNHRn/G3xc5cI0q8z6e1l3lVXfJTI//2CPyqwFQ8n9EX"); + a("8O4/aSZMzYu+X63fSXUlnl9dqosj7Yp3LtkZ2RZH3msi4qzy0KLY8/gIeqHD0mt7l/5hm/oR7MXdU+yPp46W+uMnTaxtIff77x"); + a("eerBTNC2nMyvQ38plX2LPpL9qZuf/l+1+mf5PZnj/tTiL/j9cSUqFrWzZcqaKatdO6sra9bMrjyZs2avYzdt19F2585ZL2d2O6"); + a("Ndo0XbnNmt/+1ftDBk/OHsV9I9yqRDelhfL3mAPE6WYl0rkr7QIX/4PFAUnqei1cDqZDX68rW1ZVtVvnxtZ3W1mlgd6Y8ToUi7"); + a("Bh0bF+neuUkISs4ts8ViiEwLW6Vd665Nvv5np4EfP2f4Rn3+yHNd+n/dbtP/h+bvxecTepus2Mek45iM7v192v1MWv1N+oaY9J"); + a("PHyWALV7VCw5ZNGnU+wPiCzc9tsohxpe7pomX89qUof6Nlz9nb8nN8fM5zj3nyUvd/5u5KY5opwnDL54GIUm+84nrjgRZBKZ6F"); + a("shUUZIWixCN2LatUy3btFuXTGBs1indj1KAxpj+MIWpijZr4wx/9oQne9YrXD+sV8cYzeNYp+wxtt9t30SiubjI8zPHu7PPOO7"); + a("Oz7850P6D1MFVHT8smucycC/N+Wk8u5AvAv6qnHUKDalJJXCBHlElDY/Dj/YzrAEpALvskeL+F6/dwvSB9jZ8p3hOaiurC+VFV"); + a("TmwWpmRdUOOCnkxE1QuFSFxlJqlH46qgz2haPJFkSdNaNKZMClEV7+kuHFWQKCSnFEHWtFg0IidLQpdFk1OCLMyo0STLk5NMSE"); + a("/KsZhuJEbikwpqmpZV+UIlwQqsnkRLxC9MyNPCjK7oQiQmMzzChWP70Rk1GZ1WBCWRYGOoa0uBnfgA5gcT2N8S715dVxKr9V8g"); + a("ly4Vcg1Cm2GHhwuxqKoILp5+iHHqi5WEqsQ6j+LpY0oyNJVQ5Ml+RY8kolrpjKvltzMeW8RS9QzdW6BrY6mWhs7tbhybYhpjje"); + a("lKVfrQ55C/05Ys65iurZCcgvletYD8Hbfui8djiqy6q72Ai8jfpqlX1aNjq/pbbWekt1h2NIwxm/WkMl09TmzfODiuXqzGL1N5"); + a("Mbe5a67JbWKjnxdyLbWGyk2rDUWqauT9zf8oQ9SS/bLBdcblRlHhwd+LbSzEWEixcAcLCyw8hSAgFFjoeogh4v3s/y9YaH749+"); + a("KvDH99kAXEWxkm2Q9ESM/9XpxnyMO1z7JvNzxnpDc/awT2fzlA5hyW3sXCwyy8zsJTiwa2sbyP2P9cW5nDN7meeMzgwePPPG7E"); + a("m19hcix8z0Lo1d+LGgtPsTD3Wjm4XmdcWOh6wwj+11lA/C0ml2FhrzdYQD7PK7xm5K+uoy2yOhDy7qKBDWw83KIcft2yWGxsLB"); + a("af3sUI6R2KxZu3Kf1vlE97isV7W0oBZRBWtioWzeNsqh3z1SV6nJ3dZ5Mj7kfZs6qvs1lkfUeRp3k/nvjE+n7iAz/PpzTPrEN5"); + a("bicGA4xnUgFR/xLNc8WG55JDeW4rBkc0RQVLZpef0jwLn9E8BcGxPNldLbHG0/OZNc9lpC9+TvOccCjPJnGU3XxBkx0rNjyzX9"); + a("A85xzKc1vxzESU9052FD6nec5/SfPMOZTn9mIgJuv6afFkMD6jTroW0V717iupr2ieKw7l2czstsyyNMeheU59TfP07utMnk3i"); + a("UFRPlvvn/Fc0T2mZ5hl2KE+PaMyxq9my+r6m+fq/ofnOO5Rvixhgj3NxVVENutoyfy4/5pjOwDHezkB7Z5D96QoEjm73HcX+6w"); + a("34vN09wZ7uHvHoK10T39B6mfiW1kveoXrZRhw5X1cS7IEY95NvrP003P+Q+Y7m6drPGTzzwLTbvYqF31G+aKAfKAD5eTNFIMrn"); + a("gB6X28AGnG+T2+QHMubdGuygDelvmfX3vc246DD95a4xeAqQMyM/tgqtzt9c2e/A3w3+vxv8F8A79wPNfwH8wzZ6kO50byj/5b"); + a("vQ3vOIo/783bCLe4AoV7jPbB+leZ+SyEIPc0ifLVbrJ/+jzfx9f7wvsNFP+M2N0Y/rXaMe6W3YyTsG5lB/geM7Zn2szg8TedhD"); + a("GOkZ6GPuN8wLV2zGVehDAvJj0SQnxa314dXdlvz9mvsv6SM1AfuIgu/FBnrPhh4uqj5vDvE8T0d5gcsB18ojLsXqXPc08oE8PY"); + a("y4XzWdD/w1pKeBwiXABK4DmEJ5fjSF1u6rq3H/b6gfGAZqwAaTX3cB7TRRx6/btsMmy3ITSOdH4Ufab77yk8087YD1jbv+VvcG"); + a("v18ISqU5WhuuX+B8zfx+pvml6/Br/aVaTth7Y/jx8vk9YU8C6gXyY8tQiT2r/zfkAzPAGk7gw+0gZZqvNkJPfsRzJj0Kv9o8h6"); + a("7TTqT9NtZOtg0Zbn1DW6y+X+j+4P3NZh6/vzXPCZNcdmJjeGJcLc/TEOfjahpY1oekJHSmDAxMWdhLDpivYz9+8PPUsR8f7MOH"); + a("+KLpfpX/ndar/0CsFzDZUcEkl9vp39Vrbmfod0f0tx0MzALzQC7H/hrn2wm4K3AXA6Vdze0TiMdiSoS/f+JHGnqUEM+a9Cu46f"); + a("7nOQjrFaFnfnjdpvgRf69+80e7Sf26DoYeEQ93Vdtt4aDqebanrTruRVwDeg+1vv9n25EOfkIP6j0S8xJgoQPXdZSB/k6UAxba"); + a("ref96W7w9OH6cX7pWJznOMgdXy1fQDx7AniciHo4+nF9fTh/AOfrhxwwHYT+BtzV43rI8Gfo5vfe6FdpxDXuL4c9ZDfR9uQ/yD"); + a("o/Z5Y73aH2dBrygRowBeT2lEXcO4J8ILenvAS7CuF8p/81e1qGnHcU6UBuT/lx2p68Z7j/UXuSBpE/DHlgZgjnAWZCON+ZiJ9h"); + a("Ht/K/rUqe4Ldebh98uc/7lfZkrbH2YOc5R9Yr39F2wL6BnqBEtDjAm5p7V/ZLjQgq5MxxfCysPrR/8zzGw/0N7AVracV6DFrp8"); + a("9G9/9Kj9syP01Zi0x/0Jf5uYLbY3prWj/eg51pjxrajesxzOKUvy+FfLO/z7WNtR53CgVm9GR8eliZjic2l/UZht2Z/X8L0ONS"); + a("I60vbZ361JrcjtSna1t3lT79LE7pM72NuZ9XazQLvXmRnzfp09tE62thnfqUWpypz79qny3M36jHZxIR3te32UT69Qvb0noqOK"); + a("yfr5X/jyM/dgn1nq8nE3IkaSw6M7zF7D7WZD2erKC95rej20VoW1+75a/bWL9P6nrct4AZYIGn34Dx43b0F8RzwAJQuBF2D/QD"); + a("PTchDgwDU8AcMH0z5G9BOWAB6L3VwCwwfZv5PtC3usa0utXY0Uz3t4EWG/99m7P625+3b2f103r9zHgLwfwF21n3szDaacVjs1"); + a("9xne1VeHZj+pn0HOwcqAEzzyMdWADy8y+/jn71Buz8BfRHYBqY5+kvQh6YBeZfQvmXEX8V/TGPcsDwKwYuA6VXqf6F1mLHFNrl"); + a("/cWvTnJ9dMApTz28j/vkyZ5HW3fYhPf6nUFRDPjEjnaxi62y7+o9qqu9L9AbaO8Ieju6uo/p6uzp67jS5d3B9Dxm9pPuaONvOs"); + a("RZ/bR8/x+Kqhcrq/7gwaQyHd6BHo+EnWgeAw7jae7XO1bwPSOqR5NY0TLA2o/yg7fuTPNKrZO359yN6dfhc8zPc+ANP4N/J+v5"); + a("sp/b8S40n9ZD4T8t8XZAO/Nj59C4mlD00m6iyVHlAiWhqBGlxBPtZ/bHt4Lnsg3fiUOdZdf82D00FI/IsXF11Ewa87pdrJ/beT"); + a("sv7Urzml8n74K8Ye+xMN6XKQ+W9tWAceuu1uO0D/Ze2I3m89Z6+V7g/lfGrx1CfTPRWM3w5WrczZr3CtLfaqV5eQ5zFu/UhdXj"); + a("V2sIrb1m35w+L2CyczP/3Wl+C+AvldAB/F1KNf/dGP/puAX93en71uIeNJ+lw5w5rjWHBtVo0vDlltp4xYZndk+ah3C4M3luF5"); + a("LiesXSmMJaexl/izg2obw4EixBTf5WSB3bPH1+PEbkY8ecOX9r5Jc2tbGtiDX5WyI/GIvLSYv6m5B/ZnRSQR2W18m5HwE86Iq+"); + a("QHdn9zFib3tHT09pXe1Rve2+Y3xd7cEun/fooPeYno5A75U152ng+mui62HZZP52wHr6wNvCuu1xWjRWbkyL5wyz3BYoN6RckH"); + a("QR7RyKayWo2w4jZ54mjjKsp5f2E12kfFCO6QrDetcXSswo1PWplbyJ85w2E4tR+j/PTn58aIjk0Ts0JlI8RsdFisdpg0O0ni9T"); + a("lQTR345AgZaqDXV8N91cjPfmrVe3fyi6eV9gS/UGNb49bWGfOoJZLle54avtU0IK4yWXq9xA5fnMVk4QIFexIWkFYpJQKzbBy1"); + a("du7Cl8Xl8AxxyXM22UWfyCFs1xuaqNJ9kv7fS/wuUqNnLMf1VfyrsvytdsiEh9TdUV5nK1GwvIS5zncuWF93PfEBJ5Xr5mgfnH"); + a("DZYq2A/lsSA7+x1d3MvL8wXK1AeGVh1h2JDd6K72V/LzmBc6TyDDVPECL4+FwOuu12+a15vPk/+BrFfYH+VNC1fXU7VQkS7x81"); + a("QuNPP9SinbaH+L+vna1UXkNayJNdTU7a072fFtcZo8reRQvg2pHN01vLybQvKFrjy/nvJCU5JD+ACUNxZmNv5swzjNy1cuUJR+"); + a("sdVTjsvVLhSzbyhvOXnF6jxYZAaFW9bP1+lt3zKIqULvpKwx+wrjmt1dR96rfzGa3+G+B1zCIydc/U75FA3sbjIL+ZbywiTi4h"); + a("tYyELChzROZqCq5JM1513+nSLjOQjlKxek+N2o6qD6/Llc9cILvuyibb86krNczrTQYF3t5iknZ63OwxcrLNS/7hUuZ/WCPrwV"); + a("ffVYzwDelZL8NfTUwXUkNS5X++KVlFzgctYvANnrP7qnFLi85YuoZjxctdWfB7RB3vrFCHstQtcf5vJWjnrupJ+vX38GWc1rnX"); + a("Yrk/27M8Y/4Mvrq3Vwk1fqOQRyFo5i+IgtRQe4XKWjFU5WavxKcTlrxyU9FtSM+jzeVh4HyPNzr6j/EAvFw88L+fqORu5ilA61"); + a("OMkEl7dy2MFZR1TvmufytY4v7vKatZJ+i8vVdxzBY9R4mOV4iNSWeo6XPztW4ZBsz7s7dVmuBS5f5SCBd4QwtCUuV+1wKOxBCp"); + a("b9JtknjQIHFNnvx7DwOgsHsPtXkoXXWTjAzf5n4WkWDmgoFq9l4SMW+jcVi/ezsMUWxWKMhXr+G63d5j13DENUCR21L3Y2omjl"); + a("SUeG64u3t3n/7xH09adjzvBT1fIUZ9lIrcoxPK+1W/OcAj//kTbt5Fieg3hAw/36CGueEvi1eWkeyw7l2ST2Ry/t23yWkojjex"); + a("Q0T08HzaNt2pk8txVHZfVCZa1F/V6a54oNz7BDeTaX7HaEeQkuiMUvw3c1qP5ZOIrmMe9Qnk3isJycKndQz1HWPJeRvthJ88g7"); + a("luegeqkci06OaPhuC80z20XzaFSdyXNbsTQEsbGIvTfAd2hInvNH0zz8DuW5jcg7J/9uD80zdQzNQ3MozyZxXJ2sIJo92vRe1v"); + a("z7P900jwWH8tyW9c+RmfJMYf4Ymqfko3kU/irPsxv+4d//GVBkzXBxVP3+T7fN/K+H5tMad2a77rg2z62e2Gs+6/adQrr3WJrP"); + a("RNyZ7dvC7zNSPKoy4uEemmfrcTSPtEN5Noust45cYBgyiw+w9qJ+p8l1PM1j0aH228zbMyDrSXz/jBqXlmx4ujRn8txOPENORG"); + a("U8q+G7asR4lD+B5uFzKE+P2BuJKLp+RjQekyvfbZxgzXcJ6bkTaT6aQ/luI/bN6GhTfDeQbNeFk2geGYfybBKlBJv0xthiG3y/"); + a("kOaZ9tusW3Qoz+3Z63I5cvHa5Dd3Es1ztpfm4bnEmTy3EQNxNZmIxwL8O5X0/SXcR/PwO5TndiWerDH5uJvupXkOBGgesw7lub"); + a("2I11wgOttH8/T20zyyDuXpEdc+GBCs/F5AOEDzFUSaz5JD+TaLxovHwJQSuRjft6V4NgZpHkLCqTyNZRT8VuoTaZ7LNjwnHMqz"); + a("URyLXnj6TDSJuBCkeb51Ms1jzqE8ty/5dy9gk3qMR40n0/P63ADNI+dQno3iyFiln2H5ZLo9FwZpHssO5bmjOCZfoETkmMnP8N"); + a("YAzXf+FJqPV3cmX494WtwYkcaMb+mUv0tN8p07leYz5VC+OzO+5bXw4IzvalN8Z4ds/KEO5bsD49u/WR2Knq+DLP9eOL1vdnGY"); + a("5jOQdAZfen/7+lE6toHM58c2IVGNxCfX9lHMD1mP929Bf20jNvNsh+kxdzx+z/cEA70nGpgDugLAfgO1kwzMcOwzMIX8NDADdP"); + a("kNzAMzvQ3m34/pC4yVdVwYttavD3qdk2zm9/8z/WpBxIFZHu9HXLTT73go2F3Wr3/EWr/z0OvS6TbPE/8z/aZOhh6BOWCex4Pr"); + a("0K+vrN+MZD3O8vHBN0brT5hxln6FAegVqAHTwNQpyD/VwALSPYNIR34Y+RowzeODpvlJaNz4JN+aSnGMWutVgj7TIZvnJofqtc"); + a("D1wPU8BL0OGyidBn0hPQcUhq316hmx1uvubLnvhaI6GZVVSwVPQI+jN3uuuG3vd4fufe/MwiW7n3DSkyH++xzdfR1eX+Doo9o7"); + a("+n1Btj+wv6+9J9AfbD+6W/R2d3T0dPZ3Bq905VF+ib9fRDsJH+K7kOM2613qtJPvjOr0vNSwId/DzEGf/DggNDwTS0ZX92DNRm"); + a("IzevRSZXXx9NhmNTKViKvRy5VE6bpm0X7AMFADpoBpYAbI61rk9gzeBaSvmO18nJ7H+s+0Gc8d0i9qnrNDw6PimeVnMg16qLd/"); + a("8QAXvc9y8sjpIzdb5Ht4/uR+wn7T7GCwmR1Irruvs3eYzpeG6euZmjpWVS3yGyvzj9V1ROvumzxFVsn8oHI+mT8sJ8j8Xi1hI7"); + a("+Zvr4/aDuXXadhIAx3AQuWvAEbJFgYOU6cy5LboiAuUkEsK8dxG9M2qZyECh4ekcSTuplSV0LCm9Hn+W3PeOI0PTo5p6vu+Pf+"); + a("9but179SR6//k2y9/o/1D6//jZI330uG/e+E+XldR7f/ZhR4rk+ogyxv+KEOev8PdXjg6qD8/v3PW++zQx26pr32P3J1aNUhV8"); + a("bzHjfUo7YqtF+uHvNpsM7VZdL5r48719+H2u//0imv/5sq/OPLzn8+jfbHL1r/3xnoqsKWHvun/MCP6+Hya6wA1dXlV40KTz0g"); + a("TwOym/FCvqBC87h8OwMK3/X6Qm62C+/nwbzp/EDDZLTRYJevPnBKFwvRHGqS0HTSvfm0Igmjgy4BfZLw0aacgmXj+JT3/fKY8n"); + a("gB/VZPacphPquLYVwc2PnTmNn+EPwRWDtfPM0XZ7Y/6cefdFXUp4akSdR7R10flmtNqTft+rtugLc5CwPm/LtmLdc8pgEJsrSP"); + a("M9dbDvsSUBaPcQc0SkBuOYjoRR4DB4gZ4hBxhObjiGPECRqfIs4m7toNCcbRwPahdrPZqJGn/QoYp4gDxAxxiDhCzBHHiBPEYw"); + a("7v6lLkw3lcvh/jOwipq7ZuyunnQqTvId/FUVSqURPLUg/YGlFMic70u9ooUTkWRuRaOi5VbtTJ8dYotbsYL38avd9ridZr9OH4"); + a("1/VMfRCVFtXE3c4IPXQAt6XQl3qp5uO1VHtRFVpO+s7sdFM6valF209n6xuyyb56u7iK57WNdf3642pkiJ3IqrF8ZJTSYNKvQU"); + a("/etqq61CvLoA9BP3GEmJ95+ZLP4tGCk60y/Qad/WR1UsWYH/DH2pzUdkiwa4hopNaL2fwsDhBn7nywJASbgE2tTSlYex9hKbc2"); + a("o2CtPmIUrL3vRCy6jP/tq9dvlq/J+/GSGn75sipUMehtVaHtap0SY+9PSWAtrJ9Ruy6lmZv57dfX5N3nKZ8shCM78flAy2NAGQ"); + a("eY/H1Xcrlu5/y6qUma8owEiBniEHGEmCOOESeIU8QZjociDhCHiCPEHHE81acz9VFc5Z8SPTGjjJHv9uTKZrn6NHT0m4/8c96Z"); + a("837znm26jl19spDOrneVy0K7W5aoiq6RohKFmPQhWA42ATvMqTrZh2KtrEZrQ4FW/iLbnLjPsG0epBQigPM2HB9SqDnniFuBGP"); + a("lFM+fazHmHxh8Qb7s5H4X7fErApp7nFAn2ln9zx/9kcd1+w+MdNO/4p2Af0qHd1lGwD0Dmjcfjf3bH//yOn8z/18NV/v/re/vj"); + a("8/cOUexruXtSqFbJVhU31vvDyPkzpw0DUJzL0GZISzL0jrsOVZdeh15CL+2VS/8BDSRN27tcQ5qMuKAUl8T22SYHW8aMGTNmZG"); + a("RkZGTsyMjIyEcoJnpYkm0JT5H1fpJO5ECW39NzfP9Z9fn2EAleMdM6+U3PbJeSIv1jWvOKBP6A3S0anlkrXVLLPzFMv2y75Gxu"); + a("DyKmRZbZitqc9+TONPH9PAvHGTQUN8zgfuJ87RC23i5YpGU1DKse4BT7NsSu1VquO7tl+CRYk68wYKMUSuZGINbOU2J6xLJ9Yp"); + a("+RWpCAJgvhZlD/QuagN8jcbn0PBVL1c8jFVn2r04nWr6F+dpH6K4K9oJVGQ/mctmNZyv6wm9OkrkXPtxfr5j3q75pes+xSeuQY"); + a("NVpqF+59Q+nKD9vyG8EZMQXXNTpVGIqUxy2k8n/Z+QyPKyeUNhc4FtIP1XjqivGP0pWy7V4Y/hH1ff44lDbEfAiHP2dI6mBdKm"); + a("dQ1hyZgHJWKucwDjbQvFS+Y+U+K2NHFeWcOP4Bu/1EGDhA/L161PGOffPcS/WaTP+gUuz41ENrV0y5gYYFKpUaMy6NoPqSp+PI"); + a("9ZnzSDuIuuPsAKHjKvRhcByRcZxfJehvoA8D2Ihe9+P0A+i5IDMyzJMYANcUHB8Mzme1IPLNaSFo+/K1DqyC44KryKz2FeO8Bc"); + a("cFQZEBHV4kc//A8cHK8bYWXLUYFwYVh28UVB56LvDXe6sfnwOOD9AhPHedPCFdcJFA2tU7FTwGFxPscnL6zyFjMz4pKLVux8Kn"); + a("4ITg0f6OAkJ+ChwX5Mm+103QEJwYjMl80IEO46JBk4+q2cmBCwMbiGo0nBjAgZ4LPow+6ef/DpwUJBh8VrMjcKExv5tXIMgVpE"); + a("WD+01BM395cJJhvF1Ug21wEQN29YuK7IETjMyHu7qPeQJOMAbnSjqOuIxbGG1JWcWcQi8ZVlf31D1dg1sYQKdKYgB9jJFytJ9M"); + a("4pqCjxgTh19VdNZjXKzBr3+g67kBPmqY635TwF1wkjEsUCnP6/bkdcZ64KRhK8XoiiHjR/q5/a74nd+HXjRUwU7l+AkT0QYnGo"); + a("VgE+omcT2By4GD/WWcxE3ARY0eP1VDJS3GJRsZYGE4bMU0cAp+uRf4x8zlG51qyaeQll5UO7/U/3kTxq2llluRk0vosZBekfVj"); + a("Xn94qX5PXtc8X7c09a6m/j9zV87rRAyEEYIOEOK+ZQFB3AIEEqLilpC4xCGgoDBZByw23ijeBUJFzdFT8l+oaBAlJT+BkhKPPZ"); + a("MlXnvechQI3ntJ1t/32eNrdux1yiXuv08e59frTkMC/jrLf5rjB/0TafwKwmMC7jqbvxPH/0v95XN91j7Av9R13v54mYkj9Ypn"); + a("rZrfCK5k+8fZGfWPVzSusuknmD633nnrztULN67fvnM7k8/dFEcyQ2XraopBipF7tXtgd/tQxAiOPj6axm+nflSXw8rY2h61Eq"); + a("kc1CNZ3AVpQMJp6sdGSDGwoq7836NJ3KauXsAqmNu76TeQDhQrKlKKf0uX31skKkwHt4906AS8oFVUynpBPZ6Uakyfd/F7ErpE"); + a("BSSmnjMk9U9RPK+ZlHooayWMHKsz4pyY0/hPipAvWYJnMhPqhXZa/exQEDXw5OwwWDjfXpSOvjWCLJ2HLeY8Kd1tjK5lzv8/SO"); + a("uqZakey1Jc16Ww/gBU35bxUGjhOafNEA9a7FUPajypZ4FLB/apJ/ujfMDU/M/y8dyTJfEP5/tPxLNw3yZscAd9PibTagI3B8oe"); + a("FTdLJa0SjfupnyhKbkVjdA1h2VnVeICPTkpTiKmCNqVLldDdlcj3dGoqZMU8dHGbEedbJ4VAjajwjPJO+q0ZnZoQcJHJ310jH5"); + a("UKxpqhPyVfjLR7C+pnxMAijtcbBaQfeNSLjN6Ojp4zvInV0vaI9QCJatnx5wrEEEZyqKLx54l8psCgV65cdF0zmc9YTxOVqbQu"); + a("LKC6uI2Iw6BC29Yh1tqvXDpA9Vg+Vtn5CUoThcajkS1t/01ZPcTw5aGOMhMTF2Vj23vMT0gA5sc50nG/G+W7JuGY9Q1WzzNl8w"); + a("nn3DrDNc5o+wfFAVE1fmniEcxt9mivdg9jumfAKTeZz0O0Py7wj32YSjx/Au1evZhIA3c49LGlU7p7tcsAChifBW4e97f8wiX1"); + a("egML/7DP9dUjw84Xgbj1tHDothcUnH02dHUAAxC2n92k9qitFzlSmXLG+FcRP6RuGxjTP+kQ8chl4vsX6bTeUpbf+Xe3lXq66B"); + a("upLv/OLr91OAdbRMW4vdT+XFF92LF1QFQh3FtbTR3SOyjL+vkhAQEArKUUTqTHw2qeDSz4b7S/QIG9HArP6d7Clj6aVmOnhUMm"); + a("zv1oKra8sa6psPPw8yn4NaBbVxnV/nrg1WT1ti70axsW88jKVr/MrT9vyek5CoSx88dd89TlzMxH5zORH8+UqwlQQvL5i3WEm0"); + a("CUGGTrbdeSekCQ6h+kN6+kVhOdNdJO6R5I6LZUxIREwJPJ/7rFcdN7tILpXxu7uh6DkFy/oPvMxoKnZ/wI0JhoDGD2PUR+JlAY"); + a("pYpfxgS2fkgfy1dXra2hGR3l/f9Wd+hZPEldEQXXn0kX+nBXM2UvRhdI4lb8/RM+9/N5Ofvczo/XSzwn+PY/fW7nEs64eErlfi"); + a("zH337/Gf/9dcz+9gc3r1y/fKNz/dhifVtVi1vn7om5Dx8mhCs4vLSfpw8r+Xi2b3z2+xuMG0eGAjtFXyp1Zza5YkbVYn2vXn3n"); + a("UpjGz5VaWqJd23cPwX3k2bhugcfvESGS95AGbUWvKTcfKB8Ob5oxzNKq8BRqycx8BWy0UPKN8rO5w7eYqf3v2kz514smOoYffc"); + a("F+9d3/ZZ4zeHDbx/nwbdqPIv9fm0K9SPj/zLxkZ9aPB8H99wQ45DJ+DOkN5UQOdT0LkuBHq0IVR5m4YKRHBCjJzNO0WCrGqn5S"); + a("4f4vxg9tdSQiUSNKv5r4/WK2KJTRqkjnI+b1CATkntcj3mftcYy8/xPzt0D+vvGathY8Jjl93PhwpDZ4s44OzZJ6hBwHJpLLlG"); + a("tgXaXbw6LURglX+7lybezqwPI11gZjN1rkxn2Ev2E3QiKQj8Odb2xwS4T774ouS4g5F6KQtRShClj/ptV91Ni2UNl2hpsLjlwQ"); + a("T3Tdi3cYEEPiTa8HwOY8cRm/PLMXb+EQIwBw7aqNMy70POHAE1kPn/Tof5QUjZOpb9h4ZKG6H82EW9iscvW9PsH/7NEMIGz7u+"); + a("UdJWlrocBLHPlIXS9+l74aQWqWnzYL/bKldPCi1zioEDkHsvt6L0OgpV1ZUUXvfgFFcMAlcGtincz9/qYcfyb96pgXgp6MPTu8"); + a("mfSbU7w+3qbNT8auWCeOGIhenYQ2Shc3SCmSbeiiNChFRBGhcJf0m9072AK82Bzo/p5n+xmL9XmYCgF+M7bXM/M8M3s37x/qeC"); + a("nJB4yoOl429SDSAiLc40R9RDfsouQbgGJ9Rvu8mVgoQNGeznH3uIGFT4OxbJlS+nNQzowQnk/JXy8SCPX4Wv5u6H0jfp8u9olR"); + a("jFyoioL6fYOgKGIl99lTb7pSh2mq4yD1ENPcN8of3YREv5+3w7QD4VDYI+VHYOO5L86XSW3xjbqucL4E3OeFHj6NvBBnmHBRnA"); + a("PqiwKa/oV6svXr94mA1n2bdYpQaiEAP/NXn6v4NWEFpcozwqz6mAqbLZAl36iPj9RrZ9FvUF9Ss3WVIvX6KAD/UukjuZDsR9YH"); + a("AQWm1vfm+j4K+uxcj//B8ak1cJEm7cxVLq2GZM21Cxkx+FvzEEbTuF2n8+uQHFGU3pj/ZeZVBzj/aQBP/++w9K12ZuMr3KFMsb"); + a("KPen7AAuap5Pj8fpfv/2f93+CN1B6WkdjNI8h7qKw2J9jP+HV2E+7hGdkJ/qfMj/ebp6SV0OZ5W1/8+vP3YmNAmsDRQol8i40Y"); + a("oUqOC0UfkPf8vFnBz6fmXMjPX5I5+dBjoNhvG5FDaOtliJT88PqASHpr4siv5svl2vy0Y7zBfT95d+oV67Feqn+dHKsPquIhmJ"); + a("DdcbzA8xb+kMxDcd/JQ2V7f2k2h39nKwechMbPzhkpnov4EomJT0uuI1byXUAS0ubtsem9bIsirvqAyIBmvqe8zgZK5dlBzSuh"); + a("ji9kkHzPec+/TkA9cod0+xMRzf358Mo/U7DqXCZvS0DzHGysDW7oUNpAfCN/X8m3NgADjjCxv4WJ3qv93bfNdMuaikHp+6w7G1"); + a("eK+w7LSA6FfuBb6/p03N72+d0dPf8oEInvnN8xJAddPjmpcFqY/ulWKjvh+uiipP3/Rx7Qh9wt06SGKB3/ABGIYKZYhfxcrS/V"); + a("XfD2KruUxpVeX0LI/LHoiz2Gz7RdS6vTQBT+JjYmk8ZHfWHEggUfwW5qra9CQa8PFBUl6koUxW50JdqVuBMEQVDci+JO3Ii/QP"); + a("D+ANGiuHPRjTsXBcGNfqYTJ53EIQouDie5mXO+b85rQi7cu220iU5Gl9m6fH9NvVT/XkdcctVGxv7K62RofM6pkLdfy4bq//rp"); + a("7+IrP1Bbfu9y8sDZo1TYpNbtV3oTpYMd6GInetiF3diDvdiHA1jAQRzCYRwBbN/dzybnzh47cQYAqvz9nusK96HSwhVwF6ilA9"); + a("kVpxuNpWgMKT0X8oY4/fkbkPl4uQ5Yx8F8aV1u/bIalvVqhbX3uO4NpUPJMKKaQI3661TZrxKnf2tvCbwF55K4DoilDpZ2RSe1"); + a("e5bZa5vsvqCFgOgAma/0OlyKsOu9dV8vueRcFx3tW9n4NfjJ7Fl6/Wh2rX1UwK27qItDmFma9wpjVQnGoIHBdCUGkxUYjJdjsL"); + a("gMg2GIwaiOQS9AKLZCnFY4DnVrOVoTidbYR2vRQ4t5ao1ctBh/+Yr82g20p8vQnoRoj+toLwZoDyXaIx/tnkd/62f++g30pyH6"); + a("kzr64wD9RYn+0Ed/5KHfY7zExtm6tBYc1oJIcz3DD4lfJ35AfEl8cqFv+Y7PzfVxA/G0jngSIB5LxIs+4qGHeLQUcc8lzhriqB"); + a("wluRw5Dn5FXtWYjruZO50jXY9RgIg4EXEi4kTEka/ma/MBO/EjZRNFrPSxMql/lZ9z+JmvlH9A/pL8ffL3yJ/cRy7518h/Vco/"); + a("7zs6Adw6BTw9nuPUDNGkfZP2Tdo3ad+kvXw0zwv09YXy8pSxt8BFsEB2+XrqKq5mfadYklg+sTxiEa/npljzPVvs7x1ngeeUz2"); + a("eKfWPloPJi2pj3s77YrPtig4cNQ0pac9vTWBo4OobW2pvfx53zgLwAdKgtcaw08zoXgSuUrxeKMcns0/0nOg4asxrG+0tA6zLw"); + a("kLp63A2c/LXiodfqninnrJ/b8TWO9Xq5h+UL+Y76+174cRV4fI29cNXYT1LGS/XxKqOPK8R+003WPOXzDc2xMN/X+ljLOl3LXl"); + a("qrfIishxJe5+Nsn3lqZhSx8v5scy6ind7DTM7dBu5SXlD0Ws3fjFXm38xTee7KZ+R8jNSaG8aa1RKrRQz9U7OGjZxa54fGrMxb"); + a("LoHkvMnHohjT8pjZtcXmf2jzXSuZr+FP94GvlKeU/83FPIuVtubRzE3pvEqMeWa8E9jvy2fvn3r0j+8TQQ2B2AJaG/Vt1FLel+"); + a("I+hyWdVEfhkt/nWr5fjz0BvlPwVOe2eJ4W9b/mquzd2l7/lnOmYK96v6u63JJzM2f2s8V+npm2dl92v4Yu5W7NTzFm5Tn7yap5"); + a("hv4UhXH8eey9R4SQn+y9905GRNmrv1227E1WZEYoI1FSyi6RTVmFvEIo8YJIVrwQn64r7nPPPa5x69tzzv0959xznvOsc84vCx"); + a("rqxr/an0uf/w91ydtTDnl9/jDR9qZR9+Z18Vj4r5T4Gck1gOy8JHISnAF/kyNOvixyCNQDafgLXxHpCW5fTjtuzz42dVxKv+7h"); + a("/mtK2viT94ZITXD7eooYFuT8+cj58+Iba8X2T8/pZ8JNXCP0R1uvr8/6Za5ZJufZG895DHX6NrN//+38V98T2Qt6A0+/zn2StS"); + a("efDfr2uDZ/Pnhf5MsDkRFQu++y9UTbzqHB+lh9CKnb7xfNI0WJoeG7WI6H/UXkB0SeiRQDVYBLf517lGkm1mQZf21knobHt2+K"); + a("6Frh3FJYj0usrz4/dGfrL7LNJnl0y/e5LI3k0iZPrmXy5JB3k+H15gT/Lb5YP/jzfZDTVEMvTPlv4lbgI3NK0dCmvp+HcQZGPG"); + a("hNPGhNPGhNPGhNPGgdnF81iH83sIXc2AJ2wF6yTHgWmeocBGp98/HsKlfBCJDGl9o5ROLM0aieT+W3s+Ap+DGGgO/td75s4Riy"); + a("cqlsya3yBj6lPpD6VeovgTeXQf+S5OGai/uc1PiaJoWlCevRhPVowno0YT2asB5NgvWoF/PfdQuo1C2kcj6/OmVwhN9KFVZpCV"); + a("znJDFfuykqm4mcWpcsSv+0F56y1CtQf0Ld5zt+niORX6APldCHSsF+vE5sDlOKqeQuTg2auO6hb0SHYvHgE20LllDZA/Wdr1uf"); + a("nbOkykCwgbY/+F39v4DnPdgArB/wr/OflxPPtDYZnUqRE6Y5y9heTuU1KF7erGeQN+Qhb8gd5g3ud2lz98g7M5+ksc2ppPIc5K"); + a("/sX58V/L4bVAT+/NXK3dqD9VVRWyifwU+Bw1W+fzkf5WngNnXTV+q8YVxVlQugIvgxxsidRTiO8DdzPpuPPB774hu/2pg9nz1c"); + a("TeVLdZV2UBNnnDmFK2a65GN9xeNaKutrqyyGCs8j6Dbqe6BuuafX0891VLLqqqwEzvzJjtHa/tHoWPfUUzlVX6UeVHi2Qi9S7w"); + a("21srY+0q7h2AYq1RuyhtDYOtn44Gifl/ub8mAEffhi5U54ejVmHaFWz515q/f+Ktr3qiYqBZoyB2iatT4H74JmjAUqPCegK6iP"); + a("gP72/Ay+bM3RC6hz3MH5L2e/jLUk7WM5A20LtlCZAk3bZhb8r0A98CdrM6WlymdQBHj0LrW952+tsgacb2V1xb3m1dqotAC3ae"); + a("PjOwDPRdAbJOov1NrBprYqg9rRC1R4hkEXUK8IdbW3uVOR9uROHYiNtBGeXNR3UT/cLp0ele6osgocpo3wFKS8Edzu4J/vO3jy"); + a("dkKHoD6+2fBsAhWBkcsf2UezzipFuzAu+knT3vrgB7Qt2RV7gf7OPubAtx+0A+Ede0jt+YTfZ/vvI/znaUm5RuJdQthX+rzG87"); + a("2kcWeKSIb74QwyzyDzDDLPIPMMMs+Ea/ZH/Vt9iOQ33WJ56qn+KkMG4HegYdu/yJk8Z0uRceSiTc5w32XGMVil8RDGAXXFyp38"); + a("dh98BSnWw8rFm2vdHYYeD8feoT6+2fDcA/WA0w/0ifqB7iOQLXgDv/B0ozwaFAGRdg2i33nI7x/BYuDSGzPv1PFiX5ZKoZHYIN"); + a("Tl68s4fFmDUSpDwXnaKfXqlNeBYyApl7D+uNlo5j2GPmgjPBWoT6P+hLrnbt2ztuZdAvXcxdi81O9b3O/DfXtucrFcgdy+75vz"); + a("EivzECuJl7xHFvYcxanftyaxB52s0hEkfT+NH/Ddk5lyStl75BFSKwe3zdeI2fywGdj8TOwBmmZvux/eorPIx6B/8l+dJbR5Bu"); + a("oBMxfnWnyYTbyfo3IURGzD6HWjuSo9wHn4DjzLJgUp9wNjgC9+X+P3h2AKiMoqJ7LK4fSPLeZhc+DNr21+OTeysuoyX+UQeEKb"); + a("SExLabOzF6pkX0QusuB7j1nUC1A/v8DMzXx3LTynQT2QlLM5xx/KKPuP7y9ROQKeLP7e852lrP0yyrwL/BLlpaAi9fAeyH+/k+"); + a("W6twErVHaAc8B79mPjiD9ux3SwwiqVzGrkt1JT3b/9y51Mkj9X8GCNyrC1+F8gPPepT6e8B6o/c7d4ztHHf4cX1adcMb24s06l"); + a("73piGvR3/yE7CN+VjdgH9LsPXx74cP95rD//HL+ZfTyo9419swrBIoii8PnHLuxE7O7u7u7u7tYXxcbAwsDu7m7sBLuwu1FUDG"); + a("yszxjz2i8+uHA4Z3ZnZqd28i74md+b+Ik8kvk7bLWZ9jyLNCqgrMCol1/f5/Xp+Mo26Ot5du4xrB/AltE/GHO/WsNkGRdQC7CU"); + a("cOKqNDagAbgP4f4qXfZ8zsf/bj89LPvpYdhPZy+d8S03fnMzvuV+Z3NX7Zu+qu2EgDpP5l3jjXe9S2+Id2Vq2UT9ytln7qnM1Y"); + a("DAr/i/g78C0ygL+Ed7KzEjBFOEd3mKJp+nYCIe8Hw648HMgA4A3GoyK6DL4BXArbPcHzgnoCVAXDfwvwwtWFzj4HW488Gftxm/"); + a("B2yNE0/mUofz+GbgQFjGhWbv9+e9/sre5Qs/Vtl+3f5+af0QI5RiNALs18d41z6ifFPfWszabinpXOTrw9utZJL3G0RSu+tOtZ"); + a("YFtGpFQNtX4h93Htw70VoFRN3iDqC3LP1QTr3fp+/LswTOEWiLWWiLWWiLWWiLWbzN8VdpS7+GfZUN9CWrA98dh2JGDqbI5O3z"); + a("9Ab15+ybGHdBOeIQV87N9AlbiA83d1RnY0DJcJcF4sqFuxx6C8/NebkxVh/F/4GtxAn/yjyo3DbSsJ25wNZff8dI/DffQf8Hf6"); + a("zjd+cYrPMpv/iU3w/2v386xvqzI6u/jLg7oPngIPilNpcszNd20ub88eUexq69jF2wlS7bnuar78ewG/P3fqVvObQ/oIUH6I/g"); + a("H8+zf38f/fQh5seHiRv+9THYp5czdMOu+d6RgPYfpS+EfXnY8/vPx327XocfDyjFCdo++FG9WmHLn2TeBTaDH9o6G/P54acCug"); + a("nSgV/xX/90QBuBgDGf+uF8dsAZvk2QDvyqLUv2swFVAwI/8zsPPztBO/B1PVg2Kn688GyeWZynT7rAOgkW13E4Pe52cCB0EN7h"); + a("0n0Tx5Ev48h8iXUMyEc4cdW4GFBb3IcuGHX9t/aoRtsfciWgcyAf+O764V2/HfKLOYhfPzx6GFDfR6wtr76Pse5j1gug3Ad3uO"); + a("u0iRd8W7h/Na1Gv/jT+o3xOqCM4OKrX5urDMXvIlAOWOdYRvv9yubK6KP9/d+0ny8bxOkBEHg/nwCMFVH9vobvJ41+5+tvMG4w"); + a("p/T4vxjUfdXPY99OmGTEm+zdGJTrm34+dAinQ5GdyhHev9OzWWfOu3/+j1mO6E6jYxIA9nYvvzb3tdPaKpZT5/TkkzjftZdtRn"); + a("vx65XlP7ApJm/WM3st/+M22DCz01gQD/xof/M6zyNmcVoK/2r5DcT/mazUDfyjuLNkc6oPBH7kbzXPL4Ge4GfvzpPd6QAQ+OG4"); + a("/6n/NPdOvo43aC6nXmBpTvdL3+wV/MbM7TQV/p3xfThhLoF84FfeUzGPU38QAfzOe+7jP39e0gf/rK1swN910BNY43b2fE4jwB"); + a("pgPQ+X36kB6A+s55fePi/Ac/BNG7PW98Z4nqGg0ylwkTjMcwe+HWtf72ZhpyxFnGqCH+3FPuN5kaJOLYH3Z9nof65/Vq6pijtV"); + a("AfeKOfOd83j2HMQtYX179j7JFPxGLelUD/46nV/PE36WvrOlCFeaNgL7uH53vFhO+LugHPid8+juZZxugHjAp9+fDZr1U5Y+u5"); + a("zTevBV/f/CuvcX3L9kJ22nLXVVpy5gCvjRuUqCak6VwFL8BURc6H5gAbDifcn9MtWdOoIfxfuA50lr8P3C79o8XAN3D2DsNZvr"); + a("qlP4TVXTaRjs82rY5L5fNzQw1g2/sA7ZV8+pfH3eAX/0HzuMYjPGxiZMbMbY2Iyx1v+xpwjXu4FTO9hYh9pngA1+zD/ea/39by"); + a("F9E6ch4GJj36Z/3RYkfVPyB+4R/lfDXMJ/hmZ8v/CvzMcG4rdwc75V+LP52Nf/GprtYw3h0rWm34G/3mP35f9lGkKRhpDfpCF8"); + a("W6eZ4FAbH4+3dY7u3V/lPxT5h438DG3vlLoD6YLf/w8SBhuG0NgwfLbH8dV5nGkzQB5+kX9sc9DB3tf3+Qm8K+uglHUQytpR1g"); + a("HK+gBl/cG2Hv0+hl8vg9zdndr3os11+7YP/2ptaX7P1j3fdu3/Dez+8f3/q+GUDJvfZEff5jM0+QxFPmlbpNt/0+Z56RHD7vzr"); + a("fOPHumd8v38exydb38//JzJtfQeNcHo2kvELNuwuzDB9RzldG0MY+Lv1++Crf4TGOm0cx/wP/tUwecczl51Amxj362Fe47/0JP"); + a("oS+FfDHMR/xCn0yXAgJnXaLPj7ev1szzgQLaSiNQuqaPQv0ahr4jDPzO26+cH/0l7/yhm+/X/2z+2X5jltBflA4Ed2qnyT+n/9"); + a("k1eEaFJJUG1WENWDe4F66GFwquhSM3Q6uBYYhq4HnwRj0Rfh+2ADWjGksGAH+l4cKUxc6RA6ApwEnESXiydNBhfRU+FE8aXb6H"); + a("RwLfAQXQ8eCV6gp8L7QdDZQXQIvgHCou/BIRNIUdAR4PggNvoi/Cwh8aKVSMoGUqHzwUUS40aXg3uDYuhh8BpQDn0RHpaEckDD"); + a("iplUaoSOBzcD7dDt4KGgK3opnCyZ1Ac9FV4LBqPvwdGSkwd0PHgamIheCqdPIS1E54ODpaTc0BHgBqmlXeh2cJuM0tG3Gt4IXq"); + a("C3wFczUQ5ziB9elZXsobfAM3JKpdBL4au5pE7oe3CRPKQNXQ5Ok1eaiU4HBy0orUTnKySlLiKdRaeDN4Pb6C3wLfAQfQ+uVZQ0"); + a("oOvBM0HQubwLPgnCoi/C8YpRF2hYpUA8dDn4EUiGVnHKoyRli54Kbwet0IfgmWVJM3opvAesRB+Cw5SnfNAR4ErgHroefBK8QF"); + a("+Ey1QgDfN4F/wYxECronQaJENfhINUkgqhI8CbQCn0FnhZZer0rYZDVpV6oiPADcEwdDt4CpiIngoXrkZa0eXgcNVJJ7odfAzs"); + a("QF+Em9ag7tDt4OQ1aa/odHAJ8BRdDk5bW9J87sOtQDZ0uzcM3Xl0HVMAgPFBUU4x59hqf/ateAiKYFAEwaAogociKAZFUIy9Kh"); + a("gURfHsRfEQVBtMq6gqXq0Rxdhjf4i9lt8f3/m+pmky986997VNOuU5GKYbvPjhxqxDPhttOuXoCPdUR3wMxuuEv8ZE3eCNK65T"); + a("l/kiTNYZP4gpusZbeSZKriOegT5d57ajXKeu8AwMfMjb+cSj3V+d8M0o6Sr/gCG6wfM9wqxJB8f4u3NEOuYz0KJT/hOxDo41Vo"); + a("zQMXegolP+F+06OM5+QofOeC7G6oLXaTd2XeZ2VHXCjxxvvLrGs5HrOj9/gv2lc17sRNeqQ95slPU82Tzw/Qh1jd85zRh1wX+h"); + a("SQen+zho1jlPGO180FV+DKN0znMxWsdnGC/G6OBMaxWZjvlCTNQZv3uO7+nWBS9+rjNTh7w9enTEV6DQGXfjO53zx+jXBa88xr"); + a("h0iZ/CwIe9D/+D9XRwXhCsiSad8e7nG4uO+WS06oQHXmDt6ZAfRruu8ZgUuso5Mp3zB5igSxe6d6hq/wdPsNrF9ogucYI5usbP"); + a("XGJcOucDLnVm6Qr/hH4dXGb9YMAjfi1/jEG64Lsvd190nRcdayw65I0R6TLvghYd8/WIdZV/RZsOrnBOoF2XeAckOuIj0KEr3I"); + a("lUZ7zEOGtPh/wQMl3jAVe6jzrk9XGPLvPumKxjPh1dOuW70a1r/BZm6oL/wBwddPqncXhbl3gzzNMR74fPdYVPw3c65evQr6s8"); + a("FfN1zgte5foedW28CdbTZY5R1jEfhaE64QyRzvgutOgaz0Cs6/wpRugGL3i1PatDXgPtusy7ItExH4UOnfBFSHXGd2GsrvEcZL"); + a("rO32GCDq+xNjJrSVf4OUzWdW691hzqmDe6zn7RZW673lzpCl8x3lzpjBe8wWuHDvkiBDVv5wVvtN91dpN1NMG60hF3Yj2d84o3"); + a("+zld4osQ6YwfRauu8e8YroNbfB/Era5DR7zjbc4HHfOxSHTCl6NDZzwbqa7zgbf73LrCt2CCrvKrqOo6r3mHedBlXrRqXekSj0"); + a("CPrvAldzkrdMZP4Dud82fo1w1e4m7rRIe8BgY85mPyThikYz4Ky+iEL8LKOuO7sJau8QwM0XX+FE26wTve42zRMfegRVfutZcR"); + a("64J3v89c6ZjvR7sueN37zZXOecQkZ46u8C0Yq6vch0w3+LYH7EFd5esednt1lR9/xP7SOS9Vs6d0yKfgc53wNDR0zos8Zk50yP"); + a("dhwOPGyLs8bp3omN9BSRdcesI+0hyciGadcA0tmoPvMFw3eOku49UxX46ROuPfnvTaoYOn/H4Pqc55m6etBx3xAxiva7z8FOPV"); + a("JT72GWeOTvioqT63TvhjTNEFh9Oc1zrkLTFLR7wf6rrCp6FHp3wdCl3lx9Gnc34TDV3wz/hDB93OKwRPuB7eDAN1xOMR6io/jp"); + a("V1zm9iLV3wzxiig2d9HDTpEm+GZh3xfhimK3waWnXK12G4rvLjaNM5v4mRuuAlnzO3OuQ9MFrHfCtSXeVedOqCl3jevtNl7kJV"); + a("5/w7Jusgd16iS0d8B7p1lb/CLN3gI6abW13hVWeYW13iZvyhI94fQZf34dMxUKd8PUJd5RcxWNf5M5R0gxd/wRmlQ14TZV3mnT"); + a("FUx3wkIp3wC2jRdS7PtNc0B3ugQ8f8AlJd528wSTf46BetK53whejRGd+JQtd4Ovp0nT9BQzd4gZeMV4c8AcGTxsXTEeo6f4XB"); + a("usGLvmyMOuRzsZ5O+VY06So/hmad81wM0wX/hFYdzPLnLwzXJd4UbTribLa1oTN+EKN0jV/DaF3nbzBGNzh61XmqIz4Mk3SFz0"); + a("JNp3wjpugqT0Wucx47x6XojCehX9f42NecM7rKb2PQU66fz3vdeatTnoaSznnQG+ZBh9w51/3TGT+BSOfcQIvmoPVNZ6yOeZe3"); + a("nKE65j6M1A3e6W1j1zGfgDE64S5conPufMd164xPetd4dcLT0K1zPvw9Z6yucD/m6KAnCK7GPJ3xo+jTNe5437XqlA/stTZ0hc"); + a("/BgKe9nVeaZ8y6xFejWWf8L1p18KE9izZd8C0fWc+6wcHH7qNOeBzG6IzvwiW6xjPQqeNP/Bn8U+eUDvmzz4xXN7jzc2PUGYdf"); + a("uo865B706YI3+MqYdYUzzNcZz/zaWKZYS3zmN8aiU2771hmoK1xDWbMXCXtWB5wh0hnPw3Bd8JDv/Xpd5rMwUqec/uA+6hrP+N"); + a("H86jrPbfg5XfBGPxuPLnM7qjrhPkzSDV7nF2tYl/lR5LrGX/Ubu27wm7+7Jl3w338auw7+Mg8Y+Ixx8cS/zZeu8XQM1nX+BCXd"); + a("4CXnW8865NVR1mVuwVAd85GIdMIXokVnfCdiXePpGKHr/AkqusED/zFOHXKKRKd8LVJd5dK/9qfmoIrxmoMnUNU5v4VJuuDgP/"); + a("dMB7wSpugSb4FcR3wDZukqh4F/E6dDvsLXbD/XGYcL+nrGVG/nOzFY1/hAz0Qp6wqfg1ad8vsYrgte39esR+sy74NUx3wKxuqE"); + a("r0amM/Z3uMEEHfLamKTL/ANqusGLe/5JXYf8m2eg9GhfaAp2wcBproF/wTI6Wsz3iqGkMz5pcd9PpxOejkjX+U+06sBzSrbGcB"); + a("3xVFR0zr1IdMHHeW5Jh054V88a6dIxP4C3dc69KHTBf6FPB6E583yShubgWqzVbT75FZR1nf/DUB145sgQRLrMG3iGSIsu8/7o"); + a("0BU+A6lOuYqxmoPHkOmc91/G3OoKX4opOuMnkeucz/cMkVk64yfR0DkvtNwCwR865J0x+Fnj5XNR0ikvvLy51SHvgCYd8XFo1g"); + a("nnaNE5Nw02zzria1HRVf4Ao3TBy6xgjLrENyDVVR644gJBpw55HMbrnIetZPw65nMwWaf8ELp0jV9Eruu8+8rGqyu86irunS7x"); + a("A+jXNT5v1QX8Yc7H4dbVXJOOOcd6mm1OY9QBb4UWHfE4xDrjP9Cmg9WtMYzUES+3hnWlS7wbMh3zq5ig6/wDpugGD1zT59Yh74"); + a("NZOuZjUdcJv4seXfCpa9nLusaz0dB1/gZ/6AZfuLYxPO99ePl1rENd4m3QrCP+GMN0wb9itA7WdSZgjK5xuJ61p0NeG5mOeBQm"); + a("6ITX3MA90mU+Dz065eM2tEd0wud7Jsd8nfItCHP3nadisM75/o2sPV3jjxHrgpfa2DzrkDdAuy7zM0h0ztdt4pp1lb/ARN3g9c"); + a("vOHF3mPdClYz4B3TrhHs/hmKkL7sd8HWzmujBgunnjbTBIR7zt5taMjng4huoK34BIV3nbJmtGR3wIOnSFT9rCmtcJT0RVV/kN"); + a("TNJ1Xm5LZ6Mu8c7o1jFvsZXr1BEfgvm6whdjwAxrkm8Y6jp1laeiWee8/NbutS5xO9p1wuMwWme8/jbmUJd5D0zSMS+2revRIW"); + a("+OeTriFZqtQ13iFMu84P5yN0o6514M0QU/tJ0zQtd4JkbqOn+DUbrBu2/venTMJ2C8TnguJuqC+9GtA8+MWBEzdYm3wRwdcWdk"); + a("7+uMH8SAmT4v92KQLvjhnVyzrvFsDNN1/gatusHVnd1jzcFUXKJzHjzM59Al3gaTdcR3okvXeCbe1nX+BfN0sIvzZFfzpiO+GC"); + a("u/6Dp52xavHTriQ9CmK/w0Ruqcm3a3H3XMLyPTdV5zD/tRl/lfVHWwp33R6t7pKk/DTJ3zBXuZK53yI5ina/wdPtcNXn5vP9Yl"); + a("Phz9OuXJCF7y/rzGPuZTl/l8DNYpz4iNRdf5P5R1sO8CwQEYqiv8GYbpBpf3s981B+9jhC74xv2NXVf5PSS64KWGW6s65Ntwia"); + a("7y9AOsGV3n9Q90xuoyX4+Zusr/oK6Dg1wL5umIj8LnOuFx+E5n3DHC2HXKt6D0srHzKgd7vdAl/h5NusHdh9j7Oud1DnUfdZlH"); + a("YpROeBxG64z3bTMWXeHFD7PvdMhHYpZO+CG8rWv8AQpd8LKHO2N1iS9Gv874YczXNV7vCOt/lmvgvbCWjvkrDNENXrxizeuQN8"); + a("JwXebRaNMpT0KnrvHCR5pnHfKe6NIxP4puXfCmR1ljOuKj0aMT3vBo169j7sKgV8wV92KwLvi5keZZ59yLWBf8F0bo4BjPZvKc"); + a("gorOeC7G64LHHGf965QfRU3XuAfdOmj3e0vM1DGfhLpO+Cr06IzfRqELXut486zL3ImGzvghzNc1fhUDZlt73IdBusHTTnDO6I"); + a("L/RkmXT/RvHLCezrkXQ3XB8SivIzrm7U/yY13hLU82Xh3xkejQCY9DqjPe+xTng465OXHPdMRHY4pO+EnkOudVT3WPdIkPR4+u"); + a("8Gf4XDd45dP8vkJHPA0DXvVrec3TvY7rMqdYWaf8HIbonFccbVy6xHuiRcd8LmKd8cJnuKc65I3Qrst8wJn2u67weZioU97Qsw"); + a("Lu0WXeC3N0zIt0uGc65IsxYI6Pz8+cbf51zr1o0gUn55gjnfAEjNJV/gGjdYMXP9e60iG/iYm64EFj7E0d8kuo6zpPOM9c6SpP"); + a("xYDXfF7uxSBd8OoXuB5d5j3QomOejVjX+c3U9emC/0GHDi505iDVJd4OY3XET13stUDX+c9L3EcdXOpcRaE5OAR9usJXoqEzzv"); + a("GHznn2Zc72130c3utya1XHfC6G6JRvR5Ou8pNo1jn3YpgueJ8rnCc65mMwVifchUznPBcTdcF/4x4djDNGTNYlbkaXjniJK+1f"); + a("HfK2mKUjHo66rvCp6NEpX4tCV3kq+nTOl3Yau874L5Te8Hmv8iwVDNEV7sVQXfA6VxuXLvOZiHXKd6NN1/iYa5zvOuFxGKszfu"); + a("9a49UFb3+dseiI17revOsy74F5Ov6fYrsMlSKKAyg+dhfYhYKFCDY2dtfY3S12K7aiomJ3C3aLLWI3drfPbjGx4zcfDucg+9y7"); + a("996dh8KfV+Kp3sZnkfCSs+Ccc3zXdAGuMNf+65DXo6HexqfRVl/il+iqP3DKee6SjlwYQ3Q53o3R+jA/wQz9gTfOd4/1Nj6L4/"); + a("oSf8Y5HZhXX7zQd02v4BNIeNlrOMki76dT8jmk15c49mJ7q1Py3mXWrw9zDAboyMFyz24deSDG69H8FzN0sMLzBKt0Nt6ATXob"); + a("n8U1fYlbrLSfui3/QNwrftZsdyGk1OW4A9LrPnxprTugIw9f5+z0aF6GOXoFz17vrkbNCTa4hzolD8dpPZpf4pr+wG02+my6Lf"); + a("/AWx1sspcIrnovLrjZenQ5bozMui33Rw49mnchnz7Mh7bZt6j5LzrqYLu/Y5dnl2az1H7f6ch7cEAf5soHvLcOuTuCa17Dh5FQ"); + a("R/6KlDowJ93tsP3RfXgJ+ugV/PKI+6M/cOajzkJn4/zHnIUuwC1xTbflccedhZ7B25DwuvPifye8lw5O+n8S5NGX+Mcp33kdnP"); + a("bsQiUduTVq6bY8Aw115DNoqS/xnTP2RMdw9bPujw65M2boPrwgQq/g/VihD/NSs8rr9ArejXv6MF/FUx3DH/FWB+f8ux5fdMhj"); + a("ENywHj6PhPoSxznvOa9Tcl1k1iGPRx49gzeggN7GRy945uhLPP2i77KewUUuOV9djqdhiJ7BGzBeb+MGZpGn6rb8HAf0B65yxf"); + a("3UIa/BNb2NzyJGX+In15yr/sAZrjuXm86UVyG93sZ3kEfHcJUb1qxDbn7Teem2vA8t9WGOQVcdOc4t90en5LMYoi9xrtvOQhfg"); + a("GlilQ/6HTTq44/uOazobX8U9HcPBXd/rW17DOZFUF+AaSK9Dvo9sOoajed9yOnJGVNPZuDtC3YcnY4CewTcxXMdwx/vuie7D17"); + a("BNx3C9B55lui33wnHdhxfhnF7B0YzuNR35JOLe9tk5eYx91il55CNr1qO56GNr0+W4KxrqPjwDLXXkHeioD3MMeujIwRPr15Gz"); + a("YbiOXA7jdeTmmKrbcoKnnm86JVfEXh3yNBzWM7jWM/dHh3zlt2eljuHgjzXficPeK0JHLoc8OoY/ooAO/rrDKK7L8V2U0zH8Ew"); + a("118M/nRksdcneM1n34JCbpSzwyMJejR/MyHNcr+A/OaQO1QTbc0pGvIEbHcIrYZpl0Si6LD7oc/8J3Hc3SZkRw189y6rjmHaLm"); + a("TSitt/F9hDqGf6KpjgZbq8Y3d6FDnoNJegX/NB87Qwep/TmO6xVcOo0163K8Ftf0Nv6MezpIGzuojqc65G94q4N01okvOhuvM8"); + a("/6W2/jm8h2z9r4D/LowNzr3oLmL/Rh3lgotvvu9fwG4/UHzl84djBVF+CxmKNn8Cqs0Nv4EdbpD1y5iLPQIffHAT2aX+G4/sBZ"); + a("i5oh0dm4JG7pcrwBMXobn0fc+86Xc5tVTaoLcHnk0yH3RBHdhz8Ws3c6mlfNgrY6Gw9GVz2al2KSXsHfMEMHJbwe23Q2jsFeHT"); + a("lzSXuus3ElPNVt+SXe6g+8pZR7orfxZcR94Gd5UWlr1it4P4row1ywjHXqctwcHXVbjmXWs4dOyXmxRBfg5VilV/B+nNOHuV1Z"); + a("d0OP5kWI+9Br+DuSapc4OIoC+hLPKu9+6hU8q4KzjpqvYYaO4Z9YoIOK7j9WRF0pdjAI1/QK3lbZPujInavYB92H5yJpjLXxoK"); + a("q+J3o0r0YRfYkzVfPZdQHuikp6Bt9CqD9wYjOVLXVK7oqOug/nreHsdAFuhHW6LQ/DNj2ac9d0droAt8U9PYOv4amO4fy1rFkX"); + a("4Mn4olfwfvzWhzl9bfv5yLlzZeTRIfdFAT2aU5l9LK6zcXn00CHHN+s4QKfkhlil2/IubNKH+aQ5yJ36EverZ316NM+qb516Bf"); + a("dr4Cz1aO7c0DPnsX3grI2sT2fjno2tTffhJSiuV/BBlNOH+Tmq6Q+8oYl91tv4LProS7zbrOIQfZhHNrO3ejQvwmm9gic3953V"); + a("M3gDgif+Hq7Wwtp0yL1RRPfhv62ctQ5bW39b76v78CS01TN4A7rqbdylnfXoPjwbC/QKXtEeOnLRDvZKl+NhuKdH81o81dv4Hd"); + a("7qD1y7oz3UIa9C8NRr+AES6hhO3sl8jk7JDZFet+W+yKZH8x7k0Yf5KoroGP6J0jow97cVlfQ2fowh+gMn7mK2U6fkZZikV/B+"); + a("7NSHuU5Xz0kdcne81H24RTe/j3RbHoH0z6yHm/e0Nt2WR6GhHs3xevnu6JR8CR115NfooT/w/t7upz7Ml7FEx/DRPvZIX+Lsfd"); + a("1VXYAbYKduyzX6WacOOVl/69QpeSISPnem/B4p9QeuM8CadcgbkU1v4+QD7adOyZVRQIc8CcX1DD6Ecvowf0I1HQwya4tQZ+MS"); + a("aKrL8Xa01X0Ge5YOca90Si6MAXobJxoaOxiuU/IrjNcfuNgIv+N0Ob6KdTqG44z0PNEpeYo5vcN6Bi/BW72C3+OL/sATxnqG6B"); + a("k8c5zn4Qvvyz3+s1v3vAxFcQDG6+UDGMQgTdyhG0OFUaJJV0MtImLoILFWYjJVgkjjpQiplrjES5n6EYiRoYsQi8tUYiAxivj1"); + a("e/QmT55naXL/555z0iWz6xz3Lts/OuAXjOiIkyvtsTHd9DgmdZbnkdV5XiyYSxf5ZM29rWt8g6qu8ytq+ou/172/jm3Yq7hv9q"); + a("a7GZEOeBoNneU5/Og87xXNokP+2/JNG3677d5DQgecxoDOcHzXXDrgNGZ0httK5tddPISSTvHjvnOtI+4oezfdxZWKM65DvkXs"); + a("3Vw8e2iP6RzvYFiH3H9kDXWS746tj67z6Klzp1O8cOZ/i85z4dze1kV+xrWOuOfCO+iAJ/Ck6xyrult006v41EU+wK8O+Q2dH9"); + a("ac+y59dx3wILp1iqcQ11l+QEJHXL6yt3XraT3/7MitSwMBAMbhQw6DGBYWRNRkGgYxiJhMi7JgEDEaLl0WkWEyH5dFjg38OD8Q"); + a("kywtikFMC8ZhWhCjXPLgHlzZn7C3PC+/6cxaWfj/aw9hEHXD4Lczbstlq12FwUJ33BplWy/bpJ3pCTt8Yp8fHPKHM9eVdTa4wz"); + a("1GbDPlJXO+8I2fHLHg/E3lIte4zRYPGfOE50x5wZw9vnLAIUcsOHdbucQNNnnAmKdMmPGRPQ74zdm8coVb3OURY7aZ8p59vvOL"); + a("Bet3lavcZJP7jHjMhBmf/wSlj0DpG1D6FZT+A6U51kDjE0rrgGkEcILyw6B0Gpp8DZTfBaXnQOl1UHoPlD4Hpe9A6XdQmmkty2"); + a("i+GM0Xo/kCR75AAPfUkuCSFI/EvJScVCjfOT+vGEA31e62DcPAvJrnuliAeDFqY/6t2NdUgywZFFXUe/pJFoUlQfpLvCPFj6Pk"); + a("DFo378xgfCR/KxOQ/SfluSFylLz9A35T2qP5mrCydjYxzZfmjtwE70s9RRzWo313Vam4LLGDk7YoTCCCLfeO8x07fBDUHMlnsa"); + a("mH6BXUYnG05bg4UDB41Qa/1BIL3bK7AJkbSfMeJZnEPNTGeYnLcydH57RlFCUaO5/fE12U3TxjSYNGfHIqTnghRdso/tRkNc+U"); + a("2z68EiARCTlaFLfRp67Yb9QElVsb7zZ1DrwGrjvJem7aYhdRfkKtiUlnZYybxE4VZcc7LbbQ0erL5kv1rH3Zq6B9ukkZySFIsv"); + a("QGWNMZ/Ao7y5WkrQ/LTb4BtGh7W2JUmqMKvbbXOOTlDybOOueIjrQjzbLde+7xvUiN8wr7Hx39Cy7hegV1BA/LZUo0nxFVh9wl"); + a("eIdlx8U+Ws1aGf0XNUUrDtxjkkf/AgN+wjeWQY900gvqE0/4gbZvrrTBsP6xMQY36hn1h6LIFnNwxS9/tqq7+9+d8Rv/I6OMeh"); + a("UGYSjsX8PtmtyEp+udeybamUUF0o3M/XuPtCTiHs9HCxR6em9cnBMT8EzPWZgN4ZbiIfl8Gm7Aq0afRljX3Tu/jP4iTMXPM9eX"); + a("HnixkPhM/2ukyexqmq23pdb5a3JXXTlgu7Jiao3RYtRLheR/wS+EoRDtwFvRxVuqizt7bBuWqR0Zrxp4NcpPxBPKlpMwmqJjOs"); + a("6MLiwRub1JBphW0gD4i2OFdV6/yVMC077VZwdLDMixJhLTTcQtDQ6/a5vfNte+inflKEs+s+xhQaL/aBOls2UfpFL0TRcj8T4N"); + a("Q79TYsNSEY1BwleGqTIqJevVTHzJNxXojuRiBiRXgEqJ7NSivNQcYyO9lJwcBmAqTSwtgXJKgR6HMocp0NjAAj7bhwmKTYB8Gy"); + a("B2AeJgf58w1yCw78FnwASIActvoHgYSA80XPNzylKLQNmLAcwMKK2qykk1NGUYBQBm7I7vcSAKw/iDweJgMVgMFgMLxWBhIVgM"); + a("LBSDhYXgmZfMnJnMSzCwUFgYLAYWisHCAwMLO9vffog9X+H6H7n/45vzrpkD7oDAHkqooIYTNHCBKwyAMMMCd4jwgBWesMEn/A"); + a("ZCj/QLbehXeqHfaE+/U6CWLvQnfdBfdKOf9MDPvFJHVauTatRZXVWvZrWou4rqoVb1VJt6qaQ+sMAdEtxjiQc8YYNnbPGCHV6x"); + a("xxsOCDjjD4z4woQfutA7TXStT7rRZ93qi+70Vff6pgcNGvWsF33XUT/0qp960y+d9IcpzM4QszelOZjKHE1tTqYxZ9Oai+nM1f"); + a("TmZgYDBs3dHKZ26qZ+GiaclilO67RNaSossaWtbG0b29rO9nawaBcb7Wo3m2zhiCtd5WrXuNZ1rneDQ7e46Fa3ueQKT3zpK1/7"); + a("xre+870fPPrFR7/6zSdfBBLKUIU6NKENXejDEDAsIYY1bCGF3Omed9f8lAWQf5UaaKGD/l1pgQhrrpOgoISWtKJ17tPSLtcZKO"); + a("Y2ka65TKIFI6xkFatZw1rWsZ4NDNnCIlvZxhIrOOElr3jNG97yjvd84MgXHvnKN554IYgoRSVq0YhWdKIXg0CxiChWsYkkipGM"); + a("h7EajyOO83gf47iOz/E1prGQO7mXpazkUZ5kI1t5kVfZy0GCnOUio3zIp9xkkh9qp4gq1eGvoLefi+qyoJsChW9F2dBbUPbz1n"); + a("PACuvsJ+t52/lDmd3yyAmGURgmqaEOuRKJRK5EIpErkUjkJDUkNUjkypev7bvDpxyJRCJHIpHIyp59OJmk2512+w/Iw3XumcxQ"); + a("yCd8iAy6EBWHCYoYzxeYWM7X83rezz/PRmM1D43duM1j4zVB89SETQwvSZNBjGpGmJmaBWrWZocbo7Ugx25d2PHaAHrCNoafpM"); + a("0gSLUjDE3tAkVru8OR0VmQZHcuLHldAE1hF8NT0mUQpboRpqZugaq12+HK6C3IsnsXtrw+gK6wj+Er6TMIU/3S770FW/bgQpc3"); + a("BPAVDjGEJUMGY2oYoWwaFjhbh/1N2oLf/d+Cro4iuLDmSRFCFcNbojKIU0cXWIUd7ozcgjw7d2HPywPoC/MY/pI8g0CVjzA45Q"); + a("sUrvkOh0ZhQaJduLDoFQE0hkUMj0mRQaQqRpicigUq12KHS6O0INMuXdj0ygA6wzKGz6TMIFSVI4xO5QKla7nDqVFZkGpXLqx6"); + a("VQCtYRXDa1JlEKuqEWanaoHatdrh1qgtyLVpN6if6rCO61Od1Fn9XCtYvkDzctNsvNhw7MMwbrXifw3czFSs6HE1KWmJK624js"); + a("PL+LxNxOukucJlNtzDLJzbJSLeIuU1dDHKJTZewi6TSuH5Vzz519rBs36rv8tzRthK9pfSPkplT+iqRlkvekJbF33Vq97YWPv1"); + a("8dXDdu6vxpSW+u/rybXM5wVbMbEUV/YRcSEpN6JlJVfZxwNW4XMXEZeRchuTrMLoHK7B5x4iLiLtNLYwo6/HBhyuwOcOIiwhQ2"); + a("XHfkFhjcEcjiU43IIvazjJDi7Qvx3+d/wfj84a6v3bjGA/VZrmN6o36R7vF282EetTvtG4SeUOnftFJG9VU/ZG2yZ1O/TtU3hE"); + a("4ymUa/ie0eDDtUPZPm1H1J3Ct4aMudrg+jDtULVP1xFlp7StoXuG600a7UqhfWl0KJU+SaczKbWWVk8v15cdpX74YbPSgXQ6kl"); + a("In0upnqfU/P/Uh0tP+H5/91Ck2N3FpfUKmITX30PHonk7WfEPL34w6KLkvSlPWe2a/NxbcRMNdURq3qcjU7PbMcm9st8l6i1V+"); + a("D1CdhtHl1muzv6OV3U6PcovbSz/1m8iF2Vu9I/Y7ZcE1Gz6z4nRs4L/eLx859lnziD1PWfTbd70PhD9KtU55Bt2aLZ9Z87vW77"); + a("WMbZ//dwMs/VyuWIF5zz/7rln4mY2XNcgSsIHf9bPtM+u+se+/2juz0JnCMIwfBh1ZGkVOpCypIcufLCdLja1EMrZMoZALW7IU"); + a("QvYsyXYhU8I5M2dmzpnvnBmKsu9ZUxPRlCXhYkppkCX7872+rN98thsX5mbu3+f3PO/zfk0N94LBGws5Ik4+SIB83lNK1FQq1F"); + a("V0aiutqa+YEi+4nH+Qryae2u73qQzued81/6DrRqnLrPyRe9FjdNFkIqLLDGUxRVqTK+AG3mZMSVb/xBGKDN9H7qgEv+OJi0j0"); + a("Uv4evFGRJPtkcof1vR/C/Leof+eHMFI+Tns7oeA/StSvVHJuEtuLQbMrmstF0V3Kor3oToToBtcKoj917biC5jDxG5NluCBZI3"); + a("qjyux+RfSaKl4/sxpV0QpKOaE1RKc8o0tEqKFg8hRbV9iC3DtZuAB9nxfe8fuodUg7AH0Nq7PVE4pOs2ZDyx3WbusQ6Vex6tmN"); + a("oV8/ezA0nG8vQZZ59n6oeMt+AP3qJ5vwu4jU24iU2p88DN1qIZE6pLohi5YhfdKpADrdTj2EQhGkzgxnHvJmp7MXulx1bkCP9l"); + a("BjRHoc9utG6HA//RQbtUWmLfJjRGYcEmR9ZiumfwfJUTfbCIkxJDsCc1+RXY95H86exo58mf2QNdyebn+kwyJ3BWZ80D2OJHjq"); + a("vnF1r43XAfOd6E3DdDd7OzDVx9573DBdcr1wvSzILcUkg9xBeP1R7hk6WEfWHVPciJmdZpew016w9+hcXf3e1LngWe5WhU9X0t"); + a("VxKihX3V7TyZ+uwpEx2ljbZDuqJqRN/KprmeTExYpd1Jo69GS0ZlwV0l2k0wYaqtg5lSR3YI1stwg3lsiDhmK7nCIHaopm5ZIH"); + a("y2mxQyStahv5sKjYIYvJiYcUvWm66ErfNnh6JUFbing1XpycmPirTREhL06XbATRk7AXIuhIMcVOeOVzwsyvs1/ctK64asvEV0"); + a("SR/UXiKyzau6wNHSK+6L0kGtIWg63qOW9xwsCWaPCSC20DEXZR0W/mEmH7FD0mToQlZAkvLtShxNcGSbrzq1THXVpDfM1VtBVD"); + a("dJRqGX/vF1K+THxFFL2kSISFKePlb3CniDBN8dK2T9yH1buHxekCV7p4O+Fkmd/ciduIraKyYcgpK1GOGX/cMUxxM1Zv3VospA"); + a("3+hZ6RoIQrfbkgFS8EkqwDkZxG84/6dYxyb1uV3qG+L/eB0Fd0V5pgUn5LEp/fNmjKPrz5EaGuokHHspjd5JBm4WtKbiaosXIe"); + a("culJrhZrwtqwbmwAG8WmsHlsFduOLDrCzrMSJdAg0DHLX4D82eWnkDxX/OvooW/9OqCjZ9AfVMwJFoIGJ/DROW8HD5E3zfKtsM"); + a("eG58eAg2X5tdD/YP44dH+af42c6VToAb1nFOYhXfYUMlD7ZuEuV3luSDvH/6vFag5th1mjoelSaw009a0DVpG2lW63tNtBz5H2"); + a("eOgIDaHfGfsydtQL+71tJLskeyE/piZnQjmoBsUuJ69BqzqphlBoYGoYttPy1DrspKOps1Ao7LSFGmOcCdBhvbMVbfCkcwE58d"); + a("L5gBbYPd0HaixIL4UKJ9LnkQu4YDD77pm+mPvUzCz0v9HeBLh1tbcJPuU/SAppY/GFDUBOnay4lHVW22/gG+TDmL8e6X6MXr6b"); + a("wnWjgknCaZz5kNYUX9iQlGM8tbT/n3/68xHeVZKEADYEAA=="); } } diff --git a/Task/15-puzzle-solver/Dart/15-puzzle-solver.dart b/Task/15-puzzle-solver/Dart/15-puzzle-solver.dart deleted file mode 100644 index 27546c8101..0000000000 --- a/Task/15-puzzle-solver/Dart/15-puzzle-solver.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:collection/collection.dart'; - -typedef OffsetFunction = int Function(int a, int b); -Function eq = const ListEquality().equals; - -/// Solve Random 15 Puzzles -class FifteenSolver { - static const target = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0]; - static const trN = [3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3]; - static const tcN = [3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2]; - var pos0 = List.filled(100, 0); - var moves = List.filled(100, 0); - var dirs = List.filled(100, ''); - int step = 0, best = 0; - var board = List.generate(100, (int i) => List.filled(16, 0)); - - bool isFinished() { - if (moves[step] < best) return nextMove(); - if (eq(board[step], target)) { - print("Solution found in $step moves :${dirs.join('')}"); - return true; - } - return (moves[step] == best) ? nextMove() : false; - } - - var passNumber = 0; - - /// Try all valid moves from here, but don't retrace your steps. - /// Return true if a solution is found. - bool nextMove() { - // if (passNumber++ ~/ 100000 == 0) print("${dirs.join('')}"); - return (dirs[step] != 'u' && pos0[step] ~/ 4 < 3 && down()) || - (dirs[step] != 'd' && pos0[step] ~/ 4 > 0 && up()) || - (dirs[step] != 'l' && pos0[step] % 4 < 3 && right()) || - (dirs[step] != 'r' && pos0[step] % 4 > 0 && left()) || - false; - } - - bool move(int offset, String dir, List rcArray, OffsetFunction rcFunc) { - final int ix = pos0[step] + offset; - final n = board[step][ix]; - pos0[step + 1] = pos0[step] + offset; - board[step + 1] = board[step].toList() - ..[pos0[step]] = n - ..[ix] = 0; - dirs[step + 1] = dir; - moves[step + 1] = moves[step] + rcFunc(rcArray[n], pos0[step]); - step++; - if (isFinished()) return true; - step--; - return false; - } - - bool right() => move(1, 'r', tcN, (a, b) => (a <= b % 4 ? 0 : 1)); - bool left() => move(-1, 'l', tcN, (a, b) => (a >= b % 4 ? 0 : 1)); - bool down() => move(4, 'd', trN, (a, b) => (a <= b ~/ 4 ? 0 : 1)); - bool up() => move(-4, 'u', trN, (a, b) => (a >= b ~/ 4 ? 0 : 1)); - - void solve(List initBoard) { - pos0[0] = initBoard.indexOf(0); - board[0] = initBoard; - while (!isFinished()) best++; - } -} - -void main(List args) { - print("running"); - // test values - // final start = [5, 1, 2, 3, 6, 10, 7, 4, 13, 9, 11, 8, 14, 0, 15, 12]; - // final start = [9, 1, 2, 4, 13, 6, 5, 7, 3, 11, 14, 15, 10, 0, 8, 12]; - // final start = [10, 3, 1, 4, 13, 5, 8, 7, 9, 6, 0, 11, 14, 15, 12, 2]; - // required solution - final start = [15, 14, 1, 6, 9, 11, 4, 12, 0, 10, 7, 3, 13, 8, 5, 2]; - // Extra credit - // final start = [0, 12, 9, 13, 15, 11, 10, 14, 3, 7, 2, 5, 4, 8, 6, 1]; - print(start); - FifteenSolver().solve(start); -} diff --git a/Task/15-puzzle-solver/FreeBASIC/15-puzzle-solver.basic b/Task/15-puzzle-solver/FreeBASIC/15-puzzle-solver.basic deleted file mode 100644 index 4dcdf807c9..0000000000 --- a/Task/15-puzzle-solver/FreeBASIC/15-puzzle-solver.basic +++ /dev/null @@ -1,288 +0,0 @@ -Randomize Timer - -Dim Shared As Integer Nr(15) = {3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3} -Dim Shared As Integer Nc(15) = {3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2} -Dim Shared As Integer n, nn -Dim Shared As Integer N0(99), N3(100), N4(99) -Dim Shared As Ulongint N2(99) - -Enum - Ki = 1 - Kg = 8 - Ke = 2 - Kl = 4 -End Enum - -Dim Shared As Integer l = 108, r = 114, u = 117, d = 100 - -Declare Function fY() As Boolean -Declare Function fZ(w As Integer) As Boolean -Declare Function fN() As Boolean - -Sub fI() - Dim As Integer g = (11 - N0(n)) * 4 - Dim As Ulongint a = (N2(n) And (15ULL Shl g)) - N0(n + 1) = N0(n) + 4 - N2(n + 1) = N2(n) - a + (a Shl 16) - N3(n + 1) = d - N4(n + 1) = N4(n) - If Not(Nr((a Shr g)) <= N0(n)\4) Then N4(n + 1) += 1 - n += 1 -End Sub - -Sub fG() - Dim As Integer g = (19 - N0(n)) * 4 - Dim As Ulongint a = (N2(n) And (15ULL Shl g)) - N0(n + 1) = N0(n) - 4 - N2(n + 1) = N2(n) - a + (a Shr 16) - N3(n + 1) = u - N4(n + 1) = N4(n) - If Not(Nr((a Shr g)) >= N0(n)\4) Then N4(n + 1) += 1 - n += 1 -End Sub - -Sub fE() - Dim As Integer g = (14 - N0(n)) * 4 - Dim As Ulongint a = (N2(n) And (15ULL Shl g)) - N0(n + 1) = N0(n) + 1 - N2(n + 1) = N2(n) - a + (a Shl 4) - N3(n + 1) = r - N4(n + 1) = N4(n) - If Not(Nc((a Shr g)) <= (N0(n) Mod 4)) Then N4(n + 1) += 1 - n += 1 -End Sub - -Sub fL() - Dim As Integer g = (16 - N0(n)) * 4 - Dim As Ulongint a = (N2(n) And (15ULL Shl g)) - N0(n + 1) = N0(n) - 1 - N2(n + 1) = N2(n) - a + (a Shr 4) - N3(n + 1) = l - N4(n + 1) = N4(n) - If Not(Nc((a Shr g)) >= (N0(n) Mod 4)) Then N4(n + 1) += 1 - n += 1 -End Sub - -Function fY() As Boolean - If N2(n) = &h123456789abcdef0ULL Then Return True - If N4(n) <= nn Then Return fN() - Return False -End Function - -Function fZ(w As Integer) As Boolean - If (w And Ki) > 0 Then - fI() - If fY() Then Return True - n -= 1 - End If - If (w And Kg) > 0 Then - fG() - If fY() Then Return True - n -= 1 - End If - If (w And Ke) > 0 Then - fE() - If fY() Then Return True - n -= 1 - End If - If (w And Kl) > 0 Then - fL() - If fY() Then Return True - n -= 1 - End If - Return False -End Function - -Function fN() As Boolean - Select Case N0(n) - Case 0 - Select Case N3(n) - Case l: Return fZ(Ki) - Case u: Return fZ(Ke) - Case Else: Return fZ(Ki Or Ke) - End Select - Case 3 - Select Case N3(n) - Case r: Return fZ(Ki) - Case u: Return fZ(Kl) - Case Else: Return fZ(Ki Or Kl) - End Select - Case 1, 2 - Select Case N3(n) - Case l: Return fZ(Ki Or Kl) - Case r: Return fZ(Ki Or Ke) - Case u: Return fZ(Ke Or Kl) - Case Else: Return fZ(Kl Or Ke Or Ki) - End Select - Case 12 - Select Case N3(n) - Case l: Return fZ(Kg) - Case d: Return fZ(Ke) - Case Else: Return fZ(Ke Or Kg) - End Select - Case 15 - Select Case N3(n) - Case r: Return fZ(Kg) - Case d: Return fZ(Kl) - Case Else: Return fZ(Kg Or Kl) - End Select - Case 13, 14 - Select Case N3(n) - Case l: Return fZ(Kg Or Kl) - Case r: Return fZ(Ke Or Kg) - Case d: Return fZ(Ke Or Kl) - Case Else: Return fZ(Kg Or Ke Or Kl) - End Select - Case 4, 8 - Select Case N3(n) - Case l: Return fZ(Ki Or Kg) - Case u: Return fZ(Kg Or Ke) - Case d: Return fZ(Ki Or Ke) - Case Else: Return fZ(Ki Or Kg Or Ke) - End Select - Case 7, 11 - Select Case N3(n) - Case d: Return fZ(Ki Or Kl) - Case u: Return fZ(Kg Or Kl) - Case r: Return fZ(Ki Or Kg) - Case Else: Return fZ(Ki Or Kg Or Kl) - End Select - Case Else - Select Case N3(n) - Case d: Return fZ(Ki Or Ke Or Kl) - Case l: Return fZ(Ki Or Kg Or Kl) - Case r: Return fZ(Ki Or Kg Or Ke) - Case u: Return fZ(Kg Or Ke Or Kl) - Case Else: Return fZ(Ki Or Kg Or Ke Or Kl) - End Select - End Select -End Function - -Sub solve() - If fN() Then - Exit Sub - Else - n = 0 - nn += 1 - solve() - End If -End Sub - -Function createPuzzle(Byval j As Integer) As Ulongint - Dim As Ulongint q = &h123456789abcdef0ULL - Dim As String h = Hex(q, 16) - Dim As Integer z, d, r, u = 0 - While j > 0 ' number of moves to do - Do - d = Int(Rnd * 4) + 1 - Loop While d = u - u = -d - r = Int(Rnd * 3) + 1 - While r > 0 - z = Instr(h, "0") - Select Case d - Case 1 ' -1 - If (z Mod 4) <> 1 Then - Mid(h, z, 1) = Mid(h, z - 1, 1) - Mid(h, z - 1, 1) = "0" - j -= 1 - End If - Case 2 ' +1 - If (z Mod 4) <> 0 Then - Mid(h, z, 1) = Mid(h, z + 1, 1) - Mid(h, z + 1, 1) = "0" - j -= 1 - End If - Case 3 ' -4 - If z >= 5 Then - Mid(h, z, 1) = Mid(h, z - 4, 1) - Mid(h, z - 4, 1) = "0" - j -= 1 - End If - Case 4 ' +4 - If z <= 12 Then - Mid(h, z, 1) = Mid(h, z + 4, 1) - Mid(h, z + 4, 1) = "0" - j -= 1 - End If - End Select - r -= 1 - Wend - Wend - Return Valulng("&h" + h) -End Function - -Sub ShowConfiguration(Byval h As String, i As Integer) - Dim As Integer r, c - Dim x As String - Color 14 - For r = 1 To 4 - For c = 1 To 4 - x = Mid(h, r * 4 - 4 + c, 1) - If x = "0" Then x = " " - Locate r + i, c + c - 1: Print x; - Next - Next - Color 7 -End Sub - -Sub shoWMoves(Byval h As String, Byval s As String, Byval m As Integer, Byval p As Integer) - Dim As Integer j, z, d - ShowConfiguration(h, 12) - For j = 1 To m - d = Asc(Mid(s, j, 1)) - z = Instr(h, "0") - Select Case d - Case l - If (z Mod 4) <> 1 Then - Mid(h, z, 1) = Mid(h, z - 1, 1) - Mid(h, z - 1, 1) = "0" - End If - Case r - If (z Mod 4) <> 0 Then - Mid(h, z, 1) = Mid(h, z + 1, 1) - Mid(h, z + 1, 1) = "0" - End If - Case u - If z >= 5 Then - Mid(h, z, 1) = Mid(h, z - 4, 1) - Mid(h, z - 4, 1) = "0" - End If - Case d - If z <= 12 Then - Mid(h, z, 1) = Mid(h, z + 4, 1) - Mid(h, z + 4, 1) = "0" - End If - End Select - ShowConfiguration(h, 12) - Sleep p - Next - Print -End Sub - -Sub fifteenSolver(Byval g As Ulongint, Byval p As Integer) - Dim As String h, s - Dim As Integer j - Dim As Double t0 = Timer - n = 0 - nn = 0 - h = Hex(g, 16) - Cls - Print "Puzzle: "; Lcase(h) - ShowConfiguration(h, 2) - Print Chr(10) - N0(0) = Instr(h, "0") - 1 - N2(0) = g - solve() - Print Using "Solution found in & moves: "; n; - For j = 1 To n - s &= Chr(N3(j)) - Next - Print s - Print Using !"\nTook ###.######## seconds on i5 @ 3.20 GHz"; Timer - t0 - If p Then showMoves(h, s, n, p) -End Sub - -fifteenSolver(&hfe169b4c0a73d852ULL, 1000) - -Sleep diff --git a/Task/15-puzzle-solver/FutureBasic/15-puzzle-solver.basic b/Task/15-puzzle-solver/FutureBasic/15-puzzle-solver.basic deleted file mode 100644 index 16a309133a..0000000000 --- a/Task/15-puzzle-solver/FutureBasic/15-puzzle-solver.basic +++ /dev/null @@ -1,165 +0,0 @@ -// 15 Puzzle Solver -//https://rosettacode.org/wiki/15_puzzle_solver -// Requires FutureBasic 7.0.30 or later - -begin globals - int Nr(15), Nc(15), n, un, N0(99), N3(99), N4(99) - UInt64 N2(99) -end globals - -def fn fY as BOOL -void def fn fI -void def fn fG -void def fn fE -void def fn fL - -local fn fN1 as BOOL - if ( N3(n) != _"u" && N0(n) / 4 < 3 ) - fn fI - n++ - if ( fn fY ) then return YES - n-- - end if - - if ( N3(n) != _"d" && N0(n) / 4 > 0 ) - fn fG - n++ - if ( fn fY ) then return YES - n-- - end if - - if ( N3(n) != _"l" && N0(n) % 4 < 3 ) - fn fE - n++ - if ( fn fY ) then return YES - n-- - end if - - if ( N3(n) != _"r" && N0(n) %4 > 0 ) - fn fL - n++ - if ( fn fY ) then return YES - n-- - end if -end fn = NO - -void local fn fI - int g = ( 11 - N0(n)) * 4 - UInt64 a = N2(n) & ((UInt64)15 << g) - N0(n + 1) = N0(n) + 4 - N2(n + 1) = N2(n) - a + (a << 16) - N3(n + 1) = _"d" - if ( Nr(a >> g) <= N0(n) / 4 ) - N4(n + 1) = N4(n) - else - N4(n + 1) = N4(n) + 1 - end if -end fn - -void local fn fG - int g = (19 - N0(n)) * 4 - UInt64 a = N2(n) & ((UInt64)15 << g) - N0(n + 1) = N0(n) - 4 - N2(n + 1) = N2(n) - a + (a >> 16) - N3(n + 1) = _"u" - if ( Nr(a >> g) >= N0(n) / 4 ) - N4(n + 1) = N4(n) - else - N4(n + 1) = N4(n) + 1 - end if -end fn - -void local fn fE - int g = (14 - N0(n)) * 4 - UInt64 a = N2(n) & ((UInt64)15 << g) - N0(n + 1) = N0(n) + 1 - N2(n + 1) = N2(n) - a + (a << 4) - N3(n + 1) = _"r" - if ( Nc(a >> g) <= N0(n) % 4 ) - N4(n + 1) = N4(n) - else - N4(n + 1) = N4(n) + 1 - end if -end fn - -void local fn fL - int g = (16 - N0(n)) * 4 - UInt64 a = N2(n) & ((UInt64)15 << g) - N0(n + 1) = N0(n) - 1 - N2(n + 1) = N2(n) - a + (a >> 4) - N3(n + 1) = _"l" - if ( Nc(a >> g) >= N0(n) % 4 ) - N4(n + 1) = N4(n) - else - N4(n + 1) = N4(n) + 1 - end if -end fn - -local fn fY as BOOL - if ( N4(n) < un ) then return fn fN1 - if ( N2(n) == 0x123456789abcdef0 ) - printf @"Solution found in %d moves:",n - for int g = 1 to n - printf @"%c\b",N3(g) - next - print - return YES - end if - if ( N4(n) == un ) then return fn fN1 -end fn = NO - -void local fn Solve( initN as int, initG as UInt64 ) - int tempNr(15) = {3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3} - int tempNc(15) = {3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2} - - fn memcpy(@Nr(0),@tempNr(0),sizeof(int)*16) - fn memcpy(@Nc(0),@tempNc(0),sizeof(int)*16) - - n = 0 - un = 0 - - N0(0) = initN - N2(0) = initG - - while ( !fn fY ) - un++ - wend -end fn - - -window 1, @"15 Puzzle Solver" -windowcenter(1) -WindowSetBackgroundColor(1,fn ColorBlack) - -text ,14,fn colorWhite -Print "Puzzle: "; "fe169b4c0a73d852" - -text ,14,fn colorYellow -print -print @"15 14 1 6" -print @" 9 11 4 12" -print @" 0 10 7 3" -print @"13 8 5 2" -print -text ,14,fn colorWhite - -CFStringRef ComputerChip = unix @"sysctl -n machdep.cpu.brand_string" - -CFTimeInterval t : t = fn CACurrentMediaTime -fn Solve( 8, 0xfe169b4c0a73d852 ) -CFTimeInterval CurrentTime = fn CACurrentMediaTime-t - -print -text ,14,fn colorYellow -print -print @" 1 2 3 4" -print @" 5 6 7 8" -print @" 9 10 11 12" -print @"13 14 15 0" -print -text ,14,fn colorWhite - -print : printf @"Compute time: %.3f seconds",(CurrentTime) -print ComputerChip - -HandleEvents diff --git a/Task/15-puzzle-solver/JavaScript/15-puzzle-solver.js b/Task/15-puzzle-solver/JavaScript/15-puzzle-solver.js deleted file mode 100644 index 1904d1d75b..0000000000 --- a/Task/15-puzzle-solver/JavaScript/15-puzzle-solver.js +++ /dev/null @@ -1,97 +0,0 @@ -class FifteenSolver { - constructor(n, g) { - this.Nr = [3,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3]; - this.Nc = [3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2]; - this.n = 0; - this._n = 0; - this.N0 = new Array(100).fill(0); - this.N3 = new Array(100).fill(''); - this.N4 = new Array(100).fill(0); - this.N2 = new Array(100).fill(0n); - this.N0[0] = n; - this.N2[0] = BigInt(g); - } - - fY() { - if (this.N4[this.n] < this._n) return this.fN(); - if (this.N2[this.n] === 0x123456789abcdef0n) { - let moves = ''; - for (let g = 1; g <= this.n; g++) moves += this.N3[g]; - console.log(`Solution found in ${this.n} moves: ${moves}`); - return true; - } - if (this.N4[this.n] === this._n) return this.fN(); - return false; - } - - fN() { - if (this.N3[this.n] !== 'u' && Math.floor(this.N0[this.n]/4) < 3) { - this.fI(); - this.n++; - if (this.fY()) return true; - this.n--; - } - if (this.N3[this.n] !== 'd' && Math.floor(this.N0[this.n]/4) > 0) { - this.fG(); - this.n++; - if (this.fY()) return true; - this.n--; - } - if (this.N3[this.n] !== 'l' && this.N0[this.n]%4 < 3) { - this.fE(); - this.n++; - if (this.fY()) return true; - this.n--; - } - if (this.N3[this.n] !== 'r' && this.N0[this.n]%4 > 0) { - this.fL(); - this.n++; - if (this.fY()) return true; - this.n--; - } - return false; - } - - fI() { - const g = (11 - this.N0[this.n]) * 4; - const a = this.N2[this.n] & (15n << BigInt(g)); - this.N0[this.n + 1] = this.N0[this.n] + 4; - this.N2[this.n + 1] = this.N2[this.n] - a + (a << 16n); - this.N3[this.n + 1] = 'd'; - this.N4[this.n + 1] = this.N4[this.n] + (this.Nr[Number(a >> BigInt(g))] <= Math.floor(this.N0[this.n]/4) ? 0 : 1); - } - - fG() { - const g = (19 - this.N0[this.n]) * 4; - const a = this.N2[this.n] & (15n << BigInt(g)); - this.N0[this.n + 1] = this.N0[this.n] - 4; - this.N2[this.n + 1] = this.N2[this.n] - a + (a >> 16n); - this.N3[this.n + 1] = 'u'; - this.N4[this.n + 1] = this.N4[this.n] + (this.Nr[Number(a >> BigInt(g))] >= Math.floor(this.N0[this.n]/4) ? 0 : 1); - } - - fE() { - const g = (14 - this.N0[this.n]) * 4; - const a = this.N2[this.n] & (15n << BigInt(g)); - this.N0[this.n + 1] = this.N0[this.n] + 1; - this.N2[this.n + 1] = this.N2[this.n] - a + (a << 4n); - this.N3[this.n + 1] = 'r'; - this.N4[this.n + 1] = this.N4[this.n] + (this.Nc[Number(a >> BigInt(g))] <= this.N0[this.n]%4 ? 0 : 1); - } - - fL() { - const g = (16 - this.N0[this.n]) * 4; - const a = this.N2[this.n] & (15n << BigInt(g)); - this.N0[this.n + 1] = this.N0[this.n] - 1; - this.N2[this.n + 1] = this.N2[this.n] - a + (a >> 4n); - this.N3[this.n + 1] = 'l'; - this.N4[this.n + 1] = this.N4[this.n] + (this.Nc[Number(a >> BigInt(g))] >= this.N0[this.n]%4 ? 0 : 1); - } - - solve() { - while (!this.fY()) this._n++; - } -} - -const start = new FifteenSolver(8, '0xfe169b4c0a73d852'); -start.solve(); diff --git a/Task/15-puzzle-solver/Jq/15-puzzle-solver.jq b/Task/15-puzzle-solver/Jq/15-puzzle-solver.jq deleted file mode 100644 index 0e7f033340..0000000000 --- a/Task/15-puzzle-solver/Jq/15-puzzle-solver.jq +++ /dev/null @@ -1,192 +0,0 @@ -# The following may be omitted if using the C implementation -# or if the debug messages are deleted. -def debug(msg): (msg | tostring | debug | empty), .; - -### Generic functions - -def array_swap($i; $j): - if $j < $i then array_swap($j;$i) - elif $i == $j then . - else .[:$i] + [.[$j]] + .[$i+1:$j] + [.[$i]] + .[$j+1:] - end ; - -def sum(s): reduce s as $x (0; . + $x); - -### The 15-Puzzle - -# manhattan distance between points $ix and $iy where these are indices in the flat array -def distance($ix; $jx): - def row: ./4 | floor; - def col: . % 4; - [$ix, $jx] - | map(row) as $mr # [$ri, $rj] - | map(col) as $mc # [$ci, $cj] - | [$mr[0] - $mr[1], $mc[0] - $mc[1]] - | map(length) # i.e. abs - | add; - -# What is the Manhattan distance between the position of $tile in the goal -# and the location corresponding to index $ix, where $ix is in range(0;16) -def manhattan($tile; $ix): - .position[$tile|tostring] as $jx - | distance($ix; $jx); - -# The total of the discrepancies -def total_manhattan_distance: - sum( range(0;16) as $p | .board[$p] as $tile | select($tile != 0) | manhattan($tile; $p) ) - | debug; - -# Input: -# .goal is the desired board (flat array) -# .position is the JSON object mapping tiles to the goal index -# .zero is the location of 0 -# .board is the current state of the board (flat array) -# .distance is incremented by $delta after each move -# .seen is our memory -# If allowed, move the zero tile to $p where $p has been properly specified in relation to .zero; -# otherwise emit empty -def move($p): - if $p >= 0 and $p < 16 - then .board[$p] as $tile - # Are we making things worse off? - | (manhattan($tile; .zero) - manhattan($tile; $p)) as $delta - | if $delta > 0 and .distance > (.N - .n) - then if .n >= .N then debug({n, N, distance,sequence: (.sequence|length)}) end | empty - else # make the move - .zero as $zero - | (.board | array_swap($zero; $p)) as $candidate - | ($candidate|tostring) as $s - | if .seen[$s] - then empty - else .board = $candidate - | .zero = $p - | .n += 1 - | .seen[$s] = true - end - end - # We should only reach here if the move has been made - | if $delta != 0 - then .distance += $delta - end - else empty - end -; - -def row: . / 4 | floor; -def col: . % 4; - -def up: - if (.zero | row) == 0 then empty - else move(.zero - 4) - | .sequence += ["u"] - end; - -def down: - if (.zero | row) == 3 then empty - else move(.zero + 4) - | .sequence += ["d"] - end; - -def left: - if (.zero|col) == 0 then empty - else move(.zero - 1) - | .sequence += ["l"] - end; - -def right: - if (.zero|col) == 3 then empty - else move(.zero + 1) - | .sequence += ["r"] - end; - -# $array is a permutation of range(0;16), e.g. the goal -# Output: a JSON object such that .[$tile] is the position of $tile in the goal -def positions($array): - reduce range(0; $array|length) as $i ({}; . + {($array[$i]|tostring): $i}); - -# map a string of lowercase hex digits to an array of decimals -def symbols2array: explode | map(if . > 96 then .-87 else .-48 end); - -# $start should be a string of length 16 representing the starting state; -# the goal is: "123456789abcdef0" -def init($start): - if $start|length == 16 then . else error end - | [range(1;16), 0] as $init - | {goal: $init, - position: positions($init), - distance: 0, - n: 0, # number of moves so far - sequence: [], # the sequence of moves so far - seen: {} - } - | .board = ($start | symbols2array) - | .zero = (.board|index(0)) - | (.board|tostring) as $s - | .seen[$s] = true -; - -# Output: If the move of the zero tile to $p is legal in one step, -# then emit manhattan($tile; .zero) - manhattan($tile; $p) -# where $tile is the tile at $p; -# otherwise: null -def delta_move($p): - if $p >= 0 and $p < 16 - then distance($p; .zero) as $base - | if ($base|length) == 1 # abs - then .board[$p] as $tile - | manhattan($tile; .zero) - manhattan($tile; $p) - else null - end - else null - end ; - -# For comparing the possible moves: -def moves: - {"u": delta_move( .zero - 4), - "d": delta_move( .zero + 4), - "l": delta_move( .zero - 1), - "r": delta_move( .zero + 1) } - | to_entries - | map(select( .value ) ) - | sort_by(.value) - ; - - -# input: the output of moves -def execute($moves): - ($moves[] |.key) as $key - | if $key == "l" then left - elif $key == "r" then right - elif $key == "u" then up - elif $key == "d" then down - else empty - end; - -# $N is the maximum number of moves allowed -# Input: as per `input`; .n is the number of moves so far -def possible_moves($N): - def possible_moves: - if .board == .goal then . # a solution - elif (.sequence|length) >= $N then empty - else .sequence[-1] as $lastmove - | if $lastmove == "l" then execute(moves | map(select(.key != "r"))) - elif $lastmove == "r" then execute(moves | map(select(.key != "l"))) - elif $lastmove == "u" then execute(moves | map(select(.key != "d"))) - elif $lastmove == "d" then execute(moves | map(select(.key != "u"))) - else execute(moves) - end - | possible_moves - end ; - possible_moves; - -def solve($goal): - init($goal) - | total_manhattan_distance as $d - | first( range($d; 100) as $n - | .N = $n - | .distance = $d - | debug("before: n=\($n) distance = \($d))") - | possible_moves($n) - | .sequence | join("") ) ; - -solve("fe169b4c0a73d852") diff --git a/Task/15-puzzle-solver/Julia/15-puzzle-solver.jl b/Task/15-puzzle-solver/Julia/15-puzzle-solver.julia similarity index 100% rename from Task/15-puzzle-solver/Julia/15-puzzle-solver.jl rename to Task/15-puzzle-solver/Julia/15-puzzle-solver.julia diff --git a/Task/15-puzzle-solver/Mathematica/15-puzzle-solver.math b/Task/15-puzzle-solver/Mathematica/15-puzzle-solver.math deleted file mode 100644 index 3a7bdde6e4..0000000000 --- a/Task/15-puzzle-solver/Mathematica/15-puzzle-solver.math +++ /dev/null @@ -1,178 +0,0 @@ -(* Constants for the correct ordering and board position mapping *) -correctOrder = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0}; -rowOf = {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3} + 1; (* +1 because Mathematica uses 1-based indexing *) -colOf = {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3} + 1; (* +1 because Mathematica uses 1-based indexing *) - -(* Function to estimate remaining moves using Manhattan distance *) -EstimateMoves[board_] := Module[{h = 0}, - Do[ - (* Skip the empty tile (0) *) - If[board[[i]] != 0, - (* Find where this tile should be in the correct order *) - correctPos = Position[correctOrder, board[[i]]][[1, 1]]; - (* Calculate Manhattan distance: |current_row - correct_row| + |current_col - correct_col| *) - h += Abs[rowOf[[i]] - rowOf[[correctPos]]] + Abs[colOf[[i]] - colOf[[correctPos]]]; - ], - {i, 1, 16} - ]; - h -] - -(* Find the position of the blank tile (0) *) -FindBlankPosition[board_] := Position[board, 0][[1, 1]] - -(* Generate possible moves from current state *) -GenerateMoves[board_, movesSoFar_] := Module[ - {blankPos, possibleMoves = {}, newBoard, newMoves}, - - blankPos = FindBlankPosition[board]; - - (* Check if we can move left (blank goes right) *) - If[Mod[blankPos, 4] != 1, - newBoard = board; - newBoard[[blankPos]] = newBoard[[blankPos - 1]]; - newBoard[[blankPos - 1]] = 0; - newMoves = movesSoFar <> "r"; - AppendTo[possibleMoves, {newBoard, newMoves, Length[newMoves] + EstimateMoves[newBoard]}]; - ]; - - (* Check if we can move right (blank goes left) *) - If[Mod[blankPos, 4] != 0, - newBoard = board; - newBoard[[blankPos]] = newBoard[[blankPos + 1]]; - newBoard[[blankPos + 1]] = 0; - newMoves = movesSoFar <> "l"; - AppendTo[possibleMoves, {newBoard, newMoves, Length[newMoves] + EstimateMoves[newBoard]}]; - ]; - - (* Check if we can move up (blank goes down) *) - If[blankPos > 4, - newBoard = board; - newBoard[[blankPos]] = newBoard[[blankPos - 4]]; - newBoard[[blankPos - 4]] = 0; - newMoves = movesSoFar <> "d"; - AppendTo[possibleMoves, {newBoard, newMoves, Length[newMoves] + EstimateMoves[newBoard]}]; - ]; - - (* Check if we can move down (blank goes up) *) - If[blankPos <= 12, - newBoard = board; - newBoard[[blankPos]] = newBoard[[blankPos + 4]]; - newBoard[[blankPos + 4]] = 0; - newMoves = movesSoFar <> "u"; - AppendTo[possibleMoves, {newBoard, newMoves, Length[newMoves] + EstimateMoves[newBoard]}]; - ]; - - possibleMoves -] - -(* A* Search algorithm for solving the puzzle *) -Solve15Puzzle[startBoard_] := Module[ - {openSet = {}, closedSet = {}, current, children, bestMoves = {}}, - - (* Initialize the priority queue (Mathematica doesn't have a built-in priority queue, - so we'll use a list and sort it each time) *) - openSet = {{startBoard, "", EstimateMoves[startBoard]}}; - - While[Length[openSet] > 0, - (* Sort the open set by total estimated cost *) - openSet = Sort[openSet, #1[[3]] < #2[[3]] &]; - - (* Get the most promising state *) - current = First[openSet]; - openSet = Rest[openSet]; - - (* Check if we've reached the goal state *) - If[current[[1]] == correctOrder, - Print["Solution found!"]; - Print["Moves: ", current[[2]]]; - Print["Number of moves: ", StringLength[current[[2]]]]; - Print["Open set size: ", Length[openSet]]; - Print["Closed set size: ", Length[closedSet]]; - - (* Format the final board *) - Print["Final board:"]; - Print[Partition[current[[1]], 4]]; - Return[current[[2]]]; - ]; - - (* Generate all possible moves from current state *) - children = GenerateMoves[current[[1]], current[[2]]]; - - (* Process each child state *) - For[i = 1, i <= Length[children], i++, - child = children[[i]]; - childBoard = child[[1]]; - - (* Check if this board is already in the closed set *) - If[Not[MemberQ[Map[First, closedSet], childBoard]], - (* Check if this board is already in the open set *) - existingIdx = Position[Map[First, openSet], childBoard]; - - If[existingIdx == {}, - (* Add to open set if not already there *) - AppendTo[openSet, child]; - , - (* Update if this path is better than existing one *) - existingIdx = existingIdx[[1, 1]]; - If[StringLength[child[[2]]] < StringLength[openSet[[existingIdx, 2]]], - openSet[[existingIdx]] = child; - ]; - ]; - ]; - ]; - - (* Add current state to closed set *) - AppendTo[closedSet, current]; - ]; - - Print["No solution found!"]; - Return[{}]; -] - -(* Example usage *) -startingBoard = {15, 14, 1, 6, 9, 11, 4, 12, 0, 10, 7, 3, 13, 8, 5, 2}; -(* startingBoard = {0, 1, 2, 3, 5, 6, 7, 4, 9, 10, 11, 8, 13, 14, 15, 12}; *) - -solution = Solve15Puzzle[startingBoard]; - -(* Pretty print function to visualize a board *) -PrintBoard[board_] := Module[{}, - Grid[Partition[board, 4], Frame -> All] -] - -(* Visualization code to show the solution step by step *) -VisualizeSolution[startBoard_, moves_] := Module[ - {currentBoard = startBoard, frames = {PrintBoard[startBoard]}, blankPos}, - - Do[ - blankPos = FindBlankPosition[currentBoard]; - - Switch[StringTake[moves, {i}], - "l", (* blank moves left *) - currentBoard[[blankPos]] = currentBoard[[blankPos - 1]]; - currentBoard[[blankPos - 1]] = 0, - - "r", (* blank moves right *) - currentBoard[[blankPos]] = currentBoard[[blankPos + 1]]; - currentBoard[[blankPos + 1]] = 0, - - "u", (* blank moves up *) - currentBoard[[blankPos]] = currentBoard[[blankPos - 4]]; - currentBoard[[blankPos - 4]] = 0, - - "d", (* blank moves down *) - currentBoard[[blankPos]] = currentBoard[[blankPos + 4]]; - currentBoard[[blankPos + 4]] = 0 - ]; - - AppendTo[frames, PrintBoard[currentBoard]]; - - ,{i, 1, StringLength[moves]} - ]; - - ListAnimate[frames] -] - -(* Uncomment to visualize the solution *) -(* If[solution != {}, VisualizeSolution[startingBoard, solution]]; *) diff --git a/Task/15-puzzle-solver/PascalABC.NET/15-puzzle-solver.pas b/Task/15-puzzle-solver/PascalABC.NET/15-puzzle-solver.pas deleted file mode 100644 index 36a40f7d75..0000000000 --- a/Task/15-puzzle-solver/PascalABC.NET/15-puzzle-solver.pas +++ /dev/null @@ -1,3 +0,0 @@ -// Игра в 15 PABCWork.NET\Samples\Games\15.pas -see -https://rosettacode.org/wiki/15_puzzle_game#PascalABC.NET diff --git a/Task/15-puzzle-solver/R/15-puzzle-solver.r b/Task/15-puzzle-solver/R/15-puzzle-solver.r deleted file mode 100644 index 624401ed4e..0000000000 --- a/Task/15-puzzle-solver/R/15-puzzle-solver.r +++ /dev/null @@ -1,239 +0,0 @@ -## ----- Constants (match Julia) ----- -Nr <- c(3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3) -Nc <- c(3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2) - -N0 <- integer(85) -# N2 is a list of nibble vectors (each length 16, values 0..15, LSB-first) -N2 <- vector("list", 85) -N3 <- rep("", 85) # chars 'd','u','r','l' -N4 <- integer(85) - -i <- 1L -g <- 8L -ee <- 2L -l <- 4L -.n <- 1L # scalar (Julia used a 1-element Vector{Int32}) - -## ----- Helpers for nibble representation ----- -# Convert a 16-hex string like "fe169b4c0a73d852" to nibble vector (LSB first) -hex_to_nibbles <- function(hexstr) { - hexstr <- gsub("^0x", "", tolower(hexstr)) - stopifnot(nchar(hexstr) == 16) - chars <- strsplit(hexstr, "")[[1]] - lookup <- c(as.character(0:9), letters[1:6]) - to_val <- function(ch) match(ch, lookup) - 1L - nibs_msbf <- vapply(chars, to_val, integer(1)) - rev(nibs_msbf) -} - - -# Compare two nibble vectors for equality -nibbles_equal <- function(a, b) { - if (is.null(a) || is.null(b)) return(FALSE) - length(a) == length(b) && all(a == b) -} - -# Extract nibble value at bit-offset gg (multiple of 4) -# LSB-first indexing: position = gg/4, R index = pos+1 -get_nibble_at <- function(nibs, gg) { - pos <- as.integer(gg / 4L) - nibs[pos + 1L] -} - -# Move nibble at position pos by delta positions (delta can be +/-1, +/-4) -# Clears original pos (sets to 0), and adds the nibble to new position. -move_nibble <- function(nibs, pos, delta) { - src <- pos - dst <- pos + delta - if (dst < 0L || dst > 15L) stop("Nibble move out of bounds") - v <- nibs[src + 1L] - if (v == 0L) return(nibs) # nothing to move - nibs[src + 1L] <- 0L - nibs[dst + 1L] <- nibs[dst + 1L] + v # original code “-a + (a << …)” effectively relocates the nibble - nibs -} - -# (a >> gg) when a is a single-nibble mask at gg just yields that nibble value. -# In our model we already read that nibble directly. - -## ----- Target and initial states (as nibbles) ----- -# Goal: 0x123456789abcdef0 => nibbles MSB→LSB: 1 2 3 4 5 6 7 8 9 a b c d e f 0 -GOAL <- hex_to_nibbles("123456789abcdef0") - -# Initial: 0xfe169b4c0a73d852 => nibbles MSB→LSB: f e 1 6 9 b 4 c 0 a 7 3 d 8 5 2 -INIT <- hex_to_nibbles("fe169b4c0a73d852") - -## ----- Core functions (translated) ----- -fY <- function(n) { - if (nibbles_equal(N2[[n + 1L]], GOAL)) { - return(list(ans = TRUE, n = n)) - } - if (N4[n + 1L] <= .n) { - return(fN(n)) - } - list(ans = FALSE, n = n) -} - -fZ <- function(w, n) { - if (bitwAnd(w, i) > 0L) { - n <- fI(n) - tmp <- fY(n) - if (tmp$ans) return(tmp) - n <- n - 1L - } - if (bitwAnd(w, g) > 0L) { - n <- fG(n) - tmp <- fY(n) - if (tmp$ans) return(tmp) - n <- n - 1L - } - if (bitwAnd(w, ee) > 0L) { - n <- fE(n) - tmp <- fY(n) - if (tmp$ans) return(tmp) - n <- n - 1L - } - if (bitwAnd(w, l) > 0L) { - n <- fL(n) - tmp <- fY(n) - if (tmp$ans) return(tmp) - n <- n - 1L - } - list(ans = FALSE, n = n) -} - -fN <- function(n) { - x <- N0[n + 1L] - y <- N3[n + 1L] # "d","u","r","l" - if (x == 0L) { - if (y == "l") return(fZ(i, n)) - else if (y == "u") return(fZ(ee, n)) - else return(fZ(i + ee, n)) - } else if (x == 3L) { - if (y == "r") return(fZ(i, n)) - else if (y == "u") return(fZ(l, n)) - else return(fZ(i + l, n)) - } else if (x == 1L || x == 2L) { - if (y == "l") return(fZ(i + l, n)) - else if (y == "r") return(fZ(i + ee, n)) - else if (y == "u") return(fZ(ee + l, n)) - else return(fZ(l + ee + i, n)) - } else if (x == 12L) { - if (y == "l") return(fZ(g, n)) - else if (y == "d") return(fZ(ee, n)) - else return(fZ(ee + g, n)) - } else if (x == 15L) { - if (y == "r") return(fZ(g, n)) - else if (y == "d") return(fZ(l, n)) - else return(fZ(g + l, n)) - } else if (x == 13L || x == 14L) { - if (y == "l") return(fZ(g + l, n)) - else if (y == "r") return(fZ(ee + g, n)) - else if (y == "d") return(fZ(ee + l, n)) - else return(fZ(g + ee + l, n)) - } else if (x == 4L || x == 8L) { - if (y == "l") return(fZ(i + g, n)) - else if (y == "u") return(fZ(g + ee, n)) - else if (y == "d") return(fZ(i + ee, n)) - else return(fZ(i + g + ee, n)) - } else if (x == 7L || x == 11L) { - if (y == "d") return(fZ(i + l, n)) - else if (y == "u") return(fZ(g + l, n)) - else if (y == "r") return(fZ(i + g, n)) - else return(fZ(i + g + l, n)) - } else { - if (y == "d") return(fZ(i + ee + l, n)) - else if (y == "l") return(fZ(i + g + l, n)) - else if (y == "r") return(fZ(i + g + ee, n)) - else if (y == "u") return(fZ(g + ee + l, n)) - else return(fZ(i + g + ee + l, n)) - } -} - -# Down: take nibble at gg=(11-N0)*4 and move it left by 16 bits => +4 nibbles -fI <- function(n) { - gg <- (11L - N0[n + 1L]) * 4L - pos <- as.integer(gg / 4L) - a <- get_nibble_at(N2[[n + 1L]], gg) - N0[n + 2L] <<- N0[n + 1L] + 4L - N2[[n + 2L]] <<- move_nibble(N2[[n + 1L]], pos, +4L) - N3[n + 2L] <<- "d" - N4[n + 2L] <<- N4[n + 1L] - cond <- Nr[a + 1L] <= (N0[n + 1L] %/% 4L) - if (!cond) N4[n + 2L] <<- N4[n + 2L] + 1L - n + 1L -} - -# Up: gg=(19-N0)*4, move right by 16 bits => -4 nibbles -fG <- function(n) { - gg <- (19L - N0[n + 1L]) * 4L - pos <- as.integer(gg / 4L) - a <- get_nibble_at(N2[[n + 1L]], gg) - N0[n + 2L] <<- N0[n + 1L] - 4L - N2[[n + 2L]] <<- move_nibble(N2[[n + 1L]], pos, -4L) - N3[n + 2L] <<- "u" - N4[n + 2L] <<- N4[n + 1L] - cond <- Nr[a + 1L] >= (N0[n + 1L] %/% 4L) - if (!cond) N4[n + 2L] <<- N4[n + 2L] + 1L - n + 1L -} - -# Right: gg=(14-N0)*4, shift by +4 bits => +1 nibble -fE <- function(n) { - gg <- (14L - N0[n + 1L]) * 4L - pos <- as.integer(gg / 4L) - a <- get_nibble_at(N2[[n + 1L]], gg) - N0[n + 2L] <<- N0[n + 1L] + 1L - N2[[n + 2L]] <<- move_nibble(N2[[n + 1L]], pos, +1L) - N3[n + 2L] <<- "r" - N4[n + 2L] <<- N4[n + 1L] - cond <- Nc[a + 1L] <= (N0[n + 1L] %% 4L) - if (!cond) N4[n + 2L] <<- N4[n + 2L] + 1L - n + 1L -} - -# Left: gg=(16-N0)*4, shift by -4 bits => -1 nibble -fL <- function(n) { - gg <- (16L - N0[n + 1L]) * 4L - pos <- as.integer(gg / 4L) - a <- get_nibble_at(N2[[n + 1L]], gg) - N0[n + 2L] <<- N0[n + 1L] - 1L - N2[[n + 2L]] <<- move_nibble(N2[[n + 1L]], pos, -1L) - N3[n + 2L] <<- "l" - N4[n + 2L] <<- N4[n + 1L] - cond <- Nc[a + 1L] >= (N0[n + 1L] %% 4L) - if (!cond) N4[n + 2L] <<- N4[n + 2L] + 1L - n + 1L -} - -solve_fn <- function(n) { - tmp <- fN(n) - ans <- tmp$ans - n <- tmp$n - if (ans) { - cat(sprintf("Solution found in %d moves:\n", n)) - if (n >= 1L) { - cat(paste0(N3[2:(n + 1L)], collapse = ""), "\n") - } else { - cat("\n") - } - } else { - cat(sprintf("next iteration, .n will be %d...\n", .n + 1L)) - n <<- 0L - .n <<- .n + 1L - solve_fn(n) - } -} - -run <- function() { - N0[1L] <<- 8L - .n <<- 1L - N2[[1L]] <<- INIT - # carry forward initial defaults - N3[1L] <<- "" - N4[1L] <<- 0L - solve_fn(0L) -} - -# Execute -run() diff --git a/Task/15-puzzle-solver/Rust/15-puzzle-solver-1.rs b/Task/15-puzzle-solver/Rust/15-puzzle-solver-1.rust similarity index 100% rename from Task/15-puzzle-solver/Rust/15-puzzle-solver-1.rs rename to Task/15-puzzle-solver/Rust/15-puzzle-solver-1.rust diff --git a/Task/15-puzzle-solver/Rust/15-puzzle-solver-2.rs b/Task/15-puzzle-solver/Rust/15-puzzle-solver-2.rust similarity index 100% rename from Task/15-puzzle-solver/Rust/15-puzzle-solver-2.rs rename to Task/15-puzzle-solver/Rust/15-puzzle-solver-2.rust diff --git a/Task/15-puzzle-solver/Uiua/15-puzzle-solver.uiua b/Task/15-puzzle-solver/Uiua/15-puzzle-solver.uiua deleted file mode 100644 index 2ee70f4190..0000000000 --- a/Task/15-puzzle-solver/Uiua/15-puzzle-solver.uiua +++ /dev/null @@ -1,37 +0,0 @@ -# Solve a 15 puzzle https://rosettacode.org/wiki/15_puzzle_solver#Uiua -T ← ↯4_4 ↻1⇡16 -Pos ← ≡(⊢⊚⌕)↘1⇡16¤ # Positions of the numbers (not 0) - -# Applying a very gentle weighting to certain cells massively -# speeds up the algorithm -Weights ← [[2 1 1 2] [2 1 1 2] [2 1 1 2] [2 1 1 1]] -Distance ← /+×⊡: Weights :≡/+⌵-⊙.∩Pos -Heuristic ← Distance T - -Nfour ← [[1 0] [¯1 0] [0 1] [0 ¯1]] - -ValidN ← ≡⊟⊙¤▽≡/↧×⊃(≡₀<4|≡₀≥0).+Nfour¤. # Actual neighbours at a point. -ValidNs ← ⊞(□ValidN⊟).⇡4 # Precalculate them. - -Moves ← °□⊡:ValidNs⊢⊚⌕0 # Get valid (from to) moves from grid. -Swap ← ⍜⊡⇌ # Swap the values at the indexes -Next ← ⊸≡⋅1 ≡Swap⊙¤⊸Moves # Next positions, set costs=1 - -Solve ← ( - &p$"Solving: _". - ⍜now (⊢path(Next|≍|Heuristic):T) - &p$"_ seconds" - ≡/-⧈∘2◇≡(⊢⊚⌕0)⇌⊢ # Track the movement of the 0 - ⇌˜≡get¤mapNfour"udlr" # Map to directions -) - -# Uncomment one of the following lines to try these grids -# ⍥(Swap⊡⊸(⌊×⚂⧻)⊸Moves)90 T -# [[2 14 6 4] [5 1 3 8] [9 10 7 11] [13 0 15 12]] # Simple 40 shuffles -# [[5 1 2 3] [6 10 7 4] [13 9 11 8] [14 0 15 12]] # Simple 12 steps -# [[9 1 2 4] [13 6 5 7] [3 11 14 15] [10 0 8 12]] # 34 steps -# [[10 3 1 4] [13 5 8 7] [9 6 0 11] [14 15 12 2]] # 38 steps (a few seconds) -[[15 14 1 6] [9 11 4 12] [0 10 7 3] [13 8 5 2]] # Main Challenge -# [[0 12 9 13] [15 11 10 14] [3 7 2 5] [4 8 6 1]] # Extra Credit - -Solve diff --git a/Task/15-puzzle-solver/V-(Vlang)/15-puzzle-solver.v b/Task/15-puzzle-solver/V-(Vlang)/15-puzzle-solver.v deleted file mode 100644 index 35fa9515b9..0000000000 --- a/Task/15-puzzle-solver/V-(Vlang)/15-puzzle-solver.v +++ /dev/null @@ -1,194 +0,0 @@ -import strconv - -struct FifteenSolver { - mut: - n int - n1 int - n0 []int - n2 []u64 - n3 []rune - n4 []int - xx u64 -} - -const nr = [3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3] -const nc = [3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2] -const i_flag = 1 -const g_flag = 8 -const e_flag = 2 -const l_flag = 4 -const fifteen = u64(15) - -fn u64_from_hex(s string) u64 { - return strconv.parse_uint(s, 16, 64) or { 0 } -} - -fn (mut fs FifteenSolver) f_y() bool { - if fs.n2[fs.n] == fs.xx { return true } - if fs.n4[fs.n] <= fs.n1 { return fs.f_n() } - return false -} - -fn (mut fs FifteenSolver) f_i() { - g := (11 - fs.n0[fs.n]) * 4 - a := fs.n2[fs.n] & (fifteen << g) - fs.n0[fs.n + 1] = fs.n0[fs.n] + 4 - fs.n2[fs.n + 1] = fs.n2[fs.n] - a + (a << 16) - fs.n3[fs.n + 1] = `d` - fs.n4[fs.n + 1] = fs.n4[fs.n] - cond := nr[(a >> g) & 0xF] <= (fs.n0[fs.n] >> 2) - if !cond { fs.n4[fs.n + 1] = fs.n4[fs.n + 1] + 1 } - fs.n++ -} - -fn (mut fs FifteenSolver) f_g() { - g := (19 - fs.n0[fs.n]) * 4 - a := fs.n2[fs.n] & (fifteen << g) - fs.n0[fs.n + 1] = fs.n0[fs.n] - 4 - fs.n2[fs.n + 1] = fs.n2[fs.n] - a + (a >> 16) - fs.n3[fs.n + 1] = `u` - fs.n4[fs.n + 1] = fs.n4[fs.n] - cond := nr[(a >> g) & 0xF] >= (fs.n0[fs.n] >> 2) - if !cond { fs.n4[fs.n + 1] = fs.n4[fs.n + 1] + 1 } - fs.n++ -} - -fn (mut fs FifteenSolver) f_e() { - g := (14 - fs.n0[fs.n]) * 4 - a := fs.n2[fs.n] & (fifteen << g) - fs.n0[fs.n + 1] = fs.n0[fs.n] + 1 - fs.n2[fs.n + 1] = fs.n2[fs.n] - a + (a << 4) - fs.n3[fs.n + 1] = `r` - fs.n4[fs.n + 1] = fs.n4[fs.n] - cond := nc[(a >> g) & 0xF] <= fs.n0[fs.n] % 4 - if !cond { fs.n4[fs.n + 1] = fs.n4[fs.n + 1] + 1 } - fs.n++ -} - -fn (mut fs FifteenSolver) f_l() { - g := (16 - fs.n0[fs.n]) * 4 - a := fs.n2[fs.n] & (fifteen << g) - fs.n0[fs.n + 1] = fs.n0[fs.n] - 1 - fs.n2[fs.n + 1] = fs.n2[fs.n] - a + (a >> 4) - fs.n3[fs.n + 1] = `l` - fs.n4[fs.n + 1] = fs.n4[fs.n] - cond := nc[(a >> g) & 0xF] >= fs.n0[fs.n] % 4 - if !cond { fs.n4[fs.n + 1] = fs.n4[fs.n + 1] + 1 } - fs.n++ -} - -fn (mut fs FifteenSolver) f_z(w int) bool { - if w & i_flag > 0 { - fs.f_i() - if fs.f_y() { return true } - fs.n-- - } - if w & g_flag > 0 { - fs.f_g() - if fs.f_y() { return true } - fs.n-- - } - if w & e_flag > 0 { - fs.f_e() - if fs.f_y() { return true } - fs.n-- - } - if w & l_flag > 0 { - fs.f_l() - if fs.f_y() { return true } - fs.n-- - } - return false -} - -fn (mut fs FifteenSolver) f_n() bool { - p0 := fs.n0[fs.n] - p3 := fs.n3[fs.n] - return match p0 { - 0 { - if p3 == `l` { fs.f_z(i_flag) } - else if p3 == `u` { fs.f_z(e_flag) } - else { fs.f_z(i_flag + e_flag) } - } - 3 { - if p3 == `r` { fs.f_z(i_flag) } - else if p3 == `u` { fs.f_z(l_flag) } - else { fs.f_z(i_flag + l_flag) } - } - 1, 2 { - if p3 == `l` { fs.f_z(i_flag + l_flag) } - else if p3 == `r` { fs.f_z(i_flag + e_flag) } - else if p3 == `u` { fs.f_z(e_flag + l_flag) } - else { fs.f_z(l_flag + e_flag + i_flag) } - } - 12 { - if p3 == `l` { fs.f_z(g_flag) } - else if p3 == `d` { fs.f_z(e_flag) } - else { fs.f_z(e_flag + g_flag) } - } - 15 { - if p3 == `r` { fs.f_z(g_flag) } - else if p3 == `d` { fs.f_z(l_flag) } - else { fs.f_z(g_flag + l_flag) } - } - 13, 14 { - if p3 == `l` { fs.f_z(g_flag + l_flag) } - else if p3 == `r` { fs.f_z(e_flag + g_flag) } - else if p3 == `d` { fs.f_z(e_flag + l_flag) } - else { fs.f_z(g_flag + e_flag + l_flag) } - } - 4, 8 { - if p3 == `l` { fs.f_z(i_flag + g_flag) } - else if p3 == `u` { fs.f_z(g_flag + e_flag) } - else if p3 == `d` { fs.f_z(i_flag + e_flag) } - else { fs.f_z(i_flag + g_flag + e_flag) } - } - 7, 11 { - if p3 == `d` { fs.f_z(i_flag + l_flag) } - else if p3 == `u` { fs.f_z(g_flag + l_flag) } - else if p3 == `r` { fs.f_z(i_flag + g_flag) } - else { fs.f_z(i_flag + g_flag + l_flag) } - } - else { - if p3 == `d` { fs.f_z(i_flag + e_flag + l_flag) } - else if p3 == `l` { fs.f_z(i_flag + g_flag + l_flag) } - else if p3 == `r` { fs.f_z(i_flag + g_flag + e_flag) } - else if p3 == `u` { fs.f_z(g_flag + e_flag + l_flag) } - else { fs.f_z(i_flag + g_flag + e_flag + l_flag) } - } - } -} - -fn (mut fs FifteenSolver) fifteen_solver(n_val int, g_val u64) { - fs.n0[0] = n_val - fs.n2[0] = g_val - fs.n4[0] = 0 -} - -fn (mut fs FifteenSolver) solve() { - if fs.f_n() { - println("Solution found in $fs.n moves: ") - for g in 1 .. fs.n + 1 { - print(fs.n3[g].str()) - } - println("") - } else { - fs.n = 0 - fs.n1++ - fs.solve() - } -} - -fn main() { - mut fs := FifteenSolver{ - n0: []int{len: 85, init: 0} - n2: []u64{len: 85, init: 0} - n3: []rune{len: 85, init: ` `} - n4: []int{len: 85, init: 0} - n: 0 - n1: 0 - xx: u64_from_hex("123456789abcdef0") - } - fs.fifteen_solver(8, u64_from_hex("fe169b4c0a73d852")) - fs.solve() -} diff --git a/Task/15-puzzle-solver/Zig/15-puzzle-solver.zig b/Task/15-puzzle-solver/Zig/15-puzzle-solver.zig deleted file mode 100644 index e566437561..0000000000 --- a/Task/15-puzzle-solver/Zig/15-puzzle-solver.zig +++ /dev/null @@ -1,187 +0,0 @@ -const std = @import("std"); -const Allocator = std.mem.Allocator; -const ArrayList = std.ArrayList; -const PriorityQueue = std.PriorityQueue; -const AutoHashMap = std.AutoHashMap; - -// Constants for the puzzle -const CORRECT_ORDER = [16]u8{ 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,0 }; -const ROW = [16]i32{ 0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3 }; -const COLUMN = [16]i32{ 0,1,2,3, 0,1,2,3, 0,1,2,3, 0,1,2,3 }; - -// State struct to represent the puzzle state -const State = struct { - est_tot_moves: u8, - moves: []u8, - est_moves_rem: u8, - allocator: Allocator, - - pub fn init(allocator: Allocator, order: [16]u8) !State { - return State{ - .est_tot_moves = estimate_moves(order), - .moves = try allocator.dupe(u8, ""), // empty - .est_moves_rem = estimate_moves(order), - .allocator = allocator, - }; - } - - pub fn deinit(self: *State) void { - self.allocator.free(self.moves); - } -}; - -// BoardState represents the entire game state -const BoardState = struct { - order: [16]u8, - state: State, -}; - -// Find the index of a tile in the order array -fn findIndex(order: [16]u8, tile: u8) usize { - var i: usize = 0; - for (order) |v| { - if (v == tile) return i; - i += 1; - } - @panic("findIndex: tile not found"); -} - -// Estimate the number of moves (Manhattan distance) -fn estimate_moves(current: [16]u8) u8 { - var h: u8 = 0; - for (current) |tile| { - const ci = findIndex(current, tile); - const gi = findIndex(CORRECT_ORDER, tile); - const rd = @abs(ROW[ci] - ROW[gi]); - const cd = @abs(COLUMN[ci] - COLUMN[gi]); - h += @as(u8, @intCast(rd + cd)); - } - return h; -} - -// Make a single move (swap hole with neighbor) -fn makeMove( - allocator: Allocator, - parent: *const State, - order: [16]u8, - dir: u8, - idx: usize, - new_idx: usize, -) !BoardState { - var new_order = order; - new_order[idx] = order[new_idx]; - new_order[new_idx] = order[idx]; - - const rem = estimate_moves(new_order); - const mv: [1]u8 = .{dir}; - const combined = try std.mem.concat(allocator, u8, &[_][]const u8{ parent.moves, &mv }); - - return BoardState{ - .order = new_order, - .state = State{ - .est_tot_moves = @as(u8, @intCast(combined.len)) + rem, - .moves = combined, - .est_moves_rem = rem, - .allocator = allocator, - }, - }; -} - -// Generate all children from a parent (takes *const so we don't double-free) -fn generateChildren(allocator: Allocator, parent: *const BoardState) !ArrayList(BoardState) { - var children = ArrayList(BoardState).init(allocator); - const hole = findIndex(parent.order, 0); - - if (COLUMN[hole] > 0) { - const c = try makeMove(allocator, &parent.state, parent.order, 'l', hole, hole - 1); - try children.append(c); - } - if (COLUMN[hole] < 3) { - const c = try makeMove(allocator, &parent.state, parent.order, 'r', hole, hole + 1); - try children.append(c); - } - if (ROW[hole] > 0) { - const c = try makeMove(allocator, &parent.state, parent.order, 'u', hole, hole - 4); - try children.append(c); - } - if (ROW[hole] < 3) { - const c = try makeMove(allocator, &parent.state, parent.order, 'd', hole, hole + 4); - try children.append(c); - } - - return children; -} - -// Compare function for priority queue -fn boardCompare(_: void, a: BoardState, b: BoardState) std.math.Order { - return std.math.order(a.state.est_tot_moves, b.state.est_tot_moves); -} - -// Hash an order into a u64 -fn hashOrder(order: [16]u8) u64 { - var r: u64 = 0; - for (order) |v| r = (r << 4) | v; - return r; -} - -pub fn main() !void { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - defer _ = gpa.deinit(); - const allocator = gpa.allocator(); - - var open_states = PriorityQueue(BoardState, void, boardCompare).init(allocator, {}); - defer { - while (open_states.count() > 0) { - var item = open_states.remove(); - item.state.deinit(); - } - open_states.deinit(); - } - - var closed_states = AutoHashMap(u64, void).init(allocator); - defer closed_states.deinit(); - - const start_order = [16]u8{15,14,1,6,9,11,4,12, 0,10,7,3,13,8,5,2}; - const initial_state = try State.init(allocator, start_order); - try open_states.add(BoardState{ .order = start_order, .state = initial_state }); - - const stdout = std.io.getStdOut().writer(); - - while (open_states.count() > 0) { - var current = open_states.remove(); - - // goal check - if (std.mem.eql(u8, ¤t.order, &CORRECT_ORDER)) { - try stdout.print( - "Open: {d}, Closed: {d}, Moves: {d}\n", - .{ open_states.count(), closed_states.count(), current.state.moves.len }, - ); - try stdout.print("Path: {s}\n", .{ current.state.moves }); - current.state.deinit(); - break; - } - - const h = hashOrder(current.order); - if (closed_states.contains(h)) { - current.state.deinit(); - continue; - } - try closed_states.put(h, {}); - - var children = try generateChildren(allocator, ¤t); - defer children.deinit(); - - // ↓ Here’s the fix: shadow each child into a mutable `var child` - for (children.items) |child| { - var my_child = child; // now `child.state.deinit()` sees a `*State`, not `*const State` - const ch = hashOrder(my_child.order); - if (closed_states.contains(ch)) { - my_child.state.deinit(); - continue; - } - try open_states.add(my_child); - } - - current.state.deinit(); - } -} diff --git a/Task/2048/Ada/2048.adb b/Task/2048/Ada/2048.ada similarity index 100% rename from Task/2048/Ada/2048.adb rename to Task/2048/Ada/2048.ada diff --git a/Task/2048/BQN/2048.bqn b/Task/2048/BQN/2048.bqn index cb0a27ed3b..a73e95c7b4 100644 --- a/Task/2048/BQN/2048.bqn +++ b/Task/2048/BQN/2048.bqn @@ -15,7 +15,7 @@ Spawn←{i←•rand.Range∘≠⊸⊑(0⊸= /○⥊ ↕∘≢)𝕩 ⋄ (•rand Lose←Left∘Right∘Down∘Up⊸≡ # Losing condition, no moves change the board Win←∨´·∨˝2048⊸= # Winning condition, 2048! -Quit←{•Out e∾"[?12l"∾e∾"[?25h" ⋄ •term.RawMode 0 ⋄ •Exit 𝕩} # Restores the terminal and exits +Quit←{•Out e∾"[?12l"∾e∾"[?25h" ⋄ •Exit 𝕩} # Restores the terminal and exits Display←{ # Displays the board, score and controls •Out e∾"[H"∾e∾"[2J" # Cursor to origin and clear screen •Out "Controls: h: left, j: down, k: up, l: right, q: quit" diff --git a/Task/2048/Delphi/2048.pas b/Task/2048/Delphi/2048.delphi similarity index 100% rename from Task/2048/Delphi/2048.pas rename to Task/2048/Delphi/2048.delphi diff --git a/Task/2048/EasyLang/2048.easy b/Task/2048/EasyLang/2048.easy deleted file mode 100644 index 345c4962c4..0000000000 --- a/Task/2048/EasyLang/2048.easy +++ /dev/null @@ -1,161 +0,0 @@ -len brd[] 16 -gbackground 987 -proc newtile . - for i to 16 : if brd[i] = 0 : break 1 - if i > 16 : return - v = 2 - if randomf < 0.1 : v = 4 - repeat - ind = random 1 16 - until brd[ind] = 0 - . - brd[ind] = v -. -global pts stat . -proc show . - gclear - gtextsize 5 - gcolor 222 - gtext 10 94 "2048 Game" - gtext 60 94 "Pts: " & pts - gtextsize 7 - gcolor 876 - grect 9 9 82 82 - gcolor 987 - grect 10 10 80 80 - for i to 16 : if brd[i] <> 0 - x = i mod1 4 * 20 - 9.5 - y = i div1 4 * 20 - 9.5 - gcolor 765 - grect x y 19 19 - v = brd[i] - h = 2 * floor log v 10 - gcolor 000 - gtext x + 7 - h y + 7 brd[i] - . -. -proc init . - for i to 16 : brd[i] = 0 - newtile - newtile - stat = 0 - pts = 0 - show -. -init -# -dir[] = [ -4 -1 4 1 ] -start[] = [ 16 4 1 13 ] -proc domove indk test &moved . - moved = 0 - dir = dir[indk] - bdir = dir[(indk + 1) mod1 4] - start = start[indk] - for i to 4 - h0 = start + dir - for j to 3 - if brd[h0] <> 0 - v = brd[h0] - h = h0 - while h <> start and brd[h - dir] = 0 : h -= dir - if h <> h0 - moved = 1 - if test = 1 : return - . - if h <> start and brd[h - dir] = v - moved = 1 - if test = 1 : return - v *= 2 - pts += v - brd[h - dir] = -v - if v = 2048 : stat = 1 - v = 0 - . - brd[h0] = 0 - brd[h] = v - . - h0 += dir - . - h0 = start - for j to 3 - brd[h0] = abs brd[h0] - h0 += dir - . - sleep 0.1 - show - start += bdir - . -. -proc handle indk . - if indk = 0 : return - domove indk 0 moved - if moved = 1 - newtile - sleep 0.2 - show - if stat = 0 - stat = 2 - for indk to 4 - domove indk 1 moved - if moved = 1 - stat = 0 - break 1 - . - . - . - . - if stat <> 0 - gtextsize 5 - if stat = 1 - stat = 0 - gtext 10 3 "You got 2048 😊" - else - gtext 10 3 "No more moves 🙁" - . - . -. -on mouse_down - mx = mouse_x - my = mouse_y -. -proc handle_mup . - dx = mouse_x - mx - dy = mouse_y - my - indk = 0 - if abs dx > abs dy - if abs dx > 3 - indk = 4 - if dx > 0 : indk = 2 - . - else - if abs dy > 3 - indk = 3 - if dy > 0 : indk = 1 - . - . - if indk <> 0 and stat = 2 - init - else - handle indk - . -. -on mouse_up - handle_mup -. -on key_down - if stat = 2 - if keybkey = " " : init - return - . - indk = 0 - if keybkey = "ArrowUp" - indk = 1 - elif keybkey = "ArrowRight" - indk = 2 - elif keybkey = "ArrowDown" - indk = 3 - elif keybkey = "ArrowLeft" - indk = 4 - . - handle indk -. diff --git a/Task/2048/Elixir/2048.ex b/Task/2048/Elixir/2048.elixir similarity index 100% rename from Task/2048/Elixir/2048.ex rename to Task/2048/Elixir/2048.elixir diff --git a/Task/2048/Guile/2048.guile b/Task/2048/Guile/2048.guile deleted file mode 100644 index f8b103f0d4..0000000000 --- a/Task/2048/Guile/2048.guile +++ /dev/null @@ -1,312 +0,0 @@ -;;require-module (ice-9 format) -;;usage -> [~4d] print-board -;; -(use-modules (ice-9 format)) - -;;require-module (srfi srfi-64) -;;usage -> test-assert -;; -(use-modules (srfi srfi-64)) - -;;prodedure-name 2or4-generator -;;input -> <$:nil> -;;output -> _ (number) -;;note -> "it only generates 2 or 4, with a 10% of outputting 4" -;; -(define 2or4-generator - (lambda () - (let ([random-number (random 10)]) - (if (zero? random-number) - 4 - 2)))) - -;;procedure-name print-board -;;input -> board (array::4*4) -;;output -> <$:nil> -;; -(define print-board - (lambda (board) - (do ((i 0 (1+ i))) - ((> i 3)) - (do ((j 0 (1+ j))) - ((> j 3)) - (format #t "[~4d]" (array-ref board i j))) - (newline)))) - -;;procedure-name spawn! -;;input -> 4x4board (array::4*4) -;;output -> <$:nil> -;; -(define spawn! - (lambda (4x4board) - (let ([indexes '()]) - (do ((i 0 (1+ i))) - ((> i 3)) - (do ((j 0 (1+ j))) - ((> j 3)) - (when (zero? (array-ref 4x4board i j)) - (set! indexes (cons (cons i j) indexes))))) - (let* ([indexes-length (length indexes)] - [used-index-index (random indexes-length)] - [used-index-pair (list-ref indexes used-index-index)]) - (array-set! 4x4board (2or4-generator) (car used-index-pair) (cdr used-index-pair)))))) - -;;procedure-name ask-user -;;input -> valid-moves (list:symbol) -;;output -> _ (symbol) [(memq <$:self:_> (list 'up 'down 'left 'right)) => #t] -;;note -> "this procedure assumes there is at least one valid move" -;; -(define ask-user - (lambda (valid-moves) - (let loop () - (let ([option (read)]) - (if (memq option valid-moves) - (case option - [(up) 'up] - [(down) 'down] - [(left) 'left] - [(right) 'right] - [else (begin - (display "wrong input! Please type up, down, left, or right only!") - (newline) - (loop))]) - (begin - (display "please use valid moves!") - (newline) - (display "valid moves: ") - (display valid-moves) - (newline) - (loop))))))) - -;;procedure-name update-row! -;;input -> row (array::1*4) -;;output -> <$:nil> -;; -(define update-row! - (lambda (row) - (unless (array-equal? row #(0 0 0 0)) - (let ([lst '()] [l 0]) - (when (not (zero? (array-ref row 3))) (set! l (1+ l)) (set! lst (cons (array-ref row 3) lst))) - (when (not (zero? (array-ref row 2))) (set! l (1+ l)) (set! lst (cons (array-ref row 2) lst))) - (when (not (zero? (array-ref row 1))) (set! l (1+ l)) (set! lst (cons (array-ref row 1) lst))) - (when (not (zero? (array-ref row 0))) (set! l (1+ l)) (set! lst (cons (array-ref row 0) lst))) - (do ((i 0 (1+ i))) - ((>= i (- 4 l))) - (array-set! row 0 i)) - (do ((i (- 4 l) (1+ i)) (j 0 (1+ j))) - ((>= i 4)) - (array-set! row (list-ref lst j) i))) - (if (= (array-ref row 3) (array-ref row 2)) - (begin (array-set! row (+ (array-ref row 3) (array-ref row 2)) 3) - (array-set! row (array-ref row 1) 2) - (array-set! row (array-ref row 0) 1) - (array-set! row 0 0) - (when (= (array-ref row 2) (array-ref row 1)) - (array-set! row (+ (array-ref row 2) (array-ref row 1)) 2) - (array-set! row 0 1))) - (if (= (array-ref row 2) (array-ref row 1)) - (begin (array-set! row (+ (array-ref row 2) (array-ref row 1)) 2) - (array-set! row (array-ref row 0) 1) - (array-set! row 0 0)) - (when (= (array-ref row 1) (array-ref row 0)) - (array-set! row (+ (array-ref row 1) (array-ref row 0)) 1) - (array-set! row 0 0))))))) - -;;procedure-name update-board! -;;input -> board (array::4*4) -;;output -> <$:nil> -;;note -> "this procedure can assume that the opertion is shifting the piles right" -;; -(define update-board! - (lambda (board) - (do ((i 0 (1+ i))) - ((>= i 4)) - (update-row! (array-cell-ref board i))))) - -;;procedure-name row-can-shift-qright? -;;input -> row (array::1*4) -;;output -> _ (#t or #f) -;; -(define row-can-shift-right? - (lambda (row) - (if (and (zero? (array-ref row 0)) - (zero? (array-ref row 1)) - (zero? (array-ref row 2))) - #f - (if (or (zero? (array-ref row 3)) - (and (not (zero? (array-ref row 0))) (member 0 (list - (array-ref row 1) - (array-ref row 2) - (array-ref row 3)))) - (and (not (zero? (array-ref row 1))) (member 0 (list - (array-ref row 2) - (array-ref row 3)))) - (and (not (zero? (array-ref row 2))) (member 0 (list - (array-ref row 3))))) - #t - (if (or (and (not (zero? (array-ref row 0))) (= (array-ref row 0) (array-ref row 1))) - (and (not (zero? (array-ref row 1))) (= (array-ref row 1) (array-ref row 2))) - (and (not (zero? (array-ref row 2))) (= (array-ref row 2) (array-ref row 3)))) - #t - #f))))) - -(define test-row-can-shift-right? - (lambda () - (test-begin "row-can-shift-right? test") - (test-assert (row-can-shift-right? #(2 0 0 0))) - (test-assert (row-can-shift-right? #(0 2 0 0))) - (test-assert (row-can-shift-right? #(0 0 2 0))) - (test-assert (not (row-can-shift-right? #(0 0 0 2)))) - (test-assert (row-can-shift-right? #(4 2 0 0))) - (test-assert (row-can-shift-right? #(2 0 0 2))) - (test-assert (row-can-shift-right? #(1024 8 2 2))) - (test-end "row-can-shift-right? test"))) - -;;procedure-name can-shift-right? -;;input -> board (array::4*4) -;;output -> _ (#t or #f) -;; -(define can-shift-right? - (lambda (board) - (or (row-can-shift-right? (array-cell-ref board 0)) - (row-can-shift-right? (array-cell-ref board 1)) - (row-can-shift-right? (array-cell-ref board 2)) - (row-can-shift-right? (array-cell-ref board 3))))) - -(define test-can-shift-right? - (lambda () - (test-begin "can-shift-right? test") - (test-assert (can-shift-right? #2((2 0 0 2) - (0 0 0 0) - (0 0 0 0) - (0 0 0 0)))) - (test-assert (can-shift-right? #2((2 0 0 0) - (0 0 0 0) - (0 0 0 0) - (2 0 0 0)))) - (test-assert (not (can-shift-right? #2((2 8 4 8) - (2 16 4 8) - (0 0 0 4) - (0 0 0 2))))) - (test-end "can-shift-right? test"))) - -;;procedure-name valid-move? -;;input -> board (array::4*4) -;;output -> _ (symbol) [(eq? 'gameover <$:self:_>) => #t] -;;output -> _ (list:symbol[1 or 2 or 3 or 4]) -;;note -> "the list symbol should only contain up, down, left, right" -;; -(define valid-move? - (lambda (board) - (let* ([output-lst '()] - [rows board] - [columns (make-shared-array rows - (lambda (i j) - (list j i)) - 4 4)] - [rows-reversed (make-shared-array rows - (lambda (i j) - (list i (- 3 j))) - 4 4)] - [columns-reversed (make-shared-array columns - (lambda (i j) - (list i (- 3 j))) - 4 4)]) - (when (can-shift-right? rows) (set! output-lst (append (list 'right) output-lst))) - (when (can-shift-right? rows-reversed) (set! output-lst (append (list 'left) output-lst))) - (when (can-shift-right? columns) (set! output-lst (append (list 'down) output-lst))) - (when (can-shift-right? columns-reversed) (set! output-lst (append (list 'up) output-lst))) - (if (null? output-lst) - 'gameover - output-lst)))) - -(define test-valid-move? - (lambda () - (test-begin "valid-move? test") - (test-assert (eq? 'gameover (valid-move? #2((8 4 2 16) - (2 8 4 32) - (4 2 8 16) - (128 4 16 64))))) - (test-assert (equal? (list 'up 'down 'left 'right) (valid-move? #2((0 0 0 0) - (0 2 0 0) - (0 0 0 0) - (0 0 0 2))))) - (test-end "valid-move? test"))) - -;;prodedure-name check-game-status! -;;input -> board (array::4*4) -;;output -> _ (symbol) -;;note -> "The thing this procedure should implement: 1.decide whether there is a 2048 tile on board, if so, return 'win 2.decide the valid moves next time and return them as a list like (list 'up 'down 'right) or anything equivalent (if there is no valid moves, just return 'gameover)" -;; -(define check-game-status! - (lambda (board) - (spawn! board) - (let ([all-tiles (list (array-ref board 0 0) - (array-ref board 0 1) - (array-ref board 0 2) - (array-ref board 0 3) - (array-ref board 1 0) - (array-ref board 1 1) - (array-ref board 1 2) - (array-ref board 1 3) - (array-ref board 2 0) - (array-ref board 2 1) - (array-ref board 2 2) - (array-ref board 2 3) - (array-ref board 3 0) - (array-ref board 3 1) - (array-ref board 3 2) - (array-ref board 3 3))]) - (if (member 2048 all-tiles) - 'win - (valid-move? board))))) - -;;procedure-name play -;;input -> <$:nil> -;;output -> _ (array:4*4) -;; -(define play - (lambda () - (set! *random-state* (random-state-from-platform)) - (let ([board (make-array 0 4 4)]) - (let* ([rows board] - [columns (make-shared-array rows - (lambda (i j) - (list j i)) - 4 4)] - [rows-reversed (make-shared-array rows - (lambda (i j) - (list i (- 3 j))) - 4 4)] - [columns-reversed (make-shared-array columns - (lambda (i j) - (list i (- 3 j))) - 4 4)]) - (spawn! rows) - (let loop ([turn 1] [available-moves (valid-move? rows)]) - (format #t "TURN ~d" turn) - (newline) - (print-board rows) - (case (ask-user available-moves) - [(up) (update-board! columns-reversed)] - [(down) (update-board! columns)] - [(left) (update-board! rows-reversed)] - [(right) (update-board! rows)] - [else (error "something went wrong! The return stuff from (ask-user availuable-moves) is not among 'up 'down 'left 'right! This normally should never be reached.")]) - (let ([symbols (check-game-status! rows)]) - (cond - [(symbol? symbols) (case symbols - [(win) (begin - (display "You win!") - (newline) - (print-board rows))] - [(gameover) (begin - (display "You lose!") - (newline) - (print-board rows))] - [else (error "While not intended, we named what the procedure (check-game-status rows) returned as symbols, checking it as a symbol which passed, then we get this. But we coded this to be 'win or 'gameover !")])] - [(list? symbols) (begin - (display "Valid moves: ") - (display symbols) - (newline) - (loop (1+ turn) symbols))]))))))) diff --git a/Task/2048/Jq/2048.jq b/Task/2048/Jq/2048.jq deleted file mode 100644 index 367500faf2..0000000000 --- a/Task/2048/Jq/2048.jq +++ /dev/null @@ -1,127 +0,0 @@ -include "MRG32k3a" {search: "."}; # see comment above - -### Generic functions - -def lpad($len): tostring | ($len - length) as $l | (" " * $l) + .; - -# Create an m x n matrix with initial values specified by . -def matrix($m; $n): - if $m == 0 then [] - else . as $init - | if $m == 1 then [range(0;$n) | $init] - elif $m > 0 then - matrix(1; $n) as $row - | [range(0; $m) | $row ] - else error("matrix\($m);\($n)) invalid") - end - end; - - -### The 2048 Game -# Left-squish the input array in accordance with the game requirements for a single row -def squish: - def squish($n): - def s: - if length == 0 then [range(0;$n)|null] - elif .[0] == null then .[1:] | s - elif length == 1 then . + [range(0; $n - 1)|null] - elif .[0] == .[1] then [.[0] + .[1]] + (.[2:]|squish($n-1)) - else .[0:1] + (.[1:]|squish($n-1)) - end; - s; - squish(length); - -# Input: a matrix of rows -def squish_left: - [.[] | squish]; - -def squish_right: - [.[] | reverse | squish | reverse]; - -def squish_up: - transpose - | [.[] | squish] - | transpose; - -def squish_down: - transpose - | [.[] | reverse | squish | reverse] - | transpose; - -# Gather the [i,j] co-ordinates of all the null values in the input matrix -def gather: - if length == 0 then error end - | (.[0] | length) as $cols - | [range(0;length) as $i - | range(0; $cols) as $j - | select(.[$i][$j] == null) | [$i,$j]] - | if length == 0 then error end ; - -# Input: {matrix} -# Add a random 2 or 4 if possible, else error -# Output: includes .prng for the PRN generator -def add_random: - (.matrix | gather) as $gather - | ($gather | length) as $n - | if $n == 0 then error end - | if .prng == null then .prng = seed(now | tostring | sub("^.*[.]";"") | tonumber) end - | .prng |= nextFloat - | $gather[.prng.nextFloat * $n | trunc] as [$i,$j] - | .prng |= nextFloat - | (if (.prng.nextFloat) < 0.1 then 4 else 2 end) as $exmachina - | .matrix[$i][$j] = $exmachina ; - -def prompt: "[ijkl] or [wasd] or q to quit or n to restart:"; - -def direction: - {"i": "up", "j": "left", "k": "down", "l": "right", - "w": "up", "a": "left", "s": "down", "d": "right", - "q": "quit", - "n": "restart" - }; - -# Recognize $goal as the goal -def play($goal): - - # Pretty print - def pp: - .matrix[] | map(. // "." | lpad(4)) | join(" "); - - def won: - any(.matrix[][]; . == $goal); - - def lost: - .matrix - | (squish_left == .) and (squish_right == .) and - (squish_up == .) and (squish_down == .); - - def round: - pp, - if lost then "Sorry! Better luck next time.", play($goal) - else prompt, - ( (try input catch halt) as $in - | .matrix as $matrix # for checking if a move is legal - | .emit = null - | direction[$in | ascii_downcase] as $direction - | if $direction == "up" then .matrix |= squish_up - elif $direction == "down" then .matrix |= squish_down - elif $direction == "left" then .matrix |= squish_left - elif $direction == "right" then .matrix |= squish_right - elif $direction == "quit" then .emit = "bye" - elif $direction == "restart" then .emit = "restart" - else .emit = "unknown direction \($direction) ... please try again." - end - | if .emit == "bye" then .emit, halt - elif .emit == "restart" then "Restarting...", play($goal) - elif .emit != null then .emit, round - elif .matrix == $matrix then "Disallowed direction! Please try again.", round - elif won then pp, "Congratulations!", play($goal) - else add_random | round - end) - end; - - { matrix: (null | matrix(4;4))} - | .matrix[2] = [null,2,2,2] - | round; - -play(2048) diff --git a/Task/2048/Julia/2048.jl b/Task/2048/Julia/2048.julia similarity index 100% rename from Task/2048/Julia/2048.jl rename to Task/2048/Julia/2048.julia diff --git a/Task/2048/Kotlin/2048.kts b/Task/2048/Kotlin/2048.kotlin similarity index 100% rename from Task/2048/Kotlin/2048.kts rename to Task/2048/Kotlin/2048.kotlin diff --git a/Task/2048/OCaml/2048.ml b/Task/2048/OCaml/2048.ocaml similarity index 100% rename from Task/2048/OCaml/2048.ml rename to Task/2048/OCaml/2048.ocaml diff --git a/Task/2048/Rust/2048.rs b/Task/2048/Rust/2048.rust similarity index 100% rename from Task/2048/Rust/2048.rs rename to Task/2048/Rust/2048.rust diff --git a/Task/2048/Wren/2048.wren b/Task/2048/Wren/2048.wren index b92bc4948d..ddff0c113d 100644 --- a/Task/2048/Wren/2048.wren +++ b/Task/2048/Wren/2048.wren @@ -20,6 +20,13 @@ class G2048 { for (j in 0..3) _board[i][j] = Tile.new(0, false) } _rand = Random.new() + initializeBoard() + } + + initializeBoard() { + for (y in 0..3) { + for (x in 0..3) _board[x][y] = Tile.new(0, false) + } } loop() { diff --git a/Task/2048/Zig/2048.zig b/Task/2048/Zig/2048.zig deleted file mode 100644 index ffe55ff922..0000000000 --- a/Task/2048/Zig/2048.zig +++ /dev/null @@ -1,362 +0,0 @@ -// git repository at https://codeberg.org/Vulwsztyn/2048_zig -const std = @import("std"); -const builtin = @import("builtin"); - -const Io = std.Io; -const Random = std.Random; -const fmt = std.fmt; - -const mibu = @import("mibu"); -const color = mibu.color; -const events = mibu.events; -const term = mibu.term; -const cursor = mibu.cursor; - -// You can change these constants to modify the game behavior -const ROW_SIZE = 4; // program won't work if less than 2 -const COL_SIZE = 4; // program won't work if less than 2 -const TARGET_SCORE = 11; // 2^11 = 2048 -const PROBABILITY_OF_FOUR_NUMERATOR = 10; -const PROBABILITY_OF_FOUR_DENOMINATOR = 100; // these 2 work in tandem to give chance of spawning a 4 instead of 2 - -const Dir = enum { up, down, left, right }; -const Action = union(enum) { - Move: Dir, - Quit, - Noop, -}; - -fn spawn(comptime X: usize, comptime Y: usize, matrix_p: *[X][Y]u8, rand: Random) void { - var buffer: [X * Y]u8 = undefined; - var zero_indices = std.ArrayListUnmanaged(u8).initBuffer(&buffer); - for (matrix_p, 0..) |row, i| { - for (row, 0..) |val, j| { - if (val == 0) { - zero_indices.appendBounded(@intCast(i * Y + j)) catch unreachable; - } - } - } - const random_index = rand.intRangeAtMost(u8, 0, @intCast(zero_indices.items.len - 1)); - const chosen = zero_indices.items[random_index]; - const row = chosen / Y; - const col = chosen % Y; - const value: u8 = if (rand.intRangeAtMost(u8, 0, PROBABILITY_OF_FOUR_DENOMINATOR) < PROBABILITY_OF_FOUR_NUMERATOR) 2 else 1; - matrix_p[row][col] = value; -} - -fn additives_for_previous(dir: Dir) [2]i8 { - // assuming that for a move in a direction, we look at the values at the end - // and check backwards - // e.g. for up, we look at the top row and check downwards - // so we return 1, 0 meaning one row down, same column - switch (dir) { - .up => { - return .{ 1, 0 }; - }, - .down => { - return .{ -1, 0 }; - }, - .left => { - return .{ 0, 1 }; - }, - .right => { - return .{ 0, -1 }; - }, - } -} -fn is_move_possible(comptime X: usize, comptime Y: usize, matrix_p: [X][Y]u8, dir: Dir) bool { - // checks if move is possible by checking if any tile can be moved or combined - const additives = additives_for_previous(dir); - for (0..X) |i| { - const i_signed: i8 = @intCast(i); - const new_i = i_signed + additives[0]; - if (new_i < 0 or new_i >= X) continue; - for (0..Y) |j| { - const j_signed: i8 = @intCast(j); - const new_j = j_signed + additives[1]; - if (new_j < 0 or new_j >= Y) continue; - const val = matrix_p[i][j]; - const prev_val = matrix_p[@intCast(new_i)][@intCast(new_j)]; - if (val != 0 and val == prev_val) return true; - if (val == 0 and prev_val != 0) return true; - } - } - return false; -} - -fn is_game_lost(comptime X: usize, comptime Y: usize, matrix_p: [X][Y]u8) bool { - // checks if move in any direction is possible - for (std.meta.tags(Dir)) |dir| { - if (is_move_possible(X, Y, matrix_p, dir)) { - return false; - } - } - return true; -} - -fn is_game_won(comptime X: usize, comptime Y: usize, matrix_p: [X][Y]u8) bool { - for (matrix_p) |row| { - for (row) |val| { - if (val >= TARGET_SCORE) { - return true; - } - } - } - return false; -} - -fn last_positions(comptime X: usize, comptime Y: usize, dir: Dir, gpa: std.mem.Allocator) std.ArrayList([2]u8) { - // see comment in additives_for_previous - // e.g. for move up we start at the top row and go downwards - // this function returns the list positions in the top row (for that scenario) - var list: std.ArrayList([2]u8) = .empty; - switch (dir) { - .up => { - for (0..Y) |i| { - list.append(gpa, .{ 0, @intCast(i) }) catch unreachable; - } - }, - .down => { - for (0..Y) |i| { - list.append(gpa, .{ X - 1, @intCast(i) }) catch unreachable; - } - }, - .left => { - for (0..X) |i| { - list.append(gpa, .{ @intCast(i), 0 }) catch unreachable; - } - }, - .right => { - for (0..X) |i| { - list.append(gpa, .{ @intCast(i), X - 1 }) catch unreachable; - } - }, - } - return list; -} - -fn move_matrix(comptime X: usize, comptime Y: usize, matrix_p: *[X][Y]u8, dir: Dir) void { - const gpa = std.heap.page_allocator; - const additives = additives_for_previous(dir); - var postions = last_positions(X, Y, dir, gpa); - defer postions.deinit(gpa); - std.debug.print("\n", .{}); - for (postions.items) |pos| { - var target_row: i8 = @intCast(pos[0]); - var target_col: i8 = @intCast(pos[1]); - var target_val: u8 = matrix_p[pos[0]][pos[1]]; - var current_row: i8 = target_row; - var current_col: i8 = target_col; - while (true) { - current_row += additives[0]; - current_col += additives[1]; - const went_out_of_bounds = current_row < 0 or current_row >= (X) or - current_col < 0 or current_col >= (Y); - if (went_out_of_bounds) { - break; - } - const current_val: u8 = matrix_p[@intCast(current_row)][@intCast(current_col)]; - if (current_val == 0) { - // nothing to do, - continue; - } - if (target_val != 0 and target_val != current_val) { - // cannot combine, move target forward - // e.g 0 0 2 4 (for was target, now 2 becomes target) - matrix_p[@intCast(current_row)][@intCast(current_col)] = 0; - target_row = (target_row) + (additives[0]); - target_col = (target_col) + (additives[1]); - matrix_p[@intCast(target_row)][@intCast(target_col)] = current_val; - target_val = matrix_p[@intCast(target_row)][@intCast(target_col)]; - continue; - } - if (target_val == 0) { - // move current to target - // e.g 0 0 2 0 -> 0 0 0 2 (2 remains target, since we want 0 2 2 0 to become 0 0 0 4) - matrix_p[@intCast(target_row)][@intCast(target_col)] = current_val; - target_val = current_val; - } else { - // combine - // e.g 0 0 2 2 -> 0 0 0 4 (with rightmost zero becoming target, since the movements are not greedy) - matrix_p[@intCast(target_row)][@intCast(target_col)] = target_val + 1; - target_val = 0; - target_row = target_row + (additives[0]); - target_col = target_col + (additives[1]); - } - // both in case of move and combine we clear current - matrix_p[@intCast(current_row)][@intCast(current_col)] = 0; - } - } -} - -fn print(comptime X: usize, comptime Y: usize, matrix_p: [X][Y]u8, stdout: *Io.Writer) !void { - for (matrix_p, 0..) |row, i| { - try cursor.goTo(stdout, 1, 2 + i); - var buf: [100]u8 = undefined; - const all_together_slice = buf[0..]; - for (row) |val| { - const value = if (val != 0) std.math.pow(u16, 2, @intCast(val)) else 0; - const value_as_str = if (val > 0) try fmt.bufPrint(all_together_slice, "{d}", .{value}) else "_"; - - try color.fg256(stdout, if (val > 1) @enumFromInt(val) else color.Color.white); // sets colour based on value - try stdout.print("{s:>5} ", .{value_as_str}); // prints with padding - } - try stdout.print("\x1b[K\n", .{}); - } -} - -fn init_matrix(comptime X: usize, comptime Y: usize, matrix_p: *[X][Y]u8) void { - // initializes matrix to all zeros - for (matrix_p) |*row| { - for (row) |*val| { - val.* = @intCast(0); - } - } -} - -fn action_from_event(next: events.Event) Action { - switch (next) { - .key => |k| switch (k.code) { - .char => |c| switch (c) { - 'c' => { - return .Quit; - }, - 'q' => { - return .Quit; - }, - 'w' => { - return .{ .Move = .up }; - }, - 's' => { - return .{ .Move = .down }; - }, - 'a' => { - return .{ .Move = .left }; - }, - 'd' => { - return .{ .Move = .right }; - }, - 'h' => { - return .{ .Move = .left }; - }, - 'j' => { - return .{ .Move = .down }; - }, - 'k' => { - return .{ .Move = .up }; - }, - 'l' => { - return .{ .Move = .right }; - }, - else => { - return .Noop; - }, - }, - .up => { - return .{ .Move = .up }; - }, - .down => { - return .{ .Move = .down }; - }, - .left => { - return .{ .Move = .left }; - }, - .right => { - return .{ .Move = .right }; - }, - else => { - return .Noop; - }, - }, - else => { - return .Noop; - }, - } -} - -pub fn main() !void { - const row_size = ROW_SIZE; - const col_size = COL_SIZE; - var seed: u64 = undefined; - try std.posix.getrandom(std.mem.asBytes(&seed)); - - var prng = Random.DefaultPrng.init(seed); - const rand = prng.random(); - - var stdout_buffer: [1024]u8 = undefined; - - const stdin = std.fs.File.stdin(); - var stdout_file = std.fs.File.stdout(); - var stdout_writer = stdout_file.writer(&stdout_buffer); - const stdout = &stdout_writer.interface; - - if (!std.posix.isatty(stdin.handle)) { - try stdout.print("The current file descriptor is not a referring to a terminal.\n", .{}); - return; - } - - if (builtin.os.tag == .windows) { - try mibu.enableWindowsVTS(stdout.handle); - } - - // Enable terminal raw mode, its very recommended when listening for events - var raw_term = try term.enableRawMode(stdin.handle); - defer raw_term.disableRawMode() catch { - std.debug.print("Failed to disable raw mode\n", .{}); - }; - - try term.enterAlternateScreen(stdout); - defer term.exitAlternateScreen(stdout) catch { - std.debug.print("Failed to exit alternate screen\n", .{}); - }; - - try cursor.hide(stdout); - defer cursor.show(stdout) catch { - std.debug.print("Failed to show cursor\n", .{}); - }; - - try cursor.goTo(stdout, 1, 1); - try mibu.style.italic(stdout, true); - - var matrix: [row_size][col_size]u8 = undefined; - - init_matrix(row_size, col_size, &matrix); - - spawn(row_size, col_size, &matrix, rand); - try stdout.print("move with wsad, hjkl, or arrows; quit with c or q\x1b[K\n", .{}); // prints with padding - - try print(row_size, col_size, matrix, stdout); - - try stdout.flush(); - - while (true) { - try cursor.goTo(stdout, 1, 2); - const next = try events.next(stdin); - const action = action_from_event(next); - switch (action) { - .Quit => break, - .Noop => continue, - .Move => |dir| { - if (is_move_possible(row_size, col_size, matrix, dir)) { - move_matrix(row_size, col_size, &matrix, dir); - try print(row_size, col_size, matrix, stdout); - if (is_game_won(row_size, col_size, matrix)) { - try cursor.goTo(stdout, 1, row_size + 3); - try stdout.print("You won! Congratulations!\n", .{}); - try stdout.flush(); - break; - } - spawn(row_size, col_size, &matrix, rand); - try print(row_size, col_size, matrix, stdout); - if (is_game_lost(row_size, col_size, matrix)) { - try cursor.goTo(stdout, 1, (row_size + 3)); - try stdout.print("Game over! No more moves possible!\n", .{}); - try stdout.flush(); - break; - } - } - try stdout.flush(); - }, - } - } -} diff --git a/Task/21-game/00-TASK.txt b/Task/21-game/00-TASK.txt index 0fd624861d..85e5e6c32b 100644 --- a/Task/21-game/00-TASK.txt +++ b/Task/21-game/00-TASK.txt @@ -9,7 +9,6 @@ One player will be the computer. Players alternate supplying a number to be added to the ''running total''. -This game is a variant of [https://en.wikipedia.org/wiki/Nim#The_21_game Nim]. ;Task: Write a computer program that will: @@ -20,7 +19,4 @@ Write a computer program that will: ::* provide a mechanism for the player to quit/exit/halt/stop/close the program, ::* issue a notification when there is a winner, and ::* determine who goes first (maybe a random or user choice, or can be specified when the game begins). - -;Related tasks: -::* [[Nim game]]

    diff --git a/Task/21-game/ALGOL-68/21-game.alg b/Task/21-game/ALGOL-68/21-game.alg deleted file mode 100644 index e9dfe16bed..0000000000 --- a/Task/21-game/ALGOL-68/21-game.alg +++ /dev/null @@ -1,41 +0,0 @@ -IF print( ( "Player who reaches 21, wins", newline ) ); # 21 game - based on the EasyLang sample # - INT human = 1, computer = 2; - []STRING name = ( "Human ", "Computer" ); - INT player := human, sum := 0; - STRING a := "?"; - WHILE a /= "y" AND a /= "n" AND a /= "q" DO - print( ( "Do you want to go first (y/n/q) " ) ); - read( ( a, newline ) ); - IF a = "n" THEN player := computer FI - OD; - a /= "q" -THEN - WHILE - INT add := IF player = human THEN - a := "?"; - WHILE a /= "q" AND a /= "1" AND a /= "2" AND a /= "3" DO - print( ( newline, "Add 1, 2 or 3 (q to quit) " ) ); - read( ( a, newline ) ) - OD; - IF a = "1" THEN 1 ELIF a = "2" THEN 2 ELSE 3 FI - ELIF sum MOD 4 = 1 THEN - # player = computer, optimal move not possible # - ENTIER ( random * 3 ) + 1 - ELSE - # player = computer, can make the optimal move # - 4 - ( sum + 3 ) MOD 4 - FI; - sum +:= add; - IF a /= "q" THEN - print( ( name[ player ], ": ", whole( add, 0 ), " --> ", whole( sum, 0 ), newline ) ) - FI; - a /= "q" AND sum < 21 - DO - player := IF player = human THEN computer ELSE human FI - OD; - IF a /= "q" THEN - print( ( newline ) ); - print( ( IF player = human THEN "Congratulations, you won" ELSE "Sorry, you lost" FI ) ); - print( ( newline ) ) - FI -FI diff --git a/Task/21-game/Ada/21-game.adb b/Task/21-game/Ada/21-game.ada similarity index 100% rename from Task/21-game/Ada/21-game.adb rename to Task/21-game/Ada/21-game.ada diff --git a/Task/21-game/AppleScript/21-game.applescript b/Task/21-game/AppleScript/21-game.applescript deleted file mode 100644 index c850f044a1..0000000000 --- a/Task/21-game/AppleScript/21-game.applescript +++ /dev/null @@ -1,44 +0,0 @@ -repeat - set pstart to some item of {true, false} - if pstart then - display alert "You go first!" - set score to 0 - else - display alert "The computer goes first!" - log "The computer chose 1" - log "The score is now 1" - set score to 1 - end if - repeat - repeat - set input to display alert "Choose a number:" buttons {1, 2, 3} - set pmove to button returned of input - set score to score + pmove - if score > 21 then - display alert "You can't go above 21! Try again." - set score to score - pmove - else - exit repeat - end if - end repeat - log "You chose " & pmove - log "The score is now " & score - if score = 21 then - log "You win!" - exit repeat - else if score mod 4 is not 1 then - set cmove to (5 - (score mod 4)) mod 4 - else - set cmove to random number from 1 to 3 - end if - set score to score + cmove - log "The computer chose " & cmove - log "The score is now " & score - if score = 21 then - log "Too bad! The computer wins." - exit repeat - end if - end repeat - set again to display alert "Play again?" buttons {"Yes", "No"} - if button returned of again = "No" then exit repeat -end repeat diff --git a/Task/21-game/Arturo/21-game.arturo b/Task/21-game/Arturo/21-game.arturo index a4c0d5eb0f..3b62d3b212 100644 --- a/Task/21-game/Arturo/21-game.arturo +++ b/Task/21-game/Arturo/21-game.arturo @@ -5,7 +5,7 @@ print "-----------------------------" players: ["A" "B"] currentPlayer: sample players nextPlayer: first players -- currentPlayer -runningTotal: 0 +runningTotal: new 0 num: 0 getNum: function [][ diff --git a/Task/21-game/AutoHotkey/21-game.ahk b/Task/21-game/AutoHotkey/21-game.ahk index ba112f623d..89fc54b3c2 100644 --- a/Task/21-game/AutoHotkey/21-game.ahk +++ b/Task/21-game/AutoHotkey/21-game.ahk @@ -6,7 +6,7 @@ Gui, add, text, xs vT, Total : 00 Gui, add, text, xs vComputer, Computer Dealt 00 Gui, add, text, xs Section, Player 1 loop, 3 - Gui, add, button, x+5 vPlayer1_%A_Index% gTotal, % A_Index + Gui, add, button, x+5 vPlayer1_%A_Index% gTotal, % A_Index Gui, add, button, xs vReset gReset, reset Gui show,, 21 Game Winners := [1,5,9,13,17,21] @@ -18,13 +18,13 @@ total := 0 GuiControl,, T, % "Total : " SubStr("00" Total, -1) GuiControl,, Computer, % "Computer Waiting" Loop 3 - GuiControl, Enable, % "Player1_" A_Index + GuiControl, Enable, % "Player1_" A_Index Random, rnd, 0, 1 if rnd { - Loop 3 - GuiControl, Disable, % "Player1_" A_Index - gosub ComputerTurn + Loop 3 + GuiControl, Disable, % "Player1_" A_Index + gosub ComputerTurn } return ;----------------------------------- @@ -34,12 +34,12 @@ Total += Added GuiControl,, T, % "Total : " SubStr("00" Total, -1) if (total >= 21) { - MsgBox % "Player 1 Wins" - gosub reset - return + MsgBox % "Player 1 Wins" + gosub reset + return } Loop 3 - GuiControl, Disable, % "Player1_" A_Index + GuiControl, Disable, % "Player1_" A_Index gosub, ComputerTurn return ;----------------------------------- @@ -48,38 +48,38 @@ Gui, Submit, NoHide Sleep 500 if RadioE { - if (total < 13) - RadioC := true - else - RadioH := true + if (total < 13) + RadioC := true + else + RadioH := true } if RadioC { - Random, Deal, 1, 3 - total += Deal + Random, Deal, 1, 3 + total += Deal } if RadioH { - for i, v in Winners - if (total >= v) - continue - else - { - Deal := v - total - if Deal > 3 - Random, Deal, 1, 3 - total += Deal - break - } + for i, v in Winners + if (total >= v) + continue + else + { + Deal := v - total + if Deal > 3 + Random, Deal, 1, 3 + total += Deal + break + } } GuiControl,, T, % "Total : " SubStr("00" Total, -1) GuiControl,, Computer, % "Computer Dealt " Deal if (total=21) { - MsgBox Computer Wins - gosub, reset + MsgBox Computer Wins + gosub, reset } else - Loop 3 - GuiControl, Enable, % "Player1_" A_Index + Loop 3 + GuiControl, Enable, % "Player1_" A_Index return diff --git a/Task/21-game/EasyLang/21-game.easy b/Task/21-game/EasyLang/21-game.easy index 6f4e5100cd..1ed700b063 100644 --- a/Task/21-game/EasyLang/21-game.easy +++ b/Task/21-game/EasyLang/21-game.easy @@ -2,36 +2,36 @@ print "Who reaches 21, wins" print "Do you want to begin (y/n)" who = 1 if input = "n" - who = 2 + who = 2 . who$[] = [ "Human" "Computer" ] repeat - if who = 1 - repeat - print "" - print "Choose 1,2 or 3 (q for quit)" - a$ = input - n = number a$ - until a$ = "q" or (n >= 1 and n <= 3) - . - else - sleep 1 - if sum mod 4 = 1 - n = random 1 3 - else - n = 4 - (sum + 3) mod 4 - . - . - sum += n - print who$[who] & ": " & n & " --> " & sum - until sum >= 21 or a$ = "q" - who = who mod 2 + 1 + if who = 1 + repeat + print "" + print "Choose 1,2 or 3 (q for quit)" + a$ = input + n = number a$ + until a$ = "q" or (n >= 1 and n <= 3) + . + else + sleep 1 + if sum mod 4 = 1 + n = randint 3 + else + n = 4 - (sum + 3) mod 4 + . + . + sum += n + print who$[who] & ": " & n & " --> " & sum + until sum >= 21 or a$ = "q" + who = who mod 2 + 1 . if a$ <> "q" - print "" - if who = 0 - print "Congratulation, you won" - else - print "Sorry, you lost" - . + print "" + if who = 0 + print "Congratulation, you won" + else + print "Sorry, you lost" + . . diff --git a/Task/21-game/GDScript/21-game.gd b/Task/21-game/GDScript/21-game.gd index 009e2e3a9a..78f190267d 100644 --- a/Task/21-game/GDScript/21-game.gd +++ b/Task/21-game/GDScript/21-game.gd @@ -8,81 +8,81 @@ const target: int = 21 # -1 is returned to request quit func get_player_choice(total: int) -> int: - while true: - printraw("Player's choice: ") - var input: String = OS.read_string_from_stdin().strip_edges() + while true: + printraw("Player's choice: ") + var input: String = OS.read_string_from_stdin().strip_edges() - if input == "quit": - return -1 + if input == "quit": + return -1 - if not input.is_valid_int(): - print("Please input an integer.") - continue + if not input.is_valid_int(): + print("Please input an integer.") + continue - var input_int := int(input) - if input_int < 1 or input_int > 3: - print("Please pick a number from 1 to 3") - continue + var input_int := int(input) + if input_int < 1 or input_int > 3: + print("Please pick a number from 1 to 3") + continue - if input_int + total > target: - print("Please do not exceed a total of %d" % target) - continue + if input_int + total > target: + print("Please do not exceed a total of %d" % target) + continue - return input_int + return input_int - # This is required since Godot does not detect the unreachable code path - OS.crash("unreachable") - return 0 + # This is required since Godot does not detect the unreachable code path + OS.crash("unreachable") + return 0 func get_computer_choice(total: int) -> int: - # This can be shortened using max() if you do not have type checking OCD - var remaining: int = target - total - return randi_range(1, 3 if remaining > 3 else remaining) + # This can be shortened using max() if you do not have type checking OCD + var remaining: int = target - total + return randi_range(1, 3 if remaining > 3 else remaining) func play() -> void: - print("""\ + print("""\ Welcome to the 21 game. Type quit to exit.""") - var total: int = 0 - var player: Player - match randi_range(1, 2): - 1: - player = Player.Human - print("You will go first.") - 2: - player = Player.Computer - print("The computer will go first.") + var total: int = 0 + var player: Player + match randi_range(1, 2): + 1: + player = Player.Human + print("You will go first.") + 2: + player = Player.Computer + print("The computer will go first.") - while true: - print("\nThe total is %d" % total) + while true: + print("\nThe total is %d" % total) - var choice: int - match player: - Player.Human: - choice = get_player_choice(total) - if choice == -1: - return - Player.Computer: - choice = get_computer_choice(total) - print("The computer plays %d" % choice) - assert(1 <= choice and choice <= 3) + var choice: int + match player: + Player.Human: + choice = get_player_choice(total) + if choice == -1: + return + Player.Computer: + choice = get_computer_choice(total) + print("The computer plays %d" % choice) + assert(1 <= choice and choice <= 3) - total += choice - if total == target: - match player: - Player.Human: print("You win!") - Player.Computer: print("The computer won, you lose.") - return - assert(total < target) + total += choice + if total == target: + match player: + Player.Human: print("You win!") + Player.Computer: print("The computer won, you lose.") + return + assert(total < target) - match player: - Player.Human: player = Player.Computer - Player.Computer: player = Player.Human + match player: + Player.Human: player = Player.Computer + Player.Computer: player = Player.Human func _process(_delta: float) -> bool: - randomize() - play() - return true + randomize() + play() + return true diff --git a/Task/21-game/J/21-game.j b/Task/21-game/J/21-game.j index 04b5ac792e..821237993a 100644 --- a/Task/21-game/J/21-game.j +++ b/Task/21-game/J/21-game.j @@ -1,32 +1,37 @@ -g21=: summarize@play@setup ::'g21: error termination' +g21=: summarize@play@setup ::('g21: error termination'"_) -Until=: {{u^:(0-:v)^:_}} +NB. non-verb must be defined before use, otherwise are assumed verbs. +Until=: 2 :'u^:(0-:v)^:_' -'score turn choice'=: 0 1 2 +t=: 'score turn choice' +(t)=: i. # ;: t +empty erase't' + +Fetch=: &{ +Alter=: } play=: move Until done -move=: [: update you`it@.(turn&{) -done=: 21 <: score&{ - +done=: 21 <: score Fetch +move=: [: update you`it@.(turn Fetch) update=: swap@display@add -add=: score}~ score&{ + choice&{ -display=: [ 'sum: {}' echo@format~ score&{ -swap=: turn}~ [: -. turn&{ +add=: score Alter~ (score Fetch + choice Fetch) +display=: [ ([: echo 'sum: {}' format~ score Fetch) +swap=: turn Alter~ ([: -. turn Fetch) -it=: ([ 'It chose {}.' echo@format~ choice&{)@(choice}~ cb) -cb=: 1:`(>:@?@3)`3:`2:@.(4 | score&{) NB. computer brain +it=: ([ [: echo 'It chose {}.' format~ choice Fetch)@(choice Alter~ cb) +cb=: (1:`r`3:`2:)@.(4 | score Fetch) NB. computer brain +r=: 3 :'>:?3' you=: qio1@check@acquire@prompt -prompt=: [ echo@'your choice?' -acquire=: choice}~'123'i.0{' ',~read -check=: (choice}~ 665 - score&{)@([ echo@'g21: early termination')^:(3 = choice&{) -qio1=: choice}~ ([: >: choice&{) +prompt=: [ ([: echo 'your choice?'"_) +acquire=: choice Alter~ ('123' i. 0 { ' ' ,~ read) +check=: (choice Alter~ (665 - score Fetch))@([ ([: echo 'g21: early termination'"_))^:(3 = choice Fetch) +qio1=: choice Alter~ ([: >: choice Fetch) -setup=: ([ echo@'On your turn enter 1 2 or 3, other entries exit')@(?@2 turn} ])@0 0 0 NB. choose first player randomly +setup=: ([ [: echo 'On your turn enter 1 2 or 3, other entries exit'"_)@((3 :'?2') turn Alter ])@0 0 0"_ NB. choose first player randomly +summarize=: ' won' ,~ (];._2 'it you ') {~ turn Fetch -summarize=: ' won',~ ];._2@'it you '{~turn&{ - -read=: 1!:1@1 -write=: 1!:2&4 NB. unused -format=: ''&$: : ([: ; (a: , [: ":&.> [) ,. '{}' ([ (E. <@}.;._1 ]) ,) ]) +read=: 1!:1@:1: +write=: 1!:2 4: NB. unused +format=: ''&$: :([: ; (a: , [: ":&.> [) ,. '{}' ([ (E. <@}.;._1 ]) ,) ]) diff --git a/Task/21-game/Julia/21-game.jl b/Task/21-game/Julia/21-game.julia similarity index 100% rename from Task/21-game/Julia/21-game.jl rename to Task/21-game/Julia/21-game.julia diff --git a/Task/21-game/Python/21-game-1.py b/Task/21-game/Python/21-game-1.py index fa4bcbcfdc..61db2b29a5 100644 --- a/Task/21-game/Python/21-game-1.py +++ b/Task/21-game/Python/21-game-1.py @@ -1,62 +1,62 @@ from random import randint def start(): - game_count=0 - print("Enter q to quit at any time.\nThe computer will choose first.\nRunning total is now {}".format(game_count)) - roundno=1 - while game_count<21: - print("\nROUND {}: \n".format(roundno)) - t = select_count(game_count) - game_count = game_count+t - print("Running total is now {}\n".format(game_count)) - if game_count>=21: - print("So, commiserations, the computer has won!") - return 0 - t = request_count() - if not t: - print('OK,quitting the game') - return -1 - game_count = game_count+t - print("Running total is now {}\n".format(game_count)) - if game_count>=21: - print("So, congratulations, you've won!") - return 1 - roundno+=1 + game_count=0 + print("Enter q to quit at any time.\nThe computer will choose first.\nRunning total is now {}".format(game_count)) + roundno=1 + while game_count<21: + print("\nROUND {}: \n".format(roundno)) + t = select_count(game_count) + game_count = game_count+t + print("Running total is now {}\n".format(game_count)) + if game_count>=21: + print("So, commiserations, the computer has won!") + return 0 + t = request_count() + if not t: + print('OK,quitting the game') + return -1 + game_count = game_count+t + print("Running total is now {}\n".format(game_count)) + if game_count>=21: + print("So, congratulations, you've won!") + return 1 + roundno+=1 def select_count(game_count): - '''selects a random number if the game_count is less than 18. otherwise chooses the winning number''' - if game_count<18: - t= randint(1,3) - else: - t = 21-game_count - print("The computer chooses {}".format(t)) - return t + '''selects a random number if the game_count is less than 18. otherwise chooses the winning number''' + if game_count<18: + t= randint(1,3) + else: + t = 21-game_count + print("The computer chooses {}".format(t)) + return t def request_count(): - '''request user input between 1,2 and 3. It will continue till either quit(q) or one of those numbers is requested.''' - t="" - while True: - try: - t = raw_input('Your choice 1 to 3 :') - if int(t) in [1,2,3]: - return int(t) - else: - print("Out of range, try again") - except: - if t=="q": - return None - else: - print("Invalid Entry, try again") + '''request user input between 1,2 and 3. It will continue till either quit(q) or one of those numbers is requested.''' + t="" + while True: + try: + t = raw_input('Your choice 1 to 3 :') + if int(t) in [1,2,3]: + return int(t) + else: + print("Out of range, try again") + except: + if t=="q": + return None + else: + print("Invalid Entry, try again") c=0 m=0 r=True while r: - o = start() - if o==-1: - break - else: - c+=1 if o==0 else 0 - m+=1 if o==1 else 0 - print("Computer wins {0} game, human wins {1} games".format(c,m)) - t = raw_input("Another game?(press y to continue):") - r = (t=="y") + o = start() + if o==-1: + break + else: + c+=1 if o==0 else 0 + m+=1 if o==1 else 0 + print("Computer wins {0} game, human wins {1} games".format(c,m)) + t = raw_input("Another game?(press y to continue):") + r = (t=="y") diff --git a/Task/21-game/Rebol/21-game.rebol b/Task/21-game/Rebol/21-game.rebol deleted file mode 100644 index 03fa84803d..0000000000 --- a/Task/21-game/Rebol/21-game.rebol +++ /dev/null @@ -1,26 +0,0 @@ -Rebol [ - title: "Rosetta code: 21 game" - file: %21_game.r3 - url: https://rosettacode.org/wiki/21_game -] - -game-21: function[][ - total: 0 - human?: true - while [total <> 21][ - either human? [ - n: ask "Enter a number between 1 and 3 (CTRL+C to quit): " - if none? n [quit] - unless parse n [#"1" | #"2" | #"3"][ continue ] - n: to integer! n - ][ ;computer - if 3 < n: 21 - total [ n: random 3 ] - print ["Computer picks:" as-yellow n] - ] - total: total + n - print ["Total:" as-green total] - human?: not human? - ] - print as-green pick ["Computer wins!" "You win!"] human? -] -game-21 diff --git a/Task/21-game/Ring/21-game.ring b/Task/21-game/Ring/21-game.ring index 06bcf1934e..51094dea5e 100644 --- a/Task/21-game/Ring/21-game.ring +++ b/Task/21-game/Ring/21-game.ring @@ -100,9 +100,9 @@ func choose(ch,ym) ok func msgBox(text) { - m = new qMessageBox(win1) { - setWindowTitle("21 Game") - setText(text) - show() - } + m = new qMessageBox(win1) { + setWindowTitle("21 Game") + setText(text) + show() + } } diff --git a/Task/21-game/Rust/21-game.rs b/Task/21-game/Rust/21-game.rust similarity index 100% rename from Task/21-game/Rust/21-game.rs rename to Task/21-game/Rust/21-game.rust diff --git a/Task/21-game/Uiua/21-game.uiua b/Task/21-game/Uiua/21-game.uiua deleted file mode 100644 index 8f17d8a5d9..0000000000 --- a/Task/21-game/Uiua/21-game.uiua +++ /dev/null @@ -1,6 +0,0 @@ -T ← 21 -P ← &p$"_ played: _\tTotal: _" -Play‼ ← ⍥(&p$"_ won." ^0)⊸=T⊸P ^0 ⟜+ ^1 -Computer ← Play‼"Computer" ⍥+₁⊸=0◿4⊸˜-T # Aim for Rem mod 4 = 0 -Random ← Play‼"Random"+1⌊×3⚂ # Random play. -◌⍢(⍥Computer⊸ 21: - recur() - val - else: recur() diff --git a/Task/24-game-Solve/Ada/24-game-solve.adb b/Task/24-game-Solve/Ada/24-game-solve.adb deleted file mode 100644 index 2494b4e14f..0000000000 --- a/Task/24-game-Solve/Ada/24-game-solve.adb +++ /dev/null @@ -1,245 +0,0 @@ -with Ada.Text_IO; use Ada.Text_IO; - -procedure Game24_Solver is - subtype Index is Positive range 1 .. 4; - subtype Digit is Integer range 1 .. 9; - type Digit_Array_Type is array (Index) of Digit; - - Success_Exception : exception; - - Digit_Array : Digit_Array_Type; - - procedure Swap (A, B : Index) is - Tmp : Digit; - begin - if A /= B then - Tmp := Digit_Array (A); - Digit_Array (A) := Digit_Array (B); - Digit_Array (B) := Tmp; - end if; - end Swap; - - procedure Do_Operation_Options is - type Operation_Character is ('+', '-', '*', '/'); - type Operation_Access is - access function (Left, Right : Float) return Float; - type Allowed_Operation_Array_Type is - array (Operation_Character) of Operation_Access; - - function Operation_Character_To_String - (C : in Operation_Character) return String is - begin - case C is - when '+' => - return "+"; - - when '-' => - return "-"; - - when '*' => - return "*"; - - when '/' => - return "/"; - end case; - end Operation_Character_To_String; - - function Add_Floats (Left, Right : Float) return Float is - begin - return Left + Right; - end Add_Floats; - - function Subtract_Floats (Left, Right : Float) return Float is - begin - return Left - Right; - end Subtract_Floats; - - function Multiply_Floats (Left, Right : Float) return Float is - begin - return Left * Right; - end Multiply_Floats; - - function Divide_Floats (Left, Right : Float) return Float is - begin - return Left / Right; - end Divide_Floats; - - Allowed_Operation_Array : constant Allowed_Operation_Array_Type := - ('+' => Add_Floats'Access, - '-' => Subtract_Floats'Access, - '*' => Multiply_Floats'Access, - '/' => Divide_Floats'Access); - - A : Digit renames Digit_Array (1); - B : Digit renames Digit_Array (2); - C : Digit renames Digit_Array (3); - D : Digit renames Digit_Array (4); - begin - for Op1 in Operation_Character loop - for Op2 in Operation_Character loop - for Op3 in Operation_Character loop - if (Allowed_Operation_Array (Op3) - (Allowed_Operation_Array (Op2) - (Allowed_Operation_Array (Op1) (Float (A), Float (B)), - Float (C)), - Float (D))) - = 24.0 - then - Put_Line - ("((" - & Digit'Image (A) - & " " - & Operation_Character_To_String (Op1) - & " " - & Digit'Image (B) - & ") " - & Operation_Character_To_String (Op2) - & " " - & Digit'Image (C) - & ") " - & Operation_Character_To_String (Op3) - & " " - & Digit'Image (D)); - raise Success_Exception; - end if; - if (Allowed_Operation_Array (Op2) - (Allowed_Operation_Array (Op1) (Float (A), Float (B)), - Allowed_Operation_Array (Op3) (Float (C), Float (D)))) - = 24.0 - then - Put_Line - ("(" - & Digit'Image (A) - & " " - & Operation_Character_To_String (Op1) - & " " - & Digit'Image (B) - & ") " - & Operation_Character_To_String (Op2) - & " (" - & Digit'Image (C) - & " " - & Operation_Character_To_String (Op3) - & " " - & Digit'Image (D) - & ")"); - raise Success_Exception; - end if; - if (Allowed_Operation_Array (Op1) - (Float (A), - Allowed_Operation_Array (Op2) - (Float (B), - Allowed_Operation_Array (Op3) - (Float (C), Float (D))))) - = 24.0 - then - Put_Line - (Digit'Image (A) - & " " - & Operation_Character_To_String (Op1) - & " (" - & Digit'Image (B) - & " " - & Operation_Character_To_String (Op2) - & " (" - & Digit'Image (C) - & " " - & Operation_Character_To_String (Op3) - & " " - & Digit'Image (D) - & "))"); - raise Success_Exception; - end if; - if (Allowed_Operation_Array (Op1) - (Float (A), - Allowed_Operation_Array (Op3) - (Allowed_Operation_Array (Op2) (Float (B), Float (C)), - Float (D)))) - = 24.0 - then - Put_Line - (Digit'Image (A) - & " " - & Operation_Character_To_String (Op1) - & " ((" - & Digit'Image (B) - & " " - & Operation_Character_To_String (Op2) - & " " - & Digit'Image (C) - & ") " - & Operation_Character_To_String (Op3) - & " " - & Digit'Image (D) - & ")"); - raise Success_Exception; - end if; - if (Allowed_Operation_Array (Op3) - (Allowed_Operation_Array (Op1) - (Float (A), - Allowed_Operation_Array (Op2) (Float (B), Float (C))), - Float (D))) - = 24.0 - then - Put_Line - ("(" - & Digit'Image (A) - & " " - & Operation_Character_To_String (Op1) - & " (" - & Digit'Image (B) - & " " - & Operation_Character_To_String (Op2) - & " " - & Digit'Image (C) - & ")) " - & Operation_Character_To_String (Op3) - & " " - & Digit'Image (D)); - raise Success_Exception; - end if; - end loop; - end loop; - end loop; - end Do_Operation_Options; - - procedure Do_Permutations (Start_Index : Index := Index'First) is - begin - if Start_Index = Index'Last then - Do_Operation_Options; - return; - end if; - - for I in Start_Index .. Index'Last loop - Swap (Start_Index, I); - Do_Permutations (Start_Index + 1); - Swap (Start_Index, I); - end loop; - end Do_Permutations; -begin - Put ("Enter 4 digits: "); - declare - Zero_Pos : constant Integer := Character'Pos ('0'); - Input : String := Get_Line; - begin - if Input'Length = 4 then - for I in Index'Range loop - if Input (I) in '1' .. '9' then - Digit_Array (I) := Character'Pos (Input (I)) - Zero_Pos; - else - Put_Line - ("Invalid input: all characters must be non-zero digits"); - return; - end if; - end loop; - else - Put_Line ("Invalid input: it must have length of 4"); - return; - end if; - end; - Do_Permutations; - Put_Line ("Solution not found"); -exception - when Success_Exception => - null; -end Game24_Solver; diff --git a/Task/24-game-Solve/COBOL/24-game-solve.cob b/Task/24-game-Solve/COBOL/24-game-solve.cobol similarity index 100% rename from Task/24-game-Solve/COBOL/24-game-solve.cob rename to Task/24-game-Solve/COBOL/24-game-solve.cobol diff --git a/Task/24-game-Solve/Dart/24-game-solve.dart b/Task/24-game-Solve/Dart/24-game-solve.dart deleted file mode 100644 index 38d41aaba9..0000000000 --- a/Task/24-game-Solve/Dart/24-game-solve.dart +++ /dev/null @@ -1,226 +0,0 @@ -enum Operator { - Sub, - Plus, - Mul, - Div -} - -class Factor { - String content; - int value; - - Factor({this.content, this.value}); - - Factor copyWith({String content, int value}) { - return Factor( - content: content ?? this.content, - value: value ?? this.value - ); - } -} - -List apply(Operator op, List left, List right) { - List ret = []; - for (var l in left) { - for (var r in right) { - switch (op) { - case Operator.Sub: - if (l.value > r.value) { - ret.add(Factor( - content: "(${l.content} - ${r.content})", - value: l.value - r.value - )); - } - break; - case Operator.Plus: - ret.add(Factor( - content: "(${l.content} + ${r.content})", - value: l.value + r.value - )); - break; - case Operator.Mul: - ret.add(Factor( - content: "(${l.content} × ${r.content})", - value: l.value * r.value - )); - break; - case Operator.Div: - if (l.value >= r.value && r.value > 0 && l.value % r.value == 0) { - ret.add(Factor( - content: "(${l.content} / ${r.content})", - value: l.value ~/ r.value - )); - } - break; - } - } - } - return ret; -} - -List calc(List op, List numbers) { - List _calc(List op, List numbers, List acc) { - if (op.isEmpty) { - return List.from(acc); - } - - List ret = []; - var monoFactor = [Factor( - content: numbers[0].toString(), - value: numbers[0], - )]; - - switch (op[0]) { - case Operator.Mul: - ret.addAll(apply(op[0], acc, monoFactor)); - break; - case Operator.Div: - ret.addAll(apply(op[0], acc, monoFactor)); - ret.addAll(apply(op[0], monoFactor, acc)); - break; - case Operator.Sub: - ret.addAll(apply(op[0], acc, monoFactor)); - ret.addAll(apply(op[0], monoFactor, acc)); - break; - case Operator.Plus: - ret.addAll(apply(op[0], acc, monoFactor)); - break; - } - - return _calc( - op.sublist(1), - numbers.sublist(1), - ret - ); - } - - return _calc( - op, - numbers.sublist(1), - [Factor(content: numbers[0].toString(), value: numbers[0])] - ); -} - -List solutions(List numbers) { - List ret = []; - Set hashSet = {}; - - for (var ops in OpIter()) { - for (var order in orders()) { - var orderedNumbers = applyOrder(numbers, order); - var results = calc(ops, orderedNumbers); - - for (var factor in results) { - if (factor.value == 24 && !hashSet.contains(factor.content)) { - hashSet.add(factor.content); - ret.add(factor); - } - } - } - } - - return ret; -} - -class OpIter extends Iterable> { - @override - Iterator> get iterator => _OpIterator(); -} - -class _OpIterator implements Iterator> { - int _index = 0; - static const List OPTIONS = [ - Operator.Mul, - Operator.Sub, - Operator.Plus, - Operator.Div - ]; - - @override - List get current { - final f1 = OPTIONS[(_index & (3 << 4)) >> 4]; - final f2 = OPTIONS[(_index & (3 << 2)) >> 2]; - final f3 = OPTIONS[(_index & 3)]; - return [f1, f2, f3]; - } - - @override - bool moveNext() { - if (_index >= 1 << 6) { - return false; - } - _index++; - return true; - } -} - -List> orders() { - return [ - [0, 1, 2, 3], - [0, 1, 3, 2], - [0, 2, 1, 3], - [0, 2, 3, 1], - [0, 3, 1, 2], - [0, 3, 2, 1], - [1, 0, 2, 3], - [1, 0, 3, 2], - [1, 2, 0, 3], - [1, 2, 3, 0], - [1, 3, 0, 2], - [1, 3, 2, 0], - [2, 0, 1, 3], - [2, 0, 3, 1], - [2, 1, 0, 3], - [2, 1, 3, 0], - [2, 3, 0, 1], - [2, 3, 1, 0], - [3, 0, 1, 2], - [3, 0, 2, 1], - [3, 1, 0, 2], - [3, 1, 2, 0], - [3, 2, 0, 1], - [3, 2, 1, 0] - ]; -} - -List applyOrder(List numbers, List order) { - return [ - numbers[order[0]], - numbers[order[1]], - numbers[order[2]], - numbers[order[3]] - ]; -} - -void main(List args) { - List numbers = []; - - if (args.isNotEmpty) { - String input = args[0]; - for (var char in input.split('')) { - int n = int.tryParse(char); - if (n != null) { - numbers.add(n); - } - - if (numbers.length == 4) { - var sols = solutions(numbers); - var len = sols.length; - - if (len == 0) { - print('no solution for ${numbers[0]}, ${numbers[1]}, ${numbers[2]}, ${numbers[3]}'); - return; - } - - print('solutions for ${numbers[0]}, ${numbers[1]}, ${numbers[2]}, ${numbers[3]}'); - for (var s in sols) { - print(s.content); - } - print('$len solutions found'); - return; - } - } - } else { - print('empty input'); - } -} diff --git a/Task/24-game-Solve/Elixir/24-game-solve.ex b/Task/24-game-Solve/Elixir/24-game-solve.elixir similarity index 100% rename from Task/24-game-Solve/Elixir/24-game-solve.ex rename to Task/24-game-Solve/Elixir/24-game-solve.elixir diff --git a/Task/24-game-Solve/Fortran/24-game-solve-3.f b/Task/24-game-Solve/Fortran/24-game-solve-3.f deleted file mode 100644 index c3f0095d7a..0000000000 --- a/Task/24-game-Solve/Fortran/24-game-solve-3.f +++ /dev/null @@ -1,481 +0,0 @@ -module game24_module - use omp_lib - use iso_fortran_env, only: int64 - implicit none - ! Define constants - integer, parameter :: max_limit = 8 ! Maximum allowed value for the number of inputs - integer, parameter :: expr_len = 200 ! Maximum length for expressions - - ! Precomputed total calls for n=6,7,8 - integer(int64), parameter :: total_calls_n6 = 20000000_int64 - integer(int64), parameter :: total_calls_n7 = 2648275200_int64 - integer(int64), parameter :: total_calls_n8 = 444557593600_int64 - - !----------------------- Progress Indicator Variables --------------------- - integer(int64) :: total_calls = 0 ! Total number of recursive calls - integer(int64) :: completed_calls = 0 ! Number of completed recursive calls - integer :: last_percentage = -1 ! Last percentage reported - integer, parameter :: progress_bar_width = 50 ! Width of the progress bar - character(len=1) :: carriage_return = char(13) ! Carriage return character - logical :: show_progress = .false. ! Flag to show progress bar - !-------------------------------------------------------------------------- -contains - - !----------------------------------------------------------------------- - ! ! Aborted function: calculate_total_calls - ! ! Description: - ! ! Estimates the total number of recursive calls for a given n, - ! ! considering commutativity (addition and multiplication). - ! ! Arguments: - ! ! n: The number of input numbers. - ! ! Returns: - ! ! The estimated total number of recursive calls as an integer. - ! !----------------------------------------------------------------------- - ! integer function calculate_total_calls(n) - ! implicit none - ! integer, intent(in) :: n - ! integer :: k - ! calculate_total_calls = 1 - ! do k = 2, n - ! ! For each pair, there are 6 possible operations: - ! ! 1 addition, 1 multiplication (commutative) - ! ! 2 subtraction, 2 division (non-commutative) - ! calculate_total_calls = calculate_total_calls * ((k * (k - 1)) / 2) * 6 - ! end do - ! end function calculate_total_calls - - !----------------------------------------------------------------------- - ! Subroutine: convert_to_number - ! Description: - ! Converts user input (numbers or card values) into numeric values. - ! Handles card values such as 'A', 'J', 'Q', 'K' and converts them into - ! corresponding numbers (A=1, J=11, Q=12, K=13). - ! Arguments: - ! input_str: Input string representing the number or card. - ! number: Output real number after conversion. - ! ios: I/O status indicator (0 for success, non-zero for error). - !----------------------------------------------------------------------- - subroutine convert_to_number(input_str, number, ios) - implicit none - character(len=*), intent(in) :: input_str - real, intent(out) :: number - integer, intent(out) :: ios - character(len=1) :: first_char - real :: temp_number - - ios = 0 ! Reset the I/O status to 0 (valid input by default) - first_char = input_str(1:1) - - select case (first_char) - case ('A', 'a') - number = 1.0 - case ('J', 'j') - number = 11.0 - case ('Q', 'q') - number = 12.0 - case ('K', 'k') - number = 13.0 - case default - read (input_str, *, iostat=ios) temp_number ! Attempt to read a real number - - ! If input is not a valid real number or is not an integer, set ios to 1 - if (ios /= 0 .or. mod(temp_number, 1.0) /= 0.0) then - ios = 1 ! Invalid input - else - number = temp_number ! Valid integer input - end if - end select - end subroutine convert_to_number - - !----------------------------------------------------------------------- - ! Subroutine: remove_decimal_zeros - ! Description: - ! Removes trailing zeros after the decimal point from a string. - ! Arguments: - ! str: Input string that may contain trailing zeros. - ! result: Output string with trailing zeros removed. - !----------------------------------------------------------------------- - subroutine remove_decimal_zeros(str, result) - implicit none - character(len=*), intent(in) :: str ! Input: String to remove zeros from - character(len=*), intent(out) :: result ! Output: String without trailing zeros - integer :: i, len_str ! Loop counter and string length - - len_str = len_trim(str) - result = adjustl(str(1:len_str)) - - ! Find the position of the decimal point - i = index(result, '.') - - ! If there's a decimal point, remove trailing zeros - if (i > 0) then - do while (len_str > i .and. result(len_str:len_str) == '0') - len_str = len_str - 1 - end do - if (result(len_str:len_str) == '.') len_str = len_str - 1 - result = result(1:len_str) - end if - end subroutine remove_decimal_zeros - - !----------------------------------------------------------------------- - ! Subroutine: create_new_arrays - ! Description: - ! Creates new arrays after performing an operation. - ! Arguments: - ! nums: Input array of numbers. - ! exprs: Input array of expressions. - ! idx1: Index of the first element to remove. - ! idx2: Index of the second element to remove. - ! result: Result of the operation. - ! new_expr: New expression string. - ! new_nums: Output array of numbers with elements removed and result added. - ! new_exprs: Output array of expressions with elements removed and new_expr added. - !----------------------------------------------------------------------- - subroutine create_new_arrays(nums, exprs, idx1, idx2, result, new_expr, new_nums, new_exprs) - implicit none - real, intent(in) :: nums(:) ! Input: Array of numbers - character(len=expr_len), intent(in) :: exprs(:) ! Input: Array of expressions - integer, intent(in) :: idx1, idx2 ! Input: Indices of elements to remove - real, intent(in) :: result ! Input: Result of the operation - character(len=expr_len), intent(in) :: new_expr ! Input: New expression - real, allocatable, intent(out) :: new_nums(:) ! Output: New array of numbers - character(len=expr_len), allocatable, intent(out) :: new_exprs(:) ! Output: New array of expressions - integer :: i, j, n ! Loop counters and size of input arrays - - n = size(nums) - allocate (new_nums(n - 1)) - allocate (new_exprs(n - 1)) - - j = 0 - do i = 1, n - if (i /= idx1 .and. i /= idx2) then - j = j + 1 - new_nums(j) = nums(i) - new_exprs(j) = exprs(i) - end if - end do - - ! Add the result of the operation to the new arrays - new_nums(n - 1) = result - new_exprs(n - 1) = new_expr - end subroutine create_new_arrays - - !----------------------------------------------------------------------- - ! Subroutine: update_progress_bar - ! Description: - ! Updates and displays the horizontal percentage-based progress bar. - ! Arguments: - ! None - !----------------------------------------------------------------------- - subroutine update_progress_bar() - implicit none - real :: percentage - integer :: filled_length - character(len=progress_bar_width) :: bar - integer :: int_percentage - - if (total_calls == 0 .or. .not. show_progress) return ! Avoid division by zero and check the flag - - percentage = real(completed_calls) / real(total_calls) * 100.0 - - ! Ensure percentage does not exceed 100% - if (percentage > 100.0) percentage = 100.0 - - ! Calculate integer percentage - int_percentage = int(percentage) - - ! Update progress bar only when percentage increases by at least 1% - if (int_percentage > last_percentage) then - last_percentage = int_percentage - - ! Calculate the filled length of the progress bar - filled_length = min(int(percentage / 100.0 * progress_bar_width), progress_bar_width) - - ! Construct the progress bar string - bar = repeat('=', filled_length) - if (filled_length < progress_bar_width) then - bar = bar//'>'//repeat(' ', progress_bar_width - filled_length - 1) - end if - - ! Print the progress bar and integer percentage - write (*, '(A, F4.1, A)', advance='no') carriage_return//'['//bar//'] ', percentage, '%' - call flush (0) ! Ensure output is displayed immediately - end if - end subroutine update_progress_bar - - !----------------------------------------------------------------------- - ! Recursive Subroutine: solve_24 - ! Description: - ! Recursively solves the 24 game by trying all possible operations. - ! Utilizes OpenMP tasks for parallelization. - ! Arguments: - ! nums: Array of numbers to use in the game. - ! exprs: Array of string expressions representing the numbers. - ! found: Logical flag indicating if a solution has been found. - !----------------------------------------------------------------------- - recursive subroutine solve_24(nums, exprs, found) - use omp_lib - implicit none - real, intent(in) :: nums(:) ! Input: Array of numbers - character(len=expr_len), intent(in) :: exprs(:) ! Input: Array of expressions - logical, intent(inout) :: found ! Input/Output: Flag indicating if a solution is found - integer :: n ! Size of the input arrays - integer :: i, j, op ! Loop counters - real :: a, b, result ! Temporary variables for calculations - real, allocatable :: new_nums(:) ! Temp array to store numbers after an operation - character(len=expr_len), allocatable :: new_exprs(:) ! Temp array to store expressions after an operation - character(len=expr_len) :: expr_a, expr_b, new_expr ! Temp variables for expressions - - n = size(nums) - - ! Increment the completed_calls counter and update progress bar - if (show_progress) then - !$omp atomic - completed_calls = completed_calls + 1 - call update_progress_bar() - end if - - ! If a solution is found, return - if (found) return - - ! Base case: If only one number is left, check if it is 24 - if (n == 1) then - if (abs(nums(1) - 24.0) < 1e-4) then - if (show_progress) then - write (*, '(A, F5.1, A)', advance='no') carriage_return//'['//repeat('=', progress_bar_width)//'] ', 100.0, '%' - write (*, '(A)') '' ! Insert a blank line - end if - !$omp critical - write (*, '(A, A, A, F10.7, A)') 'Solution found:', trim(exprs(1)), '= 24 (', nums(1), ')' - found = .true. - !$omp end critical - end if - return - end if - - ! Iterate over all pairs of numbers - do i = 1, n - 1 - do j = i + 1, n - a = nums(i) - b = nums(j) - expr_a = exprs(i) - expr_b = exprs(j) - - ! Iterate over all operators - do op = 1, 4 - ! Avoid division by zero - if ((op == 4 .and. abs(b) < 1e-6)) cycle - - ! Perform the operation and create the new expression - select case (op) - case (1) - result = a + b - new_expr = '('//trim(expr_a)//'+'//trim(expr_b)//')' - case (2) - result = a - b - new_expr = '('//trim(expr_a)//'-'//trim(expr_b)//')' - case (3) - result = a * b - new_expr = '('//trim(expr_a)//'*'//trim(expr_b)//')' - case (4) - result = a / b - new_expr = '('//trim(expr_a)//'/'//trim(expr_b)//')' - end select - - ! Create new arrays with the selected numbers removed - call create_new_arrays(nums, exprs, i, j, result, new_expr, new_nums, new_exprs) - - ! For the first few recursion levels, create parallel tasks - if (n >= 6 .and. omp_get_level() < 2) then - !$omp task shared(found) firstprivate(new_nums, new_exprs) - call solve_24(new_nums, new_exprs, found) - !$omp end task - else - call solve_24(new_nums, new_exprs, found) - end if - - ! If a solution is found, deallocate memory and return - if (found) then - deallocate (new_nums) - deallocate (new_exprs) - return - end if - - ! Handle commutative operations only once - if (op == 1 .or. op == 3) cycle - - ! Swap operands for subtraction and division - if (op == 2 .or. op == 4) then - if (op == 4 .and. abs(a) < 1e-6) cycle ! Avoid division by zero - - select case (op) - case (2) - result = b - a - new_expr = '('//trim(expr_b)//'-'//trim(expr_a)//')' - case (4) - result = b / a - new_expr = '('//trim(expr_b)//'/'//trim(expr_a)//')' - end select - - ! Create new arrays with the selected numbers removed - call create_new_arrays(nums, exprs, i, j, result, new_expr, new_nums, new_exprs) - - ! For the first few recursion levels, create parallel tasks - if (n >= 6 .and. omp_get_level() < 2) then - !$omp task shared(found) firstprivate(new_nums, new_exprs) - call solve_24(new_nums, new_exprs, found) - !$omp end task - else - ! Recursively call the solve_24 function with the new arrays - call solve_24(new_nums, new_exprs, found) - end if - - ! If a solution is found, deallocate memory and return - if (found) then - deallocate (new_nums) - deallocate (new_exprs) - return - end if - end if - - end do ! End of operator loop - end do ! End of j loop - end do ! End of i loop - end subroutine solve_24 - -end module game24_module - -program game24 - use game24_module - implicit none - - ! Declare variables - integer :: maxn ! Number of numbers to be entered by the user - real, allocatable :: numbers(:) ! Array to store the numbers entered by the user - character(len=expr_len), allocatable :: expressions(:) ! Array to store the expressions - integer :: i, ios ! Loop counter and I/O status - logical :: found_solution ! Flag to indicate if a solution was found - character(len=10) :: user_input ! Variable to store user input - character(len=1) :: play_again ! Variable to store the user's decision - - do ! Game loop to allow restarting the game - - ! Prompt the user for the number of numbers to use in the game - do - write (*, '(A,I0,A)', advance='no') 'Enter the number of numbers (1 to ', max_limit, '): ' - read (*, *, iostat=ios) maxn - - ! Check if the input is valid - if (ios /= 0) then - write (*, '(A,I0,A)') 'Invalid input. Please enter an integer between 1 and ', max_limit, '.' - cycle - end if - - ! Validate the input: Ensure the number of numbers is within the valid range - if (maxn < 1 .or. maxn > max_limit) then - write (*, '(A,I0,A)') 'Error: Number of numbers must be between 1 and ', max_limit, '. Try again.' - cycle - end if - - exit ! Exit loop if the input is valid - end do - - ! Allocate memory for the arrays based on the number of numbers - allocate (numbers(maxn)) - allocate (expressions(maxn)) - - ! Prompt the user to enter the numbers or card values - write (*, '(A,I0,A)') 'Enter ', maxn, ' numbers or card values (A=1, J=11, Q=12, K=13).' - do i = 1, maxn - do - ! Prompt the user to enter a number or card value - write (*, '(A,I0,A)', advance='no') 'Enter value for card ', i, ': ' - read (*, '(A)', iostat=ios) user_input - - ! Check if input is an integer or valid card symbol (A, J, Q, K) - call convert_to_number(user_input, numbers(i), ios) - - ! If the input is valid, exit loop - if (ios == 0) exit - - ! Invalid input: prompt the user to try again - write (*, '(A)') 'Invalid input. Please enter an integer or valid card symbol (A, J, Q, K).' - end do - - ! Convert the number to a string expression and remove trailing zeros - write (expressions(i), '(F0.2)') numbers(i) - call remove_decimal_zeros(expressions(i), expressions(i)) - end do - - ! Initialize the solution flag to false - found_solution = .false. - - ! Assign precomputed total_calls based on n - select case (maxn) - case (6) - total_calls = total_calls_n6 - case (7) - total_calls = total_calls_n7 - case (8) - total_calls = total_calls_n8 - case default - total_calls = 0 - end select - - ! Decide whether to show progress bar based on n - if (maxn >= 6) then - show_progress = .true. - completed_calls = 0 - last_percentage = -1 - - ! Initialize progress bar display - write (*, '(A)', advance='no') '['//repeat(' ', progress_bar_width)//'] 0%' - call flush (0) ! Ensure the output is displayed immediately - else - show_progress = .false. - end if - - ! Start parallel region - !$omp parallel - !$omp single nowait - call solve_24(numbers, expressions, found_solution) - !$omp end single - !$omp end parallel - - ! After search completes, ensure the progress bar reaches 100% if shown - if (show_progress .and. .not. found_solution) then - write (*, '(A, A)', advance='no') carriage_return//'['//repeat('=', progress_bar_width)//'] 100% ' - call flush (0) - write (*, '(A)') '' ! Insert a blank line - end if - - ! If a solution was found and progress bar is shown, ensure a blank line - if (show_progress .and. found_solution) then - ! Progress bar already refreshed to 100% and blank line inserted in solve_24 - end if - - ! If no solution was found, print a message - if (.not. found_solution) then - write (*, '(A)') 'No valid solution found.' - end if - - ! Deallocate the memory used by the arrays - deallocate (numbers) - deallocate (expressions) - - ! Ask the user if they want to play again - if (show_progress) then - write (*, '(A)', advance='no') carriage_return//'Play again? (Enter y/n to continue or any other key to exit): ' - else - write (*, '(A)', advance='no') 'Play again? (Enter y/n to continue or any other key to exit): ' - end if - read (*, '(A)') play_again ! Read user input - - ! Check if the user wants to exit - if (play_again /= 'y' .and. play_again /= 'Y') exit - - end do ! End of game loop - - write (*, '(A)') 'Exiting the game...' - -end program game24 diff --git a/Task/24-game-Solve/FreeBASIC/24-game-solve.basic b/Task/24-game-Solve/FreeBASIC/24-game-solve.basic deleted file mode 100644 index 4593f64cb2..0000000000 --- a/Task/24-game-Solve/FreeBASIC/24-game-solve.basic +++ /dev/null @@ -1,124 +0,0 @@ -Type GameState - digitos(3) As Double - operaciones(2) As String -End Type - -Function randomDigits() As String - Dim As String resultado = "" - For i As Integer = 0 To 3 - resultado &= Str(Int(Rnd * 9) + 1) - Next - Return resultado -End Function - -Function evaluate(digitos() As Double, operaciones() As String) As Double - Dim As Double valor = digitos(0) - - For i As Integer = 0 To 2 - Select Case operaciones(i) - Case "+": valor += digitos(i +1) - Case "-": valor -= digitos(i +1) - Case "*": valor *= digitos(i +1) - Case "/": If digitos(i +1) <> 0 Then valor /= digitos(i +1) - End Select - Next - - Return valor -End Function - -Sub permute(digitos() As Double, soluciones() As GameState, Byref solutionCnt As Integer, k As Integer) - Dim As String*1 opChars(3) = {"+", "-", "*", "/"} - Dim As String ops(2) - Dim As Integer i, j, l, m - - If k = 4 Then - For i = 0 To 3 - ops(0) = opChars(i) - For j = 0 To 3 - ops(1) = opChars(j) - For l = 0 To 3 - ops(2) = opChars(l) - If Abs(evaluate(digitos(), ops()) - 24) < 0.001 Then - With soluciones(solutionCnt) - For m = 0 To 3: .digitos(m) = digitos(m): Next - For m = 0 To 2: .operaciones(m) = ops(m): Next - End With - solutionCnt += 1 - Exit For 'Stop after first solution - End If - Next - If solutionCnt Then Exit For - Next - If solutionCnt Then Exit For - Next - Else - For i = k To 3 - Swap digitos(i), digitos(k) - permute(digitos(), soluciones(), solutionCnt, k +1) - If solutionCnt Then Exit For - Swap digitos(k), digitos(i) - Next - End If -End Sub - -' Main program -Randomize Timer -Dim As Integer i -Dim As String cmd -Dim As Double digitos(3) -Dim As String operaciones(2) - -Do - Cls - Print "24 Game" - Print "Generating 4 digitos..." - - Dim As String inputDigits = randomDigits() - Print "Make 24 using these digitos: "; - For i = 1 To Len(inputDigits) - Print Mid(inputDigits, i, 1); " "; - Next - Print - - Line Input "Enter your expression (e.g. 4+5*3-2): ", cmd - - Dim As Integer digitCnt = 0, opCnt = 0 - ' Parse user input - For i = 1 To Len(cmd) - Select Case Mid(cmd, i, 1) - Case "1" To "9" - digitos(digitCnt) = Val(Mid(cmd, i, 1)) - digitCnt += 1 - Case "+", "-", "*", "/" - operaciones(opCnt) = Mid(cmd, i, 1) - opCnt += 1 - End Select - Next - - Dim As Double resultado = evaluate(digitos(), operaciones()) - Print "Your resultado: "; resultado - - If Abs(resultado - 24) < 0.001 Then - Print !"\nCongratulations, you found a solution!" - Else - Print !"\nThe valor of your expression is "; resultado; " instead of 24!" - - Dim As GameState soluciones(1000) - Dim As Integer solucCnt = 0 - - permute(digitos(), soluciones(), solucCnt, 0) - - If solucCnt > 0 Then - Print !"\nA possible solution could have been: "; - With soluciones(0) - Print .digitos(0) & .operaciones(0) & .digitos(1) & .operaciones(1) & .digitos(2) & .operaciones(2) & .digitos(3) - End With - Else - Print !"\nThere was no known solution for these digitos." - End If - End If - - Print !"\nDo you want to try again? (press N for exit, other key to continue)" -Loop Until (Ucase(Input(1)) = "N") - -Sleep diff --git a/Task/24-game-Solve/FutureBasic/24-game-solve.basic b/Task/24-game-Solve/FutureBasic/24-game-solve.basic index 4f6e1c9984..5a2f9b5cf2 100644 --- a/Task/24-game-Solve/FutureBasic/24-game-solve.basic +++ b/Task/24-game-Solve/FutureBasic/24-game-solve.basic @@ -15,6 +15,7 @@ void local fn eval( t as CFStringRef ) end if end fn + clear local fn work( t as CFStringRef ) Short a, b, c, d, e, f, g CGFloat n(3) @@ -43,6 +44,7 @@ clear local fn work( t as CFStringRef ) next : next : next : next end fn + window 1, @"24 Game", ( 0, 0, 250, 250 ) fn work(@"3388") fn work(@"1346") diff --git a/Task/24-game-Solve/Julia/24-game-solve.jl b/Task/24-game-Solve/Julia/24-game-solve.julia similarity index 100% rename from Task/24-game-Solve/Julia/24-game-solve.jl rename to Task/24-game-Solve/Julia/24-game-solve.julia diff --git a/Task/24-game-Solve/Kotlin/24-game-solve.kts b/Task/24-game-Solve/Kotlin/24-game-solve.kotlin similarity index 100% rename from Task/24-game-Solve/Kotlin/24-game-solve.kts rename to Task/24-game-Solve/Kotlin/24-game-solve.kotlin diff --git a/Task/24-game-Solve/OCaml/24-game-solve.ml b/Task/24-game-Solve/OCaml/24-game-solve.ocaml similarity index 100% rename from Task/24-game-Solve/OCaml/24-game-solve.ml rename to Task/24-game-Solve/OCaml/24-game-solve.ocaml diff --git a/Task/24-game-Solve/Rust/24-game-solve.rs b/Task/24-game-Solve/Rust/24-game-solve.rust similarity index 100% rename from Task/24-game-Solve/Rust/24-game-solve.rs rename to Task/24-game-Solve/Rust/24-game-solve.rust diff --git a/Task/24-game-Solve/Scheme/24-game-solve-1.scm b/Task/24-game-Solve/Scheme/24-game-solve-1.ss similarity index 100% rename from Task/24-game-Solve/Scheme/24-game-solve-1.scm rename to Task/24-game-Solve/Scheme/24-game-solve-1.ss diff --git a/Task/24-game-Solve/Scheme/24-game-solve-2.scm b/Task/24-game-Solve/Scheme/24-game-solve-2.ss similarity index 100% rename from Task/24-game-Solve/Scheme/24-game-solve-2.scm rename to Task/24-game-Solve/Scheme/24-game-solve-2.ss diff --git a/Task/24-game-Solve/Zig/24-game-solve.zig b/Task/24-game-Solve/Zig/24-game-solve.zig deleted file mode 100644 index 1837c9404d..0000000000 --- a/Task/24-game-Solve/Zig/24-game-solve.zig +++ /dev/null @@ -1,273 +0,0 @@ -const std = @import("std"); -const print = std.debug.print; -const ArrayList = std.ArrayList; -const HashMap = std.HashMap; -const Allocator = std.mem.Allocator; - -const Operator = enum { - sub, - plus, - mul, - div, -}; - -const Factor = struct { - content: []const u8, - value: i32, - - fn deinit(self: Factor, allocator: Allocator) void { - allocator.free(self.content); - } -}; - -fn apply(allocator: Allocator, op: Operator, left: []const Factor, right: []const Factor) !ArrayList(Factor) { - var ret = ArrayList(Factor).init(allocator); - - for (left) |l| { - for (right) |r| { - switch (op) { - .sub => { - if (l.value > r.value) { - const content = try std.fmt.allocPrint(allocator, "({s} - {s})", .{ l.content, r.content }); - try ret.append(Factor{ - .content = content, - .value = l.value - r.value, - }); - } - }, - .plus => { - const content = try std.fmt.allocPrint(allocator, "({s} + {s})", .{ l.content, r.content }); - try ret.append(Factor{ - .content = content, - .value = l.value + r.value, - }); - }, - .mul => { - const content = try std.fmt.allocPrint(allocator, "({s} x {s})", .{ l.content, r.content }); - try ret.append(Factor{ - .content = content, - .value = l.value * r.value, - }); - }, - .div => { - if (l.value >= r.value and r.value > 0 and @rem(l.value, r.value) == 0) { - const content = try std.fmt.allocPrint(allocator, "({s} / {s})", .{ l.content, r.content }); - try ret.append(Factor{ - .content = content, - .value = @divTrunc(l.value, r.value), - }); - } - }, - } - } - } - - return ret; -} - -fn calc(allocator: Allocator, ops: [3]Operator, numbers: [4]i32) !ArrayList(Factor) { - var current_factors = ArrayList(Factor).init(allocator); - defer { - for (current_factors.items) |factor| { - factor.deinit(allocator); - } - current_factors.deinit(); - } - - // Initialize with first number - const initial_content = try std.fmt.allocPrint(allocator, "{}", .{numbers[0]}); - try current_factors.append(Factor{ - .content = initial_content, - .value = numbers[0], - }); - - // Process each operation - for (ops, 0..) |op, i| { - var next_factors = ArrayList(Factor).init(allocator); - defer { - for (next_factors.items) |factor| { - factor.deinit(allocator); - } - next_factors.deinit(); - } - - const mono_content = try std.fmt.allocPrint(allocator, "{}", .{numbers[i + 1]}); - defer allocator.free(mono_content); - const mono_factor = Factor{ - .content = mono_content, - .value = numbers[i + 1], - }; - const mono_slice = &[_]Factor{mono_factor}; - - switch (op) { - .mul, .plus => { - var applied = try apply(allocator, op, current_factors.items, mono_slice); - defer applied.deinit(); - try next_factors.appendSlice(applied.items); - }, - .div, .sub => { - var applied1 = try apply(allocator, op, current_factors.items, mono_slice); - defer applied1.deinit(); - try next_factors.appendSlice(applied1.items); - - var applied2 = try apply(allocator, op, mono_slice, current_factors.items); - defer applied2.deinit(); - try next_factors.appendSlice(applied2.items); - }, - } - - // Clear current factors and move next_factors to current_factors - for (current_factors.items) |factor| { - factor.deinit(allocator); - } - current_factors.clearRetainingCapacity(); - - // Move ownership from next_factors to current_factors - try current_factors.appendSlice(next_factors.items); - next_factors.clearRetainingCapacity(); // Don't deinit the items, we moved them - } - - // Create result and transfer ownership - var result = ArrayList(Factor).init(allocator); - try result.appendSlice(current_factors.items); - current_factors.clearRetainingCapacity(); // Don't deinit, we transferred ownership - - return result; -} - -const OpIter = struct { - index: usize, - - const OPTIONS = [_]Operator{ .mul, .sub, .plus, .div }; - - fn init() OpIter { - return OpIter{ .index = 0 }; - } - - fn next(self: *OpIter) ?[3]Operator { - if (self.index >= 64) { - return null; - } - - const f1 = OPTIONS[(self.index & (3 << 4)) >> 4]; - const f2 = OPTIONS[(self.index & (3 << 2)) >> 2]; - const f3 = OPTIONS[(self.index & (3 << 0)) >> 0]; - - self.index += 1; - return [3]Operator{ f1, f2, f3 }; - } -}; - -fn orders() [24][4]usize { - return [24][4]usize{ - [4]usize{ 0, 1, 2, 3 }, - [4]usize{ 0, 1, 3, 2 }, - [4]usize{ 0, 2, 1, 3 }, - [4]usize{ 0, 2, 3, 1 }, - [4]usize{ 0, 3, 1, 2 }, - [4]usize{ 0, 3, 2, 1 }, - [4]usize{ 1, 0, 2, 3 }, - [4]usize{ 1, 0, 3, 2 }, - [4]usize{ 1, 2, 0, 3 }, - [4]usize{ 1, 2, 3, 0 }, - [4]usize{ 1, 3, 0, 2 }, - [4]usize{ 1, 3, 2, 0 }, - [4]usize{ 2, 0, 1, 3 }, - [4]usize{ 2, 0, 3, 1 }, - [4]usize{ 2, 1, 0, 3 }, - [4]usize{ 2, 1, 3, 0 }, - [4]usize{ 2, 3, 0, 1 }, - [4]usize{ 2, 3, 1, 0 }, - [4]usize{ 3, 0, 1, 2 }, - [4]usize{ 3, 0, 2, 1 }, - [4]usize{ 3, 1, 0, 2 }, - [4]usize{ 3, 1, 2, 0 }, - [4]usize{ 3, 2, 0, 1 }, - [4]usize{ 3, 2, 1, 0 }, - }; -} - -fn applyOrder(numbers: [4]i32, order: [4]usize) [4]i32 { - return [4]i32{ numbers[order[0]], numbers[order[1]], numbers[order[2]], numbers[order[3]] }; -} - -fn solutions(allocator: Allocator, numbers: [4]i32) !ArrayList(Factor) { - var ret = ArrayList(Factor).init(allocator); - var hash_set = HashMap([]const u8, void, std.hash_map.StringContext, std.hash_map.default_max_load_percentage).init(allocator); - defer { - // Free all keys in the hash map - var iterator = hash_set.iterator(); - while (iterator.next()) |entry| { - allocator.free(entry.key_ptr.*); - } - hash_set.deinit(); - } - - var op_iter = OpIter.init(); - while (op_iter.next()) |ops| { - const all_orders = orders(); - for (all_orders) |order| { - const reordered_numbers = applyOrder(numbers, order); - var results = calc(allocator, ops, reordered_numbers) catch continue; - defer { - for (results.items) |factor| { - factor.deinit(allocator); - } - results.deinit(); - } - - for (results.items) |factor| { - if (factor.value == 24) { - // Check if we've seen this content before - if (hash_set.contains(factor.content)) { - continue; - } - - // Add to hash set with a duplicated key - const key_copy = try allocator.dupe(u8, factor.content); - try hash_set.put(key_copy, {}); - - // Add to results with a duplicated content - try ret.append(Factor{ - .content = try allocator.dupe(u8, factor.content), - .value = factor.value, - }); - } - } - } - } - - return ret; -} - -pub fn main() !void { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - defer _ = gpa.deinit(); - const allocator = gpa.allocator(); - - // Hard-coded input: 5598 - const nums = [4]i32{ 5, 5, 9, 8 }; - - var sols = solutions(allocator, nums) catch { - print("Error computing solutions\n", .{}); - return; - }; - defer { - for (sols.items) |factor| { - factor.deinit(allocator); - } - sols.deinit(); - } - - const len = sols.items.len; - if (len == 0) { - print("no solution for {}, {}, {}, {}\n", .{ nums[0], nums[1], nums[2], nums[3] }); - return; - } - - print("solutions for {}, {}, {}, {}\n", .{ nums[0], nums[1], nums[2], nums[3] }); - for (sols.items) |s| { - print("{s}\n", .{s.content}); - } - print("{} solutions found\n", .{len}); -} diff --git a/Task/24-game/ALGOL-68/24-game.alg b/Task/24-game/ALGOL-68/24-game.alg index b74144035a..3ba4ed6a03 100644 --- a/Task/24-game/ALGOL-68/24-game.alg +++ b/Task/24-game/ALGOL-68/24-game.alg @@ -40,7 +40,7 @@ BEGIN # play the 24 game - present the user with 4 digits and invite them to # error( "Unexpected """ + curr ch + """" ); 0 FI # factor # ; - PROC expr term = REAL: + PROC term = REAL: BEGIN REAL result := factor; WHILE curr ch = "*" OR curr ch = "/" DO @@ -49,14 +49,14 @@ BEGIN # play the 24 game - present the user with 4 digits and invite them to # IF op = "*" THEN result *:= factor ELSE result /:= factor FI OD; result - END # expr term # ; + END # term # ; PROC expression = REAL: BEGIN - REAL result := expr term; + REAL result := term; WHILE curr ch = "+" OR curr ch = "-" DO CHAR op = curr ch; next ch; - IF op = "+" THEN result +:= expr term ELSE result -:= expr term FI + IF op = "+" THEN result +:= term ELSE result -:= term FI OD; result END # expression # ; @@ -80,7 +80,7 @@ BEGIN # play the 24 game - present the user with 4 digits and invite them to # puzzle digits[ i ] := 0 OD; print( ( "Enter an expression using these digits:" ) ); - TO 4 DO # pick 4 random digits # + FOR i TO 4 DO # pick 4 random digits # INT digit := 1 + ENTIER ( next random * 9 ); IF digit > 9 THEN digit := 9 FI; puzzle digits[ digit ] +:= 1; diff --git a/Task/24-game/Ada/24-game.adb b/Task/24-game/Ada/24-game.ada similarity index 100% rename from Task/24-game/Ada/24-game.adb rename to Task/24-game/Ada/24-game.ada diff --git a/Task/24-game/Arturo/24-game.arturo b/Task/24-game/Arturo/24-game.arturo index 0175c79a13..a44398760e 100644 --- a/Task/24-game/Arturo/24-game.arturo +++ b/Task/24-game/Arturo/24-game.arturo @@ -28,10 +28,11 @@ result: 0 while [result<>24][ got: input "Enter an expression to form 24: " blo: to :block got - switch validExpression? blo [ + if? validExpression? blo [ result: do blo print ["The result is:" result] - ][ + ] + else [ print "Invalid expression. Please try again!" ] print "" diff --git a/Task/24-game/AutoIt/24-game.au3 b/Task/24-game/AutoIt/24-game.autoit similarity index 100% rename from Task/24-game/AutoIt/24-game.au3 rename to Task/24-game/AutoIt/24-game.autoit diff --git a/Task/24-game/COBOL/24-game.cob b/Task/24-game/COBOL/24-game.cobol similarity index 100% rename from Task/24-game/COBOL/24-game.cob rename to Task/24-game/COBOL/24-game.cobol diff --git a/Task/24-game/Delphi/24-game.pas b/Task/24-game/Delphi/24-game.delphi similarity index 100% rename from Task/24-game/Delphi/24-game.pas rename to Task/24-game/Delphi/24-game.delphi diff --git a/Task/24-game/EasyLang/24-game.easy b/Task/24-game/EasyLang/24-game.easy deleted file mode 100644 index 03d699645f..0000000000 --- a/Task/24-game/EasyLang/24-game.easy +++ /dev/null @@ -1,68 +0,0 @@ -print "Enter an equation in RPN form using all of, and only " -print "the following single digits which evaluates to 24:" -func game . - len cnt[] 9 - write ">> " - for i to 4 - h = random 1 9 - write h & " " - cnt[h] += 1 - . - print "" - s$ = input - print s$ - if s$ = "" - return 1 - . - for c$ in strchars s$ - if c$ = "+" or c$ = "-" or c$ = "*" or c$ = "/" - if len st[] < 2 - print "Stack empty" - return 1 - . - if c$ = "+" - st[$ - 1] = st[$ - 1] + st[$] - elif c$ = "-" - st[$ - 1] = st[$ - 1] - st[$] - elif c$ = "*" - st[$ - 1] = st[$ - 1] * st[$] - else - st[$ - 1] = st[$ - 1] / st[$] - . - len st[] -1 - elif c$ <> " " - h = strcode c$ - 48 - if h < 1 or h > 9 - print "Wrong command " & c$ - return 0 - . - if cnt[h] = 0 - print "Wrong number " & h - return 0 - . - cnt[h] -= 1 - st[] &= h - . - . - for c in cnt[] - s += c - . - if s > 0 - print "Not all numbers used" - return 0 - . - if len st[] > 1 - print "Calculation not finished" - return 0 - . - print st[1] - if abs (st[1] - 24) < 1e-10 - print "Well done" - else - print "Wrong result" - . -. -repeat - print "" - until game = 1 -. diff --git a/Task/24-game/Elena/24-game.elena b/Task/24-game/Elena/24-game.elena index 2a65ccecd2..d4170cfc82 100644 --- a/Task/24-game/Elena/24-game.elena +++ b/Task/24-game/Elena/24-game.elena @@ -18,13 +18,13 @@ class ExpressionTree var node := new DynamicStruct(); ch => - $43 : { node.Level := level + 1; node.Operation := mssg add } // + - $45 : { node.Level := level + 1; node.Operation := mssg subtract } // - - $42 : { node.Level := level + 2; node.Operation := mssg multiply } // * - $47 : { node.Level := level + 2; node.Operation := mssg divide } // / - $40 : { level.append(10); ^ self } // ( - $41 : { level.reduce(10); ^ self } // ) - ! : { + $43 { node.Level := level + 1; node.Operation := mssg add } // + + $45 { node.Level := level + 1; node.Operation := mssg subtract } // - + $42 { node.Level := level + 2; node.Operation := mssg multiply } // * + $47 { node.Level := level + 2; node.Operation := mssg divide } // / + $40 { level.append(10); ^ self } // ( + $41 { level.reduce(10); ^ self } // ) + ! { node.Leaf := ch.toString().toReal(); node.Level := level + 3 }; @@ -112,16 +112,16 @@ class TwentyFourGame { theNumbers := new object[] { - 1 + Random.nextInt(9), - 1 + Random.nextInt(9), - 1 + Random.nextInt(9), - 1 + Random.nextInt(9) + 1 + randomGenerator.nextInt(9), + 1 + randomGenerator.nextInt(9), + 1 + randomGenerator.nextInt(9), + 1 + randomGenerator.nextInt(9) } } help() { - Console + console .printLine("------------------------------- Instructions ------------------------------") .printLine("Four digits will be displayed.") .printLine("Enter an equation using all of those four digits that evaluates to 24") @@ -137,9 +137,9 @@ class TwentyFourGame prompt() { - theNumbers.forEach::(n){ Console.print(n," ") }; + theNumbers.forEach::(n){ console.print(n," ") }; - Console.print(": ") + console.print(": ") } resolve(expr) @@ -149,19 +149,19 @@ class TwentyFourGame var leaves := new ArrayList(); tree.readLeaves(leaves); - if:not (leaves.ascendant().sequenceEqual(theNumbers.ascendant())) - { Console.printLine("Invalid input. Enter an equation using all of those four digits. Try again."); ^ self }; + ifnot (leaves.ascendant().sequenceEqual(theNumbers.ascendant())) + { console.printLine("Invalid input. Enter an equation using all of those four digits. Try again."); ^ self }; var result := tree.Value; if (result == 24) { - Console.printLine("Good work. ",expr,"=",result); + console.printLine("Good work. ",expr,"=",result); self.newPuzzle() } else { - Console.printLine("Incorrect. ",expr,"=",result) + console.printLine("Incorrect. ",expr,"=",result) } } } @@ -178,7 +178,7 @@ extension gameOp { if (expr == "") { - Console.printLine("Skipping this puzzle"); self.newPuzzle() + console.printLine("Skipping this puzzle"); self.newPuzzle() } else { @@ -188,7 +188,8 @@ extension gameOp } catch(Exception e) { - Console.printLine("An error occurred. Check your input and try again.") + console.printLine(e) + //console.printLine:"An error occurred. Check your input and try again." } }; @@ -197,11 +198,11 @@ extension gameOp } } -// --- Program --- +// --- program --- -public Program() +public program() { var game := new TwentyFourGame().help(); - while (game.prompt().playRound(Console.readLine())) {} + while (game.prompt().playRound(console.readLine())) {} } diff --git a/Task/24-game/Elixir/24-game.ex b/Task/24-game/Elixir/24-game.elixir similarity index 100% rename from Task/24-game/Elixir/24-game.ex rename to Task/24-game/Elixir/24-game.elixir diff --git a/Task/24-game/Frink/24-game.frink b/Task/24-game/Frink/24-game.frink deleted file mode 100644 index a7a123bc86..0000000000 --- a/Task/24-game/Frink/24-game.frink +++ /dev/null @@ -1,15 +0,0 @@ -ops = ["+", "-", "*", "/"] - -chosen = new array[[4], {|x| random[1,9]}] -println[chosen] - -for d = chosen.lexicographicPermute[] - multifor o = [ops, ops, ops] - { - str = "((" + d@0 + o@0 + d@1 + ")" + o@1 + d@2 + ")" + o@2 + d@3 - if eval[str] == 24 - println[str] - str = "(" + d@0 + o@0 + d@1 + ")" + o@1 + "(" + d@2 + + o@2 + d@3 + ")" - if eval[str] == 24 - println[str] - } diff --git a/Task/24-game/FutureBasic/24-game.basic b/Task/24-game/FutureBasic/24-game.basic deleted file mode 100644 index e3cb41f183..0000000000 --- a/Task/24-game/FutureBasic/24-game.basic +++ /dev/null @@ -1,310 +0,0 @@ -//include resources "24 Game Icon.icns" - -#build CompilerOptions @"-Wno-unused-variable" - -_mEdit = 2 -editmenu _mEdit - -begin globals -long gPosition -end globals - -void local fn EraseErrorText - - CGRect r - r = fn CGRectMake(10, 200, 400, 15) - rect fill r,fn ColorBlack - -end fn - -local fn ArcRandom( a as long, b as long ) as long - long i - cln i = (arc4random()%(b-a+1))+a; -end fn = fn floor(i) - -local fn GetRandomNumbers as CFStringRef - - // 96 number groups - - CFArrayRef combos = @[¬ - - // The first 32 are easy - @"1 2 3 4", @"2 4 6 8", @"1 2 4 8", @"1 3 4 6", @"1 2 6 8", - @"2 3 4 8", @"1 3 6 9", @"1 2 7 8", @"2 3 6 8", @"1 4 6 8", - @"2 2 3 9", @"3 4 6 6", @"2 3 3 8", @"1 5 6 6", @"2 4 4 6", - @"1 3 8 8", @"2 2 6 9", @"3 3 6 9", @"1 2 5 9", @"2 4 5 5", - @"1 3 5 9", @"2 2 4 9", @"1 2 3 6", @"1 2 2 9", @"1 2 3 9", - @"1 2 4 6", @"1 2 4 4", @"1 2 2 6", @"1 3 3 6", @"1 1 4 6", - @"1 1 2 8", @"1 1 3 8", - // The middle 32 are medium - @"1 5 5 9", @"4 4 6 9", @"2 3 7 9",@"3 5 8 8", @"1 6 6 8", - @"3 3 5 6", @"1 4 5 8", @"3 3 6 7",@"2 5 5 8", @"4 4 7 9", - @"1 5 6 9", @"3 3 8 9", @"2 6 6 7",@"4 5 7 8", @"2 2 5 9", - @"2 4 6 7", @"1 5 6 8", @"3 4 7 7",@"2 5 6 6", @"3 4 5 9", - @"1 6 7 9", @"2 3 7 8", @"1 4 6 9",@"2 3 5 9", @"3 4 4 8", - @"2 5 8 9", @"1 4 8 9", @"3 3 4 9",@"2 6 7 9", @"1 3 5 7", - @"1 3 6 6", @"2 2 5 7", - // The last 32 are hard - @"1 5 7 9",@"3 4 7 9", @"2 5 7 8", @"3 4 8 9", @"3 4 5 8", - @"2 6 6 9",@"4 4 5 7", @"2 4 6 9", @"1 4 7 7", @"2 3 8 9", - @"2 3 4 7",@"3 3 4 8", @"1 3 7 9", @"2 4 5 9", @"1 3 6 8", - @"2 4 4 9",@"1 5 8 9", @"3 3 5 9", @"2 6 8 9", @"1 4 4 7", - @"2 3 6 7",@"1 3 5 8", @"2 4 7 8", @"1 3 4 7", @"2 3 5 6", - @"1 4 5 6",@"3 3 5 7", @"2 2 3 6", @"3 3 7 7", @"3 3 7 9", - @"4 4 8 9",@"2 4 8 9"] - - long i = fn ArcRandom( 0, len(combos) - 1 ) - gPosition = i - -end fn = combos[i] - - -local fn EvaluateMath( equation as CFStringRef ) as CFStringRef - equation = fn StringByReplacingOccurrencesOfString( lcase(equation), @"x", @"*" ) - - CFStringRef result = NULL - RegularExpressionRef regex = fn RegularExpressionWithPattern( @"[0-9.]+", NSRegularExpressionCaseInsensitive, NULL ) - CFArrayRef matches = fn RegularExpressionMatches( regex, equation, 0, fn CFRangeMake( 0, len(equation) ) ) - NSInteger intConversions = 0 - TextCheckingResultRef match - CFRange originalRange - CFRange adjustedRange - CFStringRef value - - for match in matches - originalRange = fn TextCheckingResultRange( match ) - adjustedRange = fn CFRangeMake( ( originalRange.location + ( intConversions * len( @".0") ) ), originalRange.length ) - value = fn StringSubstringWithRange( equation, adjustedRange ) - if fn StringContainsString( value, @"." ) - continue - else - equation = fn StringByReplacingCharactersInRange( equation, adjustedRange, fn StringWithFormat( @"%@.0", value ) ) - intConversions++ - end if - next - ExceptionRef e - try - ExpressionRef expression = fn ExpressionWithFormat( equation ) - CFNumberRef number = fn ExpressionValueWithObject( expression, NULL, NULL ) - result = fn StringWithFormat( @"%.3f", dblval( number ) ) - end try - - catch (e) - result = fn StringWithFormat( @"%@", e ) : exit fn - end catch - // Test if result is an integer and, if so, return result as an integer - if( fn StringDoubleValue( result ) == fn floorf( fn StringDoubleValue( result ) ) ) - result = fn ArrayFirstObject( fn StringComponentsSeparatedByString( result, @"." ) ) - end if -end fn = result - - -local fn QuitOrPlayAlert(GameResult as CFStringRef) - alert -2,,GameResult,@"You won!",@"Quit;Play Again" - AlertButtonSetKeyEquivalent( 2, 2, @"\e" ) - short result - result = alert 2 - if ( result != NSAlertSecondButtonReturn ) then appterminate -end fn - - -local fn BuildWindow - CGRect r = fn CGRectMake( 0, 0, 580, 250) - window 1, @"24 Game", r - windowcenter(1) - WindowSetBackgroundColor(1,fn ColorBlack) - -end fn - -///////// Start ////////// - -fn BuildWindow - - -short d(4), i -CFStringRef CheckForDuplicates(97) -for i = 1 to 96 - CheckForDuplicates(i) = @"" -next i - -short DuplicatesCounter -DuplicatesCounter = 0 - - -"Main" - -cls -text ,,fn colorWhite - -print -print %(10,15),"Given four numbers and using just the +, -, *, and / operators; and the" -print %(10,30),"possible use of parenthesis (), enter an expression that equates to 24." -print %(10,45),"You must use all your numbers and only those numbers." -print %(10,60),"Examples: 9618 Solution 9 + 6 + 1 + 8 or 3173 Solution (3 * 7) - (1 - 4)" -print -print %(10,85),"Enter Q to quit or S to skip to the next number." - -"GetFourNumbers" - -CFArrayRef randomNumbers : randomNumbers= fn StringComponentsSeparatedByString( fn GetRandomNumbers, @" " ) -CFStringRef RandomNumberblock : RandomNumberblock = @"" -CFStringRef RandomNumberblockAdd : RandomNumberblockAdd = @"" - -for i = 0 to 3 - // create a string from the 4 numbers - RandomNumberblockAdd = randomNumbers[i] - RandomNumberblock = fn StringByAppendingString(RandomNumberblock,RandomNumberblockAdd) - RandomNumberblock = fn StringByAppendingString(RandomNumberblock,@" ") -next i - - -if DuplicatesCounter = > 96 - // reset counter when last number is retrieved and start from the first number block - DuplicatesCounter = 0 - for i = 1 to 96 - CheckForDuplicates(i) = @"" - next i -end if - -for i = 1 to 96 - // check the current numbers with the numbers already used - if fn StringIsEqual(RandomNumberblock,CheckForDuplicates(i)) - RandomNumberblock = fn StringWithString(CheckForDuplicates(DuplicatesCounter)) - goto "GetFourNumbers" - end if -next i - -DuplicatesCounter ++ -CheckForDuplicates(DuplicatesCounter) = fn StringWithString(RandomNumberblock) - -d(1) = fn StringIntegerValue( randomNumbers[0] ) -d(2) = fn StringIntegerValue( randomNumbers[1] ) -d(3) = fn StringIntegerValue( randomNumbers[2] ) -d(4) = fn StringIntegerValue( randomNumbers[3] ) - -short dots = 0 - -//d(1) = 9:d(2) = 6:d(3) = 1:d(4) = 8 // Uncomment to test with 9618 numbers. Solution 9 + 6 + 1 + 8 -//d(1) = 6:d(2) = 5:d(3) = 3:d(4) = 8 // Uncomment to test with 6538 numbers. Solution 6 / ( 5 - 3 ) * 8 -//d(1) = 3:d(2) = 1:d(3) = 7:d(4) = 3 // Uncomment to test with 3773 numbers. Solution ((3 * 1) * 7) + 3 -//d(1) = 4:d(2) = 2:d(3) = 7:d(4) = 1 // Uncomment to test with 4271 numbers. Solution (4 * ( 7 - 2 + 1 ) -// NOTE: When using these test numbers, also uncomment dots = 0 below here to prevent misleading dot displays - - -if gPosition <= 32 then dots = 1 -if gPosition > 32 and gPosition < 65 then dots = 2 -if gPosition > 64 then dots = 3 - -//dots = 0 uncomment when testing the numbers above to prevent misleading dot displays - -print -text ,,fn colorGreen -print %(15,110),"These are your numbers, difficulty level "; -// @"\U000026AA" is white unicode dot - Easy difficulty (One-Dot) -// @"\U0001F534" is red unicode dot - Medium difficulty (Two-Dots) -// @"\U0001F7E1" is yellow unicode dot - Hard difficulty (Three-Dots) - -if dots = 1 then print @"\U000026AA Easy" -if dots = 2 then print @"\U0001F534 \U0001F534 Medium" -if dots = 3 then print @"\U0001F7E1 \U0001F7E1 \U0001F7E1 Hard" - -print %(55,125) -text ,18,fn colorGreen -for i = 1 to 4 - print d(i); " "; -next - -print - -text ,12,fn colorWhite -printf @"\n\n\n" - -CFStringRef expr -bool TryAgain : TryAgain = _false -CFStringRef MessageText -CFStringRef UserInput = NULL - -"InputExpression" - -if TryAgain - MessageText = fn StringWithFormat( @"Enter math expression: [ '%@' was incorrect ]", expr ) - UserInput = input %(10, 190), MessageText, @"123456789+-*/()qs", YES,, 0 -else - UserInput = input %(10, 190), @"Enter math expression:", @"123456789+-*/()qs", YES,, 0 -end if - -if ( UserInput == NULL ) then "InputExpression" -expr = UserInput -if expr = @"" then "InputExpression" -if fn StringIsEqual(ucase(expr) , @"Q") then appterminate -if fn StringIsEqual(ucase(expr) , @"S") then "Main" - - -//check expr for validity - -short j -bool GotAllNumbers : GotAllNumbers = _false -short ThisNumberPosition : ThisNumberPosition = 0 -short GotaNumber : GotaNumber = 0 -short TotalNumbers : TotalNumbers = 0 - -short ExtraNumbers:ExtraNumbers = 0 - -for i = 1 to len$(fn stringpascalstring(expr)) - if asc(mid$(fn stringpascalstring(expr),i,1)) > 48 && asc(mid$(fn stringpascalstring(expr),i,1)) < 58 - ExtraNumbers ++ - end if -next i - -if ExtraNumbers > 4 - fn EraseErrorText - text ,,fn colorRed - TryAgain = _true - print %(10,200);"Error! Extra numbers not allowed": goto "InputExpression" - text ,,fn colorWhite -end if - - -for i = 1 to 4 - GotaNumber = 0 - for j = 0 to len(expr) -1 - ThisNumberPosition = instr( j, expr, right(str( d(i)),1 )) - ThisNumberPosition ++ - if ThisNumberPosition then GotaNumber = _true - next j - if GotaNumber then TotalNumbers ++ -next i - -if TotalNumbers => 4 then GotAllNumbers = _true - -if GotAllNumbers = _false - fn EraseErrorText - text ,,fn colorRed - TryAgain = _true - print %(10,200);"ERROR! Must use all your numbers and only those numbers." : goto "InputExpression" - text ,,fn colorWhite -end if - -fn EraseErrorText - - -if fn EvaluateMath( expr ) = _false - text ,,fn colorRed - TryAgain = _true - Print %(10,200);"Error! Incorrect math sequence." - goto "InputExpression" - text ,,fn colorWhite -end if - -CFStringRef GameResult -if fn StringIntegerValue( fn EvaluateMath( expr ) ) == 24 then GameResult = @"Correct" else GameResult = @"Incorrect" - -if GameResult = @"Incorrect" - TryAgain = _true - goto "InputExpression" -end if - -fn QuitOrPlayAlert(GameResult) -goto "Main" - -handleevents diff --git a/Task/24-game/J/24-game.j b/Task/24-game/J/24-game.j index 928663b455..73034a24eb 100644 --- a/Task/24-game/J/24-game.j +++ b/Task/24-game/J/24-game.j @@ -1,6 +1,6 @@ require'misc' -deal=: 1 + ? @ 9 9 9 9 -rules=: echo @ 'see http://en.wikipedia.org/wiki/24_Game' +deal=: 1 + ? bind 9 9 9 9 +rules=: smoutput bind 'see http://en.wikipedia.org/wiki/24_Game' input=: prompt @ ('enter 24 expression using ', ":, ': '"_) wellformed=: (' '<;._1@, ":@[) -:&(/:~) '(+-*%)' -.&;:~ ] diff --git a/Task/24-game/Jq/24-game.jq b/Task/24-game/Jq/24-game.jq deleted file mode 100644 index 09ce6dfc30..0000000000 --- a/Task/24-game/Jq/24-game.jq +++ /dev/null @@ -1,90 +0,0 @@ -### The MRG32k3a combined recursive PRNG - see above -import "MRG32k3a" as MRG {search: "."}; - -### Generic utilities -def sum(stream): reduce stream as $x (0; .+$x); - -# like while/2 but emit the final term rather than the first one -def whilst(cond; update): - def _whilst: - if cond then update | (., _whilst) else empty end; - _whilst; - -### Reverse Polish Notation -# An array of the allowed operators -def operators: "+-*/" | split(""); - -# If $a and $b are numbers and $c an operator, then "$a $b $c" is evaluated as an RPN expression. -# Output: {emit, result} with .emit == null if there is a valid result. -def applyOperator($a; $b; $c): - if ([$a,$b] | map(type) | unique) == ["number"] - then - if $c == "+" then {result: ($a + $b)} - elif $c == "-" then {result: ($a - $b)} - elif $c == "*" then {result: ($a * $b)} - elif ($c == "/") then {result: ($b / $a)} - else {emit: "unrecognized operator: \($c)"} - end - else {emit: "invalid number"} - end; - -# Input: an array representing an RPN expression. -# Output: {emit, result} as per applyOperator/3 -# Example: [1,2,3,"+","+"] | evaluate #=> 6 -def evaluate: - if length == 1 - then if .[0]|type == "number" then {result: .[0]} - else {emit: "invalid RPN expression"} - end - elif length < 3 then {emit: "invalid RPN expression: \(. | join(" "))"} - else . as $in - | (first( range(0; length) as $i | select(any( operators[]; . == $in[$i]) ) | $i) // null) as $ix - | if $ix == null then {emit: "invalid RPN expression"} - else applyOperator(.[$ix-2]; .[$ix-1]; .[$ix]) as $result - | if $result.result then .[:$ix-2] + [$result.result] + .[$ix+1:] | evaluate - else $result - end - end - end; - -### The "24 Game" - -# . is the putative RPN string to be checked. -# $four is the string of the four expected digits, in order. -# Output: {emit, result} with .emit set to "Correct!" if .result == 24 -def check($four): - if (gsub("[^1-9]";"") | explode | sort | implode) != $four - then {emit: "You must use each of the four digits \($four | split("") | join(" ")) exactly once:"} - else . as $in - | {s: [], emit: null} - | [$in | split("")[] | select(. != " ") - | . as $in | explode[0] | if . >= 48 and . <= 57 then . - 48 else $in end] - | evaluate - | if .result - then if .result|round == 24 then .emit = "Correct!" - else .emit = "Value \(.result) is not 24." - end - else .emit += "\nTry again, or enter . to start again, or q to quit." - end - end ; - -def run: - # Populate .digits with four non-negative digits selected at random, with replacement: - {digits: (9 | MRG::prn(4) | map(. + 1))} - | (.digits | sort | join("")) as $four - | "At the prompt, enter an RPN string (e.g. 64*1+1-), or . for a new set of four digits, or q to quit.", - "Make 24 using these digits, once each, in any order: \(.digits):", - ( whilst( .stop | not; - .emit = null - | . as $state - | try input catch halt - | if IN( "q", "quit") then halt - elif . == "." then $state | .stop = true - else check($four) - | if .result then .stop = true end - end ) - | select(.emit).emit ), - # rerun - run; - -run diff --git a/Task/24-game/Julia/24-game.jl b/Task/24-game/Julia/24-game.julia similarity index 100% rename from Task/24-game/Julia/24-game.jl rename to Task/24-game/Julia/24-game.julia diff --git a/Task/24-game/Kotlin/24-game.kts b/Task/24-game/Kotlin/24-game.kotlin similarity index 100% rename from Task/24-game/Kotlin/24-game.kts rename to Task/24-game/Kotlin/24-game.kotlin diff --git a/Task/24-game/OCaml/24-game.ml b/Task/24-game/OCaml/24-game.ocaml similarity index 100% rename from Task/24-game/OCaml/24-game.ml rename to Task/24-game/OCaml/24-game.ocaml diff --git a/Task/24-game/Perl/24-game.pl b/Task/24-game/Perl/24-game.pl index d4dd33e728..071bb8e2b8 100644 --- a/Task/24-game/Perl/24-game.pl +++ b/Task/24-game/Perl/24-game.pl @@ -25,21 +25,18 @@ while (1) { print "Expression (try ", $try++, "): "; my $entry = <>; - if (!defined $entry || substr($entry,0,1) eq 'q') + if (!defined $entry || $entry eq 'q') { say "Goodbye. Sorry you couldn't win."; last; } - $entry =~ s/\s+//g; # remove all white space (newline is whitespace too) + $entry =~ s/\s+//g; # remove all white space next if $entry eq ''; my $given_digits = join "", sort @digits; my $entry_digits = join "", sort grep { /\d/ } split(//, $entry); - if ($given_digits ne $entry_digits) - { say "incorrect digits"; next; } - if ($entry =~ /\d\d/) - { say "error, combined digits"; next; } - if ($entry =~ m|[-+*/]{2}|) - { say "error, combined operators"; next; } - if ($entry =~ tr|-0-9()+*/||c) - { say "invalid characters!"; next; } + if ($given_digits ne $entry_digits || # not correct digits + $entry =~ /\d\d/ || # combined digits + $entry =~ m|[-+*/]{2}| || # combined operators + $entry =~ tr|-0-9()+*/||c) # Invalid characters + { say "That's not valid"; next; } my $n = eval $entry; diff --git a/Task/24-game/PowerShell/24-game.ps1 b/Task/24-game/PowerShell/24-game.psh similarity index 100% rename from Task/24-game/PowerShell/24-game.ps1 rename to Task/24-game/PowerShell/24-game.psh diff --git a/Task/24-game/Rebol/24-game.rebol b/Task/24-game/Rebol/24-game.rebol deleted file mode 100644 index 246a8cc6b5..0000000000 --- a/Task/24-game/Rebol/24-game.rebol +++ /dev/null @@ -1,43 +0,0 @@ -Rebol [ - title: "Rosetta code: 24 game" - file: %24_game.r3 - url: https://rosettacode.org/wiki/24_game - needs: 3.10.0 ; or something like that (ajoin/with) -] -game-24: function/with [ - /seed val -][ - random/seed any [val now/precise] - valid: copy/part random digits 4 - prin "Using the following numbers, enter an expression that equals 24: " - print [valid/1 ", " valid/2 ", " valid/3 " and " valid/4] - print "Evaluation from left to right with no precedence, unless you use parenthesis." - sort valid - - sucess: false - - while [not sucess] [ - guess: ask "Enter your expression: " - if guess = "q" [halt] - numbers: sort copy guess - numbers: take/part find numbers digit 4 - either all [ - valid = numbers - parse guess [some chars end] - integer? result: try load ajoin/with split guess 1 #" " - ][ - print ["The result of your expression is: " result] - if result = 24 [sucess: true] - ][ - print "Something is wrong with the expression, try again." - ] - ] - print "You got it right!" -][ - valid: guess: none - digits: "123456789" - digit: charset digits - chars: union digit charset "+-*/()" -] - -game-24/seed 1 diff --git a/Task/24-game/Rust/24-game.rs b/Task/24-game/Rust/24-game.rs deleted file mode 100644 index 149fb0aa62..0000000000 --- a/Task/24-game/Rust/24-game.rs +++ /dev/null @@ -1,108 +0,0 @@ -use std::io::{self,BufRead}; -extern crate rand; -use rand::Rng; - -fn op_type(x: char) -> i32{ - match x { - '-' | '+' => return 1, - '/' | '*' => return 2, - '(' | ')' => return -1, - _ => return 0, - } -} - -fn to_rpn(input: &mut String){ - - let mut rpn_string : String = String::new(); - let mut rpn_stack : String = String::new(); - let mut last_token = '#'; - for token in input.chars(){ - if token.is_digit(10) { - rpn_string.push(token); - } - else if op_type(token) == 0 { - continue; - } - else if op_type(token) > op_type(last_token) || token == '(' { - rpn_stack.push(token); - last_token=token; - } - else { - while let Some(top) = rpn_stack.pop() { - if top=='(' { - break; - } - rpn_string.push(top); - } - if token != ')'{ - rpn_stack.push(token); - } - } - } - while let Some(top) = rpn_stack.pop() { - rpn_string.push(top); - } - - println!("your formula results in {}", rpn_string); - - *input=rpn_string; -} - -fn calculate(input: &String, list : &mut [u32;4]) -> f32{ - let mut stack : Vec = Vec::new(); - let mut accumulator : f32 = 0.0; - - for token in input.chars(){ - if token.is_digit(10) { - let test = token.to_digit(10).unwrap() as u32; - match list.iter().position(|&x| x == test){ - Some(idx) => list[idx]=10 , - _ => println!(" invalid digit: {} ",test), - } - stack.push(accumulator); - accumulator = test as f32; - }else{ - let a = stack.pop().unwrap(); - accumulator = match token { - '-' => a-accumulator, - '+' => a+accumulator, - '/' => a/accumulator, - '*' => a*accumulator, - _ => {accumulator},//NOP - }; - } - } - println!("your formula results in {}",accumulator); - accumulator -} - -fn main() { - - let mut rng = rand::thread_rng(); - // each from 1 ──► 9 (inclusive) - let mut list :[u32;4]=[ - rng.gen::()%9+1, - rng.gen::()%9+1, - rng.gen::()%9+1, - rng.gen::()%9+1 - ]; - - println!("form 24 with using + - / * {:?}",list); - //get user input - let mut input = String::new(); - io::stdin().read_line(&mut input).unwrap(); - //convert to rpn - to_rpn(&mut input); - let result = calculate(&input, &mut list); - - if list.iter().any(|&num| num != 10) { - println!("you didn't use all the numbers"); - } else { - println!("and you used all numbers"); - match result { - 24.0 => println!("you won"), - _ => println!("but your formula doesn't result in 24"), - } - } - -} diff --git a/Task/24-game/Rust/24-game.rust b/Task/24-game/Rust/24-game.rust new file mode 100644 index 0000000000..bdcad8b01d --- /dev/null +++ b/Task/24-game/Rust/24-game.rust @@ -0,0 +1,102 @@ +use std::io::{self,BufRead}; +extern crate rand; +use rand::Rng; + +fn op_type(x: char) -> i32{ + match x { + '-' | '+' => return 1, + '/' | '*' => return 2, + '(' | ')' => return -1, + _ => return 0, + } +} + +fn to_rpn(input: &mut String){ + + let mut rpn_string : String = String::new(); + let mut rpn_stack : String = String::new(); + let mut last_token = '#'; + for token in input.chars(){ + if token.is_digit(10) { + rpn_string.push(token); + } + else if op_type(token) == 0 { + continue; + } + else if op_type(token) > op_type(last_token) || token == '(' { + rpn_stack.push(token); + last_token=token; + } + else { + while let Some(top) = rpn_stack.pop() { + if top=='(' { + break; + } + rpn_string.push(top); + } + if token != ')'{ + rpn_stack.push(token); + } + } + } + while let Some(top) = rpn_stack.pop() { + rpn_string.push(top); + } + + println!("you formula results in {}", rpn_string); + + *input=rpn_string; +} + +fn calculate(input: &String, list : &mut [u32;4]) -> f32{ + let mut stack : Vec = Vec::new(); + let mut accumulator : f32 = 0.0; + + for token in input.chars(){ + if token.is_digit(10) { + let test = token.to_digit(10).unwrap() as u32; + match list.iter().position(|&x| x == test){ + Some(idx) => list[idx]=10 , + _ => println!(" invalid digit: {} ",test), + } + stack.push(accumulator); + accumulator = test as f32; + }else{ + let a = stack.pop().unwrap(); + accumulator = match token { + '-' => a-accumulator, + '+' => a+accumulator, + '/' => a/accumulator, + '*' => a*accumulator, + _ => {accumulator},//NOP + }; + } + } + println!("you formula results in {}",accumulator); + accumulator +} + +fn main() { + + let mut rng = rand::thread_rng(); + let mut list :[u32;4]=[rng.gen::()%10,rng.gen::()%10,rng.gen::()%10,rng.gen::()%10]; + + println!("form 24 with using + - / * {:?}",list); + //get user input + let mut input = String::new(); + io::stdin().read_line(&mut input).unwrap(); + //convert to rpn + to_rpn(&mut input); + let result = calculate(&input, &mut list); + + if list.iter().any(|&list| list !=10){ + println!("and you used all numbers"); + match result { + 24.0 => println!("you won"), + _ => println!("but your formulla doesn't result in 24"), + } + }else{ + println!("you didn't use all the numbers"); + } + +} diff --git a/Task/24-game/Scheme/24-game.scm b/Task/24-game/Scheme/24-game.ss similarity index 100% rename from Task/24-game/Scheme/24-game.scm rename to Task/24-game/Scheme/24-game.ss diff --git a/Task/24-game/Zig/24-game.zig b/Task/24-game/Zig/24-game.zig deleted file mode 100644 index 4c224f1030..0000000000 --- a/Task/24-game/Zig/24-game.zig +++ /dev/null @@ -1,153 +0,0 @@ -const std = @import("std"); -const rand = std.Random; -// (hint: errors cannot be handled at comptime) -var stdout: std.fs.File.Writer = undefined; -var stdin: std.fs.File.Reader = undefined; - -fn opType(x: u8) i32 { - return switch (x) { - '-', '+' => 1, - '/', '*' => 2, - '(', ')' => -1, - else => 0, - }; -} - -fn toRpn(allocator: std.mem.Allocator, input: []const u8) ![]u8 { - var rpnString = std.ArrayList(u8).init(allocator); - defer rpnString.deinit(); - - var rpnStack = std.ArrayList(u8).init(allocator); - defer rpnStack.deinit(); - - var lastToken: u8 = '#'; - - for (input) |token| { - if (token >= '1' and token <= '9') { - try rpnString.append(token); - } else if (opType(token) == 0) { - continue; - } else if (opType(token) > opType(lastToken) or token == '(') { - try rpnStack.append(token); - lastToken = token; - } else { - while (rpnStack.items.len > 0) { - const top = rpnStack.pop().?; - if (top == '(') { - break; - } - try rpnString.append(top); - } - if (token != ')') { - try rpnStack.append(token); - } - } - } - - while (rpnStack.items.len > 0) { - try rpnString.append(rpnStack.pop().?); - } - - if (rpnString.items.len > 0) { - try stdout.print("your formula results in {s}\n", .{rpnString.items}); - } else { - stdout.print("no input available.\n", .{}) catch {}; - } - - return rpnString.toOwnedSlice(); -} - -fn calculate(input: []const u8, list: *[4]u32) f32 { - var stack = std.ArrayList(f32).init(std.heap.page_allocator); - defer stack.deinit(); - - var accumulator: f32 = 0.0; - - for (input) |token| { - if (token >= '1' and token <= '9') { - const digit = @as(u32, token - '0'); - - // Find and mark the used digit - var found = false; - for (list, 0..) |val, idx| { - if (val == digit) { - list[idx] = 10; - found = true; - break; - } - } - - if (!found) { - stdout.print(" invalid digit: {d} \n", .{digit}) catch {}; - } - - stack.append(accumulator) catch {}; - accumulator = @floatFromInt(digit); - } else { - const a = stack.pop().?; - - accumulator = switch (token) { - '-' => a - accumulator, - '+' => a + accumulator, - '/' => a / accumulator, - '*' => a * accumulator, - else => accumulator, // NOP - }; - } - } - - stdout.print("your formula results in {d}\n", .{accumulator}) catch {}; - return accumulator; -} - -pub fn main() !void { - stdout = std.io.getStdOut().writer(); - stdin = std.io.getStdIn().reader(); - var prng = rand.DefaultPrng.init(@as(u64, @intCast(std.time.timestamp()))); - const random = prng.random(); - // only values from 1 --> 9 (inclusive) - var list = [_]u32{ - @mod(random.int(u32), 9) + 1, - @mod(random.int(u32), 9) + 1, - @mod(random.int(u32), 9) + 1, - @mod(random.int(u32), 9) + 1, - }; - - try stdout.print("form 24 with using + - / * {d} {d} {d} {d}\n", .{ list[0], list[1], list[2], list[3] }); - - // Get user input - var buffer: [1024]u8 = undefined; - const input = try stdin.readUntilDelimiterOrEof(buffer[0..], '\n') orelse ""; - - var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); - defer arena.deinit(); - const allocator = arena.allocator(); - - // Convert to RPN - const rpnInput = try toRpn(allocator, input); - if (rpnInput.len == 0) { - stdout.print("exit.\n", .{}) catch {}; - return; - } - - const result = calculate(rpnInput, &list); - - var allUsed = true; - for (list) |val| { - if (val != 10) { - allUsed = false; - break; - } - } - - if (allUsed) { - try stdout.print("and you used all numbers\n", .{}); - if (result == 24.0) { - try stdout.print("you won\n", .{}); - } else { - try stdout.print("but your formula doesn't result in 24\n", .{}); - } - } else { - try stdout.print("you didn't use all the numbers\n", .{}); - } -} diff --git a/Task/4-rings-or-4-squares-puzzle/Ada/4-rings-or-4-squares-puzzle.adb b/Task/4-rings-or-4-squares-puzzle/Ada/4-rings-or-4-squares-puzzle.ada similarity index 100% rename from Task/4-rings-or-4-squares-puzzle/Ada/4-rings-or-4-squares-puzzle.adb rename to Task/4-rings-or-4-squares-puzzle/Ada/4-rings-or-4-squares-puzzle.ada diff --git a/Task/4-rings-or-4-squares-puzzle/Crystal/4-rings-or-4-squares-puzzle.cr b/Task/4-rings-or-4-squares-puzzle/Crystal/4-rings-or-4-squares-puzzle.crystal similarity index 100% rename from Task/4-rings-or-4-squares-puzzle/Crystal/4-rings-or-4-squares-puzzle.cr rename to Task/4-rings-or-4-squares-puzzle/Crystal/4-rings-or-4-squares-puzzle.crystal diff --git a/Task/4-rings-or-4-squares-puzzle/EasyLang/4-rings-or-4-squares-puzzle.easy b/Task/4-rings-or-4-squares-puzzle/EasyLang/4-rings-or-4-squares-puzzle.easy index 22e54e305a..f2e05dc87f 100644 --- a/Task/4-rings-or-4-squares-puzzle/EasyLang/4-rings-or-4-squares-puzzle.easy +++ b/Task/4-rings-or-4-squares-puzzle/EasyLang/4-rings-or-4-squares-puzzle.easy @@ -1,10 +1,12 @@ func ok v t[] . for h in t[] - if v = h : return 0 + if v = h + return 0 + . . return 1 . -proc four lo hi uni show . +proc four lo hi uni show . . # subr bf for f = lo to hi diff --git a/Task/4-rings-or-4-squares-puzzle/Julia/4-rings-or-4-squares-puzzle.jl b/Task/4-rings-or-4-squares-puzzle/Julia/4-rings-or-4-squares-puzzle.julia similarity index 100% rename from Task/4-rings-or-4-squares-puzzle/Julia/4-rings-or-4-squares-puzzle.jl rename to Task/4-rings-or-4-squares-puzzle/Julia/4-rings-or-4-squares-puzzle.julia diff --git a/Task/4-rings-or-4-squares-puzzle/Kotlin/4-rings-or-4-squares-puzzle.kts b/Task/4-rings-or-4-squares-puzzle/Kotlin/4-rings-or-4-squares-puzzle.kotlin similarity index 100% rename from Task/4-rings-or-4-squares-puzzle/Kotlin/4-rings-or-4-squares-puzzle.kts rename to Task/4-rings-or-4-squares-puzzle/Kotlin/4-rings-or-4-squares-puzzle.kotlin diff --git a/Task/4-rings-or-4-squares-puzzle/OCaml/4-rings-or-4-squares-puzzle.ml b/Task/4-rings-or-4-squares-puzzle/OCaml/4-rings-or-4-squares-puzzle.ocaml similarity index 100% rename from Task/4-rings-or-4-squares-puzzle/OCaml/4-rings-or-4-squares-puzzle.ml rename to Task/4-rings-or-4-squares-puzzle/OCaml/4-rings-or-4-squares-puzzle.ocaml diff --git a/Task/4-rings-or-4-squares-puzzle/PARI-GP/4-rings-or-4-squares-puzzle.parigp b/Task/4-rings-or-4-squares-puzzle/PARI-GP/4-rings-or-4-squares-puzzle.parigp deleted file mode 100644 index d8c0e765a3..0000000000 --- a/Task/4-rings-or-4-squares-puzzle/PARI-GP/4-rings-or-4-squares-puzzle.parigp +++ /dev/null @@ -1,39 +0,0 @@ -foursquares(plo, phi, punique, pshow) = { - my(lo=plo, hi=phi, unique=punique, show=pshow, solutions, a, b, c, d, e, f, g); - print(); - for (c = lo, hi, - for (d = lo, hi, - if (!unique || c != d, - a = c + d; - if (a >= lo && a <= hi && (!unique || (c != 0 && d != 0)), - for (e = lo, hi, - if (!unique || (e != a && e != c && e != d), - g = d + e; - if (g >= lo && g <= hi && (!unique || (g != a && g != c && g != d && g != e)), - for (f = lo, hi, - if (!unique || (f != a && f != c && f != d && f != g && f != e), - b = e + f - c; - if (b >= lo && b <= hi && (!unique || (b != a && b != c && b != d && b != g && b != e && b != f)), - solutions++; - if (show, print(a, " ", b, " ", c, " ", d, " ", e, " ", f, " ", g)); - ) - ) - ) - ) - ) - ) - ) - ) - ) - ); - - if (unique, - print("\n", solutions, " unique solutions in ", lo, " to ", hi); - , - print("\n", solutions, " non-unique solutions in ", lo, " to ", hi); - ); -} - -foursquares(1,7,1,1); -foursquares(3,9,1,1); -foursquares(0,9,0,0); diff --git a/Task/4-rings-or-4-squares-puzzle/Quackery/4-rings-or-4-squares-puzzle.quackery b/Task/4-rings-or-4-squares-puzzle/Quackery/4-rings-or-4-squares-puzzle.quackery deleted file mode 100644 index fd5fa00757..0000000000 --- a/Task/4-rings-or-4-squares-puzzle/Quackery/4-rings-or-4-squares-puzzle.quackery +++ /dev/null @@ -1,36 +0,0 @@ - [ swap dip [ 1+ split drop ] - split nip ] is slice ( [ n n --> [ ) - - [ 0 swap witheach + ] is sum ( [ --> n ) - - [ slice sum join ] is square ( [ [ n n --> [ ) - - [ true swap - behead swap witheach - [ over = not if - [ dip not conclude ] ] - drop ] is same ( [ --> b ) - - [ [] temp put - over - 1+ times - [ dup i^ + temp gather ] - drop - temp take ] is low->high ( n n --> [ ) - - [ [] temp put - witheach - [ [] - over 0 1 square - over 1 3 square - over 3 5 square - over 5 6 square - same iff - [ nested temp gather ] - else drop ] - temp take ] is task ( [ n --> [ ) - - 1 7 low->high permutations task - witheach [ echo cr ] cr - 3 9 low->high permutations task - witheach [ echo cr ] cr - 0 9 low->high 7 arrangements task size echo diff --git a/Task/4-rings-or-4-squares-puzzle/Rust/4-rings-or-4-squares-puzzle.rs b/Task/4-rings-or-4-squares-puzzle/Rust/4-rings-or-4-squares-puzzle.rust similarity index 100% rename from Task/4-rings-or-4-squares-puzzle/Rust/4-rings-or-4-squares-puzzle.rs rename to Task/4-rings-or-4-squares-puzzle/Rust/4-rings-or-4-squares-puzzle.rust diff --git a/Task/4-rings-or-4-squares-puzzle/Scheme/4-rings-or-4-squares-puzzle.scm b/Task/4-rings-or-4-squares-puzzle/Scheme/4-rings-or-4-squares-puzzle.ss similarity index 100% rename from Task/4-rings-or-4-squares-puzzle/Scheme/4-rings-or-4-squares-puzzle.scm rename to Task/4-rings-or-4-squares-puzzle/Scheme/4-rings-or-4-squares-puzzle.ss diff --git a/Task/4-rings-or-4-squares-puzzle/Uiua/4-rings-or-4-squares-puzzle.uiua b/Task/4-rings-or-4-squares-puzzle/Uiua/4-rings-or-4-squares-puzzle.uiua deleted file mode 100644 index be7a6495bb..0000000000 --- a/Task/4-rings-or-4-squares-puzzle/Uiua/4-rings-or-4-squares-puzzle.uiua +++ /dev/null @@ -1,4 +0,0 @@ -# Solve 4 equations in 7 variables, all distinct. -Test ← =1⧻◴≡⌟◇(/+⊏){0_1 1_2_3 3_4_5 5_6} -▽⊸≡Test⧅≠⊸⧻+1⇡7 -▽⊸≡Test⧅≠⊸⧻+3⇡7 diff --git a/Task/4-rings-or-4-squares-puzzle/V-(Vlang)/4-rings-or-4-squares-puzzle-2.v b/Task/4-rings-or-4-squares-puzzle/V-(Vlang)/4-rings-or-4-squares-puzzle-2.v deleted file mode 100644 index f44447a8e6..0000000000 --- a/Task/4-rings-or-4-squares-puzzle/V-(Vlang)/4-rings-or-4-squares-puzzle-2.v +++ /dev/null @@ -1,38 +0,0 @@ -import math.bits - -fn main ( ) { - mut n := 0 - mut t := []u8{len:7} - - n = solve ( 0, mut t, 1, 7, true ) - println ( "$n unique solutions in 1 to 7" ) - n = solve ( 0, mut t, 3, 9, true ) - println("$n unique solutions in 3 to 9") - n = solve ( 0, mut t, 0, 9, false ) - println("$n non-unique solutions in 0 to 9") -} - -fn solve ( lvl u8, mut t []u8, low u8, high u8,unique bool ) int { - if lvl==7 { - return int(suma(t) && (!unique || isunique( t ))) - } - mut cnt:=0 - for v := low; v <= high; v++ { - t[lvl] = v - cnt += solve ( lvl + 1, mut t, low, high, unique ) - } - return cnt -} - -@[inline] -fn isunique ( t []u8 ) bool { - return bits.ones_count_32(u32(1)<= n - 1 THEN 1 - ELIF ( n - col ) < col THEN names[ n - col ] - ELIF ( n - col ) = col AND NOT ODD n THEN names[ n - col ] - ELSE - NAMEG partial sum := 0; - FOR k TO col DO partial sum +:= c[ n - col ][ k ] OD; - partial sum - FI - OD; - names[ n ]:= 0; - FOR k TO n DO names[ n ] +:= c[ n ][ k ] OD -; IF n MOD 200 = 0 THEN print( ( "...", whole( n, 0 ), newline ) ) FI -OD; - -# display the first 25 rows of the triangle # -FOR n TO 25 DO - print( ( "(", whole( names[ n ], -6 ), ")", whole( n, -3 ), ":" ) ); - FOR col TO n DO - print( ( " ", whole( c[ n ][ col ], -3 ) ) ) - OD; - print( ( newline ) ) -OD; - -print( ( " 23: ", whole( names[ 23 ], 0 ), newline ) ); -print( ( " 123: ", whole( names[ 123 ], 0 ), newline ) ) diff --git a/Task/9-billion-names-of-God-the-integer/Ada/9-billion-names-of-god-the-integer.adb b/Task/9-billion-names-of-God-the-integer/Ada/9-billion-names-of-god-the-integer.ada similarity index 100% rename from Task/9-billion-names-of-God-the-integer/Ada/9-billion-names-of-god-the-integer.adb rename to Task/9-billion-names-of-God-the-integer/Ada/9-billion-names-of-god-the-integer.ada diff --git a/Task/9-billion-names-of-God-the-integer/Crystal/9-billion-names-of-god-the-integer.cr b/Task/9-billion-names-of-God-the-integer/Crystal/9-billion-names-of-god-the-integer.crystal similarity index 100% rename from Task/9-billion-names-of-God-the-integer/Crystal/9-billion-names-of-god-the-integer.cr rename to Task/9-billion-names-of-God-the-integer/Crystal/9-billion-names-of-god-the-integer.crystal diff --git a/Task/9-billion-names-of-God-the-integer/EasyLang/9-billion-names-of-god-the-integer.easy b/Task/9-billion-names-of-God-the-integer/EasyLang/9-billion-names-of-god-the-integer.easy deleted file mode 100644 index 31f4c0500b..0000000000 --- a/Task/9-billion-names-of-God-the-integer/EasyLang/9-billion-names-of-god-the-integer.easy +++ /dev/null @@ -1,64 +0,0 @@ -func[] bnadd a[] b[] . - if len a[] < len b[] : swap a[] b[] - for i = 1 to len a[] - bi = 0 - if i <= len b[] : bi = b[i] - h = a[i] + bi + c - r[] &= h mod 10000000 - c = h div 10000000 - . - if c > 0 : r[] &= c - return r[] -. -func[] bnsub a[] b[] . - for i = 1 to len a[] - ai = a[i] - bi = 0 - if i <= len b[] : bi = b[i] - bi += c - c = 0 - if bi > ai - ai += 10000000 - c = 1 - . - r[] &= ai - bi - . - while r[$] = 0 : len r[] -1 - return r[] -. -func$ str bn[] . - s$ = bn[$] - for i = len bn[] - 1 downto 1 - h$ = bn[i] - s$ &= substr "0000000" 1 (7 - len h$) & h$ - . - return s$ -. -proc parti n &p[][] . - subr upd - if k mod 2 = 1 - h[] = bnadd p[n][] p[d][] - else - h[] = bnsub p[n][] p[d][] - . - p[n][] = h[] - . - for k = 1 to n - d = n - k * (3 * k - 1) div 2 - if d < 0 : break 1 - upd - d -= k - if d < 0 : break 1 - upd - . -. -proc partitions_p n &p[][] . - p[][] = [ ] - len p[][] n + 1 - p[0][] = [ 1 ] - for i to n : parti i p[][] -. -for nn in [ 23 123 1234 12345 ] - partitions_p nn p[][] - print nn & ": " & str p[nn][] -. diff --git a/Task/9-billion-names-of-God-the-integer/Elixir/9-billion-names-of-god-the-integer.ex b/Task/9-billion-names-of-God-the-integer/Elixir/9-billion-names-of-god-the-integer.elixir similarity index 100% rename from Task/9-billion-names-of-God-the-integer/Elixir/9-billion-names-of-god-the-integer.ex rename to Task/9-billion-names-of-God-the-integer/Elixir/9-billion-names-of-god-the-integer.elixir diff --git a/Task/9-billion-names-of-God-the-integer/FutureBasic/9-billion-names-of-god-the-integer.basic b/Task/9-billion-names-of-God-the-integer/FutureBasic/9-billion-names-of-god-the-integer.basic deleted file mode 100644 index 6c25428226..0000000000 --- a/Task/9-billion-names-of-God-the-integer/FutureBasic/9-billion-names-of-god-the-integer.basic +++ /dev/null @@ -1,179 +0,0 @@ -// -// 9 billion names of G-D the integer -// -// Using FutureBasic 7.0.35 -// September 2025, R.W. -// - -include "gmp.incl" // GMP only (MPFR not needed here) - -_kTriMax = 25 -_kMaxP = 123456 // compile-time bound for big_p[] - -UInt64 tri(_kTriMax, _kTriMax) // the 25 by 25 triangle -mpz_t big_p(_kMaxP) // partition values P(0.._kMaxP) - -// -// Integer partition via GMP (mpz_t) -// -// Computes P(0..partMax) in global big_p[] -// big_p(xxxxx) will have _kMaxP elements -// -// At its largest sum term (123456), -// it would be greater than 10^385 or hundreds of digits -// beyond a centillion - -local fn ComputePartitions( partMax as long ) - long i, j, k - long a, b - mpz_t s - - if partMax > _kMaxP then partMax = _kMaxP - // temp accumulator - mpz_init( s ) - - // base case - mpz_set_ui( big_p(0), 1 ) - - for i = 1 to partMax - // generalized pentagonal sequence setup - j = 1 - k = 1 - b = 2 - a = 5 - - while j > 0 - // j = i - (3*k*k+k) \ 2 - // (implemented incrementally via b,a) - j = i - b - b = b + a - a = a + 3 - - if j >= 0 - if (k AND 1) <> 0 - mpz_add( s, s, big_p(j) ) - else - mpz_sub( s, s, big_p(j) ) - end if - end if - // second term at j + k - j = j + k - if j >= 0 - if (k AND 1) <> 0 - mpz_add( s, s, big_p(j) ) - else - mpz_sub( s, s, big_p(j) ) - end if - end if - k ++ - wend - - mpz_swap( big_p(i), s ) - next - - mpz_clear( s ) -end fn - -// -// Partition triangle using 64-bit ints -// p(n,k) -> # of partitions of n with -// largest part exactly k -// -local fn BuildPartitionTriangle - CFStringRef pLine, filler - pLine = @"" - filler = @" " - long n, k - - // first 3 rows are always 1's - tri(1,1) = 1 - tri(2,1) = 1 - tri(2,2) = 1 - tri(3,1) = 1 - tri(3,2) = 1 - tri(3,3) = 1 - - for n = 4 to _kTriMax - for k = 1 to n - if k * 2 > n - tri(n,k) = tri(n-1, k-1) - else - tri(n,k) = tri(n-1, k-1) + tri(n-k, k) - end if - next - next - - // display the triangle - for n = 1 to 25 - pLine = @"" - for k = 1 to n - pLine = concat(pLine, mid(str(tri(n,k)),1),@" ") - next k - pLine = concat(left(filler, 38 - len(pLine)/2) , pLine) - print pLine - next n -end fn -// -// MAIN -// ---------------------------------------------- -Window 1, @"9 Billion Names of G-D the integer",¬ -(0,0,980,540) - -long n, k, max -max = 123456 // must not exceed _kMaxP -CFStringRef pLine -pLine = @"" - -CFTimeInterval t -t = fn CACurrentMediaTime // start clock - -fn BuildPartitionTriangle - -// Initialize big_p(0..kPartMax) to 0 -for n = 0 to max - mpz_init( big_p(n) ) -next - -// Compute partitions P(0..kPartMax) -fn ComputePartitions( max ) -print@ -print @"Sums" -print @"----" - -long cxCount -cxCount = 5 -Int i -long cx(5) -cx(1) = 23 -cx(2) = 123 -cx(3) = 1234 -cx(4) = 12345 -cx(5) = 123456 - -long at -at = 1 - -for i = 1 to max - if at <= cxCount - if i = cx(at) - pLine = fn mpz_cf( 10,big_p(i) ) - print concat( @"G(", mid(str(i),1), @") = ", pLine ) - at = at + 1 - end if - else - exit for - end if -next -// -// stop the clock -print@ -printf @"Elapsed time = %.4f ms.", (fn CACurrentMediaTime - t)*1000 - -// Cleanup -for n = 0 to max - mpz_clear( big_p(n) ) -next - -HandleEvents - -// diff --git a/Task/9-billion-names-of-God-the-integer/Groovy/9-billion-names-of-god-the-integer.groovy b/Task/9-billion-names-of-God-the-integer/Groovy/9-billion-names-of-god-the-integer.groovy index 006cf36944..fed2cfdfba 100644 --- a/Task/9-billion-names-of-God-the-integer/Groovy/9-billion-names-of-god-the-integer.groovy +++ b/Task/9-billion-names-of-God-the-integer/Groovy/9-billion-names-of-god-the-integer.groovy @@ -1,4 +1,4 @@ -static def partitions(c) +def partitions(c) { def p=[]; diff --git a/Task/9-billion-names-of-God-the-integer/Julia/9-billion-names-of-god-the-integer.jl b/Task/9-billion-names-of-God-the-integer/Julia/9-billion-names-of-god-the-integer.julia similarity index 100% rename from Task/9-billion-names-of-God-the-integer/Julia/9-billion-names-of-god-the-integer.jl rename to Task/9-billion-names-of-God-the-integer/Julia/9-billion-names-of-god-the-integer.julia diff --git a/Task/9-billion-names-of-God-the-integer/Kotlin/9-billion-names-of-god-the-integer.kts b/Task/9-billion-names-of-God-the-integer/Kotlin/9-billion-names-of-god-the-integer.kotlin similarity index 100% rename from Task/9-billion-names-of-God-the-integer/Kotlin/9-billion-names-of-god-the-integer.kts rename to Task/9-billion-names-of-God-the-integer/Kotlin/9-billion-names-of-god-the-integer.kotlin diff --git a/Task/9-billion-names-of-God-the-integer/OCaml/9-billion-names-of-god-the-integer.ml b/Task/9-billion-names-of-God-the-integer/OCaml/9-billion-names-of-god-the-integer.ocaml similarity index 100% rename from Task/9-billion-names-of-God-the-integer/OCaml/9-billion-names-of-god-the-integer.ml rename to Task/9-billion-names-of-God-the-integer/OCaml/9-billion-names-of-god-the-integer.ocaml diff --git a/Task/9-billion-names-of-God-the-integer/Pluto/9-billion-names-of-god-the-integer.pluto b/Task/9-billion-names-of-God-the-integer/Pluto/9-billion-names-of-god-the-integer.pluto deleted file mode 100644 index 32f0b981d9..0000000000 --- a/Task/9-billion-names-of-God-the-integer/Pluto/9-billion-names-of-god-the-integer.pluto +++ /dev/null @@ -1,39 +0,0 @@ -local bigint = require "pluto:bigint" -local fmt = require "fmt" - -local zero = bigint.new(0) -local one = bigint.new(1) - -local cache = {{one}} - -local function cumu(n) - if #cache <= n then - for l = #cache, n do - local r = {zero} - for x = 1, l do - local min = l - x - if x < min then min = x end - r:insert(r:back() + cache[l - x + 1][min + 1]) - end - cache:insert(r) - end - end - return cache[n + 1] -end - -local function row(n) - local r = cumu(n) - return range(1, n):map(|i| -> r[i + 1] - r[i]) -end - -print("Rows:") -for i = 1, 25 do - fmt.write("%2d: ", i) - local r = row(i) - fmt.tprint("%3s", r, #r) -end - -print("\nSums:") -for {23, 123, 1234, 12345} as i do - fmt.print("%5d: %s", i, cumu(i):back()) -end diff --git a/Task/9-billion-names-of-God-the-integer/Rebol/9-billion-names-of-god-the-integer.rebol b/Task/9-billion-names-of-God-the-integer/Rebol/9-billion-names-of-god-the-integer.rebol deleted file mode 100644 index 4c937e4e34..0000000000 --- a/Task/9-billion-names-of-God-the-integer/Rebol/9-billion-names-of-god-the-integer.rebol +++ /dev/null @@ -1,101 +0,0 @@ -Rebol [ - title: "Rosetta code: 9 billion names of God the integer" - file: %9_billion_names_of_God_the_integer.r3 - url: https://rosettacode.org/wiki/9_billion_names_of_God_the_integer - needs: 3.0.0 - note: {Based on Red language version} -] -names-of-god: function/with [ - row [integer!] "row number (>= 1)" - /show "Display intermediate results" - /all "When showing, print all intermediate data" -][ - ;; Validate input - require row >= 1, otherwise trigger a runtime error - assert [row >= 1] - - ;; If /show refinement is used, display results for the given row - if show [ - ;; Ensure nums/:row is computed; if not, recursively compute it - unless nums/:row [names-of-god row] - - ;; Loop from 1 to row - repeat i row [ - either all [ ;; If /all refinement is used, display extra details - probe reduce [i nums/:i sums/:i] ;; Show index, sequence, and sum - ][ - print nums/:i ;; Otherwise, just print the sequence - ] - ] - ] - - ;; Compute a new row from scratch (if row not already computed)... - unless sum: sums/:row [ - out: clear [] ;; Temporary storage for row's elements - half: to integer! row / 2 ;; Middle position of the row - - ;; Ensure all required previous rows exist; generate missing ones - if row - 1 > last: length? nums [ - repeat i row - last - 1 [ - names-of-god last + i - ] - ] - - ;; Build the `out` block for this row - repeat col row - 1 [ - ;; Special case: the middle element - either col = (half + 1) [ - append out at nums/(row - 1) half ;; Insert from previous row's middle - break ;; Stop building here - ][ - ;; General case: append sum-part of two earlier sequences - append out sum-part nums/(row - col) col - ] - ] - - ;; Compute the sum of the row - sum: 0.0 - forall out [ - sum: sum + out/1 - ] - - ;; Cache the computed row and its sum - sums/:row: sum - nums/:row: copy out - clear out - ] - sums/:row ;; Return sum of the row -][ - ;; ===== WITH BLOCK (local helper definitions and persistent state) ===== - - ;; Helper function: sum the first `count` elements from the given block `nums` - sum-part: function [nums [block!] count [integer!]][ - out: 0.0 - loop count [ - out: out + nums/1 - if empty? nums: next nums [break] ;; Stop if we've exhausted the block - ] - ;; If within integer range, convert to integer - if out <= 0#7fffffffffffffff [out: to integer! out] - out - ] - - ;; Persistent storage for each computed row (map! with row → sequence) - ;; Start with base cases: - ;; row 1 = [1] - ;; row 2 = [1 1] - nums: make map! [1 [1] 2 [1 1]] - - ;; Persistent storage for row sums (map! with row → sum) - ;; Base sums: row 1 sum = 1, row 2 sum = 2 - sums: make map! [1 1 2 2] -] - - - -print "rows: ^/" -names-of-god/show 25 - -print "^/sums: ^/" -probe names-of-god 23 -probe names-of-god 123 -probe names-of-god 1234 diff --git a/Task/9-billion-names-of-God-the-integer/Rust/9-billion-names-of-god-the-integer.rs b/Task/9-billion-names-of-God-the-integer/Rust/9-billion-names-of-god-the-integer.rust similarity index 100% rename from Task/9-billion-names-of-God-the-integer/Rust/9-billion-names-of-god-the-integer.rs rename to Task/9-billion-names-of-God-the-integer/Rust/9-billion-names-of-god-the-integer.rust diff --git a/Task/9-billion-names-of-God-the-integer/Scheme/9-billion-names-of-god-the-integer.scm b/Task/9-billion-names-of-God-the-integer/Scheme/9-billion-names-of-god-the-integer.ss similarity index 100% rename from Task/9-billion-names-of-God-the-integer/Scheme/9-billion-names-of-god-the-integer.scm rename to Task/9-billion-names-of-God-the-integer/Scheme/9-billion-names-of-god-the-integer.ss diff --git a/Task/9-billion-names-of-God-the-integer/Zig/9-billion-names-of-god-the-integer-1.zig b/Task/9-billion-names-of-God-the-integer/Zig/9-billion-names-of-god-the-integer-1.zig deleted file mode 100644 index 7502e47386..0000000000 --- a/Task/9-billion-names-of-God-the-integer/Zig/9-billion-names-of-god-the-integer-1.zig +++ /dev/null @@ -1,63 +0,0 @@ -const std = @import("std"); -const print = std.debug.print; -const bigint = std.math.big.int.Managed; -const eql = std.mem.eql; -const Array = std.ArrayList; -const Array1 = Array(bigint); -const Array2 = Array(Array1); -var gpa = std.heap.GeneralPurposeAllocator(.{}){}; -const allocator = gpa.allocator(); - -fn cumu(cache: *Array2, n: usize) !*Array1 { - var y = cache.items.len; - while (cache.items.len <= n) : (y += 1) { - var roww = Array1.init(allocator); - try roww.append(try bigint.init(allocator)); - for (1..y + 1) |x| { - var cache_value = try cache.items[y - x].items[@min(x, y - x)].clone(); - try cache_value.add(&cache_value, &roww.getLast()); - try roww.append(cache_value); - } - try cache.append(roww); - } - return &(cache.items[n]); -} - -fn row(cache: *Array2, n: usize) !void { - const e = try cumu(cache, n); - var v = try bigint.init(allocator); - for (0..n) |i| { - try v.sub(&e.items[i + 1], &e.items[i]); - print(" {} ", .{v}); - } - v.deinit(); - print("\n", .{}); -} - -pub fn main() !void { - var cache = Array2.init(allocator); - defer { - cache.deinit(); - } - defer { - while (cache.popOrNull()) |l| { - l.deinit(); - } - } - var cache0 = Array1.init(allocator); - var v = try bigint.init(allocator); - try v.set(1); - try cache0.append(v); - try cache.append(cache0); - - print("rows:\n", .{}); - for (1..1000) |x| { - try row(&cache, x); - } - - print("\nsums:\n", .{}); - for ([_]usize{ 23, 123, 999 }) |num| { - const r = try cumu(&cache, num); - print("{d: >4} {d}\n", .{ num, r.getLast() }); - } -} diff --git a/Task/9-billion-names-of-God-the-integer/Zig/9-billion-names-of-god-the-integer-2.zig b/Task/9-billion-names-of-God-the-integer/Zig/9-billion-names-of-god-the-integer-2.zig deleted file mode 100644 index 3b8f04f057..0000000000 --- a/Task/9-billion-names-of-God-the-integer/Zig/9-billion-names-of-god-the-integer-2.zig +++ /dev/null @@ -1,35 +0,0 @@ -const std = @import("std"); -const print = std.debug.print; -const bigint = std.math.big.int.Managed; -const eql = std.mem.eql; -const Array = std.ArrayList; -const Array1 = Array(bigint); -var gpa = std.heap.GeneralPurposeAllocator(.{}){}; -const allocator = gpa.allocator(); - -fn calc ( n:usize, p:*Array1) !void { - for ( 1..n+1 ) |k| { - var d:i64 = @intCast(n); - d -= @intCast(k*(3*k - 1)/2); - inline for ( 0..2 ) |_| { - if ( d < 0 ) return; - if (k&1>0) try p.items[n].add ( &p.items[n], &p.items[@intCast(d)] ) - else try p.items[n].sub ( &p.items[n], &p.items[@intCast(d)] ); - d -= @intCast(k); - } - } -} - -fn main() !void { - const s = [_]usize{ 23, 123, 1234, 12345, 123456 }; - var p = Array1.init ( allocator ); - try p.append ( try bigint.initSet ( allocator, 1 ) ); - var i:usize=1; - for ( s )|m|{ - while (i<=m):(i+=1){ - try p.append( try bigint.init(allocator) ); - try calc( i, &p ); - } - print("P({d}) = {d}\n", .{m,p.items[m]} ); - } -} diff --git a/Task/99-bottles-of-beer/8th/99-bottles-of-beer-1.8th b/Task/99-bottles-of-beer/8th/99-bottles-of-beer-1.8th deleted file mode 100644 index f07c88a955..0000000000 --- a/Task/99-bottles-of-beer/8th/99-bottles-of-beer-1.8th +++ /dev/null @@ -1,26 +0,0 @@ -\ 99 bottles of beer on the wall: -[ - "no more bottles" , - "one bottle" , - ( dup . " bottles" ) -] var, bottles - -: .bottles - dup 2 n:min bottles @ caseof ; - -: .beer - .bottles . " of beer" . ; - -: .wall - .beer " on the wall" . ; - -: .take - " Take one down and pass it around" . ; - -: beers - .wall ", " . .beer '; putc cr - n:1- 0 max .take ", " . - .wall '. putc cr drop ; - -' beers 1 99 loop- -bye diff --git a/Task/99-bottles-of-beer/8th/99-bottles-of-beer-2.8th b/Task/99-bottles-of-beer/8th/99-bottles-of-beer-2.8th deleted file mode 100644 index f736dda979..0000000000 --- a/Task/99-bottles-of-beer/8th/99-bottles-of-beer-2.8th +++ /dev/null @@ -1,12 +0,0 @@ -[ - ( "Just one more bottle of beer on the wall, one bottle of beer.\n" . ) , - ( I dup "%d bottles of beer on the wall, %d bottles of beer.\n" s:strfmt . ) -] constant lyrics - -: app:main - ( - dup lyrics [2,99] rot ' n:cmp a:pigeon w:exec - n:1- "Take one down, pass it around, %d bottles of beer on the wall.\n\n" s:strfmt . - ) 1 99 loop- - - "No more bottles of beer on the wall, no more bottles of beer.\n" . ; diff --git a/Task/99-bottles-of-beer/8th/99-bottles-of-beer.8th b/Task/99-bottles-of-beer/8th/99-bottles-of-beer.8th new file mode 100644 index 0000000000..fa816e4a36 --- /dev/null +++ b/Task/99-bottles-of-beer/8th/99-bottles-of-beer.8th @@ -0,0 +1,20 @@ +\ 99 bottles of beer on the wall: +: allout "no more bottles" ; +: just-one "1 bottle" ; +: yeah! dup . " bottles" ; + +[ + ' allout , + ' just-one , + ' yeah! , +] var, bottles + +: .bottles dup 2 n:min bottles @ swap caseof ; +: .beer .bottles . " of beer" . ; +: .wall .beer " on the wall" . ; +: .take " Take one down and pass it around" . ; +: beers .wall ", " . .beer '; putc cr + n:1- 0 max .take ", " . + .wall '. putc cr drop ; + +' beers 1 99 loop- bye diff --git a/Task/99-bottles-of-beer/ALGOL-68/99-bottles-of-beer.alg b/Task/99-bottles-of-beer/ALGOL-68/99-bottles-of-beer.alg index 194eebdb25..5ec893ef5a 100644 --- a/Task/99-bottles-of-beer/ALGOL-68/99-bottles-of-beer.alg +++ b/Task/99-bottles-of-beer/ALGOL-68/99-bottles-of-beer.alg @@ -1,10 +1,8 @@ -FOR bottles FROM 99 BY -1 TO 1 DO - STRING bottles now = whole(bottles,0) + " bottle" + IF bottles = 1 THEN "" ELSE "s" FI; - STRING bottles left = IF bottles = 1 THEN "No more" ELSE whole(bottles-1,0) FI - + " bottle" - + IF bottles = 2 THEN "" ELSE "s" FI; - print((bottles now," of beer on the wall",newline)); - print((bottles now," of beer",newline)); - print(("Take one down, pass it around",newline)); - print((bottles left," of beer on the wall",newline,newline)) -OD +main:( + FOR bottles FROM 99 TO 1 BY -1 DO + printf(($z-d" bottles of beer on the wall"l$, bottles)); + printf(($z-d" bottles of beer"l$, bottles)); + printf(($"Take one down, pass it around"l$)); + printf(($z-d" bottles of beer on the wall"ll$, bottles-1)) + OD +) diff --git a/Task/99-bottles-of-beer/Ada/99-bottles-of-beer-1.adb b/Task/99-bottles-of-beer/Ada/99-bottles-of-beer-1.ada similarity index 100% rename from Task/99-bottles-of-beer/Ada/99-bottles-of-beer-1.adb rename to Task/99-bottles-of-beer/Ada/99-bottles-of-beer-1.ada diff --git a/Task/99-bottles-of-beer/Ada/99-bottles-of-beer-2.adb b/Task/99-bottles-of-beer/Ada/99-bottles-of-beer-2.ada similarity index 100% rename from Task/99-bottles-of-beer/Ada/99-bottles-of-beer-2.adb rename to Task/99-bottles-of-beer/Ada/99-bottles-of-beer-2.ada diff --git a/Task/99-bottles-of-beer/Aria/99-bottles-of-beer.aria b/Task/99-bottles-of-beer/Aria/99-bottles-of-beer.aria deleted file mode 100644 index 7e36393581..0000000000 --- a/Task/99-bottles-of-beer/Aria/99-bottles-of-beer.aria +++ /dev/null @@ -1,48 +0,0 @@ -struct Lyrics { - type func new(n: Int) { - assert n > 0; - return alloc(This) { - .n = n, - }; - } - - func prettyprint() { - val suffix_n = this.n == 1 ? "" : "s"; - val suffix_n_minus_1 = this.n == 2 ? "" : "s"; - return "{0} bottle{2} of beer on the wall, {0} bottle{2} of beer.\nTake one down and pass it around, {1} bottle{3} of beer on the wall.\n".format(this.n, this.n-1, suffix_n, suffix_n_minus_1); - } -} - -struct Song { - type func new(n: Int) { - assert n > 0; - return alloc(This) { - .n = n, - }; - } - - func iterator() { - return this; - } - - func next() { - if this.n == 0 { - return Box(){.done = true}; - } - - val n = this.n; - this.n -= 1; - - return Box() { - .done = false, - .value = Lyrics.new(n), - }; - } -} - -func main() { - val song = Song.new(99); - for verse in song { - println(verse); - } -} diff --git a/Task/99-bottles-of-beer/ArkScript/99-bottles-of-beer.ark b/Task/99-bottles-of-beer/ArkScript/99-bottles-of-beer.ark deleted file mode 100644 index d12274823c..0000000000 --- a/Task/99-bottles-of-beer/ArkScript/99-bottles-of-beer.ark +++ /dev/null @@ -1,24 +0,0 @@ -# try and get an argument from the command line invocation -(let arg - (if (>= (len sys:args) 1) - (toNumber (@ sys:args 0)) - nil)) -# if no argument was passed the default value will be 100 -(let i - (if (nil? arg) - 100 - arg)) - -(let explode-bottles (fun (n) - (if (> n 1) { - (print (string:format "{} Bottles of beer on the wall\n{} bottles of beer\nTake one down, pass it around" n n)) - (print (string:format "{} Bottles of beer on the wall." (- n 1))) - (explode-bottles (- n 1)) }) -(explode-bottles i) - -# alternative solution with a loop -(mut n i) -(while (> n 1) { - (print (string:format "{} Bottles of beer on the wall\n{} bottles of beer\nTake one down, pass it around" n n)) - (set n (- n 1)) - (print (string:format "{} Bottles of beer on the wall." n)) }) diff --git a/Task/99-bottles-of-beer/Arturo/99-bottles-of-beer.arturo b/Task/99-bottles-of-beer/Arturo/99-bottles-of-beer.arturo index a751484f40..36bb34201e 100644 --- a/Task/99-bottles-of-beer/Arturo/99-bottles-of-beer.arturo +++ b/Task/99-bottles-of-beer/Arturo/99-bottles-of-beer.arturo @@ -6,8 +6,9 @@ loop 99..1 'i [ print ~"Take one down, pass it around!" if 1=i-1 -> s: "" - switch i>1 [ + if? i>1 [ print ~"|i-1| bottle|s| of beer on the wall!" print "" - ] -> print "No more bottles of beer on the wall!" + ] + else -> print "No more bottles of beer on the wall!" ] diff --git a/Task/99-bottles-of-beer/Ballerina/99-bottles-of-beer.ballerina b/Task/99-bottles-of-beer/Ballerina/99-bottles-of-beer.ballerina deleted file mode 100644 index d81204e77e..0000000000 --- a/Task/99-bottles-of-beer/Ballerina/99-bottles-of-beer.ballerina +++ /dev/null @@ -1,11 +0,0 @@ -// https://rosettacode.org/wiki/99_bottles_of_beer -import ballerina/io; - -public function main() { - foreach int i in int:range(99, 0, -1) { - io:print(i); io:println(" bottles of beer on the wall"); - io:print(i); io:println(" bottles of beer"); - io:println("Take one down, pass it around"); - io:print(i-1); io:println(" bottles of beer on the wall\n"); - } -} diff --git a/Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-1.cob b/Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-1.cobol similarity index 100% rename from Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-1.cob rename to Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-1.cobol diff --git a/Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-2.cob b/Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-2.cobol similarity index 100% rename from Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-2.cob rename to Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-2.cobol diff --git a/Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-3.cob b/Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-3.cobol similarity index 100% rename from Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-3.cob rename to Task/99-bottles-of-beer/COBOL/99-bottles-of-beer-3.cobol diff --git a/Task/99-bottles-of-beer/Chapel/99-bottles-of-beer.chpl b/Task/99-bottles-of-beer/Chapel/99-bottles-of-beer.chapel similarity index 100% rename from Task/99-bottles-of-beer/Chapel/99-bottles-of-beer.chpl rename to Task/99-bottles-of-beer/Chapel/99-bottles-of-beer.chapel diff --git a/Task/99-bottles-of-beer/Crystal/99-bottles-of-beer.cr b/Task/99-bottles-of-beer/Crystal/99-bottles-of-beer.crystal similarity index 100% rename from Task/99-bottles-of-beer/Crystal/99-bottles-of-beer.cr rename to Task/99-bottles-of-beer/Crystal/99-bottles-of-beer.crystal diff --git a/Task/99-bottles-of-beer/Dart/99-bottles-of-beer.dart b/Task/99-bottles-of-beer/Dart/99-bottles-of-beer.dart index 07a966aa75..3251bd7375 100644 --- a/Task/99-bottles-of-beer/Dart/99-bottles-of-beer.dart +++ b/Task/99-bottles-of-beer/Dart/99-bottles-of-beer.dart @@ -57,3 +57,5 @@ class BeerSong extends Song { return theLyrics; } } + +} diff --git a/Task/99-bottles-of-beer/DuckDB/99-bottles-of-beer-1.duckdb b/Task/99-bottles-of-beer/DuckDB/99-bottles-of-beer-1.duckdb deleted file mode 100644 index 3fe002df2b..0000000000 --- a/Task/99-bottles-of-beer/DuckDB/99-bottles-of-beer-1.duckdb +++ /dev/null @@ -1,13 +0,0 @@ -.header off -.mode list -select list_transform( range(99,-1,-1), - n -> - if (n = 0, - 'No more bottles of beer on the wall' || chr(10) - || 'no more bottles of beer.' || chr(10) - || 'Go to the store, buy some more!' || chr(10) - || '99 bottles of beer on the wall.', - n || ' bottle' || if ( n = 1, '', 's') || ' of beer on the wall' || chr(10) - || n || ' bottle' || if ( n = 1, '', 's') || ' of beer;' || chr(10) - || 'Take one down, pass it around' || chr(10) ) ) - .array_to_string(chr(10)) ; diff --git a/Task/99-bottles-of-beer/DuckDB/99-bottles-of-beer-2.duckdb b/Task/99-bottles-of-beer/DuckDB/99-bottles-of-beer-2.duckdb deleted file mode 100644 index 02dd9eb97c..0000000000 --- a/Task/99-bottles-of-beer/DuckDB/99-bottles-of-beer-2.duckdb +++ /dev/null @@ -1,21 +0,0 @@ -.header off -.mode list - -with recursive cte as ( - select 99 as n, '' as s - union all - select n-1 as n, - if (n = 0, - 'No more bottles of beer on the wall' || chr(10) - || 'no more bottles of beer.' || chr(10) - || 'Go to the store, buy some more!' || chr(10) - || '99 bottles of beer on the wall.', - n || ' bottle' || if ( n = 1, '', 's') || ' of beer on the wall' || chr(10) - || n || ' bottle' || if ( n = 1, '', 's') || ' of beer;' || chr(10) - || 'Take one down, pass it around' || chr(10) ) - from cte - where n > -1 - ) select s - from cte - where s != '' - order by n desc ; diff --git a/Task/99-bottles-of-beer/EMal/99-bottles-of-beer.emal b/Task/99-bottles-of-beer/EMal/99-bottles-of-beer.emal index 4993f8c5ee..7f8bf2daa2 100644 --- a/Task/99-bottles-of-beer/EMal/99-bottles-of-beer.emal +++ b/Task/99-bottles-of-beer/EMal/99-bottles-of-beer.emal @@ -1,28 +1,30 @@ type NinetynineBottles -int DEFAULT_BOTTLES_COUNT ← 99 +int DEFAULT_BOTTLES_COUNT = 99 model int initialBottlesCount, bottlesCount - new by int ←bottlesCount - me.initialBottlesCount ← bottlesCount + new by int =bottlesCount + me.initialBottlesCount = bottlesCount end - fun subject ← <|when(me.bottlesCount æ 1, "bottle", "bottles") - fun bottles ← <|when(me.bottlesCount æ 0, "no more", text!me.bottlesCount) - fun goToWall ← void by block - text line ← me.bottles() + " " + me.subject() + " of beer on the wall, " + + fun subject = <|when(me.bottlesCount == 1, "bottle", "bottles") + fun bottles = <|when(me.bottlesCount == 0, "no more", text!me.bottlesCount) + fun goToWall = void by block + text line = me.bottles() + " " + me.subject() + " of beer on the wall, " + me.bottles() + " " + me.subject() + " of beer." - if me.bottlesCount æ 0 do line[0] ← line[0].upper() end # text can be modified + if me.bottlesCount == 0 do line[0] = line[0].upper() end # text can be modified writeLine(line) end - fun takeOne ← logic by block + fun takeOne = logic by block if --me.bottlesCount < 0 do return false end # cannot take a beer down writeLine("Take one down and pass it around, " + me.bottles() + " " + me.subject() + " of beer on the wall.") writeLine() return true end - fun goToStore ← <|writeLine("Go to the store and buy some more, " + - me.initialBottlesCount + " bottles of beer on the wall.") - fun play ← void by block + fun goToStore = void by block + writeLine("Go to the store and buy some more, " + me.initialBottlesCount + + " bottles of beer on the wall.") + end + fun play = void by block for ever me.goToWall() if not me.takeOne() diff --git a/Task/99-bottles-of-beer/EasyLang/99-bottles-of-beer.easy b/Task/99-bottles-of-beer/EasyLang/99-bottles-of-beer.easy index deabe7c1be..f1f30f9082 100644 --- a/Task/99-bottles-of-beer/EasyLang/99-bottles-of-beer.easy +++ b/Task/99-bottles-of-beer/EasyLang/99-bottles-of-beer.easy @@ -1,15 +1,18 @@ func$ bottle num . - if num = 1 : return "1 bottle" - return num & " bottles" + if num = 1 + return "bottle" + . + return "bottles" . +# i = 99 repeat - print bottle i & " of beer on the wall" - print bottle i & " of beer" + print i & " " & bottle i & " of beer on the wall" + print i & " " & bottle i & " of beer" print "Take one down, pass it around" i -= 1 until i = 0 - print bottle i & " of beer on the wall" + print i & " " & bottle i & " of beer on the wall" print "" . print "No more bottles of beer on the wall" diff --git a/Task/99-bottles-of-beer/Elena/99-bottles-of-beer.elena b/Task/99-bottles-of-beer/Elena/99-bottles-of-beer.elena index 496eaa2e0c..e88bc758db 100644 --- a/Task/99-bottles-of-beer/Elena/99-bottles-of-beer.elena +++ b/Task/99-bottles-of-beer/Elena/99-bottles-of-beer.elena @@ -27,9 +27,9 @@ extension bottleOp }; } -public Program() +public program() { var bottles := 99; - bottles.bottleEnumerator().forEach(PrintingLn) + bottles.bottleEnumerator().forEach(printingLn) } diff --git a/Task/99-bottles-of-beer/Elixir/99-bottles-of-beer-2.ex b/Task/99-bottles-of-beer/Elixir/99-bottles-of-beer-2.ex deleted file mode 100644 index 21f101524c..0000000000 --- a/Task/99-bottles-of-beer/Elixir/99-bottles-of-beer-2.ex +++ /dev/null @@ -1,36 +0,0 @@ -last = [ - """ - 2 bottles of beer on the wall - 2 bottles of beer - Take one down, pass it around - 1 bottle of beer on the wall - """, - """ - 1 bottle of beer on the wall - 1 bottle of beer - Take one down, pass it around - No bottles of beer on the wall - """, - """ - No more bottles of beer on the wall - No more bottles of beer - Go to the store and buy some more - 99 bottles of beer on the wall - """ -] - -skeleton = fn n -> - """ - #{n} bottles of beer on the wall - #{n} bottles of beer - Take one down, pass it around - #{n - 1} bottles of beer on the wall - """ -end - -99..3 -|> Stream.map(skeleton) -|> Stream.concat(last) -|> Enum.intersperse("\n") -|> IO.iodata_to_binary() -|> IO.puts() diff --git a/Task/99-bottles-of-beer/Elixir/99-bottles-of-beer-1.ex b/Task/99-bottles-of-beer/Elixir/99-bottles-of-beer.elixir similarity index 100% rename from Task/99-bottles-of-beer/Elixir/99-bottles-of-beer-1.ex rename to Task/99-bottles-of-beer/Elixir/99-bottles-of-beer.elixir diff --git a/Task/99-bottles-of-beer/Emacs-Lisp/99-bottles-of-beer.el b/Task/99-bottles-of-beer/Emacs-Lisp/99-bottles-of-beer.l similarity index 100% rename from Task/99-bottles-of-beer/Emacs-Lisp/99-bottles-of-beer.el rename to Task/99-bottles-of-beer/Emacs-Lisp/99-bottles-of-beer.l diff --git a/Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-1.eu b/Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-1.euphoria similarity index 100% rename from Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-1.eu rename to Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-1.euphoria diff --git a/Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-2.eu b/Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-2.euphoria similarity index 100% rename from Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-2.eu rename to Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-2.euphoria diff --git a/Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-3.eu b/Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-3.euphoria similarity index 100% rename from Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-3.eu rename to Task/99-bottles-of-beer/Euphoria/99-bottles-of-beer-3.euphoria diff --git a/Task/99-bottles-of-beer/Factor/99-bottles-of-beer-1.factor b/Task/99-bottles-of-beer/Factor/99-bottles-of-beer-1.factor deleted file mode 100644 index 55688df8a7..0000000000 --- a/Task/99-bottles-of-beer/Factor/99-bottles-of-beer-1.factor +++ /dev/null @@ -1,6 +0,0 @@ -USE: math.parser -100 -[ dup 1 - [ >dec " bottles of beer" append [ " on the wall" append ] keep ] bi@ - "Take one down, pass it around" -rot - first CHAR: - = [ 2drop "..." "why's all the rum gone??" ] when ! if leading character is "-" then replace with new string - 4array "\n" join print nl ] each diff --git a/Task/99-bottles-of-beer/Factor/99-bottles-of-beer-2.factor b/Task/99-bottles-of-beer/Factor/99-bottles-of-beer.factor similarity index 100% rename from Task/99-bottles-of-beer/Factor/99-bottles-of-beer-2.factor rename to Task/99-bottles-of-beer/Factor/99-bottles-of-beer.factor diff --git a/Task/99-bottles-of-beer/Goboscript/99-bottles-of-beer.gobo b/Task/99-bottles-of-beer/Goboscript/99-bottles-of-beer.gobo deleted file mode 100644 index 3d8b925c28..0000000000 --- a/Task/99-bottles-of-beer/Goboscript/99-bottles-of-beer.gobo +++ /dev/null @@ -1,44 +0,0 @@ -%include inflator/string - -costumes "assets/blank.svg"; - -func add_bottle(n) { - local s = "s"; - local s2 = "s"; - local n_minus_1 = $n - 1; - local end = "\n"; - - if $n == 1 { - n_minus_1 = "No more"; - s = ""; - end = ""; - } elif $n == 2 { - s2 = ""; - } - - return $n&" bottle"&s&" of beer on the wall\n" & - $n&" bottle"&s&" of beer\n" & - "Take one down, pass it around\n" & - n_minus_1&" bottle"&s2&" of beer on the wall" & end; -} - -proc do_99_bottles_of_beer { - local ret = ""; - local i = 99; - repeat 99 { - ret &= add_bottle(i); - i--; - } - - split ret, "\n"; - i = 1; - repeat length split { - log split[i]; - i++; - } -} - -onflag{main;} -proc main { - do_99_bottles_of_beer; -} diff --git a/Task/99-bottles-of-beer/Haxe/99-bottles-of-beer-1.hx b/Task/99-bottles-of-beer/Haxe/99-bottles-of-beer-1.haxe similarity index 100% rename from Task/99-bottles-of-beer/Haxe/99-bottles-of-beer-1.hx rename to Task/99-bottles-of-beer/Haxe/99-bottles-of-beer-1.haxe diff --git a/Task/99-bottles-of-beer/Haxe/99-bottles-of-beer-2.hx b/Task/99-bottles-of-beer/Haxe/99-bottles-of-beer-2.haxe similarity index 100% rename from Task/99-bottles-of-beer/Haxe/99-bottles-of-beer-2.hx rename to Task/99-bottles-of-beer/Haxe/99-bottles-of-beer-2.haxe diff --git a/Task/99-bottles-of-beer/Java/99-bottles-of-beer-5.java b/Task/99-bottles-of-beer/Java/99-bottles-of-beer-5.java deleted file mode 100644 index 394eb68af8..0000000000 --- a/Task/99-bottles-of-beer/Java/99-bottles-of-beer-5.java +++ /dev/null @@ -1,76 +0,0 @@ -import java.util.Scanner; - -public class NineNineBottles { - static int bottlesOfBeer = 99; - static boolean hasBeer = true; - static Scanner keyboard = new Scanner(System.in); - - public static void main(String[] args) { - beerCheck(); - keyboard.close(); - } - - private static void beerCheck() { - if(hasBeer) { - party(bottlesOfBeer); - } - - if(!hasBeer) { - System.out.println("Your ran out of beer. Would you like to go to the store?: "); - String blurryVision, fallingOver, youAreDrunk; - youAreDrunk = keyboard.nextLine(); - fallingOver = "RUHFO" + youAreDrunk.toLowerCase() + "RUHFOISafhur"; - blurryVision = fallingOver.split("[a-zA-Z]", 2).toString(); - if(blurryVision.contains("y")) - blurryVision = blurryVision.substring(0, 1).toUpperCase(); - System.out.println("You entered: " + blurryVision.toString() + fallingOver); - System.out.println("Did you mean yes?: "); - blurryVision = keyboard.nextLine(); - if(blurryVision.contains("y") || blurryVision.contains("Y") || blurryVision.contains("8") - || blurryVision.contains("2") || blurryVision.equalsIgnoreCase(youAreDrunk)) - {String beRECcheeck = blurryVision.toLowerCase(); - if(beRECcheeck.equals("y")) { - goToStore(); - beerCheck(); - } - } - } - } - - private static void party(int bottlesOfBeer) { - while(bottlesOfBeer > 1) { - putOnWall(bottlesOfBeer); - bottlesOfBeer = takeOneDown(bottlesOfBeer); - } - putLastOnWall(bottlesOfBeer); - } - - private static void putOnWall(int bottlesOfBeer) { - System.out.printf("%d bottles of beer on the wall%n", bottlesOfBeer); - - } - - private static int takeOneDown(int bottlesOfBeer) { - System.out.printf("%d bottles of beer%n", bottlesOfBeer); - System.out.println("Take one down, pass it around"); - bottlesOfBeer--; - putOnWall(bottlesOfBeer); - System.out.println(); - return bottlesOfBeer; - - } - - private static void putLastOnWall(int bottleOfBeer) { - System.out.printf("%d bottle of beer on the wall%n", bottleOfBeer); - System.out.printf("%d bottle of beer%n", bottleOfBeer); - System.out.println("Take it down, pass it around"); - bottleOfBeer--; - System.out.println("No more bottles of beer on the wall."); - hasBeer = false; - } - - private static void goToStore() { - bottlesOfBeer = 99; - hasBeer = true; - } -} diff --git a/Task/99-bottles-of-beer/Julia/99-bottles-of-beer-1.jl b/Task/99-bottles-of-beer/Julia/99-bottles-of-beer-1.julia similarity index 100% rename from Task/99-bottles-of-beer/Julia/99-bottles-of-beer-1.jl rename to Task/99-bottles-of-beer/Julia/99-bottles-of-beer-1.julia diff --git a/Task/99-bottles-of-beer/Julia/99-bottles-of-beer-2.jl b/Task/99-bottles-of-beer/Julia/99-bottles-of-beer-2.julia similarity index 100% rename from Task/99-bottles-of-beer/Julia/99-bottles-of-beer-2.jl rename to Task/99-bottles-of-beer/Julia/99-bottles-of-beer-2.julia diff --git a/Task/99-bottles-of-beer/Julia/99-bottles-of-beer-3.jl b/Task/99-bottles-of-beer/Julia/99-bottles-of-beer-3.julia similarity index 100% rename from Task/99-bottles-of-beer/Julia/99-bottles-of-beer-3.jl rename to Task/99-bottles-of-beer/Julia/99-bottles-of-beer-3.julia diff --git a/Task/99-bottles-of-beer/Kotlin/99-bottles-of-beer.kts b/Task/99-bottles-of-beer/Kotlin/99-bottles-of-beer.kotlin similarity index 100% rename from Task/99-bottles-of-beer/Kotlin/99-bottles-of-beer.kts rename to Task/99-bottles-of-beer/Kotlin/99-bottles-of-beer.kotlin diff --git a/Task/99-bottles-of-beer/Langur/99-bottles-of-beer.langur b/Task/99-bottles-of-beer/Langur/99-bottles-of-beer.langur deleted file mode 100644 index 355e6adcbb..0000000000 --- a/Task/99-bottles-of-beer/Langur/99-bottles-of-beer.langur +++ /dev/null @@ -1,6 +0,0 @@ -for i=99; i>0; i-=1 { - writeln "{{i}} bottles of beer on the wall" - writeln "{{i}} bottles of beer" - writeln "Take one down, pass it around" - writeln "{{i-1}} bottles of beer on the wall\n" -} diff --git a/Task/99-bottles-of-beer/Lua/99-bottles-of-beer-4.lua b/Task/99-bottles-of-beer/Lua/99-bottles-of-beer-4.lua deleted file mode 100644 index 5fdc0aa064..0000000000 --- a/Task/99-bottles-of-beer/Lua/99-bottles-of-beer-4.lua +++ /dev/null @@ -1,13 +0,0 @@ -local bottlesCount = 99 -local word = function(n) return n == 1 and "bottle" or "bottles" end -while bottlesCount do - print (string.format("%d %s of beer on the wall, %d %s of beer", bottlesCount, word(bottlesCount),bottlesCount, word(bottlesCount))) - print ("You take one down, pass it around, ") - bottlesCount = bottlesCount - 1 - if bottlesCount > 0 then - print (string.format("%d %s of beer on the wall", bottlesCount, word(bottlesCount))) - else - print ("No more bottles of beer on the wall.") - end - if bottlesCount == 0 then bottlesCount = false end -- coud use reserved word break instead -end diff --git a/Task/99-bottles-of-beer/Lua/99-bottles-of-beer-5.lua b/Task/99-bottles-of-beer/Lua/99-bottles-of-beer-5.lua deleted file mode 100644 index 8bc69c1a98..0000000000 --- a/Task/99-bottles-of-beer/Lua/99-bottles-of-beer-5.lua +++ /dev/null @@ -1,10 +0,0 @@ -word = function(n) return n == 1 and "bottle" or "bottles" end - -coldOne = function (bottlesCount) - if bottlesCount < 1 then return print ("drunk, eh?") end - if bottlesCount == 1 then return print ("1 bottle of beer and it's mine!") end - print (string.format("%d %s of beer on the wall, %d %s of beer", bottlesCount, word(bottlesCount),bottlesCount, word(bottlesCount))) - print ("You take one down, pass it around, ") - print (string.format("%d %s of beer on the wall", bottlesCount-1, word(bottlesCount-1))) - coldOne ( bottlesCount - 1) -end diff --git a/Task/99-bottles-of-beer/Nutt/99-bottles-of-beer.nutt b/Task/99-bottles-of-beer/Nutt/99-bottles-of-beer.nutt index fcac676e27..ccd2ec6780 100644 --- a/Task/99-bottles-of-beer/Nutt/99-bottles-of-beer.nutt +++ b/Task/99-bottles-of-beer/Nutt/99-bottles-of-beer.nutt @@ -1,8 +1,8 @@ -module main -import $native 'io' : output#sayn +module main imports native.io.output.say -funct main () : () = - [1, 2; 99]#reverse#each { - sayn "\(it) bottles of beer on the wall, \(it) bottles of beer"; - sayn "Take one down and pass it around, \(it# - 1) bottles of beer on the wall." - } +for i|->{1,2..99;<|>) do + say(""+i+" bottles of beer on the wall, "+i+" bottles of beer") + say("Take one down and pass it around, "+(i-1)+" bottles of beer on the wall.") +done + +end diff --git a/Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-1.ml b/Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-1.ocaml similarity index 100% rename from Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-1.ml rename to Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-1.ocaml diff --git a/Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-2.ml b/Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-2.ocaml similarity index 100% rename from Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-2.ml rename to Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-2.ocaml diff --git a/Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-3.ml b/Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-3.ocaml similarity index 100% rename from Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-3.ml rename to Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-3.ocaml diff --git a/Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-4.ml b/Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-4.ocaml similarity index 100% rename from Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-4.ml rename to Task/99-bottles-of-beer/OCaml/99-bottles-of-beer-4.ocaml diff --git a/Task/99-bottles-of-beer/Oxygene/99-bottles-of-beer-2.oxy b/Task/99-bottles-of-beer/Oxygene/99-bottles-of-beer-2.oxy deleted file mode 100644 index 5fc3a8fccb..0000000000 --- a/Task/99-bottles-of-beer/Oxygene/99-bottles-of-beer-2.oxy +++ /dev/null @@ -1,21 +0,0 @@ -namespace _99_beers; - -method bottles(number: Integer): String; -begin -if (number = 1) then - Result := "bottle" - else - Result := "bottles"; -end; - -begin - for n: Integer := 99 downto 1 do - begin - writeLn($"{n} {bottles(n)} of beer on the wall,"); - writeLn($"{n} {bottles(n)} of beer,"); - writeLn($"Take one down, and pass it around,"); - writeLn($"{n-1} {bottles(n-1)} of beer on the wall."); - writeLn(); - end; - readLn; -end. diff --git a/Task/99-bottles-of-beer/Oxygene/99-bottles-of-beer-1.oxy b/Task/99-bottles-of-beer/Oxygene/99-bottles-of-beer.oxy similarity index 100% rename from Task/99-bottles-of-beer/Oxygene/99-bottles-of-beer-1.oxy rename to Task/99-bottles-of-beer/Oxygene/99-bottles-of-beer.oxy diff --git a/Task/99-bottles-of-beer/PascalABC.NET/99-bottles-of-beer-1.pas b/Task/99-bottles-of-beer/PascalABC.NET/99-bottles-of-beer-1.pas deleted file mode 100644 index f455395d06..0000000000 --- a/Task/99-bottles-of-beer/PascalABC.NET/99-bottles-of-beer-1.pas +++ /dev/null @@ -1,10 +0,0 @@ -begin - for var i:=99 to 1 step -1 do - begin - Println(i,'bottles of beer on the wall'); - Println(i,'bottles of beer'); - Println('Take one down, pass it around'); - Println(i-1,'bottles of beer on the wall'); - Println - end; -end. diff --git a/Task/99-bottles-of-beer/PascalABC.NET/99-bottles-of-beer-2.pas b/Task/99-bottles-of-beer/PascalABC.NET/99-bottles-of-beer-2.pas deleted file mode 100644 index 3ce09c9fc9..0000000000 --- a/Task/99-bottles-of-beer/PascalABC.NET/99-bottles-of-beer-2.pas +++ /dev/null @@ -1,10 +0,0 @@ -begin - for var i:=99 to 1 step -1 do - begin - writeLn($'{i} bottles of beer on the wall'); - writeLn($'{i} bottles of beer'); - writeLn($'Take one down, pass it around'); - writeLn($'{i-1}bottles of beer on the wall'); - writeLn - end; -end. diff --git a/Task/99-bottles-of-beer/Plain-English/99-bottles-of-beer.plain b/Task/99-bottles-of-beer/Plain-English/99-bottles-of-beer.plain index 871d7a9918..65fd694264 100644 --- a/Task/99-bottles-of-beer/Plain-English/99-bottles-of-beer.plain +++ b/Task/99-bottles-of-beer/Plain-English/99-bottles-of-beer.plain @@ -1,32 +1,26 @@ To run: - Start up. - Sing 99 of bottles of beer on the wall. - Wait for the escape key. - Shut down. +Start up. +Sing 99 of bottles of beer on the wall. +Wait for the escape key. +Shut down. To sing a number of bottles of beer on the wall: - Put the number into a counter. - Loop. - Write the first line given the counter. - Write the second line given the counter. - Write "Take one down, pass it around" to the console. - Subtract 1 from the counter. - Write the first line given the counter. - If the counter is 0, break. - Write "" on the console. - Repeat. +Put the number into a counter. +Loop. +Write the first line given the counter. +Write the second line given the counter. +Write "Take one down, pass it around" to the console. +Subtract 1 from the counter. +Write the first line given the counter. +If the counter is 0, break. +Write "" on the console. +Repeat. To write the first line given a counter: - If the counter is 0, - Write "No more bottles of beer on the wall" to the console; - Exit. - If the counter is 1, - Write "1 bottle of beer on the wall" to the console; - Exit. - Write the counter then " bottles of beer on the wall" to the console. +If the counter is 0, write "No more bottles of beer on the wall" to the console; exit. +If the counter is 1, write "1 bottle of beer on the wall" to the console; exit. +Write the counter then " bottles of beer on the wall" to the console. To write the second line given a counter: - If the counter is 1, - Write "1 bottle of beer" to the console; - Exit. - Write the counter then " bottles of beer" to the console. +If the counter is 1, write "1 bottle of beer" to the console; exit. +Write the counter then " bottles of beer" to the console. diff --git a/Task/99-bottles-of-beer/Pluto/99-bottles-of-beer.pluto b/Task/99-bottles-of-beer/Pluto/99-bottles-of-beer.pluto deleted file mode 100644 index 1e20d4e1f4..0000000000 --- a/Task/99-bottles-of-beer/Pluto/99-bottles-of-beer.pluto +++ /dev/null @@ -1,12 +0,0 @@ -function pl(n) return n==1?"":"s" end - -function fmt(s) - return $"{s} bottle{pl(s)} of beer on the wall, \n" .. - $"{s} bottle{pl(s)} of beer. \n" .. - $"Take one down, pass it around, \n" .. - $"{s-1} bottle{pl(s-1)} of beer on the wall.\n\n" -end - -for i = 99, 1, -1 do - print(fmt(i)) -end diff --git a/Task/99-bottles-of-beer/Rebol/99-bottles-of-beer-1.rebol b/Task/99-bottles-of-beer/REBOL/99-bottles-of-beer-1.rebol similarity index 100% rename from Task/99-bottles-of-beer/Rebol/99-bottles-of-beer-1.rebol rename to Task/99-bottles-of-beer/REBOL/99-bottles-of-beer-1.rebol diff --git a/Task/99-bottles-of-beer/Rebol/99-bottles-of-beer-2.rebol b/Task/99-bottles-of-beer/REBOL/99-bottles-of-beer-2.rebol similarity index 100% rename from Task/99-bottles-of-beer/Rebol/99-bottles-of-beer-2.rebol rename to Task/99-bottles-of-beer/REBOL/99-bottles-of-beer-2.rebol diff --git a/Task/99-bottles-of-beer/Rebol/99-bottles-of-beer-3.rebol b/Task/99-bottles-of-beer/REBOL/99-bottles-of-beer-3.rebol similarity index 100% rename from Task/99-bottles-of-beer/Rebol/99-bottles-of-beer-3.rebol rename to Task/99-bottles-of-beer/REBOL/99-bottles-of-beer-3.rebol diff --git a/Task/99-bottles-of-beer/Red/99-bottles-of-beer-2.red b/Task/99-bottles-of-beer/Red/99-bottles-of-beer-2.red deleted file mode 100644 index e01dbbd378..0000000000 --- a/Task/99-bottles-of-beer/Red/99-bottles-of-beer-2.red +++ /dev/null @@ -1,21 +0,0 @@ -w: 99 -while [w][ - print [ - reform [ - w x: either 1 < w ["bottles"] ["bottle"] y: "of beer" z: "on the wall" "," - w x y - ] - ] - w: w - 1 - if w = 1 [remove at x length? x] - print [ - "take one down pass it around, " - either 0 < w [ - reform [w x y z] - ][ - w: false reform [ - "no more bottles " y rejoin [z "."] - ] - ] - ] -] diff --git a/Task/99-bottles-of-beer/Red/99-bottles-of-beer-3.red b/Task/99-bottles-of-beer/Red/99-bottles-of-beer-3.red deleted file mode 100644 index 67973dc127..0000000000 --- a/Task/99-bottles-of-beer/Red/99-bottles-of-beer-3.red +++ /dev/null @@ -1,21 +0,0 @@ -cold-one?: function [ - count [integer!] -][ - case [ - count < 1 [return print "drunk, eh?"] - count = 1 [print "1 bottle of beer and it's mine." ] - 'otherwise [ - print [count x: "bottles of beer" y: "on the wall" "," - count x - ] - print [ - "take one down pass it around, " - z: (-1 + count) - either z = 1 [replace x "s" ""][x] - y - ] - ] - ] - cold-one? -1 + count - -] diff --git a/Task/99-bottles-of-beer/Red/99-bottles-of-beer-1.red b/Task/99-bottles-of-beer/Red/99-bottles-of-beer.red similarity index 100% rename from Task/99-bottles-of-beer/Red/99-bottles-of-beer-1.red rename to Task/99-bottles-of-beer/Red/99-bottles-of-beer.red diff --git a/Task/99-bottles-of-beer/Rhombus/99-bottles-of-beer.rhombus b/Task/99-bottles-of-beer/Rhombus/99-bottles-of-beer.rhombus deleted file mode 100644 index b7564c4ae9..0000000000 --- a/Task/99-bottles-of-beer/Rhombus/99-bottles-of-beer.rhombus +++ /dev/null @@ -1,13 +0,0 @@ -#lang rhombus/static - -for (i in 1..100): - fun plural(n :: Int): - if n == 1: - | "" - | "s" - let bottles = 100 - i - println(@str{@(bottles) bottle@(plural(bottles)) of beer on the wall, @(bottles) bottle@(plural(bottles)) of beer.}) - println(@str{Take one down and pass it around, @(bottles - 1) bottle@(plural(bottles - 1)) of beer on the wall.}) - -println("No more bottles of beer on the wall, no more bottles of beer.") -println("Go to the store and buy some more, 99 bottles of beer on the wall.") diff --git a/Task/99-bottles-of-beer/Rust/99-bottles-of-beer-1.rs b/Task/99-bottles-of-beer/Rust/99-bottles-of-beer-1.rust similarity index 100% rename from Task/99-bottles-of-beer/Rust/99-bottles-of-beer-1.rs rename to Task/99-bottles-of-beer/Rust/99-bottles-of-beer-1.rust diff --git a/Task/99-bottles-of-beer/Rust/99-bottles-of-beer-2.rs b/Task/99-bottles-of-beer/Rust/99-bottles-of-beer-2.rust similarity index 100% rename from Task/99-bottles-of-beer/Rust/99-bottles-of-beer-2.rs rename to Task/99-bottles-of-beer/Rust/99-bottles-of-beer-2.rust diff --git a/Task/99-bottles-of-beer/Rye/99-bottles-of-beer.rye b/Task/99-bottles-of-beer/Rye/99-bottles-of-beer.rye deleted file mode 100644 index 0bfe1a8f2d..0000000000 --- a/Task/99-bottles-of-beer/Rye/99-bottles-of-beer.rye +++ /dev/null @@ -1,16 +0,0 @@ -private { - - bottles: fn1 { = 1 |either { "bottle" } { "bottles" } } - verse1: closure { n } { .embed join [ "{} " bottles n " of beer on the wall" ] } - verse2: closure { n } { .embed join [ "{} " bottles n " of beer" ] } - verse3: does { "Take one down and pass it around, " } - - closure { n } { - prn join [ verse1 n ", " verse2 n "." newline verse3 ] - ( n - 1 :m > 0 ) |either - { verse1 m |++ "." |print , beers m } - { print "no more bottles of beer on the wall." } - } -} :beers - -99 |beers diff --git a/Task/99-bottles-of-beer/Scheme/99-bottles-of-beer.scm b/Task/99-bottles-of-beer/Scheme/99-bottles-of-beer.ss similarity index 100% rename from Task/99-bottles-of-beer/Scheme/99-bottles-of-beer.scm rename to Task/99-bottles-of-beer/Scheme/99-bottles-of-beer.ss diff --git a/Task/99-bottles-of-beer/SheerPower-4GL/99-bottles-of-beer.4gl b/Task/99-bottles-of-beer/SheerPower-4GL/99-bottles-of-beer.4gl deleted file mode 100644 index 4f2fa34121..0000000000 --- a/Task/99-bottles-of-beer/SheerPower-4GL/99-bottles-of-beer.4gl +++ /dev/null @@ -1,28 +0,0 @@ -declare integer n% - -for n% = 99 to 1 step -1 - print bottles$(n%); ' of beer on the wall, '; bottles$(n%); ' of beer.' - print 'Take one down and pass it around, '; bottles$(n% - 1); ' of beer on the wall.' - print -next n% - -print 'No more bottles of beer on the wall, no more bottles of beer.' -print 'Go to the store and buy some more, 99 bottles of beer on the wall.' - -! ============================================================================= -! Routine: bottles$(n%) -! -! Return the correct phrase for n% bottles: -! 0 → "no more bottles" -! 1 → "1 bottle" -! 2 or more → " bottles" -! ============================================================================= -routine bottles$(n%) - if n% = 0 then - bottles$ = 'no more bottles' - elseif n% = 1 then - bottles$ = '1 bottle' - else - bottles$ = str$(n%) + ' bottles' - end if -end routine diff --git a/Task/99-bottles-of-beer/Tailspin/99-bottles-of-beer-2.tailspin b/Task/99-bottles-of-beer/Tailspin/99-bottles-of-beer-2.tailspin deleted file mode 100644 index 2925e02e15..0000000000 --- a/Task/99-bottles-of-beer/Tailspin/99-bottles-of-beer-2.tailspin +++ /dev/null @@ -1,16 +0,0 @@ -sayBottleCount templates - when <|=1> do - '1 bottle' ! - when <|=0> do - 'No bottles' ! - otherwise - '$; bottles' ! -end sayBottleCount - -'$:99..1:-1 -> -'$->sayBottleCount; of beer on the wall, -$->sayBottleCount; of beer. -Take one down, pass it around, -$ - 1 -> sayBottleCount; of beer on the wall. - -';' ! diff --git a/Task/99-bottles-of-beer/Tailspin/99-bottles-of-beer-1.tailspin b/Task/99-bottles-of-beer/Tailspin/99-bottles-of-beer.tailspin similarity index 100% rename from Task/99-bottles-of-beer/Tailspin/99-bottles-of-beer-1.tailspin rename to Task/99-bottles-of-beer/Tailspin/99-bottles-of-beer.tailspin diff --git a/Task/99-bottles-of-beer/Uiua/99-bottles-of-beer.uiua b/Task/99-bottles-of-beer/Uiua/99-bottles-of-beer.uiua deleted file mode 100644 index 3909ab4598..0000000000 --- a/Task/99-bottles-of-beer/Uiua/99-bottles-of-beer.uiua +++ /dev/null @@ -1,9 +0,0 @@ -b ← ( - &p $$ _ bottles of beer on the wall - $$ _ bottles of beer - $$ Take one down, pass it around - $$ _ bottles of beer on the wall - $$ -) - -⍚(b.+1.-1) ⇌↘1⇡100 diff --git a/Task/99-bottles-of-beer/Uxntal/99-bottles-of-beer.uxnatl b/Task/99-bottles-of-beer/Uxntal/99-bottles-of-beer.uxnatl index 868c8dd512..2d10b5487c 100644 --- a/Task/99-bottles-of-beer/Uxntal/99-bottles-of-beer.uxnatl +++ b/Task/99-bottles-of-beer/Uxntal/99-bottles-of-beer.uxnatl @@ -1,73 +1,63 @@ -%\n { 0a } %\s { 20 } %\0 { 00 } -%newline { [ LIT2 \n -Console/write ] DEO } -%plural { [ LIT2 "s -Console/write ] DEO } +( uxncli 99bottles.rom ) -|18 @Console/write +|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 -|100 +|0100 ( -> ) + #63 &loop + DUP + [ LIT2 0a -Console/write ] DEO + #01 EQUk ?&done + POP #01 SUB + !&loop + &done BRK -#63 -&loop - DUP print/verse - newline - #01 EQUk ?/done - POP #01 SUB - !/done +@ ( num -- ) + DUP ;dict/wall + DUP [ LIT2 0a -Console/write ] DEO + ;dict/take + #01 SUB ;dict/wall ! - &done - POP2 +@ ( num -- ) + DUP #00 EQU ?&zero + DUP #01 EQU ?&one + ;dict/bottle + [ LIT2 "s -Console/write ] DEO + !&end -BRK - -@print/verse ( num -- ) - DUP /bottle ;msgs/wall /str - DUP /bottle newline - ;msgs/take /str - #01 SUB /bottle ;msgs/wall !/str - -@print/bottle ( num -- ) - DUP #00 EQU ?/bottle/zero - DUP #01 EQU ?/bottle/one - /dec ;msgs/bottle /str - plural - !/bottle/end - - &bottle/one ( num -- ) - /dec ;msgs/bottle /str - !/bottle/end - - &bottle/zero ( num -- ) - POP ;msgs/no-more /str - ;msgs/bottle /str - plural + &one ( num -- ) + ;dict/bottle + !&end + &zero ( num -- ) + POP ;dict/no-more + ;dict/bottle + [ LIT2 "s -Console/write ] DEO + ( >> ) + &end + ;dict/of-beer ( >> ) - &bottle/end - ;msgs/of-beer - ( >> ) - -@print/str ( str -- ) - LDAk .Console/write DEO - INC2 LDAk ?/str +@ ( str -- ) + &loop + LDAk .Console/write DEO + INC2 LDAk ?&loop POP2 JMP2r -@print/dec ( byte -- ) - DUP #64 DIV /dec/try - DUP #0a DIV /dec/try +@ ( byte -- ) + DUP #64 DIV /try + DUP #0a DIV /try ( >> ) - &dec/try/num ( num -- ) - #0a DIVk MUL SUB - [ LIT "0 ] ADD .Console/write DEO - JMP2r +@ ( num -- ) + #0a DIVk MUL SUB + [ LIT "0 ] ADD .Console/write DEO + JMP2r - &dec/try ( num -- ) - DUP ?/dec/try/num + &try ( num -- ) + DUP ? POP JMP2r -@msgs [ - &no-more "No \s "more \0 - &bottle \s "bottle \0 - &of-beer \s "of \s "beer \s \0 - &wall "on \s "the \s "wall \n \0 - &take "Take \s "one \s "down, \s "pass \s "it \s "around \n \0 ] +@dict &no-more "No 20 "more $1 + &bottle 20 "bottle $1 + &of-beer 20 "of 20 "beer 20 $1 + &wall "on 20 "the 20 "wall 0a $1 + &take "Take 20 "one 20 "down, 20 "pass 20 "it 20 "around 0a $1 diff --git a/Task/99-bottles-of-beer/V-(Vlang)/99-bottles-of-beer.v b/Task/99-bottles-of-beer/V-(Vlang)/99-bottles-of-beer.v index 3e3d0cd41d..0490354be6 100644 --- a/Task/99-bottles-of-beer/V-(Vlang)/99-bottles-of-beer.v +++ b/Task/99-bottles-of-beer/V-(Vlang)/99-bottles-of-beer.v @@ -11,6 +11,7 @@ fn verse(beers int) { mut beer := beers - 1 mut numno := beers.str() mut elipsis := "" + if beers == 0 { numno = "No" } println("$numno bottle${plural(beers)} of beer on the wall") println("$numno bottle${plural(beers)} of beer") @@ -19,10 +20,12 @@ fn verse(beers int) { println("To the store, to buy some more") numno = "99" elipsis = "..." + } else { + println("Take one down, pass it around") } - else { println("Take one down, pass it around") } println("$numno bottle${plural(beer)} of beer on the wall${elipsis}") } + // passing time pub fn main() { for beers := 99; beers >= 0; beers-- { diff --git a/Task/99-bottles-of-beer/V/99-bottles-of-beer.v b/Task/99-bottles-of-beer/V/99-bottles-of-beer.v deleted file mode 100644 index 67c9827af0..0000000000 --- a/Task/99-bottles-of-beer/V/99-bottles-of-beer.v +++ /dev/null @@ -1,12 +0,0 @@ -[bottles - [newline '' puts]. - [beer - [0 =] ['No more bottles of beer' put] if - [1 =] ['One bottle of beer' put] if - [1 >] [dup put ' bottles of beer' put] if]. - [0 =] [newline] - [beer ' on the wall, ' put beer newline - 'Take one down and pass it around, ' put pred beer ' on the wall' puts newline] - tailrec]. - -99 bottles diff --git a/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer-1.ys b/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer-1.ys deleted file mode 100644 index 30910edf41..0000000000 --- a/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer-1.ys +++ /dev/null @@ -1,15 +0,0 @@ -!ys-0 - -defn main(number=99): - each num (number .. 1): - say: | - $bottles(num) of beer on the wall, - $bottles(num) of beer. - Take one down, pass it around. - $bottles(num.--) of beer on the wall. - -defn bottles(n): - condp eq n: - 0 :: No more bottles - 1 :: 1 bottle - else : "$n bottles" diff --git a/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer-2.ys b/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer-2.ys deleted file mode 100644 index d830a6c4a7..0000000000 --- a/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer-2.ys +++ /dev/null @@ -1,9 +0,0 @@ -!yamlscript/v0 - -defn main(number=99): - each num (number .. 1): - say: | - $num bottles of beer on the wall, - $num bottles of beer. - Take one down, pass it around. - $(num.--) bottles of beer on the wall. diff --git a/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer.ys b/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer.ys new file mode 100644 index 0000000000..4aa8dbc7b3 --- /dev/null +++ b/Task/99-bottles-of-beer/YAMLScript/99-bottles-of-beer.ys @@ -0,0 +1,22 @@ +#!/usr/bin/env ys-0 + +# Print the verses to "99 Bottles of Beer" +# +# usage: +# ys 99-bottles.ys [] + +defn main(number=99): + each [n (number .. 1)]: + say: paragraph(n) + +defn paragraph(num): | + $bottles(num) of beer on the wall, + $bottles(num) of beer. + Take one down, pass it around. + $bottles(num - 1) of beer on the wall. + +defn bottles(n): + cond: + n == 0 : 'No more bottles' + n == 1 : '1 bottle' + => : "$n bottles" diff --git a/Task/A+B/11l/a+b.11l b/Task/A+B/11l/a+b.11l index fada22ecf1..2eea3c99c2 100644 --- a/Task/A+B/11l/a+b.11l +++ b/Task/A+B/11l/a+b.11l @@ -1 +1 @@ -print(sum(input().split(‘ ’, group_delimiters' 1B).map(Int))) +print(sum(input().split(‘ ’, group_delimiters' 1B).map(i -> Int(i)))) diff --git a/Task/A+B/Ada/a+b-1.adb b/Task/A+B/Ada/a+b-1.ada similarity index 100% rename from Task/A+B/Ada/a+b-1.adb rename to Task/A+B/Ada/a+b-1.ada diff --git a/Task/A+B/Ada/a+b-2.adb b/Task/A+B/Ada/a+b-2.ada similarity index 100% rename from Task/A+B/Ada/a+b-2.adb rename to Task/A+B/Ada/a+b-2.ada diff --git a/Task/A+B/Agena/a+b.agena b/Task/A+B/Agena/a+b.agena index 0ac7496582..5b94875c68 100644 --- a/Task/A+B/Agena/a+b.agena +++ b/Task/A+B/Agena/a+b.agena @@ -1,10 +1,6 @@ scope local f := trim( io.read() ) split " "; # read a line and split into fields - try - local a := tonumber( f[ 1 ] ); - local b := tonumber( f[ 2 ] ); - print( a + b ) - catch in ex then - print( "Unable to add the numbers: ", tostring( ex ) ) - yrt -end + local a := tonumber( f[ 1 ] ); + local b := tonumber( f[ 2 ] ); + print( a + b ) +epocs diff --git a/Task/A+B/ArkScript/a+b.ark b/Task/A+B/ArkScript/a+b.ark deleted file mode 100644 index 71c47670c9..0000000000 --- a/Task/A+B/ArkScript/a+b.ark +++ /dev/null @@ -1,9 +0,0 @@ -(import std.String :split) -(import std.List :map :reduce) - -(let in (input)) -(let numbers (map (split in " ") (fun (t) (toNumber t)))) -(print (reduce numbers (fun (a b) - (if (nil? b) - a - (+ a b))))) diff --git a/Task/A+B/AutoIt/a+b-1.au3 b/Task/A+B/AutoIt/a+b-1.autoit similarity index 100% rename from Task/A+B/AutoIt/a+b-1.au3 rename to Task/A+B/AutoIt/a+b-1.autoit diff --git a/Task/A+B/AutoIt/a+b-2.au3 b/Task/A+B/AutoIt/a+b-2.autoit similarity index 100% rename from Task/A+B/AutoIt/a+b-2.au3 rename to Task/A+B/AutoIt/a+b-2.autoit diff --git a/Task/A+B/Ballerina/a+b.ballerina b/Task/A+B/Ballerina/a+b.ballerina deleted file mode 100644 index 7c90b9d2f5..0000000000 --- a/Task/A+B/Ballerina/a+b.ballerina +++ /dev/null @@ -1,16 +0,0 @@ -import ballerina/io; - -public function main() returns error? { - while true { - io:print("Enter two integers separated by a space : "); - string[] s = re ` `.split(io:readln()); - if s.length() < 2 { - io:println("Insufficient numbers, try again"); - } else { - int a = check int:fromString(s[0]); - int b = check int:fromString(s[1]); - io:println("Their sum is ", a + b, "."); - break; - } - } -} diff --git a/Task/A+B/Batch-File/a+b-3.bat b/Task/A+B/Batch-File/a+b-3.bat index 46420dac6d..f89aab8525 100644 --- a/Task/A+B/Batch-File/a+b-3.bat +++ b/Task/A+B/Batch-File/a+b-3.bat @@ -1 +1,6 @@ -doskey add=setlocal^& set a=$1^& set b=$2^& set /a res=a+b^& endlocal +::aplusb.cmd +@echo off +setlocal +set /a c=%~1 +echo %c% +endlocal diff --git a/Task/A+B/Batch-File/a+b-5.bat b/Task/A+B/Batch-File/a+b-5.bat deleted file mode 100644 index 3f5d39e1f4..0000000000 --- a/Task/A+B/Batch-File/a+b-5.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -setlocal enableextensions -set /p ab= -call :setab %ab% -set /a res=a+b -echo %res% -goto:eof - -:setab -set a=%1 -set b=%2 -goto:eof diff --git a/Task/A+B/Batch-File/a+b-6.bat b/Task/A+B/Batch-File/a+b-6.bat deleted file mode 100644 index 0f331e1554..0000000000 --- a/Task/A+B/Batch-File/a+b-6.bat +++ /dev/null @@ -1,6 +0,0 @@ -@echo off -setlocal enableextensions -set /p ab= -set res=0 -for %%i in (%ab%) do set /a res+=%%i -echo %res% diff --git a/Task/A+B/Binary-Lambda-Calculus/a+b.blc b/Task/A+B/Binary-Lambda-Calculus/a+b.blc deleted file mode 100644 index 4b57e7a05a..0000000000 --- a/Task/A+B/Binary-Lambda-Calculus/a+b.blc +++ /dev/null @@ -1,2 +0,0 @@ -(lambda (augend addend f x) - (augend f (addend f x))) diff --git a/Task/A+B/COBOL/a+b-1.cob b/Task/A+B/COBOL/a+b-1.cobol similarity index 100% rename from Task/A+B/COBOL/a+b-1.cob rename to Task/A+B/COBOL/a+b-1.cobol diff --git a/Task/A+B/COBOL/a+b-2.cob b/Task/A+B/COBOL/a+b-2.cobol similarity index 100% rename from Task/A+B/COBOL/a+b-2.cob rename to Task/A+B/COBOL/a+b-2.cobol diff --git a/Task/A+B/Crystal/a+b-1.cr b/Task/A+B/Crystal/a+b-1.crystal similarity index 100% rename from Task/A+B/Crystal/a+b-1.cr rename to Task/A+B/Crystal/a+b-1.crystal diff --git a/Task/A+B/Crystal/a+b-2.cr b/Task/A+B/Crystal/a+b-2.crystal similarity index 100% rename from Task/A+B/Crystal/a+b-2.cr rename to Task/A+B/Crystal/a+b-2.crystal diff --git a/Task/A+B/Delphi/a+b.pas b/Task/A+B/Delphi/a+b.delphi similarity index 100% rename from Task/A+B/Delphi/a+b.pas rename to Task/A+B/Delphi/a+b.delphi diff --git a/Task/A+B/DuckDB/a+b-1.duckdb b/Task/A+B/DuckDB/a+b-1.duckdb deleted file mode 100644 index 06fc2868f4..0000000000 --- a/Task/A+B/DuckDB/a+b-1.duckdb +++ /dev/null @@ -1,5 +0,0 @@ -.headers off -.mode list -select sum(c::INTEGER) -from (select unnest(regexp_extract_all(content, '[-0-9]+') ) as c - from read_text('rc-a+b.txt') ); diff --git a/Task/A+B/DuckDB/a+b-2.duckdb b/Task/A+B/DuckDB/a+b-2.duckdb deleted file mode 100644 index ce4c1aa6c7..0000000000 --- a/Task/A+B/DuckDB/a+b-2.duckdb +++ /dev/null @@ -1,2 +0,0 @@ -select a+b from (select column0 as a, column1 as b -from read_csv('/dev/stdin', header=false, sep=' ')); diff --git a/Task/A+B/EMal/a+b.emal b/Task/A+B/EMal/a+b.emal index 22106f56f5..c2e2652cab 100644 --- a/Task/A+B/EMal/a+b.emal +++ b/Task/A+B/EMal/a+b.emal @@ -1,15 +1,17 @@ -fun main ← int by List args - text input ← when(args.length æ 1, args[0], ask(text, "Enter n integers separated by a space: ")) +fun main = int by List args + text input = when(args.length == 1, args[0], ask(text, "Enter n integers separated by a space: ")) int sum, count for each text word in input.split(" ") - word ← word.trim() + word = word.trim() if word.isEmpty() do continue end # ignore empty words - int nr ← int!word # this can raise an exception - if abs(nr) > 1000 do error(0, "Integers must be in the interval [-1000, 1000]") end + int nr = int!word # this can raise an exception + if abs(nr) > 1000 + Event.error(0, "Integers must be in the interval [-1000, 1000]").raise() + end sum += nr ++count end - if count < 2 do error(1, "At least two integers must be provided") end + if count < 2 do Event.error(1, "At least two integers must be provided").raise() end writeLine("The sum of " + count + " integers is: " + sum) return 0 end diff --git a/Task/A+B/Ed/a+b.ed b/Task/A+B/Ed/a+b.ed deleted file mode 100644 index fdc4ec064b..0000000000 --- a/Task/A+B/Ed/a+b.ed +++ /dev/null @@ -1,101 +0,0 @@ -H -g/[^0-9]{1,}/s///g -,p -# decimal -> unary -g/^0+([0-9])/s//\1/ -g/^9([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiiii/ -g/^8([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiii/ -g/^7([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiii/ -g/^6([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiii/ -g/^5([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiii/ -g/^4([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiii/ -g/^3([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iii/ -g/^2([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2ii/ -g/^1([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2i/ -g/^0([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2/ -g/^9([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiiii/ -g/^8([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiii/ -g/^7([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiii/ -g/^6([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiii/ -g/^5([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiii/ -g/^4([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiii/ -g/^3([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iii/ -g/^2([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2ii/ -g/^1([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2i/ -g/^0([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2/ -g/^9([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiiii/ -g/^8([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiii/ -g/^7([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiii/ -g/^6([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiii/ -g/^5([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiii/ -g/^4([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiii/ -g/^3([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iii/ -g/^2([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2ii/ -g/^1([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2i/ -g/^0([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2/ -g/^9([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiiii/ -g/^8([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiii/ -g/^7([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiii/ -g/^6([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiii/ -g/^5([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiii/ -g/^4([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiii/ -g/^3([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iii/ -g/^2([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2ii/ -g/^1([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2i/ -g/^0([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2/ -g/^9([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiiii/ -g/^8([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiiii/ -g/^7([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiiii/ -g/^6([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiiii/ -g/^5([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiiii/ -g/^4([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iiii/ -g/^3([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2iii/ -g/^2([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2ii/ -g/^1([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2i/ -g/^0([0-9]*)(i*)/s//\1\2\2\2\2\2\2\2\2\2\2/ -# actual logic -,j -# unary -> decimal (for 0-10000 range) -g/i{9000}(i{0,999})/s//9\1/ -g/i{8000}(i{0,999})/s//8\1/ -g/i{7000}(i{0,999})/s//7\1/ -g/i{6000}(i{0,999})/s//6\1/ -g/i{5000}(i{0,999})/s//5\1/ -g/i{4000}(i{0,999})/s//4\1/ -g/i{3000}(i{0,999})/s//3\1/ -g/i{2000}(i{0,999})/s//2\1/ -g/i{1000}(i{0,999})/s//1\1/ -v/^[0-9]i*$/s/.*/0&/ -g/i{900}(i{0,99})/s//9\1/ -g/i{800}(i{0,99})/s//8\1/ -g/i{700}(i{0,99})/s//7\1/ -g/i{600}(i{0,99})/s//6\1/ -g/i{500}(i{0,99})/s//5\1/ -g/i{400}(i{0,99})/s//4\1/ -g/i{300}(i{0,99})/s//3\1/ -g/i{200}(i{0,99})/s//2\1/ -g/i{100}(i{0,99})/s//1\1/ -v/^[0-9]{2}i*$/s/^([0-9])(i*)$/\10\2/ -g/i{90}(i{0,9})/s//9\1/ -g/i{80}(i{0,9})/s//8\1/ -g/i{70}(i{0,9})/s//7\1/ -g/i{60}(i{0,9})/s//6\1/ -g/i{50}(i{0,9})/s//5\1/ -g/i{40}(i{0,9})/s//4\1/ -g/i{30}(i{0,9})/s//3\1/ -g/i{20}(i{0,9})/s//2\1/ -g/i{10}(i{0,9})/s//1\1/ -v/^[0-9]{3}i*$/s/^([0-9]{2})(i*)$/\10\2/ -g/i{9}/s//9/ -g/i{8}/s//8/ -g/i{7}/s//7/ -g/i{6}/s//6/ -g/i{5}/s//5/ -g/i{4}/s//4/ -g/i{3}/s//3/ -g/i{2}/s//2/ -g/i{1}/s//1/ -v/^[0-9]{4}i*$/s/^([0-9]{3})(i*)$/\10\2/ -g/^0+([0-9])/s//\1/ -,p -Q diff --git a/Task/A+B/Elena/a+b-1.elena b/Task/A+B/Elena/a+b-1.elena index d585433b10..a4c98a1213 100644 --- a/Task/A+B/Elena/a+b-1.elena +++ b/Task/A+B/Elena/a+b-1.elena @@ -1,9 +1,9 @@ import extensions; -public Program() +public program() { - var A := Integer.new(); - var B := Integer.new(); + var A := Integer.new(); + var B := Integer.new(); - Console.loadLine(A,B).printLine(A + B) + console.loadLine(A,B).printLine(A + B) } diff --git a/Task/A+B/Elena/a+b-2.elena b/Task/A+B/Elena/a+b-2.elena index a1042363c6..8097b76574 100644 --- a/Task/A+B/Elena/a+b-2.elena +++ b/Task/A+B/Elena/a+b-2.elena @@ -1,9 +1,9 @@ import system'routines; import extensions; -public Program() +public program() { - Console.printLine(Console.readLine() + console.printLine(console.readLine() .split() .selectBy(mssgconst toInt[1]) .summarize()) diff --git a/Task/A+B/Elixir/a+b.ex b/Task/A+B/Elixir/a+b.elixir similarity index 100% rename from Task/A+B/Elixir/a+b.ex rename to Task/A+B/Elixir/a+b.elixir diff --git a/Task/A+B/Emacs-Lisp/a+b.el b/Task/A+B/Emacs-Lisp/a+b.l similarity index 100% rename from Task/A+B/Emacs-Lisp/a+b.el rename to Task/A+B/Emacs-Lisp/a+b.l diff --git a/Task/A+B/Euphoria/a+b.eu b/Task/A+B/Euphoria/a+b.euphoria similarity index 100% rename from Task/A+B/Euphoria/a+b.eu rename to Task/A+B/Euphoria/a+b.euphoria diff --git a/Task/A+B/Forth/a+b-2.fth b/Task/A+B/Forth/a+b-2.fth deleted file mode 100644 index f83c5b0b46..0000000000 --- a/Task/A+B/Forth/a+b-2.fth +++ /dev/null @@ -1 +0,0 @@ -: addab + cr . cr ; diff --git a/Task/A+B/Forth/a+b-1.fth b/Task/A+B/Forth/a+b.fth similarity index 100% rename from Task/A+B/Forth/a+b-1.fth rename to Task/A+B/Forth/a+b.fth diff --git a/Task/A+B/FutureBasic/a+b-2.basic b/Task/A+B/FutureBasic/a+b-2.basic deleted file mode 100644 index aee4ef9505..0000000000 --- a/Task/A+B/FutureBasic/a+b-2.basic +++ /dev/null @@ -1,15 +0,0 @@ -void local fn InputIntegers - while ( 1 ) - CFStringRef s = input @"", @"0123456789 ", YES - if ( !s ) then end - CFArrayRef a = fn StringComponentsSeparatedByString( s, @" " ) - if ( len(a) != 2 ) then beep : continue - cls : print %(150,95),a[0];@" + ";a[1];@" = ";intval(a[0]) + intval(a[1]) - wend -end fn - -window 1, @"A+B", (0,0,290,200) -textlabel 1, @"Enter two integers separated by space(s).\nPress 'return' to calculate or 'esc' to quit.", (20,160,270,32) -fn InputIntegers - -HandleEvents diff --git a/Task/A+B/FutureBasic/a+b-1.basic b/Task/A+B/FutureBasic/a+b.basic similarity index 100% rename from Task/A+B/FutureBasic/a+b-1.basic rename to Task/A+B/FutureBasic/a+b.basic diff --git a/Task/A+B/Guile/a+b.guile b/Task/A+B/Guile/a+b.guile deleted file mode 100644 index d3ef4f223d..0000000000 --- a/Task/A+B/Guile/a+b.guile +++ /dev/null @@ -1,3 +0,0 @@ -;;;Actually, the solution is same as that of many other Lisp dialects here -(+ (read) (read)) -;;Yes, it is neat but not strong, error prone actually. Other than this walkaround, if you dislike fetching a line in string format then parse the chars one by one by hand or byte by byte from stdin, you can use one read and do the work, with the price of typing (1 2) instead of 1 2 at the prompt since read would treat the input as a symbolic expression. So.,.there is sadly no easy way like scanf and %d %d in c unless one is willing to type ()s! diff --git a/Task/A+B/HPPPL/a+b.hpppl b/Task/A+B/HPPPL/a+b.hpppl deleted file mode 100644 index 068fec62c3..0000000000 --- a/Task/A+B/HPPPL/a+b.hpppl +++ /dev/null @@ -1,6 +0,0 @@ -EXPORT A_plus_B() -BEGIN -LOCAL A, B; -INPUT({A, B}); -PRINT(A + " " + B + " " + (A + B)); -END; diff --git a/Task/A+B/Julia/a+b-1.jl b/Task/A+B/Julia/a+b-1.julia similarity index 100% rename from Task/A+B/Julia/a+b-1.jl rename to Task/A+B/Julia/a+b-1.julia diff --git a/Task/A+B/Julia/a+b-2.jl b/Task/A+B/Julia/a+b-2.julia similarity index 100% rename from Task/A+B/Julia/a+b-2.jl rename to Task/A+B/Julia/a+b-2.julia diff --git a/Task/A+B/Koka/a+b.koka b/Task/A+B/Koka/a+b.koka deleted file mode 100644 index f0f1738e2d..0000000000 --- a/Task/A+B/Koka/a+b.koka +++ /dev/null @@ -1,32 +0,0 @@ -import std/os/readline - -// A prompt effect which retries getting input until a valid result is returned. -effect prompt - ctl delimit(): () // Captures the retry resumption - final ctl fail(): e // A failed input - -// Prompt for input, with retry until successful result -// - `message` is the original prompt -// - `err-message` is the error shown on failure -fun prompt(message: string, err-message: string, action: (string) -> a): a - var reattempt := fn() impossible() // We ensure all paths include a delimiter - with handler - raw ctl delimit() - reattempt := (fn() rcontext.resume(())) // set reattempt resumption - reattempt() // Initial try - final ctl fail() - reattempt() // Handle failure by reattempting - // Print the initial request message - println(message) - delimit() // Mark retry point - try { - action(readline()) // Read the input and apply the action - } fn(err) - // On an exception, print the error message and retry - println(err-message) - fail() // reset - -fun main() - with line <- prompt("Enter two numbers separated by space: ", "Invalid input, please enter two integers.") - val [a, b] = line.split(" ") - a.parse-int.unjust + b.parse-int.unjust diff --git a/Task/A+B/Kotlin/a+b.kts b/Task/A+B/Kotlin/a+b.kotlin similarity index 100% rename from Task/A+B/Kotlin/a+b.kts rename to Task/A+B/Kotlin/a+b.kotlin diff --git a/Task/A+B/LOLCODE/a+b.lol b/Task/A+B/LOLCODE/a+b.lol deleted file mode 100644 index 711b24849b..0000000000 --- a/Task/A+B/LOLCODE/a+b.lol +++ /dev/null @@ -1,9 +0,0 @@ -HAI 1.2 - I HAS A VAR1 ITZ A YARN BTW DECLARE A VARIABLE FOR LATER USE - I HAS A VAR2 ITZ A YARN BTW DECLARE A VARIABLE FOR LATER USE - VISIBLE "NUMBAH 1?" - GIMMEH VAR1 BTW GET INPUT (NUMBER) INTO VARIABLE - VISIBLE "NUMBAH 2?" - GIMMEH VAR2 BTW GET INPUT (NUMBER) INTO VARIABLE - VISIBLE SUM OF VAR1 AN VAR2 -KTHXBYE diff --git a/Task/A+B/Microsoft-Small-Basic/a+b.basic b/Task/A+B/Microsoft-Small-Basic/a+b.basic deleted file mode 100644 index d35e63fe64..0000000000 --- a/Task/A+B/Microsoft-Small-Basic/a+b.basic +++ /dev/null @@ -1,14 +0,0 @@ -getIntegers: -integers = TextWindow.Read() -spacePosition = Text.GetIndexOf(integers, " ") -If spacePosition = 0 Then - TextWindow.WriteLine("Please enter two integers.") - Goto getIntegers -EndIf -A = Text.GetSubText(integers, 1, spacePosition - 1) -B = Text.GetSubTextToEnd(integers, spacePosition + 1) -If A < -1000 Or A > 1000 Or B < -1000 Or B > 1000 Then - TextWindow.WriteLine("Integers are outside the range -1000 to 1000. Try again.") - Goto getIntegers -EndIf -TextWindow.WriteLine(A + B) diff --git a/Task/A+B/Nu/a+b.nu b/Task/A+B/Nu/a+b.nu index 1cb2baca8a..fe56af1ee0 100644 --- a/Task/A+B/Nu/a+b.nu +++ b/Task/A+B/Nu/a+b.nu @@ -1 +1 @@ -input | split words | into int | math sum +input | parse "{a} {b}" | first | values | into int | math sum diff --git a/Task/A+B/Nutt/a+b.nutt b/Task/A+B/Nutt/a+b.nutt index 5b0625667e..50a609c5d5 100644 --- a/Task/A+B/Nutt/a+b.nutt +++ b/Task/A+B/Nutt/a+b.nutt @@ -1,8 +1,7 @@ module main -import $native 'io' [input#hear output#sayn] +imports native.io{input.hear,output.say} -funct main () : () = - val read_int = {(hear ())#to_int#fold {0} {it}}; - val a = read_int (); - val b = read_int (); - sayn (a# + b) +vals a=hear(Int),b=hear(Int) +say(a+b) + +end diff --git a/Task/A+B/OCaml/a+b.ml b/Task/A+B/OCaml/a+b.ocaml similarity index 100% rename from Task/A+B/OCaml/a+b.ml rename to Task/A+B/OCaml/a+b.ocaml diff --git a/Task/A+B/PascalABC.NET/a+b.pas b/Task/A+B/PascalABC.NET/a+b.pas deleted file mode 100644 index ac390aa674..0000000000 --- a/Task/A+B/PascalABC.NET/a+b.pas +++ /dev/null @@ -1,3 +0,0 @@ -## -var (a,b) := ReadInteger2; -Writeln(a + b); diff --git a/Task/A+B/Plain-English/a+b.plain b/Task/A+B/Plain-English/a+b.plain index 4187b423eb..92c92ca2e1 100644 --- a/Task/A+B/Plain-English/a+b.plain +++ b/Task/A+B/Plain-English/a+b.plain @@ -1,42 +1,17 @@ To run: - Start up. - Set up the console. - Write "Type the first number: " to Stdout. - Read a buffer from stdin. - Trim the buffer. - If the buffer is not any integer, - Write "Invalid input. Aborting Operation." - then the CRLF string to StdOut; - Shut down; - Exit. - Write "Type the second number: " to Stdout. - Read a second buffer from stdin. - Trim the second buffer. - If the second buffer is not any integer, - Write "Invalid input. Aborting Operation." - then the CRLF string to StdOut; - Shut down; - Exit. - Convert the buffer to a number. - Convert the second buffer to a second number. - Output the sum of the number and the second number. - Shut down. +Start up. +Read a number from the console. +Read another number from the console. +Output the sum of the number and the other number. +Wait for the escape key. +Shut down. To output the sum of a number and another number: - If the number is not valid, - Write "Invalid input. Aborting Operation." - then the CRLF string to StdOut; - Exit. - If the other number is not valid, - Write "Invalid input. Aborting Operation." - then the CRLF string to StdOut; - Exit. - Add the other number to the number. - Convert the number to a string called result. - Write "The sum is " then the result - then the CRLF string to StdOut. +If the number is not valid, write "Invalid input" to the console; exit. +If the other number is not valid, write "Invalid input" to the console; exit. +Write the number plus the other number then " is the sum." to the console. To decide if a number is valid: - If the number is less than -1000, say no. - If the number is greater than 1000, say no. - Say yes. +If the number is not greater than or equal to -1000, say no. +If the number is not less than or equal to 1000, say no. +Say yes. diff --git a/Task/A+B/Pluto/a+b.pluto b/Task/A+B/Pluto/a+b.pluto deleted file mode 100644 index 974f2e0a29..0000000000 --- a/Task/A+B/Pluto/a+b.pluto +++ /dev/null @@ -1,2 +0,0 @@ -a, b = io.read("*n", "*n") -print(a+b) diff --git a/Task/A+B/PowerShell/a+b-1.ps1 b/Task/A+B/PowerShell/a+b-1.psh similarity index 100% rename from Task/A+B/PowerShell/a+b-1.ps1 rename to Task/A+B/PowerShell/a+b-1.psh diff --git a/Task/A+B/PowerShell/a+b-2.ps1 b/Task/A+B/PowerShell/a+b-2.psh similarity index 100% rename from Task/A+B/PowerShell/a+b-2.ps1 rename to Task/A+B/PowerShell/a+b-2.psh diff --git a/Task/A+B/PowerShell/a+b-3.ps1 b/Task/A+B/PowerShell/a+b-3.psh similarity index 100% rename from Task/A+B/PowerShell/a+b-3.ps1 rename to Task/A+B/PowerShell/a+b-3.psh diff --git a/Task/A+B/PowerShell/a+b-4.ps1 b/Task/A+B/PowerShell/a+b-4.psh similarity index 100% rename from Task/A+B/PowerShell/a+b-4.ps1 rename to Task/A+B/PowerShell/a+b-4.psh diff --git a/Task/A+B/Rebol/a+b.rebol b/Task/A+B/REBOL/a+b.rebol similarity index 100% rename from Task/A+B/Rebol/a+b.rebol rename to Task/A+B/REBOL/a+b.rebol diff --git a/Task/A+B/REXX/a+b-1.rexx b/Task/A+B/REXX/a+b-1.rexx new file mode 100644 index 0000000000..46a34f359e --- /dev/null +++ b/Task/A+B/REXX/a+b-1.rexx @@ -0,0 +1,4 @@ +/*REXX program obtains two numbers from the input stream (the console), shows their sum.*/ +parse pull a b /*obtain two numbers from input stream.*/ +say a+b /*display the sum to the terminal. */ + /*stick a fork in it, we're all done. */ diff --git a/Task/A+B/REXX/a+b-2.rexx b/Task/A+B/REXX/a+b-2.rexx new file mode 100644 index 0000000000..064640ab38 --- /dev/null +++ b/Task/A+B/REXX/a+b-2.rexx @@ -0,0 +1,4 @@ +/*REXX program obtains two numbers from the input stream (the console), shows their sum.*/ +parse pull a b /*obtain two numbers from input stream.*/ +say (a+b) / 1 /*display normalized sum to terminal. */ + /*stick a fork in it, we're all done. */ diff --git a/Task/A+B/REXX/a+b-3.rexx b/Task/A+B/REXX/a+b-3.rexx new file mode 100644 index 0000000000..774178e64d --- /dev/null +++ b/Task/A+B/REXX/a+b-3.rexx @@ -0,0 +1,6 @@ +/*REXX program obtains two numbers from the input stream (the console), shows their sum.*/ +numeric digits 300 /*the default is nine decimal digits.*/ +parse pull a b /*obtain two numbers from input stream.*/ +z= (a+b) / 1 /*add and normalize sum, store it in Z.*/ +say z /*display normalized sum Z to terminal.*/ + /*stick a fork in it, we're all done. */ diff --git a/Task/A+B/REXX/a+b-4.rexx b/Task/A+B/REXX/a+b-4.rexx new file mode 100644 index 0000000000..05e988dfb5 --- /dev/null +++ b/Task/A+B/REXX/a+b-4.rexx @@ -0,0 +1,11 @@ +/*REXX program obtains some numbers from the input stream (the console), shows their sum*/ +numeric digits 1000 /*just in case the user gets ka-razy. */ +say 'enter some numbers to be summed:' /*display a prompt message to terminal.*/ +parse pull y /*obtain all numbers from input stream.*/ +many= words(y) /*obtain the number of numbers entered.*/ +$= 0 /*initialize the sum to zero. */ + do j=1 for many /*process each of the numbers. */ + $= $ + word(y, j) /*add one number to the sum. */ + end /*j*/ + /*stick a fork in it, we're all done. */ +say 'sum of ' many " numbers = " $/1 /*display normalized sum $ to terminal.*/ diff --git a/Task/A+B/REXX/a+b-5.rexx b/Task/A+B/REXX/a+b-5.rexx new file mode 100644 index 0000000000..3aed91ea3f --- /dev/null +++ b/Task/A+B/REXX/a+b-5.rexx @@ -0,0 +1,8 @@ +/*REXX program obtains some numbers from the input stream (the console), shows their sum*/ +numeric digits 1000 /*just in case the user gets ka-razy. */ +say 'enter some numbers to be summed:' /*display a prompt message to terminal.*/ +parse pull y /*obtain all numbers from input stream.*/ +y=space(y) +y=translate(y,'+',' ') +Interpret 's='y +say 'sum of ' many " numbers = " s/1 /*display normalized sum s to terminal.*/ diff --git a/Task/A+B/REXX/a+b.rexx b/Task/A+B/REXX/a+b.rexx deleted file mode 100644 index 787c3a6be7..0000000000 --- a/Task/A+B/REXX/a+b.rexx +++ /dev/null @@ -1,27 +0,0 @@ --- 23 Aug 2025 -include Setting - -say 'A+B' -say version -say -do forever - call Charout, 'REXX ' - pull x - if x = '' then - leave - parse var x a b - say - say 'As given...' - say 'A =' a - say 'B =' b - say 'A+B =' a+b - say - say 'Normalized...' - say 'A =' a/1 - say 'B =' b/1 - say 'A+B =' (a+b)/1 - say -end -exit - -include Abend diff --git a/Task/A+B/Rust/a+b-1.rs b/Task/A+B/Rust/a+b-1.rust similarity index 100% rename from Task/A+B/Rust/a+b-1.rs rename to Task/A+B/Rust/a+b-1.rust diff --git a/Task/A+B/Rust/a+b-2.rs b/Task/A+B/Rust/a+b-2.rust similarity index 100% rename from Task/A+B/Rust/a+b-2.rs rename to Task/A+B/Rust/a+b-2.rust diff --git a/Task/A+B/Rye/a+b-1.rye b/Task/A+B/Rye/a+b-1.rye deleted file mode 100644 index e2cff104bd..0000000000 --- a/Task/A+B/Rye/a+b-1.rye +++ /dev/null @@ -1,5 +0,0 @@ -rye .stdin ; -|Read\string ; "123 321" -|load ; [ 123 321 ] -|apply* ?_+ ; 444 -|print diff --git a/Task/A+B/Rye/a+b-2.rye b/Task/A+B/Rye/a+b-2.rye deleted file mode 100644 index f929e645ca..0000000000 --- a/Task/A+B/Rye/a+b-2.rye +++ /dev/null @@ -1 +0,0 @@ -echo "5 2" | rye -do 'rye .stdin .Read\string .load .apply* ?_+' diff --git a/Task/A+B/Scheme/a+b.scm b/Task/A+B/Scheme/a+b.ss similarity index 100% rename from Task/A+B/Scheme/a+b.scm rename to Task/A+B/Scheme/a+b.ss diff --git a/Task/A+B/TAV/a+b.tav b/Task/A+B/TAV/a+b.tav deleted file mode 100644 index 29b223afca..0000000000 --- a/Task/A+B/TAV/a+b.tav +++ /dev/null @@ -1,6 +0,0 @@ -main(parms):+ - ?# lne =: file () give lines \ void is standard input - ab =: string lne split by many of #Whitespace - a =: string ab[1] as integer - b =: string ab[2] as integer - print a + b diff --git a/Task/A+B/Uiua/a+b.uiua b/Task/A+B/Uiua/a+b.uiua deleted file mode 100644 index 4a62fbacd3..0000000000 --- a/Task/A+B/Uiua/a+b.uiua +++ /dev/null @@ -1,5 +0,0 @@ -/+∵⋕⊜□≠@ .&sc -
    -{{out|input=3 4}} -
    -7
    diff --git a/Task/A+B/VBScript/a+b-1.vbs b/Task/A+B/VBScript/a+b-1.vb
    similarity index 100%
    rename from Task/A+B/VBScript/a+b-1.vbs
    rename to Task/A+B/VBScript/a+b-1.vb
    diff --git a/Task/A+B/VBScript/a+b-2.vbs b/Task/A+B/VBScript/a+b-2.vb
    similarity index 100%
    rename from Task/A+B/VBScript/a+b-2.vbs
    rename to Task/A+B/VBScript/a+b-2.vb
    diff --git a/Task/A+B/VHDL/a+b.vhd b/Task/A+B/VHDL/a+b.vhdl
    similarity index 100%
    rename from Task/A+B/VHDL/a+b.vhd
    rename to Task/A+B/VHDL/a+b.vhdl
    diff --git a/Task/A+B/X86-64-Assembly/a+b.x86-64 b/Task/A+B/X86-64-Assembly/a+b.x86-64
    deleted file mode 100644
    index 6254ca0053..0000000000
    --- a/Task/A+B/X86-64-Assembly/a+b.x86-64
    +++ /dev/null
    @@ -1,150 +0,0 @@
    -format ELF64 executable 3
    -entry start
    -bsize equ 24
    -
    -segment executable readable
    -start:
    -    pop    rdx
    -    cmp    rdx,    1
    -    jg     .getargv0
    -    mov    qword[avar], 0
    -    mov    qword[bvar], 0
    -    jmp    .calculate
    - .getargv0:
    -    pop    rdi
    -    pop    rdi
    -    call   atoq
    -    mov    qword[avar], rax
    -    cmp    rdx,     2
    -    jg     .getargv1
    -    mov    qword[bvar], 0
    -    jmp    .calculate
    - .getargv1:
    -    pop    rdi
    -    call   atoq
    -    mov    qword[bvar], rax
    - .calculate:
    -    xor    rdi,    rdi
    -    add    rdi,    qword[avar]
    -    add    rdi,    qword[bvar]
    -    call   printq
    - .exit0:
    -    mov    rax,    60
    -    xor    rdi,    rdi
    -    syscall
    -
    -atoq:
    -    push r8
    -    push r9
    -    push rdi
    -    push rsi
    -    push rdx
    -    push rcx
    -    xor  rcx, rcx
    -    xor  rax, rax
    -    xor  r8, r8
    -    mov  r9, 1
    -    cmp  byte[rdi], 0
    -    jz  .exit
    -    cmp byte[rdi], '-'
    -    jne .stbegin
    -    mov r9, -1
    -    inc rdi
    -  .stbegin:
    -    cmp byte[rdi], '0'
    -    jl  .return
    -    cmp byte[rdi], '9'
    -    jg  .return
    -  .stloop:
    -    cmp byte[rdi + r8], '0'
    -    jl .calc0
    -    cmp byte[rdi + r8], '9'
    -    jg .calc0
    -    mov sil, byte[rdi + r8]
    -    sub rsi, '0'
    -    push rsi
    -    inc r8
    -    jmp .stloop
    -  .calc0:
    -    xor rcx, rcx
    -    mov rdi,  10
    -    mov rsi, 1
    -  .calc1:
    -    pop rax
    -    mul rsi
    -    add rcx, rax
    -    dec r8
    -    jz  .return
    -    mov rax, rsi
    -    mul rdi
    -    mov rsi, rax
    -    jmp .calc1
    -  .return:
    -    xor rdx, rdx
    -    mov rax, rcx
    -    imul r9
    -  .exit:
    -    pop rcx
    -    pop rdx
    -    pop rsi
    -    pop rdi
    -    pop r9
    -    pop r8
    -    ret
    -
    -printq:
    -    push   r9
    -    push   rdi
    -    push   rsi
    -    push   rdx
    -    mov    rax,    rdi
    -    mov    r9,    bsize
    -    dec    r9
    -    mov    rsi,   10
    -    sub    rsp,   bsize
    -    sub    rax,    0
    -    jns    .stloop
    -    neg    rax
    -  .stloop:
    -    xor    rdx,   rdx
    -    div    rsi
    -    add    dl,   '0'
    -    mov    byte[rsp + r9], dl
    -    sub    rax,    0
    -    jz     .negtest
    -    dec    r9
    -    jmp .stloop
    -  .negtest:
    -    sub    rdi,    0
    -    jns    .printit
    -    dec    r9
    -    mov    byte[rsp + r9], '-'
    -  .printit:
    -    mov    rdx, bsize
    -    sub    rdx, r9
    -    mov    rsi, rsp
    -    add    rsi, r9
    -    mov    rdi, 1
    -    mov    rax, 1
    -    syscall
    -    sub    rsp, 8
    -    mov    byte[rsp], 0x0a
    -    mov    rax, 1
    -    mov    rdi, 1
    -    mov    rsi, rsp
    -    mov    rdx, 1
    -    syscall
    -    add    rsp, 8
    -  .restores:
    -    add    rsp, bsize
    -    mov    rax, rdx
    -    pop    rdx
    -    pop    rsi
    -    pop    rdi
    -    pop    r9
    -  .return:
    -    ret
    -
    -segment readable writable
    -avar: rq 1
    -bvar: rq 1
    diff --git a/Task/A+B/ZED/a+b.zed b/Task/A+B/ZED/a+b.zed
    index b3605ef199..6c28d79b86 100644
    --- a/Task/A+B/ZED/a+b.zed
    +++ b/Task/A+B/ZED/a+b.zed
    @@ -1,14 +1,14 @@
     (A+B)
    -READ AND ADD
    +comment:
     #true
     (+) (read) (read)
     
     (+) one two
    -=========
    +comment:
     #true
     (003) "+" one two
     
     (read)
    -=========
    +comment:
     #true
     (001) "read"
    diff --git a/Task/A+B/Zig/a+b.zig b/Task/A+B/Zig/a+b.zig
    deleted file mode 100644
    index 378622f54f..0000000000
    --- a/Task/A+B/Zig/a+b.zig
    +++ /dev/null
    @@ -1,18 +0,0 @@
    -const std = @import("std");
    -
    -pub fn main() !void {
    -    var buf: [1024]u8 = undefined;
    -    const reader = std.io.getStdIn().reader();
    -    const stdout = std.io.getStdOut().writer();
    -    try stdout.writeAll("Enter two integers separated by a space: ");
    -    const input = try reader.readUntilDelimiter(&buf, '\n');
    -    const text = std.mem.trimRight(u8, input, "\r\n");
    -
    -    var it = std.mem.tokenizeScalar(u8, text, ' ');
    -
    -    const a = try std.fmt.parseInt(i64, it.next().?, 10);
    -    const b = try std.fmt.parseInt(i64, it.next().?, 10);
    -
    -
    -    try stdout.print("{d}\n", .{a + b});
    -}
    diff --git a/Task/ABC-problem/8080-Assembly/abc-problem.8080 b/Task/ABC-problem/8080-Assembly/abc-problem.8080
    index 1c9a496782..e6c7c4d5f4 100644
    --- a/Task/ABC-problem/8080-Assembly/abc-problem.8080
    +++ b/Task/ABC-problem/8080-Assembly/abc-problem.8080
    @@ -1,77 +1,77 @@
    -    org   100h
    -      jmp   test
    -      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    -      ;;; Subroutine 'blocks': takes a $-terminated string in
    -      ;;; DE containing a word, and checks whether it can be
    -      ;;; written with the blocks.
    -      ;;; Returns: carry flag set if word is accepted.
    -      ;;; Uses registers: A, B, D, E, H, L
    -blocks:     push  d     ; Store string pointer
    -      lxi   h,blockslist   ; At the start, all blocks are
    -      lxi   d,blocksavail  ; available
    -      mvi   b,40
    -blocksinit: mov   a,m
    -      stax  d
    -      inx   h
    -      inx   d
    -      dcr   b
    -      jnz   blocksinit
    -      pop   d     ; Restore string pointer
    -blockschar: ldax  d     ; Get current character
    -      cpi   '$'      ; End of string?
    -      stc         ; Set carry flag (accept string)
    -      rz       ; And then we're done
    -      ani   0DFh     ; Make uppercase
    -      lxi   h,blocksavail  ; Is it available?
    -      mvi   b,40
    -blockscheck:   cmp   m
    -      jz blocksaccept   ; Yes, we found it
    -      inx   h     ; Try next available char
    -      dcr   b
    -      jnz   blockscheck
    -      ana   a     ; Char unavailable, clear
    -      ret         ; carry and stop.
    -blocksaccept:  mvi   m,0      ; We've now used this char
    -      mov   a,l      ; And its blockmate
    -      xri   1
    -      mov   l,a
    -      mvi   m,0
    -      inx   d     ; Try next char in string
    -      jmp   blockschar
    -      ;; Note: 'blocksavail' must not cross page boundary
    -blockslist: db 'BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM'
    -blocksavail:   ds 40
    -      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    -      ;;; Test code: run the subroutine on the given words.
    -test:    lxi   h,words
    -doword:     mov   e,m      ; Get pointer to next word
    -      inx   h
    -      mov   d,m
    -      inx   h
    -      mov   a,e      ; If zero, end of word list
    -      ora   d
    -      rz
    -      push  h     ; Save pointer to list
    -      push  d     ; Save pointer to word
    -      mvi   c,9      ; Write word to console
    -      call  5
    -      pop   d     ; Retrieve word ponter
    -      call  blocks      ; Run the 'blocks' routine
    -      lxi   d,yes    ; Say 'yes',
    -      jc yesno    ; if the carry is set.
    -      lxi   d,no     ; Otherwise, say 'no'.
    -yesno:      mvi   c,9
    -      call  5
    -      pop   h     ; Restore list pointer
    -      jmp   doword      ; Do next word
    -yes:     db ': Yes',13,10,'$'
    -no:      db ': No',13,10,'$'
    -words:      dw wrda,wrdbark,wrdbook,wrdtreat,wrdcommon
    -      dw wrdsquad,wrdconfuse,0
    -wrda:    db 'A$'
    -wrdbark: db 'BARK$'
    -wrdbook: db 'BOOK$'
    -wrdtreat:   db 'TREAT$'
    -wrdcommon:  db 'COMMON$'
    -wrdsquad:   db 'SQUAD$'
    -wrdconfuse: db 'CONFUSE$'
    +		org	100h
    +		jmp	test
    +		;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    +		;;; Subroutine 'blocks': takes a $-terminated string in
    +		;;; DE containing a word, and checks whether it can be
    +		;;; written with the blocks.
    +		;;; Returns: carry flag set if word is accepted.
    +		;;; Uses registers: A, B, D, E, H, L
    +blocks:		push	d		; Store string pointer
    +		lxi	h,blockslist	; At the start, all blocks are
    +		lxi	d,blocksavail	; available
    +		mvi	b,40
    +blocksinit:	mov	a,m
    +		stax	d
    +		inx	h
    +		inx	d
    +		dcr	b
    +		jnz	blocksinit
    +		pop	d		; Restore string pointer
    +blockschar:	ldax	d		; Get current character
    +		cpi	'$'		; End of string?
    +		stc			; Set carry flag (accept string)
    +		rz			; And then we're done
    +		ani	0DFh		; Make uppercase
    +		lxi	h,blocksavail	; Is it available?
    +		mvi	b,40
    +blockscheck:	cmp	m
    +		jz	blocksaccept	; Yes, we found it
    +		inx	h		; Try next available char
    +		dcr	b
    +		jnz	blockscheck
    +		ana	a		; Char unavailable, clear
    +		ret			; carry and stop.
    +blocksaccept:	mvi	m,0		; We've now used this char
    +		mov	a,l		; And its blockmate
    +		xri	1
    +		mov	l,a
    +		mvi	m,0
    +		inx	d		; Try next char in string
    +		jmp	blockschar
    +		;; Note: 'blocksavail' must not cross page boundary
    +blockslist:	db	'BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM'
    +blocksavail:	ds	40
    +		;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    +		;;; Test code: run the subroutine on the given words.
    +test:		lxi	h,words
    +doword:		mov	e,m		; Get pointer to next word
    +		inx	h
    +		mov	d,m
    +		inx	h
    +		mov	a,e		; If zero, end of word list
    +		ora	d
    +		rz
    +		push	h		; Save pointer to list
    +		push	d		; Save pointer to word
    +		mvi	c,9		; Write word to console
    +		call	5
    +		pop	d		; Retrieve word ponter
    +		call	blocks		; Run the 'blocks' routine
    +		lxi	d,yes		; Say 'yes',
    +		jc	yesno		; if the carry is set.
    +		lxi	d,no		; Otherwise, say 'no'.
    +yesno:		mvi	c,9
    +		call	5
    +		pop	h		; Restore list pointer
    +		jmp	doword		; Do next word
    +yes:		db	': Yes',13,10,'$'
    +no:		db	': No',13,10,'$'
    +words:		dw	wrda,wrdbark,wrdbook,wrdtreat,wrdcommon
    +		dw	wrdsquad,wrdconfuse,0
    +wrda:		db	'A$'
    +wrdbark:	db	'BARK$'
    +wrdbook:	db	'BOOK$'
    +wrdtreat:	db	'TREAT$'
    +wrdcommon:	db	'COMMON$'
    +wrdsquad:	db	'SQUAD$'
    +wrdconfuse:	db	'CONFUSE$'
    diff --git a/Task/ABC-problem/8086-Assembly/abc-problem.8086 b/Task/ABC-problem/8086-Assembly/abc-problem.8086
    index 260f99738a..ca056dc17a 100644
    --- a/Task/ABC-problem/8086-Assembly/abc-problem.8086
    +++ b/Task/ABC-problem/8086-Assembly/abc-problem.8086
    @@ -1,63 +1,63 @@
    -  cpu   8086
    -   bits  16
    -   org   100h
    -section  .text
    -   jmp   demo
    -   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    -   ;;; Subroutine "blocks": see if the $-terminated string in DS:BX
    -   ;;; can be written with the blocks.
    -   ;;; Returns: carry flag set if word is accepted.
    -   ;;; Uses registers: AL, BX, CX, SI, DI
    -   ;;; Assumes CS=DS=ES
    -blocks:  mov   si,.list ; Set all blocks available
    -   mov   di,.avail
    -   mov   cx,20
    -   rep   movsw
    -.char:   mov   al,[bx]     ; Get current character
    -   inc   bx
    -   cmp   al,'$'      ; Are we at the end?
    -   je .ok      ; Then the string is accepted
    -   mov   cx,40    ; If not, check if block is available
    -   mov   di,.avail
    -   repne scasb
    -   test  cx,cx    ; This clears the carry flag
    -   jz .out     ; If zero, block is not available
    -   dec   di    ; Zero out the block we found
    -   mov   [di],ch     ; CH is guaranteed 0 here
    -   xor   di,1     ; Point at other character on block
    -   mov   [di],ch     ; Zero out that one too.
    -   jmp   .char
    -.ok:  stc
    -.out: ret
    -.list:   db 'BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM'
    -.avail:  db '                                        '
    -   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    -   ;;; Test code: run the subroutine on the given words
    -demo: mov   bp,words
    -wrd:  mov   dx,[bp]     ; Get word
    -   test  dx,dx    ; End of words?
    -   jz stop
    -   mov   ah,9     ; Print word
    -   int   21h
    -   mov   bx,dx    ; Run subroutine
    -   call  blocks
    -   mov   dx,yes      ; Print yes or no depending on carry
    -   jc print
    -   mov   dx,no
    -print:   mov   ah,9
    -   int   21h
    -   inc   bp
    -   inc   bp
    -   jmp   wrd
    -stop: ret
    -section  .data
    -yes:  db ': Yes',13,10,'$'
    -no:   db ': No',13,10,'$'
    -words:   dw .a,.bark,.book,.treat,.cmn,.squad,.confs,0
    -.a:   db 'A$'
    -.bark:   db 'BARK$'
    -.book:   db 'BOOK$'
    -.treat:  db 'TREAT$'
    -.cmn: db 'COMMON$'
    -.squad:  db 'SQUAD$'
    -.confs:  db 'CONFUSE$'
    +	cpu	8086
    +	bits	16
    +	org	100h
    +section	.text
    +	jmp	demo
    +	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    +	;;; Subroutine "blocks": see if the $-terminated string in DS:BX
    +	;;; can be written with the blocks.
    +	;;; Returns: carry flag set if word is accepted.
    +	;;; Uses registers: AL, BX, CX, SI, DI
    +	;;; Assumes CS=DS=ES
    +blocks:	mov	si,.list	; Set all blocks available
    +	mov	di,.avail
    +	mov	cx,20
    +	rep	movsw
    +.char:	mov 	al,[bx]		; Get current character
    +	inc	bx
    +	cmp	al,'$'		; Are we at the end?
    +	je	.ok		; Then the string is accepted
    +	mov	cx,40		; If not, check if block is available
    +	mov	di,.avail
    +	repne	scasb
    +	test	cx,cx		; This clears the carry flag
    +	jz	.out		; If zero, block is not available
    +	dec	di		; Zero out the block we found
    +	mov	[di],ch		; CH is guaranteed 0 here
    +	xor	di,1		; Point at other character on block
    +	mov	[di],ch		; Zero out that one too.
    +	jmp	.char
    +.ok:	stc
    +.out:	ret
    +.list:	db	'BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM'
    +.avail:	db	'                                        '
    +	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    +	;;; Test code: run the subroutine on the given words
    +demo:	mov	bp,words
    +wrd:	mov	dx,[bp]		; Get word
    +	test	dx,dx		; End of words?
    +	jz	stop
    +	mov	ah,9		; Print word
    +	int	21h
    +	mov	bx,dx		; Run subroutine
    +	call	blocks
    +	mov	dx,yes		; Print yes or no depending on carry
    +	jc	print
    +	mov	dx,no
    +print:	mov	ah,9
    +	int	21h
    +	inc	bp
    +	inc	bp
    +	jmp	wrd
    +stop:	ret
    +section	.data
    +yes:	db	': Yes',13,10,'$'
    +no:	db	': No',13,10,'$'
    +words:	dw	.a,.bark,.book,.treat,.cmn,.squad,.confs,0
    +.a:	db	'A$'
    +.bark:	db	'BARK$'
    +.book:	db	'BOOK$'
    +.treat:	db	'TREAT$'
    +.cmn:	db	'COMMON$'
    +.squad:	db	'SQUAD$'
    +.confs:	db	'CONFUSE$'
    diff --git a/Task/ABC-problem/8th/abc-problem.8th b/Task/ABC-problem/8th/abc-problem.8th
    index 6869fcd656..f5b7f80c51 100644
    --- a/Task/ABC-problem/8th/abc-problem.8th
    +++ b/Task/ABC-problem/8th/abc-problem.8th
    @@ -171,8 +171,8 @@ var ix
       ' chkokpath s:each                          \ | path
       rdrop                                       \
       success @                                   \ success
    -   if                                          \
    -     break                                     \
    +	if                                          \
    +	  break                                     \
       then
       ;
     
    diff --git a/Task/ABC-problem/ALGOL-68/abc-problem.alg b/Task/ABC-problem/ALGOL-68/abc-problem.alg
    index 11c3a41ade..524af00c33 100644
    --- a/Task/ABC-problem/ALGOL-68/abc-problem.alg
    +++ b/Task/ABC-problem/ALGOL-68/abc-problem.alg
    @@ -1,14 +1,21 @@
    -# ABC problem:                                                               #
     # determine whether we can spell words with a set of blocks                  #
     
    +# construct the list of blocks                                               #
    +[][]STRING blocks = ( ( "B", "O" ), ( "X", "K" ), ( "D", "Q" ), ( "C", "P" )
    +                    , ( "N", "A" ), ( "G", "T" ), ( "R", "E" ), ( "T", "G" )
    +                    , ( "Q", "D" ), ( "F", "S" ), ( "J", "W" ), ( "H", "U" )
    +                    , ( "V", "I" ), ( "A", "N" ), ( "O", "B" ), ( "E", "R" )
    +                    , ( "F", "S" ), ( "L", "Y" ), ( "P", "C" ), ( "Z", "M" )
    +                    );
    +
     # Returns TRUE if we can spell the word using the blocks, FALSE otherwise    #
     # Returns TRUE for an empty string                                           #
    -PROC can spell = ( STRING word, [][]STRING block set )BOOL:
    +PROC can spell = ( STRING word, [][]STRING blocks )BOOL:
         BEGIN
     
             # construct a set of flags to indicate whether the blocks are used   #
             # or not                                                             #
    -        [ 1 LWB block set : 1 UPB block set ]BOOL used;
    +        [ 1 LWB blocks : 1 UPB blocks ]BOOL used;
             FOR block pos FROM LWB used TO UPB used
             DO
                 used[ block pos ] := FALSE
    @@ -27,11 +34,11 @@ PROC can spell = ( STRING word, [][]STRING block set )BOOL:
     
                 # look through the unused blocks for the current letter          #
                 BOOL found := FALSE;
    -            FOR block pos FROM 1 LWB block set TO 1 UPB block set
    +            FOR block pos FROM 1 LWB blocks TO 1 UPB blocks
                 WHILE NOT found
                 DO
    -                IF  (  c = block set[ block pos ][ 1 ][ 1 ]
    -                    OR c = block set[ block pos ][ 2 ][ 1 ]
    +                IF  (  c = blocks[ block pos ][ 1 ][ 1 ]
    +                    OR c = blocks[ block pos ][ 2 ][ 1 ]
                         )
                     AND NOT used[ block pos ]
                     THEN
    @@ -49,33 +56,25 @@ PROC can spell = ( STRING word, [][]STRING block set )BOOL:
         END; # can spell #
     
     
    -# main # (
    -
    -    [][]STRING abc blocks # construct the list of blocks                     #
    -                  = ( ( "B", "O" ), ( "X", "K" ), ( "D", "Q" ), ( "C", "P" )
    -                    , ( "N", "A" ), ( "G", "T" ), ( "R", "E" ), ( "T", "G" )
    -                    , ( "Q", "D" ), ( "F", "S" ), ( "J", "W" ), ( "H", "U" )
    -                    , ( "V", "I" ), ( "A", "N" ), ( "O", "B" ), ( "E", "R" )
    -                    , ( "F", "S" ), ( "L", "Y" ), ( "P", "C" ), ( "Z", "M" )
    -                    );
    +main: (
     
         # test the can spell procedure                                           #
    -    PROC test can spell = ( STRING word, [][]STRING block set )VOID:
    +    PROC test can spell = ( STRING word, [][]STRING blocks )VOID:
             write( ( ( "can spell: """
                      + word
                      + """ -> "
    -                 + IF can spell( word, block set ) THEN "yes" ELSE "no" FI
    +                 + IF can spell( word, blocks ) THEN "yes" ELSE "no" FI
                      )
                    , newline
                    )
                  );
     
    -    test can spell( "A",       abc blocks );
    -    test can spell( "BaRK",    abc blocks );
    -    test can spell( "BOOK",    abc blocks );
    -    test can spell( "TREAT",   abc blocks );
    -    test can spell( "COMMON",  abc blocks );
    -    test can spell( "SQUAD",   abc blocks );
    -    test can spell( "CONFUSE", abc blocks )
    +    test can spell( "A",       blocks );
    +    test can spell( "BaRK",    blocks );
    +    test can spell( "BOOK",    blocks );
    +    test can spell( "TREAT",   blocks );
    +    test can spell( "COMMON",  blocks );
    +    test can spell( "SQUAD",   blocks );
    +    test can spell( "CONFUSE", blocks )
     
     )
    diff --git a/Task/ABC-problem/Ada/abc-problem.adb b/Task/ABC-problem/Ada/abc-problem.ada
    similarity index 100%
    rename from Task/ABC-problem/Ada/abc-problem.adb
    rename to Task/ABC-problem/Ada/abc-problem.ada
    diff --git a/Task/ABC-problem/Arturo/abc-problem.arturo b/Task/ABC-problem/Arturo/abc-problem.arturo
    index 5365095039..7ec68fd2ef 100644
    --- a/Task/ABC-problem/Arturo/abc-problem.arturo
    +++ b/Task/ABC-problem/Arturo/abc-problem.arturo
    @@ -16,8 +16,8 @@ canMakeWord?: function [wrd][
         ref: new blocks
         loop split wrd 'chr [
             cib: charInBlock chr ref
    -        switch cib = ø [ return false ]
    -                       [ ref: remove ref .index cib ]
    +        if? cib = ø [ return false ]
    +        else        [ ref: remove ref .index cib ]
         ]
         return true
     ]
    diff --git a/Task/ABC-problem/AutoHotkey/abc-problem-1.ahk b/Task/ABC-problem/AutoHotkey/abc-problem-1.ahk
    index d92688964d..448f692c2b 100644
    --- a/Task/ABC-problem/AutoHotkey/abc-problem-1.ahk
    +++ b/Task/ABC-problem/AutoHotkey/abc-problem-1.ahk
    @@ -1,24 +1,24 @@
     isWordPossible(blocks, word){
    -   o := {}
    -   loop, parse, blocks, `n, `r
    -      o.Insert(A_LoopField)
    -   loop, parse, word
    -      if !(r := isWordPossible_contains(o, A_LoopField, word))
    -         return 0
    -   return 1
    +	o := {}
    +	loop, parse, blocks, `n, `r
    +		o.Insert(A_LoopField)
    +	loop, parse, word
    +		if !(r := isWordPossible_contains(o, A_LoopField, word))
    +			return 0
    +	return 1
     }
     isWordPossible_contains(byref o, letter, word){
    -   loop 2 {
    -      for k,v in o
    -         if Instr(v,letter)
    -         {
    -            StringReplace, op, v,% letter
    -            if RegExMatch(op, "[" word "]")
    -               sap := k
    -            else added := 1 , sap := k
    -            if added
    -               return "1" o.remove(sap)
    -         }
    -      added := 1
    -   }
    +	loop 2 {
    +		for k,v in o
    +			if Instr(v,letter)
    +			{
    +				StringReplace, op, v,% letter
    +				if RegExMatch(op, "[" word "]")
    +					sap := k
    +				else added := 1 , sap := k
    +				if added
    +					return "1" o.remove(sap)
    +			}
    +		added := 1
    +	}
     }
    diff --git a/Task/ABC-problem/AutoHotkey/abc-problem-2.ahk b/Task/ABC-problem/AutoHotkey/abc-problem-2.ahk
    index c68d69b1f4..dff93522ac 100644
    --- a/Task/ABC-problem/AutoHotkey/abc-problem-2.ahk
    +++ b/Task/ABC-problem/AutoHotkey/abc-problem-2.ahk
    @@ -34,5 +34,5 @@ CONFUSE
     )"
     
     loop, parse, wordlist, `n
    -   out .= A_LoopField " - " isWordPossible(blocks, A_LoopField) "`n"
    +	out .= A_LoopField " - " isWordPossible(blocks, A_LoopField) "`n"
     msgbox % out
    diff --git a/Task/ABC-problem/BASIC256/abc-problem.basic b/Task/ABC-problem/BASIC256/abc-problem.basic
    index 9458ea9532..e448382b74 100644
    --- a/Task/ABC-problem/BASIC256/abc-problem.basic
    +++ b/Task/ABC-problem/BASIC256/abc-problem.basic
    @@ -5,42 +5,42 @@ b         = int((length(blocks$) /3) +  1)
     dim blk$(b)
     
     for i = 1 to length(makeWord$)
    -   wrd$ = word$(makeWord$,i,",")
    -   dim hit(b)
    -   n = 0
    -   if wrd$ = "" then exit for
    -   for k = 1 to length(wrd$)
    -      w$ = upper(mid(wrd$,k,1))
    -      for j = 1 to b
    -         if hit[j] = 0 then
    -            if w$ = left(word$(blocks$,j,","),1) or w$ = right(word$(blocks$,j,","),1) then
    -               hit[j] = 1
    -               n += 1
    -               exit for
    -            end if
    -         end if
    -      next j
    -   next k
    -   print wrd$; chr(9);
    -   if n = length(wrd$) then print " True" else print " False"
    +	wrd$ = word$(makeWord$,i,",")
    +	dim hit(b)
    +	n = 0
    +	if wrd$ = "" then exit for
    +	for k = 1 to length(wrd$)
    +		w$ = upper(mid(wrd$,k,1))
    +		for j = 1 to b
    +			if hit[j] = 0 then
    +				if w$ = left(word$(blocks$,j,","),1) or w$ = right(word$(blocks$,j,","),1) then
    +					hit[j] = 1
    +					n += 1
    +					exit for
    +				end if
    +			end if
    +		next j
    +	next k
    +	print wrd$; chr(9);
    +	if n = length(wrd$) then print " True" else print " False"
     next i
     end
     
     function word$(sr$, wn, delim$)
    -   j = wn
    -   if j = 0 then j += 1
    -   res$ = "" : s$ = sr$ : d$ = delim$
    -   if d$ = "" then d$ = " "
    -   sd = length(d$) : sl = length(s$)
    -   while true
    -      n = instr(s$,d$) : j -= 1
    -      if j = 0 then
    -         if n = 0 then res$ = s$ else res$ = mid(s$,1,n-1)
    -         return res$
    -      end if
    -      if n = 0 then return res$
    -      if n = sl - sd then res$ = "" : return res$
    -      sl2 = sl-n : s$ = mid(s$,n+1,sl2) : sl = sl2
    -   end while
    -   return res$
    +	j = wn
    +	if j = 0 then j += 1
    +	res$ = "" : s$ = sr$ : d$ = delim$
    +	if d$ = "" then d$ = " "
    +	sd = length(d$) : sl = length(s$)
    +	while true
    +		n = instr(s$,d$) : j -= 1
    +		if j = 0 then
    +			if n = 0 then res$ = s$ else res$ = mid(s$,1,n-1)
    +			return res$
    +		end if
    +		if n = 0 then return res$
    +		if n = sl - sd then res$ = "" : return res$
    +		sl2 = sl-n : s$ = mid(s$,n+1,sl2) : sl = sl2
    +	end while
    +	return res$
     end function
    diff --git a/Task/ABC-problem/Ballerina/abc-problem.ballerina b/Task/ABC-problem/Ballerina/abc-problem.ballerina
    deleted file mode 100644
    index 6210e2d24b..0000000000
    --- a/Task/ABC-problem/Ballerina/abc-problem.ballerina
    +++ /dev/null
    @@ -1,32 +0,0 @@
    -import ballerina/io;
    -
    -function r(string word, string[] bl) returns boolean {
    -    if word == "" { return true; }
    -    int c = word[0].toBytes()[0] | 32;
    -   foreach int i in 0.. blocks =
    -   new List() { "bo", "xk", "dq", "cp", "na", "gt", "re", "tg", "qd", "fs",
    -      "jw", "hu", "vi", "an", "ob", "er", "fs", "ly", "pc", "zm" };
    -   List words = new List() {
    -      "A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "CONFUSE"};
    -
    -   var solver = new ABC(blocks);
    -
    -   foreach( var word in words)
    -   {
    -      Console.WriteLine("{0} :{1}", word, solver.CanMake(word));
    -   }
    +	List blocks =
    +	new List() { "bo", "xk", "dq", "cp", "na", "gt", "re", "tg", "qd", "fs",
    +		"jw", "hu", "vi", "an", "ob", "er", "fs", "ly", "pc", "zm" };
    +	List words = new List() {
    +		"A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "CONFUSE"};
    +	
    +	var solver = new ABC(blocks);
    +	
    +	foreach( var word in words)
    +	{
    +		Console.WriteLine("{0} :{1}", word, solver.CanMake(word));
    +	}
     }
     
     class ABC
     {
    -   readonly Dictionary> _blockDict = new Dictionary>();
    -   bool[] _used;
    -   int _nextBlock;
    +	readonly Dictionary> _blockDict = new Dictionary>();
    +	bool[] _used;
    +	int _nextBlock;
     
    -   readonly List _blocks;
    +	readonly List _blocks;
     
    -   private void AddBlockChar(char c)
    -   {
    -      if (!_blockDict.ContainsKey(c))
    -      {
    -         _blockDict[c] = new List();
    -      }
    -      _blockDict[c].Add(_nextBlock);
    -   }
    +	private void AddBlockChar(char c)
    +	{
    +		if (!_blockDict.ContainsKey(c))
    +		{
    +			_blockDict[c] = new List();
    +		}
    +		_blockDict[c].Add(_nextBlock);
    +	}
     
    -   private void AddBlock(string block)
    -   {
    -      AddBlockChar(block[0]);
    -      AddBlockChar(block[1]);
    -      _nextBlock++;
    -   }
    +	private void AddBlock(string block)
    +	{
    +		AddBlockChar(block[0]);
    +		AddBlockChar(block[1]);
    +		_nextBlock++;
    +	}
     
    -   public ABC(List blocks)
    -   {
    -      _blocks = blocks;
    -      foreach (var block in blocks)
    -      {
    -         AddBlock(block);
    -      }
    -   }
    +	public ABC(List blocks)
    +	{
    +		_blocks = blocks;
    +		foreach (var block in blocks)
    +		{
    +			AddBlock(block);
    +		}
    +	}
     
    -   public bool CanMake(string word)
    -   {
    -      word = word.ToLower();
    -      if (word.Length > _blockDict.Count)
    -      {
    -         return false;
    -      }
    -      _used = new bool[_blocks.Count];
    -      return TryMake(word);
    -   }
    +	public bool CanMake(string word)
    +	{
    +		word = word.ToLower();
    +		if (word.Length > _blockDict.Count)
    +		{
    +			return false;
    +		}
    +		_used = new bool[_blocks.Count];
    +		return TryMake(word);
    +	}
     
    -   public bool TryMake(string word)
    -   {
    -      if (word == string.Empty)
    -      {
    -         return true;
    -      }
    -      var blocks = _blockDict[word[0]].Where(b => !_used[b]);
    -      foreach (var block in blocks)
    -      {
    -         _used[block] = true;
    -         if (TryMake(word.Substring(1)))
    -         {
    -            return true;
    -         }
    -         _used[block] = false;
    -      }
    -      return false;
    -   }
    +	public bool TryMake(string word)
    +	{
    +		if (word == string.Empty)
    +		{
    +			return true;
    +		}
    +		var blocks = _blockDict[word[0]].Where(b => !_used[b]);
    +		foreach (var block in blocks)
    +		{
    +			_used[block] = true;
    +			if (TryMake(word.Substring(1)))
    +			{
    +				return true;
    +			}
    +			_used[block] = false;
    +		}
    +		return false;
    +	}
     }
    diff --git a/Task/ABC-problem/C/abc-problem.c b/Task/ABC-problem/C/abc-problem.c
    index 6e248837a9..0a798cd2c4 100644
    --- a/Task/ABC-problem/C/abc-problem.c
    +++ b/Task/ABC-problem/C/abc-problem.c
    @@ -3,39 +3,39 @@
     
     int can_make_words(char **b, char *word)
     {
    -   int i, ret = 0, c = toupper(*word);
    +	int i, ret = 0, c = toupper(*word);
     
     #define SWAP(a, b) if (a != b) { char * tmp = a; a = b; b = tmp; }
     
    -   if (!c) return 1;
    -   if (!b[0]) return 0;
    +	if (!c) return 1;
    +	if (!b[0]) return 0;
     
    -   for (i = 0; b[i] && !ret; i++) {
    -      if (b[i][0] != c && b[i][1] != c) continue;
    -      SWAP(b[i], b[0]);
    -      ret = can_make_words(b + 1, word + 1);
    -      SWAP(b[i], b[0]);
    -   }
    +	for (i = 0; b[i] && !ret; i++) {
    +		if (b[i][0] != c && b[i][1] != c) continue;
    +		SWAP(b[i], b[0]);
    +		ret = can_make_words(b + 1, word + 1);
    +		SWAP(b[i], b[0]);
    +	}
     
    -   return ret;
    +	return ret;
     }
     
     int main(void)
     {
    -   char* blocks[] = {
    -      "BO", "XK", "DQ", "CP", "NA",
    -      "GT", "RE", "TG", "QD", "FS",
    -      "JW", "HU", "VI", "AN", "OB",
    -      "ER", "FS", "LY", "PC", "ZM",
    -      0 };
    +	char* blocks[] = {
    +		"BO", "XK", "DQ", "CP", "NA",
    +		"GT", "RE", "TG", "QD", "FS",
    +		"JW", "HU", "VI", "AN", "OB",
    +		"ER", "FS", "LY", "PC", "ZM",
    +		0 };
     
    -   char *words[] = {
    -      "", "A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "Confuse", 0
    -   };
    +	char *words[] = {
    +		"", "A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "Confuse", 0
    +	};
     
    -   char **w;
    -   for (w = words; *w; w++)
    -      printf("%s\t%d\n", *w, can_make_words(blocks, *w));
    +	char **w;
    +	for (w = words; *w; w++)
    +		printf("%s\t%d\n", *w, can_make_words(blocks, *w));
     
    -   return 0;
    +	return 0;
     }
    diff --git a/Task/ABC-problem/COBOL/abc-problem.cob b/Task/ABC-problem/COBOL/abc-problem.cob
    deleted file mode 100644
    index 7c1b0e20c6..0000000000
    --- a/Task/ABC-problem/COBOL/abc-problem.cob
    +++ /dev/null
    @@ -1,64 +0,0 @@
    -       IDENTIFICATION DIVISION.
    -       PROGRAM-ID. ABC-PROBLEM.
    -
    -       DATA DIVISION.
    -       WORKING-STORAGE SECTION.
    -       01 INPUT-DATA.
    -          03 BLOCK-SET          PIC X(40) VALUE
    -                        'BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM'.
    -          03 WORD-DATA.
    -             05 FILLER          PIC X(7) VALUE 'A'.
    -             05 FILLER          PIC X(7) VALUE 'BARK'.
    -             05 FILLER          PIC X(7) VALUE 'BOOK'.
    -             05 FILLER          PIC X(7) VALUE 'TREAT'.
    -             05 FILLER          PIC X(7) VALUE 'COMMON'.
    -             05 FILLER          PIC X(7) VALUE 'SQUAD'.
    -             05 FILLER          PIC X(7) VALUE 'CONFUSE'.
    -          03 WORDS              PIC X(7) OCCURS 7 TIMES, INDEXED BY W,
    -                                REDEFINES WORD-DATA.
    -
    -       01 OUTPUT-LINE.
    -          03 OUT-WORD           PIC X(7).
    -          03 FILLER             PIC XX VALUE ': '.
    -          03 RESULT             PIC X(3).
    -          03 FOO                PIC 999.
    -
    -       01 VARIABLES.
    -          03 BLOCK-SET          PIC X(40).
    -          03 BLOCKS             OCCURS 20 TIMES, INDEXED BY B,
    -                                REDEFINES BLOCK-SET.
    -             05 FACE-A          PIC X.
    -             05 FACE-B          PIC X.
    -          03 WORD.
    -             05 LETTERS         PIC X OCCURS 7 TIMES, INDEXED BY L.
    -          03 FAIL-FLAG          PIC X.
    -             88 FAILED          VALUE 'X'.
    -
    -       PROCEDURE DIVISION.
    -       BEGIN.
    -           PERFORM CHECK-WORD VARYING W FROM 1 BY 1
    -           UNTIL W IS GREATER THAN 7.
    -           STOP RUN.
    -
    -       CHECK-WORD.
    -           MOVE BLOCK-SET OF INPUT-DATA TO BLOCK-SET OF VARIABLES.
    -
    -           MOVE WORDS(W) TO WORD.
    -           SET L TO 1.
    -           MOVE SPACE TO FAIL-FLAG.
    -           PERFORM CHECK-LETTER VARYING L FROM 1 BY 1
    -               UNTIL FAILED
    -               OR L IS GREATER THAN 7
    -               OR LETTERS(L) IS EQUAL TO SPACE.
    -
    -           MOVE WORDS(W) TO OUT-WORD.
    -           IF FAILED, MOVE 'NO' TO RESULT, ELSE MOVE 'YES' TO RESULT.
    -           DISPLAY OUTPUT-LINE.
    -
    -       CHECK-LETTER.
    -           SET B TO 1.
    -           SEARCH BLOCKS VARYING B
    -               AT END
    -                   MOVE 'X' TO FAIL-FLAG
    -               WHEN LETTERS(L) IS EQUAL TO FACE-A(B) OR FACE-B(B)
    -                   MOVE SPACES TO BLOCKS(B).
    diff --git a/Task/ABC-problem/Component-Pascal/abc-problem.pas b/Task/ABC-problem/Component-Pascal/abc-problem.pas
    index caa5e1d04f..1f278709b7 100644
    --- a/Task/ABC-problem/Component-Pascal/abc-problem.pas
    +++ b/Task/ABC-problem/Component-Pascal/abc-problem.pas
    @@ -1,84 +1,84 @@
     MODULE ABCProblem;
     IMPORT
    -   StdLog, DevCommanders, TextMappers;
    +	StdLog, DevCommanders, TextMappers;
     CONST
    -   notfound = -1;
    -TYPE
    -   String = ARRAY 3 OF CHAR;
    +	notfound = -1;
    +TYPE	
    +	String = ARRAY 3 OF CHAR;
     VAR
    -   blocks : ARRAY 20 OF String;
    -
    +	blocks : ARRAY 20 OF String;
    +	
     PROCEDURE Check(s: ARRAY OF CHAR): BOOLEAN;
     VAR
    -   used: SET;
    -   i,blockIndex: INTEGER;
    -
    -   PROCEDURE GetBlockFor(c: CHAR): INTEGER;
    -   VAR
    -      i: INTEGER;
    -   BEGIN
    -      c := CAP(c);
    -      i := 0;
    -      WHILE (i < LEN(blocks)) DO
    -         IF (c = blocks[i][0]) OR (c = blocks[i][1]) THEN
    -            IF ~(i IN used) THEN RETURN i END
    -         END;
    -         INC(i)
    -      END;
    -      RETURN notfound
    -   END GetBlockFor;
    -
    +	used: SET;
    +	i,blockIndex: INTEGER;
    +	
    +	PROCEDURE GetBlockFor(c: CHAR): INTEGER;
    +	VAR
    +		i: INTEGER;
    +	BEGIN
    +		c := CAP(c);
    +		i := 0;
    +		WHILE (i < LEN(blocks)) DO
    +			IF (c = blocks[i][0]) OR (c = blocks[i][1]) THEN
    +				IF ~(i IN used) THEN RETURN i END
    +			END;
    +			INC(i)
    +		END;
    +		RETURN notfound
    +	END GetBlockFor;
    +	
     BEGIN
    -   used := {};
    -   FOR i := 0 TO LEN(s$) - 1 DO
    -      blockIndex := GetBlockFor(s[i]);
    -      IF blockIndex = notfound THEN
    -         RETURN FALSE
    -      ELSE
    -         INCL(used,blockIndex)
    -      END
    -   END;
    -   RETURN TRUE
    -END Check;
    +	used := {};
    +	FOR i := 0 TO LEN(s$) - 1 DO
    +		blockIndex := GetBlockFor(s[i]);
    +		IF blockIndex = notfound THEN
    +			RETURN FALSE
    +		ELSE
    +			INCL(used,blockIndex)
    +		END
    +	END;
    +	RETURN TRUE
    +END Check;	
     
     PROCEDURE CanMakeWord*;
     VAR
    -   s: TextMappers.Scanner;
    +	s: TextMappers.Scanner;
     BEGIN
    -   s.ConnectTo(DevCommanders.par.text);
    -   s.SetPos(DevCommanders.par.beg);
    -   s.Scan;
    -   WHILE (~s.rider.eot) DO
    -      IF (s.type = TextMappers.char) & (s.char = '~') THEN
    -         RETURN
    -      ELSIF (s.type = TextMappers.string) THEN
    -         StdLog.String(s.string);StdLog.String(":> ");
    -         StdLog.Bool(Check(s.string));StdLog.Ln
    -      END;
    -      s.Scan
    -   END
    +	s.ConnectTo(DevCommanders.par.text);
    +	s.SetPos(DevCommanders.par.beg);
    +	s.Scan;
    +	WHILE (~s.rider.eot) DO
    +		IF (s.type = TextMappers.char) & (s.char = '~') THEN
    +			RETURN
    +		ELSIF (s.type = TextMappers.string) THEN
    +			StdLog.String(s.string);StdLog.String(":> ");
    +			StdLog.Bool(Check(s.string));StdLog.Ln
    +		END;
    +		s.Scan
    +	END
     END CanMakeWord;
     
     BEGIN
    -   blocks[0] := "BO";
    -   blocks[1] := "XK";
    -   blocks[2] := "DQ";
    -   blocks[3] := "CP";
    -   blocks[4] := "NA";
    -   blocks[5] := "GT";
    -   blocks[6] := "RE";
    -   blocks[7] := "TG";
    -   blocks[8] := "QD";
    -   blocks[9] := "FS";
    -   blocks[10] := "JW";
    -   blocks[11] := "HU";
    -   blocks[12] := "VI";
    -   blocks[13] := "AN";
    -   blocks[14] := "OB";
    -   blocks[15] := "ER";
    -   blocks[16] := "FS";
    -   blocks[17] := "LY";
    -   blocks[18] := "PC";
    -   blocks[19] := "ZM";
    -
    +	blocks[0] := "BO";
    +	blocks[1] := "XK";
    +	blocks[2] := "DQ";
    +	blocks[3] := "CP";
    +	blocks[4] := "NA";
    +	blocks[5] := "GT";
    +	blocks[6] := "RE";
    +	blocks[7] := "TG";
    +	blocks[8] := "QD";
    +	blocks[9] := "FS";
    +	blocks[10] := "JW";
    +	blocks[11] := "HU";
    +	blocks[12] := "VI";
    +	blocks[13] := "AN";
    +	blocks[14] := "OB";
    +	blocks[15] := "ER";
    +	blocks[16] := "FS";
    +	blocks[17] := "LY";
    +	blocks[18] := "PC";
    +	blocks[19] := "ZM";
    +	
     END ABCProblem.
    diff --git a/Task/ABC-problem/Crystal/abc-problem.cr b/Task/ABC-problem/Crystal/abc-problem.cr
    deleted file mode 100644
    index 5f3ec7d4ff..0000000000
    --- a/Task/ABC-problem/Crystal/abc-problem.cr
    +++ /dev/null
    @@ -1,17 +0,0 @@
    -def can_make_word? (word, blocks, i=0)
    -  return true if word.empty?
    -  ch = word[0].upcase
    -  blocks.each_with_index do |block, idx|
    -    if ch.in? block.upcase
    -      return true if can_make_word? word[1..], blocks[...idx] + blocks[(idx+1)..], i+1
    -    end
    -  end
    -  false
    -end
    -
    -blocks = "BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM".split
    -
    -["A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "CONFUSE"].each do |word|
    -  print word, " -> ", can_make_word?(word, blocks), "\n"
    -end
    -print "abba", " -> ", can_make_word?("abba", ["AB", "AB", "AC", "AC"]), "\n"
    diff --git a/Task/ABC-problem/Delphi/abc-problem.pas b/Task/ABC-problem/Delphi/abc-problem.delphi
    similarity index 100%
    rename from Task/ABC-problem/Delphi/abc-problem.pas
    rename to Task/ABC-problem/Delphi/abc-problem.delphi
    diff --git a/Task/ABC-problem/DuckDB/abc-problem.duckdb b/Task/ABC-problem/DuckDB/abc-problem.duckdb
    deleted file mode 100644
    index 0856cd977f..0000000000
    --- a/Task/ABC-problem/DuckDB/abc-problem.duckdb
    +++ /dev/null
    @@ -1,45 +0,0 @@
    -CREATE OR REPLACE FUNCTION matches(block, letter) as (
    -  block[1] = letter or block[2] = letter
    -);
    -
    -# permute(lst, n, word) generates sub-permutations, perm (of length n), of the list lst,
    -# that satisfy matches(perm[i], word[i]), for i in range(1, n+1).
    -# Normally n = length(word).
    -# The caller is responsible for ensuring appropriate adjustment of typographical case.
    -CREATE OR REPLACE FUNCTION permute(lst, n, word) as table (
    -  WITH RECURSIVE permute(perm, remaining) as (
    -    -- base case
    -    SELECT
    -        []::VARCHAR[] as perm,
    -        lst::VARCHAR[] as remaining
    -    UNION ALL
    -    -- recursive case: add one element from remaining to perm and remove it from remaining
    -    SELECT
    -        (perm || [element]) AS perm,
    -        (remaining[1:i-1] || remaining[i+1:]) AS remaining
    -    FROM (select *, unnest(remaining) AS element, generate_subscripts(remaining,1) as i
    -          FROM permute)
    -    WHERE length(perm) < n
    -          and matches(element, word[1 + length(perm)])
    -  )
    -  SELECT perm
    -  FROM permute
    -  WHERE length(perm) = n
    -);
    -
    -# All solutions
    -CREATE OR REPLACE FUNCTION solve(word) as table (
    -  from permute(
    -    ['BO', 'XK', 'DQ', 'CP', 'NA', 'GT', 'RE', 'TG', 'QD', 'FS',
    -     'JW', 'HU', 'VI', 'AN', 'OB', 'ER', 'FS', 'LY', 'PC', 'ZM'],
    -    length(word), upper(word) )
    -);
    -
    -CREATE OR REPLACE FUNCTION one_solution(word) as (
    -  from solve(word)
    -  limit 1
    -);
    -
    -# Examples
    -select word, one_solution(word)
    -from (select unnest(['','A','BarK','BOOK','TREAT','COMMON','SQUAD','Confuse','abba']) as word);
    diff --git a/Task/ABC-problem/EMal/abc-problem.emal b/Task/ABC-problem/EMal/abc-problem.emal
    deleted file mode 100644
    index 66f28bfaa3..0000000000
    --- a/Task/ABC-problem/EMal/abc-problem.emal
    +++ /dev/null
    @@ -1,28 +0,0 @@
    -List words ← text["", "A", "Bark", "book", "TREAT", "COMMON", "SQuAd", "CONFUSE"]
    -List checks ← logic[true, true, true, false, true, false, true, true]
    -fun canMakeWord ← logic by text word
    -  if word.length æ 0 do return true end
    -  List wblocks ← text[
    -    "BO", "XK", "DQ", "CP", "NA",
    -    "GT", "RE", "TG", "QD", "FS",
    -    "JW", "HU", "VI", "AN", "OB",
    -    "ER", "FS", "LY", "PC", "ZM"]
    -  for each text ch in word.upper().split()
    -    logic found ← false
    -    for each text wblock in wblocks
    -      if wblock.find(ch) ≥ 0
    -        wblocks[wblockIndex] ← Text.EMPTY
    -        found ← true
    -        break
    -      end
    -    end
    -    if not found do return false end
    -  end
    -  return true
    -end
    -writeLine("word".padEnd(11, " "), "|", "canMakeWord", "|", "isCorrect")
    -for each text word in words
    -  writeLine(word.padEnd(11, " "), "|",
    -    (text!canMakeWord(word)).padEnd(11, " "), "|",
    -   (canMakeWord(word) æ checks[wordIndex]))
    -end
    diff --git a/Task/ABC-problem/EasyLang/abc-problem.easy b/Task/ABC-problem/EasyLang/abc-problem.easy
    index 3ce60e223b..4f51ed99d3 100644
    --- a/Task/ABC-problem/EasyLang/abc-problem.easy
    +++ b/Task/ABC-problem/EasyLang/abc-problem.easy
    @@ -2,7 +2,7 @@ b$[][] = [ [ "B" "O" ] [ "X" "K" ] [ "D" "Q" ] [ "C" "P" ] [ "N" "A" ] [ "G" "T"
     len b[] len b$[][]
     global w$[] cnt .
     #
    -proc backtr wi .
    +proc backtr wi . .
        if wi > len w$[]
           cnt += 1
           return
    diff --git a/Task/ABC-problem/EchoLisp/abc-problem.l b/Task/ABC-problem/EchoLisp/abc-problem.l
    index 1eca19b9fd..20f3578009 100644
    --- a/Task/ABC-problem/EchoLisp/abc-problem.l
    +++ b/Task/ABC-problem/EchoLisp/abc-problem.l
    @@ -1,15 +1,16 @@
     (lib 'list) ;; list-delete
     
     (define BLOCKS '("BO" "XK" "DQ" "CP" "NA" "GT" "RE" "TG" "QD" "FS"
    -        "JW" "HU" "VI" "AN" "OB" "ER" "FS" "LY" "PC" "ZM" ))
    -
    +	     "JW" "HU" "VI" "AN" "OB" "ER" "FS" "LY" "PC" "ZM" ))
    +	
     (define WORDS '("A" "BARK" "BOOK" "TREAT" "COMMON" "SQUAD" "CONFUSE"))
    -
    +	
     (define (spell word blocks)
         (cond
    -   ((string-empty? word) #t)
    -   ((empty? blocks) #f)
    -   (else
    -   (for/or [(block blocks)]
    -      #:continue (not (string-match block (string-first word)))
    -      (spell (string-rest word) (list-delete blocks block))))))
    +	((string-empty? word) #t)
    +	((empty? blocks) #f)
    +	(else
    +	(for/or [(block blocks)]
    +		#:continue (not (string-match block (string-first word)))
    +		(spell (string-rest word) (list-delete blocks block))))))
    +				
    diff --git a/Task/ABC-problem/Elena/abc-problem.elena b/Task/ABC-problem/Elena/abc-problem.elena
    index 4b068c9957..99216ac706 100644
    --- a/Task/ABC-problem/Elena/abc-problem.elena
    +++ b/Task/ABC-problem/Elena/abc-problem.elena
    @@ -27,20 +27,20 @@ extension op
         }
     }
     
    -public Program()
    +public program()
     {
    -    auto blocks := new const string[]{"BO", "XK", "DQ", "CP", "NA",
    -      "GT", "RE", "TG", "QD", "FS",
    -      "JW", "HU", "VI", "AN", "OB",
    -      "ER", "FS", "LY", "PC", "ZM"};
    +    var blocks := new string[]{"BO", "XK", "DQ", "CP", "NA",
    +		"GT", "RE", "TG", "QD", "FS",
    +		"JW", "HU", "VI", "AN", "OB",
    +		"ER", "FS", "LY", "PC", "ZM"};
     
    -    auto words := new const string[]{"", "A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "Confuse"};
    +    var words := new string[]{"", "A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "Confuse"};
     
         Enumerator e := words.enumerator();
         e.next();
     
         words.forEach::(word)
         {
    -        Console.printLine("can make '",word,"' : ",word.canMakeWordFrom(blocks));
    +        console.printLine("can make '",word,"' : ",word.canMakeWordFrom(blocks));
         }
     }
    diff --git a/Task/ABC-problem/Elixir/abc-problem.ex b/Task/ABC-problem/Elixir/abc-problem.elixir
    similarity index 100%
    rename from Task/ABC-problem/Elixir/abc-problem.ex
    rename to Task/ABC-problem/Elixir/abc-problem.elixir
    diff --git a/Task/ABC-problem/Euphoria/abc-problem.eu b/Task/ABC-problem/Euphoria/abc-problem.eu
    deleted file mode 100644
    index be5498a568..0000000000
    --- a/Task/ABC-problem/Euphoria/abc-problem.eu
    +++ /dev/null
    @@ -1,35 +0,0 @@
    -include std/text.e
    -
    -sequence blocks = {{'B','O'},{'X','K'},{'D','Q'},{'C','P'},{'N','A'},
    -                   {'G','T'},{'R','E'},{'T','G'},{'Q','D'},{'F','S'},
    -                   {'J','W'},{'H','U'},{'V','I'},{'A','N'},{'O','B'},
    -                   {'E','R'},{'F','S'},{'L','Y'},{'P','C'},{'Z','M'}}
    -sequence words = {"A","BarK","BOOK","TrEaT","COMMON","SQUAD","CONFUSE"}
    -
    -sequence current_word
    -sequence temp
    -integer matches
    -
    -for i = 1 to length(words) do
    -   current_word = upper(words[i])
    -   temp = blocks
    -   matches = 0
    -   for j = 1 to length(current_word) do
    -      for k = 1 to length(temp) do
    -         if find(current_word[j],temp[k]) then
    -            temp = remove(temp,k)
    -            matches += 1
    -            exit
    -         end if
    -      end for
    -      if length(current_word) = matches then
    -         printf(1,"%s: TRUE\n",{words[i]})
    -         exit
    -      end if
    -   end for
    -   if length(current_word) != matches then
    -      printf(1,"%s: FALSE\n",{words[i]})
    -   end if
    -end for
    -
    -if getc(0) then end if
    diff --git a/Task/ABC-problem/Euphoria/abc-problem.euphoria b/Task/ABC-problem/Euphoria/abc-problem.euphoria
    new file mode 100644
    index 0000000000..efa3352600
    --- /dev/null
    +++ b/Task/ABC-problem/Euphoria/abc-problem.euphoria
    @@ -0,0 +1,35 @@
    +include std/text.e
    +
    +sequence blocks = {{'B','O'},{'X','K'},{'D','Q'},{'C','P'},{'N','A'},
    +                   {'G','T'},{'R','E'},{'T','G'},{'Q','D'},{'F','S'},
    +                   {'J','W'},{'H','U'},{'V','I'},{'A','N'},{'O','B'},
    +                   {'E','R'},{'F','S'},{'L','Y'},{'P','C'},{'Z','M'}}
    +sequence words = {"A","BarK","BOOK","TrEaT","COMMON","SQUAD","CONFUSE"}
    +
    +sequence current_word
    +sequence temp
    +integer matches
    +
    +for i = 1 to length(words) do
    +	current_word = upper(words[i])
    +	temp = blocks
    +	matches = 0
    +	for j = 1 to length(current_word) do
    +		for k = 1 to length(temp) do
    +			if find(current_word[j],temp[k]) then
    +				temp = remove(temp,k)
    +				matches += 1
    +				exit
    +			end if
    +		end for
    +		if length(current_word) = matches then
    +			printf(1,"%s: TRUE\n",{words[i]})
    +			exit
    +		end if
    +	end for
    +	if length(current_word) != matches then
    +		printf(1,"%s: FALSE\n",{words[i]})
    +	end if
    +end for
    +
    +if getc(0) then end if
    diff --git a/Task/ABC-problem/FBSL/abc-problem.fbsl b/Task/ABC-problem/FBSL/abc-problem.fbsl
    index 1ef125fe0f..9c34a6ea72 100644
    --- a/Task/ABC-problem/FBSL/abc-problem.fbsl
    +++ b/Task/ABC-problem/FBSL/abc-problem.fbsl
    @@ -1,44 +1,44 @@
     #APPTYPE CONSOLE
     SUB MAIN()
    -   BlockCheck("A")
    -   BlockCheck("BARK")
    -   BlockCheck("BooK")
    -   BlockCheck("TrEaT")
    -   BlockCheck("comMON")
    -   BlockCheck("sQuAd")
    -   BlockCheck("Confuse")
    -   pause
    +	BlockCheck("A")
    +	BlockCheck("BARK")
    +	BlockCheck("BooK")
    +	BlockCheck("TrEaT")
    +	BlockCheck("comMON")
    +	BlockCheck("sQuAd")
    +	BlockCheck("Confuse")
    +	pause
     END SUB
     
     FUNCTION BlockCheck(str)
    -   print str " " iif( Blockable( str ), "can", "cannot" ) " be spelled with blocks."
    +	print str " " iif( Blockable( str ), "can", "cannot" ) " be spelled with blocks."
     END FUNCTION
     
     FUNCTION Blockable(str AS STRING)
    -   DIM blocks AS STRING = "BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM"
    -   DIM C AS STRING = ""
    -   DIM POS AS INTEGER = 0
    -
    -   FOR DIM I = 1 TO LEN(str)
    -      C = str{i}
    -      POS = INSTR(BLOCKS, C, 0, 1) 'case insensitive
    -      IF POS > 0 THEN
    -         'if the pos is odd, it's the first of the pair
    -         IF POS MOD 2 = 1 THEN
    -            'so clear the first and the second
    -            poke(@blocks + pos - 1," ")
    -            poke(@blocks + pos," ")
    -         'otherwise, it's the last of the pair
    -         ELSE
    -            'clear the second and the first
    -            poke(@blocks + pos - 1," ")
    -            poke(@blocks + pos - 2," ")
    -         END IF
    -      ELSE
    -      'not found, so can't be spelled
    -      RETURN FALSE
    -      END IF
    -   NEXT
    -   'got thru to here, so can be spelled
    -   RETURN TRUE
    +	DIM blocks AS STRING = "BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM"
    +	DIM C AS STRING = ""
    +	DIM POS AS INTEGER = 0
    +	
    +	FOR DIM I = 1 TO LEN(str)
    +		C = str{i}
    +		POS = INSTR(BLOCKS, C, 0, 1) 'case insensitive
    +		IF POS > 0 THEN
    +			'if the pos is odd, it's the first of the pair
    +			IF POS MOD 2 = 1 THEN
    +				'so clear the first and the second
    +				poke(@blocks + pos - 1," ")
    +				poke(@blocks + pos," ")
    +			'otherwise, it's the last of the pair	
    +			ELSE
    +				'clear the second and the first
    +				poke(@blocks + pos - 1," ")
    +				poke(@blocks + pos - 2," ")
    +			END IF
    +		ELSE
    +		'not found, so can't be spelled
    +		RETURN FALSE
    +		END IF
    +	NEXT
    +	'got thru to here, so can be spelled
    +	RETURN TRUE
     END FUNCTION
    diff --git a/Task/ABC-problem/Fortran/abc-problem-2.f b/Task/ABC-problem/Fortran/abc-problem-2.f
    index 186802c418..0c0d917d24 100644
    --- a/Task/ABC-problem/Fortran/abc-problem-2.f
    +++ b/Task/ABC-problem/Fortran/abc-problem-2.f
    @@ -1,264 +1,264 @@
    -      MODULE PLAYPEN !Messes with a set of alphabet blocks.
    -       INTEGER MSG      !Output unit number.
    -       PARAMETER (MSG = 6) !Standard output.
    -       INTEGER MS    !I dislike unidentified constants...
    -       PARAMETER (MS = 2)  !So this is the maximum number of lettered sides.
    -       INTEGER LETTER(26),SUPPLY(26)   !For counting the alphabet.
    +      MODULE PLAYPEN	!Messes with a set of alphabet blocks.
    +       INTEGER MSG		!Output unit number.
    +       PARAMETER (MSG = 6)	!Standard output.
    +       INTEGER MS		!I dislike unidentified constants...
    +       PARAMETER (MS = 2)	!So this is the maximum number of lettered sides.
    +       INTEGER LETTER(26),SUPPLY(26)	!For counting the alphabet.
            CONTAINS
    -        SUBROUTINE SWAP(I,J)  !This really should be known to the compiler.
    -         INTEGER I,J,K     !Which could generate in-place code,
    -          K = I         !Using registers, maybe.
    -          I = J         !Or maybe, there are special op-codes.
    -          J = K         !Rather than this clunkiness.
    -        END SUBROUTINE SWAP   !And it should be for any type of thingy.
    +        SUBROUTINE SWAP(I,J)	!This really should be known to the compiler.
    +         INTEGER I,J,K		!Which could generate in-place code,
    +          K = I			!Using registers, maybe.
    +          I = J			!Or maybe, there are special op-codes.
    +          J = K			!Rather than this clunkiness.
    +        END SUBROUTINE SWAP	!And it should be for any type of thingy.
     
             INTEGER FUNCTION LSTNB(TEXT)  !Sigh. Last Not Blank.
     Concocted yet again by R.N.McLean (whom God preserve) December MM.
     Code checking reveals that the Compaq compiler generates a copy of the string and then finds the length of that when using the latter-day intrinsic LEN_TRIM. Madness!
    -Can't   DO WHILE (L.GT.0 .AND. TEXT(L:L).LE.' ')   !Control chars. regarded as spaces.
    +Can't   DO WHILE (L.GT.0 .AND. TEXT(L:L).LE.' ')	!Control chars. regarded as spaces.
     Curse the morons who think it good that the compiler MIGHT evaluate logical expressions fully.
     Crude GO TO rather than a DO-loop, because compilers use a loop counter as well as updating the index variable.
     Comparison runs of GNASH showed a saving of ~3% in its mass-data reading through the avoidance of DO in LSTNB alone.
     Crappy code for character comparison of varying lengths is avoided by using ICHAR which is for single characters only.
     Checking the indexing of CHARACTER variables for bounds evoked astounding stupidities, such as calculating the length of TEXT(L:L) by subtracting L from L!
     Comparison runs of GNASH showed a saving of ~25-30% in its mass data scanning for this, involving all its two-dozen or so single-character comparisons, not just in LSTNB.
    -         CHARACTER*(*),INTENT(IN):: TEXT  !The bumf. If there must be copy-in, at least there need not be copy back.
    -         INTEGER L      !The length of the bumf.
    -          L = LEN(TEXT)    !So, what is it?
    -    1     IF (L.LE.0) GO TO 2 !Are we there yet?
    -          IF (ICHAR(TEXT(L:L)).GT.ICHAR(" ")) GO TO 2 !Control chars are regarded as spaces also.
    -          L = L - 1     !Step back one.
    -          GO TO 1    !And try again.
    -    2     LSTNB = L     !The last non-blank, possibly zero.
    -         RETURN         !Unsafe to use LSTNB as a variable.
    -        END FUNCTION LSTNB !Compilers can bungle it.
    +         CHARACTER*(*),INTENT(IN):: TEXT	!The bumf. If there must be copy-in, at least there need not be copy back.
    +         INTEGER L		!The length of the bumf.
    +          L = LEN(TEXT)		!So, what is it?
    +    1     IF (L.LE.0) GO TO 2	!Are we there yet?
    +          IF (ICHAR(TEXT(L:L)).GT.ICHAR(" ")) GO TO 2	!Control chars are regarded as spaces also.
    +          L = L - 1		!Step back one.
    +          GO TO 1		!And try again.
    +    2     LSTNB = L		!The last non-blank, possibly zero.
    +         RETURN			!Unsafe to use LSTNB as a variable.
    +        END FUNCTION LSTNB	!Compilers can bungle it.
     
    -        SUBROUTINE LETTERCOUNT(TEXT)   !Count the occurrences of A-Z.
    -         CHARACTER*(*) TEXT   !The text to inspect.
    -         INTEGER I,K    !Assistants.
    -          DO I = 1,LEN(TEXT)     !Step through the text.
    -            K = ICHAR(TEXT(I:I)) - ICHAR("A") + 1  !This presumes that A-Z have contiguous codes!
    -            IF (K.GE.1 .AND. K.LE.26) LETTER(K) = LETTER(K) + 1   !Not so with EBCDIC!!
    -          END DO        !On to the next letter.
    -        END SUBROUTINE LETTERCOUNT  !Be careful with LETTER.
    +        SUBROUTINE LETTERCOUNT(TEXT)	!Count the occurrences of A-Z.
    +         CHARACTER*(*) TEXT	!The text to inspect.
    +         INTEGER I,K		!Assistants.
    +          DO I = 1,LEN(TEXT)		!Step through the text.
    +            K = ICHAR(TEXT(I:I)) - ICHAR("A") + 1	!This presumes that A-Z have contiguous codes!
    +            IF (K.GE.1 .AND. K.LE.26) LETTER(K) = LETTER(K) + 1	!Not so with EBCDIC!!
    +          END DO			!On to the next letter.
    +        END SUBROUTINE LETTERCOUNT	!Be careful with LETTER.
     
    -        SUBROUTINE UPCASE(TEXT)  !In the absence of an intrinsic...
    +        SUBROUTINE UPCASE(TEXT)	!In the absence of an intrinsic...
     Converts any lower case letters in TEXT to upper case...
     Concocted yet again by R.N.McLean (whom God preserve) December MM.
     Converting from a DO loop evades having both an iteration counter to decrement and an index variable to adjust.
    -         CHARACTER*(*) TEXT   !The stuff to be modified.
    -c        CHARACTER*26 LOWER,UPPER   !Tables. a-z may not be contiguous codes.
    +         CHARACTER*(*) TEXT	!The stuff to be modified.
    +c        CHARACTER*26 LOWER,UPPER	!Tables. a-z may not be contiguous codes.
     c        PARAMETER (LOWER = "abcdefghijklmnopqrstuvwxyz")
     c        PARAMETER (UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
     CAREFUL!! The below relies on a-z and A-Z being contiguous, as is NOT the case with EBCDIC.
    -         INTEGER I,L,IT    !Fingers.
    -          L = LEN(TEXT)    !Get a local value, in case LEN engages in oddities.
    -          I = L         !Start at the end and work back..
    -    1     IF (I.LE.0) RETURN  !Are we there yet? Comparison against zero should not require a subtraction.
    -c         IT = INDEX(LOWER,TEXT(I:I))  !Well?
    -c         IF (IT .GT. 0) TEXT(I:I) = UPPER(IT:IT)  !One to convert?
    -          IT = ICHAR(TEXT(I:I)) - ICHAR("a")    !More symbols precede "a" than "A".
    -          IF (IT.GE.0 .AND. IT.LE.25) TEXT(I:I) = CHAR(IT + ICHAR("A")) !In a-z? Convert!
    -          I = I - 1        !Back one.
    -          GO TO 1       !Inspect..
    -        END SUBROUTINE UPCASE !Easy.
    +         INTEGER I,L,IT		!Fingers.
    +          L = LEN(TEXT)		!Get a local value, in case LEN engages in oddities.
    +          I = L			!Start at the end and work back..
    +    1     IF (I.LE.0) RETURN 	!Are we there yet? Comparison against zero should not require a subtraction.
    +c         IT = INDEX(LOWER,TEXT(I:I))	!Well?
    +c         IF (IT .GT. 0) TEXT(I:I) = UPPER(IT:IT)	!One to convert?
    +          IT = ICHAR(TEXT(I:I)) - ICHAR("a")		!More symbols precede "a" than "A".
    +          IF (IT.GE.0 .AND. IT.LE.25) TEXT(I:I) = CHAR(IT + ICHAR("A"))	!In a-z? Convert!
    +          I = I - 1			!Back one.
    +          GO TO 1			!Inspect..
    +        END SUBROUTINE UPCASE	!Easy.
     
    -        SUBROUTINE ORDERSIDE(LETTER)   !Puts the letters into order.
    -         CHARACTER*(*) LETTER !The letters.
    -         INTEGER I,N,H     !Assistants.
    -         CHARACTER*1 T     !A scratchpad.
    -         LOGICAL CURSE     !A bit.
    -          N = LEN(LETTER)  !So, how many letters?
    -          H = N - 1     !Last - First, and not +1.
    -          IF (H.LE.0) RETURN  !Ha ha.
    -    1     H = MAX(1,H*10/13)     !The special feature.
    -          IF (H.EQ.9 .OR. H.EQ.10) H = 11 !A twiddle.
    -          CURSE = .FALSE.     !So far, so good.
    -          DO I = N - H,1,-1      !If H = 1, this is a BubbleSort.
    -            IF (LETTER(I:I).LT.LETTER(I + H:I + H)) THEN !One compare.
    -              T = LETTER(I:I)       !One swap.
    -              LETTER(I:I) = LETTER(I + H:I + H) !Alas, no SWAP(A,B)
    -              LETTER(I + H:I + H) = T     !Is recognised by the compiler.
    -              CURSE = .TRUE.     !If once a tiger is seen...
    -            END IF         !So much for that comparison.
    -          END DO        !On to the next.
    +        SUBROUTINE ORDERSIDE(LETTER)	!Puts the letters into order.
    +         CHARACTER*(*) LETTER	!The letters.
    +         INTEGER I,N,H		!Assistants.
    +         CHARACTER*1 T		!A scratchpad.
    +         LOGICAL CURSE		!A bit.
    +          N = LEN(LETTER)	!So, how many letters?
    +          H = N - 1		!Last - First, and not +1.
    +          IF (H.LE.0) RETURN	!Ha ha.
    +    1     H = MAX(1,H*10/13)		!The special feature.
    +          IF (H.EQ.9 .OR. H.EQ.10) H = 11	!A twiddle.
    +          CURSE = .FALSE.		!So far, so good.
    +          DO I = N - H,1,-1		!If H = 1, this is a BubbleSort.
    +            IF (LETTER(I:I).LT.LETTER(I + H:I + H)) THEN	!One compare.
    +              T = LETTER(I:I)			!One swap.
    +              LETTER(I:I) = LETTER(I + H:I + H)	!Alas, no SWAP(A,B)
    +              LETTER(I + H:I + H) = T		!Is recognised by the compiler.
    +              CURSE = .TRUE.		!If once a tiger is seen...
    +            END IF			!So much for that comparison.
    +          END DO			!On to the next.
               IF (CURSE .OR. H.GT.1) GO TO 1!Another pass?
    -        END SUBROUTINE ORDERSIDE !Simple enough.
    -        SUBROUTINE ORDERBLOCKS(N,SOME) !Puts the collection of blocks into order.
    -         INTEGER N      !The number of blocks.
    -         CHARACTER*(*) SOME(:)   !Their lists of letters.
    -         INTEGER I,H    !Assistants.
    -         CHARACTER*(LEN(SOME(1))) T !A scratchpad matching an element of SOME.
    -         LOGICAL CURSE        !Since there is still no SWAP(SOME(I),SOME(I + H)).
    -          H = N - 1     !So here comes another CombSort.
    -          IF (H.LE.0) RETURN  !With standard suspicion.
    -    1     H = MAX(1,H*10/13)     !This is the outer loop.
    -          IF (H.EQ.9 .OR. H.EQ.10) H = 11 !This is a fiddle.
    -          CURSE = .FALSE.     !Start the next pass in hope.
    -          DO I = N - H,1,-1      !Going backwards, just for fun.
    -            IF (SOME(I).LT.SOME(I + H)) THEN !So then?
    -              T = SOME(I)     !Disorder.
    -              SOME(I) = SOME(I + H) !So once again,
    -              SOME(I + H) = T    !Swap the two miscreants.
    -              CURSE = .TRUE.     !And remember.
    -            END IF         !So much for that comparison.
    -          END DO        !On to the next.
    +        END SUBROUTINE ORDERSIDE	!Simple enough.
    +        SUBROUTINE ORDERBLOCKS(N,SOME)	!Puts the collection of blocks into order.
    +         INTEGER N		!The number of blocks.
    +         CHARACTER*(*) SOME(:)	!Their lists of letters.
    +         INTEGER I,H		!Assistants.
    +         CHARACTER*(LEN(SOME(1))) T	!A scratchpad matching an element of SOME.
    +         LOGICAL CURSE			!Since there is still no SWAP(SOME(I),SOME(I + H)).
    +          H = N - 1		!So here comes another CombSort.
    +          IF (H.LE.0) RETURN	!With standard suspicion.
    +    1     H = MAX(1,H*10/13)		!This is the outer loop.
    +          IF (H.EQ.9 .OR. H.EQ.10) H = 11	!This is a fiddle.
    +          CURSE = .FALSE.		!Start the next pass in hope.
    +          DO I = N - H,1,-1		!Going backwards, just for fun.
    +            IF (SOME(I).LT.SOME(I + H)) THEN	!So then?
    +              T = SOME(I)		!Disorder.
    +              SOME(I) = SOME(I + H)	!So once again,
    +              SOME(I + H) = T		!Swap the two miscreants.
    +              CURSE = .TRUE.		!And remember.
    +            END IF			!So much for that comparison.
    +          END DO			!On to the next.
               IF (CURSE .OR. H.GT.1) GO TO 1!Are we there yet?
    -        END SUBROUTINE ORDERBLOCKS  !Not much code, but ringing the changes is still tedious.
    +        END SUBROUTINE ORDERBLOCKS	!Not much code, but ringing the changes is still tedious.
     
    -        SUBROUTINE PLAY(N,SOME)  !Mess about with the collection of blocks.
    -         INTEGER N      !Their number.
    -         CHARACTER*(*) SOME(:)   !Their letters.
    -         INTEGER NH,HIT(N) !A list of blocks.
    -         INTEGER B,I,J,K,L,M  !Assistants.
    -         CHARACTER*1 C     !A letter of the moment.
    -          L = LEN(SOME(1)) !The maximum number of letters to any block.
    +        SUBROUTINE PLAY(N,SOME)	!Mess about with the collection of blocks.
    +         INTEGER N		!Their number.
    +         CHARACTER*(*) SOME(:)	!Their letters.
    +         INTEGER NH,HIT(N)	!A list of blocks.
    +         INTEGER B,I,J,K,L,M	!Assistants.
    +         CHARACTER*1 C		!A letter of the moment.
    +          L = LEN(SOME(1))	!The maximum number of letters to any block.
     Cast the collection on to the floor.
    -          WRITE (MSG,1) N,L,SOME !Announce the set as it is supplied.
    +          WRITE (MSG,1) N,L,SOME	!Announce the set as it is supplied.
         1     FORMAT (I7," blocks, with at most",I2," letters:",66(1X,A))
     Change the "orientation" of some blocks.
    -          DO B = 1,N    !Step through each block.
    -            CALL UPCASE(SOME(B)) !Paranoia rules.
    -            CALL ORDERSIDE(SOME(B)) !Put its letter list into order.
    -          END DO     !On to the next block.
    -          WRITE (MSG,2) SOME  !Reveal the orderly array.
    +          DO B = 1,N		!Step through each block.
    +            CALL UPCASE(SOME(B))	!Paranoia rules.
    +            CALL ORDERSIDE(SOME(B))	!Put its letter list into order.
    +          END DO		!On to the next block.
    +          WRITE (MSG,2) SOME	!Reveal the orderly array.
         2     FORMAT (6X,"... the letters in reverse order:",66(1X,A))
     Collate the collection of blocks.
    -          CALL ORDERBLOCKS(N,SOME)  !Now order the blocks by their letters.
    -          WRITE (MSG,3) SOME     !Reveal them in neato order.
    +          CALL ORDERBLOCKS(N,SOME)	!Now order the blocks by their letters.
    +          WRITE (MSG,3) SOME		!Reveal them in neato order.
         3     FORMAT (7X,"... the blocks in reverse order:",66(1X,A))
     Count the appearances of the letters of the alphabet.
    -          LETTER = 0    !Enough of shuffling blocks around.
    -          DO B = 1,N    !Now inspect their collective letters.
    -            CALL LETTERCOUNT(SOME(B))  !A block's worth at a go.
    -          END DO     !On to the next block.
    -          SUPPLY = LETTER  !Save the counts of supplied letters.
    -          WRITE (MSG,4) (CHAR(ICHAR("A") + I - 1),I = 1,26),SUPPLY   !Results.
    -    4     FORMAT (15X,"Letters of the alphabet:",26A,/,   !First, a line with A ... Z.
    -     1     11X,"... number thereof supplied:",26I)  !Then a line of the associated counts.
    +          LETTER = 0		!Enough of shuffling blocks around.
    +          DO B = 1,N		!Now inspect their collective letters.
    +            CALL LETTERCOUNT(SOME(B))	!A block's worth at a go.
    +          END DO		!On to the next block.
    +          SUPPLY = LETTER	!Save the counts of supplied letters.
    +          WRITE (MSG,4) (CHAR(ICHAR("A") + I - 1),I = 1,26),SUPPLY	!Results.
    +    4     FORMAT (15X,"Letters of the alphabet:",26A,/,	!First, a line with A ... Z.
    +     1     11X,"... number thereof supplied:",26I)	!Then a line of the associated counts.
     Check for blocks with duplicated letters.
    -          WRITE (MSG,5)    !Announce.
    -    5     FORMAT (8X,"Blocks with duplicated letters:",$)   !Further output impends.
    -          M = 0         !No duplication found.
    -          DO B = 1,N    !So step through each block.
    -         JJ:DO J = 2,L        !Inspecting successive letters of the block,
    -              IF (SOME(B)(J:J).LE." ") EXIT JJ  !Provided they've not run out.
    -              DO K = 1,J - 1        !To see if it has appeared earlier.
    +          WRITE (MSG,5)		!Announce.
    +    5     FORMAT (8X,"Blocks with duplicated letters:",$)	!Further output impends.
    +          M = 0			!No duplication found.
    +          DO B = 1,N		!So step through each block.
    +         JJ:DO J = 2,L			!Inspecting successive letters of the block,
    +              IF (SOME(B)(J:J).LE." ") EXIT JJ	!Provided they've not run out.
    +              DO K = 1,J - 1			!To see if it has appeared earlier.
                     IF (SOME(B)(K:K).LE." ") EXIT JJ!Reverse order means that spaces will be at the end!
    -                IF (SOME(B)(J:J).EQ.SOME(B)(K:K)) THEN   !Well?
    -                  M = M + 1      !A match!
    -                  WRITE (MSG,6) SOME(B)   !Name the block.
    -    6             FORMAT (1X,A,$)   !With further output still impending,
    -                  EXIT JJ     !And give up on this block.
    -                END IF        !One duplicated letter is sufficient for its downfall.
    -              END DO       !Next letter up.
    -            END DO JJ         !On to the next letter of the block.
    -          END DO     !On to the next block.
    -          CALL HIC(M)      !Show the count and end the line.
    +                IF (SOME(B)(J:J).EQ.SOME(B)(K:K)) THEN	!Well?
    +                  M = M + 1		!A match!
    +                  WRITE (MSG,6) SOME(B)	!Name the block.
    +    6             FORMAT (1X,A,$)	!With further output still impending,
    +                  EXIT JJ		!And give up on this block.
    +                END IF			!One duplicated letter is sufficient for its downfall.
    +              END DO			!Next letter up.
    +            END DO JJ			!On to the next letter of the block.
    +          END DO		!On to the next block.
    +          CALL HIC(M)		!Show the count and end the line.
     Check for duplicate blocks, knowing that the array of blocks is ordered.
    -          WRITE (MSG,7)    !Announce.
    -    7     FORMAT (21X,"Duplicated blocks:",$)   !Again, leave the line dangling.
    -          K = 0         !No duplication found.
    -          B = 1         !Syncopation.
    -   70     B = B + 1     !Advance one.
    -          IF (B.GT.N) GO TO 72   !Are we there yet?
    -          IF (SOME(B).NE.SOME(B - 1)) GO TO 70  !No match? Search on.
    -          K = K + 1     !A match is counted.
    -          WRITE (MSG,6) SOME(B)  !Name it.
    -   71     B = B + 1     !And speed through continued matching.
    -          IF (B.GT.N) GO TO 72   !Unless we're of the end.
    -          IF (SOME(B).EQ.SOME(B - 1)) GO TO 71  !Continued matching?
    -          GO TO 70      !Mismatch: resume the normal scan.
    -   72     CALL HIC(K)      !So much for that.
    +          WRITE (MSG,7)		!Announce.
    +    7     FORMAT (21X,"Duplicated blocks:",$)	!Again, leave the line dangling.
    +          K = 0			!No duplication found.
    +          B = 1			!Syncopation.
    +   70     B = B + 1		!Advance one.
    +          IF (B.GT.N) GO TO 72	!Are we there yet?
    +          IF (SOME(B).NE.SOME(B - 1)) GO TO 70	!No match? Search on.
    +          K = K + 1		!A match is counted.
    +          WRITE (MSG,6) SOME(B)	!Name it.
    +   71     B = B + 1		!And speed through continued matching.
    +          IF (B.GT.N) GO TO 72	!Unless we're of the end.
    +          IF (SOME(B).EQ.SOME(B - 1)) GO TO 71	!Continued matching?
    +          GO TO 70		!Mismatch: resume the normal scan.
    +   72     CALL HIC(K)		!So much for that.
     Check for duplicated letters across different blocks.
    -          IF (ALL(SUPPLY.LE.1)) RETURN !Unless there are no duplicated letters.
    -          WRITE (MSG,8)    !Announce.
    -    8     FORMAT ("Duplicated letters on different blocks:",$) !More to come.
    -          K = 0      !Start another count.
    -          DO I = 1,26      !A well-known span.
    -            IF (SUPPLY(I).LE.1) CYCLE  !Any duplicated letters?
    +          IF (ALL(SUPPLY.LE.1)) RETURN	!Unless there are no duplicated letters.
    +          WRITE (MSG,8)		!Announce.
    +    8     FORMAT ("Duplicated letters on different blocks:",$)	!More to come.
    +          K = 0		!Start another count.
    +          DO I = 1,26		!A well-known span.
    +            IF (SUPPLY(I).LE.1) CYCLE	!Any duplicated letters?
                 C = CHAR(ICHAR("A") + I - 1)!Yes. This is the character.
    -            NH = 0      !So, how many blocks contribute?
    -            DO B = 1,N     !Find out.
    -              IF (INDEX(SOME(B),C).GT.0) THEN   !On this block?
    -                NH = NH + 1      !Yes.
    -                HIT(NH) = B      !Keep track of which.
    -              END IF       !So much for that block.
    -            END DO      !On to the next.
    -            IF (ANY(SOME(HIT(2:NH)) .NE. SOME(HIT(1)))) THEN   !All have the same collection of letters?
    -              K = K + 1       !No!
    -              WRITE (MSG,9) C    !Name the heterogenously supported letter.
    -    9         FORMAT (A,$)  !Use the same spacing even though one character only.
    -            END IF      !So much for that letter's search.
    -          END DO     !On to the next letter.
    -          CALL HIC(K)   !Finish the line with the count report.
    -         CONTAINS !This is used often enough.
    -          SUBROUTINE HIC(N)   !But has very specific context.
    -           INTEGER N       !The count.
    -            IF (N.LE.0) WRITE (MSG,*) "None."   !Yes, we have no bananas.
    -            IF (N.GT.0) WRITE (MSG,*) N      !Either way, end the line.
    -          END SUBROUTINE HIC  !This service routine is not needed elsewhere.
    -        END SUBROUTINE PLAY   !Look mummy! All the blockses are neatened!
    +            NH = 0		!So, how many blocks contribute?
    +            DO B = 1,N		!Find out.
    +              IF (INDEX(SOME(B),C).GT.0) THEN	!On this block?
    +                NH = NH + 1		!Yes.
    +                HIT(NH) = B		!Keep track of which.
    +              END IF			!So much for that block.
    +            END DO		!On to the next.
    +            IF (ANY(SOME(HIT(2:NH)) .NE. SOME(HIT(1)))) THEN	!All have the same collection of letters?
    +              K = K + 1			!No!
    +              WRITE (MSG,9) C		!Name the heterogenously supported letter.
    +    9         FORMAT (A,$)	!Use the same spacing even though one character only.
    +            END IF		!So much for that letter's search.
    +          END DO		!On to the next letter.
    +          CALL HIC(K)	!Finish the line with the count report.
    +         CONTAINS	!This is used often enough.
    +          SUBROUTINE HIC(N)	!But has very specific context.
    +           INTEGER N			!The count.
    +            IF (N.LE.0) WRITE (MSG,*) "None."	!Yes, we have no bananas.
    +            IF (N.GT.0) WRITE (MSG,*) N		!Either way, end the line.
    +          END SUBROUTINE HIC	!This service routine is not needed elsewhere.
    +        END SUBROUTINE PLAY	!Look mummy! All the blockses are neatened!
     
    -        LOGICAL FUNCTION CANBLOCK(WORD,N,SOME)  !Can the blocks spell out the word?
    +        LOGICAL FUNCTION CANBLOCK(WORD,N,SOME)	!Can the blocks spell out the word?
     Creates a move tree based on the letters of WORD and for each, the blocks available.
    -         CHARACTER*(*) WORD   !The word to spell out.
    -         INTEGER N      !The number of blocks.
    -         CHARACTER*(*) SOME(:)   !The blocks and their letters.
    -         INTEGER NA,AVAIL(N)  !Say not the struggle naught availeth!
    -         INTEGER NMOVE(LEN(WORD))   !I need a list of acceptable blocks,
    -         INTEGER MOVE(LEN(WORD),N)  !One list for each letter of WORD.
    -         INTEGER I,L,S     !Assistants.
    -         CHARACTER*1 C     !The letter of the moment.
    -          CANBLOCK = .FALSE.     !Initial pessimism.
    -          L = LSTNB(WORD)     !Ignore trailing spaces.
    -          IF (L.GT.N) RETURN     !Enough blocks?
    -          LETTER = 0          !To make rabbit stew,
    -          CALL LETTERCOUNT(WORD(1:L))     !First catch your rabbit.
    -          IF (ANY(SUPPLY .LT. LETTER)) RETURN   !The larder is lacking.
    -          NA = N        !Prepare a list.
    -          FORALL (I = 1:N) AVAIL(I) = I   !That fingers every block.
    -          I = 0      !Step through the letters of the WORD.
    +         CHARACTER*(*) WORD	!The word to spell out.
    +         INTEGER N		!The number of blocks.
    +         CHARACTER*(*) SOME(:)	!The blocks and their letters.
    +         INTEGER NA,AVAIL(N)	!Say not the struggle naught availeth!
    +         INTEGER NMOVE(LEN(WORD))	!I need a list of acceptable blocks,
    +         INTEGER MOVE(LEN(WORD),N)	!One list for each letter of WORD.
    +         INTEGER I,L,S		!Assistants.
    +         CHARACTER*1 C		!The letter of the moment.
    +          CANBLOCK = .FALSE.		!Initial pessimism.
    +          L = LSTNB(WORD)		!Ignore trailing spaces.
    +          IF (L.GT.N) RETURN		!Enough blocks?
    +          LETTER = 0				!To make rabbit stew,
    +          CALL LETTERCOUNT(WORD(1:L))		!First catch your rabbit.
    +          IF (ANY(SUPPLY .LT. LETTER)) RETURN	!The larder is lacking.
    +          NA = N			!Prepare a list.
    +          FORALL (I = 1:N) AVAIL(I) = I	!That fingers every block.
    +          I = 0		!Step through the letters of the WORD.
     Chug through the letters of the WORD.
    -    1     I = I + 1  !One letter after the other.
    -          IF (I.GT.L) GO TO 100  !Yay! We're through!
    -          C = WORD(I:I)    !The letter of the moment.
    -          NMOVE(I) = 0     !No moves known at this new level.
    -          DO S = 1,NA      !So, look for them amongst the available slots.
    -            IF (INDEX(SOME(AVAIL(S)),C) .GT. 0) THEN  !A hit?
    -              NMOVE(I) = NMOVE(I) + 1  !Yes! Count up another possible move.
    -              MOVE(I,NMOVE(I)) = S  !Remember its slot.
    -            END IF         !So much for that block.
    -          END DO     !On to the next.
    -    2     IF (NMOVE(I).GT.0) THEN   !Have we any moves?
    -            S = MOVE(I,NMOVE(I)) !Yes! Recover the last found.
    -            NMOVE(I) = NMOVE(I) - 1 !Uncount, as it is about to be used.
    -            IF (S.NE.NA) CALL SWAP(AVAIL(S),AVAIL(NA))   !This block is no longer available.
    -            NA = NA - 1       !Shift the boundary back.
    -            GO TO 1        !Try the next letter!
    -          END IF     !But if we can't find a move at that level...
    -          I = I - 1     !Retreat a level.
    -          IF (I.LE.0) RETURN  !Oh dear!
    -          S = MOVE(I,NMOVE(I) + 1)  !Undo the move that had been made at this level.
    -          NA = NA + 1         !And make its block is re-available.
    -          IF (S.NE.NA) CALL SWAP(AVAIL(S),AVAIL(NA))  !Move it back.
    -          GO TO 2    !See what moves remain at this level.
    +    1     I = I + 1	!One letter after the other.
    +          IF (I.GT.L) GO TO 100	!Yay! We're through!
    +          C = WORD(I:I)		!The letter of the moment.
    +          NMOVE(I) = 0		!No moves known at this new level.
    +          DO S = 1,NA		!So, look for them amongst the available slots.
    +            IF (INDEX(SOME(AVAIL(S)),C) .GT. 0) THEN	!A hit?
    +              NMOVE(I) = NMOVE(I) + 1	!Yes! Count up another possible move.
    +              MOVE(I,NMOVE(I)) = S	!Remember its slot.
    +            END IF			!So much for that block.
    +          END DO		!On to the next.
    +    2     IF (NMOVE(I).GT.0) THEN	!Have we any moves?
    +            S = MOVE(I,NMOVE(I))	!Yes! Recover the last found.
    +            NMOVE(I) = NMOVE(I) - 1	!Uncount, as it is about to be used.
    +            IF (S.NE.NA) CALL SWAP(AVAIL(S),AVAIL(NA))	!This block is no longer available.
    +            NA = NA - 1			!Shift the boundary back.
    +            GO TO 1			!Try the next letter!
    +          END IF		!But if we can't find a move at that level...
    +          I = I - 1		!Retreat a level.
    +          IF (I.LE.0) RETURN	!Oh dear!
    +          S = MOVE(I,NMOVE(I) + 1)	!Undo the move that had been made at this level.
    +          NA = NA + 1			!And make its block is re-available.
    +          IF (S.NE.NA) CALL SWAP(AVAIL(S),AVAIL(NA))	!Move it back.
    +          GO TO 2		!See what moves remain at this level.
     Completed!
    -  100     CANBLOCK = .TRUE.   !That's a relief.
    -        END FUNCTION CANBLOCK !Some revisions might have been made.
    -      END MODULE PLAYPEN   !No sand here.
    +  100     CANBLOCK = .TRUE.	!That's a relief.
    +        END FUNCTION CANBLOCK	!Some revisions might have been made.
    +      END MODULE PLAYPEN	!No sand here.
     
    -      USE PLAYPEN !Just so.
    -      INTEGER HAVE,TESTS      !Parameters for the specified problem.
    -      PARAMETER (HAVE = 20, TESTS = 7) !Number of blocks, number of tests.
    -      CHARACTER*(MS) BLOCKS(HAVE)   !Have blocks, will juggle.
    -      DATA BLOCKS/"BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS", !The specified set
    -     1            "JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"/ !Of letter blocks.
    -      CHARACTER*8 WORD(TESTS)    !Now for the specified test words.
    -      LOGICAL ANS(TESTS),T,F     !And the given results.
    -      PARAMETER (T = .TRUE., F = .FALSE.) !Enable a more compact specification.
    -      DATA WORD/"A","BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"/   !So that these
    -      DATA  ANS/ T ,    T ,    F ,     T ,      F ,     T ,       T /   !Can be aligned.
    +      USE PLAYPEN	!Just so.
    +      INTEGER HAVE,TESTS		!Parameters for the specified problem.
    +      PARAMETER (HAVE = 20, TESTS = 7)	!Number of blocks, number of tests.
    +      CHARACTER*(MS) BLOCKS(HAVE)	!Have blocks, will juggle.
    +      DATA BLOCKS/"BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS",	!The specified set
    +     1            "JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"/	!Of letter blocks.
    +      CHARACTER*8 WORD(TESTS)		!Now for the specified test words.
    +      LOGICAL ANS(TESTS),T,F		!And the given results.
    +      PARAMETER (T = .TRUE., F = .FALSE.)	!Enable a more compact specification.
    +      DATA WORD/"A","BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"/	!So that these
    +      DATA  ANS/ T ,    T ,    F ,     T ,      F ,     T ,       T /	!Can be aligned.
           LOGICAL YAY
           INTEGER I
     
    @@ -266,7 +266,7 @@ Completed!
         1 FORMAT ("Arranges alphabet blocks, attending only to the ",
          1 "letters on the blocks, and ignoring case and orientation.",/)
     
    -      CALL PLAY(HAVE,BLOCKS)  !Some fun first.
    +      CALL PLAY(HAVE,BLOCKS)	!Some fun first.
     
           WRITE (MSG,'(/"Now to see if some words can be spelled out.")')
           DO I = 1,TESTS
    diff --git a/Task/ABC-problem/FutureBasic/abc-problem-1.basic b/Task/ABC-problem/FutureBasic/abc-problem-1.basic
    index e9f8bea0fc..5097485aa6 100644
    --- a/Task/ABC-problem/FutureBasic/abc-problem-1.basic
    +++ b/Task/ABC-problem/FutureBasic/abc-problem-1.basic
    @@ -1,26 +1,30 @@
    +include "NSLog.incl"
    +
     local fn CanBlocksSpell( w as CFStringRef ) as CFStringRef
    -  long        i, j
    -  CFStringRef s = @"", t1, t2 : if fn StringIsEqual( w, @"" ) then exit fn = @"YES" else w = ucase(w)
    +NSUInteger  i, j
    +CFStringRef s = @"", t1, t2 : if fn StringIsEqual( w, @"" ) then exit fn = @"YES" else w = ucase(w)
     
    -  mda(0) = {@"BO",@"XK",@"DQ",@"CP",@"NA",@"GT",@"RE",@"TG",@"QD",¬
    -  @"FS",@"JW",@"HU",@"VI",@"AN",@"OB",@"ER",@"FS",@"LY",@"PC",@"ZM"}
    +mda(0) = {@"BO",@"XK",@"DQ",@"CP",@"NA",@"GT",@"RE",@"TG",@"QD",¬
    +@"FS",@"JW",@"HU",@"VI",@"AN",@"OB",@"ER",@"FS",@"LY",@"PC",@"ZM"}
     
    -  for i = 0 to len(w) - 1
    -    for j = 0 to mda_count - 1
    -      t1 = mid( mda(j), 0, 1 ) : t2 = mid( mda(j), 1, 1 )
    -      if ( fn StringIsEqual( mid( w, i, 1 ), t1 ) ) then s = fn StringByAppendingString( s, t1 ) : mda(j) = @"  " : break
    -      if ( fn StringIsEqual( mid( w, i, 1 ), t2 ) ) then s = fn StringByAppendingString( s, t2 ) : mda(j) = @"  " : break
    -    next
    -  next
    -  if fn StringIsEqual( s, w ) then exit fn = @"YES"
    +for i = 0 to len(w) - 1
    +for j = 0 to mda_count - 1
    +t1 = mid( mda(j), 0, 1 ) : t2 = mid( mda(j), 1, 1 )
    +if ( fn StringIsEqual( mid( w, i, 1 ), t1 ) ) then s = fn StringByAppendingString( s, t1 ) : mda(j) = @"  " : break
    +if ( fn StringIsEqual( mid( w, i, 1 ), t2 ) ) then s = fn StringByAppendingString( s, t2 ) : mda(j) = @"  " : break
    +next
    +next
    +if fn StringIsEqual( s, w ) then exit fn = @"YES"
     end fn = @"NO"
     
    -long        i
    +NSUInteger  i
     CFArrayRef  words
     CFStringRef w
     words = @[@"", @"a",@"Bark",@"BOOK",@"TrEaT",@"COMMON",@"Squad",@"conFUse",@"ABBA",@"aUtO"]
     for w in words
    -  printf @"Can blocks spell %7s : %@", fn StringUTF8String( w ), fn CanBlocksSpell( w )
    +printf @"Can blocks spell %7s : %@", fn StringUTF8String( w ), fn CanBlocksSpell( w )
     next
     
    +NSLog( @"%@", fn WindowPrintViewString( 1 ) )
    +
     HandleEvents
    diff --git a/Task/ABC-problem/FutureBasic/abc-problem-2.basic b/Task/ABC-problem/FutureBasic/abc-problem-2.basic
    index 76e7d3016f..0919078013 100644
    --- a/Task/ABC-problem/FutureBasic/abc-problem-2.basic
    +++ b/Task/ABC-problem/FutureBasic/abc-problem-2.basic
    @@ -4,7 +4,7 @@ local fn blocks( wordList as str255 )
         found = instr$( 1, blocks, ch )
         select found
           case > 3: mid$( blocks, found and -2, 2 ) = "__" : text , , fn ColorYellow
    -        rect  fill ( x, y + 1, 15, 15 ), fn ColorBrown
    +        rect  fill ( x, y + 5.5, 15, 15 ), fn ColorBrown
           case   0: text , , fn ColorLightGray
           case < 4: blocks=" ,;BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM": x=3: y+=26: ch=""
         end select
    diff --git a/Task/ABC-problem/Go/abc-problem.go b/Task/ABC-problem/Go/abc-problem.go
    index 0f28ef1f06..5ad1a85f59 100644
    --- a/Task/ABC-problem/Go/abc-problem.go
    +++ b/Task/ABC-problem/Go/abc-problem.go
    @@ -1,39 +1,39 @@
     package main
     
     import (
    -   "fmt"
    -   "strings"
    +	"fmt"
    +	"strings"
     )
     
     func newSpeller(blocks string) func(string) bool {
    -   bl := strings.Fields(blocks)
    -   return func(word string) bool {
    -      return r(word, bl)
    -   }
    +	bl := strings.Fields(blocks)
    +	return func(word string) bool {
    +		return r(word, bl)
    +	}
     }
     
     func r(word string, bl []string) bool {
    -   if word == "" {
    -      return true
    -   }
    -   c := word[0] | 32
    -   for i, b := range bl {
    -      if c == b[0]|32 || c == b[1]|32 {
    -         bl[i], bl[0] = bl[0], b
    -         if r(word[1:], bl[1:]) == true {
    -            return true
    -         }
    -         bl[i], bl[0] = bl[0], bl[i]
    -      }
    -   }
    -   return false
    +	if word == "" {
    +		return true
    +	}
    +	c := word[0] | 32
    +	for i, b := range bl {
    +		if c == b[0]|32 || c == b[1]|32 {
    +			bl[i], bl[0] = bl[0], b
    +			if r(word[1:], bl[1:]) == true {
    +				return true
    +			}
    +			bl[i], bl[0] = bl[0], bl[i]
    +		}
    +	}
    +	return false
     }
     
     func main() {
    -   sp := newSpeller(
    -      "BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM")
    -   for _, word := range []string{
    -      "A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "CONFUSE"} {
    -      fmt.Println(word, sp(word))
    -   }
    +	sp := newSpeller(
    +		"BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM")
    +	for _, word := range []string{
    +		"A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "CONFUSE"} {
    +		fmt.Println(word, sp(word))
    +	}
     }
    diff --git a/Task/ABC-problem/Insitux/abc-problem.insitux b/Task/ABC-problem/Insitux/abc-problem.insitux
    index 6dd31fc0b6..aba0f2cc01 100644
    --- a/Task/ABC-problem/Insitux/abc-problem.insitux
    +++ b/Task/ABC-problem/Insitux/abc-problem.insitux
    @@ -7,5 +7,5 @@
       (.. and (map in-block? word)))
     
     (-> ["A" "bark" "Book" "TREAT" "Common" "squaD" "CoNFuSe"] ; Notice case insensitivity
    -    (map #"{%} => {can-make-word %}")
    +    (map #(str % " => " (can-make-word %)))
         (join ", "))
    diff --git a/Task/ABC-problem/Julia/abc-problem.jl b/Task/ABC-problem/Julia/abc-problem.julia
    similarity index 100%
    rename from Task/ABC-problem/Julia/abc-problem.jl
    rename to Task/ABC-problem/Julia/abc-problem.julia
    diff --git a/Task/ABC-problem/Kotlin/abc-problem.kts b/Task/ABC-problem/Kotlin/abc-problem.kotlin
    similarity index 100%
    rename from Task/ABC-problem/Kotlin/abc-problem.kts
    rename to Task/ABC-problem/Kotlin/abc-problem.kotlin
    diff --git a/Task/ABC-problem/Lang/abc-problem.lang b/Task/ABC-problem/Lang/abc-problem.lang
    index 8444fcad66..0e8e9d7054 100644
    --- a/Task/ABC-problem/Lang/abc-problem.lang
    +++ b/Task/ABC-problem/Lang/abc-problem.lang
    @@ -1,37 +1,37 @@
     fp.canMakeWord = ($word, $blocks) -> {
    -   if(!$word) {
    -      return 1
    -   }
    -
    -   $word = fn.toLower($word)
    -
    -   $c $= $word[0]
    -   $i = 0
    -   while($i < @$blocks) {
    -      $block $= fn.toLower($blocks[$i])
    -
    -      if($block[0] != $c && $block[1] != $c) {
    -         $i += 1
    -
    -         con.continue
    -      }
    -
    -      $blocksCopy $= ^$blocks
    -      fn.listRemoveAt($blocksCopy, $i)
    -
    -      if(fp.canMakeWord(fn.substring($word, 1), $blocksCopy)) {
    -         return 1
    -      }
    -
    -      $i += 1
    -   }
    -
    -   return 0
    +	if(!$word) {
    +		return 1
    +	}
    +	
    +	$word = fn.toLower($word)
    +	
    +	$c $= $word[0]
    +	$i = 0
    +	while($i < @$blocks) {
    +		$block $= fn.toLower($blocks[$i])
    +		
    +		if($block[0] != $c && $block[1] != $c) {	
    +			$i += 1
    +			
    +			con.continue
    +		}
    +		
    +		$blocksCopy $= ^$blocks
    +		fn.listRemoveAt($blocksCopy, $i)
    +		
    +		if(fp.canMakeWord(fn.substring($word, 1), $blocksCopy)) {
    +			return 1
    +		}
    +		
    +		$i += 1
    +	}
    +	
    +	return 0
     }
     
     $blocks = fn.listOf(BO, XK, DQ, CP, NA, GT, RE, TG, QD, FS, JW, HU, VI, AN, OB, ER, FS, LY, PC, ZM)
     
     $word
     foreach($[word], [\e, A, BARK, BOOK, TREAT, COMMON, SQUAD, CONFUSE, Treat, cOmMoN]) {
    -   fn.printf(%s: %s%n, $word, fp.canMakeWord($word, $blocks))
    +	fn.printf(%s: %s%n, $word, fp.canMakeWord($word, $blocks))
     }
    diff --git a/Task/ABC-problem/Lua/abc-problem.lua b/Task/ABC-problem/Lua/abc-problem.lua
    index 9effcd462c..3e18d4914a 100644
    --- a/Task/ABC-problem/Lua/abc-problem.lua
    +++ b/Task/ABC-problem/Lua/abc-problem.lua
    @@ -1,31 +1,31 @@
     blocks = {
    -   {"B","O"};  {"X","K"};  {"D","Q"};  {"C","P"};
    -   {"N","A"};  {"G","T"};  {"R","E"};  {"T","G"};
    -   {"Q","D"};  {"F","S"};  {"J","W"};  {"H","U"};
    -   {"V","I"};  {"A","N"};  {"O","B"};  {"E","R"};
    -   {"F","S"};  {"L","Y"};  {"P","C"};  {"Z","M"};
    -   };
    +	{"B","O"};	{"X","K"};	{"D","Q"};	{"C","P"};
    +	{"N","A"};	{"G","T"};	{"R","E"};	{"T","G"};
    +	{"Q","D"};	{"F","S"};	{"J","W"};	{"H","U"};
    +	{"V","I"};	{"A","N"};	{"O","B"};	{"E","R"};
    +	{"F","S"};	{"L","Y"};	{"P","C"};	{"Z","M"};
    +	};
     
     function canUse(table, letter)
    -   for i,v in pairs(blocks) do
    -      if (v[1] == letter:upper() or v[2] == letter:upper())  and table[i] then
    -         table[i] = false;
    -         return true;
    -      end
    -   end
    -   return false;
    +	for i,v in pairs(blocks) do
    +		if (v[1] == letter:upper() or v[2] == letter:upper())  and table[i] then
    +			table[i] = false;
    +			return true;
    +		end
    +	end
    +	return false;
     end
     
     function canMake(Word)
    -   local Taken = {};
    -   for i,v in pairs(blocks) do
    -      table.insert(Taken,true);
    -   end
    -   local found = true;
    -   for i = 1,#Word do
    -      if not canUse(Taken,Word:sub(i,i)) then
    -         found = false;
    -      end
    -   end
    -   print(found)
    +	local Taken = {};
    +	for i,v in pairs(blocks) do
    +		table.insert(Taken,true);
    +	end
    +	local found = true;
    +	for i = 1,#Word do
    +		if not canUse(Taken,Word:sub(i,i)) then
    +			found = false;
    +		end
    +	end
    +	print(found)
     end
    diff --git a/Task/ABC-problem/MAXScript/abc-problem-1.max b/Task/ABC-problem/MAXScript/abc-problem-1.max
    index 0da376fc34..c05646f32e 100644
    --- a/Task/ABC-problem/MAXScript/abc-problem-1.max
    +++ b/Task/ABC-problem/MAXScript/abc-problem-1.max
    @@ -1,98 +1,98 @@
     -- This is the blocks array
     global GlobalBlocks = #("BO","XK","DQ","CP","NA", \
    -         "GT","RE","TG","QD","FS", \
    -         "JW","HU","VI","AN","OB", \
    -         "ER","FS","LY","PC","ZM")
    +			"GT","RE","TG","QD","FS", \
    +			"JW","HU","VI","AN","OB", \
    +			"ER","FS","LY","PC","ZM")
     
     -- This function returns true if "_str" is part of "_word", false otherwise
     fn occurs _str _word =
     (
    -   if _str != undefined and _word != undefined then
    -   (
    -   matchpattern _word pattern:("*"+_str+"*")
    -   ) else return false
    +	if _str != undefined and _word != undefined then
    +	(
    +	matchpattern _word pattern:("*"+_str+"*")
    +	) else return false
     )
     
     -- This is the main function
     fn isWordPossible word blocks: = -- blocks is a keyword argument
     (
    -   word = toupper word -- convert the string to upper case, to make it case insensitive
    -   if blocks == unsupplied do blocks = GlobalBlocks
    -   -- if blocks (keyword argument) is unsupplied, use the global blocks array (this is for recursion)
    +	word = toupper word -- convert the string to upper case, to make it case insensitive
    +	if blocks == unsupplied do blocks = GlobalBlocks
    +	-- if blocks (keyword argument) is unsupplied, use the global blocks array (this is for recursion)
    +	
    +	blocks = deepcopy blocks
     
    -   blocks = deepcopy blocks
    +	local pos = 1 -- start at the beginning of the word
    +	local solvedLetters = #() -- this array stores the indices of solved letters
    +	
    +	while pos <= word.count do -- loop through every character in the word
    +	(
    +		local possibleBlocks = #() -- this array stores the blocks which can be used to make that letter
    +		for b = 1 to Blocks.count do -- this loop finds all the possible blocks that can be used to make that letter
    +		(
    +			if occurs word[pos] blocks[b] do
    +			(
    +				appendifunique possibleBlocks b
    +			)
    +		)
    +		if possibleBlocks.count > 0 then -- if it found any blocks
    +		(
    +			if possibleBlocks.count == 1 then -- if it found one block, then continue
    +			(
    +				appendifunique solvedLetters pos
    +				deleteitem blocks possibleblocks[1]
    +				pos += 1
    +			)
    +			else -- if it found more than one
    +			(
    +				for b = 1 to possibleBlocks.count do -- loop through every possible block
    +				(
    +					local possibleBlock = blocks[possibleBlocks[b]]
    +					local blockFirstLetter = possibleBlock[1]
    +					local blockSecondLetter = possibleBlock[2]
    +					local matchingLetter = if blockFirstLetter == word[pos] then 1 else 2
    +					-- ^ this is the index of the matching letter on the block
    +					
    +					local notMatchingIndex = if matchingLetter == 1 then 2 else 1
    +					local notMatchingLetter = possibleBlock[notMatchingIndex]
    +					-- ^ this is the other letter on the block
    +					
    +					if occurs notMatchingLetter (substring word (pos+1) -1) then
    +					( -- if the other letter occurs in the rest of the word
    +						local removedBlocks = deepcopy blocks -- copy the current blocks array
    +						deleteitem removedBlocks possibleBlocks[b] -- remove the item from the copied array
    +						
    +						-- recursively check if the word is possible if that block is taken away from the array:
    +						if (isWordPossible (substring word (pos+1) -1) blocks:removedBlocks) then
    +						( -- if it is, then remove the block and move to next character
    +							appendifunique solvedLetters pos
    +							deleteitem blocks possibleblocks[1]
    +							pos += 1
    +							exit
    +						)
    +						else
    +						( -- if it isn't and it looped through every possible block, then the word is not possible
    +							if b == possibleBlocks.count do return false
    +						)
    +					)
    +					else
    +					( -- if the other letter on this block doesn't occur in the rest of the word, then the letter is solved, continue
    +							appendifunique solvedLetters pos
    +							deleteitem blocks possibleblocks[b]
    +							pos += 1
    +							exit
    +					)
    +				)
    +			)
    +		) else return false -- if it didn't find any blocks, then return false
    +	)
     
    -   local pos = 1 -- start at the beginning of the word
    -   local solvedLetters = #() -- this array stores the indices of solved letters
    -
    -   while pos <= word.count do -- loop through every character in the word
    -   (
    -      local possibleBlocks = #() -- this array stores the blocks which can be used to make that letter
    -      for b = 1 to Blocks.count do -- this loop finds all the possible blocks that can be used to make that letter
    -      (
    -         if occurs word[pos] blocks[b] do
    -         (
    -            appendifunique possibleBlocks b
    -         )
    -      )
    -      if possibleBlocks.count > 0 then -- if it found any blocks
    -      (
    -         if possibleBlocks.count == 1 then -- if it found one block, then continue
    -         (
    -            appendifunique solvedLetters pos
    -            deleteitem blocks possibleblocks[1]
    -            pos += 1
    -         )
    -         else -- if it found more than one
    -         (
    -            for b = 1 to possibleBlocks.count do -- loop through every possible block
    -            (
    -               local possibleBlock = blocks[possibleBlocks[b]]
    -               local blockFirstLetter = possibleBlock[1]
    -               local blockSecondLetter = possibleBlock[2]
    -               local matchingLetter = if blockFirstLetter == word[pos] then 1 else 2
    -               -- ^ this is the index of the matching letter on the block
    -
    -               local notMatchingIndex = if matchingLetter == 1 then 2 else 1
    -               local notMatchingLetter = possibleBlock[notMatchingIndex]
    -               -- ^ this is the other letter on the block
    -
    -               if occurs notMatchingLetter (substring word (pos+1) -1) then
    -               ( -- if the other letter occurs in the rest of the word
    -                  local removedBlocks = deepcopy blocks -- copy the current blocks array
    -                  deleteitem removedBlocks possibleBlocks[b] -- remove the item from the copied array
    -
    -                  -- recursively check if the word is possible if that block is taken away from the array:
    -                  if (isWordPossible (substring word (pos+1) -1) blocks:removedBlocks) then
    -                  ( -- if it is, then remove the block and move to next character
    -                     appendifunique solvedLetters pos
    -                     deleteitem blocks possibleblocks[1]
    -                     pos += 1
    -                     exit
    -                  )
    -                  else
    -                  ( -- if it isn't and it looped through every possible block, then the word is not possible
    -                     if b == possibleBlocks.count do return false
    -                  )
    -               )
    -               else
    -               ( -- if the other letter on this block doesn't occur in the rest of the word, then the letter is solved, continue
    -                     appendifunique solvedLetters pos
    -                     deleteitem blocks possibleblocks[b]
    -                     pos += 1
    -                     exit
    -               )
    -            )
    -         )
    -      ) else return false -- if it didn't find any blocks, then return false
    -   )
    -
    -   makeuniquearray solvedLetters -- make sure there are no duplicates in the solved array
    -   if solvedLetters.count != word.count then return false -- if number of solved letters is not equal to word length
    -      else
    -         ( -- this checks if all the solved letters are the same as the word
    -            check = ""
    -            for bit in solvedLetters do append check word[bit]
    -            if check == word then return true else return false
    -         )
    +	makeuniquearray solvedLetters -- make sure there are no duplicates in the solved array
    +	if solvedLetters.count != word.count then return false -- if number of solved letters is not equal to word length
    +		else
    +			( -- this checks if all the solved letters are the same as the word
    +				check = ""
    +				for bit in solvedLetters do append check word[bit]
    +				if check == word then return true else return false
    +			)
     )
    diff --git a/Task/ABC-problem/MAXScript/abc-problem-3.max b/Task/ABC-problem/MAXScript/abc-problem-3.max
    index 3aeab87682..4681f1b686 100644
    --- a/Task/ABC-problem/MAXScript/abc-problem-3.max
    +++ b/Task/ABC-problem/MAXScript/abc-problem-3.max
    @@ -1,30 +1,30 @@
     fn isWordPossible2 word =
     (
    -   Blocks = #("BO","XK","DQ","CP","NA", \
    -            "GT","RE","TG","QD","FS", \
    -            "JW","HU","VI","AN","OB", \
    -            "ER","FS","LY","PC","ZM")
    +	Blocks = #("BO","XK","DQ","CP","NA", \
    +			   "GT","RE","TG","QD","FS", \
    +			   "JW","HU","VI","AN","OB", \
    +			   "ER","FS","LY","PC","ZM")
             word = toupper word
    -   local pos = 1
    -   local solvedLetters = #()
    -   while pos <= word.count do
    -   (
    -      for i = 1 to blocks.count do
    -      (
    -         if (matchpattern blocks[i] pattern:("*"+word[pos]+"*")) then
    -            (
    -               deleteitem blocks i
    -               appendifunique solvedLetters pos
    -               pos +=1
    -               exit
    -            )
    -         else if i == blocks.count do return false
    -      )
    -   )
    -   if solvedLetters.count == word.count then
    -   (
    -      local check = ""
    -      for bit in solvedLetters do append check word[bit]
    -      if check == word then return true else return false
    -   ) else return false
    +	local pos = 1
    +	local solvedLetters = #()
    +	while pos <= word.count do
    +	(
    +		for i = 1 to blocks.count do
    +		(
    +			if (matchpattern blocks[i] pattern:("*"+word[pos]+"*")) then
    +				(
    +					deleteitem blocks i
    +					appendifunique solvedLetters pos
    +					pos +=1
    +					exit
    +				)
    +			else if i == blocks.count do return false
    +		)
    +	)
    +	if solvedLetters.count == word.count then
    +	(
    +		local check = ""
    +		for bit in solvedLetters do append check word[bit]
    +		if check == word then return true else return false
    +	) else return false
     )
    diff --git a/Task/ABC-problem/Maple/abc-problem.maple b/Task/ABC-problem/Maple/abc-problem.maple
    index 0937c92c58..98312bccce 100644
    --- a/Task/ABC-problem/Maple/abc-problem.maple
    +++ b/Task/ABC-problem/Maple/abc-problem.maple
    @@ -1,23 +1,23 @@
     canSpell := proc(w)
    -   local blocks, i, j, word, letterFound;
    -   blocks := Array([["B", "O"], ["X", "K"], ["D", "Q"], ["C", "P"], ["N", "A"], ["G", "T"], ["R", "E"], ["T", "G"],
    +	local blocks, i, j, word, letterFound;
    +	blocks := Array([["B", "O"], ["X", "K"], ["D", "Q"], ["C", "P"], ["N", "A"], ["G", "T"], ["R", "E"], ["T", "G"],
                              ["Q", "D"], ["F", "S"], ["J", "W"], ["H", "U"], ["V", "I"], ["A", "N"], ["O", "B"], ["E", "R"],
                              ["F", "S"], ["L", "Y"], ["P", "C"], ["Z", "M"]]);
    -   word := StringTools[UpperCase](convert(w, string));
    -   for i to length(word) do
    -      letterFound := false;
    -      for j to numelems(blocks)/2 do
    -         if not letterFound and (substring(word, i) = blocks[j,1] or substring(word, i) = blocks[j,2]) then
    -            blocks[j,1] := undefined;
    -            blocks[j,2] := undefined;
    -            letterFound := true;
    -         end if;
    -      end do;
    -      if not letterFound then
    -         return false;
    -      end if;
    -   end do;
    -   return true;
    +	word := StringTools[UpperCase](convert(w, string));
    +	for i to length(word) do
    +		letterFound := false;
    +		for j to numelems(blocks)/2 do
    +			if not letterFound and (substring(word, i) = blocks[j,1] or substring(word, i) = blocks[j,2]) then
    +				blocks[j,1] := undefined;
    +				blocks[j,2] := undefined;
    +				letterFound := true;
    +			end if;
    +		end do;
    +		if not letterFound then
    +			return false;
    +		end if;
    +	end do;
    +	return true;
     end proc:
     
     seq(printf("%a: %a\n", i, canSpell(i)), i in [a, Bark, bOok, treat, COMMON, squad, confuse]);
    diff --git a/Task/ABC-problem/OCaml/abc-problem.ml b/Task/ABC-problem/OCaml/abc-problem.ocaml
    similarity index 100%
    rename from Task/ABC-problem/OCaml/abc-problem.ml
    rename to Task/ABC-problem/OCaml/abc-problem.ocaml
    diff --git a/Task/ABC-problem/Pluto/abc-problem.pluto b/Task/ABC-problem/Pluto/abc-problem.pluto
    deleted file mode 100644
    index 243a9a5f79..0000000000
    --- a/Task/ABC-problem/Pluto/abc-problem.pluto
    +++ /dev/null
    @@ -1,25 +0,0 @@
    -function r(word, bl)
    -    if word == "" then return true end
    -    local c = word:byte(1) | 32
    -    for i = 1, #bl do
    -        local b = bl[i]
    -        if c == b:byte(1) | 32 or c == b:byte(2) | 32 then
    -            bl[i] = bl[1]
    -            bl[1] = b
    -            if r(word:sub(2), bl:slice(2)) then return true end
    -            bl[1], bl[i] = bl[i], bl[1]
    -        end
    -    end
    -    return false
    -end
    -
    -local function new_speller(blocks)
    -    local bl = blocks:split(" ")
    -    return |word| -> r(word, bl)
    -end
    -
    -local sp = new_speller("BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM")
    -local words = {"A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "CONFUSE"}
    -for words as word do
    -    print(string.format("%-7s %s", word, sp(word)))
    -end
    diff --git a/Task/ABC-problem/PowerBASIC/abc-problem.basic b/Task/ABC-problem/PowerBASIC/abc-problem.basic
    index 4a29562c45..ff524d89eb 100644
    --- a/Task/ABC-problem/PowerBASIC/abc-problem.basic
    +++ b/Task/ABC-problem/PowerBASIC/abc-problem.basic
    @@ -20,7 +20,7 @@
     '1.Once a letter on a block is used that block cannot be used again
     '2.The function should be case-insensitive
     '3. Show your output on this page for the following words:
    -'  A, BARK, BOOK, TREAT, COMMON, SQUAD, CONFUSE
    +'	A, BARK, BOOK, TREAT, COMMON, SQUAD, CONFUSE
     '-----------------------------------------------------------------------------
     ' G l o b a l   C o n s t a n t s
     '
    diff --git a/Task/ABC-problem/PowerShell/abc-problem.ps1 b/Task/ABC-problem/PowerShell/abc-problem.ps1
    deleted file mode 100644
    index 3c8a1239a4..0000000000
    --- a/Task/ABC-problem/PowerShell/abc-problem.ps1
    +++ /dev/null
    @@ -1,117 +0,0 @@
    -<#
    -.Synopsis
    -  ABC Problem
    -.DESCRIPTION
    -   You are given a collection of ABC blocks. Just like the ones you had when you were a kid.
    -   There are twenty blocks with two letters on each block. You are guaranteed to have a
    -   complete alphabet amongst all sides of the blocks
    -   blocks = "BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS","JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"
    -   The goal of this task is to write a function that takes a string and can determine whether
    -   you can spell the word with the given collection of blocks.
    -
    -   The rules are simple:
    -        1.Once a letter on a block is used that block cannot be used again
    -        2.The function should be case-insensitive
    -        3. Show your output on this page for the following words:
    -        >>> can_make_word("A")
    -        True
    -        >>> can_make_word("BARK")
    -        True
    -        >>> can_make_word("BOOK")
    -        False
    -        >>> can_make_word("TREAT")
    -        True
    -        >>> can_make_word("COMMON")
    -        False
    -        >>> can_make_word("SQUAD")
    -        True
    -        >>> can_make_word("CONFUSE")
    -        True
    -
    -   Using the examples below  you can either see just the value or
    -   status and the values using the verbose switch
    -
    -.EXAMPLE
    -   test-blocks -testword confuse
    -
    -.EXAMPLE
    -   test-blocks -testword confuse -verbose
    -
    -#>
    -
    -function test-blocks
    -{
    -   [CmdletBinding()]
    -   #  [OutputType([int])]
    -   Param
    -   (
    -      # word to test against blocks
    -      [Parameter(Mandatory = $true,
    -               ValueFromPipelineByPropertyName = $true)]
    -      $testword
    -
    -   )
    -
    -   $word = $testword
    -
    -   #define array of blocks
    -   [System.Collections.ArrayList]$blockarray = "BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS", "JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"
    -
    -   #send word to chararray
    -   $chararray = $word.ToCharArray()
    -   $chars = $chararray
    -
    -   #get the character count
    -   $charscount = $chars.count
    -
    -   #get the initial count of the blocks
    -   $blockcount = $blockarray.Count
    -
    -   #find out how many blocks should be left from the difference
    -   #of the blocks and characters in the word - 1 letter/1 block
    -   $correctblockcount = $blockcount - $charscount
    -
    -   #loop through the characters in the word
    -   foreach ($char in $chars)
    -   {
    -
    -      #loop through the blocks
    -      foreach ($block in $blockarray)
    -      {
    -
    -         #check the current character against each letter on the current block
    -         #and break if found so the array can reload
    -         if ($char -in $block[0] -or $char -in $block[1])
    -         {
    -
    -            write-verbose "match for letter - $char - removing block $block"
    -            $blockarray.Remove($block)
    -            break
    -
    -         }
    -
    -      }
    -
    -   }
    -   #get final count of blocks left in array to determine if the word was
    -   #correctly made
    -   $finalblockcount = $blockarray.count
    -   if ($finalblockcount -ne $correctblockcount)
    -   {
    -      write-verbose "$word : $false "
    -      return $false
    -   }
    -   else
    -   {
    -      write-verbose "$word : $true "
    -      return $true
    -   }
    -
    -}
    -
    -#loop all the words and pass them to the function
    -$wordlist = "a", "bark", "book", "treat", "common", "squad", "confuse"
    -foreach ($word in $wordlist)
    -{
    -   test-blocks -testword $word -Verbose
    -}
    diff --git a/Task/ABC-problem/PowerShell/abc-problem.psh b/Task/ABC-problem/PowerShell/abc-problem.psh
    new file mode 100644
    index 0000000000..9fd301dcac
    --- /dev/null
    +++ b/Task/ABC-problem/PowerShell/abc-problem.psh
    @@ -0,0 +1,117 @@
    +<#
    +.Synopsis
    +  ABC Problem
    +.DESCRIPTION
    +   You are given a collection of ABC blocks. Just like the ones you had when you were a kid.
    +   There are twenty blocks with two letters on each block. You are guaranteed to have a
    +   complete alphabet amongst all sides of the blocks
    +   blocks = "BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS","JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"
    +   The goal of this task is to write a function that takes a string and can determine whether
    +   you can spell the word with the given collection of blocks.
    +
    +   The rules are simple:
    +        1.Once a letter on a block is used that block cannot be used again
    +        2.The function should be case-insensitive
    +        3. Show your output on this page for the following words:
    +        >>> can_make_word("A")
    +        True
    +        >>> can_make_word("BARK")
    +        True
    +        >>> can_make_word("BOOK")
    +        False
    +        >>> can_make_word("TREAT")
    +        True
    +        >>> can_make_word("COMMON")
    +        False
    +        >>> can_make_word("SQUAD")
    +        True
    +        >>> can_make_word("CONFUSE")
    +        True
    +
    +   Using the examples below  you can either see just the value or
    +   status and the values using the verbose switch
    +
    +.EXAMPLE
    +   test-blocks -testword confuse
    +
    +.EXAMPLE
    +   test-blocks -testword confuse -verbose
    +
    +#>
    +
    +function test-blocks
    +{
    +	[CmdletBinding()]
    +	#  [OutputType([int])]
    +	Param
    +	(
    +		# word to test against blocks
    +		[Parameter(Mandatory = $true,
    +				   ValueFromPipelineByPropertyName = $true)]
    +		$testword
    +		
    +	)
    +
    +	$word = $testword
    +	
    +	#define array of blocks
    +	[System.Collections.ArrayList]$blockarray = "BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS", "JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"
    +	
    +	#send word to chararray
    +	$chararray = $word.ToCharArray()
    +	$chars = $chararray
    +	
    +	#get the character count
    +	$charscount = $chars.count
    +	
    +	#get the initial count of the blocks
    +	$blockcount = $blockarray.Count
    +	
    +	#find out how many blocks should be left from the difference
    +	#of the blocks and characters in the word - 1 letter/1 block
    +	$correctblockcount = $blockcount - $charscount
    +	
    +	#loop through the characters in the word
    +	foreach ($char in $chars)
    +	{
    +		
    +		#loop through the blocks
    +		foreach ($block in $blockarray)
    +		{
    +			
    +			#check the current character against each letter on the current block
    +			#and break if found so the array can reload
    +			if ($char -in $block[0] -or $char -in $block[1])
    +			{
    +				
    +				write-verbose "match for letter - $char - removing block $block"
    +				$blockarray.Remove($block)
    +				break
    +				
    +			}
    +			
    +		}
    +		
    +	}
    +	#get final count of blocks left in array to determine if the word was
    +	#correctly made
    +	$finalblockcount = $blockarray.count
    +	if ($finalblockcount -ne $correctblockcount)
    +	{
    +		write-verbose "$word : $false "
    +		return $false
    +	}
    +	else
    +	{
    +		write-verbose "$word : $true "
    +		return $true
    +	}
    +	
    +}
    +
    +#loop all the words and pass them to the function
    +$wordlist = "a", "bark", "book", "treat", "common", "squad", "confuse"
    +foreach ($word in $wordlist)
    +{
    +	test-blocks -testword $word -Verbose
    +}
    diff --git a/Task/ABC-problem/Prolog/abc-problem-1.pro b/Task/ABC-problem/Prolog/abc-problem-1.pro
    index 90c7559163..99d543c21b 100644
    --- a/Task/ABC-problem/Prolog/abc-problem-1.pro
    +++ b/Task/ABC-problem/Prolog/abc-problem-1.pro
    @@ -1,22 +1,22 @@
     abc_problem :-
    -   maplist(abc_problem, ['', 'A', bark, bOOk, treAT, 'COmmon', sQuaD, 'CONFUSE']).
    +	maplist(abc_problem, ['', 'A', bark, bOOk, treAT, 'COmmon', sQuaD, 'CONFUSE']).
     
     
     abc_problem(Word) :-
    -   L = [[b,o],[x,k],[d,q],[c,p],[n,a],[g,t],[r,e],[t,g],[q,d],[f,s],
    -        [j,w],[h,u],[v,i],[a,n],[o,b],[e,r],[f,s],[l,y],[p,c],[z,m]],
    +	L = [[b,o],[x,k],[d,q],[c,p],[n,a],[g,t],[r,e],[t,g],[q,d],[f,s],
    +	     [j,w],[h,u],[v,i],[a,n],[o,b],[e,r],[f,s],[l,y],[p,c],[z,m]],
     
    -   (   abc_problem(L, Word)
    -   ->  format('~w OK~n', [Word])
    -   ;   format('~w KO~n', [Word])).
    +	(   abc_problem(L, Word)
    +	->  format('~w OK~n', [Word])
    +	;   format('~w KO~n', [Word])).
     
     abc_problem(L, Word) :-
    -   atom_chars(Word, C_Words),
    -   maplist(downcase_atom, C_Words, D_Words),
    -   can_makeword(L, D_Words).
    +	atom_chars(Word, C_Words),
    +	maplist(downcase_atom, C_Words, D_Words),
    +	can_makeword(L, D_Words).
     
     can_makeword(_L, []).
     
     can_makeword(L, [H | T]) :-
    -   (   select([H, _], L, L1); select([_, H], L, L1)),
    -   can_makeword(L1, T).
    +	(   select([H, _], L, L1); select([_, H], L, L1)),
    +	can_makeword(L1, T).
    diff --git a/Task/ABC-problem/Rebol/abc-problem.rebol b/Task/ABC-problem/Rebol/abc-problem.rebol
    deleted file mode 100644
    index fe63851d8f..0000000000
    --- a/Task/ABC-problem/Rebol/abc-problem.rebol
    +++ /dev/null
    @@ -1,38 +0,0 @@
    -Rebol [
    -    title: "Rosetta code: ABC problem"
    -    file:  %ABC_problem.r3
    -    url:   https://rosettacode.org/wiki/ABC_problem
    -    needs: 3.10.0 ;; or something like that
    -    note:  "Based on Red language solution"
    -]
    -;; Define the function 'test' that takes a string argument 's'
    -test: function [s [string!]][
    -    ;; Make a copy of the input string to work on (avoid mutation of original)
    -    s: copy s
    -    ;; Initialize 'p' as a copy of a specific character sequence
    -    p: copy "BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM"
    -    ;; Start an infinite loop
    -    forever [
    -        ;; If 's' is empty, return true (all characters matched/removed)
    -        if 0 = length? s [return  true]
    -        ;; If 'p' is at the tail (all pairs tried), return false (no match)
    -        if tail? p       [return false]
    -        ;; Create a parsing rule of the current two characters in 'p'
    -        rule: reduce [first p  '| second p]
    -        ;; Try to parse 's' according to the current rule:
    -        ;; If parsing succeeds, remove that rule from the string
    -        p: either parse s [to rule remove rule to end ] [
    -            ;; If parsing succeeded, remove the current pair from 'p'
    -            head remove/part p 2
    -        ][
    -            ;; If parsing failed, skip the current pair in 'p' (move to next pair)
    -            skip p 2
    -        ]
    -    ]
    -]
    -
    -;; Test the 'test' function on each word split from a string (split by space).
    -foreach word split {A bark book TrEAT COmMoN SQUAD conFUsE} space [
    -    ;; Print the word and its result from 'test'
    -    printf [8 ": "] reduce [word test word]
    -]
    diff --git a/Task/ABC-problem/Rust/abc-problem.rs b/Task/ABC-problem/Rust/abc-problem.rust
    similarity index 100%
    rename from Task/ABC-problem/Rust/abc-problem.rs
    rename to Task/ABC-problem/Rust/abc-problem.rust
    diff --git a/Task/ABC-problem/SNOBOL4/abc-problem.sno b/Task/ABC-problem/SNOBOL4/abc-problem.sno
    index 0ed5f49e73..b8cb880ab1 100644
    --- a/Task/ABC-problem/SNOBOL4/abc-problem.sno
    +++ b/Task/ABC-problem/SNOBOL4/abc-problem.sno
    @@ -4,46 +4,46 @@
     
     * Read in blocks to construct the blocks string
     in1
    -   line = replace(input,&lcase,&ucase) :f(in1end)
    -   line ? breakx(' ') . pre ' ' rem . post :f(in1end)
    -   blocks = blocks "," pre post
    -   :(in1)
    +	line = replace(input,&lcase,&ucase) :f(in1end)
    +	line ? breakx(' ') . pre ' ' rem . post :f(in1end)
    +	blocks = blocks "," pre post
    +	:(in1)
     in1end
     
     * Function to determine if a word can be constructed with the given blocks
    -   define('abc(blocks,word)s,i,let')
    -      abcpat = (breakx(',') ',') . pre (*let len(1) | len(1) *let) rem . post
    -   :(abc_end)
    +	define('abc(blocks,word)s,i,let')
    +		abcpat = (breakx(',') ',') . pre (*let len(1) | len(1) *let) rem . post
    +	:(abc_end)
     abc
    -   eq(size(word),0) :s(abc3)
    -   s = replace(word,&lcase,&ucase)
    -   i = 0
    +	eq(size(word),0) :s(abc3)
    +	s = replace(word,&lcase,&ucase)
    +	i = 0
     abc2
    -   i = lt(i,size(s)) i + 1 :f(abc4)
    -   let = substr(s,i,1)
    -   blocks ? abcpat = pre post :f(abc3)
    -   :(abc2)
    +	i = lt(i,size(s)) i + 1 :f(abc4)
    +	let = substr(s,i,1)
    +	blocks ? abcpat = pre post :f(abc3)
    +	:(abc2)
     abc3
    -   abc = 'False' :(abc5)
    +	abc = 'False' :(abc5)
     abc4
    -   abc = 'True'  :(abc5)
    +	abc = 'True'  :(abc5)
     abc5
    -   output = lpad('can_make_word("' word '"): ',26) abc
    -   abc = ""
    -   :(return)
    +	output = lpad('can_make_word("' word '"): ',26) abc
    +	abc = ""
    +	:(return)
     abc_end
     
     * Check words
    -*  output = abc(blocks,"")
    -*  output = abc(blocks," ")
    -   output = abc(blocks,'A')
    -   output = abc(blocks,'bark')
    -   output = abc(blocks,'BOOK')
    -   output = abc(blocks,'TrEAT')
    -   output = abc(blocks,'COMMON')
    -   output = abc(blocks,'SQUAD')
    -   output = abc(blocks,'CONFUSE')
    -
    +*	output = abc(blocks,"")
    +*	output = abc(blocks," ")
    +	output = abc(blocks,'A')
    +	output = abc(blocks,'bark')
    +	output = abc(blocks,'BOOK')
    +	output = abc(blocks,'TrEAT')
    +	output = abc(blocks,'COMMON')
    +	output = abc(blocks,'SQUAD')
    +	output = abc(blocks,'CONFUSE')
    +	
     * The blocks are entered below, after the following END label
     END
     b o
    diff --git a/Task/ABC-problem/Scheme/abc-problem.scm b/Task/ABC-problem/Scheme/abc-problem.ss
    similarity index 100%
    rename from Task/ABC-problem/Scheme/abc-problem.scm
    rename to Task/ABC-problem/Scheme/abc-problem.ss
    diff --git a/Task/ABC-problem/SenseTalk/abc-problem-1.sensetalk b/Task/ABC-problem/SenseTalk/abc-problem-1.sensetalk
    index ca1dcb76f7..abbfa87d9a 100644
    --- a/Task/ABC-problem/SenseTalk/abc-problem-1.sensetalk
    +++ b/Task/ABC-problem/SenseTalk/abc-problem-1.sensetalk
    @@ -1,41 +1,41 @@
     function CanMakeWord word
     
    -   put [
    -      ("B", "O"),
    -      ("X", "K"),
    -      ("D", "Q"),
    -      ("C", "P"),
    -      ("N", "A"),
    -      ("G", "T"),
    -      ("R", "E"),
    -      ("T", "G"),
    -      ("Q", "D"),
    -      ("F", "S"),
    -      ("J", "W"),
    -      ("H", "U"),
    -      ("V", "I"),
    -      ("A", "N"),
    -      ("O", "B"),
    -      ("E", "R"),
    -      ("F", "S"),
    -      ("L", "Y"),
    -      ("P", "C"),
    -      ("Z", "M")
    -   ] into blocks
    -
    -   repeat with each character letter of word
    -      put False into found
    -      repeat with each item block of blocks by reference
    -         if item 1 of block is letter ignoring case or item 2 of block is letter ignoring case
    -            delete block
    -            put True into found
    -            exit repeat
    -         end if
    -      end repeat
    -      if found is False
    -         return False
    -      end if
    -   end repeat
    -   return True
    -
    +	put [
    +		("B", "O"),
    +		("X", "K"),
    +		("D", "Q"),
    +		("C", "P"),
    +		("N", "A"),
    +		("G", "T"),
    +		("R", "E"),
    +		("T", "G"),
    +		("Q", "D"),
    +		("F", "S"),
    +		("J", "W"),
    +		("H", "U"),
    +		("V", "I"),
    +		("A", "N"),
    +		("O", "B"),
    +		("E", "R"),
    +		("F", "S"),
    +		("L", "Y"),
    +		("P", "C"),
    +		("Z", "M")
    +	] into blocks
    +	
    +	repeat with each character letter of word
    +		put False into found
    +		repeat with each item block of blocks by reference
    +			if item 1 of block is letter ignoring case or item 2 of block is letter ignoring case
    +				delete block
    +				put True into found
    +				exit repeat
    +			end if
    +		end repeat
    +		if found is False
    +			return False
    +		end if
    +	end repeat
    +	return True
    +	
     end CanMakeWord
    diff --git a/Task/ABC-problem/SenseTalk/abc-problem-2.sensetalk b/Task/ABC-problem/SenseTalk/abc-problem-2.sensetalk
    index 7bbcd3910d..8949df06a2 100644
    --- a/Task/ABC-problem/SenseTalk/abc-problem-2.sensetalk
    +++ b/Task/ABC-problem/SenseTalk/abc-problem-2.sensetalk
    @@ -1,11 +1,11 @@
     repeat with each item word in [
    -   "A",
    -   "BARK",
    -   "BOOK",
    -   "TREAT",
    -   "COMMON",
    -   "SQUAD",
    -   "CONFUSE"
    +	"A",
    +	"BARK",
    +	"BOOK",
    +	"TREAT",
    +	"COMMON",
    +	"SQUAD",
    +	"CONFUSE"
             ]
    -   put CanMakeWord(word)
    +	put CanMakeWord(word)
     end repeat
    diff --git a/Task/ABC-problem/SequenceL/abc-problem-1.sequencel b/Task/ABC-problem/SequenceL/abc-problem-1.sequencel
    index eabaaedc4f..57f03ba268 100644
    --- a/Task/ABC-problem/SequenceL/abc-problem-1.sequencel
    +++ b/Task/ABC-problem/SequenceL/abc-problem-1.sequencel
    @@ -2,28 +2,28 @@ import ;
     import ;
     
     main(args(2)) :=
    -   let
    -      result[i] := args[i] ++ ": " ++ boolToString(can_make_word(args[i], InitBlocks));
    -   in
    -      delimit(result, '\n');
    +	let
    +		result[i] := args[i] ++ ": " ++ boolToString(can_make_word(args[i], InitBlocks));
    +	in
    +		delimit(result, '\n');
     
     InitBlocks :=  ["BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS", "JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"];
    -
    +			
     can_make_word(word(1), blocks(2)) :=
    -   let
    -      choices[i] := i when some(blocks[i] = toUpper(head(word)));
    -      blocksAfterChoice[i] := blocks[(1 ... (choices[i] - 1)) ++ ((choices[i] + 1) ... size(blocks))];
    -   in
    -      true when size(word) = 0
    -   else
    -      false when size(choices) = 0
    -   else
    -      some(can_make_word(tail(word), blocksAfterChoice));
    -
    +	let
    +		choices[i] := i when some(blocks[i] = toUpper(head(word)));
    +		blocksAfterChoice[i] := blocks[(1 ... (choices[i] - 1)) ++ ((choices[i] + 1) ... size(blocks))];
    +	in
    +		true when size(word) = 0
    +	else
    +		false when size(choices) = 0
    +	else
    +		some(can_make_word(tail(word), blocksAfterChoice));
    +		
     toUpper(letter(0)) :=
    -   let
    -      ascii := asciiToInt(letter);
    -   in
    -      letter when ascii >= 65 and ascii <= 90
    -   else
    -      intToAscii(ascii -  32);
    +	let
    +		ascii := asciiToInt(letter);
    +	in
    +		letter when ascii >= 65 and ascii <= 90
    +	else
    +		intToAscii(ascii -  32);
    diff --git a/Task/ABC-problem/SequenceL/abc-problem-2.sequencel b/Task/ABC-problem/SequenceL/abc-problem-2.sequencel
    index 11b30e8581..a82214ee48 100644
    --- a/Task/ABC-problem/SequenceL/abc-problem-2.sequencel
    +++ b/Task/ABC-problem/SequenceL/abc-problem-2.sequencel
    @@ -3,29 +3,29 @@ import ;
     import ;
     
     main(args(2)) :=
    -   let
    -      result[i] := args[i] ++ ": " ++ boolToString(can_make_word(args[i], InitBlocks));
    -   in
    -      delimit(result, '\n');
    +	let
    +		result[i] := args[i] ++ ": " ++ boolToString(can_make_word(args[i], InitBlocks));
    +	in
    +		delimit(result, '\n');
     
     InitBlocks :=  "BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM";
    -
    +			
     can_make_word(word(1), blocks(1)) :=
    -   let
    -      regEx := "(\\a" ++ [toUpper(head(word))] ++ "|" ++ [toUpper(head(word))] ++ "\\a)";
    -
    -      newBlocks := replaceFirst(blocks, regEx, "");
    -   in
    -      true when size(word) = 0
    -   else
    -      false when size(newBlocks) = size(blocks)
    -   else
    -      can_make_word(tail(word), newBlocks);
    +	let
    +		regEx := "(\\a" ++ [toUpper(head(word))] ++ "|" ++ [toUpper(head(word))] ++ "\\a)";
    +		
    +		newBlocks := replaceFirst(blocks, regEx, "");
    +	in
    +		true when size(word) = 0
    +	else
    +		false when size(newBlocks) = size(blocks)
    +	else
    +		can_make_word(tail(word), newBlocks);
     
     toUpper(letter(0)) :=
    -   let
    -      ascii := asciiToInt(letter);
    -   in
    -      letter when ascii >= 65 and ascii <= 90
    -   else
    -      intToAscii(ascii -  32);
    +	let
    +		ascii := asciiToInt(letter);
    +	in
    +		letter when ascii >= 65 and ascii <= 90
    +	else
    +		intToAscii(ascii -  32);
    diff --git a/Task/ABC-problem/Smalltalk/abc-problem.st b/Task/ABC-problem/Smalltalk/abc-problem.st
    index 3b23286677..d6a10f2fbe 100644
    --- a/Task/ABC-problem/Smalltalk/abc-problem.st
    +++ b/Task/ABC-problem/Smalltalk/abc-problem.st
    @@ -1,21 +1,21 @@
     ABCPuzzle>>test
    -   #('A' 'BARK' 'BOOK' 'TreaT' 'COMMON' 'sQUAD' 'CONFuSE') do: [ :each |
    -      Transcript crShow: each, ': ', (self solveFor: each) asString ]
    +	#('A' 'BARK' 'BOOK' 'TreaT' 'COMMON' 'sQUAD' 'CONFuSE') do: [ :each |
    +		Transcript crShow: each, ': ', (self solveFor: each) asString ]
     
     ABCPuzzle>>solveFor: letters
    -   | blocks |
    -   blocks := #('BO' 'XK' 'DQ' 'CP' 'NA' 'GT' 'RE' 'TG' 'QD' 'FS' 'JW' 'HU' 'VI' 'AN' 'OB' 'ER' 'FS' 'LY' 'PC' 'ZM').
    -   ^ self solveFor: letters asUppercase with: blocks asOrderedCollection
    +	| blocks |
    +	blocks := #('BO' 'XK' 'DQ' 'CP' 'NA' 'GT' 'RE' 'TG' 'QD' 'FS' 'JW' 'HU' 'VI' 'AN' 'OB' 'ER' 'FS' 'LY' 'PC' 'ZM').
    +	^ self solveFor: letters asUppercase with: blocks asOrderedCollection
     
     ABCPuzzle>>solveFor: letters with: blocks
    -   | l ldash matches |
    -   letters isEmpty ifTrue: [ ^ true ].
    -   l := letters first.
    -   ldash := letters allButFirst.
    -   matches := blocks select: [  :b | b includes: l ].
    -   matches isEmpty ifTrue: [ ^ false ].
    -   matches do: [  :m | | bdash |
    -      bdash := blocks copy.
    -      bdash remove: m.
    -      (self solveFor: ldash with: bdash) ifTrue: [ ^ true ] ].
    -   ^ false
    +	| l ldash matches |
    +	letters isEmpty ifTrue: [ ^ true ].
    +	l := letters first.
    +	ldash := letters allButFirst.
    +	matches := blocks select: [  :b | b includes: l ].
    +	matches isEmpty ifTrue: [ ^ false ].
    +	matches do: [  :m | | bdash |
    +		bdash := blocks copy.
    +		bdash remove: m.
    +		(self solveFor: ldash with: bdash) ifTrue: [ ^ true ] ].
    +	^ false
    diff --git a/Task/ABC-problem/Swift/abc-problem-2.swift b/Task/ABC-problem/Swift/abc-problem-2.swift
    index be73620266..026a22d936 100644
    --- a/Task/ABC-problem/Swift/abc-problem-2.swift
    +++ b/Task/ABC-problem/Swift/abc-problem-2.swift
    @@ -1,20 +1,20 @@
     import Swift
     
     func canMake(word: String) -> Bool {
    -   var blocks = [
    -      "BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS",
    -      "JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"
    -   ]
    -
    -   for letter in word.uppercased().characters {
    -      guard let index = blocks.index(where: { $0.characters.contains(letter) }) else {
    -         return false
    -      }
    -
    -      blocks.remove(at: index)
    -   }
    -
    -   return true
    +	var blocks = [
    +		"BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS",
    +		"JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"
    +	]
    +	
    +	for letter in word.uppercased().characters {
    +		guard let index = blocks.index(where: { $0.characters.contains(letter) }) else {
    +			return false
    +		}
    +		
    +		blocks.remove(at: index)
    +	}
    +	
    +	return true
     }
     
     let words = ["a", "bARK", "boOK", "TreAt", "CoMmon", "SquAd", "CONFUse"]
    diff --git a/Task/ABC-problem/Tcl/abc-problem.tcl b/Task/ABC-problem/Tcl/abc-problem.tcl
    index 7dab1aa0e6..d3f4b8f321 100644
    --- a/Task/ABC-problem/Tcl/abc-problem.tcl
    +++ b/Task/ABC-problem/Tcl/abc-problem.tcl
    @@ -2,16 +2,16 @@ package require Tcl 8.6
     
     proc abc {word {blocks {BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM}}} {
         set abc {{letters blocks abc} {
    -   set rest [lassign $letters ch]
    -   set i 0
    -   foreach blk $blocks {
    -       if {$ch in $blk && (![llength $rest]
    -          || [apply $abc $rest [lreplace $blocks $i $i] $abc])} {
    -      return true
    -       }
    -       incr i
    -   }
    -   return false
    +	set rest [lassign $letters ch]
    +	set i 0
    +	foreach blk $blocks {
    +	    if {$ch in $blk && (![llength $rest]
    +		    || [apply $abc $rest [lreplace $blocks $i $i] $abc])} {
    +		return true
    +	    }
    +	    incr i
    +	}
    +	return false
         }}
         return [apply $abc [split $word ""] [lmap b $blocks {split $b ""}] $abc]
     }
    diff --git a/Task/ABC-problem/Transd/abc-problem.transd b/Task/ABC-problem/Transd/abc-problem.transd
    index b0bf878924..3ac73650a8 100644
    --- a/Task/ABC-problem/Transd/abc-problem.transd
    +++ b/Task/ABC-problem/Transd/abc-problem.transd
    @@ -2,7 +2,7 @@
     
     MainModule: {
         blocks: ["BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS",
    -      "JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"],
    +		"JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"],
         words: ["A","BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"],
     
         testMake: Lambda Bool>(λ
    @@ -16,7 +16,7 @@ MainModule: {
             )
             (ret false)
         ),
    -   _start: (lambda
    +	_start: (lambda
             (for word in words do
                 (lout :boolalpha word " : "
                     (exec testMake word blocks))
    diff --git a/Task/ABC-problem/Uiua/abc-problem.uiua b/Task/ABC-problem/Uiua/abc-problem.uiua
    deleted file mode 100644
    index 244ecba154..0000000000
    --- a/Task/ABC-problem/Uiua/abc-problem.uiua
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -s   ← "BOXKDQCPNAGTRETGQDFSJWHUVIANOBERFSLYPCZM"
    -Flt ← ⊂⊙↘₂⊃↙↘-⊸◿2⊸˜⨂ # remove block holding letter
    -{"A" "BARK" "BOOK" "TREAT" "COMMON" "SQUAD" "CONFUSE"}
    -≡⊂⟜⍚(◌◌⍥(⍥(⊙⊙⋅0)⊸≍⟜˜Flt⊙°⊂)◡⋅⧻ s ⊙1)
    diff --git a/Task/ABC-problem/Ultimate++/abc-problem.ultimate++ b/Task/ABC-problem/Ultimate++/abc-problem.ultimate++
    index fbfcebdcc0..13a35283ad 100644
    --- a/Task/ABC-problem/Ultimate++/abc-problem.ultimate++
    +++ b/Task/ABC-problem/Ultimate++/abc-problem.ultimate++
    @@ -19,84 +19,84 @@ using namespace Upp;
     
     int can_make_words(char **b, char *word)
     {
    -   int i, ret = 0, c = toupper(*word);
    -
    -   if (!c) return 1;
    -   if (!b[0]) return 0;
    -
    -   for (i = 0; b[i] && !ret; i++) {
    -      if (b[i][0] != c && b[i][1] != c) continue;
    -      Swap(b[i], b[0]);  // It needs to be Swap and not SWAP
    -      ret = can_make_words(b + 1, word + 1);
    -      Swap(b[i], b[0]);  // It needs to be Swap instead of SWAP
    -   }
    -   return ret;
    +	int i, ret = 0, c = toupper(*word);
    +	
    +	if (!c) return 1;
    +	if (!b[0]) return 0;
    +	
    +	for (i = 0; b[i] && !ret; i++) {
    +		if (b[i][0] != c && b[i][1] != c) continue;
    +		Swap(b[i], b[0]);  // It needs to be Swap and not SWAP
    +		ret = can_make_words(b + 1, word + 1);
    +		Swap(b[i], b[0]);  // It needs to be Swap instead of SWAP
    +	}
    +	return ret;
     }
     
     
     //C++
     
     bool can_create_word(const std::string& w, const list_t& vals) {
    -   std::set used;
    -   while (used.size() < w.size()) {
    -      const char c = toupper(w[used.size()]);
    -      uint32_t x = used.size();
    -      for (uint32_t i = 0, ii = vals.size(); i < ii; ++i) {
    -         if (used.find(i) == used.end()) {
    -            if (toupper(vals[i].first) == c || toupper(vals[i].second) == c) {
    -               used.insert(i);
    -               break;
    -            }
    -         }
    -      }
    -      if (x == used.size()) break;
    -   }
    -   return used.size() == w.size();
    +	std::set used;
    +	while (used.size() < w.size()) {
    +		const char c = toupper(w[used.size()]);
    +		uint32_t x = used.size();
    +		for (uint32_t i = 0, ii = vals.size(); i < ii; ++i) {
    +			if (used.find(i) == used.end()) {
    +				if (toupper(vals[i].first) == c || toupper(vals[i].second) == c) {
    +					used.insert(i);
    +					break;
    +				}
    +			}
    +		}
    +		if (x == used.size()) break;
    +	}
    +	return used.size() == w.size();
     }
     
     
     // U++
     CONSOLE_APP_MAIN
     {
    -   // C
    -   char* blocks[] =
    -   {
    -      (char*)"BO", (char*)"XK", (char*)"DQ", (char*)"CP",
    -      (char*)"NA", (char*)"GT", (char*)"RE", (char*)"TG",
    -      (char*)"QD", (char*)"FS", (char*)"JW", (char*)"HU",
    -      (char*)"VI", (char*)"AN", (char*)"OB", (char*)"ER",
    -      (char*)"FS", (char*)"LY", (char*)"PC", (char*)"ZM", 0
    -   };
    +	// C
    +	char* blocks[] =
    +	{
    +		(char*)"BO", (char*)"XK", (char*)"DQ", (char*)"CP",
    +		(char*)"NA", (char*)"GT", (char*)"RE", (char*)"TG",
    +		(char*)"QD", (char*)"FS", (char*)"JW", (char*)"HU",
    +		(char*)"VI", (char*)"AN", (char*)"OB", (char*)"ER",
    +		(char*)"FS", (char*)"LY", (char*)"PC", (char*)"ZM", 0
    +	};
     
    -   char *words[] =
    -   {
    -      (char*)"", (char*)"A", (char*)"BARK", (char*)"BOOK",
    -      (char*)"TREAT", (char*)"COMMON", (char*)"SQUAD", (char*)"Confuse", 0
    -   };
    +	char *words[] =
    +	{
    +		(char*)"", (char*)"A", (char*)"BARK", (char*)"BOOK",
    +		(char*)"TREAT", (char*)"COMMON", (char*)"SQUAD", (char*)"Confuse", 0
    +	};
    +	
    +	char **w;
    +	for (w = words; *w; w++)
    +		printf("%s\t%d\n", *w, can_make_words(blocks, *w));	
    +	
    +	printf("\n");
    +	
    +	// C++
    +	list_t vals{ {'B', 'O'}, {'X', 'K'}, {'D', 'Q'}, {'C', 'P'},
    +		{'N', 'A'}, {'G', 'T'}, {'R', 'E'}, {'T', 'G'}, {'Q', 'D'},
    +		{'F', 'S'}, {'J', 'W'}, {'H', 'U'}, {'V', 'I'}, {'A', 'N'},
    +		{'O', 'B'}, {'E', 'R'}, {'F', 'S'}, {'L', 'Y'}, {'P', 'C'},
    +		{'Z', 'M'}
    +	};
    +	std::vector wordsb{"A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "Confuse"};
    +	for (const std::string& w : wordsb) {
    +		std::cout << w << ": " << std::boolalpha << can_create_word(w, vals) << ".\n";
    +	}
    +	std::cout << "\n";
    +	
     
    -   char **w;
    -   for (w = words; *w; w++)
    -      printf("%s\t%d\n", *w, can_make_words(blocks, *w));
    -
    -   printf("\n");
    -
    -   // C++
    -   list_t vals{ {'B', 'O'}, {'X', 'K'}, {'D', 'Q'}, {'C', 'P'},
    -      {'N', 'A'}, {'G', 'T'}, {'R', 'E'}, {'T', 'G'}, {'Q', 'D'},
    -      {'F', 'S'}, {'J', 'W'}, {'H', 'U'}, {'V', 'I'}, {'A', 'N'},
    -      {'O', 'B'}, {'E', 'R'}, {'F', 'S'}, {'L', 'Y'}, {'P', 'C'},
    -      {'Z', 'M'}
    -   };
    -   std::vector wordsb{"A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "Confuse"};
    -   for (const std::string& w : wordsb) {
    -      std::cout << w << ": " << std::boolalpha << can_create_word(w, vals) << ".\n";
    -   }
    -   std::cout << "\n";
    -
    -
    -
    -   const Vector& cmdline = CommandLine();
    -   for(int i = 0; i < cmdline.GetCount(); i++) {
    -   }
    +	
    +	const Vector& cmdline = CommandLine();
    +	for(int i = 0; i < cmdline.GetCount(); i++) {
    +	}
     
     }
    diff --git a/Task/ABC-problem/V-(Vlang)/abc-problem.v b/Task/ABC-problem/V-(Vlang)/abc-problem.v
    index f34fa80d4b..fbda461417 100644
    --- a/Task/ABC-problem/V-(Vlang)/abc-problem.v
    +++ b/Task/ABC-problem/V-(Vlang)/abc-problem.v
    @@ -1,28 +1,29 @@
    -const blocks = ["BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS",
    -"JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"]
    -
    -const words = ["A", "BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"]
    +const
    +(
    +	blocks = ["BO","XK","DQ","CP","NA","GT","RE","TG","QD","FS","JW","HU","VI","AN","OB","ER","FS","LY","PC","ZM"]
    +	words = ["A", BARK","BOOK","TREAT","COMMON","SQUAD","CONFUSE"]
    +)
     
     fn main() {
    -   for word in words {
    -      println('>>> can_make_word("${word.to_upper()}"): ')
    -      if check_word(word, blocks) == true { println("True") } else { println("False") }
    -   }
    +	for word in words {
    +		println('>>> can_make_word("${word.to_upper()}"): ')
    +		if check_word(word, blocks) == true {println('True')} else {println('False')}
    +	}
     }
     
     fn check_word(word string, blocks []string) bool {
    -   mut tblocks := blocks.clone()
    -   mut found := false
    -   for chr in word {
    -      found = false
    -      for idx, _ in tblocks {
    -         if tblocks[idx].contains(chr.ascii_str()) == true {
    -            tblocks[idx] =""
    -            found = true
    -            break
    -         }
    -      }
    -      if found == false { return found }
    -   }
    -   return found
    +	mut tblocks := blocks.clone()
    +	mut found := false
    +	for chr in word {
    +		found = false
    +		for idx, _ in tblocks {
    +			if tblocks[idx].contains(chr.ascii_str()) == true {
    +				tblocks[idx] =''
    +				found = true
    +				break
    +			}
    +		}
    +		if found == false {return found}
    +	}
    +	return found
     }
    diff --git a/Task/ABC-problem/Yabasic/abc-problem.basic b/Task/ABC-problem/Yabasic/abc-problem.basic
    index d7db87519a..c2e561b9f7 100644
    --- a/Task/ABC-problem/Yabasic/abc-problem.basic
    +++ b/Task/ABC-problem/Yabasic/abc-problem.basic
    @@ -1,28 +1,28 @@
     letters$ = "BO,XK,DQ,CP,NA,GT,RE,TG,QD,FS,JW,HU,VI,AN,OB,ER,FS,LY,PC,ZM"
     
     sub canMake(letters$, word$)
    -   local i, j, p, n, pairs$(1)
    -
    -   n = token(letters$, pairs$(), ",")
    -   word$ = upper$(word$)
    -
    -   for i = 1 to len(word$)
    -      for j = 1 to n
    -         p = instr(pairs$(j), mid$(word$, i, 1))
    -         if p then
    -            pairs$(j) = ""
    -            break
    -         end if
    -      next j
    -      if not p return false
    -   next i
    -   return true
    +	local i, j, p, n, pairs$(1)
    +	
    +	n = token(letters$, pairs$(), ",")
    +	word$ = upper$(word$)
    +	
    +	for i = 1 to len(word$)
    +		for j = 1 to n
    +			p = instr(pairs$(j), mid$(word$, i, 1))
    +			if p then
    +				pairs$(j) = ""
    +				break
    +			end if
    +		next j
    +		if not p return false
    +	next i
    +	return true
     end sub
     
    -print "a = ", canMake(letters$, "a")   // 1 = true
    -print "bark = ", canMake(letters$, "Bark")   // 1
    -print "book = ", canMake(letters$, "BooK")   // 0 = false
    -print "treat = ", canMake(letters$, "TREAt") // 1
    -print "common = ", canMake(letters$, "common")  // 0
    -print "squad = ", canMake(letters$, "squad") // 1
    -print "confuse = ", canMake(letters$, "confuse")   // 1
    +print "a = ", canMake(letters$, "a")	// 1 = true
    +print "bark = ", canMake(letters$, "Bark")	// 1
    +print "book = ", canMake(letters$, "BooK")	// 0 = false
    +print "treat = ", canMake(letters$, "TREAt")	// 1
    +print "common = ", canMake(letters$, "common")	// 0
    +print "squad = ", canMake(letters$, "squad")	// 1
    +print "confuse = ", canMake(letters$, "confuse")	// 1
    diff --git a/Task/ABC-problem/Zig/abc-problem.zig b/Task/ABC-problem/Zig/abc-problem.zig
    deleted file mode 100644
    index ea586f7323..0000000000
    --- a/Task/ABC-problem/Zig/abc-problem.zig
    +++ /dev/null
    @@ -1,54 +0,0 @@
    -const std = @import("std");
    -
    -const Block: type = struct { Char1: u8, Char2: u8 };
    -const BLOCK_SIZE: comptime_int = 20;
    -const blocks: [BLOCK_SIZE]Block = .{
    -    .{ .Char1 = 'B', .Char2 = 'O' }, .{ .Char1 = 'X', .Char2 = 'K' },
    -    .{ .Char1 = 'D', .Char2 = 'Q' }, .{ .Char1 = 'C', .Char2 = 'P' },
    -    .{ .Char1 = 'N', .Char2 = 'A' }, .{ .Char1 = 'G', .Char2 = 'T' },
    -    .{ .Char1 = 'R', .Char2 = 'E' }, .{ .Char1 = 'T', .Char2 = 'G' },
    -    .{ .Char1 = 'Q', .Char2 = 'D' }, .{ .Char1 = 'F', .Char2 = 'S' },
    -    .{ .Char1 = 'J', .Char2 = 'W' }, .{ .Char1 = 'H', .Char2 = 'U' },
    -    .{ .Char1 = 'V', .Char2 = 'I' }, .{ .Char1 = 'A', .Char2 = 'N' },
    -    .{ .Char1 = 'O', .Char2 = 'B' }, .{ .Char1 = 'E', .Char2 = 'R' },
    -    .{ .Char1 = 'F', .Char2 = 'S' }, .{ .Char1 = 'L', .Char2 = 'Y' },
    -    .{ .Char1 = 'P', .Char2 = 'C' }, .{ .Char1 = 'Z', .Char2 = 'M' },
    -};
    -
    -fn can_make_word(word: []const u8) bool {
    -    var marked: [BLOCK_SIZE]bool = [_]bool{false} ** BLOCK_SIZE;
    -
    -    for (word) |char| {
    -        var hasBlock: bool = false;
    -
    -        for (blocks, 0..) |block, index| {
    -            if ((block.Char1 == char or block.Char2 == char) and !marked[index]) {
    -                hasBlock = true;
    -                marked[index] = true;
    -                break;
    -            }
    -        }
    -
    -        if (!hasBlock) {
    -            return false;
    -        }
    -    }
    -
    -    return true;
    -}
    -
    -pub fn main() !void {
    -    const words: []const []const u8 = &.{
    -        "A",
    -        "BARK",
    -        "BOOK",
    -        "TREAT",
    -        "COMMON",
    -        "SQUAD",
    -        "CONFUSE",
    -    };
    -
    -    for (words) |word| {
    -        std.debug.print("{s}\t{any}\n", .{ word, can_make_word(word) });
    -    }
    -}
    diff --git a/Task/ABC-problem/Zkl/abc-problem.zkl b/Task/ABC-problem/Zkl/abc-problem.zkl
    index a34c775681..66da4854fc 100644
    --- a/Task/ABC-problem/Zkl/abc-problem.zkl
    +++ b/Task/ABC-problem/Zkl/abc-problem.zkl
    @@ -1,14 +1,14 @@
     var blocks=T("BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS",
    -        "JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM", );
    +	     "JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM", );
     
     fcn can_make_word(word){
        fcn(blks,word){
           if (not word) return(True);  // bottom of recursion
           foreach b in (blks){ n:=__bWalker.idx;
    -    if(not b.holds(word[0])) continue; // letter not on this block
    -    blks.del(n);     // remove this block from pile
    -    if (self.fcn(blks,word[1,*])) return(True);  // try remaining blocks
    -    blks.insert(n,b);   // put block back in pile: backtracking
    +	 if(not b.holds(word[0])) continue; // letter not on this block
    +	 blks.del(n);		// remove this block from pile
    +	 if (self.fcn(blks,word[1,*])) return(True);  // try remaining blocks
    +	 blks.insert(n,b);	// put block back in pile: backtracking
           }
           False;   // out of blocks but not out of word
        }(blocks.copy(),word.toUpper())
    diff --git a/Task/ABC-problem/Zonnon/abc-problem.zonnon b/Task/ABC-problem/Zonnon/abc-problem.zonnon
    index 731ebadcf1..c0dde3c245 100644
    --- a/Task/ABC-problem/Zonnon/abc-problem.zonnon
    +++ b/Task/ABC-problem/Zonnon/abc-problem.zonnon
    @@ -1,87 +1,87 @@
     module Main;
     type
    -   Block = record
    -      l,r: char;
    -      used: boolean;
    -   end Block;
    +	Block = record
    +		l,r: char;
    +		used: boolean;
    +	end Block;
     
     var
    -   blocks: array 20 of Block;
    +	blocks: array 20 of Block;
     
     procedure Exists(c: char): boolean;
     var
    -   i: integer;
    -   r: boolean;
    +	i: integer;
    +	r: boolean;
     begin
    -   r := false;i := 0;
    -   while ~r & (i < len(blocks)) do
    -      if ~(blocks[i].used) then
    -         r := (blocks[i].l = cap(c)) or (blocks[i].r = cap(c));
    -         blocks[i].used := r;
    -      end;
    -      inc(i)
    -   end;
    -   return r
    +	r := false;i := 0;
    +	while ~r & (i < len(blocks)) do
    +		if ~(blocks[i].used) then
    +			r := (blocks[i].l = cap(c)) or (blocks[i].r = cap(c));
    +			blocks[i].used := r;
    +		end;
    +		inc(i)
    +	end;
    +	return r
     end Exists;
     
     procedure CanMakeWord(s: string);
     var
    -   i: integer;
    -   made: boolean;
    +	i: integer;
    +	made: boolean;
     begin
    -   made := true;
    -   for i := 0 to len(s) - 1 do
    -      made := made & Exists(s[i])
    -   end;
    -   writeln(s:20,"?",made);
    -   Clean()
    +	made := true;
    +	for i := 0 to len(s) - 1 do
    +		made := made & Exists(s[i])
    +	end;
    +	writeln(s:20,"?",made);
    +	Clean()	
     end CanMakeWord;
     
     procedure Clean();
     var
    -   i: integer;
    +	i: integer;
     begin
    -   for i := 0 to len(blocks) - 1 do
    -      blocks[i].used := false
    -   end
    +	for i := 0 to len(blocks) - 1 do
    +		blocks[i].used := false
    +	end
     end Clean;
     
     procedure InitBlock(i:integer;l,r:char);
     begin
    -   blocks[i].l := l;blocks[i].r := r;
    -   blocks[i].used := false;
    +	blocks[i].l := l;blocks[i].r := r;
    +	blocks[i].used := false;
     end InitBlock;
     
     procedure Init;
     begin
    -   InitBlock(0,'B','O');
    -   InitBlock(1,'X','K');
    -   InitBlock(2,'D','Q');
    -   InitBlock(3,'C','Q');
    -   InitBlock(4,'N','A');
    -   InitBlock(5,'G','T');
    -   InitBlock(6,'R','E');
    -   InitBlock(7,'T','G');
    -   InitBlock(8,'Q','D');
    -   InitBlock(9,'F','S');
    -   InitBlock(10,'J','W');
    -   InitBlock(11,'H','U');
    -   InitBlock(12,'V','I');
    -   InitBlock(13,'A','N');
    -   InitBlock(14,'O','B');
    -   InitBlock(15,'E','R');
    -   InitBlock(16,'F','S');
    -   InitBlock(17,'L','Y');
    -   InitBlock(18,'P','C');
    -   InitBlock(19,'Z','M')
    +	InitBlock(0,'B','O');
    +	InitBlock(1,'X','K');
    +	InitBlock(2,'D','Q');
    +	InitBlock(3,'C','Q');
    +	InitBlock(4,'N','A');
    +	InitBlock(5,'G','T');
    +	InitBlock(6,'R','E');
    +	InitBlock(7,'T','G');
    +	InitBlock(8,'Q','D');
    +	InitBlock(9,'F','S');
    +	InitBlock(10,'J','W');
    +	InitBlock(11,'H','U');
    +	InitBlock(12,'V','I');
    +	InitBlock(13,'A','N');
    +	InitBlock(14,'O','B');
    +	InitBlock(15,'E','R');
    +	InitBlock(16,'F','S');
    +	InitBlock(17,'L','Y');
    +	InitBlock(18,'P','C');
    +	InitBlock(19,'Z','M')
     end Init;
     
     begin
    -   Init();
    -   CanMakeWord("A");
    -   CanMakeWord("BARK");
    -   CanMakeWord("BOOK");
    -   CanMakeWord("TREAT");
    -   CanMakeWord("COMMON");
    -   CanMakeWord("confuse");
    +	Init();
    +	CanMakeWord("A");
    +	CanMakeWord("BARK");
    +	CanMakeWord("BOOK");
    +	CanMakeWord("TREAT");
    +	CanMakeWord("COMMON");
    +	CanMakeWord("confuse");
     end Main.
    diff --git a/Task/ADFGVX-cipher/11l/adfgvx-cipher.11l b/Task/ADFGVX-cipher/11l/adfgvx-cipher.11l
    index 739e221d0a..e1dd671422 100644
    --- a/Task/ADFGVX-cipher/11l/adfgvx-cipher.11l
    +++ b/Task/ADFGVX-cipher/11l/adfgvx-cipher.11l
    @@ -3,8 +3,8 @@ V adfgvx = ‘ADFGVX’
     F encrypt(plainText, polybius, key)
        V s = ‘’
        L(ch) plainText
    -      L(r) 0.<6
    -         L(c) 0.<6
    +      L(r) 6
    +         L(c) 6
                 I polybius[r][c] == ch
                    s ‘’= :adfgvx[r]‘’:adfgvx[c]
     
    @@ -43,8 +43,8 @@ F decrypt(cipherText, polybius, key)
     V polybius = [[Char("\0")] * 6] * 6
     V alphabet = ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789’
     random:shuffle(&alphabet)
    -L(r) 0.<6
    -   L(c) 0.<6
    +L(r) 6
    +   L(c) 6
           polybius[r][c] = alphabet[6 * r + c]
     
     print("6 x 6 Polybius square:\n")
    diff --git a/Task/ADFGVX-cipher/APL/adfgvx-cipher.apl b/Task/ADFGVX-cipher/APL/adfgvx-cipher.apl
    deleted file mode 100644
    index 93c8c07787..0000000000
    --- a/Task/ADFGVX-cipher/APL/adfgvx-cipher.apl
    +++ /dev/null
    @@ -1,39 +0,0 @@
    -adfgvx←{
    -    n←⎕NS''
    -    n.split←↑{⍺≥⍴⍵:⊂⍵ ⋄ (⊂⍺↑⍵),⍺∇⍺↓⍵}
    -
    -    n.enc←⍺{
    -        t←∊(∘.,⍨'ADFGVX')[⊃∘⍸∘(⍺⍺∘=)¨⍵]
    -        w←↓⍉((⍴⍵⍵)split t)[;⍋⍵⍵]
    -        1↓∊' ',¨w~¨' '
    -    }⍵
    -
    -    n.dec←⍺{
    -        t←↓2 split (∊(⍉↑⍵⊆⍨' '≠⍵)[;⍋⍋⍵⍵])~' '
    -        ⍺⍺['ADFGVX'∘⍳¨t]
    -    }⍵
    -
    -    n
    -}
    -
    -adfgvx_test←{
    -    square←6 6⍴(⎕A,⎕D)[?⍨36]
    -    ⎕←'Polybius square:'
    -    ⎕←' ─ADFGVX','│┼││││││','A D F G V X' ⍪'─'⍪(11⍴1 0)\square
    -    ⎕←''
    -
    -    key←{
    -        file←'e:\unixdict.txt'
    -        dict←(~data∊⎕TC)⊆data←⊃⎕NGET file
    -        dict←(⍵{⍺=≢⍵}¨dict)/dict
    -        dict←({⍵≡∪⍵}¨dict)/dict
    -        1⎕C ⊃dict[?⍴dict]
    -    }9
    -    ⎕←'Key: ',key
    -
    -    a←square adfgvx key
    -
    -    ⎕←'Plaintext: ',plaintext←'ATTACKAT1200AM'
    -    ⎕←'Encrypted: ',encrypted←a.enc plaintext
    -    ⎕←'Decrypted: ',a.dec encrypted
    -}
    diff --git a/Task/ADFGVX-cipher/C-sharp/adfgvx-cipher.cs b/Task/ADFGVX-cipher/C-sharp/adfgvx-cipher.cs
    deleted file mode 100644
    index 3f4f47932f..0000000000
    --- a/Task/ADFGVX-cipher/C-sharp/adfgvx-cipher.cs
    +++ /dev/null
    @@ -1,117 +0,0 @@
    -using System.Diagnostics;
    -
    -const string cypher = "ADFGVX";
    -var N = cypher.Length;
    -var size = N * N;
    -const string symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    -Debug.Assert(size == symbols.Length);
    -var square = new int[size];
    -
    -for (var i = 0; i < size; i++)
    -{
    -    var j = Random.Shared.Next(i + 1);
    -    square[i] = square[j];
    -    square[j] = i;
    -}
    -
    -Console.WriteLine($"{N} x {N} Polybius square:");
    -Console.WriteLine();
    -Console.WriteLine($"  | {string.Join(' ', cypher.AsEnumerable())}");
    -Console.WriteLine(new string('-', 2 * N + 3));
    -
    -for (var row = 0; row < N; row++)
    -{
    -    Console.Write($"{cypher[row]} |");
    -
    -    for (var col = 0; col < N; col++)
    -    {
    -        Console.Write($" {symbols[square[col + row * N]]}");
    -    }
    -
    -    Console.WriteLine();
    -}
    -
    -static bool IsSuitableTranspositionKey(string s) =>
    -    s.Length >= 7 && s.Length <= 12 && s.Length == s.Distinct().Count() && s.All(symbols.ToLowerInvariant().Contains);
    -
    -var keys = File.ReadAllLines("unixdict.txt").Where(IsSuitableTranspositionKey).ToArray();
    -var key = keys[Random.Shared.Next(keys.Length)].ToUpperInvariant();
    -Console.WriteLine();
    -Console.WriteLine($"The key is {key}");
    -var plaintext = "ATTACKAT1200AM";
    -Console.WriteLine($"Plaintext: {plaintext}");
    -
    -string Encrypt(string plaintext, string key, int[] square)
    -{
    -    // Create a lookup table from symbol to fragment
    -    var map = (from i in Enumerable.Range(0, size)
    -               let k = square[i]
    -               let code = cypher[i / N] + "" + cypher[i % N]
    -               select (k, code))
    -               .ToDictionary(kc => symbols[kc.k], kc => kc.code);
    -
    -    // Map the plaintext to fragments
    -    var e = string.Join("", plaintext.Select(c => map[c]));
    -
    -    // Determine number of rows
    -    var K = key.Length;
    -    var rows = (e.Length + K - 1) / K;
    -
    -    // Pad with spaces
    -    e += new string(' ', rows * K - e.Length);
    -
    -    // Sort the key
    -    var order = string.Join("", key.OrderBy(c => c)).Select(c => key.IndexOf(c)).ToArray();
    -
    -    // Reorder the fragments.
    -    e = string.Join("", Enumerable.Range(0, K * rows).Select(i => e[(i / K) * K + order[i % K]]));
    -
    -    // Transpose
    -    e = new([.. from col in Enumerable.Range(0, K)
    -                from row in Enumerable.Range(0, rows)
    -                select e[row * K + col]]);
    -
    -    // Read off each column.
    -    return string.Join(" ", Enumerable.Range(0, K).Select(col => e.Substring(col * rows, rows).Trim()));
    -}
    -
    -var encrypted = Encrypt(plaintext, key, square);
    -Console.WriteLine($"Encrypted: {encrypted}");
    -
    -string Decrypt(string encrypted, string key, int[] square)
    -{
    -    // Create a lookup table from fragment to symbol
    -    var map = (from i in Enumerable.Range(0, size)
    -               let k = square[i]
    -               let code = cypher[i / N] + "" + cypher[i % N]
    -               select (k, code))
    -               .ToDictionary(kc => kc.code, kc => symbols[kc.k]);
    -
    -    // Split into columns
    -    var cols = encrypted.Split(' ');
    -
    -    // Determine number of rows
    -    var K = key.Length;
    -    var rows = cols.Max(c => c.Length);
    -
    -    // Pad each column
    -    cols = [.. cols.Select(c => c.PadRight(rows))];
    -
    -    // Transpose
    -    string e = new([.. from row in Enumerable.Range(0, rows)
    -                       from col in Enumerable.Range(0, K)
    -                       select cols[col][row]]);
    -
    -    // Sort the key
    -    var sorted = string.Join("", key.OrderBy(c => c));
    -    var order = key.Select(c => sorted.IndexOf(c)).ToArray();
    -
    -    // Reorder the fragments
    -    e = string.Join("", Enumerable.Range(0, K * rows).Select(i => e[(i / K) * K + order[i % K]])).Trim();
    -
    -    // Map the fragments to plaintext
    -    return string.Join("", Enumerable.Range(0, e.Length / 2).Select(i => map[e.Substring(2 * i, 2)]));
    -}
    -
    -var decrypted = Decrypt(encrypted, key, square);
    -Console.WriteLine($"Decrypted: {decrypted}");
    diff --git a/Task/ADFGVX-cipher/Crystal/adfgvx-cipher.cr b/Task/ADFGVX-cipher/Crystal/adfgvx-cipher.cr
    deleted file mode 100644
    index 3236abc45a..0000000000
    --- a/Task/ADFGVX-cipher/Crystal/adfgvx-cipher.cr
    +++ /dev/null
    @@ -1,62 +0,0 @@
    -def make_square
    -  # it's a square at heart...
    -  (('A'..'Z').to_a + ('0'..'9').to_a).shuffle!
    -end
    -
    -def make_key (size)
    -  words = File.open("unixdict.txt") do |f|
    -    f.each_line.select {|w| w.size == size && w.chars.to_set.size == size }.to_a
    -  end
    -  raise "no suitable key found" if words.empty?
    -  words.sample
    -end
    -
    -def adfgvx_encrypt (message, square, key)
    -  h = "ADFGVX".chars
    -  message.chars.flat_map {|ch|
    -    row, col = square.index!(ch).divmod(6)
    -    [ h[row], h[col] ]
    -  }
    -    .in_groups_of(key.size)
    -    .transpose
    -    .zip(key.chars)
    -    .sort_by {|_, key| key }
    -    .map {|col, _| col.join }
    -    .join(" ")
    -end
    -
    -def adfgvx_decrypt (message, square, key)
    -  h = "ADFGVX".chars
    -  sorted_key = key.chars.sort!
    -  cols = message.split.map &.chars
    -  max_size = cols.max_of &.size
    -  cols.map {|col| col + [nil]*(max_size-col.size) }
    -    .zip(sorted_key)
    -    .sort_by {|_, ch| key.index! ch }
    -    .map {|col, _| col }
    -    .transpose
    -    .flatten.compact
    -    .in_slices_of(2)
    -    .map {|(row, col)| square[ h.index!(row)*6 + h.index!(col) ] }
    -    .join
    -end
    -
    -def show (title, message, square, key)
    -  encrypted = adfgvx_encrypt message, square, key
    -  decrypted = adfgvx_decrypt encrypted, square, key
    -  puts title
    -  puts " - Alphabet: #{square.join}"
    -  puts " - Key:      #{key}"
    -  puts " - Message:   #{message}"
    -  puts " - Encrypted: #{encrypted}"
    -  puts " - Decrypted: #{decrypted}"
    -  puts
    -end
    -
    -message = "ATTACKAT1200AM"
    -
    -wiki_square = "NA1C3H8TB2OME5WRPD4F6G7I9J0KLQSUVXYZ".chars
    -wiki_key = "PRIVACY"
    -
    -show "Wikipedia example:", message, wiki_square, wiki_key
    -show "Random square and key:", message, make_square, make_key(9)
    diff --git a/Task/ADFGVX-cipher/Fortran/adfgvx-cipher.f b/Task/ADFGVX-cipher/Fortran/adfgvx-cipher.f
    deleted file mode 100644
    index 40af143af8..0000000000
    --- a/Task/ADFGVX-cipher/Fortran/adfgvx-cipher.f
    +++ /dev/null
    @@ -1,618 +0,0 @@
    -!
    -! ADFGVX Cipher
    -! tested with Intel ifx (IFX) 2025.2.1 20250806             on Kubuntu 25.10
    -!             GNU Fortran (Ubuntu 15.2.0-4ubuntu4) 15.2.0   on Kubuntu 25.10
    -! VSI Fortran on VMS does not compile it because it cannot handle
    -! allocatable character strings.
    -! U.B., December 2025
    -!==============================================================================
    -
    -program ADFGVXCipher
    -
    -  implicit none
    -
    -  logical, parameter :: DEBUG = .false.     ! set to .true. for reproducable, not random results
    -  logical, parameter :: VERBOSE = .false.   ! set this to .true. to print some intermediate results
    -  integer, parameter :: maxLen=100          ! Maximum length of any test message (including extensions as 'X')
    -
    -  integer, parameter :: minPassLen=7, maxPassLen=12   ! Minimum and maximum password length
    -
    -  ! The complete alphabet of capital letters as used in most western languages, plus numbers 0...9
    -  character (len=36), parameter :: Alphabet ='ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567879'
    -  character (len=*), parameter :: ADFGVX = 'ADFGVX'
    -
    -  character (len=maxLen)    :: MsgToEncrypt, DecryptedMsg
    -  character (len=2*maxLen) :: EncryptedMsg   ! encrypt makes 2 letters from 1
    -  character (len=25)        :: PassPhrase
    -  integer, parameter :: ColWidth = 6     ! depends on length of the used alphabet but we use only 36 letters
    -
    -  character (len=36) :: PolyAlphabet      ! Permutation of Alphabet to represent Polybius square
    -  integer :: i
    -
    -  ! Initialize random number generator once for the entire run-time of the program and all test cases
    -  call random_seed()
    -
    -
    -  ! The message to encrypt - for 1 test case
    -  ! the plain text message is from the task description
    -  MsgToEncrypt = 'ATTACKAT1200AM'
    -
    -  if (.not. DEBUG) then
    -    print  '("Init: DEBUG is .false., i.e. password and Polybius square are randomized.")'
    -    PassPhrase = getRandomPassPhrase()       ! select random password from unixdict.txt
    -  else
    -    ! for DEBUG only: force constant password for reproducible result:
    -    print  '("Init: DEBUG is .true., i.e. the code reproduces results of the NIM solution")'
    -    PassPhrase = 'EXCURSION'  ! Taken from the NIM solution
    -  endif
    -
    -  print '("Init: PassPhrase for encode and decode is ", A)' , PassPhrase
    -
    -  if (.not. DEBUG) then
    -    call createRandomPolybiusSquare ()       ! Create random Permutation of Alphabet to represent Polybius square
    -  else
    -    ! For DEBUG only: force constant string for reproducable results
    -    ! Both the Alphabet and the password are from the NIM solution.
    -    ! If DEBUG is .true., the result of the NIM solution is exactly reproduced.
    -    PolyAlphabet =   'XOFPD6VHC40ZJMKRU5IA9YBW3L21NGQTE78S'
    -  endif
    -
    -  call PrintSquare ("Init: Following Polybius square is used for encode/decode:", PolyAlphabet, ColWidth)
    -
    -  call encode (MsgToEncrypt , EncryptedMsg, PolyAlphabet, PassPhrase)
    -  call decode (EncryptedMsg, DecryptedMsg, PolyAlphabet, PassPhrase)
    -
    -  call printResult (MsgToEncrypt, EncryptedMsg, DecryptedMsg)
    -
    -contains
    -
    -
    -
    -! ==========================================================
    -! Find random length of the new password,
    -! then pick a random word of this length from the word list
    -! ==========================================================
    -function getRandomPassPhrase()   result (retval)
    -  character (len=maxPassLen) :: retval
    -  integer :: leng                                             ! required length of password to pick
    -
    -  leng = randominInterval (minPassLen, maxPassLen)
    -  retval = getRandomWord (leng)
    -
    -end function getRandomPassPhrase
    -
    -! ==================================================================================
    -! Read the wordlist unixdict.txt and select a random word  with the requested length
    -! ==================================================================================
    -function getRandomWord (leng) result (retval)
    -  integer, intent(in) :: leng
    -  character (len=maxPassLen) :: retval
    -
    -  character(len=100)  :: word                                     ! is longer than expected input word length
    -  character (len=maxPassLen), allocatable :: Candidates (:)
    -  integer:: capacity, content
    -  integer :: io_stat, l, idx, ii
    -
    -  ! Read all words from unixdict.txt having length "len" and no repeating letters
    -  open(unit=10, file='unixdict.txt', status='old', action='read', iostat=io_stat)
    -  if (io_stat .ne. 0) then      ! File open MUST be successful, otherwise total program failure.
    -     print *, "Error opening file"
    -     stop
    -  end if
    -  capacity = 128
    -  call resize (Candidates, maxPassLen, capacity)
    -  content = 0
    -  do
    -    read (10,'(A)', iostat=io_stat)   word               ! ok for both intel and GNU.
    -    l = len_trim (word)                                  ! use this instead of Q format
    -    if (io_stat < 0) exit    ! EOF: Normal end of this loop
    -    if (io_stat > 0) then
    -      print *, "Read error" ! ERROR: (never seen)
    -      exit
    -    end if
    -    if (l .ne. leng) cycle
    -    if (hasDuplicateChars(word)) cycle
    -    if (content .eq. capacity) then
    -      capacity = capacity * 2
    -      call resize (Candidates, maxPassLen, capacity)
    -    end if
    -    content = content + 1
    -    Candidates (content) = word
    -  enddo
    -  idx = randominInterval (1, content)
    -  retval = candidates (idx)
    -  do ii=1, leng
    -    if (retval(ii:ii) .ge. 'a' .and. retval(ii:ii) .le. 'z') then
    -      retval(ii:ii) = char (ichar(retval(ii:ii)) - ichar('a') + ichar('A'))
    -    endif
    -  end do
    -  close (10)
    -
    -end function getRandomWord
    -
    -! ========================================================================
    -! Return true if argument word contains duplicate letters, otherwise false.
    -! ========================================================================
    -function hasDuplicateChars (word) result (itHas)
    -  character (len=*), intent(in) :: word
    -  logical :: itHas
    -  integer :: ii, jj, l
    -  l = len_trim(word)
    -  do ii=1, l
    -    do jj=ii+1, l
    -      if (word(ii:ii) .eq. word(jj:jj)) then
    -        itHas = .true.
    -        return
    -      endif
    -    end do
    -  end do
    -  itHas = .false.
    -end function hasDuplicateChars
    -
    -
    -  !==============================================================
    -  ! Creating a random Polybius square is equivalent with creating
    -  ! a random permutation of the used alphabet
    -  ! Use the Sattolo algorithm to create such a permutation .
    -  !==============================================================
    -subroutine createRandomPolybiusSquare ()
    -
    -  character :: tmp                                      ! for swapping single letters
    -
    -  integer :: j, k, l                                    ! Helper variables: indices into words, words' length
    -
    -
    -  PolyAlphabet = Alphabet
    -  l = len (Alphabet)
    -  do j = l, 1, -1                                       ! For all letters from end down to begin
    -    k = randominInterval (1, j-1)                       ! Select random letters between 1 and j-1
    -    tmp = PolyAlphabet(j:j)                             ! then swap letter at pos j with letter at pos k
    -    PolyAlphabet (j:j) = PolyAlphabet (k:k)
    -    PolyAlphabet (k:k) = tmp
    -  end do
    -
    -end subroutine createRandomPolybiusSquare
    -
    -
    -
    -! =============================================
    -! Increase allocated size of string array 'var'
    -! =============================================
    -subroutine resize(var, sLen, newSize)
    -  integer, intent(in)                              :: sLen       ! LEngth of 1 element of string array
    -  character (len=sLen), allocatable, intent(inout) :: var(:)     ! The array to be increased
    -  integer, intent(in)                              :: newSize    ! The new size of var
    -  character (len=sLen), allocatable                :: tmp(:)     ! Temporary storage
    -  integer                                          :: oldSize    ! Current array size
    -  integer                                          :: ii         ! Loop index
    -
    -  ! Copy allocated values to temporary, then allocate var with
    -  ! new size and copy back saved values.
    -  ! Could be done with move_alloc but this would not be portable to OpenVMS Fortran
    -
    -  if (allocated(var)) then
    -    oldSize = size(var)
    -  else
    -    oldSize = 0
    -  end if
    -
    -  if (newSize .gt. oldSize) then           ! only increment
    -    if (oldSize .gt.0) then
    -      allocate(tmp (oldSize))
    -      tmp(:oldSize) = var(:oldSize)
    -      deallocate (var)
    -    end if
    -    allocate(var(newSize))
    -    if (allocated(tmp) .and. allocated (var) ) then
    -      oldSize = min(size(tmp, 1), size(var, 1))
    -      var(:oldSize) = tmp(:oldSize)
    -      deallocate (tmp)
    -    end if
    -  end if
    -end subroutine resize
    -
    -
    -  ! ===========================================================
    -  ! Generate random number between @lo and @hi (inclusive)
    -  ! Assume Random Number Generator has been initialized before.
    -  ! ===========================================================
    -function randominInterval (lo, hi) result (r)
    -  integer, intent(in) :: lo, hi                         ! the interval
    -  integer :: r                                          ! resultant (pseudo-)random number
    -  real :: rnd                                           ! Fortran random number generator generates float values
    -
    -  call random_number (rnd)
    -  r = lo + FLOOR((hi+1-lo)*rnd)                         ! We want to choose one between [lo,hi]
    -
    -end function randominInterval
    -
    -
    -
    -! =============================================
    -! Encode a given string using the ADFGVX Cipher
    -! =============================================
    -subroutine encode (argInString, outString, argAlphabet, argPassPhrase)
    -  character (len=*), intent(in)  :: argInString     ! The string to encode
    -  character (len=*), intent(out) :: outString       ! The resultant encoded text
    -  character (len=*), intent(in)  :: argAlphabet     ! The alphabet that makes the Polybius square
    -  character (len=*), intent(in) :: argPassPhrase    ! the password used for encode and also decode.
    -  integer :: nRow
    -  integer :: argLen, passLen, newlen, ii, jj, kk, row, col
    -  character(len=2*len(OutString)+len_trim(argPassPhrase))  newAlphabet
    -
    -  character, dimension(:,:), allocatable :: Matrix, expandedMatrix
    -
    -  argLen = len_trim (argInString)
    -  passLen = len_trim (argPassPhrase)
    -  newlen = len(OutString)+len_trim(argPassPhrase)
    -  ! 1st step: encode with the given alphabet (resp. the equivalent 6x6 square),
    -  ! the output string being the row/col of each letter, expressed in terms of ADFGVX
    -  outString = ' '
    -  jj = 1
    -  do ii=1,argLen
    -    call getRC (argInString(ii:ii),row,col, argAlphabet)
    -    outString (jj:jj) = ADFGVX (row:row)
    -    jj = jj + 1
    -    outString (jj:jj) = ADFGVX (col:col)
    -    jj = jj + 1
    -  end do
    -
    -  if (VERBOSE) then
    -    print '("Encode, first step: ")'
    -    do ii=1, arglen
    -      write (*,'(A3)', advance='no') ArgInString (ii:ii)
    -    end do
    -    print *, 'becomes'
    -
    -    do ii=1, 2*argLen, 2
    -      write (*,'(x,A2)', advance='no') outString (ii:ii+1)
    -    end do
    -    write (*,'(///)')
    -  endif
    -
    -  jj = 1
    -  kk = 1
    -  newAlphabet = argPassPhrase (:passLen) // outString(:len_trim(outString))
    -
    -  nRow = (len_trim (newAlphabet) + passLen - 1)/passLen ! Required net number of lines for the Matrix
    -  allocate (Matrix (passLen, nRow))
    -
    -  ! Without any complications: Just accept that last line might be incomplete - complete it with spaces.
    -  do row=1, nRow
    -    do col=1,passLen
    -      if (row .eq. 1 ) then                             ! Top row gets the password
    -        Matrix (col,row) = newAlphabet (jj:jj)
    -        jj = jj + 1
    -      else
    -        if (jj .gt. len_trim(newAlphabet)) then         ! Entire new alphabet copied to Matrix
    -          Matrix(col,row) = ' '                         ! remaining Matrix is all blank
    -        else
    -          Matrix (col,row) = newAlphabet (jj:jj)
    -          jj = jj + 1
    -        endif
    -      endif
    -    end do
    -    if (jj .gt. len_trim(newAlphabet)) exit
    -  end do
    -  jj = 1
    -  do row=1, nRow
    -    do col=1,passLen
    -      newAlphabet (jj:jj) = Matrix (col,row)
    -      jj = jj + 1
    -    end do
    -  end do
    -
    -  if (VERBOSE) &
    -    call printMatrix ('Encode: This results in a new matrix: ', Matrix, nRow, passLen)
    -  ! Sort columns
    -  call quicksort_matrix (Matrix, passLen, nRow, 1, passlen)
    -
    -  if (VERBOSE) &
    -    call printMatrix ('Encode: After sorting columns, this becomes: ', Matrix, nRow, passLen)
    -
    -  jj = 1
    -  do row=1, nRow
    -    do col=1,passLen
    -      newAlphabet (jj:jj) = Matrix (col,row)
    -      jj = jj + 1
    -    end do
    -  end do
    -
    -  allocate (expandedMatrix (passLen, nRow))
    -  ! Initialize al to blank
    -  do row=1, 2*kk
    -    do col=1,passLen
    -      expandedMatrix (col,row) = ' '
    -    end do
    -  end do
    -
    -  jj=1
    -  do row=1, nRow
    -    do col=1,passLen
    -      if (jj .le. len_trim(newAlphabet))  then
    -        expandedMatrix (col,row) = newAlphabet (jj:jj)
    -      else
    -        expandedMatrix (col,row) = ' '
    -      endif
    -      jj = jj + 1
    -    end do
    -  end do
    -
    -  outString = ' '
    -  jj = 1
    -  do col=1,passLen
    -    do row=2, nRow
    -      if (expandedMatrix (col,row) .ne. ' ') then
    -        outString (jj:jj) = expandedMatrix (col,row)
    -        jj = jj + 1
    -      end if
    -    end do
    -    outString (jj:jj) = ' '
    -    jj = jj + 1
    -  end do
    -
    -end subroutine encode
    -
    -
    -! ==================================================================================
    -! Sort columns of a Matrix, taking elements of top row as key to decide "lt" or ge".
    -! ==================================================================================
    -recursive subroutine quicksort_matrix (mat, ncols, nrows, low, high)
    -
    -  integer, intent(in) :: ncols,nrows
    -  character, dimension (ncols,nrows), intent(inout) :: mat
    -
    -  integer, intent(in) :: low, high
    -  integer :: pivot_index
    -  integer :: i, j, mid
    -  character :: pivot, temp
    -
    -  if (low .lt. high) then
    -    ! The list is already "almost sorted", so use midlle word as pivot.
    -    mid = low + (high-low) / 2
    -    pivot = mat (mid,1)
    -
    -    !Move pivot to the end
    -    call swapMat (mat,ncols,nrows,mid,high)
    -
    -    i = low - 1
    -    do j = low, high - 1
    -      if (mat(j,1) .le. pivot) then
    -        i = i + 1
    -        call swapMat (mat,ncols,nrows,i,j)
    -      end if
    -    end do
    -
    -    call swapMat (mat,ncols,nrows,i+1,high)
    -    pivot_index = i + 1
    -
    -    call quicksort_matrix (mat, ncols,nrows, low, pivot_index - 1)
    -    call quicksort_matrix (mat, ncols,nrows,  pivot_index + 1, high)
    -  end if
    -end subroutine quicksort_matrix
    -
    -! ===============================================
    -! Swap two columns of a Matrix (Used for sorting)
    -! ===============================================
    -subroutine swapMat (mat,ncols,nrows,col1,col2)
    -  integer, intent(in) :: ncols,nrows                        ! Size of ...
    -  character, dimension (ncols,nrows), intent(inout) :: mat  ! ... the matrix
    -  integer, intent(in) :: col1, col2                         ! The 2 columns to swap
    -
    -  character :: tmp                                    ! Helpers to swap 2 elements
    -  integer :: row
    -
    -  ! early return in trivial noop case
    -  if (col1 .eq. col2) return
    -
    -  do row=1, nrows                                    ! Swap all elements of col 1 and col 2
    -    tmp = mat (col1,row)
    -    mat (col1,row) = mat(col2,row)
    -    mat(col2,row) = tmp
    -  end do
    -
    -end subroutine swapMat
    -
    -! =======================================================
    -! Decode a given (encoded) string using the ADFGVX Cipher
    -! =======================================================
    -subroutine decode (argInString, outString, argAlphabet, argPassPhrase)
    -  character (len=*), intent(in)  :: argInString     ! The encoded string to decode
    -  character (len=*), intent(out) :: outString       ! Result of the decode
    -  character (len=*), intent(in)  :: argAlphabet     ! The Polybius Square to encode and decode
    -  character (len=*), intent(in) :: argPassPhrase    ! The Password used to encode and decode
    -  character (len=MaxLen) :: tmpString               ! Temporary torage for intermediate result
    -  character, allocatable :: Matrix (:,:)            ! Matrix to constructed from input string
    -  character (len=:),allocatable :: SortedPassPhrase ! The password after sorting its letters
    -  integer :: nRow, passLen                          ! NMUmbner of rows and columns of above Matrix
    -  integer :: inLen, col,row, ii, jj, idx            ! Length of input string, and some helpers
    -
    -  ! Estimate input string lengths
    -  inLen = len_trim (argInString)
    -  passLen = len_trim (argPassPhrase)
    -
    -  outString = ' '
    -  nRow = (inLen + (passLen-1)) / passLen  + 1     ! 1 extra for top row = password
    -
    -  allocate (Matrix (passLen, nRow))
    -
    -  ! Initialize entire matrix
    -  do col=1,passLen
    -    do row=1, nRow
    -      Matrix (col,row) = ' '
    -    end do
    -    ! Fill the column as far as required
    -  end do
    -
    -
    -  ! The columns of the result matrix are sorted as password letters and
    -  ! the sorted password letters makeup top row of th is matrix
    -  SortedPassPhrase = argPassPhrase
    -  call  quicksort_matrix (SortedPassPhrase, passlen,  1, 1, passlen)
    -
    -  row=1
    -  do col=1, passLen
    -    Matrix (col,row) = SortedPassPhrase(col:col)
    -  end do
    -
    -  ! Set rest ( row 2 ff.) of the Matrix: column by column
    -  jj = 1
    -  do col=1,passLen
    -    row = 2
    -    do while (argInString (jj:jj) .ne. ' ')
    -      Matrix (col,row) = argInString (jj:jj)
    -      jj = jj + 1
    -      row = row + 1
    -    enddo
    -    jj = jj + 1
    -  end do
    -
    -  if (VERBOSE) &
    -    call printMatrix ('Decode: the reconstructed Code matrix is ', Matrix, nROw, passLen)
    -
    -  ! We know the columns of this matrix are sorted together with the password
    -  !
    -  ! restore the correct order of thet sorted matrix
    -  call UndoSort (Matrix, passLen, nRow, argPassPhrase, passlen)
    -
    -  if (VERBOSE) &
    -    call printMatrix ('Decode: After Undo Sorting, this becomes', Matrix, nRow, passLen)
    -
    -  ! The matrix is in the correct order now, so its rows, one by one,  represent the first encoded string
    -  !
    -  jj = 1
    -  tmpString = ' '
    -  do row = 2, nRow          ! Skip top row (=Passwprd)
    -    do col=1,passLen
    -      tmpString (jj:jj) = Matrix(col,row)
    -      jj = jj + 1
    -    end do
    -  end do
    -
    -  ! Now we have the encoded string, each 2 letters are row/col in ADFGVX scheme
    -  jj = 1
    -  do ii=1, len_trim(tmpString), 2
    -    row = index (ADFGVX, tmpString(ii:ii))
    -    col = index (ADFGVX, tmpString((ii+1) : (ii+1)))
    -    outString (jj:jj) = getChar (row,col,argAlphabet)   ! Decode from row/col to clear text
    -    jj = jj + 1
    -  end do
    -end subroutine decode
    -
    -! =============================================================================
    -! Print all nRow x nCol elements of a Matrix, togehther with a descriptive text
    -! =============================================================================
    -subroutine printMatrix (comment, Matrix, nRow, nCol)
    -  integer, intent(in) :: nRow, nCol
    -  character (len=*), intent(in) :: Comment
    -  character , intent(in) :: Matrix (nCol, nRow)
    -  integer :: r, c
    -
    -  write (*,'(/A/)')  Comment
    -  do r=1, nROw
    -    do c=1, nCol
    -      write (*, '(A2)', advance='no')  Matrix(c,r)
    -    end do
    -    write (*,*)
    -  end do
    -end subroutine printMatrix
    -
    -!=============================================================
    -! Matrix has been sorted before, with top row as key elements.
    -! Here undo that sort operation
    -!=============================================================
    -subroutine UndoSort (Matrix, nCol, nRow, argPassPhrase, passLen)
    -  integer, intent(in) :: nCol, nRow, passLen
    -  character, intent(inout)  :: Matrix (nCol, nROw)
    -  character                 :: resultMatrix (nCol, nROw)
    -
    -  character (len=passLen), intent(in) :: argPassPhrase
    -
    -  integer :: ii, jj, kk
    -
    -  do ii=1, passLen
    -    ! find whatever letter should be at pos ii within the unscrambled string
    -    jj = index (argPassPhrase, Matrix(ii, 1) )
    -    ! so letter "PassPhrase(jj:jj)" should be at pos ii in line 1 of Matrix
    -    if (jj .ne. ii) then
    -      do kk=1, nRow
    -        resultMatrix (jj,kk) = Matrix(ii,kk)
    -      end do
    -    else
    -      do kk=1, nRow
    -        resultMatrix (jj,kk) = Matrix(jj,kk)
    -      end do
    -    endif
    -  end do
    -  matrix = resultMatrix
    -end subroutine UndoSort
    -
    -
    -! ======================================================
    -! Get Row and Column  of a letter in the Polybius square
    -! ======================================================
    -subroutine getRC (c,row,col, argAlphabet)
    -  character, intent(in) :: c
    -  integer, intent(out) :: row,col
    -  character (len=*), intent(in)  :: argAlphabet             ! Argument to use for encoding
    -  integer :: idx
    -
    -  idx = index (argAlphabet, c) - 1
    -
    -  row = 1 + idx / ColWidth
    -  col = 1 + mod (idx, ColWidth)
    -
    -end subroutine getRC
    -
    -! ==================================================
    -! Return letter in row column of the Polybius square
    -! ==================================================
    -function getChar (row,column,argAlphabet) result (chr)
    -  integer, intent(in) :: row, column
    -  character (len=*), intent(in)  :: argAlphabet             ! Argument to use for encoding
    -  character :: chr
    -  integer :: idx
    -
    -  idx = (row-1) * ColWidth + column
    -  chr = argAlphabet (idx:idx)
    -
    -end function getChar
    -
    -! ===========================================
    -! Print original, encoded and decoded strings
    -! ===========================================
    -subroutine printResult (m1,m2,m3)
    -  character (len=*), intent(in) :: m1,m2,m3
    -  write (*,'("Original:  ", A)')  m1(:len_trim(m1))
    -  write (*,'(" Encoded:  ", A)')  m2(:len_trim(m2))
    -  write (*,'(" Decoded:  ", A)')  m3(:len_trim(m3))
    -  print *
    -end subroutine printResult
    -
    -! ================================================================================
    -! Print the resulting Polybius square based on the alphabet used for encode/decode
    -! ================================================================================
    -subroutine PrintSquare (Comment, Alp, cw)
    -  character (len=*), intent(in) :: Comment
    -  character (len=*), intent(in)  :: Alp
    -  integer, intent(in) :: cw                                     ! column width for dormatted display
    -  integer:: ii, l
    -
    -  l = len_trim(alp)
    -  write (*,'(/A/)')  Comment
    -  Write (*, "('   A D F G V X', /,' +------------',/  A, '|')", advance='no') ADFGVX (1:1)
    -  do ii=1, l
    -    write (*, '(A2)', advance='no')  Alp(ii:ii)
    -    if (mod (ii, cw) .eq. 0) then
    -      if (ii .ne. l)  then
    -        write (*,'(/,A1,"|")', advance='no') ADFGVX (1 +  ii/cw:1 +  ii/cw)
    -      else
    -        write (*,*) ! just EOL
    -      endif
    -    endif
    -  end do
    -  print *                                                       ! one extra blank line
    -end subroutine PrintSquare
    -
    -
    -end program ADFGVXCipher
    diff --git a/Task/ADFGVX-cipher/Free-Pascal-Lazarus/adfgvx-cipher.pas b/Task/ADFGVX-cipher/Free-Pascal-Lazarus/adfgvx-cipher.pas
    deleted file mode 100644
    index b35f201644..0000000000
    --- a/Task/ADFGVX-cipher/Free-Pascal-Lazarus/adfgvx-cipher.pas
    +++ /dev/null
    @@ -1,198 +0,0 @@
    -program adfgvxcipher;
    -
    -uses
    -  SysUtils,
    -  Classes;
    -
    -const
    -  ADFGVX = 'ADFGVX';
    -  ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    -  MESSAGE = 'ATTACKAT1200AM';
    -
    -type
    -  //tPolybiusarr = array[1..6,1..6] of string;
    -  tPolybiusarr = array[1..6, 1..6] of char;
    -
    -  procedure init_Polybius(var Polybius: tPolybiusarr);
    -
    -    procedure ShuffleString(var S: string);
    -    var
    -      i, j: integer;
    -      c: char;
    -    begin
    -      for i := Length(S) downto 2 do
    -      begin
    -        j := Random(i) + 1;  // 1..i
    -        c := S[i];
    -        S[i] := S[j];
    -        S[j] := c;
    -      end;
    -    end;
    -
    -  var
    -    ShuffledAlphabet: string;
    -    x, y, i: integer;
    -  begin
    -    ShuffledAlphabet := ALPHABET;
    -    ShuffleString(ShuffledAlphabet);
    -    i := 1;
    -    for x := 1 to 6 do
    -      for y := 1 to 6 do
    -      begin
    -        Polybius[x, y] := ShuffledAlphabet[i];
    -        Inc(i);
    -      end;
    -  end;
    -
    -  procedure PrintPolybius(Polybius: tPolybiusarr);
    -  var
    -    x, y: integer;
    -    ch: char;
    -  begin
    -    writeln('The 6 x 6 Polybius square:');
    -    writeln;
    -    Write('  |');
    -    for ch in ADFGVX do
    -      Write(ch: 2);
    -    writeln;
    -    writeln('---------------');
    -    for x := 1 to 6 do
    -    begin
    -      Write(ADFGVX[x], ' |');
    -      for y := 1 to 6 do
    -      begin
    -        Write(Polybius[x, y]: 2);
    -      end;
    -      writeln;
    -    end;
    -  end;
    -
    -  function CreateKey(size: integer): string;
    -
    -    procedure FilterList(var lst: TStringList; size: integer);
    -
    -      function HasRepeatedCharacters(const str: string): boolean;
    -      var
    -        seen: array[0..255] of boolean;
    -        i: integer;
    -        c: byte;
    -      begin
    -        FillChar(seen, SizeOf(seen), False);
    -        for i := 1 to Length(str) do
    -        begin
    -          c := Ord(str[i]);
    -          if seen[c] then
    -            Exit(True);    // repeated character found
    -          seen[c] := True;
    -        end;
    -        Result := False;   // no repeats
    -      end;
    -
    -    var
    -      x: integer;
    -    begin
    -      for x := lst.Count - 1 downto 0 do
    -        if (length(lst[x]) <> size) or HasRepeatedCharacters(lst[x]) then lst.Delete(x);
    -    end;
    -
    -  const
    -    FNAME = 'unixdict.txt';
    -  var
    -    list: TStringList;
    -  begin
    -    if (size < 7) or (size > 12) then
    -    begin
    -      writeln('Key should contain between 7 and 12 letters, both inclusive.');
    -      halt;
    -    end;
    -    list := TStringList.Create;
    -    list.LoadFromFile(FNAME);
    -    filterlist(list, size);
    -    Result := UpperCase(list[random(list.Count)]);
    -    list.Free;
    -  end;
    -
    -  function FindCharachter(ch: char; polybius: tPolybiusarr): string;
    -  var
    -    x, y: integer;
    -  begin
    -    for x := 1 to 6 do
    -      for y := 1 to 6 do
    -        if polybius[x, y] = ch then
    -          exit(ADFGVX[x] + ADFGVX[y]);
    -  end;
    -
    -  function Encrypt(plainText, key: string; Polybius: tPolybiusarr): string;
    -  var
    -    ch: char;
    -    str: string;
    -    lst: TStringList;
    -    x, keylength: integer;
    -  begin
    -    str := '';
    -    keylength := length(key);
    -    lst := TStringList.Create;
    -    for x := 1 to keylength do
    -      lst.Add(key[x]);
    -    x := 0;
    -    for ch in plainText do
    -    begin
    -      lst[x] := lst[x] + FindCharachter(ch, Polybius);
    -      Inc(x);
    -      if x = keylength then x := 0;
    -    end;
    -    lst.Sort;
    -    writeln;
    -    for x := 0 to keylength - 1 do
    -      str := str + lst[x] + ' ';
    -    Result := TrimRight(str);
    -    lst.Free;
    -  end;
    -
    -  function Decrypt(encryptedTex, key: string; polybius: tPolybiusarr): string;
    -    // Note: simplified decryption logic for demonstration purposes
    -    // need some work for longer messages
    -  var
    -    lst, tmp: TStringList;
    -    ch: char;
    -    s, str: string;
    -  begin
    -    lst := TStringList.Create;
    -    tmp := TStringList.Create;
    -    lst.AddDelimitedtext(encryptedTex, ' ', True);
    -    for ch in key do
    -      for str in lst do
    -        if str[1] = ch then
    -        begin
    -          tmp.Add(str);
    -          break;
    -        end;
    -    Result := '';
    -    s := '';
    -    for str in tmp do
    -    begin
    -      Result := Result + polybius[pos(str[2], ADFGVX), pos(str[3], ADFGVX)];
    -      if length(str) > 3 then s := s + polybius[pos(str[4], ADFGVX), pos(str[5], ADFGVX)];
    -    end;
    -    Result := Result + s;
    -    lst.Free;
    -    tmp.Free;
    -  end;
    -
    -var
    -  Polybius: tPolybiusarr;
    -  key, encryptedMessage, decryptedMessage: string;
    -
    -begin
    -  Randomize;
    -  init_Polybius(Polybius);
    -  PrintPolybius(Polybius);
    -  key := createkey(Random(12 - 7 + 1) + 7); //set length of word to 7 - 12
    -  encryptedMessage := Encrypt(MESSAGE, key, Polybius);
    -  decryptedMessage := Decrypt(encryptedMessage, key, polybius);
    -  writeln('The key is              : ', key);
    -  writeln('the plain message is    : ', MESSAGE);
    -  writeln('the encrypted message is: ', encryptedMessage);
    -  writeln('the decrypted message is: ', decryptedMessage);
    -
    -end.
    diff --git a/Task/ADFGVX-cipher/FreeBASIC/adfgvx-cipher.basic b/Task/ADFGVX-cipher/FreeBASIC/adfgvx-cipher.basic
    deleted file mode 100644
    index e2bd2cc64b..0000000000
    --- a/Task/ADFGVX-cipher/FreeBASIC/adfgvx-cipher.basic
    +++ /dev/null
    @@ -1,169 +0,0 @@
    -Const ADFGVX As String = "ADFGVX"
    -Const ALPHABET As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    -
    -Function InitialisePolybiusSquare() As String
    -    Dim As Integer i, j
    -    Dim As String letters(35)
    -    For i = 0 To 35
    -        letters(i) = Mid(ALPHABET, i + 1, 1)
    -    Next
    -    Randomize Timer
    -    For i = 0 To 35
    -        j = Int(Rnd * 36)
    -        Swap letters(i), letters(j)
    -    Next
    -
    -    Dim As Integer row, column
    -    Dim As String result = ""
    -    For row = 0 To 5
    -        For column = 0 To 5
    -            result &= letters(6 * row + column)
    -        Next
    -    Next
    -
    -    Return result
    -End Function
    -
    -Function CreateKey(size As Integer) As String
    -    If size < 7 Or size > 12 Then
    -        Print "Key should contain between 7 and 12 letters, both inclusive."
    -        Exit Function
    -    End If
    -
    -    Dim As Integer i, j
    -    Dim As String word, candidates()
    -    Dim As Integer ff = Freefile
    -
    -    Open "i:\unixdict.txt" For Input As #ff
    -    While Not Eof(ff)
    -        Line Input #ff, word
    -
    -        Dim As String uniqueWord = ""
    -        For i = 1 To Len(word)
    -            If Instr(uniqueWord, Mid(word, i, 1)) = 0 Then
    -                uniqueWord &= Mid(word, i, 1)
    -            End If
    -        Next
    -
    -        If Len(word) = size And Len(word) = Len(uniqueWord) Then
    -            word = Ucase(word)
    -
    -            Dim isAlphanum As Boolean = TRue
    -            For i = 1 To Len(word)
    -                If Not (Mid(word, i, 1) >= "A" And Mid(word, i, 1) <= "Z") And Not (Mid(word, i, 1) >= "0" And Mid(word, i, 1) <= "9") Then
    -                    isAlphanum = False
    -                    Exit For
    -                End If
    -            Next
    -
    -            If isAlphanum Then
    -                Redim Preserve candidates(Ubound(candidates) + 1)
    -                candidates(Ubound(candidates)) = word
    -            End If
    -        End If
    -    Wend
    -    Close #ff
    -
    -    Randomize Timer
    -    For i = 0 To Ubound(candidates)
    -        j = Int(Rnd * (Ubound(candidates) + 1))
    -        Swap candidates(i), candidates(j)
    -    Next
    -
    -    Return candidates(0)
    -End Function
    -
    -Function Encrypt(plainText As String, polybius As String, key As String) As String
    -    Dim As Integer i, j, row, column
    -    Dim As String code, ch, encrypted
    -
    -    code = ""
    -    For i = 1 To Len(plainText)
    -        ch = Mid(plainText, i, 1)
    -        For row = 0 To 5
    -            For column = 0 To 5
    -                If Mid(polybius, row * 6 + column + 1, 1) = ch Then
    -                    code &= Mid(ADFGVX, row + 1, 1)
    -                    code &= Mid(ADFGVX, column + 1, 1)
    -                End If
    -            Next
    -        Next
    -    Next
    -
    -    encrypted = ""
    -    For i = 1 To Len(key)
    -        ch = Mid(key, i, 1)
    -        For j = Instr(key, ch) - 1 To Len(code) - 1 Step Len(key)
    -            encrypted &= Mid(code, j + 1, 1)
    -        Next
    -        encrypted &= " "
    -    Next
    -
    -    Return encrypted
    -End Function
    -
    -Function Decrypt(encryptedText As String, polybius As String, key As String) As String
    -    Dim As Integer i, j, row, column, spaceCount, codeSize
    -    Dim As String result, stream, word, code, plainText
    -    Dim As String blocks()
    -
    -    result = ""
    -    i = 1
    -    While i <= Len(encryptedText)
    -        If Mid(encryptedText, i, 1) = " " Then
    -            i += 1
    -        Else
    -            result += Mid(encryptedText, i, 1)
    -            i += 1
    -        End If
    -    Wend
    -    spaceCount = Len(encryptedText) - Len(result)
    -    codeSize = Len(encryptedText) - spaceCount
    -
    -    stream = encryptedText
    -    While Len(stream) > 0
    -        word = Left(stream, Instr(stream, " ") - 1)
    -        Redim Preserve blocks(Ubound(blocks) + 1)
    -        blocks(Ubound(blocks)) = word
    -        stream = Mid(stream, Instr(stream, " ") + 1)
    -    Wend
    -
    -    code = ""
    -    For i = 0 To codeSize - 1
    -        For j = 0 To Ubound(blocks)
    -            If Len(code) < codeSize Then code &= Mid(blocks(j), i + 1, 1)
    -        Next
    -    Next
    -
    -    plainText = ""
    -    For i = 1 To codeSize - 1 Step 2
    -        row = Instr(ADFGVX, Mid(code, i, 1)) - 1
    -        column = Instr(ADFGVX, Mid(code, i + 1, 1)) - 1
    -        plainText &= Mid(polybius, row * 6 + column + 1, 1)
    -    Next
    -
    -    Return plainText
    -End Function
    -
    -Dim As String polybius = InitialisePolybiusSquare()
    -Print "The 6 x 6 Polybius square:"
    -Print " | A D F G V X"
    -Print "--------------"
    -For row As Integer = 0 To 5
    -    Print Mid(ADFGVX, row + 1, 1); "|";
    -    For column As Integer = 0 To 5
    -        Print " "; Mid(polybius, row * 6 + column + 1, 1);
    -    Next
    -    Print
    -Next
    -
    -Dim As String key = CreateKey(9)
    -Print !"\nThe key is "; key
    -Dim As String plainText = "ATTACKAT1200AM"
    -Print !"\nPlain text: "; plainText
    -Dim As String encryptedText = Encrypt(plainText, polybius, key)
    -Print !"\nEncrypted: "; encryptedText
    -Dim As String decryptedText = Decrypt(encryptedText, polybius, key)
    -Print !"\nDecrypted: "; decryptedText
    -
    -Sleep
    diff --git a/Task/ADFGVX-cipher/FutureBasic/adfgvx-cipher.basic b/Task/ADFGVX-cipher/FutureBasic/adfgvx-cipher.basic
    deleted file mode 100644
    index 3cbb6a7960..0000000000
    --- a/Task/ADFGVX-cipher/FutureBasic/adfgvx-cipher.basic
    +++ /dev/null
    @@ -1,208 +0,0 @@
    -/*
    -ADFGVX cipher
    -https://rosettacode.org/wiki/ADFGVX_cipher
    -
    -Requires file, unixdict.txt to be on the desktop
    -https://github.com/quinnj/Rosetta-Julia/blob/master/unixdict.txt
    -
    -*/
    -
    -begin globals
    -
    -  str255 ADFGVX
    -  ADFGVX  = "ADFGVX"
    -  str255 ALPHABET
    -  ALPHABET  = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    -
    -end globals
    -
    -local fn InitialisePolybiusSquare As str255
    -  short i, j
    -
    -  str255 letters(36)
    -  For i = 0 To 35
    -    letters(i) = Mid$(ALPHABET, i + 1, 1)
    -  Next
    -
    -  For i = 0 To 35
    -    j = Int(rnd (36))
    -    Swap letters(i), letters(j)
    -  Next
    -
    -  short row, column
    -  str255 result
    -  result = ""
    -  For row = 0 To 5
    -    For column = 0 To 5
    -      result = result + letters(6 * row + column)
    -    Next
    -  Next
    -
    -End fn = result
    -
    -local fn CreateKey(size As short) As str255
    -  If size < 7 Or size > 12
    -    Print "Key should contain between 7 and 12 letters, both inclusive."
    -    Exit fn
    -  End If
    -
    -  short i, j
    -  str255 TheWord, candidates(1000)
    -  short ff = 1 // file number
    -
    -  short CandidatesCounter = 1
    -
    -  CFUrlRef ParentDirectory = fn FileManagerURLForDirectory( NSDesktopDirectory, NSUserDomainMask )
    -  CFUrlRef UnixDictURL = fn URLByAppendingPathComponent( ParentDirectory, @"unixdict.txt" )
    -
    -
    -  Open "I",ff, UnixDictURL
    -  While Eof(ff) = 0
    -    Line Input #ff, TheWord
    -
    -    str255 uniqueWord
    -    uniqueWord = ""
    -    For i = 1 To Len$(TheWord)
    -      If Instr$(1,uniqueWord, Mid$(TheWord, i, 1)) = 0
    -        uniqueWord = uniqueWord +  Mid$(TheWord, i, 1)
    -      End If
    -    Next
    -
    -    If Len$(TheWord) = size && Len$(TheWord) = Len$(uniqueWord)
    -      TheWord = Ucase$(TheWord)
    -
    -      bool isAlphanum = _true
    -      For i = 1 To Len$(TheWord)
    -        If (Mid$(TheWord, i, 1) < "A" && Mid$(TheWord, i, 1) <= "Z") && (Mid$(TheWord, i, 1) < "0" && Mid$(TheWord, i, 1) <= "9")
    -          isAlphanum = _false
    -          Exit For
    -        End If
    -      Next
    -
    -
    -      If isAlphanum
    -        //Redim Preserve candidates(Ubound(candidates) + 1)
    -        CandidatesCounter ++
    -        candidates(CandidatesCounter) = TheWord
    -      End If
    -    End If
    -  Wend
    -  Close #ff
    -
    -
    -
    -  For i = 0 To CandidatesCounter
    -    j = Int(Rnd (CandidatesCounter + 1))
    -    Swap candidates(i), candidates(j)
    -  Next
    -
    -End fn = candidates(0)
    -
    -local fn Encrypt(plainText As str255, polybius As str255, key As str255) As str255
    -  short i, j, row, column
    -  str255 code, ch, encrypted
    -
    -  code = ""
    -  For i = 1 To Len$(plainText)
    -    ch = Mid$(plainText, i, 1)
    -    For row = 0 To 5
    -      For column = 0 To 5
    -        If Mid$(polybius, row * 6 + column + 1, 1) = ch
    -          code = code +  Mid$(ADFGVX, row + 1, 1)
    -          code = code +  Mid$(ADFGVX, column + 1, 1)
    -        End If
    -      Next
    -    Next
    -  Next
    -
    -  encrypted = ""
    -  For i = 1 To Len$(key)
    -    ch = Mid$(key, i, 1)
    -    For j = Instr$(1,key, ch) - 1 To Len$(code) - 1 Step Len$(key)
    -      encrypted = encrypted +  Mid$(code, j + 1, 1)
    -    Next
    -    encrypted = encrypted +  " "
    -  Next
    -
    -
    -End fn = encrypted
    -
    -local fn Decrypt(encryptedText As str255, polybius As str255, key As str255) As str255
    -  short i, j, row, column, spaceCount, codeSize
    -  str255 result, stream, TheWord, code, plainText
    -  str255 blocks(200)
    -  short BlocksCounter = 1
    -  result = ""
    -  i = 1
    -  While i <= Len$(encryptedText)
    -    If Mid$(encryptedText, i, 1) = " "
    -      i += 1
    -    Else
    -      result += Mid$(encryptedText, i, 1)
    -      i += 1
    -    End If
    -  Wend
    -  spaceCount = Len$(encryptedText) - Len$(result)
    -  codeSize = Len$(encryptedText) - spaceCount
    -
    -
    -  stream = encryptedText
    -  While Len$(stream) > 0
    -    TheWord = Left$(stream, Instr$(1,stream, " ") - 1)
    -    //Redim Preserve blocks(Ubound(blocks) + 1)
    -    BlocksCounter ++
    -    blocks(BlocksCounter) = TheWord
    -    stream = Mid$(stream, Instr$(1,stream, " ") + 1)
    -  Wend
    -
    -  code = ""
    -  For i = 0 To codeSize - 1
    -    BlocksCounter ++
    -    For j = 0 To BlocksCounter
    -      If Len$(code) < codeSize Then code = code + Mid$(blocks(j), i + 1, 1)
    -    Next
    -  Next
    -
    -  plainText = ""
    -  For i = 1 To codeSize - 1 Step 2
    -    row = Instr$(1,ADFGVX, Mid$(code, i, 1)) - 1
    -    column = Instr$(1,ADFGVX, Mid$(code, i + 1, 1)) - 1
    -    plainText = plainText +  Mid$(polybius, row * 6 + column + 1, 1)
    -  Next
    -
    -
    -End fn = plainText
    -
    -str255 polybius
    -polybius = fn InitialisePolybiusSquare
    -Print "The 6 x 6 Polybius square:"
    -Print " | A D F G V X"
    -Print "--------------"
    -short row
    -For row = 0 To 5
    -  Print Mid$(ADFGVX, row + 1, 1); "|";
    -  short column
    -  For column  = 0 To 5
    -    Print " "; Mid$(polybius, row * 6 + column + 1, 1);
    -  Next
    -  Print
    -Next
    -
    -str255 key
    -key = fn CreateKey(9)
    -print
    -Print "The key is "; key
    -str255 plainText
    -plainText = "ATTACKAT1200AM"// 20241105
    -print
    -Print "Plain text: "; plainText
    -str255 encryptedText
    -encryptedText = fn Encrypt(plainText, polybius, key)
    -print
    -Print "Encrypted: "; encryptedText
    -str255 decryptedText
    -decryptedText = fn Decrypt(encryptedText, polybius, key)
    -print
    -Print "Decrypted: "; decryptedText
    -
    -handleevents
    diff --git a/Task/ADFGVX-cipher/JavaScript/adfgvx-cipher.js b/Task/ADFGVX-cipher/JavaScript/adfgvx-cipher.js
    deleted file mode 100644
    index 0bdfe6eb1a..0000000000
    --- a/Task/ADFGVX-cipher/JavaScript/adfgvx-cipher.js
    +++ /dev/null
    @@ -1,134 +0,0 @@
    -class ADFGVX {
    -    /** The WWI German ADFGVX cipher. */
    -    constructor(spoly, k, alph = 'ADFGVX') {
    -        this.polybius = spoly.toUpperCase().split('');
    -        this.pdim = Math.floor(Math.sqrt(this.polybius.length));
    -        this.key = k.toUpperCase().split('');
    -        this.keylen = this.key.length;
    -        this.alphabet = alph.split('');
    -        const pairs = [];
    -        for (let i = 0; i < this.alphabet.length; i++) {
    -            for (let j = 0; j < this.alphabet.length; j++) {
    -                pairs.push(this.alphabet[i] + this.alphabet[j]);
    -            }
    -        }
    -        this.encode = {};
    -        for (let i = 0; i < this.polybius.length; i++) {
    -            this.encode[this.polybius[i]] = pairs[i];
    -        }
    -        this.decode = {};
    -        for (const k in this.encode) {
    -            this.decode[this.encode[k]] = k;
    -        }
    -    }
    -
    -    encrypt(msg) {
    -        /** Encrypt with the ADFGVX cipher. */
    -        const chars = [];
    -        for (const c of msg.toUpperCase()) {
    -            if (this.polybius.includes(c)) {
    -                chars.push(this.encode[c]);
    -            }
    -        }
    -        const flatChars = chars.join('').split('');
    -        const colvecs = [];
    -        for (let i = 0; i < this.keylen; i++) {
    -            const currentCol = [];
    -            for (let j = i; j < flatChars.length; j += this.keylen) {
    -                currentCol.push(flatChars[j]);
    -            }
    -            colvecs.push([this.key[i], currentCol]);
    -        }
    -
    -        colvecs.sort((a, b) => a[0].localeCompare(b[0]));
    -
    -        let result = '';
    -        for (const a of colvecs) {
    -            result += a[1].join('');
    -        }
    -        return result;
    -    }
    -
    -    decrypt(cod) {
    -        /** Decrypt with the ADFGVX cipher. Does not depend on spacing of encoded text */
    -        const chars = [];
    -        for (const c of cod) {
    -            if (this.alphabet.includes(c)) {
    -                chars.push(c);
    -            }
    -        }
    -
    -        const sortedkey = [...this.key].sort();
    -        const order = [];
    -        for (const ch of sortedkey) {
    -            order.push(this.key.indexOf(ch));
    -        }
    -        const originalorder = [];
    -        for (const ch of this.key) {
    -            originalorder.push(sortedkey.indexOf(ch));
    -        }
    -
    -        const base = Math.floor(chars.length / this.keylen);
    -        const extra = chars.length % this.keylen;
    -        const strides = order.map((_, i) => base + (extra > i ? 1 : 0));
    -        const starts = [0];
    -        let sum = 0;
    -        for (let i = 0; i < strides.length - 1; i++) {
    -            sum += strides[i];
    -            starts.push(sum);
    -        }
    -        const ends = starts.map((start, i) => start + strides[i]);
    -        const cols = originalorder.map(i => chars.slice(starts[i], ends[i]));
    -
    -        const pairs = [];
    -        for (let i = 0; i < Math.floor((chars.length - 1) / this.keylen) + 1; i++) {
    -            for (let j = 0; j < this.keylen; j++) {
    -                if (i * this.keylen + j < chars.length) {
    -                    pairs.push(cols[j][i]);
    -                }
    -            }
    -        }
    -
    -        let decoded = '';
    -        for (let i = 0; i < pairs.length; i += 2) {
    -            decoded += this.decode[pairs[i] + pairs[i + 1]];
    -        }
    -        return decoded;
    -    }
    -}
    -
    -// Helper function to shuffle an array (Fisher-Yates shuffle)
    -function shuffle(array) {
    -    for (let i = array.length - 1; i > 0; i--) {
    -        const j = Math.floor(Math.random() * (i + 1));
    -        [array[i], array[j]] = [array[j], array[i]];
    -    }
    -    return array;
    -}
    -
    -
    -async function main() {
    -    const PCHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.split('');
    -    shuffle(PCHARS);
    -    const POLYBIUS = PCHARS.join('');
    -
    -    // Simulate reading from unixdict.txt (replace with your actual file reading method if needed)
    -    // For demonstration purposes, using a hardcoded word list:
    -    const WORDS = ['ABDEFGHIK', 'JLMNOPQRS', 'TUVWXYZ01', '23456789'];
    -    const KEY = WORDS[Math.floor(Math.random() * WORDS.length)];
    -
    -
    -    const SECRET = new ADFGVX(POLYBIUS, KEY);
    -    const MESSAGE = 'ATTACKAT1200AM';
    -
    -    console.log(`Polybius: ${POLYBIUS}, key: ${KEY}`);
    -    console.log('Message: ', MESSAGE);
    -
    -    const ENCODED = SECRET.encrypt(MESSAGE);
    -    const DECODED = SECRET.decrypt(ENCODED);
    -
    -    console.log('Encoded: ', ENCODED);
    -    console.log('Decoded: ', DECODED);
    -}
    -
    -main();
    diff --git a/Task/ADFGVX-cipher/Julia/adfgvx-cipher.jl b/Task/ADFGVX-cipher/Julia/adfgvx-cipher.julia
    similarity index 100%
    rename from Task/ADFGVX-cipher/Julia/adfgvx-cipher.jl
    rename to Task/ADFGVX-cipher/Julia/adfgvx-cipher.julia
    diff --git a/Task/ADFGVX-cipher/M2000-Interpreter/adfgvx-cipher.m2000 b/Task/ADFGVX-cipher/M2000-Interpreter/adfgvx-cipher.m2000
    deleted file mode 100644
    index 1cc6519280..0000000000
    --- a/Task/ADFGVX-cipher/M2000-Interpreter/adfgvx-cipher.m2000
    +++ /dev/null
    @@ -1,116 +0,0 @@
    -Module CheckADFGVX_Cipher {
    -	Class cipher {
    -	Private:
    -		buffer a as byte*36
    -		b="ADFGVX"
    -		key="ABCDEFGHIJK"
    -		orderkey="ABCDEFGHIJK"
    -		map=list
    -		map2=list
    -		module preparemaps {
    -			for i=0 to 5
    -				jj=0
    -				for j=i*6 to j+5
    -					.map(chr$(.a[j]))=mid$(.b, i+1,1)+mid$(.b,jj+1, 1)
    -					.map2(mid$(.b, i+1,1)+mid$(.b,jj+1, 1))=chr$(.a[j])
    -					jj++
    -				next
    -			next			
    -		}
    -	Public:
    -		Module SetRandom (&returnvalue) {
    -			return .a, 0:=str$("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
    -			for i=1 to 100
    -				c=random(0, 35):d=c
    -				while c=d {d=random(0, 35)}
    -				 byte o=.a[c]
    -				.a[c]<=.a[d]
    -				.a[d]<=o
    -			next
    -			returnvalue=chr$(eval$(.a)) ' convert to UTF16LE
    -			.preparemaps	
    -		}
    -		Module SetSpecific (that$){
    -			return .a, 0:=str$(Ucase$(that$))
    -			.preparemaps		
    -		}
    -		Module SetKey (.key as string) {
    -			.key<=ucase$(.key)			
    -			if len(.key)<7 or len(.key)>12 then Error "Key has not proper length"
    -			if filter$(.key, "ABCDEFGHIJKLMNOPQRSTUVWXYZ")<>"" then
    -				Error "Key has bad letters"
    -			end if
    -			dim aa(1 to len(.key))
    -			for i=1 to len(.key):aa(i)=mid$(.key,i,1):next
    -			.orderkey<=aa()#sort()#str$("")				
    -		}
    -		Module Display {
    -			Print "The 6 x 6 Polybius square:"		
    -			Print "  | A D F G V X"
    -			Print "---------------"
    -			for i=0 to 5
    -				Print mid$(.b,i+1,1)+" | ";
    -				jj=0
    -				for j=i*6 to j+5
    -					print chr$(.a[j]);" ";
    -					jj++
    -				next
    -				print
    -			next
    -			Print "Key:";.key
    -		}
    -		Function Encrypt(p as string) {
    -			crypted=""
    -			for i=1 to len(p)	
    -				crypted+=.map$(mid$(p,i,1))
    -			next
    -			m=1
    -			encrypted=""
    -			For i = 1 To Len(.key)
    -				ch = Mid$(.orderkey, i, 1)			
    -				For j = Instr(.key, ch) - 1 To Len(crypted) - 1 Step Len(.key)
    -					encrypted += Mid$(crypted, j + 1, 1)
    -					if m mod 5=0 then encrypted += " "
    -					m++
    -				Next
    -			Next
    -			=encrypted
    -		}
    -		Function Decrypt(p as string) {
    -			p=filter$(p, " ")
    -			decrypted=""
    -			m=1
    -			dim b$(len(p))
    -			For i = 1 To Len(.key)
    -				ch = Mid$(.orderkey, i, 1)
    -				For j = Instr(.key, ch) - 1 To Len(p) - 1 Step Len(.key)
    -					b$(j)=mid$(p, m, 1)
    -					m++
    -				Next
    -			Next
    -			for i=0 to len(b$())-1 step 2
    -				decrypted+=.map2(b$(i)+b$(i+1))	
    -			next
    -			=decrypted	
    -		}
    -	}
    -	ADFGVX=cipher()
    -	for ADFGVX {
    -		.SetSpecific "A9GKMF1DQRSBVX8Z0WTEJLOPY5U4CN2H76I3"
    -		.SetKey "volcanism"
    -		.Display
    -		encode=.Encrypt("ATTACKAT1200AM")
    -		Print "Encoded: ";encode
    -		Print "Decoded: ";.Decrypt(encode)
    -		Rem { ' using randomblock
    -			thisblock=""
    -			.SetRandom	 &thisblock
    -			Print "Random Block:";thisblock
    -			.Display
    -			encode=.Encrypt("ATTACKAT1200AM")
    -			Print "Encoded: ";encode
    -			Print "Decoded: ";.Decrypt(encode)
    -		}	
    -	}
    -}
    -CheckADFGVX_Cipher
    diff --git a/Task/ADFGVX-cipher/Mathematica/adfgvx-cipher.math b/Task/ADFGVX-cipher/Mathematica/adfgvx-cipher.math
    deleted file mode 100644
    index b66c4cb9fc..0000000000
    --- a/Task/ADFGVX-cipher/Mathematica/adfgvx-cipher.math
    +++ /dev/null
    @@ -1,24 +0,0 @@
    -encrypt[plaintext_, polybius_, key_] := Module[{fraction, fractioned},
    -   fraction = Thread[Characters[polybius] -> Tuples[Characters["ADFGVX"], 2]];
    -   fractioned = Partition[Flatten[Characters[plaintext] /. fraction], UpTo[StringLength[key]]];
    -   StringJoin[Flatten[Part[Flatten[fractioned, {2}], Ordering[Characters[key]]]]]];
    -
    -decrypt[encrypted_, polybius_, key_] := Module[{perm, colLengths, fractioned, defraction},
    -   perm = Ordering[Characters[key]];
    -   colLengths = Length /@ Part[Flatten[Partition[Characters[encrypted], UpTo[Length[perm]]], {2}], perm];
    -   fractioned = Flatten[Part[TakeList[Characters[encrypted], colLengths], InversePermutation[perm]], {2}];
    -   defraction = Thread[Tuples[Characters["ADFGVX"], 2] -> Characters[polybius]];
    -   StringJoin[Partition[Flatten[fractioned], 2] /. defraction]];
    -
    -words = ReadList["unixdict.txt", Word];
    -key = Select[words, StringLength[#] == 9 && DuplicateFreeQ[Characters[#]] &] // RandomChoice;
    -polybius = StringJoin@RandomSample@Characters["ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"];
    -plaintext = "ATTACKAT1200AM";
    -encrypted = encrypt[plaintext, polybius, key];
    -decrypted = decrypt[encrypted, polybius, key];
    -
    -Print["Key: ", key];
    -Print["Polybius: ", polybius];
    -Print["Plaintext: ", plaintext];
    -Print["Encrypted: ", encrypted];
    -Print["Decrypted: ", decrypted];
    diff --git a/Task/ADFGVX-cipher/R/adfgvx-cipher.r b/Task/ADFGVX-cipher/R/adfgvx-cipher.r
    deleted file mode 100644
    index 87fc86e172..0000000000
    --- a/Task/ADFGVX-cipher/R/adfgvx-cipher.r
    +++ /dev/null
    @@ -1,173 +0,0 @@
    -# The ADFGVX cipher.
    -# See also eg. https://www.nku.edu/~christensen/092hnr304%20ADFGVX.pdf
    -
    -# ADFGVX class using R6
    -library(R6)
    -
    -ADFGVX <- R6Class("ADFGVX",
    -  public = list(
    -    polybius = NULL,
    -    pdim = NULL,
    -    key = NULL,
    -    keylen = NULL,
    -    alphabet = NULL,
    -    encode = NULL,
    -    decode = NULL,
    -
    -    # Constructor
    -    initialize = function(s, k, alph = "ADFGVX") {
    -      self$polybius <- toupper(strsplit(s, "")[[1]])
    -      self$pdim <- floor(sqrt(length(self$polybius)))
    -      self$alphabet <- toupper(strsplit(alph, "")[[1]])
    -
    -      # Create encoding dictionary
    -      self$encode <- list()
    -      for (i in 1:self$pdim) {
    -        for (j in 1:self$pdim) {
    -          char <- self$polybius[(i - 1) * self$pdim + j]
    -          self$encode[[char]] <- c(self$alphabet[i], self$alphabet[j])
    -        }
    -      }
    -
    -      # Create decoding dictionary
    -      self$decode <- list()
    -      for (char in names(self$encode)) {
    -        key_str <- paste(self$encode[[char]], collapse = "")
    -        self$decode[[key_str]] <- char
    -      }
    -
    -      stopifnot(self$pdim^2 == length(self$polybius) &&
    -                self$pdim == length(self$alphabet))
    -
    -      self$key <- toupper(strsplit(k, "")[[1]])
    -      self$keylen <- length(self$key)
    -    },
    -
    -    # Encrypt with the ADFGVX cipher
    -    encrypt = function(s) {
    -      chars_upper <- toupper(strsplit(s, "")[[1]])
    -      chars_filtered <- chars_upper[chars_upper %in% self$polybius]
    -
    -      # Encode characters
    -      chars <- unlist(lapply(chars_filtered, function(c) self$encode[[c]]))
    -
    -      # Create column vectors
    -      colvecs <- list()
    -      for (i in 1:self$keylen) {
    -        indices <- seq(i, length(chars), by = self$keylen)
    -        colvecs[[self$key[i]]] <- chars[indices]
    -      }
    -
    -      # Sort by key
    -      sorted_names <- sort(names(colvecs))
    -      result <- unlist(lapply(sorted_names, function(name) colvecs[[name]]))
    -
    -      return(paste(result, collapse = ""))
    -    },
    -
    -    # Decrypt with the ADFGVX cipher
    -    decrypt = function(s) {
    -      chars <- toupper(strsplit(s, "")[[1]])
    -      chars <- chars[chars %in% self$alphabet]
    -
    -      sortedkey <- sort(self$key)
    -      order <- sapply(sortedkey, function(ch) which(self$key == ch)[1])
    -      originalorder <- sapply(self$key, function(ch) which(sortedkey == ch)[1])
    -
    -      # Calculate strides (column lengths)
    -      div_result <- length(chars) %/% self$keylen
    -      rem_result <- length(chars) %% self$keylen
    -      strides <- sapply(order, function(i) {
    -        div_result + ifelse(rem_result >= i, 1, 0)
    -      })
    -
    -      # Calculate starts and ends of columns
    -      starts <- c(1, cumsum(strides[-length(strides)]) + 1)
    -      ends <- starts + strides - 1
    -
    -      # Get reordered columns
    -      cols <- lapply(originalorder, function(i) {
    -        chars[starts[i]:ends[i]]
    -      })
    -
    -      # Recover the rows
    -      nrows <- (length(chars) - 1) %/% self$keylen + 1
    -      pairs <- c()
    -      for (i in 1:nrows) {
    -        for (j in 1:self$keylen) {
    -          if ((i - 1) * self$keylen + j > length(chars)) break
    -          pairs <- c(pairs, cols[[j]][i])
    -        }
    -      }
    -
    -      # Decode pairs
    -      result <- c()
    -      for (i in seq(1, length(pairs) - 1, by = 2)) {
    -        pair_str <- paste(pairs[i:(i+1)], collapse = "")
    -        result <- c(result, self$decode[[pair_str]])
    -      }
    -
    -      return(paste(result, collapse = ""))
    -    }
    -  )
    -)
    -
    -# Main execution
    -set.seed(123)  # For reproducibility
    -POLYBIUS <- paste(sample(strsplit("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", "")[[1]]),
    -                  collapse = "")
    -
    -# Get dictionary words - try multiple sources
    -get_valid_key <- function() {
    -  # Try to read unixdict.txt if it exists
    -  if (file.exists("unixdict.txt")) {
    -    dict_words <- readLines("unixdict.txt")
    -  } else {
    -    # Use sample words if file doesn't exist
    -    dict_words <- c("absolutes", "abruption", "abundance", "abysmally",
    -                    "acrobatic", "algorithm", "ambiguity", "amplitude",
    -                    "ancestory", "archetype", "asynchron", "auctioned",
    -                    "backbone", "backfired", "backlights", "bandwidth",
    -                    "benchmark", "biography", "birthplace", "blasphemy",
    -                    "boulevard", "bricklaying", "broadcast", "butchering",
    -                    "cauterize", "chemicals", "chromatic", "clipboard",
    -                    "completing", "conjugate", "copyright", "daughters",
    -                    "debuggers", "delimiters", "demograph", "dialyzing",
    -                    "dictionary", "education", "equations", "factorize",
    -                    "geography", "goshdarn", "graciously", "graphed",
    -                    "hampshire", "imploding", "indexable", "jeculates",
    -                    "keyboards", "labyrinth", "livestock", "logarithm",
    -                    "machinery", "molecules", "nightmare", "obscurity",
    -                    "particles", "quizboard", "racehorst", "reduction",
    -                    "savepoint", "sectional", "shipyard", "splatting",
    -                    "substance", "technology", "ulceration", "vineyard",
    -                    "warehouse", "workplace", "xanthopsy", "yachtsmen")
    -  }
    -
    -  # Filter for 9-letter words with unique characters
    -  valid_words <- dict_words[sapply(dict_words, function(w) {
    -    n <- nchar(w)
    -    n == 9 && length(unique(strsplit(w, "")[[1]])) == n
    -  })]
    -
    -  if (length(valid_words) == 0) {
    -    stop("No valid 9-letter words with unique characters found")
    -  }
    -
    -  return(toupper(sample(valid_words, 1)))
    -}
    -
    -KEY <- get_valid_key()
    -
    -# Create cipher and encrypt/decrypt
    -SECRETS <- ADFGVX$new(POLYBIUS, KEY)
    -message <- "ATTACKAT1200AM"
    -
    -cat("Polybius:", POLYBIUS, ", Key:", KEY, "\n")
    -cat("Message:", message, "\n")
    -
    -encoded <- SECRETS$encrypt(message)
    -decoded <- SECRETS$decrypt(encoded)
    -
    -cat("Encoded:", encoded, "\n")
    -cat("Decoded:", decoded, "\n")
    diff --git a/Task/ADFGVX-cipher/Rust/adfgvx-cipher.rs b/Task/ADFGVX-cipher/Rust/adfgvx-cipher.rust
    similarity index 100%
    rename from Task/ADFGVX-cipher/Rust/adfgvx-cipher.rs
    rename to Task/ADFGVX-cipher/Rust/adfgvx-cipher.rust
    diff --git a/Task/ADFGVX-cipher/Uiua/adfgvx-cipher.uiua b/Task/ADFGVX-cipher/Uiua/adfgvx-cipher.uiua
    deleted file mode 100644
    index d163a20723..0000000000
    --- a/Task/ADFGVX-cipher/Uiua/adfgvx-cipher.uiua
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -A ← ↯∞_2⊞⊟."ADFGVX"
    -P ← ⊏⍏[⍥⚂]⧻."ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
    -K ← "PACKHORSE"
    -Sw ← ⊜□≠" ".
    -Polybius ← setinv(/⊂⊡≡(⊚⌕):⊙:¤P A|⊏:P≡(⊢⊚⌕)⊙¤∩≡□↯∞_2:A)
    -SortByK ← setinv(⊏⍏⟜(⍉⬚" "↯⊟∞⧻)K|▽≠" "./⊂⍉⊏⍏⍏K)
    -Str ← setinv(/$"_ _"Sw/⊂≡(⊂:" ")|≡(⊢°□◇⬚" "↯⊟∞)/↥≡◇⧻.Sw)
    -Pt ← "ATTACKAT1200AM"
    -&p $"Key = _\nPolybius:\n_\nPlaintext = _"K↯⊟.√⧻.P Pt
    -&p$"Crypttext = _". Str SortByK Polybius Pt
    -&p$"Plaintext = _" °Polybius °SortByK °Str
    diff --git a/Task/AKS-test-for-primes/11l/aks-test-for-primes.11l b/Task/AKS-test-for-primes/11l/aks-test-for-primes.11l
    index dc2fcec555..110ea6ed1e 100644
    --- a/Task/AKS-test-for-primes/11l/aks-test-for-primes.11l
    +++ b/Task/AKS-test-for-primes/11l/aks-test-for-primes.11l
    @@ -12,7 +12,7 @@ F aks_test(p)
        R !any(ex[0 .< (len)-1].map(mult -> mult % @p != 0))
     
     print(‘# p: (x-1)^p for small p’)
    -L(p) 0.<12
    +L(p) 12
        print(‘#3: #.’.format(p, enumerate(expand_x_1(p)).map((n, e) -> ‘#.#.#.’.format(‘+’ * (e >= 0), e, I n {(‘x^#.’.format(n))} E ‘’)).join(‘ ’)))
     
     print("\n# small primes using the aks test")
    diff --git a/Task/AKS-test-for-primes/ANSI-BASIC/aks-test-for-primes.basic b/Task/AKS-test-for-primes/ANSI-BASIC/aks-test-for-primes.basic
    deleted file mode 100644
    index 547da20116..0000000000
    --- a/Task/AKS-test-for-primes/ANSI-BASIC/aks-test-for-primes.basic
    +++ /dev/null
    @@ -1,79 +0,0 @@
    -100 REM AKS test for primes
    -110 DECLARE EXTERNAL SUB PascalTriangle
    -120 DECLARE EXTERNAL SUB ExpandPoly
    -130 DECLARE EXTERNAL FUNCTION IsPrime
    -140 FOR N = 0 TO 9
    -150    CALL ExpandPoly(N)
    -160 NEXT N
    -170 FOR N = 2 TO 50
    -180    IF IsPrime(N) <> 0 THEN PRINT USING("###"): N;
    -190 NEXT N
    -200 PRINT
    -210 END
    -220 REM **
    -230 EXTERNAL SUB PascalTriangle(N, PasTri())
    -240 REM Calculate t!he N'th line 0.. middle
    -250 LET N = INT(N)
    -260 LET PasTri(0) = 1
    -270 LET J = 1
    -280 DO WHILE J <= N
    -290    LET J = J + 1
    -300    LET K = INT(J / 2)
    -310    LET PasTri(K) = PasTri(K - 1)
    -320    FOR K = K TO 1 STEP -1
    -330       LET PasTri(K) = PasTri(K) + PasTri(K - 1)
    -340    NEXT K
    -350 LOOP
    -360 END SUB
    -370 REM **
    -380 EXTERNAL FUNCTION IsPrime(N)
    -390 LET N = INT(N)
    -400 DIM PasTri(0 TO 50)
    -410 LET PasTriMax = UBOUND(PasTri)
    -420 IF N > PasTriMax THEN
    -430    PRINT N; "is out of range"
    -440    STOP
    -450 END IF
    -460 CALL PascalTriangle(N, PasTri)
    -470 LET Res = 1
    -480 LET I = INT(N / 2)
    -490 DO WHILE (Res <> 0) AND (I > 1)
    -500    IF (Res <> 0) AND (MOD(PasTri(I), N) = 0) THEN LET Res = 1 ELSE LET Res = 0
    -510    LET I = I - 1
    -520 LOOP
    -530 LET IsPrime = Res
    -540 END FUNCTION
    -550 REM **
    -560 EXTERNAL SUB ExpandPoly(N)
    -570 LET N = INT(N)
    -580 DIM VZ$(0 TO 1)
    -590 LET VZ$(0) = "+"
    -600 LET VZ$(1) = "-"
    -610 DIM PasTri(0 TO 50)
    -620 LET PasTriMax = UBOUND(PasTri)
    -630 IF N > PasTriMax THEN
    -640    PRINT N; "is out of range"
    -650    STOP
    -660 END IF
    -670 SELECT CASE N
    -680 CASE 0
    -690    PRINT "(x - 1) ^ 0 = 1"
    -700 CASE 1
    -710    PRINT "(x - 1) ^ 1 = x - 1"
    -720 CASE ELSE
    -730    CALL PascalTriangle(N, PasTri)
    -740    PRINT "(x - 1) ^"; N; " = x ^"; N;
    -750    LET BVZ = 1
    -760    FOR J = N - 1 TO INT(N / 2) + 1 STEP -1
    -770       PRINT VZ$(BVZ); PasTri(N - J); "* x ^"; J;
    -780       LET BVZ = ABS(1 - BVZ)
    -790    NEXT J
    -800    FOR J = INT(N / 2) TO 2 STEP -1
    -810       PRINT VZ$(BVZ); PasTri(J); "* x ^"; J;
    -820       LET BVZ = ABS(1 - BVZ)
    -830    NEXT J
    -840    PRINT VZ$(BVZ); PasTri(1); "* x ";
    -850    LET BVZ = ABS(1 - BVZ)
    -860    PRINT VZ$(BVZ); PasTri(0)
    -870 END SELECT
    -880 END SUB
    diff --git a/Task/AKS-test-for-primes/Ada/aks-test-for-primes.adb b/Task/AKS-test-for-primes/Ada/aks-test-for-primes.ada
    similarity index 100%
    rename from Task/AKS-test-for-primes/Ada/aks-test-for-primes.adb
    rename to Task/AKS-test-for-primes/Ada/aks-test-for-primes.ada
    diff --git a/Task/AKS-test-for-primes/Agena/aks-test-for-primes.agena b/Task/AKS-test-for-primes/Agena/aks-test-for-primes.agena
    deleted file mode 100644
    index 6589095e8f..0000000000
    --- a/Task/AKS-test-for-primes/Agena/aks-test-for-primes.agena
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -# AKS test for primes
    -
    -constant pas_tri_max := 50;
    -
    -proc pascal_triangle(n :: posint) is
    -# Calculate the n'th line 1.. middle
    -# For n = 1, 2, ..
    -  create register pas_tri((n + 1) \ 2);
    -  # pas_tri[0] always is 1
    -  j := 1;
    -  case n
    -    of 1, 2 then pas_tri[1] := 2
    -    else
    -      j := 3;
    -      pas_tri[1] := 2;
    -      while j <= n do
    -        j++;
    -        k := j \ 2; # middle
    -        pas_tri[k] := pas_tri[k - 1];
    -        while k >= 2 do
    -          pas_tri[k] +:= pas_tri[k - 1];
    -          k--
    -        od;
    -        pas_tri[1] +:= 1
    -      od
    -    esle
    -  esac
    -  return pas_tri
    -end;
    -
    -proc is_prime(n :: nonnegint) :: boolean is
    -  if n > pas_tri_max then
    -    printf("%d is out of range\n", n);
    -    os.exit(-1)
    -  fi;
    -  pas_tri := pascal_triangle(n);
    -  res := true;
    -  i := n \ 2;
    -  while res and (i > 1) do
    -    res := res and (pas_tri[i] symmod n = 0);
    -    i--
    -  od;
    -  return res
    -end;
    -
    -proc vz(b :: boolean) is
    -  return if b then '-' else '+' fi
    -end;
    -
    -proc expand_poly(n :: nonnegint) is
    -  if n > pas_tri_max then
    -    printf("%d is out of range\n", n);
    -    os.exit(-1)
    -  fi;
    -  case n
    -    of 0 then printf("(x-1)^0 = 1\n");
    -    of 1 then printf("(x-1)^1 = x-1\n");
    -    else
    -      pas_tri := pascal_triangle(n);
    -      printf("(x-1)^%d = x^%d", n, n);
    -      bvz := true;
    -      n_div_2 := n \ 2
    -      for j from n - 1 to n_div_2 + 1 by -1 do
    -        printf("%s%d*x^%d", vz(bvz), pas_tri[n - j], j);
    -        bvz := not bvz
    -      od;
    -      for j from n_div_2 to 2 by -1 do
    -        printf("%s%d*x^%d", vz(bvz), pas_tri[j], j);
    -        bvz := not bvz
    -      od;
    -      printf("%s%d*x", vz(bvz), pas_tri[1]);
    -      bvz := not bvz;
    -      printf("%s1\n", vz(bvz));
    -    esle
    -  esac
    -end;
    -
    -scope
    -  local n;
    -  for n from 0 to 9 do
    -    expand_poly(n)
    -  od;
    -  for n from 2 to pas_tri_max do
    -    if is_prime(n) then
    -      printf("%3d", n)
    -    fi
    -  od;
    -  printf("\n")
    -end
    diff --git a/Task/AKS-test-for-primes/Ballerina/aks-test-for-primes.ballerina b/Task/AKS-test-for-primes/Ballerina/aks-test-for-primes.ballerina
    deleted file mode 100644
    index 575c645a5f..0000000000
    --- a/Task/AKS-test-for-primes/Ballerina/aks-test-for-primes.ballerina
    +++ /dev/null
    @@ -1,58 +0,0 @@
    -import ballerina/io;
    -
    -int[] e = "²³⁴⁵⁶⁷".toCodePointInts();
    -
    -function bc(int p) returns int[] {
    -    int[] c = [];
    -    c.setLength(p + 1);
    -    int r = 1;
    -    int half = p / 2;
    -    foreach int i in 0...half {
    -        c[i] = r;
    -        c[p - i] = r;
    -        r = r * (p - i) / (i + 1);
    -    }
    -    foreach int i in int:range(p - 1, -1, -2) {
    -        c[i] = -c[i];
    -    }
    -    return c;
    -}
    -
    -function pp(int[] c) returns string|error {
    -    if c.length() == 1 { return c[0].toString(); }
    -    int p = c.length() - 1;
    -    string s = "";
    -    if c[p] != 1 { s = c[p].toString(); }
    -    foreach int i in int:range(p, 0, -1) {
    -        s += "x";
    -        if i != 1 { s += check string:fromCodePointInt(e[i - 2]); }
    -        int d = c[i - 1];
    -        if d < 0 {
    -            s += " - " + (-d).toString();
    -        } else {
    -            s += " + " + d.toString();
    -        }
    -    }
    -    return s;
    -}
    -
    -function aks(int p) returns boolean {
    -    int[] c = bc(p);
    -    c[p] -= 1;
    -    c[0] += 1;
    -    foreach int d in c {
    -        if d % p != 0 { return false; }
    -    }
    -    return true;
    -}
    -
    -public function main() {
    -    foreach int p in 0...7 {
    -        io:println(p, ":  ", pp(bc(p)));
    -    }
    -    io:println("\nAll primes under 50:");
    -    foreach int p in 2...49 {
    -        if aks(p) { io:print(p, " "); }
    -    }
    -    io:println();
    -}
    diff --git a/Task/AKS-test-for-primes/Clojure/aks-test-for-primes.clj b/Task/AKS-test-for-primes/Clojure/aks-test-for-primes.clj
    index 47c637a9e0..377a586076 100644
    --- a/Task/AKS-test-for-primes/Clojure/aks-test-for-primes.clj
    +++ b/Task/AKS-test-for-primes/Clojure/aks-test-for-primes.clj
    @@ -3,7 +3,7 @@
       [n k]
       (/ (apply *' (range n (- n k) -1))
          (apply *' (range k 0 -1))
    -     (if (even? k) 1 -1)))
    +     (if (and (even? k) (< k n)) -1 1)))
     
     (defn cs
       "coefficient series for (x - 1)^n, k=[0..n]"
    diff --git a/Task/AKS-test-for-primes/Crystal/aks-test-for-primes.cr b/Task/AKS-test-for-primes/Crystal/aks-test-for-primes.crystal
    similarity index 100%
    rename from Task/AKS-test-for-primes/Crystal/aks-test-for-primes.cr
    rename to Task/AKS-test-for-primes/Crystal/aks-test-for-primes.crystal
    diff --git a/Task/AKS-test-for-primes/EasyLang/aks-test-for-primes.easy b/Task/AKS-test-for-primes/EasyLang/aks-test-for-primes.easy
    deleted file mode 100644
    index 10fa6635e4..0000000000
    --- a/Task/AKS-test-for-primes/EasyLang/aks-test-for-primes.easy
    +++ /dev/null
    @@ -1,43 +0,0 @@
    -func[] coefs n .
    -   len list[] n + 2
    -   list[0] = 1
    -   for k = 0 to n : list[k + 1] = list[k] * (n - k) / (k + 1)
    -   for k = 1 step 2 to n : list[k] = -list[k]
    -   return list[]
    -.
    -func isprimeaks n .
    -   c[] = coefs n
    -   c[0] -= 1
    -   c[n] += 1
    -   for i = 0 to n
    -      if c[i] mod n <> 0 : return 0
    -   .
    -   return 1
    -.
    -proc pprintcoefs n list[] .
    -   for i = 0 to n
    -      s$ = ""
    -      if i > 0
    -         s$ = " + "
    -         if list[i] < 0 : s$ = " - "
    -      .
    -      c$ = abs list[i]
    -      e = n - i
    -      if c$ = "1" and e > 0 : c$ = ""
    -      x$ = ""
    -      if e <> 0
    -         x$ = "x"
    -         if e <> 1 : x$ &= "^" & e
    -      .
    -      r$ &= s$ & c$ & x$
    -   .
    -   print "(x-1)^" & n & " : " & r$
    -.
    -for i = 0 to 7
    -   pprintcoefs i coefs i
    -.
    -print ""
    -for i = 2 to 49
    -   if isprimeaks i = 1 : write i & " "
    -.
    -print ""
    diff --git a/Task/AKS-test-for-primes/Elena/aks-test-for-primes.elena b/Task/AKS-test-for-primes/Elena/aks-test-for-primes.elena
    index bda73a4cdf..d1ab382bf3 100644
    --- a/Task/AKS-test-for-primes/Elena/aks-test-for-primes.elena
    +++ b/Task/AKS-test-for-primes/Elena/aks-test-for-primes.elena
    @@ -45,28 +45,28 @@ singleton AksTest
             while(i != 0)
             {
                 i -= 1;
    -            Console.print("+",c[i],"x^",i)
    +            console.print("+",c[i],"x^",i)
             }
         }
     }
     
    -public Program()
    +public program()
     {
         for (int n := 0; n < 10; n += 1) {
             AksTest.coef(n);
     
    -		Console.print("(x-1)^",n," = ");
    +		console.print("(x-1)^",n," = ");
     		AksTest.show(n);
    -        Console.printLine()
    +        console.printLine()
         };
     
    -    Console.print("Primes:");
    +    console.print("Primes:");
         for (int n := 1; n <= 63; n += 1) {
             if (AksTest.is_prime(n))
             {
    -            Console.print(n," ")
    +            console.print(n," ")
             }
         };
     
    -    Console.printLine().readChar()
    +    console.printLine().readChar()
     }
    diff --git a/Task/AKS-test-for-primes/Elixir/aks-test-for-primes.ex b/Task/AKS-test-for-primes/Elixir/aks-test-for-primes.elixir
    similarity index 100%
    rename from Task/AKS-test-for-primes/Elixir/aks-test-for-primes.ex
    rename to Task/AKS-test-for-primes/Elixir/aks-test-for-primes.elixir
    diff --git a/Task/AKS-test-for-primes/FutureBasic/aks-test-for-primes.basic b/Task/AKS-test-for-primes/FutureBasic/aks-test-for-primes.basic
    deleted file mode 100644
    index 72bc4196df..0000000000
    --- a/Task/AKS-test-for-primes/FutureBasic/aks-test-for-primes.basic
    +++ /dev/null
    @@ -1,101 +0,0 @@
    -// AKS Test for Primes task
    -// https://rosettacode.org/wiki/AKS_test_for_primes
    -
    -
    -#build ShowMoreWarnings NO
    -
    -begin globals
    -  sInt64 c(100)
    -  //double n
    -end globals
    -
    -local fn coef(nx as short)
    -  // out-by-1, ie coef(1)==^0, coef(2)==^1, coef(3)==^2 etc.
    -  c(nx) = 1
    -  short i
    -  for i = nx-1 to 2 step -1
    -    c(i) = c(i) + c(i-1)
    -  next
    -end fn
    -
    -local fn is_prime(nx as short) as boolean
    -  short i
    -  bool result = _false
    -  fn coef(nx+1) // (I said it was out-by-1)
    -  for i = 2 to nx-1   // (technically "to n" is more correct)
    -    if int(c(i)/nx) <> c(i)/nx
    -      return _false
    -    end if
    -  next
    -
    -  result = _true
    -end fn = result
    -
    -local fn show(nx as short)
    -  // (As per coef, this is (working) out-by-1)
    -
    -  double ci
    -  str255 cix
    -  short i
    -
    -  for i = nx to 1 step -1
    -    ci = c(i)
    -    if ci = 1
    -      if (nx-i) mod 2 = 0
    -        if i = 1
    -          if nx = 1
    -            cix = "    1"
    -          else
    -            cix = "+1"
    -          end if
    -        else
    -          cix = ""
    -        end if
    -      else
    -        cix = "-1"
    -      end if
    -    else
    -      if (nx-i) mod 2 = 0
    -        cix = "+" + str$(ci)
    -      else
    -        cix = "-" + str$(ci)
    -      end if
    -    end if
    -
    -    if i = 1 // ie ^0
    -      print cix;
    -    else
    -      if i = 2 then print cix, "x"; // ie ^1
    -      if i <> 2 then print cix, "x^", i-1;
    -    end if
    -
    -  next i
    -end fn
    -
    -local fn AKS_test_for_primes
    -  short nx
    -
    -  for nx = 1 to 10 // (0 to 9 really)
    -    fn coef(nx)
    -    print "(x-1)^" + str$(nx-1) +  " = ";
    -    fn show(nx)
    -    print
    -  next
    -
    -  print
    -  print "primes (<=53): ";
    -  short n
    -  c(2) = 1 // (this manages "", which is all that call did anyway...)
    -  for n = 2 to 53
    -    if fn is_prime(n)
    -      print " ", n;
    -    end if
    -  next
    -  print
    -end fn
    -
    -window 1,@"AKS test for Primes",fn CGRectMake(0, 0, 850, 200)
    -
    -fn AKS_test_for_primes
    -
    -handleevents
    diff --git a/Task/AKS-test-for-primes/Julia/aks-test-for-primes-1.jl b/Task/AKS-test-for-primes/Julia/aks-test-for-primes-1.julia
    similarity index 100%
    rename from Task/AKS-test-for-primes/Julia/aks-test-for-primes-1.jl
    rename to Task/AKS-test-for-primes/Julia/aks-test-for-primes-1.julia
    diff --git a/Task/AKS-test-for-primes/Julia/aks-test-for-primes-2.jl b/Task/AKS-test-for-primes/Julia/aks-test-for-primes-2.julia
    similarity index 100%
    rename from Task/AKS-test-for-primes/Julia/aks-test-for-primes-2.jl
    rename to Task/AKS-test-for-primes/Julia/aks-test-for-primes-2.julia
    diff --git a/Task/AKS-test-for-primes/Julia/aks-test-for-primes-3.jl b/Task/AKS-test-for-primes/Julia/aks-test-for-primes-3.julia
    similarity index 100%
    rename from Task/AKS-test-for-primes/Julia/aks-test-for-primes-3.jl
    rename to Task/AKS-test-for-primes/Julia/aks-test-for-primes-3.julia
    diff --git a/Task/AKS-test-for-primes/Julia/aks-test-for-primes-4.jl b/Task/AKS-test-for-primes/Julia/aks-test-for-primes-4.julia
    similarity index 100%
    rename from Task/AKS-test-for-primes/Julia/aks-test-for-primes-4.jl
    rename to Task/AKS-test-for-primes/Julia/aks-test-for-primes-4.julia
    diff --git a/Task/AKS-test-for-primes/Kotlin/aks-test-for-primes.kts b/Task/AKS-test-for-primes/Kotlin/aks-test-for-primes.kotlin
    similarity index 100%
    rename from Task/AKS-test-for-primes/Kotlin/aks-test-for-primes.kts
    rename to Task/AKS-test-for-primes/Kotlin/aks-test-for-primes.kotlin
    diff --git a/Task/AKS-test-for-primes/Loglan82/aks-test-for-primes.loglan82 b/Task/AKS-test-for-primes/Loglan82/aks-test-for-primes.loglan82
    deleted file mode 100644
    index 73629f52ea..0000000000
    --- a/Task/AKS-test-for-primes/Loglan82/aks-test-for-primes.loglan82
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -program AKS;
    -(* AKS test for primes *)
    -
    -const
    -  Pas_tri_last = 33; (* 33 for 32-bit integer type; 17 for 16-bit integer *)
    -var
    -  n: integer;
    -
    -  (* Calculate the n'th line 0 .. middle *)
    -  unit Pascal_triangle: procedure (n: integer; Pas_tri: arrayof integer);
    -  var
    -    j, k: integer;
    -  begin
    -    Pas_tri(0) := 1;
    -    j := 1;
    -    while j <= n
    -    do
    -      j := j + 1;
    -      k := j div 2;
    -      Pas_tri(k) := Pas_tri(k - 1);
    -      while k >= 1
    -      do
    -        Pas_tri(k) := Pas_tri(k) + Pas_tri(k - 1);
    -        k := k - 1
    -      od;
    -    od;
    -  end Pascal_triangle;
    -
    -  unit is_prime: function (n: integer): boolean;
    -  var
    -    i: integer,
    -    Pas_tri: arrayof integer;
    -  begin
    -    array Pas_tri dim (0 : n);
    -    call Pascal_triangle(n, Pas_tri);
    -    result := true;
    -    i := n div 2;
    -    while result and (i > 1)
    -    do
    -      result := result and (Pas_tri(i) mod n = 0);
    -      i := i - 1;
    -    od;
    -  end is_prime;
    -
    -  unit vz: function (b: boolean): character;
    -  begin
    -    if b then result := '-' else result := '+' fi;
    -  end vz;
    -
    -  unit expand_poly: procedure (n: integer);
    -  var
    -    Pas_tri: arrayof integer,
    -    bvz: boolean,
    -    j: integer;
    -  begin
    -    array Pas_tri dim (0 : n);
    -    case n
    -      when 0: writeln("(x - 1) ^ 0 = 1")
    -      when 1: writeln("(x - 1) ^ 1 = x - 1")
    -      otherwise
    -        call Pascal_triangle(n, Pas_tri);
    -        write("(x - 1) ^ ", n: 1, " = x ^ ", n: 1, " ");
    -        bvz := true;
    -        for j := n - 1 downto (n div 2) + 1
    -        do
    -          write(vz(bvz), " ", Pas_tri(n - j): 1, " * x ^ ", j: 1, " ");
    -          bvz := not bvz;
    -        od;
    -        for j := (n div 2) downto 2
    -        do
    -          write(vz(bvz), " ", Pas_tri(j): 1, " * x ^ ", j: 1, " ");
    -          bvz := not bvz
    -        od;
    -        write(vz(bvz), " ", Pas_tri(1): 1, " * x ");
    -        bvz := not bvz;
    -        writeln(vz(bvz), " ", Pas_tri(0): 1);
    -    esac;
    -  end expand_poly;
    -
    -begin
    -  for n := 0 to 9
    -  do
    -    call expand_poly(n)
    -  od;
    -  for n := 2 to Pas_tri_last do
    -    if is_prime(n) then write(n: 1, " ") fi;
    -  od;
    -  writeln;
    -end
    diff --git a/Task/AKS-test-for-primes/Modula-2/aks-test-for-primes.mod2 b/Task/AKS-test-for-primes/Modula-2/aks-test-for-primes.mod2
    deleted file mode 100644
    index a138aea166..0000000000
    --- a/Task/AKS-test-for-primes/Modula-2/aks-test-for-primes.mod2
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -MODULE AKSTest;
    -(* AKS test for primes *)
    -
    -FROM STextIO IMPORT
    -  WriteLn, WriteString;
    -FROM SWholeIO IMPORT
    -  WriteInt;
    -
    -CONST
    -  PasTriMax = 33; (* for 32-bit integer type *)
    -
    -TYPE
    -  TPasTri = ARRAY [0 .. PasTriMax] OF CARDINAL;
    -
    -VAR
    -  N: CARDINAL;
    -
    -PROCEDURE PascalTriangle(N: CARDINAL; VAR PasTri: TPasTri);
    -(* Calculate the N'th line 0.. middle *)
    -VAR
    -  J, K: CARDINAL;
    -BEGIN
    -  PasTri[0] := 1;
    -  J := 1;
    -  WHILE J <= N DO
    -    J := J + 1;
    -    K := J DIV 2;
    -    PasTri[K] := PasTri[K - 1];
    -    FOR K := K TO 1 BY -1 DO
    -      PasTri[K] := PasTri[K] + PasTri[K - 1];
    -    END
    -  END
    -END PascalTriangle;
    -
    -PROCEDURE IsPrime(N: CARDINAL): BOOLEAN;
    -VAR
    -  Res   : BOOLEAN;
    -  I     : CARDINAL;
    -  PasTri: TPasTri;
    -BEGIN
    -  IF N > PasTriMax THEN
    -    WriteInt(N, 1);
    -    WriteString(" is out of range");
    -    WriteLn;
    -    HALT;
    -  END;
    -  PascalTriangle(N, PasTri);
    -  Res := TRUE;
    -  I := N DIV 2;
    -  WHILE Res AND (I > 1) DO
    -    Res := Res AND (PasTri[I] MOD N = 0);
    -    I := I - 1
    -  END;
    -  RETURN Res;
    -END IsPrime;
    -
    -PROCEDURE ExpandPoly(N: CARDINAL);
    -TYPE
    -  TVZ = ARRAY BOOLEAN OF CHAR;
    -CONST
    -  VZ = TVZ {'+', '-'};
    -VAR
    -  J     : CARDINAL;
    -  BVZ   : BOOLEAN;
    -  PasTri: TPasTri;
    -BEGIN
    -  IF N > PasTriMax THEN
    -    WriteInt(N, 1);
    -    WriteString(" is out of range");
    -    WriteLn;
    -    HALT
    -  END;
    -  CASE N OF
    -  | 0:
    -    WriteString("(x-1)^0 = 1"); WriteLn;
    -  | 1:
    -    WriteString("(x-1)^1 = x-1"); WriteLn;
    -  ELSE
    -    PascalTriangle(N, PasTri);
    -    WriteString("(x-1)^");
    -    WriteInt(N, 1);
    -    WriteString(" = x^");
    -    WriteInt(N, 1);
    -    BVZ := TRUE;
    -    FOR J := N - 1 TO N DIV 2 + 1 BY -1 DO
    -      WriteString(VZ[BVZ]);
    -      WriteInt(PasTri[N - J], 1);
    -      WriteString("*x^");
    -      WriteInt(J, 1);
    -      BVZ := NOT BVZ
    -    END;
    -    FOR J := N DIV 2 TO 2 BY -1 DO
    -      WriteString(VZ[BVZ]);
    -      WriteInt(PasTri[J], 1);
    -      WriteString("*x^");
    -      WriteInt(J, 1);
    -      BVZ := NOT BVZ
    -    END;
    -    WriteString(VZ[BVZ]);
    -    WriteInt(PasTri[1], 1);
    -    WriteString("*x");
    -    BVZ := NOT BVZ;
    -    WriteString(VZ[BVZ]);
    -    WriteInt(PasTri[0], 1);
    -    WriteLn;
    -  END;
    -END ExpandPoly;
    -
    -BEGIN
    -  FOR N := 0 TO 9 DO
    -    ExpandPoly(N)
    -  END;
    -  FOR N := 2 TO PasTriMax DO
    -    IF IsPrime(N) THEN
    -      WriteInt(N, 3)
    -    END
    -  END;
    -  WriteLn;
    -END AKSTest.
    diff --git a/Task/AKS-test-for-primes/OCaml/aks-test-for-primes.ml b/Task/AKS-test-for-primes/OCaml/aks-test-for-primes.ocaml
    similarity index 100%
    rename from Task/AKS-test-for-primes/OCaml/aks-test-for-primes.ml
    rename to Task/AKS-test-for-primes/OCaml/aks-test-for-primes.ocaml
    diff --git a/Task/AKS-test-for-primes/PHP/aks-test-for-primes.php b/Task/AKS-test-for-primes/PHP/aks-test-for-primes.php
    deleted file mode 100644
    index 9b3e9bbaa4..0000000000
    --- a/Task/AKS-test-for-primes/PHP/aks-test-for-primes.php
    +++ /dev/null
    @@ -1,80 +0,0 @@
    - PAS_TRI_MAX) {
    -    echo $n, " is out of range", PHP_EOL;
    -    exit;
    -  }
    -  switch ($n) {
    -    case 0:
    -      echo "(x-1)^0 = 1", PHP_EOL;
    -      break;
    -    case 1:
    -      echo "(x-1)^1 = x-1", PHP_EOL;
    -      break;
    -    default:
    -      $pas_tri = [];
    -      pascal_triangle($n, $pas_tri);
    -      echo "(x-1)^", $n, " = x^", $n;
    -      $bvz = true;
    -      $n_div_2 = intdiv($n, 2);
    -      for ($j = $n - 1; $j > $n_div_2; $j--) {
    -        echo vz($bvz), $pas_tri[$n - $j], "*x^", $j;
    -        $bvz = !$bvz;
    -      }
    -      for ($j = $n_div_2; $j >= 2; $j--) {
    -        echo vz($bvz), $pas_tri[$j], "*x^", $j;
    -        $bvz = !$bvz;
    -      }
    -      echo vz($bvz), $pas_tri[1], "*x";
    -      $bvz = !$bvz;
    -      echo vz($bvz), $pas_tri[0], PHP_EOL;
    -  }
    -}
    -
    -function pascal_triangle($n, &$pas_tri) {
    -// Calculate the $n'th line 0.. middle
    -  $pas_tri = array_fill(0, intdiv($n + 1, 2) + 1, 0);
    -  $pas_tri[0] = 1;
    -  $j = 1;
    -  while ($j <= $n) {
    -    $j++;
    -    $k = intdiv($j, 2);
    -    $pas_tri[$k] = $pas_tri[$k - 1];
    -    while ($k >= 1) {
    -      $pas_tri[$k] += $pas_tri[$k - 1];
    -      $k--;
    -    }
    -  }
    -}
    -
    -function is_prime($n):bool {
    -  if ($n > PAS_TRI_MAX) {
    -    echo $n, " is out of range", PHP_EOL;
    -    exit;
    -  }
    -  $pas_tri = [];
    -  pascal_triangle($n, $pas_tri);
    -  $res = true;
    -  $i = intdiv($n, 2);
    -  while ($res && ($i > 1)) {
    -    $res = $res && ($pas_tri[$i] % $n == 0);
    -    --$i;
    -  }
    -  return $res;
    -}
    -
    -for ($n = 0; $n <= 9; $n++)
    -  expand_poly($n);
    -for ($n = 2; $n <= PAS_TRI_MAX; $n++)
    -  if (is_prime($n))
    -    echo str_pad($n, 3, " ", STR_PAD_LEFT);
    -echo PHP_EOL;
    -?>
    diff --git a/Task/AKS-test-for-primes/Phix/aks-test-for-primes-1.phix b/Task/AKS-test-for-primes/Phix/aks-test-for-primes-1.phix
    deleted file mode 100644
    index da1bc84810..0000000000
    --- a/Task/AKS-test-for-primes/Phix/aks-test-for-primes-1.phix
    +++ /dev/null
    @@ -1,78 +0,0 @@
    --- demo/rosetta/AKSprimes.exw
    --- Does not work for primes above 67 (56 on 32bit), which is actually beyond the original task anyway.
    --- Translated from the C version (with all out-by-1 stuff now eradicated).
    -with javascript_semantics
    -constant limit = iff(machine_bits()=32?56:67)
    -sequence c = repeat(0,limit+1)
    -
    -procedure coef(integer n)
    -    c[n+1] = 1
    -    for i=n to 2 by -1 do
    -        c[i] += c[i-1]
    -    end for
    -end procedure
    -
    -function is_aks_prime(integer n)
    -    coef(n)
    -    for i=2 to n-1 do
    -        if remainder(c[i],n)!=0 then
    -            return false
    -        end if
    -    end for
    -    return true
    -end function
    -
    -procedure show(integer n)
    -    for i=n+1 to 1 by -1 do
    -        object ci = c[i]
    -        if ci=1 then
    -            if remainder(n-i+1,2)=0 then
    -                if i=1 then
    -                    if n=0 then
    -                        ci = "1"
    -                    else
    -                        ci = "+1"
    -                    end if
    -                else
    -                    ci = ""
    -                end if
    -            else
    -                ci = "-1"
    -            end if
    -        else
    -            if remainder(n-i+1,2)=0 then
    -                ci = sprintf("+%d",ci)
    -            else
    -                ci = sprintf("-%d",ci)
    -            end if
    -        end if
    -        if i=1 then -- ie ^0
    -            printf(1,"%s",{ci})
    -        elsif i=2 then -- ie ^1
    -            printf(1,"%sx",{ci})
    -        else
    -            printf(1,"%sx^%d",{ci,i-1})
    -        end if
    -    end for
    -end procedure
    -
    -procedure main()
    -    for n=0 to 9 do
    -        coef(n);
    -        printf(1,"(x-1)^%d = ", n);
    -        show(n);
    -        puts(1,'\n');
    -    end for
    -
    -    printf(1,"\nprimes (<=%d):",limit);
    ---  coef(1); -- (needed to reset c, if we want to avoid saying 1 is prime...)
    -    c[2] = 1 -- (this manages "", which is all that call did anyway...)
    -    for n=2 to limit do
    -        if is_aks_prime(n) then
    -            printf(1," %d", n);
    -        end if
    -    end for
    -    puts(1,'\n');
    -  wait_key()
    -end procedure
    -main()
    diff --git a/Task/AKS-test-for-primes/Phix/aks-test-for-primes-2.phix b/Task/AKS-test-for-primes/Phix/aks-test-for-primes-2.phix
    deleted file mode 100644
    index f8bd4ad4ab..0000000000
    --- a/Task/AKS-test-for-primes/Phix/aks-test-for-primes-2.phix
    +++ /dev/null
    @@ -1,27 +0,0 @@
    -include mpfr.e
    -mpz z = mpz_init()
    -atom t0 = time(), t1 = t0+1
    -sequence p = {}
    -integer maxn = 0
    -for n=2 to 10000 do -- (more than we can manage in 10s)
    -    bool nprime = true
    -    for k=1 to n-1 do
    -        mpz_bin_uiui(z,n,k)
    -        if not mpz_divisible_ui_p(z,n) then
    -            nprime = false
    -            exit
    -        end if
    -    end for
    -    if nprime then
    -        p &= n
    -    end if
    -    maxn = n
    -    if time()>t1 then
    -        if time()>t0+10 then progress("") exit end if
    -        progress("checking %d",{n})
    -        t1 = time()+1
    -    end if
    -end for
    -sequence q = get_primes_le(maxn)
    -printf(1,"%d primes < %d found, correctly:%t, in %s\n",{length(p),maxn,p=q,elapsed(time()-t0)})
    -wait_key()
    diff --git a/Task/AKS-test-for-primes/Phix/aks-test-for-primes-3.phix b/Task/AKS-test-for-primes/Phix/aks-test-for-primes-3.phix
    deleted file mode 100644
    index bfa4d0b3d9..0000000000
    --- a/Task/AKS-test-for-primes/Phix/aks-test-for-primes-3.phix
    +++ /dev/null
    @@ -1,24 +0,0 @@
    -atom t0 = time(), t1 = t0+1
    -sequence p = {}
    -integer maxn = 0
    -for n=2 to 10000 do -- (more than we can manage in 10s)
    -    sequence r = {1}
    -    for k=1 to n do
    -        r &= 1
    -        for l=k to 2 by -1 do
    -            r[l] = remainder(r[l]+r[l-1],n)
    -        end for
    -    end for
    -    if sum(r)=2 then -- ie {1,<==all 0s==>,1}
    -        p &= n
    -    end if
    -    maxn = n
    -    if time()>t1 then
    -        if time()>t0+10 then progress("") exit end if
    -        progress("checking %d",{n})
    -        t1 = time()+1
    -    end if
    -end for
    -sequence q = get_primes_le(maxn)
    -printf(1,"%d primes < %d found, correctly:%t, in %s\n",{length(p),maxn,p=q,elapsed(time()-t0)})
    -wait_key()
    diff --git a/Task/AKS-test-for-primes/Phix/aks-test-for-primes.phix b/Task/AKS-test-for-primes/Phix/aks-test-for-primes.phix
    new file mode 100644
    index 0000000000..384e622777
    --- /dev/null
    +++ b/Task/AKS-test-for-primes/Phix/aks-test-for-primes.phix
    @@ -0,0 +1,82 @@
    +-->
    + -- demo/rosetta/AKSprimes.exw
    + -- Does not work for primes above 53, which is actually beyond the original task anyway.
    + -- Translated from the C version, just about everything is (working) out-by-1, what fun.
    +
    + sequence c = repeat(0,100)
    +
    + procedure coef(integer n)
    + -- out-by-1, ie coef(1)==^0, coef(2)==^1, coef(3)==^2 etc.
    +     c[n] = 1
    +     for i=n-1 to 2 by -1 do
    +         c[i] = c[i]+c[i-1]
    +     end for
    + end procedure
    +
    + function is_aks_prime(integer n)
    +     coef(n+1); -- (I said it was out-by-1)
    +     for i=2 to n-1 do   -- (technically "to n" is more correct)
    +         if remainder(c[i],n)!=0 then
    +             return 0
    +         end if
    +     end for
    +     return 1
    + end function
    +
    + procedure show(integer n)
    + -- (As per coef, this is (working) out-by-1)
    + object ci
    +     for i=n to 1 by -1 do
    +         ci = c[i]
    +         if ci=1 then
    +             if remainder(n-i,2)=0 then
    +                 if i=1 then
    +                     if n=1 then
    +                         ci = "1"
    +                     else
    +                         ci = "+1"
    +                     end if
    +                 else
    +                     ci = ""
    +                 end if
    +             else
    +                 ci = "-1"
    +             end if
    +         else
    +             if remainder(n-i,2)=0 then
    +                 ci = sprintf("+%d",ci)
    +             else
    +                 ci = sprintf("-%d",ci)
    +             end if
    +         end if
    +         if i=1 then -- ie ^0
    +             printf(1,"%s",{ci})
    +         elsif i=2 then -- ie ^1
    +             printf(1,"%sx",{ci})
    +         else
    +             printf(1,"%sx^%d",{ci,i-1})
    +         end if
    +     end for
    + end procedure
    +
    + procedure main()
    +     for n=1 to 10 do -- (0 to 9 really)
    +         coef(n);
    +         printf(1,"(x-1)^%d = ", n-1);
    +         show(n);
    +         puts(1,'\n');
    +     end for
    +
    +     puts(1,"\nprimes (<=53):");
    + --  coef(2); -- (needed to reset c, if we want to avoid saying 1 is prime...)
    +     c[2] = 1 -- (this manages "", which is all that call did anyway...)
    +     for n = 2 to 53 do
    +         if is_aks_prime(n) then
    +             printf(1," %d", n);
    +         end if
    +     end for
    +     puts(1,'\n');
    +     if getc(0) then end if
    + end procedure
    + main()
    +
    + function abundantOdd(integer n, done, lim, bool printAll)
    +     while done<lim do
    +         atom tot = sum(factors(n,-1))
    +         if tot>n then
    +             done += 1
    +             if printAll or done=lim then
    +                 string ln = iff(printAll?sprintf("%2d. ",done):"")
    +                 printf(1,"%s%,6d (proper sum:%,d)\n",{ln,n,tot})
    +             end if
    +         end if
    +         n += 2
    +     end while
    +     printf(1,"\n")
    +     return n
    + end function
    + printf(1,"The first 25 abundant odd numbers are:\n")
    + integer n = abundantOdd(1, 0, 25, true)
    + printf(1,"The one thousandth abundant odd number is:")
    + {} = abundantOdd(n, 25, 1000, false)
    + printf(1,"The first abundant odd number above one billion is:")
    + {} = abundantOdd(1e9+1, 0, 1, false)
    + iterator
        Walker.zero().tweak(fcn(rn){
           n:=rn.value;
           while(True){
    -     sum:=0;
    -     foreach d in ([3.. n.toFloat().sqrt().toInt(), 2]){
    -        if( (y:=n/d) *d != n) continue;
    -        sum += ((y==d) and y or y+d)
    -     }
    -     if(sum>n){ rn.set(n+2); return(n) }
    -     n+=2;
    +	 sum:=0;
    +	 foreach d in ([3.. n.toFloat().sqrt().toInt(), 2]){
    +	    if( (y:=n/d) *d != n) continue;
    +	    sum += ((y==d) and y or y+d)
    +	 }
    +	 if(sum>n){ rn.set(n+2); return(n) }
    +	 n+=2;
           }
        }.fp(Ref(startAt.isOdd and startAt or startAt+1)))
     }
    diff --git a/Task/Accumulator-factory/Ada/accumulator-factory-1.adb b/Task/Accumulator-factory/Ada/accumulator-factory-1.ada
    similarity index 100%
    rename from Task/Accumulator-factory/Ada/accumulator-factory-1.adb
    rename to Task/Accumulator-factory/Ada/accumulator-factory-1.ada
    diff --git a/Task/Accumulator-factory/Ada/accumulator-factory-2.adb b/Task/Accumulator-factory/Ada/accumulator-factory-2.ada
    similarity index 100%
    rename from Task/Accumulator-factory/Ada/accumulator-factory-2.adb
    rename to Task/Accumulator-factory/Ada/accumulator-factory-2.ada
    diff --git a/Task/Accumulator-factory/Ada/accumulator-factory-3.adb b/Task/Accumulator-factory/Ada/accumulator-factory-3.ada
    similarity index 100%
    rename from Task/Accumulator-factory/Ada/accumulator-factory-3.adb
    rename to Task/Accumulator-factory/Ada/accumulator-factory-3.ada
    diff --git a/Task/Accumulator-factory/Ballerina/accumulator-factory.ballerina b/Task/Accumulator-factory/Ballerina/accumulator-factory.ballerina
    deleted file mode 100644
    index a8f8252dea..0000000000
    --- a/Task/Accumulator-factory/Ballerina/accumulator-factory.ballerina
    +++ /dev/null
    @@ -1,38 +0,0 @@
    -import ballerina/io;
    -
    -type numeric int|float|decimal;
    -
    -function accumulator(numeric acc) returns (function(numeric) returns numeric) {
    -    numeric sum = acc;
    -    return function(numeric n) returns numeric {
    -        numeric sum2 = sum;
    -        if sum2 is int && n is int {
    -            sum2 += n;
    -        } else if sum2 is float && n is float {
    -            sum2 += n;
    -        } else if sum2 is decimal && n is decimal {
    -            sum2 += n;
    -        } else if sum2 is int && n is float {
    -            sum2 = sum2 + n;
    -        } else if sum2 is int && n is decimal {
    -            sum2 = sum2 + n;
    -        } else if sum2 is float && n is int {
    -            sum2 += n;
    -        } else if sum2 is float && n is decimal {
    -            sum2 = sum2 + n;
    -        } else if sum2 is decimal && n is int {
    -            sum2 += n;
    -        } else if sum2 is decimal && n is float {
    -            sum2 += n;
    -        }
    -        sum = sum2;
    -        return sum;
    -   };
    -}
    -
    -public function main() {
    -    var x = accumulator(1);
    -    _ = x(5);
    -    _ = accumulator(2);
    -    io:println(x(2.3));
    -}
    diff --git a/Task/Accumulator-factory/Crystal/accumulator-factory.cr b/Task/Accumulator-factory/Crystal/accumulator-factory.crystal
    similarity index 100%
    rename from Task/Accumulator-factory/Crystal/accumulator-factory.cr
    rename to Task/Accumulator-factory/Crystal/accumulator-factory.crystal
    diff --git a/Task/Accumulator-factory/Delphi/accumulator-factory.pas b/Task/Accumulator-factory/Delphi/accumulator-factory.delphi
    similarity index 100%
    rename from Task/Accumulator-factory/Delphi/accumulator-factory.pas
    rename to Task/Accumulator-factory/Delphi/accumulator-factory.delphi
    diff --git a/Task/Accumulator-factory/EMal/accumulator-factory.emal b/Task/Accumulator-factory/EMal/accumulator-factory.emal
    index b0da805059..7072fb070e 100644
    --- a/Task/Accumulator-factory/EMal/accumulator-factory.emal
    +++ b/Task/Accumulator-factory/EMal/accumulator-factory.emal
    @@ -7,9 +7,9 @@ in Org:RosettaCode
      |^
     type Number allows int, real
     type AccumulatorUsingNumber
    -fun foo ← fun by Number n
    -  fun g ← Number by Number i
    -    return n +← i
    +fun foo = fun by Number n
    +  fun g = Number by Number i
    +    return n += i
       end
       return g
     end
    @@ -17,16 +17,16 @@ type AccumulatorUsingVar
     ^|EMal has an universal supertype Variable (var) that can be used.
      |Some manual type checks are required.
      |^
    -fun checkType ← void by var value
    -  if generic!value ≠ real and generic!value ≠ int
    -    error(1, "Only real and int values can be used")
    +fun checkType = void by var value
    +  if generic!value != real and generic!value != int
    +    Event.error(1, "Only real and int values can be used").raise()
       end
     end
    -fun foo ← fun by var n
    +fun foo = fun by var n
       checkType(n)
    -  fun g ← var by var i
    +  fun g = var by var i
         checkType(i)
    -    return n +← i
    +    return n += i
       end
       return g
     end
    @@ -35,15 +35,15 @@ type Main
      |it is time to create a list holding both data types.
      |We iterate over the solutions in order to test them.
      |^
    -List solutions ← generic[AccumulatorUsingNumber, AccumulatorUsingVar]
    -for int i ← 0; i < solutions.length; ++i
    -  generic solution ← solutions[i]
    -  writeLine("[ solution " + (i + 1) + " ]")
    -  fun x ← :solution.foo(1)
    +List solutions = generic[AccumulatorUsingNumber, AccumulatorUsingVar]
    +for int i = 0; i < solutions.length; ++i
    +  generic solution = solutions[i]
    +  writeLine("=== solution " + (i + 1) + " ===")
    +  fun x = :solution.foo(1)
       x(5)
       :solution.foo(3)
       watch(x(2.3))
    -  fun y ← :solution.foo(1)
    +  fun y = :solution.foo(1)
       y(5)
       :solution.foo(3)
       watch(y(2))
    diff --git a/Task/Accumulator-factory/Elena/accumulator-factory.elena b/Task/Accumulator-factory/Elena/accumulator-factory.elena
    index 16e02b3b7b..be112e0585 100644
    --- a/Task/Accumulator-factory/Elena/accumulator-factory.elena
    +++ b/Task/Accumulator-factory/Elena/accumulator-factory.elena
    @@ -1,16 +1,16 @@
     function(acc)
         = (n => acc.append(n));
     
    -Accumulator(n)
    +accumulator(n)
         = function(new Variable(n));
     
    -public Program()
    +public program()
     {
    -    var x := Accumulator(1);
    +    var x := accumulator(1);
     
         x(5);
     
    -    var y := Accumulator(3);
    +    var y := accumulator(3);
     
    -    Console.write(x(2.3r))
    +    console.write(x(2.3r))
     }
    diff --git a/Task/Accumulator-factory/Elixir/accumulator-factory-1.ex b/Task/Accumulator-factory/Elixir/accumulator-factory-1.elixir
    similarity index 100%
    rename from Task/Accumulator-factory/Elixir/accumulator-factory-1.ex
    rename to Task/Accumulator-factory/Elixir/accumulator-factory-1.elixir
    diff --git a/Task/Accumulator-factory/Elixir/accumulator-factory-2.ex b/Task/Accumulator-factory/Elixir/accumulator-factory-2.elixir
    similarity index 100%
    rename from Task/Accumulator-factory/Elixir/accumulator-factory-2.ex
    rename to Task/Accumulator-factory/Elixir/accumulator-factory-2.elixir
    diff --git a/Task/Accumulator-factory/Julia/accumulator-factory.jl b/Task/Accumulator-factory/Julia/accumulator-factory.julia
    similarity index 100%
    rename from Task/Accumulator-factory/Julia/accumulator-factory.jl
    rename to Task/Accumulator-factory/Julia/accumulator-factory.julia
    diff --git a/Task/Accumulator-factory/Kotlin/accumulator-factory.kts b/Task/Accumulator-factory/Kotlin/accumulator-factory.kotlin
    similarity index 100%
    rename from Task/Accumulator-factory/Kotlin/accumulator-factory.kts
    rename to Task/Accumulator-factory/Kotlin/accumulator-factory.kotlin
    diff --git a/Task/Accumulator-factory/M2000-Interpreter/accumulator-factory.m2000 b/Task/Accumulator-factory/M2000-Interpreter/accumulator-factory.m2000
    index b9bdf82db9..38c3698bc9 100644
    --- a/Task/Accumulator-factory/M2000-Interpreter/accumulator-factory.m2000
    +++ b/Task/Accumulator-factory/M2000-Interpreter/accumulator-factory.m2000
    @@ -1,33 +1,32 @@
    -Module CheckIt {
    -    Def VarType(n)=Type$(n)
    -    foo=lambda  (acc) -> {
    -          =lambda acc -> {
    -                if empty then =acc : exit
    -                read x
    -                acc+=x
    -                =acc
    -          }
    -    }
    -    Double a=1
    -    x = foo(a)
    -    call void x(5)  ' 	Without Void a non zero value count as Error.
    -    call  foo(3)
    -    print VarType(x())="Double", x(2.3)=8.3 ' Double literal
    -    Single m=1
    -    z=foo(m)
    -    long L=5
    -    ? VarType(z(L))="Single", z(2.3)=8.3~ ' Single literal
    -    Currency c=1
    -    zc=foo(c)
    -    ? VarType(zc(5))="Currency", zc(2.3)=8.3#  ' Currency literal
    -    Decimal d=1
    -    zd=foo(d)
    -    ? VarType(zd(5))="Decimal", zd(2.3)=8.3@  ' Decimal literal
    -    Date dt=1
    -    zdt=foo(dt)
    -    ? VarType(zdt(5))="Date", zdt(2.3)=8.3ud  ' Date literal
    -    Long Long LL=1
    -    zdt=foo(LL)
    -    ? VarType(zdt(5))="Long Long", zdt(2.3)=8&& ' Long Long literal
    +\\ M2000 Interpreter
    +\\ accumulator factory
    +foo=lambda acc=0 (n as double=0) -> {
    +      \\ interpreter place this: read n as double=0 as first line of lambda function
    +      if n=0 then =acc : exit
    +      acc+=n
    +      \\ acc passed as a closuer to lambda (a copy of acc in the result lambda function)
    +      =lambda acc -> {
    +            ' if stack of values is empty then return a copy of acc
    +            if empty then =acc : exit
    +            read x
    +            \\ x has no type here, can be any numeric type (also can be an object too)
    +            \\ accumulator is double, and is a closure (a copy of acc in foo)
    +            acc+=x
    +            \\ any variable in M2000 hold  first type
    +            \\ if x is an object then we get error, except if object use this operator
    +            x=acc
    +            \\ so we return x type
    +            =x
    +      }
     }
    -CheckIt
    +x=foo(1&)   ' 1& is long type (32bit)
    +call void x(5) ' 5 is double type (the default type for M2000)
    +call void foo(3#)   ' void tell to interpreter to throw result, 3# is Currency type
    +print x(2.3@) ' print 8.3,   2.3@ is Decimal type
    +print foo()=4 ' print true
    +def ExpType$(z)=type$(z)
    +print ExpType$(foo())="Double"
    +print ExpType$(x(0&))="Long"
    +print ExpType$(x(0@))="Decimal"
    +print ExpType$(x())="Double"
    +print ExpType$(foo(20))="lambda"
    diff --git a/Task/Accumulator-factory/OCaml/accumulator-factory.ml b/Task/Accumulator-factory/OCaml/accumulator-factory.ocaml
    similarity index 100%
    rename from Task/Accumulator-factory/OCaml/accumulator-factory.ml
    rename to Task/Accumulator-factory/OCaml/accumulator-factory.ocaml
    diff --git a/Task/Accumulator-factory/PascalABC.NET/accumulator-factory.pas b/Task/Accumulator-factory/PascalABC.NET/accumulator-factory.pas
    deleted file mode 100644
    index 86c0cbcc7d..0000000000
    --- a/Task/Accumulator-factory/PascalABC.NET/accumulator-factory.pas
    +++ /dev/null
    @@ -1,12 +0,0 @@
    -function foo(n: real): real -> real :=
    -  i -> begin
    -    n += i;
    -    Result := n;
    -  end;
    -
    -begin
    -  var x := foo(1);
    -  x(5);
    -  foo(3);
    -  print(x(2.3));
    -end.
    diff --git a/Task/Accumulator-factory/Pluto/accumulator-factory.pluto b/Task/Accumulator-factory/Pluto/accumulator-factory.pluto
    deleted file mode 100644
    index 5baa4348fd..0000000000
    --- a/Task/Accumulator-factory/Pluto/accumulator-factory.pluto
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -local function accumulator(acc)
    -    return |n| -> do
    -        acc += n
    -        return acc
    -    end
    -end
    -
    -local x = accumulator(1)
    -x(5)
    -accumulator(3)
    -print(x(2.3))
    diff --git a/Task/Accumulator-factory/PowerShell/accumulator-factory-1.ps1 b/Task/Accumulator-factory/PowerShell/accumulator-factory-1.psh
    similarity index 100%
    rename from Task/Accumulator-factory/PowerShell/accumulator-factory-1.ps1
    rename to Task/Accumulator-factory/PowerShell/accumulator-factory-1.psh
    diff --git a/Task/Accumulator-factory/PowerShell/accumulator-factory-2.ps1 b/Task/Accumulator-factory/PowerShell/accumulator-factory-2.psh
    similarity index 100%
    rename from Task/Accumulator-factory/PowerShell/accumulator-factory-2.ps1
    rename to Task/Accumulator-factory/PowerShell/accumulator-factory-2.psh
    diff --git a/Task/Accumulator-factory/REBOL/accumulator-factory.rebol b/Task/Accumulator-factory/REBOL/accumulator-factory.rebol
    new file mode 100644
    index 0000000000..35b5392daf
    --- /dev/null
    +++ b/Task/Accumulator-factory/REBOL/accumulator-factory.rebol
    @@ -0,0 +1,8 @@
    +make-acc-gen: func [start-val] [
    +    use [state] [
    +        state: start-val
    +        func [value] [
    +            state: state + value
    +        ]
    +    ]
    +]
    diff --git a/Task/Accumulator-factory/Rebol/accumulator-factory-1.rebol b/Task/Accumulator-factory/Rebol/accumulator-factory-1.rebol
    deleted file mode 100644
    index 0738505b60..0000000000
    --- a/Task/Accumulator-factory/Rebol/accumulator-factory-1.rebol
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -make-acc-gen: func [start-val] [
    -    use [state] [
    -        state: start-val
    -        func [value] [
    -            state: state + value
    -        ]
    -    ]
    -]
    -gen: make-acc-gen 1
    -print gen 5   ;== 6
    -print gen 2.3 ;== 8.3
    diff --git a/Task/Accumulator-factory/Rebol/accumulator-factory-2.rebol b/Task/Accumulator-factory/Rebol/accumulator-factory-2.rebol
    deleted file mode 100644
    index 02468d5450..0000000000
    --- a/Task/Accumulator-factory/Rebol/accumulator-factory-2.rebol
    +++ /dev/null
    @@ -1,25 +0,0 @@
    -;; Define a generator function 'gen' with an optional refinement '/init'
    -;; - 'value' is a required number passed to the function
    -;; - '/init' is an optional refinement for initialization
    -gen: function/with [value [number!] /init] [
    -
    -    ;; If '/init' refinement is used, initialize state and exit immediately
    -    if init [
    -        state: value    ;; Set the initial state to the provided value
    -        exit            ;; Exit, so nothing else in the function is run
    -    ]
    -
    -    ;; If not initializing, add 'value' to 'state'
    -    state: state + value
    -
    -    ;; The function returns the new state each call
    -][state: 0]             ;; 'state' is a local variable, initialized once per definition (persistent closure)
    -
    -;; Initialize the 'state' value of gen to 1 by calling it with '/init'
    -gen/init 1
    -
    -;; Call gen with 5: Adds 5 to state and prints the result (should print 6)
    -print gen 5
    -
    -;; Call gen with 2.3: Adds 2.3 to state and prints the result (should print 8.3)
    -print gen 2.3
    diff --git a/Task/Accumulator-factory/Red/accumulator-factory.red b/Task/Accumulator-factory/Red/accumulator-factory.red
    deleted file mode 100644
    index 9bceca4447..0000000000
    --- a/Task/Accumulator-factory/Red/accumulator-factory.red
    +++ /dev/null
    @@ -1,15 +0,0 @@
    -Red [ "Accumulator factory - hinjolicious" ]
    -
    -; just a helper func to display informative output
    -demo: function [s b] [print ["^/==" s "==^/^/" mold/only b "^/>>"] do b]
    -
    -demo "Accumulator" [
    -foo: function [init] [
    -	acc: init
    -	closure [val][acc: acc + val]
    -]
    -x: foo 1
    -print x 5 ; 6
    -foo 3 ; no effect!
    -print x 2.3 ; 8.3
    -]
    diff --git a/Task/Accumulator-factory/Rust/accumulator-factory-1.rs b/Task/Accumulator-factory/Rust/accumulator-factory-1.rust
    similarity index 100%
    rename from Task/Accumulator-factory/Rust/accumulator-factory-1.rs
    rename to Task/Accumulator-factory/Rust/accumulator-factory-1.rust
    diff --git a/Task/Accumulator-factory/Rust/accumulator-factory-2.rs b/Task/Accumulator-factory/Rust/accumulator-factory-2.rust
    similarity index 100%
    rename from Task/Accumulator-factory/Rust/accumulator-factory-2.rs
    rename to Task/Accumulator-factory/Rust/accumulator-factory-2.rust
    diff --git a/Task/Accumulator-factory/Scheme/accumulator-factory.scm b/Task/Accumulator-factory/Scheme/accumulator-factory.ss
    similarity index 100%
    rename from Task/Accumulator-factory/Scheme/accumulator-factory.scm
    rename to Task/Accumulator-factory/Scheme/accumulator-factory.ss
    diff --git a/Task/Accumulator-factory/V-(Vlang)/accumulator-factory.v b/Task/Accumulator-factory/V-(Vlang)/accumulator-factory.v
    deleted file mode 100644
    index c799934393..0000000000
    --- a/Task/Accumulator-factory/V-(Vlang)/accumulator-factory.v
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -struct Generator {
    -	mut:
    -    a_n []f64
    -}
    -
    -fn (mut gen Generator) generator(ir f64) fn (f64) f64 {
    -    gen.a_n << ir
    -    id := gen.a_n.len - 1
    -    return fn (mut gen Generator, id int) fn (f64) f64 {
    -        return fn [mut gen, id] (d f64) f64 {
    -            gen.a_n[id] += d
    -            return gen.a_n[id]
    -        }
    -    }(mut gen, id)
    -}
    -
    -fn main() {
    -    mut o_generator := Generator{}
    -    accumulator := o_generator.generator(1)
    -    println(accumulator(5))
    -    o_generator.generator(3)
    -    println(accumulator(2.3))
    -}
    diff --git a/Task/Accumulator-factory/VBScript/accumulator-factory-1.vbs b/Task/Accumulator-factory/VBScript/accumulator-factory-1.vb
    similarity index 100%
    rename from Task/Accumulator-factory/VBScript/accumulator-factory-1.vbs
    rename to Task/Accumulator-factory/VBScript/accumulator-factory-1.vb
    diff --git a/Task/Accumulator-factory/VBScript/accumulator-factory-2.vbs b/Task/Accumulator-factory/VBScript/accumulator-factory-2.vb
    similarity index 100%
    rename from Task/Accumulator-factory/VBScript/accumulator-factory-2.vbs
    rename to Task/Accumulator-factory/VBScript/accumulator-factory-2.vb
    diff --git a/Task/Achilles-numbers/Ada/achilles-numbers.adb b/Task/Achilles-numbers/Ada/achilles-numbers.adb
    deleted file mode 100644
    index 054f448da3..0000000000
    --- a/Task/Achilles-numbers/Ada/achilles-numbers.adb
    +++ /dev/null
    @@ -1,205 +0,0 @@
    -pragma Ada_2022;
    -
    -with Ada.Text_IO;
    -with Ada.Numerics; use Ada.Numerics;
    -with Ada.Numerics.Long_Elementary_Functions;
    -use  Ada.Numerics.Long_Elementary_Functions;
    -with Ada.Strings; use Ada.Strings;
    -with Ada.Strings.Fixed; use Ada.Strings.Fixed;
    -with Prime_Numbers;
    -
    -procedure Achilles_Numbers is
    -
    -   package Long_Integer_Prime_Numbers is new Prime_Numbers
    -     (Integer, 0, 1, 2);
    -   use Long_Integer_Prime_Numbers;
    -
    -   --  A powerful number N is such that for every primer factor P of it
    -   --  P^2 also divides N
    -   --  Is_Powerful function decomposes the given number N in its prime factors
    -   --  and then it checks if each factor squared is a divisor of N
    -   function Is_Powerful (Number : Natural) return Boolean is
    -      List : constant Number_List  := Decompose (Integer (Number));
    -   begin
    -      for Index in List'Range loop
    -         declare
    -            N : constant Long_Long_Integer := Long_Long_Integer (Number);
    -            F : constant Long_Long_Integer := Long_Long_Integer (List (Index));
    -         begin
    -            if N mod (F * F) /= 0 then
    -               return False;
    -            end if;
    -         end;
    -      end loop;
    -
    -      return True;
    -   end Is_Powerful;
    -
    -   --  The Is_Power  function checks if a given number N can be written
    -   --  as a power of two integers that are > 1
    -   --  It makes use of the mathematical expression N = A^B
    -   --  taking Log(N) = Log (A^B) equals to B = Log (N) / Log (A)
    -   --  where the solutions are when B is an integer > 1
    -   function Is_Power (N : Integer) return Boolean is
    -
    -      function Is_Almost_Equal (A : Long_Float;
    -                                B : Long_Float) return Boolean is
    -         Epsilon : constant := 0.000_000_000_000_001;
    -      begin
    -         if abs (A - B) < Epsilon then
    -            return True;
    -         else
    -            return False;
    -         end if;
    -      end Is_Almost_Equal;
    -
    -      A       : Integer := 2;
    -      B       : Long_Float;
    -      Log_Of_N : constant Long_Float := Log (Long_Float (N), 2.0);
    -   begin
    -      if N = 1 then
    -         return True;
    -      end if;
    -
    -      while True loop
    -         B := Log_Of_N / Log (Long_Float (A), 2.0);
    -
    -         if Is_Almost_Equal (B, Long_Float (Integer (B)))
    -           and then Integer (B) > 1
    -         then
    -            return True;
    -         end if;
    -
    -         exit when A * A > N;
    -         A := @ + 1;
    -      end loop;
    -
    -      return False;
    -
    -   end Is_Power;
    -
    -   --  An Achilles number is a powerful number that can't be expressed
    -   --  as a power
    -   function Is_Achilles (N : Integer) return Boolean is
    -   begin
    -      if Is_Powerful (N) then
    -         if Is_Power (N) = False then
    -            return True;
    -         end if;
    -      end if;
    -
    -      return False;
    -   end Is_Achilles;
    -
    -   --  Calculates the Euler totient of a number
    -   function Totient (N : Integer) return Integer is
    -      Tot : Integer := N;
    -      I   : Integer;
    -      N2  : Integer := N;
    -   begin
    -      I := 2;
    -      while I * I <= N2 loop
    -         if N2 mod I = 0 then
    -            while N2 mod I = 0 loop
    -               N2 := N2 / I;
    -            end loop;
    -            Tot := Tot - Tot / I;
    -         end if;
    -
    -         if I = 2 then
    -            I := 1;
    -         end if;
    -         I := I + 2;
    -      end loop;
    -
    -      if N2 > 1 then
    -         Tot := Tot - Tot / N2;
    -      end if;
    -
    -      return Tot;
    -   end Totient;
    -
    -   --  A Strong Achilles number is an Achilles number whose Euler Totient
    -   --  is also an Achilles number
    -   function Is_Strong_Achilles (N : Integer) return Boolean is
    -   begin
    -      if Is_Achilles (N) then
    -         if Is_Achilles (Totient (N)) then
    -            return True;
    -         end if;
    -      end if;
    -
    -      return False;
    -   end Is_Strong_Achilles;
    -
    -   --  Counts the digits in a number by taking the string from
    -   --  its 'Image attribute, trimming it and counting the characters
    -   function Count_Digits (N : Integer) return Natural is
    -      Integer_Str : constant String := Trim (N'Image, Both);
    -   begin
    -      return Integer_Str'Length;
    -   end Count_Digits;
    -
    -begin
    -   --  Find the first 50 Achilles numbers
    -   declare
    -      N : Integer := 1;
    -      Count : Integer := 1;
    -   begin
    -      Ada.Text_IO.Put_Line ("First 50 Achilles numbers:");
    -
    -      while Count <= 50 loop
    -
    -         if Is_Achilles (N) then
    -            Count := @ + 1;
    -            Ada.Text_IO.Put (N'Image & " ");
    -         end if;
    -
    -         N := @ + 1;
    -      end loop;
    -
    -      Ada.Text_IO.New_Line;
    -   end;
    -
    -   --  Find the first 20 Strong Achilles numbers
    -   declare
    -      N : Integer := 1;
    -      Count : Integer := 1;
    -   begin
    -      Ada.Text_IO.Put_Line ("First 20 Strong Achilles numbers:");
    -
    -      while Count <= 20 loop
    -
    -         if Is_Strong_Achilles (N) then
    -            Count := @ + 1;
    -            Ada.Text_IO.Put (N'Image & " ");
    -         end if;
    -
    -         N := @ + 1;
    -      end loop;
    -
    -      Ada.Text_IO.New_Line;
    -   end;
    -
    -   --  Count numbers with digits
    -   declare
    -      Counts : array (2 .. 6) of Natural := [others => 0];
    -      N      : Integer := 1;
    -   begin
    -      Ada.Text_IO.Put_Line ("Number of Achilles numbers with:");
    -
    -      while Count_Digits (N) <= Counts'Last loop
    -
    -         --  Ada.Text_IO.Put_Line ("Testing: " & N'Image);
    -
    -         if Is_Achilles (N) then
    -            Counts (Count_Digits (N)) := @ + 1;
    -         end if;
    -         N := @ + 1;
    -      end loop;
    -
    -      for I in Counts'Range loop
    -         Ada.Text_IO.Put_Line (I'Image & " digits: " & Counts (I)'Image);
    -      end loop;
    -   end;
    -end Achilles_Numbers;
    diff --git a/Task/Achilles-numbers/Arturo/achilles-numbers.arturo b/Task/Achilles-numbers/Arturo/achilles-numbers.arturo
    deleted file mode 100644
    index 939ef41b2a..0000000000
    --- a/Task/Achilles-numbers/Arturo/achilles-numbers.arturo
    +++ /dev/null
    @@ -1,36 +0,0 @@
    -prettyPrint: function [res][
    -    res | split.every: 10
    -        | loop => [print map & 'x -> pad to :string x 7]
    -]
    -
    -achilles?: function [n][
    -    exps: values tally factors.prime n
    -    and? -> not? some? exps => one?
    -         -> 1 = fold exps [a b] -> gcd @[a b]
    -]
    -
    -phi: function [n][
    -    pf: tally factors.prime n
    -    fold.seed:1 keys pf [res pr][
    -        ipr: to :integer pr
    -        res * (ipr - 1) * ipr ^ dec to :integer pf\[ipr]
    -    ]
    -]
    -
    -n: 50
    -print ["First" n "Achilles numbers:"]
    -2..∞ | select.first: n => achilles?
    -     | prettyPrint
    -
    -print ""
    -print ["First" n "strong Achilles numbers:"]
    -2..∞ | select.first: n 'x -> and? [achilles? x][achilles? phi x]
    -     | prettyPrint
    -
    -print ""
    -counts: 2..1000000 | select => achilles?
    -                   | map => [size digits &]
    -                   | tally
    -
    -loop counts [k v]->
    -    print [k "digits:" v]
    diff --git a/Task/Achilles-numbers/Ballerina/achilles-numbers.ballerina b/Task/Achilles-numbers/Ballerina/achilles-numbers.ballerina
    deleted file mode 100644
    index ff31e0dfeb..0000000000
    --- a/Task/Achilles-numbers/Ballerina/achilles-numbers.ballerina
    +++ /dev/null
    @@ -1,92 +0,0 @@
    -import ballerina/io;
    -
    -map pps = {};
    -
    -function getPerfectPowers(int maxExp) {
    -    int upper  = 10.0.pow(maxExp);
    -    int upper2 = 10.0.pow(maxExp).sqrt().floor();
    -    foreach int i in 2...upper2 {
    -        int p = i;
    -        while true {
    -            if p > int:MAX_VALUE / i { break; }
    -            p *= i;
    -            if p >= upper { break; }
    -            pps[p.toString()] = 1;
    -        }
    -    }
    -}
    -
    -function getAchilles(int minExp, int maxExp) returns map {
    -    int lower  = 10.0.pow(minExp);
    -    int upper  = 10.0.pow(maxExp);
    -    int upper2 = 10.0.pow(maxExp).cbrt().floor();
    -    int upper3 = 10.0.pow(maxExp).sqrt().floor();
    -    map achilles = {};
    -    foreach int b in 1...upper2 {
    -        int b3 = b * b * b;
    -        foreach int a in 1...upper3 {
    -            int p = b3 * a * a;
    -            if p >= upper { break; }
    -            if p >= lower {
    -                string ps = p.toString();
    -                if !pps.hasKey(ps) {
    -                    achilles[ps] = 1;
    -                }
    -            }
    -        }
    -    }
    -    return achilles;
    -}
    -
    -function totient(int m) returns int {
    -    if m < 1 { return 0; }
    -    int tot = m;
    -    int n = m;
    -    int i = 2;
    -    while  i * i <= n {
    -        if (n % i) == 0 {
    -            while (n % i) == 0 { n /= i; }
    -            tot -= tot / i;
    -        }
    -        if i == 2 { i = 1; }
    -        i += 2;
    -    }
    -    if n > 1 {  tot -= tot / n; }
    -    return tot;
    -}
    -
    -public function main() returns error? {
    -    final int maxDigits = 14;
    -    getPerfectPowers(maxDigits);
    -    map achillesSet = getAchilles(1, 5); // enough for first 2 parts
    -    int[] achilles = achillesSet.keys().map(s => check int:fromString(s)).sort();
    -    io:println("First 50 Achilles numbers:");
    -    foreach int i in 0..<50 {
    -        string s = achilles[i].toString().padStart(4);
    -        io:print(s, " ");
    -        if (i + 1) % 10 == 0 { io:println(); }
    -    }
    -    io:println("\nFirst 30 strong Achilles numbers:");
    -    int[] strongAchilles = [];
    -    int count = 0;
    -    int n = 0;
    -    while count < 30 {
    -        int tot = totient(achilles[n]);
    -        if achillesSet.hasKey(tot.toString()) {
    -            strongAchilles.push(achilles[n]);
    -            count += 1;
    -        }
    -        n += 1;
    -    }
    -    foreach int j in 0..<30 {
    -        string t = strongAchilles[j].toString().padStart(5);
    -        io:print(t, " ");
    -        if (j + 1) % 10 == 0 { io:println(); }
    -    }
    -
    -    io:println("\nNumber of Achilles numbers with:");
    -    foreach int d in 2...maxDigits {
    -        int ac = getAchilles(d - 1, d).length();
    -        io:println(d.toString().padStart(2), " digits: ", ac);
    -    }
    -}
    diff --git a/Task/Achilles-numbers/C/achilles-numbers.c b/Task/Achilles-numbers/C/achilles-numbers.c
    deleted file mode 100644
    index f7ed293f8e..0000000000
    --- a/Task/Achilles-numbers/C/achilles-numbers.c
    +++ /dev/null
    @@ -1,105 +0,0 @@
    -#include 
    -#include 
    -#include 
    -#include 
    -
    -bool is_prime(int n) {
    -    if (n < 2) return false;
    -    if (n % 2 == 0 && n != 2) return false;
    -    for (int i = 3; i <= sqrt(n); i += 2) {
    -        if (n % i == 0) return false;
    -    }
    -    return true;
    -}
    -
    -int phi(int n) {
    -    int result = n;
    -    for (int p = 2; p * p <= n; p++) {
    -        if (n % p == 0) {
    -            while (n % p == 0) n /= p;
    -            result -= result / p;
    -        }
    -    }
    -    if (n > 1) result -= result / n;
    -    return result;
    -}
    -
    -bool is_powerful(int n) {
    -    int m = n;
    -    for (int p = 2; p * p <= n; p++) {
    -        if (m % p == 0) {
    -            int exp = 0;
    -            while (m % p == 0) {
    -                m /= p;
    -                exp++;
    -            }
    -            if (exp < 2) return false;
    -        }
    -    }
    -    if (m > 1) return false;
    -    return true;
    -}
    -
    -bool is_perfect_power(int n) {
    -    for (int k = 2; k <= log2(n); k++) {
    -        double root = pow(n, 1.0 / k);
    -        int r = round(root);
    -        if (pow(r, k) == n) return true;
    -    }
    -    return false;
    -}
    -
    -bool is_achilles(int n) {
    -    return is_powerful(n) && !is_perfect_power(n);
    -}
    -
    -int main() {
    -    int *achilles = NULL, *strong = NULL;
    -    int a_count = 0, s_count = 0;
    -    int digit_counts[7] = {0};
    -
    -    for (int n = 2; a_count < 50 || s_count < 50; n++) {
    -        if (is_achilles(n)) {
    -            if (a_count < 50){
    -                achilles = realloc(achilles, (a_count+1)*sizeof(int));
    -                achilles[a_count++] = n;
    -            }
    -
    -            int ph = phi(n);
    -            if (is_achilles(ph)) {
    -                if (s_count < 50){
    -                    strong = realloc(strong, (s_count+1)*sizeof(int));
    -                    strong[s_count++] = n;
    -                }
    -            }
    -
    -        }
    -    }
    -
    -    for (int n = 2; n <= 1000000; n++) {
    -        if (is_achilles(n)) {
    -            int digits = floor(log10(n)) + 1;
    -            if (digits >= 2 && digits <= 15) {
    -                digit_counts[digits]++;
    -            }
    -        }
    -    }
    -
    -    printf("First 50 Achilles numbers:\n");
    -    for (int i = 0; i < 50; i++) {
    -        printf("%d ", achilles[i]);
    -    }
    -    printf("\n\n");
    -
    -    printf("First 50 Strong Achilles numbers:\n");
    -    for (int i = 0; i < 50; i++) {
    -        printf("%d ", strong[i]);
    -    }
    -    printf("\n\n");
    -
    -    for (int d = 2; d <= 6; d++) {
    -        printf("Achilles numbers with %d digits: %d\n", d, digit_counts[d]);
    -    }
    -
    -    return 0;
    -}
    diff --git a/Task/Achilles-numbers/COBOL/achilles-numbers.cob b/Task/Achilles-numbers/COBOL/achilles-numbers.cob
    deleted file mode 100644
    index f5fdc87beb..0000000000
    --- a/Task/Achilles-numbers/COBOL/achilles-numbers.cob
    +++ /dev/null
    @@ -1,257 +0,0 @@
    -       IDENTIFICATION DIVISION.
    -       PROGRAM-ID. ACHILLES-NUMBERS.
    -
    -       DATA DIVISION.
    -       WORKING-STORAGE SECTION.
    -       01 CONSTANTS.
    -          05 MAX-LIMIT     PIC 9(10) COMP VALUE 100000000.
    -          05 MAX-LIMIT-SQR PIC 9(6) COMP VALUE 10000.
    -          05 MAX-LIMIT-CUB PIC 9(6) COMP VALUE 464.
    -
    -       01 PP-TEMP-DATA.
    -          05 PP-TEMP-COUNT PIC 9(6) COMP VALUE 0.
    -          05 PP-TEMP-TABLE.
    -             10 PP-TEMP OCCURS 1 TO 15000 TIMES DEPENDING ON PP-TEMP-COUNT
    -                            ASCENDING KEY IS PP-TEMP
    -                            PIC 9(10) COMP.
    -
    -       01 PP-FINAL-DATA.
    -          05 PP-COUNT      PIC 9(6) COMP VALUE 0.
    -          05 PP-TABLE.
    -             10 P-POWER    OCCURS 1 TO 15000 TIMES DEPENDING ON PP-COUNT
    -                            ASCENDING KEY IS P-POWER
    -                            INDEXED BY PP-IDX
    -                            PIC 9(10) COMP.
    -
    -       01 ACH-TEMP-DATA.
    -          05 ACH-TEMP-COUNT PIC 9(6) COMP VALUE 0.
    -          05 ACH-TEMP-TABLE.
    -             10 ACH-TEMP   OCCURS 1 TO 35000 TIMES DEPENDING ON ACH-TEMP-COUNT
    -                            ASCENDING KEY IS ACH-TEMP
    -                            PIC 9(10) COMP.
    -
    -       01 ACH-FINAL-DATA.
    -          05 ACH-COUNT     PIC 9(6) COMP VALUE 0.
    -          05 ACH-TABLE.
    -             10 ACHILLES   OCCURS 1 TO 15000 TIMES DEPENDING ON ACH-COUNT
    -                            ASCENDING KEY IS ACHILLES
    -                            INDEXED BY ACH-IDX
    -                            PIC 9(10) COMP.
    -
    -       01 LOOP-VARS.
    -          05 I             PIC 9(6) COMP.
    -          05 B             PIC 9(6) COMP.
    -          05 A             PIC 9(6) COMP.
    -          05 LAST-VAL      PIC 9(10) COMP.
    -
    -       01 CALC-VARS.
    -          05 P             PIC 9(18) COMP.
    -          05 B3            PIC 9(18) COMP.
    -          05 SEARCH-P      PIC 9(10) COMP.
    -
    -       01 TOT-VARS.
    -          05 TOTIENT-IN    PIC 9(10) COMP.
    -          05 TOTIENT-OUT   PIC 9(10) COMP.
    -          05 TOT-I         PIC 9(10) COMP.
    -          05 TOT-N         PIC 9(10) COMP.
    -          05 TOT-Q         PIC 9(10) COMP.
    -          05 TOT-R         PIC 9(10) COMP.
    -          05 SUB-VAL       PIC 9(10) COMP.
    -
    -       01 STRONG-ACH-VARS.
    -          05 FOUND-FLAG    PIC 9 VALUE 0.
    -          05 STRONG-COUNT  PIC 9(4) COMP VALUE 0.
    -          05 STRONG-ACH    OCCURS 30 TIMES PIC 9(10) COMP.
    -
    -       01 REPORT-VARS.
    -          05 DISP-4        PIC ZZZ9.
    -          05 DISP-5        PIC ZZZZ9.
    -          05 DISP-2        PIC Z9.
    -          05 DISP-NUM      PIC Z(9)9.
    -          05 FORMATTED-LINE PIC X(60) VALUE SPACES.
    -          05 LINE-POS      PIC 9(4) COMP VALUE 1.
    -          05 ROW-COUNT     PIC 9(4) COMP VALUE 0.
    -          05 DIGIT-COUNT   PIC 9(10) COMP.
    -          05 D             PIC 9(2) COMP.
    -          05 LOWER-BND     PIC 9(10) COMP.
    -          05 UPPER-BND     PIC 9(10) COMP.
    -
    -       PROCEDURE DIVISION.
    -       MAIN-PARA.
    -           PERFORM GENERATE-PERFECT-POWERS.
    -           PERFORM GENERATE-ACHILLES.
    -           PERFORM PRINT-FIRST-50.
    -           PERFORM PRINT-STRONG-30.
    -           PERFORM PRINT-DIGITS.
    -           STOP RUN.
    -
    -       GENERATE-PERFECT-POWERS.
    -           MOVE 0 TO PP-TEMP-COUNT.
    -           PERFORM VARYING I FROM 2 BY 1 UNTIL I > MAX-LIMIT-SQR
    -               COMPUTE P = I * I
    -               PERFORM UNTIL P >= MAX-LIMIT
    -                   ADD 1 TO PP-TEMP-COUNT
    -                   MOVE P TO PP-TEMP(PP-TEMP-COUNT)
    -                   COMPUTE P = P * I
    -               END-PERFORM
    -           END-PERFORM.
    -
    -           SORT PP-TEMP ON ASCENDING KEY PP-TEMP.
    -
    -           MOVE 0 TO PP-COUNT.
    -           MOVE 0 TO LAST-VAL.
    -           PERFORM VARYING I FROM 1 BY 1 UNTIL I > PP-TEMP-COUNT
    -               IF PP-TEMP(I) NOT = LAST-VAL THEN
    -                   ADD 1 TO PP-COUNT
    -                   MOVE PP-TEMP(I) TO P-POWER(PP-COUNT)
    -                   MOVE PP-TEMP(I) TO LAST-VAL
    -               END-IF
    -           END-PERFORM.
    -
    -       GENERATE-ACHILLES.
    -           MOVE 0 TO ACH-TEMP-COUNT.
    -           PERFORM VARYING B FROM 1 BY 1 UNTIL B > MAX-LIMIT-CUB
    -               COMPUTE B3 = B * B * B
    -               PERFORM VARYING A FROM 1 BY 1 UNTIL A > MAX-LIMIT-SQR
    -                   COMPUTE P = B3 * A * A
    -                   IF P >= MAX-LIMIT THEN
    -                       EXIT PERFORM
    -                   END-IF
    -
    -                   IF P > 1 THEN
    -                       MOVE P TO SEARCH-P
    -                       MOVE 0 TO FOUND-FLAG
    -                       SEARCH ALL P-POWER
    -                           AT END
    -                               MOVE 0 TO FOUND-FLAG
    -                           WHEN P-POWER(PP-IDX) = SEARCH-P
    -                               MOVE 1 TO FOUND-FLAG
    -                       END-SEARCH
    -
    -                       IF FOUND-FLAG = 0 THEN
    -                           ADD 1 TO ACH-TEMP-COUNT
    -                           MOVE P TO ACH-TEMP(ACH-TEMP-COUNT)
    -                       END-IF
    -                   END-IF
    -               END-PERFORM
    -           END-PERFORM.
    -
    -           SORT ACH-TEMP ON ASCENDING KEY ACH-TEMP.
    -
    -           MOVE 0 TO ACH-COUNT.
    -           MOVE 0 TO LAST-VAL.
    -           PERFORM VARYING I FROM 1 BY 1 UNTIL I > ACH-TEMP-COUNT
    -               IF ACH-TEMP(I) NOT = LAST-VAL THEN
    -                   ADD 1 TO ACH-COUNT
    -                   MOVE ACH-TEMP(I) TO ACHILLES(ACH-COUNT)
    -                   MOVE ACH-TEMP(I) TO LAST-VAL
    -               END-IF
    -           END-PERFORM.
    -
    -       CALC-TOTIENT.
    -           MOVE TOTIENT-IN TO TOT-N
    -           MOVE TOTIENT-IN TO TOTIENT-OUT
    -           MOVE 2 TO TOT-I
    -           PERFORM UNTIL TOT-I * TOT-I > TOT-N
    -               DIVIDE TOT-N BY TOT-I GIVING TOT-Q REMAINDER TOT-R
    -               IF TOT-R = 0 THEN
    -                   PERFORM UNTIL TOT-R NOT = 0
    -                       DIVIDE TOT-N BY TOT-I GIVING TOT-Q REMAINDER TOT-R
    -                       IF TOT-R = 0 THEN
    -                           MOVE TOT-Q TO TOT-N
    -                       END-IF
    -                   END-PERFORM
    -                   DIVIDE TOTIENT-OUT BY TOT-I GIVING SUB-VAL
    -                   SUBTRACT SUB-VAL FROM TOTIENT-OUT
    -               END-IF
    -               IF TOT-I = 2 THEN
    -                   MOVE 1 TO TOT-I
    -               END-IF
    -               ADD 2 TO TOT-I
    -           END-PERFORM.
    -           IF TOT-N > 1 THEN
    -               DIVIDE TOTIENT-OUT BY TOT-N GIVING SUB-VAL
    -               SUBTRACT SUB-VAL FROM TOTIENT-OUT
    -           END-IF.
    -
    -       PRINT-FIRST-50.
    -           DISPLAY "First 50 Achilles numbers:".
    -           MOVE SPACES TO FORMATTED-LINE.
    -           MOVE 1 TO LINE-POS.
    -           MOVE 0 TO ROW-COUNT.
    -           PERFORM VARYING I FROM 1 BY 1 UNTIL I > 50
    -               MOVE ACHILLES(I) TO DISP-4
    -               STRING DISP-4 " " DELIMITED BY SIZE
    -                      INTO FORMATTED-LINE WITH POINTER LINE-POS
    -               ADD 1 TO ROW-COUNT
    -               IF ROW-COUNT = 10 THEN
    -                   DISPLAY FORMATTED-LINE(1:LINE-POS - 1)
    -                   MOVE SPACES TO FORMATTED-LINE
    -                   MOVE 1 TO LINE-POS
    -                   MOVE 0 TO ROW-COUNT
    -               END-IF
    -           END-PERFORM.
    -
    -       PRINT-STRONG-30.
    -           DISPLAY " ".
    -           DISPLAY "First 30 strong Achilles numbers:".
    -           MOVE 0 TO STRONG-COUNT.
    -           PERFORM VARYING I FROM 1 BY 1 UNTIL STRONG-COUNT >= 30 OR I > ACH-COUNT
    -               MOVE ACHILLES(I) TO TOTIENT-IN
    -               PERFORM CALC-TOTIENT
    -
    -               MOVE TOTIENT-OUT TO SEARCH-P
    -               MOVE 0 TO FOUND-FLAG
    -               SEARCH ALL ACHILLES
    -                   AT END
    -                       MOVE 0 TO FOUND-FLAG
    -                   WHEN ACHILLES(ACH-IDX) = SEARCH-P
    -                       MOVE 1 TO FOUND-FLAG
    -               END-SEARCH
    -
    -               IF FOUND-FLAG = 1 THEN
    -                   ADD 1 TO STRONG-COUNT
    -                   MOVE ACHILLES(I) TO STRONG-ACH(STRONG-COUNT)
    -               END-IF
    -           END-PERFORM.
    -
    -           MOVE SPACES TO FORMATTED-LINE.
    -           MOVE 1 TO LINE-POS.
    -           MOVE 0 TO ROW-COUNT.
    -           PERFORM VARYING I FROM 1 BY 1 UNTIL I > 30
    -               MOVE STRONG-ACH(I) TO DISP-5
    -               STRING DISP-5 " " DELIMITED BY SIZE
    -                      INTO FORMATTED-LINE WITH POINTER LINE-POS
    -               ADD 1 TO ROW-COUNT
    -               IF ROW-COUNT = 10 THEN
    -                   DISPLAY FORMATTED-LINE(1:LINE-POS - 1)
    -                   MOVE SPACES TO FORMATTED-LINE
    -                   MOVE 1 TO LINE-POS
    -                   MOVE 0 TO ROW-COUNT
    -               END-IF
    -           END-PERFORM.
    -
    -       PRINT-DIGITS.
    -           DISPLAY " ".
    -           DISPLAY "Number of Achilles numbers with:".
    -           MOVE 10 TO LOWER-BND.
    -           COMPUTE UPPER-BND = 100.
    -           PERFORM VARYING D FROM 2 BY 1 UNTIL D > 8
    -               MOVE 0 TO DIGIT-COUNT
    -               PERFORM VARYING I FROM 1 BY 1 UNTIL I > ACH-COUNT
    -                   IF ACHILLES(I) >= UPPER-BND THEN
    -                       EXIT PERFORM
    -                   END-IF
    -                   IF ACHILLES(I) >= LOWER-BND THEN
    -                       ADD 1 TO DIGIT-COUNT
    -                   END-IF
    -               END-PERFORM
    -
    -               MOVE D TO DISP-2
    -               MOVE DIGIT-COUNT TO DISP-NUM
    -
    -               DISPLAY DISP-2 " digits: " FUNCTION TRIM(DISP-NUM)
    -
    -               MOVE UPPER-BND TO LOWER-BND
    -               COMPUTE UPPER-BND = UPPER-BND * 10
    -           END-PERFORM.
    diff --git a/Task/Achilles-numbers/Crystal/achilles-numbers.cr b/Task/Achilles-numbers/Crystal/achilles-numbers.cr
    deleted file mode 100644
    index 2cb66173f9..0000000000
    --- a/Task/Achilles-numbers/Crystal/achilles-numbers.cr
    +++ /dev/null
    @@ -1,86 +0,0 @@
    -struct Int
    -  def totient
    -    n = self
    -    return 0 if n < 1
    -    tot = n
    -    i = typeof(n).new(2)
    -    while i*i <= n
    -      if n % i == 0
    -        while n % i == 0
    -          n //= i
    -        end
    -        tot -= tot // i
    -      end
    -      if i == 2; i = 1 end
    -      i += 2
    -    end
    -    if n > 1
    -      tot -= tot // n
    -    end
    -    tot
    -  end
    -end
    -
    -def get_perfect_powers (max_exp)
    -  upper = 10_u64 ** max_exp
    -  pps = Set(UInt64).new
    -  (2_u64 .. Math.isqrt(upper)).each do |i|
    -    p = i
    -    while (p *= i) < upper
    -      pps << p
    -    end
    -  end
    -  pps
    -end
    -
    -def get_achilles (min_exp, max_exp, pps)
    -  lower = 10_u64 ** min_exp
    -  upper = 10_u64 ** max_exp
    -  achilles = Set(UInt64).new
    -  (1_u64 .. Math.cbrt(upper).to_u64).each do |b|
    -    b3 = b * b * b
    -    (1_u64 .. Math.isqrt(upper)).each do |a|
    -      p = b3 * a * a
    -      break if p >= upper
    -      if p >= lower
    -        achilles << p unless p.in? pps
    -      end
    -    end
    -  end
    -  achilles
    -end
    -
    -def tprint (fmt, seq, row_sz)
    -  seq.in_slices_of(row_sz).each do |slice|
    -    puts slice.map {|elt| fmt % { elt } }.join(" ")
    -  end
    -end
    -
    -max_digits = 12
    -pps = get_perfect_powers(max_digits)
    -
    -achilles_set = get_achilles(1, 5, pps)
    -achilles = achilles_set.to_a.sort!
    -
    -puts "First 50 Achilles numbers:"
    -tprint("%4d", achilles.first(50), 10)
    -
    -puts "\nFirst 30 strong Achilles numbers:"
    -strong_achilles = [] of UInt64
    -count = 0
    -n = 0
    -while count < 30
    -  tot = achilles[n].totient
    -  if tot.in? achilles_set
    -    strong_achilles << achilles[n]
    -    count += 1
    -  end
    -  n += 1
    -end
    -tprint("%5d", strong_achilles, 10)
    -
    -puts "\nNumber of Achilles numbers with:"
    -(2..max_digits).each do |d|
    -  ac = get_achilles(d-1, d, pps).size
    -  puts "%2d digits: %d" % { d, ac }
    -end
    diff --git a/Task/Achilles-numbers/Delphi/achilles-numbers.pas b/Task/Achilles-numbers/Delphi/achilles-numbers.delphi
    similarity index 100%
    rename from Task/Achilles-numbers/Delphi/achilles-numbers.pas
    rename to Task/Achilles-numbers/Delphi/achilles-numbers.delphi
    diff --git a/Task/Achilles-numbers/EasyLang/achilles-numbers.easy b/Task/Achilles-numbers/EasyLang/achilles-numbers.easy
    index c84b968a4a..ec0935dde9 100644
    --- a/Task/Achilles-numbers/EasyLang/achilles-numbers.easy
    +++ b/Task/Achilles-numbers/EasyLang/achilles-numbers.easy
    @@ -1,41 +1,56 @@
    -fastfunc gcd n d .
    -   if d = 0 : return n
    +func gcd n d .
    +   if d = 0
    +      return n
    +   .
        return gcd d (n mod d)
     .
    -fastfunc totient n .
    -   m = 1
    -   while m <= n
    -      if gcd m n = 1 : tot += 1
    -      m += 1
    +func totient n .
    +   for m = 1 to n
    +      if gcd m n = 1
    +         tot += 1
    +      .
        .
        return tot
     .
    -fastfunc isPowerful m .
    +func isPowerful m .
        n = m
        f = 2
        l = sqrt m
    -   if m <= 1 : return 0
    +   if m <= 1
    +      return 0
    +   .
        while 1 = 1
    +      q = n div f
           if n mod f = 0
    -         if m mod (f * f) <> 0 : return 0
    -         n = n div f
    -         if f > n : return 1
    +         if m mod (f * f) <> 0
    +            return 0
    +         .
    +         n = q
    +         if f > n
    +            return 1
    +         .
           else
              f += 1
              if f > l
    -            if m mod (n * n) <> 0 : return 0
    +            if m mod (n * n) <> 0
    +               return 0
    +            .
                 return 1
              .
           .
        .
     .
    -fastfunc isAchilles n .
    -   if isPowerful n = 0 : return 0
    +func isAchilles n .
    +   if isPowerful n = 0
    +      return 0
    +   .
        m = 2
        a = m * m
        repeat
           repeat
    -         if a = n : return 0
    +         if a = n
    +            return 0
    +         .
              a *= m
              until a > n
           .
    @@ -47,34 +62,38 @@ fastfunc isAchilles n .
     .
     print "First 50 Achilles numbers:"
     n = 1
    -while cnt < 50
    +repeat
        if isAchilles n = 1
           write n & " "
    -      cnt += 1
    -      if cnt mod 10 = 0 : print ""
    +      num += 1
        .
        n += 1
    +   until num >= 50
     .
     print ""
    +print ""
     print "First 20 strong Achilles numbers:"
    -cnt = 0
    +num = 0
     n = 1
    -while cnt < 20
    +repeat
        if isAchilles n = 1 and isAchilles totient n = 1
           write n & " "
    -      cnt += 1
    -      if cnt mod 10 = 0 : print ""
    +      num += 1
        .
        n += 1
    +   until num >= 20
     .
     print ""
    +print ""
     print "Number of Achilles numbers with 2 to 5 digits:"
     a = 10
     b = 100
     for i = 2 to 5
        num = 0
        for n = a to b - 1
    -      num += isAchilles n
    +      if isAchilles n = 1
    +         num += 1
    +      .
        .
        write num & " "
        a = b
    diff --git a/Task/Achilles-numbers/FutureBasic/achilles-numbers.basic b/Task/Achilles-numbers/FutureBasic/achilles-numbers.basic
    deleted file mode 100644
    index 194d6b3e21..0000000000
    --- a/Task/Achilles-numbers/FutureBasic/achilles-numbers.basic
    +++ /dev/null
    @@ -1,90 +0,0 @@
    -NSInteger local fn GCD( n as NSInteger, d as NSInteger )
    -  if ( d == 0 ) then return n else return fn GCD( d, n % d )
    -end fn = 0
    -
    -NSInteger local fn Totient( n as NSInteger )
    -  NSInteger tot = 0
    -  for NSInteger m = 1 to n
    -    if fn GCD( m, n ) = 1 then tot++
    -  next
    -  return tot
    -end fn = 0
    -
    -BOOL local fn IsPowerful( m as NSInteger )
    -  int n = m
    -  int f = 2
    -  double l = sqr(m)
    -
    -  if m <= 1 then return NO
    -  while ( YES )
    -    NSInteger q = n / f
    -    if ( n % f ) == 0
    -      if ( m % (f * f) ) then return NO
    -      n = q
    -      if f > n then exit while
    -    else
    -      f++
    -      if ( f > l )
    -        if ( m % (n * n) ) then return NO
    -        exit while
    -      end if
    -    end if
    -  wend
    -end fn = YES
    -
    -BOOL local fn IsAchilles( n as NSInteger )
    -  if fn IsPowerful(n) == NO then return NO
    -  NSInteger m = 2
    -  NSInteger a = m * m
    -  do
    -    do
    -      if a == n then return NO
    -      a *= m
    -    until ( a > n )
    -    m++
    -    a = m * m
    -  until ( a > n )
    -end fn = YES
    -
    -local fn AchillesNumbers
    -  print "First 50 Achilles numbers:"
    -  NSInteger num = 0
    -  NSInteger n = 1
    -
    -  CFTimeInterval t : t = fn CACurrentMediaTime
    -  do
    -    if fn IsAchilles( n )
    -      printf @"%4d \b", n
    -      num++
    -      if ( num % 10 ) != 0 then printf @" \b" else print
    -    end if
    -    n++
    -  until ( num >= 50 )
    -
    -  printf @"\n\nFirst 20 strong Achilles numbers:"
    -  num = 0
    -  n = 1
    -  do
    -    if fn IsAchilles(n) && fn IsAchilles( fn Totient(n) )
    -      printf @"%5d \b", n
    -      num++
    -      if ( num % 5 ) != 0 then printf @" \b" else print
    -    end if
    -    n++
    -  until ( num >= 20 )
    -
    -  printf @"\n"
    -  for NSInteger i = 2 to 6
    -    NSInteger inicio = fix( 10.0 ^ (i-1) )
    -    num = 0
    -    for n = inicio to inicio * 10 -1
    -      if fn IsAchilles(n) then num++
    -    next
    -    printf @"Achilles numbers with %d digits: %d", i, num
    -  next
    -  printf @"\nCompute time: %.3f ms", (fn CACurrentMediaTime - t ) * 1000
    -end fn
    -
    -fn AchillesNumbers
    -
    -HandleEvents
    diff --git a/Task/Achilles-numbers/JavaScript/achilles-numbers.js b/Task/Achilles-numbers/JavaScript/achilles-numbers.js
    deleted file mode 100644
    index 3f0113554c..0000000000
    --- a/Task/Achilles-numbers/JavaScript/achilles-numbers.js
    +++ /dev/null
    @@ -1,129 +0,0 @@
    -class AchillesNumbers {
    -    constructor() {
    -        this.pps = new Map(); // Stores perfect powers
    -    }
    -
    -    // Euler's totient function
    -    totient(n) {
    -        let tot = n;
    -        let i = 2;
    -        while (i * i <= n) {
    -            if (n % i === 0) {
    -                // Remove all factors of i
    -                while (n % i === 0) {
    -                    n = Math.floor(n / i);
    -                }
    -                tot -= Math.floor(tot / i);
    -            }
    -            // Handle even/odd step correctly
    -            if (i === 2) {
    -                i = 1;
    -            }
    -            i += 2;
    -        }
    -        // If remaining n is a prime
    -        if (n > 1) {
    -            tot -= Math.floor(tot / n);
    -        }
    -        return tot;
    -    }
    -
    -    // Generate all perfect powers up to 10^maxExp
    -    getPerfectPowers(maxExp) {
    -        const upper = Math.pow(10, maxExp);
    -        const sqrtUpper = Math.floor(Math.sqrt(upper));
    -
    -        for (let i = 2; i <= sqrtUpper; i++) {
    -            let p = i;
    -            while (true) {
    -                p *= i;
    -                if (p >= upper) break;
    -                this.pps.set(Math.floor(p), true);
    -            }
    -        }
    -    }
    -
    -    // Generate all Achilles numbers between 10^minExp and 10^maxExp
    -    getAchilles(minExp, maxExp) {
    -        const lower = Math.pow(10, minExp);
    -        const upper = Math.pow(10, maxExp);
    -        const achilles = new Map();
    -
    -        const cbrtUpper = Math.floor(Math.cbrt(upper));
    -        for (let b = 1; b <= cbrtUpper; b++) {
    -            const b3 = b * b * b;
    -            const sqrtUpper = Math.floor(Math.sqrt(upper));
    -
    -            for (let a = 1; a <= sqrtUpper; a++) {
    -                const p = b3 * a * a;
    -                if (p >= upper) break;
    -
    -                if (p >= lower) {
    -                    if (!this.pps.has(p)) {
    -                        achilles.set(p, true);
    -                    }
    -                }
    -            }
    -        }
    -        return achilles;
    -    }
    -
    -    static main() {
    -        const an = new AchillesNumbers();
    -        const maxDigits = 8;
    -
    -        an.getPerfectPowers(maxDigits);
    -        const achillesSet = an.getAchilles(1, 5);
    -
    -        // Convert map keys to sorted array
    -        const achilles = Array.from(achillesSet.keys()).sort((a, b) => a - b);
    -
    -        // Print first 50 Achilles numbers
    -        console.log("First 50 Achilles numbers:");
    -        let output = "";
    -        for (let i = 0; i < 50; i++) {
    -            output += `${achilles[i].toString().padStart(4)} `;
    -            if ((i + 1) % 10 === 0) {
    -                console.log(output);
    -                output = "";
    -            }
    -        }
    -        if (output) console.log(output);
    -
    -        // Print first 30 strong Achilles numbers
    -        console.log("\nFirst 30 strong Achilles numbers:");
    -        const strongAchilles = [];
    -        let count = 0;
    -        let idx = 0;
    -
    -        while (count < 30 && idx < achilles.length) {
    -            const n = achilles[idx];
    -            const tot = an.totient(n);
    -            if (achillesSet.has(tot)) {
    -                strongAchilles.push(n);
    -                count++;
    -            }
    -            idx++;
    -        }
    -
    -        output = "";
    -        for (let i = 0; i < 30; i++) {
    -            output += `${strongAchilles[i].toString().padStart(5)} `;
    -            if ((i + 1) % 10 === 0) {
    -                console.log(output);
    -                output = "";
    -            }
    -        }
    -        if (output) console.log(output);
    -
    -        // Print counts per digit length
    -        console.log("\nNumber of Achilles numbers with:");
    -        for (let d = 2; d <= maxDigits; d++) {
    -            const ac = an.getAchilles(d - 1, d).size;
    -            console.log(`${d.toString().padStart(2)} digits: ${ac}`);
    -        }
    -    }
    -}
    -
    -// Execute the main method
    -AchillesNumbers.main();
    diff --git a/Task/Achilles-numbers/Julia/achilles-numbers.jl b/Task/Achilles-numbers/Julia/achilles-numbers.julia
    similarity index 100%
    rename from Task/Achilles-numbers/Julia/achilles-numbers.jl
    rename to Task/Achilles-numbers/Julia/achilles-numbers.julia
    diff --git a/Task/Achilles-numbers/PARI-GP/achilles-numbers.parigp b/Task/Achilles-numbers/PARI-GP/achilles-numbers.parigp
    deleted file mode 100644
    index 44391a9b19..0000000000
    --- a/Task/Achilles-numbers/PARI-GP/achilles-numbers.parigp
    +++ /dev/null
    @@ -1,8 +0,0 @@
    -is(n,f=factor(n))=gcd(f[,2])==1 && vecmin(f[,2])>1
    -first(n)=my(v=List()); forfactored(k=1,10^9, if(is(k[1],k[2]), listput(v,k[1]); if(#v==n, return(Vec(v)))))
    -firstStrong(n)=my(v=List()); forfactored(k=1,10^9, if(is(k[1],k[2]) && is(eulerphi(k)), listput(v,k[1]); if(#v==n, return(Vec(v)))))
    -countBetween(a,b)=my(s); forfactored(k=a,b, if(is(k[1],k[2]), s++)); s
    -countDigits(n)=countBetween(10^(n-1),10^n-1)
    -first(50)
    -firstStrong(20)
    -apply(countDigits, [2..5])
    diff --git a/Task/Achilles-numbers/Phix/achilles-numbers.phix b/Task/Achilles-numbers/Phix/achilles-numbers.phix
    index 3ebdef5c6e..933e7e375a 100644
    --- a/Task/Achilles-numbers/Phix/achilles-numbers.phix
    +++ b/Task/Achilles-numbers/Phix/achilles-numbers.phix
    @@ -1,67 +1,62 @@
    -with javascript_semantics
    -requires("1.0.2") -- [join_by(fmt)]
    -atom t0 = time()
    -constant maxDigits = iff(platform()=JS?10:12)
    -integer pps = new_dict()
    +(phixonline)-->
    + with javascript_semantics
    + requires("1.0.2") -- [join_by(fmt)]
    + atom t0 = time()
    + constant maxDigits = iff(platform()=JS?10:12)
    + integer pps = new_dict()
     
    -procedure getPerfectPowers(integer maxExp)
    -    atom hi = power(10, maxExp), t1 = time()+1
    -    integer imax = floor(sqrt(hi))
    -    for i=2 to imax do
    -        atom p = i
    -        while true do
    -            p *= i
    -            if p>=hi then exit end if
    -            setd(p,true,pps)
    -        end while
    -        if time()>t1 then
    -            progress("getting perfect powers, %d/%d\r",{i,imax})
    -            t1 = time()+1
    -        end if
    -    end for
    -    progress("")
    -end procedure
    + procedure getPerfectPowers(integer maxExp)
    +     atom hi = power(10, maxExp)
    +     integer imax = floor(sqrt(hi))
    +     for i=2 to imax do
    +         atom p = i
    +         while true do
    +             p *= i
    +             if p>=hi then exit end if
    +             setd(p,true,pps)
    +         end while
    +     end for
    + end procedure
     
    -function get_achilles(integer minExp, maxExp)
    -    atom lo10 = power(10,minExp),
    -         hi10 = power(10,maxExp)
    -    integer bmax = floor(power(hi10,1/3)),
    -            amax = floor(sqrt(hi10))
    -    sequence achilles = {}
    -    for b=2 to bmax do
    -        atom b3 = b * b * b
    -        for a=2 to amax do
    -            atom p = b3 * a * a
    -            if p>=hi10 then exit end if
    -            if p>=lo10 then
    -                integer node = getd_index(p,pps)
    -                if node=NULL then
    -                    achilles &= p
    -                end if
    -            end if
    -        end for
    -    end for
    -    achilles = unique(achilles)
    -    return achilles
    -end function
    + function get_achilles(integer minExp, maxExp)
    +     atom lo10 = power(10,minExp),
    +          hi10 = power(10,maxExp)
    +     integer bmax = floor(power(hi10,1/3)),
    +             amax = floor(sqrt(hi10))
    +     sequence achilles = {}
    +     for b=2 to bmax do
    +         atom b3 = b * b * b
    +         for a=2 to amax do
    +             atom p = b3 * a * a
    +             if p>=hi10 then exit end if
    +             if p>=lo10 then
    +                 integer node = getd_index(p,pps)
    +                 if node=NULL then
    +                     achilles &= p
    +                 end if
    +             end if
    +         end for
    +     end for
    +     achilles = unique(achilles)
    +     return achilles
    + end function
     
    -getPerfectPowers(maxDigits)
    + getPerfectPowers(maxDigits)
    + sequence achilles = get_achilles(1,5)
     
    -sequence achilles = get_achilles(1,5),
    -         a = join_by(achilles[1..50],1,10," ",fmt:="%4d")
    -printf(1,"First 50 Achilles numbers:\n%s\n",{a})
    + function strong_achilles(integer n)
    +     integer totient = sum(sq_eq(apply(true,gcd,{tagset(n),n}),1))
    +     return find(totient,achilles)
    + end function
     
    -function strong_achilles(integer n)
    -    integer totient = sum(sq_eq(apply(true,gcd,{tagset(n),n}),1))
    -    return find(totient,achilles)
    -end function
    + sequence a = join_by(achilles[1..50],1,10," ",fmt:="%4d"),
    +          sa = filter(achilles,strong_achilles)[1..30],
    +          ssa = join_by(sa,1,10," ",fmt:="%5d")
     
    -progress("filtering strong achilles...")
    -sequence sa = filter(achilles,strong_achilles)[1..30],
    -         ssa = join_by(sa,1,10," ",fmt:="%5d")
    -progress("")
    -printf(1,"First 30 strong Achilles numbers:\n%s\n",{ssa})
    -for d=2 to maxDigits do
    -    printf(1,"Achilles numbers with %d digits:%d\n",{d,length(get_achilles(d-1,d))})
    -end for
    -?elapsed(time()-t0)
    + printf(1,"First 50 Achilles numbers:\n%s\n",{a})
    + printf(1,"First 30 strong Achilles numbers:\n%s\n",{ssa})
    + for d=2 to maxDigits do
    +     printf(1,"Achilles numbers with %d digits:%d\n",{d,length(get_achilles(d-1,d))})
    + end for
    + ?elapsed(time()-t0)
    +
    +(phixonline)-->
      function ack(integer m, integer n)
          if m=0 then
              return n+1
    diff --git a/Task/Ackermann-function/Phix/ackermann-function-2.phix b/Task/Ackermann-function/Phix/ackermann-function-2.phix
    index 3c54091afd..6080743529 100644
    --- a/Task/Ackermann-function/Phix/ackermann-function-2.phix
    +++ b/Task/Ackermann-function/Phix/ackermann-function-2.phix
    @@ -1,4 +1,4 @@
    -(phixonline)--(notpygments)-->
    +(phixonline)-->
      -- demo\rosetta\Ackermann.exw
      include mpfr.e
     
    diff --git a/Task/Ackermann-function/Pluto/ackermann-function.pluto b/Task/Ackermann-function/Pluto/ackermann-function.pluto
    deleted file mode 100644
    index 91075937c7..0000000000
    --- a/Task/Ackermann-function/Pluto/ackermann-function.pluto
    +++ /dev/null
    @@ -1,13 +0,0 @@
    -function ack(m,n)
    -  if m==0 then
    -    return n+1
    -  elseif n == 0 then
    -    return ack(m-1,1)
    -  else return ack(m-1,ack(m,n-1)) end
    -end
    -
    -for i = 0,3 do
    -   for j = 0,8 do
    -      print($"A({i},{j})={ack(i,j)}")
    -   end
    -end
    diff --git a/Task/Ackermann-function/PowerShell/ackermann-function-1.ps1 b/Task/Ackermann-function/PowerShell/ackermann-function-1.psh
    similarity index 100%
    rename from Task/Ackermann-function/PowerShell/ackermann-function-1.ps1
    rename to Task/Ackermann-function/PowerShell/ackermann-function-1.psh
    diff --git a/Task/Ackermann-function/PowerShell/ackermann-function-2.ps1 b/Task/Ackermann-function/PowerShell/ackermann-function-2.psh
    similarity index 100%
    rename from Task/Ackermann-function/PowerShell/ackermann-function-2.ps1
    rename to Task/Ackermann-function/PowerShell/ackermann-function-2.psh
    diff --git a/Task/Ackermann-function/PowerShell/ackermann-function-3.ps1 b/Task/Ackermann-function/PowerShell/ackermann-function-3.psh
    similarity index 100%
    rename from Task/Ackermann-function/PowerShell/ackermann-function-3.ps1
    rename to Task/Ackermann-function/PowerShell/ackermann-function-3.psh
    diff --git a/Task/Ackermann-function/PowerShell/ackermann-function-4.ps1 b/Task/Ackermann-function/PowerShell/ackermann-function-4.psh
    similarity index 100%
    rename from Task/Ackermann-function/PowerShell/ackermann-function-4.ps1
    rename to Task/Ackermann-function/PowerShell/ackermann-function-4.psh
    diff --git a/Task/Ackermann-function/Python/ackermann-function-2.py b/Task/Ackermann-function/Python/ackermann-function-2.py
    index b52f4e5e1e..a2968422e0 100644
    --- a/Task/Ackermann-function/Python/ackermann-function-2.py
    +++ b/Task/Ackermann-function/Python/ackermann-function-2.py
    @@ -1,6 +1,6 @@
    -from functools import cache
    +from functools import lru_cache
     
    -@cache
    +@lru_cache(None)
     def ack2(M, N):
         if M == 0:
             return N + 1
    diff --git a/Task/Ackermann-function/REXX/ackermann-function-1.rexx b/Task/Ackermann-function/REXX/ackermann-function-1.rexx
    new file mode 100644
    index 0000000000..4166968a81
    --- /dev/null
    +++ b/Task/Ackermann-function/REXX/ackermann-function-1.rexx
    @@ -0,0 +1,25 @@
    +/*REXX program  calculates and displays  some values for the  Ackermann function.       */
    +            /*╔════════════════════════════════════════════════════════════════════════╗
    +              ║  Note:  the Ackermann function  (as implemented here)  utilizes deep   ║
    +              ║         recursive and is limited by the largest number that can have   ║
    +              ║         "1"  (unity) added to a number  (successfully and accurately). ║
    +              ╚════════════════════════════════════════════════════════════════════════╝*/
    +high=24
    +         do     j=0  to 3;                    say
    +             do k=0  to high % (max(1, j))
    +             call tell_Ack  j, k
    +             end   /*k*/
    +         end       /*j*/
    +exit                                             /*stick a fork in it,  we're all done. */
    +/*──────────────────────────────────────────────────────────────────────────────────────*/
    +tell_Ack:  parse arg mm,nn;   calls=0            /*display an echo message to terminal. */
    +           #=right(nn,length(high))
    +           say 'Ackermann('mm", "#')='right(ackermann(mm, nn), high),
    +                                      left('', 12)     'calls='right(calls, high)
    +           return
    +/*──────────────────────────────────────────────────────────────────────────────────────*/
    +ackermann: procedure expose calls                /*compute value of Ackermann function. */
    +           parse arg m,n;   calls=calls+1
    +           if m==0  then return n+1
    +           if n==0  then return ackermann(m-1, 1)
    +                         return ackermann(m-1, ackermann(m, n-1) )
    diff --git a/Task/Ackermann-function/REXX/ackermann-function-2.rexx b/Task/Ackermann-function/REXX/ackermann-function-2.rexx
    new file mode 100644
    index 0000000000..d489d6c82a
    --- /dev/null
    +++ b/Task/Ackermann-function/REXX/ackermann-function-2.rexx
    @@ -0,0 +1,21 @@
    +/*REXX program  calculates and displays  some values for the  Ackermann function.       */
    +high=24
    +         do     j=0  to 3;                    say
    +             do k=0  to high % (max(1, j))
    +             call tell_Ack  j, k
    +             end   /*k*/
    +         end       /*j*/
    +exit                                             /*stick a fork in it,  we're all done. */
    +/*──────────────────────────────────────────────────────────────────────────────────────*/
    +tell_Ack:  parse arg mm,nn;   calls=0            /*display an echo message to terminal. */
    +           #=right(nn,length(high))
    +           say 'Ackermann('mm", "#')='right(ackermann(mm, nn), high),
    +                                      left('', 12)     'calls='right(calls, high)
    +           return
    +/*──────────────────────────────────────────────────────────────────────────────────────*/
    +ackermann: procedure expose calls                /*compute value of Ackermann function. */
    +           parse arg m,n;   calls=calls+1
    +           if m==0  then return n + 1
    +           if n==0  then return ackermann(m-1, 1)
    +           if m==2  then return n + 3 + n
    +                         return ackermann(m-1, ackermann(m, n-1) )
    diff --git a/Task/Ackermann-function/REXX/ackermann-function-3.rexx b/Task/Ackermann-function/REXX/ackermann-function-3.rexx
    new file mode 100644
    index 0000000000..46a20892d0
    --- /dev/null
    +++ b/Task/Ackermann-function/REXX/ackermann-function-3.rexx
    @@ -0,0 +1,36 @@
    +/*REXX program  calculates and displays  some values for the  Ackermann function.       */
    +numeric digits 100                               /*use up to 100 decimal digit integers.*/
    +                       /*╔═════════════════════════════════════════════════════════════╗
    +                         ║ When REXX raises a number to an integer power  (via the  ** ║
    +                         ║ operator,  the power can be positive, zero, or negative).   ║
    +                         ║ Ackermann(5,1)   is a bit impractical to calculate.         ║
    +                         ╚═════════════════════════════════════════════════════════════╝*/
    +high=24
    +         do     j=0  to 4;                   say
    +             do k=0  to high % (max(1, j))
    +             call tell_Ack  j, k
    +             if j==4 & k==2  then leave          /*there's no sense in going overboard. */
    +             end   /*k*/
    +         end       /*j*/
    +exit                                             /*stick a fork in it,  we're all done. */
    +/*──────────────────────────────────────────────────────────────────────────────────────*/
    +tell_Ack:  parse arg mm,nn;   calls=0            /*display an echo message to terminal. */
    +           #=right(nn,length(high))
    +           say 'Ackermann('mm", "#')='right(ackermann(mm, nn), high),
    +                                      left('', 12)     'calls='right(calls, high)
    +           return
    +/*──────────────────────────────────────────────────────────────────────────────────────*/
    +ackermann: procedure expose calls                /*compute value of Ackermann function. */
    +           parse arg m,n;   calls=calls+1
    +           if m==0  then return n + 1
    +           if m==1  then return n + 2
    +           if m==2  then return n + 3 + n
    +           if m==3  then return 2**(n+3) - 3
    +           if m==4  then do; #=2                 /* [↓]  Ugh!  ···  and still more ughs.*/
    +                                      do (n+3)-1 /*This is where the heavy lifting is.  */
    +                                      #=2**#
    +                                      end
    +                             return #-3
    +                         end
    +           if n==0  then return ackermann(m-1, 1)
    +                         return ackermann(m-1, ackermann(m, n-1) )
    diff --git a/Task/Ackermann-function/REXX/ackermann-function.rexx b/Task/Ackermann-function/REXX/ackermann-function.rexx
    deleted file mode 100644
    index 5ef80aa39d..0000000000
    --- a/Task/Ackermann-function/REXX/ackermann-function.rexx
    +++ /dev/null
    @@ -1,83 +0,0 @@
    --- 27 Oct 2025
    -include Setting
    -numeric digits 310000
    -
    -say 'ACKERMANN FUNCTION'
    -say version
    -say
    -call Ackermann1
    -call Ackermann2
    -exit
    -
    -Ackermann1:
    -procedure expose glob.
    -say 'Using recursion...'
    -do i=0 to 3
    -   do j=0 to 10
    -      say 'Ackermann('i','j')' '=' Acker1(i,j) Elaps('r')'s'
    -   end
    -end
    -say
    -return
    -
    -Acker1:
    -procedure
    -arg xx,yy
    -select
    -   when xx = 0 then
    -      return yy+1
    -   when yy = 0 then
    -      return Acker1(xx-1,1)
    -   otherwise
    -      return Acker1(xx-1,Acker1(xx,yy-1))
    -end
    -
    -Ackermann2:
    -procedure expose glob.
    -say 'Using closed formulas...'
    -do i=0 to 3
    -   do j=0 to 10
    -      say 'Ackermann('i','j')' '=' Acker2(i,j) Elaps('r')'s'
    -   end
    -end
    -say 'Ackermann(3,100) =' Acker2(3,100) Elaps('r')'s'
    -say 'Ackermann(3,1000) has' Length(Acker2(3,1000)) 'digits' Elaps('r')'s'
    -say 'Ackermann(3,10000) has' Length(Acker2(3,10000)) 'digits' Elaps('r')'s'
    -say 'Ackermann(3,100000) has' Length(Acker2(3,100000)) 'digits' Elaps('r')'s'
    -say 'Ackermann(3,1000000) has' Length(Acker2(3,1000000)) 'digits' Elaps('r')'s'
    -say 'Ackermann(4,0) =' Acker2(4,0) Elaps('r')'s'
    -say 'Ackermann(4,1) =' Acker2(4,1) Elaps('r')'s'
    -say 'Ackermann(4,2) has' Length(Acker2(4,2)) 'digits' Elaps('r')'s'
    -return
    -
    -Acker2:
    -procedure
    -arg xx,yy
    -select
    -   when xx=0 then
    -      rr=yy+1
    -   when xx=1 then
    -      rr=yy+2
    -   when xx=2 then
    -      rr=yy+yy+3
    -   when xx=3 then
    -      rr=2**(yy+3)-3
    -   when xx=4 then
    -      select
    -         when yy=0 then
    -            rr=2**(2**2)-3
    -         when yy=1 then
    -            rr=2**(2**(2**2))-3
    -         when yy=2 then
    -            rr=2**(2**(2**(2**2)))-3
    -         otherwise
    -            rr=0
    -      end
    -   otherwise
    -      rr=0
    -end
    -return rr
    -
    -include Abend
    --- Elaps
    -include Timer
    diff --git a/Task/Ackermann-function/ReScript/ackermann-function.res b/Task/Ackermann-function/ReScript/ackermann-function.re
    similarity index 100%
    rename from Task/Ackermann-function/ReScript/ackermann-function.res
    rename to Task/Ackermann-function/ReScript/ackermann-function.re
    diff --git a/Task/Ackermann-function/Rebol/ackermann-function-1.rebol b/Task/Ackermann-function/Rebol/ackermann-function-1.rebol
    deleted file mode 100644
    index 52928c349e..0000000000
    --- a/Task/Ackermann-function/Rebol/ackermann-function-1.rebol
    +++ /dev/null
    @@ -1,7 +0,0 @@
    -ackermann: func [m n] [
    -    case [
    -        m = 0 [n + 1]
    -        n = 0 [ackermann m - 1 1]
    -        true [ackermann m - 1 ackermann m n - 1]
    -    ]
    -]
    diff --git a/Task/Ackermann-function/Rebol/ackermann-function-2.rebol b/Task/Ackermann-function/Rebol/ackermann-function-2.rebol
    deleted file mode 100644
    index c6e294cb60..0000000000
    --- a/Task/Ackermann-function/Rebol/ackermann-function-2.rebol
    +++ /dev/null
    @@ -1,16 +0,0 @@
    -ackermann: func [
    -    m [integer!]
    -    n [integer!]
    -] [
    -    ;; Small-m closed forms
    -    case [
    -        m = 0 [n + 1]
    -        m = 1 [n + 2]
    -        m = 2 [(2 * n) + 3]
    -        m = 3 [
    -            ;; 2^(n+3) - 3
    -            (to integer! power 2 (n + 3)) - 3
    -        ]
    -        ;; m >= 4 causes stack overflow
    -    ]
    -]
    diff --git a/Task/Ackermann-function/Rust/ackermann-function-1.rs b/Task/Ackermann-function/Rust/ackermann-function-1.rust
    similarity index 100%
    rename from Task/Ackermann-function/Rust/ackermann-function-1.rs
    rename to Task/Ackermann-function/Rust/ackermann-function-1.rust
    diff --git a/Task/Ackermann-function/Rust/ackermann-function-2.rs b/Task/Ackermann-function/Rust/ackermann-function-2.rust
    similarity index 100%
    rename from Task/Ackermann-function/Rust/ackermann-function-2.rs
    rename to Task/Ackermann-function/Rust/ackermann-function-2.rust
    diff --git a/Task/Ackermann-function/Scheme/ackermann-function-1.scm b/Task/Ackermann-function/Scheme/ackermann-function-1.ss
    similarity index 100%
    rename from Task/Ackermann-function/Scheme/ackermann-function-1.scm
    rename to Task/Ackermann-function/Scheme/ackermann-function-1.ss
    diff --git a/Task/Ackermann-function/Scheme/ackermann-function-2.scm b/Task/Ackermann-function/Scheme/ackermann-function-2.ss
    similarity index 100%
    rename from Task/Ackermann-function/Scheme/ackermann-function-2.scm
    rename to Task/Ackermann-function/Scheme/ackermann-function-2.ss
    diff --git a/Task/Ackermann-function/TAV/ackermann-function.tav b/Task/Ackermann-function/TAV/ackermann-function.tav
    deleted file mode 100644
    index f81000b3c8..0000000000
    --- a/Task/Ackermann-function/TAV/ackermann-function.tav
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -ackermann (n) (m) :
    -  ? n = 0
    -    :> m+1
    -  ? m = 0
    -    :> ackermann (n-1) 1
    -  :> ackermann (n-1) ackermann n (m-1) \ = ackermann (n-1) (ackermann n (m-1))
    -\ test it
    -main(params):+
    -  p1 =: string params[1] as integer else 3
    -  p2 =: string params[2] as integer else 5
    -  print "ackermann(" _ p1 _ "," _ p2 _ ") = " _ ackermann p1 p2
    diff --git a/Task/Ackermann-function/Uiua/ackermann-function.uiua b/Task/Ackermann-function/Uiua/ackermann-function.uiua
    deleted file mode 100644
    index cebcb838cb..0000000000
    --- a/Task/Ackermann-function/Uiua/ackermann-function.uiua
    +++ /dev/null
    @@ -1,7 +0,0 @@
    -A ←|2.1 (
    -  ◡(×+1>0:>0)
    -  sw(+1pop|A-1:1pop:
    -    |A-1:off(A:-1:))
    -)
    -
    -A 1 1
    diff --git a/Task/Ackermann-function/VBScript/ackermann-function-1.vbs b/Task/Ackermann-function/VBScript/ackermann-function-1.vb
    similarity index 100%
    rename from Task/Ackermann-function/VBScript/ackermann-function-1.vbs
    rename to Task/Ackermann-function/VBScript/ackermann-function-1.vb
    diff --git a/Task/Ackermann-function/VBScript/ackermann-function-2.vbs b/Task/Ackermann-function/VBScript/ackermann-function-2.vb
    similarity index 100%
    rename from Task/Ackermann-function/VBScript/ackermann-function-2.vbs
    rename to Task/Ackermann-function/VBScript/ackermann-function-2.vb
    diff --git a/Task/Ackermann-function/ZED/ackermann-function.zed b/Task/Ackermann-function/ZED/ackermann-function.zed
    index af5d1c0f49..a16fe385ad 100644
    --- a/Task/Ackermann-function/ZED/ackermann-function.zed
    +++ b/Task/Ackermann-function/ZED/ackermann-function.zed
    @@ -1,29 +1,29 @@
    -(a) m n
    -M ZERO
    +(A) m n
    +comment:
     (=) m 0
     (add1) n
     
    -(a) m n
    -N ZERO
    +(A) m n
    +comment:
     (=) n 0
    -(a) (sub1) m 1
    +(A) (sub1) m 1
     
    -(a) m n
    -DEFAULT
    +(A) m n
    +comment:
     #true
    -(a) (sub1) m (a) m (sub1) n
    +(A) (sub1) m (A) m (sub1) n
     
     (add1) n
    -=========
    +comment:
     #true
     (003) "+" n 1
     
     (sub1) n
    -=========
    +comment:
     #true
     (003) "-" n 1
     
     (=) n1 n2
    -=========
    +comment:
     #true
     (003) "=" n1 n2
    diff --git a/Task/Active-Directory-Connect/AutoIt/active-directory-connect.au3 b/Task/Active-Directory-Connect/AutoIt/active-directory-connect.autoit
    similarity index 100%
    rename from Task/Active-Directory-Connect/AutoIt/active-directory-connect.au3
    rename to Task/Active-Directory-Connect/AutoIt/active-directory-connect.autoit
    diff --git a/Task/Active-Directory-Connect/Julia/active-directory-connect.jl b/Task/Active-Directory-Connect/Julia/active-directory-connect.julia
    similarity index 100%
    rename from Task/Active-Directory-Connect/Julia/active-directory-connect.jl
    rename to Task/Active-Directory-Connect/Julia/active-directory-connect.julia
    diff --git a/Task/Active-Directory-Connect/Kotlin/active-directory-connect.kts b/Task/Active-Directory-Connect/Kotlin/active-directory-connect.kotlin
    similarity index 100%
    rename from Task/Active-Directory-Connect/Kotlin/active-directory-connect.kts
    rename to Task/Active-Directory-Connect/Kotlin/active-directory-connect.kotlin
    diff --git a/Task/Active-Directory-Connect/Rust/active-directory-connect.rs b/Task/Active-Directory-Connect/Rust/active-directory-connect.rust
    similarity index 100%
    rename from Task/Active-Directory-Connect/Rust/active-directory-connect.rs
    rename to Task/Active-Directory-Connect/Rust/active-directory-connect.rust
    diff --git a/Task/Active-Directory-Connect/VBScript/active-directory-connect.vbs b/Task/Active-Directory-Connect/VBScript/active-directory-connect.vb
    similarity index 100%
    rename from Task/Active-Directory-Connect/VBScript/active-directory-connect.vbs
    rename to Task/Active-Directory-Connect/VBScript/active-directory-connect.vb
    diff --git a/Task/Active-Directory-Search-for-a-user/Julia/active-directory-search-for-a-user.jl b/Task/Active-Directory-Search-for-a-user/Julia/active-directory-search-for-a-user.julia
    similarity index 100%
    rename from Task/Active-Directory-Search-for-a-user/Julia/active-directory-search-for-a-user.jl
    rename to Task/Active-Directory-Search-for-a-user/Julia/active-directory-search-for-a-user.julia
    diff --git a/Task/Active-Directory-Search-for-a-user/PowerShell/active-directory-search-for-a-user.ps1 b/Task/Active-Directory-Search-for-a-user/PowerShell/active-directory-search-for-a-user.psh
    similarity index 100%
    rename from Task/Active-Directory-Search-for-a-user/PowerShell/active-directory-search-for-a-user.ps1
    rename to Task/Active-Directory-Search-for-a-user/PowerShell/active-directory-search-for-a-user.psh
    diff --git a/Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-1.vbs b/Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-1.vb
    similarity index 100%
    rename from Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-1.vbs
    rename to Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-1.vb
    diff --git a/Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-2.vbs b/Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-2.vb
    similarity index 100%
    rename from Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-2.vbs
    rename to Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-2.vb
    diff --git a/Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-3.vbs b/Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-3.vb
    similarity index 100%
    rename from Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-3.vbs
    rename to Task/Active-Directory-Search-for-a-user/VBScript/active-directory-search-for-a-user-3.vb
    diff --git a/Task/Active-object/Ada/active-object.adb b/Task/Active-object/Ada/active-object.ada
    similarity index 100%
    rename from Task/Active-object/Ada/active-object.adb
    rename to Task/Active-object/Ada/active-object.ada
    diff --git a/Task/Active-object/Crystal/active-object.cr b/Task/Active-object/Crystal/active-object.crystal
    similarity index 100%
    rename from Task/Active-object/Crystal/active-object.cr
    rename to Task/Active-object/Crystal/active-object.crystal
    diff --git a/Task/Active-object/Delphi/active-object.pas b/Task/Active-object/Delphi/active-object.delphi
    similarity index 100%
    rename from Task/Active-object/Delphi/active-object.pas
    rename to Task/Active-object/Delphi/active-object.delphi
    diff --git a/Task/Active-object/Julia/active-object.jl b/Task/Active-object/Julia/active-object.julia
    similarity index 100%
    rename from Task/Active-object/Julia/active-object.jl
    rename to Task/Active-object/Julia/active-object.julia
    diff --git a/Task/Active-object/Kotlin/active-object.kts b/Task/Active-object/Kotlin/active-object.kotlin
    similarity index 100%
    rename from Task/Active-object/Kotlin/active-object.kts
    rename to Task/Active-object/Kotlin/active-object.kotlin
    diff --git a/Task/Active-object/Rust/active-object.rs b/Task/Active-object/Rust/active-object.rust
    similarity index 100%
    rename from Task/Active-object/Rust/active-object.rs
    rename to Task/Active-object/Rust/active-object.rust
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Ada/add-a-variable-to-a-class-instance-at-runtime.adb b/Task/Add-a-variable-to-a-class-instance-at-runtime/Ada/add-a-variable-to-a-class-instance-at-runtime.ada
    similarity index 100%
    rename from Task/Add-a-variable-to-a-class-instance-at-runtime/Ada/add-a-variable-to-a-class-instance-at-runtime.adb
    rename to Task/Add-a-variable-to-a-class-instance-at-runtime/Ada/add-a-variable-to-a-class-instance-at-runtime.ada
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Arturo/add-a-variable-to-a-class-instance-at-runtime.arturo b/Task/Add-a-variable-to-a-class-instance-at-runtime/Arturo/add-a-variable-to-a-class-instance-at-runtime.arturo
    index 1709ab334f..c668c74160 100644
    --- a/Task/Add-a-variable-to-a-class-instance-at-runtime/Arturo/add-a-variable-to-a-class-instance-at-runtime.arturo
    +++ b/Task/Add-a-variable-to-a-class-instance-at-runtime/Arturo/add-a-variable-to-a-class-instance-at-runtime.arturo
    @@ -1,4 +1,4 @@
    -define :myClass [name, surname]
    +define :myClass [name,surname][]
     
     myInstance: to :myClass ["John" "Doe"]
     print myInstance
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Ballerina/add-a-variable-to-a-class-instance-at-runtime.ballerina b/Task/Add-a-variable-to-a-class-instance-at-runtime/Ballerina/add-a-variable-to-a-class-instance-at-runtime.ballerina
    deleted file mode 100644
    index a4d319d761..0000000000
    --- a/Task/Add-a-variable-to-a-class-instance-at-runtime/Ballerina/add-a-variable-to-a-class-instance-at-runtime.ballerina
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -import ballerina/io;
    -
    -// Person is an 'open' record type which allows fields of 'anydata' type
    -// to be added at runtime.
    -type Person record {
    -    string name;
    -    int age;
    -};
    -
    -public function main() {
    -    // Create an instance of Person with an additional 'town' field.
    -    Person p = {
    -        name: "Fred",
    -        age: 40,
    -        "town": "Boston"  // extra field name needs to be in quotes
    -    };
    -
    -    // Print name and age fields - using standard '.' syntax.
    -    io:print(p.name, " is ", p.age);
    -
    -    // Print the additional field - using a map-like syntax.
    -    io:println(" and lives in ", p["town"], ".");
    -}
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/C++/add-a-variable-to-a-class-instance-at-runtime.cpp b/Task/Add-a-variable-to-a-class-instance-at-runtime/C++/add-a-variable-to-a-class-instance-at-runtime.cpp
    deleted file mode 100644
    index 1f83768ae0..0000000000
    --- a/Task/Add-a-variable-to-a-class-instance-at-runtime/C++/add-a-variable-to-a-class-instance-at-runtime.cpp
    +++ /dev/null
    @@ -1,34 +0,0 @@
    -#include 
    -#include 
    -#include 
    -#include 
    -
    -class Demonstration {
    -public:
    -	Demonstration() {
    -		variables = { };
    -	}
    -
    -	std::map variables;
    -};
    -
    -int main() {
    -	Demonstration demo;
    -	std::cout << "Create two variables at runtime:" << std::endl;
    -	for ( uint32_t i = 1; i <= 2; ++i ) {
    -		std::cout << "    Variable number " << i << ":" << std::endl;
    -		std::cout << "        Enter name: " << std::endl;
    -		std::string name;
    -		std::cin >> name;
    -		std::cout << "        Enter value: " << std::endl;
    -		double value;
    -		std::cin >> value;
    -		demo.variables[name] = value;
    -	}
    -
    -	std::cout << std::endl;
    -	std::cout << "Two new runtime variables appear to have been created." << std::endl;
    -	for ( const auto &[key, value] : demo.variables ) {
    -		std::cout << "Variable " << key << " = " << value << std::endl;
    -	}
    -}
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Crystal/add-a-variable-to-a-class-instance-at-runtime.cr b/Task/Add-a-variable-to-a-class-instance-at-runtime/Crystal/add-a-variable-to-a-class-instance-at-runtime.cr
    deleted file mode 100644
    index 9d091d3e04..0000000000
    --- a/Task/Add-a-variable-to-a-class-instance-at-runtime/Crystal/add-a-variable-to-a-class-instance-at-runtime.cr
    +++ /dev/null
    @@ -1,25 +0,0 @@
    -class SuperDynamic
    -  @vars = {} of String => String | Int32
    -
    -  def set_vars (@vars)
    -  end
    -
    -  macro method_missing (call)
    -    {% name = call.name %}
    -    {% if name.ends_with? "=" %}
    -      {% name = name.gsub(/=$/, "") %}
    -      raise "unknown var" unless @vars.has_key? {{name.id.stringify}}
    -      @vars[{{name.id.stringify}}] = {{call.args[0].id}}
    -    {% else %}
    -      @vars[{{name.id.stringify}}]
    -    {% end %}
    -  end
    -end
    -
    -sd = SuperDynamic.new
    -
    -sd.set_vars({ "a" => 1, "b" => "2" })
    -
    -p! sd.a
    -sd.a = 99
    -p! sd.a
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Elena/add-a-variable-to-a-class-instance-at-runtime.elena b/Task/Add-a-variable-to-a-class-instance-at-runtime/Elena/add-a-variable-to-a-class-instance-at-runtime.elena
    index 07b19d327c..9634046d11 100644
    --- a/Task/Add-a-variable-to-a-class-instance-at-runtime/Elena/add-a-variable-to-a-class-instance-at-runtime.elena
    +++ b/Task/Add-a-variable-to-a-class-instance-at-runtime/Elena/add-a-variable-to-a-class-instance-at-runtime.elena
    @@ -10,7 +10,7 @@ class Extender : BaseExtender
        }
     }
     
    -public Program()
    +public program()
     {
        var object := 234;
     
    @@ -19,7 +19,7 @@ public Program()
     
        object.foo := "bar";
     
    -   Console.printLine(object,".foo=",object.foo);
    +   console.printLine(object,".foo=",object.foo);
     
    -   Console.readChar()
    +   console.readChar()
     }
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Julia/add-a-variable-to-a-class-instance-at-runtime-1.jl b/Task/Add-a-variable-to-a-class-instance-at-runtime/Julia/add-a-variable-to-a-class-instance-at-runtime-1.julia
    similarity index 100%
    rename from Task/Add-a-variable-to-a-class-instance-at-runtime/Julia/add-a-variable-to-a-class-instance-at-runtime-1.jl
    rename to Task/Add-a-variable-to-a-class-instance-at-runtime/Julia/add-a-variable-to-a-class-instance-at-runtime-1.julia
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Julia/add-a-variable-to-a-class-instance-at-runtime-2.jl b/Task/Add-a-variable-to-a-class-instance-at-runtime/Julia/add-a-variable-to-a-class-instance-at-runtime-2.julia
    similarity index 100%
    rename from Task/Add-a-variable-to-a-class-instance-at-runtime/Julia/add-a-variable-to-a-class-instance-at-runtime-2.jl
    rename to Task/Add-a-variable-to-a-class-instance-at-runtime/Julia/add-a-variable-to-a-class-instance-at-runtime-2.julia
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Kotlin/add-a-variable-to-a-class-instance-at-runtime.kts b/Task/Add-a-variable-to-a-class-instance-at-runtime/Kotlin/add-a-variable-to-a-class-instance-at-runtime.kotlin
    similarity index 100%
    rename from Task/Add-a-variable-to-a-class-instance-at-runtime/Kotlin/add-a-variable-to-a-class-instance-at-runtime.kts
    rename to Task/Add-a-variable-to-a-class-instance-at-runtime/Kotlin/add-a-variable-to-a-class-instance-at-runtime.kotlin
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/PascalABC.NET/add-a-variable-to-a-class-instance-at-runtime.pas b/Task/Add-a-variable-to-a-class-instance-at-runtime/PascalABC.NET/add-a-variable-to-a-class-instance-at-runtime.pas
    deleted file mode 100644
    index 3a8fa42045..0000000000
    --- a/Task/Add-a-variable-to-a-class-instance-at-runtime/PascalABC.NET/add-a-variable-to-a-class-instance-at-runtime.pas
    +++ /dev/null
    @@ -1,19 +0,0 @@
    -type
    -  MyClass = class
    -    private
    -      dict := new Dictionary;
    -    public
    -      procedure Add(name: string; value: object) := dict[name] := value;
    -      property Items[name: string]: object read dict[name]; default;
    -  end;
    -
    -begin
    -  var obj := new MyClass;
    -  obj.Add('Name','PascalABC.NET');
    -  obj.Add('Age',16);
    -  Println(obj['Name'],obj['Age']);
    -  var obj1 := new MyClass;
    -  obj1.Add('X',2.3);
    -  obj1.Add('Y',3.8);
    -  Println(obj1['X'],obj1['Y']);
    -end.
    diff --git a/Task/Add-a-variable-to-a-class-instance-at-runtime/Phix/add-a-variable-to-a-class-instance-at-runtime.phix b/Task/Add-a-variable-to-a-class-instance-at-runtime/Phix/add-a-variable-to-a-class-instance-at-runtime.phix
    index 7e559ea226..4a5d383d43 100644
    --- a/Task/Add-a-variable-to-a-class-instance-at-runtime/Phix/add-a-variable-to-a-class-instance-at-runtime.phix
    +++ b/Task/Add-a-variable-to-a-class-instance-at-runtime/Phix/add-a-variable-to-a-class-instance-at-runtime.phix
    @@ -1,9 +1,10 @@
    -without javascript_semantics -- no class
    -class wobbly dynamic
    -    -- (pre-define a few fields/methods if you like)
    -end class
    -wobbly wobble = new()
    -?wobble.jelly               -- 0
    ---?wobble["jelly"]          -- for dynamic names use []
    -wobble.jelly = "green"
    -?wobble.jelly               -- "green"
    +-->
    + class wobbly dynamic
    +     -- (pre-define a few fields/methods if you like)
    + end class
    + wobbly wobble = new()
    + ?wobble.jelly               -- 0
    + --?wobble["jelly"]          -- for dynamic names use []
    + wobble.jelly = "green"
    + ?wobble.jelly               -- "green"
    +
    + with javascript_semantics
    + function additive(string p) return is_prime(sum(sq_sub(p,'0'))) end function
    + sequence res = filter(apply(get_primes_le(500),sprint),additive)
    + printf(1,"%d additive primes found: %s\n",{length(res),join(shorten(res,"",6))})
    +
    + --
    + -- demo\rosetta\Pattern_matching.exw
    + -- =================================
    + --
    + -- 1). Lightly modified copy of demo\rosetta\VisualiseTree.exw
     
    --- To the theme tune of the Milk Tray Ad iyrt,
    --- All because the Windows console hates utf8:
    -constant TL = '\#DA', -- aka '┌'
    -         VT = '\#B3', -- aka '│'
    -         BL = '\#C0', -- aka '└'
    -         HZ = '\#C4', -- aka '─'
    -         HS = "\#C4"  -- (string version of HZ)
    + with javascript_semantics
     
    -function w1252_to_utf8(string s)
    -    if platform()!=WINDOWS then
    -        s = substitute_all(s,{ TL, VT, BL, HZ},
    -                             {"┌","│","└","─"})
    -    end if
    -    return s
    -end function
    ---
    + -- To the theme tune of the Milk Tray Ad iyrt,
    + -- All because the Windows console hates utf8:
    + constant TL = '\#DA', -- aka '┌'
    +          VT = '\#B3', -- aka '│'
    +          BL = '\#C0', -- aka '└'
    +          HZ = '\#C4', -- aka '─'
    +          HS = "\#C4"  -- (string version of HZ)
     
    -procedure visualise_tree(object tree, string root=HS)
    -    if atom(tree) then
    -        puts(1,"\n")
    -    else
    -        object {colour,left,v,right} = tree
    -        integer g = root[$]
    -        if sequence(left) then
    -            root[$] = iff(g=TL or g=HZ?' ':VT)
    -            visualise_tree(left,root&TL)
    -        end if
    -        root[$] = g
    -        printf(1,"%s%s%v\n",{w1252_to_utf8(root),colour,v})
    -        if sequence(right) then
    -            root[$] = iff(g=TL?VT:' ')
    -            visualise_tree(right,root&BL)
    -        end if
    -    end if
    -end procedure
    ---
    + function w1252_to_utf8(string s)
    +     if platform()!=WINDOWS then
    +         s = substitute_all(s,{ TL, VT, BL, HZ},
    +                              {"┌","│","└","─"})
    +     end if
    +     return s
    + end function
    + --</hates utf8>
     
    --- 2). Imagine the following is in a file, say algebraic_data_types.e - not quite generic enough
    ---      for inclusion in builtins, but not exactly difficult to copy/maintain per-project either.
    + procedure visualise_tree(object tree, string root=HS)
    +     if atom(tree) then
    +         puts(1,"<empty>\n")
    +     else
    +         object {colour,left,v,right} = tree
    +         integer g = root[$]
    +         if sequence(left) then
    +             root[$] = iff(g=TL or g=HZ?' ':VT)
    +             visualise_tree(left,root&TL)
    +         end if
    +         root[$] = g
    +         printf(1,"%s%s%v\n",{w1252_to_utf8(root),colour,v})
    +         if sequence(right) then
    +             root[$] = iff(g=TL?VT:' ')
    +             visualise_tree(right,root&BL)
    +         end if
    +     end if
    + end procedure
    + --</copy VisualiseTree>
     
    -function match_one(sequence key, object t)
    -    sequence res = {}
    -    if sequence(t)
    -    and length(key)==length(t) then
    -        for i=1 to length(key) do
    -            object ki = key[i], ti = t[i]
    -            if sequence(ki) and not string(ki) then
    -                sequence r2 = match_one(ki,ti)
    -                if r2={} then res = {} exit end if
    -                res &= r2
    -            else
    -                if ki=0 then
    -                    res = append(res,ti)
    -                else
    -                    if ki!=ti then res = {} exit end if
    -                end if
    -            end if
    -        end for
    -    end if
    -    return res
    -end function
    + -- 2). Imagine the following is in a file, say algebraic_data_types.e - not quite generic enough
    + --      for inclusion in builtins, but not exactly difficult to copy/maintain per-project either.
     
    -/*global*/ function match_algebraic(sequence set, t)
    -    sequence s
    -    for i=1 to length(set) do
    -        s = match_one(set[i],t)
    -        if length(s) then exit end if
    -    end for
    -    return s
    -end function
    ---
    + function match_one(sequence key, object t)
    +     sequence res = {}
    +     if sequence(t)
    +     and length(key)==length(t) then
    +         for i=1 to length(key) do
    +             object ki = key[i], ti = t[i]
    +             if sequence(ki) and not string(ki) then
    +                 sequence r2 = match_one(ki,ti)
    +                 if r2={} then res = {} exit end if
    +                 res &= r2
    +             else
    +                 if ki=0 then
    +                     res = append(res,ti)
    +                 else
    +                     if ki!=ti then res = {} exit end if
    +                 end if
    +             end if
    +         end for
    +     end if
    +     return res
    + end function
     
    --- 3). The actual task
    + /*global*/ function match_algebraic(sequence set, t)
    +     sequence s
    +     for i=1 to length(set) do
    +         s = match_one(set[i],t)
    +         if length(s) then exit end if
    +     end for
    +     return s
    + end function
    + --</algebraic_data_types.e>
     
    -constant B = "B", R = "R"
    + -- 3). The actual task
     
    -function balance(sequence t)
    -    sequence s = match_algebraic({{B,{R,{R,0,0,0},0,0},0,0},
    -                                  {B,{R,0,0,{R,0,0,0}},0,0},
    -                                  {B,0,0,{R,{R,0,0,0},0,0}},
    -                                  {B,0,0,{R,0,0,{R,0,0,0}}}},t)
    -    if length(s) then
    -        object {a,x,b,y,c,z,d} = s
    -        t = {R,{B,a,x,b},y,{B,c,z,d}}
    -    end if
    -    return t
    -end function
    + constant B = "B", R = "R"
     
    -function ins(object tree, object leaf)
    -    if tree=NULL then
    -        tree = {R,NULL,leaf,NULL}
    -    else
    -        object {c,l,k,r} = tree
    -        if leaf!=k then
    -            if leaffunction balance(sequence t)
    +     sequence s = match_algebraic({{B,{R,{R,0,0,0},0,0},0,0},
    +                                   {B,{R,0,0,{R,0,0,0}},0,0},
    +                                   {B,0,0,{R,{R,0,0,0},0,0}},
    +                                   {B,0,0,{R,0,0,{R,0,0,0}}}},t)
    +     if length(s) then
    +         object {a,x,b,y,c,z,d} = s
    +         t = {R,{B,a,x,b},y,{B,c,z,d}}
    +     end if
    +     return t
    + end function
     
    -function tree_insert(object tree, object leaf)
    -    tree = ins(tree,leaf)
    -    tree[1] = B
    -    return tree
    -end function
    + function ins(object tree, object leaf)
    +     if tree=NULL then
    +         tree = {R,NULL,leaf,NULL}
    +     else
    +         object {c,l,k,r} = tree
    +         if leaf!=k then
    +             if leaf<k then l = ins(l,leaf)
    +                       else r = ins(r,leaf)
    +             end if
    +             tree = balance({c,l,k,r})
    +         end if
    +     end if
    +     return tree
    + end function
     
    -sequence stuff = shuffle(tagset(10))
    -object tree = NULL
    -for i=1 to length(stuff) do
    -    tree = tree_insert(tree,stuff[i])
    -end for
    -visualise_tree(tree)
    + function tree_insert(object tree, object leaf)
    +     tree = ins(tree,leaf)
    +     tree[1] = B
    +     return tree
    + end function
     
    -?"done"
    -{} = wait_key()
    + sequence stuff = shuffle(tagset(10))
    + object tree = NULL
    + for i=1 to length(stuff) do
    +     tree = tree_insert(tree,stuff[i])
    + end for
    + visualise_tree(tree)
    +
    + ?"done"
    + {} = wait_key()
    +
    + with javascript_semantics
    + requires("1.0.0")
    + include mpfr.e
    + mpfr_set_default_precision(-70)
     
    -function almkvistGiullera(integer n, bool bPrint)
    -    mpz {t1,t2,ip} = mpz_inits(3)
    -    mpz_fac_ui(t1,6*n)
    -    mpz_mul_si(t1,t1,32)                -- t1:=2^5*(6n)!
    -    mpz_fac_ui(t2,n)
    -    mpz_pow_ui(t2,t2,6)
    -    mpz_mul_si(t2,t2,3)                 -- t2:=3*(n!)^6
    -    mpz_mul_si(ip,t1,532*n*n+126*n+9)   -- ip:=t1*(532n^2+126n+9)
    -    mpz_fdiv_q(ip,ip,t2)                -- ip:=ip/t2
    -    integer pw := 6*n+3
    -    mpz_ui_pow_ui(t1,10,pw)             -- t1 := 10^(6n+3)
    -    mpq tm = mpq_init_set_z(ip,t1)      -- tm := rat(ip/t1)
    -    if bPrint then
    -        string ips = mpz_get_str(ip),
    -               tms = mpfr_get_fixed(mpfr_init_set_q(tm),50)
    -        tms = trim_tail(tms,"0")
    -        printf(1,"%d  %44s  %3d  %s\n", {n, ips, -pw, tms})
    -    end if
    -    return tm
    -end function
    + function almkvistGiullera(integer n, bool bPrint)
    +     mpz {t1,t2,ip} = mpz_inits(3)
    +     mpz_fac_ui(t1,6*n)
    +     mpz_mul_si(t1,t1,32)                -- t1:=2^5*(6n)!
    +     mpz_fac_ui(t2,n)
    +     mpz_pow_ui(t2,t2,6)
    +     mpz_mul_si(t2,t2,3)                 -- t2:=3*(n!)^6
    +     mpz_mul_si(ip,t1,532*n*n+126*n+9)   -- ip:=t1*(532n^2+126n+9)
    +     mpz_fdiv_q(ip,ip,t2)                -- ip:=ip/t2
    +     integer pw := 6*n+3
    +     mpz_ui_pow_ui(t1,10,pw)             -- t1 := 10^(6n+3)
    +     mpq tm = mpq_init_set_z(ip,t1)      -- tm := rat(ip/t1)
    +     if bPrint then
    +         string ips = mpz_get_str(ip),
    +                tms = mpfr_get_fixed(mpfr_init_set_q(tm),50)
    +         tms = trim_tail(tms,"0")
    +         printf(1,"%d  %44s  %3d  %s\n", {n, ips, -pw, tms})
    +     end if
    +     return tm
    + end function
     
    -constant hdr = "N --------------- Integer portion -------------  Pow  ----------------- Nth term (50 dp) -----------------"
    -printf(1,"%s\n%s\n",{hdr,repeat('-',length(hdr))})
    -for n=0 to 9 do
    -    {} = almkvistGiullera(n, true)
    -end for
    + constant hdr = "N --------------- Integer portion -------------  Pow  ----------------- Nth term (50 dp) -----------------"
    + printf(1,"%s\n%s\n",{hdr,repeat('-',length(hdr))})
    + for n=0 to 9 do
    +     {} = almkvistGiullera(n, true)
    + end for
     
    -mpq {res,prev,z} = mpq_inits(3),
    -    prec = mpq_init_set_str(sprintf("1/1%s",repeat('0',70)))
    -integer n = 0
    -while true do
    -    mpq term := almkvistGiullera(n, false)
    -    mpq_add(res,res,term)
    -    mpq_sub(z,res,prev)
    -    mpq_abs(z,z)
    -    if mpq_cmp(z,prec) < 0 then exit end if
    -    mpq_set(prev,res)
    -    n += 1
    -end while
    -mpq_inv(res,res)
    -mpfr pi = mpfr_init_set_q(res)
    -mpfr_sqrt(pi,pi)
    -printf(1,"\nCalculation of pi took %d iterations using the Almkvist-Giullera formula.\n\n",n)
    -printf(1,"Pi to 70 d.p.: %s\n",mpfr_get_fixed(pi,70))
    -mpfr_const_pi(pi)
    -printf(1,"Pi (builtin) : %s\n",mpfr_get_fixed(pi,70))
    + mpq {res,prev,z} = mpq_inits(3),
    +     prec = mpq_init_set_str(sprintf("1/1%s",repeat('0',70)))
    + integer n = 0
    + while true do
    +     mpq term := almkvistGiullera(n, false)
    +     mpq_add(res,res,term)
    +     mpq_sub(z,res,prev)
    +     mpq_abs(z,z)
    +     if mpq_cmp(z,prec) < 0 then exit end if
    +     mpq_set(prev,res)
    +     n += 1
    + end while
    + mpq_inv(res,res)
    + mpfr pi = mpfr_init_set_q(res)
    + mpfr_sqrt(pi,pi)
    + printf(1,"\nCalculation of pi took %d iterations using the Almkvist-Giullera formula.\n\n",n)
    + printf(1,"Pi to 70 d.p.: %s\n",mpfr_get_fixed(pi,70))
    + mpfr_const_pi(pi)
    + printf(1,"Pi (builtin) : %s\n",mpfr_get_fixed(pi,70))
    +
    + sequence res = columnize({tagset(5)}) -- ie {{1},{2},{3},{4},{5}}
    + integer n = 2, found = 0
    + while found<50 do
    +     integer l = length(prime_factors(n,true))
    +     if l<=5 and length(res[l])<=10 then
    +         res[l] &= n
    +         found += 1
    +     end if
    +     n += 1
    + end while
    + string fmt = "k = %d: "&join(repeat("%4d",10))&"\n"
    + for i=1 to 5 do
    +     printf(1,fmt,res[i])
    + end for
    +
    + function amb1(sequence sets, object res=0, integer idx=1)
    +     integer ch = 0,
    +             pass = 0
    +     if idx>length(sets) then
    +         pass = 1
    +     else
    +         if res=0 then
    +             res = repeat(0,length(sets))
    +         else
    +             res = deep_copy(res)
    +             ch = sets[idx-1][res[idx-1]][$]
    +         end if
    +         for k=1 to length(sets[idx]) do
    +             if ch=0 or sets[idx][k][1]=ch then
    +                 res[idx] = k
    +                 {pass,res} = amb1(sets,res,idx+1)
    +                 if pass then exit end if
    +             end if
    +         end for
    +     end if
    +     return {pass,res}
    + end function
     
    -function amb1(sequence sets, object res=0, integer idx=1)
    -    integer ch = 0
    -    bool pass = false
    -    if idx>length(sets) then
    -        pass = true
    -    else
    -        if res=0 then
    -            res = repeat(0,length(sets))
    -        else
    -            res = deep_copy(res)
    -            ch = sets[idx-1][res[idx-1]][$]
    -        end if
    -        for k=1 to length(sets[idx]) do
    -            if ch=0 or sets[idx][k][1]=ch then
    -                res[idx] = k
    -                {pass,res} = amb1(sets,res,idx+1)
    -                if pass then exit end if
    -            end if
    -        end for
    -    end if
    -    return {pass,res}
    -end function
    -
    -sequence sets = {{"the","that","a"},
    -                 {"frog","elephant","thing"},
    -                 {"walked","treaded","grows"},
    -                 {"slowly","quickly"}}
    -{bool pass, sequence res} = amb1(sets)
    -if pass then
    -    puts(1,"success: ")
    -    for i=1 to length(sets) do
    -        res[i] = sets[i][res[i]]
    -    end for
    -    ?res
    -else
    -    puts(1,"failure\n")
    -end if
    + sequence sets = {{"the","that","a"},
    +                  {"frog","elephant","thing"},
    +                  {"walked","treaded","grows"},
    +                  {"slowly","quickly"}}
    + {integer pass, sequence res} = amb1(sets)
    + if pass then
    +     puts(1,"success: ")
    +     for i=1 to length(sets) do
    +         res[i] = sets[i][res[i]]
    +     end for
    +     ?res
    + else
    +     puts(1,"failure\n")
    + end if
    +
    + function amb(sequence sets, integer testrid, integer resrid=-1, object res=0, integer idx=1)
    +     integer flag = (res==0),
    +             pass = 0
    +     if idx>length(sets) then
    +         pass = 1
    +         if resrid!=-1 then
    +             resrid(sets,res)
    +         end if
    +     else
    +         if flag then
    +             res = repeat(0,length(sets))
    +         end if
    +         for k=1 to length(sets[idx]) do
    +             res[idx] = k
    +             if flag or testrid(sets,deep_copy(res),idx) then
    +                 {pass,res} = amb(sets,testrid,resrid,deep_copy(res),idx+1)
    +                 if pass and resrid=-1 then exit end if
    +             end if
    +         end for
    +     end if
    +     return {pass,res}
    + end function
     
    -function pairable(sequence sets, res, integer idx)
    -    return sets[idx-1][res[idx-1]][$] = sets[idx][res[idx]][1]
    -end function
    + function pairable(sequence sets, sequence res, integer idx)
    +     return sets[idx-1][res[idx-1]][$] = sets[idx][res[idx]][1]
    + end function
     
    -procedure AMB_Show(sequence sets, res)
    -    res = deep_copy(res)
    -    for i=1 to length(sets) do
    -        res[i] = sets[i][res[i]]
    -    end for
    -    printf(1,"success: %v\n",{res})
    -end procedure
    + procedure AMB_Show(sequence sets, sequence res)
    +     res = deep_copy(res)
    +     for i=1 to length(sets) do
    +         res[i] = sets[i][res[i]]
    +     end for
    +     printf(1,"success: %v\n",{res})
    + end procedure
     
    -function pythagorean(sequence /*sets*/, sequence res, integer idx)
    --- (note that res[idx]==sets[idx][res[idx]] in all cases)
    -    integer {x,y,z} = res
    -    return idx<3 or (x*x+y*y=z*z)
    -end function
    + function pythagorean(sequence /*sets*/, sequence res, integer idx)
    + -- (note that res[idx]==sets[idx][res[idx]] in all cases)
    +     integer {x,y,z} = res
    +     return idx<3 or (x*x+y*y=z*z)
    + end function
     
    -procedure pythag_show(sequence /*sets*/, sequence res)
    -    printf(1,"success: %v\n",{res})
    -end procedure
    + procedure pythag_show(sequence /*sets*/, sequence res)
    +     printf(1,"success: %v\n",{res})
    + end procedure
     
    --- see http://www.randomhacks.net/articles/2005/10/11/amb-operator
    -function not8(sequence sets, sequence res, integer idx)
    --- (note that idx==2 in all cases)
    --- (at the last moment, I flipped the test, after realising that
    ---  someone had completely misunderstood the original article...
    ---  return sets[1][res[1]]*sets[idx][res[idx]]!=8
    -    return sets[1][res[1]]*sets[idx][res[idx]]=8
    -end function
    + -- see http://www.randomhacks.net/articles/2005/10/11/amb-operator
    + function not8(sequence sets, sequence res, integer idx)
    + -- (note that idx==2 in all cases)
    + -- (at the last moment, I flipped the test, after realising that
    + --  someone had completely misunderstood the original article...
    + --  return sets[1][res[1]]*sets[idx][res[idx]]!=8
    +     return sets[1][res[1]]*sets[idx][res[idx]]=8
    + end function
     
    -procedure not8_show(sequence sets, sequence res)
    -    puts(1,"success: ")
    -    ?{sets[1][res[1]],sets[2][res[2]]}
    -end procedure
    + procedure not8_show(sequence sets, sequence res)
    +     puts(1,"success: ")
    +     ?{sets[1][res[1]],sets[2][res[2]]}
    + end procedure
     
    -sequence sets = {{"the","that","a"},
    -                 {"frog","elephant","thing"},
    -                 {"walked","treaded","grows"},
    -                 {"slowly","quickly"}}
    -sequence sets2 = repeat(tagset(11),3)
    -sequence sets3 = {{1, 2, 3}, {4, 5, 6}}
    -puts(1,"\nThe original:\n")
    -{} = amb(sets,pairable,AMB_Show)
    -puts(1,"\nSmall Pythagorean triples problem:\n")
    -{} = amb(sets2,pythagorean,pythag_show)
    -puts(1,"\nSome strange not 8 problem:\n") -- (now fixed)
    -{} = amb(sets3,not8,not8_show)
    + sequence sets = {{"the","that","a"},
    +                  {"frog","elephant","thing"},
    +                  {"walked","treaded","grows"},
    +                  {"slowly","quickly"}}
    + sequence sets2 = repeat(tagset(11),3)
    + sequence sets3 = {{1, 2, 3}, {4, 5, 6}}
    + puts(1,"\nThe original:\n")
    + {} = amb(sets,pairable,AMB_Show)
    + puts(1,"\nSmall Pythagorean triples problem:\n")
    + {} = amb(sets2,pythagorean,pythag_show)
    + puts(1,"\nSome strange not 8 problem:\n") -- (now fixed)
    + {} = amb(sets3,not8,not8_show)
    +
    + with javascript_semantics
    + for m=1 to 20000 do
    +     integer n = sum(factors(m,-1))
    +     if m<n and m=sum(factors(n,-1)) then ?{m,n} end if
    + end for
    +( (len,words), ...)
        if(ws.len()>1){ // two or more anagrams
           r:=List(); n:=ws[0].len(); // length of these anagrams
           foreach idx,w in (ws.enumerate()){
    -     foreach w2 in (ws[idx+1,*]){
    -        if(Utils.zipWith('!=,w,w2).filter().len()==n)
    -           r.write(T(w,w2));
    -     }
    +	 foreach w2 in (ws[idx+1,*]){
    +	    if(Utils.zipWith('!=,w,w2).filter().len()==n)
    +	       r.write(T(w,w2));
    +	 }
           }
           if(r) return(r.insert(0,n));
        }
    diff --git a/Task/Anagrams-Deranged-anagrams/Zkl/anagrams-deranged-anagrams-2.zkl b/Task/Anagrams-Deranged-anagrams/Zkl/anagrams-deranged-anagrams-2.zkl
    index bca11af0eb..ce697554b4 100644
    --- a/Task/Anagrams-Deranged-anagrams/Zkl/anagrams-deranged-anagrams-2.zkl
    +++ b/Task/Anagrams-Deranged-anagrams/Zkl/anagrams-deranged-anagrams-2.zkl
    @@ -3,7 +3,7 @@ nws:=words.values.pump(List,fcn(ws){ //-->( (len,words), ...)
           n:=ws[0].len(); // length of these anagrams
           r:=Utils.Helpers.permute(ws).filter('wrap(ws2){
                 n == Utils.zipWith('!=,ws2.xplode()).filter().len();
    -     });
    +	 });
           if(r) return(n,r[0]); // L(L("glove","vogel"))-->L(5,L("glove","vogel"))
        }
        Void.Skip
    diff --git a/Task/Anagrams/00-TASK.txt b/Task/Anagrams/00-TASK.txt
    index c66b1c36f9..1668245967 100644
    --- a/Task/Anagrams/00-TASK.txt
    +++ b/Task/Anagrams/00-TASK.txt
    @@ -1,7 +1,7 @@
     When two or more words are composed of the same characters, but in a different order, they are called [[wp:Anagram|anagrams]]. 
     
     ;Task
    -Using the word list at   http://wiki.puzzlers.org/pub/wordlists/unixdict.txt or [https://raw.githubusercontent.com/thundergnat/rc-run/refs/heads/master/rc/resources/unixdict.txt here], 
    +Using the word list at   http://wiki.puzzlers.org/pub/wordlists/unixdict.txt, 
     
    find the sets of words that share the same characters that contain the most words in them. ;Related tasks diff --git a/Task/Anagrams/ALGOL-68/anagrams.alg b/Task/Anagrams/ALGOL-68/anagrams.alg index d652d3bd06..8fe12076cc 100644 --- a/Task/Anagrams/ALGOL-68/anagrams.alg +++ b/Task/Anagrams/ALGOL-68/anagrams.alg @@ -55,6 +55,7 @@ ELSE END ); REF AARRAY words := INIT LOC AARRAY; + STRING word; WHILE NOT at eof DO STRING word; diff --git a/Task/Anagrams/Ada/anagrams.adb b/Task/Anagrams/Ada/anagrams.ada similarity index 100% rename from Task/Anagrams/Ada/anagrams.adb rename to Task/Anagrams/Ada/anagrams.ada diff --git a/Task/Anagrams/Arturo/anagrams.arturo b/Task/Anagrams/Arturo/anagrams.arturo index c6c5181269..9d417293a0 100644 --- a/Task/Anagrams/Arturo/anagrams.arturo +++ b/Task/Anagrams/Arturo/anagrams.arturo @@ -5,7 +5,7 @@ anagrams: #[] loop wordset 'word [ anagram: sort to [:char] word unless key? anagrams anagram -> - anagrams\[anagram]: [] + anagrams\[anagram]: new [] anagrams\[anagram]: anagrams\[anagram] ++ word ] diff --git a/Task/Anagrams/COBOL/anagrams.cob b/Task/Anagrams/COBOL/anagrams.cobol similarity index 100% rename from Task/Anagrams/COBOL/anagrams.cob rename to Task/Anagrams/COBOL/anagrams.cobol diff --git a/Task/Anagrams/Crystal/anagrams.cr b/Task/Anagrams/Crystal/anagrams.crystal similarity index 100% rename from Task/Anagrams/Crystal/anagrams.cr rename to Task/Anagrams/Crystal/anagrams.crystal diff --git a/Task/Anagrams/Delphi/anagrams.pas b/Task/Anagrams/Delphi/anagrams.delphi similarity index 100% rename from Task/Anagrams/Delphi/anagrams.pas rename to Task/Anagrams/Delphi/anagrams.delphi diff --git a/Task/Anagrams/DuckDB/anagrams.duckdb b/Task/Anagrams/DuckDB/anagrams.duckdb deleted file mode 100644 index aaa0f5aad8..0000000000 --- a/Task/Anagrams/DuckDB/anagrams.duckdb +++ /dev/null @@ -1,20 +0,0 @@ -# The MAP giving the frequency counts of characters in the given string -create or replace function spectrum(str) as ( - select histogram(c) - from (select unnest(regexp_extract_all(str,'.')) as c) -); - -# Find the anagram groups having the most members. -# Each group is sorted, and the groups are sorted by first word in the group. -with words as (from read_csv('unixdict.txt', header=false) _(word)), - histograms as (select word, spectrum(word) as h from words), - groups as (select h, count(h) as c from histograms group by h order by c desc), - mx as (select max(c) as mx from groups), - maximals as (select h from groups, mx where c = mx.mx), - results as (select (select array_agg(word).list_sort() - from histograms - where histograms.h = maximals.h ) as anagrams - from maximals) - select anagrams - from results - order by anagrams[1] ; diff --git a/Task/Anagrams/EasyLang/anagrams.easy b/Task/Anagrams/EasyLang/anagrams.easy deleted file mode 100644 index 2e5fcff599..0000000000 --- a/Task/Anagrams/EasyLang/anagrams.easy +++ /dev/null @@ -1,46 +0,0 @@ -global name$[] cnt[] . -func n2id n$ . - for id to len name$[] : if name$[id] = n$ : return id - name$[] &= n$ - cnt[] &= 0 - return id -. -func norm s$ . - d$[] = strchars s$ - for i = 1 to len d$[] - 1 - for j = i + 1 to len d$[] - if strcode d$[j] < strcode d$[i] : swap d$[j] d$[i] - . - . - n$ = strjoin d$[] "" - return n2id n$ -. -repeat - s$ = input - until s$ = "" - id = norm s$ - cnt[id] += 1 - max = higher max cnt[id] - w$[] &= s$ - wid[] &= id -. -for id to len name$[] - if cnt[id] = max - for i to len w$[] - if wid[i] = id : write w$[i] & " " - . - print "" - . -. -# -# a few lines of unixdict.txt, also works with all -input_data -abe -abed -abel -ablaze -able -ablution -angel -angle -angles diff --git a/Task/Anagrams/Elena/anagrams.elena b/Task/Anagrams/Elena/anagrams.elena index be3a530398..65bb59e28f 100644 --- a/Task/Anagrams/Elena/anagrams.elena +++ b/Task/Anagrams/Elena/anagrams.elena @@ -13,9 +13,9 @@ extension op = self.toArray().ascendant().summarize(new StringWriter()); } -public Program() +public program() { - var start := Now; + var start := now; auto dictionary := new Map(); @@ -35,13 +35,13 @@ public Program() dictionary.Values .quickSort::(former,later => former.Item2.Length > later.Item2.Length ) .top(20) - .forEach::(pair){ Console.printLine(pair.Item2) }; + .forEach::(pair){ console.printLine(pair.Item2) }; - var end := Now; + var end := now; var diff := end - start; - Console.printLine("Time elapsed in msec:",diff.Milliseconds); + console.printLine("Time elapsed in msec:",diff.Milliseconds); - Console.readChar() + console.readChar() } diff --git a/Task/Anagrams/Elixir/anagrams-1.ex b/Task/Anagrams/Elixir/anagrams-1.elixir similarity index 100% rename from Task/Anagrams/Elixir/anagrams-1.ex rename to Task/Anagrams/Elixir/anagrams-1.elixir diff --git a/Task/Anagrams/Elixir/anagrams-2.ex b/Task/Anagrams/Elixir/anagrams-2.elixir similarity index 100% rename from Task/Anagrams/Elixir/anagrams-2.ex rename to Task/Anagrams/Elixir/anagrams-2.elixir diff --git a/Task/Anagrams/Emacs-Lisp/anagrams-1.el b/Task/Anagrams/Emacs-Lisp/anagrams-1.el deleted file mode 100644 index 9920fae43d..0000000000 --- a/Task/Anagrams/Emacs-Lisp/anagrams-1.el +++ /dev/null @@ -1,87 +0,0 @@ -(defun code-letters (str) - "Sort STR into alphabetized list of individual letters." - (sort (split-string str "" t) #'string<)) - -(defun code-letters-to-string (str) - "Sort STR alphabetically and combine into one string." - (apply #'concat (code-letters str))) - -(defun remove-periods (str) - "Remove periods (full stops) from STR." - (string-replace "." "" str)) - -(defun list-pair (str) - "Create paired list from STR, STR (unchanged) and alphabetized order of STR." - ;; Remove periods from alphabetized order to make regex matching easier - (let ((letter-list (remove-periods (code-letters-to-string str)))) - (list letter-list str))) - -(defun pair-up (words) - "Make list of lists of paired words, one alphabetized one original." - (let ((paired-list) - (temp-pair)) - (dolist (word words) - (setq temp-pair (list-pair word)) - (push temp-pair paired-list)) - paired-list)) - -(defun create-list-of-numbers (my-list) - "Create list of numbers from MY-LIST." - (let ((list-of-numbers)) - (dolist (one-pair my-list) - (push (car one-pair) list-of-numbers)) - list-of-numbers)) - -(defun get-largest-number (my-list) - "Find largest number in MY-LIST." - (let ((list-of-numbers)) - (setq list-of-numbers (create-list-of-numbers my-list)) - (apply #'max list-of-numbers))) - -(defun make-list-matching-words (coded-word-and-original number-and-code-pair) - "List original words whose code matches code in NUMBER-AND-CODE-PAIR." - (dolist (word-pair coded-word-and-original) - ;; test if coded word in CODED-WORD-AND-ORIGINAL matches - ;; coded word in NUMBER-AND-CODE-PAIR - (when (string= (nth 0 word-pair) (nth 1 number-and-code-pair)) - ;; insert the original word - (insert (format "%s " (nth 1 word-pair))))) - (insert "\n")) - -(defun count-anagrams () - "Count the number of anagrams in file wordlist.txt" - (let ((coded-word-and-original) - (just-coded-words) - (unique-coded-words) - (count-and-code) - (number-of-anagrams) - (largest-number)) - ;; Path below needs to be adapted to individual case - (find-file "~/Documents/Elisp/wordlist.txt") - (beginning-of-buffer) - ;; create list of lists of coded words and originals - (setq coded-word-and-original (pair-up (split-string (buffer-string) "\n"))) - (find-file "temp-all-coded") - (erase-buffer) - (dolist (number-and-code-pair coded-word-and-original) - ;; make list of just the coded words - (push (nth 0 number-and-code-pair) just-coded-words)) - (dolist (one-word just-coded-words) - ;; write list of coded words to buffer for later processing - (insert (format "%s\n" one-word))) - ;; create a list of coded words with no repetitions - (setq unique-coded-words (seq-uniq just-coded-words)) - (dolist (one-code unique-coded-words) - (find-file "temp-all-coded") - (beginning-of-buffer) - ;; count the number of times ONE-CODE appears in buffer - (setq number-of-anagrams (how-many (format "^%s$" one-code))) - (if (>= number-of-anagrams 1) ; eliminate "words" of zero length - (push (list number-of-anagrams one-code) count-and-code))) - (find-file "anagram-listing") - (erase-buffer) - (setq largest-number (get-largest-number count-and-code)) - (dolist (number-and-code-pair count-and-code) - ;; when the number in NUMBER-AND-CODE-PAIR = largest number of anagrams - (when (= (nth 0 number-and-code-pair) largest-number) - (make-list-matching-words coded-word-and-original number-and-code-pair))))) diff --git a/Task/Anagrams/Emacs-Lisp/anagrams-2.el b/Task/Anagrams/Emacs-Lisp/anagrams-2.el deleted file mode 100644 index 4a6a2b9b3d..0000000000 --- a/Task/Anagrams/Emacs-Lisp/anagrams-2.el +++ /dev/null @@ -1,74 +0,0 @@ -(defun code-letters (str) - "Sort STR into alphabetized list of individual letters." - (sort (split-string str "" t) #'string<)) - -(defun code-letters-to-string (str) - "Sort STR alphabetically and combine into one string." - (apply #'concat (code-letters str))) - -(defun add-to-hash (key value table) - "If KEY exists, add VALUE to list of values. -If KEY does not exist, associate value with KEY." - (let ((current-values)) - (if (gethash key table) - (progn - (setq current-values (gethash key table)) - (setq current-values (push value current-values)) - (puthash key current-values table)) - (puthash key (list value) table)))) - -(defun create-list-of-numbers (hash-table) - "Create a list of numbers from HASH-TABLE." - (let ((current-number) - (list-of-numbers)) - (setq list-of-numbers (list)) ; omit? - (maphash (lambda (key value) - (setq current-number (car (gethash key hash-table))) - (push current-number list-of-numbers)) - hash-table) - list-of-numbers)) - -(defun find-largest-number-in-hash (hash-table) - "Find largest number in HASH-TABLE." - (let ((list-of-numbers)) - (setq list-of-numbers (create-list-of-numbers hash-table)) - (apply #'max list-of-numbers))) - -(defun find-longest-lists-of-anagrams (&optional file) - "Find the set(s) of largest number of anagrams in file wordlist.txt" - (let ((largest-number) - (hash-key) - (dictionary-table (make-hash-table :test 'equal))) - ;; Path and filename below needs to be adapted to individual case if - ;; FILE is *not* passed to this function - (with-temp-buffer - (insert-file-contents (or file "~/Documents/Elisp/wordlist.txt")) - (beginning-of-buffer) - ;; set up hash table with key and word(s) - ;; key = letters of word, but with letters in - ;; alphabetical order. Create list word(s) associated - ;; with key. - (dolist (current-word (split-string (buffer-string) "\n")) - (setq hash-key (code-letters-to-string current-word)) - (add-to-hash hash-key current-word dictionary-table)) - ;; Count number of anagram words - (maphash (lambda (key value) - "Add number of anagram words to VALUE." - (add-to-hash key (length (gethash key dictionary-table)) dictionary-table)) - dictionary-table) - ;; find the size of the largest list(s) of anagrams - (setq largest-number (find-largest-number-in-hash dictionary-table))) - ;; set up empty buffer to show results - (with-current-buffer (pop-to-buffer "anagram-listing") - (erase-buffer) - ;; show results - (maphash (lambda (key value) - "Display longest lists of anagrams." - (when (= largest-number (car (gethash key dictionary-table))) - (mapc - (lambda (element) - "Insert ELEMENT followed by one space in buffer." - (insert (format "%s " element))) - (cdr (gethash key dictionary-table))) - (insert "\n"))) - dictionary-table)))) diff --git a/Task/Anagrams/Euphoria/anagrams.eu b/Task/Anagrams/Euphoria/anagrams.euphoria similarity index 100% rename from Task/Anagrams/Euphoria/anagrams.eu rename to Task/Anagrams/Euphoria/anagrams.euphoria diff --git a/Task/Anagrams/Julia/anagrams.jl b/Task/Anagrams/Julia/anagrams.julia similarity index 100% rename from Task/Anagrams/Julia/anagrams.jl rename to Task/Anagrams/Julia/anagrams.julia diff --git a/Task/Anagrams/Kotlin/anagrams.kts b/Task/Anagrams/Kotlin/anagrams.kotlin similarity index 100% rename from Task/Anagrams/Kotlin/anagrams.kts rename to Task/Anagrams/Kotlin/anagrams.kotlin diff --git a/Task/Anagrams/OCaml/anagrams.ml b/Task/Anagrams/OCaml/anagrams.ocaml similarity index 100% rename from Task/Anagrams/OCaml/anagrams.ml rename to Task/Anagrams/OCaml/anagrams.ocaml diff --git a/Task/Anagrams/PascalABC.NET/anagrams.pas b/Task/Anagrams/PascalABC.NET/anagrams.pas deleted file mode 100644 index 937517fc8e..0000000000 --- a/Task/Anagrams/PascalABC.NET/anagrams.pas +++ /dev/null @@ -1,7 +0,0 @@ -begin - var s := System.Net.WebClient.Create.DownloadString('http://wiki.puzzlers.org/pub/wordlists/unixdict.txt'); - var words := s.Split; - var groups := words.GroupBy(word -> word.Order.JoinToString); - var maxCount := groups.Max(gr -> gr.Count); - groups.Where(gr -> gr.Count = maxCount).PrintLines; -end. diff --git a/Task/Anagrams/Pluto/anagrams.pluto b/Task/Anagrams/Pluto/anagrams.pluto deleted file mode 100644 index 5a71e6cda7..0000000000 --- a/Task/Anagrams/Pluto/anagrams.pluto +++ /dev/null @@ -1,20 +0,0 @@ -local fmt = require "fmt" - -local word_list = "unixdict.txt" -- local copy -local nl = os.platform == "windows" ? "\r\n" : "\n" -local words = io.contents(word_list):rstrip():split(nl):map(|w| -> w:strip()) -local word_map = {} -for words as word do - local letters = word:split("") - letters:sort() - local sorted_word = letters:concat("") - if word_map[sorted_word] then - word_map[sorted_word]:insert(word) - else - word_map[sorted_word] = {word} - end -end -local most = word_map:values():reduce(|max, v| -> #v > max ? #v : max, 0) -for key, val in word_map do - if #word_map[key] == most then fmt.lprint(val) end -end diff --git a/Task/Anagrams/PowerShell/anagrams-1.ps1 b/Task/Anagrams/PowerShell/anagrams-1.psh similarity index 100% rename from Task/Anagrams/PowerShell/anagrams-1.ps1 rename to Task/Anagrams/PowerShell/anagrams-1.psh diff --git a/Task/Anagrams/PowerShell/anagrams-2.ps1 b/Task/Anagrams/PowerShell/anagrams-2.psh similarity index 100% rename from Task/Anagrams/PowerShell/anagrams-2.ps1 rename to Task/Anagrams/PowerShell/anagrams-2.psh diff --git a/Task/Anagrams/Rebol/anagrams.rebol b/Task/Anagrams/Rebol/anagrams.rebol deleted file mode 100644 index b870201fcb..0000000000 --- a/Task/Anagrams/Rebol/anagrams.rebol +++ /dev/null @@ -1,29 +0,0 @@ -Rebol [ - title: "Rosetta code: Anagrams" - file: %Anagrams.r3 - url: https://rosettacode.org/wiki/Anagrams - note: "Based on Red language implementation!" -] -;; Build an anagram index from a local unix dictionary file and print the largest anagram families -m: make map! [] 25000 ;; pre-size a map for better performance (target ~25,000 keys) - -;; Ensure unixdict.txt exists locally; if not, download it -unless exists? %unixdict.txt [ - write %unixdict.txt read https://raw.githubusercontent.com/thundergnat/rc-run/refs/heads/master/rc/resources/unixdict.txt -] -;; Track the size of the largest anagram group found so far -maxx: 0 -;; Read the dictionary line-by-line -foreach word read/lines %unixdict.txt [ - sword: sort copy word ;; key = sorted letters of the word (anagram signature) - either find m sword [ ;; if we already have this signature - append m/:sword word ;; add the word to that anagram group - maxx: max maxx length? m/:sword ;; update maximum group size if needed - ][ ;; otherwise create a new group with this word - put m sword append copy [] word - ] -] -;; Print all groups that match the maximum size (i.e., largest anagram families) -foreach [k v] m [ - if maxx = length? v [print v] -] diff --git a/Task/Anagrams/Rust/anagrams-1.rs b/Task/Anagrams/Rust/anagrams-1.rust similarity index 100% rename from Task/Anagrams/Rust/anagrams-1.rs rename to Task/Anagrams/Rust/anagrams-1.rust diff --git a/Task/Anagrams/Rust/anagrams-2.rs b/Task/Anagrams/Rust/anagrams-2.rust similarity index 100% rename from Task/Anagrams/Rust/anagrams-2.rs rename to Task/Anagrams/Rust/anagrams-2.rust diff --git a/Task/Anagrams/Scheme/anagrams.scm b/Task/Anagrams/Scheme/anagrams.ss similarity index 100% rename from Task/Anagrams/Scheme/anagrams.scm rename to Task/Anagrams/Scheme/anagrams.ss diff --git a/Task/Anagrams/TAV/anagrams.tav b/Task/Anagrams/TAV/anagrams.tav deleted file mode 100644 index 6b940f7f6e..0000000000 --- a/Task/Anagrams/TAV/anagrams.tav +++ /dev/null @@ -1,38 +0,0 @@ -\( Find anagrams (words with the same set of letters) - Words are the lines of an input file. - Sorting the letters of the word gives the key for a map - having a list (row) of all words so far. -\) -\+ stdlib -main(parms):+ - parms[1] =~ 'unixdict.txt' \ default input file - wordmap =: get words from parms[1] - maxw =: wordmap.maxlen - ?# idx =: map wordmap give keys ascending - words =: wordmap{idx} - ? maxw = words.count - print words::join values by ', ' - -\ read the file (infn) and return a map -get words from (infn): - res =: new map \ create the result map - res.maxlen =: 0 - ?# line =: file infn give lines \ or: infn::give lines - add line to res - :> res - -\ add a word to the map -add (word) to (amap): - idx =: sort characters of word::case to upper - row =: amap{idx} \ get indexed words - ? row = () \ new entry if void - row =: new row - amap{idx} =: row - row[] =: word \ add new entry - amap.maxlen =: maximum of amap.maxlen, row.count - -\ Sort the characters of a string -sort characters of (s): - sr =: string s as character row - row sr sort ascending - :> row sr join values as string \ without separator diff --git a/Task/Anagrams/Uiua/anagrams.uiua b/Task/Anagrams/Uiua/anagrams.uiua deleted file mode 100644 index 8a388e72cb..0000000000 --- a/Task/Anagrams/Uiua/anagrams.uiua +++ /dev/null @@ -1,12 +0,0 @@ -# Experimental! -# The "Experimental!" comment above is required by the interpreter since &fetch is currently an experimental feature and is subject to change. - -# Grab the entire contents of the page as an array of bytes, then decode it into a string of text. -°utf₈ &fetch "https://raw.githubusercontent.com/thundergnat/rc-run/refs/heads/master/rc/resources/unixdict.txt" -°/$"_\n_" # Split the string into words by line breaks -# Group words that are anagrams together. -# This is done by first sorting the letters in each word to make a "key" and grouping words together that have the same key. -⊕□⊸(⊛⍚⍆) -# Count the number of words in each group, and keep only the groups that have the maximum number of words of any group. -▽⊸(=⊸/↥≡◇⧻) -≡&p # Print each group one at a time diff --git a/Task/Anagrams/Ursalang/anagrams.ursa b/Task/Anagrams/Ursalang/anagrams.ursa deleted file mode 100644 index 54ebff6dac..0000000000 --- a/Task/Anagrams/Ursalang/anagrams.ursa +++ /dev/null @@ -1,21 +0,0 @@ -use js.fetch -let text = fetch("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").text() -let words = text.split("\n") - -let anagrams = {} -for word in words.iter() { - let sorted = word.split("").sorted().join("") - if anagrams.get(sorted) == null { - anagrams.set(sorted, []) - } - anagrams.get(sorted).push(word) -} - -var most_anagrams = 0 -for ana in anagrams.values() { - if ana.len() > most_anagrams {most_anagrams := ana.len()} -} - -for ana in anagrams.values() { - if ana.len() == most_anagrams {print(ana)} -} diff --git a/Task/Anagrams/V-(Vlang)/anagrams.v b/Task/Anagrams/V-(Vlang)/anagrams.v index 85e11f3fdb..599471f1fa 100644 --- a/Task/Anagrams/V-(Vlang)/anagrams.v +++ b/Task/Anagrams/V-(Vlang)/anagrams.v @@ -1,18 +1,26 @@ import os fn main(){ - words := os.read_lines('unixdict.txt')! + words := os.read_lines('unixdict.txt')? + mut m := map[string][]string{} mut ma := 0 for word in words { mut letters := word.split('') letters.sort() sorted_word := letters.join('') - if sorted_word in m {m[sorted_word] << word} - else {m[sorted_word] = [word]} - if m[sorted_word].len > ma {ma = m[sorted_word].len} + if sorted_word in m { + m[sorted_word] << word + } else { + m[sorted_word] = [word] + } + if m[sorted_word].len > ma { + ma = m[sorted_word].len + } } for _, a in m { - if a.len == ma {println(a)} + if a.len == ma { + println(a) + } } } diff --git a/Task/Anagrams/VBScript/anagrams.vbs b/Task/Anagrams/VBScript/anagrams.vb similarity index 100% rename from Task/Anagrams/VBScript/anagrams.vbs rename to Task/Anagrams/VBScript/anagrams.vb diff --git a/Task/Angle-difference-between-two-bearings/8th/angle-difference-between-two-bearings.8th b/Task/Angle-difference-between-two-bearings/8th/angle-difference-between-two-bearings.8th deleted file mode 100644 index 2c80bde6fe..0000000000 --- a/Task/Angle-difference-between-two-bearings/8th/angle-difference-between-two-bearings.8th +++ /dev/null @@ -1,43 +0,0 @@ -\ diff-bearings.8th -\ Rosetta Code -- angle difference between two bearings -\ by John I. Helmers 2026.04.04 -\ 8th version 26.02 Professional - -11 ## \ sets the precision to 11 decimal places - -\ data array -[ [ 20 , 45 ] , [ -45 , 45 ] , [ -85 , 90 ] , [ -95 , 90 ] , [ -45 , 125 ] , [ -45 , 145 ] , [ 29.4803 , -88.6381 ] , [ -78.3251 , -159.036 ] ] constant BEARINGS - -\ test array -[ [ -70099.74233810938 , 29840.67437876723 ] , [ -165313.6666297357 , 33693.9894517456 ] , [ 1174.8380510598456 , -154146.66490124757 ] , [ 60175.77306795546 , 42213.07192354373 ] ] constant TEST - -360 constant LIMIT \ sets circle limit to 360 degrees - -: make-big-floats \ [ a0, a1, a2 ... ] -- [ a'0, a'1, a'2 ... ] - ( ( n:bfloat ) a:map ) a:map ; - -: subtract-bearings \ [b1,b2] -- n - 0 a:@ swap 1 a:@ rot n:- ; - -: simplify LIMIT n:fmod ; - -: find-acute \ n -- n - dup 180 > if 360 n:- else dup -180 < if 360 n:+ then then ; - -: compute-angles \ a -- a' - ( subtract-bearings simplify find-acute 2 swap a:! drop ) a:each! ; - -: .table-header \ -- -" b1___________________ b2__________________ diff_________________" . cr ; - -: .lines \ a -- | print each line of table - ( ( "%>24.11f" s:strfmt . ) a:each! drop cr ) a:each! ; - -: .table .table-header .lines ; - -: process-data make-big-floats compute-angles ; - -: do-it BEARINGS process-data .table drop cr - TEST process-data .table drop cr ; - -do-it bye diff --git a/Task/Angle-difference-between-two-bearings/ANSI-BASIC/angle-difference-between-two-bearings.basic b/Task/Angle-difference-between-two-bearings/ANSI-BASIC/angle-difference-between-two-bearings.basic deleted file mode 100644 index 9a7c6b0d99..0000000000 --- a/Task/Angle-difference-between-two-bearings/ANSI-BASIC/angle-difference-between-two-bearings.basic +++ /dev/null @@ -1,33 +0,0 @@ -100 REM Angle difference between two bearings -110 DECLARE EXTERNAL FUNCTION GetDiff -120 REM -130 SUB PrintRow(B1, B2) -140 PRINT USING "#######.###### #######.###### #######.######": B1, B2, GetDiff(B1, B2) -150 END SUB -160 REM -170 print "Input in -180 to +180 range" -180 PRINT " Bearing 1 Bearing 2 Difference" -190 CALL PrintRow(20.0, 45.0) -200 CALL PrintRow(-45.0, 45.0) -210 CALL PrintRow(-85.0, 90.0) -220 CALL PrintRow(-95.0, 90.0) -230 CALL PrintRow(-45.0, 125.0) -240 CALL PrintRow(-45.0, 145.0) -250 CALL PrintRow(-45.0, 125.0) -260 CALL PrintRow(-45.0, 145.0) -270 CALL PrintRow(29.4803, -88.6381) -280 CALL PrintRow(-78.3251, -159.036) -290 PRINT -300 PRINT "Input in wider range" -310 PRINT " Bearing 1 Bearing 2 Difference" -320 CALL PrintRow(-70099.74233810938, 29840.67437876723) -330 CALL PrintRow(-165313.6666297357, 33693.9894517456) -340 CALL PrintRow(1174.8380510598456, -154146.66490124757) -350 CALL PrintRow(60175.77306795546, 42213.07192354373) -360 END -370 REM -380 EXTERNAL FUNCTION GetDiff (B1, B2) -390 LET R = MOD(B2 - B1, 360.0) -400 IF R >= 180.0 THEN LET R = R - 360.0 -410 LET GetDiff = R -420 END FUNCTION diff --git a/Task/Angle-difference-between-two-bearings/Ada/angle-difference-between-two-bearings.adb b/Task/Angle-difference-between-two-bearings/Ada/angle-difference-between-two-bearings.ada similarity index 100% rename from Task/Angle-difference-between-two-bearings/Ada/angle-difference-between-two-bearings.adb rename to Task/Angle-difference-between-two-bearings/Ada/angle-difference-between-two-bearings.ada diff --git a/Task/Angle-difference-between-two-bearings/Agena/angle-difference-between-two-bearings.agena b/Task/Angle-difference-between-two-bearings/Agena/angle-difference-between-two-bearings.agena deleted file mode 100644 index 682112bf58..0000000000 --- a/Task/Angle-difference-between-two-bearings/Agena/angle-difference-between-two-bearings.agena +++ /dev/null @@ -1,34 +0,0 @@ -# Angle difference between two bearings - -proc getdiff(b1, b2) is - r := (b2 - b1) symmod 360.0; - if r >= 180.0 then r -:= 360.0 fi; - if r < -180.0 then r +:= 360.0 fi; - return r -end; - -proc printrow(b1, b2) is - printf("%14.6f %14.6f %14.6f\n", b1, b2, getdiff(b1, b2)) -end; - -scope - print("Input in -180 to +180 range"); - print(" Bearing 1 Bearing 2 Difference"); - printrow(20.0, 45.0); - printrow(-45.0, 45.0); - printrow(-85.0, 90.0); - printrow(-95.0, 90.0); - printrow(-45.0, 125.0); - printrow(-45.0, 145.0); - printrow(-45.0, 125.0); - printrow(-45.0, 145.0); - printrow(29.4803, -88.6381); - printrow(-78.3251, -159.036); - print(); - print("Input in wider range"); - print(" Bearing 1 Bearing 2 Difference"); - printrow(-70099.74233810938, 29840.67437876723); - printrow(-165313.6666297357, 33693.9894517456); - printrow(1174.8380510598456, -154146.66490124757); - printrow(60175.77306795546, 42213.07192354373) -epocs diff --git a/Task/Angle-difference-between-two-bearings/AppleScript/angle-difference-between-two-bearings.applescript b/Task/Angle-difference-between-two-bearings/AppleScript/angle-difference-between-two-bearings.applescript deleted file mode 100644 index 21f8f17583..0000000000 --- a/Task/Angle-difference-between-two-bearings/AppleScript/angle-difference-between-two-bearings.applescript +++ /dev/null @@ -1,18 +0,0 @@ -on diff_bearing({b1, b2}) - set r to (b2 - b1) mod 360 - if r > 180 then - r - 360 - else if r < -180 then - r + 360 - else - r - end if -end diff_bearing - -set test_bearings to {{20, 45}, {-45, 45}, {-85, 90}, {-95, 90}, {-45, 125}, {-45, 145}, {29.4803, -88.6381}, {-78.3251, -159.036}} - -set big_bearings to {{-7.00997423381094E+4, 2.98406743787672E+4}, {-1.65313666629736E+5, 3.36939894517456E+4}, {1174.838051059846, -1.54146664901248E+5}, {6.01757730679555E+4, 4.22130719235437E+4}} - -repeat with b in test_bearings & big_bearings - log diff_bearing(b) -end repeat diff --git a/Task/Angle-difference-between-two-bearings/Ballerina/angle-difference-between-two-bearings.ballerina b/Task/Angle-difference-between-two-bearings/Ballerina/angle-difference-between-two-bearings.ballerina deleted file mode 100644 index 213bb46d14..0000000000 --- a/Task/Angle-difference-between-two-bearings/Ballerina/angle-difference-between-two-bearings.ballerina +++ /dev/null @@ -1,34 +0,0 @@ -import ballerina/io; - -function subtract(float b1, float b2) returns float { - float d = (b2 - b1) % 360.0; - if d < -180.0 { d += 360.0; } - if d >= 180.0 { d -= 360.0; } - return d.round(4); -} - -public function main() { - float[][] pairs = [ - [ 20, 45], - [-45, 45], - [-85, 90], - [-95, 90], - [-45, 125], - [-45, 145], - [ 29.4803, -88.6381], - [-78.3251, -159.036], - [-70099.74233810938, 29840.67437876723], - [-165313.6666297357, 33693.9894517456], - [1174.8380510598456, -154146.66490124757], - [60175.77306795546, 42213.07192354373] - ]; - - io:println("Differences (to 4dp) between these bearings:"); - foreach var pair in pairs { - float p0 = pair[0]; - float p1 = pair[1]; - float diff = subtract(p0, p1); - string offset = p0 < 0.0 ? " " : " "; - io:println(`${offset}${p0} and ${p1} -> ${diff}`); - } -} diff --git a/Task/Angle-difference-between-two-bearings/C++/angle-difference-between-two-bearings.cpp b/Task/Angle-difference-between-two-bearings/C++/angle-difference-between-two-bearings.cpp index 92cb3f68b7..af35a7815c 100644 --- a/Task/Angle-difference-between-two-bearings/C++/angle-difference-between-two-bearings.cpp +++ b/Task/Angle-difference-between-two-bearings/C++/angle-difference-between-two-bearings.cpp @@ -2,40 +2,34 @@ #include using namespace std; -double getDifference(double b1, double b2) -{ - double r = fmod(b2 - b1, 360.0); - if (r < -180.0) - r += 360.0; - if (r >= 180.0) - r -= 360.0; - return r; -} - -inline void printRow(double b1, double b2) -{ - cout << getDifference(b1, b2) << endl; +double getDifference(double b1, double b2) { + double r = fmod(b2 - b1, 360.0); + if (r < -180.0) + r += 360.0; + if (r >= 180.0) + r -= 360.0; + return r; } int main() { - cout << "Input in -180 to +180 range" << endl; - printRow(20.0, 45.0); - printRow(-45.0, 45.0); - printRow(-85.0, 90.0); - printRow(-95.0, 90.0); - printRow(-45.0, 125.0); - printRow(-45.0, 145.0); - printRow(-45.0, 125.0); - printRow(-45.0, 145.0); - printRow(29.4803, -88.6381); - printRow(-78.3251, -159.036); + cout << "Input in -180 to +180 range" << endl; + cout << getDifference(20.0, 45.0) << endl; + cout << getDifference(-45.0, 45.0) << endl; + cout << getDifference(-85.0, 90.0) << endl; + cout << getDifference(-95.0, 90.0) << endl; + cout << getDifference(-45.0, 125.0) << endl; + cout << getDifference(-45.0, 145.0) << endl; + cout << getDifference(-45.0, 125.0) << endl; + cout << getDifference(-45.0, 145.0) << endl; + cout << getDifference(29.4803, -88.6381) << endl; + cout << getDifference(-78.3251, -159.036) << endl; + + cout << "Input in wider range" << endl; + cout << getDifference(-70099.74233810938, 29840.67437876723) << endl; + cout << getDifference(-165313.6666297357, 33693.9894517456) << endl; + cout << getDifference(1174.8380510598456, -154146.66490124757) << endl; + cout << getDifference(60175.77306795546, 42213.07192354373) << endl; - cout << endl << "Input in wider range" << endl; - printRow(-70099.74233810938, 29840.67437876723); - printRow(-165313.6666297357, 33693.9894517456); - printRow(1174.8380510598456, -154146.66490124757); - printRow(60175.77306795546, 42213.07192354373); - - return 0; + return 0; } diff --git a/Task/Angle-difference-between-two-bearings/COBOL/angle-difference-between-two-bearings.cob b/Task/Angle-difference-between-two-bearings/COBOL/angle-difference-between-two-bearings.cobol similarity index 100% rename from Task/Angle-difference-between-two-bearings/COBOL/angle-difference-between-two-bearings.cob rename to Task/Angle-difference-between-two-bearings/COBOL/angle-difference-between-two-bearings.cobol diff --git a/Task/Angle-difference-between-two-bearings/Crystal/angle-difference-between-two-bearings.cr b/Task/Angle-difference-between-two-bearings/Crystal/angle-difference-between-two-bearings.cr deleted file mode 100644 index 24aa61f987..0000000000 --- a/Task/Angle-difference-between-two-bearings/Crystal/angle-difference-between-two-bearings.cr +++ /dev/null @@ -1,14 +0,0 @@ -def angle_diff (a1, a2) - diff = (a2 - a1) % 360 - diff -= 360 if diff > +180 - diff -end - -rows = [{20, 45}, {-45, 45}, {-85, 90}, {-95, 90}, {-45, 125}, {-45, 145}, - {29.4803, -88.6381}, {-78.3251, -159.036}, - {-70099.74233810938, 29840.67437876723}, - {-165313.6666297357, 33693.9894517456}, - {1174.8380510598456, -154146.66490124757}, - {60175.77306795546, 42213.07192354373}].each do |b1, b2| - puts "Angle difference between %12.4f and %12.4f is %9.4f°" % { b1, b2, angle_diff(b1, b2) } -end diff --git a/Task/Angle-difference-between-two-bearings/EasyLang/angle-difference-between-two-bearings.easy b/Task/Angle-difference-between-two-bearings/EasyLang/angle-difference-between-two-bearings.easy index 052ea0af48..fbe96a9106 100644 --- a/Task/Angle-difference-between-two-bearings/EasyLang/angle-difference-between-two-bearings.easy +++ b/Task/Angle-difference-between-two-bearings/EasyLang/angle-difference-between-two-bearings.easy @@ -7,7 +7,7 @@ func angdiff a b . . return r . -proc pd a b . +proc pd a b . . print b & " " & a & " -> " & angdiff a b . pd 20 45 diff --git a/Task/Angle-difference-between-two-bearings/Julia/angle-difference-between-two-bearings.jl b/Task/Angle-difference-between-two-bearings/Julia/angle-difference-between-two-bearings.julia similarity index 100% rename from Task/Angle-difference-between-two-bearings/Julia/angle-difference-between-two-bearings.jl rename to Task/Angle-difference-between-two-bearings/Julia/angle-difference-between-two-bearings.julia diff --git a/Task/Angle-difference-between-two-bearings/Kotlin/angle-difference-between-two-bearings.kts b/Task/Angle-difference-between-two-bearings/Kotlin/angle-difference-between-two-bearings.kotlin similarity index 100% rename from Task/Angle-difference-between-two-bearings/Kotlin/angle-difference-between-two-bearings.kts rename to Task/Angle-difference-between-two-bearings/Kotlin/angle-difference-between-two-bearings.kotlin diff --git a/Task/Angle-difference-between-two-bearings/Langur/angle-difference-between-two-bearings.langur b/Task/Angle-difference-between-two-bearings/Langur/angle-difference-between-two-bearings.langur deleted file mode 100644 index 469a77ae69..0000000000 --- a/Task/Angle-difference-between-two-bearings/Langur/angle-difference-between-two-bearings.langur +++ /dev/null @@ -1,26 +0,0 @@ -val diff = fn(b1 number, b2 number) { - val r = (b2 - b1) mod 360 - if r > 180 { r - 360 } else { r } -} - -val pairs = [ - [ 20, 45], - [-45, 45], - [-85, 90], - [-95, 90], - [-45, 125], - [-45, 145], - [ 29.4803, -88.6381], - [-78.3251, -159.036], - [-70099.74233810938, 29840.67437876723], - [-165313.6666297357, 33693.9894517456], - [1174.8380510598456, -154146.66490124757], - [60175.77306795546, 42213.07192354373], -] - -writeln " b1 b2 diff" -writeln "-" * 63 - -for b in pairs { - writeln "{{b[1] : 21}}{{b[2] : 21}}{{diff(b[1], b[2]) : 21}}" -} diff --git a/Task/Angle-difference-between-two-bearings/Maxima/angle-difference-between-two-bearings.maxima b/Task/Angle-difference-between-two-bearings/Maxima/angle-difference-between-two-bearings.maxima deleted file mode 100644 index 343fb0dcaf..0000000000 --- a/Task/Angle-difference-between-two-bearings/Maxima/angle-difference-between-two-bearings.maxima +++ /dev/null @@ -1,16 +0,0 @@ -diff_bearing(b1, b2) := block( - r: mod(b2-b1, 360), - if r>180 then r-360 else r)$ - -test_bearings: [[20, 45], [-45, 45], [-85, 90], -[-95, 90], [-45, 125], [-45, 145], -[29.4803, -88.6381], [-78.3251, -159.036]]$ - -big_bearings: [[-70099.74233810938, 29840.67437876723], - [-165313.6666297357, 33693.9894517456], - [1174.8380510598456, -154146.66490124757], - [60175.77306795546, 42213.07192354373]]$ - -db_unary(list) := map(lambda([l], apply(diff_bearing, l)), list)$ -db_unary(test_bearings); -db_unary(big_bearings); diff --git a/Task/Angle-difference-between-two-bearings/OCaml/angle-difference-between-two-bearings.ml b/Task/Angle-difference-between-two-bearings/OCaml/angle-difference-between-two-bearings.ocaml similarity index 100% rename from Task/Angle-difference-between-two-bearings/OCaml/angle-difference-between-two-bearings.ml rename to Task/Angle-difference-between-two-bearings/OCaml/angle-difference-between-two-bearings.ocaml diff --git a/Task/Angle-difference-between-two-bearings/PHP/angle-difference-between-two-bearings.php b/Task/Angle-difference-between-two-bearings/PHP/angle-difference-between-two-bearings.php deleted file mode 100644 index 0cec699805..0000000000 --- a/Task/Angle-difference-between-two-bearings/PHP/angle-difference-between-two-bearings.php +++ /dev/null @@ -1,38 +0,0 @@ - 180.0) - $r -= 360.0; - if ($r < -180.0) - $r += 360.0; - return $r; - } - - function echo_row($b1, $b2) { - echo str_pad(number_format($b1, 6, ".", ""), 14, " ", STR_PAD_LEFT).' '; - echo str_pad(number_format($b2, 6, ".", ""), 14, " ", STR_PAD_LEFT).' '; - echo str_pad(number_format(get_diff($b1, $b2), 6), 14, " ", STR_PAD_LEFT); - echo "\n"; - } - - echo "Input in -180 to +180 range\n"; - echo " Bearing 1 Bearing 2 Difference\n"; - echo_row(20.0, 45.0); - echo_row(-45.0, 45.0); - echo_row(-85.0, 90.0); - echo_row(-95.0, 90.0); - echo_row(-45.0, 125.0); - echo_row(-45.0, 145.0); - echo_row(-45.0, 125.0); - echo_row(-45.0, 145.0); - echo_row(29.4803, -88.6381); - echo_row(-78.3251, -159.036); - echo "\nInput in wider range\n"; - echo " Bearing 1 Bearing 2 Difference\n"; - echo_row(-70099.74233810938, 29840.67437876723); - echo_row(-165313.6666297357, 33693.9894517456); - echo_row(1174.8380510598456, -154146.66490124757); - echo_row(60175.77306795546, 42213.07192354373); -?> diff --git a/Task/Angle-difference-between-two-bearings/Pascal-P/angle-difference-between-two-bearings.pas b/Task/Angle-difference-between-two-bearings/Pascal-P/angle-difference-between-two-bearings.pas deleted file mode 100644 index 597ba6ee6b..0000000000 --- a/Task/Angle-difference-between-two-bearings/Pascal-P/angle-difference-between-two-bearings.pas +++ /dev/null @@ -1,46 +0,0 @@ -program anglebearings(output); - (* Angle difference between two bearings *) - - function rmod(x1, x2: real): real; - begin - rmod := x1 - trunc(x1 / x2) * x2; - end; - - function getdiff(b1, b2: real): real; - var - r: real; - begin - r := rmod((b2 - b1), 360.0); - if r >= 180.0 then - r := r - 360.0; - if r < -180.0 then - r := r + 360.0; - getdiff := r; - end; - - procedure writerow(b1, b2: real); - begin - writeln(b1: 14, ' ', b2: 14, ' ', getdiff(b1, b2):14); - end; - -begin - writeln('Input in -180 to +180 range'); - writeln(' Bearing 1 Bearing 2 Difference'); - writerow(20.0, 45.0); - writerow(-45.0, 45.0); - writerow(-85.0, 90.0); - writerow(-95.0, 90.0); - writerow(-45.0, 125.0); - writerow(-45.0, 145.0); - writerow(-45.0, 125.0); - writerow(-45.0, 145.0); - writerow(29.4803, -88.6381); - writerow(-78.3251, -159.036); - writeln; - writeln('Input in wider range'); - writeln(' Bearing 1 Bearing 2 Difference'); - writerow(-70099.74233810938, 29840.67437876723); - writerow(-165313.6666297357, 33693.9894517456); - writerow(1174.8380510598456, -154146.66490124757); - writerow(60175.77306795546, 42213.07192354373) -end. diff --git a/Task/Angle-difference-between-two-bearings/PascalABC.NET/angle-difference-between-two-bearings.pas b/Task/Angle-difference-between-two-bearings/PascalABC.NET/angle-difference-between-two-bearings.pas deleted file mode 100644 index 7886d30040..0000000000 --- a/Task/Angle-difference-between-two-bearings/PascalABC.NET/angle-difference-between-two-bearings.pas +++ /dev/null @@ -1,16 +0,0 @@ -function delta(b1, b2: real): real; -begin - result := (b2 - b1) - Trunc((b2 - b1) / 360.0) * 360.0; - if result < -180.0 then result += 360.0 - else if result >= 180.0 then result -= 360.0 -end; - -begin - var testVectors := - |(20.00, 45.00), (-45.00, 45.00), (-85.00, 90.00), - (-95.00, 90.00), (-45.00, 125.00), (-45.00, 145.00), - (29.48, -88.64), (-78.33, -159.04), (-70099.74, 29840.67), - (-165313.67, 33693.99), (1174.84, -154146.66), (60175.77, 42213.07)|; - foreach var vector in testVectors do - writeln(vector[0]:10:2, vector[1]:12:2, delta(vector[0], vector[1]):10:2); -end. diff --git a/Task/Angle-difference-between-two-bearings/Pluto/angle-difference-between-two-bearings.pluto b/Task/Angle-difference-between-two-bearings/Pluto/angle-difference-between-two-bearings.pluto deleted file mode 100644 index afb336106a..0000000000 --- a/Task/Angle-difference-between-two-bearings/Pluto/angle-difference-between-two-bearings.pluto +++ /dev/null @@ -1,31 +0,0 @@ -require "math2" - -local function subtract(b1, b2) - local d = (b2 - b1) % 360 - if d < -180 then d += 360 end - if d >= 180 then d -= 360 end - return math.toplaces(d, 4) -end - -local pairs = { - { 20, 45}, - {-45, 45}, - {-85, 90}, - {-95, 90}, - {-45, 125}, - {-45, 145}, - { 29.4803, -88.6381}, - {-78.3251, -159.036}, - {-70099.74233810938, 29840.67437876723}, - {-165313.6666297357, 33693.9894517456}, - {1174.8380510598456, -154146.66490124757}, - {60175.77306795546, 42213.07192354373} -} - -print("Differences (to 4dp) between these bearings:") -for pairs as pair do - local [p1, p2] = pair - local diff = subtract(p1, p2) - local offset = p1 < 0 ? " " : " " - print($"{offset}{p1} and {p2} -> {diff}") -end diff --git a/Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-1.ps1 b/Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-1.psh similarity index 100% rename from Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-1.ps1 rename to Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-1.psh diff --git a/Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-2.ps1 b/Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-2.psh similarity index 100% rename from Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-2.ps1 rename to Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-2.psh diff --git a/Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-3.ps1 b/Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-3.ps1 deleted file mode 100644 index ae4fb0c542..0000000000 --- a/Task/Angle-difference-between-two-bearings/PowerShell/angle-difference-between-two-bearings-3.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -# Angle difference between two bearings - -function Get-Diff([double]$B1, [double]$B2) { - $r = ($B2 - $B1) % 360.0 - if ($r -lt -180.0) { - $r += 360.0 - } - if ($r -ge 180.0) { - $r -= 360.0 - } - return [double]$r -} - -function Write-Row([double]$B1, [double]$B2) { - [string]$out = "$($B1.ToString('#######.000000').PadLeft(14,' '))" - $out += " $($B2.ToString('#######.000000').PadLeft(14,' '))" - $out += " $((Get-Diff $B1 $B2).ToString('#######.000000').PadLeft(14,' '))" - Write-Output $out -} - -Write-Output "Input in -180 to +180 range" -Write-Output " Bearing 1 Bearing 2 Difference" -Write-Row 20.0 45.0 -Write-Row -45.0 45.0 -Write-Row -85.0 90.0 -Write-Row -95.0 90.0 -Write-Row -45.0 125.0 -Write-Row -45.0 145.0 -Write-Row -45.0 125.0 -Write-Row -45.0 145.0 -Write-Row 29.4803 -88.6381 -Write-Row -78.3251 -159.036 -Write-Output "" -Write-Output "Input in wider range" -Write-Output " Bearing 1 Bearing 2 Difference" -Write-Row -70099.74233810938 29840.67437876723 -Write-Row -165313.6666297357 33693.9894517456 -Write-Row 1174.8380510598456 -154146.66490124757 -Write-Row 60175.77306795546 42213.07192354373 diff --git a/Task/Angle-difference-between-two-bearings/R/angle-difference-between-two-bearings.r b/Task/Angle-difference-between-two-bearings/R/angle-difference-between-two-bearings.r deleted file mode 100644 index b561b24310..0000000000 --- a/Task/Angle-difference-between-two-bearings/R/angle-difference-between-two-bearings.r +++ /dev/null @@ -1,17 +0,0 @@ -diff_bearing <- function(b1, b2){ - r <- (b2-b1)%%360 - ifelse(r>180, r-360, r) -} - -test_bearings <- list(c(20, 45), c(-45, 45), c(-85, 90), - c(-95, 90), c(-45, 125), c(-45, 145), - c(29.4803, -88.6381), c(-78.3251, -159.036)) - -test_bigbearings <- list(c(-70099.74233810938, 29840.67437876723), - c(-165313.6666297357, 33693.9894517456), - c(1174.8380510598456, -154146.66490124757), - c(60175.77306795546, 42213.07192354373)) - -db_unary <- function(v) do.call(diff_bearing, as.list(v)) -sapply(test_bearings, db_unary) -sapply(test_bigbearings, db_unary) diff --git a/Task/Angle-difference-between-two-bearings/Red/angle-difference-between-two-bearings.red b/Task/Angle-difference-between-two-bearings/Red/angle-difference-between-two-bearings.red deleted file mode 100644 index ca3975359e..0000000000 --- a/Task/Angle-difference-between-two-bearings/Red/angle-difference-between-two-bearings.red +++ /dev/null @@ -1,26 +0,0 @@ -anglediff: func [b1 b2 /local r][ - r: mod (b2 - b1) 360 - either r >= 180 - [ r - 360 ] - [ r ] -] - -b1: 180 -b2: -180 - -test-list: [ - [20 45] - [-45 45] - [-85 90] - [-95 90] - [-45 125] - [-45 145] - [29.4803 -88.6381] - [-78.3251 -159.036] -] - -foreach test-case test-list [ - b1: test-case/1 - b2: test-case/2 - print [ "b1 : " b1 " b2 : " b2 "angle diff b2 - b1 : " (anglediff b1 b2)] -] diff --git a/Task/Angle-difference-between-two-bearings/Rust/angle-difference-between-two-bearings.rs b/Task/Angle-difference-between-two-bearings/Rust/angle-difference-between-two-bearings.rust similarity index 100% rename from Task/Angle-difference-between-two-bearings/Rust/angle-difference-between-two-bearings.rs rename to Task/Angle-difference-between-two-bearings/Rust/angle-difference-between-two-bearings.rust diff --git a/Task/Angle-difference-between-two-bearings/Scheme/angle-difference-between-two-bearings.scm b/Task/Angle-difference-between-two-bearings/Scheme/angle-difference-between-two-bearings.ss similarity index 100% rename from Task/Angle-difference-between-two-bearings/Scheme/angle-difference-between-two-bearings.scm rename to Task/Angle-difference-between-two-bearings/Scheme/angle-difference-between-two-bearings.ss diff --git a/Task/Angle-difference-between-two-bearings/Uiua/angle-difference-between-two-bearings.uiua b/Task/Angle-difference-between-two-bearings/Uiua/angle-difference-between-two-bearings.uiua deleted file mode 100644 index 7d01db2c61..0000000000 --- a/Task/Angle-difference-between-two-bearings/Uiua/angle-difference-between-two-bearings.uiua +++ /dev/null @@ -1,7 +0,0 @@ -Wrap ← ◌◌⍢(⊙⟜+|<⊙⋅∘)⊙◌⊢⟜(⍢(⊙⟜-|>⊙⋅∘)⊣)⟜/- -Diff ← Wrap [¯180 180]/- -[20_45 ¯45_45 ¯85_90 ¯95_90 ¯45_125 ¯45_145 29.4803_¯88.6381 ¯78.3251_¯159.036] -≡(⁅₃Diff) -[¯70099.7423_29840.6744 ¯165313.6666_33693.9895 - 1174.8381_¯154146.6649 60175.7731_42213.0719] -≡(⁅₃Diff) diff --git a/Task/Angles-geometric-normalization-and-conversion/Ada/angles-geometric-normalization-and-conversion.adb b/Task/Angles-geometric-normalization-and-conversion/Ada/angles-geometric-normalization-and-conversion.adb deleted file mode 100644 index b63341ec27..0000000000 --- a/Task/Angles-geometric-normalization-and-conversion/Ada/angles-geometric-normalization-and-conversion.adb +++ /dev/null @@ -1,226 +0,0 @@ --- Rosetta Code Task written in Ada --- Angles (geometric), normalization and conversion --- https://rosettacode.org/wiki/Angles_(geometric),_normalization_and_conversion --- translation from C (conversion functions) and (loosely) Lua (output table formatting) --- July 2024, R. B. E. - --- To Do: --- Specific float format/precision rather than generic? - -with Ada.Text_IO; use Ada.Text_IO; -with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; -with Ada.Float_Text_IO; use Ada.Float_Text_IO; -with Ada.Strings.Fixed; use Ada.Strings.Fixed; -with Ada.Numerics; - -procedure Angles_Geometric_Normalization_and_Conversion is - Pi : constant := Ada.Numerics.Pi; - Two_Pi : constant := 2.0 * Ada.Numerics.Pi; - - function Normalize_to_Deg (a : Float) return Float is - tmp : Float := a; - begin --- while (tmp < 0.0) loop - while (tmp < -360.0) loop -- task description says to preserve negative input angles - tmp := tmp + 360.0; - end loop; - while (tmp >= 360.0) loop - tmp := tmp - 360.0; - end loop; - return tmp; - end Normalize_to_Deg; - - function Normalize_to_Grad (a : Float) return Float is - tmp : Float := a; - begin - while (tmp < 0.0) loop -- task description says to preserve negative input angles (punting) - tmp := tmp + 400.0; - end loop; - while (tmp >= 400.0) loop - tmp := tmp - 400.0; - end loop; - return tmp; - end Normalize_to_Grad; - - function Normalize_to_Mil (a : Float) return Float is - tmp : Float := a; - begin - while (tmp < 0.0) loop -- task description says to preserve negative input angles (punting) - tmp := tmp + 6400.0; - end loop; - while (tmp >= 6400.0) loop - tmp := tmp - 6400.0; - end loop; - return tmp; - end Normalize_to_Mil; - - function Normalize_to_Rad (a : Float) return Float is - tmp : Float := a; - begin - while (tmp < 0.0) loop -- task description says to preserve negative input angles (punting) - tmp := tmp + Two_Pi; - end loop; - while (tmp >= Two_Pi) loop - tmp := tmp - Two_Pi; - end loop; - return tmp; - end Normalize_to_Rad; - - function Deg_to_Grad (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (10.0 / 9.0); - return tmp; - end Deg_to_Grad; - - function Deg_to_Mil (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (160.0 / 9.0); - return tmp; - end Deg_to_Mil; - - function Deg_to_Rad (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (Pi / 180.0); - return tmp; - end Deg_to_Rad; - - function Grad_to_Deg (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (9.0 / 10.0); - return tmp; - end Grad_to_Deg; - - function Grad_to_Mil (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * 16.0; - return tmp; - end Grad_to_Mil; - - function Grad_to_Rad (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (Pi / 200.0); - return tmp; - end Grad_to_Rad; - - function Mil_to_Deg (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (9.0 / 160.0); - return tmp; - end Mil_to_Deg; - - function Mil_to_Grad (a : Float) return Float is - tmp : Float := a; - begin - tmp := a / 16.0; - return tmp; - end Mil_to_Grad; - - function Mil_to_Rad (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (Pi / 3200.0); - return tmp; - end Mil_to_Rad; - - function Rad_to_Deg (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (180.0 / Pi); - return tmp; - end Rad_to_Deg; - - function Rad_to_Grad (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (200.0 / Pi); - return tmp; - end Rad_to_Grad; - - function Rad_to_Mil (a : Float) return Float is - tmp : Float := a; - begin - tmp := a * (3200.0 / Pi); - return tmp; - end Rad_to_Mil; - - Three_Spaces : constant String := 3 * " "; - - type Index is range 1 .. 12; - type Test_Values_Array is array (Index) of Float; - Test_Values : Test_Values_Array := - (Float (-2), Float (-1), Float (0), Float (1), Float (2), - 6.2831853, Float (16), 57.2957795, Float (359), - Float (399), Float (6399), Float (1000000)); - -begin - Put_Line (" DEGREES GRADIANS MILS RADIANS"); - Put_Line (" TEST VALUE Normalized Converted Converted Converted"); - for I in Index loop - Put (Test_Values (I), Exp => 0, Aft => 8, Fore => 8); - Put (Three_Spaces); - Put (Normalize_to_Deg (Test_Values (I)), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Deg_to_Grad (Normalize_to_Deg (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Deg_to_Mil (Normalize_to_Deg (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Deg_to_Rad (Normalize_to_Deg (Test_Values (I))), Exp => 0, Aft => 8, Fore => 2); - New_Line; - end loop; - - New_Line; - Put_Line (" GRADIANS MILS RADIANS DEGREES"); - Put_Line (" TEST VALUE Normalized Converted Converted Converted"); - for I in Index loop - Put (Test_Values (I), Exp => 0, Aft => 8, Fore => 8); - Put (Three_Spaces); - Put (Normalize_to_Grad (Test_Values (I)), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Grad_to_Mil (Normalize_to_Grad (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Grad_to_Rad (Normalize_to_Grad (Test_Values (I))), Exp => 0, Aft => 8, Fore => 2); - Put (Three_Spaces); - Put (Grad_to_Deg (Normalize_to_Grad (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - New_Line; - end loop; - - New_Line; - Put_Line (" MILS RADIANS DEGREES GRADIANS"); - Put_Line (" TEST VALUE Normalized Converted Converted Converted"); - for I in Index loop - Put (Test_Values (I), Exp => 0, Aft => 8, Fore => 8); - Put (Three_Spaces); - Put (Normalize_to_Mil (Test_Values (I)), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Mil_to_Rad (Normalize_to_Mil (Test_Values (I))), Exp => 0, Aft => 8, Fore => 2); - Put (Three_Spaces); - Put (Mil_to_Deg (Normalize_to_Mil (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Mil_to_Grad (Normalize_to_Mil (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - New_Line; - end loop; - - New_Line; - Put_Line (" RADIANS DEGREES GRADIANS MILS"); - Put_Line (" TEST VALUE Normalized Converted Converted Converted"); - for I in Index loop - Put (Test_Values (I), Exp => 0, Aft => 8, Fore => 8); - Put (Three_Spaces); - Put (Normalize_to_Rad (Test_Values (I)), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Rad_to_Deg (Normalize_to_Rad (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Rad_to_Grad (Normalize_to_Rad (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - Put (Three_Spaces); - Put (Rad_to_Mil (Normalize_to_Rad (Test_Values (I))), Exp => 0, Aft => 8, Fore => 4); - New_Line; - end loop; - -end Angles_Geometric_Normalization_and_Conversion; diff --git a/Task/Angles-geometric-normalization-and-conversion/Crystal/angles-geometric-normalization-and-conversion.cr b/Task/Angles-geometric-normalization-and-conversion/Crystal/angles-geometric-normalization-and-conversion.cr deleted file mode 100644 index e3f6f91d51..0000000000 --- a/Task/Angles-geometric-normalization-and-conversion/Crystal/angles-geometric-normalization-and-conversion.cr +++ /dev/null @@ -1,32 +0,0 @@ -def d2d (a) a % 360 end -def g2g (a) a % 400 end -def m2m (a) a % 6400 end -def r2r (a) a.to_f % (2*Math::PI) end - -def d2g (a) d2d(a)/360 * 400 end -def d2m (a) d2d(a)/360 * 6400 end -def d2r (a) d2d(a)/360 * 2*Math::PI end - -def g2d (a) g2g(a)/400 * 360 end -def g2m (a) g2g(a)/400 * 6400 end -def g2r (a) g2g(a)/400 * 2*Math::PI end - -def m2d (a) m2m(a)/6400 * 360 end -def m2g (a) m2m(a)/6400 * 400 end -def m2r (a) m2m(a)/6400 * 2*Math::PI end - -def r2d (a) r2r(a)/(2*Math::PI) * 360 end -def r2g (a) r2r(a)/(2*Math::PI) * 400 end -def r2m (a) r2r(a)/(2*Math::PI) * 6400 end - -angles = [-2, -1, 0, 1, 2, 6.2831853, 16, 57.2957795, 359, 399, 6399, 1000000] - -puts "%-12s %-8s %12s %12s %12s %12s" % {"Angle", "Unit", "Degrees", "Gradians", "Mils", "Radians"} -puts "-"*(12+8+12+12+12+12+5) -angles.each do |a| - puts "%-12g %-8s %12g %12g %12g %12g" % {a, "degrees", d2d(a), d2g(a), d2m(a), d2r(a) } - puts "%-12g %-8s %12g %12g %12g %12g" % {a, "gradians", g2d(a), g2g(a), g2m(a), g2r(a) } - puts "%-12g %-8s %12g %12g %12g %12g" % {a, "mils", m2d(a), m2g(a), m2m(a), m2r(a) } - puts "%-12g %-8s %12g %12g %12g %12g" % {a, "radians", r2d(a), r2g(a), r2m(a), r2r(a) } - puts -end diff --git a/Task/Angles-geometric-normalization-and-conversion/Delphi/angles-geometric-normalization-and-conversion.pas b/Task/Angles-geometric-normalization-and-conversion/Delphi/angles-geometric-normalization-and-conversion.delphi similarity index 100% rename from Task/Angles-geometric-normalization-and-conversion/Delphi/angles-geometric-normalization-and-conversion.pas rename to Task/Angles-geometric-normalization-and-conversion/Delphi/angles-geometric-normalization-and-conversion.delphi diff --git a/Task/Angles-geometric-normalization-and-conversion/EasyLang/angles-geometric-normalization-and-conversion.easy b/Task/Angles-geometric-normalization-and-conversion/EasyLang/angles-geometric-normalization-and-conversion.easy index 2a63ef3ad8..546d276c89 100644 --- a/Task/Angles-geometric-normalization-and-conversion/EasyLang/angles-geometric-normalization-and-conversion.easy +++ b/Task/Angles-geometric-normalization-and-conversion/EasyLang/angles-geometric-normalization-and-conversion.easy @@ -27,7 +27,7 @@ func$ fmt s$ . # scales$[] = [ "degree" "gradian" "mil" "radian" ] values[] = [ -2 -1 0 1 2 6.2831853 16 57.2957795 359 399 6399 1000000 ] -numfmt 10 3 +numfmt 3 10 for f$ in scales$[] write fmt f$ for t$ in scales$[] diff --git a/Task/Angles-geometric-normalization-and-conversion/FutureBasic/angles-geometric-normalization-and-conversion.basic b/Task/Angles-geometric-normalization-and-conversion/FutureBasic/angles-geometric-normalization-and-conversion.basic deleted file mode 100644 index df05b07e41..0000000000 --- a/Task/Angles-geometric-normalization-and-conversion/FutureBasic/angles-geometric-normalization-and-conversion.basic +++ /dev/null @@ -1,100 +0,0 @@ -include "NSLog.incl" - -double local fn Normalize( f as double, n as double ) - double a = f - while ( a < -n ) : a += n : wend - while ( a >= n ) : a -= n : wend -end fn = a - -double local fn NormalizeToDegrees( f as double ) return fn Normalize( f, 360 ) end fn = 0.0 -double local fn NormalizeToGradians( f as double ) return fn Normalize( f, 400 ) end fn = 0.0 -double local fn NormalizeToMils( f as double ) return fn Normalize( f, 6400 ) end fn = 0.0 -double local fn NormalizeToRadians( f as double ) return fn Normalize( f, 2 * M_PI ) end fn = 0.0 - -double local fn d2g( f as double ) return f * 10 / 9 end fn = 0.0 -double local fn d2m( f as double ) return f * 160 / 9 end fn = 0.0 -double local fn d2r( f as double ) return f * M_PI / 180 end fn = 0.0 - -double local fn g2d( f as double ) return f * 9 / 10 end fn = 0.0 -double local fn g2m( f as double ) return f * 16 end fn = 0.0 -double local fn g2r( f as double ) return f * M_PI / 200 end fn = 0.0 - -double local fn m2d( f as double ) return f * 9 / 160 end fn = 0.0 -double local fn m2g( f as double ) return f / 16 end fn = 0.0 -double local fn m2r( f as double ) return f * M_PI / 3200 end fn = 0.0 - -double local fn r2d( f as double ) return f * 180 / M_PI end fn = 0.0 -double local fn r2g( f as double ) return f * 200 / M_PI end fn = 0.0 -double local fn r2m( f as double ) return f * 3200 / M_PI end fn = 0.0 - -local fn CalculateDegrees - CFArrayRef angles = @[@-2, @-1, @0, @1, @2, @6.2831853, @16, @57.2957795, @359, @6399, @1000000] - double angle, degrees, gradians, mils, radians - NSUInteger i - CFStringRef unit - CFStringRef dashpad = fn StringByPaddingToLength( @"", 73, @"-", 0 ) - - ptr anglePtr = fn StringUTF8String( @"Angle" ) - ptr unitPtr = fn StringUTF8String( @"Unit" ) - ptr normalPtr = fn StringUTF8String( @"Normalized" ) - ptr gradiansPtr = fn StringUTF8String( @"Gradians" ) - ptr milsPtr = fn StringUTF8String( @"Mils" ) - ptr radiansPtr = fn StringUTF8String( @"Radians" ) - - // Header - NSLog( @"\n%@", dashpad ) - NSLog( @"%13s %5s %15s %10s %7s %15s", anglePtr, unitPtr, normalPtr, gradiansPtr, milsPtr, radiansPtr ) - NSLog( @"%@", dashpad ) - - // Degrees - for i = 0 to fn ArrayCount( angles ) - 1 - angle = dblval( angles[i] ) - unit = @"Degrees" - degrees = fn NormalizeToDegrees( angle ) - gradians = fn NormalizeToGradians( fn d2g( degrees ) ) - mils = fn NormalizeToMils( fn d2m( degrees ) ) - radians = fn NormalizeToRadians( fn d2r( degrees ) ) - NSLog( @"%13.4f %-10s % -12.4f % -11.4f % -12.4f % -13.4f", angle, fn StringUTF8String( unit ), degrees, gradians, mils, radians ) - next - NSLog( @"" ) - - // Gradians - for i = 0 to fn ArrayCount( angles ) - 1 - angle = dblval( angles[i] ) - unit = @"Gradians" - gradians = fn NormalizeToGradians( angle ) - degrees = fn NormalizeToDegrees( fn g2d( gradians ) ) - mils = fn NormalizeToMils( fn g2m( gradians ) ) - radians = fn NormalizeToRadians( fn g2r( gradians ) ) - NSLog( @"%13.4f %-10s % -12.4f % -11.4f % -12.4f % -13.4f", angle, fn StringUTF8String( unit ), degrees, gradians, mils, radians ) - next - NSLog( @"" ) - - // Mils - for i = 0 to fn ArrayCount( angles ) - 1 - angle = dblval( angles[i] ) - unit = @"Mils" - mils = fn NormalizeToMils( angle ) - degrees = fn NormalizeToDegrees( fn m2d( mils ) ) - gradians = fn NormalizeToGradians( fn m2g( mils ) ) - radians = fn NormalizeToRadians( fn m2r( mils ) ) - NSLog( @"%13.4f %-10s % -12.4f % -11.4f % -12.4f % -13.4f", angle, fn StringUTF8String( unit ), degrees, gradians, mils, radians ) - next - NSLog( @"" ) - - // Radians - for i = 0 to fn ArrayCount( angles ) - 1 - angle = dblval( angles[i] ) - unit = @"Radians" - radians = fn NormalizeToRadians( angle ) - degrees = fn NormalizeToDegrees( fn r2d( radians ) ) - gradians = fn NormalizeToGradians( fn r2g( radians ) ) - mils = fn NormalizeToMils( fn r2m( radians ) ) - NSLog( @"%13.4f %-10s % -12.4f % -11.4f % -12.4f % -13.4f", angle, fn StringUTF8String( unit ), degrees, gradians, mils, radians ) - next - NSLog( @"%@", dashpad ) -end fn - -fn CalculateDegrees - -HandleEvents diff --git a/Task/Angles-geometric-normalization-and-conversion/Julia/angles-geometric-normalization-and-conversion.jl b/Task/Angles-geometric-normalization-and-conversion/Julia/angles-geometric-normalization-and-conversion.julia similarity index 100% rename from Task/Angles-geometric-normalization-and-conversion/Julia/angles-geometric-normalization-and-conversion.jl rename to Task/Angles-geometric-normalization-and-conversion/Julia/angles-geometric-normalization-and-conversion.julia diff --git a/Task/Angles-geometric-normalization-and-conversion/Kotlin/angles-geometric-normalization-and-conversion.kts b/Task/Angles-geometric-normalization-and-conversion/Kotlin/angles-geometric-normalization-and-conversion.kotlin similarity index 100% rename from Task/Angles-geometric-normalization-and-conversion/Kotlin/angles-geometric-normalization-and-conversion.kts rename to Task/Angles-geometric-normalization-and-conversion/Kotlin/angles-geometric-normalization-and-conversion.kotlin diff --git a/Task/Angles-geometric-normalization-and-conversion/PascalABC.NET/angles-geometric-normalization-and-conversion.pas b/Task/Angles-geometric-normalization-and-conversion/PascalABC.NET/angles-geometric-normalization-and-conversion.pas deleted file mode 100644 index a0c4a80b2e..0000000000 --- a/Task/Angles-geometric-normalization-and-conversion/PascalABC.NET/angles-geometric-normalization-and-conversion.pas +++ /dev/null @@ -1,41 +0,0 @@ -function fmod(x, y: real): real := x - trunc(x / y) * y; - -function d2d(x: real): real := fmod(x, 360); -function g2g(x: real): real := fmod(x, 400); -function m2m(x: real): real := fmod(x, 6400); -function r2r(x: real): real := fmod(x, 2 * Pi); -function d2g(x: real): real := d2d(x) * 10 / 9; -function d2m(x: real): real := d2d(x) * 160 / 9; -function d2r(x: real): real := d2d(x) * Pi / 180; -function g2d(x: real): real := g2g(x) * 9 / 10; -function g2m(x: real): real := g2g(x) * 16; -function g2r(x: real): real := g2g(x) * Pi / 200; -function m2d(x: real): real := m2m(x) * 9 / 160; -function m2g(x: real): real := m2m(x) / 16; -function m2r(x: real): real := m2m(x) * Pi / 3200; -function r2d(x: real): real := r2r(x) * 180 / Pi; -function r2g(x: real): real := r2r(x) * 200 / Pi; -function r2m(x: real): real := r2r(x) * 3200 / Pi; - -begin - var Values: array of real := (-2, -1, 0, 1, 2, 6.2831853, 16, 57.2957795, 359, 399, 6399, 1000000); - writeln(' Degrees Normalized Gradians Mils Radians'); - writeln('———————————————————————————————————————————————————————————————————————————'); - foreach var val in Values do - writeln(val:15:7, d2d(val):15:7, d2g(val):15:7, d2m(val):15:7, d2r(val):15:7); - writeln; - writeln( ' Gradians Normalized Degrees Mils Radians'); - writeln( '———————————————————————————————————————————————————————————————————————————'); - foreach var val in Values do - writeln( val:15:7, g2g(val):15:7, g2d(val):15:7, g2m(val):15:7, g2r(val):15:7); - writeln; - writeln( ' Mils Normalized Degrees Gradians Radians'); - writeln( '———————————————————————————————————————————————————————————————————————————'); - foreach var val in Values do - writeln( val:15:7, m2m(val):15:7, m2d(val):15:7, m2g(val):15:7, m2r(val):15:7); - writeln; - writeln( ' Radians Normalized Degrees Gradians Mils'); - writeln( '———————————————————————————————————————————————————————————————————————————'); - foreach var val in Values do - writeln( val:15:7, r2r(val):15:7, r2d(val):15:7, r2g(val):15:7, r2m(val):15:7); -end. diff --git a/Task/Angles-geometric-normalization-and-conversion/Phix/angles-geometric-normalization-and-conversion.phix b/Task/Angles-geometric-normalization-and-conversion/Phix/angles-geometric-normalization-and-conversion.phix index 20520e7c70..8bc44820c3 100644 --- a/Task/Angles-geometric-normalization-and-conversion/Phix/angles-geometric-normalization-and-conversion.phix +++ b/Task/Angles-geometric-normalization-and-conversion/Phix/angles-geometric-normalization-and-conversion.phix @@ -1,20 +1,21 @@ -with javascript_semantics -constant units = {"degrees","gradians","mils","radians"}, - turns = {1/360,1/400,1/6400,0.5/PI} +--> + constant units = {"degrees","gradians","mils","radians"}, + turns = {1/360,1/400,1/6400,0.5/PI} -function convert(atom a, unit, tgt) - return remainder(a*unit,1)/tgt -end function + function convert(atom a, integer fdx, tdx) + return remainder(a*turns[fdx],1)/turns[tdx] + end function -constant tests = {-2,-1,0,1,2,2*PI,16,57.2957795,359,399,6399,1000000} -printf(1," angle unit %9s %9s %9s %9s\n",units) -for t in tests do - for i,u in turns do - printf(1,"%9g %-8s",{t,units[i]}) - for tgt in turns do - printf(1," %9g",convert(t,u,tgt)) - end for - puts(1,"\n") - end for - puts(1,"\n") -end for + constant tests = {-2,-1,0,1,2,2*PI,16,57.2957795,359,399,6399,1000000} + printf(1," angle unit %9s %9s %9s %9s\n",units) + for i=1 to length(tests) do + for fdx=1 to length(units) do + printf(1,"%9g %-8s",{tests[i],units[fdx]}) + for tdx=1 to length(units) do + printf(1," %9g",convert(tests[i],fdx,tdx)) + end for + puts(1,"\n") + end for + puts(1,"\n") + end for + count of proper divisors. 1-->1, wrong but OK here { [1.. (n + 1)/2 + 1].reduce('wrap(p,i){ p + (n%i==0 and n!=i) }) } -fcn antiPrimes{ // -->iterator +fcn antiPrimes{ // -->iterator Walker.chain([2..59],[60..*,30]).tweak(fcn(c,rlast){ last,mx := rlast.value, properDivsN(c); if(mx<=last) return(Void.Skip); rlast.set(mx); c - }.fp1(Ref(0))).push(1); // 1 has no proper divisors + }.fp1(Ref(0))).push(1); // 1 has no proper divisors } diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Ada/append-a-record-to-the-end-of-a-text-file.adb b/Task/Append-a-record-to-the-end-of-a-text-file/Ada/append-a-record-to-the-end-of-a-text-file.ada similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/Ada/append-a-record-to-the-end-of-a-text-file.adb rename to Task/Append-a-record-to-the-end-of-a-text-file/Ada/append-a-record-to-the-end-of-a-text-file.ada diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/COBOL/append-a-record-to-the-end-of-a-text-file.cob b/Task/Append-a-record-to-the-end-of-a-text-file/COBOL/append-a-record-to-the-end-of-a-text-file.cobol similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/COBOL/append-a-record-to-the-end-of-a-text-file.cob rename to Task/Append-a-record-to-the-end-of-a-text-file/COBOL/append-a-record-to-the-end-of-a-text-file.cobol diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Crystal/append-a-record-to-the-end-of-a-text-file.cr b/Task/Append-a-record-to-the-end-of-a-text-file/Crystal/append-a-record-to-the-end-of-a-text-file.cr deleted file mode 100644 index c4dd275431..0000000000 --- a/Task/Append-a-record-to-the-end-of-a-text-file/Crystal/append-a-record-to-the-end-of-a-text-file.cr +++ /dev/null @@ -1,36 +0,0 @@ -record PasswdEntry, account : String, password : String, uid : Int32, gid : Int32, - gecos : Gecos, directory : String, shell : String do - def to_s (io) - io << account << ":" << password << ":" << uid.to_s << ":" << gid.to_s << ":" - gecos.to_s(io) - io << ":" << directory << ":" << shell - end -end - -record Gecos, fullname : String, office : String, extension : String, homephone : String, email : String do - def to_s (io) - io << fullname << "," << office << "," << extension << "," - io << homephone << "," << email - end -end - -filename = "rosetta.passwd" - -File.open(filename, "w") do |f| - f.puts PasswdEntry.new("jsmith", "x", 1001, 1000, - Gecos.new("Joe Smith", "Room 1007", "(234)555-8917", "(234)555-0077", "jsmith@rosettacode.org"), - "/home/jsmith", "/bin/bash") - f.puts PasswdEntry.new("jdoe", "x", 1002, 1000, - Gecos.new("Jane Doe", "Room 1004", "(234)555-8914", "(234)555-0044", "jdoe@rosettacode.org"), - "/home/jdoe", "/bin/bash") -end - -File.open(filename, "a") do |f| - f.puts PasswdEntry.new("xyz", "x", 1003, 1000, - Gecos.new("X Yz", "Room 1003", "(234)555-8913", "(234)555-0033", "xyz@rosettacode.org"), - "/home/xyz", "/bin/bash") -end - -lines = File.read_lines(filename) - -puts "Appended record (##{lines.size}): " + lines.last diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Ed/append-a-record-to-the-end-of-a-text-file.ed b/Task/Append-a-record-to-the-end-of-a-text-file/Ed/append-a-record-to-the-end-of-a-text-file.ed deleted file mode 100644 index 596c084db6..0000000000 --- a/Task/Append-a-record-to-the-end-of-a-text-file/Ed/append-a-record-to-the-end-of-a-text-file.ed +++ /dev/null @@ -1,9 +0,0 @@ -H -r append.input -,p -a -xyz:x:1003:1000:X Yz,Room 1003,(234)555-8913,(234)555-0033,xyz@rosettacode.org:/home/xyz:/bin/bash -. -w -,p -q diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Elixir/append-a-record-to-the-end-of-a-text-file.ex b/Task/Append-a-record-to-the-end-of-a-text-file/Elixir/append-a-record-to-the-end-of-a-text-file.elixir similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/Elixir/append-a-record-to-the-end-of-a-text-file.ex rename to Task/Append-a-record-to-the-end-of-a-text-file/Elixir/append-a-record-to-the-end-of-a-text-file.elixir diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Julia/append-a-record-to-the-end-of-a-text-file.jl b/Task/Append-a-record-to-the-end-of-a-text-file/Julia/append-a-record-to-the-end-of-a-text-file.julia similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/Julia/append-a-record-to-the-end-of-a-text-file.jl rename to Task/Append-a-record-to-the-end-of-a-text-file/Julia/append-a-record-to-the-end-of-a-text-file.julia diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Kotlin/append-a-record-to-the-end-of-a-text-file.kts b/Task/Append-a-record-to-the-end-of-a-text-file/Kotlin/append-a-record-to-the-end-of-a-text-file.kotlin similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/Kotlin/append-a-record-to-the-end-of-a-text-file.kts rename to Task/Append-a-record-to-the-end-of-a-text-file/Kotlin/append-a-record-to-the-end-of-a-text-file.kotlin diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-1.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-1.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-1.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-1.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-2.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-2.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-2.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-2.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-3.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-3.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-3.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-3.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-4.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-4.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-4.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-4.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-5.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-5.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-5.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-5.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-6.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-6.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-6.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-6.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-7.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-7.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-7.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-7.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-8.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-8.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-8.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-8.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-9.ps1 b/Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-9.psh similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-9.ps1 rename to Task/Append-a-record-to-the-end-of-a-text-file/PowerShell/append-a-record-to-the-end-of-a-text-file-9.psh diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Python/append-a-record-to-the-end-of-a-text-file.py b/Task/Append-a-record-to-the-end-of-a-text-file/Python/append-a-record-to-the-end-of-a-text-file.py index 1951501c2c..e21feece57 100644 --- a/Task/Append-a-record-to-the-end-of-a-text-file/Python/append-a-record-to-the-end-of-a-text-file.py +++ b/Task/Append-a-record-to-the-end-of-a-text-file/Python/append-a-record-to-the-end-of-a-text-file.py @@ -1,126 +1,48 @@ -from __future__ import annotations - -import csv -from dataclasses import astuple -from dataclasses import dataclass -from io import StringIO -from pathlib import Path - -from filelock import FileLock - - -@dataclass -class Record: - account: str - password: str - UID: int - GID: int - GECOS: GECOS - directory: str - shell: str - - -@dataclass -class GECOS: - fullname: str - office: str - extension: str - homephone: str - email: str - - -PASSWDS = [ - Record( - "jsmith", - "x", - 1001, - 1000, - GECOS( - "Joe Smith", - "Room 1007", - "(234)555-8917", - "(234)555-0077", - "jsmith@rosettacode.org", - ), - "/home/jsmith", - "/bin/bash", - ), - Record( - "jdoe", - "x", - 1002, - 1000, - GECOS( - "Jane Doe", - "Room 1004", - "(234)555-8914", - "(234)555-0044", - "jdoe@rosettacode.org", - ), - "/home/jdoe", - "/bin/bash", - ), +############################# +# Create a passwd text file +############################# +# note that UID & gid are of type "text" +passwd_list=[ + dict(account='jsmith', password='x', UID=1001, GID=1000, # UID and GID are type int + GECOS=dict(fullname='Joe Smith', office='Room 1007', extension='(234)555-8917', + homephone='(234)555-0077', email='jsmith@rosettacode.org'), + directory='/home/jsmith', shell='/bin/bash'), + dict(account='jdoe', password='x', UID=1002, GID=1000, + GECOS=dict(fullname='Jane Doe', office='Room 1004', extension='(234)555-8914', + homephone='(234)555-0044', email='jdoe@rosettacode.org'), + directory='/home/jdoe', shell='/bin/bash') ] +passwd_fields="account password UID GID GECOS directory shell".split() +GECOS_fields="fullname office extension homephone email".split() -class RecordDialect(csv.unix_dialect): - delimiter = ":" - quoting = csv.QUOTE_NONE +def passwd_text_repr(passwd_rec): +# convert individual fields to string type + passwd_rec["GECOS"]=",".join([ passwd_rec["GECOS"][field] for field in GECOS_fields]) + for field in passwd_rec: # convert "int" fields + if not isinstance(passwd_rec[field], str): + passwd_rec[field]=`passwd_rec[field]` + return ":".join([ passwd_rec[field] for field in passwd_fields ]) +passwd_text=open("passwd.txt","w") +for passwd_rec in passwd_list: + print >> passwd_text,passwd_text_repr(passwd_rec) +passwd_text.close() -class GECOSDialect(RecordDialect): - delimiter = "," - lineterminator = "" +################################# +# Load text ready for appending +################################# +passwd_text=open("passwd.txt","a+") +new_rec=dict(account='xyz', password='x', UID=1003, GID=1000, + GECOS=dict(fullname='X Yz', office='Room 1003', extension='(234)555-8913', + homephone='(234)555-0033', email='xyz@rosettacode.org'), + directory='/home/xyz', shell='/bin/bash') +print >> passwd_text, passwd_text_repr(new_rec) +passwd_text.close() - -def row(record: Record) -> list[str | int]: - gecos_buffer = StringIO() - gecos_writer = csv.writer(gecos_buffer, dialect=GECOSDialect) - gecos_writer.writerow(astuple(record.GECOS)) - - return [ - record.account, - record.password, - record.UID, - record.GID, - gecos_buffer.getvalue(), - record.directory, - record.shell, - ] - - -if __name__ == "__main__": - path = Path("passwd.txt") - lock = FileLock("passwd.txt.lock") - - with lock: - with path.open("w") as fd: - record_writer = csv.writer(fd, dialect=RecordDialect) - record_writer.writerows(row(r) for r in PASSWDS) - - with lock: - print(f"Before append:\n\n{path.read_text()}") - - new_record = Record( - "xyz", - "x", - 1003, - 1001, - GECOS( - "X Yz", - "Room 1003", - "(234)555-8913", - "(234)555-0033", - "xyz@rosettacode.org", - ), - "/home/xyz", - "/bin/bash", - ) - - with lock: - with path.open("a") as fd: - record_writer = csv.writer(fd, dialect=RecordDialect) - record_writer.writerow(row(new_record)) - - with lock: - print(f"After append:\n\n{path.read_text()}") +############################################## +# Finally reopen and check record was appended +############################################## +passwd_list=list(open("passwd.txt","r")) +if "xyz" in passwd_list[-1]: + print "Appended record:",passwd_list[-1][:-1] diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Rust/append-a-record-to-the-end-of-a-text-file.rs b/Task/Append-a-record-to-the-end-of-a-text-file/Rust/append-a-record-to-the-end-of-a-text-file.rust similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/Rust/append-a-record-to-the-end-of-a-text-file.rs rename to Task/Append-a-record-to-the-end-of-a-text-file/Rust/append-a-record-to-the-end-of-a-text-file.rust diff --git a/Task/Append-a-record-to-the-end-of-a-text-file/Scheme/append-a-record-to-the-end-of-a-text-file.scm b/Task/Append-a-record-to-the-end-of-a-text-file/Scheme/append-a-record-to-the-end-of-a-text-file.ss similarity index 100% rename from Task/Append-a-record-to-the-end-of-a-text-file/Scheme/append-a-record-to-the-end-of-a-text-file.scm rename to Task/Append-a-record-to-the-end-of-a-text-file/Scheme/append-a-record-to-the-end-of-a-text-file.ss diff --git a/Task/Apply-a-callback-to-an-array/Ada/apply-a-callback-to-an-array-2.adb b/Task/Apply-a-callback-to-an-array/Ada/apply-a-callback-to-an-array-2.adb deleted file mode 100644 index bf1a1147a4..0000000000 --- a/Task/Apply-a-callback-to-an-array/Ada/apply-a-callback-to-an-array-2.adb +++ /dev/null @@ -1,13 +0,0 @@ -pragma Ada_2022; -with Ada.Text_IO; use Ada.Text_IO; - -procedure Array_Callback is - type Integer_Array is array (Positive range <>) of Integer; - A : constant Integer_Array := (for I in 1..10 => I); - B : constant Integer_Array := (for I in A'Range => A (I) ** 2); -begin - for I in B'Range loop - Put (B (I)'Image); - end loop; - New_Line; -end Array_Callback; diff --git a/Task/Apply-a-callback-to-an-array/Ada/apply-a-callback-to-an-array-1.adb b/Task/Apply-a-callback-to-an-array/Ada/apply-a-callback-to-an-array.ada similarity index 100% rename from Task/Apply-a-callback-to-an-array/Ada/apply-a-callback-to-an-array-1.adb rename to Task/Apply-a-callback-to-an-array/Ada/apply-a-callback-to-an-array.ada diff --git a/Task/Apply-a-callback-to-an-array/ArkScript/apply-a-callback-to-an-array.ark b/Task/Apply-a-callback-to-an-array/ArkScript/apply-a-callback-to-an-array.ark deleted file mode 100644 index a264075a30..0000000000 --- a/Task/Apply-a-callback-to-an-array/ArkScript/apply-a-callback-to-an-array.ark +++ /dev/null @@ -1,8 +0,0 @@ -(import std.List :map) - -(let array [1 2 3 4 5 6 7 8 9 10]) -(let mapped (map array (fun (i) (* i i)))) - -(assert - (= mapped [1 4 9 16 25 36 49 64 81 100]) - "mapped is a list of squares") diff --git a/Task/Apply-a-callback-to-an-array/Ballerina/apply-a-callback-to-an-array.ballerina b/Task/Apply-a-callback-to-an-array/Ballerina/apply-a-callback-to-an-array.ballerina deleted file mode 100644 index a2d7fd5818..0000000000 --- a/Task/Apply-a-callback-to-an-array/Ballerina/apply-a-callback-to-an-array.ballerina +++ /dev/null @@ -1,9 +0,0 @@ -import ballerina/io; - -public function main() { - int[] a = from int i in 1...10 select i; - var square = function(int i) returns int { - return i * i; - }; - io:println(a.map(i => square(i))); -} diff --git a/Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array-1.bracmat b/Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array-1.bracmat deleted file mode 100644 index 3ef3a60ead..0000000000 --- a/Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array-1.bracmat +++ /dev/null @@ -1,13 +0,0 @@ -( (square=.!arg^2) -& 1 3 5 7:?numbers -& map$(square.!numbers):?squares2a { functional form } -& out$!squares2a -& map$((=.!arg^2).!numbers):?squares2b { functional form with `lambda` } -& out$!squares2b -& :?isquares1 -& whl - ' ( !numbers:#%?number ?numbers - & !isquares1 !number^2:?isquares1 - ) -& out$!isquares1 -); diff --git a/Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array-2.bracmat b/Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array-2.bracmat deleted file mode 100644 index 77dc6ec596..0000000000 --- a/Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array-2.bracmat +++ /dev/null @@ -1,22 +0,0 @@ -( (square=.!arg^2) -& (1,3,5,7):?numbers -& mop - $ (square.!numbers.(=,).(=,)) - : ?squares2a -& out$!squares2a -& mop - $ ( (=.!arg^2) - . !numbers - . (=,) - . (=,) - ) - : ?squares2b -& out$!squares2b -& :?isquares1 -& whl - ' ( !numbers:(?number,?numbers) - & (!isquares1,!number^2):?isquares1 - ) -& (!isquares1,!numbers^2):(,?isquares1) -& out$!isquares1 -); diff --git a/Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array-3.bracmat b/Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array.bracmat similarity index 100% rename from Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array-3.bracmat rename to Task/Apply-a-callback-to-an-array/Bracmat/apply-a-callback-to-an-array.bracmat diff --git a/Task/Apply-a-callback-to-an-array/COBOL/apply-a-callback-to-an-array.cob b/Task/Apply-a-callback-to-an-array/COBOL/apply-a-callback-to-an-array.cobol similarity index 100% rename from Task/Apply-a-callback-to-an-array/COBOL/apply-a-callback-to-an-array.cob rename to Task/Apply-a-callback-to-an-array/COBOL/apply-a-callback-to-an-array.cobol diff --git a/Task/Apply-a-callback-to-an-array/Crystal/apply-a-callback-to-an-array-1.cr b/Task/Apply-a-callback-to-an-array/Crystal/apply-a-callback-to-an-array-1.crystal similarity index 100% rename from Task/Apply-a-callback-to-an-array/Crystal/apply-a-callback-to-an-array-1.cr rename to Task/Apply-a-callback-to-an-array/Crystal/apply-a-callback-to-an-array-1.crystal diff --git a/Task/Apply-a-callback-to-an-array/Crystal/apply-a-callback-to-an-array-2.cr b/Task/Apply-a-callback-to-an-array/Crystal/apply-a-callback-to-an-array-2.crystal similarity index 100% rename from Task/Apply-a-callback-to-an-array/Crystal/apply-a-callback-to-an-array-2.cr rename to Task/Apply-a-callback-to-an-array/Crystal/apply-a-callback-to-an-array-2.crystal diff --git a/Task/Apply-a-callback-to-an-array/Delphi/apply-a-callback-to-an-array.pas b/Task/Apply-a-callback-to-an-array/Delphi/apply-a-callback-to-an-array.delphi similarity index 100% rename from Task/Apply-a-callback-to-an-array/Delphi/apply-a-callback-to-an-array.pas rename to Task/Apply-a-callback-to-an-array/Delphi/apply-a-callback-to-an-array.delphi diff --git a/Task/Apply-a-callback-to-an-array/Elena/apply-a-callback-to-an-array.elena b/Task/Apply-a-callback-to-an-array/Elena/apply-a-callback-to-an-array.elena index a36b6c9013..fde9614ade 100644 --- a/Task/Apply-a-callback-to-an-array/Elena/apply-a-callback-to-an-array.elena +++ b/Task/Apply-a-callback-to-an-array/Elena/apply-a-callback-to-an-array.elena @@ -2,7 +2,7 @@ import system'routines; PrintSecondPower(n){ console.writeLine(n * n) } -public Program() +public program() { new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.forEach(PrintSecondPower) } diff --git a/Task/Apply-a-callback-to-an-array/Elixir/apply-a-callback-to-an-array.ex b/Task/Apply-a-callback-to-an-array/Elixir/apply-a-callback-to-an-array.elixir similarity index 100% rename from Task/Apply-a-callback-to-an-array/Elixir/apply-a-callback-to-an-array.ex rename to Task/Apply-a-callback-to-an-array/Elixir/apply-a-callback-to-an-array.elixir diff --git a/Task/Apply-a-callback-to-an-array/Euphoria/apply-a-callback-to-an-array.eu b/Task/Apply-a-callback-to-an-array/Euphoria/apply-a-callback-to-an-array.euphoria similarity index 100% rename from Task/Apply-a-callback-to-an-array/Euphoria/apply-a-callback-to-an-array.eu rename to Task/Apply-a-callback-to-an-array/Euphoria/apply-a-callback-to-an-array.euphoria diff --git a/Task/Apply-a-callback-to-an-array/Gleam/apply-a-callback-to-an-array.gleam b/Task/Apply-a-callback-to-an-array/Gleam/apply-a-callback-to-an-array.gleam deleted file mode 100644 index 90bce5ebb9..0000000000 --- a/Task/Apply-a-callback-to-an-array/Gleam/apply-a-callback-to-an-array.gleam +++ /dev/null @@ -1,7 +0,0 @@ -import gleam/list - -pub fn main() { - [1, 14, 99, 23] - |> list.map(fn(x) { x * 2 }) - |> echo -} diff --git a/Task/Apply-a-callback-to-an-array/Haxe/apply-a-callback-to-an-array.hx b/Task/Apply-a-callback-to-an-array/Haxe/apply-a-callback-to-an-array.hx deleted file mode 100644 index da0f9b93f7..0000000000 --- a/Task/Apply-a-callback-to-an-array/Haxe/apply-a-callback-to-an-array.hx +++ /dev/null @@ -1,10 +0,0 @@ -class Main { - static function main() { - var numbers = [1, 2, 3, 4, 5]; - - var squared = (i) -> i * i; - - trace(numbers); - trace(numbers.map(squared)); - } -} diff --git a/Task/Apply-a-callback-to-an-array/Insitux/apply-a-callback-to-an-array-6.insitux b/Task/Apply-a-callback-to-an-array/Insitux/apply-a-callback-to-an-array-6.insitux deleted file mode 100644 index 0d22e445cf..0000000000 --- a/Task/Apply-a-callback-to-an-array/Insitux/apply-a-callback-to-an-array-6.insitux +++ /dev/null @@ -1,2 +0,0 @@ -; apply an interpolated string closure -(map #"{%} + 1 = {+ 1 %}" [1 2 3 4]) diff --git a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-1.jactl b/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-1.jactl deleted file mode 100644 index 17b6f6636e..0000000000 --- a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-1.jactl +++ /dev/null @@ -1 +0,0 @@ -println [1,2,3,4,5].map{ n -> n * n } diff --git a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-2.jactl b/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-2.jactl deleted file mode 100644 index 5d89e97a87..0000000000 --- a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-2.jactl +++ /dev/null @@ -1 +0,0 @@ -[1, 4, 9, 16, 25] diff --git a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-3.jactl b/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-3.jactl deleted file mode 100644 index 84acb1c3ac..0000000000 --- a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-3.jactl +++ /dev/null @@ -1 +0,0 @@ -println [1,2,3,4,5].map{ it * it } diff --git a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-4.jactl b/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-4.jactl deleted file mode 100644 index 732e1e9933..0000000000 --- a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-4.jactl +++ /dev/null @@ -1 +0,0 @@ -println [[1,2],[2,3],[3,4],[4,5]].map{ a,b -> a * b } diff --git a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-5.jactl b/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-5.jactl deleted file mode 100644 index 74ad847b49..0000000000 --- a/Task/Apply-a-callback-to-an-array/Jactl/apply-a-callback-to-an-array-5.jactl +++ /dev/null @@ -1 +0,0 @@ -[2, 6, 12, 20] diff --git a/Task/Apply-a-callback-to-an-array/Julia/apply-a-callback-to-an-array.jl b/Task/Apply-a-callback-to-an-array/Julia/apply-a-callback-to-an-array.julia similarity index 100% rename from Task/Apply-a-callback-to-an-array/Julia/apply-a-callback-to-an-array.jl rename to Task/Apply-a-callback-to-an-array/Julia/apply-a-callback-to-an-array.julia diff --git a/Task/Apply-a-callback-to-an-array/Kotlin/apply-a-callback-to-an-array.kts b/Task/Apply-a-callback-to-an-array/Kotlin/apply-a-callback-to-an-array.kotlin similarity index 100% rename from Task/Apply-a-callback-to-an-array/Kotlin/apply-a-callback-to-an-array.kts rename to Task/Apply-a-callback-to-an-array/Kotlin/apply-a-callback-to-an-array.kotlin diff --git a/Task/Apply-a-callback-to-an-array/Langur/apply-a-callback-to-an-array.langur b/Task/Apply-a-callback-to-an-array/Langur/apply-a-callback-to-an-array.langur index 61d90f3fb8..d1c575957b 100644 --- a/Task/Apply-a-callback-to-an-array/Langur/apply-a-callback-to-an-array.langur +++ b/Task/Apply-a-callback-to-an-array/Langur/apply-a-callback-to-an-array.langur @@ -1 +1 @@ -writeln map(1..10, by=fn{^2}) +writeln map fn{^2}, 1..10 diff --git a/Task/Apply-a-callback-to-an-array/MiniScript/apply-a-callback-to-an-array.mini b/Task/Apply-a-callback-to-an-array/MiniScript/apply-a-callback-to-an-array.mini deleted file mode 100644 index 9438072140..0000000000 --- a/Task/Apply-a-callback-to-an-array/MiniScript/apply-a-callback-to-an-array.mini +++ /dev/null @@ -1,8 +0,0 @@ -import "listUtil" -sq = function (x) - return x * x -end function - -arr = range(1, 10) -arr.apply(@sq) -print(arr) diff --git a/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-1.ml b/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-1.ocaml similarity index 100% rename from Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-1.ml rename to Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-1.ocaml diff --git a/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-2.ml b/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-2.ocaml similarity index 100% rename from Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-2.ml rename to Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-2.ocaml diff --git a/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-3.ml b/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-3.ocaml similarity index 100% rename from Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-3.ml rename to Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-3.ocaml diff --git a/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-4.ml b/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-4.ocaml similarity index 100% rename from Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-4.ml rename to Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-4.ocaml diff --git a/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-5.ml b/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-5.ocaml similarity index 100% rename from Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-5.ml rename to Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-5.ocaml diff --git a/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-6.ml b/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-6.ocaml similarity index 100% rename from Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-6.ml rename to Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-6.ocaml diff --git a/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-7.ml b/Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-7.ocaml similarity index 100% rename from Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-7.ml rename to Task/Apply-a-callback-to-an-array/OCaml/apply-a-callback-to-an-array-7.ocaml diff --git a/Task/Apply-a-callback-to-an-array/PascalABC.NET/apply-a-callback-to-an-array.pas b/Task/Apply-a-callback-to-an-array/PascalABC.NET/apply-a-callback-to-an-array.pas deleted file mode 100644 index c95fa7f852..0000000000 --- a/Task/Apply-a-callback-to-an-array/PascalABC.NET/apply-a-callback-to-an-array.pas +++ /dev/null @@ -1,5 +0,0 @@ -begin - var a := Arr(1..10); - a := a.Select(x -> x * x).ToArray; - a.ForEach(x -> Print(x)); -end. diff --git a/Task/Apply-a-callback-to-an-array/PowerShell/apply-a-callback-to-an-array-1.ps1 b/Task/Apply-a-callback-to-an-array/PowerShell/apply-a-callback-to-an-array-1.psh similarity index 100% rename from Task/Apply-a-callback-to-an-array/PowerShell/apply-a-callback-to-an-array-1.ps1 rename to Task/Apply-a-callback-to-an-array/PowerShell/apply-a-callback-to-an-array-1.psh diff --git a/Task/Apply-a-callback-to-an-array/PowerShell/apply-a-callback-to-an-array-2.ps1 b/Task/Apply-a-callback-to-an-array/PowerShell/apply-a-callback-to-an-array-2.psh similarity index 100% rename from Task/Apply-a-callback-to-an-array/PowerShell/apply-a-callback-to-an-array-2.ps1 rename to Task/Apply-a-callback-to-an-array/PowerShell/apply-a-callback-to-an-array-2.psh diff --git a/Task/Apply-a-callback-to-an-array/Rebol/apply-a-callback-to-an-array.rebol b/Task/Apply-a-callback-to-an-array/REBOL/apply-a-callback-to-an-array.rebol similarity index 98% rename from Task/Apply-a-callback-to-an-array/Rebol/apply-a-callback-to-an-array.rebol rename to Task/Apply-a-callback-to-an-array/REBOL/apply-a-callback-to-an-array.rebol index 62231cfcf9..ec06fa4564 100644 --- a/Task/Apply-a-callback-to-an-array/Rebol/apply-a-callback-to-an-array.rebol +++ b/Task/Apply-a-callback-to-an-array/REBOL/apply-a-callback-to-an-array.rebol @@ -1,4 +1,4 @@ -Rebol [ +REBOL [ Title: "Array Callback" URL: http://rosettacode.org/wiki/Apply_a_callback_to_an_Array ] diff --git a/Task/Apply-a-callback-to-an-array/REXX/apply-a-callback-to-an-array.rexx b/Task/Apply-a-callback-to-an-array/REXX/apply-a-callback-to-an-array.rexx index 916ed41e04..a73f3a1322 100644 --- a/Task/Apply-a-callback-to-an-array/REXX/apply-a-callback-to-an-array.rexx +++ b/Task/Apply-a-callback-to-an-array/REXX/apply-a-callback-to-an-array.rexx @@ -1,38 +1,23 @@ --- 31 Mar 2026 -include Setting -numeric digits 4 +/*REXX program applies a callback to an array (using factorials for a demonstration).*/ +numeric digits 100 /*be able to display some huge numbers.*/ +parse arg # . /*obtain an optional value from the CL.*/ +a.= /*initialize the array A to all nulls*/ +if #=='' | #=="," then #= 12 /*Not assigned? Then use default value*/ + do j=0 to #; a.j= j /*assign the integer J ───► A.j */ + end /*j*/ /*array A will have N values: 0 ──► #*/ -say 'APPLY A CALLBACK TO AN ARRAY' -say version -say -say 'Generate...' -call Struct2stem 'stem.','1 2 3 4 5 6 7 8 9 10' -call ShowSt 'stem.','1 to 10 ascending',,7 -call CopySt 'stem.','copy.' - -say 'Single function Square' -call MapSt 'stem.','square' -call ShowSt 'stem.','after square',,7 - -say 'Your own function Cubic...' -call CopySt 'copy.','stem.' -call MapSt 'stem.','cube' -call ShowSt 'stem.','after cube',,7 - -say 'Expression x^2+2x+3...' -call CopySt 'copy.','stem.' -call MapSt 'stem.','x**2+2*x+3' -call ShowSt 'stem.','after simple formula',,7 - -say 'Expression Sin(x)+Square(x)...' -call CopySt 'copy.','stem.' -call MapSt 'stem.','sin(x)+square(x)' -call ShowSt 'stem.','after more involved formula',,7 -exit - -Cubic: -arg xx -return xx**3 - --- MapSt; Struct2stem; ShowSt; CopySt; Square; Sin -include Math +call listA 'before callback' /*display A array before the callback*/ +say /*display a blank line for readability.*/ +say ' ··· applying callback to array A ···' /*display what is about to happen to B.*/ +say /*display a blank line for readability.*/ +call bangit 'a' /*factorialize (the values) of A array.*/ + /* store the results ───► array B.*/ +call listA ' after callback' /*display A array after the callback.*/ +exit 0 /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +bangit: do v=0; $= value(arg(1)'.'v); if $=='' then return /*No value? Then return*/ + call value arg(1)'.'v, fact($) /*assign a value (a factorial) to array*/ + end /*i*/ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +fact: procedure; arg x; != 1; do f=2 to x; != !*f; end; /*f*/; return ! +listA: do k=0 while a.k\==''; say arg(1) 'a.'k"=" a.k; end /*k*/; return diff --git a/Task/Apply-a-callback-to-an-array/Rust/apply-a-callback-to-an-array.rs b/Task/Apply-a-callback-to-an-array/Rust/apply-a-callback-to-an-array.rs deleted file mode 100644 index 15fefb8314..0000000000 --- a/Task/Apply-a-callback-to-an-array/Rust/apply-a-callback-to-an-array.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn echo(n: &i32) { - println!("{}", n); -} - -fn main() { - let a: [i32; 5]; - a = [1, 2, 3, 4, 5]; - let _: Vec<_> = a.iter().map(echo).collect(); -} diff --git a/Task/Apply-a-callback-to-an-array/Rust/apply-a-callback-to-an-array.rust b/Task/Apply-a-callback-to-an-array/Rust/apply-a-callback-to-an-array.rust new file mode 100644 index 0000000000..8e67a487bf --- /dev/null +++ b/Task/Apply-a-callback-to-an-array/Rust/apply-a-callback-to-an-array.rust @@ -0,0 +1,9 @@ +fn echo(n: &i32) { + println!("{}", n); +} + +fn main() { + let a: [i32; 5]; + a = [1, 2, 3, 4, 5]; + let _: Vec<_> = a.into_iter().map(echo).collect(); +} diff --git a/Task/Apply-a-callback-to-an-array/SIL/apply-a-callback-to-an-array.sil b/Task/Apply-a-callback-to-an-array/SIL/apply-a-callback-to-an-array.sil deleted file mode 100644 index 77284ec80d..0000000000 --- a/Task/Apply-a-callback-to-an-array/SIL/apply-a-callback-to-an-array.sil +++ /dev/null @@ -1,32 +0,0 @@ -// avoid executing function definitions -GOTO body - -// our function to apply -funcsquare -x * x -return - -lblbody -// add some values to the memory buffer -set 256 1 -set 257 2 -set 258 3 -set 259 4 -set 260 5 - -// i is our array pointer -// in sil it's customary to place data in cells > 255 -// to avoid interference with ascii variables -i = 256 - -lblloop -// place value at i where square function expects it -x = get i -// call square function -GOSUB square -printInt x -// increment pointer; this is like i += 1 in C -i + 1 -a = 261 - i -// start another iteration if we are below cell 261 -if a loop diff --git a/Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-1.scm b/Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-1.ss similarity index 100% rename from Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-1.scm rename to Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-1.ss diff --git a/Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-2.scm b/Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-2.ss similarity index 100% rename from Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-2.scm rename to Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-2.ss diff --git a/Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-3.scm b/Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-3.ss similarity index 100% rename from Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-3.scm rename to Task/Apply-a-callback-to-an-array/Scheme/apply-a-callback-to-an-array-3.ss diff --git a/Task/Apply-a-callback-to-an-array/Tailspin/apply-a-callback-to-an-array-2.tailspin b/Task/Apply-a-callback-to-an-array/Tailspin/apply-a-callback-to-an-array-2.tailspin deleted file mode 100644 index 88a5af5f68..0000000000 --- a/Task/Apply-a-callback-to-an-array/Tailspin/apply-a-callback-to-an-array-2.tailspin +++ /dev/null @@ -1,14 +0,0 @@ -numbers is [1,3,7,10]; - -cube templates - $ * $ * $ ! -end cube - --- Using lens transforms -$numbers(.. as i; -> $ * $i) ! -$numbers(..; -> $ * $) ! -$numbers(..; -> cube) ! - --- Using array literal and deconstructor -[ $numbers... -> $ * $ ] ! -[ $numbers... -> cube ] ! diff --git a/Task/Apply-a-callback-to-an-array/Tailspin/apply-a-callback-to-an-array-1.tailspin b/Task/Apply-a-callback-to-an-array/Tailspin/apply-a-callback-to-an-array.tailspin similarity index 100% rename from Task/Apply-a-callback-to-an-array/Tailspin/apply-a-callback-to-an-array-1.tailspin rename to Task/Apply-a-callback-to-an-array/Tailspin/apply-a-callback-to-an-array.tailspin diff --git a/Task/Apply-a-callback-to-an-array/Uiua/apply-a-callback-to-an-array.uiua b/Task/Apply-a-callback-to-an-array/Uiua/apply-a-callback-to-an-array.uiua deleted file mode 100644 index 4a3c9d85d0..0000000000 --- a/Task/Apply-a-callback-to-an-array/Uiua/apply-a-callback-to-an-array.uiua +++ /dev/null @@ -1 +0,0 @@ -⍚&p⇡10 diff --git a/Task/Apply-a-callback-to-an-array/V-(Vlang)/apply-a-callback-to-an-array.v b/Task/Apply-a-callback-to-an-array/V-(Vlang)/apply-a-callback-to-an-array.v deleted file mode 100644 index 84dd6e2ec5..0000000000 --- a/Task/Apply-a-callback-to-an-array/V-(Vlang)/apply-a-callback-to-an-array.v +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - mut arr := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - new_arr := arr.map(fn (it int) int {return it * it}) - println(new_arr) -} diff --git a/Task/Apply-a-callback-to-an-array/VBScript/apply-a-callback-to-an-array-1.vbs b/Task/Apply-a-callback-to-an-array/VBScript/apply-a-callback-to-an-array-1.vb similarity index 100% rename from Task/Apply-a-callback-to-an-array/VBScript/apply-a-callback-to-an-array-1.vbs rename to Task/Apply-a-callback-to-an-array/VBScript/apply-a-callback-to-an-array-1.vb diff --git a/Task/Apply-a-callback-to-an-array/VBScript/apply-a-callback-to-an-array-2.vbs b/Task/Apply-a-callback-to-an-array/VBScript/apply-a-callback-to-an-array-2.vb similarity index 100% rename from Task/Apply-a-callback-to-an-array/VBScript/apply-a-callback-to-an-array-2.vbs rename to Task/Apply-a-callback-to-an-array/VBScript/apply-a-callback-to-an-array-2.vb diff --git a/Task/Apply-a-digital-filter-direct-form-II-transposed-/ALGOL-68/apply-a-digital-filter-direct-form-ii-transposed-.alg b/Task/Apply-a-digital-filter-direct-form-II-transposed-/ALGOL-68/apply-a-digital-filter-direct-form-ii-transposed-.alg index b5417588b2..4c7615c3bb 100644 --- a/Task/Apply-a-digital-filter-direct-form-II-transposed-/ALGOL-68/apply-a-digital-filter-direct-form-ii-transposed-.alg +++ b/Task/Apply-a-digital-filter-direct-form-II-transposed-/ALGOL-68/apply-a-digital-filter-direct-form-ii-transposed-.alg @@ -1,4 +1,5 @@ BEGIN # apply a digital filter # + # the lower bounds of a, b, signal and result must all be equal # PROC filter = ( []REAL a, b, signal, REF[]REAL result )VOID: IF LWB a /= LWB b OR LWB a /= LWB signal OR LWB a /= LWB result THEN print( ( "Array lower bounds must be equal for filter", newline ) ); @@ -10,27 +11,25 @@ BEGIN # apply a digital filter # FOR j FROM LWB b TO IF i > UPB b THEN UPB b ELSE i FI DO tmp +:= b[ j ] * signal[ LWB signal + ( i - j ) ] OD; - FOR j FROM LWB a + 1 TO IF i > UPB a THEN UPB a ELSE i FI DO + FOR j FROM LWB a + 1 TO IF i > UPB a THEN UPB a ELSE i FI DO tmp -:= a[ j ] * result[ LWB result + ( i - j ) ] OD; result[ i ] := tmp / a[ LWB a ] OD FI # filter # ; - BEGIN - [ 4 ]REAL a := []REAL( 1, -2.77555756e-16, 3.33333333e-01, -1.85037171e-17 ); - [ 4 ]REAL b := []REAL( 0.16666667, 0.5, 0.5, 0.16666667 ); - [ 20 ]REAL signal - := []REAL( -0.917843918645, 0.141984778794, 1.20536903482, 0.190286794412 - , -0.662370894973, -1.00700480494, -0.404707073677, 0.800482325044 - , 0.743500089861, 1.01090520172, 0.741527555207, 0.277841675195 - , 0.400833448236, -0.2085993586, -0.172842103641, -0.134316096293 - , 0.0259303398477, 0.490105989562, 0.549391221511, 0.9047198589 - ); - [ 20 ]REAL result; - filter( a, b, signal, result ); - FOR i FROM LWB result TO UPB result DO - print( ( " ", fixed( result[ i ], -9, 6 ) ) ); - IF i MOD 5 /= 0 THEN print( ( ", " ) ) ELSE print( ( newline ) ) FI - OD - END + [ 4 ]REAL a := []REAL( 1, -2.77555756e-16, 3.33333333e-01, -1.85037171e-17 ); + [ 4 ]REAL b := []REAL( 0.16666667, 0.5, 0.5, 0.16666667 ); + [ 20 ]REAL signal + := []REAL( -0.917843918645, 0.141984778794, 1.20536903482, 0.190286794412 + , -0.662370894973, -1.00700480494, -0.404707073677, 0.800482325044 + , 0.743500089861, 1.01090520172, 0.741527555207, 0.277841675195 + , 0.400833448236, -0.2085993586, -0.172842103641, -0.134316096293 + , 0.0259303398477, 0.490105989562, 0.549391221511, 0.9047198589 + ); + [ 20 ]REAL result; + filter( a, b, signal, result ); + FOR i FROM LWB result TO UPB result DO + print( ( " ", fixed( result[ i ], -9, 6 ) ) ); + IF i MOD 5 /= 0 THEN print( ( ", " ) ) ELSE print( ( newline ) ) FI + OD END diff --git a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Ada/apply-a-digital-filter-direct-form-ii-transposed-.adb b/Task/Apply-a-digital-filter-direct-form-II-transposed-/Ada/apply-a-digital-filter-direct-form-ii-transposed-.ada similarity index 100% rename from Task/Apply-a-digital-filter-direct-form-II-transposed-/Ada/apply-a-digital-filter-direct-form-ii-transposed-.adb rename to Task/Apply-a-digital-filter-direct-form-II-transposed-/Ada/apply-a-digital-filter-direct-form-ii-transposed-.ada diff --git a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Crystal/apply-a-digital-filter-direct-form-ii-transposed-.cr b/Task/Apply-a-digital-filter-direct-form-II-transposed-/Crystal/apply-a-digital-filter-direct-form-ii-transposed-.cr deleted file mode 100644 index 8758d38c65..0000000000 --- a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Crystal/apply-a-digital-filter-direct-form-ii-transposed-.cr +++ /dev/null @@ -1,26 +0,0 @@ -def filter (b, a, inp) - outp = Array.new(inp.size, 0.0) - (0...inp.size).each do |i| - tmp = 0.0 - (0...b.size).each do |j| - next if i - j < 0 - tmp += b[j] * inp[i-j] - end - (1...a.size).each do |j| - next if i - j < 0 - tmp -= a[j] * outp[i-j] - end - tmp /= a[0] - outp[i] = tmp - end - outp -end - -sig = [-0.917843918645, 0.141984778794, 1.20536903482, 0.190286794412, -0.662370894973, - -1.00700480494, -0.404707073677 ,0.800482325044, 0.743500089861, 1.01090520172, - 0.741527555207, 0.277841675195, 0.400833448236, -0.2085993586, -0.172842103641, - -0.134316096293, 0.0259303398477, 0.490105989562, 0.549391221511, 0.9047198589] -a = [1.00000000, -2.77555756e-16, 3.33333333e-01, -1.85037171e-17] -b = [0.16666667, 0.5, 0.5, 0.16666667] - -p filter(b, a, sig) diff --git a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Fortran/apply-a-digital-filter-direct-form-ii-transposed-.f b/Task/Apply-a-digital-filter-direct-form-II-transposed-/Fortran/apply-a-digital-filter-direct-form-ii-transposed-.f deleted file mode 100644 index 82aef332a6..0000000000 --- a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Fortran/apply-a-digital-filter-direct-form-ii-transposed-.f +++ /dev/null @@ -1,42 +0,0 @@ -module df2_filter - implicit none - real, parameter :: a(4) = [1.00000000, -2.77555756e-16, 3.33333333e-01, -1.85037171e-17] - real, parameter :: b(4) = [0.16666667, 0.5, 0.5, 0.16666667] - real :: w(4) = 0.0 ! State vector - -contains - function filter(x) result(y) - real, intent(in) :: x - real :: y - integer :: i - - y = x * b(1) + w(1) - - do i = 2, 4 - w(i-1) = x * b(i) - y * a(i) + w(i) - end do - end function filter -end module df2_filter - -program apply_filter - use df2_filter - implicit none - real, dimension(20) :: input = [ & - -0.917843918645, 0.141984778794, 1.20536903482, 0.190286794412, & - -0.662370894973, -1.00700480494, -0.404707073677, 0.800482325044, & - 0.743500089861, 1.01090520172, 0.741527555207, 0.277841675195, & - 0.400833448236, -0.2085993586, -0.172842103641, -0.134316096293, & - 0.0259303398477, 0.490105989562, 0.549391221511, 0.9047198589 ] - real, dimension(20) :: output - integer :: i - - do i = 1, 20 - output(i) = filter(input(i)) - end do - - print *, "Filtered signal:" - do i = 1,20 - write(*, '(f12.9,2x)',advance='no') output(i) - if(mod(i,5)==0)write(*,*) - end do -end program apply_filter diff --git a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Julia/apply-a-digital-filter-direct-form-ii-transposed-.jl b/Task/Apply-a-digital-filter-direct-form-II-transposed-/Julia/apply-a-digital-filter-direct-form-ii-transposed-.julia similarity index 100% rename from Task/Apply-a-digital-filter-direct-form-II-transposed-/Julia/apply-a-digital-filter-direct-form-ii-transposed-.jl rename to Task/Apply-a-digital-filter-direct-form-II-transposed-/Julia/apply-a-digital-filter-direct-form-ii-transposed-.julia diff --git a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Kotlin/apply-a-digital-filter-direct-form-ii-transposed-.kts b/Task/Apply-a-digital-filter-direct-form-II-transposed-/Kotlin/apply-a-digital-filter-direct-form-ii-transposed-.kotlin similarity index 100% rename from Task/Apply-a-digital-filter-direct-form-II-transposed-/Kotlin/apply-a-digital-filter-direct-form-ii-transposed-.kts rename to Task/Apply-a-digital-filter-direct-form-II-transposed-/Kotlin/apply-a-digital-filter-direct-form-ii-transposed-.kotlin diff --git a/Task/Apply-a-digital-filter-direct-form-II-transposed-/M2000-Interpreter/apply-a-digital-filter-direct-form-ii-transposed-.m2000 b/Task/Apply-a-digital-filter-direct-form-II-transposed-/M2000-Interpreter/apply-a-digital-filter-direct-form-ii-transposed-.m2000 deleted file mode 100644 index 7cc823c84a..0000000000 --- a/Task/Apply-a-digital-filter-direct-form-II-transposed-/M2000-Interpreter/apply-a-digital-filter-direct-form-ii-transposed-.m2000 +++ /dev/null @@ -1,49 +0,0 @@ -module Checkit { - locale 1033 ' use of dot for decimals - window 12, window ' set 12pt for current display monitor - form 60 ' 60 chars width, any for heigh - Print $("0.00000000",12) ' 12 chars per tab - ' all data push to end of stack, so we use the stack of values as FIFO - Flush - ' a() - Data 1, -2.77555756e-16, 3.33333333e-01, -1.85037171e-17 - ' b() - Data 0.16666667, 0.5, 0.5, 0.16666667 - ' signal() - Data -0.917843918645, 0.141984778794, 1.20536903482, 0.190286794412 - Data -0.662370894973, -1.00700480494, -0.404707073677, 0.800482325044 - Data 0.743500089861, 1.01090520172, 0.741527555207, 0.277841675195 - Data 0.400833448236, -0.2085993586, -0.172842103641, -0.134316096293 - Data 0.0259303398477, 0.490105989562, 0.549391221511, 0.9047198589 - Dim Base 0, a(4) as Double , b(4) as Double , signal(20) as Double - Integer i - For i = 0 To 3 : Read a(i) : Next i - For i = 0 To 3 : Read b(i) : Next i - For i = 0 To 19 : Read signal(i) : Next i - dim resp() - resp()=@Filter_a_b(&signal()) - k=each(resp()) - while k - Print array(k), - if pos>0 then if (k^+1) mod 5=0 then Print - end while - Function Filter_a_b(&c()) - Local Integer j, k - Local Double tmp - Local result(0 to len(c())-1) as Double - For j = 0 To Len(c())-1 - tmp = 0 - For k = 0 To Len(b())-1 - If (j-k < 0) Then Continue For - tmp += b(k) * c(j-k) - Next k - For k = 0 To Len(a())-1 - If (j-k < 0) Then Continue For - tmp -= a(k) * result(j-k) - Next k - result(j) = tmp/a(0) - Next j - =result() - End Function -} -Checkit diff --git a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Phix/apply-a-digital-filter-direct-form-ii-transposed-.phix b/Task/Apply-a-digital-filter-direct-form-II-transposed-/Phix/apply-a-digital-filter-direct-form-ii-transposed-.phix index 3c4df0029e..aa33f346b9 100644 --- a/Task/Apply-a-digital-filter-direct-form-II-transposed-/Phix/apply-a-digital-filter-direct-form-ii-transposed-.phix +++ b/Task/Apply-a-digital-filter-direct-form-II-transposed-/Phix/apply-a-digital-filter-direct-form-ii-transposed-.phix @@ -1,20 +1,22 @@ -with javascript_semantics -function direct_form_II_transposed_filter(sequence a, b, signal) - sequence result = repeat(0,length(signal)) - for i=1 to length(signal) do - atom tmp = 0 - for j=1 to min(i,length(b)) do tmp += b[j]*signal[i-j+1] end for - for j=2 to min(i,length(a)) do tmp -= a[j]*result[i-j+1] end for - result[i] = tmp/a[1] - end for - return result -end function +(phixonline)--> + with javascript_semantics + function direct_form_II_transposed_filter(sequence a, b, signal) + sequence result = repeat(0,length(signal)) + for i=1 to length(signal) do + atom tmp = 0 + for j=1 to min(i,length(b)) do tmp += b[j]*signal[i-j+1] end for + for j=2 to min(i,length(a)) do tmp -= a[j]*result[i-j+1] end for + result[i] = tmp/a[1] + end for + return result + end function -constant acoef = {1.00000000, -2.77555756e-16, 3.33333333e-01, -1.85037171e-17}, - bcoef = {0.16666667, 0.5, 0.5, 0.16666667}, - signal = {-0.917843918645,0.141984778794,1.20536903482,0.190286794412,-0.662370894973, - -1.00700480494,-0.404707073677,0.800482325044,0.743500089861,1.01090520172, - 0.741527555207,0.277841675195,0.400833448236,-0.2085993586,-0.172842103641, - -0.134316096293,0.0259303398477,0.490105989562,0.549391221511,0.9047198589} + constant acoef = {1.00000000, -2.77555756e-16, 3.33333333e-01, -1.85037171e-17}, + bcoef = {0.16666667, 0.5, 0.5, 0.16666667}, + signal = {-0.917843918645,0.141984778794,1.20536903482,0.190286794412,-0.662370894973, + -1.00700480494,-0.404707073677,0.800482325044,0.743500089861,1.01090520172, + 0.741527555207,0.277841675195,0.400833448236,-0.2085993586,-0.172842103641, + -0.134316096293,0.0259303398477,0.490105989562,0.549391221511,0.9047198589} -pp(direct_form_II_transposed_filter(acoef, bcoef, signal),{pp_FltFmt,"%9.6f",pp_Maxlen,110}) + pp(direct_form_II_transposed_filter(acoef, bcoef, signal),{pp_FltFmt,"%9.6f",pp_Maxlen,110}) + + without js + atom mem = allocate(size,true) + + without js + sequence ap = {} + function ap_allocate(integer size) + -- allocate some memory and add it to the arena pool 'ap' for later release + atom res = allocate(size) + ap = append(ap,res) + return res + end function + procedure ap_free() + -- free all memory allocated in arena pool 'ap' + free(ap) + ap = {} + end procedure + + -- demo\rosetta\ArithComplex.exw + with javascript_semantics + include complex.e + complex a = complex_new(1,1), -- (or just {1,1}) + b = complex_new(3.14159,1.25), + c = complex_new(1,0), + d = complex_new(0,1) + printf(1,"a = %s\n",{complex_sprint(a)}) + printf(1,"b = %s\n",{complex_sprint(b)}) + printf(1,"c = %s\n",{complex_sprint(c)}) + printf(1,"d = %s\n",{complex_sprint(d)}) + printf(1,"a+b = %s\n",{complex_sprint(complex_add(a,b))}) + printf(1,"a*b = %s\n",{complex_sprint(complex_mul(a,b))}) + printf(1,"1/a = %s\n",{complex_sprint(complex_inv(a))}) + printf(1,"c/a = %s\n",{complex_sprint(complex_div(c,a))}) + printf(1,"c-a = %s\n",{complex_sprint(complex_sub(c,a))}) + printf(1,"d-a = %s\n",{complex_sprint(complex_sub(d,a))}) + printf(1,"-a = %s\n",{complex_sprint(complex_neg(a))}) + printf(1,"conj a = %s\n",{complex_sprint(complex_conjugate(a))}) + + -- demo\rosetta\Arithmetic_evaluation.exw + with javascript_semantics -constant p_p_op = -1, -- expressions stored as p1,p2,op - p_op_p = 0, -- expressions stored as p1,op,p2 - op_p_p = +1, -- expressions stored as op,p1,p2 - opp = op_p_p + sequence opstack = {} -- atom elements are literals, + -- sequence elements are subexpressions + -- on completion length(opstack) should be 1 + object token -object op = 0 -- 0 if none, else "+", "-", "*", "/", "^", "%", or "u-" + constant op_p_p = 1 -- 1: expressions stored as op,p1,p2 + -- p_op_p -- 0: expressions stored as p1,op,p2 + -- p_p_op -- -1: expressions stored as p1,p2,op -string s -- the expression being parsed -integer ch -integer sidx + object op = 0 -- 0 if none, else "+", "-", "*", "/", "^", "%", or "u-" -procedure err(string msg) - crash("%s\n%s^ %s\n\nPressEnter...",{s,repeat(' ',sidx-1),msg}) -end procedure + string s -- the expression being parsed + integer ch + integer sidx -procedure nxtch(object msg="eof") - sidx += 1 - if sidx>length(s) then - if string(msg) then err(msg) end if - ch = -1 - else - ch = s[sidx] - end if -end procedure + procedure err(string msg) + printf(1,"%s\n%s^ %s\n\nPressEnter...",{s,repeat(' ',sidx-1),msg}) + {} = wait_key() + abort(0) + end procedure -procedure skipspaces() - while find(ch," \t\r\n") do nxtch(0) end while -end procedure + procedure nxtch(object msg="eof") + sidx += 1 + if sidx>length(s) then + if string(msg) then err(msg) end if + ch = -1 + else + ch = s[sidx] + end if + end procedure -procedure get_token() - skipspaces() - if ch=-1 then token = "eof" return end if - if ch>='0' and ch<='9' then - atom n = ch-'0' - while 1 do - nxtch(0) - if ch<'0' or ch>'9' then exit end if - n = n*10+(ch-'0') - end while - if ch='.' then - integer decimal = 1 - atom fraction = 0 - while true do - nxtch(0) - if ch<'0' or ch>'9' then exit end if - fraction = fraction*10 + (ch-'0') - decimal *= 10 - end while - n += fraction/decimal - end if --- if find(ch,"eE") then -- you get the idea --- end if - token = n - return - end if - if find(ch,"+-/*()^%")=0 then err("syntax error") end if - token = s[sidx..sidx] - nxtch(0) - return -end procedure + procedure skipspaces() + while find(ch,{' ','\t','\r','\n'})!=0 do nxtch(0) end while + end procedure -procedure Match(string t) - if token!=t then err(t&" expected") end if - get_token() -end procedure + procedure get_token() + atom n, fraction + integer dec + skipspaces() + if ch=-1 then token = "eof" return end if + if ch>='0' and ch<='9' then + n = ch-'0' + while 1 do + nxtch(0) + if ch<'0' or ch>'9' then exit end if + n = n*10+ch-'0' + end while + if ch='.' then + dec = 1 + fraction = 0 + while 1 do + nxtch(0) + if ch<'0' or ch>'9' then exit end if + fraction = fraction*10 + ch-'0' + dec *= 10 + end while + n += fraction/dec + end if + -- if find(ch,"eE") then -- you get the idea + -- end if + token = n + return + end if + if find(ch,"+-/*()^%")=0 then err("syntax error") end if + token = s[sidx..sidx] + nxtch(0) + return + end procedure -procedure PopFactor() - object p1, p2 = opstack[$], f - if op="u-" then - p1 = 0 - else - opstack = opstack[1..$-1] - p1 = opstack[$] - end if - switch opp do - case op_p_p: f = {op,p1,p2} - case p_op_p: f = {p1,op,p2} - case p_p_op: f = {p1,p2,op} - end switch - opstack[$] = f - op = 0 -end procedure + procedure Match(string t) + if token!=t then err(t&" expected") end if + get_token() + end procedure -procedure PushFactor(atom t) - if op!=0 then PopFactor() end if - opstack = append(opstack,t) -end procedure + procedure PopFactor() + object p1, p2 = opstack[$] + if op="u-" then + p1 = 0 + else + opstack = opstack[1..$-1] + p1 = opstack[$] + end if + if op_p_p=1 then + opstack[$] = {op,p1,p2} -- op_p_p + elsif op_p_p=0 then + opstack[$] = {p1,op,p2} -- p_op_p + else -- -1 + opstack[$] = {p1,p2,op} -- p_p_op + end if + op = 0 + end procedure -procedure PushOp(string t) - if op!=0 then PopFactor() end if - op = t -end procedure + procedure PushFactor(atom t) + if op!=0 then PopFactor() end if + opstack = append(opstack,t) + end procedure -forward procedure Expr(integer p) + procedure PushOp(string t) + if op!=0 then PopFactor() end if + op = t + end procedure -procedure Factor() - if atom(token) then - PushFactor(token) - if ch!=-1 then - get_token() - end if - elsif token="+" then -- (ignore) - nxtch() - Factor() - elsif token="-" then - get_token() --- Factor() - Expr(3) -- makes "-3^2" yield -9 (ie -(3^2)) not 9 (ie (-3)^2). - if op!=0 then PopFactor() end if - if integer(opstack[$]) then - opstack[$] = -opstack[$] - else - PushOp("u-") - end if - elsif token="(" then - get_token() - Expr(0) - Match(")") - else - err("syntax error") - end if -end procedure + forward procedure Expr(integer p) -constant {operators, - precedence, - associativity} = columnize({{"^",3,0}, - {"%",2,1}, - {"*",2,1}, - {"/",2,1}, - {"+",1,1}, - {"-",1,1}, - $}) + procedure Factor() + if atom(token) then + PushFactor(token) + if ch!=-1 then + get_token() + end if + elsif token="+" then -- (ignore) + nxtch() + Factor() + elsif token="-" then + get_token() + -- Factor() + Expr(3) -- makes "-3^2" yield -9 (ie -(3^2)) not 9 (ie (-3)^2). + if op!=0 then PopFactor() end if + if integer(opstack[$]) then + opstack[$] = -opstack[$] + else + PushOp("u-") + end if + elsif token="(" then + get_token() + Expr(0) + Match(")") + else + err("syntax error") + end if + end procedure -procedure Expr(integer p) --- --- Parse an expression, using precedence climbing. --- --- p is the precedence level we should parse to, eg/ie --- 4: Factor only (may as well just call Factor) --- 3: "" and ^ --- 2: "" and *,/,% --- 1: "" and +,- --- 0: full expression (effectively the same as 1) --- obviously, parentheses override any setting of p. --- - Factor() - while 1 do - integer k = find(token,operators) -- *,/,+,- - if k=0 then exit end if - integer thisp = precedence[k] - if thisp

    constant {operators, + precedence, + associativity} = columnize({{"^",3,0}, + {"%",2,1}, + {"*",2,1}, + {"/",2,1}, + {"+",1,1}, + {"-",1,1}, + $}) -function evaluate(object s) - object lhs, rhs - string op - if atom(s) then return s end if - switch opp do - case op_p_p: {op,lhs,rhs} = s - case p_op_p: {lhs,op,rhs} = s - case p_p_op: {lhs,rhs,op} = s - default: ?9/0 - end switch - if sequence(lhs) then lhs = evaluate(lhs) end if - if sequence(rhs) then rhs = evaluate(rhs) end if - if op="+" then return lhs+rhs - elsif op="-" then return lhs-rhs - elsif op="*" then return lhs*rhs - elsif op="/" then return lhs/rhs - elsif op="^" then return power(lhs,rhs) - elsif op="%" then return rmdr(lhs,rhs) - elsif op="u-" then return -rhs - else ?9/0 - end if -end function + procedure Expr(integer p) + -- + -- Parse an expression, using precedence climbing. + -- + -- p is the precedence level we should parse to, eg/ie + -- 4: Factor only (may as well just call Factor) + -- 3: "" and ^ + -- 2: "" and *,/,% + -- 1: "" and +,- + -- 0: full expression (effectively the same as 1) + -- obviously, parentheses override any setting of p. + -- + integer k, thisp + Factor() + while 1 do + k = find(token,operators) -- *,/,+,- + if k=0 then exit end if + thisp = precedence[k] + if thisp<p then exit end if + get_token() + Expr(thisp+associativity[k]) + PushOp(operators[k]) + end while + end procedure -s = "3+4+5+6*7/1*5^2^3" -- 16406262 -sidx = 0 -nxtch() -get_token() -Expr(0) -if op!=0 then PopFactor() end if -if length(opstack)!=1 then err("some error") end if -printf(1,"expression: \"%s\"\n",{s}) -puts(1,"AST (flat): ") -?opstack[1] -puts(1,"AST (tree):\n") -ppEx(opstack[1],{pp_Nest,9999}) -puts(1,"result: ") -?evaluate(opstack[1]) -{} = wait_key() + function evaluate(object s) + object lhs, rhs + string op + if atom(s) then + return s + end if + if op_p_p=1 then -- op_p_p + {op,lhs,rhs} = s + elsif op_p_p=0 then -- p_op_p + {lhs,op,rhs} = s + else -- -1 -- p_p_op + {lhs,rhs,op} = s + end if + if sequence(lhs) then lhs = evaluate(lhs) end if + if sequence(rhs) then rhs = evaluate(rhs) end if + if op="+" then + return lhs+rhs + elsif op="-" then + return lhs-rhs + elsif op="*" then + return lhs*rhs + elsif op="/" then + return lhs/rhs + elsif op="^" then + return power(lhs,rhs) + elsif op="%" then + return remainder(lhs,rhs) + elsif op="u-" then + return -rhs + else + ?9/0 + end if + end function + + s = "3+4+5+6*7/1*5^2^3" -- 16406262 + sidx = 0 + nxtch() + get_token() + Expr(0) + if op!=0 then PopFactor() end if + if length(opstack)!=1 then err("some error") end if + printf(1,"expression: \"%s\"\n",{s}) + puts(1,"AST (flat): ") + ?opstack[1] + puts(1,"AST (tree):\n") + ppEx(opstack[1],{pp_Nest,9999}) + puts(1,"result: ") + ?evaluate(opstack[1]) + {} = wait_key() + + with javascript_semantics + sequence arithmetic = {1} + integer composite = 0 -procedure get_arithmetics(integer nth) - integer n = arithmetic[$]+1 - while length(arithmetic)2 - arithmetic &= n - end if - n += 1 - end while -end procedure + function get_arithmetic(integer nth) + integer n = arithmetic[$]+1 + while length(arithmetic)<nth do + sequence divs = factors(n,1) + if remainder(sum(divs),length(divs))=0 then + composite += length(divs)>2 + arithmetic &= n + end if + n += 1 + end while + return arithmetic[nth] + end function -get_arithmetics(100) -printf(1,"The first 100 arithmetic numbers are:\n%s\n", - {join_by(arithmetic,1,10," ",fmt:="%3d")}) -constant fmt = "The %,dth arithmetic number is %,d up to which %,d are composite.\n" -for n in {1e3,1e4,1e5,1e6} do - get_arithmetics(n) - printf(1,fmt,{n,arithmetic[n],composite}) -end for + {} = get_arithmetic(100) + printf(1,"The first 100 arithmetic numbers are:\n%s\n", + {join_by(arithmetic,1,10," ",fmt:="%3d")}) + constant fmt = "The %,dth arithmetic number is %,d up to which %,d are composite.\n" + for n in {1e3,1e4,1e5,1e6} do + integer nth = get_arithmetic(n) + printf(1,fmt,{n,nth,composite}) + end for +(quotient,remainder) - if(r==0) return(self.fcn(q,k,acc.write(k),q.toFloat().sqrt())); - return(self.fcn(n,k+1+k.isOdd,acc,maxD)) + q,r:=n.divr(k); // divr-->(quotient,remainder) + if(r==0) return(self.fcn(q,k,acc.write(k),q.toFloat().sqrt())); + return(self.fcn(n,k+1+k.isOdd,acc,maxD)) } }(n,2,Sink(List),n.toFloat().sqrt()); m:=acc.reduce('*,1); // mulitply factors diff --git a/Task/Average-loop-length/Ada/average-loop-length.adb b/Task/Average-loop-length/Ada/average-loop-length.ada similarity index 100% rename from Task/Average-loop-length/Ada/average-loop-length.adb rename to Task/Average-loop-length/Ada/average-loop-length.ada diff --git a/Task/Average-loop-length/Crystal/average-loop-length.cr b/Task/Average-loop-length/Crystal/average-loop-length.cr deleted file mode 100644 index 713284e441..0000000000 --- a/Task/Average-loop-length/Crystal/average-loop-length.cr +++ /dev/null @@ -1,26 +0,0 @@ -struct Int - def factorial - raise "only positive" if self < 0 - (1_i64..self.to_i64).product - end -end - -def rand_until_rep (n) - rands = {} of Int32 => Bool - loop do - r = rand(1..n) - return rands.size if rands[r]? - rands[r] = true - end -end - -runs = 1_000_000 - -puts " N average exp. diff ", - "=== ======== ======== ===========" -(1..20).each do |n| - sum_of_runs = runs.times.sum(0_i64) { rand_until_rep(n) } - avg = sum_of_runs / runs - analytical = (1..n).sum(0.0) {|i| (n.factorial / (n.to_f**i) / (n-i).factorial) } - puts "%3d %8.4f %8.4f (%8.4f%%)" % {n, avg, analytical, (avg/analytical - 1)*100} -end diff --git a/Task/Average-loop-length/Delphi/average-loop-length.pas b/Task/Average-loop-length/Delphi/average-loop-length.delphi similarity index 100% rename from Task/Average-loop-length/Delphi/average-loop-length.pas rename to Task/Average-loop-length/Delphi/average-loop-length.delphi diff --git a/Task/Average-loop-length/EasyLang/average-loop-length.easy b/Task/Average-loop-length/EasyLang/average-loop-length.easy index d036ff7912..8440cfd706 100644 --- a/Task/Average-loop-length/EasyLang/average-loop-length.easy +++ b/Task/Average-loop-length/EasyLang/average-loop-length.easy @@ -1,11 +1,11 @@ -fastfunc average n reps . - len f[] n - len seen[] n +func average n reps . for r to reps - for i = 1 to n - f[i] = random 1 n - seen[i] = 0 + f[] = [ ] + for i to n + f[] &= randint n . + seen[] = [ ] + len seen[] n x = 1 while seen[x] = 0 seen[x] = 1 @@ -15,7 +15,7 @@ fastfunc average n reps . . return count / reps . -fastfunc analytical n . +func analytical n . s = 1 t = 1 for i = n - 1 downto 1 @@ -30,8 +30,8 @@ for n to 20 avg = average n 1e6 ana = analytical n err = (avg - ana) / ana * 100 - numfmt 2 0 + numfmt 0 2 write n - numfmt 9 4 + numfmt 4 9 print avg & ana & err & "%" . diff --git a/Task/Average-loop-length/Elixir/average-loop-length.ex b/Task/Average-loop-length/Elixir/average-loop-length.elixir similarity index 100% rename from Task/Average-loop-length/Elixir/average-loop-length.ex rename to Task/Average-loop-length/Elixir/average-loop-length.elixir diff --git a/Task/Average-loop-length/JavaScript/average-loop-length.js b/Task/Average-loop-length/JavaScript/average-loop-length.js deleted file mode 100644 index 68e1ae0b93..0000000000 --- a/Task/Average-loop-length/JavaScript/average-loop-length.js +++ /dev/null @@ -1,49 +0,0 @@ -const MAX_N = 20 -const TIMES = 1000000 - -function factorial(n) { - let prod = 1; - for (let i = n; i > 1; i--) { - prod *= i; - } - return prod; -} - -function getRandomInt(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - return Math.floor(Math.random() * (max - min + 1)) + min; -} - - -function analytical(n) { - let items = []; - - for (let i = 1; i < n+1; i++) { - items.push(factorial(n) / Math.pow(n, i) / factorial(n - i)); - } - - return items.reduce((p, v) => p + v, 0); -} - -function test(n, times) { - let count = 0; - for (let i = 0; i < times; i++) { - let x = 1, bits = 0; - - while (!(bits & x)) { - count += 1; - bits |= x; - x = 1 << getRandomInt(0, n-1); - } - } - return count / times; -} - -console.log(" n\tavg\texp.\tdiff\n-------------------------------"); -for(let n = 1; n < MAX_N+1; n++) { - const avg = test(n, TIMES); - const theory = analytical(n); - const diff = (avg / theory - 1) * 100; - console.log(`${n.toString().padStart(2)} ${avg.toFixed(4).padStart(8)} ${theory.toFixed(4).padStart(8)} ${diff.toFixed(3).padStart(6)}%`); -} diff --git a/Task/Average-loop-length/Julia/average-loop-length.jl b/Task/Average-loop-length/Julia/average-loop-length.julia similarity index 100% rename from Task/Average-loop-length/Julia/average-loop-length.jl rename to Task/Average-loop-length/Julia/average-loop-length.julia diff --git a/Task/Average-loop-length/Kotlin/average-loop-length.kts b/Task/Average-loop-length/Kotlin/average-loop-length.kotlin similarity index 100% rename from Task/Average-loop-length/Kotlin/average-loop-length.kts rename to Task/Average-loop-length/Kotlin/average-loop-length.kotlin diff --git a/Task/Average-loop-length/Phix/average-loop-length.phix b/Task/Average-loop-length/Phix/average-loop-length.phix index 275c4a1507..bb282fbcdf 100644 --- a/Task/Average-loop-length/Phix/average-loop-length.phix +++ b/Task/Average-loop-length/Phix/average-loop-length.phix @@ -1,31 +1,35 @@ -with javascript_semantics -constant MAX = 20, - ITER = 1000000 +(phixonline)--> + constant MAX = 20, + ITER = 1000000 -function expected(integer n) - atom res = 0 - for i=1 to n do - res += factorial(n)/power(n,i)/factorial(n-i) - end for - return res -end function + function expected(integer n) + atom sum = 0 + for i=1 to n do + sum += factorial(n) / power(n,i) / factorial(n-i) + end for + return sum + end function -function test(integer n) - integer count = 0 - for i=1 to ITER do - integer x = 1, bits = 0 - while not and_bits(bits,x) do - count += 1 - bits = or_bits(bits,x) - x = power(2,rand(n)-1) - end while - end for - return count/ITER -end function + function test(integer n) + integer count = 0, x, bits + for i=1 to ITER do + x = 1 + bits = 0 + while not and_bits(bits,x) do + count += 1 + bits = or_bits(bits,x) + x = power(2,rand(n)-1) + end while + end for + return count/ITER + end function -puts(1," n avg. exp. (error%)\n"); -puts(1,"== ====== ====== ========\n"); -for n=1 to MAX do - atom av = test(n), ex = expected(n) - printf(1,"%2d %8.4f %8.4f (%5.3f%%)\n", {n,av,ex,abs(1-av/ex)*100}) -end for + atom av, ex + puts(1," n avg. exp. (error%)\n"); + puts(1,"== ====== ====== ========\n"); + for n=1 to MAX do + av = test(n) + ex = expected(n) + printf(1,"%2d %8.4f %8.4f (%5.3f%%)\n", {n,av,ex,abs(1-av/ex)*100}) + end for + + with javascript_semantics + function MeanAngle(sequence angles) + atom x = 0, y = 0 + for i=1 to length(angles) do + atom ai_rad = angles[i]*PI/180 + x += cos(ai_rad) + y += sin(ai_rad) + end for + if abs(x)<1e-16 then return "not meaningful" end if + return sprintf("%g",round(atan2(y,x)*180/PI,1e10)) + end function -for a in {{350,10},{90,180,270,360},{10,20,30},{180},{0,180}, - {90,270},{45,225},{10,190},{1,91,181,271}} do - printf(1,"%16V: Mean Angle is %s\n",{a,MeanAngle(a)}) -end for + constant AngleLists = {{350,10},{90,180,270,360},{10,20,30},{180},{0,180}} + for i=1 to length(AngleLists) do + sequence ai = AngleLists[i] + printf(1,"%16V: Mean Angle is %s\n",{ai,MeanAngle(ai)}) + end for + + with javascript_semantics + function MeanAngle(sequence angles) + atom x = 0, y = 0 + for i=1 to length(angles) do + atom ai_rad = angles[i]*PI/180 + x += cos(ai_rad) + y += sin(ai_rad) + end for + if abs(x)<1e-16 then return "not meaningful" end if + return atan2(y,x)*180/PI + end function -function toSecAngle(integer hours, integer minutes, integer seconds) - return ((hours*60+minutes)*60+seconds)/(24*60*60)*360 -end function + function toSecAngle(integer hours, integer minutes, integer seconds) + return ((hours*60+minutes)*60+seconds)/(24*60*60)*360 + end function -constant Times = {toSecAngle(23,00,17), - toSecAngle(23,40,20), - toSecAngle(00,12,45), - toSecAngle(00,17,19)} + constant Times = {toSecAngle(23,00,17), + toSecAngle(23,40,20), + toSecAngle(00,12,45), + toSecAngle(00,17,19)} -function toHMS(object s) - if not string(s) then - if s<0 then s+=360 end if - s = 24*60*60*s/360 - atom hours = floor(s/3600), - mins = floor(remainder(s,3600)/60), - secs = remainder(s,60) - s = sprintf("%02d:%02d:%02d",{hours,mins,secs}) - end if - return s -end function + function toHMS(object s) + if not string(s) then + if s<0 then s+=360 end if + s = 24*60*60*s/360 + atom hours = floor(s/3600), + mins = floor(remainder(s,3600)/60), + secs = remainder(s,60) + s = sprintf("%02d:%02d:%02d",{hours,mins,secs}) + end if + return s + end function -printf(1,"Mean Time is %s\n",{toHMS(MeanAngle(Times))}) + printf(1,"Mean Time is %s\n",{toHMS(MeanAngle(Times))}) + + function mode(sequence s) + -- returns a list of the most common values, each of which occurs the same number of times + integer nxt = 1, count = 1, maxc = 1 + sequence res = {} + if length(s)!=0 then + s = sort(s) + object prev = s[1] + for i=2 to length(s) do + if s[i]!=prev then + s[nxt] = {count,prev} + nxt += 1 + prev = s[i] + count = 1 + else + count += 1 + if count>maxc then + maxc = count + end if + end if + end for + s[nxt] = {count,prev} + res = "" + for i=1 to nxt do + if s[i][1]=maxc then + res = append(res,s[i][2]) + end if + end for + end if + return res + end function -?mode({1, 2, 5, -5, -9.5, 3.14159}) -?mode({ 1, "blue", 2, 7.5, 5, "green", "red", 5, 2, "blue", "white" }) -?mode({1, 2, 3, 1, 2, 4, 2, 5, 2, 3, 3, 1, 3, 6}) -?mode({.2, .7, .1, .8, .2}) -?mode({"two", 7, 1, 8, "two", 8}) -?mode("Hello there world") -?mode({}) -{} = wait_key() + ?mode({1, 2, 5, -5, -9.5, 3.14159}) + ?mode({ 1, "blue", 2, 7.5, 5, "green", "red", 5, 2, "blue", "white" }) + ?mode({1, 2, 3, 1, 2, 4, 2, 5, 2, 3, 3, 1, 3, 6}) + ?mode({.2, .7, .1, .8, .2}) + ?mode({"two", 7, 1, 8, "two", 8}) + ?mode("Hello there world") + ?mode({}) + {} = wait_key() + + with javascript_semantics + sequence sma = {} -- ((period,history,circnxt)) (private to sma.e) + integer sma_free = 0 + + global function new_sma(integer period) + integer res + if sma_free then + res = sma_free + sma_free = sma[sma_free] + sma[res] = {period,{},0} + else + sma = append(sma,{period,{},0}) + res = length(sma) + end if + return res + end function + + global procedure add_sma(integer sidx, atom val) + integer period, circnxt + sequence history + {period,history,circnxt} = sma[sidx] + sma[sidx][2] = 0 -- (kill refcount) + if length(history)<period then + history = append(history,val) + else + circnxt += 1 + if circnxt>period then + circnxt = 1 + end if + sma[sidx][3] = circnxt + history[circnxt] = val + end if + sma[sidx][2] = history + end procedure + + global function get_sma_average(integer sidx) + sequence history = sma[sidx][2] + integer l = length(history) + if l=0 then return 0 end if + return sum(history)/l + end function + + global function moving_average(integer sidx, atom val) + add_sma(sidx,val) + return get_sma_average(sidx) + end function + + global procedure free_sma(integer sidx) + sma[sidx] = sma_free + sma_free = sidx + end procedure + + with javascript_semantics + include sma.e + + constant sma3 = new_sma(3) + constant sma5 = new_sma(5) + constant s = {1,2,3,4,5,5,4,3,2,1} + integer si + + for i=1 to length(s) do + si = s[i] + printf(1,"%2g: sma3=%8g, sma5=%8g\n",{si,moving_average(sma3,si),moving_average(sma5,si)}) + end for + + with javascript_semantics + for i=2 to 99736 by 2 do + if remainder(i*i,1000000)=269696 then ?i exit end if + end for + + with javascript_semantics + procedure solve_babbage_problem() -- (so that return quits 3 loops) + sequence cands = {0}, -- n-digit candidates (n initially 0) + nextc = {} -- n+1-digit candidates, aka next "" + integer p10 = 1, -- power of 10 for adding prefixes + r10 = 10, -- power of 10 for getting remainder + cc = 0 -- count of calculations + for digits=1 to 6 do -- aka 1..length("269696") + for prefix=0 to 9*p10 by p10 do + for cand in sq_add(prefix,cands) do + atom square = cand*cand + cc += 1 + if remainder(square,r10) = remainder(269696,r10) then + if digits=6 then + printf(1,"Solution: %d (%d calcs)\n",{cand,cc}) + return -- leave solve_babbage_problem() + end if + nextc &= cand -- add candidate for next iteration + end if + end for + end for + {cands,nextc} = {nextc,{}} + printf(1,"%d-digit candidates: %v\n",{digits,cands}) + p10 *= 10 + r10 *= 10 + end for + end procedure + solve_babbage_problem() + []. balanced_brackets --> - ['['], - balanced_brackets, - [']']. + ['['], + balanced_brackets, + [']']. balanced_brackets --> - ['[',']'], - balanced_brackets. + ['[',']'], + balanced_brackets. % generator of random brackets gen_bracket(0) --> []. gen_bracket(N) --> - {N1 is N - 1, - R is random(2)}, - bracket(R), - gen_bracket(N1). + {N1 is N - 1, + R is random(2)}, + bracket(R), + gen_bracket(N1). bracket(0) --> ['[']. bracket(1) --> [']']. diff --git a/Task/Balanced-brackets/Rebol/balanced-brackets.rebol b/Task/Balanced-brackets/Rebol/balanced-brackets.rebol deleted file mode 100644 index 63f0bd4e48..0000000000 --- a/Task/Balanced-brackets/Rebol/balanced-brackets.rebol +++ /dev/null @@ -1,21 +0,0 @@ -Rebol [ - title: "Rosetta code: Balanced brackets" - file: %Balanced_brackets.r3 - url: https://rosettacode.org/wiki/Balanced_brackets -] - -;; Returns TRUE if all square brackets in `str` are properly nested and balanced -balanced?: function/with [str][parse str rule][ - ;; Recursive rule: a balanced group is [ followed by any nested balanced groups, then ] - balanced-brackets: [#"[" any balanced-brackets #"]"] - ;; Full string must consist entirely of balanced groups with nothing left over - rule: [any balanced-brackets end] -] - -;; Test: generate 10 random substrings of bracket pairs and check each -random/seed 2 -repeat i 10 [ - str: random copy/part "[][][][][][][][][][]" i * 2 ;; shuffle first i*2 chars - res: pick ["balanced" "unbalanced"] balanced? str ;; label the result - printf [-2 ". " 11] reduce [i res mold str] ;; print index, verdict, string -] diff --git a/Task/Balanced-brackets/Red/balanced-brackets.red b/Task/Balanced-brackets/Red/balanced-brackets.red index 40d773a9f3..a5fc247878 100644 --- a/Task/Balanced-brackets/Red/balanced-brackets.red +++ b/Task/Balanced-brackets/Red/balanced-brackets.red @@ -5,18 +5,18 @@ balanced?: func [str][parse str rule] ; Tests tests: [ - good: ["" "[]" "[][]" "[[]]" "[[][]]" "[[[[[]]][][[]]]]"] - bad: ["[" "]" "][" "[[]" "[]]" "[]][[]" "[[[[[[]]]]]]]"] + good: ["" "[]" "[][]" "[[]]" "[[][]]" "[[[[[]]][][[]]]]"] + bad: ["[" "]" "][" "[[]" "[]]" "[]][[]" "[[[[[[]]]]]]]"] ] foreach str tests/good [ - if not balanced? str [print [mold str "failed!"]] + if not balanced? str [print [mold str "failed!"]] ] foreach str tests/bad [ - if balanced? str [print [mold str "failed!"]] + if balanced? str [print [mold str "failed!"]] ] repeat i 10 [ - str: random copy/part "[][][][][][][][][][]" i * 2 - print [mold str "is" either balanced? str ["balanced"]["unbalanced"]] + str: random copy/part "[][][][][][][][][][]" i * 2 + print [mold str "is" either balanced? str ["balanced"]["unbalanced"]] ] diff --git a/Task/Balanced-brackets/Rust/balanced-brackets.rs b/Task/Balanced-brackets/Rust/balanced-brackets.rust similarity index 100% rename from Task/Balanced-brackets/Rust/balanced-brackets.rs rename to Task/Balanced-brackets/Rust/balanced-brackets.rust diff --git a/Task/Balanced-brackets/Scheme/balanced-brackets.scm b/Task/Balanced-brackets/Scheme/balanced-brackets.ss similarity index 100% rename from Task/Balanced-brackets/Scheme/balanced-brackets.scm rename to Task/Balanced-brackets/Scheme/balanced-brackets.ss diff --git a/Task/Balanced-brackets/Stata/balanced-brackets.stata b/Task/Balanced-brackets/Stata/balanced-brackets.stata index 83eedcefc9..ce238f97e3 100644 --- a/Task/Balanced-brackets/Stata/balanced-brackets.stata +++ b/Task/Balanced-brackets/Stata/balanced-brackets.stata @@ -1,12 +1,12 @@ mata function random_brackets(n) { - return(invtokens(("[","]")[runiformint(1,2*n,1,2)],"")) + return(invtokens(("[","]")[runiformint(1,2*n,1,2)],"")) } function is_balanced(s) { - n = strlen(s) - if (n==0) return(1) - a = runningsum(92:-ascii(s)) - return(all(a:>=0) & a[n]==0) + n = strlen(s) + if (n==0) return(1) + a = runningsum(92:-ascii(s)) + return(all(a:>=0) & a[n]==0) } end diff --git a/Task/Balanced-brackets/Tcl/balanced-brackets-1.tcl b/Task/Balanced-brackets/Tcl/balanced-brackets-1.tcl index 2e2beb8e8f..82d7ece066 100644 --- a/Task/Balanced-brackets/Tcl/balanced-brackets-1.tcl +++ b/Task/Balanced-brackets/Tcl/balanced-brackets-1.tcl @@ -3,9 +3,9 @@ proc generate {n} { set l [lrepeat $n "\[" "\]"] set len [llength $l] while {$len} { - set tmp [lindex $l [set i [expr {int($len * rand())}]]] - lset l $i [lindex $l [incr len -1]] - lset l $len $tmp + set tmp [lindex $l [set i [expr {int($len * rand())}]]] + lset l $i [lindex $l [incr len -1]] + lset l $len $tmp } return [join $l ""] } @@ -13,11 +13,11 @@ proc generate {n} { proc balanced s { set n 0 foreach c [split $s ""] { - # Everything unmatched is ignored, which is what we want - switch -exact -- $c { - "\[" {incr n} - "\]" {if {[incr n -1] < 0} {return false}} - } + # Everything unmatched is ignored, which is what we want + switch -exact -- $c { + "\[" {incr n} + "\]" {if {[incr n -1] < 0} {return false}} + } } expr {!$n} } diff --git a/Task/Balanced-brackets/Tcl/balanced-brackets-2.tcl b/Task/Balanced-brackets/Tcl/balanced-brackets-2.tcl index e0e4f4a0b7..f01beac2ea 100644 --- a/Task/Balanced-brackets/Tcl/balanced-brackets-2.tcl +++ b/Task/Balanced-brackets/Tcl/balanced-brackets-2.tcl @@ -1,8 +1,8 @@ proc constructBalancedString {n} { set s "" for {set i 0} {$i < $n} {incr i} { - set x [expr {int(rand() * ([string length $s] + 1))}] - set s "[string range $s 0 [expr {$x-1}]]\[\][string range $s $x end]" + set x [expr {int(rand() * ([string length $s] + 1))}] + set s "[string range $s 0 [expr {$x-1}]]\[\][string range $s $x end]" } return $s } diff --git a/Task/Balanced-brackets/VBScript/balanced-brackets-1.vb b/Task/Balanced-brackets/VBScript/balanced-brackets-1.vb new file mode 100644 index 0000000000..8a458a26f4 --- /dev/null +++ b/Task/Balanced-brackets/VBScript/balanced-brackets-1.vb @@ -0,0 +1,36 @@ +For n = 1 To 10 + sequence = Generate_Sequence(n) + WScript.Echo sequence & " is " & Check_Balance(sequence) & "." +Next + +Function Generate_Sequence(n) + For i = 1 To n + j = Round(Rnd()) + If j = 0 Then + Generate_Sequence = Generate_Sequence & "[" + Else + Generate_Sequence = Generate_Sequence & "]" + End If + Next +End Function + +Function Check_Balance(s) + Set Stack = CreateObject("System.Collections.Stack") + For i = 1 To Len(s) + char = Mid(s,i,1) + If i = 1 Or char = "[" Then + Stack.Push(char) + ElseIf Stack.Count <> 0 Then + If char = "]" And Stack.Peek = "[" Then + Stack.Pop + End If + Else + Stack.Push(char) + End If + Next + If Stack.Count > 0 Then + Check_Balance = "Not Balanced" + Else + Check_Balance = "Balanced" + End If +End Function diff --git a/Task/Balanced-brackets/VBScript/balanced-brackets-1.vbs b/Task/Balanced-brackets/VBScript/balanced-brackets-1.vbs deleted file mode 100644 index d271076d80..0000000000 --- a/Task/Balanced-brackets/VBScript/balanced-brackets-1.vbs +++ /dev/null @@ -1,36 +0,0 @@ -For n = 1 To 10 - sequence = Generate_Sequence(n) - WScript.Echo sequence & " is " & Check_Balance(sequence) & "." -Next - -Function Generate_Sequence(n) - For i = 1 To n - j = Round(Rnd()) - If j = 0 Then - Generate_Sequence = Generate_Sequence & "[" - Else - Generate_Sequence = Generate_Sequence & "]" - End If - Next -End Function - -Function Check_Balance(s) - Set Stack = CreateObject("System.Collections.Stack") - For i = 1 To Len(s) - char = Mid(s,i,1) - If i = 1 Or char = "[" Then - Stack.Push(char) - ElseIf Stack.Count <> 0 Then - If char = "]" And Stack.Peek = "[" Then - Stack.Pop - End If - Else - Stack.Push(char) - End If - Next - If Stack.Count > 0 Then - Check_Balance = "Not Balanced" - Else - Check_Balance = "Balanced" - End If -End Function diff --git a/Task/Balanced-brackets/VBScript/balanced-brackets-2.vb b/Task/Balanced-brackets/VBScript/balanced-brackets-2.vb new file mode 100644 index 0000000000..cb0beeaef5 --- /dev/null +++ b/Task/Balanced-brackets/VBScript/balanced-brackets-2.vb @@ -0,0 +1,40 @@ +option explicit + +function do_brackets(bal) + dim s,i,cnt,r + if bal then s="[":cnt=1 else s="":cnt=0 + for i=1 to 20 + if (rnd>0.7) then r=not r + if not r then + s=s+"[" :cnt=cnt+1 + else + if not bal or (bal and cnt>0) then s=s+"]":cnt=cnt-1 + end if + next + if bal and cnt<>0 then s=s&string(cnt,"]") + if not bal and cnt=0 then s=s&"]" + do_brackets=s +end function + +function isbalanced(s) + dim s1,i,cnt: cnt=0 + for i=1 to len(s) + s1=mid(s,i,1) + if s1="[" then cnt=cnt+1 + if s1="]" then cnt=cnt-1 + if cnt<0 then isbalanced=false:exit function + next + isbalanced=(cnt=0) +end function + +function iif(a,b,c): if a then iif=b else iif=c end if : end function + +randomize timer +dim i,s,bal,bb +for i=1 to 10 + bal=(rnd>.5) + s=do_brackets(bal) + bb=isbalanced(s) + wscript.echo iif (bal,"","un")& "balanced string " &vbtab _ + & s & vbtab & " Checks as " & iif(bb,"","un")&"balanced" +next diff --git a/Task/Balanced-brackets/VBScript/balanced-brackets-2.vbs b/Task/Balanced-brackets/VBScript/balanced-brackets-2.vbs deleted file mode 100644 index 674efc6e13..0000000000 --- a/Task/Balanced-brackets/VBScript/balanced-brackets-2.vbs +++ /dev/null @@ -1,40 +0,0 @@ -option explicit - -function do_brackets(bal) - dim s,i,cnt,r - if bal then s="[":cnt=1 else s="":cnt=0 - for i=1 to 20 - if (rnd>0.7) then r=not r - if not r then - s=s+"[" :cnt=cnt+1 - else - if not bal or (bal and cnt>0) then s=s+"]":cnt=cnt-1 - end if - next - if bal and cnt<>0 then s=s&string(cnt,"]") - if not bal and cnt=0 then s=s&"]" - do_brackets=s -end function - -function isbalanced(s) - dim s1,i,cnt: cnt=0 - for i=1 to len(s) - s1=mid(s,i,1) - if s1="[" then cnt=cnt+1 - if s1="]" then cnt=cnt-1 - if cnt<0 then isbalanced=false:exit function - next - isbalanced=(cnt=0) -end function - -function iif(a,b,c): if a then iif=b else iif=c end if : end function - -randomize timer -dim i,s,bal,bb -for i=1 to 10 - bal=(rnd>.5) - s=do_brackets(bal) - bb=isbalanced(s) - wscript.echo iif (bal,"","un")& "balanced string " &vbtab _ - & s & vbtab & " Checks as " & iif(bb,"","un")&"balanced" -next diff --git a/Task/Balanced-brackets/XBS/balanced-brackets.xbs b/Task/Balanced-brackets/XBS/balanced-brackets.xbs index 11305dd643..3bccd7da4a 100644 --- a/Task/Balanced-brackets/XBS/balanced-brackets.xbs +++ b/Task/Balanced-brackets/XBS/balanced-brackets.xbs @@ -1,17 +1,17 @@ const Chars:[string] = ["[","]"]; func GenerateString(Amount:number=4):string{ - set Result:string = ""; - <|(*1..Amount)=>Result+=Chars[math.random(0,?Chars-1)]; - send Result; + set Result:string = ""; + <|(*1..Amount)=>Result+=Chars[math.random(0,?Chars-1)]; + send Result; } func IsBalanced(String:string):boolean{ - set Pairs:number = 0; - <|(*(0..(?String-1)))=>(String::at(_)=="[")?(Pairs<0)?=>send false,Pairs++,=>Pairs--; - send (Opens==Closes)&(Pairs==0); + set Pairs:number = 0; + <|(*(0..(?String-1)))=>(String::at(_)=="[")?(Pairs<0)?=>send false,Pairs++,=>Pairs--; + send (Opens==Closes)&(Pairs==0); } repeat 10 { - set s = GenerateString(math.random(2,4)*2); - log(`{s}: {IsBalanced(s)}`); + set s = GenerateString(math.random(2,4)*2); + log(`{s}: {IsBalanced(s)}`); } diff --git a/Task/Balanced-brackets/Ya/balanced-brackets.ya b/Task/Balanced-brackets/Ya/balanced-brackets.ya index 40698505e5..0b3e76f880 100644 --- a/Task/Balanced-brackets/Ya/balanced-brackets.ya +++ b/Task/Balanced-brackets/Ya/balanced-brackets.ya @@ -4,34 +4,34 @@ // definition of anything new is prefixed by \, like \MakeNew_[]s and \len // MakeNew_[]s is Ok ident in Ya: _ starts sign part of ident, which must be ended by _ or alphanum `Char[^] \MakeNew_[]s(`Int+ \len) // `Char[^] and `Char[=] are arrays that owns their items, like it's usally in other langs; - // yet in assignment of `Char[^] to `Char[=] the allocated memory is moved from old to new owner, and old string becomes empty - // there are tabs at starts of many lines; these tabs specify what in C++ is {} blocks, just like in Python - len & 1 ==0 ! // it's a call to postfix function '!' which is an assert: len must be even - `Char[=] \r(len) // allocate new string of length len - // most statements are analogous to C++ but written starting by capital letter: For If Switch Ret - For `Char[] \eye = r; eye // // `Char[] is a simplest array of chars, which does not hold a memory used by array items; inc part of For loop is missed: it's Ok, and condition and init could also be missed - *eye++ = '['; *eye++ = '[' // fill r by "[][][]...". The only place with ; as statement delemiter: required because the statement is not started at new line. - // below is a shuffle of "[][][]..." array - For `Char[] \eye = r; ++eye // var eye is already defined, but being the same `Char[] it's Ok by using already exisiting var. ++eye is used: it allows use of eye[-1] inside - `Int+ \at = Random(eye/Length) // `Int+ is C++'s unsigned int. eye/Length: / is used for access to field, like in file path - eye[-1],eye[at] = eye[at],eye[-1] // swap using tuples; eye[-1] accesses char that is out of current array, yet it's allowed - Ret r // Ret is C's return + // yet in assignment of `Char[^] to `Char[=] the allocated memory is moved from old to new owner, and old string becomes empty + // there are tabs at starts of many lines; these tabs specify what in C++ is {} blocks, just like in Python + len & 1 ==0 ! // it's a call to postfix function '!' which is an assert: len must be even + `Char[=] \r(len) // allocate new string of length len + // most statements are analogous to C++ but written starting by capital letter: For If Switch Ret + For `Char[] \eye = r; eye // // `Char[] is a simplest array of chars, which does not hold a memory used by array items; inc part of For loop is missed: it's Ok, and condition and init could also be missed + *eye++ = '['; *eye++ = '[' // fill r by "[][][]...". The only place with ; as statement delemiter: required because the statement is not started at new line. + // below is a shuffle of "[][][]..." array + For `Char[] \eye = r; ++eye // var eye is already defined, but being the same `Char[] it's Ok by using already exisiting var. ++eye is used: it allows use of eye[-1] inside + `Int+ \at = Random(eye/Length) // `Int+ is C++'s unsigned int. eye/Length: / is used for access to field, like in file path + eye[-1],eye[at] = eye[at],eye[-1] // swap using tuples; eye[-1] accesses char that is out of current array, yet it's allowed + Ret r // Ret is C's return `Bool \AreBalanced(`Char[] \brackets) - `Int+ \extra = 0 - For ;brackets ;++brackets - Switch *brackets - '[' // it's a C++'s 'case': both 'case' and ':' are skipped being of no value; but the code for a case should be in block, which is here specifyed by tabs at next line start - ++extra - ']' - If !!extra // '!!' is `Bool not, like all other `Bool ops: && || ^^ - Ret No // No and False are C's false; Yes and True are C's true - --extra - // There is no default case, which is written as ':' - so if no case is Ok then it will fail just like if being written as on the next line - // : { 0! } // C's default: assert(0); - Ret extra == 0 + `Int+ \extra = 0 + For ;brackets ;++brackets + Switch *brackets + '[' // it's a C++'s 'case': both 'case' and ':' are skipped being of no value; but the code for a case should be in block, which is here specifyed by tabs at next line start + ++extra + ']' + If !!extra // '!!' is `Bool not, like all other `Bool ops: && || ^^ + Ret No // No and False are C's false; Yes and True are C's true + --extra + // There is no default case, which is written as ':' - so if no case is Ok then it will fail just like if being written as on the next line + // : { 0! } // C's default: assert(0); + Ret extra == 0 // function ala 'main' is not used: all global code from all modules are executed; so below is what typically is in ala 'main' For `Int \n=10; n; --n - // below note that new var 'brackets' is created inside args of func call - //@Std/StdIO/ is used here to use Print function; else it maybe changed to Use @Std/StdIO at global level before this For loop - @Std/StdIO/Print(; "%s : %s\n" ;`Char[=] \brackets = MakeNew_[]s(10) /* all bracket strings are of length 10 */; AreBalanced(brackets) ? "Ok" : "bad") - // note that starting arg of Print is missed by using ';' - default arg value is allowed to use for any arg, even if next args are written + // below note that new var 'brackets' is created inside args of func call + //@Std/StdIO/ is used here to use Print function; else it maybe changed to Use @Std/StdIO at global level before this For loop + @Std/StdIO/Print(; "%s : %s\n" ;`Char[=] \brackets = MakeNew_[]s(10) /* all bracket strings are of length 10 */; AreBalanced(brackets) ? "Ok" : "bad") + // note that starting arg of Print is missed by using ';' - default arg value is allowed to use for any arg, even if next args are written diff --git a/Task/Balanced-brackets/Yabasic/balanced-brackets.basic b/Task/Balanced-brackets/Yabasic/balanced-brackets.basic index f318913bce..f92e2488aa 100644 --- a/Task/Balanced-brackets/Yabasic/balanced-brackets.basic +++ b/Task/Balanced-brackets/Yabasic/balanced-brackets.basic @@ -1,6 +1,6 @@ sub check_brackets(s$) local level, i - + for i = 1 to len(s$) switch mid$(s$, i, 1) case "[": level = level + 1 : break diff --git a/Task/Balanced-brackets/Zig/balanced-brackets.zig b/Task/Balanced-brackets/Zig/balanced-brackets.zig deleted file mode 100644 index 5528f6e13e..0000000000 --- a/Task/Balanced-brackets/Zig/balanced-brackets.zig +++ /dev/null @@ -1,41 +0,0 @@ -const std = @import("std"); -const print = std.debug.print; - -const max_pairs = 256; - -pub fn is_balanced(buf: []u8) bool { - var count: usize = 0; - for (buf) |ch| switch (ch) { - '[' => count += 1, - ']' => { - if (count == 0) return false; - count -= 1; - }, - else => return false, - }; - return count == 0; -} - -pub fn main() !void { - for (0..10) |n_pairs| { - if (n_pairs > max_pairs) - return error.MaximumNumberOfPairsExceded; - - var buf: [2 * max_pairs]u8 = undefined; - for (0..n_pairs) |i| buf[i] = '['; - for (n_pairs..n_pairs * 2) |i| buf[i] = ']'; - - const rand = std.crypto.random; - const len = n_pairs * 2; - const reps = 2; - for (0..len * reps) |i_rep| { - const i = i_rep % len; - const j = rand.int(usize) % len; - const temp = buf[i]; - buf[i] = buf[j]; - buf[j] = temp; - } - const s = buf[0..len]; - print("'{s}': {}\n", .{ s, is_balanced(s) }); - } -} diff --git a/Task/Balanced-ternary/00-TASK.txt b/Task/Balanced-ternary/00-TASK.txt index f548e4c8c0..6b6f6bb48f 100644 --- a/Task/Balanced-ternary/00-TASK.txt +++ b/Task/Balanced-ternary/00-TASK.txt @@ -10,13 +10,13 @@ Decimal 6 = 32 − 31 + 0 × 30, thus it can b ;Task: Implement balanced ternary representation of integers with the following: # Support arbitrarily large integers, both positive and negative; -# Provide ways to convert to and from text strings, using digits '+', '−' and '0' (unless you are already using strings to represent balanced ternary; but see requirement 5). +# Provide ways to convert to and from text strings, using digits '+', '-' and '0' (unless you are already using strings to represent balanced ternary; but see requirement 5). # Provide ways to convert to and from native integer type (unless, improbably, your platform's native integer type ''is'' balanced ternary). If your native integers can't support arbitrary length, overflows during conversion must be indicated. # Provide ways to perform addition, negation and multiplication directly on balanced ternary integers; do ''not'' convert to native integers first. # Make your implementation efficient, with a reasonable definition of "efficient" (and with a reasonable definition of "reasonable"). -'''Test case''' With balanced ternaries ''a'' from string "+−0++0+", ''b'' from native integer −436, ''c'' "+−++−": +'''Test case''' With balanced ternaries ''a'' from string "+-0++0+", ''b'' from native integer -436, ''c'' "+-++-": * write out ''a'', ''b'' and ''c'' in decimal notation; * calculate ''a'' × (''b'' − ''c''), write out the result in both ternary and decimal notations. diff --git a/Task/Balanced-ternary/Ada/balanced-ternary-1.adb b/Task/Balanced-ternary/Ada/balanced-ternary-1.ada similarity index 100% rename from Task/Balanced-ternary/Ada/balanced-ternary-1.adb rename to Task/Balanced-ternary/Ada/balanced-ternary-1.ada diff --git a/Task/Balanced-ternary/Ada/balanced-ternary-2.adb b/Task/Balanced-ternary/Ada/balanced-ternary-2.ada similarity index 100% rename from Task/Balanced-ternary/Ada/balanced-ternary-2.adb rename to Task/Balanced-ternary/Ada/balanced-ternary-2.ada diff --git a/Task/Balanced-ternary/Ada/balanced-ternary-3.adb b/Task/Balanced-ternary/Ada/balanced-ternary-3.ada similarity index 100% rename from Task/Balanced-ternary/Ada/balanced-ternary-3.adb rename to Task/Balanced-ternary/Ada/balanced-ternary-3.ada diff --git a/Task/Balanced-ternary/Elixir/balanced-ternary.ex b/Task/Balanced-ternary/Elixir/balanced-ternary.elixir similarity index 100% rename from Task/Balanced-ternary/Elixir/balanced-ternary.ex rename to Task/Balanced-ternary/Elixir/balanced-ternary.elixir diff --git a/Task/Balanced-ternary/JavaScript/balanced-ternary.js b/Task/Balanced-ternary/JavaScript/balanced-ternary.js deleted file mode 100644 index 29ae058c1c..0000000000 --- a/Task/Balanced-ternary/JavaScript/balanced-ternary.js +++ /dev/null @@ -1,203 +0,0 @@ -class BTernary { - constructor(input) { - if (typeof input === 'string') { - let i = 0; - while (i < input.length && input.charAt(i) === '0') { - i++; - } - this.value = input.substring(i); - } else if (typeof input === 'number') { - this.value = this.convertToBT(input); - } - } - - convertToBT(v) { - if (v < 0) { - return this.flip(this.convertToBT(-v)); - } - if (v === 0) { - return ""; - } - const rem = this.mod3(v); - if (rem === 0) { - return this.convertToBT(Math.floor(v / 3)) + "0"; - } - if (rem === 1) { - return this.convertToBT(Math.floor(v / 3)) + "+"; - } - if (rem === 2) { - return this.convertToBT(Math.floor((v + 1) / 3)) + "-"; - } - return "You can't see me"; - } - - flip(s) { - let flip = ""; - for (let i = 0; i < s.length; i++) { - if (s.charAt(i) === '+') { - flip += '-'; - } else if (s.charAt(i) === '-') { - flip += '+'; - } else { - flip += '0'; - } - } - return flip; - } - - mod3(v) { - if (v > 0) { - return v % 3; - } - v = v % 3; - return (v + 3) % 3; - } - - intValue() { - let sum = 0; - const s = this.value; - for (let i = 0; i < s.length; i++) { - const c = s.charAt(s.length - i - 1); - let dig = 0; - if (c === '+') { - dig = 1; - } else if (c === '-') { - dig = -1; - } - sum += dig * Math.pow(3, i); - } - return sum; - } - - add(that) { - let a = this.value; - let b = that.value; - - const longer = a.length > b.length ? a : b; - let shorter = a.length > b.length ? b : a; - - while (shorter.length < longer.length) { - shorter = '0' + shorter; - } - - a = longer; - b = shorter; - - let carry = '0'; - let sum = ""; - for (let i = 0; i < a.length; i++) { - const place = a.length - i - 1; - const digisum = this.addDigitsWithCarry(a.charAt(place), b.charAt(place), carry); - if (digisum.length !== 1) { - carry = digisum.charAt(0); - } else { - carry = '0'; - } - sum = digisum.charAt(digisum.length - 1) + sum; - } - sum = carry + sum; - - return new BTernary(sum); - } - - addDigitsWithCarry(a, b, carry) { - const sum1 = this.addDigits(a, b); - const sum2 = this.addDigits(sum1.charAt(sum1.length - 1), carry); - - if (sum1.length === 1) { - return sum2; - } - if (sum2.length === 1) { - return sum1.charAt(0) + sum2; - } - return sum1.charAt(0) + ""; - } - - addDigits(a, b) { - let sum = ""; - if (a === '0') { - sum = b + ""; - } else if (b === '0') { - sum = a + ""; - } else if (a === '+') { - if (b === '+') { - sum = "+-"; - } else { - sum = "0"; - } - } else { - if (b === '+') { - sum = "0"; - } else { - sum = "-+"; - } - } - return sum; - } - - neg() { - return new BTernary(this.flip(this.value)); - } - - sub(that) { - return this.add(that.neg()); - } - - mul(that) { - const one = new BTernary(1); - const zero = new BTernary(0); - let mul = new BTernary(0); - - let flipflag = 0; - if (that.compareTo(zero) === -1) { - that = that.neg(); - flipflag = 1; - } - - for (let i = new BTernary(1); i.compareTo(that) < 1; i = i.add(one)) { - mul = mul.add(this); - } - - if (flipflag === 1) { - mul = mul.neg(); - } - return mul; - } - - equals(that) { - return this.value === that.value; - } - - compareTo(that) { - if (this.intValue() > that.intValue()) { - return 1; - } else if (this.equals(that)) { - return 0; - } - return -1; - } - - toString() { - return this.value; - } -} - -// Main execution -function main() { - const a = new BTernary("+-0++0+"); - const b = new BTernary(-436); - const c = new BTernary("+-++-"); - - console.log("a=" + a.intValue()); - console.log("b=" + b.intValue()); - console.log("c=" + c.intValue()); - console.log(); - - // result = a * (b - c) - const result = a.mul(b.sub(c)); - - console.log("result= " + result + " " + result.intValue()); -} - -// Run the main function -main(); diff --git a/Task/Balanced-ternary/Julia/balanced-ternary.jl b/Task/Balanced-ternary/Julia/balanced-ternary.julia similarity index 100% rename from Task/Balanced-ternary/Julia/balanced-ternary.jl rename to Task/Balanced-ternary/Julia/balanced-ternary.julia diff --git a/Task/Balanced-ternary/Kotlin/balanced-ternary.kts b/Task/Balanced-ternary/Kotlin/balanced-ternary.kotlin similarity index 100% rename from Task/Balanced-ternary/Kotlin/balanced-ternary.kts rename to Task/Balanced-ternary/Kotlin/balanced-ternary.kotlin diff --git a/Task/Balanced-ternary/OCaml/balanced-ternary.ml b/Task/Balanced-ternary/OCaml/balanced-ternary.ocaml similarity index 100% rename from Task/Balanced-ternary/OCaml/balanced-ternary.ml rename to Task/Balanced-ternary/OCaml/balanced-ternary.ocaml diff --git a/Task/Balanced-ternary/Quackery/balanced-ternary.quackery b/Task/Balanced-ternary/Quackery/balanced-ternary.quackery deleted file mode 100644 index f28cf0fdc1..0000000000 --- a/Task/Balanced-ternary/Quackery/balanced-ternary.quackery +++ /dev/null @@ -1,79 +0,0 @@ - [ -1 1 clamp 1+ ]'[ swap peek do ] is sif ( n --> ) - - [ $ "" swap witheach - [ sif [ char - char 0 char + ] - swap join ] ] is t->$ ( t --> ) - - [ [] swap witheach - [ char - - sif [ 1 -1 0 ] - swap join ] ] is $->t ( $ --> t ) - - [ 0 swap reverse witheach [ swap 3 * + ] ] is t->n ( $ --> t ) - - [ [] swap - [ 3 /mod [ table 0 1 [ 1+ -1 ] ] do - swap dip join dup 0 = until ] - drop ] is n->t ( n --> t ) - - [ -1 peek ] is tsign ( t --> n ) - - [ ' [ 0 ] = ] is tzero ( t --> b ) - - [ tsign -1 = ] is tneg ( t --> b ) - - [ tsign 1 = ] is tpos ( t --> b ) - - [ [] swap witheach [ negate join ] ] is -t ( t --> t ) - - [ 0 over size times - [ 1 - 2dup peek if conclude ] - 1+ dup if split drop ] is tnorm ( t --> t ) - - [ [] 0 2swap - over size over size - dup 0 < - if [ dip swap negate ] - 0 swap of join temp put - witheach - [ temp share i^ peek - + + 3 + - [ table - [ 0 -1 ] [ 1 -1 ] [ -1 0 ] - [ 0 0 ] [ 1 0 ] [ -1 1 ] - [ 0 1 ] ] do - dip join ] - join tnorm - temp release ] is t+ ( t t --> t ) - - [ -t t+ ] is t- ( t t --> t ) - - [ t- tneg ] is t< ( t t --> b ) - - [ t- tpos ] is t> ( t t --> b ) - - [ behead swap witheach - [ 2dup t> if swap - drop ] ] is tmin ( [ --> t ) - - [ behead swap witheach - [ 2dup t< if swap - drop ] ] is tmax ( [ --> t ) - - [ dup t+ ] is twice ( t --> t ) - - [ 0 swap join ] is thrice ( t --> t ) - - [ ' [ 0 ] swap witheach - [ dip over - sif [ t- drop t+ ] - dip thrice ] - nip ] is t* ( t t --> t ) - - say "a: " $ "+-0++0+" dup echo$ say " = " $->t t->n echo cr - say "b: " -436 dup echo say " = " n->t t->$ echo$ cr - say "c: " $ "+-++-" dup echo$ say " = " $->t t->n echo cr - say "a*(b-c): = " - $ "+-0++0+" $->t - -436 n->t - $ "+-++-" $->t - t- t* - dup t->$ echo$ say " = " t->n echo cr diff --git a/Task/Balanced-ternary/R/balanced-ternary.r b/Task/Balanced-ternary/R/balanced-ternary.r deleted file mode 100644 index 2c8f76dd35..0000000000 --- a/Task/Balanced-ternary/R/balanced-ternary.r +++ /dev/null @@ -1,138 +0,0 @@ -## BalancedTernary in R (S3) - -## Constructor helpers ---- -new_BalancedTernary <- function(digits) { - # digits are least-significant first, values in {-1,0,1} - structure(list(digits = as.integer(digits)), class = "BalancedTernary") -} - -BalancedTernary <- function(x = 0L) { - if (inherits(x, "BalancedTernary")) return(x) - if (is.character(x)) return(BalancedTernary_from_string(x)) - if (length(x) != 1 || !is.finite(x)) stop("BalancedTernary: need a single finite number or a string.") - BalancedTernary_from_int(as.integer(x)) -} - -BalancedTernary_zero <- function() new_BalancedTernary(0L) - -## Conversions ---- -BalancedTernary_from_int <- function(n) { - n <- as.integer(n) - if (n == 0L) return(new_BalancedTernary(0L)) - digs <- integer(0) - while (n != 0L) { - r <- n %% 3L - if (r == 0L) { - digs <- c(digs, 0L); n <- n %/% 3L - } else if (r == 1L) { - digs <- c(digs, 1L); n <- n %/% 3L - } else { # r == 2 -> digit -1 and carry +1 (i.e., add 1 then divide) - digs <- c(digs, -1L); n <- (n + 1L) %/% 3L - } - } - new_BalancedTernary(digs) -} - -BalancedTernary_from_string <- function(s) { - # string is most-significant first with '-', '0', '+' - map <- c("-" = -1L, "0" = 0L, "+" = 1L) - chs <- strsplit(s, "", fixed = TRUE)[[1]] - if (!all(chs %in% names(map))) stop("String may only contain '-', '0', '+'.") - # reverse to least-significant first - new_BalancedTernary(unname(map[rev(chs)])) -} - -bt <- function(s) BalancedTernary_from_string(s) # macro-ish convenience - -## Printing & coercion ---- -print.BalancedTernary <- function(x, ...) { - cat(as.character(x), "\n", sep = "") - invisible(x) -} - -as.character.BalancedTernary <- function(x, ...) { - map <- c(`-1` = "-", `0` = "0", `1` = "+") - # display most-significant first - paste0(rev(map[as.character(x$digits)]), collapse = "") -} - -as.integer.BalancedTernary <- function(x, ...) { - s <- x$digits - if (length(s) == 1L && s[1] == 0L) return(0L) - ex <- seq_along(s) - 1L - # use double accumulate then coerce to integer (safe for moderate sizes) - val <- sum((3 ^ ex) * s) - as.integer(val) -} - -## Unary minus ---- -`-.BalancedTernary` <- function(e1) new_BalancedTernary(-e1$digits) - -## Core arithmetic helpers ---- -# Addition table for (a1 + b1 + c) -> (digit, carry), -# indexed by 4 + a1 + b1 + c where a1,b1,c in {-1,0,1} gives 1..7 -.bt_table_digit <- c( 0, 1, -1, 0, 1, -1, 0) # d -.bt_table_carry <- c(-1, -1, 0, 0, 0, 1, 1) # c - -.bt_add <- function(a, b, c = 0L) { - # a,b are integer vectors of digits (LSB first) in {-1,0,1} - if (length(a) == 0L || length(b) == 0L) { - if (c == 0L) return(if (length(a) == 0L) b else a) - return(.bt_add(c(c), if (length(a) == 0L) b else a)) - } else { - a1 <- a[1]; b1 <- b[1] - idx <- 4L + a1 + b1 + c - d <- .bt_table_digit[idx] - c2 <- .bt_table_carry[idx] - r <- .bt_add(a[-1], b[-1], c2) - if (length(r) != 0L || d != 0L) { - return(c(d, r)) # unshift - } else { - return(r) - } - } -} - -.bt_mul <- function(a, b) { - # schoolbook recursion with balanced digits - if (length(a) == 0L || length(b) == 0L) return(integer(0)) - a1 <- a[1] - if (a1 == -1L) x <- (-BalancedTernary(new_BalancedTernary(b)))$digits - else if (a1 == 0L) x <- integer(0) - else if (a1 == 1L) x <- b - # shift (multiply by 3) = prepend a 0 digit to recursive product - y <- c(0L, .bt_mul(a[-1], b)) - .bt_add(x, y) -} - -.normalize_zero <- function(v) if (length(v) == 0L) 0L else v - -## Binary operators ---- -`+.BalancedTernary` <- function(e1, e2) { - v <- .bt_add(e1$digits, e2$digits) - new_BalancedTernary(.normalize_zero(v)) -} - -`-.BalancedTernary` # already defined (unary) - -`%minus_bt%` <- function(a, b) a + (-b) # internal helper if needed - -`*.BalancedTernary` <- function(e1, e2) { - v <- .bt_mul(e1$digits, e2$digits) - new_BalancedTernary(.normalize_zero(v)) -} - -## Demo / tests ---- -a <- bt("+-0++0+") -cat("a: ", as.integer(a), ", ", as.character(a), "\n", sep = "") - -b <- BalancedTernary(-436L) -cat("b: ", as.integer(b), ", ", as.character(b), "\n", sep = "") - -c <- BalancedTernary("+-++-") -cat("c: ", as.integer(c), ", ", as.character(c), "\n", sep = "") - -r <- a * (b + (-c)) # a * (b - c) -cat("a * (b - c): ", as.integer(r), ", ", as.character(r), "\n", sep = "") - -stopifnot(as.integer(r) == as.integer(a) * (as.integer(b) - as.integer(c))) diff --git a/Task/Balanced-ternary/Rust/balanced-ternary.rs b/Task/Balanced-ternary/Rust/balanced-ternary.rust similarity index 100% rename from Task/Balanced-ternary/Rust/balanced-ternary.rs rename to Task/Balanced-ternary/Rust/balanced-ternary.rust diff --git a/Task/Balanced-ternary/Zig/balanced-ternary.zig b/Task/Balanced-ternary/Zig/balanced-ternary.zig deleted file mode 100644 index cf7423ff0a..0000000000 --- a/Task/Balanced-ternary/Zig/balanced-ternary.zig +++ /dev/null @@ -1,297 +0,0 @@ -const std = @import("std"); -const ArrayList = std.ArrayList; -const Allocator = std.mem.Allocator; - -pub fn main() !void { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - defer _ = gpa.deinit(); - const allocator = gpa.allocator(); - - const stdout = std.io.getStdOut().writer(); - - var a = try BalancedTernary.fromString(allocator, "+-0++0+"); - defer a.deinit(); - const a_val = try a.toI128(); - const a_str = try a.toString(allocator); - defer allocator.free(a_str); - try stdout.print("a = {s} = {d}\n", .{ a_str, a_val }); - - var b = try BalancedTernary.fromI128(allocator, -436); - defer b.deinit(); - const b_val = try b.toI128(); - const b_str = try b.toString(allocator); - defer allocator.free(b_str); - try stdout.print("b = {s} = {d}\n", .{ b_str, b_val }); - - var c = try BalancedTernary.fromString(allocator, "+-++-"); - defer c.deinit(); - const c_val = try c.toI128(); - const c_str = try c.toString(allocator); - defer allocator.free(c_str); - try stdout.print("c = {s} = {d}\n", .{ c_str, c_val }); - - var c_neg = try c.clone(allocator); - defer c_neg.deinit(); - c_neg.negate(); - - var b_plus_neg_c = try b.add(allocator, c_neg); - defer b_plus_neg_c.deinit(); - - var d = try a.mul(allocator, b_plus_neg_c); - defer d.deinit(); - const d_val = try d.toI128(); - const d_str = try d.toString(allocator); - defer allocator.free(d_str); - try stdout.print("a * (b - c) = {s} = {d}\n", .{ d_str, d_val }); - - var e = try BalancedTernary.fromString(allocator, "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); - defer e.deinit(); - const e_result = e.toI128(); - try std.testing.expect(e_result == error.Overflow); -} - -const Trit = enum { - Zero, - Pos, - Neg, - - fn fromChar(c: u8) !Trit { - return switch (c) { - '0' => .Zero, - '+' => .Pos, - '-' => .Neg, - else => error.InvalidCharacter, - }; - } - - fn toChar(self: Trit) u8 { - return switch (self) { - .Zero => '0', - .Pos => '+', - .Neg => '-', - }; - } - - fn add(self: Trit, rhs: Trit) struct { carry: Trit, current: Trit } { - return switch (self) { - .Zero => .{ .carry = .Zero, .current = rhs }, - .Pos => switch (rhs) { - .Zero => .{ .carry = .Zero, .current = .Pos }, - .Neg => .{ .carry = .Zero, .current = .Zero }, - .Pos => .{ .carry = .Pos, .current = .Neg }, - }, - .Neg => switch (rhs) { - .Zero => .{ .carry = .Zero, .current = .Neg }, - .Pos => .{ .carry = .Zero, .current = .Zero }, - .Neg => .{ .carry = .Neg, .current = .Pos }, - }, - }; - } - - fn mul(self: Trit, rhs: Trit) Trit { - return switch (self) { - .Zero => .Zero, - .Pos => switch (rhs) { - .Zero => .Zero, - .Pos => .Pos, - .Neg => .Neg, - }, - .Neg => switch (rhs) { - .Zero => .Zero, - .Pos => .Neg, - .Neg => .Pos, - }, - }; - } - - fn negate(self: Trit) Trit { - return switch (self) { - .Zero => .Zero, - .Pos => .Neg, - .Neg => .Pos, - }; - } -}; - -const BalancedTernary = struct { - digits: ArrayList(Trit), - - fn deinit(self: *BalancedTernary) void { - self.digits.deinit(); - } - - fn clone(self: BalancedTernary, allocator: Allocator) !BalancedTernary { - var new_digits = try ArrayList(Trit).initCapacity(allocator, self.digits.items.len); - try new_digits.appendSlice(self.digits.items); - return BalancedTernary{ .digits = new_digits }; - } - - fn fromString(allocator: Allocator, s: []const u8) !BalancedTernary { - var digits = ArrayList(Trit).init(allocator); - errdefer digits.deinit(); - - var i: usize = s.len; - while (i > 0) { - i -= 1; - const trit = try Trit.fromChar(s[i]); - try digits.append(trit); - } - - return BalancedTernary{ .digits = digits }; - } - - fn fromI128(allocator: Allocator, x: i128) !BalancedTernary { - var digits = ArrayList(Trit).init(allocator); - errdefer digits.deinit(); - - var curr = x; - - while (true) { - const rem = @rem(curr, 3); - - const trit: Trit = switch (rem) { - 0 => .Zero, - 1, -2 => .Pos, - 2, -1 => .Neg, - else => unreachable, - }; - try digits.append(trit); - - const offset = @as(i128, @intFromFloat(@round(@as(f64, @floatFromInt(rem)) / 3.0))); - curr = @divTrunc(curr, 3) + offset; - - if (curr == 0) break; - } - - return BalancedTernary{ .digits = digits }; - } - - fn toString(self: BalancedTernary, allocator: Allocator) ![]const u8 { - var result = try ArrayList(u8).initCapacity(allocator, self.digits.items.len); - defer result.deinit(); - - var i: usize = self.digits.items.len; - while (i > 0) { - i -= 1; - try result.append(self.digits.items[i].toChar()); - } - - return result.toOwnedSlice(); - } - - fn toI128(self: BalancedTernary) !i128 { - var acc: i128 = 0; - - for (self.digits.items, 0..) |trit, i| { - const index: u32 = std.math.cast(u32, i) orelse return error.Overflow; - - switch (trit) { - .Zero => {}, - .Pos => { - const power = std.math.powi(i128, 3, index) catch return error.Overflow; - acc = std.math.add(i128, acc, power) catch return error.Overflow; - }, - .Neg => { - const power = std.math.powi(i128, 3, index) catch return error.Overflow; - acc = std.math.sub(i128, acc, power) catch return error.Overflow; - }, - } - } - - return acc; - } - - fn trim(digits: *ArrayList(Trit)) void { - while (digits.items.len > 0) { - const last = digits.items[digits.items.len - 1]; - if (last != .Zero) { - break; - } - _ = digits.pop(); - } - } - - fn add(self: BalancedTernary, allocator: Allocator, rhs: BalancedTernary) !BalancedTernary { - if (rhs.digits.items.len == 0) { - if (self.digits.items.len == 0) { - var digits = ArrayList(Trit).init(allocator); - try digits.append(.Zero); - return BalancedTernary{ .digits = digits }; - } - return try self.clone(allocator); - } - - const length = @min(self.digits.items.len, rhs.digits.items.len); - var sum = ArrayList(Trit).init(allocator); - errdefer sum.deinit(); - - var carry = ArrayList(Trit).init(allocator); - errdefer carry.deinit(); - try carry.append(.Zero); - - for (0..length) |i| { - const result = self.digits.items[i].add(rhs.digits.items[i]); - try sum.append(result.current); - try carry.append(result.carry); - } - - if (self.digits.items.len > length) { - try sum.appendSlice(self.digits.items[length..]); - } - if (rhs.digits.items.len > length) { - try sum.appendSlice(rhs.digits.items[length..]); - } - - trim(&sum); - trim(&carry); - - var sum_bt = BalancedTernary{ .digits = sum }; - const carry_bt = BalancedTernary{ .digits = carry }; - //defer carry_bt.deinit(); - - return try sum_bt.add(allocator, carry_bt); - } - - fn mul(self: BalancedTernary, allocator: Allocator, rhs: BalancedTernary) !BalancedTernary { - var results = ArrayList(BalancedTernary).init(allocator); - defer { - for (results.items) |*item| { - item.deinit(); - } - results.deinit(); - } - - for (rhs.digits.items, 0..) |rhs_trit, i| { - var digits = ArrayList(Trit).init(allocator); - errdefer digits.deinit(); - - for (0..i) |_| { - try digits.append(.Zero); - } - - for (self.digits.items) |self_trit| { - try digits.append(self_trit.mul(rhs_trit)); - } - - try results.append(BalancedTernary{ .digits = digits }); - } - - var acc_digits = ArrayList(Trit).init(allocator); - try acc_digits.append(.Zero); - var acc = BalancedTernary{ .digits = acc_digits }; - - for (results.items) |item| { - const new_acc = try acc.add(allocator, item); - acc.deinit(); - acc = new_acc; - } - - return acc; - } - - fn negate(self: *BalancedTernary) void { - for (self.digits.items) |*trit| { - trit.* = trit.negate(); - } - } -}; diff --git a/Task/Barnsley-fern/Ada/barnsley-fern.adb b/Task/Barnsley-fern/Ada/barnsley-fern.ada similarity index 100% rename from Task/Barnsley-fern/Ada/barnsley-fern.adb rename to Task/Barnsley-fern/Ada/barnsley-fern.ada diff --git a/Task/Barnsley-fern/Delphi/barnsley-fern.pas b/Task/Barnsley-fern/Delphi/barnsley-fern.delphi similarity index 100% rename from Task/Barnsley-fern/Delphi/barnsley-fern.pas rename to Task/Barnsley-fern/Delphi/barnsley-fern.delphi diff --git a/Task/Barnsley-fern/EasyLang/barnsley-fern.easy b/Task/Barnsley-fern/EasyLang/barnsley-fern.easy index b326a0836e..3d5e535c80 100644 --- a/Task/Barnsley-fern/EasyLang/barnsley-fern.easy +++ b/Task/Barnsley-fern/EasyLang/barnsley-fern.easy @@ -1,21 +1,21 @@ -gbackground 000 -gcolor 263 -for i = 1 to 100000 - r = randomf - if r < 0.01 - nx = 0 - ny = 0.16 * y - elif r < 0.08 - nx = 0.2 * x - 0.26 * y - ny = 0.23 * x + 0.22 * y + 1.6 - elif r < 0.15 - nx = -0.15 * x + 0.28 * y - ny = 0.26 * x + 0.24 * y + 0.44 - else - nx = 0.85 * x + 0.04 * y - ny = -0.04 * x + 0.85 * y + 1.6 - . - x = nx - y = ny - grect 50 + x * 15 y * 10 0.3 0.3 +color 060 +for i = 1 to 200000 + r = randomf + if r < 0.01 + nx = 0 + ny = 0.16 * y + elif r < 0.08 + nx = 0.2 * x - 0.26 * y + ny = 0.23 * x + 0.22 * y + 1.6 + elif r < 0.15 + nx = -0.15 * x + 0.28 * y + ny = 0.26 * x + 0.24 * y + 0.44 + else + nx = 0.85 * x + 0.04 * y + ny = -0.04 * x + 0.85 * y + 1.6 + . + x = nx + y = ny + move 50 + x * 15 y * 10 + rect 0.3 0.3 . diff --git a/Task/Barnsley-fern/Emacs-Lisp/barnsley-fern.el b/Task/Barnsley-fern/Emacs-Lisp/barnsley-fern.l similarity index 100% rename from Task/Barnsley-fern/Emacs-Lisp/barnsley-fern.el rename to Task/Barnsley-fern/Emacs-Lisp/barnsley-fern.l diff --git a/Task/Barnsley-fern/FutureBasic/barnsley-fern.basic b/Task/Barnsley-fern/FutureBasic/barnsley-fern.basic deleted file mode 100644 index bf2badd71f..0000000000 --- a/Task/Barnsley-fern/FutureBasic/barnsley-fern.basic +++ /dev/null @@ -1,34 +0,0 @@ -void local fn BarnsleyFern( height as long ) - double x = 0, y = 0, xn, yn, f = height / 10.6 - long n, r, offsetX = height / 4 - height / 40 - - for n = 1 to height * 50 - r = rnd(100) - 1 - select - case r >= 0 && r <= 84 - xn = 0.85 * x + 0.04 * y - yn = -0.04 * x + 0.85 * y + 1.6 - case r >= 85 && r <= 91 - xn = 0.2 * x - 0.26 * y - yn = 0.23 * x + 0.22 * y + 1.6 - case r >= 92 && r <= 98 - xn = -0.15 * x + 0.28 * y - yn = 0.26 * x + 0.24 * y + 0.44 - case else - xn = 0 - yn = 0.16 * y - end select - - x = xn : y = yn - pen -1 - oval fill (offsetX + x * f, height - y * f, 1.5, 1.5), _zGreen - next - -end fn - -window 1, @"Barnsley fern", (0,0,300,600) -WindowSetBackgroundColor( 1, fn ColorBlack ) - -fn BarnsleyFern( 600 ) - -HandleEvents diff --git a/Task/Barnsley-fern/Julia/barnsley-fern.jl b/Task/Barnsley-fern/Julia/barnsley-fern.julia similarity index 100% rename from Task/Barnsley-fern/Julia/barnsley-fern.jl rename to Task/Barnsley-fern/Julia/barnsley-fern.julia diff --git a/Task/Barnsley-fern/Kotlin/barnsley-fern.kts b/Task/Barnsley-fern/Kotlin/barnsley-fern.kotlin similarity index 100% rename from Task/Barnsley-fern/Kotlin/barnsley-fern.kts rename to Task/Barnsley-fern/Kotlin/barnsley-fern.kotlin diff --git a/Task/Barnsley-fern/Pluto/barnsley-fern.pluto b/Task/Barnsley-fern/Pluto/barnsley-fern.pluto deleted file mode 100644 index fe97f4f1e1..0000000000 --- a/Task/Barnsley-fern/Pluto/barnsley-fern.pluto +++ /dev/null @@ -1,35 +0,0 @@ -require "bitmap" - -local w, h = 640, 640 -local bmp = bitmap.of(w, h, color.black, "Barnsley Fern") -local n = 200_000 - -local function create_fern() - local x = 0 - local y = 0 - local c = bitmap.rgbColor(0x32, 0xcd, 0x32) - for i = 0, n - 1 do - local tx - local ty - local r = math.random() - if r <= 0.01 then - tx = 0 - ty = 0.16 * y - elseif r <= 0.86 then - tx = 0.85 * x + 0.04 * y - ty = -0.04 * x + 0.85 * y + 1.6 - elseif r <= 0.93 then - tx = 0.2 * x - 0.26 * y - ty = 0.23 * x + 0.22 * y + 1.6 - else - tx = -0.15 * x + 0.28 * y - ty = 0.26 * x + 0.24 * y + 0.44 - end - x = tx - y = ty - bmp:set(math.round(w / 2 + x * w / 11), math.round(h - y * h / 11), c) - end -end - -create_fern() -bmp:view() diff --git a/Task/Barnsley-fern/Rebol/barnsley-fern.rebol b/Task/Barnsley-fern/Rebol/barnsley-fern.rebol deleted file mode 100644 index b272eaf806..0000000000 --- a/Task/Barnsley-fern/Rebol/barnsley-fern.rebol +++ /dev/null @@ -1,35 +0,0 @@ -Rebol [ - title: "Rosetta code: Barnsley Fern" - file: %Barnsley_fern.r3 - url: https://rosettacode.org/wiki/Barnsley_fern - needs: 3.0.0 -] -barnsley-fern: function [size [pair!]][ - img: make image! reduce [size 0.0.0] - width: size/x - height: size/y - - p: 0x0 x: y: 0.0 - repeat i 100000 [ - xt: yt: 0.0 - r: random 100 - case [ - r <= 1 [xt: 0.0 yt: 0.16 * y] - r <= 8 [xt: ( 0.20 * x) - (0.26 * y) yt: ( 0.23 * x) + (0.22 * y) + 1.60] - r <= 15 [xt: (-0.15 * x) + (0.28 * y) yt: ( 0.26 * x) + (0.24 * y) + 0.44] - 'else [xt: ( 0.85 * x) + (0.04 * y) yt: (-0.04 * x) + (0.85 * y) + 1.60] - ] - x: xt y: yt - p/x: round (width / 2 + (60 * x)) - p/y: height - round (60 * y) - change at img p green - ] -] - -img: barnsley-fern 640x640 -save %barnsley-fern.png img - -if cv: attempt [import 'opencv][ - cv/imshow/name img "Barnsley" - cv/waitKey 0 -] diff --git a/Task/Barnsley-fern/Rust/barnsley-fern.rs b/Task/Barnsley-fern/Rust/barnsley-fern.rs deleted file mode 100644 index fe8f6a528c..0000000000 --- a/Task/Barnsley-fern/Rust/barnsley-fern.rs +++ /dev/null @@ -1,45 +0,0 @@ -extern crate rand; -extern crate raster; - -use rand::Rng; - -fn main() { - let max_iterations = 200_000u32; - let height = 640i32; - let width = 640i32; - - let mut rng = rand::thread_rng(); - let mut image = raster::Image::blank(width, height); - raster::editor::fill(&mut image, raster::Color::white()).unwrap(); - - let mut x = 0.; - let mut y = 0.; - for _ in 0..max_iterations { - let r = rng.r#gen::(); - let cx: f64; - let cy: f64; - - if r <= 0.01 { - cx = 0f64; - cy = 0.16 * y as f64; - } else if r <= 0.08 { - cx = 0.2 * x as f64 - 0.26 * y as f64; - cy = 0.23 * x as f64 + 0.22 * y as f64 + 1.6; - } else if r <= 0.15 { - cx = -0.15 * x as f64 + 0.28 * y as f64; - cy = 0.26 * x as f64 + 0.26 * y as f64 + 0.44; - } else { - cx = 0.85 * x as f64 + 0.04 * y as f64; - cy = -0.04 * x as f64 + 0.85 * y as f64 + 1.6; - } - x = cx; - y = cy; - - let _ = image.set_pixel( - ((width as f64) / 2. + x * (width as f64) / 11.).round() as i32, - ((height as f64) - y * (height as f64) / 11.).round() as i32, - raster::Color::rgb(50, 205, 50)); - } - - raster::save(&image, "fractal.png").unwrap(); -} diff --git a/Task/Barnsley-fern/Rust/barnsley-fern.rust b/Task/Barnsley-fern/Rust/barnsley-fern.rust new file mode 100644 index 0000000000..d756f3ebee --- /dev/null +++ b/Task/Barnsley-fern/Rust/barnsley-fern.rust @@ -0,0 +1,45 @@ +extern crate rand; +extern crate raster; + +use rand::Rng; + +fn main() { + let max_iterations = 200_000u32; + let height = 640i32; + let width = 640i32; + + let mut rng = rand::thread_rng(); + let mut image = raster::Image::blank(width, height); + raster::editor::fill(&mut image, raster::Color::white()).unwrap(); + + let mut x = 0.; + let mut y = 0.; + for _ in 0..max_iterations { + let r = rng.gen::(); + let cx: f64; + let cy: f64; + + if r <= 0.01 { + cx = 0f64; + cy = 0.16 * y as f64; + } else if r <= 0.08 { + cx = 0.2 * x as f64 - 0.26 * y as f64; + cy = 0.23 * x as f64 + 0.22 * y as f64 + 1.6; + } else if r <= 0.15 { + cx = -0.15 * x as f64 + 0.28 * y as f64; + cy = 0.26 * x as f64 + 0.26 * y as f64 + 0.44; + } else { + cx = 0.85 * x as f64 + 0.04 * y as f64; + cy = -0.04 * x as f64 + 0.85 * y as f64 + 1.6; + } + x = cx; + y = cy; + + let _ = image.set_pixel( + ((width as f64) / 2. + x * (width as f64) / 11.).round() as i32, + ((height as f64) - y * (height as f64) / 11.).round() as i32, + raster::Color::rgb(50, 205, 50)); + } + + raster::save(&image, "fractal.png").unwrap(); +} diff --git a/Task/Barnsley-fern/Scheme/barnsley-fern.scm b/Task/Barnsley-fern/Scheme/barnsley-fern.ss similarity index 100% rename from Task/Barnsley-fern/Scheme/barnsley-fern.scm rename to Task/Barnsley-fern/Scheme/barnsley-fern.ss diff --git a/Task/Barnsley-fern/Uiua/barnsley-fern.uiua b/Task/Barnsley-fern/Uiua/barnsley-fern.uiua deleted file mode 100644 index a2d94aeac6..0000000000 --- a/Task/Barnsley-fern/Uiua/barnsley-fern.uiua +++ /dev/null @@ -1,11 +0,0 @@ -Fs ← [[[0 0 0] [0 0.16 0]] - [[0.85 0.04 0] [¯0.04 0.85 1.6]] - [[0.2 ¯0.26 0] [0.23 0.22 1.6]] - [[¯0.15 0.28 0] [0.26 0.24 0.44]]] -Ps ← [1 86 93 100] -PickF ← (⊡:Fs⊢⊚/⊢)sym⊐⊢ - -B64Dec "VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=" diff --git a/Task/Base64-decode-data/Batch-File/base64-decode-data.bat b/Task/Base64-decode-data/Batch-File/base64-decode-data.bat deleted file mode 100644 index 73b80ec78d..0000000000 --- a/Task/Base64-decode-data/Batch-File/base64-decode-data.bat +++ /dev/null @@ -1,2 +0,0 @@ -certutil -f -decodehex "%temp%\favicon.tmp" favicon1.ico 1 -fc /B favicon.ico favicon1.ico diff --git a/Task/Base64-decode-data/Crystal/base64-decode-data.cr b/Task/Base64-decode-data/Crystal/base64-decode-data.crystal similarity index 100% rename from Task/Base64-decode-data/Crystal/base64-decode-data.cr rename to Task/Base64-decode-data/Crystal/base64-decode-data.crystal diff --git a/Task/Base64-decode-data/Delphi/base64-decode-data.pas b/Task/Base64-decode-data/Delphi/base64-decode-data.delphi similarity index 100% rename from Task/Base64-decode-data/Delphi/base64-decode-data.pas rename to Task/Base64-decode-data/Delphi/base64-decode-data.delphi diff --git a/Task/Base64-decode-data/Ed/base64-decode-data.ed b/Task/Base64-decode-data/Ed/base64-decode-data.ed deleted file mode 100644 index 177f09f0a1..0000000000 --- a/Task/Base64-decode-data/Ed/base64-decode-data.ed +++ /dev/null @@ -1,172 +0,0 @@ -H -,p -g/.*/s/\B/ /g -g/\b=\b/s// 000000 /g -g/\bA\b/s// 000000 /g -g/\bB\b/s// 000001 /g -g/\bC\b/s// 000010 /g -g/\bD\b/s// 000011 /g -g/\bE\b/s// 000100 /g -g/\bF\b/s// 000101 /g -g/\bG\b/s// 000110 /g -g/\bH\b/s// 000111 /g -g/\bI\b/s// 001000 /g -g/\bJ\b/s// 001001 /g -g/\bK\b/s// 001010 /g -g/\bL\b/s// 001011 /g -g/\bM\b/s// 001100 /g -g/\bN\b/s// 001101 /g -g/\bO\b/s// 001110 /g -g/\bP\b/s// 001111 /g -g/\bQ\b/s// 010000 /g -g/\bR\b/s// 010001 /g -g/\bS\b/s// 010010 /g -g/\bT\b/s// 010011 /g -g/\bU\b/s// 010100 /g -g/\bV\b/s// 010101 /g -g/\bW\b/s// 010110 /g -g/\bX\b/s// 010111 /g -g/\bY\b/s// 011000 /g -g/\bZ\b/s// 011001 /g -g/\ba\b/s// 011010 /g -g/\bb\b/s// 011011 /g -g/\bc\b/s// 011100 /g -g/\bd\b/s// 011101 /g -g/\be\b/s// 011110 /g -g/\bf\b/s// 011111 /g -g/\bg\b/s// 100000 /g -g/\bh\b/s// 100001 /g -g/\bi\b/s// 100010 /g -g/\bj\b/s// 100011 /g -g/\bk\b/s// 100100 /g -g/\bl\b/s// 100101 /g -g/\bm\b/s// 100110 /g -g/\bn\b/s// 100111 /g -g/\bo\b/s// 101000 /g -g/\bp\b/s// 101001 /g -g/\bq\b/s// 101010 /g -g/\br\b/s// 101011 /g -g/\bs\b/s// 101100 /g -g/\bt\b/s// 101101 /g -g/\bu\b/s// 101110 /g -g/\bv\b/s// 101111 /g -g/\bw\b/s// 110000 /g -g/\bx\b/s// 110001 /g -g/\by\b/s// 110010 /g -g/\bz\b/s// 110011 /g -g/\b0\b/s// 110100 /g -g/\b1\b/s// 110101 /g -g/\b2\b/s// 110110 /g -g/\b3\b/s// 110111 /g -g/\b4\b/s// 111000 /g -g/\b5\b/s// 111001 /g -g/\b6\b/s// 111010 /g -g/\b7\b/s// 111011 /g -g/\b8\b/s// 111100 /g -g/\b9\b/s// 111101 /g -g/\b=\b/s// 000000 /g -g/\b\+\b/s// 111110 /g -g/\b\/\b/s// 111111 /g -g/[[:space:]]/s///g -g/[01]{8}/s// & /g -g/00000000/s///g -g/00001010/s//\ -/g -g/00100000/s// /g -g/00100001/s//!/g -g/00100010/s//"/g -g/00100011/s//#/g -g/00100100/s//$/g -g/00100101/s//%/g -g/00100110/s//&/g -g/00100111/s//'/g -g/00101000/s//(/g -g/00101001/s//)/g -g/00101010/s//*/g -g/00101011/s//+/g -g/00101100/s//,/g -g/00101101/s//-/g -g/00101110/s//./g -g/00101111/s////g -g/00110000/s//0/g -g/00110001/s//1/g -g/00110010/s//2/g -g/00110011/s//3/g -g/00110100/s//4/g -g/00110101/s//5/g -g/00110110/s//6/g -g/00110111/s//7/g -g/00111000/s//8/g -g/00111001/s//9/g -g/00111010/s//:/g -g/00111011/s//;/g -g/00111100/s///g -g/00111111/s//?/g -g/01000000/s//@/g -g/01000001/s//A/g -g/01000010/s//B/g -g/01000011/s//C/g -g/01000100/s//D/g -g/01000101/s//E/g -g/01000110/s//F/g -g/01000111/s//G/g -g/01001000/s//H/g -g/01001001/s//I/g -g/01001010/s//J/g -g/01001011/s//K/g -g/01001100/s//L/g -g/01001101/s//M/g -g/01001110/s//N/g -g/01001111/s//O/g -g/01010000/s//P/g -g/01010001/s//Q/g -g/01010010/s//R/g -g/01010011/s//S/g -g/01010100/s//T/g -g/01010101/s//U/g -g/01010110/s//V/g -g/01010111/s//W/g -g/01011000/s//X/g -g/01011001/s//Y/g -g/01011010/s//Z/g -g/01011011/s//[/g -g/01011100/s//\/g -g/01011101/s//]/g -g/01011110/s//^/g -g/01011111/s//_/g -g/01100000/s//`/g -g/01100001/s//a/g -g/01100010/s//b/g -g/01100011/s//c/g -g/01100100/s//d/g -g/01100101/s//e/g -g/01100110/s//f/g -g/01100111/s//g/g -g/01101000/s//h/g -g/01101001/s//i/g -g/01101010/s//j/g -g/01101011/s//k/g -g/01101100/s//l/g -g/01101101/s//m/g -g/01101110/s//n/g -g/01101111/s//o/g -g/01110000/s//p/g -g/01110001/s//q/g -g/01110010/s//r/g -g/01110011/s//s/g -g/01110100/s//t/g -g/01110101/s//u/g -g/01110110/s//v/g -g/01110111/s//w/g -g/01111000/s//x/g -g/01111001/s//y/g -g/01111010/s//z/g -g/01111011/s//{/g -g/01111100/s//|/g -g/01111101/s//}/g -g/01111110/s//~/g -g/[ ][ ](.)[ ][ ]/s//\1/g -,p -Q diff --git a/Task/Base64-decode-data/FutureBasic/base64-decode-data.basic b/Task/Base64-decode-data/FutureBasic/base64-decode-data.basic index 8837b09bef..384292a93e 100644 --- a/Task/Base64-decode-data/FutureBasic/base64-decode-data.basic +++ b/Task/Base64-decode-data/FutureBasic/base64-decode-data.basic @@ -20,7 +20,7 @@ originalString = @"This is a test string to be encoded as Base64 and then decode NSLog( @"This is the original string:\n\t%@\n", originalString ) encodedBase64String = fn EncodeStringAsBase64( originalString ) -NSLog( @"This is the original string encoded as Base64:\n\t%@\n", encodedBase64String ) +NSLog( @"This is the original string encoded as Base84:\n\t%@\n", encodedBase64String ) decodedBase64String = fn DecodeBase64String( encodedBase64String ) NSLog( @"This is the Base64 string decoded:\n\t%@", decodedBase64String ) diff --git a/Task/Base64-decode-data/Haxe/base64-decode-data.hx b/Task/Base64-decode-data/Haxe/base64-decode-data.haxe similarity index 100% rename from Task/Base64-decode-data/Haxe/base64-decode-data.hx rename to Task/Base64-decode-data/Haxe/base64-decode-data.haxe diff --git a/Task/Base64-decode-data/Julia/base64-decode-data.jl b/Task/Base64-decode-data/Julia/base64-decode-data.julia similarity index 100% rename from Task/Base64-decode-data/Julia/base64-decode-data.jl rename to Task/Base64-decode-data/Julia/base64-decode-data.julia diff --git a/Task/Base64-decode-data/Kotlin/base64-decode-data.kts b/Task/Base64-decode-data/Kotlin/base64-decode-data.kotlin similarity index 100% rename from Task/Base64-decode-data/Kotlin/base64-decode-data.kts rename to Task/Base64-decode-data/Kotlin/base64-decode-data.kotlin diff --git a/Task/Base64-decode-data/M2000-Interpreter/base64-decode-data-1.m2000 b/Task/Base64-decode-data/M2000-Interpreter/base64-decode-data-1.m2000 index 1229d1d3e8..5ede834f8d 100644 --- a/Task/Base64-decode-data/M2000-Interpreter/base64-decode-data-1.m2000 +++ b/Task/Base64-decode-data/M2000-Interpreter/base64-decode-data-1.m2000 @@ -5,7 +5,7 @@ uCiAgICAtLSBQYXVsIFIuIEVocmxpY2g= } tmp$=tempname$ open tmp$ for wide output as #f - print #f, string$(inp$ as decode64); + print #f, string$(inp$ as decode64); close #f document a$ load.doc a$, tmp$ diff --git a/Task/Base64-decode-data/Nu/base64-decode-data.nu b/Task/Base64-decode-data/Nu/base64-decode-data.nu deleted file mode 100644 index a55526dfa1..0000000000 --- a/Task/Base64-decode-data/Nu/base64-decode-data.nu +++ /dev/null @@ -1,2 +0,0 @@ -'VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=' -| decode base64 diff --git a/Task/Base64-decode-data/Pluto/base64-decode-data.pluto b/Task/Base64-decode-data/Pluto/base64-decode-data.pluto deleted file mode 100644 index b8359fd691..0000000000 --- a/Task/Base64-decode-data/Pluto/base64-decode-data.pluto +++ /dev/null @@ -1,4 +0,0 @@ -local base64 = require("base64") - -local s = "VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=" -print(base64.decode(s)) diff --git a/Task/Base64-decode-data/PowerShell/base64-decode-data-1.ps1 b/Task/Base64-decode-data/PowerShell/base64-decode-data-1.ps1 deleted file mode 100644 index 429bf1334a..0000000000 --- a/Task/Base64-decode-data/PowerShell/base64-decode-data-1.ps1 +++ /dev/null @@ -1 +0,0 @@ -[Text.Encoding]::ASCII.GetString([Convert]::FromBase64String("VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=")) diff --git a/Task/Base64-decode-data/PowerShell/base64-decode-data-2.ps1 b/Task/Base64-decode-data/PowerShell/base64-decode-data-2.ps1 deleted file mode 100644 index 8e3ff8d7a3..0000000000 --- a/Task/Base64-decode-data/PowerShell/base64-decode-data-2.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -$bytes=... -[IO.File]::WriteAllBytes('favicon.ico', [Convert]::FromBase64String($bytes)) diff --git a/Task/Base64-decode-data/REXX/base64-decode-data-1.rexx b/Task/Base64-decode-data/REXX/base64-decode-data-1.rexx deleted file mode 100644 index 3d85bbec31..0000000000 --- a/Task/Base64-decode-data/REXX/base64-decode-data-1.rexx +++ /dev/null @@ -1,20 +0,0 @@ -z= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -do i=1 to 64 - bs.i=x2b(d2x(i-1)) - c=substr(z,i,1) - ds.c=right(bs.i,6,0) - End -e='YW55IGNhcm5hbCBwbGVhc3VyZS4' -r='' -ec=e -Do While ec<>'' - Parse Var ec c +1 ec - r=r||ds.c - End -res='' -Do while r<>'' - Parse Var r x +8 r - res=res||x2c(b2x(x)) - End -Say 'Input: >'e'<' -Say 'decoded: >'res'<' diff --git a/Task/Base64-decode-data/REXX/base64-decode-data-2.rexx b/Task/Base64-decode-data/REXX/base64-decode-data-2.rexx deleted file mode 100644 index 90d8c0c1ce..0000000000 --- a/Task/Base64-decode-data/REXX/base64-decode-data-2.rexx +++ /dev/null @@ -1,56 +0,0 @@ --- 3 Oct 2025 -include Setting -signal off notready - -say 'BASE64 DECODE DATA' -say version -say -call Task1 'TWFueSBoYW5kcyBtYWtlIGxpZ2h0IHdvcmsu' -call Task1 'TWFu' -call Task1 'TWE=' -call Task1 'TQ==' -call Task1 'YW55IGNhcm5hbCBwbGVhc3VyZS4=' -call Task2 -exit - -Task1: -procedure -parse arg xx -say 'Encoded ' xx -say 'Original' Decode64(xx) -say -return - -Task2: -procedure -in='favicon.dat'; out='favcopy.ico' -rr=Decode64(Charin(in,1,30000)) -call Charout out,rr,1 -return - -Decode64: -procedure -parse arg xx --- Alphabet -a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -lx=Length(xx) -rr='' --- Loop thru encoded characters -do i=1 to lx - c=Substr(xx,i,1) --- If padding, discard 2 bits - if c='=' then do - rr=Left(rr,Length(rr)-2) - iterate i - end --- Find position in alphabet - p=Pos(c,a)-1 --- Convert to bits and take last 6 - b=Right(0000||X2b(D2x(p)),6) --- Append - rr||=b -end --- Convert to character -return X2c(B2x(rr)) - -include Abend diff --git a/Task/Base64-decode-data/Rebol/base64-decode-data.rebol b/Task/Base64-decode-data/Rebol/base64-decode-data.rebol deleted file mode 100644 index a921880d20..0000000000 --- a/Task/Base64-decode-data/Rebol/base64-decode-data.rebol +++ /dev/null @@ -1,3 +0,0 @@ -print to string! debase { -VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIH -VwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLVBhdWwgUi5FaHJsaWNo} 64 diff --git a/Task/Base64-decode-data/Rust/base64-decode-data.rs b/Task/Base64-decode-data/Rust/base64-decode-data.rust similarity index 100% rename from Task/Base64-decode-data/Rust/base64-decode-data.rs rename to Task/Base64-decode-data/Rust/base64-decode-data.rust diff --git a/Task/Base64-decode-data/Swift/base64-decode-data.swift b/Task/Base64-decode-data/Swift/base64-decode-data.swift index bc056552f2..88b8b847f8 100644 --- a/Task/Base64-decode-data/Swift/base64-decode-data.swift +++ b/Task/Base64-decode-data/Swift/base64-decode-data.swift @@ -6,5 +6,5 @@ VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29t if let decoded = Data(base64Encoded: input), let str = String(data: decoded, encoding: .utf8) { - print( str ) + print( str ) } diff --git a/Task/Base64-decode-data/YAMLScript/base64-decode-data.ys b/Task/Base64-decode-data/YAMLScript/base64-decode-data.ys deleted file mode 100644 index 940785796f..0000000000 --- a/Task/Base64-decode-data/YAMLScript/base64-decode-data.ys +++ /dev/null @@ -1,4 +0,0 @@ -!YS-v0 - -defn main(str): - say: base64-decode(str) diff --git a/Task/Base64-decode-data/Zig/base64-decode-data.zig b/Task/Base64-decode-data/Zig/base64-decode-data.zig deleted file mode 100644 index cad232e18b..0000000000 --- a/Task/Base64-decode-data/Zig/base64-decode-data.zig +++ /dev/null @@ -1,86 +0,0 @@ -const std = @import("std"); -const print = std.debug.print; -const ArrayList = std.ArrayList; -const Allocator = std.mem.Allocator; - -const INPUT = "VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLVBhdWwgUi5FaHJsaWNo"; -const UPPERCASE_OFFSET: i8 = -65; -const LOWERCASE_OFFSET: i8 = 26 - 97; -const NUM_OFFSET: i8 = 52 - 48; - -pub fn main() !void { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - defer _ = gpa.deinit(); - const allocator = gpa.allocator(); - - print("Input: {s}\n", .{INPUT}); - - // Create a dynamic array to collect binary strings - var binary_strings = ArrayList([]const u8).init(allocator); - defer { - for (binary_strings.items) |item| { - allocator.free(item); - } - binary_strings.deinit(); - } - - // Process each character and convert to binary - for (INPUT) |ch| { - if (ch == '=') continue; // Filter '=' chars - - // Map char values using Base64 Characters Table - const ascii: i8 = @intCast(ch); - const convert: u8 = switch (ch) { - '0'...'9' => @intCast(ascii + NUM_OFFSET), - 'a'...'z' => @intCast(ascii + LOWERCASE_OFFSET), - 'A'...'Z' => @intCast(ascii + UPPERCASE_OFFSET), - '+' => 62, - '/' => 63, - else => { - print("Not a valid base64 encoded string\n", .{}); - return; - }, - }; - - // Convert to binary format (6 bits for base64) - const binary_str = try std.fmt.allocPrint(allocator, "{b:0>6}", .{convert}); - try binary_strings.append(binary_str); - } - - // Concatenate all binary strings - var total_len: usize = 0; - for (binary_strings.items) |item| { - total_len += item.len; - } - - const concatenated = try allocator.alloc(u8, total_len); - defer allocator.free(concatenated); - - var pos: usize = 0; - for (binary_strings.items) |item| { - @memcpy(concatenated[pos..pos + item.len], item); - pos += item.len; - } - - // Split into 8-character chunks and convert to bytes - var result_bytes = ArrayList(u8).init(allocator); - defer result_bytes.deinit(); - - var i: usize = 0; - while (i + 8 <= concatenated.len) : (i += 8) { - const chunk = concatenated[i..i + 8]; - const byte_value = std.fmt.parseInt(u8, chunk, 2) catch |err| { - print("Error parsing binary: {}\n", .{err}); - return; - }; - try result_bytes.append(byte_value); - } - - // Convert to UTF-8 string and print - const result_str = result_bytes.items; - if (std.unicode.utf8ValidateSlice(result_str)) { - print("Output: {s}\n", .{result_str}); - } else { - print("Invalid UTF-8 sequence\n", .{}); - } -} diff --git a/Task/Base64-decode-data/Zkl/base64-decode-data-1.zkl b/Task/Base64-decode-data/Zkl/base64-decode-data-1.zkl index 365675c755..d8d7d8dc96 100644 --- a/Task/Base64-decode-data/Zkl/base64-decode-data-1.zkl +++ b/Task/Base64-decode-data/Zkl/base64-decode-data-1.zkl @@ -1,7 +1,7 @@ var [const] MsgHash=Import("zklMsgHash"), Curl=Import("zklCurl"); icon:=Curl().get("http://rosettacode.org/favicon.ico"); //-->(Data(4,331),693,0) -icon=icon[0][icon[1],*]; // remove header +icon=icon[0][icon[1],*]; // remove header iconEncoded:=MsgHash.base64encode(icon); iconDecoded:=MsgHash.base64decode(iconEncoded); File("rosettaCodeIcon.ico","wb").write(iconDecoded); # eyeball checking says good diff --git a/Task/Bell-numbers/ANSI-BASIC/bell-numbers.basic b/Task/Bell-numbers/ANSI-BASIC/bell-numbers.basic index b2d2b6c711..f164dbfea7 100644 --- a/Task/Bell-numbers/ANSI-BASIC/bell-numbers.basic +++ b/Task/Bell-numbers/ANSI-BASIC/bell-numbers.basic @@ -1,7 +1,7 @@ 100 REM Bell numbers -110 OPTION BASE 0 -120 DIM A(13) -130 LET MaxN = UBOUND(A) + 1 +110 LET MaxN = 14 +120 OPTION BASE 0 +130 DIM A(13) ! i.e. DIM A(MaxN - 1), ANSI BASIC does not allow expressions in the bound arguments. 140 FOR I = 0 TO MaxN - 1 150 LET A(I) = 0 160 NEXT I diff --git a/Task/Bell-numbers/AWK/bell-numbers.awk b/Task/Bell-numbers/AWK/bell-numbers.awk deleted file mode 100644 index f304853fb9..0000000000 --- a/Task/Bell-numbers/AWK/bell-numbers.awk +++ /dev/null @@ -1,23 +0,0 @@ -# syntax: GAWK --bignum -f BELL_NUMBERS.AWK -BEGIN { - arr[0,0] = 1 - printf(" 0: %10d\n",arr[0,0]) - printf(" 1: %10d\n",arr[0,0]) - for (i=1; i<50; i++) { - arr[i,0] = arr[i-1,i-1] - for (j=1; j<=i; j++) { - arr[i,j] = arr[i,j-1] + arr[i-1,j-1] - bt[i] = sprintf("%s%s ",bt[i],arr[i-1,j-1]) # build Bell's triangle - } - if (i <= 13) { - printf("%2d: %10d\n",i+1,arr[i,i]) - } - if (i == 49) { - printf("%2d: %d (%d digits)\n\n",i+1,arr[i,i],length(arr[i,i])) - } - } - for (i=1; i<=10; i++) { # show Bell's triangle - printf("%2d: %s\n",i,bt[i]) - } - exit(0) -} diff --git a/Task/Bell-numbers/Ada/bell-numbers.adb b/Task/Bell-numbers/Ada/bell-numbers.ada similarity index 100% rename from Task/Bell-numbers/Ada/bell-numbers.adb rename to Task/Bell-numbers/Ada/bell-numbers.ada diff --git a/Task/Bell-numbers/BQN/bell-numbers.bqn b/Task/Bell-numbers/BQN/bell-numbers.bqn deleted file mode 100644 index 918f1357ad..0000000000 --- a/Task/Bell-numbers/BQN/bell-numbers.bqn +++ /dev/null @@ -1,8 +0,0 @@ -Bell ← {(+`⊢´⊸∾)⍟(↕𝕩)⋈1} - -•Out "First 15 Bell numbers:" -•Show ⊑¨ Bell 15 - -•Out "" -•Out "First 10 rows of the Bell triangle:" -•Show¨ Bell 10 diff --git a/Task/Bell-numbers/Berkeley-Logo/bell-numbers.logo b/Task/Bell-numbers/Berkeley-Logo/bell-numbers.logo deleted file mode 100644 index 6a7e9966a9..0000000000 --- a/Task/Bell-numbers/Berkeley-Logo/bell-numbers.logo +++ /dev/null @@ -1,21 +0,0 @@ -to bell.numbers :max.n - make "a (array :max.n 0) - make "n 0 - make "ubound.a :max.n - 1 - for [i 0 :ubound.a] [setitem :i :a 0] - setitem 0 :a 1 - type "|B(| - type form :n 2 0 - type "|) = | - print form item 0 :a 9 0 - while [:n < :max.n] ~ - [setitem :n :a item 0 :a - for [j :n 1 -1] ~ - [setitem :j - 1 :a (item :j - 1 :a) + (item :j :a)] - make "n :n + 1 - type "|B(| - type form :n 2 0 - type "|) = | - print form item 0 :a 9 0] - erase [[] [a] []] -end diff --git a/Task/Bell-numbers/C-sharp/bell-numbers-2.cs b/Task/Bell-numbers/C-sharp/bell-numbers-2.cs deleted file mode 100644 index f2da84e2ba..0000000000 --- a/Task/Bell-numbers/C-sharp/bell-numbers-2.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Numerics; - -foreach (var row in BellTriangle().Take(15)) -{ - Console.WriteLine(row[0]); -} - -Console.WriteLine(BellTriangle().ElementAt(49)[0]); - -foreach (var row in BellTriangle().Take(10)) -{ - Console.WriteLine(string.Join(", ", row)); -} - -IEnumerable> BellTriangle() -{ - List row = [1]; - - while (true) - { - yield return row; - var scan = row[^1]; - row = [scan, .. row.Select(r => scan += r) ]; - } -} diff --git a/Task/Bell-numbers/C-sharp/bell-numbers-1.cs b/Task/Bell-numbers/C-sharp/bell-numbers.cs similarity index 100% rename from Task/Bell-numbers/C-sharp/bell-numbers-1.cs rename to Task/Bell-numbers/C-sharp/bell-numbers.cs diff --git a/Task/Bell-numbers/Crystal/bell-numbers.cr b/Task/Bell-numbers/Crystal/bell-numbers.cr deleted file mode 100644 index 2ad901f5b0..0000000000 --- a/Task/Bell-numbers/Crystal/bell-numbers.cr +++ /dev/null @@ -1,12 +0,0 @@ -require "big" - -row = [1.to_big_i] - -(1..50).each do |i| - puts "%2d: %s" % { i, i <= 10 ? row : row.first } if 1 <= i <= 15 || i == 50 - next_row = [row.last] - row.each do |n| - next_row << n + next_row.last - end - row = next_row -end diff --git a/Task/Bell-numbers/Delphi/bell-numbers.pas b/Task/Bell-numbers/Delphi/bell-numbers.delphi similarity index 100% rename from Task/Bell-numbers/Delphi/bell-numbers.pas rename to Task/Bell-numbers/Delphi/bell-numbers.delphi diff --git a/Task/Bell-numbers/EasyLang/bell-numbers.easy b/Task/Bell-numbers/EasyLang/bell-numbers.easy index d4a9e3ac8c..e554895111 100644 --- a/Task/Bell-numbers/EasyLang/bell-numbers.easy +++ b/Task/Bell-numbers/EasyLang/bell-numbers.easy @@ -10,6 +10,5 @@ func bell n . return list[n] . for i = 1 to 15 - write bell i & " " + print bell i . -print "" diff --git a/Task/Bell-numbers/Elixir/bell-numbers.ex b/Task/Bell-numbers/Elixir/bell-numbers.elixir similarity index 100% rename from Task/Bell-numbers/Elixir/bell-numbers.ex rename to Task/Bell-numbers/Elixir/bell-numbers.elixir diff --git a/Task/Bell-numbers/Forth/bell-numbers.fth b/Task/Bell-numbers/Forth/bell-numbers.fth deleted file mode 100644 index 6b7c8259fa..0000000000 --- a/Task/Bell-numbers/Forth/bell-numbers.fth +++ /dev/null @@ -1,51 +0,0 @@ -: triangle-allocate ( u -- addr ) - dup 1+ * 2/ cells dup - allocate abort" out of memory" - tuck swap erase ; - -: triangle-deallocate ( addr -- ) - free abort" memory deallocation error" ; - -: triangle-row-address ( addr u -- addr ) - dup 1+ * 2/ cells + ; - -: bell-triangle-row ( addr u -- ) - tuck 1- triangle-row-address - 2dup swap cells + - dup 1 cells - @ over ! - rot 0 ?do - dup @ >r over @ r> + >r - cell+ r> over ! - swap cell+ swap - loop 2drop ; - -: bell-triangle ( u -- addr ) - dup triangle-allocate - dup 1 swap ! - swap 1 ?do - dup i bell-triangle-row - loop ; - -: print-bell-numbers ( addr u -- ) - 0 ?do - dup i triangle-row-address @ . cr - loop drop ; - -: print-bell-row ( addr u -- ) - tuck triangle-row-address swap - 1+ 0 ?do - dup @ . cell+ - loop drop cr ; - -: main ( -- ) - 15 bell-triangle - ." First 15 Bell numbers:" cr - dup 15 print-bell-numbers cr - ." First 10 rows of the Bell triangle:" cr - 10 0 do - dup i print-bell-row - loop - triangle-deallocate ; - -main -bye diff --git a/Task/Bell-numbers/Haskell/bell-numbers-5.hs b/Task/Bell-numbers/Haskell/bell-numbers-5.hs deleted file mode 100644 index 2574f2daa3..0000000000 --- a/Task/Bell-numbers/Haskell/bell-numbers-5.hs +++ /dev/null @@ -1,17 +0,0 @@ -import Data.Ratio ((%), numerator) - -infixl 7 *. -(*.) :: Num a => a -> [a] -> [a] -x *. (p:ps) = x*p : x*.ps - -instance Num a => Num [a] where - negate = map negate - (+) = zipWith (+) - (*) (p:ps) (q:qs) = p*q : ((p*.qs) + ps*(q:qs)) - fromInteger n = fromInteger n:repeat 0 - -instance (Eq a, Fractional a) => Fractional [a] where - (/) (0:ps) (0:qs) = ps/qs - (/) (p:ps) (q:qs) = let r=p/q in r : (ps - r*.qs)/(q:qs) - - fromRational q = fromRational q:repeat 0 diff --git a/Task/Bell-numbers/Haskell/bell-numbers-6.hs b/Task/Bell-numbers/Haskell/bell-numbers-6.hs deleted file mode 100644 index 1cccede973..0000000000 --- a/Task/Bell-numbers/Haskell/bell-numbers-6.hs +++ /dev/null @@ -1,2 +0,0 @@ -expseq :: [Rational] -> [Rational] -expseq ps = zipWith (\p q -> p*fromInteger q) ps (scanl (*) 1 [1..]) diff --git a/Task/Bell-numbers/Haskell/bell-numbers-7.hs b/Task/Bell-numbers/Haskell/bell-numbers-7.hs deleted file mode 100644 index e6c2d50d9c..0000000000 --- a/Task/Bell-numbers/Haskell/bell-numbers-7.hs +++ /dev/null @@ -1,3 +0,0 @@ -infixr 9 |> -(|>) :: (Eq a, Num a) => [a] -> [a] -> [a] -(p:ps) |> (0:qs) = p : qs*(ps |> (0:qs)) diff --git a/Task/Bell-numbers/Haskell/bell-numbers-8.hs b/Task/Bell-numbers/Haskell/bell-numbers-8.hs deleted file mode 100644 index 9cc115db88..0000000000 --- a/Task/Bell-numbers/Haskell/bell-numbers-8.hs +++ /dev/null @@ -1,11 +0,0 @@ -exp1 :: [Rational] -exp1 = 0 : map (1%) factorials - where - factorials = scanl (*) 1 [2..] - -exps :: [Rational] -exps = 1 : zipWith (*) exps [ 1%n | n <- [1..] ] - -bell :: [Integer] -bell = map numerator - (expseq (exps |> exp1)) diff --git a/Task/Bell-numbers/Haskell/bell-numbers-9.hs b/Task/Bell-numbers/Haskell/bell-numbers-9.hs deleted file mode 100644 index 11d50b5761..0000000000 --- a/Task/Bell-numbers/Haskell/bell-numbers-9.hs +++ /dev/null @@ -1,4 +0,0 @@ -ghci> take 15 bell -[1,1,2,5,15,52,203,877,4140,21147,115975,678570,4213597,27644437,190899322] -ghci> bell !! 49 -10726137154573358400342215518590002633917247281 diff --git a/Task/Bell-numbers/JavaScript/bell-numbers.js b/Task/Bell-numbers/JavaScript/bell-numbers.js deleted file mode 100644 index d6982673f0..0000000000 --- a/Task/Bell-numbers/JavaScript/bell-numbers.js +++ /dev/null @@ -1,75 +0,0 @@ -// --------------------------------------------------------------- -// Bell Triangle implementation (JavaScript) -// --------------------------------------------------------------- - -class BellTriangle { - /** - * @param {number} n – number of rows to generate - */ - constructor(n) { - // total number of elements in a triangular array of size n - const length = (n * (n + 1)) / 2; - // use a plain array, pre‑filled with zeros - this.arr = new Array(length).fill(0); - - // initialise first element (row 1, col 0) = 1 - this.set(1, 0, 1); - - // build the triangle row by row - for (let i = 2; i <= n; ++i) { - // first element of a row copies the last element of the previous row - this.set(i, 0, this.get(i - 1, i - 2)); - - // the remaining entries are sums of the element above‑left - // and the element to the left in the current row - for (let j = 1; j < i; ++j) { - const value = this.get(i, j - 1) + this.get(i - 1, j - 1); - this.set(i, j, value); - } - } - } - - /** Convert (row, col) into a linear index. Rows start at 1. */ - index(row, col) { - if (row > 0 && col >= 0 && col < row) { - // triangular number formula: sum_{k=1}^{row-1} k = row*(row-1)/2 - return (row * (row - 1)) / 2 + col; - } - throw new Error('Invalid row/col'); - } - - /** Return the value at (row, col). */ - get(row, col) { - const i = this.index(row, col); - return this.arr[i]; - } - - /** Store `value` at (row, col). */ - set(row, col, value) { - const i = this.index(row, col); - this.arr[i] = value; - } -} - -// --------------------------------------------------------------- -// Main program – reproduces the Java `main` method -// --------------------------------------------------------------- -(function main() { - const rows = 15; - const bt = new BellTriangle(rows); - - console.log('First fifteen Bell numbers:'); - for (let i = 0; i < rows; ++i) { - // the Bell number Bₙ is the first entry of row n (row index = n, col = 0) - console.log(`${i + 1}: ${bt.get(i + 1, 0)}`); - } - - // Print the whole triangle for the first 10 rows (exactly as Java did) - for (let i = 1; i <= 10; ++i) { - let line = `${bt.get(i, 0)}`; - for (let j = 1; j < i; ++j) { - line += `, ${bt.get(i, j)}`; - } - console.log(line); - } -})(); diff --git a/Task/Bell-numbers/Julia/bell-numbers.jl b/Task/Bell-numbers/Julia/bell-numbers.julia similarity index 100% rename from Task/Bell-numbers/Julia/bell-numbers.jl rename to Task/Bell-numbers/Julia/bell-numbers.julia diff --git a/Task/Bell-numbers/Kotlin/bell-numbers.kts b/Task/Bell-numbers/Kotlin/bell-numbers.kotlin similarity index 100% rename from Task/Bell-numbers/Kotlin/bell-numbers.kts rename to Task/Bell-numbers/Kotlin/bell-numbers.kotlin diff --git a/Task/Bell-numbers/Loglan82/bell-numbers.loglan82 b/Task/Bell-numbers/Loglan82/bell-numbers.loglan82 deleted file mode 100644 index 141ec17f83..0000000000 --- a/Task/Bell-numbers/Loglan82/bell-numbers.loglan82 +++ /dev/null @@ -1,28 +0,0 @@ -(* Bell numbers *) - -block -const - max_n = 13; -var - a: arrayof integer, - i, j, n: integer; -begin - array a dim (0 : max_n); - n := 0; - for i := 0 to max_n - 1 - do - a(i) := 0 - od; - a(0) := 1; - writeln("B(", n: 2, ") = ", a(0): 9); - while n < max_n - do - a(n) := a(0); - for j := n downto 1 - do - a(j - 1) := a(j - 1) + a(j) - od; - n := n + 1; - writeln("B(", n: 2, ") = ", a(0): 9); - od; -end; diff --git a/Task/Bell-numbers/Miranda/bell-numbers.miranda b/Task/Bell-numbers/Miranda/bell-numbers.miranda deleted file mode 100644 index 67a573f599..0000000000 --- a/Task/Bell-numbers/Miranda/bell-numbers.miranda +++ /dev/null @@ -1,16 +0,0 @@ -main :: [sys_message] -main = [Stdout "First 15 and 50th Bell numbers:\n", - Stdout (lay [(rjustify 2 (show i)) ++ ": " ++ show (bell_numbers ! i) - | i <- [1..15] ++ [50]]), - Stdout "\nFirst 10 rows of the Bell triangle:\n", - Stdout (lay [concat [rjustify 7 (show n) | n <- row] - | row <- take 10 bell_triangle]) - ] - - -bell_numbers :: [num] -bell_numbers = map last bell_triangle - -bell_triangle :: [[num]] -bell_triangle = iterate bell_step [1] - where bell_step row = scan (+) (last row) row diff --git a/Task/Bell-numbers/MoonRock/bell-numbers.moonrock b/Task/Bell-numbers/MoonRock/bell-numbers.moonrock deleted file mode 100644 index 21caf0d119..0000000000 --- a/Task/Bell-numbers/MoonRock/bell-numbers.moonrock +++ /dev/null @@ -1,43 +0,0 @@ -' Bell numbers - -BEGIN DEF -SUB PrintStr(S$, Width%) -%MaxN = 14 -DIM A&[%MaxN] - -BEGIN CODE -N% = 0 -FOR I% = 0 TO %MaxN -1 - A&[I%] = 0 -NEXT -A&[0] = 1 -PRINT "B(" -CALL PrintStr(STR(N%), 2) -PRINT ") = " -CALL PrintStr(STR(A&[0]), 9) -PRINT "\n" -WHILE N% < %MaxN - A&[N%] = A&[0] - J% = N% - WHILE J% >= 1 - JMin1% = J% - 1 - A&[JMin1%] = A&[JMin1%] + A&[J%] - J% = J% - 1 - WEND - N% = N% + 1 - PRINT "B(" - CALL PrintStr(STR(N%), 2) - PRINT ") = " - CALL PrintStr(STR(A&[0]), 9) - PRINT "\n" -WEND -END - -SUB PrintStr(S$, Width%) -IF LEN(S$) > Width% THEN - PRINT S$ -ELSE - S$ = SPACE(Width%) + S$ - PRINT RIGHT(S$, Width%) -ENDIF -END SUB diff --git a/Task/Bell-numbers/Oberon-07/bell-numbers.oberon b/Task/Bell-numbers/Oberon-07/bell-numbers.oberon deleted file mode 100644 index 0d8ac34e3d..0000000000 --- a/Task/Bell-numbers/Oberon-07/bell-numbers.oberon +++ /dev/null @@ -1,28 +0,0 @@ -MODULE BellNumbers; - IMPORT Out; - - PROCEDURE showBellNumbers; - CONST maxBell = 15; - VAR a : ARRAY maxBell - 1 OF INTEGER; - i, n, j : INTEGER; - - PROCEDURE showOneBellNumber( n, bellNumber : INTEGER ); - BEGIN - Out.Int( n, 2 );Out.String( ": " );Out.Int( bellNumber, 0 );Out.Ln - END showOneBellNumber; - - BEGIN - FOR i := 1 TO LEN( a ) - 1 DO a[ i ] := 0 END; - a[ 0 ] := 1; - showOneBellNumber( 1, a[ 0 ] ); - FOR n := 0 TO maxBell - 2 DO - (* replace a with the next line of the triangle *) - a[ n ] := a[ 0 ]; - FOR j := n TO 1 BY -1 DO INC( a[ j - 1 ], a[ j ] ) END; - showOneBellNumber( n + 2, a[ 0 ] ) - END - END showBellNumbers; - -BEGIN - showBellNumbers -END BellNumbers. diff --git a/Task/Bell-numbers/PARI-GP/bell-numbers.parigp b/Task/Bell-numbers/PARI-GP/bell-numbers.parigp deleted file mode 100644 index f62bf25259..0000000000 --- a/Task/Bell-numbers/PARI-GP/bell-numbers.parigp +++ /dev/null @@ -1,4 +0,0 @@ -genit(maxx=50)={bell=List(); -for(n=0,maxx,q=sum(k=0,n,stirling(n,k,2)); -listput(bell,q));bell} -END diff --git a/Task/Bell-numbers/PHP/bell-numbers.php b/Task/Bell-numbers/PHP/bell-numbers.php deleted file mode 100644 index ead13effb8..0000000000 --- a/Task/Bell-numbers/PHP/bell-numbers.php +++ /dev/null @@ -1,17 +0,0 @@ -= 1; $j--) - $a[$j - 1] += $a[$j]; - $n++; - echo 'B('.str_pad($n, 2, " ", STR_PAD_LEFT).') = '. - str_pad($a[0], 9, " ", STR_PAD_LEFT).PHP_EOL; -} -?> diff --git a/Task/Bell-numbers/PL-I/bell-numbers.pli b/Task/Bell-numbers/PL-I/bell-numbers.pli deleted file mode 100644 index f9386c59bf..0000000000 --- a/Task/Bell-numbers/PL-I/bell-numbers.pli +++ /dev/null @@ -1,25 +0,0 @@ -/* Bell numbers */ - -Bell_nums: - procedure options(main); - %replace nmax by 9; - declare - a(0 : nmax) fixed binary(15), - (i, j, n) fixed binary(15); - n = 0; - do i = 0 to nmax - 1; - a(i) = 0; - end; - a(0) = 1; - put list('B('); - put edit(n, ') = ', a(0))(f(2), a, f(9)); - do while (n < nmax); - a(n) = a(0); - do j = n to 1 by -1; - a(j - 1) = a(j - 1) + a(j); - end; - n = n + 1; - put skip list('B('); - put edit(n, ') = ', a(0))(f(2), a, f(9)); - end; -end Bell_nums; diff --git a/Task/Bell-numbers/Pascal-P/bell-numbers.pas b/Task/Bell-numbers/Pascal-P/bell-numbers.pas deleted file mode 100644 index 4cfaf86cfc..0000000000 --- a/Task/Bell-numbers/Pascal-P/bell-numbers.pas +++ /dev/null @@ -1,20 +0,0 @@ -program bellnums(output); - (* Bell numbers *) -const - maxn = 14; (* with 32-bit integer *) -var - a: array[0..maxn - 1] of integer; - i, j, n: integer; -begin - n := 0; - for i := 0 to maxn - 1 do a[i] := 0; - a[0] := 1; - writeln('B(', n: 2, ') = ', a[0]: 9); - while n < maxn do - begin - a[n] := a[0]; - for j := n downto 1 do a[j - 1] := a[j - 1] + a[j]; - n := n + 1; - writeln('B(', n: 2, ') = ', a[0]: 9); - end; -end. diff --git a/Task/Bell-numbers/Free-Pascal-Lazarus/bell-numbers.pas b/Task/Bell-numbers/Pascal/bell-numbers.pas similarity index 100% rename from Task/Bell-numbers/Free-Pascal-Lazarus/bell-numbers.pas rename to Task/Bell-numbers/Pascal/bell-numbers.pas diff --git a/Task/Bell-numbers/Pluto/bell-numbers.pluto b/Task/Bell-numbers/Pluto/bell-numbers.pluto deleted file mode 100644 index 5cabc1baca..0000000000 --- a/Task/Bell-numbers/Pluto/bell-numbers.pluto +++ /dev/null @@ -1,32 +0,0 @@ -local bigint = require "bigint" -local fmt = require "fmt" - -local function bell_triangle(n) - local zero = bigint.new(0) - local tri = {} - for i = 1, n do - tri[i] = {} - for j = 1, i - 1 do tri[i][j] = zero end - end - tri[2][1] = bigint.new(1) - for i = 3, n do - tri[i][1] = tri[i - 1][i - 2] - for j = 2, i - 1 do - tri[i][j] = tri[i][j - 1] + tri[i - 1][j - 1] - end - end - return tri -end - -local bt = bell_triangle(51) -print("First fifteen and fiftieth Bell numbers:") -for i = 2, 16 do - local s = bt[i][1]:tostring() - fmt.print("%2d: %s", i - 1, fmt.int(s)) -end -local s50 = bt[51][1]:tostring() -fmt.print("%2d: %s", 50, fmt.int(s50)) -print("\nThe first ten rows of Bell's triangle:") -for i = 2, 11 do - fmt.tprint("%7s", bt[i]:map(|j| -> fmt.int(j:tostring())), #bt[i]) -end diff --git a/Task/Bell-numbers/PowerShell/bell-numbers.ps1 b/Task/Bell-numbers/PowerShell/bell-numbers.ps1 deleted file mode 100644 index 2a173ea9e9..0000000000 --- a/Task/Bell-numbers/PowerShell/bell-numbers.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -# Bell numbers -[uint32]$script:MaxN = 14 -$a = [uint32[]]::new($script:MaxN) -foreach ($i in 0..($script:MaxN - 1)) { - $a[$i] = 0 -} -[uint32]$n = 0 -$a[0] = 1 -[string]$row = "B({0, 2}) = {1,9}" -f $n, $a[0] -Write-Output $row -while ($n -lt $script:MaxN) { - $a[$n] = $a[0] - foreach ($j in $n..1) { - $a[$j - 1] += $a[$j] - } - $n++ - [string]$row = "B({0, 2}) = {1,9}" -f $n, $a[0] - Write-Output $row -} diff --git a/Task/Bell-numbers/Refal/bell-numbers.refal b/Task/Bell-numbers/Refal/bell-numbers.refal deleted file mode 100644 index f65c59ce11..0000000000 --- a/Task/Bell-numbers/Refal/bell-numbers.refal +++ /dev/null @@ -1,41 +0,0 @@ -$ENTRY Go { - , : e.Bell (e.B50) - , : (e.F15) e.Rest - = - - >; -} - -Show { - (e.X) = >; -}; - -BellNumbers { - s.N, : e.Rows = ; -}; - -BellTriangle { - s.N = ((1))>; - 0 e.T = e.T; - s.N e.Rs (e.R) = e.Rs (e.R) ()>; -}; - -BellStep { - e.Row, e.Row: e.X (e.Last) = ; -}; - -Rsum { - (Acc e.Acc) = ; - (Acc e.Acc) (e.N) e.Ns, : e.N2 = - (e.N2) ; - e.Ns = ; -}; - -Each { - (e.F) = ; - (e.F) (e.X) e.Xs = () ; -}; - -Head { - t.X e.Y = t.X; -}; diff --git a/Task/Bell-numbers/Rust/bell-numbers.rs b/Task/Bell-numbers/Rust/bell-numbers.rust similarity index 100% rename from Task/Bell-numbers/Rust/bell-numbers.rs rename to Task/Bell-numbers/Rust/bell-numbers.rust diff --git a/Task/Bell-numbers/SETL/bell-numbers.setl b/Task/Bell-numbers/SETL/bell-numbers.setl deleted file mode 100644 index 83c7ca45d4..0000000000 --- a/Task/Bell-numbers/SETL/bell-numbers.setl +++ /dev/null @@ -1,31 +0,0 @@ -program bell_numbers; - print("First 15 and 50th Bell numbers:"); - b := bell_nums(50); - loop for i in [1..15] with 50 do - print(lpad(str i, 2) + ": " + str b(i)); - end loop; - - print; - print("First 10 rows of the Bell triangle:"); - loop for row in bell_triangle(10) do - print(+/[lpad(str n, 7) : n in row]); - end loop; - - proc bell_nums(n); - tri := bell_triangle(n); - return [row(#row) : row in tri]; - end proc; - - proc bell_triangle(rows); - tri := [[1]]; - loop for i in [2..rows] do - row := tri(#tri); - nextrow := [row(#row)]; - loop for n in row do - nextrow with:= nextrow(#nextrow) + n; - end loop; - tri with:= nextrow; - end loop; - return tri; - end proc; -end program; diff --git a/Task/Bell-numbers/Scheme/bell-numbers.scm b/Task/Bell-numbers/Scheme/bell-numbers.ss similarity index 100% rename from Task/Bell-numbers/Scheme/bell-numbers.scm rename to Task/Bell-numbers/Scheme/bell-numbers.ss diff --git a/Task/Bell-numbers/Uiua/bell-numbers.uiua b/Task/Bell-numbers/Uiua/bell-numbers.uiua deleted file mode 100644 index c6d1180ce3..0000000000 --- a/Task/Bell-numbers/Uiua/bell-numbers.uiua +++ /dev/null @@ -1,12 +0,0 @@ -# Generate Bell numbers. - -# Use Marcos' BigInt library. -~ "git: https://github.com/Marcos-cat/uiua-bigint" ~ Add New Str - -# Generate next row of the Bell triangle. -# Supply simple `+` for ints, or `⍜∩°□Add` for BigInts. -Next! ← ⊙◌⍢(⊂⊙^0⊓⟜⊣°⊂|>0⋅⧻)⊸[⊣] - -&p⍥⊃Next!+⊢15 [1] # First fifteen. -&pStr°□⊢⍥Next!⍜∩°□Add49[1] # Fiftieth. -≡&p⍥⊃Next!+□10 [1] # First ten lines of triangle. diff --git a/Task/Bell-numbers/VBA/bell-numbers.vba b/Task/Bell-numbers/VBA/bell-numbers.vba deleted file mode 100644 index 35b134c90f..0000000000 --- a/Task/Bell-numbers/VBA/bell-numbers.vba +++ /dev/null @@ -1,32 +0,0 @@ -' Bell numbers - -Const MaxN As Integer = 14 - -Sub BellNumsMain() - Dim A(MaxN - 1) As Long - Dim N, J As Integer - For I = 0 To MaxN - 1 - A(I) = 0 - Next I - N = 0 - A(0) = 1 - Debug.Print "B(" & FormatLong(N, 2) & ") = " & FormatLong(A(0), 9) - Do While N < MaxN - A(N) = A(0) - For J = N To 1 Step -1 - A(J - 1) = A(J - 1) + A(J) - Next J - N = N + 1 - Debug.Print "B(" & FormatLong(N, 2) & ") = " & FormatLong(A(0), 9) - Loop -End Sub - -Function FormatLong(ByVal Num As Long, L As Integer) As String - Dim S As String - S = Trim(Str(Num)) - If Len(S) > L Then - FormatLong = String(L, "#") - Else - FormatLong = Right(String(L, " ") & S, L) - End If -End Function diff --git a/Task/Benfords-law/Ada/benfords-law-1.adb b/Task/Benfords-law/Ada/benfords-law-1.ada similarity index 100% rename from Task/Benfords-law/Ada/benfords-law-1.adb rename to Task/Benfords-law/Ada/benfords-law-1.ada diff --git a/Task/Benfords-law/Ada/benfords-law-2.adb b/Task/Benfords-law/Ada/benfords-law-2.ada similarity index 100% rename from Task/Benfords-law/Ada/benfords-law-2.adb rename to Task/Benfords-law/Ada/benfords-law-2.ada diff --git a/Task/Benfords-law/Crystal/benfords-law.cr b/Task/Benfords-law/Crystal/benfords-law.crystal similarity index 100% rename from Task/Benfords-law/Crystal/benfords-law.cr rename to Task/Benfords-law/Crystal/benfords-law.crystal diff --git a/Task/Benfords-law/Dart/benfords-law.dart b/Task/Benfords-law/Dart/benfords-law.dart deleted file mode 100644 index 4182f28c03..0000000000 --- a/Task/Benfords-law/Dart/benfords-law.dart +++ /dev/null @@ -1,35 +0,0 @@ -import 'dart:math'; - -digits(n) sync* { - double a = 0, b = 1; - for (var i = 0; i < n; i++) { - yield b.toString().codeUnitAt(0) - 48; - (a, b) = (b, a + b); - } -} - -lineout(s1, s2, s3) { - print( - s1.toString().padLeft(8) + - s2.toString().padLeft(12) + - s3.toString().padLeft(12), - ); -} - -main() { - var tally = List.filled(9, 0); - for (var d in digits(1000)) { - tally[d - 1] += 1; - } - - lineout("Digit", "Expected", "Actual"); - print("-" * 40); - - for (var d = 1; d < 10; d += 1) { - lineout( - d, - (log(1 + 1 / d) * log10e).toStringAsFixed(4), - (tally[d - 1] / 1000).toStringAsFixed(3), - ); - } -} diff --git a/Task/Benfords-law/DuckDB/benfords-law.duckdb b/Task/Benfords-law/DuckDB/benfords-law.duckdb deleted file mode 100644 index ec7d41aaa2..0000000000 --- a/Task/Benfords-law/DuckDB/benfords-law.duckdb +++ /dev/null @@ -1,22 +0,0 @@ -with recursive fib (n1, n2) as ( - select - 1::double, 1::double - union all - select n2, n1+n2 - from fib - ), -lastdigits as ( - select format('{}', n1)[1]::int as digit - from fib - limit 1000 -- N.B. - ), -counts as ( - select digit, count() as actual - from lastdigits group by digit - ), -total as ( - select count() as total from lastdigits - ) -select digit, actual, (total * log(10, 1 + (1 / digit))) as expected - from counts, total - order by digit; diff --git a/Task/Benfords-law/EasyLang/benfords-law.easy b/Task/Benfords-law/EasyLang/benfords-law.easy index 7f84888fa7..56624832fb 100644 --- a/Task/Benfords-law/EasyLang/benfords-law.easy +++ b/Task/Benfords-law/EasyLang/benfords-law.easy @@ -1,18 +1,19 @@ func$ add a$ b$ . - if len a$ < len b$ : swap a$ b$ - for i to len a$ + for i to higher len a$ len b$ a = number substr a$ i 1 - b = 0 - if i <= len b$ : b = number substr b$ i 1 + b = number substr b$ i 1 r = a + b + c c = r div 10 r$ &= r mod 10 . - if c > 0 : r$ &= c + if c > 0 + r$ &= c + . return r$ . +# len fibdist[] 9 -proc mkfibdist . +proc mkfibdist . . # generate 1000 fibonacci numbers as # (reversed) strings, because 53 bit # integers are too small @@ -35,14 +36,14 @@ proc mkfibdist . mkfibdist # len benfdist[] 9 -proc mkbenfdist . +proc mkbenfdist . . for i to 9 - benfdist[i] = log (1 + 1 / i) 10 + benfdist[i] = log10 (1 + 1.0 / i) . . mkbenfdist # -numfmt 0 3 +numfmt 3 0 print "Actual Expected" for i to 9 print fibdist[i] & " " & benfdist[i] diff --git a/Task/Benfords-law/Elixir/benfords-law.ex b/Task/Benfords-law/Elixir/benfords-law.elixir similarity index 100% rename from Task/Benfords-law/Elixir/benfords-law.ex rename to Task/Benfords-law/Elixir/benfords-law.elixir diff --git a/Task/Benfords-law/Fortran/benfords-law-3.f b/Task/Benfords-law/Fortran/benfords-law-3.f deleted file mode 100644 index 5c2ca6d8b6..0000000000 --- a/Task/Benfords-law/Fortran/benfords-law-3.f +++ /dev/null @@ -1,33 +0,0 @@ - PROGRAM benford - INTEGER counts(9) - - expected(d) = log10(1.0 + 1.0/d) - - CALL tally(counts) - - PRINT 100, 'Digit', 'Actual', 'Expected' - DO 10, i = 1, 9 -10 PRINT 101, i, counts(i)/1E3, expected(real(i)) - -100 FORMAT (A6, 1X, A9, 1X, A9) -101 FORMAT (I4, 3X, F9.3, 1X, F9.4) - END PROGRAM - - - SUBROUTINE tally(counts) - INTEGER counts(9) - CHARACTER*20 str - DOUBLE PRECISION a, b, c - INTEGER d - - counts = [(0, i = 1, 9)] - a = 0 - b = 1 - DO 10, i = 1, 1000 - WRITE (str, '(E12.6)') b - d = ichar(str(3:3)) - ichar('0') - counts(d) = counts(d) + 1 - c = a + b - a = b -10 b = c - END SUBROUTINE diff --git a/Task/Benfords-law/Julia/benfords-law.jl b/Task/Benfords-law/Julia/benfords-law.julia similarity index 100% rename from Task/Benfords-law/Julia/benfords-law.jl rename to Task/Benfords-law/Julia/benfords-law.julia diff --git a/Task/Benfords-law/K/benfords-law.k b/Task/Benfords-law/K/benfords-law.k deleted file mode 100644 index 5418b93641..0000000000 --- a/Task/Benfords-law/K/benfords-law.k +++ /dev/null @@ -1,7 +0,0 @@ -law: {(`ln 1 + 1%x) % `ln 10} -tally: #' = {*$x}' +\[1000; 0.0; 1.0] - -`0: (8$"digit"), (12$"Expected"), "Actual" - -row: {`0: (-3$$x), (-13$7#$law x), -10$"0.", $tally[*$x]} -nop: 9 {row x; x + 1}/ 1 diff --git a/Task/Benfords-law/Kotlin/benfords-law.kts b/Task/Benfords-law/Kotlin/benfords-law.kotlin similarity index 100% rename from Task/Benfords-law/Kotlin/benfords-law.kts rename to Task/Benfords-law/Kotlin/benfords-law.kotlin diff --git a/Task/Benfords-law/OCaml/benfords-law.ml b/Task/Benfords-law/OCaml/benfords-law.ocaml similarity index 100% rename from Task/Benfords-law/OCaml/benfords-law.ml rename to Task/Benfords-law/OCaml/benfords-law.ocaml diff --git a/Task/Benfords-law/Pluto/benfords-law.pluto b/Task/Benfords-law/Pluto/benfords-law.pluto deleted file mode 100644 index b5354c40ab..0000000000 --- a/Task/Benfords-law/Pluto/benfords-law.pluto +++ /dev/null @@ -1,30 +0,0 @@ -local bigint = require "pluto:bigint" -local fmt = require "fmt" -require "table2" - -local function fib1000() - local a = bigint.new(0) - local b = bigint.new(1) - local r = table.create(1000) - for i = 1, 1000 do - r[i] = b - a, b = b, b + a - end - return r -end - -local function show(c, title) - local f = table.rep(9, 0) - for c as v do - local t = v:tostring():byte() - 48 - f[t] += 1 - end - print(title) - print("Digit Observed Predicted") - for i = 1, #f do - local t = math.log(1 / i + 1, 10) - fmt.print(" %d %8.3f %8.3f", i, f[i] / #c, t) - end -end - -show(fib1000(), "First 1000 Fibonacci numbers:") diff --git a/Task/Benfords-law/PowerShell/benfords-law.ps1 b/Task/Benfords-law/PowerShell/benfords-law.psh similarity index 100% rename from Task/Benfords-law/PowerShell/benfords-law.ps1 rename to Task/Benfords-law/PowerShell/benfords-law.psh diff --git a/Task/Benfords-law/Quackery/benfords-law.quackery b/Task/Benfords-law/Quackery/benfords-law.quackery deleted file mode 100644 index c18ea50a99..0000000000 --- a/Task/Benfords-law/Quackery/benfords-law.quackery +++ /dev/null @@ -1,36 +0,0 @@ - [ $ "bigrat.qky" loadfile ] now! - - [ ' [ 1 1 ] - swap 2 - times - [ dup -1 peek - over -2 peek - + join ] ] is fibonacci ( n --> [ ) - - [ 0 swap witheach + ] is sum ( [ --> n ) - - [ [ 10 /mod over while - drop again ] nip ] is msd ( n --> n ) - - [ 2dup peek 1+ unrot poke ] is tallydigit ( [ n --> [ ) - - [ 0 10 of swap - witheach - [ msd tallydigit ] ] is msdcount ( [ --> [ ) - - [ [ table - $ "0.30103" $ "0.17609" - $ "0.12494" $ "0.09691" - $ "0.07918" $ "0.06695" - $ "0.05799" $ "0.05115" - $ "0.04576" ] do echo$ ] is expected ( --> ) - - say "n expected counted" cr - 1000 fibonacci msdcount - behead drop - dup sum swap - witheach - [ i^ 1+ echo sp sp - i^ expected sp sp - over reduce - 5 point$ echo$ cr ] - drop diff --git a/Task/Benfords-law/Rust/benfords-law.rs b/Task/Benfords-law/Rust/benfords-law.rust similarity index 100% rename from Task/Benfords-law/Rust/benfords-law.rs rename to Task/Benfords-law/Rust/benfords-law.rust diff --git a/Task/Benfords-law/Scheme/benfords-law.scm b/Task/Benfords-law/Scheme/benfords-law.ss similarity index 100% rename from Task/Benfords-law/Scheme/benfords-law.scm rename to Task/Benfords-law/Scheme/benfords-law.ss diff --git a/Task/Benfords-law/Uiua/benfords-law.uiua b/Task/Benfords-law/Uiua/benfords-law.uiua deleted file mode 100644 index 343c2304a9..0000000000 --- a/Task/Benfords-law/Uiua/benfords-law.uiua +++ /dev/null @@ -1,4 +0,0 @@ -F ← |1 memo(⨬(+∩F-1.-1|⋅1)<2.) -Lim ← 1000 -&p$"Expected: _"⁅×Limₙ10+1÷:1↘1⇡10 -&p$"Got: _"⊕⧻⊛.≡(⊢°⋕F)⇡Lim diff --git a/Task/Bernoulli-numbers/ALGOL-68/bernoulli-numbers.alg b/Task/Bernoulli-numbers/ALGOL-68/bernoulli-numbers.alg index 3f48297679..915f596b5e 100644 --- a/Task/Bernoulli-numbers/ALGOL-68/bernoulli-numbers.alg +++ b/Task/Bernoulli-numbers/ALGOL-68/bernoulli-numbers.alg @@ -33,7 +33,14 @@ BEGIN num OF result//den OF result ); - OP - = (FRAC a, b)FRAC: a + -b; + OP - = (FRAC a, b)FRAC: a + -b, + * = (FRAC a, b)FRAC: ( + LONG LONG INT num = num OF a * num OF b, + den = den OF a * den OF b; + LONG LONG INT common = gcd(num, den); + (num OVER common) // (den OVER common) + ); + OP - = (FRAC frac)FRAC: (-num OF frac, den OF frac); # ============================================================== # @@ -64,8 +71,7 @@ BEGIN FRAC bn := bernoulli( n ); IF num OF bn /= 0 THEN # have a non-0 Bn # - print( ( "B(", whole( n, -2 ), ") ", whole( num OF bn, -50 ) ) ); - print( ( " / ", whole( den OF bn, 0 ), newline ) ) + print( ( "B(", whole( n, -2 ), ") ", whole( num OF bn, -50 ), " / ", whole( den OF bn, 0 ), newline ) ) FI OD END diff --git a/Task/Bernoulli-numbers/Ada/bernoulli-numbers-2.adb b/Task/Bernoulli-numbers/Ada/bernoulli-numbers-2.adb deleted file mode 100644 index 16ff6c98fa..0000000000 --- a/Task/Bernoulli-numbers/Ada/bernoulli-numbers-2.adb +++ /dev/null @@ -1,45 +0,0 @@ -with Ada.Text_IO; use Ada.Text_IO; -with Strings_Edit; use Strings_Edit; -with Strings_Edit.Integers; use Strings_Edit.Integers; -with Unbounded_Rationals; use Unbounded_Rationals; -with Unbounded_Unsigneds; use Unbounded_Unsigneds; - -with Strings_Edit.Unbounded_Unsigned_Edit; -use Strings_Edit.Unbounded_Unsigned_Edit; - -procedure Bernoulli is - function Bernoulli_Number (N : Natural) return Unbounded_Rational is - A : array (0..Half_Word (N)) of Unbounded_Rational; - begin - for M in 0..Half_Word (N) loop - A (M) := Unbounded_Rationals.One / (M + 1); - for J in reverse 1..M LOOP - A (J - 1) := J * (A (J - 1) - A (J)); - end loop; - end loop; - return A (0); - end Bernoulli_Number; - B : Unbounded_Rational; - Line : String (1..80); - Pointer : Integer; -begin - for I in 0..60 loop - if I mod 2 = 0 or else I = 1 then - B := Bernoulli_Number (I); - if not Is_Zero (B) then - Pointer := 1; - Put (Line, Pointer, "B("); - Put (Line, Pointer, I, 10, False, 2, Right); - Put (Line, Pointer, ") = "); - if Is_Negative (B) then - Put (Line, Pointer, '-' & Image (Get_Numerator (B)), 45, Right); - else - Put (Line, Pointer, Get_Numerator (B), 10, 45, Right); - end if; - Put (Line, Pointer, " / "); - Put (Line, Pointer, Get_Denominator (B)); - Put_Line (Line (1..Pointer - 1)); - end if; - end if; - end loop; -end Bernoulli; diff --git a/Task/Bernoulli-numbers/Ada/bernoulli-numbers-1.adb b/Task/Bernoulli-numbers/Ada/bernoulli-numbers.ada similarity index 100% rename from Task/Bernoulli-numbers/Ada/bernoulli-numbers-1.adb rename to Task/Bernoulli-numbers/Ada/bernoulli-numbers.ada diff --git a/Task/Bernoulli-numbers/Crystal/bernoulli-numbers-1.cr b/Task/Bernoulli-numbers/Crystal/bernoulli-numbers-1.crystal similarity index 100% rename from Task/Bernoulli-numbers/Crystal/bernoulli-numbers-1.cr rename to Task/Bernoulli-numbers/Crystal/bernoulli-numbers-1.crystal diff --git a/Task/Bernoulli-numbers/Crystal/bernoulli-numbers-2.cr b/Task/Bernoulli-numbers/Crystal/bernoulli-numbers-2.crystal similarity index 100% rename from Task/Bernoulli-numbers/Crystal/bernoulli-numbers-2.cr rename to Task/Bernoulli-numbers/Crystal/bernoulli-numbers-2.crystal diff --git a/Task/Bernoulli-numbers/Crystal/bernoulli-numbers-3.cr b/Task/Bernoulli-numbers/Crystal/bernoulli-numbers-3.crystal similarity index 100% rename from Task/Bernoulli-numbers/Crystal/bernoulli-numbers-3.cr rename to Task/Bernoulli-numbers/Crystal/bernoulli-numbers-3.crystal diff --git a/Task/Bernoulli-numbers/Delphi/bernoulli-numbers.pas b/Task/Bernoulli-numbers/Delphi/bernoulli-numbers.delphi similarity index 100% rename from Task/Bernoulli-numbers/Delphi/bernoulli-numbers.pas rename to Task/Bernoulli-numbers/Delphi/bernoulli-numbers.delphi diff --git a/Task/Bernoulli-numbers/Elixir/bernoulli-numbers.ex b/Task/Bernoulli-numbers/Elixir/bernoulli-numbers.elixir similarity index 100% rename from Task/Bernoulli-numbers/Elixir/bernoulli-numbers.ex rename to Task/Bernoulli-numbers/Elixir/bernoulli-numbers.elixir diff --git a/Task/Bernoulli-numbers/FutureBasic/bernoulli-numbers.basic b/Task/Bernoulli-numbers/FutureBasic/bernoulli-numbers.basic deleted file mode 100644 index b0d0000ba4..0000000000 --- a/Task/Bernoulli-numbers/FutureBasic/bernoulli-numbers.basic +++ /dev/null @@ -1,93 +0,0 @@ -// -// Bernoulli Number -// Using FutureBasic 7.0.35 -// -// September 2025, R.W -// - -include "gmp.incl" - -_kMaxN = 200 // max Bernoulli terms - -mpq_t tmp -dim a( _kMaxN ) as mpq_t // workspace a(0.._kMaxN) - -// Bernoulli: -// B_m = -(1 / (m+1)) * sum_{k=0..m-1} binomial(m+1, k) * B_k - -local fn Bernoulli( rop as mpq_t, n as long ) - long m, j - if n < 0 then n = 0 - if n > _kMaxN then n = _kMaxN - for m = 1 to n + 1 - mpq_set_si( a(m-1), 1, m ) - // j = m-1..1 - for j = m - 1 to 1 step -1 - // a[j] = a[j+1] - a[j] with 0-based mapping - mpq_sub( a(j-1), a(j), a(j-1) ) - // multiply by j - mpq_set_si( tmp, j, 1 ) - mpq_mul( a(j-1), a(j-1), tmp ) - next - next - mpq_set( rop, a(0) ) -end fn - - -//-------------- Main --------- - -Window 1, @"Bernoulli Numbers",(0,0,500,500) - -CFStringRef cfnum, cfden, pLine, filler,sp,sp2 -Int terms -long i - -terms = 60 - -mpq_init( tmp ) -for i = 0 to terms - mpq_init( a(i) ) -next -filler = @" " -mpq_t rop -mpz_t num, den - -mpq_init( rop ) -mpz_init( num ) -mpz_init( den ) -pLine = @"" -for i = 0 to 60 step 2 - if i = 2 then i-- - if i = 3 then i-- - fn Bernoulli( rop, i ) - mpq_get_num( num, rop ) - if i == 1 - mpz_neg( num, num ) - end if - if fn mpz_cmp_si( num, 0 ) // nonzero? - mpq_get_den( den, rop ) - cfnum = fn mpz_cf(10, num) - cfden = fn mpz_cf(10, den) - if i < 10 - sp = @" " - else - sp = @"" - end if - sp2 = left(filler,44 - len(cfnum)) - pLine = concat(sp, @"B(",mid(str(i),1),@") = ",sp2 ,cfnum, @" / ", cfden) - print@ pLine - end if -next - -// clean up -for i = 0 to terms - mpq_clear( a(i) ) -next -mpq_clear( tmp ) -mpz_clear( den ) -mpz_clear( num ) -mpq_clear( rop ) - -HandleEvents - -// diff --git a/Task/Bernoulli-numbers/Isabelle/bernoulli-numbers-1.isabelle b/Task/Bernoulli-numbers/Isabelle/bernoulli-numbers-1.isabelle deleted file mode 100644 index 485cee8d92..0000000000 --- a/Task/Bernoulli-numbers/Isabelle/bernoulli-numbers-1.isabelle +++ /dev/null @@ -1,373 +0,0 @@ -theory Mini_Bernoulli -imports Complex_Main - "HOL-Computational_Algebra.Computational_Algebra" - "HOL-Combinatorics.Stirling" - "HOL-Library.Stream" - "Coinductive.Coinductive_List" - "HOL-Library.Code_Target_Numeral" - "HOL-Library.Code_Lazy" - -begin - -subsection ‹Definition of Bernoulli numbers› - -(* We define Bernoulli numbers in the standard fashion as those numbers B_n whose exponential - generating function function is X / (1 - e^(-X)): *) - -definition bernoulli_fps :: "rat fps" - where "bernoulli_fps = fps_X / (1 - fps_exp (-1))" - -definition bernoulli :: "nat ⇒ rat" where - "bernoulli n = fps_nth bernoulli_fps n * fact n" - - -subsection ‹Stirling numbers of the 2nd kind› - -(* We use the Stirling numbers from the Isabelle library and prove a few additional things - about them. *) - -lemma Stirling_n_0: "Stirling n 0 = (if n = 0 then 1 else 0)" - by (cases n) simp_all - -lemma sum_Stirling_binomial: - "Stirling (Suc n) (Suc m) = (∑i=0..n. Stirling i m * (n choose i))" -proof - - have "real (Stirling (Suc n) (Suc m)) = real (∑i = 0..n. Stirling i m * (n choose i))" - proof (induction n arbitrary: m) - case (Suc n m) - have "real (∑i = 0..Suc n. Stirling i m * (Suc n choose i)) = - real (∑i = 0..n. Stirling (Suc i) m * (Suc n choose Suc i)) + real (Stirling 0 m)" - by (subst sum.atLeast0_atMost_Suc_shift) simp_all - also have "real (∑i = 0..n. Stirling (Suc i) m * (Suc n choose Suc i)) = - real (∑i = 0..n. (n choose i) * Stirling (Suc i) m) + - real (∑i = 0..n. (n choose Suc i) * Stirling (Suc i) m)" - by (simp add: algebra_simps sum.distrib) - also have "(∑i = 0..n. (n choose Suc i) * Stirling (Suc i) m) = - (∑i = Suc 0..Suc n. (n choose i) * Stirling i m)" - by (subst sum.shift_bounds_cl_Suc_ivl) simp_all - also have "… = (∑i = Suc 0..n. (n choose i) * Stirling i m)" - by (intro sum.mono_neutral_right) auto - also have "… = real (∑i = 0..n. Stirling i m * (n choose i)) - real (Stirling 0 m)" - by (simp add: sum.atLeast_Suc_atMost mult_ac) - also have "real (∑i = 0..n. Stirling i m * (n choose i)) = real (Stirling (Suc n) (Suc m))" - by (rule Suc.IH [symmetric]) - also have "real (∑i = 0..n. (n choose i) * Stirling (Suc i) m) = - real m * real (Stirling (Suc n) (Suc m)) + real (Stirling (Suc n) m)" - by (cases m; (simp only: Suc.IH, simp add: algebra_simps sum.distrib - sum_distrib_left sum_distrib_right)) - also have "… + (real (Stirling (Suc n) (Suc m)) - real (Stirling 0 m)) + real (Stirling 0 m) = - real (Suc m * Stirling (Suc n) (Suc m) + Stirling (Suc n) m)" - by (simp add: algebra_simps del: Stirling.simps) - also have "Suc m * Stirling (Suc n) (Suc m) + Stirling (Suc n) m = - Stirling (Suc (Suc n)) (Suc m)" - by (rule Stirling.simps(4) [symmetric]) - finally show ?case .. - qed simp_all - thus ?thesis by (subst (asm) of_nat_eq_iff) -qed - -(* The exponential generating function of the Stirling numbers (of the 2nd kind) with - fixed second argument $m$ is S_m(X) = (e^X - 1)^m / m!. - We use this fact to derive a closed form for them. *) -lemma Stirling_fps_aux: - "(fps_exp 1 - 1) ^ m $ n * fact n = (fact m * of_nat (Stirling n m) :: 'a :: field_char_0)" -proof (induction m arbitrary: n) - case 0 - thus ?case by (simp add: Stirling_n_0) -next - case (Suc m n) - show ?case - proof (cases n) - case 0 - thus ?thesis by simp - next - case (Suc n') - hence "(fps_exp 1 - 1 :: 'a fps) ^ Suc m $ n * fact n = - fps_deriv ((fps_exp 1 - 1) ^ Suc m) $ n' * fact n'" - by (simp_all add: algebra_simps del: power_Suc) - also have "fps_deriv ((fps_exp 1 - 1 :: 'a fps) ^ Suc m) = - fps_const (of_nat (Suc m)) * ((fps_exp 1 - 1) ^ m * fps_exp 1)" - by (subst fps_deriv_power) simp_all - also have "… $ n' * fact n' = - of_nat (Suc m) * ((∑i = 0..n'. (fps_exp 1 - 1) ^ m $ i / fact (n' - i)) * fact n')" - unfolding fps_mult_left_const_nth - by (simp add: fps_mult_nth Suc.IH sum_distrib_right del: of_nat_Suc) - also have "(∑i = 0..n'. (fps_exp 1 - 1 :: 'a fps) ^ m $ i / fact (n' - i)) * fact n' = - (∑i = 0..n'. (fps_exp 1 - 1) ^ m $ i * fact n' / fact (n' - i))" - by (subst sum_distrib_right, rule sum.cong) (simp_all add: divide_simps) - also have "… = (∑i = 0..n'. (fps_exp 1 - 1) ^ m $ i * fact i * of_nat (n' choose i))" - by (intro sum.cong refl) (simp_all add: binomial_fact) - also have "… = (∑i = 0..n'. fact m * of_nat (Stirling i m) * of_nat (n' choose i))" - by (simp only: Suc.IH) - also have "of_nat (Suc m) * … = (fact (Suc m) :: 'a) * - (∑i = 0..n'. of_nat (Stirling i m) * of_nat (n' choose i))" (is "_ = _ * ?S") - by (simp add: sum_distrib_left sum_distrib_right mult_ac del: of_nat_Suc) - also have "?S = of_nat (Stirling (Suc n') (Suc m))" - by (subst sum_Stirling_binomial) simp - also have "Suc n' = n" by (simp add: Suc) - finally show ?thesis . - qed -qed - -theorem Stirling_closed_form: - "(of_nat (Stirling n k) :: 'a :: field_char_0) = - (∑j≤k. (-1)^(k - j) * of_nat (k choose j) * of_nat j ^ n) / fact k" -proof - - have "(fps_exp 1 - 1 :: 'a fps) = (fps_exp 1 + (-1))" by simp - also have "… ^ k = (∑j≤k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j))" - unfolding binomial_ring .. - also have "… = (∑j≤k. fps_const ((-1) ^ (k - j) * of_nat (k choose j)) * fps_exp (of_nat j))" - by (simp add: fps_const_mult [symmetric] fps_const_power [symmetric] - fps_const_neg [symmetric] mult_ac fps_of_nat fps_exp_power_mult - del: fps_const_mult fps_const_power fps_const_neg) - also have "fps_nth … n = (∑j≤k. (- 1) ^ (k - j) * of_nat (k choose j) * of_nat j ^ n) / fact n" - by (simp add: fps_sum_nth sum_divide_distrib) - also have "… * fact n = (∑j≤k. (- 1) ^ (k - j) * of_nat (k choose j) * of_nat j ^ n)" - by simp - also note Stirling_fps_aux[of k n] - finally show ?thesis by (simp add: atLeast0AtMost field_simps) -qed - - -(* - We now define a somewhat ad-hoc operator formal power series: XD' maps a formal power - series A(X) to the series (X - 1) A'(X). - - The relevance of this operator to us is that the n-fold iteration of this operator - is related to Stirling numbers. -*) -definition fps_XD' :: "'a :: field_char_0 fps ⇒ 'a fps" - where "fps_XD' = (λb. (fps_X - 1) * fps_deriv b)" - -lemma fps_XD'_0 [simp]: "fps_XD' 0 = 0" - and fps_XD'_1 [simp]: "fps_XD' 1 = 0" - and fps_XD'_add [simp]: "fps_XD' (b + c) = fps_XD' b + fps_XD' c" - and fps_XD'_mult: "fps_XD' (b * c) = fps_XD' b * c + b * fps_XD' c" - by (simp_all add: fps_XD'_def algebra_simps) - -lemma fps_XD'_power: "fps_XD' (b ^ n) = of_nat n * b ^ (n - 1) * fps_XD' b" - by (induction n) (simp_all add: algebra_simps fps_XD'_mult power_eq_if) - -lemma fps_XD'_sum: "fps_XD' (sum f A) = sum (λx. fps_XD' (f x)) A" - by (induction A rule: infinite_finite_induct) simp_all - -lemma fps_XD'_funpow: - defines "S ≡ λn i. fps_const (of_nat (Stirling n i))" - shows "(fps_XD' ^^ n) H = (∑m≤n. S n m * (fps_X - 1) ^ m * (fps_deriv ^^ m) H)" -proof (induction n arbitrary: H) - case 0 - thus ?case by (simp add: S_def) -next - case (Suc n H) - define G where "G = (fps_X - 1 :: 'a fps)" - have "(∑m≤Suc n. S (Suc n) m * G ^ m * (fps_deriv ^^ m) H) = - (∑i≤n. of_nat (Suc i) * S n (Suc i) * G ^ Suc i * (fps_deriv ^^ Suc i) H) + - (∑i≤n. S n i * G ^ Suc i * (fps_deriv ^^ Suc i) H)" - (is "_ = sum (λi. ?f (Suc i)) … + ?S2") - by (subst sum.atMost_Suc_shift) (simp_all add: sum.distrib algebra_simps fps_of_nat S_def - fps_const_add [symmetric] fps_const_mult [symmetric] del: fps_const_add fps_const_mult) - also have "sum (λi. ?f (Suc i)) {..n} = sum (λi. ?f (Suc i)) {..= 1; j--) { - A[j - 1] = A[j - 1].subtract(A[j]).multiply(new Fraction(j)); - } - } - return A[0]; -} - -// Main execution -const ZERO = new Fraction(0); -for (let n = 0; n <= 60; n++) { - const b = bernoulli(n); - if (!b.equals(ZERO)) { - console.log(`B(${n.toString().padEnd(2)}) = ${b}`); - } -} diff --git a/Task/Bernoulli-numbers/Julia/bernoulli-numbers.jl b/Task/Bernoulli-numbers/Julia/bernoulli-numbers.julia similarity index 100% rename from Task/Bernoulli-numbers/Julia/bernoulli-numbers.jl rename to Task/Bernoulli-numbers/Julia/bernoulli-numbers.julia diff --git a/Task/Bernoulli-numbers/Kotlin/bernoulli-numbers.kts b/Task/Bernoulli-numbers/Kotlin/bernoulli-numbers.kotlin similarity index 100% rename from Task/Bernoulli-numbers/Kotlin/bernoulli-numbers.kts rename to Task/Bernoulli-numbers/Kotlin/bernoulli-numbers.kotlin diff --git a/Task/Bernoulli-numbers/M2000-Interpreter/bernoulli-numbers.m2000 b/Task/Bernoulli-numbers/M2000-Interpreter/bernoulli-numbers.m2000 deleted file mode 100644 index 8f39e733c1..0000000000 --- a/Task/Bernoulli-numbers/M2000-Interpreter/bernoulli-numbers.m2000 +++ /dev/null @@ -1,96 +0,0 @@ -module Bernoulli_Numbers { - Class Rational { - numerator as decimal, denominator as decimal - gcd=lambda->0 - lcm=lambda->0 - operator "+" { - Read l - denom=.lcm(l.denominator, .denominator) - .numerator<=denom/l.denominator*l.numerator+denom/.denominator*.numerator - if .numerator==0 then denom=1 - .denominator<=denom - } - Operator Unary { - .numerator-! - } - Operator "-" { - Read l - Call Operator "+", -l - } - Group Real { - value { - link parent numerator, denominator to n, d - =n/d - } - } - Group ToString$ { - value { - link parent numerator, denominator to n, d - =Str$(n)+"/"+Str$(d,"") - } - } - class: - Module Rational (.numerator, .denominator) { - if .denominator=0 then .denominator<=1 - while frac(.numerator)<>0 { - .numerator*=10@ - .denominator*=10@ - } - sgn=Sgn(.numerator)*Sgn(.denominator) - .denominator<=abs(.denominator) - .numerator<=abs(.numerator)*sgn - gcd1=lambda (a as decimal, b as decimal) -> { - if a0 then - .denominator/=gdcval - .numerator/=gdcval - end if - .gcd<=gcd1 - .lcm<=lambda gcd=gcd1 (a as decimal, b as decimal) -> { - =a/gcd(a,b)*b - } - } - } - Open "out.txt" for output as #f - r1=Rational(1,1) - b=0 - nextBern() - b=1 - nextBern() - for b=2 to 28 step 2 - nextBern() - next - close #f - - sub nextBern() - local m=@bernoulli(b) - Print #F, format$("B({0::-2})={1}",b, m.tostring$) - end sub - function bernoulli(n as decimal) - Local a(1 to n+1)=Rational(1,1), z - local decimal m, j - for m=0 to n - a(m + 1) = Rational(1 , m + 1) - if m<1 then continue - for j = m to 1 - z= a(J) - a(j+1) + r1 - a(j)=z - nn=z.gcd(j, z.denominator) - a(j).numerator*=j/nn - a(j).denominator/=nn - next - for a(1) { - this=rational(.numerator, .denominator) - } - next - =a(1) - end function -} -Bernoulli_Numbers diff --git a/Task/Bernoulli-numbers/Pluto/bernoulli-numbers.pluto b/Task/Bernoulli-numbers/Pluto/bernoulli-numbers.pluto deleted file mode 100644 index 2a23069296..0000000000 --- a/Task/Bernoulli-numbers/Pluto/bernoulli-numbers.pluto +++ /dev/null @@ -1,22 +0,0 @@ -require "bignum" -local fmt = require "fmt" - -local function bernoulli(n) - assert(n >= 0, "Argument must be non-negative") - local a = table.create(n + 1) - for m = 0, n do - a[m + 1] = bigrat.recip(m + 1) - local j = m - while j >= 1 do - a[j] = (a[j] - a[j + 1]) * bigrat.int(j) - j -= 1 - end - end - return n != 1 ? a[1] : -a[1] --'first' Bernoulli number -end - -local zero = bigrat.int(0) -for n = 0, 60 do - local b = bernoulli(n) - if b != zero then fmt.print("B(%2d) = %44s / %s", n, b:getNum(), b:getDen()) end -end diff --git a/Task/Bernoulli-numbers/R/bernoulli-numbers.r b/Task/Bernoulli-numbers/R/bernoulli-numbers.r index 71e908ffcf..e6c84acce2 100644 --- a/Task/Bernoulli-numbers/R/bernoulli-numbers.r +++ b/Task/Bernoulli-numbers/R/bernoulli-numbers.r @@ -1,6 +1,8 @@ -library(gmp) +library(pracma) -indices <- c(0,1,2*(1:30)) -bnums <- sapply(indices, BernoulliQ) -names(bnums) <- paste0("B(", indices, ")") -print(bnums, initLine=FALSE) +for (idx in c(1,2*0:30)) { + b <- bernoulli(idx) + d <- as.character(denominator(b)) + n <- as.character(numerator(b)) + cat("B(",idx,") = ",n,"/",d,"\n", sep = "") +} diff --git a/Task/Bernoulli-numbers/REXX/bernoulli-numbers.rexx b/Task/Bernoulli-numbers/REXX/bernoulli-numbers.rexx index 0fa77e3ed1..a1673236bf 100644 --- a/Task/Bernoulli-numbers/REXX/bernoulli-numbers.rexx +++ b/Task/Bernoulli-numbers/REXX/bernoulli-numbers.rexx @@ -1,125 +1,55 @@ --- 23 Aug 2025 -include Setting -numeric digits 16 -arg xx -if xx = '' then - xx=60 -ss=(xx>0); xx=Abs(xx) - -say 'BERNOULLI NUMBERS' -say version -say - -call Rational1 xx -if ss then - call ShowFractions xx -call Timer 'R' - -call Rational2 xx -if ss then - call ShowFractions xx -call Timer 'R' - -call Decimal1 xx -if ss then - call ShowDecimals xx -call Timer 'R' - -call Decimal2 xx -if ss then - call ShowDecimals xx -call Timer 'R' -exit - -Rational1: -procedure expose Memo. Bern. -arg xx -say 'Rational arithmetic' -say 'cf Generating function' -numeric digits Max(Digits(),3*xx) -Bern.=0; Bern.0='1 1'; Bern.1='-1 2' -do n = 2 by 2 to xx - s=0 - do k = 0 to n-1 - s=Addq(s,Scaleq(Bern.k,Comb(n+1,k))) - end k - Bern.n=Mulq(Negq(s),Invq(n+1)) -end n -return - -Rational2: -procedure expose Memo. Bern. -arg xx -say 'Numerator and denominator calculations' -say 'cf Double sum formula optimized' -numeric digits Max(Digits(),3*xx) -Bern.=0; Bern.0='1 1'; Bern.1='-1 2' -do j = 2 by 2 to xx - jp=j+1; sn=1-j; sd=2 - do k = 2 by 2 to j-1 - bn=bn.k; ad=ad.k; an=Comb(jp,k)*bn; tl=Lcm(sd,ad) - sn=tl%sd*sn; sd=tl; an=tl%ad*an; sn=sn+an - end k - sn=-sn; sd=sd*jp; bn.j=sn; ad.j=sd; g=Gcd(Abs(sn),sd) - Bern.j=sn/g sd/g -end j -return - -ShowFractions: -procedure expose Bern. -arg xx -w=Length(Word(Bern.xx,1))+2 -say ' Bn' Right('Num',w) '/' Left('Den',10) 'Decimal' -do i = 0 to xx - if Bern.i <> 0 then do - parse var Bern.i num den - say Right(i,3) Right(num,w) '/' Left(den,10) Digit(num/den,16) - end -end i -return - -Decimal1: -procedure expose Bern. Memo. -arg xx -say 'Floating point calculations' -say 'cf Generating function' -numeric digits Max(Digits(),2*xx) -Bern.=0; Bern.0=1; Bern.1='-0.5' -do n = 2 by 2 to xx - s=0 - do k = 0 to n-1 - s=s+Bern.k*Comb(n+1,k) - end k - Bern.n=-s/(n+1) -end n -return xx - -Decimal2: -procedure expose Bern. Memo. -arg xx -say 'Floating point calculations' -say 'cf Akiyama-Tanigawa' -numeric digits Max(Digits(),3*xx) -Bern.=0; Bern.0=1; Bern.1=-0.5 -do i = 2 by 2 to xx - do m = 0 to i - a.m=1/(m+1) - do j = m by -1 to 1 - j1=j-1; a.j1=j*(a.j1-a.j) - end - end m - Bern.i=a.0 -end i -return xx - -ShowDecimals: -procedure expose Bern. -arg xx -say ' Bn' 'Decimal' -do i = 0 to xx - if Bern.i <> 0 then - say Right(i,3) Digit(Bern.i,16) -end i -return - -include Math +/*REXX program calculates N number of Bernoulli numbers expressed as vulgar fractions.*/ +parse arg N .; if N=='' | N=="," then N= 60 /*Not specified? Then use the default.*/ +numeric digits max(9, n*2) /*increase the decimal digits if needed*/ +w= max(length(N), 4); Nw= N + w + N % 4 /*used for aligning (output) fractions.*/ +say 'B(n)' center("Bernoulli numbers expressed as vulgar fractions", max(78-w, Nw) ) +say copies('─',w) copies("─", max(78-w,Nw+2*w)) /*display 2nd line of title, separators*/ +!.= .; do #=0 to N /*process the numbers from 0 ──► N. */ + b= bern(#); if b==0 then iterate /*calculate Bernoulli number, skip if 0*/ + indent= max(0, nW - pos('/', b) ) /*calculate the alignment (indentation)*/ + say right(#, w) left('', indent) b /*display the indented Bernoulli number*/ + end /*#*/ /* [↑] align the Bernoulli fractions. */ +exit 0 /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +bern: parse arg x; if x==0 then return '1/1' /*handle the special case of zero. */ + if x==1 then return '-1/2' /* " " " " " one. */ + if x//2 then return 0 /* " " " " " odds > 1.*/ + do j=2 to x by 2; jp= j+1 /*process the positive integers up to X*/ + sn= 1 - j /*define the numerator. */ + sd= 2 /* " " denominator. */ + do k=2 to j-1 by 2 /*calculate a SN/SD sequence. */ + parse var @.k bn '/' ad /*get a previously calculated fraction.*/ + an= comb(jp, k) * bn /*use COMBination for the next term. */ + $lcm= LCM(sd, ad) /*use Least Common Denominator function*/ + sn= $lcm % sd * sn; sd= $lcm /*calculate the current numerator. */ + an= $lcm % ad * an /* " " next " */ + sn= sn + an /* " " current " */ + end /*k*/ /* [↑] calculate the SN/SD sequence.*/ + sn= -sn /*flip the sign for the numerator. */ + sd= sd * jp /*calculate the denominator. */ + if sn\==1 then do; _= GCD(sn, sd) /*get the Greatest Common Denominator.*/ + sn= sn%_; sd= sd%_ /*reduce the numerator and denominator.*/ + end /* [↑] done with the reduction(s). */ + @.j= sn'/'sd /*save the result for the next round. */ + end /*j*/ /* [↑] done calculating Bernoulli #'s.*/ + return sn'/'sd +/*──────────────────────────────────────────────────────────────────────────────────────*/ +comb: procedure expose !.; parse arg x,y; if x==y then return 1 + if !.C.x.y\==. then return !.C.x.y /*combination computed before?*/ + if x-y < y then y= x-y /*x-y < y? Then use a new Y.*/ + z= perm(x, y); do j=2 for y-1; z= z % j + end /*j*/ + !.C.x.y= z; return z /*assign memoization & return.*/ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +GCD: procedure; parse arg x,y; x= abs(x) + do until y==0; parse value x//y y with y x; end; return x +/*──────────────────────────────────────────────────────────────────────────────────────*/ +LCM: procedure; parse arg x,y /*X=ABS(X); Y=ABS(Y) not needed for Bernoulli #s.*/ + /*IF Y==0 THEN RETURN 0 " " " " " */ + $= x * y /*calculate part of the LCM here. */ + do until y==0; parse value x//y y with y x + end /*until*/ /* [↑] this is a short & fast GCD*/ + return $ % x /*divide the pre─calculated value.*/ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +perm: procedure expose !.; parse arg x,y; if !.P.x.y\==. then return !.P.x.y + z= 1; do j=x-y+1 to x; z= z*j; end; !.P.x.y= z; return z diff --git a/Task/Bernoulli-numbers/Rust/bernoulli-numbers.rs b/Task/Bernoulli-numbers/Rust/bernoulli-numbers.rust similarity index 100% rename from Task/Bernoulli-numbers/Rust/bernoulli-numbers.rs rename to Task/Bernoulli-numbers/Rust/bernoulli-numbers.rust diff --git a/Task/Bernoulli-numbers/Scheme/bernoulli-numbers.scm b/Task/Bernoulli-numbers/Scheme/bernoulli-numbers.ss similarity index 100% rename from Task/Bernoulli-numbers/Scheme/bernoulli-numbers.scm rename to Task/Bernoulli-numbers/Scheme/bernoulli-numbers.ss diff --git a/Task/Bernoulli-numbers/TAV/bernoulli-numbers-1.tav b/Task/Bernoulli-numbers/TAV/bernoulli-numbers-1.tav deleted file mode 100644 index b24fd56d97..0000000000 --- a/Task/Bernoulli-numbers/TAV/bernoulli-numbers-1.tav +++ /dev/null @@ -1,14 +0,0 @@ -bernoulli (n): - a =: new row - for m =: from 0 upto n - a[m] =: 1 / (m + 1) - for j =: from m downto 1 - a[j-1] =: j * (a[j-1] - a[j]) - return a[0] - -main (p):+ - max =: string p.1 as integer else 60 \ max number as parameter - for i =: from 2 upto max step 2 - b =: bernoulli i - \ to align the slash, print numerator and denominator separately - print format "B(%2;) = %50; / %;" i, b.num, b.den diff --git a/Task/Bernoulli-numbers/TAV/bernoulli-numbers-2.tav b/Task/Bernoulli-numbers/TAV/bernoulli-numbers-2.tav deleted file mode 100644 index 67e1634b4b..0000000000 --- a/Task/Bernoulli-numbers/TAV/bernoulli-numbers-2.tav +++ /dev/null @@ -1,22 +0,0 @@ -main (parms):+ - n =: string parms[1] as integer else 30 - print n bernoullis - -\ ierative version as used by Ada Lovelace -print (max) bernoullis: - b =: [] - b[1] =: 1/6 - print 'B[1]=' _ b[1] - ?# n =: from 2 upto max - k =: 2*n - 1 - n2 =: 2*n - a0 =: - (n2 - 1) / (n2 + 1) / 2 - a1 =: n2 / 2 - x =: a0 + (b[1] * a1) - aj =: a1 - ?# j =: from 3 upto k-1 step 2 - aj =* (n2 - (j-2)) / j - aj =* (n2 - (j-1)) / (j + 1) - x =+ b[j] * aj - b[k] =: -x - print format "B(%2;) = %50; / %;" k, b[k].num, b[k].den diff --git a/Task/Best-shuffle/Ada/best-shuffle.adb b/Task/Best-shuffle/Ada/best-shuffle.ada similarity index 100% rename from Task/Best-shuffle/Ada/best-shuffle.adb rename to Task/Best-shuffle/Ada/best-shuffle.ada diff --git a/Task/Best-shuffle/Crystal/best-shuffle.cr b/Task/Best-shuffle/Crystal/best-shuffle.crystal similarity index 100% rename from Task/Best-shuffle/Crystal/best-shuffle.cr rename to Task/Best-shuffle/Crystal/best-shuffle.crystal diff --git a/Task/Best-shuffle/Delphi/best-shuffle.pas b/Task/Best-shuffle/Delphi/best-shuffle.delphi similarity index 100% rename from Task/Best-shuffle/Delphi/best-shuffle.pas rename to Task/Best-shuffle/Delphi/best-shuffle.delphi diff --git a/Task/Best-shuffle/EasyLang/best-shuffle.easy b/Task/Best-shuffle/EasyLang/best-shuffle.easy index 4f6a5e338f..ef0e2ef7bf 100644 --- a/Task/Best-shuffle/EasyLang/best-shuffle.easy +++ b/Task/Best-shuffle/EasyLang/best-shuffle.easy @@ -1,4 +1,4 @@ -proc best_shuffle s$ &r$ &diff . +proc best_shuffle s$ . r$ diff . l = len s$ for c$ in strchars s$ s[] &= strcode c$ diff --git a/Task/Best-shuffle/Elena/best-shuffle.elena b/Task/Best-shuffle/Elena/best-shuffle.elena index 19abfc3e25..99e99cba05 100644 --- a/Task/Best-shuffle/Elena/best-shuffle.elena +++ b/Task/Best-shuffle/Elena/best-shuffle.elena @@ -35,14 +35,14 @@ extension op } } -public Program() +public program() { new string[]{"abracadabra", "seesaw", "grrrrrr", "pop", "up", "a"}.forEach::(s) { var shuffled_s := s.Shuffled; - Console.printLine("The best shuffle of ",s," is ",shuffled_s,"(",shuffled_s.score(s),")") + console.printLine("The best shuffle of ",s," is ",shuffled_s,"(",shuffled_s.score(s),")") }; - Console.readChar() + console.readChar() } diff --git a/Task/Best-shuffle/Factor/best-shuffle.factor b/Task/Best-shuffle/Factor/best-shuffle.factor deleted file mode 100644 index ac380801c1..0000000000 --- a/Task/Best-shuffle/Factor/best-shuffle.factor +++ /dev/null @@ -1,26 +0,0 @@ -USING: arrays combinators.short-circuit formatting kernel random -sequences sequences.extras ; - -:: best-shuffle ( str -- str' ) - str clone :> new-str - str length :> n - n >array randomize :> range1 - n >array randomize :> range2 - - range1 [| i | - range2 [| j | - { - [ i j = ] - [ i new-str nth j new-str nth = ] - [ i str nth j new-str nth = ] - [ i new-str nth j str nth = ] - } 0|| [ - i j new-str exchange - ] unless - ] each - ] each - - new-str ; - -: best-shuffle. ( str -- ) - dup best-shuffle 2dup [ = ] 2count "%s, %s, (%d)\n" printf ; diff --git a/Task/Best-shuffle/Fortran/best-shuffle.f b/Task/Best-shuffle/Fortran/best-shuffle.f deleted file mode 100644 index 8a02f8f4a4..0000000000 --- a/Task/Best-shuffle/Fortran/best-shuffle.f +++ /dev/null @@ -1,110 +0,0 @@ -! -! Best Shuffle -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.10 -! GNU Fortran (Ubuntu 15.2.0-4ubuntu4) 15.2.0 on Kubuntu 25.10 -! -! VSI Fortran on VMS does not compile this code because its current version -! cannot handle allocatable character strings -! -! U.B., October 2025 -!============================================================================== - -program bestShuffle - - implicit none - - integer, parameter :: MAXLEN = 100 ! Maximum length of strings to shuffle - character (len=MAXLEN), dimension(:),allocatable :: wordsToShuffle ! Test cases as in task description - character (len=MAXLEN) shuffledWord ! Result of a shuffle operation - integer :: ii, nWords, scr ! little helpers - integer:: longest ! Length of longest test string - character (len=50) :: vFormat ! Variable format for printing - - wordsToShuffle = & ! Preset test cases - [character(len=MAXLEN) :: 'abcdefghijk', & ! all letters different -> always score 0 - 'abracadabra', & ! The other test cases from task description - 'seesaw', & - 'elk', & - 'grrrrrrr', & - 'up', & - 'a'] ! This style makes both ifx AND gfortran happy. - nWords = size (wordsToShuffle) ! Number of test cases - longest = 0 - do ii=1, nWords ! Find length of longest test string - longest = max (longest, len_trim(wordsToShuffle(ii))) - end do - - ! Create a variable format depending on the length of the longest test string, - ! to print the original string, the shuffled string and the score in three columns - write (vFormat,'("(A", i0, ", x, A, T", i0,", i0)" )') longest, 2*longest+3 - - ! Initialize random number generator once for the entire run-time of the program and all test cases - call random_seed() - - do ii = 1, nWords - ! Using the Sattolo cycle guarantees that each and every letter will be moved from its original - ! position. However, duplicate letters within a word can lead to shuffled words that have a score >0 - ! If all letters aof the string are different, score will be 0 each time this program is run. - call sattolo_cycle (wordsToShuffle(ii), shuffledWord, scr) - print vFormat, trim(wordsToShuffle(ii)), trim(shuffledWord), scr - end do - - contains - - !============================================================= - ! shuffle using the Sattolo algorithm, and calculate the score - ! @win: word to shuffle, @wout: resultant string - ! @resultantscore: with the obvious meaning - !============================================================= - subroutine sattolo_cycle (win, wout, resultantscore) - - character (len=MAXLEN) , intent (in) :: win ! The word to shuffle - character (len=MAXLEN) , intent (out) :: wout ! The resultant word after shuffling - character :: tmp ! for swapping single letters - integer, intent(out) :: resultantscore ! the calculated score of the resultant string - - integer :: j, k, l ! Helper variables: indices into words, words' length - - wout = win - l = len_trim (wout) - do j = l, 1, -1 ! For all letters from end down to begin - k = randominInterval (1, j-1) ! Select random letters between 1 and j-1 - tmp = wout(j:j) ! then swap letter at pos j with letter at pos k - wout (j:j) = wout (k:k) - wout(k:k) = tmp - end do - - resultantscore = score (win,wout,l) ! Calculate score - end subroutine sattolo_cycle - - - ! =========================================================== - ! Generate random number between @lo and @hi (inclusive) - ! Assume Random Number Generator has been initialized before. - ! =========================================================== - function randominInterval (lo, hi) result (r) - integer, intent(in) :: lo, hi ! the interval - integer :: r ! resultant (pseudo-)random number - real :: rnd ! Fortran random number generator generates float values - - call random_number (rnd) - r = lo + FLOOR((hi+1-lo)*rnd) ! We want to choose one between [lo,hi] - - end function randominInterval - - !=============================================================================== - ! Calculate score: count positions that have the same letter as before shuffling - !=============================================================================== - function score (win, wout, l) result (scr) - character (len=MAXLEN) , intent (in) :: win, wout ! The two words to compare - integer , intent(in) :: l ! Length of the words to consider - integer :: scr ! Resultant score - integer :: jj ! Loop index - - scr = 0 - do jj=1,l - if (win(jj:jj) .eq. wout(jj:jj) ) scr = scr + 1 - enddo - end function score - -end program bestShuffle diff --git a/Task/Best-shuffle/Julia/best-shuffle.jl b/Task/Best-shuffle/Julia/best-shuffle.julia similarity index 100% rename from Task/Best-shuffle/Julia/best-shuffle.jl rename to Task/Best-shuffle/Julia/best-shuffle.julia diff --git a/Task/Best-shuffle/Kotlin/best-shuffle.kts b/Task/Best-shuffle/Kotlin/best-shuffle.kotlin similarity index 100% rename from Task/Best-shuffle/Kotlin/best-shuffle.kts rename to Task/Best-shuffle/Kotlin/best-shuffle.kotlin diff --git a/Task/Best-shuffle/OCaml/best-shuffle.ml b/Task/Best-shuffle/OCaml/best-shuffle.ocaml similarity index 100% rename from Task/Best-shuffle/OCaml/best-shuffle.ml rename to Task/Best-shuffle/OCaml/best-shuffle.ocaml diff --git a/Task/Best-shuffle/Pluto/best-shuffle.pluto b/Task/Best-shuffle/Pluto/best-shuffle.pluto deleted file mode 100644 index 1f4a50c9bd..0000000000 --- a/Task/Best-shuffle/Pluto/best-shuffle.pluto +++ /dev/null @@ -1,17 +0,0 @@ -require "table2" -local fmt = require "fmt" - -local tests = {"abracadabra", "seesaw", "elk", "grrrrrr", "up", "a"} -for tests as s do - local t = s:split(""):shuffle() - for i = 1, #t do - for j = 1, #t do - if i != j and t[i] != s[j] and t[j] != s[i] then - t[i], t[j] = t[j], t[i] - break - end - end - end - local c = range(1, #s):count(|i| -> s[i] == t[i]) - fmt.print("%s, %s, (%d)\n", s, t:concat(""), c) -end diff --git a/Task/Best-shuffle/PowerShell/best-shuffle-1.ps1 b/Task/Best-shuffle/PowerShell/best-shuffle-1.psh similarity index 100% rename from Task/Best-shuffle/PowerShell/best-shuffle-1.ps1 rename to Task/Best-shuffle/PowerShell/best-shuffle-1.psh diff --git a/Task/Best-shuffle/PowerShell/best-shuffle-2.ps1 b/Task/Best-shuffle/PowerShell/best-shuffle-2.psh similarity index 100% rename from Task/Best-shuffle/PowerShell/best-shuffle-2.ps1 rename to Task/Best-shuffle/PowerShell/best-shuffle-2.psh diff --git a/Task/Best-shuffle/Rust/best-shuffle.rs b/Task/Best-shuffle/Rust/best-shuffle.rust similarity index 100% rename from Task/Best-shuffle/Rust/best-shuffle.rs rename to Task/Best-shuffle/Rust/best-shuffle.rust diff --git a/Task/Best-shuffle/SETL/best-shuffle.setl b/Task/Best-shuffle/SETL/best-shuffle.setl deleted file mode 100644 index 0071908659..0000000000 --- a/Task/Best-shuffle/SETL/best-shuffle.setl +++ /dev/null @@ -1,20 +0,0 @@ -program find_best_shuffle; - tests := ["tree", "abracadabra", "seesaw", "elk", "grrrrrr", "up", "a"]; - loop for test in tests do - print(test, '->', sh := best_shuffle(test), same(test, sh)); - end loop; - - proc best_shuffle(s); - r := s; - loop for i in [1..#s] do - loop for j in [1..#s] | i /= j and s(i) /= r(j) and s(j) /= r(i) do - [r(i), r(j)] := [r(j), r(i)]; - end loop; - end loop; - return r; - end proc; - - proc same(r, s); - return 0 +/[1 : i in [1..#s] | r(i) = s(i)]; - end proc; -end program; diff --git a/Task/Best-shuffle/Scheme/best-shuffle.scm b/Task/Best-shuffle/Scheme/best-shuffle.ss similarity index 100% rename from Task/Best-shuffle/Scheme/best-shuffle.scm rename to Task/Best-shuffle/Scheme/best-shuffle.ss diff --git a/Task/Best-shuffle/V-(Vlang)/best-shuffle.v b/Task/Best-shuffle/V-(Vlang)/best-shuffle.v deleted file mode 100644 index 082b173897..0000000000 --- a/Task/Best-shuffle/V-(Vlang)/best-shuffle.v +++ /dev/null @@ -1,30 +0,0 @@ -fn best_shuffle(s1 string) string { - mut s2 := s1.clone() - len_s2 := s2.len - mut s2_bytes := s2.bytes() - s1_bytes := s1.bytes() - for i in 0 .. len_s2 { - for j in 0 .. len_s2 { - if i != j && s2_bytes[i] != s1_bytes[j] && s2_bytes[j] != s1_bytes[i] { - i1 := if j < i { j } else { i } - j1 := if j < i { i } else { j } - // swap characters at i1 and j1 in s2_bytes - s2_bytes[i1], s2_bytes[j1] = s2_bytes[j1], s2_bytes[i1] - } - } - } - return s2_bytes.bytestr() -} - -fn main() { - lista := ["abracadabra", "seesaw", "pop", "grrrrrr", "up", "a"] - mut puntos := 0 - for palabra in lista { - bs := best_shuffle(palabra) - puntos = 0 - for i := 0; i < palabra.len; i++ { - if palabra[i] == bs[i] { puntos++ } - } - println("$palabra ==> $bs (puntuación: $puntos)") - } -} diff --git a/Task/Best-shuffle/VBScript/best-shuffle.vbs b/Task/Best-shuffle/VBScript/best-shuffle.vb similarity index 100% rename from Task/Best-shuffle/VBScript/best-shuffle.vbs rename to Task/Best-shuffle/VBScript/best-shuffle.vb diff --git a/Task/Best-shuffle/YAMLScript/best-shuffle.ys b/Task/Best-shuffle/YAMLScript/best-shuffle.ys deleted file mode 100644 index 40b2a8e761..0000000000 --- a/Task/Best-shuffle/YAMLScript/best-shuffle.ys +++ /dev/null @@ -1,45 +0,0 @@ -!YS-v0 - -defn main(*inputs): - each input inputs: !:say - apply format '%s, %s, (%d)': - best-shuffle(input) - -defn best-shuffle(s): - ref =: s:group-indices:cycles - prm =: concat.apply(map(partial(rotate 1) ref)) - ref =: concat(ref*) - - map(vector ref prm): - .sort-by(first _) - .map(second) - .map(partial(get s)) - .str(*) - .call(\([s _ s.score(_)]) _) - -defn score(before after): - map(== before after) - .filter(true?).# - -defn group-indices(s): - map-indexed(vector s) - .merge-vecs({}):vals - .sort-by(count _):reverse - -defn cycles(coll): - n =: coll.0.# - cycle =: range(n):cycle - coll =: concat(coll*) - map(vector coll cycle): - .merge-vecs([]) - -defn rotate(n coll): - c =: coll.# - n =: (c + n) % c - concat coll.drop(n): coll.take(n) - -defn merge-vecs(vecs init): - reduce _ init vecs: - fn(counts [index x]): - assoc counts x: - counts.$x.or([]).conj(index) diff --git a/Task/Bifid-cipher/00-TASK.txt b/Task/Bifid-cipher/00-TASK.txt index 178c9d6429..867d98b92f 100644 --- a/Task/Bifid-cipher/00-TASK.txt +++ b/Task/Bifid-cipher/00-TASK.txt @@ -58,3 +58,4 @@ Suggest a way in which the cipher could be modified so that ALL 26 letters can b ;Related task [[Playfair_cipher|Playfair cipher]]

    + diff --git a/Task/Bifid-cipher/AArch64-Assembly/bifid-cipher.aarch64 b/Task/Bifid-cipher/AArch64-Assembly/bifid-cipher.aarch64 deleted file mode 100644 index 37aa0bd8b0..0000000000 --- a/Task/Bifid-cipher/AArch64-Assembly/bifid-cipher.aarch64 +++ /dev/null @@ -1,394 +0,0 @@ -/* ARM assembly AARCH64 Raspberry PI 3B */ -/* program bifid64.s */ - -/*******************************************/ -/* Constantes */ -/*******************************************/ -/* for this file see task include a file in language AArch64 assembly*/ -.include "../includeConstantesARM64.inc" - -.equ MESSSIZE, 2000 -.equ BUFFERSIZE, 2000 -/*******************************************/ -/* Macros */ -/*******************************************/ -//.include "../../ficmacros64.inc" // for developer debugging - - -/*******************************************/ -/* Initialized data */ -/*******************************************/ -.data -szMessDebutPgm: .asciz "Program 64 bits start. \n" -szCarriageReturn: .asciz "\n" -szMessFinOK: .asciz "Program normal end. \n" -szMessError: .asciz "\nError Buffer too small!!!\n" -szMessString: .asciz "String :\n" -szMessEncrip: .asciz "\nEncrypted :\n" -szMessDecrip: .asciz "\nDecrypted :\n" -//szString1: .asciz "ABCDEFGHIJKLMNOPQRSTUVWXYZ!.?abcdefghijklmnopqrstuvwxyz" -//szString1: .asciz "attackatdawn" -szString1: .asciz "ATTACKATDAWN" -//szString1: .asciz "ABCD" -szString2: .asciz "FLEEATONCE" -szString3: .asciz "The invasion will start on the first of January" - -szPolybe1: .ascii "ABCDE" - .ascii "FGHIK" - .ascii "LMNOP" - .ascii "QRSTU" - .asciz "VWXYZ" - -szPolybe2: .ascii "BGWKZ" - .ascii "QPNDS" - .ascii "IOAXE" - .ascii "FCLUM" - .asciz "THYVR" - -/*******************************************/ -/* UnInitialized data */ -/*******************************************/ -.bss -.align 4 -tabiposX: .skip 8 * MESSSIZE -tabiposY: .skip 8 * MESSSIZE -sBuffex1: .skip BUFFERSIZE -sBuffex2: .skip BUFFERSIZE -/*******************************************/ -/* code section */ -/*******************************************/ -.text -.global main -main: - ldr x0,qAdrszMessDebutPgm - bl affichageMess - ldr x0,qAdrszMessString // display message - bl affichageMess - ldr x0,qAdrszString1 // display string - bl affichageMess - ldr x0,qAdrszString1 // string address - ldr x1,qAdrszPolybe1 // Polybe key - ldr x2,qAdrsBuffex1 // encrypted buffer result - bl encrypt - cmp x0,#0 - ble 99f - ldr x0,qAdrszMessEncrip - bl affichageMess - ldr x0,qAdrsBuffex1 // display encrypted buffer - bl affichageMess - - - ldr x0,qAdrsBuffex1 // encrypted buffer - ldr x1,qAdrszPolybe1 // Polybe key - ldr x2,qAdrsBuffex2 // decrypted buffer - bl decrypt - ldr x0,qAdrszMessDecrip - bl affichageMess - ldr x0,qAdrsBuffex2 // display decrypted buffer - bl affichageMess - ldr x0,qAdrszCarriageReturn - bl affichageMess - - ldr x0,qAdrszMessString // display message - bl affichageMess - ldr x0,qAdrszString2 // display string - bl affichageMess - ldr x0,qAdrszString2 // string address - ldr x1,qAdrszPolybe2 // Polybe key - ldr x2,qAdrsBuffex1 // encrypted buffer result - bl encrypt - cmp x0,#0 - ble 99f - ldr x0,qAdrszMessEncrip - bl affichageMess - ldr x0,qAdrsBuffex1 // display encrypted buffer - bl affichageMess - - - ldr x0,qAdrsBuffex1 // encrypted buffer - ldr x1,qAdrszPolybe2 // Polybe key - ldr x2,qAdrsBuffex2 // decrypted buffer - bl decrypt - ldr x0,qAdrszMessDecrip - bl affichageMess - ldr x0,qAdrsBuffex2 // display decrypted buffer - bl affichageMess - ldr x0,qAdrszCarriageReturn - bl affichageMess - - ldr x0,qAdrszMessString // display message - bl affichageMess - ldr x0,qAdrszString1 // display string - bl affichageMess - ldr x0,qAdrszString1 // string address - ldr x1,qAdrszPolybe2 // Polybe key - ldr x2,qAdrsBuffex1 // encrypted buffer result - bl encrypt - cmp x0,#0 - ble 99f - ldr x0,qAdrszMessEncrip - bl affichageMess - ldr x0,qAdrsBuffex1 // display encrypted buffer - bl affichageMess - - - ldr x0,qAdrsBuffex1 // encrypted buffer - ldr x1,qAdrszPolybe2 // Polybe key - ldr x2,qAdrsBuffex2 // decrypted buffer - bl decrypt - ldr x0,qAdrszMessDecrip - bl affichageMess - ldr x0,qAdrsBuffex2 // display decrypted buffer - bl affichageMess - ldr x0,qAdrszCarriageReturn - bl affichageMess - - ldr x0,qAdrszMessString // display message - bl affichageMess - ldr x0,qAdrszString3 // display string - bl affichageMess - ldr x0,qAdrszString3 // string address - ldr x1,qAdrszPolybe1 // Polybe key - ldr x2,qAdrsBuffex1 // encrypted buffer result - bl encrypt - cmp x0,#0 - ble 99f - ldr x0,qAdrszMessEncrip - bl affichageMess - ldr x0,qAdrsBuffex1 // display encrypted buffer - bl affichageMess - - - ldr x0,qAdrsBuffex1 // encrypted buffer - ldr x1,qAdrszPolybe1 // Polybe key - ldr x2,qAdrsBuffex2 // decrypted buffer - bl decrypt - ldr x0,qAdrszMessDecrip - bl affichageMess - ldr x0,qAdrsBuffex2 // display decrypted buffer - bl affichageMess - ldr x0,qAdrszCarriageReturn - bl affichageMess - - ldr x0,qAdrszMessFinOK - bl affichageMess - b 100f -99: - ldr x0,qAdrszMessError // error - bl affichageMess - mov x0, #1 -100: // standard end of the program - mov x0, #0 // return code - mov x8,EXIT - svc 0 // perform system call -qAdrszMessString: .quad szMessString -qAdrszMessDecrip: .quad szMessDecrip -qAdrszMessEncrip: .quad szMessEncrip -qAdrszString1: .quad szString1 -qAdrszPolybe1: .quad szPolybe1 -qAdrszString2: .quad szString2 -qAdrszString3: .quad szString3 -qAdrszPolybe2: .quad szPolybe2 -qAdrsBuffex1: .quad sBuffex1 -qAdrsBuffex2: .quad sBuffex2 -qAdrszMessDebutPgm: .quad szMessDebutPgm -qAdrszMessFinOK: .quad szMessFinOK -qAdrszCarriageReturn: .quad szCarriageReturn -qAdrszMessError: .quad szMessError -/******************************************************************/ -/* encrypt strings */ -/******************************************************************/ -/* r0 contains the address of the string1 */ -/* r1 contains Polybe area address -/* r2 contains the address of the encrypted string */ -/* r0 return buffer lenght */ -encrypt: - stp x1,lr,[sp,-16]! // save registers - stp x2,x3,[sp,-16]! // - stp x4,x5,[sp,-16]! // - stp x6,x7,[sp,-16]! // - stp x8,x9,[sp,-16]! // - stp x10,x11,[sp,-16]! // - mov x3,#0 // counter byte string 1 - mov x5,#0 // counter byte buffer -1: - ldrb w7,[x0,x3] // load byte string 1 - cmp x7,#0 // zero final ? - beq 4f - cmp x7,#65 // < A ? - cinc x3,x3,lt - blt 1b - cmp x7,#90 // > Z - ble 2f - - cmp x7,#97 // < a ? - cinc x3,x3,lt - blt 1b - cmp x7,#122 //> z - cinc x3,x3,gt - bgt 1b - sub x7,x7,#32 // convert minuscul to majuscule -2: - mov x11,'I' - cmp x7,#'J' // change J to I - csel x7,x11,x7,eq - ldr x11,qAdrtabiposX - ldr x12,qAdrtabiposY - mov x6,#0 - mov x9,#5 -3: // loop to search char in polybe square - ldrb w8,[x1,x6] // load byte polybe - cmp x8,x7 // equal ? - cinc x6,x6,ne - bne 3b - udiv x10,x6,x9 // compute coordonnés - msub x8,x10,x9,x6 - strb w10,[x11,x5] // save X position - strb w8,[x12,x5] // save Y position - add x5,x5,#1 // increment indice - add x3,x3,#1 - b 1b // and loop - -4: - mov x6,#0 - mov x8,x5 - mov x5,#0 - mov x3,#5 -5: // convert position line 1 in char - ldrb w9,[x11,x6] - add x6,x6,#1 - cmp x6,x8 // first line end ? - csel x6,xzr,x6,ge - bge 7f // jmp for second line - - ldrb w7,[x11,x6] // compute rank with position X and Y - mul x9,x3,x9 - add x9,x9,x7 - ldrb w9,[x1,x9] // load polybe char - strb w9,[x2,x5] - add x5,x5,#1 - - add x6,x6,#1 - cmp x6,x8 - blt 5b - - mov x6,#0 -6: // convert position line 2 in char - ldrb w9,[x12,x6] - add x6,x6,#1 -7: - ldrb w7,[x12,x6] // compute rank with position X and Y - mul x9,x3,x9 - add x9,x9,x7 - ldrb w9,[x1,x9] // load polybe char - strb w9,[x2,x5] - add x5,x5,#1 - add x6,x6,#1 - cmp x6,x8 - blt 6b - - mov x9,#0 // zero final - strb w9,[x2,x5] - mov x0,x5 -100: - ldp x10,x11,[sp],16 // restau registers - ldp x8,x9,[sp],16 // - ldp x6,x7,[sp],16 // - ldp x4,x5,[sp],16 // - ldp x2,x3,[sp],16 // - ldp x1,lr,[sp],16 // - ret -qAdrtabiposX: .quad tabiposX -qAdrtabiposY: .quad tabiposY -/******************************************************************/ -/* decrypt strings */ -/******************************************************************/ -/* r0 contains the address of the encrypted string1 */ -/* r1 contains Polybe area address -/* r2 contains the address of the decrypted string */ -/* r0 return buffer lenght */ -decrypt: - stp x1,lr,[sp,-16]! // save registers - stp x2,x3,[sp,-16]! // - stp x4,x5,[sp,-16]! // - stp x6,x7,[sp,-16]! // - stp x8,x9,[sp,-16]! // - stp x10,x11,[sp,-16]! // - mov x3,#0 // counter byte string 1 - mov x5,#0 // counter byte result buffer -1: - ldrb w7,[x0,x3] // load byte string 1 - cmp x7,#0 // zero final ? - csel x0,x5,x0,eq - beq 4f - - cmp x7,#65 // < A ? - cinc x3,x3,lt - blt 1b - cmp x7,#90 // > Z - ble 2f - - cmp x7,#97 // < a ? - cinc x3,x3,lt - blt 1b - cmp x7,#122 //> z - cinc x3,x3,gt - bgt 1b - sub x7,x7,#32 // convert minuscul to majuscule -2: - ldr x11,qAdrtabiposX - mov x6,#0 - mov x9,#5 -3: // loop to search char in polybe square - ldrb w8,[x1,x6] // load byte polybe - cmp x8,x7 - cinc x6,x6,ne - bne 3b - - udiv x10,x6,x9 - msub x8,x10,x9,x6 - strb w10,[x11,x5] - add x5,x5,#1 - strb w8,[x11,x5] - add x5,x5,#1 - - add x3,x3,#1 - b 1b - -4: - mov x6,#0 // start indice first line - lsr x8,x5,#1 - mov x10,x8 // start indice second line - mov x5,#0 - mov x3,#5 - -5: - ldrb w9,[x11,x6] // load position - ldrb w7,[x11,x10] - mul x9,x3,x9 // compute rank - add x9,x9,x7 - ldrb w9,[x1,x9] // load polybe byte - strb w9,[x2,x5] // and store to result - add x5,x5,#1 - add x10,x10,#1 - add x6,x6,#1 - cmp x6,x8 // end ? - blt 5b - - mov x9,#0 // 0 final - strb w9,[x2,x5] - mov x0,x5 -100: - ldp x10,x11,[sp],16 // restaur registers - ldp x8,x9,[sp],16 // - ldp x6,x7,[sp],16 // - ldp x4,x5,[sp],16 // - ldp x2,x3,[sp],16 // - ldp x1,lr,[sp],16 // - ret - -/***************************************************/ -/* ROUTINES INCLUDE */ -/***************************************************/ -/* for this file see task include a file in language AArch64 assembly*/ -.include "../includeARM64.inc" diff --git a/Task/Bifid-cipher/ALGOL-68/bifid-cipher.alg b/Task/Bifid-cipher/ALGOL-68/bifid-cipher.alg deleted file mode 100644 index 67fdc9f82f..0000000000 --- a/Task/Bifid-cipher/ALGOL-68/bifid-cipher.alg +++ /dev/null @@ -1,141 +0,0 @@ -BEGIN # Bifid cipher # - - # mode to hold the details of a Bifid cipher # - MODE BIFID = STRUCT( STRING key # the Polybius square, linearised # - , STRING pre from # pre-translation, "from" string # - , STRING pre to # pre-tramslatiion "to" string # - ); - - # string utilities # - - # returns the length of s # - OP LENGTH = ( STRING s )INT: ( UPB s - LWB s ) + 1; - # returns the index of c in s, or LWB s - 1 if it is not present # - PRIO INDEXOF = 1; - OP INDEXOF = ( STRING s, CHAR c )INT: - BEGIN - INT index := LWB s - 1; - VOID( char in string( c, index, s ) ); # discard the result # - index - END # INDEXOF # ; - # returns text with the characters in from chars replaced with the # - # corresponding characters in to chars # - PROC translate = ( STRING text, from chars, to chars )STRING: - IF LWB from chars /= LWB to chars OR UPB from chars /= UPB to chars - THEN """from"" and ""to"" have different bounds (translate)" - ELIF from chars = "" - THEN text - ELSE # the from and to strings have the same bounds # - STRING result := text; - FOR r pos FROM LWB result TO UPB result DO - INT t pos = from chars INDEXOF result[ r pos ]; - IF t pos >= LWB from chars THEN result[ r pos ] := to chars[ t pos ] FI - OD; - result - FI # translate # ; - # end string utilities # - - # returns text encrypted according to cipher # - PRIO ENCRYPT = 9; - OP ENCRYPT = ( STRING text, BIFID cipher )STRING: - IF STRING key = ( key OF cipher )[ AT 1 ]; - INT key length = LENGTH key; - INT sq width = ENTIER sqrt( key length ); - sq width * sq width /= key length - THEN "**** Bifid key is not a square" - ELSE # the key is a square # - STRING msg1 = translate( text, pre from OF cipher, pre to OF cipher )[ AT 1 ]; - STRING msg := ""; - FOR m pos FROM LWB msg1 TO UPB msg1 DO - IF msg1[ m pos ] /= " " THEN msg +:= msg1[ m pos ] FI - OD; - INT m max = LENGTH msg; - [ 1 : 2 * m max ]INT coordinates; - FOR m pos TO m max DO - INT c index := key INDEXOF msg[ m pos ]; - IF c index >= LWB key THEN c index -:= 1 FI; - coordinates[ m pos ] := c index OVER sq width; - coordinates[ m pos + m max ] := c index MOD sq width - OD; - STRING result := ""; - FOR c pos BY 2 TO UPB coordinates DO - result +:= key[ ( coordinates[ c pos ] * sq width ) - + coordinates[ c pos + 1 ] - + 1 - ] - OD; - result - FI # ENCRYPT # ; - - # returns text decrypted according to cipher # - PRIO DECRYPT = 9; - OP DECRYPT = ( STRING text, BIFID cipher )STRING: - IF STRING key = ( key OF cipher )[ AT 1 ]; - INT key length = LENGTH key; - INT sq width = ENTIER sqrt( key length ); - sq width * sq width /= key length - THEN "**** Bifid key is not a square" - ELSE # the key is a square # - STRING msg = text[ AT 1 ]; - INT m max = LENGTH msg; - [ 1 : 2 * m max ]INT coordinates; - INT c pos := 0; - FOR m pos TO m max DO - INT c index := key INDEXOF msg[ m pos ]; - IF c index >= LWB key THEN c index -:= 1 FI; - coordinates[ c pos +:= 1 ] := c index OVER sq width; - coordinates[ c pos +:= 1 ] := c index MOD sq width - OD; - STRING result := ""; - FOR i TO m max DO - result +:= key[ ( coordinates[ i ] * sq width ) - + coordinates[ i + m max ] - + 1 - ] - OD; - result - FI # DECRYPT # ; - - # tests the ENCRYPT and DECRYPT operators # - PROC test bifid = ( BIFID cipher, STRING text )VOID: - BEGIN - STRING code = text ENCRYPT cipher; - print( ( text, " -> ", code, newline ) ); - print( ( code, " -> ", code DECRYPT cipher, newline ) ) - END # text bifid # ; - - # Bifid ciphers for tests # - - BIFID bifid 5 abc = ( "ABCDEFGHIKLMNOPQRSTUVWXYZ" - , "Jabcdefghijklmnopqrstuvwxyz" - , "IABCDEFGHIIKLMNOPQRSTUVWXYZ" - ); - BIFID bifid 5 bgw = ( "BGWKZQPNDSIOAXEFCLUMTHYVR" - , "Jabcdefghijklmnopqrstuvwxyz" - , "IABCDEFGHIIKLMNOPQRSTUVWXYZ" - ); - BIFID bifid 6 abc = ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" - , "abcdefghijklmnopqrstuvwxyz" - , "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - ); - BIFID bifid 8 abc = ( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\/" - , " " - , "/" - ); - - # basic task - using 5x5 Polybius squares # - test bifid( bifid 5 abc, "ATTACKATDAWN" ); - print( ( newline ) ); - test bifid( bifid 5 bgw, "FLEEATONCE" ); - test bifid( bifid 5 bgw, "ATTACKATDAWN" ); - test bifid( bifid 5 bgw, "The invasion will begin on the first of January" ); - print( ( newline ) ); - - # bonus - using a 6x6 square # - test bifid( bifid 6 abc, "The invasion will begin on the first of January" ); - print( ( newline ) ); - - # bonus - using an 8x8 square # - test bifid( bifid 8 abc, "The invasion will begin on the first of January" ) - -END diff --git a/Task/Bifid-cipher/ARM-Assembly/bifid-cipher.arm b/Task/Bifid-cipher/ARM-Assembly/bifid-cipher.arm deleted file mode 100644 index f2ce9e6951..0000000000 --- a/Task/Bifid-cipher/ARM-Assembly/bifid-cipher.arm +++ /dev/null @@ -1,376 +0,0 @@ -/* ARM assembly Raspberry PI */ -/* program bifid.s */ -/* REMARK 1 : this program use routines in a include file - see task Include a file language arm assembly - for the routine affichageMess conversion10 - see at end of this program the instruction include */ - -/*******************************************/ -/* Constantes */ -/*******************************************/ -.include "../constantes.inc" - -.equ MESSSIZE, 2000 -.equ BUFFERSIZE, 2000 -/*******************************************/ -/* Macros */ -/*******************************************/ -//.include "../../ficmacros32.inc" @ for developer debugging - - -/*******************************************/ -/* Initialized data */ -/*******************************************/ -.data -szMessDebutPgm: .asciz "Program 32 bits start. \n" -szCarriageReturn: .asciz "\n" -szMessFinOK: .asciz "Program normal end. \n" -szMessError: .asciz "\nError Buffer too small!!!\n" -szMessString: .asciz "String :\n" -szMessEncrip: .asciz "\nEncrypted :\n" -szMessDecrip: .asciz "\nDecrypted :\n" -//szString1: .asciz "ABCDEFGHIJKLMNOPQRSTUVWXYZ!.?abcdefghijklmnopqrstuvwxyz" -//szString1: .asciz "attackatdawn" -szString1: .asciz "ATTACKATDAWN" -//szString1: .asciz "ABCD" -szString2: .asciz "FLEEATONCE" -szString3: .asciz "L'invasion commencera le premier janvier" - -szPolybe1: .ascii "ABCDE" - .ascii "FGHIK" - .ascii "LMNOP" - .ascii "QRSTU" - .asciz "VWXYZ" - -szPolybe2: .ascii "BGWKZ" - .ascii "QPNDS" - .ascii "IOAXE" - .ascii "FCLUM" - .asciz "THYVR" - -/*******************************************/ -/* UnInitialized data */ -/*******************************************/ -.bss -.align 4 -tabiposX: .skip 4 * MESSSIZE -tabiposY: .skip 4 * MESSSIZE -sBuffer1: .skip BUFFERSIZE -sBuffer2: .skip BUFFERSIZE -/*******************************************/ -/* code section */ -/*******************************************/ -.text -.global main -main: - ldr r0,iAdrszMessDebutPgm - bl affichageMess - ldr r0,iAdrszMessString @ display message - bl affichageMess - ldr r0,iAdrszString1 @ display string - bl affichageMess - ldr r0,iAdrszString1 @ string address - ldr r1,iAdrszPolybe1 @ Polybe key - ldr r2,iAdrsBuffer1 @ encrypted buffer result - bl encrypt - cmp r0,#0 - ble 99f - ldr r0,iAdrszMessEncrip - bl affichageMess - ldr r0,iAdrsBuffer1 @ display encrypted buffer - bl affichageMess - - - ldr r0,iAdrsBuffer1 @ encrypted buffer - ldr r1,iAdrszPolybe1 @ Polybe key - ldr r2,iAdrsBuffer2 @ decrypted buffer - bl decrypt - ldr r0,iAdrszMessDecrip - bl affichageMess - ldr r0,iAdrsBuffer2 @ display decrypted buffer - bl affichageMess - ldr r0,iAdrszCarriageReturn - bl affichageMess - - ldr r0,iAdrszMessString @ display message - bl affichageMess - ldr r0,iAdrszString2 @ display string - bl affichageMess - ldr r0,iAdrszString2 @ string address - ldr r1,iAdrszPolybe2 @ Polybe key - ldr r2,iAdrsBuffer1 @ encrypted buffer result - bl encrypt - cmp r0,#0 - ble 99f - ldr r0,iAdrszMessEncrip - bl affichageMess - ldr r0,iAdrsBuffer1 @ display encrypted buffer - bl affichageMess - - - ldr r0,iAdrsBuffer1 @ encrypted buffer - ldr r1,iAdrszPolybe2 @ Polybe key - ldr r2,iAdrsBuffer2 @ decrypted buffer - bl decrypt - ldr r0,iAdrszMessDecrip - bl affichageMess - ldr r0,iAdrsBuffer2 @ display decrypted buffer - bl affichageMess - ldr r0,iAdrszCarriageReturn - bl affichageMess - - ldr r0,iAdrszMessString @ display message - bl affichageMess - ldr r0,iAdrszString1 @ display string - bl affichageMess - ldr r0,iAdrszString1 @ string address - ldr r1,iAdrszPolybe2 @ Polybe key - ldr r2,iAdrsBuffer1 @ encrypted buffer result - bl encrypt - cmp r0,#0 - ble 99f - ldr r0,iAdrszMessEncrip - bl affichageMess - ldr r0,iAdrsBuffer1 @ display encrypted buffer - bl affichageMess - - - ldr r0,iAdrsBuffer1 @ encrypted buffer - ldr r1,iAdrszPolybe2 @ Polybe key - ldr r2,iAdrsBuffer2 @ decrypted buffer - bl decrypt - ldr r0,iAdrszMessDecrip - bl affichageMess - ldr r0,iAdrsBuffer2 @ display decrypted buffer - bl affichageMess - ldr r0,iAdrszCarriageReturn - bl affichageMess - - ldr r0,iAdrszMessString @ display message - bl affichageMess - ldr r0,iAdrszString3 @ display string - bl affichageMess - ldr r0,iAdrszString3 @ string address - ldr r1,iAdrszPolybe1 @ Polybe key - ldr r2,iAdrsBuffer1 @ encrypted buffer result - bl encrypt - cmp r0,#0 - ble 99f - ldr r0,iAdrszMessEncrip - bl affichageMess - ldr r0,iAdrsBuffer1 @ display encrypted buffer - bl affichageMess - - - ldr r0,iAdrsBuffer1 @ encrypted buffer - ldr r1,iAdrszPolybe1 @ Polybe key - ldr r2,iAdrsBuffer2 @ decrypted buffer - bl decrypt - ldr r0,iAdrszMessDecrip - bl affichageMess - ldr r0,iAdrsBuffer2 @ display decrypted buffer - bl affichageMess - ldr r0,iAdrszCarriageReturn - bl affichageMess - - ldr r0,iAdrszMessFinOK - bl affichageMess - b 100f -99: - ldr r0,iAdrszMessError @ error - bl affichageMess - mov r0, #1 -100: @ standard end of the program - mov r0, #0 @ return code - mov r7, #EXIT @ request to exit program - svc 0 @ perform system call -iAdrszMessString: .int szMessString -iAdrszMessDecrip: .int szMessDecrip -iAdrszMessEncrip: .int szMessEncrip -iAdrszString1: .int szString1 -iAdrszPolybe1: .int szPolybe1 -iAdrszString2: .int szString2 -iAdrszString3: .int szString3 -iAdrszPolybe2: .int szPolybe2 -iAdrsBuffer1: .int sBuffer1 -iAdrsBuffer2: .int sBuffer2 -iAdrszMessDebutPgm: .int szMessDebutPgm -iAdrszMessFinOK: .int szMessFinOK -iAdrszCarriageReturn: .int szCarriageReturn -iAdrszMessError: .int szMessError -/******************************************************************/ -/* encrypt strings */ -/******************************************************************/ -/* r0 contains the address of the string1 */ -/* r1 contains Polybe area address -/* r2 contains the address of the encrypted string */ -/* r0 return buffer lenght */ -encrypt: - push {r3-r12,lr} @ save registers - mov r3,#0 @ counter byte string 1 - mov r5,#0 @ counter byte buffer - -1: - ldrb r7,[r0,r3] @ load byte string 1 - cmp r7,#0 @ zero final ? - beq 4f - cmp r7,#65 @ < A ? - addlt r3,#1 - blt 1b - cmp r7,#90 @ > Z - ble 2f - - cmp r7,#97 @ < a ? - addlt r3,#1 - blt 1b - cmp r7,#122 @> z - addgt r3,#1 - bgt 1b - sub r7,#32 @ convert minuscul to majuscule -2: - cmp r7,#'J' @ change J to I - moveq r7,#'I' - ldr r11,iAdrtabiposX - ldr r12,iAdrtabiposY - mov r6,#0 - mov r9,#5 -3: @ loop to search char in polybe square - ldrb r8,[r1,r6] @ load byte polybe - cmp r8,r7 @ equal ? - addne r6,#1 - bne 3b - udiv r10,r6,r9 @ compute coordonnés - mls r8,r10,r9,r6 - - strb r10,[r11,r5] @ save X position - strb r8,[r12,r5] @ save Y position - add r5,r5,#1 @ increment indice - add r3,r3,#1 - b 1b @ and loop - -4: - mov r6,#0 - mov r8,r5 - mov r5,#0 - mov r3,#5 -5: @ convert position line 1 in char - ldrb r9,[r11,r6] - add r6,r6,#1 - cmp r6,r8 @ first line end ? - movge r6,#0 - bge 7f @ jmp for second line - - ldrb r7,[r11,r6] @ compute rank with position X and Y - mul r9,r3,r9 - add r9,r9,r7 - ldrb r9,[r1,r9] @ load polybe char - strb r9,[r2,r5] - add r5,r5,#1 - - add r6,r6,#1 - cmp r6,r8 - blt 5b - - mov r6,#0 -6: @ convert position line 2 in char - ldrb r9,[r12,r6] - add r6,r6,#1 -7: - ldrb r7,[r12,r6] @ compute rank with position X and Y - mul r9,r3,r9 - add r9,r9,r7 - ldrb r9,[r1,r9] @ load polybe char - strb r9,[r2,r5] - add r5,r5,#1 - add r6,r6,#1 - cmp r6,r8 - blt 6b - - mov r9,#0 @ zero final - strb r9,[r2,r5] - mov r0,r5 -100: - pop {r3-r12,pc} @ restaur registers -iAdrtabiposX: .int tabiposX -iAdrtabiposY: .int tabiposY -/******************************************************************/ -/* decrypt strings */ -/******************************************************************/ -/* r0 contains the address of the encrypted string1 */ -/* r1 contains Polybe area address -/* r2 contains the address of the decrypted string */ -/* r0 return buffer lenght */ -decrypt: - push {r3-r11,lr} @ save registers - mov r3,#0 @ counter byte string 1 - mov r5,#0 @ counter byte result buffer -1: - ldrb r7,[r0,r3] @ load byte string 1 - cmp r7,#0 @ zero final ? - moveq r0,r5 - beq 4f - - cmp r7,#65 @ < A ? - addlt r3,#1 - blt 1b - cmp r7,#90 @ > Z - ble 2f - - cmp r7,#97 @ < a ? - addlt r3,#1 - blt 1b - cmp r7,#122 @> z - addgt r3,#1 - bgt 1b - sub r7,#32 @ convert minuscul to majuscule -2: - ldr r11,iAdrtabiposX - mov r6,#0 - mov r9,#5 -3: @ loop to search char in polybe square - ldrb r8,[r1,r6] @ load byte polybe - cmp r8,r7 - addne r6,#1 - bne 3b - - udiv r10,r6,r9 - mls r8,r10,r9,r6 - strb r10,[r11,r5] - add r5,r5,#1 - strb r8,[r11,r5] - add r5,r5,#1 - - add r3,#1 - b 1b - -4: - mov r6,#0 @ start indice first line - lsr r8,r5,#1 - mov r10,r8 @ start indice second line - mov r5,#0 - mov r3,#5 - -5: - ldrb r9,[r11,r6] @ load position - ldrb r7,[r11,r10] - mul r9,r3,r9 @ compute rank - add r9,r9,r7 - ldrb r9,[r1,r9] @ load polybe byte - strb r9,[r2,r5] @ and store to result - add r5,r5,#1 - add r10,r10,#1 - add r6,r6,#1 - cmp r6,r8 @ end ? - blt 5b - - mov r9,#0 @ 0 final - strb r9,[r2,r5] - mov r0,r5 -100: - pop {r3-r11,pc} @ restaur registers - - -/***************************************************/ -/* ROUTINES INCLUDE */ -/***************************************************/ -.include "../affichage.inc" diff --git a/Task/Bifid-cipher/Ada/bifid-cipher.adb b/Task/Bifid-cipher/Ada/bifid-cipher.ada similarity index 100% rename from Task/Bifid-cipher/Ada/bifid-cipher.adb rename to Task/Bifid-cipher/Ada/bifid-cipher.ada diff --git a/Task/Bifid-cipher/C++/bifid-cipher.cpp b/Task/Bifid-cipher/C++/bifid-cipher.cpp index 411515802a..0e93a81f8a 100644 --- a/Task/Bifid-cipher/C++/bifid-cipher.cpp +++ b/Task/Bifid-cipher/C++/bifid-cipher.cpp @@ -9,104 +9,104 @@ typedef std::pair point; class Bifid { public: - Bifid(const int32_t n, std::string_view text) { - if ( text.length() != n * n ) { - throw std::invalid_argument("Incorrect length of text"); - } + Bifid(const int32_t n, std::string_view text) { + if ( text.length() != n * n ) { + throw std::invalid_argument("Incorrect length of text"); + } - grid.resize(n); - for ( uint64_t i = 0; i < grid.size(); i++ ) { - grid[i].resize(n); - } + grid.resize(n); + for ( uint64_t i = 0; i < grid.size(); i++ ) { + grid[i].resize(n); + } - int32_t row = 0; - int32_t col = 0; - for ( const char& ch : text ) { - grid[row][col] = ch; - coordinates[ch] = point(row, col); - col += 1; - if ( col == n ) { - col = 0; - row += 1; - } - } + int32_t row = 0; + int32_t col = 0; + for ( const char& ch : text ) { + grid[row][col] = ch; + coordinates[ch] = point(row, col); + col += 1; + if ( col == n ) { + col = 0; + row += 1; + } + } - if ( n == 5 ) { - coordinates['J'] = coordinates['I']; - } - } + if ( n == 5 ) { + coordinates['J'] = coordinates['I']; + } + } - std::string encrypt(std::string_view text) { - std::vector row_one, row_two; - for ( const char& ch : text ) { - point coordinate = coordinates[ch]; - row_one.push_back(coordinate.first); - row_two.push_back(coordinate.second); - } + std::string encrypt(std::string_view text) { + std::vector row_one, row_two; + for ( const char& ch : text ) { + point coordinate = coordinates[ch]; + row_one.push_back(coordinate.first); + row_two.push_back(coordinate.second); + } - row_one.insert(row_one.end(), row_two.begin(), row_two.end()); - std::string result; - for ( uint64_t i = 0; i < row_one.size() - 1; i += 2 ) { - result += grid[row_one[i]][row_one[i + 1]]; - } - return result; - } + row_one.insert(row_one.end(), row_two.begin(), row_two.end()); + std::string result; + for ( uint64_t i = 0; i < row_one.size() - 1; i += 2 ) { + result += grid[row_one[i]][row_one[i + 1]]; + } + return result; + } - std::string decrypt(std::string_view text) { - std::vector row; - for ( const char& ch : text ) { - point coordinate = coordinates[ch]; - row.push_back(coordinate.first); - row.push_back(coordinate.second); - } + std::string decrypt(std::string_view text) { + std::vector row; + for ( const char& ch : text ) { + point coordinate = coordinates[ch]; + row.push_back(coordinate.first); + row.push_back(coordinate.second); + } - const int middle = row.size() / 2; - std::vector row_one = { row.begin(), row.begin() + middle }; - std::vector row_two = { row.begin() + middle, row.end() }; - std::string result; - for ( int32_t i = 0; i < middle; i++ ) { - result += grid[row_one[i]][row_two[i]]; - } - return result; - } + const int middle = row.size() / 2; + std::vector row_one = { row.begin(), row.begin() + middle }; + std::vector row_two = { row.begin() + middle, row.end() }; + std::string result; + for ( int32_t i = 0; i < middle; i++ ) { + result += grid[row_one[i]][row_two[i]]; + } + return result; + } - void display() const { - for ( const std::vector& row : grid ) { - for ( const char& ch : row ) { - std::cout << ch << " "; - } - std::cout << std::endl; - } - } + void display() const { + for ( const std::vector& row : grid ) { + for ( const char& ch : row ) { + std::cout << ch << " "; + } + std::cout << std::endl; + } + } private: - std::vector> grid; - std::unordered_map coordinates; + std::vector> grid; + std::unordered_map coordinates; }; void runTest(Bifid& bifid, std::string_view message) { - std::cout << "Using Polybius square:" << std::endl; - bifid.display(); - std::cout << "Message: " << message << std::endl; - std::string encrypted = bifid.encrypt(message); - std::cout << "Encrypted: " << encrypted << std::endl; - std::string decrypted = bifid.decrypt(encrypted); - std::cout << "Decrypted: " << decrypted << std::endl; - std::cout << std::endl; + std::cout << "Using Polybius square:" << std::endl; + bifid.display(); + std::cout << "Message: " << message << std::endl; + std::string encrypted = bifid.encrypt(message); + std::cout << "Encrypted: " << encrypted << std::endl; + std::string decrypted = bifid.decrypt(encrypted); + std::cout << "Decrypted: " << decrypted << std::endl; + std::cout << std::endl; } int main() { - const std::string_view message1 = "ATTACKATDAWN"; - const std::string_view message2 = "FLEEATONCE"; - const std::string_view message3 = "THEINVASIONWILLSTARTONTHEFIRSTOFJANUARY"; + const std::string_view message1 = "ATTACKATDAWN"; + const std::string_view message2 = "FLEEATONCE"; + const std::string_view message3 = "THEINVASIONWILLSTARTONTHEFIRSTOFJANUARY"; - Bifid bifid1(5, "ABCDEFGHIKLMNOPQRSTUVWXYZ"); - Bifid bifid2(5, "BGWKZQPNDSIOAXEFCLUMTHYVR"); + Bifid bifid1(5, "ABCDEFGHIKLMNOPQRSTUVWXYZ"); + Bifid bifid2(5, "BGWKZQPNDSIOAXEFCLUMTHYVR"); - runTest(bifid1, message1); - runTest(bifid2, message2); - runTest(bifid2, message1); - runTest(bifid1, message2); + runTest(bifid1, message1); + runTest(bifid2, message2); + runTest(bifid2, message1); + runTest(bifid1, message2); - Bifid bifid3(6, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - runTest(bifid3, message3); + Bifid bifid3(6, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); + runTest(bifid3, message3); } diff --git a/Task/Bifid-cipher/Crystal/bifid-cipher.cr b/Task/Bifid-cipher/Crystal/bifid-cipher.cr deleted file mode 100644 index ce327b9dfa..0000000000 --- a/Task/Bifid-cipher/Crystal/bifid-cipher.cr +++ /dev/null @@ -1,46 +0,0 @@ -enum BifidOp - Encode - Decode -end - -def bifid_encode (message, alphabet, op : BifidOp = :encode) - square = alphabet.chars - side = Math.isqrt(square.size) - raise "alphabet not a square" unless side*side == square.size - chars = message.chars - raise "incomplete alphabet" unless chars.all?(&.in? square) - - coords = chars.flat_map {|ch| [*square.index!(ch).divmod(side)] } - - coords = if op.encode? - (0...coords.size).step(2).map {|i| coords[i] }.to_a + - (1...coords.size).step(2).map {|i| coords[i] }.to_a - else - half = coords.size//2 - coords[...half].zip(coords[half..]).map {|c1, c2| - [c1, c2] - }.flatten - end - coords.each_slice(2).map {|(row, col)| - square[row * side + col] - }.join -end - -poly1 = "ABCDEFGHIKLMNOPQRSTUVWXYZ" -poly2 = "BGWKZQPNDSIOAXEFCLUMTHYVR" -superpoly = (' '..'~').join + "¡éßñø" - -attack = "ATTACKATDAWN" -flee = "FLEEATONCE" -invasion = "The invasion will start on the first of January".upcase.tr("J", "I").delete("^A-Z") -ataque = "¡Attack on 1/1 at 23:59, señor!" - -[{attack, poly1}, {flee, poly2}, {attack, poly2}, - {invasion, poly1}, {ataque, superpoly}].each do |message, alphabet| - encoded = bifid_encode(message, alphabet) - decoded = bifid_encode(encoded, alphabet, :decode) - puts "Message: #{message} #{alphabet.size > 80 ? "\n" : " "}- Alphabet: #{alphabet}" - puts "Encoded: #{encoded}" - puts "Decoded: #{decoded}" - puts -end diff --git a/Task/Bifid-cipher/EMal/bifid-cipher.emal b/Task/Bifid-cipher/EMal/bifid-cipher.emal deleted file mode 100644 index 786b4e3400..0000000000 --- a/Task/Bifid-cipher/EMal/bifid-cipher.emal +++ /dev/null @@ -1,82 +0,0 @@ -type PolybiusSquare -model - Map map - List grid - new by int side, text symbols - me.map ← text%Pair[] - me.grid ← List[].with(side, = 97 @@ -11,36 +36,13 @@ proc prepare &s$ . r$ &= strchar h . . - swap s$ r$ + return r$ . func$ encr msg$ key$ . - prepare msg$ - len h[] len msg$ * 2 - for i to len msg$ - c$ = substr msg$ i 1 - j = strpos key$ c$ - 1 - h[i] = j div 5 - h[len msg$ + i] = j mod 5 - . - for i = 1 step 2 to len h[] - 1 - j = h[i] * 5 + h[i + 1] + 1 - r$ &= substr key$ j 1 - . - return r$ + return crypt 1 conv msg$ key$ . func$ decr msg$ key$ . - for i to len msg$ - c$ = substr msg$ i 1 - j = strpos key$ c$ - 1 - h[] &= j div 5 - h[] &= j mod 5 - . - mid = len h[] div 2 - for i = 1 to mid - j = h[i] * 5 + h[i + mid] + 1 - r$ &= substr key$ j 1 - . - return r$ + return crypt 0 msg$ key$ . key$ = "ABCDEFGHIKLMNOPQRSTUVWXYZ" h$ = encr "ATTACKATDAWN" key$ @@ -57,6 +59,7 @@ h$ = encr "ATTACKATDAWN" key$ print h$ print decr h$ key$ print "" +# h$ = encr "The invasion will start on the first of January" key$ print h$ print decr h$ key$ diff --git a/Task/Bifid-cipher/F-Sharp/bifid-cipher.fs b/Task/Bifid-cipher/F-Sharp/bifid-cipher.fs deleted file mode 100644 index 50904e931d..0000000000 --- a/Task/Bifid-cipher/F-Sharp/bifid-cipher.fs +++ /dev/null @@ -1,17 +0,0 @@ -// Bifid cipher. Nigel Galloway: September 17th., 2024 -let polybius alphabet n g=let ng=Seq.allPairs [1..n] [1..g] in (Seq.zip ng alphabet|>Map.ofSeq,Seq.zip alphabet ng|>Map.ofSeq) -let fN (i,g) (e:Map<(int*int),char>)=i@g|>List.chunkBySize 2|>List.map(fun n->e[(n[0],n[1])])|>Array.ofList|>System.String -let fG (n:Map) g=g|>Seq.map(fun g->n[g])|>List.ofSeq|>List.unzip -let encrypt (n:Map<(int * int),char>,g:Map) text=fN (fG g text) n -let decrypt (n:Map<(int * int),char>,g:Map) text= - let p,q=let p,q=fG g text in List.map2(fun p q->[p;q]) p q|>List.concat|>List.splitAt p.Length - List.zip p q |>List.map(fun g->n[g])|>Array.ofList|>System.String - -let p1=polybius "abcdefghiklmnopqrstuvwxyz" 5 5 -let s="attackatdawn" in let e=encrypt p1 s in printfn $"%s{s} -> %s{e} -> %s{decrypt p1 e}" -let s="fleeatonce" in let e=encrypt p1 s in printfn $"%s{s} -> %s{e} -> %s{decrypt p1 e}" -let p2=polybius "bgwkzqpndsioaxefclumthyvr" 5 5 -let s="attackatdawn" in let e=encrypt p2 s in printfn $"%s{s} -> %s{e} -> %s{decrypt p2 e}" -let s="fleeatonce" in let e=encrypt p2 s in printfn $"%s{s} -> %s{e} -> %s{decrypt p2 e}" -let p3=polybius "abcdefghijklmnopqrstuvwxyz0123456789" 6 6 -let s="theinvasionwillstarton1january2025" in let e=encrypt p3 s in printfn $"%s{s} -> %s{e} -> %s{decrypt p3 e}" diff --git a/Task/Bifid-cipher/Fortran/bifid-cipher.f b/Task/Bifid-cipher/Fortran/bifid-cipher.f deleted file mode 100644 index 4d804626f9..0000000000 --- a/Task/Bifid-cipher/Fortran/bifid-cipher.f +++ /dev/null @@ -1,219 +0,0 @@ -! -! Bifid cipher -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.10 -! GNU Fortran (Ubuntu 15.2.0-4ubuntu4) 15.2.0 on Kubuntu 25.10 -! VSI Fortran x86-64 V8.6-001 on OpenVMS x86_64 V9.2-3 -! No Non-standard features used, should compile on any fairly recent Fortran. -! -! U.B., October 2025 -!============================================================================== - -program BifidCipher - -implicit none - -! Constants: - -integer, parameter :: nTests = 6 ! NUmber of different test messages -integer, parameter :: maxLen=100 ! Maximum length of any test message - -! Instead of drawing the Polybius squares, we only define the alphabet to applied and calculate -! row and column number on the fly when needed. -! If necessary, the Encrypt and Decrypt subroutines extend the alphabets using "SpareAlpha" -! until the total length of the extended alphabet is a square number. This is important because -! otherwise the enccrypt or decrypt algorithm may calculate a row/column combination that is -! not used by the actual alphabet. - -! The alphabet as shown in the task description has no J. -character (len=*), parameter :: Alphabet_no_J ='ABCDEFGHIKLMNOPQRSTUVWXYZ' - -! The alphabet of capital letters as used in most western languages -character (len=*), parameter :: Alphabet_With_J ='ABCDEFGHIJKLMNOPQRSTUVWXYZ' - -! The square in the wikipedia article in 1 long string: -character (len=*), parameter :: AlternateAlphabet = 'BGWKZQPNDSIOAXEFCLUMTHYVR' - -! Standard Alphabet with CAPITAL and small letters -character (len=*), parameter :: Alphabet_withSmallLetters = & - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' - -! Printable spare characters to extend alphabets so the total length becomes the -! next larger square number > the alphabet's length -character (len=*), parameter :: SpareAlpha = '1234567890!"§$%&/()=' ! omitted ! and " - -! Variables: - -character (len=maxLen) :: MsgToEncrypt (nTests), EncryptedMsg (nTests), DecryptedMsg (nTests) - -integer :: ColWidth ! Is variable and depends on length of the used alphabet - -integer :: i, lx - -! The test strings: (1) is from the task description, (2) is from the Wikipedia Article, (3) is -! the additional message as presented in the task description -MsgToEncrypt(1) = 'ATTACKATDAWN' -MsgToEncrypt(2) = 'FLEEATONCE' -MsgToEncrypt(3) = 'THEINVASIONWILLSTARTONTHEFIRSTOFJANUARY' - -! Same text, with both small and capital letters, to be used with an extended Polybius square -MsgToEncrypt(4) = 'AttackAtDawn' -MsgToEncrypt(5) = 'FleeAtOnce' -MsgToEncrypt(6) = 'TheInvasionWillStartOnTheFirstOfJanuary' - -print '(A/)', 'Using the alphabet and Polybius square without "J"' -call PrintSquare (Alphabet_no_J) -do i=1, nTests/2 - lx = len_trim (MsgToEncrypt(i)) - call encrypt (MsgToEncrypt(i)(:lx) , EncryptedMsg (i) , Alphabet_no_J) - call decrypt (EncryptedMsg(i) (:lx), DecryptedMsg (i) , Alphabet_no_J) - print '(A, " => ", A, " => ", A)', MsgToEncrypt(i)(:lx), EncryptedMsg (i)(:lx), DecryptedMsg (i)(:lx) -enddo - -print '(/A/)', 'Using the extended alphabet and Polybius square that includes "J"' -call PrintSquare (Alphabet_with_J) -do i=1, nTests/2 - lx = len_trim (MsgToEncrypt(i)) - call encrypt (MsgToEncrypt(i)(:lx) , EncryptedMsg (i) , Alphabet_with_J) - call decrypt (EncryptedMsg(i) (:lx), DecryptedMsg (i) , Alphabet_with_J) - print '(A, " => ", A, " => ", A)', MsgToEncrypt(i)(:lx), EncryptedMsg (i)(:lx), DecryptedMsg (i)(:lx) -end do - -print '(/A/)', 'Using the alphabet and Polybius square as shown in the Wikipedia article (no J!)' -call PrintSquare (AlternateAlphabet) -do i=1, nTests/2 - lx = len_trim (MsgToEncrypt(i)) - call encrypt (MsgToEncrypt(i)(:lx) , EncryptedMsg (i) , AlternateAlphabet) - call decrypt (EncryptedMsg(i) (:lx), DecryptedMsg (i) , AlternateAlphabet) - print '(A, " => ", A, " => ", A)', MsgToEncrypt(i)(:lx), EncryptedMsg (i)(:lx), DecryptedMsg (i)(:lx) -end do - -print '(/A/)', 'Using the extended alphabet with both upper case and lower case letters, including J and j' -call PrintSquare (Alphabet_withSmallLetters) -do i=nTests/2+1, nTests - lx = len_trim (MsgToEncrypt(i)) - call encrypt (MsgToEncrypt(i)(:lx) , EncryptedMsg (i) , Alphabet_withSmallLetters) - call decrypt (EncryptedMsg(i) (:lx), DecryptedMsg (i) , Alphabet_withSmallLetters) - print '(A, " => ", A, " => ", A)', MsgToEncrypt(i)(:lx), EncryptedMsg (i)(:lx), DecryptedMsg (i)(:lx) -end do - -contains - -!====================== -! Encode a given string -! ====================== -subroutine encrypt (inString,outString, argAlphabet) -character (len=*), intent(in) :: argAlphabet -character (len=*), intent(in) :: inString -character (len=*), intent(out) :: outString -character (len=100) :: Alphabet - -integer :: idxLine(2*maxLen) -integer :: l, ii, idx, row, col - -! Calculate required column width: so that ColWidth^2 >= (length of Alphabet) -Alphabet = argAlphabet -l = len_trim(alphabet) -ColWidth = 1 -do while (ColWidth*ColWidth .lt. l) - ColWidth = ColWidth + 1 -end do -if (ColWidth .gt.8) stop 'ERROR: Cannot handle Alphabets with more than 64 characters.' -! Provide some printable chars until the length is a square number -Alphabet (l+1:) = SpareAlpha - -l = len_trim (inString) -if (l .gt. len(outString)) stop 'ERROR: not enough storage space for encrypt result string.' - -do ii=1, l -! print *, ' ii = ', ii, ' instring(ii) = ', inString(ii:ii) - idx = index (Alphabet, inString(ii:ii)) - if (idx .eq. 0) idx = index (Alphabet, char(ichar(instring(ii:ii))-1)) ! J=I, j=i, just in case - row = (idx+ColWidth-1) / ColWidth ! e.g. 'A' ...'E', idx=1...5, row=(5...9)/5 = 1, col = 1...5 - col = 1+mod (idx+ColWidth-1, ColWidth) ! e.g. 'F' ...'K', idx=6...10, row=(10...14)/5 = 2, col = 1...5 - idxLine (ii) = row - idxLine (ii+l) = col -end do - -do ii=1, l - idx = 10*idxLine(1+2*(ii-1)) + idxLine (2+2*(ii-1)) - row = idxLine(1+2*(ii-1)) - col = idxLine (2+2*(ii-1)) - idx = ColWidth*(row-1) + col - outString (ii:ii) = alphabet (idx:idx) -enddo -end subroutine encrypt - - -!====================== -! Decode a given string -!====================== -subroutine decrypt (inString,outString, argAlphabet) - -character (len=*), intent(in) :: inString -character (len=*), intent(out) :: outString -character (len=*), intent(in) :: argAlphabet - -character (len=100) :: Alphabet - -integer :: idxLine(2*maxLen) -integer :: l, ii, idx, row, col - -! Calculate required column width: so that ColWidth^2 >= (length of Alphabet) -Alphabet = argAlphabet -l = len_trim(alphabet) -ColWidth = 1 -do while (ColWidth*ColWidth .lt. l) - ColWidth = ColWidth + 1 -end do - -! Append some spare characters so that the square is completely filled without undefined fields -Alphabet (l+1:) = SpareAlpha - -l = len_trim (inString) -if (l .gt. len(outString)) stop 'ERROR: not enough storage space for decrypt result string.' - -do ii=1, l - idx = index (Alphabet, inString(ii:ii)) - row = (idx+ColWidth-1) / ColWidth ! idx 1...5 is row 1, 6...10 is row 2 etc - col = 1+mod (idx+ColWidth-1, ColWidth) ! so that 21...29 -> 1...9 etc. - idxLine (1+2*(ii-1)) = row - idxLine (2+2*(ii-1)) = col -end do - -do ii=1, l - row = idxLine (ii) - col = idxLine (ii+l) - idx = ColWidth*(row-1) + col - outString (ii:ii) = alphabet (idx:idx) -end do - -end subroutine decrypt - - -! ================================================================================ -! Print the resulting Polybius square based on the alphabet used for encode/decode -! ================================================================================ -subroutine PrintSquare (Alphabet) -character (len=*), intent(in) :: Alphabet -integer:: ii, l - -l = len_trim(alphabet) -ColWidth = 1 -do while (ColWidth*ColWidth .lt. l) - ColWidth = ColWidth + 1 -end do -print '("The alphabet has a length of ", I0, " so it requires the square size of ", I0, "x", I0 /)' , l, ColWidth, ColWidth - -do ii=1, ColWidth*ColWidth - if (ii .le. l) then - write (*, '(A2)', advance='no') Alphabet(ii:ii) - else - write (*, '(A2)', advance='no') SpareAlpha (ii-l:ii-l) ! Use spares to complete the square - endif - if (mod (ii, ColWidth) .eq. 0) print * ! End of line -end do -print * ! one extra blank line -end subroutine PrintSquare - - -end program BifidCipher diff --git a/Task/Bifid-cipher/FreeBASIC/bifid-cipher.basic b/Task/Bifid-cipher/FreeBASIC/bifid-cipher.basic deleted file mode 100644 index 67b6e9ffad..0000000000 --- a/Task/Bifid-cipher/FreeBASIC/bifid-cipher.basic +++ /dev/null @@ -1,81 +0,0 @@ -Dim Shared As String encrypted, decrypted - -Sub BifidEncode(Byref polybius As String, Byref mensaje As String) - Dim As String filas, columas - Dim As Integer c, i, j, k, longi - - encrypted = Ucase(mensaje) - For i = 1 To Len(encrypted) - If Mid(encrypted, i, 1) = Chr(10) Then Mid(encrypted, i, 1) = Chr(9) - Next i - - - i = 0 : j = 0 - While i < Len(encrypted) - c = Asc(Mid(encrypted, i + 1, 1)) - i += 1 - k = Instr(polybius, Chr(c)) - 1 - If k >= 0 Then - filas &= Chr(k \ 5 + Asc("0")) - columas &= Chr(k Mod 5 + Asc("0")) - j += 1 - End If - Wend - - longi = j - filas &= columas - - encrypted = "" - For i = 0 To longi - 1 - k = (Asc(Mid(filas, i * 2 + 1, 1)) - Asc("0")) * 5 + (Asc(Mid(filas, i * 2 + 2, 1)) - Asc("0")) - encrypted &= Mid(polybius, k + 1, 1) - Next i -End Sub - -Sub BifidDecode(Byref polybius As String, Byref mensaje As String) - Dim As String filas, columas - Dim As Integer c, k, i, j, longi - - i = 0 : j = 0 - While i < Len(mensaje) - c = Asc(Mid(mensaje, i + 1, 1)) - i += 1 - k = Instr(polybius, Chr(c)) - 1 - filas &= Chr(k \ 5 + Asc("0")) - filas &= Chr(k Mod 5 + Asc("0")) - j += 2 - Wend - - longi = i - columas = Right(filas, longi) - filas = Left(filas, longi) - - decrypted = "" - For i = 0 To longi - 1 - k = (Asc(Mid(filas, i + 1, 1)) - Asc("0")) * 5 + (Asc(Mid(columas, i + 1, 1)) - Asc("0")) - decrypted &= Mid(polybius, k + 1, 1) - Next i -End Sub - -Dim As String polys(3), msgs(3) - -polys(0) = "ABCDEFGHIKLMNOPQRSTUVWXYZ" -polys(1) = "BGWKZQPNDSIOAXEFCLUMTHYVR" -polys(2) = "BGWKZQPNDSIOAXEFCLUMTHYVR" -polys(3) = "PLAYFIREXMBCDGHKNOQSTUVWZ" - -msgs(0) = "ATTACKATDAWN" -msgs(1) = "FLEEATONCE" -msgs(2) = "ATTACKATDAWN" -msgs(3) = "The invasion will start on the first of January" - -For i As Integer = 0 To Ubound(msgs) - BifidEncode(polys(i), msgs(i)) - BifidDecode(polys(i), encrypted) - Print "Mensaje : "; msgs(i) - Print "Encrypted : "; encrypted - Print "Decrypted : "; decrypted - If i < Ubound(msgs) Then Print -Next i - -Sleep diff --git a/Task/Bifid-cipher/Go/bifid-cipher.go b/Task/Bifid-cipher/Go/bifid-cipher.go deleted file mode 100644 index ad8846cf1b..0000000000 --- a/Task/Bifid-cipher/Go/bifid-cipher.go +++ /dev/null @@ -1,180 +0,0 @@ -/* - Only use ASCII letters between A and Z or the Characters in square... . If the row with 'J' is removed from the squares, - then the square is a 'Polybios square' and you must use removeSpaceI(text) to encrypt and decrypt -*/ -package main - -import ( - "fmt" - "strings" -) - -var ( - squareRosetta [][]byte = [][]byte{ //rosettacode - {'A', 'B', 'C', 'D', 'E'}, - {'F', 'G', 'H', 'I', 'K'}, - {'L', 'M', 'N', 'O', 'P'}, - {'Q', 'R', 'S', 'T', 'U'}, - {'V', 'W', 'X', 'Y', 'Z'}, - {'J', '1', '2', '3', '4'}, - } - - squareWikipedia [][]byte = [][]byte{ // wikipedia - - {'B', 'G', 'W', 'K', 'Z'}, - {'Q', 'P', 'N', 'D', 'S'}, - {'I', 'O', 'A', 'X', 'E'}, - {'F', 'C', 'L', 'U', 'M'}, - {'T', 'H', 'Y', 'V', 'R'}, - {'J', '1', '2', '3', '4'}, - } - - textRosetta string = "0ATTACKATDAWN" - textRosettaEncoded string = "DQBDAXDQPDQH" // only for test - textWikipedia string = "FLEEATONCE" - textWikipediaEncoded string = "UAEOLWRINS" // only for test - textTest string = "The invasion will start on the first of January" - textTextEncoded string = "RASOAQXFIOORXESXADETSWLTNIAZQOISBRGBALY" // only for test -) - -type koord struct { - X byte - Y byte -} - -func (k *koord) LessThen(other *koord) bool { - if k.Y > other.Y { - return false - } - if k.Y < other.Y { - return true - } - if k.X < other.X { - return true - } - return false -} - -func (k *koord) EqualTo(other koord) bool { - if k.X == other.X && k.Y == other.Y { - return true - } - return false -} - -var encryptMap map[byte]koord -var decryptMap map[koord]byte - -func squareToMaps(square [][]byte) (map[byte]koord, map[koord]byte) { - eMap := make(map[byte]koord) - dMap := make(map[koord]byte) - for x, col := range square { - for y, v := range col { - eMap[v] = koord{byte(x), byte(y)} - dMap[koord{byte(x), byte(y)}] = v - - } - } - return eMap, dMap -} - -func removeSpaceI(text string) string { - var n string - s := strings.ToUpper(text) - for _, b := range []byte(s) { - //use only ASCII Characters from A to Z - if b < 'A' || b > 'Z' { - continue - } - if b == 'J' { - b = 'I' - } - n = n + string(b) - } - return n -} - -func removeSpace(text string, square map[byte]koord) string { - var n string - //to UpperCase and then remove all Spaces an Characters witch are not in square - s := strings.ReplaceAll(strings.ToUpper(text), " ", "") - for _, b := range []byte(s) { - _, ok := square[b] - if ok { - n = n + string(b) - } - } - return n -} - -func encrypt(text string, emap map[byte]koord, dmap map[koord]byte) string { - text = removeSpace(text, emap) - var row0, row1 []byte - for _, b := range []byte(text) { - xy := emap[b] - row0 = append(row0, xy.X) - row1 = append(row1, xy.Y) - } - row0 = append(row0, row1...) - - var s string - for i := 0; i < len(row0); i += 2 { - s = s + string(dmap[koord{row0[i], row0[i+1]}]) - } - return s -} - -func decrypt(text string, emap map[byte]koord, dmap map[koord]byte) string { - text = removeSpace(text, emap) - k := make([]koord, len(text)) - - for i, b := range []byte(text) { - k[i] = emap[b] - } - - kl := make([]byte, len(k)*2) - i := int(0) - for _, ki := range k { - kl[i] = ki.X - kl[i+1] = ki.Y - i += 2 - } - l := len(kl) / 2 - k1 := kl[:l] - k2 := kl[l:] - var s string - - for i := 0; i < l; i++ { - s = s + string(dmap[koord{k1[i], k2[i]}]) - } - return s -} - -func main() { - - encryptMap, decryptMap = squareToMaps(squareRosetta) - fmt.Println("from Rosettacode") - fmt.Println("original:\t", textRosetta) - s := encrypt(textRosetta, encryptMap, decryptMap) - fmt.Println("codiert:\t", s) - s = decrypt(s, encryptMap, decryptMap) - fmt.Println("and back:\t", s) - - fmt.Println("from Wikipedia") - encryptMap, decryptMap = squareToMaps(squareWikipedia) - fmt.Println("original:\t", textWikipedia) - s = encrypt(textWikipedia, encryptMap, decryptMap) - fmt.Println("codiert:\t", s) - s = decrypt(s, encryptMap, decryptMap) - fmt.Println("and back:\t", s) - - encryptMap, decryptMap = squareToMaps(squareWikipedia) - fmt.Println("from Rosettacode long part") - fmt.Println("original:\t", textTest) - s = encrypt(textTest, encryptMap, decryptMap) - fmt.Println("codiert:\t", s) - // Wenn der Text eine ungerade Anzahl Buchstaben hat, funktioniert der Algorithmus nicht!!! - s = decrypt(s, encryptMap, decryptMap) - fmt.Println("and back:\t", s) - -} diff --git a/Task/Bifid-cipher/Haskell/bifid-cipher.hs b/Task/Bifid-cipher/Haskell/bifid-cipher.hs deleted file mode 100644 index 9964f7aa9d..0000000000 --- a/Task/Bifid-cipher/Haskell/bifid-cipher.hs +++ /dev/null @@ -1,60 +0,0 @@ -import Data.List -import Data.Char - --- Defining all the grids I'll be using in one go. - -rcBifid = [ - 'A','B','C','D','E', - 'F','G','H','I','K', - 'L','M','N','O','P', - 'Q','R','S','T','U', - 'V','W','X','Y','Z' - ] -- We will use strings here onwards. This was just a demonstration. - -wikiBifid = "POLYBIUSCHERADFGKMNQTVWXZ" -cmiBifid = "CMIHASKELQWRTYUOPDFGZXVBN" - --- Convert a character to its grid coordinates (1-based index) -chr2pair square x = if x == 'J' then chr2pair square 'I' else case elemIndex x square of - Nothing -> error "char is not in cipher grid" - Just a -> (\(x,y) -> (x+1,y+1)) (divMod a 5) -- Convert flat index to (row, col) - -pair2chr square (x,y) = square !! ((x-1)*5+y-1) - --- Pairs up elements from a list, used in Bifid encoding process -pairUp :: [a] -> [(a,a)] -pairUp [] = [] -pairUp [a] = error "Odd number of elements" -pairUp (x:y:ys) = (x,y):(pairUp ys) - -encrypt square message = map (pair2chr square) (pairUp (l ++ r)) where - (l,r) = unzip $ map (chr2pair square) message - -decrypt square message = map (pair2chr square) (zip u d) where - (u,d) = splitAt (length message) $ concatMap (\(x,y) -> [x,y]) $ map (chr2pair square) message - -main = do - let - message1 = "ATTACKATDAWN" - message2 = "FLEEATONCE" - encrypt1 = encrypt rcBifid message1 - encrypt2 = encrypt wikiBifid message2 - encrypt3 = encrypt wikiBifid message1 - myMessage = "The invasion will start on the first of January" - encrypt4 = encrypt cmiBifid $ map toUpper $ filter (/= ' ') myMessage -- Remove spaces, uppercase - - putStrLn $ "Message 1: " ++ message1 - putStrLn $ "Encryption wrt RC's square: " ++ encrypt1 - putStrLn $ "Decrypt: " ++ show (decrypt rcBifid encrypt1) - - putStrLn $ "Message 2: " ++ message2 - putStrLn $ "Encryption wrt Wiki's square: " ++ encrypt2 - putStrLn $ "Decrypt: " ++ show (decrypt wikiBifid encrypt2) - - putStrLn $ "Message 3: " ++ message1 - putStrLn $ "Encryption wrt Wiki's square: " ++ encrypt3 - putStrLn $ "Decrypt: " ++ show (decrypt wikiBifid encrypt3) - - putStrLn $ "Message 4: " ++ myMessage - putStrLn $ "Encryption wrt CMI square: " ++ encrypt4 - putStrLn $ "Decrypt: " ++ show (decrypt cmiBifid encrypt4) diff --git a/Task/Bifid-cipher/Java/bifid-cipher.java b/Task/Bifid-cipher/Java/bifid-cipher.java index 90b4f09174..a4a88f3db9 100644 --- a/Task/Bifid-cipher/Java/bifid-cipher.java +++ b/Task/Bifid-cipher/Java/bifid-cipher.java @@ -7,101 +7,101 @@ import java.util.Map; public final class BifidCipher { - public static void main(String[] aArgs) { - final String message1 = "ATTACKATDAWN"; - final String message2 = "FLEEATONCE"; - final String message3 = "The invasion will start on the first of January".toUpperCase().replace(" ", ""); - - Bifid bifid1 = new Bifid(5, "ABCDEFGHIKLMNOPQRSTUVWXYZ"); - Bifid bifid2 = new Bifid(5, "BGWKZQPNDSIOAXEFCLUMTHYVR"); - - runTest(bifid1, message1); - runTest(bifid2, message2); - runTest(bifid2, message1); - runTest(bifid1, message2); - - Bifid bifid3 = new Bifid(6, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); - runTest(bifid3, message3); - } - - private static void runTest(Bifid aBifid, String aMessage) { - System.out.println("Using Polybius square:"); - aBifid.display(); - System.out.println("Message: " + aMessage); - String encrypted = aBifid.encrypt(aMessage); - System.out.println("Encrypted: " + encrypted); - String decrypted = aBifid.decrypt(encrypted); - System.out.println("Decrypted: " + decrypted); - System.out.println(); - } - + public static void main(String[] aArgs) { + final String message1 = "ATTACKATDAWN"; + final String message2 = "FLEEATONCE"; + final String message3 = "The invasion will start on the first of January".toUpperCase().replace(" ", ""); + + Bifid bifid1 = new Bifid(5, "ABCDEFGHIKLMNOPQRSTUVWXYZ"); + Bifid bifid2 = new Bifid(5, "BGWKZQPNDSIOAXEFCLUMTHYVR"); + + runTest(bifid1, message1); + runTest(bifid2, message2); + runTest(bifid2, message1); + runTest(bifid1, message2); + + Bifid bifid3 = new Bifid(6, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); + runTest(bifid3, message3); + } + + private static void runTest(Bifid aBifid, String aMessage) { + System.out.println("Using Polybius square:"); + aBifid.display(); + System.out.println("Message: " + aMessage); + String encrypted = aBifid.encrypt(aMessage); + System.out.println("Encrypted: " + encrypted); + String decrypted = aBifid.decrypt(encrypted); + System.out.println("Decrypted: " + decrypted); + System.out.println(); + } + } - + final class Bifid { - - public Bifid(int aN, String aText) { - if ( aText.length() != aN * aN ) { - throw new IllegalArgumentException("Incorrect length of text"); - } - - grid = new char[aN][aN]; - int row = 0; - int col = 0; - for ( char ch : aText.toCharArray() ) { - grid[row][col] = ch; - coordinates.put(ch, new Point(row, col) ); - col += 1; - if ( col == aN ) { - col = 0; - row += 1; - } - } - - if ( aN == 5 ) { - coordinates.put('J', coordinates.get('I')); - } - } - - public String encrypt(String aText) { - List rowOne = new ArrayList(); - List rowTwo = new ArrayList(); - for ( char ch : aText.toCharArray() ) { - Point coordinate = coordinates.get(ch); - rowOne.add(coordinate.x); - rowTwo.add(coordinate.y); - } - - rowOne.addAll(rowTwo); - StringBuilder result = new StringBuilder(); - for ( int i = 0; i < rowOne.size() - 1; i += 2 ) { - result.append(grid[rowOne.get(i)][rowOne.get(i + 1)]); - } - return result.toString(); - } - - public String decrypt(String aText) { - List row = new ArrayList(); - for ( char ch : aText.toCharArray() ) { - Point coordinate = coordinates.get(ch); - row.add(coordinate.x); - row.add(coordinate.y); - } - - final int middle = row.size() / 2; - List rowOne = row.subList(0, middle); - List rowTwo = row.subList(middle, row.size()); - StringBuilder result = new StringBuilder(); - for ( int i = 0; i < middle; i++ ) { - result.append(grid[rowOne.get(i)][rowTwo.get(i)]); - } - return result.toString(); - } + + public Bifid(int aN, String aText) { + if ( aText.length() != aN * aN ) { + throw new IllegalArgumentException("Incorrect length of text"); + } + + grid = new char[aN][aN]; + int row = 0; + int col = 0; + for ( char ch : aText.toCharArray() ) { + grid[row][col] = ch; + coordinates.put(ch, new Point(row, col) ); + col += 1; + if ( col == aN ) { + col = 0; + row += 1; + } + } + + if ( aN == 5 ) { + coordinates.put('J', coordinates.get('I')); + } + } + + public String encrypt(String aText) { + List rowOne = new ArrayList(); + List rowTwo = new ArrayList(); + for ( char ch : aText.toCharArray() ) { + Point coordinate = coordinates.get(ch); + rowOne.add(coordinate.x); + rowTwo.add(coordinate.y); + } + + rowOne.addAll(rowTwo); + StringBuilder result = new StringBuilder(); + for ( int i = 0; i < rowOne.size() - 1; i += 2 ) { + result.append(grid[rowOne.get(i)][rowOne.get(i + 1)]); + } + return result.toString(); + } + + public String decrypt(String aText) { + List row = new ArrayList(); + for ( char ch : aText.toCharArray() ) { + Point coordinate = coordinates.get(ch); + row.add(coordinate.x); + row.add(coordinate.y); + } + + final int middle = row.size() / 2; + List rowOne = row.subList(0, middle); + List rowTwo = row.subList(middle, row.size()); + StringBuilder result = new StringBuilder(); + for ( int i = 0; i < middle; i++ ) { + result.append(grid[rowOne.get(i)][rowTwo.get(i)]); + } + return result.toString(); + } public void display() { - Arrays.stream(grid).forEach( row -> System.out.println(Arrays.toString(row)) ); - } - - private char[][] grid; - private Map coordinates = new HashMap(); - + Arrays.stream(grid).forEach( row -> System.out.println(Arrays.toString(row)) ); + } + + private char[][] grid; + private Map coordinates = new HashMap(); + } diff --git a/Task/Bifid-cipher/JavaScript/bifid-cipher.js b/Task/Bifid-cipher/JavaScript/bifid-cipher.js deleted file mode 100644 index a4f210b4c0..0000000000 --- a/Task/Bifid-cipher/JavaScript/bifid-cipher.js +++ /dev/null @@ -1,199 +0,0 @@ -// ADFGVX Cipher Implementation in JavaScript - -// Cipher squares -const squareRosetta = [ // from Rosetta Code - ['A', 'B', 'C', 'D', 'E'], - ['F', 'G', 'H', 'I', 'K'], - ['L', 'M', 'N', 'O', 'P'], - ['Q', 'R', 'S', 'T', 'U'], - ['V', 'W', 'X', 'Y', 'Z'], - ['J', '1', '2', '3', '4'] -]; - -const squareWikipedia = [ // from Wikipedia - ['B', 'G', 'W', 'K', 'Z'], - ['Q', 'P', 'N', 'D', 'S'], - ['I', 'O', 'A', 'X', 'E'], - ['F', 'C', 'L', 'U', 'M'], - ['T', 'H', 'Y', 'V', 'R'], - ['J', '1', '2', '3', '4'] -]; - -// Test text strings -const textRosetta = "0ATTACKATDAWN"; -const textRosettaEncoded = "DQBDAXDQPDQH"; // only for test -const textWikipedia = "FLEEATONCE"; -const textWikipediaEncoded = "UAEOLWRINS"; // only for test -const textTest = "The invasion will start on the first of January"; -const textTestEncoded = "RASOAQXFIOORXESXADETSWLTNIAZQOISBRGBALY"; // only for test - -// Coordinate class (equivalent to koord struct in Go) -class Coord { - constructor(x, y) { - this.x = x; - this.y = y; - } - - lessThan(other) { - if (this.y > other.y) { - return false; - } - if (this.y < other.y) { - return true; - } - if (this.x < other.x) { - return true; - } - return false; - } - - equalTo(other) { - return this.x === other.x && this.y === other.y; - } -} - -// Convert square to encryption and decryption maps -function squareToMaps(square) { - const encryptMap = new Map(); - const decryptMap = new Map(); - - for (let x = 0; x < square.length; x++) { - for (let y = 0; y < square[x].length; y++) { - const value = square[x][y]; - const coord = new Coord(x, y); - - // For encryption map, use character as key - encryptMap.set(value, coord); - - // For decryption map, use coordinate string as key - // (JavaScript Maps can't use objects as keys directly, so convert to string) - decryptMap.set(`${x},${y}`, value); - } - } - - return { encryptMap, decryptMap }; -} - -// Remove spaces and non-valid characters -function removeSpace(text, encryptMap) { - const upper = text.toUpperCase().replace(/\s/g, ''); - let result = ''; - - for (const char of upper) { - if (encryptMap.has(char)) { - result += char; - } - } - - return result; -} - -// Replace 'J' with 'I' (for specific Polybius square implementations) -function removeSpaceI(text) { - const upper = text.toUpperCase(); - let result = ''; - - for (const char of upper) { - // Use only ASCII characters from A to Z - if (char >= 'A' && char <= 'Z') { - result += char === 'J' ? 'I' : char; - } - } - - return result; -} - -// Encrypt using ADFGVX cipher -function encrypt(text, encryptMap, decryptMap) { - text = removeSpace(text, encryptMap); - - const row0 = []; - const row1 = []; - - // Get coordinates for each character - for (const char of text) { - const coord = encryptMap.get(char); - row0.push(coord.x); - row1.push(coord.y); - } - - // Combine coordinates - const combined = [...row0, ...row1]; - - let result = ''; - // Convert pairs of coordinates back to characters - for (let i = 0; i < combined.length; i += 2) { - const key = `${combined[i]},${combined[i+1]}`; - result += decryptMap.get(key); - } - - return result; -} - -// Decrypt using ADFGVX cipher -function decrypt(text, encryptMap, decryptMap) { - text = removeSpace(text, encryptMap); - - const coords = []; - - // Get coordinates for each character - for (const char of text) { - coords.push(encryptMap.get(char)); - } - - // Extract x and y values - const flatCoords = []; - for (const coord of coords) { - flatCoords.push(coord.x); - flatCoords.push(coord.y); - } - - const half = Math.floor(flatCoords.length / 2); - const firstHalf = flatCoords.slice(0, half); - const secondHalf = flatCoords.slice(half); - - let result = ''; - - // Recombine coordinates to get original text - for (let i = 0; i < firstHalf.length; i++) { - const key = `${firstHalf[i]},${secondHalf[i]}`; - result += decryptMap.get(key); - } - - return result; -} - -// Main function to test -function main() { - // Test with Rosetta square - let { encryptMap, decryptMap } = squareToMaps(squareRosetta); - - console.log("From Rosetta Code"); - console.log("original:\t", textRosetta); - let encoded = encrypt(textRosetta, encryptMap, decryptMap); - console.log("encoded:\t", encoded); - let decoded = decrypt(encoded, encryptMap, decryptMap); - console.log("and back:\t", decoded); - - // Test with Wikipedia square - ({ encryptMap, decryptMap } = squareToMaps(squareWikipedia)); - - console.log("\nFrom Wikipedia"); - console.log("original:\t", textWikipedia); - encoded = encrypt(textWikipedia, encryptMap, decryptMap); - console.log("encoded:\t", encoded); - decoded = decrypt(encoded, encryptMap, decryptMap); - console.log("and back:\t", decoded); - - // Test with longer text - console.log("\nFrom Rosetta Code (longer text)"); - console.log("original:\t", textTest); - encoded = encrypt(textTest, encryptMap, decryptMap); - console.log("encoded:\t", encoded); - // Note: If the text has an odd number of letters, the algorithm doesn't work! - decoded = decrypt(encoded, encryptMap, decryptMap); - console.log("and back:\t", decoded); -} - -// Run the main function -main(); diff --git a/Task/Bifid-cipher/Jq/bifid-cipher-2.jq b/Task/Bifid-cipher/Jq/bifid-cipher-2.jq index 6eabe468da..9d4b6f076c 100644 --- a/Task/Bifid-cipher/Jq/bifid-cipher-2.jq +++ b/Task/Bifid-cipher/Jq/bifid-cipher-2.jq @@ -48,7 +48,7 @@ def task: | ($encrypted | decrypt(polys[$i] )) as $decrypted | "Message : \(.)", "Encrypted : \($encrypted)", - "Decrypted : \($decrypted)", + "Decrypted : \($decrypted)" "" ; task diff --git a/Task/Bifid-cipher/Julia/bifid-cipher.jl b/Task/Bifid-cipher/Julia/bifid-cipher.julia similarity index 100% rename from Task/Bifid-cipher/Julia/bifid-cipher.jl rename to Task/Bifid-cipher/Julia/bifid-cipher.julia diff --git a/Task/Bifid-cipher/Kotlin/bifid-cipher.kts b/Task/Bifid-cipher/Kotlin/bifid-cipher.kotlin similarity index 100% rename from Task/Bifid-cipher/Kotlin/bifid-cipher.kts rename to Task/Bifid-cipher/Kotlin/bifid-cipher.kotlin diff --git a/Task/Bifid-cipher/M2000-Interpreter/bifid-cipher.m2000 b/Task/Bifid-cipher/M2000-Interpreter/bifid-cipher.m2000 deleted file mode 100644 index b0234f8353..0000000000 --- a/Task/Bifid-cipher/M2000-Interpreter/bifid-cipher.m2000 +++ /dev/null @@ -1,68 +0,0 @@ -module Bifid_cipher (f, code$) { - n=sqrt(len(code$)) - print #f," "; - for i=1 to n - print #f, i+" "; - next - print #f - for i=0 to n-1 - Print #f, (i+1)+" "+STR$(mid$(code$,1+i*n, n),STRING$("@ ", 5)) - next - tables=lambda (a$)->{ - n=sqrt(len(a$)) - a=list - for i=1 to len(a$) - append a, mid$(a$,i, 1):=((i-1) mod n+1, (i-1) div n+1 ) - next - b=list - m=each(a) - while m - z=eval(m) - append b, z#val$(1)+z#val$(0):=eval$(m!) - end while - =a, b - }(code$) - encode= lambda (a, b)->{ - =lambda a,b (mess as string) -> { - document code$ - for n=1 to 0 - for i=1 to len(mess) - q=mid$(mess, i,1) - if not exist(a, q) then - if q="J" then q="I" else q="A" - end if - code$=a(q)#val$(n) - next - next - document final$ - for i=1 to len(code$) step 2 - final$=b$(mid$(code$, i, 2)) - next - = final$ - } - }(!tables) - decode= lambda (a, b)->{ - =lambda a,b (final as string) -> { - document code$, mess$ - for i=1 to len(final) - q=a(mid$(final, i, 1)) - code$=q#val$(1)+q#val$(0) - next - offset=len(code$) div 2 - for i=1 to offset - mess$=b$(mid$(code$,i,1)+mid$(code$,i+offset,1)) - next - = mess$ - } - }(!tables) - Print #f, encode("ATTACKATDAWN") - Print #f, decode(encode("ATTACKATDAWN"))="ATTACKATDAWN" - Print #f, encode(ucase$(filter$("The invasion will start on the first of January", " "))) - Print #f, decode(encode(ucase$(filter$("The invasion will start on the first of January", " ")))) -} -open "out.txt" for output as #a -Bifid_cipher a, "ABCDEFGHIKLMNOPQRSTUVWXYZ" -Bifid_cipher a, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" -Bifid_cipher a, "BGWKZQPNDSIOAXEFCLUMTHYVR" -close #a -win "out.txt" diff --git a/Task/Bifid-cipher/PascalABC.NET/bifid-cipher.pas b/Task/Bifid-cipher/PascalABC.NET/bifid-cipher.pas deleted file mode 100644 index 4440353bf4..0000000000 --- a/Task/Bifid-cipher/PascalABC.NET/bifid-cipher.pas +++ /dev/null @@ -1,28 +0,0 @@ -// Bifid cipher. Nigel Galloway: September 18th., 2024 -function polybius(alphabet:string;n,g:integer):(Dictionary,Dictionary<(integer,integer),char>); -begin - var ng:=Cartesian(1..n,1..g); - Result:=(Dict(Zip(alphabet,ng)),Dict(Zip(ng,alphabet))); -end; -function fN(e:Dictionary;n:string):(sequence of integer,sequence of integer):=(n.Substring(1).Scan(e[n[1]],(n,g)->e[g])).UnZipTuple; -function encrypt(e:(Dictionary,Dictionary<(integer,integer),char>);text:string):string; -begin - var fG:((sequence of integer,sequence of integer),Dictionary<(integer,integer),char>)->string:=(n,e)->(n[0]+n[1]).Batch(2).Aggregate('',(n,g)->n+e[(g[0],g[1])]); - Result:=fG(fN(e[0],text),e[1]); -end; -function decrypt(e:(Dictionary,Dictionary<(integer,integer),char>);text:string):string; -begin - var fG:(sequence of (integer,integer),Dictionary<(integer,integer),char>)->string:=(n,e)->n.Aggregate('',(n,g)->n+e[(g[0],g[1])]); - var t:=fN(e[0],text); var z:=t[0].Interleave(t[1]).SplitAt(t[0].count); - Result:=fG(z[0].ZipTuple(z[1]),e[1]); -end; -begin - var p:=polybius('abcdefghiklmnopqrstuvwxyz',5,5); var s,e:string; - s:='fleeatonce'; e:=encrypt(p,s); println($'{s} -> {e} -> {decrypt(p,e)}'); - s:='attackatdawn'; e:=encrypt(p,s); println($'{s} -> {e} -> {decrypt(p,e)}'); - p:=polybius('bgwkzqpndsioaxefclumthyvr',5,5); - e:=encrypt(p,s); println($'{s} -> {e} -> {decrypt(p,e)}'); - s:='fleeatonce'; e:=encrypt(p,s); println($'{s} -> {e} -> {decrypt(p,e)}'); - p:=polybius('abcdefghijklmnopqrstuvwxyz0123456789',6,6); - s:='theinvasionwillstarton1january2025'; e:=encrypt(p,s); println($'{s} -> {e} -> {decrypt(p,e)}'); -end. diff --git a/Task/Bifid-cipher/Phix/bifid-cipher.phix b/Task/Bifid-cipher/Phix/bifid-cipher.phix index e1aa112fda..57af305806 100644 --- a/Task/Bifid-cipher/Phix/bifid-cipher.phix +++ b/Task/Bifid-cipher/Phix/bifid-cipher.phix @@ -1,39 +1,41 @@ -with javascript_semantics -enum encrypt,decrypt -function bifid(string msg, polybius, sequence p, integer n, ed) - string res = "" - sequence dx = {}, dy = {}, dxy - for i=1 to length(msg) do - integer k = find(msg[i],polybius)-1 - dx &= floor(k/n)+1 - dy &= remainder(k,n)+1 - end for - if ed=encrypt then - dxy = split_by(dx&dy,2) - else - -- "simply reversing these steps" - yeah, right... - dxy = columnize(split_by(flatten(columnize({dx,dy})),length(dx))) - end if - for i=1 to length(dxy) do - integer {x,y} = dxy[i] - res &= p[x][y] - end for - return res -end function +(phixonline)--> + with javascript_semantics + enum encrypt,decrypt + function bifid(string msg, polybius, sequence p, integer n, ed) + string res = "" + sequence dx = {}, dy = {}, dxy + for i=1 to length(msg) do + integer k = find(msg[i],polybius)-1 + dx &= floor(k/n)+1 + dy &= remainder(k,n)+1 + end for + if ed=encrypt then + dxy = split_by(dx&dy,2) + else + -- "simply reversing these steps" - yeah, right... + dxy = columnize(split_by(flatten(columnize({dx,dy})),length(dx))) + end if + for i=1 to length(dxy) do + integer {x,y} = dxy[i] + res &= p[x][y] + end for + return res + end function -procedure test(string msg, polybius) - integer n = sqrt(length(polybius)) - if n=5 then msg = substitute(upper(msg),"J","I") end if - sequence p = split_by(polybius,n) - string enc = bifid(msg,polybius,p,n,encrypt), - dec = bifid(enc,polybius,p,n,decrypt) - printf(1,"For %dx%d polybius %s\n\n",{n,n,join(p,"\n ")}) - printf(1,"Message : %s\nEncrypted: %s\nDecrypted: %s\n\n",{msg,enc,dec}) -end procedure + procedure test(string msg, polybius) + integer n = sqrt(length(polybius)) + if n=5 then msg = substitute(upper(msg),"J","I") end if + sequence p = split_by(polybius,n) + string enc = bifid(msg,polybius,p,n,encrypt), + dec = bifid(enc,polybius,p,n,decrypt) + printf(1,"For %dx%d polybius %s\n\n",{n,n,join(p,"\n ")}) + printf(1,"Message : %s\nEncrypted: %s\nDecrypted: %s\n\n",{msg,enc,dec}) + end procedure -constant polybii = {tagstart('A','J'-'A')&tagstart('K','Z'-'J'), - "BGWKZQPNDSIOAXEFCLUMTHYVR", - " ."&tagstart('A',26)&tagstart('a',26)&tagstart('0',10)}, - messages = {"ATTACKATDAWN","FLEEATONCE", - "The invasion will start on the first of January 2023."} -for t=1 to 3 do test(messages[t],polybii[t]) end for + constant polybii = {tagstart('A','J'-'A')&tagstart('K','Z'-'J'), + "BGWKZQPNDSIOAXEFCLUMTHYVR", + " ."&tagstart('A',26)&tagstart('a',26)&tagstart('0',10)}, + messages = {"ATTACKATDAWN","FLEEATONCE", + "The invasion will start on the first of January 2023."} + for t=1 to 3 do test(messages[t],polybii[t]) end for + + with javascript_semantics + function bin_it(sequence limits, data) + -- Bin data according to (ascending) limits. + sequence bins = repeat(0,length(limits)+1) -- adds under/over range bins too + for i=1 to length(data) do + integer bdx = binary_search(data[i],limits) + bdx = abs(bdx)+(bdx>0) + bins[bdx] += 1 + end for + return bins + end function -procedure bin_print(sequence limits, bins) - printf(1," < %3d := %3d\n",{limits[1],bins[1]}) - for i=2 to length(limits) do - printf(1,">= %3d and < %3d := %3d\n",{limits[i-1],limits[i],bins[i]}) - end for - printf(1,">= %3d := %3d\n\n",{limits[$],bins[$]}) -end procedure + procedure bin_print(sequence limits, bins) + printf(1," < %3d := %3d\n",{limits[1],bins[1]}) + for i=2 to length(limits) do + printf(1,">= %3d and < %3d := %3d\n",{limits[i-1],limits[i],bins[i]}) + end for + printf(1,">= %3d := %3d\n\n",{limits[$],bins[$]}) + end procedure -sequence limits, data -printf(1,"Example 1:\n") -limits = {23, 37, 43, 53, 67, 83} -data = {95,21,94,12,99,4,70,75,83,93,52,80,57,5,53,86,65,17,92,83,71,61,54,58,47, - 16, 8, 9,32,84,7,87,46,19,30,37,96,6,98,40,79,97,45,64,60,29,49,36,43,55} -bin_print(limits, bin_it(limits, data)) + sequence limits, data + printf(1,"Example 1:\n") + limits = {23, 37, 43, 53, 67, 83} + data = {95,21,94,12,99,4,70,75,83,93,52,80,57,5,53,86,65,17,92,83,71,61,54,58,47, + 16, 8, 9,32,84,7,87,46,19,30,37,96,6,98,40,79,97,45,64,60,29,49,36,43,55} + bin_print(limits, bin_it(limits, data)) -printf(1,"Example 2:\n") -limits = {14, 18, 249, 312, 389, 392, 513, 591, 634, 720} -data = {445,814,519,697,700,130,255,889,481,122,932, 77,323,525,570,219,367,523,442,933, - 416,589,930,373,202,253,775, 47,731,685,293,126,133,450,545,100,741,583,763,306, - 655,267,248,477,549,238, 62,678, 98,534,622,907,406,714,184,391,913, 42,560,247, - 346,860, 56,138,546, 38,985,948, 58,213,799,319,390,634,458,945,733,507,916,123, - 345,110,720,917,313,845,426, 9,457,628,410,723,354,895,881,953,677,137,397, 97, - 854,740, 83,216,421, 94,517,479,292,963,376,981,480, 39,257,272,157, 5,316,395, - 787,942,456,242,759,898,576, 67,298,425,894,435,831,241,989,614,987,770,384,692, - 698,765,331,487,251,600,879,342,982,527,736,795,585, 40, 54,901,408,359,577,237, - 605,847,353,968,832,205,838,427,876,959,686,646,835,127,621,892,443,198,988,791, - 466, 23,707,467, 33,670,921,180,991,396,160,436,717,918, 8,374,101,684,727,749} -bin_print(limits, bin_it(limits, data)) + printf(1,"Example 2:\n") + limits = {14, 18, 249, 312, 389, 392, 513, 591, 634, 720} + data = {445,814,519,697,700,130,255,889,481,122,932, 77,323,525,570,219,367,523,442,933, + 416,589,930,373,202,253,775, 47,731,685,293,126,133,450,545,100,741,583,763,306, + 655,267,248,477,549,238, 62,678, 98,534,622,907,406,714,184,391,913, 42,560,247, + 346,860, 56,138,546, 38,985,948, 58,213,799,319,390,634,458,945,733,507,916,123, + 345,110,720,917,313,845,426, 9,457,628,410,723,354,895,881,953,677,137,397, 97, + 854,740, 83,216,421, 94,517,479,292,963,376,981,480, 39,257,272,157, 5,316,395, + 787,942,456,242,759,898,576, 67,298,425,894,435,831,241,989,614,987,770,384,692, + 698,765,331,487,251,600,879,342,982,527,736,795,585, 40, 54,901,408,359,577,237, + 605,847,353,968,832,205,838,427,876,959,686,646,835,127,621,892,443,198,988,791, + 466, 23,707,467, 33,670,921,180,991,396,160,436,717,918, 8,374,101,684,727,749} + bin_print(limits, bin_it(limits, data)) + + with javascript_semantics + string s = "abc" + s = x"ef bb bf" -- explicit binary string (the utf8 BOM) + s[2] = 0 + s[3] = 'z' + if s="\#EF\0z" then puts(1,"ok\n") end if + string t = s + t[1..2] = "xy" -- s remains unaltered + ?t -- "xyz" + t = "food" ?t + t[2..3] = 'e' ?t -- "feed" + t[3..2] = "ast" ?t -- "feasted" + t[3..-2] = "" ?t -- "fed" + if length(t)=0 then puts(1,"t is empty\n") end if + if t!="" then puts(1,"t is not empty\n") end if + t = "be" + t &= 't' ?t -- bet + t = 'a'&t ?t -- abet + ?t[2..3] -- be + ?substitute(t,"be","bbo") -- abbot + ?substitute(t,"be","dep") -- adept + t = substitute(t,"be","dep") -- to actually modify t + ?join({"abc","def","ghi"}) -- "abc def ghi" + ?join({"abc","def","ghi"},"") -- "abcdefghi" + ?join({"abc","def","ghi"},"\n") -- "abc\ndef\nghi" + + constant dna = substitute(""" + CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG + CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG + AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT + GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT + CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG + TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA + TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT + CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG + TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC + GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT + ""","\n","") + sequence acgt = repeat(0,5) + for i=1 to length(dna) do + acgt[find(dna[i],"ACGT")] += 1 + end for + acgt[$] = sum(acgt) + sequence s = split(trim(join_by(split(join_by(dna,1,10,""),"\n"),1,5," ")),"\n") + for i=1 to length(s) do + printf(1,"%3d: %s\n",{(i-1)*50+1,s[i]}) + end for + printf(1,"\nBase counts: A:%d, C:%d, G:%d, T:%d, total:%d\n",acgt) + $ ) + + [ 0 swap + [ dup $ "" != while + cr over number$ + 4 justify echo$ + 5 times + [ dup $ "" = iff + conclude done + sp + 10 split swap echo$ ] + dip [ 50 + ] again ] + 2drop ] is prettyprint ( $ --> ) + + [ stack ] is adenine ( --> s ) + [ stack ] is cytosine ( --> s ) + [ stack ] is guanine ( --> s ) + [ stack ] is thymine ( --> s ) + + [ table + adenine cytosine + guanine thymine ] is bases ( --> [ ) + + [ 4 times + [ 0 i^ bases put ] + witheach + [ $ "ACGT" find bases + 1 swap tally ] + 4 times + [ sp + i^ bases dup echo + sp share echo cr ] + 0 4 times + [ i^ bases take + ] + cr say " total " echo ] is tallybases ( [ --> ) + + $ "CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG" + $ "CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG" join + $ "AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT" join + $ "GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT" join + $ "CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG" join + $ "TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA" join + $ "TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT" join + $ "CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG" join + $ "TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC" join + $ "GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT" join + + dup prettyprint cr cr tallybases diff --git a/Task/Bioinformatics-base-count/R/bioinformatics-base-count.r b/Task/Bioinformatics-base-count/R/bioinformatics-base-count.r new file mode 100644 index 0000000000..7a6b6c1221 --- /dev/null +++ b/Task/Bioinformatics-base-count/R/bioinformatics-base-count.r @@ -0,0 +1,42 @@ +#Data +gene1 <- "CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG +CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG +AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT +GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT +CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG +TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA +TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT +CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG +TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC +GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT" + +#Analysis: +gene2 <- gsub("\n", "", gene1) #remove \n chars +gene3 <- strsplit(gene2, split = character(0)) #split into list +gene4 <- gene3[[1]] #pull out character vector from list +basecounts <- as.data.frame(table(gene4)) #make table of base counts + +#quick helper function to print table results +print_row <- function(df, row){paste0(df$gene[row],": ", df$Freq[row])} + +#Print Function for Data with Results: +cat(" Data: \n", + " 1:",substring(gene2, 1, 50),"\n", + " 51:",substring(gene2, 51, 100),"\n", + "101:",substring(gene2, 101, 150),"\n", + "151:",substring(gene2, 151, 200),"\n", + "201:",substring(gene2, 201, 250),"\n", + "251:",substring(gene2, 251, 300),"\n", + "301:",substring(gene2, 301, 350),"\n", + "351:",substring(gene2, 351, 400),"\n", + "401:",substring(gene2, 401, 450),"\n", + "451:",substring(gene2, 451, 500),"\n", + "\n", + "Base Count Results: \n", + print_row(basecounts,1), "\n", + print_row(basecounts,2), "\n", + print_row(basecounts,3), "\n", + print_row(basecounts,4), "\n", + "\n", + "Total Base Count:", paste(length(gene4)) + ) diff --git a/Task/Bioinformatics-base-count/REXX/bioinformatics-base-count.rexx b/Task/Bioinformatics-base-count/REXX/bioinformatics-base-count.rexx new file mode 100644 index 0000000000..99c88e767b --- /dev/null +++ b/Task/Bioinformatics-base-count/REXX/bioinformatics-base-count.rexx @@ -0,0 +1,36 @@ +/*REXX program finds the number of each base in a DNA string */ +/* (along with a total). */ +Parse Arg dna . +If dna==''|dna==',' Then + dna='cgtaaaaaattacaacgtcctttggctatctcttaaactcctgctaaatg', + 'ctcgtgctttccaattatgtaagcgttccgagacggggtggtcgattctg', + 'aggacaaaggtcaagatggagcgcatcgaacgcaataaggatcatttgat', + 'gggacgtttcgtcgacaaagtcttgtttcgagagtaacggctaccgtctt', + 'cgattctgcttataacactatgttcttatgaaatggatgttctgagttgg', + 'tcagtcccaatgtgcggggtttcttttagtacgtcgggagtggtattata', + 'tttaatttttctatatagcgatctgtatttaagcaattcatttaggttat', + 'cgccgcgatgctcggttcggaccgccaagcatctggctccactgctagtg', + 'tcctaaatttgaatggcaaacacaaataagatttagcaattcgtgtagac', + 'gaccggggacttgcatgatgggagcagctttgttaaactacgaacgtaat' +dna=translate(space(dna,0)) /* elide blanks from DNA; uppercas*/ +Say '--------length of the DNA string: ' length(dna) +count.=0 /* initialize the count for all bases*/ +w=1 /* the maximum width of a base count */ +names='' /* list of all names */ +Do j=1 To length(dna) /* traipse through the DNA string */ + name=substr(dna,j,1) /* obtain a base name from the DNA */ + If pos(name,names)==0 Then + names=names||name /* if not found, add it to the list */ + count.name=count.name+1 /* bump the count of this base. */ + w=max(w,length(count.name)) /* compute the maximum number width */ + End +Say +Do k=0 To 255 + z=d2c(k) /* traipse through all possibilities */ + If pos(z,names)>0 Then Do + Say ' base ' z ' has a basecount of: ' right(count.z,w) + count.tot=count.tot+count.z /* add to a grand total to verify */ + End + End +Say +Say '--------total for all basecounts:' right(count.tot,w+1) diff --git a/Task/Bioinformatics-base-count/Racket/bioinformatics-base-count.rkt b/Task/Bioinformatics-base-count/Racket/bioinformatics-base-count.rkt new file mode 100644 index 0000000000..b0614e6269 --- /dev/null +++ b/Task/Bioinformatics-base-count/Racket/bioinformatics-base-count.rkt @@ -0,0 +1,55 @@ +#lang racket + +(define (fold-sequence seq kons #:finalise (finalise (λ x (apply values x))) . k0s) + (define (recur seq . ks) + (if (null? seq) + (call-with-values (λ () (apply finalise ks)) (λ vs (apply values vs))) + (call-with-values (λ () (apply kons (car seq) ks)) (λ ks+ (apply recur (cdr seq) ks+))))) + (apply recur (if (string? seq) (string->list (regexp-replace* #px"[^ACGT]" seq "")) seq) k0s)) + +(define (sequence->pretty-printed-string seq) + (define (fmt idx cs-rev) (format "~a: ~a" (~a idx #:width 3 #:align 'right) (list->string (reverse cs-rev)))) + (fold-sequence + seq + (λ (b n start-idx lns-rev cs-rev) + (if (zero? (modulo n 50)) + (values (+ n 1) n (if (pair? cs-rev) (cons (fmt start-idx cs-rev) lns-rev) lns-rev) (cons b null)) + (values (+ n 1) start-idx lns-rev (cons b cs-rev)))) + 0 0 null null + #:finalise (λ (n idx lns-rev cs-rev) + (string-join (reverse (if (null? cs-rev) lns-rev (cons (fmt idx cs-rev) lns-rev))) "\n")))) + +(define (count-bases b as cs gs ts n) + (values (+ as (if (eq? b #\A) 1 0)) + (+ cs (if (eq? b #\C) 1 0)) + (+ gs (if (eq? b #\T) 1 0)) + (+ ts (if (eq? b #\G) 1 0)) + (add1 n))) + +(define (bioinformatics-Base_count s) + (define-values (as cs gs ts n) (fold-sequence s count-bases 0 0 0 0 0)) + (printf "SEQUENCE:~%~%~a~%~%" (sequence->pretty-printed-string s)) + (printf "BASE COUNT:~%-----------~%~%~a~%~%" + (string-join (map (λ (c n) (format " ~a :~a" c (~a #:width 4 #:align 'right n))) + '(A T C G) + (list as ts cs gs)) "\n")) + (newline) + (printf "TOTAL: ~a~%" n)) + +(module+ + main + (define the-string + #< = base_count.iter().collect(); // HashMaps can't be sorted, so collect into Vec + base_count.sort_by_key(|bc| bc.0); // Sort bases alphabetically + for (base, count) in base_count.iter() { + println!(" {}: {:3}", base, count); + } + println!(); + println!("Total: {}", total_count); +} diff --git a/Task/Bioinformatics-base-count/Swift/bioinformatics-base-count.swift b/Task/Bioinformatics-base-count/Swift/bioinformatics-base-count.swift new file mode 100644 index 0000000000..22b27dd044 --- /dev/null +++ b/Task/Bioinformatics-base-count/Swift/bioinformatics-base-count.swift @@ -0,0 +1,22 @@ +import Foundation + +let dna = """ + CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG + CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG + AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT + GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT + CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG + TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA + TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT + CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG + TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC + GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT + """ + +print("input:\n\(dna)\n") + +let counts = + dna.replacingOccurrences(of: "\n", with: "").reduce(into: [:], { $0[$1, default: 0] += 1 }) + +print("Counts: \(counts)") +print("Total: \(counts.values.reduce(0, +))") diff --git a/Task/Bioinformatics-base-count/Tcl/bioinformatics-base-count.tcl b/Task/Bioinformatics-base-count/Tcl/bioinformatics-base-count.tcl new file mode 100644 index 0000000000..0d691e71c8 --- /dev/null +++ b/Task/Bioinformatics-base-count/Tcl/bioinformatics-base-count.tcl @@ -0,0 +1,28 @@ +namespace path ::tcl::mathop + +proc process {data {width 50}} { + set len [string length $data] + set addrwidth [string length [* [/ $len $width] $width]] + for {set i 0} {$i < $len} {incr i $width} { + puts "[format %${addrwidth}u $i] [string range $data $i $i+[- $width 1]]" + } + puts "\nBase count:" + foreach base {A C G T} { + puts "$base [regexp -all $base $data]" + } + puts "Total $len" +} + + +set test [string cat \ + CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG \ + CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG \ + AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT \ + GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT \ + CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG \ + TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA \ + TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT \ + CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG \ + TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC \ + GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT] +process $test 50 diff --git a/Task/Bioinformatics-base-count/V-(Vlang)/bioinformatics-base-count.v b/Task/Bioinformatics-base-count/V-(Vlang)/bioinformatics-base-count.v new file mode 100644 index 0000000000..36e3777cd4 --- /dev/null +++ b/Task/Bioinformatics-base-count/V-(Vlang)/bioinformatics-base-count.v @@ -0,0 +1,37 @@ +fn main() { + dna := "" + + "CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG" + + "CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG" + + "AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT" + + "GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT" + + "CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG" + + "TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA" + + "TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT" + + "CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG" + + "TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC" + + "GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT" + + println("SEQUENCE:") + le := dna.len + for i := 0; i < le; i += 50 { + mut k := i + 50 + if k > le { + k = le + } + println("${i:5}: ${dna[i..k]}") + } + mut base_map := map[byte]int{} // allows for 'any' base + for i in 0..le { + base_map[dna[i]]++ + } + mut bases := base_map.keys() + bases.sort() + + println("\nBASE COUNT:") + for base in bases { + println(" $base: ${base_map[base]:3}") + } + println(" ------") + println(" Σ: $le") + println(" ======") +} diff --git a/Task/Bioinformatics-base-count/VBScript/bioinformatics-base-count.vb b/Task/Bioinformatics-base-count/VBScript/bioinformatics-base-count.vb new file mode 100644 index 0000000000..422d98cd55 --- /dev/null +++ b/Task/Bioinformatics-base-count/VBScript/bioinformatics-base-count.vb @@ -0,0 +1,31 @@ +b=_ +"CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG" &_ +"CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG" &_ +"AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT" &_ +"GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT" &_ +"CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG" &_ +"TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA" &_ +"TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT" &_ +"CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG" &_ +"TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC" &_ +"GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT" + +s="SEQUENCE:" +acnt=0:ccnt=0:gcnt=0:tcnt=0 + +for i=0 to len(b)-1 + if (i mod 30)=0 then s = s & vbcrlf & right(" "& i+1,3)&": " + if (i mod 5)=0 then s=s& " " + m=mid(b,i+1,1) + s=s & m + select case m + case "A":acnt=acnt+1 + case "C":ccnt=ccnt+1 + case "G":gcnt=gcnt+1 + case "T":tcnt=tcnt+1 + case else + wscript.echo "error at ",i+1, m + end select +next +wscript.echo s & vbcrlf +wscript.echo "Count: A="&acnt & " C=" & ccnt & " G=" & gcnt & " T=" & tcnt diff --git a/Task/Bioinformatics-base-count/Wren/bioinformatics-base-count.wren b/Task/Bioinformatics-base-count/Wren/bioinformatics-base-count.wren new file mode 100644 index 0000000000..e8b0e06487 --- /dev/null +++ b/Task/Bioinformatics-base-count/Wren/bioinformatics-base-count.wren @@ -0,0 +1,38 @@ +import "./fmt" for Fmt +import "./sort" for Sort +import "./iterate" for Stepped + +var dna = "CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG" + + "CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG" + + "AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT" + + "GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT" + + "CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG" + + "TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA" + + "TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT" + + "CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG" + + "TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC" + + "GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT" + +System.print("SEQUENCE:") +var le = dna.count +for (i in Stepped.new(0...le, 50)) { + var k = i + 50 + if (k > le) k = le + System.print("%(Fmt.d(5, i)): %(dna[i...k])") +} +var baseMap = {} // allows for 'any' base +for (i in 0...le) { + var d = dna[i] + var v = baseMap[d] + baseMap[d] = !v ? 1 : v + 1 +} +var bases = baseMap.keys.toList +Sort.quick(bases) + +System.print("\nBASE COUNT:") +for (base in bases) { + System.print(" %(base): %(Fmt.d(3, baseMap[base]))") +} +System.print(" ------") +System.print(" Σ: %(le)") +System.print(" ======") diff --git a/Task/Bioinformatics-base-count/XPL0/bioinformatics-base-count.xpl0 b/Task/Bioinformatics-base-count/XPL0/bioinformatics-base-count.xpl0 new file mode 100644 index 0000000000..2f6adbf6f4 --- /dev/null +++ b/Task/Bioinformatics-base-count/XPL0/bioinformatics-base-count.xpl0 @@ -0,0 +1,35 @@ +char Bases; +int Counts(256), Cnt, I, Ch; +[Bases:= " +CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG +CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG +AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT +GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT +CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG +TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA +TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT +CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG +TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC +GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAATx "; + +for I:= 0 to 255 do Counts(I):= 0; +Format(5, 0); +Cnt:= 0; +I:= 0; +loop [repeat Ch:= Bases(I); + I:= I+1; + if Ch = ^x then quit; + Counts(Ch):= Counts(Ch)+1; + ChOut(0, Ch); + until Ch = \LF\$0A; + RlOut(0, float(Cnt)); Text(0, ": "); + Cnt:= Cnt + 50; + ]; +CrLf(0); CrLf(0); +Text(0, "Base counts A: "); IntOut(0, Counts(^A)); +Text(0, " C: "); IntOut(0, Counts(^C)); +Text(0, " G: "); IntOut(0, Counts(^G)); +Text(0, " T: "); IntOut(0, Counts(^T)); +Text(0, " +Total: "); IntOut(0, Cnt); CrLf(0); +] diff --git a/Task/Bioinformatics-base-count/Zkl/bioinformatics-base-count.zkl b/Task/Bioinformatics-base-count/Zkl/bioinformatics-base-count.zkl new file mode 100644 index 0000000000..51481d619d --- /dev/null +++ b/Task/Bioinformatics-base-count/Zkl/bioinformatics-base-count.zkl @@ -0,0 +1,19 @@ +bases:= +#<<<" +CGTAAAAAATTACAACGTCCTTTGGCTATCTCTTAAACTCCTGCTAAATG +CTCGTGCTTTCCAATTATGTAAGCGTTCCGAGACGGGGTGGTCGATTCTG +AGGACAAAGGTCAAGATGGAGCGCATCGAACGCAATAAGGATCATTTGAT +GGGACGTTTCGTCGACAAAGTCTTGTTTCGAGAGTAACGGCTACCGTCTT +CGATTCTGCTTATAACACTATGTTCTTATGAAATGGATGTTCTGAGTTGG +TCAGTCCCAATGTGCGGGGTTTCTTTTAGTACGTCGGGAGTGGTATTATA +TTTAATTTTTCTATATAGCGATCTGTATTTAAGCAATTCATTTAGGTTAT +CGCCGCGATGCTCGGTTCGGACCGCCAAGCATCTGGCTCCACTGCTAGTG +TCCTAAATTTGAATGGCAAACACAAATAAGATTTAGCAATTCGTGTAGAC +GACCGGGGACTTGCATGATGGGAGCAGCTTTGTTAAACTACGAACGTAAT" - " \n"; +#<<< + +[0..*,50].zipWith(fcn(n,bases){ println("%6d: %s".fmt(n,bases.concat())) }, + bases.walker().walk.fp(50)).pump(Void); // .pump forces the iterator + +println("\nBase Counts: ", bases.counts().pump(String,Void.Read,"%s: %d ".fmt)); +println("Total: ",bases.len()); diff --git a/Task/Biorhythms/11l/biorhythms.11l b/Task/Biorhythms/11l/biorhythms.11l index 5e64e6837e..d38daa2837 100644 --- a/Task/Biorhythms/11l/biorhythms.11l +++ b/Task/Biorhythms/11l/biorhythms.11l @@ -21,7 +21,7 @@ F biorhythms(birthdate_str, targetdate_str) V cycle_lengths = [23, 28, 33] V quadrants = [(‘up and rising’, ‘peak’), (‘up but falling’, ‘transition’), (‘down and falling’, ‘valley’), (‘down but rising’, ‘transition’)] - L(i) 0.<3 + L(i) 3 V label = cycle_labels[i] V length = cycle_lengths[i] V position = days % length diff --git a/Task/Biorhythms/ALGOL-68/biorhythms.alg b/Task/Biorhythms/ALGOL-68/biorhythms.alg deleted file mode 100644 index 9687f0aefa..0000000000 --- a/Task/Biorhythms/ALGOL-68/biorhythms.alg +++ /dev/null @@ -1,76 +0,0 @@ -BEGIN # biorythms # - - # code from the Day of the week of Christmas and New Year task # - []STRING day name = - []STRING( "SAT", "SUN", "MON", "TUE", "WED", "THU", "FRI" )[ AT 0 ]; - PROC day of week = ( INT y, m, d )INT: - BEGIN - INT mm := m; - INT yy := y; - IF mm <= 2 THEN - mm +:= 12; - yy -:= 1 - FI; - INT j = yy OVER 100; - INT k = yy MOD 100; - ( d + ( ( mm + 1 ) * 26 ) OVER 10 + k + k OVER 4 + j OVER 4 + 5 * j ) MOD 7 - END # day of week # ; - # end code from the Day of the week of Christmas and New Year task # - # code from the days between dates task # - PROC gregorian = ( INT y, m, d )INT: - BEGIN - INT n = ( m + 9 ) - ( ( ( m + 9 ) OVER 12 ) * 12 ); - INT w = y - ( n OVER 10 ); - ( 365 * w ) + ( w OVER 4 ) - ( w OVER 100 ) + ( w OVER 400 ) - + ( ( ( n * 306 ) + 5 ) OVER 10 ) + ( d - 1 ) - END # gregorian # ; - # end code from the days between dates task # - - BEGIN # main routine - translated from the Fortran sample's main program # - PROC double line = VOID: print( ( "=" * 75, newline ) ); - PROC in range = ( REAL v, INT low, high )INT: - IF v < low THEN low ELIF v > high THEN high ELSE ENTIER v FI; - - REAL pi2 = pi * 2; - - INT byear, bmon, bday, tyear, tmon, tday, nday; - print( ( "ENTER YOUR BIRTHDAY YYYY MM DD: " ) ); - read( ( byear, bmon, bday ) ); - print( ( "ENTER START DATE YYYY MM DD: " ) ); - read( ( tyear, tmon, tday ) ); - print( ( "ENTER NUMBER OF DAYS TO PLOT : " ) ); - read( ( nday ) ); - - INT jd0 = gregorian( tyear, 1, 1 ); - INT jd1 = gregorian( byear, bmon, bday ); - INT jd2 := gregorian( tyear, tmon, tday ); - INT dob = day of week( byear, bmon, bday ); - INT dow := day of week( tyear, tmon, tday ); - - double line; - print( ( "YOU WERE BORN ON A (", day name[ dob MOD 7 ], ") YOU WERE " ) ); - print( ( whole( jd2 - jd1, 0 ), " DAYS OLD ON THE START DATE.", newline ) ); - print( ( "-1", 31 * " ", "0", 30 * " ", "+1 DOY", newline ) ); - TO nday DO - INT dif = jd2 - jd1; - INT phy = in range( 3.3e1+3.2e1*sin( pi2 * dif / 2.3e1 ), 1, 65 ); - INT emd = in range( 3.3e1+3.2e1*sin( pi2 * dif / 2.8e1 ), 1, 65 ); - INT men = in range( 3.3e1+3.2e1*sin( pi2 * dif / 3.3e1 ), 1, 65 ); - STRING g row := 65 * IF day name[ dow ] = "SUN" THEN "." ELSE " " FI; - g row[ 1 ] := "|"; - g row[ 17 ] := ":"; - g row[ 33 ] := "|"; - g row[ 49 ] := ":"; - g row[ 65 ] := "|"; - g row[ phy ] := "P"; - g row[ emd ] := "E"; - g row[ men ] := "M"; - IF phy = emd OR phy = men THEN g row[ phy ] := "*" FI; - IF emd = men THEN g row[ emd ] := "*" FI; - print( ( " ", g row, " ", day name[ dow ], " ", whole( jd2 - jd0 + 1, -3 ), newline ) ); - jd2 +:= 1; - dow +:= 1 MODAB 7 - OD; - double line - END -END diff --git a/Task/Biorhythms/Ada/biorhythms.adb b/Task/Biorhythms/Ada/biorhythms.adb deleted file mode 100644 index 8f1fb796b8..0000000000 --- a/Task/Biorhythms/Ada/biorhythms.adb +++ /dev/null @@ -1,65 +0,0 @@ -with Ada.Calendar; -with Ada.Calendar.Arithmetic; -with Ada.Calendar.Formatting; -with Ada.Command_Line; -with Ada.Numerics; -with Ada.Numerics.Elementary_Functions; -with Ada.Text_IO; - -use Ada.Calendar; -use Ada.Calendar.Arithmetic; -use Ada.Calendar.Formatting; -use Ada.Command_Line; -use Ada.Numerics; -use Ada.Numerics.Elementary_Functions; -use Ada.Text_IO; - -procedure Biorhythms is - Birth_Date : Time := Value (Argument (1) & " 00:00:00"); - Target_Date : Time := Value (Argument (2) & " 00:00:00"); - Days : Day_Count := Target_Date - Birth_Date; - - -- There's not much point having types for these for such a short - -- problem, but in a big program this would be useful to prevent - -- accidentally assigning wrong values. - type Physical_Type is mod 23; - type Emotional_Type is mod 28; - type Mental_Type is mod 33; - type Biorhythm_Type is - record - Physical : Physical_Type; - Emotional : Emotional_Type; - Mental : Mental_Type; - end record; - - function To_Biorhythm (D : Day_Count) return Biorhythm_Type is - ( - Physical_Type (D mod Physical_Type'Modulus), - Emotional_Type (D mod Emotional_Type'Modulus), - Mental_Type (D mod Mental_Type'Modulus) - ); - - Biorhythm : Biorhythm_Type := To_Biorhythm (Days); - - package Float_IO is new Ada.Text_IO.Float_IO (Float); - use Float_IO; - - function To_Percent (F : Float) return Float is - (100.0 * Sin (2.0 * Pi * F)); - - procedure Report_Biorhythm (B : Biorhythm_Type) is - PFrac : Float := Float (B.Physical) / Float (Physical_Type'Modulus); - EFrac : Float := Float (B.Emotional) / Float (Emotional_Type'Modulus); - MFrac : Float := Float (B.Mental) / Float (Mental_Type'Modulus); - Physical : Float := To_Percent (PFrac); - Emotional : Float := To_Percent (EFrac); - Mental : Float := To_Percent (MFrac); - begin - Put_Line ("Age in days: " & Days'Image); - Put ("Physical cycle: "); Put (Physical, 3, 1, 0); Put ("%"); New_Line; - Put ("Emotional cycle: "); Put (Emotional, 3, 1, 0); Put ("%"); New_Line; - Put ("Mental cycle: "); Put (Mental, 3, 1, 0); Put ("%"); New_Line; - end Report_Biorhythm; -begin - Report_Biorhythm (Biorhythm); -end Biorhythms; diff --git a/Task/Biorhythms/C/biorhythms-2.c b/Task/Biorhythms/C/biorhythms-2.c index ddd8256686..3e2d9d0f69 100644 --- a/Task/Biorhythms/C/biorhythms-2.c +++ b/Task/Biorhythms/C/biorhythms-2.c @@ -3,4 +3,3 @@ gcc -o cbio cbio.c -lm Age: 10717 days Physical cycle: -27% Emotional cycle: -100% -Intellectual cycle: -100% diff --git a/Task/Biorhythms/COBOL/biorhythms-1.cob b/Task/Biorhythms/COBOL/biorhythms-1.cobol similarity index 100% rename from Task/Biorhythms/COBOL/biorhythms-1.cob rename to Task/Biorhythms/COBOL/biorhythms-1.cobol diff --git a/Task/Biorhythms/COBOL/biorhythms-2.cob b/Task/Biorhythms/COBOL/biorhythms-2.cobol similarity index 100% rename from Task/Biorhythms/COBOL/biorhythms-2.cob rename to Task/Biorhythms/COBOL/biorhythms-2.cobol diff --git a/Task/Biorhythms/Crystal/biorhythms.cr b/Task/Biorhythms/Crystal/biorhythms.cr deleted file mode 100644 index b6c9cdba70..0000000000 --- a/Task/Biorhythms/Crystal/biorhythms.cr +++ /dev/null @@ -1,48 +0,0 @@ -module BioRhythms - enum Cycle - Physical = 23 - Emotional = 28 - Mental = 33 - end - - Quadrants = [ {"up and raising", "peak"}, - {"up but falling", "transition"}, - {"down and falling", "valley"}, - {"down but raising", "transition"} ] - - def self.report (birthday, date = Time.utc) - # regularize to avoid fractional days difference - birthday, date = birthday.to_utc, date.to_utc - birthday -= birthday.time_of_day - date -= date.time_of_day - - days = (date - birthday).days - - puts "Born #{birthday.to_s("%F")}, Target #{date.to_s("%F")}" - puts "Day #{days}:" - Cycle.each do |kind, length| - position = days % length - quadrant = (position / length * 4).to_i - percentage = (Math.sin(position / length * 2 * Math::PI)*1000).to_i / 10 - description = if percentage > 95 - "peak" - elsif percentage < -95 - "valley" - elsif percentage.abs < 5 - "critical transition" - else - transition = date + ((quadrant + 1)/4 * length).to_i.days - position.days - trend, the_next = Quadrants[quadrant] - "#{percentage}% (#{trend}, next #{the_next} #{transition.to_s("%F")})" - end - puts "%-13s %2d: %s" % {kind.to_s + " day", position, description} - end - end -end - -[{"1943-03-09", "1972-07-11"}, - {"1809-01-12", "1863-11-19"}, - {"1809-02-12", "1863-11-19"}].each do |bd, target| - BioRhythms.report Time.parse_utc(bd, "%F"), Time.parse_utc(target, "%F") - puts -end diff --git a/Task/Biorhythms/Delphi/biorhythms.pas b/Task/Biorhythms/Delphi/biorhythms.delphi similarity index 100% rename from Task/Biorhythms/Delphi/biorhythms.pas rename to Task/Biorhythms/Delphi/biorhythms.delphi diff --git a/Task/Biorhythms/EasyLang/biorhythms.easy b/Task/Biorhythms/EasyLang/biorhythms.easy index 8307ee3761..ebb822d591 100644 --- a/Task/Biorhythms/EasyLang/biorhythms.easy +++ b/Task/Biorhythms/EasyLang/biorhythms.easy @@ -8,30 +8,36 @@ func day d$ . d = number substr d$ 9 2 return 367 * y - 7 * (y + (m + 9) div 12) div 4 + 275 * m div 9 + d - 730530 . -gtextsize 4 +textsize 4 func init b$ d$ . - glinewidth 0.2 - gline 50 0 50 100 - gline 0 50 100 50 + linewidth 0.2 + move 50 0 + line 50 100 + move 0 50 + line 100 50 for d = -20 to 20 - gcircle x 50 0.5 + move x 50 + circle 0.5 x += 2.5 . - gtext 4 94 b$ - gtext 4 88 d$ + move 4 94 + text b$ + move 4 88 + text d$ days = day date$ - day birth$ - gtext 4 80 days & " days" + move 4 80 + text days & " days" return days . -proc cycle now cyc t$ col . - gcolor col - gtext 4 cyc * 1.2 - 20 t$ - glinewidth 0.5 - gpenup - for d = now - 20 step 0.2 to now + 20 - y = 50 + 20 * sin (360 * d / cyc) - glineto x y - x += 0.5 +proc cycle now cyc t$ col . . + color col + move 4 cyc * 1.2 - 20 + text t$ + linewidth 0.5 + for d = now - 20 to now + 20 + p = 20 * sin (360 * d / cyc) + line x 50 + p + x += 2.5 . . days = init birth$ date$ diff --git a/Task/Biorhythms/Emacs-Lisp/biorhythms.el b/Task/Biorhythms/Emacs-Lisp/biorhythms.l similarity index 100% rename from Task/Biorhythms/Emacs-Lisp/biorhythms.el rename to Task/Biorhythms/Emacs-Lisp/biorhythms.l diff --git a/Task/Biorhythms/FutureBasic/biorhythms.basic b/Task/Biorhythms/FutureBasic/biorhythms.basic deleted file mode 100644 index 3c1d0ead45..0000000000 --- a/Task/Biorhythms/FutureBasic/biorhythms.basic +++ /dev/null @@ -1,112 +0,0 @@ -/* -Biorhythms task for Rosetta Code -https://rosettacode.org/wiki/Biorhythms - -Translated from FreeBASIC to FutureBasic -Rich Love May 24, 2024 - -Oct 16, 2024 fixed the percentage amounts - -*/ - - - -local fn Gregorian(db As str255) As short - short M, Y, D - Y = val(Left$(db,4)) : M = Val(Mid$(db,6,2)) : D = Val(Right$(db,2)) - short N = (M+9) - Int((M+9)/12) * 12 - short W = Y - Int(N/10) - short G = 365 * W + Int(W/4) - Int(W/100) + Int(W/400) - G += Int((N*306+5)/10)+(D-1) -end fn = G - - -void local fn Biorhythm(Birthdate As str255, Targetdate As str255) - - str255 TextArray(4,2) - TextArray(0,0) = "up and rising" - TextArray(1,0) = "up but falling" - TextArray(2,0) = "down and falling" - TextArray(3,0) = "down but rising" - TextArray(0,1) = "peak" - TextArray(1,1) = "transition" - TextArray(2,1) = "valley" - TextArray(3,1) = "transition" - - - short DaysBetween = fn Gregorian(Targetdate) - fn Gregorian(Birthdate) + 1 - short positionP = DaysBetween Mod 23 - short positionE = DaysBetween Mod 28 - short positionM = DaysBetween Mod 33 - short quadrantP = Int(4 * positionP / 23) - short quadrantE = Int(4 * positionE / 28) - short quadrantM = Int(4 * positionM / 33) - short percentageP = int(100 * Sin(2 * (pi * positionP) / 23)) - short percentageE = int(100 * Sin(2 * (pi * positionE) / 28)) - short percentageM = int(100 * Sin(2 * (pi * positionM) / 33)) - - str255 textP, textE, textM, Header1Text, Header2Text - - - Select Case percentageP - Case > 95 - textP = "Physical day " + str$(positionP) + " : " + "peak" - Case < -95 - textP = "Physical day " + str$(positionP) + " : " + "valley" - Case -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 - textP = "Physical day " + str$(positionP) + " : " + "critical transition" - Case Else - textP = "Physical day " + str$(positionP) + " : " + str$(percentageP) + "% (" + TextArray(quadrantP,0) + ")" - End Select - - Select Case percentageE - Case > 95 - textE = "Emotional day " + STR$(positionE) + " : " + "peak" - Case < -95 - textE = "Emotional day " + STR$(positionE) + " : " + "valley" - Case -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 - textE = "Emotional day " + STR$(positionE) + " : " + "critical transition" - Case Else - textE = "Emotional day " + STR$(positionE) + " : " + str$(percentageE) + "% (" + TextArray(quadrantE,0) + ")" - End Select - - Select Case percentageM - Case > 95 - textM = "Mental day " + str$(positionM)+ " : " + "peak" - Case < - 95 - textM = "Mental day " + str$(positionM) + " : " + "valley" - Case -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 - textM = "Mental day " + str$(positionM) + " : " + "critical transition" - Case Else - textM = "Mental day " + str$(positionM) + " : " + str$(percentageM) + "% (" + TextArray(quadrantM,0) + ")" - End Select - - Header1Text = "Born " + Birthdate + ", Target " + Targetdate - Header2Text = "Day " + str$(DaysBetween) - - Print Header1Text - Print Header2Text - Print textP - Print textE - Print textM - Print -end fn - -window 1, @"Biorhythms" -windowcenter(1) -WindowSetBackgroundColor(1,fn ColorBlack) - -print - -// Lets do four different birthdates and target dates -text ,,fn colorCyan -fn Biorhythm("1943-03-09", "1972-07-11") -text ,,fn colorGreen -fn Biorhythm("1809-02-12", "1863-11-19") // DOB for Abraham Lincoln -text ,,fn colorYellow -fn Biorhythm("1809-01-12", "1863-11-19") -text ,,fn colorWhite -fn Biorhythm("1943-03-09", "1972-07-11") // Bobby Fisher Chess Tournament - - -handleevents diff --git a/Task/Biorhythms/Julia/biorhythms.jl b/Task/Biorhythms/Julia/biorhythms.julia similarity index 100% rename from Task/Biorhythms/Julia/biorhythms.jl rename to Task/Biorhythms/Julia/biorhythms.julia diff --git a/Task/Biorhythms/Kotlin/biorhythms.kts b/Task/Biorhythms/Kotlin/biorhythms.kotlin similarity index 100% rename from Task/Biorhythms/Kotlin/biorhythms.kts rename to Task/Biorhythms/Kotlin/biorhythms.kotlin diff --git a/Task/Biorhythms/M2000-Interpreter/biorhythms.m2000 b/Task/Biorhythms/M2000-Interpreter/biorhythms.m2000 index 732e4e600f..04f46aedc7 100644 --- a/Task/Biorhythms/M2000-Interpreter/biorhythms.m2000 +++ b/Task/Biorhythms/M2000-Interpreter/biorhythms.m2000 @@ -1,21 +1,24 @@ -Module Biorhythms (birth, bioDay, N as long = 1) { - date birth, bioDay, transition - enum bio {Physical=23, Emotional=28, Mental=33} - dim quadrants(4) - quadrants(0):=("up and rising", "peak"), ("up but falling", "transition"), ("down and falling", "valley"), ("down but rising", "transition") - if N<1 then N=1 - for k=1 to N +Module Biorhythms { + form 80 + enum bio {Physical=23, Emotional=28,Mental=33} + quadrants=(("up and rising", "peak"), ("up but falling", "transition"), ("down and falling", "valley"), ("down but rising", "transition")) + date birth="1943-03-09" + date bioDay="1972-07-11", transition + for k=1 to 1 long Days=bioDay-birth - Print "Day "+bioDay+" | Age in days: "+Days + Print "Day "+Days+":" + string frm="{0:-20} : {1}", pword, dfmt="YYYY-MM-DD" - long position, percentage, length + long position, percentage, length, targetday k=each(bio) while k - length=eval(k) + length=eval(k) + position=days mod length quadrant=int(4*position/length) + targetday=bioDay // get the long value of day from date type percentage=100*sin(360*position/length) - transition=bioDay+floor((quadrant+1)/4*length)-position + transition=bioDay+floor((quadrant+1)/4*23)-position select case percentage case >95 pword="peak" @@ -24,15 +27,14 @@ Module Biorhythms (birth, bioDay, N as long = 1) { case -5 to 5 pword="critical " case else - { - pword=percentage+"% ("+quadrants(quadrant)#val$(0)+", next " - pword+=quadrants(quadrant)#val$(1)+" "+str$(transition, dfmt)+")" - } + { + pword=percentage+"% ("+quadrants#val(quadrant)#val$(0)+", next " + pword+=quadrants#val(quadrant)#val$(1)+" "+str$(transition,dfmt)+")" + } end select print format$(frm, eval$(k)+" day "+(days mod length), pword) End while bioDay++ next k } -form 80 -Biorhythms "1943-03-09", "1972-07-11" +Biorhythms diff --git a/Task/Biorhythms/Phix/biorhythms.phix b/Task/Biorhythms/Phix/biorhythms.phix index d4c003fc47..e88bb994b4 100644 --- a/Task/Biorhythms/Phix/biorhythms.phix +++ b/Task/Biorhythms/Phix/biorhythms.phix @@ -1,42 +1,44 @@ -with javascript_semantics -include timedate.e +(phixonline)--> + with javascript_semantics + include timedate.e -constant cycles = {"Physical day ", "Emotional day", "Mental day "}, - lengths = {23, 28, 33}, - quadrants = {{"up and rising", "peak"}, - {"up but falling", "transition"}, - {"down and falling", "valley"}, - {"down but rising", "transition"}} + constant cycles = {"Physical day ", "Emotional day", "Mental day "}, + lengths = {23, 28, 33}, + quadrants = {{"up and rising", "peak"}, + {"up but falling", "transition"}, + {"down and falling", "valley"}, + {"down but rising", "transition"}} -procedure biorhythms(string birthDate, targetDate) - timedate bd = parse_date_string(birthDate,{"YYYY-MM-DD"}), - td = parse_date_string(targetDate,{"YYYY-MM-DD"}) - integer days = floor(timedate_diff(bd, td, DT_DAY)/(60*60*24)) - printf(1,"Born %s, Target %s\n",{birthDate,targetDate}) - printf(1,"Day %d\n",days) - for i=1 to 3 do - integer len = lengths[i], - posn = remainder(days,len), - quadrant = floor(posn/len*4)+1 - atom percent = floor(sin(2*PI*posn/len)*1000)/10 - string cycle = cycles[i], - desc = iff(percent>95 ? " peak" : - iff(percent<-95 ? " valley" : - iff(abs(percent)<5 ? " critical transition" : "other"))) - if desc == "other" then - timedate t = adjust_timedate(td,timedelta(days:=floor(quadrant/4*len)-posn)) - string transition = format_timedate(t,"YYYY-MM-DD"), - {trend,next} = quadrants[quadrant] - desc = sprintf("%5.1f%% (%s, next %s %s)", {percent, trend, next, transition}) - end if - printf(1,"%s %2d : %s\n", {cycle, posn, desc}) - end for - printf(1,"\n") -end procedure + procedure biorhythms(string birthDate, targetDate) + timedate bd = parse_date_string(birthDate,{"YYYY-MM-DD"}), + td = parse_date_string(targetDate,{"YYYY-MM-DD"}) + integer days = floor(timedate_diff(bd, td, DT_DAY)/(60*60*24)) + printf(1,"Born %s, Target %s\n",{birthDate,targetDate}) + printf(1,"Day %d\n",days) + for i=1 to 3 do + integer len = lengths[i], + posn = remainder(days,len), + quadrant = floor(posn/len*4)+1 + atom percent = floor(sin(2*PI*posn/len)*1000)/10 + string cycle = cycles[i], + desc = iff(percent>95 ? " peak" : + iff(percent<-95 ? " valley" : + iff(abs(percent)<5 ? " critical transition" : "other"))) + if desc == "other" then + timedate t = adjust_timedate(td,timedelta(days:=floor(quadrant/4*len)-posn)) + string transition = format_timedate(t,"YYYY-MM-DD"), + {trend,next} = quadrants[quadrant] + desc = sprintf("%5.1f%% (%s, next %s %s)", {percent, trend, next, transition}) + end if + printf(1,"%s %2d : %s\n", {cycle, posn, desc}) + end for + printf(1,"\n") + end procedure -constant datePairs = { - {"1943-03-09", "1972-07-11"}, - {"1809-01-12", "1863-11-19"}, - {"1809-02-12", "1863-11-19"} // correct DOB for Abraham Lincoln -} -for i=1 to length(datePairs) do biorhythms(datePairs[i][1], datePairs[i][2]) end for + constant datePairs = { + {"1943-03-09", "1972-07-11"}, + {"1809-01-12", "1863-11-19"}, + {"1809-02-12", "1863-11-19"} // correct DOB for Abraham Lincoln + } + for i=1 to length(datePairs) do biorhythms(datePairs[i][1], datePairs[i][2]) end for + Data (byte bucket) out:=Data().fill(0,25); @@ -9,7 +9,7 @@ fcn unbase58(str){ // --> Data (byte bucket) [24..0,-1].reduce('wrap(c,idx){ c+=58*out[idx]; // throws if not enough data out[idx]=c; - c/256; // should be zero when done + c/256; // should be zero when done },n) : if(_) throw(Exception.ValueError("address too long")); }); out; diff --git a/Task/Bitcoin-public-point-to-address/C++/bitcoin-public-point-to-address.cpp b/Task/Bitcoin-public-point-to-address/C++/bitcoin-public-point-to-address.cpp deleted file mode 100644 index 3a5ee44ffc..0000000000 --- a/Task/Bitcoin-public-point-to-address/C++/bitcoin-public-point-to-address.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#include -#include -#include -#include -#include - -#include "SHA256.cpp" -#include "RIPEMD160.cpp" -SHA256 sha256{ }; -RIPEMD160 ripemd160{ }; - -const std::string BITCOIN_SPECIAL_VALUE = "04"; -const std::string BITCOIN_VERSION_NUMBER = "00"; - -std::map base_map = - { { '0', 0 }, { '1', 1 }, { '2', 2 }, { '3', 3 }, { '4', 4 }, { '5', 5 }, { '6', 6 }, { '7', 7 }, - { '8', 8 }, { '9', 9 }, { 'a', 10 }, { 'b', 11 }, { 'c', 12 }, { 'd', 13 }, { 'e', 14 }, { 'f', 15 }, - { 'A', 10 }, { 'B', 11 }, { 'C', 12 }, { 'D', 13 }, { 'E', 14 }, { 'F', 15 } }; - -std::vector hex_to_bytes(const std::string& text) { - std::vector bytes(text.size() / 2, 0); - for ( uint64_t i = 0; i < text.size(); i += 2 ) { - const uint32_t first_digit = base_map[text[i]]; - const uint32_t second_digit = base_map[text[i + 1]]; - bytes[i / 2] = ( first_digit << 4 ) + second_digit; - } - return bytes; -} - -std::string vector_to_ascii_string(const std::vector& bytes) { - std::string result = ""; - for ( uint64_t i = 0; i < bytes.size(); ++i ) { - result += static_cast(bytes[i]); - } - return result; -} - -std::vector compute_message_bytes(const std::string& text) { - // Convert the hexadecimal string 'text' into a suitable ASCII string for the SHA256 hash - std::vector bytes_1 = hex_to_bytes(text); - std::string ascii_1 = vector_to_ascii_string(bytes_1); - std::string hexSHA256 = sha256.message_digest(ascii_1); - // Convert the hexadecimal string 'hexSHA256' into a suitable ASCII string for the RIPEMD160 hash - std::vector bytes_2 = hex_to_bytes(hexSHA256); - std::string ascii_2 = vector_to_ascii_string(bytes_2); - std::string hexRIPEMD160 = BITCOIN_VERSION_NUMBER + ripemd160.message_digest(ascii_2); - return hex_to_bytes(hexRIPEMD160); -} - -std::vector compute_checksum(const std::vector& bytes) { - // Convert the given byte array into a suitable ASCII string for the first SHA256 hash - std::string ascii_1 = vector_to_ascii_string(bytes); - std::string hex_1 = sha256.message_digest(ascii_1); - // Convert the hexadecimal string 'hex1' into a suitable ASCII string for the second SHA256 hash - std::vector bytes_1 = hex_to_bytes(hex_1); - std::string ascii_2 = vector_to_ascii_string(bytes_1); - std::string hex_2 = sha256.message_digest(ascii_2); - std::vector bytes_2 = hex_to_bytes(hex_2); - std::vector result(bytes_2.begin(), bytes_2.begin() + 4); - return result; -} - -// Return the given byte array encoded into a base58 starting with most one '1' -std::string encode_base_58(std::vector bytes) { - const std::string ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; - const uint32_t ALPHABET_SIZE = ALPHABET.size(); - - std::string result(34, ' '); - for ( int64_t n = result.size() - 1; n >= 0; --n ) { - uint32_t c = 0; - for ( uint64_t i = 0; i < bytes.size(); ++i ) { - c = c * 256 + bytes[i]; - bytes[i] = c / ALPHABET_SIZE; - c %= ALPHABET_SIZE; - } - result[n] = ALPHABET[c]; - } - - while ( result.starts_with("11") ) { - result = result.substr(1); - } - return result; -} - -// Return the encoded address of the given coordinates. -std::string encode_address(const std::string& x, const std::string& y) { - std::string public_point = BITCOIN_SPECIAL_VALUE + x + y; - if ( public_point.size() != 130 ) { - throw std::invalid_argument("Invalid public point string"); - } - - std::vector message_bytes = compute_message_bytes(public_point); - std::vector checksum = compute_checksum(message_bytes); - message_bytes.insert(message_bytes.end(), checksum.begin(), checksum.end()); - return encode_base_58(message_bytes); -} - -int main() { - std::string x = "50863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B2352"; - std::string y = "2CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"; - - std::cout << encode_address(x, y) << std::endl; -} diff --git a/Task/Bitcoin-public-point-to-address/Delphi/bitcoin-public-point-to-address.pas b/Task/Bitcoin-public-point-to-address/Delphi/bitcoin-public-point-to-address.delphi similarity index 100% rename from Task/Bitcoin-public-point-to-address/Delphi/bitcoin-public-point-to-address.pas rename to Task/Bitcoin-public-point-to-address/Delphi/bitcoin-public-point-to-address.delphi diff --git a/Task/Bitcoin-public-point-to-address/FreeBASIC/bitcoin-public-point-to-address.basic b/Task/Bitcoin-public-point-to-address/FreeBASIC/bitcoin-public-point-to-address.basic deleted file mode 100644 index 902427a908..0000000000 --- a/Task/Bitcoin-public-point-to-address/FreeBASIC/bitcoin-public-point-to-address.basic +++ /dev/null @@ -1,142 +0,0 @@ -#include "SHA_256.bas" -#include "RIPEMD_160.bas" - -Const BITCOIN_SPECIAL_VALUE As String = "04" -Const BITCOIN_VERSION_NUMBER As String = "00" - -Dim Shared base_map(255) As Integer - -Sub init_base_map() - Dim As Integer i - For i = 0 To 255 - base_map(i) = -1 - Next - For i = 0 To 9 - base_map(Asc("0") + i) = i - Next - For i = 0 To 5 - base_map(Asc("a") + i) = 10 + i - base_map(Asc("A") + i) = 10 + i - Next - For i = 6 To 15 - base_map(Asc("a") + i) = 10 + i - base_map(Asc("A") + i) = 10 + i - Next -End Sub - -Sub hex_to_bytes(text As String, bytes() As Integer) - Dim As Integer first_digit, second_digit - Dim As Integer n = Len(text) \ 2 - Redim bytes(n - 1) - - For i As Integer = 0 To n - 1 - first_digit = base_map(Asc(Mid(text, 2 * i + 1, 1))) - second_digit = base_map(Asc(Mid(text, 2 * i + 2, 1))) - bytes(i) = (first_digit Shl 4) + second_digit - Next -End Sub - -Function vector_to_ascii_string(bytes() As Integer) As String - Dim As String result = "" - - For i As Integer = 0 To Ubound(bytes) - result &= Chr(bytes(i)) - Next - - Return result -End Function - -Sub compute_message_bytes(text As String, out_bytes() As Integer) - Dim As Integer bytes_1() - hex_to_bytes(text, bytes_1()) - - Dim As String ascii_1 = vector_to_ascii_string(bytes_1()) - Dim As String hexSHA_256 = SHA_256(ascii_1) - Dim As Integer bytes_2() - hex_to_bytes(hexSHA_256, bytes_2()) - - Dim As String ascii_2 = vector_to_ascii_string(bytes_2()) - Dim As String hexRIPEMD_160 = BITCOIN_VERSION_NUMBER & RIPEMD_160(ascii_2) - hex_to_bytes(hexRIPEMD_160, out_bytes()) -End Sub - -Sub compute_checksum(bytes() As Integer, out_checksum() As Integer) - Dim As String ascii_1 = vector_to_ascii_string(bytes()) - Dim As String hex_1 = SHA_256(ascii_1) - Dim As Integer bytes_1() - hex_to_bytes(hex_1, bytes_1()) - - Dim As String ascii_2 = vector_to_ascii_string(bytes_1()) - Dim As String hex_2 = SHA_256(ascii_2) - Dim As Integer bytes_2() - hex_to_bytes(hex_2, bytes_2()) - Redim out_checksum(3) - - For i As Integer = 0 To 3 - out_checksum(i) = bytes_2(i) - Next -End Sub - -Function encode_base_58(bytes() As Integer) As String - Const As String ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" - Const As Integer ALPHABET_SIZE = 58 - Dim As String result = String(34, " ") - Dim As Integer i, j, n, c - Dim As Integer temp() - - Redim As Integer bytes_copy(Ubound(bytes)) - For i = 0 To Ubound(bytes) - bytes_copy(i) = bytes(i) - Next - - For n = Len(result) - 1 To 0 Step -1 - c = 0 - For i = 0 To Ubound(bytes_copy) - c = c * 256 + bytes_copy(i) - bytes_copy(i) = c \ ALPHABET_SIZE - c Mod= ALPHABET_SIZE - Next - Mid(result, n + 1, 1) = Mid(ALPHABET, c + 1, 1) - Next - - ' Quitar los '1' iniciales extra - While Left(result, 2) = "11" - result = Mid(result, 2) - Wend - Return result -End Function - -Function encode_address(x As String, y As String) As String - Dim As String public_point = BITCOIN_SPECIAL_VALUE & x & y - If Len(public_point) <> 130 Then - Print "Invalid public point string" - Exit Function - End If - Dim As Integer message_bytes() - compute_message_bytes(public_point, message_bytes()) - - Dim As Integer checksum() - compute_checksum(message_bytes(), checksum()) - - Dim As Integer i - Dim As Integer full_bytes() - Redim full_bytes(Ubound(message_bytes) + 4) - For i = 0 To Ubound(message_bytes) - full_bytes(i) = message_bytes(i) - Next - For i = 0 To 3 - full_bytes(Ubound(message_bytes) + 1 + i) = checksum(i) - Next - - Return encode_base_58(full_bytes()) -End Function - -' Test Program -init_base_map() - -Dim As String x = "50863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B2352" -Dim As String y = "2CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6" - -Print encode_address(x, y) - -Sleep diff --git a/Task/Bitcoin-public-point-to-address/Java/bitcoin-public-point-to-address.java b/Task/Bitcoin-public-point-to-address/Java/bitcoin-public-point-to-address.java deleted file mode 100644 index 6f28ff3d99..0000000000 --- a/Task/Bitcoin-public-point-to-address/Java/bitcoin-public-point-to-address.java +++ /dev/null @@ -1,99 +0,0 @@ -import java.math.BigInteger; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import java.util.stream.Collectors; - -public final class BitcoinPublicPointToAddess { - - public static void main(String[] args) { - String x = "50863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B2352"; - String y = "2CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"; - - if ( areValidCoordinates(x, y) ) { - System.out.println(encodeAddress(x, y)); - } else { - System.out.println("Invalid Bitcoin public point coordinates"); - } - } - - // Return the encoded address of the given coordinates. - private static String encodeAddress(String x, String y) { - String publicPoint = BITCOIN_SPECIAL_VALUE + x + y; - if ( publicPoint.length() != 130 ) { - throw new AssertionError("Invalid public point string: " + publicPoint); - } - - byte[] messageBytes = computeMessageBytes(publicPoint); - byte[] checksum = computeChecksum(messageBytes); - messageBytes = Arrays.copyOf(messageBytes, messageBytes.length + 4); - System.arraycopy(checksum, 0, messageBytes, 21, checksum.length); - return encodeBase58(messageBytes); - } - - // Return the given byte array encoded into a base58 starting with most one '1' - private static String encodeBase58(byte[] bytes) { - final String ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; - final int ALPHABET_SIZE = ALPHABET.length(); - - String[] temp = new String[34]; - for ( int n = temp.length - 1; n >= 0; n-- ) { - int c = 0; - for ( int i = 0; i < bytes.length; i++ ) { - c = c * 256 + (int) ( bytes[i] & 0xFF ); - bytes[i] = (byte) ( c / ALPHABET_SIZE ); - c %= ALPHABET_SIZE; - } - temp[n] = ALPHABET.substring(c, c + 1); - } - - String result = Arrays.stream(temp).collect(Collectors.joining("")); - while ( result.startsWith("11") ) { - result = result.substring(1); - } - return result; - } - - // Return whether the given coordinates are those of a point on the secp256k1 elliptic curve - private static boolean areValidCoordinates(String x, String y) { - BigInteger modulus = new BigInteger("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", 16); - BigInteger X = new BigInteger(x, 16); - BigInteger Y = new BigInteger(y, 16); - return Y.multiply(Y).mod(modulus).equals(X.multiply(X).multiply(X).add(BigInteger.valueOf(7)).mod(modulus)); - } - - private static byte[] computeMessageBytes(String text) { - // Convert the hexadecimal string 'text' into a suitable ASCII string for the SHA256 hash - byte[] bytesOne = hexToBytes(text); - String asciiOne = new String(bytesOne, StandardCharsets.ISO_8859_1); - String hexSHA256 = SHA256.messageDigest(asciiOne); - // Convert the hexadecimal string 'hexSHA256' into a suitable ASCII string for the RIPEMD160 hash - byte[] bytesTwo = hexToBytes(hexSHA256); - String asciiTwo = new String(bytesTwo, StandardCharsets.ISO_8859_1); - String hexRIPEMD160 = BITCOIN_VERSION_NUMBER + RIPEMD160.messageDigest(asciiTwo); - return hexToBytes(hexRIPEMD160); - } - - private static byte[] computeChecksum(byte[] bytes) { - // Convert the given byte array into a suitable ASCII string for the first SHA256 hash - String asciiOne = new String(bytes, StandardCharsets.ISO_8859_1); - String hexOne = SHA256.messageDigest(asciiOne); - // Convert the hexadecimal string 'hex1' into a suitable ASCII string for the second SHA256 hash - byte[] bytesOne = hexToBytes(hexOne); - String asciiTwo = new String(bytesOne, StandardCharsets.ISO_8859_1); - String hexTwo = SHA256.messageDigest(asciiTwo); - return Arrays.copyOfRange(hexToBytes(hexTwo), 0, 4); - } - - private static byte[] hexToBytes(String text) { - byte[] bytes = new byte[text.length() / 2]; - for ( int i = 0; i < text.length(); i += 2 ) { - final int firstDigit = Character.digit(text.charAt(i), 16); - final int secondDigit = Character.digit(text.charAt(i + 1), 16); - bytes[i / 2] = (byte) ( ( firstDigit << 4 ) + secondDigit );; - } - return bytes; - } - - private static final String BITCOIN_SPECIAL_VALUE = "04"; - private static final String BITCOIN_VERSION_NUMBER = "00"; -} diff --git a/Task/Bitcoin-public-point-to-address/JavaScript/bitcoin-public-point-to-address.js b/Task/Bitcoin-public-point-to-address/JavaScript/bitcoin-public-point-to-address.js deleted file mode 100644 index 1076901568..0000000000 --- a/Task/Bitcoin-public-point-to-address/JavaScript/bitcoin-public-point-to-address.js +++ /dev/null @@ -1,52 +0,0 @@ -const crypto = require('crypto'); - -const digits58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; - -function b58(n) { - if (n === 0n) return ''; - return b58(n / 58n) + digits58[Number(n % 58n)]; -} - -function publicPointToAddress(x, y) { - // Convert hex strings to buffers - const xBuffer = Buffer.from(x, 'hex'); - const yBuffer = Buffer.from(y, 'hex'); - - // Create uncompressed public key format (0x04 + x + y) - const publicKey = Buffer.concat([Buffer.from([0x04]), xBuffer, yBuffer]); - - // SHA256 hash - const sha256Hash = crypto.createHash('sha256').update(publicKey).digest(); - - // RIPEMD160 hash - const ripemd160Hash = crypto.createHash('ripemd160').update(sha256Hash).digest(); - - // Add version byte (0x00 for mainnet) - const versionedHash = Buffer.concat([Buffer.from([0x00]), ripemd160Hash]); - - // Double SHA256 for checksum - const checksum = crypto.createHash('sha256') - .update(crypto.createHash('sha256').update(versionedHash).digest()) - .digest() - .slice(0, 4); - - // Combine versioned hash with checksum - const addressBytes = Buffer.concat([versionedHash, checksum]); - - // Convert to BigInt for base58 encoding - let n = 0n; - for (let i = 0; i < addressBytes.length; i++) { - n = (n << 8n) | BigInt(addressBytes[i]); - } - - return b58(n); -} - -// Test with the provided values -if (require.main === module) { - const address = publicPointToAddress( - '50863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B2352', - '2CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6' - ); - console.log(address); -} diff --git a/Task/Bitcoin-public-point-to-address/Julia/bitcoin-public-point-to-address-1.jl b/Task/Bitcoin-public-point-to-address/Julia/bitcoin-public-point-to-address-1.julia similarity index 100% rename from Task/Bitcoin-public-point-to-address/Julia/bitcoin-public-point-to-address-1.jl rename to Task/Bitcoin-public-point-to-address/Julia/bitcoin-public-point-to-address-1.julia diff --git a/Task/Bitcoin-public-point-to-address/Julia/bitcoin-public-point-to-address-2.jl b/Task/Bitcoin-public-point-to-address/Julia/bitcoin-public-point-to-address-2.julia similarity index 100% rename from Task/Bitcoin-public-point-to-address/Julia/bitcoin-public-point-to-address-2.jl rename to Task/Bitcoin-public-point-to-address/Julia/bitcoin-public-point-to-address-2.julia diff --git a/Task/Bitcoin-public-point-to-address/Rust/bitcoin-public-point-to-address.rs b/Task/Bitcoin-public-point-to-address/Rust/bitcoin-public-point-to-address.rs deleted file mode 100644 index 57c7e6ba02..0000000000 --- a/Task/Bitcoin-public-point-to-address/Rust/bitcoin-public-point-to-address.rs +++ /dev/null @@ -1,65 +0,0 @@ -use ring::digest::{digest, SHA256}; -use ripemd::{Digest, Ripemd160}; - -use hex::FromHex; - -static X: &str = "50863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B2352"; -static Y: &str = "2CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"; -static ALPHABET: [char; 58] = [ - '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', - 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', - 'f', 'g', 'h', 'i', 'j', 'k', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', - 'z', -]; - -fn base58_encode(bytes: &mut [u8]) -> String { - let base = ALPHABET.len(); - if bytes.is_empty() { - return String::from(""); - } - let mut output: Vec = Vec::new(); - let mut num: usize; - for _ in 0..33 { - num = 0; - for byte in bytes.iter_mut() { - num = num * 256 + *byte as usize; - *byte = (num / base) as u8; - num %= base; - } - output.push(num as u8); - } - let mut string = String::new(); - for b in output.iter().rev() { - string.push(ALPHABET[*b as usize]); - } - string -} - -// stolen from address-validation/src/main.rs -/// Hashes the input with the SHA-256 algorithm twice, and returns the output. -fn double_sha256(bytes: &[u8]) -> Vec { - let digest_1 = digest(&SHA256, bytes); - - let digest_2 = digest(&SHA256, digest_1.as_ref()); - digest_2.as_ref().to_vec() -} - -fn point_to_address(x: &str, y: &str) -> String { - let mut addrv: Vec = Vec::with_capacity(65); - addrv.push(4u8); - addrv.append(&mut >::from_hex(x).unwrap()); - addrv.append(&mut >::from_hex(y).unwrap()); - // hash the addresses first using SHA256 - let sha_digest = digest(&SHA256, &addrv); - let mut ripemd_digest = Ripemd160::digest(&sha_digest.as_ref()).as_slice().to_vec(); - // prepend a 0 to the vector - ripemd_digest.insert(0, 0); - // calculate checksum of extended ripemd digest - let checksum = double_sha256(&ripemd_digest); - ripemd_digest.extend_from_slice(&checksum[..4]); - base58_encode(&mut ripemd_digest) -} - -fn main() { - println!("{}", point_to_address(X, Y)); -} diff --git a/Task/Bitcoin-public-point-to-address/Rust/bitcoin-public-point-to-address.rust b/Task/Bitcoin-public-point-to-address/Rust/bitcoin-public-point-to-address.rust new file mode 100644 index 0000000000..e9c6c90584 --- /dev/null +++ b/Task/Bitcoin-public-point-to-address/Rust/bitcoin-public-point-to-address.rust @@ -0,0 +1,65 @@ +use ring::digest::{digest, SHA256}; +use ripemd160::{Digest, Ripemd160}; + +use hex::FromHex; + +static X: &str = "50863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B2352"; +static Y: &str = "2CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"; +static ALPHABET: [char; 58] = [ + '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', + 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', + 'f', 'g', 'h', 'i', 'j', 'k', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', + 'z', +]; + +fn base58_encode(bytes: &mut [u8]) -> String { + let base = ALPHABET.len(); + if bytes.is_empty() { + return String::from(""); + } + let mut output: Vec = Vec::new(); + let mut num: usize; + for _ in 0..33 { + num = 0; + for byte in bytes.iter_mut() { + num = num * 256 + *byte as usize; + *byte = (num / base) as u8; + num %= base; + } + output.push(num as u8); + } + let mut string = String::new(); + for b in output.iter().rev() { + string.push(ALPHABET[*b as usize]); + } + string +} + +// stolen from address-validation/src/main.rs +/// Hashes the input with the SHA-256 algorithm twice, and returns the output. +fn double_sha256(bytes: &[u8]) -> Vec { + let digest_1 = digest(&SHA256, bytes); + + let digest_2 = digest(&SHA256, digest_1.as_ref()); + digest_2.as_ref().to_vec() +} + +fn point_to_address(x: &str, y: &str) -> String { + let mut addrv: Vec = Vec::with_capacity(65); + addrv.push(4u8); + addrv.append(&mut >::from_hex(x).unwrap()); + addrv.append(&mut >::from_hex(y).unwrap()); + // hash the addresses first using SHA256 + let sha_digest = digest(&SHA256, &addrv); + let mut ripemd_digest = Ripemd160::digest(&sha_digest.as_ref()).as_slice().to_vec(); + // prepend a 0 to the vector + ripemd_digest.insert(0, 0); + // calculate checksum of extended ripemd digest + let checksum = double_sha256(&ripemd_digest); + ripemd_digest.extend_from_slice(&checksum[..4]); + base58_encode(&mut ripemd_digest) +} + +fn main() { + println!("{}", point_to_address(X, Y)); +} diff --git a/Task/Bitmap-B-zier-curves-Cubic/11l/bitmap-b-zier-curves-cubic.11l b/Task/Bitmap-B-zier-curves-Cubic/11l/bitmap-b-zier-curves-cubic.11l index 4d73742931..7d538ce4eb 100644 --- a/Task/Bitmap-B-zier-curves-Cubic/11l/bitmap-b-zier-curves-cubic.11l +++ b/Task/Bitmap-B-zier-curves-Cubic/11l/bitmap-b-zier-curves-cubic.11l @@ -1,4 +1,13 @@ -T Colour = BVec3 +T Colour + Byte r, g, b + + F ==(other) + R .r == other.r & .g == other.g & .b == other.b + + F (r, g, b) + .r = r + .g = g + .b = b V black = Colour(0, 0, 0) V white = Colour(255, 255, 255) diff --git a/Task/Bitmap-B-zier-curves-Cubic/ALGOL-68/bitmap-b-zier-curves-cubic-2.alg b/Task/Bitmap-B-zier-curves-Cubic/ALGOL-68/bitmap-b-zier-curves-cubic-2.alg index 64efe22d15..e19cad1f9b 100644 --- a/Task/Bitmap-B-zier-curves-Cubic/ALGOL-68/bitmap-b-zier-curves-cubic-2.alg +++ b/Task/Bitmap-B-zier-curves-Cubic/ALGOL-68/bitmap-b-zier-curves-cubic-2.alg @@ -1,12 +1,12 @@ #!/usr/bin/a68g --script # # -*- coding: utf-8 -*- # -PR READ "prelude/Bitmap.a68" PR; -PR READ "prelude/Bitmap/Bresenhams_line_algorithm.a68" PR; +PR READ "prelude/Bitmap.a68" PR; # c.f. [[rc:Bitmap]] # +PR READ "prelude/Bitmap/Bresenhams_line_algorithm.a68" PR; # c.f. [[rc:Bitmap/Bresenhams_line_algorithm]] # PR READ "prelude/Bitmap/Bezier_curves/Cubic.a68" PR; -### test program ### -( +# The following test # +test:( REF IMAGE x = INIT LOC[16,16]PIXEL; (fill OF class image)(x, (white OF class image)); (cubic bezier OF class image)(x, (16, 1), (1, 4), (3, 16), (15, 11), (black OF class image), EMPTY); diff --git a/Task/Bitmap-B-zier-curves-Cubic/Ada/bitmap-b-zier-curves-cubic-1.adb b/Task/Bitmap-B-zier-curves-Cubic/Ada/bitmap-b-zier-curves-cubic-1.ada similarity index 100% rename from Task/Bitmap-B-zier-curves-Cubic/Ada/bitmap-b-zier-curves-cubic-1.adb rename to Task/Bitmap-B-zier-curves-Cubic/Ada/bitmap-b-zier-curves-cubic-1.ada diff --git a/Task/Bitmap-B-zier-curves-Cubic/Ada/bitmap-b-zier-curves-cubic-2.adb b/Task/Bitmap-B-zier-curves-Cubic/Ada/bitmap-b-zier-curves-cubic-2.ada similarity index 100% rename from Task/Bitmap-B-zier-curves-Cubic/Ada/bitmap-b-zier-curves-cubic-2.adb rename to Task/Bitmap-B-zier-curves-Cubic/Ada/bitmap-b-zier-curves-cubic-2.ada diff --git a/Task/Bitmap-B-zier-curves-Cubic/Delphi/bitmap-b-zier-curves-cubic.pas b/Task/Bitmap-B-zier-curves-Cubic/Delphi/bitmap-b-zier-curves-cubic.delphi similarity index 100% rename from Task/Bitmap-B-zier-curves-Cubic/Delphi/bitmap-b-zier-curves-cubic.pas rename to Task/Bitmap-B-zier-curves-Cubic/Delphi/bitmap-b-zier-curves-cubic.delphi diff --git a/Task/Bitmap-B-zier-curves-Cubic/FutureBasic/bitmap-b-zier-curves-cubic.basic b/Task/Bitmap-B-zier-curves-Cubic/FutureBasic/bitmap-b-zier-curves-cubic.basic deleted file mode 100644 index e947c6024f..0000000000 --- a/Task/Bitmap-B-zier-curves-Cubic/FutureBasic/bitmap-b-zier-curves-cubic.basic +++ /dev/null @@ -1,31 +0,0 @@ -void local fn BuildWindow - window 1, @"Cubic Bezier Curve", ( 0, 0, 300, 300 ), NSWindowStyleMaskTitled + NSWindowStyleMaskClosable - WindowSetBackgroundColor( 1, fn ColorBlack ) - WindowSubclassContentView(1) - ViewSetNeedsDisplay( _windowContentViewTag ) -end fn - -void local fn DrawInView( tag as NSInteger ) - ColorSetStroke( fn ColorYellow ) - BezierPathRef path = fn BezierPathInit - BezierPathMoveToPoint( path, fn CGPointMake( 50, 50 ) ) - CGPoint controlPoint1 = fn CGPointMake( 120, 200 ) - CGPoint controlPoint2 = fn CGPointMake( 180, 0 ) - CGPoint endPoint = fn CGPointMake( 260, 100 ) - BezierPathRelativeCurveToPoint( path, controlPoint1, controlPoint2, endPoint ) - BezierPathSetLineWidth( path, 4.0 ) - BezierPathStroke( path ) -end fn - -void local fn DoDialog( ev as long, tag as long ) - select ( ev ) - case _viewDrawRect : fn DrawInView(tag) - case _windowWillClose : end - end select -end fn - -fn BuildWindow - -on dialog fn DoDialog - -HandleEvents diff --git a/Task/Bitmap-B-zier-curves-Cubic/Julia/bitmap-b-zier-curves-cubic.jl b/Task/Bitmap-B-zier-curves-Cubic/Julia/bitmap-b-zier-curves-cubic.julia similarity index 100% rename from Task/Bitmap-B-zier-curves-Cubic/Julia/bitmap-b-zier-curves-cubic.jl rename to Task/Bitmap-B-zier-curves-Cubic/Julia/bitmap-b-zier-curves-cubic.julia diff --git a/Task/Bitmap-B-zier-curves-Cubic/Kotlin/bitmap-b-zier-curves-cubic.kts b/Task/Bitmap-B-zier-curves-Cubic/Kotlin/bitmap-b-zier-curves-cubic.kotlin similarity index 100% rename from Task/Bitmap-B-zier-curves-Cubic/Kotlin/bitmap-b-zier-curves-cubic.kts rename to Task/Bitmap-B-zier-curves-Cubic/Kotlin/bitmap-b-zier-curves-cubic.kotlin diff --git a/Task/Bitmap-B-zier-curves-Cubic/OCaml/bitmap-b-zier-curves-cubic.ml b/Task/Bitmap-B-zier-curves-Cubic/OCaml/bitmap-b-zier-curves-cubic.ocaml similarity index 100% rename from Task/Bitmap-B-zier-curves-Cubic/OCaml/bitmap-b-zier-curves-cubic.ml rename to Task/Bitmap-B-zier-curves-Cubic/OCaml/bitmap-b-zier-curves-cubic.ocaml diff --git a/Task/Bitmap-B-zier-curves-Quadratic/ALGOL-68/bitmap-b-zier-curves-quadratic.alg b/Task/Bitmap-B-zier-curves-Quadratic/ALGOL-68/bitmap-b-zier-curves-quadratic.alg deleted file mode 100644 index c06ba96d7a..0000000000 --- a/Task/Bitmap-B-zier-curves-Quadratic/ALGOL-68/bitmap-b-zier-curves-quadratic.alg +++ /dev/null @@ -1,41 +0,0 @@ -BEGIN # draw a quadratic curve using Bresenham's line algoritm # - - PR READ "prelude/Bitmap.a68" PR; - PR READ "prelude/Bitmap/Bresenhams_line_algorithm.a68" PR; - - PROC quadratic bezier = ( REF IMAGE bm, INT x1, y1, x2, y2, x3, y3, nseg, REAL scale )VOID: - BEGIN - INT prevx := 0, prevy := 0; - FOR i FROM 0 TO nseg DO - REAL t = i / nseg; - REAL t1 = 1 - t; - REAL a = t1 * t1; - REAL b = 2 * t * t1; - REAL c = t * t; - INT currx = ENTIER ( scale * ( a * x1 + b * x2 + c * x3 + 0.5 ) ); - INT curry = ENTIER ( scale * ( a * y1 + b * y2 + c * y3 + 0.5 ) ); - IF i > 0 THEN - ( line OF class image )( bm - , ( prevx, prevy ) - , ( currx, curry ) - , black OF class image - ) - FI; - prevx := currx; - prevy := curry - OD - END # quadratic bezier # ; - - BEGIN - REF IMAGE bm = INIT LOC[ 1 : 60, 1 : 40 ]PIXEL; - ( fill OF class image )( bm, white OF class image ); - quadratic bezier( bm, 10, 100, 250, 270, 150, 20, 20, 70 / 300 ); - # print in monochrome # - FOR y FROM 2 UPB bm BY -1 TO 2 LWB bm DO - FOR x FROM 1 LWB bm TO 1 UPB bm DO - print( ( IF PIXEL( bm[ x, y ] ) /= white OF class image THEN "##" ELSE " " FI ) ) - OD; - print( ( newline ) ) - OD - END -END diff --git a/Task/Bitmap-B-zier-curves-Quadratic/Ada/bitmap-b-zier-curves-quadratic-1.adb b/Task/Bitmap-B-zier-curves-Quadratic/Ada/bitmap-b-zier-curves-quadratic-1.ada similarity index 100% rename from Task/Bitmap-B-zier-curves-Quadratic/Ada/bitmap-b-zier-curves-quadratic-1.adb rename to Task/Bitmap-B-zier-curves-Quadratic/Ada/bitmap-b-zier-curves-quadratic-1.ada diff --git a/Task/Bitmap-B-zier-curves-Quadratic/Ada/bitmap-b-zier-curves-quadratic-2.adb b/Task/Bitmap-B-zier-curves-Quadratic/Ada/bitmap-b-zier-curves-quadratic-2.ada similarity index 100% rename from Task/Bitmap-B-zier-curves-Quadratic/Ada/bitmap-b-zier-curves-quadratic-2.adb rename to Task/Bitmap-B-zier-curves-Quadratic/Ada/bitmap-b-zier-curves-quadratic-2.ada diff --git a/Task/Bitmap-B-zier-curves-Quadratic/Delphi/bitmap-b-zier-curves-quadratic.pas b/Task/Bitmap-B-zier-curves-Quadratic/Delphi/bitmap-b-zier-curves-quadratic.delphi similarity index 100% rename from Task/Bitmap-B-zier-curves-Quadratic/Delphi/bitmap-b-zier-curves-quadratic.pas rename to Task/Bitmap-B-zier-curves-Quadratic/Delphi/bitmap-b-zier-curves-quadratic.delphi diff --git a/Task/Bitmap-B-zier-curves-Quadratic/EasyLang/bitmap-b-zier-curves-quadratic.easy b/Task/Bitmap-B-zier-curves-Quadratic/EasyLang/bitmap-b-zier-curves-quadratic.easy deleted file mode 100644 index 4d1203c99e..0000000000 --- a/Task/Bitmap-B-zier-curves-Quadratic/EasyLang/bitmap-b-zier-curves-quadratic.easy +++ /dev/null @@ -1,16 +0,0 @@ -sysconf topleft -proc quadraticbezier x1 y1 x2 y2 x3 y3 nseg . - gpenup - for i = 0 to nseg - t = i / nseg - t1 = 1 - t - a = t1 * t1 - b = 2 * t * t1 - c = t * t - x = a * x1 + b * x2 + c * x3 + 0.5 - y = a * y1 + b * y2 + c * y3 + 0.5 - glineto x y - . -. -glinewidth 0.5 -quadraticbezier 1 1 30 37 59 1 100 diff --git a/Task/Bitmap-B-zier-curves-Quadratic/Kotlin/bitmap-b-zier-curves-quadratic.kts b/Task/Bitmap-B-zier-curves-Quadratic/Kotlin/bitmap-b-zier-curves-quadratic.kotlin similarity index 100% rename from Task/Bitmap-B-zier-curves-Quadratic/Kotlin/bitmap-b-zier-curves-quadratic.kts rename to Task/Bitmap-B-zier-curves-Quadratic/Kotlin/bitmap-b-zier-curves-quadratic.kotlin diff --git a/Task/Bitmap-B-zier-curves-Quadratic/M2000-Interpreter/bitmap-b-zier-curves-quadratic.m2000 b/Task/Bitmap-B-zier-curves-Quadratic/M2000-Interpreter/bitmap-b-zier-curves-quadratic.m2000 deleted file mode 100644 index a5b02611cc..0000000000 --- a/Task/Bitmap-B-zier-curves-Quadratic/M2000-Interpreter/bitmap-b-zier-curves-quadratic.m2000 +++ /dev/null @@ -1,191 +0,0 @@ -module bezier { - Function Bitmap { - def x as long, y as long, Import as boolean - If match("NN") then - Read x, y - else.if Match("N") Then - \\ is a file? - Read f as long - byte whitespace[0] - if not Eof(f) then - get #f, whitespace :P6$=chr$(whitespace[0]) - get #f, whitespace : P6$+=chr$(whitespace[0]) - boolean getW=true, getH=true, getV=true - long v - If p6$="P6" Then - do - get #f, whitespace - select case whitespace[0] - case 35 - {do get #f, whitespace - until whitespace[0]=10 - } - case 32, 9, 13, 10 - { if getW and x<>0 then - getW=false - else.if getH and y<>0 then - getH=false - else.if getV and v<>0 then - getV=false - end if - } - case 48 to 57 - {if getW then - x*=10 - x+=whitespace[0]-48 - else.if getH then - y*=10 - y+=whitespace[0]-48 - else.if getV then - v*=10 - v+=whitespace[0]-48 - end if - } - End Select - iF eof(f) then Error "Not a ppm file" - until getV=false - else - Error "Not a P6 ppm" - end if - Import=True - end if - else - Error "No proper arguments" - end if - if x<1 or y<1 then Error "Wrong dimensions" - structure rgb { - red as byte - green as byte - blue as byte - } - m=len(rgb)*x mod 4 - if m>0 then m=4-m ' add some bytes to raster line - m+=len(rgb) *x - Structure rasterline { - { - pad as byte*m - } - hline as rgb*x - } - Structure Raster { - magic as integer*4 - w as integer*4 - h as integer*4 - { - linesB as byte*len(rasterline)*y - } - lines as rasterline*y - } - Buffer Clear Image1 as Raster - Return Image1, 0!magic:="cDIB", 0!w:=Hex$(x,2), 0!h:=Hex$(y, 2) - if not Import then Return Image1, 0!lines:=String$(chrcode$(0xffff), Len(rasterline)*y div 2) - Buffer Clear Pad as Byte*4 - SetPixel=Lambda Image1, Pad, aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x, y, c) ->{ - where=alines+3*x+blines*y - if c>0 then c=color(c) - c-! - Return Pad, 0:=c as long - Return Image1, 0!where:=Eval(Pad, 2) as byte, 0!where+1:=Eval(Pad, 1) as byte, 0!where+2:=Eval(Pad, 0) as byte - } - GetPixel=Lambda Image1,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x,y) ->{ - where=alines+3*x+blines*y - =color(Eval(image1, where+2 as byte), Eval(image1, where+1 as byte), Eval(image1, where as byte)) - } - StrDib$=Lambda$ Image1, Raster -> { - =Eval$(Image1, 0, Len(Raster)) - } - CopyImage=Lambda Image1 (image$) -> { - if left$(image$,12)=Eval$(Image1, 0, 24 ) Then { - Return Image1, 0:=Image$ - } Else Error "Can't Copy Image" - } - Export2File=Lambda Image1, x, y (f) -> { - Print #f, "P6";chr$(10);"# Created using M2000 Interpreter";chr$(10); - Print #f, x;" ";y;" 255";chr$(10); - x2=x-1 : where=0 - x0=x*3 - structure rgbP6 { - r as byte - g as byte - b as byte - } - buffer Pad as rgbP6*x*y - For y1=y-1 to 0 { - Return pad, x*y1:=eval$(image1, 0!linesB!where, x0) - where+=x0 - m=where mod 4 : if m<>0 then where+=4-m - } - For x1=0 to x*y-1 { - Push Eval(pad, x1!b) : Return pad, x1!b:=Eval(pad, x1!r), x1!r:=Number - } - Put #f, pad - } - if Import then { - x0=x-1 : where=0 - structure rgbP6 { - r as byte, g as byte, b as byte - } - buffer Pad1 as rgbP6*x*y - Get #f, Pad1 - For x1=0 to x*y-1 { - Push Eval(pad1, x1!b) : Return pad1, x1!b:=Eval(pad1, x1!r), x1!r:=Number - } - x1=x*3 - For y1=y-1 to 0 { - Return Image1, 0!linesB!where:=Eval$(Pad1, y1*x, x1) - where+=3*(x0+1) - m=where mod 4 : if m<>0 then where+=4-m - } - } - Group Bitmap { - type:Bitmap - SetPixel=SetPixel - GetPixel=GetPixel - Image$=StrDib$ - Copy=CopyImage - ToFile=Export2File - } - =Bitmap - } - module bezier (&ppm as Bitmap, x1, y1, x2, y2, x3, y3, n, col=0){ - Group point_ { - long x,y - } - Long i - Double t, t1, a, b, c, d - Dim p(n+1)=point_ - For i = 0 To n - t = i / n - t1 = 1 - t - a = t1 ^ 2 - b = t * t1 * 2 - c = t ^ 2 - p(i).x = Int(a * x1 + b * x2 + c * x3 + .5) - p(i).y = Int(a * y1 + b * y2 + c * y3 + .5) - Next - - For i = 0 To n -1 - Br_line(p(i).x, p(i).y, p(i +1).x, p(i +1).y, col) - Next - sub Br_line(x0 As Long, y0 As Long, x1 As Long, y1 As Long, Col=0) - Local Long dx = Abs(x1 - x0), dy = Abs(y1 - y0) - Local Long sx = If(x0 < x1-> 1, -1) - Local Long sy = If(y0 < y1-> 1, -1) - Local Long er = If(dx > dy-> dx, -dy) div 2, e2 - Do - Call ppm.SetPixel(x0, y0, Col) - If x0=x1 And y0=y1 Then Exit - e2 = er - If e2 > -dx Then Er -= dy : x0 += sx - If e2 < dy Then Er += dx : y0 += sy - Always - end sub - } - A=Bitmap(250, 250) - bezier &A, 10, 100, 220, 310, 150, 20, 20 - move 3000,3000 : image A.Image$() - Open "curve.ppm" for output as #f - Call A.tofile(f) - close #f -} -bezier diff --git a/Task/Bitmap-B-zier-curves-Quadratic/OCaml/bitmap-b-zier-curves-quadratic.ml b/Task/Bitmap-B-zier-curves-Quadratic/OCaml/bitmap-b-zier-curves-quadratic.ocaml similarity index 100% rename from Task/Bitmap-B-zier-curves-Quadratic/OCaml/bitmap-b-zier-curves-quadratic.ml rename to Task/Bitmap-B-zier-curves-Quadratic/OCaml/bitmap-b-zier-curves-quadratic.ocaml diff --git a/Task/Bitmap-Bresenhams-line-algorithm/11l/bitmap-bresenhams-line-algorithm.11l b/Task/Bitmap-Bresenhams-line-algorithm/11l/bitmap-bresenhams-line-algorithm.11l index 928f45dde9..3c00cb16f4 100644 --- a/Task/Bitmap-Bresenhams-line-algorithm/11l/bitmap-bresenhams-line-algorithm.11l +++ b/Task/Bitmap-Bresenhams-line-algorithm/11l/bitmap-bresenhams-line-algorithm.11l @@ -1,4 +1,13 @@ -T Colour = BVec3 +T Colour + Byte r, g, b + + F (r, g, b) + .r = r + .g = g + .b = b + + F ==(other) + R .r == other.r & .g == other.g & .b == other.b V black = Colour(0, 0, 0) V white = Colour(255, 255, 255) diff --git a/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm-1.alg b/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm-1.alg new file mode 100644 index 0000000000..71ca3c026d --- /dev/null +++ b/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm-1.alg @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- # + +line OF class image := (REF IMAGE picture, POINT start, stop, PIXEL color)VOID: +BEGIN + REAL dx = ABS (x OF stop - x OF start), + dy = ABS (y OF stop - y OF start); + REAL err; + POINT here := start, + step := (1, 1); + IF x OF start > x OF stop THEN + x OF step := -1 + FI; + IF y OF start > y OF stop THEN + y OF step := -1 + FI; + IF dx > dy THEN + err := dx / 2; + WHILE x OF here /= x OF stop DO + picture[x OF here, y OF here] := color; + err -:= dy; + IF err < 0 THEN + y OF here +:= y OF step; + err +:= dx + FI; + x OF here +:= x OF step + OD + ELSE + err := dy / 2; + WHILE y OF here /= y OF stop DO + picture[x OF here, y OF here] := color; + err -:= dx; + IF err < 0 THEN + x OF here +:= x OF step; + err +:= dy + FI; + y OF here +:= y OF step + OD + FI; + picture[x OF here, y OF here] := color # ensure dots to be drawn # +END # line #; + +SKIP diff --git a/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm-2.alg b/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm-2.alg new file mode 100644 index 0000000000..d1ba6015a9 --- /dev/null +++ b/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm-2.alg @@ -0,0 +1,16 @@ +#!/usr/bin/a68g --script # +# -*- coding: utf-8 -*- # + +PR READ "prelude/Bitmap.a68" PR; # c.f. [[rc:Bitmap]] # +PR READ "prelude/Bitmap/Bresenhams_line_algorithm.a68" PR; + +### The test program: ### +test:( + REF IMAGE x = INIT LOC[1:16, 1:16]PIXEL; + (fill OF class image)(x, white OF class image); + (line OF class image)(x, ( 1, 8), ( 8,16), black OF class image); + (line OF class image)(x, ( 8,16), (16, 8), black OF class image); + (line OF class image)(x, (16, 8), ( 8, 1), black OF class image); + (line OF class image)(x, ( 8, 1), ( 1, 8), black OF class image); + (print OF class image)(x) +) diff --git a/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm.alg b/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm.alg deleted file mode 100644 index 223c635fd0..0000000000 --- a/Task/Bitmap-Bresenhams-line-algorithm/ALGOL-68/bitmap-bresenhams-line-algorithm.alg +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/a68g --script # -# -*- coding: utf-8 -*- # - -PR READ "prelude/Bitmap.a68" PR; -PR READ "prelude/Bitmap/Bresenhams_line_algorithm.a68" PR; - -### The test program: ### -( - REF IMAGE x = INIT LOC[1:16, 1:16]PIXEL; - (fill OF class image)(x, white OF class image); - (line OF class image)(x, ( 1, 8), ( 8,16), black OF class image); - (line OF class image)(x, ( 8,16), (16, 8), black OF class image); - (line OF class image)(x, (16, 8), ( 8, 1), black OF class image); - (line OF class image)(x, ( 8, 1), ( 1, 8), black OF class image); - (print OF class image)(x) -) diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Ada/bitmap-bresenhams-line-algorithm-1.adb b/Task/Bitmap-Bresenhams-line-algorithm/Ada/bitmap-bresenhams-line-algorithm-1.ada similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/Ada/bitmap-bresenhams-line-algorithm-1.adb rename to Task/Bitmap-Bresenhams-line-algorithm/Ada/bitmap-bresenhams-line-algorithm-1.ada diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Ada/bitmap-bresenhams-line-algorithm-2.adb b/Task/Bitmap-Bresenhams-line-algorithm/Ada/bitmap-bresenhams-line-algorithm-2.ada similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/Ada/bitmap-bresenhams-line-algorithm-2.adb rename to Task/Bitmap-Bresenhams-line-algorithm/Ada/bitmap-bresenhams-line-algorithm-2.ada diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Arturo/bitmap-bresenhams-line-algorithm.arturo b/Task/Bitmap-Bresenhams-line-algorithm/Arturo/bitmap-bresenhams-line-algorithm.arturo deleted file mode 100644 index 874b30a87e..0000000000 --- a/Task/Bitmap-Bresenhams-line-algorithm/Arturo/bitmap-bresenhams-line-algorithm.arturo +++ /dev/null @@ -1,67 +0,0 @@ -; Bitmap object definition -define :bitmap [ - init: method [width :integer height :integer][ - \width: width - \height: height - \grid: array.of:@[width height] false - ] - - setOn: method [x :integer y :integer][ - \grid\[y]\[x]: true - ] - - line: method [x0 :integer y0 :integer x1 :integer y1 :integer][ - [dx,dy]: @[abs x1 - x0, abs y1 - y0] - [x,y]: @[x0, y0] - sx: (x0 > x1) ? -> neg 1 -> 1 - sy: (y0 > y1) ? -> neg 1 -> 1 - - switch dx > dy [ - err: dx // 2 - while [x <> x1][ - \setOn x y - if negative? err: <= err - dy -> - [y, err]: @[y + sy, err + dx] - - x: x + sx - ] - ][ - err: dy // 2 - while [y <> y1][ - \setOn x y - if negative? err: <= err - dx -> - [x, err]: @[x + sx, err + dy] - y: y + sy - ] - ] - \setOn x y - ] - - string: method [][ - join.with:"\n" @[ - "+" ++ (repeat "-" \width) ++ "+" - join.with:"\n" map 0..dec \height 'y [ - "|" ++ (join.with:"" map 0..dec \width 'x -> - \grid\[dec \height-y]\[x] ? -> "@" -> " " - ) ++ "|" - ] - "+" ++ (repeat "-" \width) ++ "+" - ] - ] -] - -; Create bitmap -bitmap: to :bitmap @[17 17]! - -; and... draw a diamond shape -points: @[ - [1 8 8 16] - [8 16 16 8] - [16 8 8 1] - [8 1 1 8] -] - -loop points 'p -> - bitmap\line p\0 p\1 p\2 p\3 - -print bitmap diff --git a/Task/Bitmap-Bresenhams-line-algorithm/AutoIt/bitmap-bresenhams-line-algorithm.au3 b/Task/Bitmap-Bresenhams-line-algorithm/AutoIt/bitmap-bresenhams-line-algorithm.autoit similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/AutoIt/bitmap-bresenhams-line-algorithm.au3 rename to Task/Bitmap-Bresenhams-line-algorithm/AutoIt/bitmap-bresenhams-line-algorithm.autoit diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Crystal/bitmap-bresenhams-line-algorithm-1.cr b/Task/Bitmap-Bresenhams-line-algorithm/Crystal/bitmap-bresenhams-line-algorithm-1.cr deleted file mode 100644 index f0a7e50bb0..0000000000 --- a/Task/Bitmap-Bresenhams-line-algorithm/Crystal/bitmap-bresenhams-line-algorithm-1.cr +++ /dev/null @@ -1,17 +0,0 @@ -require "./pixmap" - -class Pixmap - def line (x0, y0, x1, y1, color) - dx, sx = (x1-x0).abs, x0dy ? dx : -dy) // 2 - - loop do - self[x0, y0] = color - break if x0 == x1 && y0 == y1 - e2 = err - (err -= dy; x0 += sx) if e2 >-dx - (err += dx; y0 += sy) if e2 < dy - end - end -end diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Crystal/bitmap-bresenhams-line-algorithm-2.cr b/Task/Bitmap-Bresenhams-line-algorithm/Crystal/bitmap-bresenhams-line-algorithm-2.cr deleted file mode 100644 index fa74ba9af7..0000000000 --- a/Task/Bitmap-Bresenhams-line-algorithm/Crystal/bitmap-bresenhams-line-algorithm-2.cr +++ /dev/null @@ -1,7 +0,0 @@ -require "./bresenham" - -img = Pixmap.new 10, 5, Color::WHITE - -img.line 0, 3, 9, 0, Color::RED - -img.write STDOUT diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Delphi/bitmap-bresenhams-line-algorithm.pas b/Task/Bitmap-Bresenhams-line-algorithm/Delphi/bitmap-bresenhams-line-algorithm.delphi similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/Delphi/bitmap-bresenhams-line-algorithm.pas rename to Task/Bitmap-Bresenhams-line-algorithm/Delphi/bitmap-bresenhams-line-algorithm.delphi diff --git a/Task/Bitmap-Bresenhams-line-algorithm/EasyLang/bitmap-bresenhams-line-algorithm.easy b/Task/Bitmap-Bresenhams-line-algorithm/EasyLang/bitmap-bresenhams-line-algorithm.easy index b0a250c7ec..536d330933 100644 --- a/Task/Bitmap-Bresenhams-line-algorithm/EasyLang/bitmap-bresenhams-line-algorithm.easy +++ b/Task/Bitmap-Bresenhams-line-algorithm/EasyLang/bitmap-bresenhams-line-algorithm.easy @@ -1,7 +1,8 @@ -proc pset x y . - grect x / 4 y / 4 0.25 0.25 +proc pset x y . . + move x / 4 y / 4 + rect 0.25 0.25 . -proc drawline x0 y0 x1 y1 . +proc drawline x0 y0 x1 y1 . . dx = abs (x1 - x0) sx = -1 if x0 < x1 diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Euphoria/bitmap-bresenhams-line-algorithm.eu b/Task/Bitmap-Bresenhams-line-algorithm/Euphoria/bitmap-bresenhams-line-algorithm.euphoria similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/Euphoria/bitmap-bresenhams-line-algorithm.eu rename to Task/Bitmap-Bresenhams-line-algorithm/Euphoria/bitmap-bresenhams-line-algorithm.euphoria diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Julia/bitmap-bresenhams-line-algorithm.jl b/Task/Bitmap-Bresenhams-line-algorithm/Julia/bitmap-bresenhams-line-algorithm.julia similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/Julia/bitmap-bresenhams-line-algorithm.jl rename to Task/Bitmap-Bresenhams-line-algorithm/Julia/bitmap-bresenhams-line-algorithm.julia diff --git a/Task/Bitmap-Bresenhams-line-algorithm/M2000-Interpreter/bitmap-bresenhams-line-algorithm.m2000 b/Task/Bitmap-Bresenhams-line-algorithm/M2000-Interpreter/bitmap-bresenhams-line-algorithm.m2000 deleted file mode 100644 index 5ed0c0f987..0000000000 --- a/Task/Bitmap-Bresenhams-line-algorithm/M2000-Interpreter/bitmap-bresenhams-line-algorithm.m2000 +++ /dev/null @@ -1,20 +0,0 @@ -' using Twips -' twipsX is 15 twips. So for 96 dpi, we have 1440/96=15 twips/pixel -Module Bresenham_s_line_algorithm { - Module Br_line(x0 As Long, y0 As Long, x1 As Long, y1 As Long, Col=15) { - Long dx = Abs(x1 - x0), dy = Abs(y1 - y0) - Long sx = If(x0 < x1-> TWIPSX, -TWIPSX) - Long sy = If(y0 < y1-> TWIPSY, -TWIPSY) - Long er = If(dx > dy-> dx, -dy) div 2, e2 - Do - PSet col, x0, y0 - If abs(x0-x1)<=TWIPSX And abs(y0-y1)<=TWIPSY Then Exit - e2 = er - If e2 > -dx Then Er -= dy : x0 += sx - If e2 < dy Then Er += dx : y0 += sy - Always - } - cls ,0 - Br_line scale.x*.2, scale.y*.2, scale.x*.8, scale.y*.8 , #FFbb77 -} -Bresenham_s_line_algorithm diff --git a/Task/Bitmap-Bresenhams-line-algorithm/OCaml/bitmap-bresenhams-line-algorithm.ml b/Task/Bitmap-Bresenhams-line-algorithm/OCaml/bitmap-bresenhams-line-algorithm.ocaml similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/OCaml/bitmap-bresenhams-line-algorithm.ml rename to Task/Bitmap-Bresenhams-line-algorithm/OCaml/bitmap-bresenhams-line-algorithm.ocaml diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Pluto/bitmap-bresenhams-line-algorithm-1.pluto b/Task/Bitmap-Bresenhams-line-algorithm/Pluto/bitmap-bresenhams-line-algorithm-1.pluto deleted file mode 100644 index 8ab23127e7..0000000000 --- a/Task/Bitmap-Bresenhams-line-algorithm/Pluto/bitmap-bresenhams-line-algorithm-1.pluto +++ /dev/null @@ -1,27 +0,0 @@ -local canvas = require "canvas" - -local function line(c, x0, y0, x1, y1, col) - local dx = math.abs(x1 - x0) - local dy = math.abs(y1 - y0) - local sx = (x0 < x1) ? 1 : -1 - local sy = (y0 < y1) ? 1 : -1 - local err = (dx > dy ? dx : - dy) // 2 - while true do - c:set(x0, y0, col) - if x0 == x1 and y0 == y1 then break end - local e2 = err - if e2 > -dx then - err -= dy - x0 += sx - end - if e2 < dy then - err += dx - y0 += sy - end - end -end - -local c = canvas.new(400, 400) -c:fill(0xffffff) -- white background -line(c, 0, 0, 399, 399, 0x0000ff) -- draw a red diagonal -io.contents("mybmp.bmp", c:tobmp()) -- save to a bitmap file diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Pluto/bitmap-bresenhams-line-algorithm-2.pluto b/Task/Bitmap-Bresenhams-line-algorithm/Pluto/bitmap-bresenhams-line-algorithm-2.pluto deleted file mode 100644 index a3504b25b4..0000000000 --- a/Task/Bitmap-Bresenhams-line-algorithm/Pluto/bitmap-bresenhams-line-algorithm-2.pluto +++ /dev/null @@ -1,6 +0,0 @@ -require "bitmap" - -local bmp = bitmap.of(400, 400, color.white, "mybmp") -bmp:line(0, 0, 399, 399, color.red) -bmp:view() -bmp:save() -- if required diff --git a/Task/Bitmap-Bresenhams-line-algorithm/Rust/bitmap-bresenhams-line-algorithm.rs b/Task/Bitmap-Bresenhams-line-algorithm/Rust/bitmap-bresenhams-line-algorithm.rust similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/Rust/bitmap-bresenhams-line-algorithm.rs rename to Task/Bitmap-Bresenhams-line-algorithm/Rust/bitmap-bresenhams-line-algorithm.rust diff --git a/Task/Bitmap-Bresenhams-line-algorithm/VBScript/bitmap-bresenhams-line-algorithm.vbs b/Task/Bitmap-Bresenhams-line-algorithm/VBScript/bitmap-bresenhams-line-algorithm.vb similarity index 100% rename from Task/Bitmap-Bresenhams-line-algorithm/VBScript/bitmap-bresenhams-line-algorithm.vbs rename to Task/Bitmap-Bresenhams-line-algorithm/VBScript/bitmap-bresenhams-line-algorithm.vb diff --git a/Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-1.adb b/Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-1.ada similarity index 100% rename from Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-1.adb rename to Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-1.ada diff --git a/Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-2.adb b/Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-2.ada similarity index 100% rename from Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-2.adb rename to Task/Bitmap-Flood-fill/Ada/bitmap-flood-fill-2.ada diff --git a/Task/Bitmap-Flood-fill/AutoHotkey/bitmap-flood-fill-2.ahk b/Task/Bitmap-Flood-fill/AutoHotkey/bitmap-flood-fill-2.ahk index ab321c5681..9ff5334cf8 100644 --- a/Task/Bitmap-Flood-fill/AutoHotkey/bitmap-flood-fill-2.ahk +++ b/Task/Bitmap-Flood-fill/AutoHotkey/bitmap-flood-fill-2.ahk @@ -1,55 +1,55 @@ #NoEnv #SingleInstance, Force - SetBatchLines, -1 - CoordMode, Mouse - CoordMode, Pixel + SetBatchLines, -1 + CoordMode, Mouse + CoordMode, Pixel return CapsLock:: - KeyWait, CapsLock - MouseGetPos, X, Y - PixelGetColor, color, X, Y - FloodFill(x, y, color, 0x000000, 1, "Esc") - MsgBox Done! + KeyWait, CapsLock + MouseGetPos, X, Y + PixelGetColor, color, X, Y + FloodFill(x, y, color, 0x000000, 1, "Esc") + MsgBox Done! Return FloodFill( 0x, 0y, target, replacement, mode=1, key="" ) { - VarSetCapacity(Rect, 16, 0) - hDC := DllCall("GetDC", UInt, 0) - hBrush := DllCall("CreateSolidBrush", UInt, replacement) - - l := 0 - while l >= 0 - { - if getkeystate(key, "P") - return - x := %l%x, y := %l%y - %l%p++ - p := %l%p - PixelGetColor, color, x, y - if (color = target) - { - NumPut(x, Rect, 0) - NumPut(y, Rect, 4) - NumPut(x+1, Rect, 8) - NumPut(y+1, Rect, 12) - DllCall("FillRect", UInt, hDC, Str, Rect, UInt, hBrush) - } - else if (p = 1) - { - %l%x := %l%y := %l%p := "", l-- - continue - } - if (p < 5) - ol := l++ - , %l%x := %ol%x + (p = 1 ? 1 : p = 2 ? -1 : 0) - , %l%y := %ol%y + (p = 3 ? 1 : p = 4 ? -1 : 0) - else - %l%x := %l%y := %l%p := "", l-- - } - - DllCall("ReleaseDC", UInt, 0, UInt, hDC) - DllCall("DeleteObject", UInt, hBrush) + VarSetCapacity(Rect, 16, 0) + hDC := DllCall("GetDC", UInt, 0) + hBrush := DllCall("CreateSolidBrush", UInt, replacement) + + l := 0 + while l >= 0 + { + if getkeystate(key, "P") + return + x := %l%x, y := %l%y + %l%p++ + p := %l%p + PixelGetColor, color, x, y + if (color = target) + { + NumPut(x, Rect, 0) + NumPut(y, Rect, 4) + NumPut(x+1, Rect, 8) + NumPut(y+1, Rect, 12) + DllCall("FillRect", UInt, hDC, Str, Rect, UInt, hBrush) + } + else if (p = 1) + { + %l%x := %l%y := %l%p := "", l-- + continue + } + if (p < 5) + ol := l++ + , %l%x := %ol%x + (p = 1 ? 1 : p = 2 ? -1 : 0) + , %l%y := %ol%y + (p = 3 ? 1 : p = 4 ? -1 : 0) + else + %l%x := %l%y := %l%p := "", l-- + } + + DllCall("ReleaseDC", UInt, 0, UInt, hDC) + DllCall("DeleteObject", UInt, hBrush) } diff --git a/Task/Bitmap-Flood-fill/C++/bitmap-flood-fill-2.cpp b/Task/Bitmap-Flood-fill/C++/bitmap-flood-fill-2.cpp index 1791da5b87..3518acceab 100644 --- a/Task/Bitmap-Flood-fill/C++/bitmap-flood-fill-2.cpp +++ b/Task/Bitmap-Flood-fill/C++/bitmap-flood-fill-2.cpp @@ -16,25 +16,25 @@ void FloodFillAlgorithm::flood(Point startPoint, Mat* tgtMat) { if (image->at(startPoint) == srcColor) { queue pointQueue; - pointQueue.push(startPoint); + pointQueue.push(startPoint); - while (!pointQueue.empty()) { - Point p = pointQueue.front(); - pointQueue.pop(); + while (!pointQueue.empty()) { + Point p = pointQueue.front(); + pointQueue.pop(); - if (insideImage(p)) { + if (insideImage(p)) { - if ((image->at(p) == srcColor)) { - image->at(p) = tgtMat->at(p); + if ((image->at(p) == srcColor)) { + image->at(p) = tgtMat->at(p); - pointQueue.push(Point(p.x + 1, p.y)); - pointQueue.push(Point(p.x - 1, p.y)); - pointQueue.push(Point(p.x, p.y + 1)); - pointQueue.push(Point(p.x, p.y - 1)); - } - } + pointQueue.push(Point(p.x + 1, p.y)); + pointQueue.push(Point(p.x - 1, p.y)); + pointQueue.push(Point(p.x, p.y + 1)); + pointQueue.push(Point(p.x, p.y - 1)); + } + } - } + } } } diff --git a/Task/Bitmap-Flood-fill/C/bitmap-flood-fill-3.c b/Task/Bitmap-Flood-fill/C/bitmap-flood-fill-3.c index 69c8175bc1..9e3b20b4a1 100644 --- a/Task/Bitmap-Flood-fill/C/bitmap-flood-fill-3.c +++ b/Task/Bitmap-Flood-fill/C/bitmap-flood-fill-3.c @@ -5,5 +5,5 @@ typedef struct { typedef rgb_color *rgb_color_p; void floodfill(image img, int px, int py, - rgb_color_p bankscolor, - rgb_color_p rcolor); + rgb_color_p bankscolor, + rgb_color_p rcolor); diff --git a/Task/Bitmap-Flood-fill/C/bitmap-flood-fill-4.c b/Task/Bitmap-Flood-fill/C/bitmap-flood-fill-4.c index 453c999fed..8e9134edf6 100644 --- a/Task/Bitmap-Flood-fill/C/bitmap-flood-fill-4.c +++ b/Task/Bitmap-Flood-fill/C/bitmap-flood-fill-4.c @@ -29,8 +29,8 @@ inline void _ffill_enqueue(_ffill_queue *q, int px, int py) inline double color_distance( rgb_color_p a, rgb_color_p b ) { return sqrt( (double)(a->red - b->red)*(a->red - b->red) + - (double)(a->green - b->green)*(a->green - b->green) + - (double)(a->blue - b->blue)*(a->blue - b->blue) ) / (256.0*sqrt(3.0)); + (double)(a->green - b->green)*(a->green - b->green) + + (double)(a->blue - b->blue)*(a->blue - b->blue) ) / (256.0*sqrt(3.0)); } inline void _ffill_rgbcolor(image img, rgb_color_p tc, int px, int py) @@ -41,25 +41,25 @@ inline void _ffill_rgbcolor(image img, rgb_color_p tc, int px, int py) } -#define NSOE(X,Y) do { \ - if ( ((X)>=0)&&((Y)>=0) && ((X)width)&&((Y)height)) { \ - _ffill_rgbcolor(img, &thisnode, (X), (Y)); \ - if ( color_distance(&thisnode, bankscolor) > tolerance ) { \ - if (color_distance(&thisnode, rcolor) > 0.0) { \ - put_pixel_unsafe(img, (X), (Y), rcolor->red, \ - rcolor->green, \ - rcolor->blue); \ - _ffill_enqueue(&head, (X), (Y)); \ - pixelcount++; \ - } \ - } \ - } \ +#define NSOE(X,Y) do { \ + if ( ((X)>=0)&&((Y)>=0) && ((X)width)&&((Y)height)) { \ + _ffill_rgbcolor(img, &thisnode, (X), (Y)); \ + if ( color_distance(&thisnode, bankscolor) > tolerance ) { \ + if (color_distance(&thisnode, rcolor) > 0.0) { \ + put_pixel_unsafe(img, (X), (Y), rcolor->red, \ + rcolor->green, \ + rcolor->blue); \ + _ffill_enqueue(&head, (X), (Y)); \ + pixelcount++; \ + } \ + } \ + } \ } while(0) unsigned int floodfill(image img, int px, int py, - rgb_color_p bankscolor, - rgb_color_p rcolor) + rgb_color_p bankscolor, + rgb_color_p rcolor) { _ffill_queue head; rgb_color thisnode; diff --git a/Task/Bitmap-Flood-fill/Crystal/bitmap-flood-fill-1.cr b/Task/Bitmap-Flood-fill/Crystal/bitmap-flood-fill-1.cr deleted file mode 100644 index 1a294cd573..0000000000 --- a/Task/Bitmap-Flood-fill/Crystal/bitmap-flood-fill-1.cr +++ /dev/null @@ -1,37 +0,0 @@ -require "./pixmap" - -class Pixmap - def flood_fill (x, y, color) - old_color = self[x, y] - queue = Deque(Int32).new - width = @width - size = @data.size - idx = y * width + x - queue << idx - - until queue.empty? - idx = queue.shift - next unless @data[idx] == old_color - start = idx - # go left - limit = start // width * width - while idx >= limit && @data[idx] == old_color - @data[idx] = color - up, dn = idx - width, idx + width - queue << up if up >= 0 && @data[up] == old_color - queue << dn if dn < size && @data[dn] == old_color - idx -= 1 - end - # go right - limit = (start + width) // width * width - idx = start + 1 - while idx < limit && @data[idx] == old_color - @data[idx] = color - up, dn = idx - width, idx + width - queue << up if up >= 0 && @data[up] == old_color - queue << dn if dn < size && @data[dn] == old_color - idx += 1 - end - end - end -end diff --git a/Task/Bitmap-Flood-fill/Crystal/bitmap-flood-fill-2.cr b/Task/Bitmap-Flood-fill/Crystal/bitmap-flood-fill-2.cr deleted file mode 100644 index eb33ea7d5d..0000000000 --- a/Task/Bitmap-Flood-fill/Crystal/bitmap-flood-fill-2.cr +++ /dev/null @@ -1,22 +0,0 @@ -require "./circle" -require "./flood_fill" -require "./write_ppm" -require "./load_ppm" - -img = Pixmap.new 120, 80, Color::WHITE -img.circle 60, 40, 35, Color::BLACK -img.circle 100, 20, 18, Color::RED - -img.flood_fill 10, 10, Color.new(210, 230, 0) -img.flood_fill 60, 40, Color.new(255, 128, 76) - -img.write "crystal_flood_fill.ppm" - - -img = Pixmap.load "Unfilledcirc.ppm" -img.flood_fill 10, 10, Color.new(0, 128, 240) -img.flood_fill img.width-1, img.height-1, Color.new(0, 128, 240) -img.flood_fill 10, img.height//2, Color.new(240, 180, 10) -img.flood_fill 100, 100, Color.new(255, 60, 10) - -img.write "crystal_filledcirc.ppm" diff --git a/Task/Bitmap-Flood-fill/FBSL/bitmap-flood-fill.fbsl b/Task/Bitmap-Flood-fill/FBSL/bitmap-flood-fill.fbsl index b359ffe534..2cc3085c3c 100644 --- a/Task/Bitmap-Flood-fill/FBSL/bitmap-flood-fill.fbsl +++ b/Task/Bitmap-Flood-fill/FBSL/bitmap-flood-fill.fbsl @@ -15,23 +15,23 @@ FBSL.GETCLIENTRECT(ME, 0, 0, Breadth, Height) DrawCircles() ' Initialize circles BEGIN EVENTS - SELECT CASE CBMSG - CASE WM_LBUTTONDOWN: FillCircles() ' Flood fill circles - CASE WM_CLOSE: FBSL.RELEASEDC(ME, FBSL.GETDC) ' Clean up - END SELECT + SELECT CASE CBMSG + CASE WM_LBUTTONDOWN: FillCircles() ' Flood fill circles + CASE WM_CLOSE: FBSL.RELEASEDC(ME, FBSL.GETDC) ' Clean up + END SELECT END EVENTS SUB FillCircles() - FILL(FBSL.GETDC, Breadth / 2, Height / 2, &HFFFF) ' Yellow: flood fill using intrinsics - FOR DIM x = 0 TO Breadth / 2 ' Red: flood fill iteratively - FOR DIM y = 0 TO Height / 2 - IF NOT POINT(FBSL.GETDC, x, y) THEN PSET(FBSL.GETDC, x, y, &HFF) - NEXT - NEXT - FBSLSETTEXT(ME, "After Flood Fill") ' Reset form caption + FILL(FBSL.GETDC, Breadth / 2, Height / 2, &HFFFF) ' Yellow: flood fill using intrinsics + FOR DIM x = 0 TO Breadth / 2 ' Red: flood fill iteratively + FOR DIM y = 0 TO Height / 2 + IF NOT POINT(FBSL.GETDC, x, y) THEN PSET(FBSL.GETDC, x, y, &HFF) + NEXT + NEXT + FBSLSETTEXT(ME, "After Flood Fill") ' Reset form caption END SUB SUB DrawCircles() ' Concatenate function calls - CIRCLE(FBSL.GETDC, Breadth / 2, Height / 2, 85, &HFFFFFF, 0, 360, 1, TRUE) _ ' White - (FBSL.GETDC, Breadth / 3, Height / 3, 30, 0, 0, 360, 1, TRUE) ' Black + CIRCLE(FBSL.GETDC, Breadth / 2, Height / 2, 85, &HFFFFFF, 0, 360, 1, TRUE) _ ' White + (FBSL.GETDC, Breadth / 3, Height / 3, 30, 0, 0, 360, 1, TRUE) ' Black END SUB diff --git a/Task/Bitmap-Flood-fill/Julia/bitmap-flood-fill.jl b/Task/Bitmap-Flood-fill/Julia/bitmap-flood-fill.julia similarity index 100% rename from Task/Bitmap-Flood-fill/Julia/bitmap-flood-fill.jl rename to Task/Bitmap-Flood-fill/Julia/bitmap-flood-fill.julia diff --git a/Task/Bitmap-Flood-fill/Kotlin/bitmap-flood-fill.kts b/Task/Bitmap-Flood-fill/Kotlin/bitmap-flood-fill.kotlin similarity index 100% rename from Task/Bitmap-Flood-fill/Kotlin/bitmap-flood-fill.kts rename to Task/Bitmap-Flood-fill/Kotlin/bitmap-flood-fill.kotlin diff --git a/Task/Bitmap-Flood-fill/MiniScript/bitmap-flood-fill.mini b/Task/Bitmap-Flood-fill/MiniScript/bitmap-flood-fill.mini index e4a6dfa8d6..ea71b8be0a 100644 --- a/Task/Bitmap-Flood-fill/MiniScript/bitmap-flood-fill.mini +++ b/Task/Bitmap-Flood-fill/MiniScript/bitmap-flood-fill.mini @@ -1,18 +1,18 @@ floodFill = function(bmp, x, y, targetColor, replacementColor) - // Check if pixel is outside the bounds - if not(0 < x < bmp.width) or not(0 < y < bmp.height) then return - - // Check the current pixel color - currentColor = bmp.pixel(x, y) - if currentColor != targetColor then return - - // Replace the color - bmp.setPixel x, y, replacementColor - // Recursively apply to adjacent pixels - floodFill(bmp, x + 1, y, targetColor, replacementColor) - floodFill(bmp, x - 1, y, targetColor, replacementColor) - floodFill(bmp, x, y + 1, targetColor, replacementColor) - floodFill(bmp, x, y - 1, targetColor, replacementColor) + // Check if pixel is outside the bounds + if not(0 < x < bmp.width) or not(0 < y < bmp.height) then return + + // Check the current pixel color + currentColor = bmp.pixel(x, y) + if currentColor != targetColor then return + + // Replace the color + bmp.setPixel x, y, replacementColor + // Recursively apply to adjacent pixels + floodFill(bmp, x + 1, y, targetColor, replacementColor) + floodFill(bmp, x - 1, y, targetColor, replacementColor) + floodFill(bmp, x, y + 1, targetColor, replacementColor) + floodFill(bmp, x, y - 1, targetColor, replacementColor) end function clear img = file.loadImage("Unfilledcirc.png") diff --git a/Task/Bitmap-Flood-fill/OCaml/bitmap-flood-fill.ml b/Task/Bitmap-Flood-fill/OCaml/bitmap-flood-fill.ocaml similarity index 100% rename from Task/Bitmap-Flood-fill/OCaml/bitmap-flood-fill.ml rename to Task/Bitmap-Flood-fill/OCaml/bitmap-flood-fill.ocaml diff --git a/Task/Bitmap-Flood-fill/Perl/bitmap-flood-fill-2.pl b/Task/Bitmap-Flood-fill/Perl/bitmap-flood-fill-2.pl index dae6942463..049af58478 100644 --- a/Task/Bitmap-Flood-fill/Perl/bitmap-flood-fill-2.pl +++ b/Task/Bitmap-Flood-fill/Perl/bitmap-flood-fill-2.pl @@ -23,20 +23,20 @@ sub floodfill if ( colordistance(\@tcol, \@col) > $distparameter ) { return; } push @queue, [$x, $y]; while ( @queue ) { - my $pointref = shift(@queue); - ( $x, $y ) = @$pointref; - if ( ($x < 0) || ($y < 0) || ( $x >= $img->width ) || ( $y >= $img->height ) ) { next; } - if ( ! exists($visited{"$x,$y"}) ) { - @col = $img->query_pixel($x, $y); - if ( colordistance(\@tcol, \@col) <= $distparameter ) { - $img->draw_point($x, $y); - $visited{"$x,$y"} = 1; - push @queue, [$x+1, $y]; - push @queue, [$x-1, $y]; - push @queue, [$x, $y+1]; - push @queue, [$x, $y-1]; - } - } + my $pointref = shift(@queue); + ( $x, $y ) = @$pointref; + if ( ($x < 0) || ($y < 0) || ( $x >= $img->width ) || ( $y >= $img->height ) ) { next; } + if ( ! exists($visited{"$x,$y"}) ) { + @col = $img->query_pixel($x, $y); + if ( colordistance(\@tcol, \@col) <= $distparameter ) { + $img->draw_point($x, $y); + $visited{"$x,$y"} = 1; + push @queue, [$x+1, $y]; + push @queue, [$x-1, $y]; + push @queue, [$x, $y+1]; + push @queue, [$x, $y-1]; + } + } } } diff --git a/Task/Bitmap-Flood-fill/Raku/bitmap-flood-fill.raku b/Task/Bitmap-Flood-fill/Raku/bitmap-flood-fill.raku index 7cafc0de1d..fa29c20997 100644 --- a/Task/Bitmap-Flood-fill/Raku/bitmap-flood-fill.raku +++ b/Task/Bitmap-Flood-fill/Raku/bitmap-flood-fill.raku @@ -4,16 +4,16 @@ class Bitmap { has Pixel @.data; method pixel( - $i where ^$!width, - $j where ^$!height - --> Pixel + $i where ^$!width, + $j where ^$!height + --> Pixel ) is rw { @!data[$i + $j * $!width] } } role PPM { method P6 returns Blob { - "P6\n{self.width} {self.height}\n255\n".encode('ascii') - ~ Blob.new: flat map { .R, .G, .B }, self.data + "P6\n{self.width} {self.height}\n255\n".encode('ascii') + ~ Blob.new: flat map { .R, .G, .B }, self.data } } diff --git a/Task/Bitmap-Flood-fill/Rebol/bitmap-flood-fill.rebol b/Task/Bitmap-Flood-fill/Rebol/bitmap-flood-fill.rebol deleted file mode 100644 index f5deeabdf5..0000000000 --- a/Task/Bitmap-Flood-fill/Rebol/bitmap-flood-fill.rebol +++ /dev/null @@ -1,64 +0,0 @@ -Rebol [ - title: "Rosetta code: Bitmap/Flood fill" - file: %Bitmap-Flood_fill.r3 - url: https://rosettacode.org/wiki/Bitmap/Bitmap-Flood_fill -] - -flood-fill: function [ - image [image! file! url!] - position [pair!] "Start position" - color1 [tuple!] "Target color to replace" - color2 [tuple!] "Replacement color" -][ - unless image? image [image: load image] ;; Load image if not already loaded - xsize: image/size/x - ysize: image/size/y - - color2/4: color1/4: 255 ;; Ensure both colors are fully opaque - - que: copy [] - if image/:position != color1 [return image] ;; Bail if seed pixel isn't target color - - append que position - while [not empty? que][ - position: take que ;; Dequeue next position to process - if image/:position == color1 [ ;; Skip if already recolored - W: position - ;; Scan west, recoloring pixels until we leave the target-color region - while [image/:W == color1][ - image/:W: color2 - next: W + 0x1 ;; Pixel south of W - if all [next/y < ysize color1 == image/:next][append que next] - next: W - 0x1 ;; Pixel north of W - if all [next/y > 0 color1 == image/:next][append que next] - next: W - 1x0 ;; Step west - either next/x > 1 [W: next][break] ;; Stop at left edge - ] - E: position + 1x0 ;; Start east scan one step right of seed - if E/x < xsize [ - ;; Scan east, recoloring pixels until we leave the target-color region - while [image/:E == color1][ - image/:E: color2 - next: E + 0x1 ;; Pixel south of E - if all [next/y < ysize color1 == image/:next][append que next] - next: E - 0x1 ;; Pixel north of E - if all [next/y > 0 color1 == image/:next][append que next] - next: E + 1x0 ;; Step east - either next/x < xsize [E: next][break] ;; Stop at right edge - ] - ] - ] - ] - image ;; Return the modified image -] - -;; Download the test image if not already cached locally -unless exists? file: %Unfilledcirc.png [ - write file read https://static.wikitide.net/rosettacodewiki/0/0f/Unfilledcirc.png -] - -img: load %Unfilledcirc.png -img: flood-fill img 200x200 white red -img: flood-fill img 100x100 black blue - -browse save %Filledcirc.png img ;; Save result and open in browser diff --git a/Task/Bitmap-Flood-fill/Rust/bitmap-flood-fill.rs b/Task/Bitmap-Flood-fill/Rust/bitmap-flood-fill.rust similarity index 100% rename from Task/Bitmap-Flood-fill/Rust/bitmap-flood-fill.rs rename to Task/Bitmap-Flood-fill/Rust/bitmap-flood-fill.rust diff --git a/Task/Bitmap-Flood-fill/Uiua/bitmap-flood-fill.uiua b/Task/Bitmap-Flood-fill/Uiua/bitmap-flood-fill.uiua deleted file mode 100644 index 0808eee12c..0000000000 --- a/Task/Bitmap-Flood-fill/Uiua/bitmap-flood-fill.uiua +++ /dev/null @@ -1,12 +0,0 @@ -# Drop a png onto this pane, then Run. -&p$"Found a _" °img&frab "image.png" -≡≡⊢ # Convert to greyscale. -Sensitivity ← 0.3 # Lower is finer. -N₄ ← [1_0 0_1 ¯ 1_0 0_¯1] -[40_40]⊙0.8 # Starting point, fill colour. -Good ← >Sensitivity⌵-⬚0.5⊡⊢ # Needs filling. Simple edges-check. -# Take first of list. If needs fill, do so and then add -# its four neighbours into queue. Repeat until queue is empty. -⍢(⨬(↘1|◴⊂+N₄¤°⊂ ⊃(⋅∘|∘|⋅⋅⋅∘)◡(⍜(⊡|⋅∘)⊢))◡Good -| >0⧻) -⋅⊙⋅ diff --git a/Task/Bitmap-Flood-fill/Zkl/bitmap-flood-fill-1.zkl b/Task/Bitmap-Flood-fill/Zkl/bitmap-flood-fill-1.zkl index 24f859e0a8..ccd3c7df5a 100644 --- a/Task/Bitmap-Flood-fill/Zkl/bitmap-flood-fill-1.zkl +++ b/Task/Bitmap-Flood-fill/Zkl/bitmap-flood-fill-1.zkl @@ -4,11 +4,11 @@ fcn flood(pixmap, x,y, repl){ // slow! while(stack){ x,y:=stack.pop(); if((0<=y hist(j) Then - Swap hist(i), hist(j) - Swap idx(i), idx(j) - End If - Next -Next - -' Encontrar la mediana -total = 0 -For i = 0 To 255 - total += hist(i) -Next - -half = 0 -For i = 0 To 255 - half += hist(i) - If half >= total \ 2 Then - median = idx(i) - Exit For - End If -Next - -'Windowtitle("Histogram") -Windowtitle "Original vs Black and White" - -' Mostrar versión en blanco y negro en la mitad derecha -For y = 0 To alto - 1 - For x = 0 To ancho - 1 - l = Point(x, y) And &HFF - If l > median Then - Pset (x + ancho, y), Rgb(255, 255, 255) - Else - Pset (x + ancho, y), Rgb(0, 0, 0) - End If - Next -Next - -' Guardar la imagen resultante (ambas imágenes juntas) -Bsave "Lena_Original_and_BW.bmp", 0 - -Sleep diff --git a/Task/Bitmap-Histogram/Julia/bitmap-histogram.jl b/Task/Bitmap-Histogram/Julia/bitmap-histogram.julia similarity index 100% rename from Task/Bitmap-Histogram/Julia/bitmap-histogram.jl rename to Task/Bitmap-Histogram/Julia/bitmap-histogram.julia diff --git a/Task/Bitmap-Histogram/Kotlin/bitmap-histogram.kts b/Task/Bitmap-Histogram/Kotlin/bitmap-histogram.kotlin similarity index 100% rename from Task/Bitmap-Histogram/Kotlin/bitmap-histogram.kts rename to Task/Bitmap-Histogram/Kotlin/bitmap-histogram.kotlin diff --git a/Task/Bitmap-Histogram/OCaml/bitmap-histogram-1.ml b/Task/Bitmap-Histogram/OCaml/bitmap-histogram-1.ocaml similarity index 100% rename from Task/Bitmap-Histogram/OCaml/bitmap-histogram-1.ml rename to Task/Bitmap-Histogram/OCaml/bitmap-histogram-1.ocaml diff --git a/Task/Bitmap-Histogram/OCaml/bitmap-histogram-2.ml b/Task/Bitmap-Histogram/OCaml/bitmap-histogram-2.ocaml similarity index 100% rename from Task/Bitmap-Histogram/OCaml/bitmap-histogram-2.ml rename to Task/Bitmap-Histogram/OCaml/bitmap-histogram-2.ocaml diff --git a/Task/Bitmap-Histogram/OCaml/bitmap-histogram-3.ml b/Task/Bitmap-Histogram/OCaml/bitmap-histogram-3.ocaml similarity index 100% rename from Task/Bitmap-Histogram/OCaml/bitmap-histogram-3.ml rename to Task/Bitmap-Histogram/OCaml/bitmap-histogram-3.ocaml diff --git a/Task/Bitmap-Histogram/PHP/bitmap-histogram.php b/Task/Bitmap-Histogram/PHP/bitmap-histogram.php index f2e10b03ca..631623d041 100644 --- a/Task/Bitmap-Histogram/PHP/bitmap-histogram.php +++ b/Task/Bitmap-Histogram/PHP/bitmap-histogram.php @@ -1,11 +1,11 @@ -define('src_name', 'input.jpg'); // source image -define('dest_name', 'output.jpg'); // destination image +define('src_name', 'input.jpg'); // source image +define('dest_name', 'output.jpg'); // destination image -$img = imagecreatefromjpeg(src_name); // read image +$img = imagecreatefromjpeg(src_name); // read image if(empty($img)){ - echo 'Image could not be loaded!'; - exit; + echo 'Image could not be loaded!'; + exit; } $black = imagecolorallocate($img, 0, 0, 0); @@ -13,42 +13,42 @@ $white = imagecolorallocate($img, 255, 255, 255); $width = imagesx($img); $height = imagesy($img); -$array_lum = array(); // for storage of luminosity of each pixel -$sum_lum = 0; // total sum of luminosity -$average_lum = 0; // average luminosity of whole image +$array_lum = array(); // for storage of luminosity of each pixel +$sum_lum = 0; // total sum of luminosity +$average_lum = 0; // average luminosity of whole image -for($x = 0; $x < $width; $x++){ - for($y = 0; $y < $height; $y++){ - // read pixel value - $color = imagecolorat($img, $x, $y); - $r = ($color >> 16) & 0xFF; - $g = ($color >> 8) & 0xFF; - $b = $color & 0xFF; - // save pixel luminosity in temporary array - $array_lum[$x][$y] = ($r + $g + $b); - // add pixel luminosity to sum - $sum_lum += $array_lum[$x][$y]; - } +for($x = 0; $x < $width; $x++){ + for($y = 0; $y < $height; $y++){ + // read pixel value + $color = imagecolorat($img, $x, $y); + $r = ($color >> 16) & 0xFF; + $g = ($color >> 8) & 0xFF; + $b = $color & 0xFF; + // save pixel luminosity in temporary array + $array_lum[$x][$y] = ($r + $g + $b); + // add pixel luminosity to sum + $sum_lum += $array_lum[$x][$y]; + } } // calculate average luminosity $average_lum = $sum_lum / ($width * $height); -for($x = 0; $x < $width; $x++){ - for($y = 0; $y < $height; $y++){ - // pixel is brighter than average -> set white - // else -> set black - if($array_lum[$x][$y] > $average_lum){ - imagesetpixel($img, $x, $y, $white); - } - else{ - imagesetpixel($img, $x, $y, $black); - } - } +for($x = 0; $x < $width; $x++){ + for($y = 0; $y < $height; $y++){ + // pixel is brighter than average -> set white + // else -> set black + if($array_lum[$x][$y] > $average_lum){ + imagesetpixel($img, $x, $y, $white); + } + else{ + imagesetpixel($img, $x, $y, $black); + } + } } // save black and white image to dest_name imagejpeg($img, dest_name); if(!file_exists(dest_name)){ - echo 'Image not saved! Check permission!'; + echo 'Image not saved! Check permission!'; } diff --git a/Task/Bitmap-Histogram/Raku/bitmap-histogram.raku b/Task/Bitmap-Histogram/Raku/bitmap-histogram.raku index e94fea18fb..fa9a0b9efc 100644 --- a/Task/Bitmap-Histogram/Raku/bitmap-histogram.raku +++ b/Task/Bitmap-Histogram/Raku/bitmap-histogram.raku @@ -7,8 +7,8 @@ class Bitmap { role PBM { has @.BM; method P4 returns Blob { - "P4\n{self.width} {self.height}\n".encode('ascii') - ~ Blob.new: self.BM + "P4\n{self.width} {self.height}\n".encode('ascii') + ~ Blob.new: self.BM } } diff --git a/Task/Bitmap-Histogram/Rebol/bitmap-histogram-1.rebol b/Task/Bitmap-Histogram/Rebol/bitmap-histogram-1.rebol deleted file mode 100644 index 94755e279b..0000000000 --- a/Task/Bitmap-Histogram/Rebol/bitmap-histogram-1.rebol +++ /dev/null @@ -1,27 +0,0 @@ -Rebol [ - title: "Rosetta code: Bitmap/Histogram" - file: %Bitmap-Histogram.r3 - url: https://rosettacode.org/wiki/Bitmap/Bitmap-Histogram - needs: 3.21.9 -] - -;; Load source image from file -img: load %Lenna50.jpg -;; Extract luminosity as vector for statistical operations -vec: to vector! img/luminosity -;; Compute median brightness threshold -med: vec/median -;; Allocate 256-bucket uint32 histogram (one bucket per brightness level) -histogram: make vector! [uint32! 255] -;; In a single pass: build brightness histogram and threshold each pixel -forall vec [ - val: vec/1 - histogram/:val: histogram/:val + 1 ;; tally pixel's brightness bucket - vec/1: either val < med [0][255] ;; binarize: black or white -] -;; Inspect histogram distribution -? histogram -;; Write thresholded grayscale data back to image -img/gray: vec -;; Save result as PNG and open in browser -browse save %Lenna50-bw.png img diff --git a/Task/Bitmap-Histogram/Rebol/bitmap-histogram-2.rebol b/Task/Bitmap-Histogram/Rebol/bitmap-histogram-2.rebol deleted file mode 100644 index 2586976144..0000000000 --- a/Task/Bitmap-Histogram/Rebol/bitmap-histogram-2.rebol +++ /dev/null @@ -1,8 +0,0 @@ -img: load %Lenna50.jpg -foreach channel [red green blue] [ - vec: to vector! img/:channel - med: vec/median - forall vec [vec/1: either vec/1 < med [0][255]] - img/:channel: vec -] -browse save %Lenna50-rgb.png img diff --git a/Task/Bitmap-Histogram/Rust/bitmap-histogram.rs b/Task/Bitmap-Histogram/Rust/bitmap-histogram.rust similarity index 100% rename from Task/Bitmap-Histogram/Rust/bitmap-histogram.rs rename to Task/Bitmap-Histogram/Rust/bitmap-histogram.rust diff --git a/Task/Bitmap-Histogram/Scala/bitmap-histogram-1.scala b/Task/Bitmap-Histogram/Scala/bitmap-histogram-1.scala index 2d5144c867..4646774d80 100644 --- a/Task/Bitmap-Histogram/Scala/bitmap-histogram-1.scala +++ b/Task/Bitmap-Histogram/Scala/bitmap-histogram-1.scala @@ -27,6 +27,6 @@ object BitmapOps { val c2=Color.WHITE for(x <- 0 until bm.width; y <- 0 until bm.height; l=luminosity(bm.getPixel(x,y))) image.setPixel(x, y, if(l>threshold) c2 else c1) - image + image } } diff --git a/Task/Bitmap-Histogram/Vedit-macro-language/bitmap-histogram.vedit b/Task/Bitmap-Histogram/Vedit-macro-language/bitmap-histogram.vedit index 8018fff516..df0380645d 100644 --- a/Task/Bitmap-Histogram/Vedit-macro-language/bitmap-histogram.vedit +++ b/Task/Bitmap-Histogram/Vedit-macro-language/bitmap-histogram.vedit @@ -1,10 +1,10 @@ :HISTOGRAM: -#30 = Buf_Free // #30 = buffer to store histogram data +#30 = Buf_Free // #30 = buffer to store histogram data for (#9=0; #9<256; #9++) { - Out_Reg(21) TC(#9) Out_Reg(Clear) // @21 = intensity value to be counted - Buf_Switch(#15) // switch to image buffer - #8 = Search(@21, CASE+BEGIN+ALL+NOERR) // count intensity values - Buf_Switch(#30) // switch to histogram buffer - Num_Ins(#8, FILL) // store count + Out_Reg(21) TC(#9) Out_Reg(Clear) // @21 = intensity value to be counted + Buf_Switch(#15) // switch to image buffer + #8 = Search(@21, CASE+BEGIN+ALL+NOERR) // count intensity values + Buf_Switch(#30) // switch to histogram buffer + Num_Ins(#8, FILL) // store count } Return diff --git a/Task/Bitmap-Histogram/Zkl/bitmap-histogram-1.zkl b/Task/Bitmap-Histogram/Zkl/bitmap-histogram-1.zkl index 69d94f35f3..5d99339833 100644 --- a/Task/Bitmap-Histogram/Zkl/bitmap-histogram-1.zkl +++ b/Task/Bitmap-Histogram/Zkl/bitmap-histogram-1.zkl @@ -1,5 +1,5 @@ fcn histogram(image){ - hist:=List.createLong(256,0); // array[256] of zero + hist:=List.createLong(256,0); // array[256] of zero image.data.howza(0).pump(Void,'wrap(c){ hist[c]+=1 }); // byte by byte loop hist; } @@ -8,7 +8,7 @@ fcn histogramMedian(hist){ left,right:=hist[from],hist[to]; while(from!=to){ if(left=y - plot( x + x0, y + y0) - plot( y + x0, x + y0) - plot(-x + x0, y + y0) - plot(-y + x0, x + y0) - plot(-x + x0, -y + y0) - plot(-y + x0, -x + y0) - plot( x + x0, -y + y0) - plot( y + x0, -x + y0) + while x>=y + plot( x + x0, y + y0) + plot( y + x0, x + y0) + plot(-x + x0, y + y0) + plot(-y + x0, x + y0) + plot(-x + x0, -y + y0) + plot(-y + x0, -x + y0) + plot( x + x0, -y + y0) + plot( y + x0, -x + y0) - y++ + y++ - if decisionOver2<=0 then - decisionOver2+=2*y+1 - else - x-- - decisionOver2+=2*(y-x)+1 - end if - end while - return 0 + if decisionOver2<=0 then + decisionOver2+=2*y+1 + else + x-- + decisionOver2+=2*(y-x)+1 + end if + end while + return 0 End Function diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Batch-File/bitmap-midpoint-circle-algorithm.bat b/Task/Bitmap-Midpoint-circle-algorithm/Batch-File/bitmap-midpoint-circle-algorithm.bat index ba0ddcb5fe..45665a2733 100644 --- a/Task/Bitmap-Midpoint-circle-algorithm/Batch-File/bitmap-midpoint-circle-algorithm.bat +++ b/Task/Bitmap-Midpoint-circle-algorithm/Batch-File/bitmap-midpoint-circle-algorithm.bat @@ -1,7 +1,7 @@ @echo off setlocal enabledelayedexpansion - %== Initializations ==% + %== Initializations ==% set width=50 set height=30 @@ -11,62 +11,62 @@ echo Rendering... set "outp=" for /l %%i in (1,1,%height%) do ( - for /l %%j in (1,1,%width%) do ( - set "c[%%i][%%j]= " - ) + for /l %%j in (1,1,%width%) do ( + set "c[%%i][%%j]= " + ) ) - %== Set the parameters for making circle ==% + %== Set the parameters for making circle ==% call :DrawCircle 20 20 10 call :DrawCircle 10 30 15 - %== Output result ==% + %== Output result ==% for /l %%i in (1,1,%height%) do ( - for /l %%j in (1,1,%width%) do ( - set "outp=!outp!!c[%%i][%%j]!" - ) + for /l %%j in (1,1,%width%) do ( + set "outp=!outp!!c[%%i][%%j]!" + ) ) cls echo !outp! pause>nul exit /b - %== The main function ==% + %== The main function ==% :DrawCircle - set x0=%1 - set y0=%2 - set radius=%3 + set x0=%1 + set y0=%2 + set radius=%3 - set x=!radius! - set y=0 - set /a decisionOver2 = 1 - !x! + set x=!radius! + set y=0 + set /a decisionOver2 = 1 - !x! - :circle_loop - if !x! geq !y! ( - set /a "hor=x + x0","ver=y + y0" - set "c[!hor!][!ver!]=Û" - set /a "hor=y + x0","ver=x + y0" - set "c[!hor!][!ver!]=Û" - set /a "hor=-x + x0","ver=y + y0" - set "c[!hor!][!ver!]=Û" - set /a "hor=-y + x0","ver=x + y0" - set "c[!hor!][!ver!]=Û" - set /a "hor=-x + x0","ver=-y + y0" - set "c[!hor!][!ver!]=Û" - set /a "hor=-y + x0","ver=-x + y0" - set "c[!hor!][!ver!]=Û" - set /a "hor=x + x0","ver=-y + y0" - set "c[!hor!][!ver!]=Û" - set /a "hor=y + x0","ver=-x + y0" - set "c[!hor!][!ver!]=Û" + :circle_loop + if !x! geq !y! ( + set /a "hor=x + x0","ver=y + y0" + set "c[!hor!][!ver!]=Û" + set /a "hor=y + x0","ver=x + y0" + set "c[!hor!][!ver!]=Û" + set /a "hor=-x + x0","ver=y + y0" + set "c[!hor!][!ver!]=Û" + set /a "hor=-y + x0","ver=x + y0" + set "c[!hor!][!ver!]=Û" + set /a "hor=-x + x0","ver=-y + y0" + set "c[!hor!][!ver!]=Û" + set /a "hor=-y + x0","ver=-x + y0" + set "c[!hor!][!ver!]=Û" + set /a "hor=x + x0","ver=-y + y0" + set "c[!hor!][!ver!]=Û" + set /a "hor=y + x0","ver=-x + y0" + set "c[!hor!][!ver!]=Û" - set /a y+=1 - if !decisionOver2! leq 0 ( - set /a "decisionOver2 = !decisionOver2! + (2 * y^) + 1" - ) else ( - set /a x-=1 - set /a "decisionOver2 = !decisionOver2! + 2 * (y - x^) + 1" - ) - goto circle_loop - ) + set /a y+=1 + if !decisionOver2! leq 0 ( + set /a "decisionOver2 = !decisionOver2! + (2 * y^) + 1" + ) else ( + set /a x-=1 + set /a "decisionOver2 = !decisionOver2! + 2 * (y - x^) + 1" + ) + goto circle_loop + ) goto :EOF diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Crystal/bitmap-midpoint-circle-algorithm-1.cr b/Task/Bitmap-Midpoint-circle-algorithm/Crystal/bitmap-midpoint-circle-algorithm-1.cr deleted file mode 100644 index 662403d75a..0000000000 --- a/Task/Bitmap-Midpoint-circle-algorithm/Crystal/bitmap-midpoint-circle-algorithm-1.cr +++ /dev/null @@ -1,40 +0,0 @@ -require "./pixmap" -require "./bresenham" - -class Pixmap - def circle (cx, cy, r, color, fill = false) - f = 1 - r - ddF_X = 0 - ddF_Y = -2 * r - x = 0 - y = r - self[cx, cy + r] = color - self[cx, cy - r] = color - p1, p2 = {cx + r, cy}, {cx - r, cy} - if fill - line(*p1, *p2, color) - else - self[*p1] = self[*p2] = color - end - while x < y - if f >= 0 - y -= 1 - ddF_Y += 2 - f += ddF_Y - end - x += 1 - ddF_X += 2 - f += ddF_X + 1 - [{cx - x, cy - y}, {cx + x, cy - y}, - {cx - x, cy + y}, {cx + x, cy + y}, - {cx - y, cy - x}, {cx + y, cy - x}, - {cx - y, cy + x}, {cx + y, cy + x}].each_slice(2, reuse: true) do |(p1, p2)| - if fill - line(*p1, *p2, color) - else - self[*p1] = self[*p2] = color - end - end - end - end -end diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Crystal/bitmap-midpoint-circle-algorithm-2.cr b/Task/Bitmap-Midpoint-circle-algorithm/Crystal/bitmap-midpoint-circle-algorithm-2.cr deleted file mode 100644 index 821729bbd3..0000000000 --- a/Task/Bitmap-Midpoint-circle-algorithm/Crystal/bitmap-midpoint-circle-algorithm-2.cr +++ /dev/null @@ -1,12 +0,0 @@ -require "./circle" -require "./write_ppm" - -img = Pixmap.new 100, 100, Color::WHITE - -img.circle 50, 50, 40, Color::RED, true -img.circle 70, 60, 15, Color::BLUE, true -img.circle 40, 20, 20, Color::BLACK -img.circle 40, 20, 19, Color.new(255, 144, 0) -img.circle 40, 20, 18, Color::BLACK - -img.write "crystal_circles.ppm" diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Delphi/bitmap-midpoint-circle-algorithm.delphi b/Task/Bitmap-Midpoint-circle-algorithm/Delphi/bitmap-midpoint-circle-algorithm.delphi new file mode 100644 index 0000000000..a27d5aad00 --- /dev/null +++ b/Task/Bitmap-Midpoint-circle-algorithm/Delphi/bitmap-midpoint-circle-algorithm.delphi @@ -0,0 +1,50 @@ +procedure DrawCircle(Image: TImage; Radius: integer; Center: TPoint); +var T1,T2: integer; +var X,Y: integer; +var Cnt: integer; + + procedure DrawPixels(X,Y: integer); + {Draw pixel into all 8 octents} + begin + Image.Canvas.Pixels[Center.X + x, Center.Y + y]:=clRed; + Image.Canvas.Pixels[Center.X - X, Center.Y + Y]:=clRed; + Image.Canvas.Pixels[Center.X + X, Center.Y - Y]:=clRed; + Image.Canvas.Pixels[Center.X - X, Center.Y - Y]:=clRed; + Image.Canvas.Pixels[Center.X + Y, Center.Y + X]:=clRed; + Image.Canvas.Pixels[Center.X - Y, Center.Y + X]:=clRed; + Image.Canvas.Pixels[Center.X + y, Center.Y - X]:=clRed; + Image.Canvas.Pixels[Center.X - Y, Center.Y - X]:=clRed; + end; + +begin +Cnt:=0; +T1:= Radius div 32; +{Start on X-axis} +X:= Radius; Y:= 0; +repeat + begin + DrawPixels(X, Y); + Y:=Y + 1; + T1:=T1 + Y; + T2:=T1 - X; + if T2 >= 0 then + begin + T1:=T2; + X:=X - 1; + end; + Inc(Cnt); + end +until x < y; +Form1.Caption:=IntToStr(Cnt); +end; + + + +procedure ShowBrezCircle(Image: TImage); +begin +{Draw three times to make line thicker} +DrawCircle(Image,100,Point(200,200)); +DrawCircle(Image,99,Point(200,200)); +DrawCircle(Image,98,Point(200,200)); +Image.Invalidate; +end; diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Delphi/bitmap-midpoint-circle-algorithm.pas b/Task/Bitmap-Midpoint-circle-algorithm/Delphi/bitmap-midpoint-circle-algorithm.pas deleted file mode 100644 index 70e6487fce..0000000000 --- a/Task/Bitmap-Midpoint-circle-algorithm/Delphi/bitmap-midpoint-circle-algorithm.pas +++ /dev/null @@ -1,50 +0,0 @@ -procedure DrawCircle(Image: TImage; Radius: integer; Center: TPoint); -var T1,T2: integer; -var X,Y: integer; -var Cnt: integer; - - procedure DrawPixels(X,Y: integer); - {Draw pixel into all 8 octents} - begin - Image.Canvas.Pixels[Center.X + x, Center.Y + y]:=clRed; - Image.Canvas.Pixels[Center.X - X, Center.Y + Y]:=clRed; - Image.Canvas.Pixels[Center.X + X, Center.Y - Y]:=clRed; - Image.Canvas.Pixels[Center.X - X, Center.Y - Y]:=clRed; - Image.Canvas.Pixels[Center.X + Y, Center.Y + X]:=clRed; - Image.Canvas.Pixels[Center.X - Y, Center.Y + X]:=clRed; - Image.Canvas.Pixels[Center.X + y, Center.Y - X]:=clRed; - Image.Canvas.Pixels[Center.X - Y, Center.Y - X]:=clRed; - end; - -begin -Cnt:=0; -T1:= Radius div 32; -{Start on X-axis} -X:= Radius; Y:= 0; -repeat - begin - DrawPixels(X, Y); - Y:=Y + 1; - T1:=T1 + Y; - T2:=T1 - X; - if T2 >= 0 then - begin - T1:=T2; - X:=X - 1; - end; - Inc(Cnt); - end -until x < y; -Form1.Caption:=IntToStr(Cnt); -end; - - - -procedure ShowBrezCircle(Image: TImage); -begin -{Draw three times to make line thicker} -DrawCircle(Image,100,Point(200,200)); -DrawCircle(Image,99,Point(200,200)); -DrawCircle(Image,98,Point(200,200)); -Image.Invalidate; -end; diff --git a/Task/Bitmap-Midpoint-circle-algorithm/EasyLang/bitmap-midpoint-circle-algorithm.easy b/Task/Bitmap-Midpoint-circle-algorithm/EasyLang/bitmap-midpoint-circle-algorithm.easy deleted file mode 100644 index 2e0418ae0b..0000000000 --- a/Task/Bitmap-Midpoint-circle-algorithm/EasyLang/bitmap-midpoint-circle-algorithm.easy +++ /dev/null @@ -1,27 +0,0 @@ -proc pix x y . - grect x / 5 y / 5 0.25 0.25 -. -proc circ x0 y0 r . - t1 = r div 16 - x = r - while x >= y - pix x0 - x, y0 + y - pix x0 - x, y0 - y - pix x0 - y, y0 + x - pix x0 - y, y0 - x - pix x0 + x, y0 + y - pix x0 + x, y0 - y - pix x0 + y, y0 + x - pix x0 + y, y0 - x - y += 1 - t1 += y - t2 = t1 - x - if t2 >= 0 - t1 = t2 - x -= 1 - . - . -. -for r = 20 step 20 to 240 - circ 250 250 r -. diff --git a/Task/Bitmap-Midpoint-circle-algorithm/FBSL/bitmap-midpoint-circle-algorithm.fbsl b/Task/Bitmap-Midpoint-circle-algorithm/FBSL/bitmap-midpoint-circle-algorithm.fbsl index c26d8ea33c..4ab0e557c9 100644 --- a/Task/Bitmap-Midpoint-circle-algorithm/FBSL/bitmap-midpoint-circle-algorithm.fbsl +++ b/Task/Bitmap-Midpoint-circle-algorithm/FBSL/bitmap-midpoint-circle-algorithm.fbsl @@ -13,29 +13,29 @@ DIM Breadth AS INTEGER, Height AS INTEGER FBSL.GETCLIENTRECT(ME, 0, 0, Breadth, Height) BEGIN EVENTS ' Main message loop - SELECT CASE CBMSG - CASE WM_LBUTTONDOWN: MidpointCircle() ' Draw - CASE WM_CLOSE: FBSL.RELEASEDC(ME, FBSL.GETDC) ' Clean up - END SELECT + SELECT CASE CBMSG + CASE WM_LBUTTONDOWN: MidpointCircle() ' Draw + CASE WM_CLOSE: FBSL.RELEASEDC(ME, FBSL.GETDC) ' Clean up + END SELECT END EVENTS SUB MidpointCircle() - BresenhamCircle(Breadth \ 2, Height \ 2, 80, &HFF) ' Red: Windows stores colors in BGR order - BresenhamCircle(Breadth \ 2, Height \ 2, 40, 0) ' Black - - SUB BresenhamCircle(cx, cy, radius, colour) - DIM x = 0, y = radius, f = 1 - radius, dx = 0, dy = -2 * radius - - PSET(FBSL.GETDC, cx, cy + radius, colour)(FBSL.GETDC, cx, cy - radius, colour) - PSET(FBSL.GETDC, cx + radius, cy, colour)(FBSL.GETDC, cx - radius, cy, colour) - - WHILE x < y - IF f >= 0 THEN: DECR(y): INCR(dy, 2)(f, dy): END IF ' Try also "IF f THEN" :) - INCR(x)(dx, 2)(f, dx + 1) - PSET(FBSL.GETDC, cx + x, cy + y, colour)(FBSL.GETDC, cx - x, cy + y, colour) - PSET(FBSL.GETDC, cx + x, cy - y, colour)(FBSL.GETDC, cx - x, cy - y, colour) - PSET(FBSL.GETDC, cx + y, cy + x, colour)(FBSL.GETDC, cx - y, cy + x, colour) - PSET(FBSL.GETDC, cx + y, cy - x, colour)(FBSL.GETDC, cx - y, cy - x, colour) - WEND - END SUB + BresenhamCircle(Breadth \ 2, Height \ 2, 80, &HFF) ' Red: Windows stores colors in BGR order + BresenhamCircle(Breadth \ 2, Height \ 2, 40, 0) ' Black + + SUB BresenhamCircle(cx, cy, radius, colour) + DIM x = 0, y = radius, f = 1 - radius, dx = 0, dy = -2 * radius + + PSET(FBSL.GETDC, cx, cy + radius, colour)(FBSL.GETDC, cx, cy - radius, colour) + PSET(FBSL.GETDC, cx + radius, cy, colour)(FBSL.GETDC, cx - radius, cy, colour) + + WHILE x < y + IF f >= 0 THEN: DECR(y): INCR(dy, 2)(f, dy): END IF ' Try also "IF f THEN" :) + INCR(x)(dx, 2)(f, dx + 1) + PSET(FBSL.GETDC, cx + x, cy + y, colour)(FBSL.GETDC, cx - x, cy + y, colour) + PSET(FBSL.GETDC, cx + x, cy - y, colour)(FBSL.GETDC, cx - x, cy - y, colour) + PSET(FBSL.GETDC, cx + y, cy + x, colour)(FBSL.GETDC, cx - y, cy + x, colour) + PSET(FBSL.GETDC, cx + y, cy - x, colour)(FBSL.GETDC, cx - y, cy - x, colour) + WEND + END SUB END SUB diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Java/bitmap-midpoint-circle-algorithm.java b/Task/Bitmap-Midpoint-circle-algorithm/Java/bitmap-midpoint-circle-algorithm.java index 67697a0840..9019b3a968 100644 --- a/Task/Bitmap-Midpoint-circle-algorithm/Java/bitmap-midpoint-circle-algorithm.java +++ b/Task/Bitmap-Midpoint-circle-algorithm/Java/bitmap-midpoint-circle-algorithm.java @@ -1,35 +1,35 @@ import java.awt.Color; public class MidPointCircle { - private BasicBitmapStorage image; + private BasicBitmapStorage image; - public MidPointCircle(final int imageWidth, final int imageHeight) { - this.image = new BasicBitmapStorage(imageWidth, imageHeight); - } + public MidPointCircle(final int imageWidth, final int imageHeight) { + this.image = new BasicBitmapStorage(imageWidth, imageHeight); + } - private void drawCircle(final int centerX, final int centerY, final int radius) { - int d = (5 - radius * 4)/4; - int x = 0; - int y = radius; - Color circleColor = Color.white; + private void drawCircle(final int centerX, final int centerY, final int radius) { + int d = (5 - radius * 4)/4; + int x = 0; + int y = radius; + Color circleColor = Color.white; - do { - image.setPixel(centerX + x, centerY + y, circleColor); - image.setPixel(centerX + x, centerY - y, circleColor); - image.setPixel(centerX - x, centerY + y, circleColor); - image.setPixel(centerX - x, centerY - y, circleColor); - image.setPixel(centerX + y, centerY + x, circleColor); - image.setPixel(centerX + y, centerY - x, circleColor); - image.setPixel(centerX - y, centerY + x, circleColor); - image.setPixel(centerX - y, centerY - x, circleColor); - if (d < 0) { - d += 2 * x + 1; - } else { - d += 2 * (x - y) + 1; - y--; - } - x++; - } while (x <= y); + do { + image.setPixel(centerX + x, centerY + y, circleColor); + image.setPixel(centerX + x, centerY - y, circleColor); + image.setPixel(centerX - x, centerY + y, circleColor); + image.setPixel(centerX - x, centerY - y, circleColor); + image.setPixel(centerX + y, centerY + x, circleColor); + image.setPixel(centerX + y, centerY - x, circleColor); + image.setPixel(centerX - y, centerY + x, circleColor); + image.setPixel(centerX - y, centerY - x, circleColor); + if (d < 0) { + d += 2 * x + 1; + } else { + d += 2 * (x - y) + 1; + y--; + } + x++; + } while (x <= y); - } + } } diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Julia/bitmap-midpoint-circle-algorithm.jl b/Task/Bitmap-Midpoint-circle-algorithm/Julia/bitmap-midpoint-circle-algorithm.jl deleted file mode 100644 index 1295233abb..0000000000 --- a/Task/Bitmap-Midpoint-circle-algorithm/Julia/bitmap-midpoint-circle-algorithm.jl +++ /dev/null @@ -1,31 +0,0 @@ -using Images, ImageView - -function drawcircle!(img::Matrix{T}, col::T, x0::Int, y0::Int, radius::Int) where T - x = radius - 1 - y = 0 - δx = δy = 1 - er = δx - (radius << 1) - - s = x + y - while x ≥ y - for opx in (+, -), opy in (+, -), el in (x, y) - @inbounds img[opx(x0, el) + 1, opy(y0, s - el) + 1] = col - end - if er ≤ 0 - y += 1 - er += δy - δy += 2 - end - if er > 0 - x -= 1 - δx += 2 - er += (-radius << 1) + δx - end - s = x + y - end - return img -end - -img = fill(Gray(255.0), 25, 25); -drawcircle!(img, Gray(0.0), 12, 12, 12) -imshow(img) diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Julia/bitmap-midpoint-circle-algorithm.julia b/Task/Bitmap-Midpoint-circle-algorithm/Julia/bitmap-midpoint-circle-algorithm.julia new file mode 100644 index 0000000000..5b1e33d063 --- /dev/null +++ b/Task/Bitmap-Midpoint-circle-algorithm/Julia/bitmap-midpoint-circle-algorithm.julia @@ -0,0 +1,31 @@ +function drawcircle!(img::Matrix{T}, col::T, x0::Int, y0::Int, radius::Int) where T + x = radius - 1 + y = 0 + δx = δy = 1 + er = δx - (radius << 1) + + s = x + y + while x ≥ y + for opx in (+, -), opy in (+, -), el in (x, y) + @inbounds img[opx(x0, el) + 1, opy(y0, s - el) + 1] = col + end + if er ≤ 0 + y += 1 + er += δy + δy += 2 + end + if er > 0 + x -= 1 + δx += 2 + er += (-radius << 1) + δx + end + s = x + y + end + return img +end + +# Test +using Images + +img = fill(Gray(255.0), 25, 25); +drawcircle!(img, Gray(0.0), 12, 12, 12) diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Kotlin/bitmap-midpoint-circle-algorithm.kts b/Task/Bitmap-Midpoint-circle-algorithm/Kotlin/bitmap-midpoint-circle-algorithm.kotlin similarity index 100% rename from Task/Bitmap-Midpoint-circle-algorithm/Kotlin/bitmap-midpoint-circle-algorithm.kts rename to Task/Bitmap-Midpoint-circle-algorithm/Kotlin/bitmap-midpoint-circle-algorithm.kotlin diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Pluto/bitmap-midpoint-circle-algorithm-1.pluto b/Task/Bitmap-Midpoint-circle-algorithm/Pluto/bitmap-midpoint-circle-algorithm-1.pluto deleted file mode 100644 index c0d4f3ed9c..0000000000 --- a/Task/Bitmap-Midpoint-circle-algorithm/Pluto/bitmap-midpoint-circle-algorithm-1.pluto +++ /dev/null @@ -1,33 +0,0 @@ -local canvas = require "canvas" - -local function trunc(x) return x >= 0 ? math.floor(x) : math.ceil(x) end - -local function circle(c, cx, cy, r, col) - local d = trunc((5 - r * 4) / 4) - local x = 0 - local y = r - repeat - c:set(cx + x, cy + y, col) - c:set(cx + x, cy - y, col) - c:set(cx - x, cy + y, col) - c:set(cx - x, cy - y, col) - c:set(cx + y, cy + x, col) - c:set(cx + y, cy - x, col) - c:set(cx - y, cy + x, col) - c:set(cx - y, cy - x, col) - if d < 0 then - d += 2 * x + 1 - else - d += 2 * (x - y) + 1 - y -= 1 - end - ++x - until x > y -end - -local c = canvas.new(400, 400) -c:fill(0xffffff) -- white background - --- Draw a blue circle with centre at (200, 200) and radius 100. -circle(c, 200, 200, 100, 0xff0000) -io.contents("mybmp.bmp", c:tobmp()) -- save to a bitmap file diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Pluto/bitmap-midpoint-circle-algorithm-2.pluto b/Task/Bitmap-Midpoint-circle-algorithm/Pluto/bitmap-midpoint-circle-algorithm-2.pluto deleted file mode 100644 index 97f3494948..0000000000 --- a/Task/Bitmap-Midpoint-circle-algorithm/Pluto/bitmap-midpoint-circle-algorithm-2.pluto +++ /dev/null @@ -1,6 +0,0 @@ -require "bitmap" - -local bmp = bitmap.of(400, 400, color.white, "mybmp") -bmp:circle(200, 200, 100, color.blue) -bmp:view() -bmp:save() -- if required diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Rebol/bitmap-midpoint-circle-algorithm.rebol b/Task/Bitmap-Midpoint-circle-algorithm/Rebol/bitmap-midpoint-circle-algorithm.rebol deleted file mode 100644 index fe3a8f7661..0000000000 --- a/Task/Bitmap-Midpoint-circle-algorithm/Rebol/bitmap-midpoint-circle-algorithm.rebol +++ /dev/null @@ -1,49 +0,0 @@ -Rebol [ - title: "Rosetta code: Bitmap/Midpoint circle algorithm" - file: %Bitmap-Midpoint_circle_algorithm.r3 - url: https://rosettacode.org/wiki/Bitmap/Midpoint_circle_algorithm -] - -draw-circle: func [ - "Draw a circle on an image using the Midpoint Circle Algorithm." - bitmap [image!] center [pair!] radius [integer!] color [tuple!] -][ - x: center/x ;; unpack center coords from pair for arithmetic - y: center/y - dx: radius dy: 0 - err: 1 - radius ;; initial error term for midpoint decision - - while [dx >= dy] [ ;; iterate through the first octant only - ;; Mirror the single computed point into all 8 octants at once, - ;; exploiting the 8-fold symmetry of the circle. - bitmap/(as-pair x + dx y + dy): color ; octant 1 - bitmap/(as-pair x - dx y + dy): color ; octant 2 - bitmap/(as-pair x + dx y - dy): color ; octant 8 - bitmap/(as-pair x - dx y - dy): color ; octant 7 - bitmap/(as-pair x + dy y + dx): color ; octant 3 - bitmap/(as-pair x - dy y + dx): color ; octant 4 (swapped dx/dy) - bitmap/(as-pair x + dy y - dx): color ; octant 5 - bitmap/(as-pair x - dy y - dx): color ; octant 6 - - dy: dy + 1 ;; advance one step along the minor axis - - ;; Update the error term and conditionally step inward on dx. - ;; err < 0 means we are still inside the circle boundary - either err < 0 [ - err: err + (2 * dy) + 1 ;; correct error for dy step - ][ - dx: dx - 1 ;; step inward on major axis - err: err + (2 * (dy - dx)) + 1 ;; correct error for both steps - ] - ] -] - -img: make image! 29x29 ;; create a blank 29x29 canvas (white by default) -draw-circle img 15x15 5 black ;; small inner circle -draw-circle img 15x15 10 red ;; mid-size red ring -draw-circle img 15x15 14 green ;; large green ring, nearly fills the canvas - -;; scale up 10x with nearest-neighbour (Box) to keep pixel edges sharp -img: resize/filter img 290 'Box -save %midpoint-circles.png img -try [view img] diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Scala/bitmap-midpoint-circle-algorithm.scala b/Task/Bitmap-Midpoint-circle-algorithm/Scala/bitmap-midpoint-circle-algorithm.scala index 1cb33f2446..a9a9542002 100644 --- a/Task/Bitmap-Midpoint-circle-algorithm/Scala/bitmap-midpoint-circle-algorithm.scala +++ b/Task/Bitmap-Midpoint-circle-algorithm/Scala/bitmap-midpoint-circle-algorithm.scala @@ -22,7 +22,7 @@ object BitmapOps { x+=1 ddF_x+=2 f+=ddF_x - + bm.setPixel(x0+x, y0+y, c) bm.setPixel(x0-x, y0+y, c) bm.setPixel(x0+x, y0-y, c) diff --git a/Task/Bitmap-Midpoint-circle-algorithm/UNIX-Shell/bitmap-midpoint-circle-algorithm.sh b/Task/Bitmap-Midpoint-circle-algorithm/UNIX-Shell/bitmap-midpoint-circle-algorithm.sh index e4db4df45c..c11e2e9da6 100644 --- a/Task/Bitmap-Midpoint-circle-algorithm/UNIX-Shell/bitmap-midpoint-circle-algorithm.sh +++ b/Task/Bitmap-Midpoint-circle-algorithm/UNIX-Shell/bitmap-midpoint-circle-algorithm.sh @@ -13,10 +13,10 @@ function drawcircle { for y in $( seq $((y0-radius)) $((y0+radius)) ) do echo -en "\e[${y}H" - for x in $( seq $((x0+radius)) ) - do - echo -n "-" - done + for x in $( seq $((x0+radius)) ) + do + echo -n "-" + done done x=$((radius-1)) @@ -38,12 +38,12 @@ function drawcircle { if [ $err -le 0 ] then - ((++y)) + ((++y)) ((err+=dy)) ((dy+=2)) fi if [ $err -gt 0 ] - then + then ((--x)) ((dx+=2)) ((err+=dx-(radius<<1))) diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Vedit-macro-language/bitmap-midpoint-circle-algorithm.vedit b/Task/Bitmap-Midpoint-circle-algorithm/Vedit-macro-language/bitmap-midpoint-circle-algorithm.vedit index 96c740f247..3a37522166 100644 --- a/Task/Bitmap-Midpoint-circle-algorithm/Vedit-macro-language/bitmap-midpoint-circle-algorithm.vedit +++ b/Task/Bitmap-Midpoint-circle-algorithm/Vedit-macro-language/bitmap-midpoint-circle-algorithm.vedit @@ -2,11 +2,11 @@ // #21 = center x, #22 = center y; #23 = radius :DRAW_CIRCLE: -#30 = 1 - #23 // f -#31 = 0 // ddF_x -#32 = -2 * #23 // ddF_y -#41 = 0 // x -#42 = #23 // y +#30 = 1 - #23 // f +#31 = 0 // ddF_x +#32 = -2 * #23 // ddF_y +#41 = 0 // x +#42 = #23 // y while (#41 <= #42) { #1 = #21+#41; #2 = #22+#42; Call("DRAW_PIXEL") @@ -18,9 +18,9 @@ while (#41 <= #42) { #1 = #21+#42; #2 = #22-#41; Call("DRAW_PIXEL") #1 = #21-#42; #2 = #22-#41; Call("DRAW_PIXEL") if (#30 >= 0) { - #42-- - #32 += 2 - #30 += #32 + #42-- + #32 += 2 + #30 += #32 } #41++ #31 += 2 diff --git a/Task/Bitmap-Midpoint-circle-algorithm/Zkl/bitmap-midpoint-circle-algorithm-1.zkl b/Task/Bitmap-Midpoint-circle-algorithm/Zkl/bitmap-midpoint-circle-algorithm-1.zkl index 82685d593e..f651983a78 100644 --- a/Task/Bitmap-Midpoint-circle-algorithm/Zkl/bitmap-midpoint-circle-algorithm-1.zkl +++ b/Task/Bitmap-Midpoint-circle-algorithm/Zkl/bitmap-midpoint-circle-algorithm-1.zkl @@ -2,15 +2,15 @@ x:=r; y:=0; radiusError:=1-x; while(x >= y){ __sSet(rgb, x + x0, y + y0); - __sSet(rgb, y + x0, x + y0); - __sSet(rgb,-x + x0, y + y0); - __sSet(rgb,-y + x0, x + y0); - self[-x + x0, -y + y0]=rgb; // or do it this way, __sSet gets called as above - self[-y + x0, -x + y0]=rgb; - self[ x + x0, -y + y0]=rgb; - self[ y + x0, -x + y0]=rgb; - y+=1; - if (radiusError<0) radiusError+=2*y + 1; - else{ x-=1; radiusError+=2*(y - x + 1); } + __sSet(rgb, y + x0, x + y0); + __sSet(rgb,-x + x0, y + y0); + __sSet(rgb,-y + x0, x + y0); + self[-x + x0, -y + y0]=rgb; // or do it this way, __sSet gets called as above + self[-y + x0, -x + y0]=rgb; + self[ x + x0, -y + y0]=rgb; + self[ y + x0, -x + y0]=rgb; + y+=1; + if (radiusError<0) radiusError+=2*y + 1; + else{ x-=1; radiusError+=2*(y - x + 1); } } } diff --git a/Task/Bitmap-PPM-conversion-through-a-pipe/FreeBASIC/bitmap-ppm-conversion-through-a-pipe.basic b/Task/Bitmap-PPM-conversion-through-a-pipe/FreeBASIC/bitmap-ppm-conversion-through-a-pipe.basic deleted file mode 100644 index 5633823dd7..0000000000 --- a/Task/Bitmap-PPM-conversion-through-a-pipe/FreeBASIC/bitmap-ppm-conversion-through-a-pipe.basic +++ /dev/null @@ -1,64 +0,0 @@ -Const ancho = 400 -Const alto = 300 -Dim As Integer i, x, y -Dim As Ulong kolor - -' Set up graphics -Screenres ancho, alto, 32 -Windowtitle "Pattern Generator" - -' A little extravagant, this draws a design of dots and lines -' Fill background with color Rgb(&h40, &h80, &hc0) -Line (0, 0)-(ancho-1, alto-1), Rgb(64, 128, 192), BF - -' Draw random dots Rgb(&h20, &h40, &h80) -For i = 1 To 2000 - Pset (Rnd * (ancho-1), Rnd * (alto-1)), Rgb(32, 64, 128) -Next - -' Draw horizontal lines -For x = 0 To ancho-1 - For y = 240 To 244 - Pset (x, y), Rgb(32, 64, 128) - Next - For y = 260 To 264 - Pset (x, y), Rgb(32, 64, 128) - Next -Next - -' Draw vertical lines -For y = 0 To alto-1 - For x = 80 To 84 - Pset (x, y), Rgb(32, 64, 128) - Next - For x = 95 To 99 - Pset (x, y), Rgb(32, 64, 128) - Next -Next - -' Open PPM file to write -Dim As Integer ff = Freefile -Open "noutput.ppm" For Binary As #ff -If Err > 0 Then Print "Error opening output file": End - -' Write PPM header -Put #ff, , "P6" & Chr(10) -Put #ff, , Str(ancho) & " " & Str(alto) & Chr(10) -Put #ff, , "255" & Chr(10) - -' Write pixel data -For y = 0 To alto - 1 - For x = 0 To ancho - 1 - kolor = Point(x, y) - Put #ff, , Cbyte(kolor Shr 16) ' Blue - Put #ff, , Cbyte(kolor Shr 8) ' Green - Put #ff, , Cbyte(kolor) ' Red - Next -Next - -Close #ff - -' Convert to JPG using ImageMagick (pipe logic) -Shell "magick.exe noutput.ppm noutput.jpg" - -Sleep diff --git a/Task/Bitmap-PPM-conversion-through-a-pipe/Julia/bitmap-ppm-conversion-through-a-pipe.jl b/Task/Bitmap-PPM-conversion-through-a-pipe/Julia/bitmap-ppm-conversion-through-a-pipe.julia similarity index 100% rename from Task/Bitmap-PPM-conversion-through-a-pipe/Julia/bitmap-ppm-conversion-through-a-pipe.jl rename to Task/Bitmap-PPM-conversion-through-a-pipe/Julia/bitmap-ppm-conversion-through-a-pipe.julia diff --git a/Task/Bitmap-PPM-conversion-through-a-pipe/Kotlin/bitmap-ppm-conversion-through-a-pipe.kts b/Task/Bitmap-PPM-conversion-through-a-pipe/Kotlin/bitmap-ppm-conversion-through-a-pipe.kotlin similarity index 100% rename from Task/Bitmap-PPM-conversion-through-a-pipe/Kotlin/bitmap-ppm-conversion-through-a-pipe.kts rename to Task/Bitmap-PPM-conversion-through-a-pipe/Kotlin/bitmap-ppm-conversion-through-a-pipe.kotlin diff --git a/Task/Bitmap-Read-a-PPM-file/11l/bitmap-read-a-ppm-file.11l b/Task/Bitmap-Read-a-PPM-file/11l/bitmap-read-a-ppm-file.11l index 93aeb15ba7..eb8c2c11c4 100644 --- a/Task/Bitmap-Read-a-PPM-file/11l/bitmap-read-a-ppm-file.11l +++ b/Task/Bitmap-Read-a-PPM-file/11l/bitmap-read-a-ppm-file.11l @@ -1,4 +1,13 @@ -T Colour = BVec3 +T Colour + Byte r, g, b + + F (r, g, b) + .r = r + .g = g + .b = b + + F ==(other) + R .r == other.r & .g == other.g & .b == other.b V black = Colour(0, 0, 0) V white = Colour(255, 255, 255) diff --git a/Task/Bitmap-Read-a-PPM-file/Ada/bitmap-read-a-ppm-file-1.adb b/Task/Bitmap-Read-a-PPM-file/Ada/bitmap-read-a-ppm-file-1.ada similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/Ada/bitmap-read-a-ppm-file-1.adb rename to Task/Bitmap-Read-a-PPM-file/Ada/bitmap-read-a-ppm-file-1.ada diff --git a/Task/Bitmap-Read-a-PPM-file/Ada/bitmap-read-a-ppm-file-2.adb b/Task/Bitmap-Read-a-PPM-file/Ada/bitmap-read-a-ppm-file-2.ada similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/Ada/bitmap-read-a-ppm-file-2.adb rename to Task/Bitmap-Read-a-PPM-file/Ada/bitmap-read-a-ppm-file-2.ada diff --git a/Task/Bitmap-Read-a-PPM-file/AutoHotkey/bitmap-read-a-ppm-file.ahk b/Task/Bitmap-Read-a-PPM-file/AutoHotkey/bitmap-read-a-ppm-file.ahk index df5682b996..13ce33a881 100644 --- a/Task/Bitmap-Read-a-PPM-file/AutoHotkey/bitmap-read-a-ppm-file.ahk +++ b/Task/Bitmap-Read-a-PPM-file/AutoHotkey/bitmap-read-a-ppm-file.ahk @@ -46,11 +46,11 @@ loop % width * height if (j == width) { - j := 1 - i += 1 + j := 1 + i += 1 } else - j++ + j++ } return bitmap } diff --git a/Task/Bitmap-Read-a-PPM-file/Common-Lisp/bitmap-read-a-ppm-file-1.lisp b/Task/Bitmap-Read-a-PPM-file/Common-Lisp/bitmap-read-a-ppm-file-1.lisp index c68f4c654d..511eba41d7 100644 --- a/Task/Bitmap-Read-a-PPM-file/Common-Lisp/bitmap-read-a-ppm-file-1.lisp +++ b/Task/Bitmap-Read-a-PPM-file/Common-Lisp/bitmap-read-a-ppm-file-1.lisp @@ -13,59 +13,59 @@ (defun read-ppm-file-header (file) (with-open-file (s file :direction :input) (do ((failure-count 0 (1+ failure-count)) - (tokens nil (let ((t1 (read-header-chars s))) - (if (> (length t1) 0) - (cons t1 tokens) - tokens)))) - ((>= (length tokens) 4) (values (nreverse tokens) - (file-position s))) + (tokens nil (let ((t1 (read-header-chars s))) + (if (> (length t1) 0) + (cons t1 tokens) + tokens)))) + ((>= (length tokens) 4) (values (nreverse tokens) + (file-position s))) (when (>= failure-count 10) - (error (format nil "File ~a does not seem to be a proper ppm file - maybe too many comment lines" file))) + (error (format nil "File ~a does not seem to be a proper ppm file - maybe too many comment lines" file))) (when (= (length tokens) 1) - (when (not (or (string= (first tokens) "P6") (string= (first tokens) "P3"))) - (error (format nil "File ~a is not a ppm file - wrong magic-number. Read ~a instead of P6 or P3 " file (first tokens)))))))) + (when (not (or (string= (first tokens) "P6") (string= (first tokens) "P3"))) + (error (format nil "File ~a is not a ppm file - wrong magic-number. Read ~a instead of P6 or P3 " file (first tokens)))))))) (defun read-ppm-image (file) (flet ((image-data-reader (stream start-position width height image-build-function read-function) - (file-position stream start-position) - (dotimes (row height) - (dotimes (col width) - (funcall image-build-function row col (funcall read-function stream)))))) + (file-position stream start-position) + (dotimes (row height) + (dotimes (col width) + (funcall image-build-function row col (funcall read-function stream)))))) (multiple-value-bind (header file-pos) (read-ppm-file-header file) (let* ((image-type (first header)) - (width (parse-integer (second header) :junk-allowed t)) - (height (parse-integer (third header) :junk-allowed t)) - (max-value (parse-integer (fourth header) :junk-allowed t)) - (image (make-rgb-pixel-buffer width height))) - (when (> max-value 255) - (error "unsupported depth - convert to 1byte depth with pamdepth")) - (cond ((string= "P6" image-type) - (with-open-file (stream file :direction :input :element-type '(unsigned-byte 8)) - (image-data-reader stream - file-pos - width - height - #'(lambda (w h val) - (setf (rgb-pixel image w h) val)) - #'(lambda (stream) - (make-rgb-pixel (read-byte stream) - (read-byte stream) - (read-byte stream)))) - image)) - ((string= "P3" image-type) - (with-open-file (stream file :direction :input) - (image-data-reader stream - file-pos - width - height - #'(lambda (w h val) - (setf (rgb-pixel image w h) val)) - #'(lambda (stream) - (make-rgb-pixel (read stream) - (read stream) - (read stream)))) - image)) - (t 'unsupported)) + (width (parse-integer (second header) :junk-allowed t)) + (height (parse-integer (third header) :junk-allowed t)) + (max-value (parse-integer (fourth header) :junk-allowed t)) + (image (make-rgb-pixel-buffer width height))) + (when (> max-value 255) + (error "unsupported depth - convert to 1byte depth with pamdepth")) + (cond ((string= "P6" image-type) + (with-open-file (stream file :direction :input :element-type '(unsigned-byte 8)) + (image-data-reader stream + file-pos + width + height + #'(lambda (w h val) + (setf (rgb-pixel image w h) val)) + #'(lambda (stream) + (make-rgb-pixel (read-byte stream) + (read-byte stream) + (read-byte stream)))) + image)) + ((string= "P3" image-type) + (with-open-file (stream file :direction :input) + (image-data-reader stream + file-pos + width + height + #'(lambda (w h val) + (setf (rgb-pixel image w h) val)) + #'(lambda (stream) + (make-rgb-pixel (read stream) + (read stream) + (read stream)))) + image)) + (t 'unsupported)) image)))) (export 'read-ppm-image) diff --git a/Task/Bitmap-Read-a-PPM-file/Crystal/bitmap-read-a-ppm-file.cr b/Task/Bitmap-Read-a-PPM-file/Crystal/bitmap-read-a-ppm-file.cr deleted file mode 100644 index 4b8e3b6639..0000000000 --- a/Task/Bitmap-Read-a-PPM-file/Crystal/bitmap-read-a-ppm-file.cr +++ /dev/null @@ -1,51 +0,0 @@ -require "./pixmap" - -class Pixmap - def self.load_ppm (io) - blanks = StaticArray[9, 10, 11, 12, 13, 32] - magic = Bytes.new(3) - io.read magic - raise "Invalid format" unless magic[0] == 'P'.ord && - magic[1] == '6'.ord && - magic[2].in? blanks - data = io.getb_to_end - pos = 0 - get_number = -> : Int32 { - start = pos - loop do # skip blanks and comments - case data[start] - when .in? blanks then start += 1 - when '#'.ord - while data[start] != 10 - start += 1 - end - else break - end - end - stop = start - until data[stop].in? blanks - stop += 1 - end - pos = stop - String.new(data[start..stop]).to_i - } - begin - width = get_number.call - height = get_number.call - maxval = get_number.call - rescue ex - raise "Bad P6 file" - end - raise "Unsupported color depth" unless maxval = 255 - pos += 1 - raise "Invalid data" unless (data.size - pos) % 3 == 0 - len = (data.size - pos) // 3 - raise "Bad bounds" unless len == width * height - pixels = Array(Color).new(len) { |i| - Color.new(data[i*3 + pos], data[i*3 + pos + 1], data[i*3 + pos + 2]) - } - Pixmap.new width, height, pixels - end - - register_loader ".ppm", load_ppm -end diff --git a/Task/Bitmap-Read-a-PPM-file/Delphi/bitmap-read-a-ppm-file.pas b/Task/Bitmap-Read-a-PPM-file/Delphi/bitmap-read-a-ppm-file.delphi similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/Delphi/bitmap-read-a-ppm-file.pas rename to Task/Bitmap-Read-a-PPM-file/Delphi/bitmap-read-a-ppm-file.delphi diff --git a/Task/Bitmap-Read-a-PPM-file/Euphoria/bitmap-read-a-ppm-file-1.eu b/Task/Bitmap-Read-a-PPM-file/Euphoria/bitmap-read-a-ppm-file-1.euphoria similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/Euphoria/bitmap-read-a-ppm-file-1.eu rename to Task/Bitmap-Read-a-PPM-file/Euphoria/bitmap-read-a-ppm-file-1.euphoria diff --git a/Task/Bitmap-Read-a-PPM-file/Euphoria/bitmap-read-a-ppm-file-2.eu b/Task/Bitmap-Read-a-PPM-file/Euphoria/bitmap-read-a-ppm-file-2.euphoria similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/Euphoria/bitmap-read-a-ppm-file-2.eu rename to Task/Bitmap-Read-a-PPM-file/Euphoria/bitmap-read-a-ppm-file-2.euphoria diff --git a/Task/Bitmap-Read-a-PPM-file/FBSL/bitmap-read-a-ppm-file.fbsl b/Task/Bitmap-Read-a-PPM-file/FBSL/bitmap-read-a-ppm-file.fbsl index 188aa0caa2..b2d7f3528e 100644 --- a/Task/Bitmap-Read-a-PPM-file/FBSL/bitmap-read-a-ppm-file.fbsl +++ b/Task/Bitmap-Read-a-PPM-file/FBSL/bitmap-read-a-ppm-file.fbsl @@ -8,11 +8,11 @@ blobsize = INSTR(FILEGET, "\n255\n") + 4 ' Get sizeof PPM header head = @FILEGET + blobsize: tail = @FILEGET + FILELEN ' Set loop bounds FOR ptr = head TO tail STEP 3 ' Transform color triplets - r = PEEK(ptr + 0, 1) ' Read colors stored in RGB order - g = PEEK(ptr + 1, 1) - b = PEEK(ptr + 2, 1) - l = 0.2126 * r + 0.7152 * g + 0.0722 * b ' Derive luminance - POKE(ptr + 0, CHR(l))(ptr + 1, CHR)(ptr + 2, CHR) ' Write grayscale + r = PEEK(ptr + 0, 1) ' Read colors stored in RGB order + g = PEEK(ptr + 1, 1) + b = PEEK(ptr + 2, 1) + l = 0.2126 * r + 0.7152 * g + 0.0722 * b ' Derive luminance + POKE(ptr + 0, CHR(l))(ptr + 1, CHR)(ptr + 2, CHR) ' Write grayscale NEXT FILEPUT(FILEOPEN(grayscale, BINARY_NEW), FILEGET): FILECLOSE(FILEOPEN) ' Save buffer diff --git a/Task/Bitmap-Read-a-PPM-file/Forth/bitmap-read-a-ppm-file.fth b/Task/Bitmap-Read-a-PPM-file/Forth/bitmap-read-a-ppm-file.fth index 28824390fc..20b30e7793 100644 --- a/Task/Bitmap-Read-a-PPM-file/Forth/bitmap-read-a-ppm-file.fth +++ b/Task/Bitmap-Read-a-PPM-file/Forth/bitmap-read-a-ppm-file.fth @@ -3,7 +3,7 @@ s" P6" compare abort" Only P6 supported." pad dup 80 fid read-line throw 0= abort" Partial line" 0. 2swap >number - 1 /string \ skip space + 1 /string \ skip space 0. 2swap >number 2drop drop nip ( w h ) bitmap { bmp } diff --git a/Task/Bitmap-Read-a-PPM-file/Java/bitmap-read-a-ppm-file.java b/Task/Bitmap-Read-a-PPM-file/Java/bitmap-read-a-ppm-file.java index 9670723d2d..6d1e33c878 100644 --- a/Task/Bitmap-Read-a-PPM-file/Java/bitmap-read-a-ppm-file.java +++ b/Task/Bitmap-Read-a-PPM-file/Java/bitmap-read-a-ppm-file.java @@ -12,32 +12,32 @@ import javax.imageio.ImageIO; public class ReadPPMFile { - public static void main(String[] aArgs) throws IOException { + public static void main(String[] aArgs) throws IOException { // Using the file created in the Bitmap task - String filePath = "output.ppm"; - - reader = new BufferedInputStream( new FileInputStream(filePath) ); - final char header1 = (char) reader.read(); + String filePath = "output.ppm"; + + reader = new BufferedInputStream( new FileInputStream(filePath) ); + final char header1 = (char) reader.read(); final char header2 = (char) reader.read(); final char header3 = (char) reader.read(); if ( header1 != 'P' || header2 != '6' || header3 != END_OF_LINE) { - reader.close(); - throw new IllegalArgumentException("Not a valid P6 PPM file"); + reader.close(); + throw new IllegalArgumentException("Not a valid P6 PPM file"); } final int width = processCharacters(SPACE_CHARACTER); final int height = processCharacters(END_OF_LINE); final int maxColorValue = processCharacters(END_OF_LINE); if ( maxColorValue < 0 || maxColorValue > 255 ) { - reader.close(); - throw new IllegalArgumentException("Maximum color value is outside the range 0..255"); + reader.close(); + throw new IllegalArgumentException("Maximum color value is outside the range 0..255"); } // Remove any comments before reading data reader.mark(1); while ( reader.read() == START_OF_COMMENT ) { - while ( reader.read() != END_OF_LINE ); - reader.mark(1); + while ( reader.read() != END_OF_LINE ); + reader.mark(1); } reader.reset(); @@ -47,10 +47,10 @@ public class ReadPPMFile { byte[] buffer = new byte[width * 3]; for ( int y = 0; y < height; y++ ) { reader.read(buffer, 0, buffer.length); - for ( int x = 0; x < width; x++ ) { + for ( int x = 0; x < width; x++ ) { Color color = new Color(Byte.toUnsignedInt(buffer[x * 3]), - Byte.toUnsignedInt(buffer[x * 3 + 1]), - Byte.toUnsignedInt(buffer[x * 3 + 2])); + Byte.toUnsignedInt(buffer[x * 3 + 1]), + Byte.toUnsignedInt(buffer[x * 3 + 2])); bitmap.setPixel(x, y, color); } } @@ -60,29 +60,29 @@ public class ReadPPMFile { // Convert to gray scale and save to a file bitmap.convertToGrayscale(); File grayFile = new File("outputGray.jpg"); - ImageIO.write((RenderedImage) bitmap.getImage(), "jpg", grayFile); - } - - private static int processCharacters(char aChar) throws IOException { - StringBuilder characters = new StringBuilder(); - char ch; - while ( ( ch = (char) reader.read() ) != aChar ) { - if ( ch == START_OF_COMMENT ) { - while ( reader.read() != END_OF_LINE ); - continue; - } - characters.append(ch); + ImageIO.write((RenderedImage) bitmap.getImage(), "jpg", grayFile); + } + + private static int processCharacters(char aChar) throws IOException { + StringBuilder characters = new StringBuilder(); + char ch; + while ( ( ch = (char) reader.read() ) != aChar ) { + if ( ch == START_OF_COMMENT ) { + while ( reader.read() != END_OF_LINE ); + continue; + } + characters.append(ch); } - return Integer.valueOf(characters.toString()); - } + return Integer.valueOf(characters.toString()); + } + + private static BufferedInputStream reader; + + private static final char START_OF_COMMENT = '#'; + private static final char SPACE_CHARACTER = ' '; + private static final char END_OF_LINE = '\n'; - private static BufferedInputStream reader; - - private static final char START_OF_COMMENT = '#'; - private static final char SPACE_CHARACTER = ' '; - private static final char END_OF_LINE = '\n'; - -} +} final class BasicBitmapStorage { @@ -105,12 +105,12 @@ final class BasicBitmapStorage { } public Image getImage() { - return image; + return image; } public void convertToGrayscale() { for ( int y = 0; y < image.getHeight(); y++ ) { - for ( int x = 0; x < image.getWidth(); x++ ) { + for ( int x = 0; x < image.getWidth(); x++ ) { int color = image.getRGB(x, y); int alpha = ( color >> 24 ) & 255; diff --git a/Task/Bitmap-Read-a-PPM-file/Julia/bitmap-read-a-ppm-file.jl b/Task/Bitmap-Read-a-PPM-file/Julia/bitmap-read-a-ppm-file.julia similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/Julia/bitmap-read-a-ppm-file.jl rename to Task/Bitmap-Read-a-PPM-file/Julia/bitmap-read-a-ppm-file.julia diff --git a/Task/Bitmap-Read-a-PPM-file/Kotlin/bitmap-read-a-ppm-file.kts b/Task/Bitmap-Read-a-PPM-file/Kotlin/bitmap-read-a-ppm-file.kotlin similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/Kotlin/bitmap-read-a-ppm-file.kts rename to Task/Bitmap-Read-a-PPM-file/Kotlin/bitmap-read-a-ppm-file.kotlin diff --git a/Task/Bitmap-Read-a-PPM-file/OCaml/bitmap-read-a-ppm-file-1.ml b/Task/Bitmap-Read-a-PPM-file/OCaml/bitmap-read-a-ppm-file-1.ocaml similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/OCaml/bitmap-read-a-ppm-file-1.ml rename to Task/Bitmap-Read-a-PPM-file/OCaml/bitmap-read-a-ppm-file-1.ocaml diff --git a/Task/Bitmap-Read-a-PPM-file/OCaml/bitmap-read-a-ppm-file-2.ml b/Task/Bitmap-Read-a-PPM-file/OCaml/bitmap-read-a-ppm-file-2.ocaml similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/OCaml/bitmap-read-a-ppm-file-2.ml rename to Task/Bitmap-Read-a-PPM-file/OCaml/bitmap-read-a-ppm-file-2.ocaml diff --git a/Task/Bitmap-Read-a-PPM-file/Oz/bitmap-read-a-ppm-file-1.oz b/Task/Bitmap-Read-a-PPM-file/Oz/bitmap-read-a-ppm-file-1.oz index 33b5a7e6ef..5d3fd1c6e4 100644 --- a/Task/Bitmap-Read-a-PPM-file/Oz/bitmap-read-a-ppm-file-1.oz +++ b/Task/Bitmap-Read-a-PPM-file/Oz/bitmap-read-a-ppm-file-1.oz @@ -10,31 +10,31 @@ define F = {New Open.file init(name:Filename)} fun {ReadColor8 _} - Bytes = {F read(list:$ size:3)} + Bytes = {F read(list:$ size:3)} in - {List.toTuple color Bytes} + {List.toTuple color Bytes} end fun {ReadColor16 _} - Bytes = {F read(list:$ size:6)} + Bytes = {F read(list:$ size:6)} in - {List.toTuple color {Map {PairUp Bytes} FromBytes}} + {List.toTuple color {Map {PairUp Bytes} FromBytes}} end in try - Magic = {F read(size:2 list:$)} - if Magic \= "P6" then raise bitmapIO(read unsupportedFormat(Magic)) end end - Width = {ReadNumber F} - Height = {ReadNumber F} - MaxVal = {ReadNumber F} - MaxVal =< 0xffff = true - Reader = if MaxVal =< 0xff then ReadColor8 else ReadColor16 end - B = {Bitmap.new Width Height} + Magic = {F read(size:2 list:$)} + if Magic \= "P6" then raise bitmapIO(read unsupportedFormat(Magic)) end end + Width = {ReadNumber F} + Height = {ReadNumber F} + MaxVal = {ReadNumber F} + MaxVal =< 0xffff = true + Reader = if MaxVal =< 0xff then ReadColor8 else ReadColor16 end + B = {Bitmap.new Width Height} in - {Bitmap.transform B Reader} - B + {Bitmap.transform B Reader} + B finally - {F close} + {F close} end end @@ -43,12 +43,12 @@ define in {SkipWS F} Ds = for collect:Collect break:Break do - [C] = {F read(list:$ size:1)} - in - if {Char.isDigit C} then {Collect C} - else {Break} - end - end + [C] = {F read(list:$ size:1)} + in + if {Char.isDigit C} then {Collect C} + else {Break} + end + end {SkipWS F} {String.toInt Ds} end @@ -58,9 +58,9 @@ define in if {Char.isSpace C} then {SkipWS F} elseif C == &# then - {SkipLine F} + {SkipLine F} else - {F seek(whence:current offset:~1)} + {F seek(whence:current offset:~1)} end end diff --git a/Task/Bitmap-Read-a-PPM-file/Raku/bitmap-read-a-ppm-file.raku b/Task/Bitmap-Read-a-PPM-file/Raku/bitmap-read-a-ppm-file.raku index 395d55219b..5f77cfb471 100644 --- a/Task/Bitmap-Read-a-PPM-file/Raku/bitmap-read-a-ppm-file.raku +++ b/Task/Bitmap-Read-a-PPM-file/Raku/bitmap-read-a-ppm-file.raku @@ -7,8 +7,8 @@ class Bitmap { role PGM { has @.GS; method P5 returns Blob { - "P5\n{self.width} {self.height}\n255\n".encode('ascii') - ~ Blob.new: self.GS + "P5\n{self.width} {self.height}\n255\n".encode('ascii') + ~ Blob.new: self.GS } } diff --git a/Task/Bitmap-Read-a-PPM-file/Rebol/bitmap-read-a-ppm-file.rebol b/Task/Bitmap-Read-a-PPM-file/Rebol/bitmap-read-a-ppm-file.rebol deleted file mode 100644 index 7c8de98fa0..0000000000 --- a/Task/Bitmap-Read-a-PPM-file/Rebol/bitmap-read-a-ppm-file.rebol +++ /dev/null @@ -1,50 +0,0 @@ -Rebol [ - title: "Rosetta code: Bitmap/Read a PPM file" - file: %Bitmap-Read_a_PPM_file.r3 - url: https://rosettacode.org/wiki/Bitmap/Read_a_PPM_file -] - -decode-ppm: function[ppm [string! file! url!]][ - ;; Load source into a string if a file or URL was given - unless string? ppm [ppm: read/string ppm] - if all [ - ;; Strip the "P3" magic header and any comment lines - parse/case ppm ["P3" any [LF | #"#" to LF skip] ppm: to end] - ;; Lex the remaining text into Rebol values - try [ppm: transcode ppm] - ;; Extract image dimensions, colour depth, and raw RGB values - parse ppm [ - set width: integer! - set height: integer! - set depth: integer! - rgb: to end - ] - ][ - img: make image! as-pair width height - i: 1 clr: 0.0.0 - foreach [r g b] rgb [ - ;; Normalise each channel to 0–255 - clr/1: 255 * (r / depth) - clr/2: 255 * (g / depth) - clr/3: 255 * (b / depth) - img/:i: clr - ++ i - ] - ;; Return the completed image - img - ] -] - -img: decode-ppm {P3 -# feep.ppm -4 4 -15 -0 0 0 0 0 0 0 0 0 15 0 15 -0 0 0 0 15 7 0 0 0 0 0 0 -0 0 0 0 0 0 0 15 7 0 0 0 -15 0 15 0 0 0 0 0 0 0 0 0} - -print "Source image:" -print img -print "Grayscale PPM output:" -print to-ppm grayscale img ;@@ https://rosettacode.org/wiki/Bitmap/Write_a_PPM_file diff --git a/Task/Bitmap-Read-a-PPM-file/Rust/bitmap-read-a-ppm-file.rs b/Task/Bitmap-Read-a-PPM-file/Rust/bitmap-read-a-ppm-file.rust similarity index 100% rename from Task/Bitmap-Read-a-PPM-file/Rust/bitmap-read-a-ppm-file.rs rename to Task/Bitmap-Read-a-PPM-file/Rust/bitmap-read-a-ppm-file.rust diff --git a/Task/Bitmap-Read-a-PPM-file/Scala/bitmap-read-a-ppm-file-1.scala b/Task/Bitmap-Read-a-PPM-file/Scala/bitmap-read-a-ppm-file-1.scala index c97a82aeab..672dee049f 100644 --- a/Task/Bitmap-Read-a-PPM-file/Scala/bitmap-read-a-ppm-file-1.scala +++ b/Task/Bitmap-Read-a-PPM-file/Scala/bitmap-read-a-ppm-file-1.scala @@ -6,7 +6,7 @@ import javax.swing.ImageIcon object Pixmap { private case class PpmHeader(format:String, width:Int, height:Int, maxColor:Int) - + def load(filename:String):Option[RgbBitmap]={ implicit val in=new BufferedInputStream(new FileInputStream(filename)) val header=readHeader @@ -22,7 +22,7 @@ object Pixmap { private def readHeader(implicit in:InputStream)={ var format=readLine - + var line=readLine while(line.startsWith("#")) //skip comments line=readLine @@ -31,7 +31,7 @@ object Pixmap { val width=parts(0).toInt val height=parts(1).toInt val maxColor=readLine.toInt - + new PpmHeader(format, width, height, maxColor) } diff --git a/Task/Bitmap-Read-a-PPM-file/Vedit-macro-language/bitmap-read-a-ppm-file-1.vedit b/Task/Bitmap-Read-a-PPM-file/Vedit-macro-language/bitmap-read-a-ppm-file-1.vedit index 4e7dbe614d..c5de2d216f 100644 --- a/Task/Bitmap-Read-a-PPM-file/Vedit-macro-language/bitmap-read-a-ppm-file-1.vedit +++ b/Task/Bitmap-Read-a-PPM-file/Vedit-macro-language/bitmap-read-a-ppm-file-1.vedit @@ -7,11 +7,11 @@ :LOAD_PPM: File_Open(@10) BOF -Search("|X", ADVANCE) // skip "P6" -#11 = Num_Eval(ADVANCE) // #11 = width -Match("|X", ADVANCE) // skip separator -#12 = Num_Eval(ADVANCE) // #12 = height +Search("|X", ADVANCE) // skip "P6" +#11 = Num_Eval(ADVANCE) // #11 = width +Match("|X", ADVANCE) // skip separator +#12 = Num_Eval(ADVANCE) // #12 = height Match("|X", ADVANCE) -Search("|X", ADVANCE) // skip maxval (assume 255) -Del_Block(0,CP) // remove the header +Search("|X", ADVANCE) // skip maxval (assume 255) +Del_Block(0,CP) // remove the header Return diff --git a/Task/Bitmap-Read-a-PPM-file/Yabasic/bitmap-read-a-ppm-file.basic b/Task/Bitmap-Read-a-PPM-file/Yabasic/bitmap-read-a-ppm-file.basic index 4bf6e89591..6252db3926 100644 --- a/Task/Bitmap-Read-a-PPM-file/Yabasic/bitmap-read-a-ppm-file.basic +++ b/Task/Bitmap-Read-a-PPM-file/Yabasic/bitmap-read-a-ppm-file.basic @@ -1,27 +1,27 @@ sub readPPM(f$) - local ff, x, y, t$, dcol$, wid, hei + local ff, x, y, t$, dcol$, wid, hei - if f$ = "" print "No PPM file name indicate." : return false + if f$ = "" print "No PPM file name indicate." : return false - ff = open (f$, "rb") - if not ff print "File ", f$, " not found." : return false + ff = open (f$, "rb") + if not ff print "File ", f$, " not found." : return false - input #ff t$, wid, hei, dcol$ + input #ff t$, wid, hei, dcol$ - if t$ = "P6" then - open window wid, hei - - for x = 0 to hei - 1 - for y = 0 to wid - 1 - color peek(#ff), peek(#ff), peek(#ff) - dot y, x - next y - next x - - close #ff - else - print "File is NOT PPM P6 type." : return false - end if - - return true + if t$ = "P6" then + open window wid, hei + + for x = 0 to hei - 1 + for y = 0 to wid - 1 + color peek(#ff), peek(#ff), peek(#ff) + dot y, x + next y + next x + + close #ff + else + print "File is NOT PPM P6 type." : return false + end if + + return true end sub diff --git a/Task/Bitmap-Read-an-image-through-a-pipe/FreeBASIC/bitmap-read-an-image-through-a-pipe.basic b/Task/Bitmap-Read-an-image-through-a-pipe/FreeBASIC/bitmap-read-an-image-through-a-pipe.basic deleted file mode 100644 index 532b629312..0000000000 --- a/Task/Bitmap-Read-an-image-through-a-pipe/FreeBASIC/bitmap-read-an-image-through-a-pipe.basic +++ /dev/null @@ -1,65 +0,0 @@ -Type IMAGE - w As Integer - h As Integer - bpp As Integer - dato(Any) As Ubyte -End Type - -Function readImageFile(filename As String, img As IMAGE) As Boolean - ' First convert image to PPM using temp file - Dim As String cmd = "magick.exe " & filename & " temp.ppm" - Shell(cmd) - - Dim As Integer ff = Freefile - Open "temp.ppm" For Binary As #ff - - ' Read PPM header - Dim As String linea - Line Input #ff, linea ' P6 - If Left(linea, 2) <> "P6" Then Return True - - ' Skip comments - Do - Line Input #ff, linea - If Left(linea, 1) <> "#" Then Exit Do - Loop - - img.w = Val(Left(linea, Instr(linea, " "))) - img.h = Val(Mid(linea, Instr(linea, " "))) - - ' Allocate memory for image data - Redim img.dato(img.w * img.h * 3 - 1) - - ' Read binary pixel data - Get #ff, , img.dato() - - Close #ff - Kill("temp.ppm") ' Clean up temp file - Return False -End Function - -Function writePPM(filename As String, img As IMAGE) As Boolean - Dim As Integer ff = Freefile - Open filename For Binary As #ff - - ' Write PPM header - Put #ff, , "P6" & Chr(10) - Put #ff, , Str(img.w) & " " & Str(img.h) & Chr(10) - Put #ff, , "255" & Chr(10) - - ' Write image data - For i As Integer = 0 To (img.w * img.h * 3 - 1) Step 3 - Put #ff, , img.dato(i + 1) ' Green - Put #ff, , img.dato(i + 2) ' Blue - Put #ff, , img.dato(i) ' Red - Next - - Close #ff - Return False -End Function - -' Main program -Dim As IMAGE img - -If readImageFile("example.png", img) Then Print "Error reading input file" -If writePPM("output.ppm", img) Then Print "i:\Error writing PPM file" diff --git a/Task/Bitmap-Read-an-image-through-a-pipe/Julia/bitmap-read-an-image-through-a-pipe.jl b/Task/Bitmap-Read-an-image-through-a-pipe/Julia/bitmap-read-an-image-through-a-pipe.julia similarity index 100% rename from Task/Bitmap-Read-an-image-through-a-pipe/Julia/bitmap-read-an-image-through-a-pipe.jl rename to Task/Bitmap-Read-an-image-through-a-pipe/Julia/bitmap-read-an-image-through-a-pipe.julia diff --git a/Task/Bitmap-Read-an-image-through-a-pipe/Kotlin/bitmap-read-an-image-through-a-pipe.kts b/Task/Bitmap-Read-an-image-through-a-pipe/Kotlin/bitmap-read-an-image-through-a-pipe.kotlin similarity index 100% rename from Task/Bitmap-Read-an-image-through-a-pipe/Kotlin/bitmap-read-an-image-through-a-pipe.kts rename to Task/Bitmap-Read-an-image-through-a-pipe/Kotlin/bitmap-read-an-image-through-a-pipe.kotlin diff --git a/Task/Bitmap-Read-an-image-through-a-pipe/OCaml/bitmap-read-an-image-through-a-pipe.ml b/Task/Bitmap-Read-an-image-through-a-pipe/OCaml/bitmap-read-an-image-through-a-pipe.ocaml similarity index 100% rename from Task/Bitmap-Read-an-image-through-a-pipe/OCaml/bitmap-read-an-image-through-a-pipe.ml rename to Task/Bitmap-Read-an-image-through-a-pipe/OCaml/bitmap-read-an-image-through-a-pipe.ocaml diff --git a/Task/Bitmap-Write-a-PPM-file/11l/bitmap-write-a-ppm-file.11l b/Task/Bitmap-Write-a-PPM-file/11l/bitmap-write-a-ppm-file.11l index ab83896090..31e28a4f57 100644 --- a/Task/Bitmap-Write-a-PPM-file/11l/bitmap-write-a-ppm-file.11l +++ b/Task/Bitmap-Write-a-PPM-file/11l/bitmap-write-a-ppm-file.11l @@ -1,4 +1,13 @@ -T Colour = BVec3 +T Colour + Byte r, g, b + + F (r, g, b) + .r = r + .g = g + .b = b + + F ==(other) + R .r == other.r & .g == other.g & .b == other.b V black = Colour(0, 0, 0) V white = Colour(255, 255, 255) diff --git a/Task/Bitmap-Write-a-PPM-file/Ada/bitmap-write-a-ppm-file.ada b/Task/Bitmap-Write-a-PPM-file/Ada/bitmap-write-a-ppm-file.ada new file mode 100644 index 0000000000..8eb4b7a790 --- /dev/null +++ b/Task/Bitmap-Write-a-PPM-file/Ada/bitmap-write-a-ppm-file.ada @@ -0,0 +1,26 @@ +with Ada.Characters.Latin_1; +with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO; + +procedure Put_PPM (File : File_Type; Picture : Image) is + use Ada.Characters.Latin_1; + Size : constant String := Integer'Image (Picture'Length (2)) & Integer'Image (Picture'Length (1)); + Buffer : String (1..Picture'Length (2) * 3); + Color : Pixel; + Index : Positive; +begin + String'Write (Stream (File), "P6" & LF); + String'Write (Stream (File), Size (2..Size'Last) & LF); + String'Write (Stream (File), "255" & LF); + for I in Picture'Range (1) loop + Index := Buffer'First; + for J in Picture'Range (2) loop + Color := Picture (I, J); + Buffer (Index) := Character'Val (Color.R); + Buffer (Index + 1) := Character'Val (Color.G); + Buffer (Index + 2) := Character'Val (Color.B); + Index := Index + 3; + end loop; + String'Write (Stream (File), Buffer); + end loop; + Character'Write (Stream (File), LF); +end Put_PPM; diff --git a/Task/Bitmap-Write-a-PPM-file/Ada/bitmap-write-a-ppm-file.adb b/Task/Bitmap-Write-a-PPM-file/Ada/bitmap-write-a-ppm-file.adb deleted file mode 100644 index c3611189b3..0000000000 --- a/Task/Bitmap-Write-a-PPM-file/Ada/bitmap-write-a-ppm-file.adb +++ /dev/null @@ -1,29 +0,0 @@ -with Ada.Characters.Latin_1; -with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO; - -with Bitmap_Store; use Bitmap_Store; --- This package is defined in the Bitmap task. - -procedure Put_PPM (File : File_Type; Picture : Image) is - use Ada.Characters.Latin_1; - Size : constant String := Integer'Image (Picture'Length (2)) & Integer'Image (Picture'Length (1)); - Buffer : String (1..Picture'Length (2) * 3); - Color : Pixel; - Index : Positive; -begin - String'Write (Stream (File), "P6" & LF); - String'Write (Stream (File), Size (2..Size'Last) & LF); - String'Write (Stream (File), "255" & LF); - for I in Picture'Range (1) loop - Index := Buffer'First; - for J in Picture'Range (2) loop - Color := Picture (I, J); - Buffer (Index) := Character'Val (Color.R); - Buffer (Index + 1) := Character'Val (Color.G); - Buffer (Index + 2) := Character'Val (Color.B); - Index := Index + 3; - end loop; - String'Write (Stream (File), Buffer); - end loop; - Character'Write (Stream (File), LF); -end Put_PPM; diff --git a/Task/Bitmap-Write-a-PPM-file/Common-Lisp/bitmap-write-a-ppm-file.lisp b/Task/Bitmap-Write-a-PPM-file/Common-Lisp/bitmap-write-a-ppm-file.lisp index d4046e677b..d922a0db8d 100644 --- a/Task/Bitmap-Write-a-PPM-file/Common-Lisp/bitmap-write-a-ppm-file.lisp +++ b/Task/Bitmap-Write-a-PPM-file/Common-Lisp/bitmap-write-a-ppm-file.lisp @@ -1,28 +1,28 @@ (defun write-rgb-buffer-to-ppm-file (filename buffer) (with-open-file (stream filename - :element-type '(unsigned-byte 8) - :direction :output - :if-does-not-exist :create - :if-exists :supersede) + :element-type '(unsigned-byte 8) + :direction :output + :if-does-not-exist :create + :if-exists :supersede) (let* ((dimensions (array-dimensions buffer)) - (width (first dimensions)) - (height (second dimensions)) - (header (format nil "P6~A~D ~D~A255~A" - #\newline - width height #\newline - #\newline))) + (width (first dimensions)) + (height (second dimensions)) + (header (format nil "P6~A~D ~D~A255~A" + #\newline + width height #\newline + #\newline))) (loop - :for char :across header - :do (write-byte (char-code char) stream)) #| Assumes char-codes match ASCII |# + :for char :across header + :do (write-byte (char-code char) stream)) #| Assumes char-codes match ASCII |# (loop - :for x :upfrom 0 :below width - :do (loop :for y :upfrom 0 :below height - :do (let ((pixel (rgb-pixel buffer x y))) - (let ((red (rgb-pixel-red pixel)) - (green (rgb-pixel-green pixel)) - (blue (rgb-pixel-blue pixel))) - (write-byte red stream) - (write-byte green stream) - (write-byte blue stream))))))) + :for x :upfrom 0 :below width + :do (loop :for y :upfrom 0 :below height + :do (let ((pixel (rgb-pixel buffer x y))) + (let ((red (rgb-pixel-red pixel)) + (green (rgb-pixel-green pixel)) + (blue (rgb-pixel-blue pixel))) + (write-byte red stream) + (write-byte green stream) + (write-byte blue stream))))))) filename) diff --git a/Task/Bitmap-Write-a-PPM-file/Crystal/bitmap-write-a-ppm-file-1.cr b/Task/Bitmap-Write-a-PPM-file/Crystal/bitmap-write-a-ppm-file-1.cr deleted file mode 100644 index 24affee476..0000000000 --- a/Task/Bitmap-Write-a-PPM-file/Crystal/bitmap-write-a-ppm-file-1.cr +++ /dev/null @@ -1,13 +0,0 @@ -require "./pixmap" - -class Pixmap - def write_ppm (io) - io.print "P6\n# Visit Rosetta code!\n#{width} #{height}\n255\n" - @data.each do |c| - io.write_byte c.r - io.write_byte c.g - io.write_byte c.b - end - end - register_writer ".ppm", write_ppm -end diff --git a/Task/Bitmap-Write-a-PPM-file/Crystal/bitmap-write-a-ppm-file-2.cr b/Task/Bitmap-Write-a-PPM-file/Crystal/bitmap-write-a-ppm-file-2.cr deleted file mode 100644 index 1e3919cea7..0000000000 --- a/Task/Bitmap-Write-a-PPM-file/Crystal/bitmap-write-a-ppm-file-2.cr +++ /dev/null @@ -1,14 +0,0 @@ -require "./write_ppm" - -img = Pixmap.new 3, 2, Color::WHITE - -[[0xFF0000, 0x00FF00, 0x0000FF], - [0xFFFF00, 0x00FFFF, 0xFF00FF]].each_with_index do |row, y| - row.each_with_index do |color, x| - img[x, y] = Color.new color - end -end - -img.write "mini.ppm" - -File.read("mini.ppm").unsafe_byte_slice(0).hexdump(STDOUT) diff --git a/Task/Bitmap-Write-a-PPM-file/Delphi/bitmap-write-a-ppm-file.pas b/Task/Bitmap-Write-a-PPM-file/Delphi/bitmap-write-a-ppm-file.delphi similarity index 100% rename from Task/Bitmap-Write-a-PPM-file/Delphi/bitmap-write-a-ppm-file.pas rename to Task/Bitmap-Write-a-PPM-file/Delphi/bitmap-write-a-ppm-file.delphi diff --git a/Task/Bitmap-Write-a-PPM-file/Euphoria/bitmap-write-a-ppm-file-1.eu b/Task/Bitmap-Write-a-PPM-file/Euphoria/bitmap-write-a-ppm-file-1.euphoria similarity index 100% rename from Task/Bitmap-Write-a-PPM-file/Euphoria/bitmap-write-a-ppm-file-1.eu rename to Task/Bitmap-Write-a-PPM-file/Euphoria/bitmap-write-a-ppm-file-1.euphoria diff --git a/Task/Bitmap-Write-a-PPM-file/Euphoria/bitmap-write-a-ppm-file-2.eu b/Task/Bitmap-Write-a-PPM-file/Euphoria/bitmap-write-a-ppm-file-2.euphoria similarity index 100% rename from Task/Bitmap-Write-a-PPM-file/Euphoria/bitmap-write-a-ppm-file-2.eu rename to Task/Bitmap-Write-a-PPM-file/Euphoria/bitmap-write-a-ppm-file-2.euphoria diff --git a/Task/Bitmap-Write-a-PPM-file/FBSL/bitmap-write-a-ppm-file.fbsl b/Task/Bitmap-Write-a-PPM-file/FBSL/bitmap-write-a-ppm-file.fbsl index 6db33e290f..2c7f0057d2 100644 --- a/Task/Bitmap-Write-a-PPM-file/FBSL/bitmap-write-a-ppm-file.fbsl +++ b/Task/Bitmap-Write-a-PPM-file/FBSL/bitmap-write-a-ppm-file.fbsl @@ -12,12 +12,12 @@ DIM head = @ppmdata + STRLEN, tail = @FILEGET + FILELEN - breadth * 3 - 2 ' Star ppmdata = ppmheader ' Copy PPM file header WHILE tail >= @FILEGET + bmpblob ' Flip upside down - FOR DIM w = 0 TO (breadth - 1) * 3 STEP 3 - POKE(head + 0 + w, CHR(PEEK(tail + 2 + w, 1))) ' Swap R - POKE(head + 1 + w, CHR(PEEK(tail + 1 + w, 1))) ' Keep G - POKE(head + 2 + w, CHR(PEEK(tail + 0 + w, 1))) ' Swap B - NEXT - INCR(head, breadth * 3): DECR(tail, breadth * 3) ' Next scanline + FOR DIM w = 0 TO (breadth - 1) * 3 STEP 3 + POKE(head + 0 + w, CHR(PEEK(tail + 2 + w, 1))) ' Swap R + POKE(head + 1 + w, CHR(PEEK(tail + 1 + w, 1))) ' Keep G + POKE(head + 2 + w, CHR(PEEK(tail + 0 + w, 1))) ' Swap B + NEXT + INCR(head, breadth * 3): DECR(tail, breadth * 3) ' Next scanline WEND FILEPUT(FILEOPEN(ppmout, BINARY_NEW), ppmdata): FILECLOSE(FILEOPEN) diff --git a/Task/Bitmap-Write-a-PPM-file/FreeBASIC/bitmap-write-a-ppm-file.basic b/Task/Bitmap-Write-a-PPM-file/FreeBASIC/bitmap-write-a-ppm-file.basic deleted file mode 100644 index d658dc3b0d..0000000000 --- a/Task/Bitmap-Write-a-PPM-file/FreeBASIC/bitmap-write-a-ppm-file.basic +++ /dev/null @@ -1,37 +0,0 @@ -Dim As Integer ancho, alto -ancho = 150: alto = 200 -Dim As Integer x, y ' width, height -Dim As Ulong kolor -Screenres ancho, alto, 32 - -' Draw circles -Screenlock -Circle (75, 100), 50, Rgb(255, 0, 0),,,, F -Circle (75, 100), 35, Rgb(0, 255, 0),,,, F -Circle (75, 100), 20, Rgb(0, 0, 255),,,, F -Screenunlock - -' Open PPM file to write -Dim As Integer ff = Freefile -Open "example.ppm" For Binary As #ff -If Err > 0 Then Print "Error opening output file": End - -' Create PPM file header -Print #ff, "P6" -Print #ff, "# Created using FreeBASIC" -Print #ff, ancho & " " & alto -Print #ff, "255" - -' Write image data to PPM file -For y = 0 To alto - 1 - For x = 0 To ancho - 1 - kolor = Point(x, y) - Put #ff, , Cbyte(kolor Shr 8) ' Green - Put #ff, , Cbyte(kolor) ' Blue - Put #ff, , Cbyte(kolor Shr 16) ' Red - Next -Next - -Close #ff - -Sleep diff --git a/Task/Bitmap-Write-a-PPM-file/Julia/bitmap-write-a-ppm-file.jl b/Task/Bitmap-Write-a-PPM-file/Julia/bitmap-write-a-ppm-file.julia similarity index 100% rename from Task/Bitmap-Write-a-PPM-file/Julia/bitmap-write-a-ppm-file.jl rename to Task/Bitmap-Write-a-PPM-file/Julia/bitmap-write-a-ppm-file.julia diff --git a/Task/Bitmap-Write-a-PPM-file/Kotlin/bitmap-write-a-ppm-file.kts b/Task/Bitmap-Write-a-PPM-file/Kotlin/bitmap-write-a-ppm-file.kotlin similarity index 100% rename from Task/Bitmap-Write-a-PPM-file/Kotlin/bitmap-write-a-ppm-file.kts rename to Task/Bitmap-Write-a-PPM-file/Kotlin/bitmap-write-a-ppm-file.kotlin diff --git a/Task/Bitmap-Write-a-PPM-file/M2000-Interpreter/bitmap-write-a-ppm-file-1.m2000 b/Task/Bitmap-Write-a-PPM-file/M2000-Interpreter/bitmap-write-a-ppm-file-1.m2000 index b3c4b9607b..c2892cc958 100644 --- a/Task/Bitmap-Write-a-PPM-file/M2000-Interpreter/bitmap-write-a-ppm-file-1.m2000 +++ b/Task/Bitmap-Write-a-PPM-file/M2000-Interpreter/bitmap-write-a-ppm-file-1.m2000 @@ -50,28 +50,26 @@ Module Checkit { Return Image1, 0:=Image$ } Else Error "Can't Copy Image" } - Export2File=Lambda Image1, x, y, r=len(rasterline) (f) -> { + Export2File=Lambda Image1, x, y (f) -> { \\ use this between open and close Print #f, "P3" Print #f,"# Created using M2000 Interpreter" Print #f, x;" ";y Print #f, 255 x2=x-1 - For y1= y-1 to 0 { + where=24 + For y1= 0 to y-1 { a$="" - where=24+r*y1 - x1=0 - Print #f, Eval(Image1, where +2 as byte);" "; - Print #f, Eval(Image1, where+1 as byte);" "; - Print #f, Eval(Image1, where as byte); - where+=3 - For x1=1 to x2 { - Print #f, " ";Eval(Image1, where +2 as byte);" "; + For x1=0 to x2 { + Print #f, a$;Eval(Image1, where +2 as byte);" "; Print #f, Eval(Image1, where+1 as byte);" "; Print #f, Eval(Image1, where as byte); where+=3 + a$=" " } Print #f + m=where mod 4 + if m<>0 then where+=4-m } } Group Bitmap { @@ -83,10 +81,31 @@ Module Checkit { } =Bitmap } + A=Bitmap(10, 10) Call A.SetPixel(5,5, color(128,0,255)) Open "A2.PPM" for Output as #F Call A.ToFile(F) Close #f + ' is the same as this one + Try { + Open "A.PPM" for Output as #F + Print #f, "P3" + Print #f,"# Created using M2000 Interpreter" + Print #f, 10;" ";10 + Print #f, 255 + For y=10-1 to 0 { + a$="" + For x=0 to 10-1 { + rgb=-A.GetPixel(x, y) + Print #f, a$;Binary.And(rgb, 0xFF); " "; + Print #f, Binary.And(Binary.Shift(rgb, -8), 0xFF); " "; + Print #f, Binary.Shift(rgb, -16); + a$=" " + } + Print #f + } + Close #f + } } Checkit diff --git a/Task/Bitmap-Write-a-PPM-file/M2000-Interpreter/bitmap-write-a-ppm-file-2.m2000 b/Task/Bitmap-Write-a-PPM-file/M2000-Interpreter/bitmap-write-a-ppm-file-2.m2000 index 0cc430b1ff..f65d2af1b7 100644 --- a/Task/Bitmap-Write-a-PPM-file/M2000-Interpreter/bitmap-write-a-ppm-file-2.m2000 +++ b/Task/Bitmap-Write-a-PPM-file/M2000-Interpreter/bitmap-write-a-ppm-file-2.m2000 @@ -1,180 +1,177 @@ -Module P6 { - Function Bitmap { - def x as long, y as long, Import as boolean - If match("NN") then - Read x, y - else.if Match("N") Then - \\ is a file? - Read f as long - byte whitespace[0] - if not Eof(f) then - get #f, whitespace :P6$=chr$(whitespace[0]) - get #f, whitespace : P6$+=chr$(whitespace[0]) - boolean getW=true, getH=true, getV=true - long v - If p6$="P6" Then - do - get #f, whitespace - select case whitespace[0] - case 35 - {do get #f, whitespace - until whitespace[0]=10 +Module PPMbinaryP6 { + If Version<9.4 then 1000 + If Version=9.4 Then if Revision<19 then 1000 + Module Checkit { + Function Bitmap { + def x as long, y as long + If match("NN") then { + Read x, y + } else.if Match("N") Then { + E$="Not a ppm file" + Read f as long + buffer whitespace as byte + if not Eof(f) then { + get #f, whitespace : iF eof(f) then Error E$ + P6$=eval$(whitespace) + get #f, whitespace : iF eof(f) then Error E$ + P6$+=eval$(whitespace) + def boolean getW=true, getH=true, getV=true + def long v + \\ str$("P6") has 2 bytes. "P6" has 4 bytes + If p6$=str$("P6") Then { + do { + get #f, whitespace + if Eval$(whitespace)=str$("#") then { + do { + iF eof(f) then Error E$ + get #f, whitespace + } until eval(whitespace)=10 + } else { + select case eval(whitespace) + case 32, 9, 13, 10 + { + if getW and x<>0 then { + getW=false + } else.if getH and y<>0 then { + getH=false + } else.if getV and v<>0 then { + getV=false + } + } + case 48 to 57 + { + if getW then { + x*=10 + x+=eval(whitespace, 0)-48 + } else.if getH then { + y*=10 + y+=eval(whitespace, 0)-48 + } else.if getV then { + v*=10 + v+=eval(whitespace, 0)-48 + } + } + End Select + } + iF eof(f) then Error E$ + } until getV=false + } else Error "Not a P6 ppm" + } + } else Error "No proper arguments" + if x<1 or y<1 then Error "Wrong dimensions" + structure rgb { + red as byte + green as byte + blue as byte + } + m=len(rgb)*x mod 4 + if m>0 then m=4-m ' add some bytes to raster line + m+=len(rgb) *x + Structure rasterline { + { + pad as byte*m + } + \\ union pad+hline + hline as rgb*x + } + \\ we use union linesB and lines + \\ so we can address linesb as bytes + Structure Raster { + magic as integer*4 + w as integer*4 + h as integer*4 + { + linesB as byte*len(rasterline)*y + } + lines as rasterline*y + } + Buffer Clear Image1 as Raster + \\ 24 chars as header to be used from bitmap render build in functions + Return Image1, 0!magic:="cDIB", 0!w:=Hex$(x,2), 0!h:=Hex$(y, 2) + \\ fill white (all 255) + \\ Str$(string) convert to ascii, so we get all characters from words width to byte width + if not valid(f) then Return Image1, 0!lines:=Str$(String$(chrcode$(255), Len(rasterline)*y)) + Buffer Clear Pad as Byte*4 + SetPixel=Lambda Image1, Pad,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x, y, c) ->{ + where=alines+3*x+blines*y + if c>0 then c=color(c) + c-! + Return Pad, 0:=c as long + Return Image1, 0!where:=Eval(Pad, 2) as byte, 0!where+1:=Eval(Pad, 1) as byte, 0!where+2:=Eval(Pad, 0) as byte + } + GetPixel=Lambda Image1,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x,y) ->{ + where=alines+3*x+blines*y + =color(Eval(image1, where+2 as byte), Eval(image1, where+1 as byte), Eval(image1, where as byte)) + } + StrDib$=Lambda$ Image1, Raster -> { + =Eval$(Image1, 0, Len(Raster)) + } + CopyImage=Lambda Image1 (image$) -> { + if left$(image$,12)=Eval$(Image1, 0, 24 ) Then { + Return Image1, 0:=Image$ + } Else Error "Can't Copy Image" + } + Export2File=Lambda Image1, x, y (f) -> { + \\ use this between open and close + Print #f, "P6";chr$(10); + Print #f,"# Created using M2000 Interpreter";chr$(10); + Print #f, x;" ";y;" 255";chr$(10); + x2=x-1 + where=0 + Buffer pad as byte*3 + For y1= 0 to y-1 { + For x1=0 to x2 { + \\ use linesB which is array of bytes + Return pad, 0:=eval$(image1, 0!linesB!where, 3) + Push Eval(pad, 2) + Return pad, 2:=Eval(pad, 0), 0:=Number + Put #f, pad + where+=3 + } + m=where mod 4 + if m<>0 then where+=4-m + } + } + if valid(F) then { + x0=x-1 + where=0 + Buffer Pad1 as byte*3 + For y1=y-1 to 0 { + For x1=0 to x0 { + Get #f, Pad1 ' Read binary + \\ reverse rgb + Push Eval(pad1, 2) + Return pad1, 2:=Eval(pad1, 0), 0:=Number + Return Image1, 0!linesB!where:=Eval$(Pad1) + where+=3 } - case 32, 9, 13, 10 - { if getW and x<>0 then - getW=false - else.if getH and y<>0 then - getH=false - else.if getV and v<>0 then - getV=false - end if - } - case 48 to 57 - {if getW then - x*=10 - x+=whitespace[0]-48 - else.if getH then - y*=10 - y+=whitespace[0]-48 - else.if getV then - v*=10 - v+=whitespace[0]-48 - end if - } - End Select - iF eof(f) then Error "Not a ppm file" - until getV=false - else - Error "Not a P6 ppm" - end if - Import=True - end if - else - Error "No proper arguments" - end if - if x<1 or y<1 then Error "Wrong dimensions" - structure rgb { - red as byte - green as byte - blue as byte - } - m=len(rgb)*x mod 4 - if m>0 then m=4-m ' add some bytes to raster line - m+=len(rgb) *x - Structure rasterline { - { - pad as byte*m + m=where mod 4 + if m<>0 then where+=4-m + } } - hline as rgb*x - } - Structure Raster { - magic as integer*4 - w as integer*4 - h as integer*4 - { - linesB as byte*len(rasterline)*y + Group Bitmap { + SetPixel=SetPixel + GetPixel=GetPixel + Image$=StrDib$ + Copy=CopyImage + ToFile=Export2File } - lines as rasterline*y + =Bitmap } - Buffer Clear Image1 as Raster - Return Image1, 0!magic:="cDIB", 0!w:=Hex$(x,2), 0!h:=Hex$(y, 2) - if not Import then Return Image1, 0!lines:=Str$(String$(chrcode$(255), Len(rasterline)*y)) - Buffer Clear Pad as Byte*4 - SetPixel=Lambda Image1, Pad, aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x, y, c) ->{ - where=alines+3*x+blines*y - if c>0 then c=color(c) - c-! - Return Pad, 0:=c as long - Return Image1, 0!where:=Eval(Pad, 2) as byte, 0!where+1:=Eval(Pad, 1) as byte, 0!where+2:=Eval(Pad, 0) as byte - } - GetPixel=Lambda Image1,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x,y) ->{ - where=alines+3*x+blines*y - =color(Eval(image1, where+2 as byte), Eval(image1, where+1 as byte), Eval(image1, where as byte)) - } - StrDib$=Lambda$ Image1, Raster -> { - =Eval$(Image1, 0, Len(Raster)) - } - CopyImage=Lambda Image1 (image$) -> { - if left$(image$,12)=Eval$(Image1, 0, 24 ) Then { - Return Image1, 0:=Image$ - } Else Error "Can't Copy Image" - } - Export2File=Lambda Image1, x, y (f) -> { - Print #f, "P6";chr$(10);"# Created using M2000 Interpreter";chr$(10); - Print #f, x;" ";y;" 255";chr$(10); - x2=x-1 : where=0 - x0=x*3 - structure rgbP6 { - r as byte - g as byte - b as byte - } - buffer Pad as rgbP6*x*y - For y1=y-1 to 0 { - Return pad, x*y1:=eval$(image1, 0!linesB!where, x0) - where+=x0 - m=where mod 4 : if m<>0 then where+=4-m - } - For x1=0 to x*y-1 { - Push Eval(pad, x1!b) : Return pad, x1!b:=Eval(pad, x1!r), x1!r:=Number - } - Put #f, pad - } - if Import then { - x0=x-1 : where=0 - structure rgbP6 { - r as byte - g as byte - b as byte - } - buffer Pad1 as rgbP6*x*y - Get #f, Pad1 - For x1=0 to x*y-1 { - Push Eval(pad1, x1!b) : Return pad1, x1!b:=Eval(pad1, x1!r), x1!r:=Number - } - x1=x*3 - For y1=y-1 to 0 { - Return Image1, 0!linesB!where:=Eval$(Pad1, y1*x, x1) - where+=3*(x0+1) - m=where mod 4 : if m<>0 then where+=4-m - } - } - Group Bitmap { - SetPixel=SetPixel - GetPixel=GetPixel - Image$=StrDib$ - Copy=CopyImage - ToFile=Export2File - } - =Bitmap - } - A=Bitmap(150,100) - For i=0 to 98 { - Call A.SetPixel(i, i, 0) - Call A.SetPixel(99, i, 0) - } - Call A.SetPixel(i,i,0) - Copy 200*twipsx, 100*twipsy use A.Image$() - Profiler - Open "a.ppm" for output as #F - Call A.tofile(f) - Close #f - Print Filelen("a.ppm") - Print Timecount/1000;"sec" - Profiler - exit - Image A.Image$() Export "a.jpg", 100 ' per cent quality - Print Filelen("a.jpg") - Image A.Image$() Export "a1.jpg", 10 ' per cent quality - Print Filelen("a1.jpg") - Image A.Image$() Export "a.bmp" - Print Filelen("a.bmp") ' no compression - Print Timecount/1000;"sec" - Move 5000,5000 ' twips - Image "a.jpg" - Move 5000,8000 - Image "a1.jpg" - Move 8000, 5000 - Image "a.bmp" + A=Bitmap(10, 10) + Call A.SetPixel(5,5, color(128,0,255)) + Open "A.PPM" for Output as #F + Call A.ToFile(F) + Close #f + + Print "Saved" + Open "A.PPM" for Input as #F + C=Bitmap(f) + Copy 400*twipsx,200*twipsy use C.Image$() + Close #f + } + Checkit + End + 1000 Error "Need Version 9.4, Revision 19 or higher" } -p6 +PPMbinaryP6 diff --git a/Task/Bitmap-Write-a-PPM-file/Oz/bitmap-write-a-ppm-file.oz b/Task/Bitmap-Write-a-PPM-file/Oz/bitmap-write-a-ppm-file.oz index c05f456d0a..dca6a5e19e 100644 --- a/Task/Bitmap-Write-a-PPM-file/Oz/bitmap-write-a-ppm-file.oz +++ b/Task/Bitmap-Write-a-PPM-file/Oz/bitmap-write-a-ppm-file.oz @@ -12,28 +12,28 @@ define F = {New Open.file init(name:Filename flags:[write create truncate binary])} proc {WriteColor8 color(R G B)} - {F write(vs:[R G B])} + {F write(vs:[R G B])} end fun {ToBytes C} - [C div 0x100 C mod 0x100] + [C div 0x100 C mod 0x100] end proc {WriteColor16 color(R G B)} - {F write(vs:{Flatten {Map [R G B] ToBytes}})} + {F write(vs:{Flatten {Map [R G B] ToBytes}})} end MaxCol = {Bitmap.maxValue B} MaxVal#Writer = if MaxCol =< 0xff then 0xff#WriteColor8 - else 0xffff#WriteColor16 - end + else 0xffff#WriteColor16 + end Header = "P6\n"#W#" "#H#" "#MaxVal#"\n" in try - {F write(vs:Header)} - {Bitmap.forAllPixels B Writer} + {F write(vs:Header)} + {Bitmap.forAllPixels B Writer} finally - {F close} + {F close} end end end diff --git a/Task/Bitmap-Write-a-PPM-file/Prolog/bitmap-write-a-ppm-file-1.pro b/Task/Bitmap-Write-a-PPM-file/Prolog/bitmap-write-a-ppm-file-1.pro index 7b7fd228ad..c10545d911 100644 --- a/Task/Bitmap-Write-a-PPM-file/Prolog/bitmap-write-a-ppm-file-1.pro +++ b/Task/Bitmap-Write-a-PPM-file/Prolog/bitmap-write-a-ppm-file-1.pro @@ -1,16 +1,16 @@ :- module(bitmapIO, [ - write_ppm_p6/2]). + write_ppm_p6/2]). :- use_module(library(lists)). %write_ppm_p6(File,Bitmap) write_ppm_p6(Filename,[[X,Y],Pixels]):- - open(Filename,write,Output,[encoding(octet)]), - %write p6 header - writeln(Output, 'P6'), - atomic_list_concat([X, Y], ' ', Dimensions), - writeln(Output, Dimensions), - writeln(Output, '255'), - %write bytes - maplist(maplist(maplist(put_byte(Output))),Pixels), - close(Output). + open(Filename,write,Output,[encoding(octet)]), + %write p6 header + writeln(Output, 'P6'), + atomic_list_concat([X, Y], ' ', Dimensions), + writeln(Output, Dimensions), + writeln(Output, '255'), + %write bytes + maplist(maplist(maplist(put_byte(Output))),Pixels), + close(Output). diff --git a/Task/Bitmap-Write-a-PPM-file/Prolog/bitmap-write-a-ppm-file-2.pro b/Task/Bitmap-Write-a-PPM-file/Prolog/bitmap-write-a-ppm-file-2.pro index 63e26ab585..6c3b784711 100644 --- a/Task/Bitmap-Write-a-PPM-file/Prolog/bitmap-write-a-ppm-file-2.pro +++ b/Task/Bitmap-Write-a-PPM-file/Prolog/bitmap-write-a-ppm-file-2.pro @@ -2,6 +2,6 @@ :- use_module(bitmapIO). write :- - new_bitmap(AllBlack,[50,50],[0,0,0]), - set_pixel0(AlmostAllBlack,AllBlack,[25,25],[255,255,255]), - write_ppm_p6('AlmostAllBlack.ppm',AlmostAllBlack). + new_bitmap(AllBlack,[50,50],[0,0,0]), + set_pixel0(AlmostAllBlack,AllBlack,[25,25],[255,255,255]), + write_ppm_p6('AlmostAllBlack.ppm',AlmostAllBlack). diff --git a/Task/Bitmap-Write-a-PPM-file/Raku/bitmap-write-a-ppm-file.raku b/Task/Bitmap-Write-a-PPM-file/Raku/bitmap-write-a-ppm-file.raku index 7739ea243e..3efa08e181 100644 --- a/Task/Bitmap-Write-a-PPM-file/Raku/bitmap-write-a-ppm-file.raku +++ b/Task/Bitmap-Write-a-PPM-file/Raku/bitmap-write-a-ppm-file.raku @@ -7,9 +7,9 @@ class Bitmap { @!data = $p.clone xx ($!width*$!height) } method pixel( - $i where ^$!width, - $j where ^$!height - --> Pixel + $i where ^$!width, + $j where ^$!height + --> Pixel ) is rw { @!data[$i*$!height + $j] } method data { @!data } @@ -17,8 +17,8 @@ class Bitmap { role PPM { method P6 returns Blob { - "P6\n{self.width} {self.height}\n255\n".encode('ascii') - ~ Blob.new: flat map { .R, .G, .B }, self.data + "P6\n{self.width} {self.height}\n255\n".encode('ascii') + ~ Blob.new: flat map { .R, .G, .B }, self.data } } diff --git a/Task/Bitmap-Write-a-PPM-file/Rebol/bitmap-write-a-ppm-file.rebol b/Task/Bitmap-Write-a-PPM-file/Rebol/bitmap-write-a-ppm-file.rebol deleted file mode 100644 index fd0ef3b840..0000000000 --- a/Task/Bitmap-Write-a-PPM-file/Rebol/bitmap-write-a-ppm-file.rebol +++ /dev/null @@ -1,57 +0,0 @@ -Rebol [ - title: "Rosetta code: Bitmap/Write a PPM file" - file: %Bitmap-Write_a_PPM_file.r3 - url: https://rosettacode.org/wiki/Bitmap/Write_a_PPM_file -] - -to-ppm: function [ - "Converts an image to a PPM (Portable Pixmap) format string" - ;; This function is using padding in the output. - ;; In the real life usage it could be removed. - img [image!] -][ - ;; Extract image dimensions as integers - wide: to integer! img/size/x - high: to integer! img/size/y - - ;; Build the PPM header: - ;; P3 = plain RGB text format - ;; wide/high = pixel dimensions - ;; 255 = max color value (8-bit per channel) - out: rejoin ["P3^/" wide SP high "^/255^/"] - - ;; Iterate over every pixel in the image - n: 0 ;; Pixel counter, used to detect end of each row - foreach clr img [ - ++ n - ;; Append R, G, B channel values, right-aligned in fixed-width columns - ;; pad ... -5/-4 = right-align in field of 5 or 4 characters - append out ajoin [ - pad clr/1 -5 ;R - pad clr/2 -4 ;G - pad clr/3 -4 ;B - ;; After the last pixel in each row, insert a newline - if zero? n % wide [ newline ] - ] - ] - out -] - -; --- Demo --- -; Create a 2x2 image and set pixels 1 (top-left) and 4 (bottom-right) to black -img: make image! 2x2 -img/1: img/4: black -print to-ppm img - -;; It is also possible to register a PPM codec -register-codec [ - name: 'ppm - type: 'image - title: "Portable Pixmap (PPM) File Format" - suffixes: [%.ppm] - encode: :to-ppm -] -;; Then use it as: -ppm-data: encode 'ppm img -;; or -save %image.ppm img diff --git a/Task/Bitmap-Write-a-PPM-file/Rust/bitmap-write-a-ppm-file.rs b/Task/Bitmap-Write-a-PPM-file/Rust/bitmap-write-a-ppm-file.rust similarity index 100% rename from Task/Bitmap-Write-a-PPM-file/Rust/bitmap-write-a-ppm-file.rs rename to Task/Bitmap-Write-a-PPM-file/Rust/bitmap-write-a-ppm-file.rust diff --git a/Task/Bitmap-Write-a-PPM-file/Scheme/bitmap-write-a-ppm-file-1.scm b/Task/Bitmap-Write-a-PPM-file/Scheme/bitmap-write-a-ppm-file-1.ss similarity index 100% rename from Task/Bitmap-Write-a-PPM-file/Scheme/bitmap-write-a-ppm-file-1.scm rename to Task/Bitmap-Write-a-PPM-file/Scheme/bitmap-write-a-ppm-file-1.ss diff --git a/Task/Bitmap-Write-a-PPM-file/Scheme/bitmap-write-a-ppm-file-2.scm b/Task/Bitmap-Write-a-PPM-file/Scheme/bitmap-write-a-ppm-file-2.ss similarity index 100% rename from Task/Bitmap-Write-a-PPM-file/Scheme/bitmap-write-a-ppm-file-2.scm rename to Task/Bitmap-Write-a-PPM-file/Scheme/bitmap-write-a-ppm-file-2.ss diff --git a/Task/Bitmap-Write-a-PPM-file/Stata/bitmap-write-a-ppm-file.stata b/Task/Bitmap-Write-a-PPM-file/Stata/bitmap-write-a-ppm-file.stata index 23beb00d54..62077b718a 100644 --- a/Task/Bitmap-Write-a-PPM-file/Stata/bitmap-write-a-ppm-file.stata +++ b/Task/Bitmap-Write-a-PPM-file/Stata/bitmap-write-a-ppm-file.stata @@ -1,16 +1,16 @@ mata void writeppm(name, r, g, b) { - n = rows(r) - p = cols(r) - f = fopen(name, "w") - fput(f, "P3") - fput(f, strofreal(p) + " " + strofreal(n) + " 255") - for (i = 1; i <= n; i++) { - for (j = 1; j <= p; j++) { - fput(f, strofreal(r[i,j]) + " " + strofreal(g[i,j]) + " " + strofreal(b[i,j])) - } - } - fclose(f) + n = rows(r) + p = cols(r) + f = fopen(name, "w") + fput(f, "P3") + fput(f, strofreal(p) + " " + strofreal(n) + " 255") + for (i = 1; i <= n; i++) { + for (j = 1; j <= p; j++) { + fput(f, strofreal(r[i,j]) + " " + strofreal(g[i,j]) + " " + strofreal(b[i,j])) + } + } + fclose(f) } r = J(1, 6, (0::5) * 51) diff --git a/Task/Bitmap-Write-a-PPM-file/Yabasic/bitmap-write-a-ppm-file.basic b/Task/Bitmap-Write-a-PPM-file/Yabasic/bitmap-write-a-ppm-file.basic index 9f907661eb..3d5929176a 100644 --- a/Task/Bitmap-Write-a-PPM-file/Yabasic/bitmap-write-a-ppm-file.basic +++ b/Task/Bitmap-Write-a-PPM-file/Yabasic/bitmap-write-a-ppm-file.basic @@ -18,12 +18,12 @@ fn = open("exmaple.PPM", "wb") print #fn header$ for x = 0 to hei - 1 - for y = 0 to wid - 1 - c$ = right$(getbit$(y, x, y, x), 6) - poke #fn, dec(left$(c$, 2)) - poke #fn, dec(right$(c$, 2)) - poke #fn, dec(mid$(c$, 3, 2)) - next y + for y = 0 to wid - 1 + c$ = right$(getbit$(y, x, y, x), 6) + poke #fn, dec(left$(c$, 2)) + poke #fn, dec(right$(c$, 2)) + poke #fn, dec(mid$(c$, 3, 2)) + next y next x poke #fn, asc("\n") diff --git a/Task/Bitmap/11l/bitmap.11l b/Task/Bitmap/11l/bitmap.11l index 66ed317106..1c27ab573c 100644 --- a/Task/Bitmap/11l/bitmap.11l +++ b/Task/Bitmap/11l/bitmap.11l @@ -1,4 +1,13 @@ -T Colour = Vec3b +T Colour + Byte r, g, b + + F (r, g, b) + .r = r + .g = g + .b = b + + F ==(other) + R .r == other.r & .g == other.g & .b == other.b V black = Colour(0, 0, 0) V white = Colour(255, 255, 255) diff --git a/Task/Bitmap/ALGOL-68/bitmap-1.alg b/Task/Bitmap/ALGOL-68/bitmap-1.alg new file mode 100644 index 0000000000..896165161a --- /dev/null +++ b/Task/Bitmap/ALGOL-68/bitmap-1.alg @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- # + +MODE PIXEL = STRUCT(#SHORT# BITS red,green,blue); +MODE POINT = STRUCT(INT x,y); + +MODE IMAGE = [0,0]PIXEL; # instance attributes # + +MODE CLASSIMAGE = STRUCT ( # class attributes # + PIXEL black, red, green, blue, white, + PROC (REF IMAGE)REF IMAGE init, + PROC (REF IMAGE, PIXEL)VOID fill, + PROC (REF IMAGE)VOID print, +# virtual: # + REF PROC (REF IMAGE, POINT, POINT, PIXEL)VOID line, + REF PROC (REF IMAGE, POINT, INT, PIXEL)VOID circle, + REF PROC (REF IMAGE, POINT, POINT, POINT, POINT, PIXEL, UNION(INT, VOID))VOID cubic bezier +); + +CLASSIMAGE class image = ( + # black = # (#SHORTEN# 16r00, #SHORTEN# 16r00, #SHORTEN# 16r00), + # red = # (#SHORTEN# 16rff, #SHORTEN# 16r00, #SHORTEN# 16r00), + # green = # (#SHORTEN# 16r00, #SHORTEN# 16rff, #SHORTEN# 16r00), + # blue = # (#SHORTEN# 16r00, #SHORTEN# 16r00, #SHORTEN# 16rff), + # white = # (#SHORTEN# 16rff, #SHORTEN# 16rff, #SHORTEN# 16rff), + # PROC init = # (REF IMAGE self)REF IMAGE: + BEGIN + (fill OF class image)(self, black OF class image); + self + END, + + # PROC fill = # (REF IMAGE self, PIXEL color)VOID: + FOR x FROM 1 LWB self TO 1 UPB self DO + FOR y FROM 2 LWB self TO 2 UPB self DO + self[x,y] := color + OD + OD, + # PROC print = # (REF IMAGE self)VOID: + printf(($n(UPB self)(3(16r2d))l$, self)), +# virtual: # + # REF PROC line = # LOC PROC (REF IMAGE, POINT, POINT, PIXEL)VOID, + # REF PROC circle = # LOC PROC (REF IMAGE, POINT, INT, PIXEL)VOID, + # REF PROC cubic bezier = # LOC PROC (REF IMAGE, POINT, POINT, POINT, POINT, PIXEL, UNION(INT, VOID))VOID +); + +OP CLASSOF = (IMAGE image)CLASSIMAGE: class image; +OP INIT = (REF IMAGE image)REF IMAGE: (init OF (CLASSOF image))(image); + +SKIP diff --git a/Task/Bitmap/ALGOL-68/bitmap.alg b/Task/Bitmap/ALGOL-68/bitmap-2.alg similarity index 100% rename from Task/Bitmap/ALGOL-68/bitmap.alg rename to Task/Bitmap/ALGOL-68/bitmap-2.alg diff --git a/Task/Bitmap/ARM-Assembly/bitmap.arm b/Task/Bitmap/ARM-Assembly/bitmap.arm index a547d1f0c9..a10f4f2666 100644 --- a/Task/Bitmap/ARM-Assembly/bitmap.arm +++ b/Task/Bitmap/ARM-Assembly/bitmap.arm @@ -1,51 +1,51 @@ Bitmap_FloodFill: - ;input: - ;r0 = color to fill screen with (15-bit color) - STMFD sp!,{r0-r12,lr} - - MOV R2,#160 - MOV R4,#0x06000000 + ;input: + ;r0 = color to fill screen with (15-bit color) + STMFD sp!,{r0-r12,lr} + + MOV R2,#160 + MOV R4,#0x06000000 outerloop_floodfill: - MOV R1,#240 ;restore inner loop counter + MOV R1,#240 ;restore inner loop counter innerloop_floodfill: - strH r0,[r4] - add r4,r4,#2 ;next pixel - subs r1,r1,#1 ;decrement loop counter - bne innerloop_floodfill - subs r2,r2,#1 - bne outerloop_floodfill - - LDMFD sp!,{r0-r12,pc} - + strH r0,[r4] + add r4,r4,#2 ;next pixel + subs r1,r1,#1 ;decrement loop counter + bne innerloop_floodfill + subs r2,r2,#1 + bne outerloop_floodfill + + LDMFD sp!,{r0-r12,pc} + Bitmap_Locate: ;given x and y coordinates, offsets vram addr to that pixel on screen. - ;input: - ;r0 = x - ;r1 = y - ;output: r2 = vram area - STMFD sp!,{r4-r12,lr} - mov r2,#0x06000000 ;vram base - - - mov r4,#240*2 ;240 pixels across, 2 bytes per pixel - mul r1,r4,r1 - add r2,r2,r1 ;add y*480 - add r2,r2,r0,lsl #1 ;add x*2 - LDMFD sp!,{r4-r12,pc} + ;input: + ;r0 = x + ;r1 = y + ;output: r2 = vram area + STMFD sp!,{r4-r12,lr} + mov r2,#0x06000000 ;vram base + + mov r4,#240*2 ;240 pixels across, 2 bytes per pixel + mul r1,r4,r1 + add r2,r2,r1 ;add y*480 + add r2,r2,r0,lsl #1 ;add x*2 + LDMFD sp!,{r4-r12,pc} + Bitmap_StorePixel: - ;input: r3 = color - ;r0 = x - ;r1 = y - bl Bitmap_Locate - strH r3,[r2] ;store the pixel color in video memory - bx lr - + ;input: r3 = color + ;r0 = x + ;r1 = y + bl Bitmap_Locate + strH r3,[r2] ;store the pixel color in video memory + bx lr + Bitmap_GetPixel: ;retrieves the color of the pixel at [r2] and stores its color value in r3. - ;r0 = x - ;r1 = y - ;output in r3 - bl Bitmap_Locate - ldrH r3,[r2] - bx lr + ;r0 = x + ;r1 = y + ;output in r3 + bl Bitmap_Locate + ldrH r3,[r2] + bx lr diff --git a/Task/Bitmap/Ada/bitmap-1.adb b/Task/Bitmap/Ada/bitmap-1.ada similarity index 100% rename from Task/Bitmap/Ada/bitmap-1.adb rename to Task/Bitmap/Ada/bitmap-1.ada diff --git a/Task/Bitmap/Ada/bitmap-2.adb b/Task/Bitmap/Ada/bitmap-2.ada similarity index 100% rename from Task/Bitmap/Ada/bitmap-2.adb rename to Task/Bitmap/Ada/bitmap-2.ada diff --git a/Task/Bitmap/Ada/bitmap-3.adb b/Task/Bitmap/Ada/bitmap-3.ada similarity index 100% rename from Task/Bitmap/Ada/bitmap-3.adb rename to Task/Bitmap/Ada/bitmap-3.ada diff --git a/Task/Bitmap/AutoHotkey/bitmap.ahk b/Task/Bitmap/AutoHotkey/bitmap.ahk index 2c8ccd888f..791a7d7bc8 100644 --- a/Task/Bitmap/AutoHotkey/bitmap.ahk +++ b/Task/Bitmap/AutoHotkey/bitmap.ahk @@ -21,13 +21,13 @@ background := black if !BitmapType BitmapType := Object("fill", "Bitmap_Fill" - ,"write", "Bitmap_write_ppm3") + ,"write", "Bitmap_write_ppm3") - img := Object("width", width + img := Object("width", width ,"height", height , "base" , BitmapType) - img._SetCapacity(height) ; an array of rows + img._SetCapacity(height) ; an array of rows img.fill(background) Return img } diff --git a/Task/Bitmap/C/bitmap-1.c b/Task/Bitmap/C/bitmap-1.c index 0ff4592b18..44b484cea5 100644 --- a/Task/Bitmap/C/bitmap-1.c +++ b/Task/Bitmap/C/bitmap-1.c @@ -24,14 +24,14 @@ void fill_img(image img, color_component g, color_component b ); void put_pixel_unsafe( - image img, + image img, unsigned int x, unsigned int y, color_component r, color_component g, color_component b ); void put_pixel_clip( - image img, + image img, unsigned int x, unsigned int y, color_component r, diff --git a/Task/Bitmap/C/bitmap-2.c b/Task/Bitmap/C/bitmap-2.c index b8b6167bce..22756034b3 100644 --- a/Task/Bitmap/C/bitmap-2.c +++ b/Task/Bitmap/C/bitmap-2.c @@ -31,7 +31,7 @@ void fill_img( } void put_pixel_unsafe( - image img, + image img, unsigned int x, unsigned int y, color_component r, @@ -46,7 +46,7 @@ void put_pixel_unsafe( } void put_pixel_clip( - image img, + image img, unsigned int x, unsigned int y, color_component r, diff --git a/Task/Bitmap/Clojure/bitmap.clj b/Task/Bitmap/Clojure/bitmap.clj index d2bba0e538..b447f4462c 100644 --- a/Task/Bitmap/Clojure/bitmap.clj +++ b/Task/Bitmap/Clojure/bitmap.clj @@ -1,5 +1,5 @@ (import '[java.awt Color Graphics Image] - '[java.awt.image BufferedImage]) + '[java.awt.image BufferedImage]) (defn blank-bitmap [width height] (BufferedImage. width height BufferedImage/TYPE_3BYTE_BGR)) diff --git a/Task/Bitmap/Common-Lisp/bitmap-2.lisp b/Task/Bitmap/Common-Lisp/bitmap-2.lisp index 926118a474..c50a1e9e8a 100644 --- a/Task/Bitmap/Common-Lisp/bitmap-2.lisp +++ b/Task/Bitmap/Common-Lisp/bitmap-2.lisp @@ -59,11 +59,11 @@ (declare (type rgb-pixel-buffer buffer)) (declare (type rgb-pixel pixel)) (let* ((dimensions (array-dimensions buffer)) - (width (first dimensions)) - (height (second dimensions))) + (width (first dimensions)) + (height (second dimensions))) (loop :for y :of-type fixnum :upfrom 0 :below height :do (loop - :for x :of-type fixnum :upfrom 0 :below width - :do (setf (rgb-pixel buffer x y) pixel))) + :for x :of-type fixnum :upfrom 0 :below width + :do (setf (rgb-pixel buffer x y) pixel))) buffer)) diff --git a/Task/Bitmap/Crystal/bitmap-1.cr b/Task/Bitmap/Crystal/bitmap-1.cr deleted file mode 100644 index ad7043f36d..0000000000 --- a/Task/Bitmap/Crystal/bitmap-1.cr +++ /dev/null @@ -1,105 +0,0 @@ -record Color, r : UInt8, g : UInt8, b : UInt8 do - def self.new (r : Int32, g : Int32, b : Int32) - self.new r.to_u8, g.to_u8, b.to_u8 - end - - def self.new (hex : Int32) - self.new (hex >> 16 & 0xFF).to_u8, (hex >> 8 & 0xFF).to_u8, (hex & 0xFF).to_u8 - end - - def to_i - (r.to_i << 16) + (g.to_i << 8) + b.to_i - end - - def == (other : Color) - self.to_i == other.to_i - end - - WHITE = new 0xFFFFFF - BLACK = new 0x000000 - RED = new 0xFF0000 - GREEN = new 0x00FF00 - BLUE = new 0x0000FF -end - -class Pixmap - getter width, height - @data : Array(Color) - - def initialize (@width : Int32, @height : Int32, bg_color = Color::BLACK) - @data = Array.new(@width * @height, bg_color) - end - - def initialize (@width : Int32, @height : Int32, @data : Array(Color), copy = false) - raise "Wrong bounds" unless @width * @height == @data.size - @data = @data.dup if copy - end - - def initialize (other : self) - @width = other.@width - @height = other.@height - @data = other.@data.dup - end - - def fill (color) - @data.fill color - end - - def [] (x, y) - raise "Outside bounds" unless 0 <= x < @width && 0 <= y < @height - @data[y * @width + x] - end - - def []= (x, y, color) - if 0 <= x < @width && 0 <= y < @height - @data[y * @width + x] = color - end - color - end - - @@loaders = {} of String => Proc(IO, Pixmap) - @@writers = {} of String | Nil => Proc(Pixmap, IO, Nil) - - macro register_loader (ext, method) - @@loaders[{{ext}}] = ->(io : IO) { {{method.id}}(io) } - end - - macro register_writer (ext, method) - @@writers[{{ext}}] = ->(img : Pixmap, io : IO) { img.{{method.id}}(io) } - end - - def self.load (filename) - ext = File.extname(filename) - loader = @@loaders[ext]? || raise "No loader for '.#{ext}'" - File.open(filename) do |f| - loader.call(f) - end - end - - def write (filename_or_io : Path | String | IO) - if filename_or_io.is_a?(IO) - writer = @@writers[nil]? || raise "No console writer" - writer.call(self, filename_or_io) - else - ext = File.extname(filename_or_io) - writer = @@writers[ext]? || raise "No writer for '#{ext}'" - File.open(filename_or_io, "w") do |f| - writer.call(self, f) - end - end - end - - def write_poor_text (io) - (0...@height).each do |y| - (0...@width).each do |x| - print case self[x, y] - when Color::BLACK then '#' - when Color::WHITE then ' ' - else 'X' - end - end - puts - end - end - register_writer nil, write_poor_text -end diff --git a/Task/Bitmap/Crystal/bitmap-2.cr b/Task/Bitmap/Crystal/bitmap-2.cr deleted file mode 100644 index 99b21e439e..0000000000 --- a/Task/Bitmap/Crystal/bitmap-2.cr +++ /dev/null @@ -1,9 +0,0 @@ -require "./pixmap" - -img = Pixmap.new(10, 5) -(0...10).each do |x| - img[x, x // 2] = Color::WHITE - img[9-x, x // 2] = Color::RED -end - -img.write(STDOUT) diff --git a/Task/Bitmap/Crystal/bitmap.crystal b/Task/Bitmap/Crystal/bitmap.crystal new file mode 100644 index 0000000000..fb4b8d9952 --- /dev/null +++ b/Task/Bitmap/Crystal/bitmap.crystal @@ -0,0 +1,36 @@ +class RGBColor + getter red, green, blue + + def initialize(@red = 0_u8, @green = 0_u8, @blue = 0_u8) + end + + RED = new(red: 255_u8) + GREEN = new(green: 255_u8) + BLUE = new(blue: 255_u8) + BLACK = new + WHITE = new(255_u8, 255_u8, 255_u8) +end + +class Pixmap + getter width, height + @data : Array(Array(RGBColor)) + + def initialize(@width : Int32, @height : Int32) + @data = Array.new(@width) { Array.new(@height, RGBColor::WHITE) } + end + + def fill(color) + @data.each &.fill(color) + end + + def [](x, y) + @data[x][y] + end + + def []=(x, y, color) + @data[x][y] = color + end +end + +bmap = Pixmap.new(5, 5) +pp bmap diff --git a/Task/Bitmap/Delphi/bitmap.delphi b/Task/Bitmap/Delphi/bitmap.delphi new file mode 100644 index 0000000000..70def79db7 --- /dev/null +++ b/Task/Bitmap/Delphi/bitmap.delphi @@ -0,0 +1,43 @@ +procedure ShowBitmapFunctions(Image: TImage); +{Code to demonstrate some of the main features the Delphi "TCanvas" object} +var I,X,Y: integer; +var C: TColor; +begin +{Draw red rectangle with 3 pixels wide lines} +Image.Canvas.Pen.Color:=clRed; +Image.Canvas.Pen.Width:=3; +Image.Canvas.Rectangle(50,50,500,300); +{Flood fill rectangle blue} +Image.Canvas.Brush.Color:=clBlue; +Image.Canvas.FloodFill(55,55,clRed,fsBorder); +{Draw random dots on the screen} +for I:=1 to 1000 do + begin + X:=trunc((Random * 450) + 50); + Y:=trunc((Random * 250) + 50); + C:=RGB(Random(255),Random(255),Random(255)); + {draw 9 pixels for each point to make dots more visible} + Image.Canvas.Pixels[X-1,Y-1]:=C; + Image.Canvas.Pixels[X ,Y-1]:=C; + Image.Canvas.Pixels[X+1,Y-1]:=C; + Image.Canvas.Pixels[X-1,Y ]:=C; + Image.Canvas.Pixels[X ,Y ]:=C; + Image.Canvas.Pixels[X+1,Y ]:=C; + Image.Canvas.Pixels[X-1,Y+1]:=C; + Image.Canvas.Pixels[X ,Y+1]:=C; + Image.Canvas.Pixels[X+1,Y+1]:=C; + end; +{Draw lime-green line from corner to cornder} +Image.Canvas.Pen.Color:=clLime; +Image.Canvas.MoveTo(50,50); +Image.Canvas.LineTo(500,300); +{Sample pixel color at 51,51} +C:=Image.Canvas.Pixels[51,51]; +{Display the color value } +Image.Canvas.Brush.Color:=clAqua; +Image.Canvas.Font.Size:=25; +Image.Canvas.Font.Color:=clRed; +Image.Canvas.TextOut(5,5,IntToHex(C,8)); +{Tell Delphi to update the Window} +Image.Repaint; +end; diff --git a/Task/Bitmap/Delphi/bitmap.pas b/Task/Bitmap/Delphi/bitmap.pas deleted file mode 100644 index 7f6926a01d..0000000000 --- a/Task/Bitmap/Delphi/bitmap.pas +++ /dev/null @@ -1,43 +0,0 @@ -procedure ShowBitmapFunctions(Image: TImage); -{Code to demonstrate some of the main features the Delphi "TCanvas" object} -var I,X,Y: integer; -var C: TColor; -begin -{Draw red rectangle with 3 pixels wide lines} -Image.Canvas.Pen.Color:=clRed; -Image.Canvas.Pen.Width:=3; -Image.Canvas.Rectangle(50,50,500,300); -{Flood fill rectangle blue} -Image.Canvas.Brush.Color:=clBlue; -Image.Canvas.FloodFill(55,55,clRed,fsBorder); -{Draw random dots on the screen} -for I:=1 to 1000 do - begin - X:=trunc((Random * 450) + 50); - Y:=trunc((Random * 250) + 50); - C:=RGB(Random(255),Random(255),Random(255)); - {draw 9 pixels for each point to make dots more visible} - Image.Canvas.Pixels[X-1,Y-1]:=C; - Image.Canvas.Pixels[X ,Y-1]:=C; - Image.Canvas.Pixels[X+1,Y-1]:=C; - Image.Canvas.Pixels[X-1,Y ]:=C; - Image.Canvas.Pixels[X ,Y ]:=C; - Image.Canvas.Pixels[X+1,Y ]:=C; - Image.Canvas.Pixels[X-1,Y+1]:=C; - Image.Canvas.Pixels[X ,Y+1]:=C; - Image.Canvas.Pixels[X+1,Y+1]:=C; - end; -{Draw lime-green line from corner to cornder} -Image.Canvas.Pen.Color:=clLime; -Image.Canvas.MoveTo(50,50); -Image.Canvas.LineTo(500,300); -{Sample pixel color at 51,51} -C:=Image.Canvas.Pixels[51,51]; -{Display the color value } -Image.Canvas.Brush.Color:=clAqua; -Image.Canvas.Font.Size:=25; -Image.Canvas.Font.Color:=clRed; -Image.Canvas.TextOut(5,5,IntToHex(C,8)); -{Tell Delphi to update the Window} -Image.Repaint; -end; diff --git a/Task/Bitmap/Elixir/bitmap.ex b/Task/Bitmap/Elixir/bitmap.elixir similarity index 100% rename from Task/Bitmap/Elixir/bitmap.ex rename to Task/Bitmap/Elixir/bitmap.elixir diff --git a/Task/Bitmap/Euphoria/bitmap.eu b/Task/Bitmap/Euphoria/bitmap.euphoria similarity index 100% rename from Task/Bitmap/Euphoria/bitmap.eu rename to Task/Bitmap/Euphoria/bitmap.euphoria diff --git a/Task/Bitmap/FBSL/bitmap.fbsl b/Task/Bitmap/FBSL/bitmap.fbsl index dccbf2fbf5..910530fbc6 100644 --- a/Task/Bitmap/FBSL/bitmap.fbsl +++ b/Task/Bitmap/FBSL/bitmap.fbsl @@ -11,12 +11,12 @@ CENTER(ME) SHOW(ME) BEGIN EVENTS - SELECT CASE CBMSG - CASE WM_LBUTTONDOWN ' Set color at current coords as hex literal - PSET(FBSL.GETDC, LOWORD(CBLPARAM), HIWORD(CBLPARAM), &H0000FF) ' Red: Windows stores colors in BGR order - CASE WM_RBUTTONDOWN ' Get color at current coords as hex literal - FBSLSETTEXT(ME, "&H" & HEX(POINT(FBSL.GETDC, LOWORD(CBLPARAM), HIWORD(CBLPARAM)))) - CASE WM_CLOSE ' Clean up - FBSL.RELEASEDC(ME, FBSL.GETDC) - END SELECT + SELECT CASE CBMSG + CASE WM_LBUTTONDOWN ' Set color at current coords as hex literal + PSET(FBSL.GETDC, LOWORD(CBLPARAM), HIWORD(CBLPARAM), &H0000FF) ' Red: Windows stores colors in BGR order + CASE WM_RBUTTONDOWN ' Get color at current coords as hex literal + FBSLSETTEXT(ME, "&H" & HEX(POINT(FBSL.GETDC, LOWORD(CBLPARAM), HIWORD(CBLPARAM)))) + CASE WM_CLOSE ' Clean up + FBSL.RELEASEDC(ME, FBSL.GETDC) + END SELECT END EVENTS diff --git a/Task/Bitmap/FutureBasic/bitmap.basic b/Task/Bitmap/FutureBasic/bitmap.basic deleted file mode 100644 index 3f1e55672d..0000000000 --- a/Task/Bitmap/FutureBasic/bitmap.basic +++ /dev/null @@ -1,59 +0,0 @@ -include "NSLog.incl" -/* - -This task creates an image with a background filled with red pixels. -Then sets one pixel to blue in the center of the image. -Then gets the RGB color values at that pixel position. -Then saves the image as a jpg to the desktop. - -*/ - -_Window = 1 -_Horz = 300 -_Vert = 100 -_X = 150 -_Y = 50 - -window _Window, @"Bitmap window with blue dot",(0,0,_Horz, _Vert) -WindowSetBackgroundColor(_Window,fn colorwhite) - - -local fn DrawImage as ImageRef - ImageRef image = fn ImageWithSize( fn CGSizeMake(_Horz,_Vert ) ) // create blank image - - ImageLockFocus( image ) // lock image during drawing - - CFIndex i - - for i = 0 to _Horz // fill all horizontal pixels with red dots - BezierPathStrokeLine( fn CGPointMake( i, 0 ), fn CGPointMake( i, _Vert ), 1, fn Colorred ) - next - - BezierPathStrokeRect( fn CGRectMake( _X,_Y,1,1), 1.0, fn ColorBlue) // Draw a blue dot in the center. - - ImageUnlockFocus( image ) // unlock image afer drawing - -end fn = image - - -// Draw the image -ImageRef theImage -theImage = fn DrawImage - -// Display the image -imageview 1,, theImage, (0,0,_Horz, _Vert) - -// Get the color of the pixel at horizontal position X and vertical position Y -colorref color -color = fn ViewColorAtXY( _Window, _X, _Y ) -NSLog( @"RGB Color values at pixel position X,Y are %@", color) - -// Save the image as a jpg -CFURLRef DesktopDirectory,url -DesktopDirectory = fn FileManagerURLForDirectory( NSDesktopDirectory, NSUserDomainMask ) -url = fn URLByAppendingPathComponent( DesktopDirectory, @"Bitmap Image.jpg" ) -bool err -err = fn ImageWriteToURL( theImage, url, NSBitmapImageFileTypeJPEG, _true ) // save image as jpg - - -handleevents diff --git a/Task/Bitmap/Go/bitmap-1.go b/Task/Bitmap/Go/bitmap-1.go index f275d34761..d6dd1a630b 100644 --- a/Task/Bitmap/Go/bitmap-1.go +++ b/Task/Bitmap/Go/bitmap-1.go @@ -1,57 +1,57 @@ package main import ( - "bytes" - "fmt" - "image" - "image/color" - "image/draw" - "image/png" + "bytes" + "fmt" + "image" + "image/color" + "image/draw" + "image/png" ) func main() { - // A rectangle from 0,0 to 300,240. - r := image.Rect(0, 0, 300, 240) + // A rectangle from 0,0 to 300,240. + r := image.Rect(0, 0, 300, 240) - // Create an image - im := image.NewNRGBA(r) + // Create an image + im := image.NewNRGBA(r) - // set some color variables for convience - var ( - red = color.RGBA{0xff, 0x00, 0x00, 0xff} - blue = color.RGBA{0x00, 0x00, 0xff, 0xff} - ) + // set some color variables for convience + var ( + red = color.RGBA{0xff, 0x00, 0x00, 0xff} + blue = color.RGBA{0x00, 0x00, 0xff, 0xff} + ) - // Fill with a uniform color - draw.Draw(im, r, &image.Uniform{red}, image.ZP, draw.Src) + // Fill with a uniform color + draw.Draw(im, r, &image.Uniform{red}, image.ZP, draw.Src) - // Set individual pixels - im.Set(10, 20, blue) - im.Set(20, 30, color.Black) - im.Set(30, 40, color.RGBA{0x10, 0x20, 0x30, 0xff}) + // Set individual pixels + im.Set(10, 20, blue) + im.Set(20, 30, color.Black) + im.Set(30, 40, color.RGBA{0x10, 0x20, 0x30, 0xff}) - // Get the values of specific pixels as color.Color types. - // The color will be in the color.Model of the image (in this - // case color.NRGBA) but color models can convert their values - // to other models. - c1 := im.At(0, 0) - c2 := im.At(10, 20) + // Get the values of specific pixels as color.Color types. + // The color will be in the color.Model of the image (in this + // case color.NRGBA) but color models can convert their values + // to other models. + c1 := im.At(0, 0) + c2 := im.At(10, 20) - // or directly as RGB components (scaled values) - redc, greenc, bluec, _ := c1.RGBA() - redc, greenc, bluec, _ = im.At(30, 40).RGBA() + // or directly as RGB components (scaled values) + redc, greenc, bluec, _ := c1.RGBA() + redc, greenc, bluec, _ = im.At(30, 40).RGBA() - // Images can be read and writen in various formats - var buf bytes.Buffer - err := png.Encode(&buf, im) - if err != nil { - fmt.Println(err) - } + // Images can be read and writen in various formats + var buf bytes.Buffer + err := png.Encode(&buf, im) + if err != nil { + fmt.Println(err) + } - fmt.Println("Image size:", im.Bounds().Dx(), "×", im.Bounds().Dy()) - fmt.Println(buf.Len(), "bytes when encoded as PNG.") - fmt.Printf("Pixel at %7v is %v\n", image.Pt(0, 0), c1) - fmt.Printf("Pixel at %7v is %#v\n", image.Pt(10, 20), c2) // %#v shows type details - fmt.Printf("Pixel at %7v has R=%d, G=%d, B=%d\n", - image.Pt(30, 40), redc, greenc, bluec) + fmt.Println("Image size:", im.Bounds().Dx(), "×", im.Bounds().Dy()) + fmt.Println(buf.Len(), "bytes when encoded as PNG.") + fmt.Printf("Pixel at %7v is %v\n", image.Pt(0, 0), c1) + fmt.Printf("Pixel at %7v is %#v\n", image.Pt(10, 20), c2) // %#v shows type details + fmt.Printf("Pixel at %7v has R=%d, G=%d, B=%d\n", + image.Pt(30, 40), redc, greenc, bluec) } diff --git a/Task/Bitmap/Julia/bitmap.jl b/Task/Bitmap/Julia/bitmap.julia similarity index 100% rename from Task/Bitmap/Julia/bitmap.jl rename to Task/Bitmap/Julia/bitmap.julia diff --git a/Task/Bitmap/Kotlin/bitmap.kts b/Task/Bitmap/Kotlin/bitmap.kotlin similarity index 100% rename from Task/Bitmap/Kotlin/bitmap.kts rename to Task/Bitmap/Kotlin/bitmap.kotlin diff --git a/Task/Bitmap/M2000-Interpreter/bitmap-1.m2000 b/Task/Bitmap/M2000-Interpreter/bitmap-1.m2000 index ebd64b552a..905292d6cb 100644 --- a/Task/Bitmap/M2000-Interpreter/bitmap-1.m2000 +++ b/Task/Bitmap/M2000-Interpreter/bitmap-1.m2000 @@ -1,102 +1,72 @@ -Module Checkit { - Function Bitmap (x as long, y as long) { - if x<1 or y<1 then Error "Wrong dimensions" - structure rgb { - red as byte - green as byte - blue as byte - } - m=len(rgb)*x mod 4 - if m>0 then m=4-m ' add some bytes to raster line - m+=len(rgb) *x - Structure rasterline { - { - pad as byte*m - } - \\ union pad+hline - hline as rgb*x - } - - Structure Raster { - magic as integer*4 - w as integer*4 - h as integer*4 - lines as rasterline*y - } - Buffer Clear Image1 as Raster - \\ 24 chars as header to be used from bitmap render build in functions - Return Image1, 0!magic:="cDIB", 0!w:=Hex$(x,2), 0!h:=Hex$(y, 2) - \\ fill white (all 255) - \\ Str$(string) convert to ascii, so we get all characters from words width to byte width - Return Image1, 0!lines:=Str$(String$(chrcode$(255), Len(rasterline)*y)) - Buffer Clear Pad as Byte*4 - SetPixel=Lambda Image1, Pad,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x, y, c) ->{ - where=alines+3*x+blines*y - if c>0 then c=color(c) - c-! - Return Pad, 0:=c as long - Return Image1, 0!where:=Eval(Pad, 2) as byte, 0!where+1:=Eval(Pad, 1) as byte, 0!where+2:=Eval(Pad, 0) as byte - - } - GetPixel=Lambda Image1,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x,y) ->{ - where=alines+3*x+blines*y - =color(Eval(image1, where+2 as byte), Eval(image1, where+1 as byte), Eval(image1, where as byte)) - } - StrDib$=Lambda$ Image1, Raster -> { - =Eval$(Image1, 0, Len(Raster)) - } - CopyImage=Lambda Image1 (image$) -> { - if left$(image$,12)=Eval$(Image1, 0, 24 ) Then { - Return Image1, 0:=Image$ - } Else Error "Can't Copy Image" - } - Export2File=Lambda Image1, x, y, r=len(rasterline) (f) -> { - \\ use this between open and close - Print #f, "P3" - Print #f,"# Created using M2000 Interpreter" - Print #f, x;" ";y - Print #f, 255 - x2=x-1 - For y1= y-1 to 0 { - a$="" - where=24+r*y1 - x1=0 - Print #f, Eval(Image1, where +2 as byte);" "; - Print #f, Eval(Image1, where+1 as byte);" "; - Print #f, Eval(Image1, where as byte); - where+=3 - For x1=1 to x2 { - Print #f, " ";Eval(Image1, where +2 as byte);" "; - Print #f, Eval(Image1, where+1 as byte);" "; - Print #f, Eval(Image1, where as byte); - where+=3 - } - Print #f - } - } - Group Bitmap { - SetPixel=SetPixel - GetPixel=GetPixel - Image$=StrDib$ - Copy=CopyImage - ToFile=Export2File - } - =Bitmap +\ Bitmap width in pixels, height in pixels +\ Return a group object with some lambda as members: SetPixel, GetPixel, Image$ +\ copyimage +\ using Copy x, y Use Image$ we can display image$ to x, y as twips +\ we can use x*twipsx, y*twipsy for x,y as pixels +Function Bitmap (x as long, y as long) { + if x<1 or y<1 then Error "Wrong dimensions" + structure rgb { + red as byte + green as byte + blue as byte } - A=Bitmap(150,100) - For i=0 to 98 { - Call A.SetPixel(i, i, 5) - Call A.SetPixel(99, i, color(128,0,255)) + m=len(rgb)*x mod 4 + if m>0 then m=4-m ' add some bytes to raster line + m+=len(rgb) *x + Structure rasterline { + { + pad as byte*m + } + \\ union pad+hline + hline as rgb*x } - Call A.SetPixel(i,i,0) - Call A.SetPixel(30,50, color(128,0,255)) - Print A.GetPixel(30,50)=color(128,0,255) - move 3000, 3000 - Image A.image$() - profiler - Open "A2.PPM" for Output as #F - Call A.ToFile(F) - Close #f - print timecount + + Structure Raster { + magic as integer*4 + w as integer*4 + h as integer*4 + lines as rasterline*y + } + Buffer Clear Image1 as Raster + \\ 24 chars as header to be used from bitmap render build in functions + Return Image1, 0!magic:="cDIB", 0!w:=Hex$(x,2), 0!h:=Hex$(y, 2) + \\ fill white (all 255) + \\ Str$(string) convert to ascii, so we get all characters from words width to byte width + Return Image1, 0!lines:=Str$(String$(chrcode$(255), Len(rasterline)*y)) + Buffer Clear Pad as Byte*4 + SetPixel=Lambda Image1, Pad,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x, y, c) ->{ + where=alines+3*x+blines*y + if c>0 then c=color(c) + c-! + Return Pad, 0:=c as long + Return Image1, 0!where:=Eval(Pad, 2) as byte, 0!where+1:=Eval(Pad, 1) as byte, 0!where+2:=Eval(Pad, 0) as byte + + } + GetPixel=Lambda Image1,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x,y) ->{ + where=alines+3*x+blines*y + =color(Eval(image1, where+2 as byte), Eval(image1, where+1 as byte), Eval(image1, where as byte)) + } + StrDib$=Lambda$ Image1, Raster -> { + =Eval$(Image1, 0, Len(Raster)) + } + CopyImage=Lambda Image1 (image$) -> { + if left$(image$,12)=Eval$(Image1, 0, 24 ) Then { + Return Image1, 0:=Image$ + } Else Error "Can't Copy Image" + } + Group Bitmap { + SetPixel=SetPixel + GetPixel=GetPixel + Image$=StrDib$ + Copy=CopyImage + } + =Bitmap } -Checkit +A=Bitmap(100,100) +Call A.SetPixel(50,50, color(128,0,255)) +Print A.GetPixel(50,50)=color(128,0,255) +\\ display image to screen at 100, 50 pixel +copy 100*twipsx,50*twipsy use A.Image$() +A1=Bitmap(100,100) +Call A1.copy(A.Image$()) +copy 500*twipsx,50*twipsy use A1.Image$() diff --git a/Task/Bitmap/M2000-Interpreter/bitmap-2.m2000 b/Task/Bitmap/M2000-Interpreter/bitmap-2.m2000 index bae307643e..562ea41c5b 100644 --- a/Task/Bitmap/M2000-Interpreter/bitmap-2.m2000 +++ b/Task/Bitmap/M2000-Interpreter/bitmap-2.m2000 @@ -1,57 +1,55 @@ Module P6 { Function Bitmap { def x as long, y as long, Import as boolean - If match("NN") then + + If match("NN") then { Read x, y - else.if Match("N") Then + } else.if Match("N") Then { \\ is a file? Read f as long - byte whitespace[0] - if not Eof(f) then - get #f, whitespace :P6$=chr$(whitespace[0]) - get #f, whitespace : P6$+=chr$(whitespace[0]) - boolean getW=true, getH=true, getV=true - long v - If p6$="P6" Then - do + buffer whitespace as byte + if not Eof(f) then { + get #f, whitespace :P6$=eval$(whitespace) + get #f, whitespace : P6$+=eval$(whitespace) + def boolean getW=true, getH=true, getV=true + def long v + \\ str$("P6") has 2 bytes. "P6" has 4 bytes + If p6$=str$("P6") Then { + do { get #f, whitespace - select case whitespace[0] - case 35 - {do get #f, whitespace - until whitespace[0]=10 + if Eval$(whitespace)=str$("#") then { + do {get #f, whitespace} until eval(whitespace)=10 + } else { + select case eval(whitespace) + case 32, 9, 13, 10 + { if getW and x<>0 then { + getW=false + } else.if getH and y<>0 then { + getH=false + } else.if getV and v<>0 then { + getV=false + } + } + case 48 to 57 + {if getW then { + x*=10 + x+=eval(whitespace, 0)-48 + } else.if getH then { + y*=10 + y+=eval(whitespace, 0)-48 + } else.if getV then { + v*=10 + v+=eval(whitespace, 0)-48 + } + } + End Select } - case 32, 9, 13, 10 - { if getW and x<>0 then - getW=false - else.if getH and y<>0 then - getH=false - else.if getV and v<>0 then - getV=false - end if - } - case 48 to 57 - {if getW then - x*=10 - x+=whitespace[0]-48 - else.if getH then - y*=10 - y+=whitespace[0]-48 - else.if getV then - v*=10 - v+=whitespace[0]-48 - end if - } - End Select iF eof(f) then Error "Not a ppm file" - until getV=false - else - Error "Not a P6 ppm" - end if + } until getV=false + } else Error "Not a P6 ppm" Import=True - end if - else - Error "No proper arguments" - end if + } + } else Error "No proper arguments" if x<1 or y<1 then Error "Wrong dimensions" structure rgb { red as byte @@ -80,7 +78,7 @@ Module P6 { Return Image1, 0!magic:="cDIB", 0!w:=Hex$(x,2), 0!h:=Hex$(y, 2) if not Import then Return Image1, 0!lines:=Str$(String$(chrcode$(255), Len(rasterline)*y)) Buffer Clear Pad as Byte*4 - SetPixel=Lambda Image1, Pad, aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x, y, c) ->{ + SetPixel=Lambda Image1, Pad,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x, y, c) ->{ where=alines+3*x+blines*y if c>0 then c=color(c) c-! @@ -103,41 +101,23 @@ Module P6 { Print #f, "P6";chr$(10);"# Created using M2000 Interpreter";chr$(10); Print #f, x;" ";y;" 255";chr$(10); x2=x-1 : where=0 - x0=x*3 - structure rgbP6 { - r as byte - g as byte - b as byte - } - buffer Pad as rgbP6*x*y - For y1=y-1 to 0 { - Return pad, x*y1:=eval$(image1, 0!linesB!where, x0) - where+=x0 + Buffer pad as byte*3 + For y1= 0 to y-1 { + For x1=0 to x2 { + Return pad, 0:=eval$(image1, 0!linesB!where, 3) + Push Eval(pad, 2) : Return pad, 2:=Eval(pad, 0), 0:=Number + Put #f, pad : where+=3 + } m=where mod 4 : if m<>0 then where+=4-m } - For x1=0 to x*y-1 { - Push Eval(pad, x1!b) : Return pad, x1!b:=Eval(pad, x1!r), x1!r:=Number - } - Put #f, pad } if Import then { - x0=x-1 : where=0 - structure rgbP6 { - r as byte - g as byte - b as byte - } - buffer Pad1 as rgbP6*x*y - Get #f, Pad1 - For x1=0 to x*y-1 { - Push Eval(pad1, x1!b) : Return pad1, x1!b:=Eval(pad1, x1!r), x1!r:=Number - } - x1=x*3 - For y1=y-1 to 0 { - Return Image1, 0!linesB!where:=Eval$(Pad1, y1*x, x1) - where+=3*(x0+1) - m=where mod 4 : if m<>0 then where+=4-m - } + x0=x-1 : where=0 + Buffer Pad1 as byte*3 + For y1=y-1 to 0 { + For x1=0 to x0 {Get #f, Pad1 : Push Eval(pad1, 2) : Return pad1, 2:=Eval(pad1, 0), 0:=Number + Return Image1, 0!linesB!where:=Eval$(Pad1) : where+=3} + m=where mod 4 : if m<>0 then where+=4-m} } Group Bitmap { SetPixel=SetPixel diff --git a/Task/Bitmap/Maple/bitmap.maple b/Task/Bitmap/Maple/bitmap.maple index 5182a05be3..c09fcaa799 100644 --- a/Task/Bitmap/Maple/bitmap.maple +++ b/Task/Bitmap/Maple/bitmap.maple @@ -1,23 +1,23 @@ allocateImg := proc(width, height) - return Array(1..width, 1..height, 1..3); + return Array(1..width, 1..height, 1..3); end proc: fillColor := proc(img, rgb::list) - local i; - for i from 1 to 3 do - img[..,..,i] := map(x->rgb[i], img[..,..,i]): - end do: + local i; + for i from 1 to 3 do + img[..,..,i] := map(x->rgb[i], img[..,..,i]): + end do: end proc: setColor := proc(x, y, img, rgb::list) - local i: - for i from 1 to 3 do - img[x,y,i] := rgb[i]: - end do: + local i: + for i from 1 to 3 do + img[x,y,i] := rgb[i]: + end do: end proc: getColor := proc(x,y,img) - local rgb,i: - rgb := Array(1..3): - for i from 1 to 3 do - rgb(i) := img[x,y,i]: - end do: - return rgb: + local rgb,i: + rgb := Array(1..3): + for i from 1 to 3 do + rgb(i) := img[x,y,i]: + end do: + return rgb: end proc: diff --git a/Task/Bitmap/MiniScript/bitmap.mini b/Task/Bitmap/MiniScript/bitmap.mini index 28cfdc4c47..b9f2eed398 100644 --- a/Task/Bitmap/MiniScript/bitmap.mini +++ b/Task/Bitmap/MiniScript/bitmap.mini @@ -12,7 +12,7 @@ img = Image.create(width, height, colr) // Create a diagonal line of multiple colors. Uses // Cartesian coordinates so (0, 0) is lower left corner. for i in range(0, 255) - img.setPixel i, i, color.rgb(i, i, i) + img.setPixel i, i, color.rgb(i, i, i) end for // Get pixel color as RGBA hex values diff --git a/Task/Bitmap/OCaml/bitmap-1.ml b/Task/Bitmap/OCaml/bitmap-1.ocaml similarity index 100% rename from Task/Bitmap/OCaml/bitmap-1.ml rename to Task/Bitmap/OCaml/bitmap-1.ocaml diff --git a/Task/Bitmap/OCaml/bitmap-2.ml b/Task/Bitmap/OCaml/bitmap-2.ocaml similarity index 100% rename from Task/Bitmap/OCaml/bitmap-2.ml rename to Task/Bitmap/OCaml/bitmap-2.ocaml diff --git a/Task/Bitmap/OCaml/bitmap-3.ml b/Task/Bitmap/OCaml/bitmap-3.ocaml similarity index 100% rename from Task/Bitmap/OCaml/bitmap-3.ml rename to Task/Bitmap/OCaml/bitmap-3.ocaml diff --git a/Task/Bitmap/OCaml/bitmap-4.ml b/Task/Bitmap/OCaml/bitmap-4.ocaml similarity index 100% rename from Task/Bitmap/OCaml/bitmap-4.ml rename to Task/Bitmap/OCaml/bitmap-4.ocaml diff --git a/Task/Bitmap/OCaml/bitmap-5.ml b/Task/Bitmap/OCaml/bitmap-5.ocaml similarity index 100% rename from Task/Bitmap/OCaml/bitmap-5.ml rename to Task/Bitmap/OCaml/bitmap-5.ocaml diff --git a/Task/Bitmap/OCaml/bitmap-6.ml b/Task/Bitmap/OCaml/bitmap-6.ocaml similarity index 100% rename from Task/Bitmap/OCaml/bitmap-6.ml rename to Task/Bitmap/OCaml/bitmap-6.ocaml diff --git a/Task/Bitmap/OCaml/bitmap-7.ml b/Task/Bitmap/OCaml/bitmap-7.ocaml similarity index 100% rename from Task/Bitmap/OCaml/bitmap-7.ml rename to Task/Bitmap/OCaml/bitmap-7.ocaml diff --git a/Task/Bitmap/Oz/bitmap-1.oz b/Task/Bitmap/Oz/bitmap-1.oz index e7394ba62c..894345a7e0 100644 --- a/Task/Bitmap/Oz/bitmap-1.oz +++ b/Task/Bitmap/Oz/bitmap-1.oz @@ -9,12 +9,12 @@ define C = {Array.new 1 Height unit} in for Row in 1..Height do - C.Row := {Array.new 1 Width Init} + C.Row := {Array.new 1 Width Init} end array2d(width:Width - height:Height - contents:C) + height:Height + contents:C) end fun {Get array2d(contents:C ...) X Y} @@ -27,9 +27,9 @@ define proc {Transform array2d(contents:C width:W height:H ...) Fun} for Y in 1..H do - for X in 1..W do - C.Y.X := {Fun C.Y.X} - end + for X in 1..W do + C.Y.X := {Fun C.Y.X} + end end end diff --git a/Task/Bitmap/POV-Ray/bitmap.povray b/Task/Bitmap/POV-Ray/bitmap.povray deleted file mode 100644 index 2578b0aa32..0000000000 --- a/Task/Bitmap/POV-Ray/bitmap.povray +++ /dev/null @@ -1,74 +0,0 @@ -//cmd: +w300 +h300 +am2 +a0.01 - -#version 3.7; - -#global_settings {assumed_gamma 1} -#default{ finish{ ambient 0.1 diffuse 0.9 }} -background {rgb 0} - - -#macro mapInit(DimX, DimY) - #local Map = array[DimX][DimY]; - mapFillSolid(Map, rgb<0,0,0>) - Map -#end - - -#macro mapFillSolid(Map, Colour) - mapFillRect(Map,<0,0>,, Colour) -#end - - -#macro mapFillRect(Map, RectLowerLeft, RectUpperRight, Colour) - #for (X, RectLowerLeft.x, RectUpperRight.x - 1) - #for (Y, RectLowerLeft.y, RectUpperRight.y - 1) - #local Map[X][Y] = Colour; - #end - #end -#end - - -#macro mapSetPixel(Map, Pixel, Colour) - #local Map[Pixel.x][Pixel.y] = Colour; -#end - - -#macro mapGetPixel(Map, Pixel) - Map[Pixel.x][Pixel.y] -#end - - -#macro mapObject(Map) - // to visualize the map, each pixel is rendered as a sphere - #for (X,0,dimension_size(Map,1)-1) - #for (Y,0,dimension_size(Map,2)-1) - sphere{ - , 0.5 - pigment{colour Map[X][Y]} - } - #end - #end -#end - -//== Scene - -#declare DimX = 100; -#declare DimY = 100; -#declare ImgMap = mapInit(DimX, DimY); -mapFillSolid(ImgMap, rgb<1, 0, 0>) -mapSetPixel(ImgMap, <25,25>, rgb<1,1,1>) -mapFillRect(ImgMap, <50,50>, <75,75>, rgb<0,0,1>) - -#debug concat("Colour at: <", vstr(2,<25,25>,", ",0,0),"> is: <", vstr(3, mapGetPixel(ImgMap, <25,25>),", ",0,0),">\n") - -mapObject(ImgMap) - -camera{ - location - look_at - right x*image_width/image_height -} -light_source{ - - rgb 1 -} diff --git a/Task/Bitmap/Pascal/bitmap.pas b/Task/Bitmap/Pascal/bitmap.pas index d588e54d4e..09867f7945 100644 --- a/Task/Bitmap/Pascal/bitmap.pas +++ b/Task/Bitmap/Pascal/bitmap.pas @@ -117,14 +117,14 @@ Procedure CreateBmpFile32(directory: string; FileName: string; { fill the pixel data area } for y := (height - 1) downto 0 do begin - for x := 0 to (width - 1) do - begin { Pixel(x,y) } - color32.Blue := 255; - color32.Green := 0; - color32.Red := 0; - color32.Alfa := 0; - BlockWrite(bmpFile, color32, 4); - end; { for x ... } + for x := 0 to (width - 1) do + begin { Pixel(x,y) } + color32.Blue := 255; + color32.Green := 0; + color32.Red := 0; + color32.Alfa := 0; + BlockWrite(bmpFile, color32, 4); + end; { for x ... } end; { for y ... } Close(bmpFile); end; { with bmpInfoHeader, bmpFileHeader } diff --git a/Task/Bitmap/Pluto/bitmap-1.pluto b/Task/Bitmap/Pluto/bitmap-1.pluto deleted file mode 100644 index 8901f27d06..0000000000 --- a/Task/Bitmap/Pluto/bitmap-1.pluto +++ /dev/null @@ -1,23 +0,0 @@ -local canvas = require "canvas" - --- Create a new canvas object: 400 pixels wide and 400 pixels high. -local c = canvas.new(400, 400) - --- Color the whole canvas blue. -c:fill(0xff0000) - --- Draw a red square in the middle. -for i = 1, 51 do - for j = 1, 51 do - c:set(174 + i, 174 + j, 0x0000ff) - end -end - --- Print to the terminal the color (as an integer) of a pixel. -print(c:get(200, 200)) -- 255 - --- Convert the canvas to a BMP image. -local image = c:tobmp() - --- Save the image to a file. -io.contents("mybmp.bmp", image) diff --git a/Task/Bitmap/Pluto/bitmap-2.pluto b/Task/Bitmap/Pluto/bitmap-2.pluto deleted file mode 100644 index bee038a9ef..0000000000 --- a/Task/Bitmap/Pluto/bitmap-2.pluto +++ /dev/null @@ -1,16 +0,0 @@ -require "bitmap" - --- Create a new bitmap object: 400 pixels wide and 400 pixels high -local bmp = bitmap.of(400, 400, color.blue, "mybmp") - --- Draw a red square in the middle. -bmp:square(200, 200, 50, color.red, 0, true) - --- Print to the terminal the color (as an integer) of a pixel. -print(bmp:get(200, 200)) -- 255 - --- View the image using the default viewer for the platform. -bmp:view() - --- Save the image to the file mybmp.bmp in the current directory. -bmp:save() diff --git a/Task/Bitmap/Prolog/bitmap.pro b/Task/Bitmap/Prolog/bitmap.pro index 13b5e3511d..1ea949bb5f 100644 --- a/Task/Bitmap/Prolog/bitmap.pro +++ b/Task/Bitmap/Prolog/bitmap.pro @@ -1,20 +1,20 @@ :- module(bitmap, [ - new_bitmap/3, - fill_bitmap/3, - get_pixel0/3, - set_pixel0/4 ]). + new_bitmap/3, + fill_bitmap/3, + get_pixel0/3, + set_pixel0/4 ]). :- use_module(library(lists)). %-----------------------------------------------------------------------------% % Convenience Predicates replicate(Term,Times,L):- - length(L,Times), - maplist(=(Term),L). + length(L,Times), + maplist(=(Term),L). replace0(N,OL,E,NL):- - nth0(N,OL,_,TL), - nth0(N,NL,E,TL). + nth0(N,OL,_,TL), + nth0(N,NL,E,TL). %-----------------------------------------------------------------------------% % Bitmap Utilities % @@ -25,27 +25,27 @@ replace0(N,OL,E,NL):- % in other bitmap tasks it is assumed to be a list [R,G,B] where % each is an int between 0 and 255, in code: rgb_pixel(RGB):- - length(RGB,3), - maplist(integer,RGB), - maplist(between(0,255),RGB). + length(RGB,3), + maplist(integer,RGB), + maplist(between(0,255),RGB). %new_bitmap(Bitmap,Dimensions,RGB) new_bitmap([[X,Y],Pixels],[X,Y],RGB) :- - replicate(RGB,X,Row), - replicate(Row,Y,Pixels). - + replicate(RGB,X,Row), + replicate(Row,Y,Pixels). + %fill_bitmap(New_Bitmap,Bitmap,RGB) fill_bitmap(New_Bitmap,[[X,Y],_],RGB) :- - new_bitmap(New_Bitmap,[X,Y],RGB). + new_bitmap(New_Bitmap,[X,Y],RGB). %here get and set use 0 based indexing %get_pixel0(Bitmap,Coordinates,RGB) get_pixel0([[_DimX,_DimY],Pixels],[X,Y],RGB) :- - nth0(Y,Pixels,Row), - nth0(X,Row,RGB). + nth0(Y,Pixels,Row), + nth0(X,Row,RGB). %set_pixel0(New Bitmap, Bitmap, Coordinates, RGB) set_pixel0([[DimX,DimY],New_Pixels],[[DimX,DimY],Pixels],[X,Y],RGB) :- - nth0(Y,Pixels,Row), - replace0(X,Row,RGB,New_Row), - replace0(Y,Pixels,New_Row,New_Pixels). + nth0(Y,Pixels,Row), + replace0(X,Row,RGB,New_Row), + replace0(Y,Pixels,New_Row,New_Pixels). diff --git a/Task/Bitmap/Raku/bitmap.raku b/Task/Bitmap/Raku/bitmap.raku index e2a0e66931..1bf117941a 100644 --- a/Task/Bitmap/Raku/bitmap.raku +++ b/Task/Bitmap/Raku/bitmap.raku @@ -7,16 +7,16 @@ class Bitmap { @!data = $p.clone xx ($!width*$!height) } method pixel( - $i where ^$!width, - $j where ^$!height - --> Pixel + $i where ^$!width, + $j where ^$!height + --> Pixel ) is rw { @!data[$i + $j * $!width] } method set-pixel ($i, $j, Pixel $p) { - self.pixel($i, $j) = $p.clone; + self.pixel($i, $j) = $p.clone; } method get-pixel ($i, $j) returns Pixel { - self.pixel($i, $j); + self.pixel($i, $j); } } diff --git a/Task/Bitmap/RapidQ/bitmap.rapidq b/Task/Bitmap/RapidQ/bitmap.rapidq index 71baea5c92..ad4ebfe355 100644 --- a/Task/Bitmap/RapidQ/bitmap.rapidq +++ b/Task/Bitmap/RapidQ/bitmap.rapidq @@ -5,8 +5,8 @@ CREATE form AS QForm Height = 480 CREATE canvas AS QCanvas Height = form.ClientHeight - Width = form.ClientWidth - OnPaint = PaintCanvas + Width = form.ClientWidth + OnPaint = PaintCanvas END CREATE END CREATE diff --git a/Task/Bitmap/Rebol/bitmap.rebol b/Task/Bitmap/Rebol/bitmap.rebol deleted file mode 100644 index f4d893806b..0000000000 --- a/Task/Bitmap/Rebol/bitmap.rebol +++ /dev/null @@ -1,58 +0,0 @@ -;; make image using pair -img: make image! 2x2 -;; make image using pair and RGB tuple -img: make image! [2x2 255.0.0] -;; make image using pair and RGBA tuple" -img: make image! [2x2 255.0.0.10] - -;; Rebol3's construction syntax -img1: #(image! 4x4) ;; white by default -img2: #(image! 2x2 0.0.0) ;; black image - -;; Raw binary access: -probe img1/rgb -;== #{ -;== FFFFFFFFFFFFFFFFFFFFFFFF -;== FFFFFFFFFFFFFFFFFFFFFFFF -;== FFFFFFFFFFFFFFFFFFFFFFFF -;== FFFFFFFFFFFFFFFFFFFFFFFF} - -;; Blit image to image -change at img1 2x2 img2 -probe img1/rgb -;== #{ -;== FFFFFFFFFFFFFFFFFFFFFFFF -;== FFFFFF000000000000FFFFFF -;== FFFFFF000000000000FFFFFF -;== FFFFFFFFFFFFFFFFFFFFFFFF} - -;; Pixel access -img1/1 ;== 255.255.255.255 -img2/1 ;== 0.0.0.255 -img1/2x2 ;== 0.0.0.255 - -;; Other binary accessors: -img: #(image! 2x1) -img/1: 1.2.3.100 -img/2: 4.5.6.200 -img/rgba ;== #{01020364040506C8} -img/rgbo ;== #{0102039B04050637} -img/argb ;== #{64010203C8040506} -img/orgb ;== #{9B01020337040506} -img/bgra ;== #{03020164060504C8} -img/bgro ;== #{0302019B06050437} -img/abgr ;== #{64030201C8060504} -img/obgr ;== #{9B03020137060504} -img/opacity ;== #{9B37} -img/alpha ;== #{64C8} - -;; Drawing may be done using extensions like Blend2D -import blend2d ;@@ https://github.com/Siskin-framework/Rebol-Blend2D -img: draw 100x100 [ - fill red - pen black - line-width 10 - circle 50x50 20 - fill none - line 0x0 100x100 -] diff --git a/Task/Bitmap/Rust/bitmap.rs b/Task/Bitmap/Rust/bitmap.rust similarity index 100% rename from Task/Bitmap/Rust/bitmap.rs rename to Task/Bitmap/Rust/bitmap.rust diff --git a/Task/Bitmap/Scheme/bitmap-1.scm b/Task/Bitmap/Scheme/bitmap-1.ss similarity index 100% rename from Task/Bitmap/Scheme/bitmap-1.scm rename to Task/Bitmap/Scheme/bitmap-1.ss diff --git a/Task/Bitmap/Scheme/bitmap-2.scm b/Task/Bitmap/Scheme/bitmap-2.ss similarity index 100% rename from Task/Bitmap/Scheme/bitmap-2.scm rename to Task/Bitmap/Scheme/bitmap-2.ss diff --git a/Task/Bitmap/Scheme/bitmap-3.scm b/Task/Bitmap/Scheme/bitmap-3.ss similarity index 100% rename from Task/Bitmap/Scheme/bitmap-3.scm rename to Task/Bitmap/Scheme/bitmap-3.ss diff --git a/Task/Bitmap/Scheme/bitmap-4.scm b/Task/Bitmap/Scheme/bitmap-4.ss similarity index 100% rename from Task/Bitmap/Scheme/bitmap-4.scm rename to Task/Bitmap/Scheme/bitmap-4.ss diff --git a/Task/Bitmap/Scheme/bitmap-5.scm b/Task/Bitmap/Scheme/bitmap-5.ss similarity index 100% rename from Task/Bitmap/Scheme/bitmap-5.scm rename to Task/Bitmap/Scheme/bitmap-5.ss diff --git a/Task/Bitmap/SequenceL/bitmap.sequencel b/Task/Bitmap/SequenceL/bitmap.sequencel index ba7a4ffd42..5facc762fe 100644 --- a/Task/Bitmap/SequenceL/bitmap.sequencel +++ b/Task/Bitmap/SequenceL/bitmap.sequencel @@ -2,37 +2,37 @@ RGB ::= (R: int(0), G: int(0), B: int(0)); newBitmap: int * int -> RGB(2); newBitmap(width, height)[y, x] := - (R: 0, G: 0, B: 0) - foreach y within 1 ... height, - x within 1 ... width; + (R: 0, G: 0, B: 0) + foreach y within 1 ... height, + x within 1 ... width; fill: RGB(2) * RGB -> RGB(2); fill(bitmap(2), color)[y, x] := - color - foreach y within 1 ... size(bitmap), - x within 1 ... size(bitmap[y]); + color + foreach y within 1 ... size(bitmap), + x within 1 ... size(bitmap[y]); setColorAt: RGB(2) * int * int * RGB -> RGB(2); setColorAt(bitmap(2), x, y, color)[Y, X] := - color when Y = y and X = x - else - bitmap[Y, X]; - -getColorAt: RGB(2) * int * int -> RGB; + color when Y = y and X = x + else + bitmap[Y, X]; + +getColorAt: RGB(2) * int * int -> RGB; getColorAt(bitmap(2), x, y) := bitmap[y, x]; lightGreen := (R: 51, G: 255, B: 51); lightRed := (R: 255, G: 51, B: 51); main(args(2)) := - let - width := 1920; - height := 1200; - - cleanImage := newBitmap(width, height); - - filledGreen := fill(cleanImage, lightGreen); - - redCenter := setColorAt(filledGreen, width / 2, height / 2, lightRed); - in - getColorAt(redCenter, width / 2, height / 2); + let + width := 1920; + height := 1200; + + cleanImage := newBitmap(width, height); + + filledGreen := fill(cleanImage, lightGreen); + + redCenter := setColorAt(filledGreen, width / 2, height / 2, lightRed); + in + getColorAt(redCenter, width / 2, height / 2); diff --git a/Task/Bitmap/Uiua/bitmap.uiua b/Task/Bitmap/Uiua/bitmap.uiua deleted file mode 100644 index 3e952126ca..0000000000 --- a/Task/Bitmap/Uiua/bitmap.uiua +++ /dev/null @@ -1,3 +0,0 @@ -↯ 50_50_3 Red # Fill with red. -⍜(⊡25_25|⋅White) # Add white spot. -⊸⊡0_0 # Get pixel [0 0]. diff --git a/Task/Bitmap/Vedit-macro-language/bitmap.vedit b/Task/Bitmap/Vedit-macro-language/bitmap.vedit index 56f41c3f72..616c17071b 100644 --- a/Task/Bitmap/Vedit-macro-language/bitmap.vedit +++ b/Task/Bitmap/Vedit-macro-language/bitmap.vedit @@ -1,5 +1,5 @@ -#11 = 400 // Width of the image -#12 = 300 // Height of the image +#11 = 400 // Width of the image +#12 = 300 // Height of the image // Create an empty RGB image and fill it with black color // @@ -13,16 +13,16 @@ Repeat(#11 * #12) { // Fill the image with dark blue color // -#5 = 0 // Red -#6 = 0 // Green -#7 = 64 // Blue +#5 = 0 // Red +#6 = 0 // Green +#7 = 64 // Blue Call("FILL_IMAGE") // Draw one pixel in orange color // -#1 = 100 // x -#2 = 50 // y -#5 = 255 #6 = 128 #7 = 0 // Orange color +#1 = 100 // x +#2 = 50 // y +#5 = 255 #6 = 128 #7 = 0 // Orange color Call("DRAW_PIXEL") // Get the color of a pixel diff --git a/Task/Bitmap/Yabasic/bitmap.basic b/Task/Bitmap/Yabasic/bitmap.basic index 0dbe5417f2..cad0519374 100644 --- a/Task/Bitmap/Yabasic/bitmap.basic +++ b/Task/Bitmap/Yabasic/bitmap.basic @@ -6,8 +6,8 @@ backcolor 255, 0, 0 // red clear window -color 0, 255, 0 // green +color 0, 255, 0 // green dot 100, 100 -c$ = getbit$(100, 100, 100, 100) // get color area 1x1 pixel +c$ = getbit$(100, 100, 100, 100) // get color area 1x1 pixel print c$ diff --git a/Task/Bitmap/Zig/bitmap.zig b/Task/Bitmap/Zig/bitmap.zig deleted file mode 100644 index 08b57964ef..0000000000 --- a/Task/Bitmap/Zig/bitmap.zig +++ /dev/null @@ -1,96 +0,0 @@ -const std = @import("std"); - -pub const Rgb = struct { - r: u8, - g: u8, - b: u8, -}; - -pub const PixelOutOfBounds = error{PixelOutOfBounds}; - -pub const Bitmap = struct { - width: usize, - height: usize, - pixels: []Rgb, - - // The ! next to the return type communicates that the function may return an error - pub fn new(allocator: std.mem.Allocator, width: usize, height: usize) !Bitmap { - // In Zig libraries that allocate receive an allocator - // instead of choosing one themselves - var pixels = try allocator.alloc(Rgb, width * height); - - for (0..width*height) | i | { - pixels[i] = Rgb { .r = 0, .g = 0, .b = 0 }; - } - - return Bitmap { - .width = width, - .height = height, - .pixels = pixels, - }; - } - - pub fn free(self: Bitmap, allocator: std.mem.Allocator) void { - allocator.free(self.pixels); - } - - pub fn fill(self: *Bitmap, color: Rgb) void { - for (0..self.width*self.height) | i | { - self.pixels[i] = color; - } - } - - pub fn get_pixel_unchecked(self: Bitmap, x: usize, y: usize) Rgb { - return self.pixels[self.height * y + x]; - } - - pub fn get_pixel(self: Bitmap, x: usize, y: usize) !Rgb { - if (self.width <= x or self.height <= y) { - return error.PixelOutOfBounds; - } - - return self.get_pixel_unchecked(x, y); - } - - pub fn set_pixel_unchecked(self: *Bitmap, x: usize, y: usize, color: Rgb) void { - self.pixels[self.height * y + x] = color; - } - - pub fn set_pixel(self: *Bitmap, x: usize, y: usize, color: Rgb) !void { - if (self.width <= x or self.height <= y) { - return error.PixelOutOfBounds; - } - - return self.set_pixel_unchecked(x, y, color); - } -}; - -test "putting a pixel gets the pixel" { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - const allocator = gpa.allocator(); - - var bm = try Bitmap.new(allocator, 10, 10); - defer bm.free(allocator); - - try bm.set_pixel(4, 4, Rgb {.r=255, .g=0, .b=0}); - - const pixel = try bm.get_pixel(4, 4); - - try std.testing.expectEqual(255, pixel.r); -} - -test "filling a pixel gets all the pixels" { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - const allocator = gpa.allocator(); - - var bm = try Bitmap.new(allocator, 10, 10); - defer bm.free(allocator); - - bm.fill(Rgb {.r=255, .g=0, .b=0}); - - for (0..10) | x | { - for (0..10) | y | { - try std.testing.expectEqual(255, bm.get_pixel_unchecked(x, y).r); - } - } -} diff --git a/Task/Bitmap/Zkl/bitmap-1.zkl b/Task/Bitmap/Zkl/bitmap-1.zkl index 684616c368..b0784bda52 100644 --- a/Task/Bitmap/Zkl/bitmap-1.zkl +++ b/Task/Bitmap/Zkl/bitmap-1.zkl @@ -1,16 +1,16 @@ -class PPM{ // (0,0) is logically bottom left +class PPM{ // (0,0) is logically bottom left fcn init(width,height){ sz:=width*height*3; var [const] data=sz.pump(Data(sz),0), // initialize to Black (RGB=000) - w=width, h=height; + w=width, h=height; } fcn fill(rgb){ sz:=data.len()/3; data.clear(); sz.pump(data,T(Void,rgb.toBigEndian(3))); } fcn __sGet(x,y) { data.toBigEndian(3*y*w + 3*x,3); } //ppm[x,y] - fcn __sSet(rbg,x,y){ data[3*y*w + 3*x,3]=rbg.toBigEndian(3); } //ppm[x,y]=rgb + fcn __sSet(rbg,x,y){ data[3*y*w + 3*x,3]=rbg.toBigEndian(3); } //ppm[x,y]=rgb fcn write(out){ // write bottom to top to move (0,0) from bottom left to bottom left out.write("P6\n#rosettacode PPM\n%d %d\n255\n".fmt(w,h)); [h-1..0, -1].pump(out,'wrap(h){ data.seek(3*h*w); data.read(3*w) }); diff --git a/Task/Bitwise-IO/Ada/bitwise-io-1.adb b/Task/Bitwise-IO/Ada/bitwise-io-1.ada similarity index 100% rename from Task/Bitwise-IO/Ada/bitwise-io-1.adb rename to Task/Bitwise-IO/Ada/bitwise-io-1.ada diff --git a/Task/Bitwise-IO/Ada/bitwise-io-2.adb b/Task/Bitwise-IO/Ada/bitwise-io-2.ada similarity index 100% rename from Task/Bitwise-IO/Ada/bitwise-io-2.adb rename to Task/Bitwise-IO/Ada/bitwise-io-2.ada diff --git a/Task/Bitwise-IO/Ada/bitwise-io-3.adb b/Task/Bitwise-IO/Ada/bitwise-io-3.ada similarity index 100% rename from Task/Bitwise-IO/Ada/bitwise-io-3.adb rename to Task/Bitwise-IO/Ada/bitwise-io-3.ada diff --git a/Task/Bitwise-IO/C++/bitwise-io.cpp b/Task/Bitwise-IO/C++/bitwise-io.cpp deleted file mode 100644 index 70fcad159c..0000000000 --- a/Task/Bitwise-IO/C++/bitwise-io.cpp +++ /dev/null @@ -1,114 +0,0 @@ -#include -#include -#include -#include - -class BitFilter { -public: - BitFilter(const std::string& filePath) { - writer.open(filePath, std::ios_base::binary); - reader.open(filePath, std::ios_base::binary); - accumulator = 0; - bits = 0; - } - - void write(const std::vector& chars, const uint32_t& startIndex, - uint32_t bitCount, uint32_t bitsOmittedCount) { - uint32_t index = startIndex + bitsOmittedCount / 8; - bitsOmittedCount %= 8; - - while ( bitCount > 0 || bits >= 8 ) { - while ( bits >= 8 ) { - bits -= 8; - writer.put(accumulator >> bits); - accumulator &= ( 1 << bits ) - 1; - } - - while ( bits < 8 && bitCount > 0 ) { - accumulator = ( accumulator << 1 ) | - ( ( ( 128 >> bitsOmittedCount ) & chars[index] ) >> ( 7 - bitsOmittedCount ) ); - bitCount -= 1; - bits += 1; - if ( ++bitsOmittedCount == 8 ) { - bitsOmittedCount = 0; - index += 1; - } - } - } - } - - void read(std::vector& chars, const uint32_t& startIndex, - uint32_t bitCount, uint32_t bitsOmittedCount) { - uint32_t index = startIndex + bitsOmittedCount / 8; - bitsOmittedCount %= 8; - - while ( bitCount > 0 ) { - while ( bits > 0 && bitCount > 0 ) { - const uint32_t mask = 128 >> bitsOmittedCount; - if ( ( accumulator & ( 1 << ( bits - 1 ) ) ) > 0 ) { - chars[index] = chars[index] | mask; - } else { - chars[index] = chars[index] & ( ~mask & 0xff ); - } - - bitCount -= 1; - bits -= 1; - if ( ++bitsOmittedCount >= 8 ) { - bitsOmittedCount = 0; - index += 1; - } - } - - if ( bitCount > 0 ) { - char qq; - reader.read((&qq), 1); - accumulator = ( accumulator << 8 ) | qq; - bits += 8; - } - } - } - - void close_writer() { - if ( bits != 0 ) { - accumulator <<= 8 - bits; - writer.put(accumulator); - } - - writer.close(); - accumulator = 0; - bits = 0; - } - - void close_reader() { - reader.close(); - accumulator = 0; - bits = 0; - } - -private: - uint32_t accumulator, bits; - std::ofstream writer; - std::ifstream reader; -}; - -int main() { - BitFilter bitFilter("BitwiseIO.dat"); - std::string source = "abcde12345"; - std::vector chars(source.begin(), source.end()); - - // For each char in 'chars', write 7 bits omitting the most significant bit - for ( uint32_t i = 0; i < chars.size(); ++i ) { - bitFilter.write(chars, i, 7, 1); - } - bitFilter.close_writer(); - - // Read 7 bits and expand to a char of 'destination' by reconstructing the most significant bit - std::vector destination(chars.size()); - for ( uint32_t i = 0; i < destination.size(); ++i ) { - bitFilter.read(destination, i, 7, 1); - } - bitFilter.close_reader(); - - std::string result(destination.data()); - std::cout << result << std::endl; -} diff --git a/Task/Bitwise-IO/Delphi/bitwise-io.pas b/Task/Bitwise-IO/Delphi/bitwise-io.delphi similarity index 100% rename from Task/Bitwise-IO/Delphi/bitwise-io.pas rename to Task/Bitwise-IO/Delphi/bitwise-io.delphi diff --git a/Task/Bitwise-IO/DuckDB/bitwise-io-1.duckdb b/Task/Bitwise-IO/DuckDB/bitwise-io-1.duckdb deleted file mode 100644 index df8d7f60c4..0000000000 --- a/Task/Bitwise-IO/DuckDB/bitwise-io-1.duckdb +++ /dev/null @@ -1,8 +0,0 @@ -# s should be a bitstring. -# Right-pad s with 0s so that the length of the output string is a multiple of 8. -CREATE OR REPLACE FUNCTION print_bits(s) as ( - format('{:0<{}}', s, (ceil(length(s) / 8) * 8)::INT) -); - -# Example: -select print_bits('101'::BITSTRING); diff --git a/Task/Bitwise-IO/DuckDB/bitwise-io-2.duckdb b/Task/Bitwise-IO/DuckDB/bitwise-io-2.duckdb deleted file mode 100644 index 57ab55eb4d..0000000000 --- a/Task/Bitwise-IO/DuckDB/bitwise-io-2.duckdb +++ /dev/null @@ -1,13 +0,0 @@ -# "Compress" a string by printing it as a bitstring without the left-most bit of each byte -CREATE OR REPLACE FUNCTION sevenbits(str) as ( - select string_agg(format('{}', ascii(s)::BITSTRING)[-7:], '') - from (select unnest(regexp_extract_all(str, '.')) as s) -); - -# Undo sevenbits() -CREATE OR REPLACE FUNCTION from_sevenbits(str) as ( - select string_agg(chr(s::BIT::INT), '') - from (select unnest(regexp_extract_all(str, '.......')) as s) -); - -select from_sevenbits(sevenbits('abracadabra')); diff --git a/Task/Bitwise-IO/Java/bitwise-io.java b/Task/Bitwise-IO/Java/bitwise-io.java deleted file mode 100644 index 06a000098b..0000000000 --- a/Task/Bitwise-IO/Java/bitwise-io.java +++ /dev/null @@ -1,112 +0,0 @@ -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.nio.charset.StandardCharsets; - -public final class BitwiseIO { - - public static void main(String[] args) throws IOException { - BitFilter bitFilter = new BitFilter("BitwiseIO.dat"); - byte[] source = "abcde12345".getBytes(StandardCharsets.ISO_8859_1); - - // For each byte in 'source', write 7 bits omitting the most significant bit - for ( int i = 0; i < source.length; i++ ) { - bitFilter.write(source, i, 7, 1); - } - bitFilter.closeWriter(); - - // Read 7 bits and expand to a byte of 'destination' by reconstructing the most significant bit - byte[] destination = new byte[source.length]; - for ( int i = 0; i < destination.length; i++ ) { - bitFilter.read(destination, i, 7, 1); - } - bitFilter.closeReader(); - - System.out.println( new String(destination) ); - } - -} - -final class BitFilter { - - public BitFilter(String filePath) throws IOException { - bufferedWriter = new BufferedWriter( new FileWriter(filePath) ); - bufferedReader = new BufferedReader( new FileReader(filePath) ); - } - - public void write(byte[] bytes, int startIndex, int bitCount, int bitsOmittedCount) throws IOException { - int index = startIndex + bitsOmittedCount / 8; - bitsOmittedCount %= 8; - - while ( bitCount > 0 || bits >= 8 ) { - while ( bits >= 8 ) { - bits -= 8; - bufferedWriter.write(accumulator >>> bits); - accumulator &= ( 1 << bits ) - 1; - } - - while ( bits < 8 && bitCount > 0 ) { - accumulator = ( accumulator << 1 ) | - ( ( ( 128 >>> bitsOmittedCount ) & bytes[index] ) >>> ( 7 - bitsOmittedCount ) ); - bitCount -= 1; - bits += 1; - if ( ++bitsOmittedCount == 8 ) { - bitsOmittedCount = 0; - index += 1; - } - } - } - } - - public void read(byte[] bytes, int startIndex, int bitCount, int bitsOmittedCount) throws IOException { - int index = startIndex + bitsOmittedCount / 8; - bitsOmittedCount %= 8; - - while ( bitCount > 0 ) { - while ( bits > 0 && bitCount > 0 ) { - final int mask = 128 >>> bitsOmittedCount; - if ( ( accumulator & ( 1 << ( bits - 1 ) ) ) > 0 ) { - bytes[index] = (byte) ( bytes[index] | mask ); - } else { - bytes[index] = (byte) ( bytes[index] & ( ~mask & 0xff ) ); - } - - bitCount -= 1; - bits -= 1; - if ( ++bitsOmittedCount >= 8 ) { - bitsOmittedCount = 0; - index += 1; - } - } - - if ( bitCount > 0 ) { - accumulator = ( accumulator << 8 ) | bufferedReader.read(); - bits += 8; - } - } - } - - public void closeWriter() throws IOException { - if ( bits != 0 ) { - accumulator <<= 8 - bits; - bufferedWriter.write(accumulator); - } - - bufferedWriter.close(); - accumulator = 0; - bits = 0; - } - - public void closeReader() throws IOException { - bufferedReader.close(); - accumulator = 0; - bits = 0; - } - - private int accumulator, bits; - private BufferedWriter bufferedWriter; - private BufferedReader bufferedReader; - -} diff --git a/Task/Bitwise-IO/Julia/bitwise-io.jl b/Task/Bitwise-IO/Julia/bitwise-io.julia similarity index 100% rename from Task/Bitwise-IO/Julia/bitwise-io.jl rename to Task/Bitwise-IO/Julia/bitwise-io.julia diff --git a/Task/Bitwise-IO/Kotlin/bitwise-io.kts b/Task/Bitwise-IO/Kotlin/bitwise-io.kotlin similarity index 100% rename from Task/Bitwise-IO/Kotlin/bitwise-io.kts rename to Task/Bitwise-IO/Kotlin/bitwise-io.kotlin diff --git a/Task/Bitwise-IO/OCaml/bitwise-io-1.ml b/Task/Bitwise-IO/OCaml/bitwise-io-1.ocaml similarity index 100% rename from Task/Bitwise-IO/OCaml/bitwise-io-1.ml rename to Task/Bitwise-IO/OCaml/bitwise-io-1.ocaml diff --git a/Task/Bitwise-IO/OCaml/bitwise-io-2.ml b/Task/Bitwise-IO/OCaml/bitwise-io-2.ocaml similarity index 100% rename from Task/Bitwise-IO/OCaml/bitwise-io-2.ml rename to Task/Bitwise-IO/OCaml/bitwise-io-2.ocaml diff --git a/Task/Bitwise-IO/Rebol/bitwise-io.rebol b/Task/Bitwise-IO/Rebol/bitwise-io.rebol deleted file mode 100644 index 80dccaaf08..0000000000 --- a/Task/Bitwise-IO/Rebol/bitwise-io.rebol +++ /dev/null @@ -1,59 +0,0 @@ -Rebol [ - title: "Rosetta code: Bitwise IO" - file: %Bitwise_IO.r3 - url: https://rosettacode.org/wiki/Bitwise_IO - note: "Based on Vasyl Zubko's Red language implementation!" -] - -compress-7bit: function [ - "Pack 8-bit bytes into 7-bit chunks (lossless for 7-bit ASCII)" - str [string! binary!] -][ - buf: clear "" ;; string buffer for 7-bit bitstream - bits: enbase/flat str 2 ;; convert input to a flat binary string "0101..." - while [not tail? bits][ ;; take 7 bits out of every 8 - append buf copy/part next bits 7 ;; append bits 2..8 (skip the first bit of each byte) - bits: skip bits 8 ;; move to next 8-bit group - ] - ;; Pad to multiple of 8 bits so it can be debased to bytes - unless zero? (pad-bits: (length? buf) // 8) [ - append/dup buf #"0" 8 - pad-bits - ] - debase buf 2 ;; turn the 7-bit stream (padded) back into binary bytes -] - -decompress-7bit: function [ - "Unpack 7-bit chunks back to 8-bit by re-inserting the leading zero bit per group of 7" - bin [binary!] -][ - bits: enbase/flat bin 2 ;; bitstring of the compressed bytes - filled: 0 ;; counter within a 7-bit group - buf: clear #{} ;; output binary buffer - acc: clear "" ;; accumulator for 7 bits - - foreach bit bits [ - append acc bit ;; collect one bit - filled: filled + 1 - if filled = 7 [ - ;; Prepend a '0' to restore 8th bit, debase to a byte, append to output - append buf debase join #"0" acc 2 - clear acc - filled: 0 - ] - ] - ;; If padding produced a final 0 byte, drop it - if 0 == last buf [take/last buf] - to string! buf ;; return original as string -] - -;- DEMO: -in-string: "Rebol is not dead!" -compressed: compress-7bit in-string ;; compress to 7-bit packed binary -expanded: decompress-7bit compressed ;; decompress back to original - -print [ - "^/in-string :" in-string - "^/in-binary :" to binary! in-string - "^/compressed:" compressed - "^/expanded :" expanded -] diff --git a/Task/Bitwise-IO/Rust/bitwise-io.rs b/Task/Bitwise-IO/Rust/bitwise-io.rust similarity index 100% rename from Task/Bitwise-IO/Rust/bitwise-io.rs rename to Task/Bitwise-IO/Rust/bitwise-io.rust diff --git a/Task/Bitwise-IO/Seed7/bitwise-io.seed7 b/Task/Bitwise-IO/Seed7/bitwise-io.seed7 index 413c230ed9..a5764cfc78 100644 --- a/Task/Bitwise-IO/Seed7/bitwise-io.seed7 +++ b/Task/Bitwise-IO/Seed7/bitwise-io.seed7 @@ -1,7 +1,14 @@ $ include "seed7_05.s7i"; include "bitdata.s7i"; + include "strifile.s7i"; -const proc: writeAscii (inout msbOutBitStream: outStream, in string: ascii) is func +const proc: initWriteAscii (inout file: outFile, inout integer: bitPos) is func + begin + outFile.bufferChar := '\0;'; + bitPos := 0; + end func; + +const proc: writeAscii (inout file: outFile, inout integer: bitPos, in string: ascii) is func local var char: ch is ' '; begin @@ -9,38 +16,42 @@ const proc: writeAscii (inout msbOutBitStream: outStream, in string: ascii) is f if ch > '\127;' then raise RANGE_ERROR; else - putBits(outStream, ord(ch), 7); + putBitsMsb(outFile, bitPos, ord(ch), 7); end if; end for; end func; -const proc: finishWriteAscii (inout msbOutBitStream: outStream) is func +const proc: finishWriteAscii (inout file: outFile, inout integer: bitPos) is func begin - putBits(outStream, 0, 7); # Write a terminating NUL char. - flush(outStream); + putBitsMsb(outFile, bitPos, 0, 7); # Write a terminating NUL char. + write(outFile, chr(ord(outFile.bufferChar))); end func; -const func string: readAscii (inout msbInBitStream: inStream) is func +const func string: readAscii (inout msbBitStream: aBitStream) is func result var string: stri is ""; local var char: ch is ' '; begin - repeat - ch := chr(getBits(inStream, 7)); + while ch <> '\0;' do + ch := chr(getBits(aBitStream, 7)); if ch <> '\0;' then stri &:= ch; end if; - until ch = '\0;'; + end while; end func; const proc: main is func local - var msbOutBitStream: outStream is msbOutBitStream.value; - var msbInBitStream: inStream is msbInBitStream.value; + var file: aFile is STD_NULL; + var integer: bitPos is 0; + var msbBitStream: aBitStream is msbBitStream.value; begin - writeAscii(outStream, "Hello, Rosetta Code!"); - finishWriteAscii(outStream); - inStream := openMsbInBitStream(getBytes(outStream)); - writeln(literal(readAscii(inStream))); + aFile := openStriFile; + initWriteAscii(aFile, bitPos); + writeAscii(aFile, bitPos, "Hello, Rosetta Code!"); + finishWriteAscii(aFile, bitPos); + seek(aFile, 1); + aBitStream := openMsbBitStream(aFile); + writeln(literal(readAscii(aBitStream))); end func; diff --git a/Task/Bitwise-operations/ALGOL-68/bitwise-operations-1.alg b/Task/Bitwise-operations/ALGOL-68/bitwise-operations-1.alg index ea11b79d5f..7fdf9b8d88 100644 --- a/Task/Bitwise-operations/ALGOL-68/bitwise-operations-1.alg +++ b/Task/Bitwise-operations/ALGOL-68/bitwise-operations-1.alg @@ -1,13 +1,8 @@ -BEGIN - - BITS all bits mask = NOT 16r0; - LONG BITS long bits mask = LENG all bits mask; +main:( PRIO SLC = 8, SRC = 8; # SLC and SRC are not built in, define and overload them here # OP SLC = (BITS b, INT rotate) BITS: b SHL rotate OR b SHR ( bits width - rotate ); - OP SRC = (BITS b, INT rotate) BITS: b SHR rotate OR SHORTEN ( long bits mask - AND ( LENG b SHL ( bits width - rotate ) ) - ); + OP SRC = (BITS b, INT rotate) BITS: b SHR rotate OR b SHL ( bits width - rotate ); # SRC and SRL are non-standard, but versions are built in to ALGOL 68R's standard prelude # PRIO XOR = 2; @@ -15,10 +10,7 @@ BEGIN # XOR is non-standard, but a version is built in to ALGOL 68G's standard prelude # # ALGOL 68 has 5 different ways of representing a BINary BITS - Bases: 2, 4, 8, 16 and flip/flop # - FORMAT b5 = IF bits width > 32 - THEN $"2r"2r64d," 4r"4r32d,l" 8r"8r22d," 16r"16r16d,l" "gl$ - ELSE $"2r"2r32d," 4r"4r16d," 8r"8r11d," 16r"16r8d,l" "gl$ - FI; + FORMAT b5 = $"2r"2r32d," 4r"4r16d," 8r"8r11d," 16r"16r8d," "gl$; OP BBBBB = (BITS b)[]BITS: (b,b,b,b,b); PROC bitwise = (BITS a, BITS b, INT shift)VOID: @@ -69,4 +61,4 @@ CO bitwise(8r377,8r252,5); bitwise(16rff,16raa,5) END CO -END +) diff --git a/Task/Bitwise-operations/Ada/bitwise-operations.adb b/Task/Bitwise-operations/Ada/bitwise-operations.ada similarity index 100% rename from Task/Bitwise-operations/Ada/bitwise-operations.adb rename to Task/Bitwise-operations/Ada/bitwise-operations.ada diff --git a/Task/Bitwise-operations/AutoIt/bitwise-operations.au3 b/Task/Bitwise-operations/AutoIt/bitwise-operations.autoit similarity index 100% rename from Task/Bitwise-operations/AutoIt/bitwise-operations.au3 rename to Task/Bitwise-operations/AutoIt/bitwise-operations.autoit diff --git a/Task/Bitwise-operations/COBOL/bitwise-operations-1.cob b/Task/Bitwise-operations/COBOL/bitwise-operations-1.cobol similarity index 100% rename from Task/Bitwise-operations/COBOL/bitwise-operations-1.cob rename to Task/Bitwise-operations/COBOL/bitwise-operations-1.cobol diff --git a/Task/Bitwise-operations/COBOL/bitwise-operations-2.cob b/Task/Bitwise-operations/COBOL/bitwise-operations-2.cobol similarity index 100% rename from Task/Bitwise-operations/COBOL/bitwise-operations-2.cob rename to Task/Bitwise-operations/COBOL/bitwise-operations-2.cobol diff --git a/Task/Bitwise-operations/Crystal/bitwise-operations.cr b/Task/Bitwise-operations/Crystal/bitwise-operations.cr deleted file mode 100644 index 3fa0470d8a..0000000000 --- a/Task/Bitwise-operations/Crystal/bitwise-operations.cr +++ /dev/null @@ -1,9 +0,0 @@ -def operations (x, y) - p! x, y, - x & y, x | y, x ^ y, - ~x, - x << y, x >> y, - x.rotate_left(y), x.rotate_right(y) -end - -operations 10, 2 diff --git a/Task/Bitwise-operations/Delphi/bitwise-operations.pas b/Task/Bitwise-operations/Delphi/bitwise-operations.delphi similarity index 100% rename from Task/Bitwise-operations/Delphi/bitwise-operations.pas rename to Task/Bitwise-operations/Delphi/bitwise-operations.delphi diff --git a/Task/Bitwise-operations/DuckDB/bitwise-operations-1.duckdb b/Task/Bitwise-operations/DuckDB/bitwise-operations-1.duckdb deleted file mode 100644 index d81bf307e5..0000000000 --- a/Task/Bitwise-operations/DuckDB/bitwise-operations-1.duckdb +++ /dev/null @@ -1,5 +0,0 @@ -create or replace function task(a,b) as table ( - select a, b, a&b, a|b, xor(a, b), ~a, a << b, a >> b -); - -from task(10, 2); diff --git a/Task/Bitwise-operations/DuckDB/bitwise-operations-2.duckdb b/Task/Bitwise-operations/DuckDB/bitwise-operations-2.duckdb deleted file mode 100644 index 2e48fb4dd1..0000000000 --- a/Task/Bitwise-operations/DuckDB/bitwise-operations-2.duckdb +++ /dev/null @@ -1,5 +0,0 @@ -select 10 as v, - ~(v::BITSTRING), - ~(v::INT) as "~INT", - ~(v::BIGINT) as "~BIGINT", - ~(10::UINTEGER) as "~UINTEGER"; diff --git a/Task/Bitwise-operations/EasyLang/bitwise-operations.easy b/Task/Bitwise-operations/EasyLang/bitwise-operations.easy index 800e7fa354..433a6625bb 100644 --- a/Task/Bitwise-operations/EasyLang/bitwise-operations.easy +++ b/Task/Bitwise-operations/EasyLang/bitwise-operations.easy @@ -1,10 +1,9 @@ -# numbers are doubles, bit operations are unsigned, truncate -# the fractional part and use 53 integer bits -a = 14 -b = 3 -print bitand a b -print bitor a b -print bitxor a b -print bitshift a b -print bitshift a -b -print bitand a bitnot b +# numbers are doubles, bit operations use 32 bits and are unsigned +x = 11 +y = 2 +print bitnot x +print bitand x y +print bitor x y +print bitxor x y +print bitshift x y +print bitshift x -y diff --git a/Task/Bitwise-operations/Elena/bitwise-operations.elena b/Task/Bitwise-operations/Elena/bitwise-operations.elena index d176f667cd..941e955022 100644 --- a/Task/Bitwise-operations/Elena/bitwise-operations.elena +++ b/Task/Bitwise-operations/Elena/bitwise-operations.elena @@ -2,18 +2,18 @@ import extensions; extension testOp { - bitwiseTest(y) - { - Console.printLine(self," and ",y," = ",self.band(y)); - Console.printLine(self," or ",y," = ",self.bor(y)); - Console.printLine(self," xor ",y," = ",self.bxor(y)); - Console.printLine("not ",self," = ",self.BInverted); - Console.printLine(self," shr ",y," = ",self.shiftRight(y)); - Console.printLine(self," shl ",y," = ",self.shiftLeft(y)); - } + bitwiseTest(y) + { + console.printLine(self," and ",y," = ",self & y); + console.printLine(self," or ",y," = ",self | y); + console.printLine(self," xor ",y," = ",self ^ y); + console.printLine("not ",self," = ",self.BInverted); + console.printLine(self," shr ",y," = ",self.shiftRight(y)); + console.printLine(self," shl ",y," = ",self.shiftLeft(y)); + } } -public Program() +public program() { - Console.loadLineTo(new Integer()).bitwiseTest(Console.loadLineTo(new Integer())) + console.loadLineTo(new Integer()).bitwiseTest(console.loadLineTo(new Integer())) } diff --git a/Task/Bitwise-operations/Elixir/bitwise-operations.ex b/Task/Bitwise-operations/Elixir/bitwise-operations.elixir similarity index 100% rename from Task/Bitwise-operations/Elixir/bitwise-operations.ex rename to Task/Bitwise-operations/Elixir/bitwise-operations.elixir diff --git a/Task/Bitwise-operations/Icon/bitwise-operations.icon b/Task/Bitwise-operations/Icon/bitwise-operations.icon index 92610583bb..4bcace1afa 100644 --- a/Task/Bitwise-operations/Icon/bitwise-operations.icon +++ b/Task/Bitwise-operations/Icon/bitwise-operations.icon @@ -1,5 +1,3 @@ -link bitint # for int2bit - procedure main() bitdemo(255,2) bitdemo(-15,3) diff --git a/Task/Bitwise-operations/Jq/bitwise-operations.jq b/Task/Bitwise-operations/Jq/bitwise-operations.jq deleted file mode 100644 index 4724c12f65..0000000000 --- a/Task/Bitwise-operations/Jq/bitwise-operations.jq +++ /dev/null @@ -1,32 +0,0 @@ -include "bitwise" {search: "."}; # adjust as required - -def leftshift($n; $width): - [(range(0,$n)| 0), limit($width - $n; bitwise)][:$width] | to_int; - -# Using a width of $width bits: x << n | x >> ($width-n) -def rotateLeft($x; $n; $width): - $x | bitwise_or(leftshift($n; $width); rightshift($width-$n)); - -# Using a width of $width bits: x << n | x >> ($width-n) -def rotateRight($x; $n; $width): - $x | bitwise_or(rightshift($n); leftshift($width-$n; $width) ); - -def task($x; $y): - def isInteger: type == "number" and . == round; - if ($x|isInteger|not) or ($y|isInteger|not) or - $x < 0 or $y < 0 or $x > 4294967295 or $y > 4294967295 - then "Operands must be in the range of a 32-bit unsigned integer" | error - else - " x = \($x)", - " y = \($y)", - " x & y = \(bitwise_and($x; $y))", - " x | y = \(bitwise_or($x; $y))", - " x ^ y = \(null | xor(x; $y))", - "~x = \(32 | flip($x))", - " x << y = \($x | leftshift($y))", - " x >> y = \($x | rightshift($y))", - " x rl y = \(rotateLeft($x; $y; 32))", - " x rr y = \(rotateRight($x; $y; 32))" - end; - -task(10; 2) diff --git a/Task/Bitwise-operations/Julia/bitwise-operations.jl b/Task/Bitwise-operations/Julia/bitwise-operations.julia similarity index 100% rename from Task/Bitwise-operations/Julia/bitwise-operations.jl rename to Task/Bitwise-operations/Julia/bitwise-operations.julia diff --git a/Task/Bitwise-operations/Kotlin/bitwise-operations.kts b/Task/Bitwise-operations/Kotlin/bitwise-operations.kotlin similarity index 100% rename from Task/Bitwise-operations/Kotlin/bitwise-operations.kts rename to Task/Bitwise-operations/Kotlin/bitwise-operations.kotlin diff --git a/Task/Bitwise-operations/M2000-Interpreter/bitwise-operations.m2000 b/Task/Bitwise-operations/M2000-Interpreter/bitwise-operations.m2000 deleted file mode 100644 index 7185314544..0000000000 --- a/Task/Bitwise-operations/M2000-Interpreter/bitwise-operations.m2000 +++ /dev/null @@ -1,43 +0,0 @@ -module binary_ops{ - select case random(1, 6) - case 1 - Double x=10, y=2 - case 2 - Decimal x=10, y=2 - case 3 - Integer x=10, y=2 - case 4 - Long x=10, y=2 - case 5 ' byte from 0 to 255 (unsigned) - Byte x=10, y=2 - case else - Long Long x=10, y=2 - end select - print type$(x) - //x & y values from 0 to 4294967295 - print binary.not(x)=4294967285, sint(binary.not(x))=-11 - print binary.and(x, y)=2 - print binary.or(x, y)=10 - // y values -31 to 31 - print binary.xor(x, y)=8 - print binary.shift(x, y)=40 - print binary.shift(x, -y)=2 - print binary.rotate(x, y)=40 - print binary.rotate(x, -y)=2147483650, sint(binary.rotate(x, -y))=-2147483646 - // Binary.Neg return Unsigned from signed values: -2147483648 (0x8000_0000&) to 2147483647 (0x7FFF_FFFF&) - // values>2147483647 return 2147483648 - // values <-2147483648 return 2147483647 - // 0xFFFF_ABCD& (signed value), 0xFFFF_ABCD unsinged value same bits - print 0xFFFF_ABCD&=-21555, 0xFFFF_ABCD=4294945741, sint(0xFFFF_ABCD)=-21555 - print Binary.Neg(0xFFFF_ABCD&)=21554, Binary.Not(0xFFFF_ABCD)=21554 - print sint(Binary.Neg(0xFFFF_ABCD&)+ uint(0xFFFF_ABCD&))=sint(Binary.Neg(0)) - // signed 0xFFFF_ABCD& has same bits as unsigned 0xFFFF_ABCD, - // but have different value as used in calculations - print Binary.Neg(0xFFFF_ABCD&)=Binary.Not(0xFFFF_ABCD), 0xFFFF_ABCD&<>0xFFFF_ABCD - print Binary.Neg(0x0FFF_ABCD&)=Binary.Not(0x0FFF_ABCD), 0xFFFF_ABCD&<>0xFFFF_ABCD - // Add (modulo 32), x unsigned and add a negate signed (converted to unsigned) - print binary.add(x, binary.neg(y), 1)=8 ' 10 - 2 =12 - print binary.add(x, binary.neg(-y), 1)=12 ' 10 - - 2 = 12 - print sint(binary.neg(x))=-11, binary.neg(x)=binary.not(x) -} -binary_ops diff --git a/Task/Bitwise-operations/Nim/bitwise-operations.nim b/Task/Bitwise-operations/Nim/bitwise-operations.nim index d831e18c5f..6932b12574 100644 --- a/Task/Bitwise-operations/Nim/bitwise-operations.nim +++ b/Task/Bitwise-operations/Nim/bitwise-operations.nim @@ -1,4 +1,4 @@ -proc bitwise[T: SomeInteger](a, b: T) = +proc bitwise(a, b) = echo "a and b: " , a and b echo "a or b: ", a or b echo "a xor b: ", a xor b diff --git a/Task/Bitwise-operations/OCaml/bitwise-operations.ml b/Task/Bitwise-operations/OCaml/bitwise-operations.ocaml similarity index 100% rename from Task/Bitwise-operations/OCaml/bitwise-operations.ml rename to Task/Bitwise-operations/OCaml/bitwise-operations.ocaml diff --git a/Task/Bitwise-operations/PascalABC.NET/bitwise-operations.pas b/Task/Bitwise-operations/PascalABC.NET/bitwise-operations.pas deleted file mode 100644 index b1805c5213..0000000000 --- a/Task/Bitwise-operations/PascalABC.NET/bitwise-operations.pas +++ /dev/null @@ -1,9 +0,0 @@ -begin - var (a,b) := ReadInteger2; - Println($'not {a} = {not a}'); - Println($'{a} and {b} = {a and b}'); - Println($'{a} or {b} = {a or b}'); - Println($'{a} xor {b} = {a xor b}'); - Println($'{a} shl {b} = {a shl b}'); - Println($'{a} shr {b} = {a shr b}'); -end. diff --git a/Task/Bitwise-operations/Pluto/bitwise-operations.pluto b/Task/Bitwise-operations/Pluto/bitwise-operations.pluto deleted file mode 100644 index a42f1b211c..0000000000 --- a/Task/Bitwise-operations/Pluto/bitwise-operations.pluto +++ /dev/null @@ -1,20 +0,0 @@ --- Rotate left and right are not built-in but we use the --- same 32-bit substitutes as in the Lua 5.3+ example. -local function rl(x, y) return ((x << y) & 0xffffffff) | (x >> (32 - y)) end - -local function rr(x, y) return (x >> y) | ((x << (32 - y)) & 0xffffffff) end - -local function bitwise(x, y) - print($" x = {x}") - print($" y = {y}") - print($" x & y = {x & y}") - print($" x | y = {x | y}") - print($" x ~ y = {x ~ y}") - print($"~x = {~x}") - print($" x << y = {x << y}") - print($" x >> y = {x >> y}") - print($" x rl y = {rl(x, y)}") - print($" x rr y = {rr(x, y)}") -end - -bitwise(10, 2) diff --git a/Task/Bitwise-operations/PowerShell/bitwise-operations-1.ps1 b/Task/Bitwise-operations/PowerShell/bitwise-operations-1.psh similarity index 100% rename from Task/Bitwise-operations/PowerShell/bitwise-operations-1.ps1 rename to Task/Bitwise-operations/PowerShell/bitwise-operations-1.psh diff --git a/Task/Bitwise-operations/PowerShell/bitwise-operations-2.ps1 b/Task/Bitwise-operations/PowerShell/bitwise-operations-2.psh similarity index 100% rename from Task/Bitwise-operations/PowerShell/bitwise-operations-2.ps1 rename to Task/Bitwise-operations/PowerShell/bitwise-operations-2.psh diff --git a/Task/Bitwise-operations/RISC-V-Assembly/bitwise-operations.asm b/Task/Bitwise-operations/RISC-V-Assembly/bitwise-operations.asm deleted file mode 100644 index a3766dfca1..0000000000 --- a/Task/Bitwise-operations/RISC-V-Assembly/bitwise-operations.asm +++ /dev/null @@ -1,295 +0,0 @@ - # riscv assembly raspberry pico2 rp2350 -# program bitwise.s -# connexion putty com3 -/*********************************************/ -/* CONSTANTES */ -/********************************************/ -/* for this file see risc-v task include a file */ -.include "../../constantesRiscv.inc" - -/*******************************************/ -/* INITIALED DATAS */ -/*******************************************/ -.data -szMessStart: .asciz "Program riscv start.\r\n" -szCariageReturn: .asciz "\r\n" -szMessReg0: .asciz "Register s0:\r\n" -szMessReg1: .asciz "Register s1:\r\n" -szMessAnd: .asciz "And result:\r\n" -szMessOr: .asciz "Or result :\r\n" -szMessXor: .asciz "Xor result :\r\n" -szMessNot: .asciz "Not result :\r\n" -szMessNeg: .asciz "Neg result :\r\n" -szMessBset: .asciz "Set single bit result :\r\n" -szMessSll: .asciz "Shift left result :\r\n" -szMessSrl: .asciz "Shift right result :\r\n" -szMessSra: .asciz "Shift right arithmetic result :\r\n" -szMessRol: .asciz "Rotation left result :\r\n" -szMessRor: .asciz "Rotation right result :\r\n" -szMessBclr: .asciz "Clear single bit result :\r\n" -szMessBext: .asciz "Extraction single bit result :\r\n" -szMessBinv: .asciz "Inversion single bit result :\r\n" -szMessBrev: .asciz "Bit-reverse within each byte result :\r\n" -szMessClz: .asciz "Count leading zeroes result :\r\n" -szMessCtz: .asciz "Count trailing zeroes result :\r\n" -szMessCpop: .asciz "Population count result :\r\n" -szMessPack: .asciz "Pack two halfwords into one word result :\r\n" -szMessPackh: .asciz "Pack two byte into one halfword result :\r\n" -szMessZip: .asciz "Zip result :\r\n" -szMessUnzip: .asciz "Unzip result :\r\n" -.align 2 - -/*******************************************/ -/* UNINITIALED DATA */ -/*******************************************/ -.bss -.align 2 -sConvArea: .skip 24 -sConvBinaire: .skip 36 -/**********************************************/ -/* SECTION CODE */ -/**********************************************/ -.text -.global main - -main: - call stdio_init_all # général init -1: # start loop connexion - li a0,0 # raz argument register - call tud_cdc_n_connected # waiting for USB connection - beqz a0,1b # return code = zero ? - - la a0,szMessStart # message address - call writeString # display message - - la a0,szMessReg0 # message address - call writeString # display message - li s0,0b1100 - mv a0,s0 - call displayResult - - la a0,szMessReg1 # message address - call writeString # display message - li s1,0b1001 - mv a0,s1 - call displayResult - - la a0,szMessAnd # and - call writeString # display message - andi a0,s0,0b1001 # and immediat value - call displayResult - and a0,s0,s1 # register and - call displayResult - andn a0,s0,s1 # register and and not - call displayResult - - la a0,szMessOr # or - call writeString # display message - ori a0,s0,0b1001 # or immediat value - call displayResult - or a0,s0,s1 # or register - call displayResult - orn a0,s0,s1 # or and not register - call displayResult - orc.b a0,s0 # OR-combine of bits within each byte. Generates a mask of nonzero bytes - call displayResult - - - la a0,szMessXor # xor - call writeString # display message - xori a0,s0,0b1001 # xor immediat value - call displayResult - xor a0,s0,s1 # xor register - call displayResult - xnor a0,s0,s1 # Bitwise XOR with inverted operand. Equivalently, bitwise NOT of bitwise XOR - call displayResult - - la a0,szMessNot # not - call writeString # display message - not a0,s0 # not - call displayResult - - la a0,szMessNeg # negation - call writeString # display message - neg a0,s0 # negation - call displayResult - - la a0,szMessSll # shift left - call writeString # display message - slli a0,s0,11 # shift left immediat value - call displayResult - li t0,5 - sll a0,s0,t0 # shift left register - call displayResult - - la a0,szMessSrl # shift right - call writeString # display message - srli a0,s0,1 # shift right immediat value - call displayResult - li t0,5 - srl a0,s0,t0 # shift right register - call displayResult - - la a0,szMessSra # Shift right, arithmetic - call writeString # display message - srai a0,s0,1 # shift right arithmetic immediat value - call displayResult - li t0,5 - li t1,0b10000000000000001100000000000000 - sra a0,t1,t0 # shift right arithmetic register - call displayResult - - la a0,szMessRol # rotation left - call writeString # display message - li t0,5 - rol a0,s0,t0 # rotation left register - call displayResult - - la a0,szMessRor # rotation right - call writeString # display message - rori a0,s0,10 # rotation right immediat value - call displayResult - li t0,5 - ror a0,s0,t0 # rotation right register - call displayResult - - la a0,szMessBclr # Clear single bit. - call writeString # display message - bclri a0,s0,3 # Clear single bit. immediat value - call displayResult - li t0,2 - bclr a0,s0,t0 # Clear single bit. register - call displayResult - - la a0,szMessBext # Extraction single bit. - call writeString # display message - bexti a0,s0,3 # Extraction single bit. immediat value - call displayResult - li t0,2 - bext a0,s0,t0 # Extraction single bit. register - call displayResult - - la a0,szMessBinv # Inversion single bit. - call writeString # display message - binvi a0,s0,3 # Inversion bit. immediat value - call displayResult - li t0,2 - binv a0,s0,t0 # Inversion single bit. register - call displayResult - - la a0,szMessBset # Set single bit - call writeString # display message - bseti a0,s0,8 # Set single bit (immediate). - call displayResult - li t0,17 - bset a0,s0,t0 # Set single bit - call displayResult - - la a0,szMessClz # Count leading zeroes (starting from MSB, searching LSB-ward). - call writeString # display message - clz a0,s0 # - call displayResultD - - la a0,szMessCtz # Count trailing zeroes (starting from LSB, searching MSB-ward). - call writeString # display message - ctz a0,s0 # - call displayResultD - - la a0,szMessCpop # Population count - call writeString # display message - cpop a0,s0 # - call displayResultD - - la a0,szMessBrev # Bit-reverse within each byte - call writeString # display message - brev8 a0,s0 # - call displayResult - - la a0,szMessPack # Pack two halfwords into one word - call writeString # display message - li t0,0x1234 - li t1,0x5678 - pack a0,t1,t0 # - call displayResultHex - - la a0,szMessPackh # Pack two halfwords into one word - call writeString # display message - li t0,0x12 - li t1,0x34 - packh a0,t1,t0 # - call displayResultHex - - la a0,szMessZip # Interleave upper/lower half of register into odd/even bits of result - call writeString # display message - zip s2,s0 - mv a0,s2 # - call displayResult - - la a0,szMessUnzip # Deinterleave odd/even bits of register into upper/lower half of result - call writeString # display message - unzip a0,s2 # - call displayResult - call getchar -100: # final loop - j 100b - -/**********************************************/ -/* display binary Result */ -/**********************************************/ -/* a0 value */ -.equ LGZONECONV, 20 -displayResult: - addi sp, sp, -4 # reserve stack - sw ra, 0(sp) - la a1,sConvBinaire # conversion result address - call conversion2 # binary conversion - la a0,sConvBinaire # message address - call writeString # display message - la a0,szCariageReturn - call writeString -100: - lw ra, 0(sp) - addi sp, sp, 4 - ret -/**********************************************/ -/* display Result décimal */ -/**********************************************/ -/* a0 value */ -.equ LGZONECONV, 20 -displayResultD: - addi sp, sp, -4 # reserve stack - sw ra, 0(sp) - la a1,sConvArea # conversion result address - call conversion10 # binary conversion - la a0,sConvArea # message address - call writeString # display message - la a0,szCariageReturn - call writeString -100: - lw ra, 0(sp) - addi sp, sp, 4 - ret -/**********************************************/ -/* display hexadecimal result */ -/**********************************************/ -/* a0 value */ -.equ LGZONECONV, 20 -displayResultHex: - addi sp, sp, -4 # reserve stack - sw ra, 0(sp) - la a1,sConvArea # conversion result address - call conversion16 # conversion decimal - la a0,sConvArea # message address - call writeString # display message - la a0,szCariageReturn - call writeString -100: - lw ra, 0(sp) - addi sp, sp, 4 - ret - -/************************************/ -/* file include Fonctions */ -/***********************************/ -/* for this file see risc-v task include a file */ -.include "../../includeFunctions.s" diff --git a/Task/Bitwise-operations/Raku/bitwise-operations.raku b/Task/Bitwise-operations/Raku/bitwise-operations.raku index 7cbeacac55..a7596faadb 100644 --- a/Task/Bitwise-operations/Raku/bitwise-operations.raku +++ b/Task/Bitwise-operations/Raku/bitwise-operations.raku @@ -9,8 +9,7 @@ sub int-bits (Int $a, Int $b) { say ''; say_bit "$a", $a; say ''; - say_bit "1's complement (not) $a", +^$a; - say_bit "2's complement $a", +^$a + 1; + say_bit "2's complement $a", +^$a; say_bit "$a and $b", $a +& $b; say_bit "$a or $b", $a +| $b; say_bit "$a xor $b", $a +^ $b; diff --git a/Task/Bitwise-operations/Rebol/bitwise-operations.rebol b/Task/Bitwise-operations/Rebol/bitwise-operations.rebol deleted file mode 100644 index 13a05d8bd0..0000000000 --- a/Task/Bitwise-operations/Rebol/bitwise-operations.rebol +++ /dev/null @@ -1,32 +0,0 @@ -Rebol [ - title: "Rosetta code: Bitwise operations" - file: %Bitwise_operations.r3 - url: https://rosettacode.org/wiki/Bitwise_operations - needs: 3.10.0 -] - -do-test: function [code][ - res: try code - case [ - error? res [res: join "error: " res/id] - integer? res [res: enbase to-binary res 2] - ] - printf [-21 " == "] reduce [form code res] -] -foreach test [ - [10] - [2] - [10 AND 2] - [10 & 2] - [10 OR 2] - [10 | 2] - [10 XOR 2] - [10 >> 2] - [10 << 2] - [-65432] - [complement -65432] - [255] - [shift 255 -2] - [shift 255 56] - [shift/logical 255 56] -][ do-test test ] diff --git a/Task/Bitwise-operations/Rust/bitwise-operations.rs b/Task/Bitwise-operations/Rust/bitwise-operations.rust similarity index 100% rename from Task/Bitwise-operations/Rust/bitwise-operations.rs rename to Task/Bitwise-operations/Rust/bitwise-operations.rust diff --git a/Task/Bitwise-operations/Scheme/bitwise-operations-1.scm b/Task/Bitwise-operations/Scheme/bitwise-operations-1.ss similarity index 100% rename from Task/Bitwise-operations/Scheme/bitwise-operations-1.scm rename to Task/Bitwise-operations/Scheme/bitwise-operations-1.ss diff --git a/Task/Bitwise-operations/Scheme/bitwise-operations-2.scm b/Task/Bitwise-operations/Scheme/bitwise-operations-2.ss similarity index 100% rename from Task/Bitwise-operations/Scheme/bitwise-operations-2.scm rename to Task/Bitwise-operations/Scheme/bitwise-operations-2.ss diff --git a/Task/Bitwise-operations/Uiua/bitwise-operations.uiua b/Task/Bitwise-operations/Uiua/bitwise-operations.uiua deleted file mode 100644 index 3b42c9fbd9..0000000000 --- a/Task/Bitwise-operations/Uiua/bitwise-operations.uiua +++ /dev/null @@ -1,9 +0,0 @@ -a ← 10 -b ← 2 -# Experimental! -¬a # bitwise NOT -°⋯ /× ⋯ ⊟ a b # bitwise AND -°⋯ /∨ ⋯ ⊟ a b # bitwise OR -°⋯ /≠ ⋯ ⊟ a b # bitwise XOR -* a ⁿ:2 b # SHL -⌊÷: a ⁿ:2 b # ASR diff --git a/Task/Bitwise-operations/Uxntal/bitwise-operations.uxnatl b/Task/Bitwise-operations/Uxntal/bitwise-operations.uxnatl index 695abf3123..9e4335844f 100644 --- a/Task/Bitwise-operations/Uxntal/bitwise-operations.uxnatl +++ b/Task/Bitwise-operations/Uxntal/bitwise-operations.uxnatl @@ -1,73 +1,67 @@ -%\n { 0a } %\s { 20 } %\0 { 00 } -%newline { [ LIT2 \n -Console/write ] DEO } - -%not { #ff EOR } -%and { AND } -%or { ORA } -%xor { EOR } -%shl { #40 SFT SFT } -%shr { SFT } -%rol { #40 SFT #00 ROT ROT SFT2 ORA } -%ror { SWP #00 ROT SFT2 ORA } - -|18 @Console/write - -|100 - -#0a02 -DUP2 SWP ;msgs/a print/arg ;msgs/b print/arg -bitwise +|00 @System [ &vector $2 &wst $1 &rst $1 &eaddr $2 &ecode $1 &pad $1 &r $2 &g $2 &b $2 &debug $1 &halt $1 ] +|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ] +( program ) +|0100 @on-reset ( -> ) + #0a02 + DUP2 SWP ;Labels/a ;Labels/b + bitwise + halt BRK @bitwise ( a b -- ) - ;msgs/not print/str ;msgs/a print/str - ;msgs/equ print/str OVR not print/result - ;msgs/and print/label DUP2 and print/result - ;msgs/or print/label DUP2 or print/result - ;msgs/xor print/label DUP2 xor print/result - ;msgs/shl print/label DUP2 shl print/result - ;msgs/shr print/label DUP2 shr print/result - ;msgs/rol print/label DUP2 rol print/result - ;msgs/ror print/label ror !print/result + ;Labels/not ;Labels/a ;Labels/equ DUP2 [ POP #ff EOR ] + ;Labels/and DUP2 [ AND ] + ;Labels/or DUP2 [ ORA ] + ;Labels/xor DUP2 [ EOR ] + ;Labels/shl DUP2 [ #40 SFT SFT ] + ;Labels/shr DUP2 [ SFT ] + ;Labels/rol DUP2 [ #40 SFT #00 ROT ROT SFT2 ORA ] + ;Labels/ror [ SWP #00 ROT SFT2 ORA ] + JMP2r -@print/label ( label* -- ) - ;msgs/a /str - /str - ;msgs/b /str - ;msgs/equ !/str +@halt ( -- ) + #01 .System/halt DEO + BRK -@print/byte ( byte -- ) +@ ( a name* -- ) + ;Labels/equ + JMP2r + +@ ( a -- ) + ;Labels/newline + JMP2r + +@ ( label* -- ) + ;Labels/a + + ;Labels/b + ;Labels/equ + JMP2r + +@ ( byte -- ) [ LIT "$ ] .Console/write DEO - DUP #04 SFT /nibble - ( >> ) - -@print/nibble ( -- ) - #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD .Console/write DEO - JMP2r + DUP #04 SFT /l + &l ( -- ) + #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD .Console/write DEO + JMP2r -@print/arg ( a name* -- ) - /str ;msgs/equ /str - ( >> ) - -@print/result ( a -- ) - /byte newline - JMP2r - -@print/str ( str* -- ) - LDAk .Console/write DEO - INC2 LDAk ?/str +@ ( str* -- ) + &while ( -- ) + LDAk .Console/write DEO + INC2 LDAk ?&while POP2 JMP2r -@msgs [ - &a "a \s \0 - &b "b \s \0 - &equ "= \s \0 - ¬ "NOT \s \0 - &and "AND \s \0 - &or "OR \s \0 - &xor "XOR \s \0 - &shl "SHL \s \0 - &shr "SHR \s \0 - &rol "ROL \s \0 - &ror "ROR \s \0 ] +@Labels + &a "a 20 $1 + &b "b 20 $1 + &equ "= 20 $1 + &newline 0a $1 + ¬ "NOT 20 $1 + &and "AND 20 $1 + &or "OR 20 $1 + &xor "XOR 20 $1 + &shl "SHL 20 $1 + &shr "SHR 20 $1 + &rol "ROL 20 $1 + &ror "ROR 20 $1 diff --git a/Task/Bitwise-operations/V-(Vlang)/bitwise-operations.v b/Task/Bitwise-operations/V-(Vlang)/bitwise-operations.v deleted file mode 100644 index 9f8b2187cb..0000000000 --- a/Task/Bitwise-operations/V-(Vlang)/bitwise-operations.v +++ /dev/null @@ -1,9 +0,0 @@ -fn bitwise(a int, b int) { - println("a AND b: ${a & b}") - println("a OR b: ${a | b}") - println("a XOR b: ${a ^ b}") - println("NOT a: ${~a}") - println("a SHL b: ${a << b}") // left shift - println("a SHR b: ${a >> b}") // right shift - println("a USHR b: ${a >>> b}") // unsigned right shift -} diff --git a/Task/Blum-integer/AWK/blum-integer.awk b/Task/Blum-integer/AWK/blum-integer.awk deleted file mode 100644 index a50028c636..0000000000 --- a/Task/Blum-integer/AWK/blum-integer.awk +++ /dev/null @@ -1,53 +0,0 @@ -# syntax: GAWK -f BLUM_INTEGER.AWK -# converted from FutureBasic -# -# sorting: -# PROCINFO["sorted_in"] is used by GAWK -# SORTTYPE is used by Thompson Automation's TAWK -# -BEGIN { - n = 3 - prime2 = 0 - print("The first 50 Blum integers:") - while (1) { - if (is_semiprime(n)) { - if (prime1 % 4 == 3) { - prime2 = n / prime1 - if ((prime2 != prime1) && (prime2 % 4 == 3)) { - arr[substr(n,length(n),1)]++ - total++ - if (++count <= 50) { - printf("%4d%s",n,count%10?"":"\n") - } - if (count ~ /^(26828|[1-4]00000)$/) { - printf("\nThe %6dth Blum integer: %7d",count,n) - if (count >= 400000) { - break - } - } - } - } - } - n += 2 - } - PROCINFO["sorted_in"] = "@ind_num_asc" ; SORTTYPE = 1 - printf("\n\nFor Blum integers up to %d:\n",count) - for (i in arr) { - printf("%7.3f%% end in %d\n",arr[i]/total*100,i) - } - exit(0) -} -function is_semiprime(n, c,d) { - c = 0 - d = 3 - while (d * d <= n) { - while (n % d == 0) { - if (c == 2) { return(0) } - n /= d - c++ - } - d += 2 - } - prime1 = n - return(c == 1) -} diff --git a/Task/Blum-integer/Ada/blum-integer.adb b/Task/Blum-integer/Ada/blum-integer.adb deleted file mode 100644 index 5c8e2c59ca..0000000000 --- a/Task/Blum-integer/Ada/blum-integer.adb +++ /dev/null @@ -1,89 +0,0 @@ -with Ada.Text_IO; use Ada.Text_IO; -with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; -with Ada.Float_Text_IO; use Ada.Float_Text_IO; - -procedure Blum is - - Inc : Constant array (1 .. 8) of Integer := (4, 2, 4, 2, 4, 6, 2, 6); - - function Is_Prime (N : Integer) return Boolean is - D : Integer := 5; - begin - if N < 2 then return False; end if; - if N mod 2 = 0 then return N = 2; end if; - if N mod 3 = 0 then return N = 3; end if; - - while D * D <= N loop - if N mod D = 0 then return False; end if; - D := D + 2; - if N mod D = 0 then return False; end if; - D := D + 4; - end loop; - - return True; - end Is_Prime; - - function First_Prime_Factor (N : Integer) return Integer is - D : Integer := 7; - I : Integer := 1; - begin - if N = 1 then return 1; end if; - if N mod 3 = 0 then return 3; end if; - if N mod 5 = 0 then return 5; end if; - - while D * D <= N loop - if N mod D = 0 then - return D; - end if; - D := D + Inc(I); - I := (I mod 8) + 1; - end loop; - - return N; - end First_Prime_Factor; - - I, Blum_Count : Integer := 1; - J, P, Q : Integer; - Blums : Array (1 .. 50) of Integer; - Counts : Array (1 .. 4) of Integer := (others => 0); - Final_Digits : Array (1 .. 4) of Integer := (1, 3, 7, 9); - -begin - loop - P := First_Prime_Factor(I); - if P mod 4 = 3 then - Q := I / P; - if Q /= P and Q mod 4 = 3 and Is_Prime(Q) then - if Blum_Count < 51 then Blums(Blum_Count) := I; end if; - Counts(((I mod 10) / 3) + 1) := Counts(((I mod 10) / 3) + 1) + 1; - Blum_Count := Blum_Count + 1; - if Blum_Count = 51 then - Put("First 50 Blum Integers:"); New_Line; - for J in Integer range 1 .. 50 loop - Put(Item => Blums(J), Width => 3); Put(" "); - if J mod 10 = 0 then New_Line; end if; - end loop; - New_Line; - elsif Blum_Count = 26829 or Blum_Count mod 100000 = 1 then - Put("The "); Put(Item => Blum_Count, Width => 7); - Put("th Blum Integer is: "); Put(Item => I, Width => 9); - New_Line; - if Blum_Count = 400001 then - New_Line; Put("% Distribution of the First 400,000 Blum Integers:"); New_Line; - for J in Integer range 1 .. 4 loop - Put(" "); Put(Item => Float(Counts(J)) / 4000.0, Fore => 2, Aft => 3, Exp => 0); - Put("% end in "); Put(Item => Final_Digits(J), Width => 1); - New_Line; - end loop; - exit; - end if; - end if; - end if; - end if; - if I mod 5 = 3 then - I := I + 4; - else - I := I + 2; - end if; - end loop; -end Blum; diff --git a/Task/Blum-integer/Arturo/blum-integer.arturo b/Task/Blum-integer/Arturo/blum-integer.arturo deleted file mode 100644 index 2ca6df51a1..0000000000 --- a/Task/Blum-integer/Arturo/blum-integer.arturo +++ /dev/null @@ -1,17 +0,0 @@ -blum?: function [n][ - if any? @[n < 21, even? n, zero? n % 5] - -> return false - - f: factors.prime n - if or? [2 <> size f][f\0 = f\1] - -> return false - - every? f => [3 = & % 4] -] - -print "First 50 Blum numbers:" -1..∞ | select.first: 50 => blum? - | split.every: 10 - | loop => [print map & 'x -> pad to :string x 4] - -print ["\n26828th Blum number:" select.n:26828 1..∞ => blum?] diff --git a/Task/Blum-integer/C++/blum-integer.cpp b/Task/Blum-integer/C++/blum-integer.cpp index ffa52d38cd..6e85a93099 100644 --- a/Task/Blum-integer/C++/blum-integer.cpp +++ b/Task/Blum-integer/C++/blum-integer.cpp @@ -4,24 +4,24 @@ #include #include -bool is_prime_type_3(const uint32_t& number) { +bool is_prime_type_3(const int32_t number) { if ( number < 2 ) return false; if ( number % 2 == 0 ) return false; if ( number % 3 == 0 ) return number == 3; - for ( uint32_t divisor = 5; divisor * divisor <= number; divisor += 2 ) { + for ( int divisor = 5; divisor * divisor <= number; divisor += 2 ) { if ( number % divisor == 0 ) { return false; } } return number % 4 == 3; } -uint32_t least_prime_factor(const uint32_t& number) { +int32_t least_prime_factor(const int32_t number) { if ( number == 1 ) { return 1; } if ( number % 3 == 0 ) { return 3; } if ( number % 5 == 0 ) { return 5; } - for ( uint32_t divisor = 7; divisor * divisor <= number; divisor += 2 ) { + for ( int divisor = 7; divisor * divisor <= number; divisor += 2 ) { if ( number % divisor == 0 ) { return divisor; } } @@ -29,15 +29,15 @@ uint32_t least_prime_factor(const uint32_t& number) { } int main() { - uint32_t blums[50]; - uint32_t blum_count = 0; - uint32_t last_digit_counts[10] = {}; - uint32_t number = 1; + int32_t blums[50]; + int32_t blum_count = 0; + int32_t last_digit_counts[10] = {}; + int32_t number = 1; while ( blum_count < 400'000 ) { - const uint32_t prime = least_prime_factor(number); + const int32_t prime = least_prime_factor(number); if ( prime % 4 == 3 ) { - const uint32_t quotient = number / prime; + const int32_t quotient = number / prime; if ( quotient != prime && is_prime_type_3(quotient) ) { if ( blum_count < 50 ) { blums[blum_count] = number; @@ -46,7 +46,7 @@ int main() { blum_count += 1; if ( blum_count == 50 ) { std::cout << "The first 50 Blum integers:" << std::endl; - for ( uint32_t i = 0; i < 50; ++i ) { + for ( int32_t i = 0; i < 50; ++i ) { std::cout << std::setw(3) << blums[i] << ( ( i % 10 == 9 ) ? "\n" : " " ); } std::cout << std::endl; @@ -54,8 +54,7 @@ int main() { std::cout << "The " << std::setw(6) << blum_count << "th Blum integer is: " << std::setw(7) << number << std::endl; if ( blum_count == 400'000 ) { - std::cout << "\n" << "Percent distribution of the first 400000 Blum integers:" - << std::endl; + std::cout << "\nPercent distribution of the first 400000 Blum integers:" << std::endl; for ( const int32_t& i : { 1, 3, 7, 9 } ) { std::cout << " " << std::setw(6) << std::setprecision(5) << (double) last_digit_counts[i] / 4'000 << "% end in " << i << std::endl; diff --git a/Task/Blum-integer/Common-Lisp/blum-integer.lisp b/Task/Blum-integer/Common-Lisp/blum-integer.lisp deleted file mode 100644 index 6f3c559ebb..0000000000 --- a/Task/Blum-integer/Common-Lisp/blum-integer.lisp +++ /dev/null @@ -1,47 +0,0 @@ -(defun is-factor (x y) - (zerop (mod x y))) - -(defun is-congruent (num a n) - (= (mod num n) a)) - -(defun is-prime (n) - (cond ((< n 4) (or (= n 2) (= n 3))) - ((or (zerop (mod n 2)) (zerop (mod n 3))) nil) - (t (loop for i from 5 to (floor (sqrt n)) by 6 - never (or (is-factor n i) - (is-factor n (+ i 2))))))) - -(defun first-factor (n) - (loop for i from 2 to (floor (sqrt n)) - thereis (if (is-factor n i) i nil))) - -(defun is-blum (n) - (let ((factor (first-factor n))) - (and factor - (is-congruent factor 3 4) - (/= factor (/ n factor)) - (is-congruent (/ n factor) 3 4) - (is-prime factor) - (is-prime (/ n factor))))) - -(defun main () - (let ((n 0) - (i 1) - (blums '()) - (counts '())) - (dotimes (i 10) (push (cons i 0) counts)) - (loop while (<= n 400000) - do (setf i (+ i 2)) - (when (is-blum i) - (incf n) - (incf (cdr (assoc (mod i 10) counts))) - (when (<= n 50) - (push i blums) - (when (= n 50) - (format t "First 50 Blum integers:~%") - (format t "~{~5d~5d~5d~5d~5d~5d~5d~5d~5d~5d~%~}~%" (reverse blums)))) - (if (find n '(26828 100000 200000 300000 400000)) - (format t "The ~7:dth Blum integer is: ~9:d~%" n i)))) - (format t "~%% distribution of the first 400,000 Blum integers:~%") - (dolist (x '(1 3 7 9)) - (format t "~3$% end in ~a~%" (/ (cdr (assoc x counts)) 4000) x)))) diff --git a/Task/Blum-integer/EasyLang/blum-integer.easy b/Task/Blum-integer/EasyLang/blum-integer.easy index 603f83fb51..7b73286f92 100644 --- a/Task/Blum-integer/EasyLang/blum-integer.easy +++ b/Task/Blum-integer/EasyLang/blum-integer.easy @@ -2,27 +2,32 @@ fastfunc semiprim n . d = 3 while d * d <= n while n mod d = 0 - if c = 2 : return 0 + if c = 2 + return 0 + . n /= d c += 1 . d += 2 . - if c = 1 : return n - return 0 + if c = 1 + return n + . . print "The first 50 Blum integers:" n = 3 -numfmt 4 0 +numfmt 0 4 repeat prim1 = semiprim n - if prim1 <> 0 and prim1 mod 4 = 3 - prim2 = n div prim1 - if prim2 <> prim1 and prim2 mod 4 = 3 - c += 1 - if c <= 50 - write n - if c mod 10 = 0 : print "" + if prim1 <> 0 + if prim1 mod 4 = 3 + prim2 = n div prim1 + if prim2 <> prim1 and prim2 mod 4 = 3 + c += 1 + if c <= 50 + write n + if c mod 10 = 0 ; print "" ; . + . . . . diff --git a/Task/Blum-integer/Fortran/blum-integer.f b/Task/Blum-integer/Fortran/blum-integer.f deleted file mode 100644 index 1108cc2fbe..0000000000 --- a/Task/Blum-integer/Fortran/blum-integer.f +++ /dev/null @@ -1,158 +0,0 @@ -program BlumInteger - use, intrinsic :: iso_fortran_env, only: int32, int64 - implicit none - - integer(int32), parameter :: LIMIT = 10*1000*1000 - integer(int32), allocatable :: BlumPrimes(:) - integer(int32), allocatable :: BlumPrimes2(:) - logical :: BlumField(0:LIMIT) - integer(int32) :: EndDigit(0:9) - integer(int64) :: k - integer(int32) :: n, idx, j, P4n3Cnt,xx,yy - call system_clock(count=xx) - call Sieve4n_3_Primes(LIMIT, BlumPrimes2) -! allocate(blumprimes(0:size(BlumPrimes2)-1)) -! The blumprimes2 array is allocated in the subroutine as a zero based array -! but, the main program doesn't know that and assumes it's 1 based so we allocate -! a zero based array then use move_alloc to correctly resize it a transfer the data - allocate(blumprimes(0:1)) - call move_alloc(blumprimes2,blumprimes) - P4n3Cnt = size(BlumPrimes) -1 - print *, 'There are ', CommaUint(int(P4n3Cnt, int64)), ' needed primes 4*n+3 to Limit ', CommaUint(int(LIMIT, int64)) - P4n3Cnt = P4n3Cnt - 1 - print * - - ! Generate Blum-Integers - BlumField = .false. - do idx = 0, P4n3Cnt - n = BlumPrimes(idx) - do j = idx+1, P4n3Cnt - k = int(n, int64) * int(BlumPrimes(j), int64) - if (k > LIMIT) exit - BlumField(k) = .true. - end do - end do - call system_clock(count=yy) - print *, 'First 50 Blum-Integers ' - idx = 0 - j = 0 - do - do while (idx < LIMIT .and. .not. BlumField(idx)) - idx = idx + 1 - end do - if (idx == LIMIT) exit - if (mod(j, 10) == 0 .and. j /= 0) print * - write(*, '(I5)', advance='no') idx - j = j + 1 - idx = idx + 1 - if (j >= 50) exit - end do - print '(//)' - - print *, ' relative occurence of digit' - print *, ' n.th |BlumInteger|Digit: 1 3 7 9' - idx = 0 - j = 0 - n = 0 - k = 26828 - EndDigit = 0 - do - do while (idx < LIMIT .and. .not. BlumField(idx)) - idx = idx + 1 - end do - if (idx == LIMIT) exit - ! Count last decimal digit - EndDigit(mod(idx, 10)) = EndDigit(mod(idx, 10)) + 1 - j = j + 1 - if (j == k) then - write(*, '(A10,A1,A11,A1)', advance='no') CommaUint(int(j, int64)), '|', CommaUint(int(idx, int64)), '|' - write(*, '(F7.3,A4)', advance='no') real(EndDigit(1))/j*100, '% |' - write(*, '(F7.3,A4)', advance='no') real(EndDigit(3))/j*100, '% |' - write(*, '(F7.3,A4)', advance='no') real(EndDigit(7))/j*100, '% |' - write(*, '(F7.3,A2)') real(EndDigit(9))/j*100, '%' - if (k < 100000) then - k = 100000 - else - k = k + 100000 - end if - end if - idx = idx + 1 - if (j >= 400000) exit - end do - print '(/,a,f8.6,1x,a)', 'Elapsed time = ',(yy-xx)/1000.0,'seconds' -contains - - subroutine Sieve4n_3_Primes(Limit, P4n3) - use iso_fortran_env - integer(int32), intent(in) :: Limit - integer(int32), allocatable, intent(out) :: P4n3(:) - integer(kind=1), allocatable :: sieve(:) - integer(int32) :: BlPrCnt, idx, n, j, sieve_size - - sieve_size = (Limit / 3 - 3) / 4 + 1 - allocate(sieve(0:sieve_size-1)) - allocate(P4n3(0:sieve_size-1)) - - sieve = 0 - BlPrCnt = 0 - idx = 0 - do - if (sieve(idx) == 0) then - n = idx*4 + 3 - P4n3(BlPrCnt) = n - BlPrCnt = BlPrCnt + 1 - j = idx + n - if (j > ubound(sieve, 1)) exit - do while (j <= ubound(sieve, 1)) - sieve(j) = 1 - j = j + n - end do - end if - idx = idx + 1 - if (idx > ubound(sieve, 1)) exit - end do - ! Collect the rest - do idx = idx, ubound(sieve, 1) - if (sieve(idx) == 0) then - P4n3(BlPrCnt) = idx*4 + 3 - BlPrCnt = BlPrCnt + 1 - end if - end do - P4n3 = P4n3(0:BlPrCnt-1) - end subroutine Sieve4n_3_Primes - - function CommaUint(n) result(res) - integer, parameter :: sizer = 30 - integer(int64), intent(in) :: n - character(:), allocatable :: res - character(len=sizer) :: temp - integer :: fromIdx, toIdx, i - character :: pRes(sizer) - - write(temp, '(I0)') n - fromIdx = len_trim(temp) - toIdx = fromIdx - 1 - if (toIdx < 3) then - res = temp(1:fromIdx) - return - end if - allocate(res, mold=repeat(' ',sizer)) - toIdx = 4*(toIdx / 3) + mod(toIdx, 3) + 1 - pRes = ' ' - - do i = 1, fromIdx - pRes(toIdx) = temp(fromIdx-i+1:fromIdx-i+1) - toIdx = toIdx - 1 - if (mod(i, 3) == 0 .and. i /= fromIdx) then - pRes(toIdx) = ',' - toIdx = toIdx - 1 - end if - end do - do i = 1,sizer ! Go from character array to string - res(I:I) = pRes(i) - end do -! - res = trim(adjustl(Res)) - end function CommaUint - -end program BlumInteger diff --git a/Task/Blum-integer/FreeBASIC/blum-integer.basic b/Task/Blum-integer/FreeBASIC/blum-integer.basic index 4f8b7da16f..8b1bdd7df5 100644 --- a/Task/Blum-integer/FreeBASIC/blum-integer.basic +++ b/Task/Blum-integer/FreeBASIC/blum-integer.basic @@ -1,76 +1,39 @@ -#include "isprime.bas" +Dim Shared As Uinteger Prime1 +Dim As Uinteger n = 3, c = 0, Prime2 -Type PrimeHelper - inc(7) As Integer - idx As Integer -End Type - -Function initPrimeHelper() As PrimeHelper - Dim helper As PrimeHelper - helper.inc(0) = 4 : helper.inc(1) = 2 : helper.inc(2) = 4 - helper.inc(3) = 2 : helper.inc(4) = 4 : helper.inc(5) = 6 - helper.inc(6) = 2 : helper.inc(7) = 6 - helper.idx = 0 - Return helper -End Function - -Function firstPrimeFactor(n As Integer) As Integer - If n = 1 Then Return 1 - If n Mod 3 = 0 Then Return 3 - If n Mod 5 = 0 Then Return 5 - - Dim helper As PrimeHelper = initPrimeHelper() - Dim k As Integer = 7 - - While k * k <= n - If n Mod k = 0 Then Return k - k += helper.inc(helper.idx) - helper.idx = (helper.idx + 1) Mod 8 +Function isSemiprime(n As Uinteger) As Boolean + Dim As Uinteger d = 3, c = 0 + While d*d <= n + While n Mod d = 0 + If c = 2 Then Return False + n /= d + c += 1 + Wend + d += 2 Wend - - Return n + Prime1 = n + Return c = 1 End Function -Sub main() - Dim As Integer blum(49), counts(9) - Dim As Integer bc = 0, i = 1, p, q - Dim As Integer j - - Dim As Double t0 = Timer - Do - p = firstPrimeFactor(i) - If p Mod 4 = 3 Then - q = i \ p - If q <> p Andalso q Mod 4 = 3 Andalso isPrime(q) Then - If bc < 50 Then blum(bc) = i - counts(i Mod 10) += 1 - bc += 1 - - If bc = 50 Then - Print "First 50 Blum integers:" - For j = 0 To 49 - Print Using "####"; blum(j); - If (j + 1) Mod 10 = 0 Then Print - Next - Print - Elseif bc = 26828 Orelse bc Mod 100000 = 0 Then - Print Using "The ###,###th Blum integer is: #,###,###"; bc; i - - If bc = 400000 Then - Print !"\n% distribution of the first 400,000 Blum integers:" - For j = 1 To 9 Step 2 - If j <> 5 Then Print Using " ##.###% end in #"; (counts(j)/4000); j - Next - Exit Do - End If +Print "The first 50 Blum integers:" +Do + If isSemiprime(n) Then + If Prime1 Mod 4 = 3 Then + Prime2 = n / Prime1 + If (Prime2 <> Prime1) And (Prime2 Mod 4 = 3) Then + c += 1 + If c <= 50 Then + Print Using "####"; n; + If c Mod 10 = 0 Then Print + End If + If c >= 26828 Then + Print !"\nThe 26828th Blum integer is: " ; n + Exit Do End If End If End If - i += Iif(i Mod 5 = 3, 4, 2) - Loop - Print Chr(10); Timer - t0; " sec." -End Sub - -main() + End If + n += 2 +Loop Sleep diff --git a/Task/Blum-integer/Frink/blum-integer.frink b/Task/Blum-integer/Frink/blum-integer.frink deleted file mode 100644 index 7f566d6cf6..0000000000 --- a/Task/Blum-integer/Frink/blum-integer.frink +++ /dev/null @@ -1,27 +0,0 @@ -isBlum = {|x| - f = factorFlat[x] - if length[f] != 2 - return false - - f1 = first[f] - f2 = last[f] - return (f1 != f2) and (first[f] mod 4 == 3) and (last[f] mod 4 == 3) -} - -println["First 50:"] -println[first[select[count[1], isBlum], 50]] - -ret = new array -for n = [26828, 100000, 200000, 300000, 400000] - ret.push[["${n}th is: ", nth1[select[count[1], isBlum], n]]] - -println[formatTable[ret, "right"]] - -d = new dict -for n = first[select[count[1], isBlum], 400000] - d.increment[right[toString[n],1]] - -println["Distribution of the first 400000 Blum integers:"] -sum = sum[d.values[]] -for k = sort[d.keys[]] - println[formatFix[d@k / sum, "percent", 3] + " end in $k"] diff --git a/Task/Blum-integer/FutureBasic/blum-integer.basic b/Task/Blum-integer/FutureBasic/blum-integer.basic deleted file mode 100644 index 86d825bda9..0000000000 --- a/Task/Blum-integer/FutureBasic/blum-integer.basic +++ /dev/null @@ -1,47 +0,0 @@ -begin globals -UInt32 gPrime1 -end globals - -local fn IsSemiprime( n as UInt32 ) as BOOL - BOOL result = NO - UInt32 d = 3, c = 0 - while d * d <= n - while ( n % d = 0 ) - if ( c == 2 ) then return NO - n /= d - c += 1 - wend - d += 2 - wend - gPrime1 = n - result = ( c == 1 ) -end fn = result - -void local fn BlumIntegers - UInt32 prime2 = 0, n = 3, c = 0 - - print @"The first 50 Blum integers:" - while ( 1 ) - if ( fn IsSemiprime( n ) ) - if ( gPrime1 % 4 == 3 ) - prime2 = n / gPrime1 - if ( prime2 != gPrime1 ) && ( prime2 % 4 == 3 ) - c++ - if ( c <= 50 ) - printf @"%4d\b",n - if ( c % 10 == 0 ) then print - end if - if ( c >= 26828 ) - print : print @"The 26828th Blum integer is: "; n - break - end if - end if - end if - end if - n += 2 - wend -end fn - -fn BlumIntegers - -HandleEvents diff --git a/Task/Blum-integer/Gambas/blum-integer.gambas b/Task/Blum-integer/Gambas/blum-integer.gambas index ce94e9d661..027cc6a610 100644 --- a/Task/Blum-integer/Gambas/blum-integer.gambas +++ b/Task/Blum-integer/Gambas/blum-integer.gambas @@ -1,67 +1,44 @@ -Use "isprime.bas" - -Private inc As Integer[] = [4, 2, 4, 2, 4, 6, 2, 6] - -Private Function FirstPrimeFactor(n As Long) As Long - - If n = 1 Then Return 1 - If n Mod 3 = 0 Then Return 3 - If n Mod 5 = 0 Then Return 5 - - Dim k As Long = 7 - Dim i As Integer = 0 - - While k * k <= n - If n Mod k = 0 Then Return k - k += inc[i] - i = (i + 1) Mod 8 - Wend - - Return n - -End +Public Prime1 As Integer Public Sub Main() - Dim blum As New Long[50] - Dim counts As New Collection + Dim n As Integer = 3, c As Integer = 0, Prime2 As Integer - counts[1] = 0 - counts[3] = 0 - counts[7] = 0 - counts[9] = 0 - - Dim bc As Long = 0, i As Long = 1 - - While True - Dim p As Long = FirstPrimeFactor(i) - If p Mod 4 = 3 Then - Dim q As Long = i \ p - If q <> p And q Mod 4 = 3 And IsPrime(q) Then - If bc < 50 Then blum[bc] = i - counts[i Mod 10] += 1 - bc += 1 - - If bc = 50 Then - Print "First 50 Blum integers:" - For j As Integer = 0 To 49 - Print Format(blum[j], "####"); " "; - If (j + 1) Mod 10 = 0 Then Print - Next - Print - Else If bc = 26828 Or bc Mod 100000 = 0 Then - Print "The "; Format(bc, " ###,###"); "th Blum integer is: "; Format(i, " #,###,###") - If bc = 400000 Then - Print Chr(10); "% distribution of the first 400,000 Blum integers:" - For Each j As Integer In [1, 3, 7, 9] - Print Format(counts[j] / 4000, " ##.###"); "% end in "; j - Next - Return - Endif - Endif - Endif - Endif - i += If(i Mod 5 = 3, 4, 2) - Wend + Print "The first 50 Blum integers:" + Do + If isSemiprime(n) Then + If Prime1 Mod 4 = 3 Then + Prime2 = n / Prime1 + If (Prime2 <> Prime1) And (Prime2 Mod 4 = 3) Then + c += 1 + If c <= 50 Then + Print Format$(n, "####"); + If c Mod 10 = 0 Then Print + End If + If c >= 26828 Then + Print "\nThe 26828th Blum integer is: "; n + Break + End If + End If + End If + End If + n += 2 + Loop End + +Function isSemiprime(n As Integer) As Boolean + + Dim d As Integer = 3, c As Integer = 0 + While d * d <= n + While n Mod d = 0 + If c = 2 Then Return False + n /= d + c += 1 + Wend + d += 2 + Wend + Prime1 = n + Return c = 1 + +End Function diff --git a/Task/Blum-integer/Julia/blum-integer.jl b/Task/Blum-integer/Julia/blum-integer.julia similarity index 100% rename from Task/Blum-integer/Julia/blum-integer.jl rename to Task/Blum-integer/Julia/blum-integer.julia diff --git a/Task/Blum-integer/OxygenBasic/blum-integer.basic b/Task/Blum-integer/OxygenBasic/blum-integer.basic deleted file mode 100644 index 50ba04d0a0..0000000000 --- a/Task/Blum-integer/OxygenBasic/blum-integer.basic +++ /dev/null @@ -1,78 +0,0 @@ -#include "isprime.bas" -uses console - -dim inc(7) as integer -inc(0) = 4: inc(1) = 2: inc(2) = 4 -inc(3) = 2: inc(4) = 4: inc(5) = 6 -inc(6) = 2: inc(7) = 6 - -function firstPrimeFactor(n as long) as long - if n = 1 then return 1 - if n mod 3 = 0 then return 3 - if n mod 5 = 0 then return 5 - - long k = 7 - int idx = 0 - - while k * k <= n - if mod(n, k) = 0 then return k - k += inc(idx) - idx = mod((idx + 1), 8) - wend - return n -end function - -sub main() - dim as long blum(49), counts(9) - long bc = 0, i = 1, pct, p, q - int j - string s, t - - do - p = firstPrimeFactor(i) - if p mod 4 = 3 then - q = i \ p - if q <> p and q mod 4 = 3 and isPrime(q) then - if bc < 50 then blum(bc) = i - counts(i mod 10) = counts(i mod 10) + 1 - bc += 1 - - if bc = 50 then - printl "First 50 Blum integers:" - for j = 0 to 49 - s = str(blum(j)) - while len(s) < 4: s = " " + s: wend - print s; - if mod((j + 1), 10) = 0 then printl - next - printl - elseif bc = 26828 or bc mod 100000 = 0 then - s = str(bc) - while len(s) < 6: s = " " + s: wend - t = str(i) - while len(t) < 7: t = " " + t: wend - printl "The " + s + "th Blum integer is: " + t - if bc = 400000 then - printl cr "% distribution of the first 400,000 Blum integers:" - - for j = 1 to 9 step 2 - if j <> 5 then - pct = counts(j)/4000 - s = str(pct) - while len(s) < 5: s = " " + s: wend - printl s + "% end in " + str(j) - end if - next - end - end if - end if - end if - end if - if mod(i, 5) = 3 then i += 4 else i += 2 - end do -end sub - -main() - -printl cr "Enter ..." -waitkey diff --git a/Task/Blum-integer/Pluto/blum-integer.pluto b/Task/Blum-integer/Pluto/blum-integer.pluto deleted file mode 100644 index 1f47fd7135..0000000000 --- a/Task/Blum-integer/Pluto/blum-integer.pluto +++ /dev/null @@ -1,53 +0,0 @@ -local int = require "int" -local fmt = require "fmt" - -local inc = {4, 2, 4, 2, 4, 6, 2, 6} - --- Assumes n is odd. -local function first_prime_factor(n) - if n == 1 then return 1 end - if n % 3 == 0 then return 3 end - if n % 5 == 0 then return 5 end - local k = 7 - local i = 1 - while k * k <= n do - if n % k == 0 then - return k - else - k = k + inc[i] - i = i % 8 + 1 - end - end - return n -end - -local blum = {} -local bc = 0 -local counts = { [1] = 0, [3] = 0, [7] = 0, [9] = 0 } -local i = 1 -while true do - local p = first_prime_factor(i) - if p % 4 == 3 then - local q = i // p - if q != p and q % 4 == 3 and int.isprime(q) then - if bc < 50 then blum:insert(i) end - counts[i % 10] += 1 - bc += 1 - if bc == 50 then - print("First 50 Blum integers:") - fmt.tprint("%3d ", blum, 10) - print() - elseif bc == 26828 or bc % 100_000 == 0 then - fmt.print("The %9s Blum integer is: %9s", fmt.ord(bc, true), fmt.int(i)) - if bc == 400_000 then - print("\n% distribution of the first 400,000 Blum integers:") - for {1, 3, 7, 9} as j do - fmt.print(" %6.3f%% end in %d", counts[j] / 4000, j) - end - return - end - end - end - end - i = (i % 5 == 3) ? i + 4 : i + 2 -end diff --git a/Task/Blum-integer/PureBasic/blum-integer.basic b/Task/Blum-integer/PureBasic/blum-integer.basic deleted file mode 100644 index 191ab6d065..0000000000 --- a/Task/Blum-integer/PureBasic/blum-integer.basic +++ /dev/null @@ -1,69 +0,0 @@ -XIncludeFile "isprime.pb" - -Structure PrimeHelper - inc.i[8] - index.i -EndStructure - -Procedure.i firstPrimeFactor(n.q) - If n = 1 : ProcedureReturn 1 : EndIf - If n % 3 = 0 : ProcedureReturn 3 : EndIf - If n % 5 = 0 : ProcedureReturn 5 : EndIf - - Define helper.PrimeHelper - helper\inc[0] = 4 : helper\inc[1] = 2 : helper\inc[2] = 4 - helper\inc[3] = 2 : helper\inc[4] = 4 : helper\inc[5] = 6 - helper\inc[6] = 2 : helper\inc[7] = 6 - - Define k.q = 7 - While k * k <= n - If n % k = 0 : ProcedureReturn k : EndIf - k + helper\inc[helper\index] - helper\index = (helper\index + 1) % 8 - Wend - ProcedureReturn n -EndProcedure - -OpenConsole() -Define Dim blum.q(49) -Define.q bc = 0, i = 1 -Define Dim counts.q(9) - -Repeat - Define p.q = firstPrimeFactor(i) - If p % 4 = 3 - Define q.q = i / p - If q <> p And q % 4 = 3 And isPrime(q) - If bc < 50 : blum(bc) = i : EndIf - counts(i % 10) + 1 - bc + 1 - - If bc = 50 - PrintN("First 50 Blum integers:") - For j = 0 To 49 - Print(" " + RSet(Str(blum(j)), 3)) - If (j + 1) % 10 = 0 : PrintN("") : EndIf - Next - PrintN("") - ElseIf bc = 26828 Or bc % 100000 = 0 - PrintN("The " + RSet(Str(bc), 6) + "th Blum integer is: " + RSet(Str(i), 7)) - If bc = 400000 - PrintN(#CRLF$ + "% distribution of the first 400,000 Blum integers:") - For j = 1 To 9 Step 2 - If j <> 5 - PrintN(RSet(StrF(counts(j)/4000, 3), 5) + "% end in " + Str(j)) - EndIf - Next - Break - EndIf - EndIf - EndIf - EndIf - If i % 5 = 3 - i + 4 - Else - i + 2 - EndIf -ForEver - -PrintN(#CRLF$ + "Press ENTER to exit"): Input() diff --git a/Task/Blum-integer/QB64/blum-integer.qb64 b/Task/Blum-integer/QB64/blum-integer.qb64 deleted file mode 100644 index 9b3a0be158..0000000000 --- a/Task/Blum-integer/QB64/blum-integer.qb64 +++ /dev/null @@ -1,73 +0,0 @@ -Dim Shared inc(7) As Integer -inc(0) = 4: inc(1) = 2: inc(2) = 4 -inc(3) = 2: inc(4) = 4: inc(5) = 6 -inc(6) = 2: inc(7) = 6 - -Dim blum(49) As Long -Dim counts(9) As Long -Dim bc As Long, i As Long, p As Long, q As Long, j As Integer -i = 1 - -Do - p = firstPrimeFactor(i) - If p Mod 4 = 3 Then - q = i \ p - If q <> p And q Mod 4 = 3 And isPrime(q) Then - If bc < 50 Then blum(bc) = i - counts(i Mod 10) = counts(i Mod 10) + 1 - bc = bc + 1 - - If bc = 50 Then - Print "First 50 Blum integers:" - For j = 0 To 49 - Print Using "####"; blum(j); - If (j + 1) Mod 10 = 0 Then Print - Next - Print - ElseIf bc = 26828 Or bc Mod 100000 = 0 Then - Print Using "The ###,###th Blum integer is: #,###,###"; bc; i - If bc = 400000 Then - Print Chr$(10); "% distribution of the first 400,000 Blum integers:" - For j = 1 To 9 Step 2 - If j <> 5 Then - Print Using " ##.###% end in #"; (counts(j%) / 4000); j% - End If - Next - End - End If - End If - End If - End If - If i Mod 5 = 3 Then i = i + 4 Else i = i + 2 -Loop -End - -Function firstPrimeFactor& (n As Long) - Dim k As Long, idx As Integer - If n = 1 Then firstPrimeFactor& = 1: Exit Function - If n Mod 3 = 0 Then firstPrimeFactor& = 3: Exit Function - If n Mod 5 = 0 Then firstPrimeFactor& = 5: Exit Function - k = 7: idx = 0 - Do While k * k <= n - If n Mod k = 0 Then - firstPrimeFactor& = k - Exit Function - End If - k = k + inc(idx) - idx = (idx + 1) Mod 8 - Loop - firstPrimeFactor& = n -End Function - -Function isPrime% (n As Long) - Dim i As Long - If n <= 1 Then Exit Function - If n <= 3 Then isPrime% = 1: Exit Function - If n Mod 2 = 0 Or n Mod 3 = 0 Then Exit Function - i = 5 - While i * i <= n - If n Mod i = 0 Or n Mod (i + 2) = 0 Then Exit Function - i = i + 6 - Wend - isPrime% = 1 -End Function diff --git a/Task/Blum-integer/REXX/blum-integer-1.rexx b/Task/Blum-integer/REXX/blum-integer-1.rexx deleted file mode 100644 index f2ec8d05b6..0000000000 --- a/Task/Blum-integer/REXX/blum-integer-1.rexx +++ /dev/null @@ -1,59 +0,0 @@ -include Setting - -Say Time() -Call Time 'R' -blumCount = 0 -blums.=0 -lastDigitCounts.=0 -Do number=5 By 4 While blumCount < 400000 - Prime=leastPrimeFactor(number) - If Prime // 4=3 Then Do - quotient=number / Prime; - If quotient <> Prime & isPrimeType3(quotient) Then Do - blumCount+=1 - If blumCount<=50 Then Do - blums.blumCount=number - End - lastdigit=Right(number,1) - lastDigitCounts.lastdigit+=1 - If blumCount=50 Then Do - Say "The first 50 Blum integers:" - Do i=1 To 50 - If Right(i,1)=1 Then - l=Format(blums.i,3) - Else - l=l Format(blums.i,3) - If i//10=0 Then - Say l - End - Say '' - End - Else Do - If blumCount=26828 | blumCount // 100000 = 0 Then Do - Say "The " Format(blumCount,7)"th Blum Integer is:" Format(number,7) Time() - If blumCount=400000 Then Do - Say '' - Say "Percent distribution of the first 400000 Blum integers:" - Do i=0 To 9 - If lastDigitCounts.i>0 Then - Say Format(lastDigitCounts.i/4000,6,3)'% end in' i - End - End - End - End - End - End - End -Say Time() -say Time('E') 'seconds' -Exit - -isPrimeType3: Procedure expose Memo. - Parse Arg number - Return Prime(number) & (number//4=3) - -leastPrimeFactor: Procedure expose Memo. - Parse Arg number - Return FFactor(number) - -include Math diff --git a/Task/Blum-integer/REXX/blum-integer-2.rexx b/Task/Blum-integer/REXX/blum-integer-2.rexx deleted file mode 100644 index 9c5598e2ee..0000000000 --- a/Task/Blum-integer/REXX/blum-integer-2.rexx +++ /dev/null @@ -1,89 +0,0 @@ --- 28 Aug 2025 -include Setting -arg count -if count = '' then - count = 400000 -threshold=25*count - -say 'BLUM INTEGER' -say version -say -say 'Parameters...' -say 'Threshold' threshold 'Count' count -say -say 'Collect primes...' -say Primes(threshold) 'found'; say -say 'Filter primes 3 modulo 4...' -say Filter3Mod4() 'found'; say -say 'Generate Blum integers...' -say GenerateBlum(threshold) 'found'; say -say 'Blum integers...'; say -call Results threshold,count -call Timer -exit - -Filter3Mod4: -procedure expose Prim. -n=0 -do i = 1 to Prim.0 - if Prim.i//4 = 3 then - n=n+1 - else - Prim.i=0 -end -return n - -GenerateBlum: -procedure expose Prim. Blum. -arg threshold -Blum.=0; n=0 -do i = 1 to Prim.0 - if Prim.i <> 0 then do - do j = i+1 to Prim.0 - if Prim.j <> 0 then do - p=Prim.i*Prim.j - if p > threshold then - leave j - n=n+1; Blum.p=1 - end - end - end -end -return n - -Results: -procedure expose Blum. -arg threshold,count -n=0; digs.=0 -do i = 5 by 4 to threshold - if \ Blum.i then - iterate i - n=n+1 - if n > count then - leave i - d=Right(i,1); digs.d=digs.d+1 - if n < 51 then do - if n = 1 then - say 'The first 50 are' - call CharOut ,Right(i,4) - if n//10 = 0 then - say - if n = 50 then - say - iterate i - end - if n = 26828 | n//100000 = 0 then - say 'The' n'th is' i - if n = count then do - say - say 'Percent distribution of the first' count - do i = 1 to 9 - if digs.i > 0 then - say format(digs.i*100/count,2,3)'% ends in' i - end - end -end -say -return 0 - -include Math diff --git a/Task/Blum-integer/Rust/blum-integer.rs b/Task/Blum-integer/Rust/blum-integer.rs deleted file mode 100644 index 59feb1041f..0000000000 --- a/Task/Blum-integer/Rust/blum-integer.rs +++ /dev/null @@ -1,91 +0,0 @@ -fn is_prime_mod4(n: u32) -> bool { - match n { - 0..3 => false, - _ if n % 2 == 0 => false, - _ if n % 3 == 0 => n == 3, - _ if n % 4 == 3 => { - for d in (5..).step_by(2).take_while(|&d| d * d <= n) { - if n % d == 0 { - return false; - } - } - - true - } - _ => false, - } -} - -fn least_prime_factor(n: u32) -> u32 { - match n { - 1 => 1, - _ if n % 3 == 0 => 3, - _ if n % 5 == 0 => 5, - _ => { - for d in (7..).step_by(2).take_while(|&d| d * d <= n) { - if n % d == 0 { - return d; - } - } - - n - } - } -} - -fn blums() -> Blum { - Blum { number: 1 } -} - -struct Blum { - number: u32, -} - -impl Iterator for Blum { - type Item = u32; - - fn next(&mut self) -> Option { - loop { - let number = self.number; - let p = least_prime_factor(number); - - self.number = number.checked_add(if number % 5 == 3 { 4 } else { 2 })?; - - if p % 4 == 3 { - let q = number / p; - - if p != q && is_prime_mod4(q) { - return Some(number); - } - } - } - } -} - -fn main() { - println!("First 50 Blum integers:"); - - let last_digit_counts = blums() - .zip(1..=400_000) - .inspect(|&(blum, i)| match i { - 1..=50 => print!("{blum:>3}{}", if i % 10 != 0 { " " } else { "\n" }), - 51 => println!(), - 26_828 | 100_000 | 200_000 | 300_000 | 400_000 => { - println!("The {i:>6}th Blum integer is: {blum:>7}"); - } - _ => {} - }) - .fold([0; 10], |mut acc, (blum, _)| { - acc[blum as usize % 10] += 1; - - acc - }); - - println!("\nPercent distribution of the first 400000 Blum integers:"); - for i in [1, 3, 7, 9] { - println!( - "\t{:2.3}% end in {i}", - last_digit_counts[i] as f64 / 4_000.0 - ); - } -} diff --git a/Task/Boolean-values/Ada/boolean-values.adb b/Task/Boolean-values/Ada/boolean-values.ada similarity index 100% rename from Task/Boolean-values/Ada/boolean-values.adb rename to Task/Boolean-values/Ada/boolean-values.ada diff --git a/Task/Boolean-values/ArkScript/boolean-values.ark b/Task/Boolean-values/ArkScript/boolean-values.ark deleted file mode 100644 index d92c5993bd..0000000000 --- a/Task/Boolean-values/ArkScript/boolean-values.ark +++ /dev/null @@ -1,14 +0,0 @@ -(let test (fun (v) { - (puts v ": ") - (if v (print true) (print false)) })) - - -(test 1) -(test 0) -(test true) -(test false) -(test "hello") -(test "") -(test [1 2 3]) -(test []) -(test nil) diff --git a/Task/Boolean-values/Arturo/boolean-values.arturo b/Task/Boolean-values/Arturo/boolean-values.arturo index aa612af29c..9a3129bc14 100644 --- a/Task/Boolean-values/Arturo/boolean-values.arturo +++ b/Task/Boolean-values/Arturo/boolean-values.arturo @@ -1,7 +1,7 @@ a: true b: false -switch a [ print "yep" ][ print "nope" ] +if? a [ print "yep" ] else [ print "nope" ] -switch b -> print "nope" - -> print "yep" +if? b -> print "nope" +else -> print "yep" diff --git a/Task/Boolean-values/Ballerina/boolean-values.ballerina b/Task/Boolean-values/Ballerina/boolean-values.ballerina deleted file mode 100644 index 637f05cfc0..0000000000 --- a/Task/Boolean-values/Ballerina/boolean-values.ballerina +++ /dev/null @@ -1,12 +0,0 @@ -import ballerina/io; - -public function main() { - boolean markova = true; - boolean keys = false; - if markova { - io:println("Alicia Markova was a famous ballerina."); - } - if !keys { - io:println("Alicia Keys is a famous singer."); - } -} diff --git a/Task/Boolean-values/COBOL/boolean-values-1.cob b/Task/Boolean-values/COBOL/boolean-values-1.cobol similarity index 100% rename from Task/Boolean-values/COBOL/boolean-values-1.cob rename to Task/Boolean-values/COBOL/boolean-values-1.cobol diff --git a/Task/Boolean-values/COBOL/boolean-values-2.cob b/Task/Boolean-values/COBOL/boolean-values-2.cobol similarity index 100% rename from Task/Boolean-values/COBOL/boolean-values-2.cob rename to Task/Boolean-values/COBOL/boolean-values-2.cobol diff --git a/Task/Boolean-values/COBOL/boolean-values-3.cob b/Task/Boolean-values/COBOL/boolean-values-3.cobol similarity index 100% rename from Task/Boolean-values/COBOL/boolean-values-3.cob rename to Task/Boolean-values/COBOL/boolean-values-3.cobol diff --git a/Task/Boolean-values/Crystal/boolean-values.cr b/Task/Boolean-values/Crystal/boolean-values.cr deleted file mode 100644 index 02755b55d3..0000000000 --- a/Task/Boolean-values/Crystal/boolean-values.cr +++ /dev/null @@ -1,9 +0,0 @@ -if false - puts "false" -elsif nil - puts "nil" -elsif Pointer(Nil).new 0_u64 - puts "null pointer" -elsif true && "any other value" - puts "finally true!" -end diff --git a/Task/Boolean-values/Crystal/boolean-values.crystal b/Task/Boolean-values/Crystal/boolean-values.crystal new file mode 100644 index 0000000000..e07aedd7a8 --- /dev/null +++ b/Task/Boolean-values/Crystal/boolean-values.crystal @@ -0,0 +1,9 @@ +if false + puts "false" +elsif nil + puts "nil" +elsif Pointer(Nil).new 0 + puts "null pointer" +elsif true && "any other value" + puts "finally true!" +end diff --git a/Task/Boolean-values/EMal/boolean-values.emal b/Task/Boolean-values/EMal/boolean-values.emal index 62f10187ce..27d6cfd42e 100644 --- a/Task/Boolean-values/EMal/boolean-values.emal +++ b/Task/Boolean-values/EMal/boolean-values.emal @@ -3,15 +3,15 @@ |There are no implicit conversions, but explicit conversions |from/to int (0,1) or text ("⊥", "⊤") are allowed. |^ -logic booleanTrue ← true -logic booleanFalse ← false +logic booleanTrue = true +logic booleanFalse = false if 2 > 1 and true and not false - writeLine("true: ", true, ", false: ", false) + writeLine("true: " + true + ", false: " + false) end -if false æ logic!0 +if false == logic!0 writeLine("explicit conversion from integer") end -if true æ logic!"⊤" +if true == logic!"⊤" writeLine("explicit conversion from text") end writeLine(int!true) # is one diff --git a/Task/Boolean-values/Elixir/boolean-values-1.ex b/Task/Boolean-values/Elixir/boolean-values-1.elixir similarity index 100% rename from Task/Boolean-values/Elixir/boolean-values-1.ex rename to Task/Boolean-values/Elixir/boolean-values-1.elixir diff --git a/Task/Boolean-values/Elixir/boolean-values-2.ex b/Task/Boolean-values/Elixir/boolean-values-2.elixir similarity index 100% rename from Task/Boolean-values/Elixir/boolean-values-2.ex rename to Task/Boolean-values/Elixir/boolean-values-2.elixir diff --git a/Task/Boolean-values/Haxe/boolean-values.hx b/Task/Boolean-values/Haxe/boolean-values.hx deleted file mode 100644 index c2f8a2ed4c..0000000000 --- a/Task/Boolean-values/Haxe/boolean-values.hx +++ /dev/null @@ -1,8 +0,0 @@ -class Main { - static public function main():Void { - var t = true; - var f = false; - $type(t); - $type(f); - } -} diff --git a/Task/Boolean-values/Julia/boolean-values-1.jl b/Task/Boolean-values/Julia/boolean-values-1.julia similarity index 100% rename from Task/Boolean-values/Julia/boolean-values-1.jl rename to Task/Boolean-values/Julia/boolean-values-1.julia diff --git a/Task/Boolean-values/Julia/boolean-values-2.jl b/Task/Boolean-values/Julia/boolean-values-2.julia similarity index 100% rename from Task/Boolean-values/Julia/boolean-values-2.jl rename to Task/Boolean-values/Julia/boolean-values-2.julia diff --git a/Task/Boolean-values/LOLCODE/boolean-values.lol b/Task/Boolean-values/LOLCODE/boolean-values.lol deleted file mode 100644 index 5e3e1bc953..0000000000 --- a/Task/Boolean-values/LOLCODE/boolean-values.lol +++ /dev/null @@ -1,15 +0,0 @@ -HAI 1.3 - - FAIL, O RLY?, YA RLY, VISIBLE " 0"!, NO WAI, VISIBLE " -0"!, OIC BTW GET -0 - WIN, O RLY?, YA RLY, VISIBLE " 1"!, NO WAI, VISIBLE " -1"!, OIC BTW GET 1 - "", O RLY?, YA RLY, VISIBLE " 2"!, NO WAI, VISIBLE " -2"!, OIC BTW GET -2 - ".", O RLY?, YA RLY, VISIBLE " 3"!, NO WAI, VISIBLE " -3"!, OIC BTW GET 3 - 0, O RLY?, YA RLY, VISIBLE " 4"!, NO WAI, VISIBLE " -4"!, OIC BTW GET -4 - 1, O RLY?, YA RLY, VISIBLE " 5"!, NO WAI, VISIBLE " -5"!, OIC BTW GET 5 - 0.0, O RLY?, YA RLY, VISIBLE " 6"!, NO WAI, VISIBLE " -6"!, OIC BTW GET -6 - 1.0, O RLY?, YA RLY, VISIBLE " 7"!, NO WAI, VISIBLE " -7"!, OIC BTW GET 7 - - I HAS A N0 ITZ A NOOB - N0, O RLY?, YA RLY, VISIBLE " 8"!, NO WAI, VISIBLE " -8"!, OIC BTW GET -8 - -KTHXBYE diff --git a/Task/Boolean-values/OCaml/boolean-values.ml b/Task/Boolean-values/OCaml/boolean-values.ocaml similarity index 100% rename from Task/Boolean-values/OCaml/boolean-values.ml rename to Task/Boolean-values/OCaml/boolean-values.ocaml diff --git a/Task/Boolean-values/PowerShell/boolean-values.ps1 b/Task/Boolean-values/PowerShell/boolean-values.psh similarity index 100% rename from Task/Boolean-values/PowerShell/boolean-values.ps1 rename to Task/Boolean-values/PowerShell/boolean-values.psh diff --git a/Task/Boolean-values/Prolog/boolean-values.pro b/Task/Boolean-values/Prolog/boolean-values.pro deleted file mode 100644 index 361f023ab6..0000000000 --- a/Task/Boolean-values/Prolog/boolean-values.pro +++ /dev/null @@ -1,2 +0,0 @@ -?- ( Bool = true ; Bool = false ), - ( Bool -> bool_is_true ; bool_is_false ). diff --git a/Task/Boolean-values/Red/boolean-values.red b/Task/Boolean-values/Red/boolean-values.red deleted file mode 100644 index 8ed1e79643..0000000000 --- a/Task/Boolean-values/Red/boolean-values.red +++ /dev/null @@ -1,8 +0,0 @@ -;- 3 ways to declare true in a variable named a -a: true -a: on -a: yes -;- 3 ways to declare false in a variable named b -b: false -b: off -b: no diff --git a/Task/Boolean-values/Rust/boolean-values.rs b/Task/Boolean-values/Rust/boolean-values.rust similarity index 100% rename from Task/Boolean-values/Rust/boolean-values.rs rename to Task/Boolean-values/Rust/boolean-values.rust diff --git a/Task/Boolean-values/Uiua/boolean-values.uiua b/Task/Boolean-values/Uiua/boolean-values.uiua deleted file mode 100644 index 769ce8a2eb..0000000000 --- a/Task/Boolean-values/Uiua/boolean-values.uiua +++ /dev/null @@ -1,4 +0,0 @@ -= 4 4 # --> 1 -= 4 5 # --> 1 -↧ 1 0 # --> 0 -↥ 0 1 # --> 1 diff --git a/Task/Boolean-values/VBScript/boolean-values.vbs b/Task/Boolean-values/VBScript/boolean-values.vb similarity index 100% rename from Task/Boolean-values/VBScript/boolean-values.vbs rename to Task/Boolean-values/VBScript/boolean-values.vb diff --git a/Task/Boolean-values/Zig/boolean-values.zig b/Task/Boolean-values/Zig/boolean-values.zig deleted file mode 100644 index f7b10d4ab0..0000000000 --- a/Task/Boolean-values/Zig/boolean-values.zig +++ /dev/null @@ -1,15 +0,0 @@ -const std = @import("std"); - -pub fn main() !void { - const stdout = std.io.getStdOut().writer(); - - const bool1: bool = true; - const bool2: bool = false; - const bool3 = 2 + 2 == 4; - const bool4 = 2 + 2 == 5; - - try stdout.print("{any}\n", .{bool1}); - try stdout.print("{any}\n", .{bool2}); - try stdout.print("{any} {any}\n", .{@TypeOf(bool3), bool3}); - try stdout.print("{any} {any}\n", .{@TypeOf(bool4), bool4}); -} diff --git a/Task/Box-the-compass/11l/box-the-compass.11l b/Task/Box-the-compass/11l/box-the-compass.11l index ff86715b26..7ff6f201ec 100644 --- a/Task/Box-the-compass/11l/box-the-compass.11l +++ b/Task/Box-the-compass/11l/box-the-compass.11l @@ -17,7 +17,7 @@ F degrees2compasspoint(=d) R q[minorindex].replace(‘N’, p1).replace(‘E’, p2).capitalize() :start: -L(i) 0.<33 +L(i) 33 V d = i * 11.25 S i % 3 1 diff --git a/Task/Box-the-compass/Ada/box-the-compass.adb b/Task/Box-the-compass/Ada/box-the-compass.ada similarity index 100% rename from Task/Box-the-compass/Ada/box-the-compass.adb rename to Task/Box-the-compass/Ada/box-the-compass.ada diff --git a/Task/Box-the-compass/AutoIt/box-the-compass.au3 b/Task/Box-the-compass/AutoIt/box-the-compass.autoit similarity index 100% rename from Task/Box-the-compass/AutoIt/box-the-compass.au3 rename to Task/Box-the-compass/AutoIt/box-the-compass.autoit diff --git a/Task/Box-the-compass/COBOL/box-the-compass.cob b/Task/Box-the-compass/COBOL/box-the-compass.cobol similarity index 100% rename from Task/Box-the-compass/COBOL/box-the-compass.cob rename to Task/Box-the-compass/COBOL/box-the-compass.cobol diff --git a/Task/Box-the-compass/EasyLang/box-the-compass.easy b/Task/Box-the-compass/EasyLang/box-the-compass.easy index 0bb02b538d..03c6aa33d7 100644 --- a/Task/Box-the-compass/EasyLang/box-the-compass.easy +++ b/Task/Box-the-compass/EasyLang/box-the-compass.easy @@ -17,7 +17,7 @@ func$ expand cp$ . h$ = strchar (strcode substr r$ 1 1 - 32) return h$ & substr r$ 2 999 . -proc main . +proc main . . cp$[] = [ "N" "NbE" "N-NE" "NEbN" "NE" "NEbE" "E-NE" "EbN" "E" "EbS" "E-SE" "SEbE" "SE" "SEbS" "S-SE" "SbE" "S" "SbW" "S-SW" "SWbS" "SW" "SWbW" "W-SW" "WbS" "W" "WbN" "W-NW" "NWbW" "NW" "NWbN" "N-NW" "NbW" ] print "Index Degrees Compass point" print "----- ------- -------------" diff --git a/Task/Box-the-compass/Elixir/box-the-compass.ex b/Task/Box-the-compass/Elixir/box-the-compass.elixir similarity index 100% rename from Task/Box-the-compass/Elixir/box-the-compass.ex rename to Task/Box-the-compass/Elixir/box-the-compass.elixir diff --git a/Task/Box-the-compass/Euphoria/box-the-compass.eu b/Task/Box-the-compass/Euphoria/box-the-compass.euphoria similarity index 100% rename from Task/Box-the-compass/Euphoria/box-the-compass.eu rename to Task/Box-the-compass/Euphoria/box-the-compass.euphoria diff --git a/Task/Box-the-compass/FutureBasic/box-the-compass.basic b/Task/Box-the-compass/FutureBasic/box-the-compass.basic deleted file mode 100644 index 44c7b8dca8..0000000000 --- a/Task/Box-the-compass/FutureBasic/box-the-compass.basic +++ /dev/null @@ -1,32 +0,0 @@ -window 1,@"Box the Compass" -_Name = 0 -_Degrees = 1 - - -// mda defaults to mda _Name -mda(0)=@"North":mda(1)=@"North by east":mda(2)=@"North-northeast" -mda(3)=@"Northeast by north":mda(4)=@"Northeast":mda(5)=@"Northeast by east":mda(6)=@"East-northeast" -mda(7)=@"East by north":mda(8)=@"East":mda(9)=@"East by south":mda(10)=@"East-southeast" -mda(11)=@"Southeast by east":mda(12)=@"Southeast":mda(13)=@"Southeast by south":mda(14)=@"South-southeast" -mda(15)=@"South by east":mda(16)= @"South":mda(17)= @"South by west":mda(18)= @"South-southwest" -mda(19)=@"Southwest by south":mda(20)=@"Southwest":mda(21)=@"Southwest by west":mda(22)=@"West-southwest" -mda(23)=@"West by south":mda(24)=@"West":mda(25)=@"West by north":mda(26)=@"West-northwest" -mda(27)=@"Northwest by west":mda(28)=@"Northwest":mda(29)=@"Northwest by north":mda(30)=@"North-northwest" -mda(31)=@"North by west":mda(32)=@"North" - -mda _Degrees (0) = { 0, 16.87, 16.88, 33.75, 50.62, 50.63,¬ -67.5, 84.37, 84.38, 101.25, 118.12, 118.13, 135, 151.87, 151.88, 168.75,¬ -185.62, 185.63, 202.5, 219.37, 219.38, 236.25, 253.12, 253.13, 270,¬ -286.87, 286.88, 303.75, 320.62, 320.63, 337.5, 354.37, 354.38 } - -unsigned Long i, j - -For i = 0 To 32 - j = fix((mda_double _Degrees(i) + 5.625) / 11.25) - If j > 31 Then j = j - 32 - Print Using "###.## "; (mda_double _Degrees(i)); - Print Using "## "; j; - Print mda _Name(j) -Next - -handleevents diff --git a/Task/Box-the-compass/Icon/box-the-compass.icon b/Task/Box-the-compass/Icon/box-the-compass.icon index f9d3562942..c1f1f16e6a 100644 --- a/Task/Box-the-compass/Icon/box-the-compass.icon +++ b/Task/Box-the-compass/Icon/box-the-compass.icon @@ -7,7 +7,7 @@ every heading := 11.25 * (i := 0 to 32) do { 1: heading +:= 5.62 2: heading -:= 5.62 } - write(right(i%32+1,3)," ",left(direction(heading),20)," ",fix(heading,,7,2)) + write(right(i+1,3)," ",left(direction(heading),20)," ",fix(heading,,7,2)) } end @@ -17,10 +17,10 @@ initial { every put(dirs := [], replacem(!["N","NbE","N-NE","NEbN","NE","NEbE","E-NE","EbN", "E","EbS","E-SE","SEbE","SE","SEbS","S-SE","SbE", - "S","SbW","S-SW","SWbS","SW","SWbW","W-SW","WbS", - "W","WbN","W-NW","NWbW","NW","NWbN","N-NW","NbW"], + "S","SbW","S-SW","SWbS","SW","SWbW","W-SW","WbS", + "W","WbN","W-NW","NWbW","NW","NWbN","N-NW","NbW"], "N","north","E","east","W","west","S","south","b"," by ")) } - return dirs[round(((((d%360)+360)%360)/11.25))%32 + 1] + return dirs[round(((((d%360)+360)%360)/11.25)%32 + 1)] end diff --git a/Task/Box-the-compass/Julia/box-the-compass.jl b/Task/Box-the-compass/Julia/box-the-compass.julia similarity index 100% rename from Task/Box-the-compass/Julia/box-the-compass.jl rename to Task/Box-the-compass/Julia/box-the-compass.julia diff --git a/Task/Box-the-compass/Kotlin/box-the-compass.kts b/Task/Box-the-compass/Kotlin/box-the-compass.kotlin similarity index 100% rename from Task/Box-the-compass/Kotlin/box-the-compass.kts rename to Task/Box-the-compass/Kotlin/box-the-compass.kotlin diff --git a/Task/Box-the-compass/Langur/box-the-compass.langur b/Task/Box-the-compass/Langur/box-the-compass.langur index 997f98881a..d0f6962819 100644 --- a/Task/Box-the-compass/Langur/box-the-compass.langur +++ b/Task/Box-the-compass/Langur/box-the-compass.langur @@ -1,4 +1,4 @@ -val box = ["North", "North by east", "North-northeast", "Northeast by north", +val .box = ["North", "North by east", "North-northeast", "Northeast by north", "Northeast", "Northeast by east", "East-northeast", "East by north", "East", "East by south", "East-southeast", "Southeast by east", "Southeast", "Southeast by south", "South-southeast", "South by east", @@ -7,7 +7,7 @@ val box = ["North", "North by east", "North-northeast", "Northeast by north", "West", "West by north", "West-northwest", "Northwest by west", "Northwest", "Northwest by north", "North-northwest", "North by west"] -val angles = [ +val .angles = [ 0.0, 16.87, 16.88, 33.75, 50.62, 50.63, 67.5, 84.37, 84.38, 101.25, 118.12, 118.13, 135.0, 151.87, 151.88, 168.75, 185.62, 185.63, 202.5, 219.37, 219.38, 236.25, 253.12, 253.13, 270.0, @@ -16,7 +16,7 @@ val angles = [ writeln "index degrees compass point" writeln "----- ------- -------------" -for phi in angles { - val i = trunc(phi * 32 / 360 + 0.5) rem 32 + 1 - writeln "{{i:5}} {{phi:r2:6}} {{box[i]}}" +for .phi in .angles { + val .i = trunc(.phi * 32 / 360 + 0.5) rem 32 + 1 + writeln $"\{.i:5} \{.phi:r2:6} \{.box[.i]}" } diff --git a/Task/Box-the-compass/OCaml/box-the-compass.ml b/Task/Box-the-compass/OCaml/box-the-compass.ocaml similarity index 100% rename from Task/Box-the-compass/OCaml/box-the-compass.ml rename to Task/Box-the-compass/OCaml/box-the-compass.ocaml diff --git a/Task/Box-the-compass/Phix/box-the-compass-1.phix b/Task/Box-the-compass/Phix/box-the-compass-1.phix index 8710cca852..4377ed54b4 100644 --- a/Task/Box-the-compass/Phix/box-the-compass-1.phix +++ b/Task/Box-the-compass/Phix/box-the-compass-1.phix @@ -1,46 +1,48 @@ -with javascript_semantics -function get225(integer d, string p1, string p2, string p4) - string p3 = p1&'-'&lower(p2) - p2 &= " by "&lower(p1) - p1 &= " by "&lower(p4) - if d then - return {p1,p3,p2} -- eg {North by east,North-northeast,Northeast by north} - else - return {p2,p3,p1} -- eg {Northeast by east,East-northeast,East by north} - end if -end function +(phixonline)--> + with javascript_semantics + function get225(integer d, string p1, string p2, string p4) + string p3 = p1&'-'&lower(p2) + p2 &= " by "&lower(p1) + p1 &= " by "&lower(p4) + if d then + return {p1,p3,p2} -- eg {North by east,North-northeast,Northeast by north} + else + return {p2,p3,p1} -- eg {Northeast by east,East-northeast,East by north} + end if + end function -function get45(sequence res, integer d, string p1, string p2) - string p3 - res = append(res,p1) -- North/East/South/West - if d then - p3 = p1&lower(p2) -- Northeast/Southwest - else - p3 = p2&lower(p1) -- Southeast/Northwest - end if - res &= get225(1,p1,p3,p2) -- eg get225(1,North,Northeast,East) - -- -> {North by east,North-northeast,Northeast by north} - res = append(res,p3) -- Northeast/Southeast/Southwest/Northwest - res &= get225(0,p2,p3,p1) -- eg get225(0,East,Northeast,North) - -- -> {Northeast by east,East-northeast,East by north} - return res -end function + function get45(sequence res, integer d, string p1, string p2) + string p3 + res = append(res,p1) -- North/East/South/West + if d then + p3 = p1&lower(p2) -- Northeast/Southwest + else + p3 = p2&lower(p1) -- Southeast/Northwest + end if + res &= get225(1,p1,p3,p2) -- eg get225(1,North,Northeast,East) + -- -> {North by east,North-northeast,Northeast by north} + res = append(res,p3) -- Northeast/Southeast/Southwest/Northwest + res &= get225(0,p2,p3,p1) -- eg get225(0,East,Northeast,North) + -- -> {Northeast by east,East-northeast,East by north} + return res + end function -function get90(sequence points) - sequence res = {} - for i=1 to length(points) do - res = get45(res,remainder(i,2),points[i],points[remainder(i,4)+1]) - end for -- ie get45(1,North,East) - -- get45(0,East,South) - -- get45(1,South,West) - -- get45(0,West,North) - return res -end function + function get90(sequence points) + sequence res = {} + for i=1 to length(points) do + res = get45(res,remainder(i,2),points[i],points[remainder(i,4)+1]) + end for -- ie get45(1,North,East) + -- get45(0,East,South) + -- get45(1,South,West) + -- get45(0,West,North) + return res + end function -constant compass_points = get90({"North","East","South","West"}) + constant compass_points = get90({"North","East","South","West"}) -for i=1 to 33 do - atom test_point = (i-1)*11.25 + 5.62*(remainder(i,3)-1) - integer compass_point = remainder(floor(test_point*32/360+0.5),32)+1 - printf(1, "%2d %-22s %6.2f\n", {compass_point, compass_points[compass_point], test_point}) -end for + for i = 1 to 33 do + atom test_point = (i-1)*11.25 + 5.62*(remainder(i,3)-1) + integer compass_point = remainder(floor(test_point*32/360+0.5),32)+1 + printf(1, "%2d %-22s %6.2f\n", {compass_point, compass_points[compass_point], test_point}) + end for + + with javascript_semantics + constant compass_points = { "North", "North by east", "North-northeast", "Northeast by north", + "Northeast", "Northeast by east", "East-northeast", "East by north", + "East", "East by south", "East-southeast", "Southeast by east", + "Southeast", "Southeast by south", "South-southeast", "South by east", + "South", "South by west", "South-southwest", "Southwest by south", + "Southwest", "Southwest by west", "West-southwest", "West by south", + "West", "West by north", "West-northwest", "Northwest by west", + "Northwest", "Northwest by north", "North-northwest", "North by west"}, + test_points = { 0.0, 16.87, 16.88, 33.75, 50.62, 50.63, 67.5, 84.37, 84.38, 101.25, 118.12, + 118.13, 135.0, 151.87, 151.88, 168.75, 185.62, 185.63, 202.5, 219.37, 219.38, 236.25, + 253.12, 253.13, 270.0, 286.87, 286.88, 303.75, 320.62, 320.63, 337.5, 354.37, 354.38} + for i=1 to length(test_points) do + integer compass_point = remainder(floor(test_points[i]*32/360+0.5),32)+1 + printf(1, "%2d %-22s %6.2f\n", {compass_point, compass_points[compass_point], test_points[i]}) + end for + + -- + -- demo\rosetta\BoyerMoore.exw + -- =========================== + -- + -- based on https://www-igm.univ-mlv.fr/~lecroq/string/node14.html + -- + with javascript_semantics + function preBmBc(string pat) + integer m = length(pat) + sequence bmBc = repeat(m,255) + for i=1 to m-1 do + bmBc[pat[i]] = m - i + end for + return bmBc + end function -function suffixes(string pat) - integer m = length(pat), g = m, f - sequence suff = repeat(0,m) - suff[m] = m; - for i=m-1 to 1 by -1 do - if i > g and suff[i + m - f] < i - g then - suff[i] = suff[i + m - f] - else - if i < g then g = i end if - f = i - while g >= 1 and pat[g] == pat[g + m - f] do - g -= 1; - end while - suff[i] = f - g - end if - end for - return suff -end function + function suffixes(string pat) + integer m = length(pat), g = m, f + sequence suff = repeat(0,m) + suff[m] = m; + for i=m-1 to 1 by -1 do + if i > g and suff[i + m - f] < i - g then + suff[i] = suff[i + m - f] + else + if i < g then g = i end if + f = i + while g >= 1 and pat[g] == pat[g + m - f] do + g -= 1; + end while + suff[i] = f - g + end if + end for + return suff + end function -function preBmGs(string pat) - integer m = length(pat), j = 1 - sequence suff = suffixes(pat), - bmGs = repeat(m,m) - for i=m to 1 by -1 do - if (suff[i] == i) then - while j < m - i do - if (bmGs[j] == m) then - bmGs[j] = m - i; - end if - j += 1 - end while - end if - end for - for i=1 to m-1 do - bmGs[m - suff[i]] = m - i; - end for - return bmGs -end function + function preBmGs(string pat) + integer m = length(pat), j = 1 + sequence suff = suffixes(pat), + bmGs = repeat(m,m) + for i=m to 1 by -1 do + if (suff[i] == i) then + while j < m - i do + if (bmGs[j] == m) then + bmGs[j] = m - i; + end if + j += 1 + end while + end if + end for + for i=1 to m-1 do + bmGs[m - suff[i]] = m - i; + end for + return bmGs + end function -procedure BM(string pat, s, bool case_insensitive = false) - string pins = sprintf("`%s` in `%s`",{pat,shorten(s,"characters",10)}) - if case_insensitive then - pat = lower(pat) - s = lower(s) - end if - /* Preprocessing */ - sequence bmGs = preBmGs(pat), - bmBc = preBmBc(pat) - /* Searching */ - sequence res = {} - integer i, j = 0, - n = length(s), - m = length(pat), - cc = 0 - while j <= n - m do - for i=m to 1 by -1 do - cc += 1 - if pat[i]!=s[i+j] then exit end if - end for - if i<1 then - res &= j+1 - j += bmGs[1]; - else - j += max(bmGs[i], bmBc[s[i + j]] - m + i); - end if - end while - string ccs = sprintf("(%d character comparisons)",cc) - if length(res) then - string many = ordinant(length(res)) - printf(1,"Found %s %s at %v %s\n",{pins,many,res,ccs}) - else - printf(1,"No %s %s\n",{pins,ccs}) - end if -end procedure + procedure BM(string pat, s, bool case_insensitive = false) + string pins = sprintf("`%s` in `%s`",{pat,shorten(s,"characters",10)}) + if case_insensitive then + pat = lower(pat) + s = lower(s) + end if + /* Preprocessing */ + sequence bmGs = preBmGs(pat), + bmBc = preBmBc(pat) + /* Searching */ + sequence res = {} + integer i, j = 0, + n = length(s), + m = length(pat), + cc = 0 + while j <= n - m do + for i=m to 1 by -1 do + cc += 1 + if pat[i]!=s[i+j] then exit end if + end for + if i<1 then + res &= j+1 + j += bmGs[1]; + else + j += max(bmGs[i], bmBc[s[i + j]] - m + i); + end if + end while + string ccs = sprintf("(%d character comparisons)",cc) + if length(res) then + string many = ordinant(length(res)) + printf(1,"Found %s %s at %v %s\n",{pins,many,res,ccs}) + else + printf(1,"No %s %s\n",{pins,ccs}) + end if + end procedure -BM("GCAGAGAG","GCATCGCAGAGAGTATACAGTACG") -BM("TCTA","GCTAGCTCTACGAGTCTA") -BM("TAATAAA","GGCTATAATGCGTA") -BM("word","there would have been a time for such a word") -BM("needle","needle need noodle needle") -constant book = "InhisbookseriesTheArtofComputerProgrammingpublishedbyAddisonWesley"& - "DKnuthusesanimaginarycomputertheMIXanditsassociatedmachinecodeand"& - "assemblylanguagestoillustratetheconceptsandalgorithmsastheyarepresented" -BM("put",book) -BM("and",book) -constant farm = "Nearby farms grew a half acre of alfalfa on the dairy's behalf, with "& - "bales of all that alfalfa exchanged for milk." -BM("alfalfa",farm) ---BM("aLfAlfa",farm) -- none ---BM("aLfAlfa",farm,true) -- as -2 + BM("GCAGAGAG","GCATCGCAGAGAGTATACAGTACG") + BM("TCTA","GCTAGCTCTACGAGTCTA") + BM("TAATAAA","GGCTATAATGCGTA") + BM("word","there would have been a time for such a word") + BM("needle","needle need noodle needle") + constant book = "InhisbookseriesTheArtofComputerProgrammingpublishedbyAddisonWesley"& + "DKnuthusesanimaginarycomputertheMIXanditsassociatedmachinecodeand"& + "assemblylanguagestoillustratetheconceptsandalgorithmsastheyarepresented" + BM("put",book) + BM("and",book) + constant farm = "Nearby farms grew a half acre of alfalfa on the dairy's behalf, with "& + "bales of all that alfalfa exchanged for milk." + BM("alfalfa",farm) + --BM("aLfAlfa",farm) -- none + --BM("aLfAlfa",farm,true) -- as -2 + + with javascript_semantics + function same_digits(integer n, b) + integer f = remainder(n,b) + n = floor(n/b) + while n>0 do + if remainder(n,b)!=f then return false end if + n = floor(n/b) + end while + return true + end function -function is_brazilian(integer n) - if n>=7 then - if remainder(n,2)=0 then return true end if - for b=2 to n-2 do - if same_digits(n,b) then return true end if - end for - end if - return false -end function + function is_brazilian(integer n) + if n>=7 then + if remainder(n,2)=0 then return true end if + for b=2 to n-2 do + if same_digits(n,b) then return true end if + end for + end if + return false + end function -constant kinds = {" ", " odd ", " prime "} -for i=1 to length(kinds) do - printf(1,"First 20%sBrazilian numbers:\n", {kinds[i]}) - integer c = 0, n = 7, p = 4 - while true do - if is_brazilian(n) then - printf(1,"%d ",n) - c += 1 - if c==20 then - printf(1,"\n\n") - exit - end if - end if - switch i - case 1: n += 1 - case 2: n += 2 - case 3: p += 1; n = get_prime(p) - end switch - end while -end for + constant kinds = {" ", " odd ", " prime "} + for i=1 to length(kinds) do + printf(1,"First 20%sBrazilian numbers:\n", {kinds[i]}) + integer c = 0, n = 7, p = 4 + while true do + if is_brazilian(n) then + printf(1,"%d ",n) + c += 1 + if c==20 then + printf(1,"\n\n") + exit + end if + end if + switch i + case 1: n += 1 + case 2: n += 2 + case 3: p += 1; n = get_prime(p) + end switch + end while + end for -integer n = 7, c = 0 -atom t0 = time(), t1 = time()+1 -while c<100000 do - if platform()!=JS and time()>t1 then - printf(1,"checking %d [count:%d]...\r",{n,c}) - t1 = time()+1 - end if - c += is_brazilian(n) - n += 1 -end while -printf(1,"The %,dth Brazilian number: %d\n", {c,n-1}) -?elapsed(time()-t0) + integer n = 7, c = 0 + atom t0 = time(), t1 = time()+1 + while c<100000 do + if platform()!=JS and time()>t1 then + printf(1,"checking %d [count:%d]...\r",{n,c}) + t1 = time()+1 + end if + c += is_brazilian(n) + n += 1 + end while + printf(1,"The %,dth Brazilian number: %d\n", {c,n-1}) + ?elapsed(time()-t0) + + without js -- (no class under p2js) + class test + private string msg = "this is a test" + procedure show() ?this.msg end procedure + end class + test t = new() + t.show() + --?t.msg -- illegal + --t.msg = "this is broken" -- illegal + include builtins\structs.e as structs + constant ctx = routine_id("test") -- magic/context + --constant ctx = "test" -- also works + --constant ctx = test -- also works + ?structs:fetch_field(t,"msg",ctx)&" (with some magic)" + structs:store_field(t,"msg","this breaks privacy",ctx) + t.show() + + -- + -- demo\rosetta\BrilliantNumbers.exw + -- ================================= + -- + with javascript_semantics + requires("1.0.2") -- (for in) + atom t0 = time() -function get_primes_by_digits(integer limit) - sequence primes = get_primes_le(power(10,limit)), - primes_by_digits = {} - integer p = 10 - while length(primes) do - integer pi = abs(binary_search(p,primes))-1 - primes_by_digits &= {primes[1..pi]} - primes = primes[pi+1..$] - p*= 10 - end while - return primes_by_digits -end function -sequence primes_by_digits = get_primes_by_digits(8) + function get_primes_by_digits(integer limit) + sequence primes = get_primes_le(power(10,limit)), + primes_by_digits = {} + integer p = 10 + while length(primes) do + integer pi = abs(binary_search(p,primes))-1 + primes_by_digits &= {primes[1..pi]} + primes = primes[pi+1..$] + p*= 10 + end while + return primes_by_digits + end function + sequence primes_by_digits = get_primes_by_digits(8) -procedure first100() - sequence brilliant_numbers = {} - for primes in primes_by_digits do - for i=1 to length(primes) do ---see talk page --- for j=i to length(primes) do - for j=1 to i do - brilliant_numbers &= primes[i]*primes[j] - end for - end for - if length(brilliant_numbers)>=100 then exit end if - end for - brilliant_numbers = sort(brilliant_numbers)[1..100] - sequence j100 = join_by(brilliant_numbers,1,10," ","\n","%,5d") - printf(1,"First 100 brilliant numbers:\n%s\n\n",{j100}) -end procedure -first100() + procedure first100() + sequence brilliant_numbers = {} + for primes in primes_by_digits do + for i=1 to length(primes) do + --see talk page + -- for j=i to length(primes) do + for j=1 to i do + brilliant_numbers &= primes[i]*primes[j] + end for + end for + if length(brilliant_numbers)>=100 then exit end if + end for + brilliant_numbers = sort(brilliant_numbers)[1..100] + sequence j100 = join_by(brilliant_numbers,1,10," ","\n","%,5d") + printf(1,"First 100 brilliant numbers:\n%s\n\n",{j100}) + end procedure + first100() -atom pwr = 10, count = 0 -for p=1 to 2*length(primes_by_digits)-1 do - sequence primes = primes_by_digits[floor(p/2)+1] - atom pos = count+1, - min_product = 0 - for i=1 to length(primes) do - integer p1 = primes[i], - j = abs(binary_search(floor((pwr+p1-1)/p1),primes,i)) - if j<=length(primes) then -- (always is, I think) - integer p2 = primes[j] - atom prod = p1*p2 - if min_product=0 or prod=p2 then exit end if - end if - end for - printf(1,"First brilliant number >= 10^%d is %,d at position %,d\n", {p, min_product, pos}) - pwr *= 10; - if odd(p) then - integer size = length(primes) - count += size * (size + 1) / 2; - end if -end for -?elapsed(time()-t0) -{} = wait_key() + atom pwr = 10, count = 0 + for p=1 to 2*length(primes_by_digits)-1 do + sequence primes = primes_by_digits[floor(p/2)+1] + atom pos = count+1, + min_product = 0 + for i=1 to length(primes) do + integer p1 = primes[i], + j = abs(binary_search(floor((pwr+p1-1)/p1),primes,i)) + if j<=length(primes) then -- (always is, I think) + integer p2 = primes[j] + atom prod = p1*p2 + if min_product=0 or prod<min_product then + min_product = prod + end if + pos += j-i + if p1>=p2 then exit end if + end if + end for + printf(1,"First brilliant number >= 10^%d is %,d at position %,d\n", {p, min_product, pos}) + pwr *= 10; + if odd(p) then + integer size = length(primes) + count += size * (size + 1) / 2; + end if + end for + ?elapsed(time()-t0) + {} = wait_key() + ", encoded - print *, " index = ", index - decoded = Decode(encoded, index) - print *, "---> ", decoded - deallocate(encoded) - end subroutine Test - -end program BurrowsWheeler diff --git a/Task/Burrows-Wheeler-transform/JavaScript/burrows-wheeler-transform.js b/Task/Burrows-Wheeler-transform/JavaScript/burrows-wheeler-transform.js deleted file mode 100644 index dc7efff102..0000000000 --- a/Task/Burrows-Wheeler-transform/JavaScript/burrows-wheeler-transform.js +++ /dev/null @@ -1,76 +0,0 @@ -class BWT { - static STX = "\u0002"; - static ETX = "\u0003"; - - static bwt(s) { - if (s.includes(BWT.STX) || s.includes(BWT.ETX)) { - throw new Error("String cannot contain STX or ETX"); - } - - const ss = BWT.STX + s + BWT.ETX; - const table = []; - for (let i = 0; i < ss.length; i++) { - const before = ss.substring(i); - const after = ss.substring(0, i); - table.push(before + after); - } - table.sort(); - - let sb = ""; - for (const str of table) { - sb += str.charAt(str.length - 1); - } - return sb; - } - - static ibwt(r) { - const len = r.length; - const table = []; - for (let i = 0; i < len; ++i) { - table.push(""); - } - for (let j = 0; j < len; ++j) { - for (let i = 0; i < len; ++i) { - table[i] = r.charAt(i) + table[i]; - } - table.sort(); - } - for (const row of table) { - if (row.endsWith(BWT.ETX)) { - return row.substring(1, len - 1); - } - } - return ""; - } - - static makePrintable(s) { - // substitute ^ for STX and | for ETX to print results - return s.replace(BWT.STX, "^").replace(BWT.ETX, "|"); - } - - static main() { - const tests = [ - "banana", - "appellee", - "dogwood", - "TO BE OR NOT TO BE OR WANT TO BE OR NOT?", - "SIX.MIXED.PIXIES.SIFT.SIXTY.PIXIE.DUST.BOXES", - "\u0002ABC\u0003" - ]; - for (const test of tests) { - console.log(BWT.makePrintable(test)); - process.stdout.write(" --> "); - let t = ""; - try { - t = BWT.bwt(test); - console.log(BWT.makePrintable(t)); - } catch (e) { - console.log("ERROR: " + e.message); - } - const r = BWT.ibwt(t); - console.log(` --> ${r}\n`); - } - } -} - -BWT.main(); diff --git a/Task/Burrows-Wheeler-transform/Jq/burrows-wheeler-transform-1.jq b/Task/Burrows-Wheeler-transform/Jq/burrows-wheeler-transform-1.jq index 4151d553f4..1f34d0aec0 100644 --- a/Task/Burrows-Wheeler-transform/Jq/burrows-wheeler-transform-1.jq +++ b/Task/Burrows-Wheeler-transform/Jq/burrows-wheeler-transform-1.jq @@ -20,6 +20,6 @@ def ibwt: | length as $len | reduce range(0;$len) as $i ([]; reduce range(0; $len) as $j (.; - .[$j] = $r[$j:$j+1] + .[$j]) | sort) + .[$j] = $r[$j:$j+1] + .[$j]) | sort) | first( .[] | select(endswith("\u0003"))) | .[1:-1] ; diff --git a/Task/Burrows-Wheeler-transform/Julia/burrows-wheeler-transform.jl b/Task/Burrows-Wheeler-transform/Julia/burrows-wheeler-transform.julia similarity index 100% rename from Task/Burrows-Wheeler-transform/Julia/burrows-wheeler-transform.jl rename to Task/Burrows-Wheeler-transform/Julia/burrows-wheeler-transform.julia diff --git a/Task/Burrows-Wheeler-transform/Kotlin/burrows-wheeler-transform.kts b/Task/Burrows-Wheeler-transform/Kotlin/burrows-wheeler-transform.kotlin similarity index 100% rename from Task/Burrows-Wheeler-transform/Kotlin/burrows-wheeler-transform.kts rename to Task/Burrows-Wheeler-transform/Kotlin/burrows-wheeler-transform.kotlin diff --git a/Task/Burrows-Wheeler-transform/Ksh/burrows-wheeler-transform.ksh b/Task/Burrows-Wheeler-transform/Ksh/burrows-wheeler-transform.ksh index dd2d4c0c0b..97c9efba0f 100644 --- a/Task/Burrows-Wheeler-transform/Ksh/burrows-wheeler-transform.ksh +++ b/Task/Burrows-Wheeler-transform/Ksh/burrows-wheeler-transform.ksh @@ -2,12 +2,12 @@ # Burrows–Wheeler transform -# # Variables: +# # Variables: # export LC_COLLATE=POSIX -STX=\^ # start marker -ETX=\| # end marker +STX=\^ # start marker +ETX=\| # end marker typeset -a str str[0]='BANANA' @@ -17,75 +17,75 @@ str[3]='TO BE OR NOT TO BE OR WANT TO BE OR NOT?' str[4]='SIX.MIXED.PIXIES.SIFT.SIXTY.PIXIE.DUST.BOXES' str[5]='|ABC^' -# # Functions: +# # Functions: # -# # Function _bwt(str, arr, lc) - sort all circular shifts of arr, return last col +# # Function _bwt(str, arr, lc) - sort all circular shifts of arr, return last col # function _bwt { - typeset _str ; _str="$1" - typeset _arr ; nameref _arr="$2" - typeset _lastcol ; nameref _lastcol="$3" - typeset _i _j _newstr ; integer _i _j + typeset _str ; _str="$1" + typeset _arr ; nameref _arr="$2" + typeset _lastcol ; nameref _lastcol="$3" + typeset _i _j _newstr ; integer _i _j - [[ ${_str} == *+("$STX"|"$ETX")* ]] && return 1 + [[ ${_str} == *+("$STX"|"$ETX")* ]] && return 1 + + _str="$STX${_str}$ETX" + for ((_i=0; _i<${#_str}; _i++)); do + _newstr=${_str:${#_str}-1:1} + for ((_j=0; _j<${#_str}-1; _j++)); do + _newstr+=${_str:${_j}:1} + done + _arr+=( "${_newstr}" ) + _str="${_newstr}" + done - _str="$STX${_str}$ETX" - for ((_i=0; _i<${#_str}; _i++)); do - _newstr=${_str:${#_str}-1:1} - for ((_j=0; _j<${#_str}-1; _j++)); do - _newstr+=${_str:${_j}:1} - done - _arr+=( "${_newstr}" ) - _str="${_newstr}" - done + set -sA arr # Sort arr - set -sA arr # Sort arr - - for ((_i=0; _i<${#_arr[*]}; _i++)); do - _lastcol+=${_arr[_i]:${#_arr[_i]}-1:1} - done + for ((_i=0; _i<${#_arr[*]}; _i++)); do + _lastcol+=${_arr[_i]:${#_arr[_i]}-1:1} + done } -# # Function _ibwt(str) - inverse bwt +# # Function _ibwt(str) - inverse bwt # function _ibwt { - typeset _str ; _str="$1" - typeset _arr _vec _ret _i ; typeset -a _arr _vec ; integer _i + typeset _str ; _str="$1" + typeset _arr _vec _ret _i ; typeset -a _arr _vec ; integer _i - _intovec "${_str}" _vec - for ((_i=1; _i<${#_str}; _i++)); do - _intoarr _vec _arr - set -sA _arr - done + _intovec "${_str}" _vec + for ((_i=1; _i<${#_str}; _i++)); do + _intoarr _vec _arr + set -sA _arr + done - for ((_i=0; _i<${#arr[*]}; _i++)); do - [[ "${arr[_i]}" == ${STX}*${ETX} ]] && echo "${arr[_i]}" && return - done + for ((_i=0; _i<${#arr[*]}; _i++)); do + [[ "${arr[_i]}" == ${STX}*${ETX} ]] && echo "${arr[_i]}" && return + done } -# # Function _intovec(str, vec) - trans str into vec[] +# # Function _intovec(str, vec) - trans str into vec[] # function _intovec { - typeset _str ; _str="$1" - typeset _vec ; nameref _vec="$2" - typeset _i ; integer _i + typeset _str ; _str="$1" + typeset _vec ; nameref _vec="$2" + typeset _i ; integer _i - for ((_i=0; _i<${#_str}; _i++)); do - _vec+=( "${_str:${_i}:1}" ) - done + for ((_i=0; _i<${#_str}; _i++)); do + _vec+=( "${_str:${_i}:1}" ) + done } -# # Function _intoarr(i, vec, arr) - insert vec into arr +# # Function _intoarr(i, vec, arr) - insert vec into arr # function _intoarr { - typeset _vec ; nameref _vec="$1" - typeset _arr ; nameref _arr="$2" - typeset _j ; integer _j + typeset _vec ; nameref _vec="$1" + typeset _arr ; nameref _arr="$2" + typeset _j ; integer _j - for ((_j=0; _j<${#_vec[*]}; _j++)); do - _arr="${_vec[_j]}${_arr[_j]}" - done + for ((_j=0; _j<${#_vec[*]}; _j++)); do + _arr="${_vec[_j]}${_arr[_j]}" + done } ###### @@ -93,14 +93,14 @@ function _intoarr { ###### for ((i=0; i<${#str[*]}; i++)); do - unset arr lastcol result ; typeset -a arr + unset arr lastcol result ; typeset -a arr - print -- "${str[i]}" - _bwt "${str[i]}" arr lastcol - (( $? )) && print "ERROR: string cannot contain $STX or $ETX" && continue + print -- "${str[i]}" + _bwt "${str[i]}" arr lastcol + (( $? )) && print "ERROR: string cannot contain $STX or $ETX" && continue - print -- "${lastcol}" - result=$(_ibwt "${lastcol}") - print -- "${result}" - echo + print -- "${lastcol}" + result=$(_ibwt "${lastcol}") + print -- "${result}" + echo done diff --git a/Task/Burrows-Wheeler-transform/Phix/burrows-wheeler-transform.phix b/Task/Burrows-Wheeler-transform/Phix/burrows-wheeler-transform.phix index cd5ab9b110..24245c2262 100644 --- a/Task/Burrows-Wheeler-transform/Phix/burrows-wheeler-transform.phix +++ b/Task/Burrows-Wheeler-transform/Phix/burrows-wheeler-transform.phix @@ -1,145 +1,147 @@ --- demo\rosetta\burrows_wheeler.exw ---/* -The traditional method: +(phixonline)--> + -- demo\rosetta\burrows_wheeler.exw + --/* + The traditional method: - 7 banana$ $banana 6 - 6 $banana ===> a$banan 5 - 5 a$banan ana$ban 3 - 4 na$bana sort anana$b 1 - 3 ana$ban banana$ 7 - 2 nana$ba ===> na$bana 4 - 1 anana$b nana$ba 2 - ^ desired answer == "annb$aa" + 7 banana$ $banana 6 + 6 $banana ===> a$banan 5 + 5 a$banan ana$ban 3 + 4 na$bana sort anana$b 1 + 3 ana$ban banana$ 7 + 2 nana$ba ===> na$bana 4 + 1 anana$b nana$ba 2 + ^ desired answer == "annb$aa" -First ignore the numbers: the desired answer is found by creating a table of all -rotations of "banana$", sorting it, and then extracting the right-hand column. + First ignore the numbers: the desired answer is found by creating a table of all + rotations of "banana$", sorting it, and then extracting the right-hand column. -However, there is no need to actually create such a table, which could be very -expensive for long strings, instead just number them logically (admittedly that -was somewhat arbitrarily chosen to get the indexes to work out nicely, I picked -the original index of the last character), and perform a custom sort on those. + However, there is no need to actually create such a table, which could be very + expensive for long strings, instead just number them logically (admittedly that + was somewhat arbitrarily chosen to get the indexes to work out nicely, I picked + the original index of the last character), and perform a custom sort on those. -The latter effectively just recreates the rotations one character at a time until -there is a mismatch (which there always will be since there is only one $). -The left hand column is my arbitrary numbering scheme and the right hand column -is those sorted into order, which is also the indexes to the original string of -the characters that we want. + The latter effectively just recreates the rotations one character at a time until + there is a mismatch (which there always will be since there is only one $). + The left hand column is my arbitrary numbering scheme and the right hand column + is those sorted into order, which is also the indexes to the original string of + the characters that we want. -The code below uses $ as the terminator, but eg 1 (== '\#01') should be fine, -except of course for the display of that on a console. ---*/ -with javascript_semantics -constant terminator = '$' + The code below uses $ as the terminator, but eg 1 (== '\#01') should be fine, + except of course for the display of that on a console. + --*/ + with javascript_semantics + constant terminator = '$' -function rot_sort(integer i,j, sequence s) --- i,j are indexes of the last character, so bump before first compare. --- eg/ie rot_sort(i,j,s) should yield compare(rotate(s,i),rotate(s,j)), --- as in rot_sort(7,6,"banana$") == compare("banana$","$banana") --- - but one character at a time rather than constructing both. - integer l = length(s) - while true do - i = mod(i,l)+1 - j = mod(j,l)+1 - integer c = compare(s[i],s[j]) - if c!=0 then return c end if - end while -end function + function rot_sort(integer i,j, sequence s) + -- i,j are indexes of the last character, so bump before first compare. + -- eg/ie rot_sort(i,j,s) should yield compare(rotate(s,i),rotate(s,j)), + -- as in rot_sort(7,6,"banana$") == compare("banana$","$banana") + -- - but one character at a time rather than constructing both. + integer l = length(s) + while true do + i = mod(i,l)+1 + j = mod(j,l)+1 + integer c = compare(s[i],s[j]) + if c!=0 then return c end if + end while + end function -function burrows_wheeler_transform(string s) - if find(terminator,s) then return "error" end if - s &= terminator - integer l = length(s) - sequence t = custom_sort(routine_id("rot_sort"),tagset(l),{s}) - string res = repeat(' ',l) - for i=1 to l do - res[i] = s[t[i]] - end for - return res -end function + function burrows_wheeler_transform(string s) + if find(terminator,s) then return "error" end if + s &= terminator + integer l = length(s) + sequence t = custom_sort(routine_id("rot_sort"),tagset(l),{s}) + string res = repeat(' ',l) + for i=1 to l do + res[i] = s[t[i]] + end for + return res + end function ---/* -Inversion. The traditional method is add column and sort, seven times, -to reconstruct the table above, then pick the entry that ends with the -marker. Showing that technique in full detail here is not helpful, and -like above that would be hideously inefficient for large strings. + --/* + Inversion. The traditional method is add column and sort, seven times, + to reconstruct the table above, then pick the entry that ends with the + marker. Showing that technique in full detail here is not helpful, and + like above that would be hideously inefficient for large strings. - $banana 1 $ (1 ) a 2 - a$banan 2 a ( 1) n 6 - ana$ban 3 a ( 2) n 7 - anana$b 4 a ( 3) b 5 - banana$ 5 b $ 1 - na$bana 6 n (2 ) a 3 - nana$ba 7 n (3 ) a 4 - ^ ^ ^ ^ ^ - f l f l t + $banana 1 $ (1 ) a 2 + a$banan 2 a ( 1) n 6 + ana$ban 3 a ( 2) n 7 + anana$b 4 a ( 3) b 5 + banana$ 5 b $ 1 + na$bana 6 n (2 ) a 3 + nana$ba 7 n (3 ) a 4 + ^ ^ ^ ^ ^ + f l f l t -However, we already have the last column, and the first is just that -sorted alphabetically, and with just those two, we have all possible -character pairings of the original message. The trick is in figuring -out how to stitch them together in the right order. If you carefully -study the three that end in a, and the three that start in a, notice -the $banan,na$ban,nana$b parts are sorted in the same order, whether -they are prefixed with a or not. That is, the middle (parenthesised) -matching numbers are both 123, not 123 and say 231. It is quite hard -to see that being useful, but eventually the penny should drop. The -right-hand 1 with an a rotated right gives the left-hand 1, and the -same goes for 2 and 3: they are in fact links to the prior pairing. + However, we already have the last column, and the first is just that + sorted alphabetically, and with just those two, we have all possible + character pairings of the original message. The trick is in figuring + out how to stitch them together in the right order. If you carefully + study the three that end in a, and the three that start in a, notice + the $banan,na$ban,nana$b parts are sorted in the same order, whether + they are prefixed with a or not. That is, the middle (parenthesised) + matching numbers are both 123, not 123 and say 231. It is quite hard + to see that being useful, but eventually the penny should drop. The + right-hand 1 with an a rotated right gives the left-hand 1, and the + same goes for 2 and 3: they are in fact links to the prior pairing. -In other words the first a in l always corresponds to the first in f, -the second to the second, and so on, and that (amazingly) forms the -order in which the pairings need to be daisy-chained together. + In other words the first a in l always corresponds to the first in f, + the second to the second, and so on, and that (amazingly) forms the + order in which the pairings need to be daisy-chained together. -Try following (1->)2a->6n->3a->7n->4a->5b->$, == reverse("banana"), -in the above f and t tables. + Try following (1->)2a->6n->3a->7n->4a->5b->$, == reverse("banana"), + in the above f and t tables. -The code below builds a queue of 'a' ({1,6,7}, built backwards) then -we pop {2,3,4} into those slots in t as we find 'a' in f, likewise -for all other letters, forming the links for each pairing as shown. -See the trivial step 3 scan below, then go back and stare at f and -t as shown above, and once again, eventually the penny should drop. -I will admit I had to read ten or so explanations before I got it. ---*/ + The code below builds a queue of 'a' ({1,6,7}, built backwards) then + we pop {2,3,4} into those slots in t as we find 'a' in f, likewise + for all other letters, forming the links for each pairing as shown. + See the trivial step 3 scan below, then go back and stare at f and + t as shown above, and once again, eventually the penny should drop. + I will admit I had to read ten or so explanations before I got it. + --*/ -function inverse_burrows_wheeler(string s) - if find('\0',s) then ?9/0 end if -- (doable, but needs some +1s) - integer l = length(s), c - string f = sort(s) - sequence q = repeat(0,256), -- queue heads (per char) - x = repeat(0,l), -- queue links - t = repeat(0,l) -- reformed/pairing links - -- Step 1. discover/build queues (backwards) - for i=l to 1 by -1 do - c = s[i] - x[i] = q[c] - q[c] = i - end for - -- Step 2. reform/pop char queues into pairing links - for i=1 to l do - c = f[i] - t[q[c]] = i - q[c] = x[q[c]] - end for - -- Step 3. rebuild (backwards) - c = find(terminator,f) - if c=0 then return "error" end if - string res = repeat(' ',l-1) - for i=l-1 to 1 by -1 do - c = t[c] -- (first time in, skip the end marker) - res[i] = f[c] - end for - return res -end function + function inverse_burrows_wheeler(string s) + if find('\0',s) then ?9/0 end if -- (doable, but needs some +1s) + integer l = length(s), c + string f = sort(s) + sequence q = repeat(0,256), -- queue heads (per char) + x = repeat(0,l), -- queue links + t = repeat(0,l) -- reformed/pairing links + -- Step 1. discover/build queues (backwards) + for i=l to 1 by -1 do + c = s[i] + x[i] = q[c] + q[c] = i + end for + -- Step 2. reform/pop char queues into pairing links + for i=1 to l do + c = f[i] + t[q[c]] = i + q[c] = x[q[c]] + end for + -- Step 3. rebuild (backwards) + c = find(terminator,f) + if c=0 then return "error" end if + string res = repeat(' ',l-1) + for i=l-1 to 1 by -1 do + c = t[c] -- (first time in, skip the end marker) + res[i] = f[c] + end for + return res + end function -procedure test(string src) -string enc = burrows_wheeler_transform(src), - dec = inverse_burrows_wheeler(enc) - src = shorten(src,"characters") - enc = shorten(enc,"characters") - dec = shorten(dec,"characters") - printf(1,"original: %s --> %s\n inverse: %s\n",{src,enc,dec}) -end procedure + procedure test(string src) + string enc = burrows_wheeler_transform(src), + dec = inverse_burrows_wheeler(enc) + src = shorten(src,"characters") + enc = shorten(enc,"characters") + dec = shorten(dec,"characters") + printf(1,"original: %s --> %s\n inverse: %s\n",{src,enc,dec}) + end procedure -test("banana") -test("dogwood") -test("TO BE OR NOT TO BE OR WANT TO BE OR NOT?") -test("SIX.MIXED.PIXIES.SIFT.SIXTY.PIXIE.DUST.BOXES") + test("banana") + test("dogwood") + test("TO BE OR NOT TO BE OR WANT TO BE OR NOT?") + test("SIX.MIXED.PIXIES.SIFT.SIXTY.PIXIE.DUST.BOXES") + ") - local t = bwt(test) - if !t then - print("ERROR: String can't contain STX or ETX") - t = "" - else - print(make_printable(t)) - end - local r = ibwt(t) - print($" --> {r}\n") -end diff --git a/Task/Burrows-Wheeler-transform/Rebol/burrows-wheeler-transform.rebol b/Task/Burrows-Wheeler-transform/Rebol/burrows-wheeler-transform.rebol deleted file mode 100644 index c9d62158d6..0000000000 --- a/Task/Burrows-Wheeler-transform/Rebol/burrows-wheeler-transform.rebol +++ /dev/null @@ -1,80 +0,0 @@ -Rebol [ - title: "Rosetta code: Burrows–Wheeler transform" - file: %Burrows–Wheeler_transform.r3 - url: https://rosettacode.org/wiki/Burrows–Wheeler_transform -] - -bwt: function [ - "Burrows–Wheeler Transform" - input [string!] "The original text to encode" -][ - ;; Add sentinel markers: - ;; STX (^(02)) at the front to mark the start - ;; ETX (^(03)) at the end to mark the terminus - ;; These ensure unambiguous reconstruction and a fixed sort position. - input: rejoin [#"^(02)" input #"^(03)"] - len: length? input ;; Length of the sentinel-marked string - rotations: clear [] ;; Will hold all cyclic rotations of the string - ;; Generate all cyclic rotations: - repeat i len [ - append rotations rejoin [ - copy at input i ;; from position i to end - copy/part input i - 1 ;; then from start up to (i-1) - ] - ] - ;; Sort all rotations lexicographically - rotations: sort rotations - transformed: copy "" ;; This will be the BWT output (last column) - ;; Take the last character from each sorted rotation and accumulate - foreach r rotations [ - append transformed last r - ] - ;; Return the "last column" as the BWT-transformed string - transformed -] - - -ibwt: function [ - "Inverse Burrows–Wheeler Transform" - input [string!] "The BWT-produced last column string" -][ - ;; Make a copy so we preserve the original argument - input: copy input - len: length? input ;; Number of rows/characters - ;; Initialise a table (block of strings), initially containing `len` empty strings - table: make block! len - loop len [append table copy ""] - ;; Rebuild rotation table iteratively: - ;; Each iteration: - ;; 1. Prepend each character of last column to corresponding row - ;; 2. Sort the rows - repeat j len [ - repeat i len [ - insert table/:i input/:i ;; insert char from last column at row start - ] - table: sort table ;; keep table lexicographically sorted - ] - ;; After len iterations, table contains all sorted rotations. - ;; The original rotation is the one starting with STX and ending with ETX. - ;; With STX as the smallest char, it will always be the first row (table/1). - if table/1/1 == #"^(02)" [ - ;; Skip STX, copy the rest minus ETX. - ;; `next table/1` skips first char (STX) - ;; `len - 2` excludes both sentinels - copy/part next table/1 len - 2 - ] -] - -; Example usage -foreach text [ - "banana" - "appellee" - "abracadabra" - "TO BE OR NOT TO BE OR WANT TO BE OR NOT?" - "SIX.MIXED.PIXIES.SIFT.SIXTY.PIXIE.DUST.BOXES" -][ - print ["Original text: " mold text] - print ["After transformation: " mold a: bwt text] - print ["After inverse transformation:" mold b: ibwt a lf] - assert [b == text] -] diff --git a/Task/Burrows-Wheeler-transform/Rust/burrows-wheeler-transform.rs b/Task/Burrows-Wheeler-transform/Rust/burrows-wheeler-transform.rust similarity index 100% rename from Task/Burrows-Wheeler-transform/Rust/burrows-wheeler-transform.rs rename to Task/Burrows-Wheeler-transform/Rust/burrows-wheeler-transform.rust diff --git a/Task/Burrows-Wheeler-transform/Uiua/burrows-wheeler-transform.uiua b/Task/Burrows-Wheeler-transform/Uiua/burrows-wheeler-transform.uiua deleted file mode 100644 index e3b6984a28..0000000000 --- a/Task/Burrows-Wheeler-transform/Uiua/burrows-wheeler-transform.uiua +++ /dev/null @@ -1,5 +0,0 @@ -# Apply Burrows–Wheeler transform - -Bwt ← ⌅(⊣⍉⍆≡⌟↻⇡⊸⧻$"\x02_\x03"|↘₁↘₋₁⊢⊙◌⍥(⍆⊸≡˜⊂)⤙˜↯""⊸⧻) -{"banana" "appellee" "abracadabra" "Unusual Uiua"} -≡(&p$"_ > _ > _"⊸°Bwt⊸Bwt) diff --git a/Task/Burrows-Wheeler-transform/V-(Vlang)/burrows-wheeler-transform.v b/Task/Burrows-Wheeler-transform/V-(Vlang)/burrows-wheeler-transform.v deleted file mode 100644 index cc21976c5e..0000000000 --- a/Task/Burrows-Wheeler-transform/V-(Vlang)/burrows-wheeler-transform.v +++ /dev/null @@ -1,65 +0,0 @@ -const tests = [ - "banana", - "appellee", - "dogwood", - "TO BE OR NOT TO BE OR WANT TO BE OR NOT?", - "SIX.MIXED.PIXIES.SIFT.SIXTY.PIXIE.DUST.BOXES", - "\x02ABC\x03" -] - -struct BWT { - mut: - stx string = "\x02" - etx string = "\x03" -} - -fn (bwt BWT) bwt(sg string) !string { - if sg.contains(bwt.stx) || sg.contains(bwt.etx) { - return error("FormatException: String cannot contain STX or ETX") - } - ss := bwt.stx + sg + bwt.etx - mut table := []string{} - for ial in 0 .. ss.len { - before := ss[ial..] - after := ss[..ial] - table << before + after - } - table.sort() - return table.map(it[it.len - 1].ascii_str()).join("") -} - -fn (bwt BWT) ibwt(r string) string { - len := r.len - mut table := []string{len: len, init: ""} - for _ in 0 .. len { - for ial in 0 .. len { - table[ial] = r[ial].ascii_str() + table[ial] - } - table.sort() - } - for row in table { - if row.ends_with(bwt.etx) { return row[1..len - 1] } - } - return "" -} - -fn (bwt BWT) make_printable(sg string) string { - return sg.replace(bwt.stx, "^").replace(bwt.etx, "|") -} - -fn main() { - mut bwt_inst := BWT{} - mut tsg := "" - for idx, test in tests { - println(bwt_inst.make_printable(test)) - print(" --> ") - tsg = bwt_inst.bwt(test) or { - println("ERROR: {$err}") - tsg = "" - continue - } - println(bwt_inst.make_printable(tsg)) - rsg := bwt_inst.ibwt(tsg) - if idx < tests.len { println(" --> $rsg\n") } else { println(" --> $rsg") } - } -} diff --git a/Task/Burrows-Wheeler-transform/Zkl/burrows-wheeler-transform-1.zkl b/Task/Burrows-Wheeler-transform/Zkl/burrows-wheeler-transform-1.zkl index cc528094ee..c99add158b 100644 --- a/Task/Burrows-Wheeler-transform/Zkl/burrows-wheeler-transform-1.zkl +++ b/Task/Burrows-Wheeler-transform/Zkl/burrows-wheeler-transform-1.zkl @@ -4,13 +4,13 @@ class BurrowsWheelerTransform{ _assert_(not str.holds(special), "String cannot contain char \"%s\"".fmt(special) ); str=str.append(special); str.len().pump(List().merge,'wrap(n){ String(str[n,*],str[0,n]) }) - .pump(String,T("get",-1)); // last char of each "permutation" + .pump(String,T("get",-1)); // last char of each "permutation" } fcn decode(str){ - table:=List.createLong(str.len(),""); // ("",""..), mutable + table:=List.createLong(str.len(),""); // ("",""..), mutable do(str.len()){ - foreach n in (str.len()){ table[n]=str[n] + table[n] } - table.sort(); + foreach n in (str.len()){ table[n]=str[n] + table[n] } + table.sort(); } // --> ("$dogwood","d$dogwoo","dogwood$",...) table.filter1("%s*".fmt(special).glob)[1,*]; // str[0]==$, often first element } diff --git a/Task/CRC-32/11l/crc-32.11l b/Task/CRC-32/11l/crc-32.11l index 62304e3579..c73b4661a0 100644 --- a/Task/CRC-32/11l/crc-32.11l +++ b/Task/CRC-32/11l/crc-32.11l @@ -1,5 +1,5 @@ V crc_table = [0] * 256 -L(i) 0.<256 +L(i) 256 UInt32 rem = i L 8 I rem [&] 1 != 0 diff --git a/Task/CRC-32/ALGOL-68/crc-32.alg b/Task/CRC-32/ALGOL-68/crc-32.alg index 3020332f39..6e949b4d94 100644 --- a/Task/CRC-32/ALGOL-68/crc-32.alg +++ b/Task/CRC-32/ALGOL-68/crc-32.alg @@ -32,7 +32,7 @@ PROC update_crc = (BITS crc, STRING buf) BITS: PROC hex = (BITS x) STRING : BEGIN - PROC hexdig = (BITS x) CHAR: REPR (IF ABS x <= 9 THEN ABS x + ABS "0" + PROC hexdig = (BITS x) CHAR: REPR (IF ABS x ≤ 9 THEN ABS x + ABS "0" ELSE ABS x - 10 + ABS "a" FI); STRING h := ""; @@ -40,7 +40,7 @@ PROC update_crc = (BITS crc, STRING buf) BITS: h := "0" ELSE BITS n := x; - WHILE h := hexdig (n AND 16rf) + h; n /= 16r0 DO + WHILE h := hexdig (n AND 16rf) + h; n ≠ 16r0 DO n := n SHR 4 OD FI; diff --git a/Task/CRC-32/Ada/crc-32.adb b/Task/CRC-32/Ada/crc-32.ada similarity index 100% rename from Task/CRC-32/Ada/crc-32.adb rename to Task/CRC-32/Ada/crc-32.ada diff --git a/Task/CRC-32/COBOL/crc-32.cob b/Task/CRC-32/COBOL/crc-32.cobol similarity index 100% rename from Task/CRC-32/COBOL/crc-32.cob rename to Task/CRC-32/COBOL/crc-32.cobol diff --git a/Task/CRC-32/Crystal/crc-32.cr b/Task/CRC-32/Crystal/crc-32.crystal similarity index 100% rename from Task/CRC-32/Crystal/crc-32.cr rename to Task/CRC-32/Crystal/crc-32.crystal diff --git a/Task/CRC-32/Delphi/crc-32.pas b/Task/CRC-32/Delphi/crc-32.delphi similarity index 100% rename from Task/CRC-32/Delphi/crc-32.pas rename to Task/CRC-32/Delphi/crc-32.delphi diff --git a/Task/CRC-32/EasyLang/crc-32.easy b/Task/CRC-32/EasyLang/crc-32.easy deleted file mode 100644 index 35d2803aa5..0000000000 --- a/Task/CRC-32/EasyLang/crc-32.easy +++ /dev/null @@ -1,25 +0,0 @@ -global table[] . -proc mktable . - for i = 0 to 0xff - rem = i - for j to 8 - if bitand rem 1 = 1 - rem = bitxor bitshift rem -1 0xedb88320 - else - rem = bitshift rem -1 - . - . - table[] &= rem - . -. -func crc32 s$ . - crc = 0xffffffff - for c$ in strchars s$ - c = strcode c$ - crb = bitxor bitand crc 0xff c - crc = bitxor (bitshift crc -8) table[crb + 1] - . - return bitand bitnot crc 0xffffffff -. -mktable -print crc32 "The quick brown fox jumps over the lazy dog" diff --git a/Task/CRC-32/Elixir/crc-32.ex b/Task/CRC-32/Elixir/crc-32.elixir similarity index 100% rename from Task/CRC-32/Elixir/crc-32.ex rename to Task/CRC-32/Elixir/crc-32.elixir diff --git a/Task/CRC-32/FutureBasic/crc-32.basic b/Task/CRC-32/FutureBasic/crc-32.basic deleted file mode 100644 index 3ca9fab1e9..0000000000 --- a/Task/CRC-32/FutureBasic/crc-32.basic +++ /dev/null @@ -1,46 +0,0 @@ -// -// CRC_32 Checksum -// -// FutureBasic 7.0.34, August 2025 R.W -//---------------------------------------------- - -// Get CRC_32 checksum from a CFstring -// using the standard bits reversed 0x04C11DB7 - -// Verified accuracy using the site -// https://codeshack.io/crc32-checksum-generator/ - -local fn getCRC_32 (textStr As CFStringRef) As UInt32 - UInt32 i, j, crc, byte - crc = 0xFFFFFFFF - - for i = 0 to len(textStr) -1 - byte = ucc(textStr, i) - crc = crc XOR byte - for j = 0 to 7 - if ( crc AND 1 ) - crc = (crc >> 1) XOR 0xEDB88320 - else - crc = crc >> 1 - end if - next - next - crc = crc XOR 0xFFFFFFFF -end fn = crc - - -window 1,@"CRC checksum" - -CFStringRef testString -testString = @"The quick brown fox jumps over the lazy dog" - -UInt32 checksum -checksum = fn getCRC_32(testString) - -print -print @" ";testString -print @" has a checksum of ";hex(checksum) - -handleEvents - -// diff --git a/Task/CRC-32/Haxe/crc-32.hx b/Task/CRC-32/Haxe/crc-32.haxe similarity index 100% rename from Task/CRC-32/Haxe/crc-32.hx rename to Task/CRC-32/Haxe/crc-32.haxe diff --git a/Task/CRC-32/Jq/crc-32-1.jq b/Task/CRC-32/Jq/crc-32-1.jq deleted file mode 100644 index 38abfc0ed9..0000000000 --- a/Task/CRC-32/Jq/crc-32-1.jq +++ /dev/null @@ -1,2 +0,0 @@ -def div($j): - ((. - (. % $j)) / $j) | round; diff --git a/Task/CRC-32/Jq/crc-32-2.jq b/Task/CRC-32/Jq/crc-32-2.jq deleted file mode 100644 index 20a741ca65..0000000000 --- a/Task/CRC-32/Jq/crc-32-2.jq +++ /dev/null @@ -1,34 +0,0 @@ -include "bitwise" {search: "."}; # see above - -# non-negative decimal integer to hex string -def hex: - def stream: - recurse(if . >= 16 then ./16|floor else empty end) | . % 16 ; - [stream] | reverse - | map(if . < 10 then 48 + . else . + 87 end) | implode ; - -### CRC-32 - -def crc32Table: - reduce range(0; 256) as $i ([]; - . + [reduce range(0; 8) as $j ($i; - if bitwise_and(.;1) == 1 - then bitwise_xor(rightshift(1); 3988292384) # 0xedb88320 - else rightshift( 1 ) - end) ] ); - -# Input: an ASCII string -# Output: its CRC-32 -def crc32: - explode as $s - | crc32Table as $table - | reduce range(0; $s|length) as $i (4294967295 ; # ~0 - # 0xff is 255 - bitwise_and(.; 255 ) as $crb - | bitwise_xor( $table[bitwise_xor($crb; $s[$i])] ; rightshift(8)) ) - | flip(32) ; - -def task: - crc32 | hex; - -"The quick brown fox jumps over the lazy dog" | task diff --git a/Task/CRC-32/Julia/crc-32-1.jl b/Task/CRC-32/Julia/crc-32-1.julia similarity index 100% rename from Task/CRC-32/Julia/crc-32-1.jl rename to Task/CRC-32/Julia/crc-32-1.julia diff --git a/Task/CRC-32/Julia/crc-32-2.jl b/Task/CRC-32/Julia/crc-32-2.jl deleted file mode 100644 index 0c99a75649..0000000000 --- a/Task/CRC-32/Julia/crc-32-2.jl +++ /dev/null @@ -1,31 +0,0 @@ -function crc32(crc::Int, str::String) - table = zeros(UInt32, 256) - - for i in 0:255 - tmp = i - for j in 0:7 - if tmp & 1 == 1 - tmp >>= 1 - tmp ⊻= 0xedb88320 - else - tmp >>= 1 - end - end - - table[i+1] = tmp - end - - crc ⊻= 0xffffffff - - for i in UInt32.(collect(str)) - crc = (crc >> 8) ⊻ table[(crc&0xff)⊻i+1] - end - - crc ⊻ 0xffffffff -end - -str = "The quick brown fox jumps over the lazy dog" -crc = crc32(0, str) -@assert(crc == 0x414fa339) -println("Message: ", str) -println("Checksum: ", string(crc, base = 16)) diff --git a/Task/CRC-32/Julia/crc-32-2.julia b/Task/CRC-32/Julia/crc-32-2.julia new file mode 100644 index 0000000000..fb6e0e6953 --- /dev/null +++ b/Task/CRC-32/Julia/crc-32-2.julia @@ -0,0 +1,31 @@ +function crc32(crc::Int, str::String) + table = zeros(UInt32, 256) + + for i in 0:255 + tmp = i + for j in 0:7 + if tmp & 1 == 1 + tmp >>= 1 + tmp ⊻= 0xedb88320 + else + tmp >>= 1 + end + end + + table[i + 1] = tmp + end + + crc ⊻= 0xffffffff + + for i in UInt32.(collect(str)) + crc = (crc >> 8) ⊻ table[(crc & 0xff) ⊻ i + 1] + end + + crc ⊻ 0xffffffff +end + +str = "The quick brown fox jumps over the lazy dog" +crc = crc32(0, str) +assert(crc == 0x414fa339) +println("Message: ", str) +println("Checksum: ", hex(crc)) diff --git a/Task/CRC-32/Kotlin/crc-32.kts b/Task/CRC-32/Kotlin/crc-32.kotlin similarity index 100% rename from Task/CRC-32/Kotlin/crc-32.kts rename to Task/CRC-32/Kotlin/crc-32.kotlin diff --git a/Task/CRC-32/M2000-Interpreter/crc-32-1.m2000 b/Task/CRC-32/M2000-Interpreter/crc-32-1.m2000 index c6073ef05e..52eb55078b 100644 --- a/Task/CRC-32/M2000-Interpreter/crc-32-1.m2000 +++ b/Task/CRC-32/M2000-Interpreter/crc-32-1.m2000 @@ -1,30 +1,25 @@ -odule CheckIt { - crc32 = lambda ->{ - Function PrepareTable { - buffer t as long * 256 - For i = 0 To 255 - k = i - For j = 0 To 7 - If binary.and(k,1)=1 Then - k =binary.Xor(binary.shift(k, -1) , 0xEDB88320) - Else - k=binary.shift(k, -1) - End If - Next - Return t, i:=k - Next - =t - } - = lambda crctable=PrepareTable() (c, buf$) -> { - crc=0xFFFFFFFF-c - For i = 1 To Len(buf$) - crc = binary.xor(binary.shift(crc, -8), eval(crctable, binary.xor(binary.and(crc, 0xff), asc(mid$(buf$, i, 1))))) - Next i - =0xFFFFFFFF-crc - } - }() ' execute now - Print crc32(0, "The quick brown fox jumps over the lazy dog")=0x414fa339& - Print crc32(crc32(0, "The quick brown fox jumps"), " over the lazy dog")=0x414fa339& - Print crc32(crc32(crc32(0, "The qu"), "ick brown"), " fox jumps over the lazy dog")=0x414fa339& +Module CheckIt { + Function PrepareTable { + Dim Base 0, table(256) + For i = 0 To 255 { + k = i + For j = 0 To 7 { + If binary.and(k,1)=1 Then { + k =binary.Xor(binary.shift(k, -1) , 0xEDB88320) + } Else k=binary.shift(k, -1) + } + table(i) = k + } + =table() + } + crctable=PrepareTable() + crc32= lambda crctable (buf$) -> { + crc =0xFFFFFFFF + For i = 0 To Len(buf$) -1 + crc = binary.xor(binary.shift(crc, -8), array(crctable, binary.xor(binary.and(crc, 0xff), asc(mid$(buf$, i+1, 1))))) + Next i + =0xFFFFFFFF-crc + } + Print crc32("The quick brown fox jumps over the lazy dog")=0x414fa339 } CheckIt diff --git a/Task/CRC-32/OCaml/crc-32.ml b/Task/CRC-32/OCaml/crc-32.ocaml similarity index 100% rename from Task/CRC-32/OCaml/crc-32.ml rename to Task/CRC-32/OCaml/crc-32.ocaml diff --git a/Task/CRC-32/PascalABC.NET/crc-32.pas b/Task/CRC-32/PascalABC.NET/crc-32.pas deleted file mode 100644 index de5a336f00..0000000000 --- a/Task/CRC-32/PascalABC.NET/crc-32.pas +++ /dev/null @@ -1,29 +0,0 @@ -type - TCrc32 = array[0..255] of longword; - -function CreateCrcTable(): TCrc32; -begin - for var i: longword := 0 to 255 do - begin - var rem := i; - for var j := 0 to 7 do - if (rem and 1) > 0 then rem := (rem shr 1) xor $edb88320 - else rem := rem shr 1; - result[i] := rem - end; -end; - -const - Crc32Table = CreateCrcTable; - -function Crc32(s: string): longword; -begin - result := $ffffffff; - foreach var c in s do - result := (result shr 8) xor Crc32Table[(result and $ff) xor byte(c)]; - result := not result -end; - -begin - writeln('crc32 = ', crc32('The quick brown fox jumps over the lazy dog').ToString('X')); -end. diff --git a/Task/CRC-32/Pluto/crc-32.pluto b/Task/CRC-32/Pluto/crc-32.pluto deleted file mode 100644 index 310616ad92..0000000000 --- a/Task/CRC-32/Pluto/crc-32.pluto +++ /dev/null @@ -1,5 +0,0 @@ -local crypto = require "crypto" -local fmt = require "fmt" - -local str = "The quick brown fox jumps over the lazy dog" -print(fmt.hex(crypto.crc32(str))) diff --git a/Task/CRC-32/Python/crc-32-1.py b/Task/CRC-32/Python/crc-32-1.py index ff585a4368..5cc64560d7 100644 --- a/Task/CRC-32/Python/crc-32-1.py +++ b/Task/CRC-32/Python/crc-32-1.py @@ -1,8 +1,8 @@ >>> s = 'The quick brown fox jumps over the lazy dog' >>> import zlib ->>> hex(zlib.crc32(s.encode())) +>>> hex(zlib.crc32(s)) '0x414fa339' >>> import binascii ->>> hex(binascii.crc32(s.encode())) +>>> hex(binascii.crc32(s)) '0x414fa339' diff --git a/Task/CRC-32/R/crc-32.r b/Task/CRC-32/R/crc-32.r index 36236927d7..a8bdc5c253 100644 --- a/Task/CRC-32/R/crc-32.r +++ b/Task/CRC-32/R/crc-32.r @@ -1,2 +1 @@ -library(digest) digest("The quick brown fox jumps over the lazy dog","crc32", serialize=F) diff --git a/Task/CRC-32/Rebol/crc-32.rebol b/Task/CRC-32/Rebol/crc-32.rebol deleted file mode 100644 index ac677bfc59..0000000000 --- a/Task/CRC-32/Rebol/crc-32.rebol +++ /dev/null @@ -1,4 +0,0 @@ -sum: checksum "The quick brown fox jumps over the lazy dog" 'crc32 -;== 1095738169 -enbase sum 16 ;; available since 3.19.5 -;== "414FA339" diff --git a/Task/CRC-32/Rust/crc-32.rs b/Task/CRC-32/Rust/crc-32.rust similarity index 100% rename from Task/CRC-32/Rust/crc-32.rs rename to Task/CRC-32/Rust/crc-32.rust diff --git a/Task/CRC-32/Sidef/crc-32.sidef b/Task/CRC-32/Sidef/crc-32.sidef deleted file mode 100644 index 5cd1cdb40c..0000000000 --- a/Task/CRC-32/Sidef/crc-32.sidef +++ /dev/null @@ -1,27 +0,0 @@ -func create_crc32_table { - 256.of {|k| - 8.times { - if (k & 1) { - k >>= 1 - k ^= 0xedb88320 - } - else { - k >>= 1 - } - } - k - } -} - -func crc32(str, crc = 0) { - static crc_table = create_crc32_table() - crc &= 0xffffffff - crc ^= 0xffffffff - str.codes.each {|c| - crc = ((crc >> 8) ^ crc_table[(crc & 0xff) ^ c]) - } - return ((crc & 0xffffffff) ^ 0xffffffff) -} - -say crc32("The quick brown fox jumps over the lazy dog").as_hex -say crc32("over the lazy dog", crc32("The quick brown fox jumps ")).as_hex diff --git a/Task/CRC-32/UNIX-Shell/crc-32-1.sh b/Task/CRC-32/UNIX-Shell/crc-32-1.sh deleted file mode 100644 index d3f1b53f48..0000000000 --- a/Task/CRC-32/UNIX-Shell/crc-32-1.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -declare -i -a CRC32_LOOKUP_TABLE - -__generate_crc_lookup_table() { - local -i -r LSB_CRC32_POLY=0xEDB88320 # The CRC32 polynomal LSB order - local -i index byte lsb - for index in {0..255}; do - ((byte = 255 - index)) - for _ in {0..7}; do # 8-bit lsb shift - ((lsb = byte & 0x01, byte = ((byte >> 1) & 0x7FFFFFFF) ^ (lsb == 0 ? LSB_CRC32_POLY : 0))) - done - ((CRC32_LOOKUP_TABLE[index] = byte)) - done -} -__generate_crc_lookup_table -typeset -r CRC32_LOOKUP_TABLE - -crc32_string() { - [[ ${#} -eq 1 ]] || return - local -i i byte crc=0xFFFFFFFF index - for ((i = 0; i < ${#1}; i++)); do - byte=$(printf '%d' "'${1:i:1}") # Get byte value of character at i - ((index = (crc ^ byte) & 0xFF, crc = (CRC32_LOOKUP_TABLE[index] ^ (crc >> 8)) & 0xFFFFFFFF)) - done - echo $((crc ^ 0xFFFFFFFF)) -} - -printf 'The CRC32 of: %s\nis: 0x%08x\n' "${1}" "$(crc32_string "${1}")" - -# crc32_string "The quick brown fox jumps over the lazy dog" -# yields 414fa339 diff --git a/Task/CRC-32/UNIX-Shell/crc-32-2.sh b/Task/CRC-32/UNIX-Shell/crc-32-2.sh deleted file mode 100644 index 79918e4f81..0000000000 --- a/Task/CRC-32/UNIX-Shell/crc-32-2.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env sh -# POSIX Shell CRC32 of string -# @Name: crc32.sh -# @Version: 1.0.1 -# @Author: Léa Gris -# @Date: Wed, 27 Mar 2019 -# @License: WTFPL http://www.wtfpl.net/ - -# POSIX Shell has no array or string index -# Implementing a pre-computed CRC32 byte indexed look-up table -# would cost more CPU cycles calling external tools like -# awk or tr to index records from a string. - -# Computes the CRC32 of the input data stream -# <&1: The input data stream -# >&1: The CRC32 integer of the input data stream -crc32_stream() { - crc=0xFFFFFFFF # The Initial CRC32 value - p=0xedb88320 # The CRC32 polynomial - r=0 # The polynomial reminder - c='' # The current character - byte=0 # The byte value of the current character - # Iterates each character of the input stream - while c="$(dd bs=1 count=1 2>/dev/null)" && [ -n "$c" ]; do - byte=$(printf '%d' "'$c") # Converts the character into its byte value - r=$(((crc & 0xff) ^ byte)) # XOR LSB of CRC with current byte - # 8-bit lsb shift with XOR polynomial reminder when odd - for _ in _ _ _ _ _ _ _ _; do - t=$((r >> 1)) - r=$(((r & 1) ? t ^ p : t)) - done - crc=$(((crc >> 8) ^ r)) # XOR MSB of CRC with Reminder - done - - # Output CRC32 integer XOR mask 32 bits - echo $((crc ^ 0xFFFFFFFF)) -} - -# Computes the CRC32 of the argument string -# 1: The argument string -# >&1: The CRC32 integer of the argument string -crc32_string() { - [ $# -eq 1 ] || return # argument required - # Streams with printf to prevent suffixing the string - # with a newline, since echo -n is not available in POSIX Shell - printf '%s' "$1" | crc32_stream -} - -printf 'The CRC32 of: %s\nis: %08x\n' "$1" "$(crc32_string "$1")" - -# crc32_string "The quick brown fox jumps over the lazy dog" -# yields 414fa339 diff --git a/Task/CRC-32/Uiua/crc-32.uiua b/Task/CRC-32/Uiua/crc-32.uiua deleted file mode 100644 index c43fd20584..0000000000 --- a/Task/CRC-32/Uiua/crc-32.uiua +++ /dev/null @@ -1,8 +0,0 @@ -String ← "The quick brown fox jumps over the lazy dog" -Key ← ⋕₁₆"1db710640" -InitCRC ← ⋕₁₆"ffffffff" -Xor ← °⋯⬚0≡≠∩⋯ -ShR ← ⍜⋯(⬚0˜↻)⊃⋅∘∘ -Table ← ≡⍥₈(ShR1 ⍥(Xor Key)⊸◿2)⇡256 -⍢(Xor⊃(ShR8|˜⊡Table Xor◿256)⊙°⊂|>0⧻◌) InitCRC -@\0String -°⋕₁₆⍜⋯¬⊙◌ diff --git a/Task/CRC-32/VBScript/crc-32.vbs b/Task/CRC-32/VBScript/crc-32.vb similarity index 100% rename from Task/CRC-32/VBScript/crc-32.vbs rename to Task/CRC-32/VBScript/crc-32.vb diff --git a/Task/CRC-32/Zig/crc-32.zig b/Task/CRC-32/Zig/crc-32.zig index 629dbde918..10a6bf31c1 100644 --- a/Task/CRC-32/Zig/crc-32.zig +++ b/Task/CRC-32/Zig/crc-32.zig @@ -2,6 +2,6 @@ const std = @import("std"); const Crc32Ieee = std.hash.Crc32; pub fn main() !void { - const res: u32 = Crc32Ieee.hash("The quick brown fox jumps over the lazy dog"); + var res: u32 = Crc32Ieee.hash("The quick brown fox jumps over the lazy dog"); std.debug.print("{x}\n", .{res}); } diff --git a/Task/CSV-data-manipulation/00-TASK.txt b/Task/CSV-data-manipulation/00-TASK.txt index f419b925c2..325ca57c4b 100644 --- a/Task/CSV-data-manipulation/00-TASK.txt +++ b/Task/CSV-data-manipulation/00-TASK.txt @@ -21,7 +21,5 @@ For this task we will use the following CSV file:

  • Show how to add a column, headed 'SUM', of the sums of the rows.
  • If possible, illustrate the use of built-in or standard functions, methods, or libraries, that handle generic CSV files. -
    -;Related tasks: -* [[Convert_CSV_records_to_TSV]]

    + diff --git a/Task/CSV-data-manipulation/ALGOL-68/csv-data-manipulation.alg b/Task/CSV-data-manipulation/ALGOL-68/csv-data-manipulation.alg index 97c2d04278..749c7da413 100644 --- a/Task/CSV-data-manipulation/ALGOL-68/csv-data-manipulation.alg +++ b/Task/CSV-data-manipulation/ALGOL-68/csv-data-manipulation.alg @@ -3,8 +3,8 @@ PROC char count = (CHAR c, STRING str) INT: BEGIN INT count := 0; FOR i TO UPB str DO - IF c = str[i] THEN count +:= 1 - FI + IF c = str[i] THEN count +:= 1 + FI OD; count END; @@ -17,9 +17,9 @@ PROC char split = (STRING str, CHAR sep) FLEX[]STRING : INT start := 1; [char count (sep, str) + 1] STRING list; WHILE start <= strlen ANDF char in string (sep, p, str[start:]) DO - p +:= start - 1; - list[cnt +:= 1] := str[start:p-1]; - start := p + 1 + p +:= start - 1; + list[cnt +:= 1] := str[start:p-1]; + start := p + 1 OD; IF cnt = 0 THEN list[cnt +:= 1] := str ELIF start <= UPB str + 1 THEN list[cnt +:= 1] := str[start:] @@ -31,7 +31,7 @@ PROC join = ([]STRING words, STRING sep) STRING: IF UPB words > 0 THEN STRING str := words [1]; FOR i FROM 2 TO UPB words DO - str +:= sep + words[i] + str +:= sep + words[i] OD; str ELSE @@ -60,10 +60,10 @@ OP TOINT = (STRING str) INT: BEGIN INT n := 0, sign := 1; FOR i TO UPB str WHILE sign /= 0 DO - IF is digit (str[i]) THEN n := n * 10 + ABS str[i] - ABS "0" - ELIF i = 1 AND str[i] = "-" THEN sign := -1 - ELIF i /= 1 OR str[i] /= "+" THEN sign := 0 - FI + IF is digit (str[i]) THEN n := n * 10 + ABS str[i] - ABS "0" + ELIF i = 1 AND str[i] = "-" THEN sign := -1 + ELIF i /= 1 OR str[i] /= "+" THEN sign := 0 + FI OD; n * sign END; diff --git a/Task/CSV-data-manipulation/AWK/csv-data-manipulation.awk b/Task/CSV-data-manipulation/AWK/csv-data-manipulation.awk index 5f148a16dd..f45946981e 100644 --- a/Task/CSV-data-manipulation/AWK/csv-data-manipulation.awk +++ b/Task/CSV-data-manipulation/AWK/csv-data-manipulation.awk @@ -6,7 +6,7 @@ NR==1 { } { sum = 0 - for (i=1; i<=NF; i++) { + for (i=1; i<=NF; i++) { sum += $i } print $0, sum diff --git a/Task/CSV-data-manipulation/Ada/csv-data-manipulation-1.adb b/Task/CSV-data-manipulation/Ada/csv-data-manipulation-1.ada similarity index 100% rename from Task/CSV-data-manipulation/Ada/csv-data-manipulation-1.adb rename to Task/CSV-data-manipulation/Ada/csv-data-manipulation-1.ada diff --git a/Task/CSV-data-manipulation/Ada/csv-data-manipulation-2.adb b/Task/CSV-data-manipulation/Ada/csv-data-manipulation-2.ada similarity index 100% rename from Task/CSV-data-manipulation/Ada/csv-data-manipulation-2.adb rename to Task/CSV-data-manipulation/Ada/csv-data-manipulation-2.ada diff --git a/Task/CSV-data-manipulation/Ada/csv-data-manipulation-3.adb b/Task/CSV-data-manipulation/Ada/csv-data-manipulation-3.ada similarity index 100% rename from Task/CSV-data-manipulation/Ada/csv-data-manipulation-3.adb rename to Task/CSV-data-manipulation/Ada/csv-data-manipulation-3.ada diff --git a/Task/CSV-data-manipulation/C/csv-data-manipulation-1.c b/Task/CSV-data-manipulation/C/csv-data-manipulation-1.c index 6f6b83c3bc..060dd21931 100644 --- a/Task/CSV-data-manipulation/C/csv-data-manipulation-1.c +++ b/Task/CSV-data-manipulation/C/csv-data-manipulation-1.c @@ -16,10 +16,10 @@ typedef struct { - char * delim; - unsigned int rows; - unsigned int cols; - char ** table; + char * delim; + unsigned int rows; + unsigned int cols; + char ** table; } CSV; @@ -27,28 +27,28 @@ typedef struct { * Utility function to trim whitespaces from left & right of a string */ int trim(char ** str) { - int trimmed; - int n; - int len; + int trimmed; + int n; + int len; + + len = strlen(*str); + n = len - 1; + /* from right */ + while((n>=0) && isspace((*str)[n])) { + (*str)[n] = '\0'; + trimmed += 1; + n--; + } - len = strlen(*str); - n = len - 1; - /* from right */ - while((n>=0) && isspace((*str)[n])) { - (*str)[n] = '\0'; - trimmed += 1; - n--; - } - - /* from left */ - n = 0; - while((n < len) && (isspace((*str)[0]))) { - (*str)[0] = '\0'; - *str = (*str)+1; - trimmed += 1; - n++; - } - return trimmed; + /* from left */ + n = 0; + while((n < len) && (isspace((*str)[0]))) { + (*str)[0] = '\0'; + *str = (*str)+1; + trimmed += 1; + n++; + } + return trimmed; } @@ -56,11 +56,11 @@ int trim(char ** str) { * De-allocate csv structure */ int csv_destroy(CSV * csv) { - if (csv == NULL) { return 0; } - if (csv->table != NULL) { free(csv->table); } - if (csv->delim != NULL) { free(csv->delim); } - free(csv); - return 0; + if (csv == NULL) { return 0; } + if (csv->table != NULL) { free(csv->table); } + if (csv->delim != NULL) { free(csv->delim); } + free(csv); + return 0; } @@ -68,23 +68,23 @@ int csv_destroy(CSV * csv) { * Allocate memory for a CSV structure */ CSV * csv_create(unsigned int cols, unsigned int rows) { - CSV * csv; + CSV * csv; + + csv = malloc(sizeof(CSV)); + csv->rows = rows; + csv->cols = cols; + csv->delim = strdup(","); - csv = malloc(sizeof(CSV)); - csv->rows = rows; - csv->cols = cols; - csv->delim = strdup(","); + csv->table = malloc(sizeof(char *) * cols * rows); + if (csv->table == NULL) { goto error; } - csv->table = malloc(sizeof(char *) * cols * rows); - if (csv->table == NULL) { goto error; } + memset(csv->table, 0, sizeof(char *) * cols * rows); - memset(csv->table, 0, sizeof(char *) * cols * rows); - - return csv; + return csv; error: - csv_destroy(csv); - return NULL; + csv_destroy(csv); + return NULL; } @@ -92,9 +92,9 @@ error: * Get value in CSV table at COL, ROW */ char * csv_get(CSV * csv, unsigned int col, unsigned int row) { - unsigned int idx; - idx = col + (row * csv->cols); - return csv->table[idx]; + unsigned int idx; + idx = col + (row * csv->cols); + return csv->table[idx]; } @@ -102,84 +102,84 @@ char * csv_get(CSV * csv, unsigned int col, unsigned int row) { * Set value in CSV table at COL, ROW */ int csv_set(CSV * csv, unsigned int col, unsigned int row, char * value) { - unsigned int idx; - idx = col + (row * csv->cols); - csv->table[idx] = value; - return 0; + unsigned int idx; + idx = col + (row * csv->cols); + csv->table[idx] = value; + return 0; } void csv_display(CSV * csv) { - int row, col; - char * content; - if ((csv->rows == 0) || (csv->cols==0)) { - printf("[Empty table]\n"); - return ; - } + int row, col; + char * content; + if ((csv->rows == 0) || (csv->cols==0)) { + printf("[Empty table]\n"); + return ; + } - printf("\n[Table cols=%d rows=%d]\n", csv->cols, csv->rows); - for (row=0; rowrows; row++) { - printf("[|"); - for (col=0; colcols; col++) { - content = csv_get(csv, col, row); + printf("\n[Table cols=%d rows=%d]\n", csv->cols, csv->rows); + for (row=0; rowrows; row++) { + printf("[|"); + for (col=0; colcols; col++) { + content = csv_get(csv, col, row); printf("%s\t|", content); - } + } printf("]\n"); - } - printf("\n"); + } + printf("\n"); } /** * Resize CSV table */ int csv_resize(CSV * old_csv, unsigned int new_cols, unsigned int new_rows) { - unsigned int cur_col, - cur_row, - max_cols, - max_rows; - CSV * new_csv; - char * content; - bool in_old, in_new; + unsigned int cur_col, + cur_row, + max_cols, + max_rows; + CSV * new_csv; + char * content; + bool in_old, in_new; - /* Build a new (fake) csv */ - new_csv = csv_create(new_cols, new_rows); - if (new_csv == NULL) { goto error; } + /* Build a new (fake) csv */ + new_csv = csv_create(new_cols, new_rows); + if (new_csv == NULL) { goto error; } - new_csv->rows = new_rows; - new_csv->cols = new_cols; + new_csv->rows = new_rows; + new_csv->cols = new_cols; - max_cols = (new_cols > old_csv->cols)? new_cols : old_csv->cols; - max_rows = (new_rows > old_csv->rows)? new_rows : old_csv->rows; + max_cols = (new_cols > old_csv->cols)? new_cols : old_csv->cols; + max_rows = (new_rows > old_csv->rows)? new_rows : old_csv->rows; - for (cur_col=0; cur_colcols) && (cur_row < old_csv->rows); - in_new = (cur_col < new_csv->cols) && (cur_row < new_csv->rows); + for (cur_col=0; cur_colcols) && (cur_row < old_csv->rows); + in_new = (cur_col < new_csv->cols) && (cur_row < new_csv->rows); - if (in_old && in_new) { - /* re-link data */ - content = csv_get(old_csv, cur_col, cur_row); - csv_set(new_csv, cur_col, cur_row, content); - } else if (in_old) { - /* destroy data */ - content = csv_get(old_csv, cur_col, cur_row); - free(content); - } else { /* skip */ } - } - } - /* on rows */ - free(old_csv->table); - old_csv->rows = new_rows; - old_csv->cols = new_cols; - old_csv->table = new_csv->table; - new_csv->table = NULL; - csv_destroy(new_csv); + if (in_old && in_new) { + /* re-link data */ + content = csv_get(old_csv, cur_col, cur_row); + csv_set(new_csv, cur_col, cur_row, content); + } else if (in_old) { + /* destroy data */ + content = csv_get(old_csv, cur_col, cur_row); + free(content); + } else { /* skip */ } + } + } + /* on rows */ + free(old_csv->table); + old_csv->rows = new_rows; + old_csv->cols = new_cols; + old_csv->table = new_csv->table; + new_csv->table = NULL; + csv_destroy(new_csv); - return 0; + return 0; error: - printf("Unable to resize CSV table: error %d - %s\n", errno, strerror(errno)); - return -1; + printf("Unable to resize CSV table: error %d - %s\n", errno, strerror(errno)); + return -1; } @@ -187,42 +187,42 @@ error: * Open CSV file and load its content into provided CSV structure **/ int csv_open(CSV * csv, char * filename) { - FILE * fp; - unsigned int m_rows; - unsigned int m_cols, cols; - char line[2048]; - char * lineptr; - char * token; + FILE * fp; + unsigned int m_rows; + unsigned int m_cols, cols; + char line[2048]; + char * lineptr; + char * token; - fp = fopen(filename, "r"); - if (fp == NULL) { goto error; } + fp = fopen(filename, "r"); + if (fp == NULL) { goto error; } - m_rows = 0; - m_cols = 0; - while(fgets(line, sizeof(line), fp) != NULL) { - m_rows += 1; - cols = 0; - lineptr = line; - while ((token = strtok(lineptr, csv->delim)) != NULL) { - lineptr = NULL; - trim(&token); + m_rows = 0; + m_cols = 0; + while(fgets(line, sizeof(line), fp) != NULL) { + m_rows += 1; + cols = 0; + lineptr = line; + while ((token = strtok(lineptr, csv->delim)) != NULL) { + lineptr = NULL; + trim(&token); cols += 1; - if (cols > m_cols) { m_cols = cols; } + if (cols > m_cols) { m_cols = cols; } csv_resize(csv, m_cols, m_rows); csv_set(csv, cols-1, m_rows-1, strdup(token)); } - } + } - fclose(fp); - csv->rows = m_rows; - csv->cols = m_cols; - return 0; + fclose(fp); + csv->rows = m_rows; + csv->cols = m_cols; + return 0; error: - fclose(fp); - printf("Unable to open %s for reading.", filename); - return -1; + fclose(fp); + printf("Unable to open %s for reading.", filename); + return -1; } @@ -230,22 +230,22 @@ error: * Open CSV file and save CSV structure content into it **/ int csv_save(CSV * csv, char * filename) { - FILE * fp; - int row, col; - char * content; + FILE * fp; + int row, col; + char * content; - fp = fopen(filename, "w"); - for (row=0; rowrows; row++) { - for (col=0; colcols; col++) { - content = csv_get(csv, col, row); + fp = fopen(filename, "w"); + for (row=0; rowrows; row++) { + for (col=0; colcols; col++) { + content = csv_get(csv, col, row); fprintf(fp, "%s%s", content, - ((col == csv->cols-1) ? "" : csv->delim) ); - } + ((col == csv->cols-1) ? "" : csv->delim) ); + } fprintf(fp, "\n"); - } + } - fclose(fp); - return 0; + fclose(fp); + return 0; } @@ -253,23 +253,23 @@ int csv_save(CSV * csv, char * filename) { * Test */ int main(int argc, char ** argv) { - CSV * csv; + CSV * csv; - printf("%s\n%s\n\n",TITLE, URL); + printf("%s\n%s\n\n",TITLE, URL); - csv = csv_create(0, 0); - csv_open(csv, "fixtures/csv-data-manipulation.csv"); - csv_display(csv); + csv = csv_create(0, 0); + csv_open(csv, "fixtures/csv-data-manipulation.csv"); + csv_display(csv); - csv_set(csv, 0, 0, "Column0"); - csv_set(csv, 1, 1, "100"); - csv_set(csv, 2, 2, "200"); - csv_set(csv, 3, 3, "300"); - csv_set(csv, 4, 4, "400"); - csv_display(csv); + csv_set(csv, 0, 0, "Column0"); + csv_set(csv, 1, 1, "100"); + csv_set(csv, 2, 2, "200"); + csv_set(csv, 3, 3, "300"); + csv_set(csv, 4, 4, "400"); + csv_display(csv); - csv_save(csv, "tmp/csv-data-manipulation.result.csv"); - csv_destroy(csv); + csv_save(csv, "tmp/csv-data-manipulation.result.csv"); + csv_destroy(csv); - return 0; + return 0; } diff --git a/Task/CSV-data-manipulation/COBOL/csv-data-manipulation.cob b/Task/CSV-data-manipulation/COBOL/csv-data-manipulation.cobol similarity index 100% rename from Task/CSV-data-manipulation/COBOL/csv-data-manipulation.cob rename to Task/CSV-data-manipulation/COBOL/csv-data-manipulation.cobol diff --git a/Task/CSV-data-manipulation/Delphi/csv-data-manipulation.pas b/Task/CSV-data-manipulation/Delphi/csv-data-manipulation.delphi similarity index 100% rename from Task/CSV-data-manipulation/Delphi/csv-data-manipulation.pas rename to Task/CSV-data-manipulation/Delphi/csv-data-manipulation.delphi diff --git a/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-1.duckdb b/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-1.duckdb deleted file mode 100644 index dd05c0680d..0000000000 --- a/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-1.duckdb +++ /dev/null @@ -1,5 +0,0 @@ -create or replace table csv as -from read_csv_auto('rc-csv-data-manipulation.csv'); - -# View the first row of the table: -from csv limit 1; diff --git a/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-2.duckdb b/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-2.duckdb deleted file mode 100644 index 5078ee97a4..0000000000 --- a/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-2.duckdb +++ /dev/null @@ -1,4 +0,0 @@ -copy - (select *, (C1 + C2 + C3 + C4 + C5) as sum - from csv) - to 'junk.csv'; diff --git a/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-3.duckdb b/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-3.duckdb deleted file mode 100644 index b3c1bedcf5..0000000000 --- a/Task/CSV-data-manipulation/DuckDB/csv-data-manipulation-3.duckdb +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE csv ADD COLUMN sum integer; - -UPDATE csv -SET sum = C1 + C2 + C3 + C4 + C5; - -copy csv to 'junk2.csv'; diff --git a/Task/CSV-data-manipulation/ECL/csv-data-manipulation.ecl b/Task/CSV-data-manipulation/ECL/csv-data-manipulation.ecl index 1e1feac64c..b69c763781 100644 --- a/Task/CSV-data-manipulation/ECL/csv-data-manipulation.ecl +++ b/Task/CSV-data-manipulation/ECL/csv-data-manipulation.ecl @@ -5,7 +5,7 @@ STRING Field2; STRING Field3; STRING Field4; STRING Field5; -END; +END; MyDataset := DATASET ('~Rosetta::myCSVFile', MyFileLayout,CSV(SEPARATOR(','))); diff --git a/Task/CSV-data-manipulation/EchoLisp/csv-data-manipulation-1.l b/Task/CSV-data-manipulation/EchoLisp/csv-data-manipulation-1.l index d621e254ba..9afa63c6bb 100644 --- a/Task/CSV-data-manipulation/EchoLisp/csv-data-manipulation-1.l +++ b/Task/CSV-data-manipulation/EchoLisp/csv-data-manipulation-1.l @@ -10,10 +10,12 @@ (define (task file) (let* - ((table (csv->table file)) - (header (first table)) - (rows (rest table))) + ((table (csv->table file)) + (header (first table)) + (rows (rest table))) + + (table->csv + (append header "SUM") ;; add last column + (for/list ((row rows)) (append row (apply + row)))))) - (table->csv - (append header "SUM") ;; add last column - (for/list ((row rows)) (append row (apply + row)))))) + diff --git a/Task/CSV-data-manipulation/Elixir/csv-data-manipulation.ex b/Task/CSV-data-manipulation/Elixir/csv-data-manipulation.elixir similarity index 100% rename from Task/CSV-data-manipulation/Elixir/csv-data-manipulation.ex rename to Task/CSV-data-manipulation/Elixir/csv-data-manipulation.elixir diff --git a/Task/CSV-data-manipulation/Euphoria/csv-data-manipulation.eu b/Task/CSV-data-manipulation/Euphoria/csv-data-manipulation.eu deleted file mode 100644 index 66f5a8b1dd..0000000000 --- a/Task/CSV-data-manipulation/Euphoria/csv-data-manipulation.eu +++ /dev/null @@ -1,91 +0,0 @@ ---- Read CSV file and add columns headed with 'SUM' ---- with trace --- trace(0) - -include get.e -include std/text.e - -function split(sequence s, integer c) - sequence removables = " \t\n\r\x05\u0234\" " - sequence out - integer first, delim - out = {} - first = 1 - while first <= length(s) do - delim = find_from(c,s,first) - if delim = 0 then - delim = length(s)+1 - end if - out = append(out,trim(s[first..delim-1],removables)) - first = delim + 1 - end while - return out -end function - -procedure main() - integer fn -- the file number - integer fn2 -- the output file number - integer e -- the number of lines read - object line -- the next line from the file - sequence data = {} -- parsed csv data row - sequence headerNames = {} -- array saving column names - atom sum = 0.0 -- sum for each row - sequence var -- holds numerical data read - - -- First we try to open the file called "data.csv". - fn = open("data.csv", "r") - if fn = -1 then - puts(1, "Can't open data.csv\n") - -- abort(); - end if - - -- Then we create an output file for processed data. - fn2 = open("newdata.csv", "w") - if fn2 = -1 then - puts(1, "Can't create newdata.csv\n") - end if - - -- By successfully opening the file we have established that - -- the file exists, and open() gives us a file number (or "handle") - -- that we can use to perform operations on the file. - - e = 1 - while 1 do - line = gets(fn) - if atom(line) then - exit - end if - data = split(line, ',') - - if (e=1) then - -- Save the header labels and - -- write them to output file. - headerNames = data - for i=1 to length(headerNames) do - printf(fn2, "%s,", {headerNames[i]}) - end for - printf(fn2, "SUM\n") - end if - - -- Run a sum for the numerical data. - if (e >= 2) then - for i=1 to length(data) do - printf(fn2, "%s,", {data[i]}) - var = value(data[i]) - if var[1] = 0 then - -- data read is numerical - -- add to sum - sum = sum + var[2] - end if - end for - printf(fn2, "%g\n", {sum}) - sum = 0.0 - end if - e = e + 1 - end while - - close(fn) - close(fn2) -end procedure - -main() diff --git a/Task/CSV-data-manipulation/Euphoria/csv-data-manipulation.euphoria b/Task/CSV-data-manipulation/Euphoria/csv-data-manipulation.euphoria new file mode 100644 index 0000000000..85ed288be0 --- /dev/null +++ b/Task/CSV-data-manipulation/Euphoria/csv-data-manipulation.euphoria @@ -0,0 +1,91 @@ +--- Read CSV file and add columns headed with 'SUM' +--- with trace +-- trace(0) + +include get.e +include std/text.e + +function split(sequence s, integer c) + sequence removables = " \t\n\r\x05\u0234\" " + sequence out + integer first, delim + out = {} + first = 1 + while first <= length(s) do + delim = find_from(c,s,first) + if delim = 0 then + delim = length(s)+1 + end if + out = append(out,trim(s[first..delim-1],removables)) + first = delim + 1 + end while + return out +end function + +procedure main() + integer fn -- the file number + integer fn2 -- the output file number + integer e -- the number of lines read + object line -- the next line from the file + sequence data = {} -- parsed csv data row + sequence headerNames = {} -- array saving column names + atom sum = 0.0 -- sum for each row + sequence var -- holds numerical data read + + -- First we try to open the file called "data.csv". + fn = open("data.csv", "r") + if fn = -1 then + puts(1, "Can't open data.csv\n") + -- abort(); + end if + + -- Then we create an output file for processed data. + fn2 = open("newdata.csv", "w") + if fn2 = -1 then + puts(1, "Can't create newdata.csv\n") + end if + + -- By successfully opening the file we have established that + -- the file exists, and open() gives us a file number (or "handle") + -- that we can use to perform operations on the file. + + e = 1 + while 1 do + line = gets(fn) + if atom(line) then + exit + end if + data = split(line, ',') + + if (e=1) then + -- Save the header labels and + -- write them to output file. + headerNames = data + for i=1 to length(headerNames) do + printf(fn2, "%s,", {headerNames[i]}) + end for + printf(fn2, "SUM\n") + end if + + -- Run a sum for the numerical data. + if (e >= 2) then + for i=1 to length(data) do + printf(fn2, "%s,", {data[i]}) + var = value(data[i]) + if var[1] = 0 then + -- data read is numerical + -- add to sum + sum = sum + var[2] + end if + end for + printf(fn2, "%g\n", {sum}) + sum = 0.0 + end if + e = e + 1 + end while + + close(fn) + close(fn2) +end procedure + +main() diff --git a/Task/CSV-data-manipulation/Fortran/csv-data-manipulation-2.f b/Task/CSV-data-manipulation/Fortran/csv-data-manipulation-2.f index 6e400d25ef..ef63969cbc 100644 --- a/Task/CSV-data-manipulation/Fortran/csv-data-manipulation-2.f +++ b/Task/CSV-data-manipulation/Fortran/csv-data-manipulation-2.f @@ -1,20 +1,20 @@ Copies a file with 5 comma-separated values to a line, appending a column holding their sum. - INTEGER N !Instead of littering the source with "5" - PARAMETER (N = 5) !Provide some provenance. - CHARACTER*6 HEAD(N) !A perfect size? - INTEGER X(N) !Integers suffice. - INTEGER LINPR,IN !I/O unit numbers. - LINPR = 6 !Standard output via this unit number. - IN = 10 !Some unit number for the input file. - OPEN (IN,FILE="CSVtest.csv",STATUS="OLD",ACTION="READ") !For formatted input. + INTEGER N !Instead of littering the source with "5" + PARAMETER (N = 5) !Provide some provenance. + CHARACTER*6 HEAD(N) !A perfect size? + INTEGER X(N) !Integers suffice. + INTEGER LINPR,IN !I/O unit numbers. + LINPR = 6 !Standard output via this unit number. + IN = 10 !Some unit number for the input file. + OPEN (IN,FILE="CSVtest.csv",STATUS="OLD",ACTION="READ") !For formatted input. - READ (IN,*) HEAD !The first line has texts as column headings. - WRITE (LINPR,1) (TRIM(HEAD(I)), I = 1,N),"Sum" !Append a "Sum" column. - 1 FORMAT (666(A:",")) !The : sez "stop if no list element awaits". - 2 READ (IN,*,END = 10) X !Read a line's worth of numbers, separated by commas or spaces. - WRITE (LINPR,3) X,SUM(X) !Write, with a total appended. - 3 FORMAT (666(I0:",")) !I0 editing uses only as many columns as are needed. - GO TO 2 !Do it again. + READ (IN,*) HEAD !The first line has texts as column headings. + WRITE (LINPR,1) (TRIM(HEAD(I)), I = 1,N),"Sum" !Append a "Sum" column. + 1 FORMAT (666(A:",")) !The : sez "stop if no list element awaits". + 2 READ (IN,*,END = 10) X !Read a line's worth of numbers, separated by commas or spaces. + WRITE (LINPR,3) X,SUM(X) !Write, with a total appended. + 3 FORMAT (666(I0:",")) !I0 editing uses only as many columns as are needed. + GO TO 2 !Do it again. - 10 CLOSE (IN) !All done. - END !That's all. + 10 CLOSE (IN) !All done. + END !That's all. diff --git a/Task/CSV-data-manipulation/FunL/csv-data-manipulation.funl b/Task/CSV-data-manipulation/FunL/csv-data-manipulation.funl index 2bb6312e7a..17cee74435 100644 --- a/Task/CSV-data-manipulation/FunL/csv-data-manipulation.funl +++ b/Task/CSV-data-manipulation/FunL/csv-data-manipulation.funl @@ -34,7 +34,7 @@ def updateRow( header, row, updates ) = updates( r ) vector( r(f) | f <- header ) -def update( table, updates ) = +def update( table, updates ) = Table( table.header, (updateRow(table.header, r, updates) | r <- table.rows).toList() ) def addColumn( table, column, updates ) = diff --git a/Task/CSV-data-manipulation/Go/csv-data-manipulation.go b/Task/CSV-data-manipulation/Go/csv-data-manipulation.go index b893656760..d6adc29b82 100644 --- a/Task/CSV-data-manipulation/Go/csv-data-manipulation.go +++ b/Task/CSV-data-manipulation/Go/csv-data-manipulation.go @@ -1,58 +1,58 @@ package main import ( - "encoding/csv" - "log" - "os" - "strconv" + "encoding/csv" + "log" + "os" + "strconv" ) func main() { - rows := readSample() - appendSum(rows) - writeChanges(rows) + rows := readSample() + appendSum(rows) + writeChanges(rows) } func readSample() [][]string { - f, err := os.Open("sample.csv") - if err != nil { - log.Fatal(err) - } - rows, err := csv.NewReader(f).ReadAll() - f.Close() - if err != nil { - log.Fatal(err) - } - return rows + f, err := os.Open("sample.csv") + if err != nil { + log.Fatal(err) + } + rows, err := csv.NewReader(f).ReadAll() + f.Close() + if err != nil { + log.Fatal(err) + } + return rows } func appendSum(rows [][]string) { - rows[0] = append(rows[0], "SUM") - for i := 1; i < len(rows); i++ { - rows[i] = append(rows[i], sum(rows[i])) - } + rows[0] = append(rows[0], "SUM") + for i := 1; i < len(rows); i++ { + rows[i] = append(rows[i], sum(rows[i])) + } } func sum(row []string) string { - sum := 0 - for _, s := range row { - x, err := strconv.Atoi(s) - if err != nil { - return "NA" - } - sum += x - } - return strconv.Itoa(sum) + sum := 0 + for _, s := range row { + x, err := strconv.Atoi(s) + if err != nil { + return "NA" + } + sum += x + } + return strconv.Itoa(sum) } func writeChanges(rows [][]string) { - f, err := os.Create("output.csv") - if err != nil { - log.Fatal(err) - } - err = csv.NewWriter(f).WriteAll(rows) - f.Close() - if err != nil { - log.Fatal(err) - } + f, err := os.Create("output.csv") + if err != nil { + log.Fatal(err) + } + err = csv.NewWriter(f).WriteAll(rows) + f.Close() + if err != nil { + log.Fatal(err) + } } diff --git a/Task/CSV-data-manipulation/Julia/csv-data-manipulation.jl b/Task/CSV-data-manipulation/Julia/csv-data-manipulation.julia similarity index 100% rename from Task/CSV-data-manipulation/Julia/csv-data-manipulation.jl rename to Task/CSV-data-manipulation/Julia/csv-data-manipulation.julia diff --git a/Task/CSV-data-manipulation/Kotlin/csv-data-manipulation.kts b/Task/CSV-data-manipulation/Kotlin/csv-data-manipulation.kotlin similarity index 100% rename from Task/CSV-data-manipulation/Kotlin/csv-data-manipulation.kts rename to Task/CSV-data-manipulation/Kotlin/csv-data-manipulation.kotlin diff --git a/Task/CSV-data-manipulation/Logo/csv-data-manipulation-1.logo b/Task/CSV-data-manipulation/Logo/csv-data-manipulation-1.logo index c8936190c7..f04a62f4a7 100644 --- a/Task/CSV-data-manipulation/Logo/csv-data-manipulation-1.logo +++ b/Task/CSV-data-manipulation/Logo/csv-data-manipulation-1.logo @@ -1,19 +1,19 @@ to csv.data.manipulation :in :out local [header line list sum] - openread :in - setread :in - openwrite :out - setwrite :out - make "header readword + openread :in + setread :in + openwrite :out + setwrite :out + make "header readword print word :header ",SUM - while [not eofp] [ - make "line readword - make "list parse map [ifelse equalp ? ", ["\ ] [?]] :line - make "sum apply "sum :list - print (word :line "\, :sum) - ] - close :in - setread [] - close :out - setwrite [] + while [not eofp] [ + make "line readword + make "list parse map [ifelse equalp ? ", ["\ ] [?]] :line + make "sum apply "sum :list + print (word :line "\, :sum) + ] + close :in + setread [] + close :out + setwrite [] end diff --git a/Task/CSV-data-manipulation/Lua/csv-data-manipulation-1.lua b/Task/CSV-data-manipulation/Lua/csv-data-manipulation-1.lua deleted file mode 100644 index 8296349d52..0000000000 --- a/Task/CSV-data-manipulation/Lua/csv-data-manipulation-1.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Lua has no built in methods to handle csv files. --- it does have string.gmatch, which we use to global.match whatever isn't a comma - -print(io.read"l" .. ",SUM") -for line in io.lines() do - local sum = 0 - for field in line:gmatch"[^,]+" do - sum = sum + field - end - print(line .. "," .. sum) -end diff --git a/Task/CSV-data-manipulation/Lua/csv-data-manipulation-2.lua b/Task/CSV-data-manipulation/Lua/csv-data-manipulation-2.lua deleted file mode 100644 index 0469930ba1..0000000000 --- a/Task/CSV-data-manipulation/Lua/csv-data-manipulation-2.lua +++ /dev/null @@ -1,26 +0,0 @@ -local csv={} - --- read csv file, save records and fields into table -for line in io.lines('file.csv') do - local fields = {} - for field in line:gmatch"[^,]+" do - table.insert(fields, tonumber(field) or field) - end - table.insert(csv, fields) -end - --- change csv values -table.insert(csv[1], 'SUM') -for i=2,#csv do - local sum=0 - for _, val in ipairs(csv[i]) do - sum = sum + val - end - table.insert(csv[i], sum) -end - --- Save -local fileHandler = io.open('file.csv', 'w') -for NR, fields in ipairs(csv) do - fileHandler:write(table.concat(fields,","), "\n") -end diff --git a/Task/CSV-data-manipulation/Lua/csv-data-manipulation.lua b/Task/CSV-data-manipulation/Lua/csv-data-manipulation.lua new file mode 100644 index 0000000000..26ddaeabc9 --- /dev/null +++ b/Task/CSV-data-manipulation/Lua/csv-data-manipulation.lua @@ -0,0 +1,31 @@ +local csv={} +for line in io.lines('file.csv') do + table.insert(csv, {}) + local i=1 + for j=1,#line do + if line:sub(j,j) == ',' then + table.insert(csv[#csv], line:sub(i,j-1)) + i=j+1 + end + end + table.insert(csv[#csv], line:sub(i,j)) +end + +table.insert(csv[1], 'SUM') +for i=2,#csv do + local sum=0 + for j=1,#csv[i] do + sum=sum + tonumber(csv[i][j]) + end + if sum>0 then + table.insert(csv[i], sum) + end +end + +local newFileData = '' +for i=1,#csv do + newFileData=newFileData .. table.concat(csv[i], ',') .. '\n' +end + +local file=io.open('file.csv', 'w') +file:write(newFileData) diff --git a/Task/CSV-data-manipulation/M2000-Interpreter/csv-data-manipulation.m2000 b/Task/CSV-data-manipulation/M2000-Interpreter/csv-data-manipulation.m2000 index ebca3c0383..7ef687eccb 100644 --- a/Task/CSV-data-manipulation/M2000-Interpreter/csv-data-manipulation.m2000 +++ b/Task/CSV-data-manipulation/M2000-Interpreter/csv-data-manipulation.m2000 @@ -1,7 +1,6 @@ -Locale 1032 Module Checkit { Function Sum { - DECIMAL c=0 + Long c=0 while not empty { c+=number } @@ -9,7 +8,7 @@ Module Checkit { } Document CSV$ = {C1,C2,C3,C4,C5 1,5,9,13,17 - 2,6,10.3,14,18 + 2,6,10,14,18 3,7,11,15,19 4,8,12,16,20 } @@ -20,13 +19,13 @@ Module Checkit { \\ use standard decimal point char \\ use standard (non json style string) \\ True = use bare strings (without "") - Input With "","",,true - Write With chr$(9),locale$(0xE),,true + Input With "",,,true + Write With"",,,true \\ for excel csv use Input With chr$(9),,true, true Open "data1.csv" for Wide Input as #M Open "data2.csv" for Wide Output as #M1 Input #M, h1$, h2$, h3$, h4$, h5$ - Write #M1, h1$, h2$, h3$, h4$, h5$, "SUM" + Write #M1, h1$, h2$, h3$, h4$, h5$ Print h1$, h2$, h3$, h4$, h5$ While not Eof(#M) { @@ -36,15 +35,13 @@ Module Checkit { } close #M1 Close #M - Input With chr$(9),locale$(0xE),,true Open "data2.csv" for Wide Input as #M - Input #M, h1$, h2$, h3$, h4$, h5$, h6$ - Print h1$, h2$, h3$, h4$, h5$, h6$ + Input #M, h1$, h2$, h3$, h4$, h5$ + Print h1$, h2$, h3$, h4$, h5$ While not Eof(#M) { Input #M, A1, A2, A3, A4, A5, Sum Print A1, A2, A3, A4, A5, Sum } Close #M - Win "Excel", dir$+"data2.csv" } Checkit diff --git a/Task/CSV-data-manipulation/MATLAB/csv-data-manipulation-1.m b/Task/CSV-data-manipulation/MATLAB/csv-data-manipulation-1.m index ad5d27aed9..16512a1db4 100644 --- a/Task/CSV-data-manipulation/MATLAB/csv-data-manipulation-1.m +++ b/Task/CSV-data-manipulation/MATLAB/csv-data-manipulation-1.m @@ -7,7 +7,7 @@ X = dlmread(filename,',',1,0); fid = fopen('data.out.csv','w+'); fprintf(fid,'%s,sum\n',header); for k=1:size(X,1), - fprintf(fid,"%i,",X(k,:)); - fprintf(fid,"%i\n",sum(X(k,:))); + fprintf(fid,"%i,",X(k,:)); + fprintf(fid,"%i\n",sum(X(k,:))); end; fclose(fid); diff --git a/Task/CSV-data-manipulation/Nu/csv-data-manipulation-1.nu b/Task/CSV-data-manipulation/Nu/csv-data-manipulation-1.nu deleted file mode 100644 index d137dc1b65..0000000000 --- a/Task/CSV-data-manipulation/Nu/csv-data-manipulation-1.nu +++ /dev/null @@ -1,5 +0,0 @@ -open 'test_in.csv' | - each { |row| - let sum = ($row | values | math sum); - $row | insert Sum $sum - } diff --git a/Task/CSV-data-manipulation/Nu/csv-data-manipulation-2.nu b/Task/CSV-data-manipulation/Nu/csv-data-manipulation-2.nu deleted file mode 100644 index 82640ab976..0000000000 --- a/Task/CSV-data-manipulation/Nu/csv-data-manipulation-2.nu +++ /dev/null @@ -1 +0,0 @@ -open 'test_in.csv' | upsert Sum {|row| $row | values | math sum } diff --git a/Task/CSV-data-manipulation/OCaml/csv-data-manipulation.ml b/Task/CSV-data-manipulation/OCaml/csv-data-manipulation.ocaml similarity index 100% rename from Task/CSV-data-manipulation/OCaml/csv-data-manipulation.ml rename to Task/CSV-data-manipulation/OCaml/csv-data-manipulation.ocaml diff --git a/Task/CSV-data-manipulation/PascalABC.NET/csv-data-manipulation.pas b/Task/CSV-data-manipulation/PascalABC.NET/csv-data-manipulation.pas deleted file mode 100644 index c2a30c8cee..0000000000 --- a/Task/CSV-data-manipulation/PascalABC.NET/csv-data-manipulation.pas +++ /dev/null @@ -1,9 +0,0 @@ -begin - var lines := ReadLines('data.csv').Select((line,i) -> begin - if i = 0 then - Result := line + ',SUM' - else Result := line + ',' + line.Split(',').Sum(x -> x.ToInteger); - end); - WriteLines('outdata.csv',lines); - lines.PrintLines; -end. diff --git a/Task/CSV-data-manipulation/PowerShell/csv-data-manipulation.ps1 b/Task/CSV-data-manipulation/PowerShell/csv-data-manipulation.psh similarity index 100% rename from Task/CSV-data-manipulation/PowerShell/csv-data-manipulation.ps1 rename to Task/CSV-data-manipulation/PowerShell/csv-data-manipulation.psh diff --git a/Task/CSV-data-manipulation/Prolog/csv-data-manipulation.pro b/Task/CSV-data-manipulation/Prolog/csv-data-manipulation.pro index 4f86884d47..028345fd11 100644 --- a/Task/CSV-data-manipulation/Prolog/csv-data-manipulation.pro +++ b/Task/CSV-data-manipulation/Prolog/csv-data-manipulation.pro @@ -2,21 +2,21 @@ test :- augment('test.csv', 'test.out.csv'). % augment( +InFileName, +OutFileName) augment(InFile, OutFile) :- - open(OutFile, write, OutStream), - ( ( csv_read_file_row(InFile, Row, [line(Line)]), - % Row is of the form row( Item1, Item2, ....). - addrow(Row, Out), - csv_write_stream(OutStream, [Out], []), - fail - ) - ; close(OutStream) - ). + open(OutFile, write, OutStream), + ( ( csv_read_file_row(InFile, Row, [line(Line)]), + % Row is of the form row( Item1, Item2, ....). + addrow(Row, Out), + csv_write_stream(OutStream, [Out], []), + fail + ) + ; close(OutStream) + ). % If the first item in a row is an integer, then append the sum; % otherwise append 'SUM': addrow( Term, NewTerm ) :- - Term =.. [F | List], - List = [X|_], - (integer(X) -> sum_list(List, Sum) ; Sum = 'SUM'), - append(List, [Sum], NewList), - NewTerm =.. [F | NewList]. + Term =.. [F | List], + List = [X|_], + (integer(X) -> sum_list(List, Sum) ; Sum = 'SUM'), + append(List, [Sum], NewList), + NewTerm =.. [F | NewList]. diff --git a/Task/CSV-data-manipulation/Python/csv-data-manipulation-4.py b/Task/CSV-data-manipulation/Python/csv-data-manipulation-4.py deleted file mode 100644 index a35b14ce8d..0000000000 --- a/Task/CSV-data-manipulation/Python/csv-data-manipulation-4.py +++ /dev/null @@ -1,9 +0,0 @@ -import polars as pl - -filepath = "data.csv" - -( - pl.scan_csv(filepath) - .with_columns(pl.sum_horizontal(pl.all()).alias("SUM")) - .sink_csv(filepath) -) diff --git a/Task/CSV-data-manipulation/Rebol/csv-data-manipulation.rebol b/Task/CSV-data-manipulation/Rebol/csv-data-manipulation.rebol deleted file mode 100644 index 5f0eab3980..0000000000 --- a/Task/CSV-data-manipulation/Rebol/csv-data-manipulation.rebol +++ /dev/null @@ -1,35 +0,0 @@ -Rebol [ - title: "Rosetta code: CSV data manipulation" - file: %CSV_data_manipulation.r3 - url: https://rosettacode.org/wiki/CSV_data_manipulation -] - -write %test.csv {C1,C2,C3,C4,C5 -1,5,9,13,17 -2,6,10,14,18 -3,7,11,15,19 -4,8,12,16,20} ;; create a sample CSV file on disk - -probe-csv: func [data][ - foreach row data [probe row] ;; helper: print each parsed CSV row using probe -] - -import csv ;; enable CSV codec for load/save of CSV files - -data: load %test.csv ;; load CSV into a block of rows (row 1 is header) -print "^/Original:" probe-csv data ;; show original data - -;; Add SUM column: -append data/1 "SUM" ;; extend header with a new column "SUM" -foreach row next data [ ;; iterate over data rows (skip header) - sum: 0 - forall row [ ;; walk each cell in the row in place - change row to integer! row/1 ;; convert current cell to integer (mutates row) - sum: sum + row/1 ;; accumulate the running total - ] - append row sum ;; append the computed sum at the end of the row -] -print "^/Modified:" probe-csv data ;; show data after adding the SUM column - -save %new.csv data ;; save the modified data to a new CSV file -print "^/Reloaded:" probe-csv load %new.csv ;; reload and display to verify persistence diff --git a/Task/CSV-data-manipulation/Red/csv-data-manipulation-2.red b/Task/CSV-data-manipulation/Red/csv-data-manipulation-2.red index c48fba572d..caf8b0fc9d 100644 --- a/Task/CSV-data-manipulation/Red/csv-data-manipulation-2.red +++ b/Task/CSV-data-manipulation/Red/csv-data-manipulation-2.red @@ -1,6 +1,6 @@ >>forall data [either (index? data) = 1[ - append data/1 "SUM" + append data/1 "SUM" ][ - append data/1 to string! - (to integer! data/1/1) + (to integer! data/1/2) + (to integer! data/1/3) + (to integer! data/1/4) + (to integer! data/1/5) + append data/1 to string! + (to integer! data/1/1) + (to integer! data/1/2) + (to integer! data/1/3) + (to integer! data/1/4) + (to integer! data/1/5) ]] diff --git a/Task/CSV-data-manipulation/Rust/csv-data-manipulation.rs b/Task/CSV-data-manipulation/Rust/csv-data-manipulation.rust similarity index 100% rename from Task/CSV-data-manipulation/Rust/csv-data-manipulation.rs rename to Task/CSV-data-manipulation/Rust/csv-data-manipulation.rust diff --git a/Task/CSV-data-manipulation/Scala/csv-data-manipulation.scala b/Task/CSV-data-manipulation/Scala/csv-data-manipulation.scala index 2abe9cda6f..634a37b191 100644 --- a/Task/CSV-data-manipulation/Scala/csv-data-manipulation.scala +++ b/Task/CSV-data-manipulation/Scala/csv-data-manipulation.scala @@ -3,10 +3,10 @@ import scala.io.Source object parseCSV extends App { val rawData = """|C1,C2,C3,C4,C5 - |1,5,9,13,17 - |2,6,10,14,18 - |3,7,11,15,19 - |20,21,22,23,24""".stripMargin + |1,5,9,13,17 + |2,6,10,14,18 + |3,7,11,15,19 + |20,21,22,23,24""".stripMargin val data = Seq((Source.fromString(rawData).getLines()).map(_.split(",")).toSeq: _*) diff --git a/Task/CSV-data-manipulation/SenseTalk/csv-data-manipulation.sensetalk b/Task/CSV-data-manipulation/SenseTalk/csv-data-manipulation.sensetalk index 8278882de7..da0e4ef1f9 100644 --- a/Task/CSV-data-manipulation/SenseTalk/csv-data-manipulation.sensetalk +++ b/Task/CSV-data-manipulation/SenseTalk/csv-data-manipulation.sensetalk @@ -14,7 +14,7 @@ insert "SUM" into item 1 of csvData -- add a new column heading // Go through all of the data rows to add the sum repeat with rowNum= 2 to the number of items in csvData - insert the sum of item rowNum of csvData into item rowNum of csvData + insert the sum of item rowNum of csvData into item rowNum of csvData end repeat put csvData -- see the modified data as a list of lists diff --git a/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-1.tcl b/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-1.tcl index ad39da5984..9d26066be0 100644 --- a/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-1.tcl +++ b/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-1.tcl @@ -13,9 +13,9 @@ proc addSumColumn {filename {title "SUM"}} { set sumcol [$m columns] $m add column $title for {set i 1} {$i < [$m rows]} {incr i} { - # Fill out a dummy value - $m set cell $sumcol $i 0 - $m set cell $sumcol $i [tcl::mathop::+ {*}[$m get row $i]] + # Fill out a dummy value + $m set cell $sumcol $i 0 + $m set cell $sumcol $i [tcl::mathop::+ {*}[$m get row $i]] } # Write the CSV out diff --git a/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-2.tcl b/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-2.tcl index 328e7512b6..e863925092 100644 --- a/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-2.tcl +++ b/Task/CSV-data-manipulation/Tcl/csv-data-manipulation-2.tcl @@ -1,6 +1,6 @@ set f [open example.csv r] puts "[gets $f],SUM" while { [gets $f row] > 0 } { - puts "$row,[expr [string map {, +} $row]]" + puts "$row,[expr [string map {, +} $row]]" } close $f diff --git a/Task/CSV-data-manipulation/Uiua/csv-data-manipulation.uiua b/Task/CSV-data-manipulation/Uiua/csv-data-manipulation.uiua deleted file mode 100644 index e6b7e04c7f..0000000000 --- a/Task/CSV-data-manipulation/Uiua/csv-data-manipulation.uiua +++ /dev/null @@ -1,11 +0,0 @@ -# Simple CSV manipulation - -# Effect of running `&fras "example.csv"` -$ C1,C2,C3,C4,C5 -$ 1,5,9,13,17 -$ 2,6,10,14,18 -$ 3,7,11,15,19 -$ 4,8,12,16,20 - -&p⍜°csv(⍜⍉˜⊂⊂□"SUM"≡(□⍜⋕/+)⊸↘1) -# Save using `&fwa "example.csv"` diff --git a/Task/CSV-data-manipulation/VBScript/csv-data-manipulation.vb b/Task/CSV-data-manipulation/VBScript/csv-data-manipulation.vb new file mode 100644 index 0000000000..da5502ec55 --- /dev/null +++ b/Task/CSV-data-manipulation/VBScript/csv-data-manipulation.vb @@ -0,0 +1,35 @@ +'Instatiate FSO. +Set objFSO = CreateObject("Scripting.FileSystemObject") +'Open the CSV file for reading. The file is in the same folder as the script and named csv_sample.csv. +Set objInCSV = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) & "\csv_sample.csv",1,False) +'Set header status to account for the first line as the column headers. +IsHeader = True +'Initialize the var for the output string. +OutTxt = "" +'Read each line of the file. +Do Until objInCSV.AtEndOfStream + line = objInCSV.ReadLine + If IsHeader Then + OutTxt = OutTxt & line & ",SUM" & vbCrLf + IsHeader = False + Else + OutTxt = OutTxt & line & "," & AddElements(line) & vbCrLf + End If +Loop +'Close the file. +objInCSV.Close +'Open the same file for writing. +Set objOutCSV = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) & "\csv_sample.csv",2,True) +'Write the var OutTxt to the file overwriting existing contents. +objOutCSV.Write OutTxt +'Close the file. +objOutCSV.Close +Set objFSO = Nothing + +'Routine to add each element in a row. +Function AddElements(s) + arr = Split(s,",") + For i = 0 To UBound(arr) + AddElements = AddElements + CInt(arr(i)) + Next +End Function diff --git a/Task/CSV-data-manipulation/VBScript/csv-data-manipulation.vbs b/Task/CSV-data-manipulation/VBScript/csv-data-manipulation.vbs deleted file mode 100644 index 00e334063a..0000000000 --- a/Task/CSV-data-manipulation/VBScript/csv-data-manipulation.vbs +++ /dev/null @@ -1,35 +0,0 @@ -'Instatiate FSO. -Set objFSO = CreateObject("Scripting.FileSystemObject") -'Open the CSV file for reading. The file is in the same folder as the script and named csv_sample.csv. -Set objInCSV = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) & "\csv_sample.csv",1,False) -'Set header status to account for the first line as the column headers. -IsHeader = True -'Initialize the var for the output string. -OutTxt = "" -'Read each line of the file. -Do Until objInCSV.AtEndOfStream - line = objInCSV.ReadLine - If IsHeader Then - OutTxt = OutTxt & line & ",SUM" & vbCrLf - IsHeader = False - Else - OutTxt = OutTxt & line & "," & AddElements(line) & vbCrLf - End If -Loop -'Close the file. -objInCSV.Close -'Open the same file for writing. -Set objOutCSV = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) & "\csv_sample.csv",2,True) -'Write the var OutTxt to the file overwriting existing contents. -objOutCSV.Write OutTxt -'Close the file. -objOutCSV.Close -Set objFSO = Nothing - -'Routine to add each element in a row. -Function AddElements(s) - arr = Split(s,",") - For i = 0 To UBound(arr) - AddElements = AddElements + CInt(arr(i)) - Next -End Function diff --git a/Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-1.adb b/Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-1.ada similarity index 100% rename from Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-1.adb rename to Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-1.ada diff --git a/Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-2.adb b/Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-2.ada similarity index 100% rename from Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-2.adb rename to Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-2.ada diff --git a/Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-3.adb b/Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-3.ada similarity index 100% rename from Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-3.adb rename to Task/CSV-to-HTML-translation/Ada/csv-to-html-translation-3.ada diff --git a/Task/CSV-to-HTML-translation/AutoIt/csv-to-html-translation.au3 b/Task/CSV-to-HTML-translation/AutoIt/csv-to-html-translation.au3 deleted file mode 100644 index 050b3b68a8..0000000000 --- a/Task/CSV-to-HTML-translation/AutoIt/csv-to-html-translation.au3 +++ /dev/null @@ -1,28 +0,0 @@ - Local $ascarray[4] = [34,38,60,62] - $String = "Character,Speech" & @CRLF - $String &= "The multitude,The messiah! Show us the messiah!" & @CRLF - $String &= "Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!" & @CRLF - $String &= "The multitude,Who are you?" & @CRLF - $String &= "Brians mother,I'm his mother; that's who!" & @CRLF - $String &= "The multitude,Behold his mother! Behold his mother!" - For $i = 0 To UBound($ascarray) -1 - $String = Stringreplace($String, chr($ascarray[$i]), "&#"&$ascarray[$i]&";") - Next - $newstring = "" & @CRLF - $crlfsplit = StringSplit($String, @CRLF, 1) - For $i = 1 To $crlfsplit[0] - If $i = 1 Then $newstring &= "" & @CRLF - $newstring &= "" & @CRLF - $komsplit = StringSplit($crlfsplit[$i], ",") - For $k = 1 To $komsplit[0] - If $i = 1 Then - $newstring &= "" & @CRLF - Else - $newstring &= "" & @CRLF - EndIf - Next - $newstring &= "" & @CRLF - If $i = 1 Then $newstring &= "" & @CRLF - Next - $newstring &= "
    " &$komsplit[$k] & "" &$komsplit[$k] & "
    " - ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $newstring = ' & $newstring & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console diff --git a/Task/CSV-to-HTML-translation/AutoIt/csv-to-html-translation.autoit b/Task/CSV-to-HTML-translation/AutoIt/csv-to-html-translation.autoit new file mode 100644 index 0000000000..a7f613cb1e --- /dev/null +++ b/Task/CSV-to-HTML-translation/AutoIt/csv-to-html-translation.autoit @@ -0,0 +1,28 @@ + Local $ascarray[4] = [34,38,60,62] + $String = "Character,Speech" & @CRLF + $String &= "The multitude,The messiah! Show us the messiah!" & @CRLF + $String &= "Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!" & @CRLF + $String &= "The multitude,Who are you?" & @CRLF + $String &= "Brians mother,I'm his mother; that's who!" & @CRLF + $String &= "The multitude,Behold his mother! Behold his mother!" + For $i = 0 To UBound($ascarray) -1 + $String = Stringreplace($String, chr($ascarray[$i]), "&#"&$ascarray[$i]&";") + Next + $newstring = "" & @CRLF + $crlfsplit = StringSplit($String, @CRLF, 1) + For $i = 1 To $crlfsplit[0] + If $i = 1 Then $newstring &= "" & @CRLF + $newstring &= "" & @CRLF + $komsplit = StringSplit($crlfsplit[$i], ",") + For $k = 1 To $komsplit[0] + If $i = 1 Then + $newstring &= "" & @CRLF + Else + $newstring &= "" & @CRLF + EndIf + Next + $newstring &= "" & @CRLF + If $i = 1 Then $newstring &= "" & @CRLF + Next + $newstring &= "
    " &$komsplit[$k] & "" &$komsplit[$k] & "
    " + ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $newstring = ' & $newstring & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console diff --git a/Task/CSV-to-HTML-translation/C++/csv-to-html-translation-1.cpp b/Task/CSV-to-HTML-translation/C++/csv-to-html-translation-1.cpp index 3d37c4ac15..aa156642cd 100644 --- a/Task/CSV-to-HTML-translation/C++/csv-to-html-translation-1.cpp +++ b/Task/CSV-to-HTML-translation/C++/csv-to-html-translation-1.cpp @@ -7,10 +7,10 @@ std::string csvToHTML( const std::string & ) ; int main( ) { std::string text = "Character,Speech\n" "The multitude,The messiah! Show us the messiah!\n" - "Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!\n" - "The multitude,Who are you?\n" - "Brians mother,I'm his mother; that's who!\n" - "The multitude,Behold his mother! Behold his mother!\n" ; + "Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!\n" + "The multitude,Who are you?\n" + "Brians mother,I'm his mother; that's who!\n" + "The multitude,Behold his mother! Behold his mother!\n" ; std::cout << csvToHTML( text ) ; return 0 ; } diff --git a/Task/CSV-to-HTML-translation/C-sharp/csv-to-html-translation-4.cs b/Task/CSV-to-HTML-translation/C-sharp/csv-to-html-translation-4.cs index 0f5c4a0ec4..57a1a95782 100644 --- a/Task/CSV-to-HTML-translation/C-sharp/csv-to-html-translation-4.cs +++ b/Task/CSV-to-HTML-translation/C-sharp/csv-to-html-translation-4.cs @@ -1,26 +1,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    diff --git a/Task/CSV-to-HTML-translation/C/csv-to-html-translation-1.c b/Task/CSV-to-HTML-translation/C/csv-to-html-translation-1.c index a4931a238c..226784fac0 100644 --- a/Task/CSV-to-HTML-translation/C/csv-to-html-translation-1.c +++ b/Task/CSV-to-HTML-translation/C/csv-to-html-translation-1.c @@ -1,29 +1,29 @@ #include const char *input = - "Character,Speech\n" - "The multitude,The messiah! Show us the messiah!\n" - "Brians mother,Now you listen here! He's not the messiah; " - "he's a very naughty boy! Now go away!\n" - "The multitude,Who are you?\n" - "Brians mother,I'm his mother; that's who!\n" - "The multitude,Behold his mother! Behold his mother!"; + "Character,Speech\n" + "The multitude,The messiah! Show us the messiah!\n" + "Brians mother,Now you listen here! He's not the messiah; " + "he's a very naughty boy! Now go away!\n" + "The multitude,Who are you?\n" + "Brians mother,I'm his mother; that's who!\n" + "The multitude,Behold his mother! Behold his mother!"; int main() { - const char *s; - printf("\n\n\n
    "); - for (s = input; *s; s++) { - switch(*s) { - case '\n': printf("
    "); break; - case ',': printf(""); break; - case '<': printf("<"); break; - case '>': printf(">"); break; - case '&': printf("&"); break; - default: putchar(*s); - } - } - puts("
    "); + const char *s; + printf("\n\n\n
    "); + for (s = input; *s; s++) { + switch(*s) { + case '\n': printf("
    "); break; + case ',': printf(""); break; + case '<': printf("<"); break; + case '>': printf(">"); break; + case '&': printf("&"); break; + default: putchar(*s); + } + } + puts("
    "); - return 0; + return 0; } diff --git a/Task/CSV-to-HTML-translation/CoffeeScript/csv-to-html-translation-1.coffee b/Task/CSV-to-HTML-translation/CoffeeScript/csv-to-html-translation-1.coffee index 3d1193f8f7..ed257aadae 100644 --- a/Task/CSV-to-HTML-translation/CoffeeScript/csv-to-html-translation-1.coffee +++ b/Task/CSV-to-HTML-translation/CoffeeScript/csv-to-html-translation-1.coffee @@ -1,8 +1,8 @@ String::__defineGetter__ 'escaped', () -> - this.replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') // rosettacode doesn't like " + this.replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') // rosettacode doesn't like " text = ''' Character,Speech @@ -19,21 +19,21 @@ header = lines.shift() console.log """ - - - - - + + + + + """ for line in lines - [character, speech] = line - console.log """ - - - """ + [character, speech] = line + console.log """ + + + """ console.log """ - +
    #{header[0]}#{header[1]}
    #{header[0]}#{header[1]}
    #{character}#{speech.escaped}#{character}#{speech.escaped}
    - """ + """ diff --git a/Task/CSV-to-HTML-translation/Common-Lisp/csv-to-html-translation-1.lisp b/Task/CSV-to-HTML-translation/Common-Lisp/csv-to-html-translation-1.lisp index b61d81aa92..db8c7f95f8 100644 --- a/Task/CSV-to-HTML-translation/Common-Lisp/csv-to-html-translation-1.lisp +++ b/Task/CSV-to-HTML-translation/Common-Lisp/csv-to-html-translation-1.lisp @@ -8,9 +8,9 @@ The multitude,Behold his mother! Behold his mother!") (defun split-string (string delim-char) (let ((result '())) (do* ((start 0 (1+ end)) - (end (position delim-char string) - (position delim-char string :start start))) - ((not end) (reverse (cons (subseq string start) result))) + (end (position delim-char string) + (position delim-char string :start start))) + ((not end) (reverse (cons (subseq string start) result))) (push (subseq string start end) result)))) ;;; HTML escape code modified from: @@ -27,27 +27,27 @@ The multitude,Behold his mother! Behold his mother!") (let ((to-escape "<>&")) (flet ((needs-escape-p (char) (find char to-escape))) (with-output-to-string (out) - (loop for start = 0 then (1+ pos) - for pos = (position-if #'needs-escape-p in :start start) - do (write-sequence in out :start start :end pos) - when pos do (write-sequence (escape-char (char in pos)) out) - while pos))))) + (loop for start = 0 then (1+ pos) + for pos = (position-if #'needs-escape-p in :start start) + do (write-sequence in out :start start :end pos) + when pos do (write-sequence (escape-char (char in pos)) out) + while pos))))) (defun html-row (values headerp) (let ((tag (if headerp "th" "td"))) (with-output-to-string (out) (write-string "" out) (dolist (val values) - (format out "<~A>~A" tag (escape val) tag)) + (format out "<~A>~A" tag (escape val) tag)) (write-string "" out)))) (defun csv->html (csv) (let* ((lines (split-string csv #\Newline)) - (cols (split-string (first lines) #\,)) - (rows (mapcar (lambda (row) (split-string row #\,)) (rest lines)))) + (cols (split-string (first lines) #\,)) + (rows (mapcar (lambda (row) (split-string row #\,)) (rest lines)))) (with-output-to-string (html) (format html "~C" #\Newline) (format html "~C~A~C" #\Tab (html-row cols t) #\Newline) (dolist (row rows) - (format html "~C~A~C" #\Tab (html-row row nil) #\Newline)) + (format html "~C~A~C" #\Tab (html-row row nil) #\Newline)) (write-string "
    " html)))) diff --git a/Task/CSV-to-HTML-translation/Common-Lisp/csv-to-html-translation-2.lisp b/Task/CSV-to-HTML-translation/Common-Lisp/csv-to-html-translation-2.lisp index 06570481c8..66cb3587a8 100644 --- a/Task/CSV-to-HTML-translation/Common-Lisp/csv-to-html-translation-2.lisp +++ b/Task/CSV-to-HTML-translation/Common-Lisp/csv-to-html-translation-2.lisp @@ -1,8 +1,8 @@ - - - - - - + + + + + +
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    diff --git a/Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-1.pas b/Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-1.delphi similarity index 100% rename from Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-1.pas rename to Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-1.delphi diff --git a/Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-2.pas b/Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-2.delphi similarity index 100% rename from Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-2.pas rename to Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-2.delphi diff --git a/Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-3.pas b/Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-3.delphi similarity index 100% rename from Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-3.pas rename to Task/CSV-to-HTML-translation/Delphi/csv-to-html-translation-3.delphi diff --git a/Task/CSV-to-HTML-translation/EchoLisp/csv-to-html-translation-1.l b/Task/CSV-to-HTML-translation/EchoLisp/csv-to-html-translation-1.l index d19889b08f..a7a16c05df 100644 --- a/Task/CSV-to-HTML-translation/EchoLisp/csv-to-html-translation-1.l +++ b/Task/CSV-to-HTML-translation/EchoLisp/csv-to-html-translation-1.l @@ -5,25 +5,25 @@ ;; LISTS->HTML (define html 'html) (define (emit-tag tag html-proc content ) - (if (style tag) - (push html (format "<%s style='%a'>" tag (style tag))) - (push html (format "<%s>" tag ))) - (html-proc content) - (push html (format " " tag ))) - + (if (style tag) + (push html (format "<%s style='%a'>" tag (style tag))) + (push html (format "<%s>" tag ))) + (html-proc content) + (push html (format " " tag ))) + ;; html procs : 1 tag, 1 proc (define (h-raw content) - (push html (format "%s" content))) + (push html (format "%s" content))) (define (h-header headers) - (for ((h headers)) (emit-tag 'th h-raw h))) + (for ((h headers)) (emit-tag 'th h-raw h))) (define (h-row row) - (for ((item row)) (emit-tag 'td h-raw item))) + (for ((item row)) (emit-tag 'td h-raw item))) (define (h-table table ) - (emit-tag 'tr h-header (first table)) - (for ((row (rest table))) (emit-tag 'tr h-row row))) - + (emit-tag 'tr h-header (first table)) + (for ((row (rest table))) (emit-tag 'tr h-row row))) + (define (html-dump) (string-join (stack->list html) " ")) - + ;; STYLES (style 'td "text-align:left") (style 'table "border-spacing: 10px;border:28px ridge orange") ;; special biblical border diff --git a/Task/CSV-to-HTML-translation/EchoLisp/csv-to-html-translation-2.l b/Task/CSV-to-HTML-translation/EchoLisp/csv-to-html-translation-2.l index 72ca8f6071..777daf9665 100644 --- a/Task/CSV-to-HTML-translation/EchoLisp/csv-to-html-translation-2.l +++ b/Task/CSV-to-HTML-translation/EchoLisp/csv-to-html-translation-2.l @@ -9,9 +9,9 @@ >>#) (define (task speech) - (define table (csv->table speech)) - (stack html) - (emit-tag 'table h-table table) - (html-dump)) - + (define table (csv->table speech)) + (stack html) + (emit-tag 'table h-table table) + (html-dump)) + (task MontyPython) diff --git a/Task/CSV-to-HTML-translation/Ed/csv-to-html-translation.ed b/Task/CSV-to-HTML-translation/Ed/csv-to-html-translation.ed deleted file mode 100644 index 88664bdb10..0000000000 --- a/Task/CSV-to-HTML-translation/Ed/csv-to-html-translation.ed +++ /dev/null @@ -1,15 +0,0 @@ -H -g/&/s//\&/g -g//s//\>/g -g/"/s//\"e;/g -g/^/s// /g -g/,/s//<\/td>/g -g/$/s//<\/td>\ - <\/tr>/ -1s/^/\ -/ -$s/$/\ -<\/table>/ -,p -Q diff --git a/Task/CSV-to-HTML-translation/Erlang/csv-to-html-translation.erl b/Task/CSV-to-HTML-translation/Erlang/csv-to-html-translation.erl index 31bfd905e1..b319341dbb 100644 --- a/Task/CSV-to-HTML-translation/Erlang/csv-to-html-translation.erl +++ b/Task/CSV-to-HTML-translation/Erlang/csv-to-html-translation.erl @@ -3,9 +3,9 @@ -export( [table_translation/1, task/0] ). table_translation( CSV ) -> - [Headers | Contents] = [string:tokens(X, ",") || X <- string:tokens( CSV, "\n")], - Table = create_html_table:html_table( [{border, "1"}, {cellpadding, "10"}], Headers, Contents ), - create_html_table:external_format( Table ). + [Headers | Contents] = [string:tokens(X, ",") || X <- string:tokens( CSV, "\n")], + Table = create_html_table:html_table( [{border, "1"}, {cellpadding, "10"}], Headers, Contents ), + create_html_table:external_format( Table ). task() -> table_translation( csv() ). diff --git a/Task/CSV-to-HTML-translation/Euphoria/csv-to-html-translation-1.eu b/Task/CSV-to-HTML-translation/Euphoria/csv-to-html-translation-1.euphoria similarity index 100% rename from Task/CSV-to-HTML-translation/Euphoria/csv-to-html-translation-1.eu rename to Task/CSV-to-HTML-translation/Euphoria/csv-to-html-translation-1.euphoria diff --git a/Task/CSV-to-HTML-translation/Euphoria/csv-to-html-translation-2.eu b/Task/CSV-to-HTML-translation/Euphoria/csv-to-html-translation-2.euphoria similarity index 100% rename from Task/CSV-to-HTML-translation/Euphoria/csv-to-html-translation-2.eu rename to Task/CSV-to-HTML-translation/Euphoria/csv-to-html-translation-2.euphoria diff --git a/Task/CSV-to-HTML-translation/Forth/csv-to-html-translation-1.fth b/Task/CSV-to-HTML-translation/Forth/csv-to-html-translation-1.fth index 9bf8d4b906..b59459c399 100644 --- a/Task/CSV-to-HTML-translation/Forth/csv-to-html-translation-1.fth +++ b/Task/CSV-to-HTML-translation/Forth/csv-to-html-translation-1.fth @@ -5,18 +5,18 @@ : END-ROW END-COLUMN ." " CR ; : CSV2HTML - ."
    " CR BEGIN-ROW - BEGIN KEY DUP #EOF <> WHILE - CASE - 10 OF END-ROW BEGIN-ROW ENDOF - [CHAR] , OF END-COLUMN BEGIN-COLUMN ENDOF - [CHAR] < OF ." <" ENDOF - [CHAR] > OF ." >" ENDOF - [CHAR] & OF ." &" ENDOF - DUP EMIT - ENDCASE - REPEAT - END-ROW ."
    " CR + ." " CR BEGIN-ROW + BEGIN KEY DUP #EOF <> WHILE + CASE + 10 OF END-ROW BEGIN-ROW ENDOF + [CHAR] , OF END-COLUMN BEGIN-COLUMN ENDOF + [CHAR] < OF ." <" ENDOF + [CHAR] > OF ." >" ENDOF + [CHAR] & OF ." &" ENDOF + DUP EMIT + ENDCASE + REPEAT + END-ROW ."
    " CR ; CSV2HTML BYE diff --git a/Task/CSV-to-HTML-translation/Fortran/csv-to-html-translation.f b/Task/CSV-to-HTML-translation/Fortran/csv-to-html-translation.f index 99aae70f36..73683283d8 100644 --- a/Task/CSV-to-HTML-translation/Fortran/csv-to-html-translation.f +++ b/Task/CSV-to-HTML-translation/Fortran/csv-to-html-translation.f @@ -1,71 +1,71 @@ - SUBROUTINE CSVTEXT2HTML(FNAME,HEADED) !Does not recognise quoted strings. + SUBROUTINE CSVTEXT2HTML(FNAME,HEADED) !Does not recognise quoted strings. Converts without checking field counts, or noting special characters. - CHARACTER*(*) FNAME !Names the input file. - LOGICAL HEADED !Perhaps its first line is to be a heading. - INTEGER MANY !How long is a piece of string? - PARAMETER (MANY=666) !This should suffice. - CHARACTER*(MANY) ALINE !A scratchpad for the input. - INTEGER MARK(0:MANY + 1) !Fingers the commas on a line. - INTEGER I,L,N !Assistants. - CHARACTER*2 WOT(2) !I don't see why a "table datum" could not be for either. - PARAMETER (WOT = (/"th","td"/)) !A table heding or a table datum - INTEGER IT !But, one must select appropriately. - INTEGER KBD,MSG,IN !A selection. - COMMON /IOUNITS/ KBD,MSG,IN !The caller thus avoids collisions. - OPEN(IN,FILE=FNAME,STATUS="OLD",ACTION="READ",ERR=661) !Go for the file. - WRITE (MSG,1) !Start the blather. - 1 FORMAT ("") !By stating that a table follows. - MARK(0) = 0 !Syncopation for the comma fingers. - N = 0 !No records read. + CHARACTER*(*) FNAME !Names the input file. + LOGICAL HEADED !Perhaps its first line is to be a heading. + INTEGER MANY !How long is a piece of string? + PARAMETER (MANY=666) !This should suffice. + CHARACTER*(MANY) ALINE !A scratchpad for the input. + INTEGER MARK(0:MANY + 1) !Fingers the commas on a line. + INTEGER I,L,N !Assistants. + CHARACTER*2 WOT(2) !I don't see why a "table datum" could not be for either. + PARAMETER (WOT = (/"th","td"/)) !A table heding or a table datum + INTEGER IT !But, one must select appropriately. + INTEGER KBD,MSG,IN !A selection. + COMMON /IOUNITS/ KBD,MSG,IN !The caller thus avoids collisions. + OPEN(IN,FILE=FNAME,STATUS="OLD",ACTION="READ",ERR=661) !Go for the file. + WRITE (MSG,1) !Start the blather. + 1 FORMAT ("
    ") !By stating that a table follows. + MARK(0) = 0 !Syncopation for the comma fingers. + N = 0 !No records read. - 10 READ (IN,11,END = 20) L,ALINE(1:MIN(L,MANY)) !Carefully acquire some text. - 11 FORMAT (Q,A) !Q = number of characters yet to read, A = characters. - N = N + 1 !So, a record has been read. - IF (L.GT.MANY) THEN !Perhaps it is rather long? - WRITE (MSG,12) N,L,MANY !Alas! - 12 FORMAT ("Line ",I0," has length ",I0,"! My limit is ",I0) !Squawk/ - L = MANY !The limit actually read. - END IF !So much for paranoia. - IF (N.EQ.1 .AND. HEADED) THEN !Is the first line to be treated specially? - WRITE (MSG,*) "" !Yep. Nominate a heading. - IT = 1 !And select "th" rather than "td". - ELSE !But mostly, - IT = 2 !Just another row for the table. - END IF !So much for the first line. - NCOLS = 0 !No commas have been seen. - DO I = 1,L !So scan the text for them. - IF (ICHAR(ALINE(I:I)).EQ.ICHAR(",")) THEN !Here? - NCOLS = NCOLS + 1 !Yes! - MARK(NCOLS) = I !The texts are between commas. - END IF !So much for that character. - END DO !On to the next. - NCOLS = NCOLS + 1 !This is why the + 1 for the size of MARK. - MARK(NCOLS) = L + 1 !End-of-line is as if a comma was one further along. - WRITE (MSG,13) !Now roll all the texts. - 1 (WOT(IT), !This starting a cell, - 2 ALINE(MARK(I - 1) + 1:MARK(I) - 1), !This being the text between the commas, - 3 WOT(IT), !And this ending each cell. - 4 I = 1,NCOLS), !For this number of columns. - 5 "/tr" !And this ends the row. - 13 FORMAT (" ",666("<",A,">",A,"")) !How long is a piece of string? - IF (N.EQ.1 .AND. HEADED) WRITE (MSG,*) "" !Finish the possible header. - GO TO 10 !And try for another record. + 10 READ (IN,11,END = 20) L,ALINE(1:MIN(L,MANY)) !Carefully acquire some text. + 11 FORMAT (Q,A) !Q = number of characters yet to read, A = characters. + N = N + 1 !So, a record has been read. + IF (L.GT.MANY) THEN !Perhaps it is rather long? + WRITE (MSG,12) N,L,MANY !Alas! + 12 FORMAT ("Line ",I0," has length ",I0,"! My limit is ",I0) !Squawk/ + L = MANY !The limit actually read. + END IF !So much for paranoia. + IF (N.EQ.1 .AND. HEADED) THEN !Is the first line to be treated specially? + WRITE (MSG,*) "" !Yep. Nominate a heading. + IT = 1 !And select "th" rather than "td". + ELSE !But mostly, + IT = 2 !Just another row for the table. + END IF !So much for the first line. + NCOLS = 0 !No commas have been seen. + DO I = 1,L !So scan the text for them. + IF (ICHAR(ALINE(I:I)).EQ.ICHAR(",")) THEN !Here? + NCOLS = NCOLS + 1 !Yes! + MARK(NCOLS) = I !The texts are between commas. + END IF !So much for that character. + END DO !On to the next. + NCOLS = NCOLS + 1 !This is why the + 1 for the size of MARK. + MARK(NCOLS) = L + 1 !End-of-line is as if a comma was one further along. + WRITE (MSG,13) !Now roll all the texts. + 1 (WOT(IT), !This starting a cell, + 2 ALINE(MARK(I - 1) + 1:MARK(I) - 1), !This being the text between the commas, + 3 WOT(IT), !And this ending each cell. + 4 I = 1,NCOLS), !For this number of columns. + 5 "/tr" !And this ends the row. + 13 FORMAT (" ",666("<",A,">",A,"")) !How long is a piece of string? + IF (N.EQ.1 .AND. HEADED) WRITE (MSG,*) "" !Finish the possible header. + GO TO 10 !And try for another record. - 20 CLOSE (IN) !Finished with input. - WRITE (MSG,21) !And finished with output. - 21 FORMAT ("
    ") !This writes starting at column one. - RETURN !Done! + 20 CLOSE (IN) !Finished with input. + WRITE (MSG,21) !And finished with output. + 21 FORMAT ("") !This writes starting at column one. + RETURN !Done! Confusions. - 661 WRITE (MSG,*) "Can't open file ",FNAME !Alas. - END !So much for the conversion. + 661 WRITE (MSG,*) "Can't open file ",FNAME !Alas. + END !So much for the conversion. INTEGER KBD,MSG,IN COMMON /IOUNITS/ KBD,MSG,IN - KBD = 5 !Standard input. - MSG = 6 !Standard output. - IN = 10 !Some unspecial number. + KBD = 5 !Standard input. + MSG = 6 !Standard output. + IN = 10 !Some unspecial number. - CALL CSVTEXT2HTML("Text.csv",.FALSE.) !The first line is not special. + CALL CSVTEXT2HTML("Text.csv",.FALSE.) !The first line is not special. WRITE (MSG,*) - CALL CSVTEXT2HTML("Text.csv",.TRUE.) !The first line is a heading. + CALL CSVTEXT2HTML("Text.csv",.TRUE.) !The first line is a heading. END diff --git a/Task/CSV-to-HTML-translation/Haskell/csv-to-html-translation-2.hs b/Task/CSV-to-HTML-translation/Haskell/csv-to-html-translation-2.hs index 19062de634..e1a1189b39 100644 --- a/Task/CSV-to-HTML-translation/Haskell/csv-to-html-translation-2.hs +++ b/Task/CSV-to-HTML-translation/Haskell/csv-to-html-translation-2.hs @@ -6,6 +6,6 @@ main = interact (\csv -> "\n" ++ (unlines $ map ((\cols -> "\n" ++ (concatMap (\x -> " \n") cols) ++ "") . split (==',')) $ lines csv) ++ "
    " ++ concatMap (\c -> case c of {'<' -> "<"; '>' -> ">"; - '&' -> "&"; '"' -> """; _ -> [c]}) x + '&' -> "&"; '"' -> """; _ -> [c]}) x ++ "
    ") diff --git a/Task/CSV-to-HTML-translation/Java/csv-to-html-translation-2.java b/Task/CSV-to-HTML-translation/Java/csv-to-html-translation-2.java index 854a68e627..348dee6b96 100644 --- a/Task/CSV-to-HTML-translation/Java/csv-to-html-translation-2.java +++ b/Task/CSV-to-HTML-translation/Java/csv-to-html-translation-2.java @@ -4,83 +4,83 @@ import java.io.PrintStream; class Csv2Html { - public static String escapeChars(String lineIn) { - StringBuilder sb = new StringBuilder(); - int lineLength = lineIn.length(); - for (int i = 0; i < lineLength; i++) { - char c = lineIn.charAt(i); - switch (c) { - case '"': - sb.append("""); - break; - case '&': - sb.append("&"); - break; - case '\'': - sb.append("'"); - break; - case '<': - sb.append("<"); - break; - case '>': - sb.append(">"); - break; - default: sb.append(c); - } - } - return sb.toString(); - } + public static String escapeChars(String lineIn) { + StringBuilder sb = new StringBuilder(); + int lineLength = lineIn.length(); + for (int i = 0; i < lineLength; i++) { + char c = lineIn.charAt(i); + switch (c) { + case '"': + sb.append("""); + break; + case '&': + sb.append("&"); + break; + case '\'': + sb.append("'"); + break; + case '<': + sb.append("<"); + break; + case '>': + sb.append(">"); + break; + default: sb.append(c); + } + } + return sb.toString(); + } - public static void tableHeader(PrintStream ps, String[] columns) { - ps.print(""); - for (int i = 0; i < columns.length; i++) { - ps.print(""); - ps.print(columns[i]); - ps.print(""); - } - ps.println(""); - } + public static void tableHeader(PrintStream ps, String[] columns) { + ps.print(""); + for (int i = 0; i < columns.length; i++) { + ps.print(""); + ps.print(columns[i]); + ps.print(""); + } + ps.println(""); + } + + public static void tableRow(PrintStream ps, String[] columns) { + ps.print(""); + for (int i = 0; i < columns.length; i++) { + ps.print(""); + ps.print(columns[i]); + ps.print(""); + } + ps.println(""); + } + + public static void main(String[] args) throws Exception { + boolean withTableHeader = (args.length != 0); + + InputStreamReader isr = new InputStreamReader(System.in); + BufferedReader br = new BufferedReader(isr); + PrintStream stdout = System.out; + + stdout.println(""); + stdout.println(""); + stdout.println(""); + stdout.println("Csv2Html"); + stdout.println(""); + stdout.println("

    Csv2Html

    "); - public static void tableRow(PrintStream ps, String[] columns) { - ps.print(""); - for (int i = 0; i < columns.length; i++) { - ps.print(""); - ps.print(columns[i]); - ps.print(""); - } - ps.println(""); - } - - public static void main(String[] args) throws Exception { - boolean withTableHeader = (args.length != 0); - - InputStreamReader isr = new InputStreamReader(System.in); - BufferedReader br = new BufferedReader(isr); - PrintStream stdout = System.out; - - stdout.println(""); - stdout.println(""); - stdout.println(""); - stdout.println("Csv2Html"); - stdout.println(""); - stdout.println("

    Csv2Html

    "); - - stdout.println(""); - String stdinLine; - boolean firstLine = true; - while ((stdinLine = br.readLine()) != null) { - String[] columns = escapeChars(stdinLine).split(","); - if (withTableHeader == true && firstLine == true) { - tableHeader(stdout, columns); - firstLine = false; - } else { - tableRow(stdout, columns); - } - } - stdout.println("
    "); - } + stdout.println(""); + String stdinLine; + boolean firstLine = true; + while ((stdinLine = br.readLine()) != null) { + String[] columns = escapeChars(stdinLine).split(","); + if (withTableHeader == true && firstLine == true) { + tableHeader(stdout, columns); + firstLine = false; + } else { + tableRow(stdout, columns); + } + } + stdout.println("
    "); + } } diff --git a/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-1.js b/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-1.js index c3c985804f..216911471c 100644 --- a/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-1.js +++ b/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-1.js @@ -1,9 +1,9 @@ var csv = "Character,Speech\n" + - "The multitude,The messiah! Show us the messiah!\n" + - "Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!\n" + - "The multitude,Who are you?\n" + - "Brians mother,I'm his mother; that's who!\n" + - "The multitude,Behold his mother! Behold his mother!"; + "The multitude,The messiah! Show us the messiah!\n" + + "Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!\n" + + "The multitude,Who are you?\n" + + "Brians mother,I'm his mother; that's who!\n" + + "The multitude,Behold his mother! Behold his mother!"; var lines = csv.replace(/&/g, '&') .replace(/ - - CharacterSpeech - - - The multitudeThe messiah! Show us the messiah! - Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry> - The multitudeWho are you? - Brians motherI'm his mother; that's who! - The multitudeBehold his mother! Behold his mother! + + CharacterSpeech + + + The multitudeThe messiah! Show us the messiah! + Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry> + The multitudeWho are you? + Brians motherI'm his mother; that's who! + The multitudeBehold his mother! Behold his mother! diff --git a/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-4.js b/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-4.js deleted file mode 100644 index 1124a5e5d1..0000000000 --- a/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-4.js +++ /dev/null @@ -1,40 +0,0 @@ -function csvToHtml(input) { - if (!input || typeof input !== 'string') { - throw new Error('Invalid input!'); - } - - function _createTableCell(cellContents, index) { - if (!cellContents || typeof cellContents !== 'string') { - throw new Error('Invalid data!'); - } - - const tableCell = document.createElement( - (index === 0) ? 'th' : 'td' - ); - - tableCell.textContent = cellContents.trim(); - return tableCell; - } - - const rows = input.split('\n'); - const table = document.createElement('table'); - - rows.forEach((row, index) => { - const tableRow = document.createElement('tr'); - const tableCells = row.split(','); - - tableCells.forEach((cell) => { - try { - tableRow.appendChild( - _createTableCell(cell, index), - ); - } catch (error) { - console.error(error); - } - }); - - table.appendChild(tableRow); - }); - - return table; -} diff --git a/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-5.js b/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-5.js deleted file mode 100644 index 986924331b..0000000000 --- a/Task/CSV-to-HTML-translation/JavaScript/csv-to-html-translation-5.js +++ /dev/null @@ -1,14 +0,0 @@ -const inputData = `Character,Speech -The multitude,The messiah! Show us the messiah! -Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away! -The multitude,Who are you? -Brians mother,I'm his mother; that's who! -The multitude,Behold his mother! Behold his mother!`; - -try { - document.body.append( - csvToHtml(inputData), - ); -} catch (error) { - console.error(error) -} diff --git a/Task/CSV-to-HTML-translation/Julia/csv-to-html-translation-1.jl b/Task/CSV-to-HTML-translation/Julia/csv-to-html-translation-1.julia similarity index 100% rename from Task/CSV-to-HTML-translation/Julia/csv-to-html-translation-1.jl rename to Task/CSV-to-HTML-translation/Julia/csv-to-html-translation-1.julia diff --git a/Task/CSV-to-HTML-translation/Julia/csv-to-html-translation-2.jl b/Task/CSV-to-HTML-translation/Julia/csv-to-html-translation-2.julia similarity index 100% rename from Task/CSV-to-HTML-translation/Julia/csv-to-html-translation-2.jl rename to Task/CSV-to-HTML-translation/Julia/csv-to-html-translation-2.julia diff --git a/Task/CSV-to-HTML-translation/Kotlin/csv-to-html-translation-1.kts b/Task/CSV-to-HTML-translation/Kotlin/csv-to-html-translation-1.kotlin similarity index 100% rename from Task/CSV-to-HTML-translation/Kotlin/csv-to-html-translation-1.kts rename to Task/CSV-to-HTML-translation/Kotlin/csv-to-html-translation-1.kotlin diff --git a/Task/CSV-to-HTML-translation/Kotlin/csv-to-html-translation-2.kts b/Task/CSV-to-HTML-translation/Kotlin/csv-to-html-translation-2.kotlin similarity index 100% rename from Task/CSV-to-HTML-translation/Kotlin/csv-to-html-translation-2.kts rename to Task/CSV-to-HTML-translation/Kotlin/csv-to-html-translation-2.kotlin diff --git a/Task/CSV-to-HTML-translation/M2000-Interpreter/csv-to-html-translation.m2000 b/Task/CSV-to-HTML-translation/M2000-Interpreter/csv-to-html-translation.m2000 index 446db07183..af515e282b 100644 --- a/Task/CSV-to-HTML-translation/M2000-Interpreter/csv-to-html-translation.m2000 +++ b/Task/CSV-to-HTML-translation/M2000-Interpreter/csv-to-html-translation.m2000 @@ -1,72 +1,72 @@ module csv2html { - nl$={ - } - Repl$=lambda$ (a$) ->{ - a$=replace$("&", "&",a$) - a$=replace$(">", ">",a$) - a$=replace$("""", """,a$) - // add any other replacement here - =replace$("<", "<",a$) - } - Tag$=lambda$ nl$, repl$ (a$, b$, n=4)->{ - if n>0 then - a$=rtrim$(replace$(nl$, nl$+string$(" ", n), nl$+a$)) - if right$(a$,2)<>nl$ then a$+=nl$ - else - if right$(a$, 2)=nl$ then if left$(a$,2)<>nl$ then a$=nl$+a$ - end if - prop=(,) : Read ? prop // forth parameter optional (we have to initalize first with an empty array) - p=each(prop) : prop$="" // p is an iteration object. - while p - prop$+=" "+repl$(prop#val$(p^))+"="+quote$(repl$(prop#val$(p^+1))) - p=each(prop,p^+2) // start new from p^+2 (p^ is the internal counter) - end while - ="<"+b$+prop$+">"+a$+""+nl$ - } - - // Prepare FILE csv - tofile$={Character,Speech - The multitude,The messiah! Show us the messiah! - Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away! - The multitude,Who are you? - Brians mother,I'm his mother; that's who! - The multitude,Behold his mother! Behold his mother! - } - open "forHtml.csv" for wide output as #f - Print #f, tofile$; - close #f - // prepare the input style for Input from file statement - // "," - we use comma between fields - // "." - for numbers we use dot for decimal separator - // false - we didn't read json style strings to normal strings (so \n convert to code 13, \t to code 9) - // true - we read strings unquote - input with ",",".",false, true - - // Read csv file - i=1 - document export$="" - Open "forHtml.csv" for wide input as #f - while not eof(#f) - input #f, a$, b$ - a$=repl$(a$) - b$=repl$(b$) - if i=1 then - export$+=tag$(tag$(a$, "th", 0)+tag$(b$,"th", 0), "tr", 4) - else - export$+=tag$(tag$(a$, "td", 0)+tag$(b$,"td", 0), "tr", 4) - end if - i++ - end while - close #f - style$=tag$({TD {background-color:#ddddff; } - thead TD {background-color:#ddffdd; text-align:center; } - },"style",4,("type", "text/css")) - title$= tag$("CSV to HTML translation - Extra Credit","title",0) - Head$= tag$(title$+ style$,"head") - html$={}+nl$+tag$(head$+tag$(tag$(export$, "table"), "body"), "html") - clipboard html$ - Report html$ - Print "Press Esc to exit browser" - browser "about: "+html$ + nl$={ + } + Repl$=lambda$ (a$) ->{ + a$=replace$("&", "&",a$) + a$=replace$(">", ">",a$) + a$=replace$("""", """,a$) + // add any other replacement here + =replace$("<", "<",a$) + } + Tag$=lambda$ nl$, repl$ (a$, b$, n=4)->{ + if n>0 then + a$=rtrim$(replace$(nl$, nl$+string$(" ", n), nl$+a$)) + if right$(a$,2)<>nl$ then a$+=nl$ + else + if right$(a$, 2)=nl$ then if left$(a$,2)<>nl$ then a$=nl$+a$ + end if + prop=(,) : Read ? prop // forth parameter optional (we have to initalize first with an empty array) + p=each(prop) : prop$="" // p is an iteration object. + while p + prop$+=" "+repl$(prop#val$(p^))+"="+quote$(repl$(prop#val$(p^+1))) + p=each(prop,p^+2) // start new from p^+2 (p^ is the internal counter) + end while + ="<"+b$+prop$+">"+a$+""+nl$ + } + + // Prepare FILE csv + tofile$={Character,Speech + The multitude,The messiah! Show us the messiah! + Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away! + The multitude,Who are you? + Brians mother,I'm his mother; that's who! + The multitude,Behold his mother! Behold his mother! + } + open "forHtml.csv" for wide output as #f + Print #f, tofile$; + close #f + // prepare the input style for Input from file statement + // "," - we use comma between fields + // "." - for numbers we use dot for decimal separator + // false - we didn't read json style strings to normal strings (so \n convert to code 13, \t to code 9) + // true - we read strings unquote + input with ",",".",false, true + + // Read csv file + i=1 + document export$="" + Open "forHtml.csv" for wide input as #f + while not eof(#f) + input #f, a$, b$ + a$=repl$(a$) + b$=repl$(b$) + if i=1 then + export$+=tag$(tag$(a$, "th", 0)+tag$(b$,"th", 0), "tr", 4) + else + export$+=tag$(tag$(a$, "td", 0)+tag$(b$,"td", 0), "tr", 4) + end if + i++ + end while + close #f + style$=tag$({TD {background-color:#ddddff; } + thead TD {background-color:#ddffdd; text-align:center; } + },"style",4,("type", "text/css")) + title$= tag$("CSV to HTML translation - Extra Credit","title",0) + Head$= tag$(title$+ style$,"head") + html$={}+nl$+tag$(head$+tag$(tag$(export$, "table"), "body"), "html") + clipboard html$ + Report html$ + Print "Press Esc to exit browser" + browser "about: "+html$ } csv2html diff --git a/Task/CSV-to-HTML-translation/MATLAB/csv-to-html-translation-3.m b/Task/CSV-to-HTML-translation/MATLAB/csv-to-html-translation-3.m index 26001f6ada..fc8d987cac 100644 --- a/Task/CSV-to-HTML-translation/MATLAB/csv-to-html-translation-3.m +++ b/Task/CSV-to-HTML-translation/MATLAB/csv-to-html-translation-3.m @@ -1,25 +1,25 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    diff --git a/Task/CSV-to-HTML-translation/Maple/csv-to-html-translation.maple b/Task/CSV-to-HTML-translation/Maple/csv-to-html-translation.maple index 0203f01f0d..5b6d65d7eb 100644 --- a/Task/CSV-to-HTML-translation/Maple/csv-to-html-translation.maple +++ b/Task/CSV-to-HTML-translation/Maple/csv-to-html-translation.maple @@ -1,10 +1,10 @@ #A translation of the C code posted html_table := proc(str) - local char; + local char; printf("\n\n\n\n" + htmlrow = "\t\n" - // loop through the values in the current csv row - for i in range(1, len(record)) - htmlrow = htmlrow + "\t\t<" + tag + ">" + (record ~ i) + "\n" - end for + // loop through the values in the current csv row + for i in range(1, len(record)) + htmlrow = htmlrow + "\t\t<" + tag + ">" + (record ~ i) + "\n" + end for - return htmlrow + "\t\n" + return htmlrow + "\t\n" end def // get the name of the csv file then open it @@ -23,7 +23,7 @@ htmltable = (htmltable + toHtmlRow(#0, "th")) // add all other rows to the table for i in range(1, $dbsize) - htmltable = (htmltable + toHtmlRow(#i, "td")) + htmltable = (htmltable + toHtmlRow(#i, "td")) end for // close the html table diff --git a/Task/CSV-to-HTML-translation/Nom/csv-to-html-translation-1.num b/Task/CSV-to-HTML-translation/Nom/csv-to-html-translation-1.num deleted file mode 100644 index c250b2c016..0000000000 --- a/Task/CSV-to-HTML-translation/Nom/csv-to-html-translation-1.num +++ /dev/null @@ -1,85 +0,0 @@ -#* -(this is a multiline comment in Nom) - -GRAMMAR OR PARSE TOKENS - nl* - new line, end of line - field* - one csv field - fieldset* - a number of fields - record* - one record (line) or a set of csv fields - recordset* - -*# - - # using the empty recordset trick - begin { - add "recordset*"; push; - } - read; - # ignore whitespace outside of quotes - " " { while [ ]; clear; .restart } - "\n" { put; clear; add "nl*"; push; .reparse } - '"' { - until '"'; clip; clop; unescape '"'; - whilenot [\n,]; - replace "&" "&"; replace "<" "<"; replace ">" ">"; - put; clear; add ""; put; clear; - add "field*"; push; - clear; .reparse - } - "," { clear; } - - whilenot [\n,]; - replace "&" "&"; replace "<" "<"; replace ">" ">"; - put; clear; add ""; put; clear; - add "field*"; push; - -parse> - # useful for debugging - #add "line "; lines; add " char "; chars; add ": "; print; clear; - #add "\n"; unstack; print; clip; stack; - - # 1 token - pop; - # a record may be terminated by the end of input - (eof)."fieldset*" { - clear; add ""; get; add "\n"; put; clear; - add "record*"; push; .reparse - } - # 2 tokens - pop; - "recordset*field*" { - replace "field" "fieldset"; push; push; .reparse - } - # ignore blank lines - "recordset*nl*" { - clip; clip; clip; push; .reparse - } - "fieldset*field*" { - clear; get; ++; get; --; put; clear; - add "fieldset*"; push; .reparse - } - "fieldset*nl*" { - clear; add "\n "; get; add "\n"; put; clear; - add "record*"; push; .reparse - } - "recordset*record*" { - clear; a+; get; - ++; get; --; put; clear; - # if the count is 1, then this is the 1st - # record and should be marked up as a table header. - count; "1" { - clear; get; replace "tr>" "thead>"; put; - } - clear; add "recordset*"; push; .reparse - } - - (eof) { - !"recordset*" { - clear; add "[invalid csv]\nThe parse stack was: "; print; - clear; unstack; add "\n"; print; quit; - } - clear; - add "
    "); for char in str do if char = "\n" then - printf("
    ") + printf("
    ") elif char = "," then printf("") elif char = "<" then @@ -12,7 +12,7 @@ html_table := proc(str) elif char = ">" then printf(">") elif char = "&" then - printf("&") + printf("&") else printf(char) end if; diff --git a/Task/CSV-to-HTML-translation/Nanoquery/csv-to-html-translation.nanoquery b/Task/CSV-to-HTML-translation/Nanoquery/csv-to-html-translation.nanoquery index 7af517fddc..1421fc83b6 100644 --- a/Task/CSV-to-HTML-translation/Nanoquery/csv-to-html-translation.nanoquery +++ b/Task/CSV-to-HTML-translation/Nanoquery/csv-to-html-translation.nanoquery @@ -1,13 +1,13 @@ // a method that converts a csv row into a html table row as a string def toHtmlRow(record, tag) - htmlrow = "\t
    "; get; add ""; get; add "
    \n"; get; add "
    \n"; - add "[valid csv!] Found "; count; add " records.\n"; - print; quit; - } - push; push; diff --git a/Task/CSV-to-HTML-translation/Nom/csv-to-html-translation-2.num b/Task/CSV-to-HTML-translation/Nom/csv-to-html-translation-2.num deleted file mode 100644 index fa64e7c50e..0000000000 --- a/Task/CSV-to-HTML-translation/Nom/csv-to-html-translation-2.num +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - -
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    diff --git a/Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-1.ml b/Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-1.ocaml similarity index 100% rename from Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-1.ml rename to Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-1.ocaml diff --git a/Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-2.ml b/Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-2.ocaml similarity index 100% rename from Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-2.ml rename to Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-2.ocaml diff --git a/Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-3.ml b/Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-3.ocaml similarity index 100% rename from Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-3.ml rename to Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-3.ocaml diff --git a/Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-4.ml b/Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-4.ocaml similarity index 100% rename from Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-4.ml rename to Task/CSV-to-HTML-translation/OCaml/csv-to-html-translation-4.ocaml diff --git a/Task/CSV-to-HTML-translation/OmniMark/csv-to-html-translation-1.xom b/Task/CSV-to-HTML-translation/OmniMark/csv-to-html-translation-1.xom deleted file mode 100644 index 10f9ee5923..0000000000 --- a/Task/CSV-to-HTML-translation/OmniMark/csv-to-html-translation-1.xom +++ /dev/null @@ -1,73 +0,0 @@ -global switch thead initial {true} -global switch tbody-first initial {true} - -define function process-tr (value stream line) as - do when thead - output '%n' - else when tbody-first - output '%n' - output '%n' - deactivate tbody-first - else - output '' - done - repeat scan line - match ',' any-text => char - output '' when thead - output '' unless thead - using group ents submit char - match any-text => char - using group ents submit char - again - output '' unless thead - output '' when thead - output '' - deactivate thead - - -process-start - output '%n' || - '%n' || - '%n' || - '%n' || - 'Monty Python’s Life of Brian (1979). Scene 20 (extract).%n' || - '%n' || - '%n' || - '%n' || - '%n' || - '%n' || - '%n' || - '%n' - -process-end - output '%n' || - '
    %n' || - '%n' || - '%n' - ; Output validates to XHTML 1.0 - https://validator.w3.org/check - -process - local stream s - set s to "Character,Speech%n" || - "The multitude,The messiah! Show us the messiah!%n" || - "Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!%n" || - "The multitude,Who are you?%n" || - "Brians mother,I'm his mother; that's who!%n" || - "The multitude,Behold his mother! Behold his mother!%n" - using group line submit s - -group ents - - find '<' - output '<' - - find '>' - output '>' - - find "'" - output ''' - -group line - - find line-start any-text+ => line - process-tr(line) diff --git a/Task/CSV-to-HTML-translation/OmniMark/csv-to-html-translation-2.xom b/Task/CSV-to-HTML-translation/OmniMark/csv-to-html-translation-2.xom deleted file mode 100644 index 92ff6b135c..0000000000 --- a/Task/CSV-to-HTML-translation/OmniMark/csv-to-html-translation-2.xom +++ /dev/null @@ -1,27 +0,0 @@ - - - - -Monty Python’s Life of Brian (1979). Scene 20 (extract). - - - - - - - - - - - - - - - - - -
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    - - diff --git a/Task/CSV-to-HTML-translation/OpenEdge-Progress/csv-to-html-translation-2.openedge b/Task/CSV-to-HTML-translation/OpenEdge-Progress/csv-to-html-translation-2.openedge index 5d586a5912..0a1dc0c135 100644 --- a/Task/CSV-to-HTML-translation/OpenEdge-Progress/csv-to-html-translation-2.openedge +++ b/Task/CSV-to-HTML-translation/OpenEdge-Progress/csv-to-html-translation-2.openedge @@ -1,28 +1,28 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    diff --git a/Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-1.ps1 b/Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-1.psh similarity index 100% rename from Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-1.ps1 rename to Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-1.psh diff --git a/Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-2.ps1 b/Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-2.psh similarity index 100% rename from Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-2.ps1 rename to Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-2.psh diff --git a/Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-3.ps1 b/Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-3.psh similarity index 100% rename from Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-3.ps1 rename to Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-3.psh diff --git a/Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-4.ps1 b/Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-4.psh similarity index 100% rename from Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-4.ps1 rename to Task/CSV-to-HTML-translation/PowerShell/csv-to-html-translation-4.psh diff --git a/Task/CSV-to-HTML-translation/Prolog/csv-to-html-translation-1.pro b/Task/CSV-to-HTML-translation/Prolog/csv-to-html-translation-1.pro index 735abd10f0..06bf8c825f 100644 --- a/Task/CSV-to-HTML-translation/Prolog/csv-to-html-translation-1.pro +++ b/Task/CSV-to-HTML-translation/Prolog/csv-to-html-translation-1.pro @@ -1,52 +1,52 @@ csv_html :- - L = "Character,Speech + L = "Character,Speech The multitude,The messiah! Show us the messiah! Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away! The multitude,Who are you? Brians mother,I'm his mother; that's who! The multitude,Behold his mother! Behold his mother!", - csv_html(L, Out, []), - string_to_list(Str, Out), - writeln(Str). + csv_html(L, Out, []), + string_to_list(Str, Out), + writeln(Str). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % simple HTML % csv_html(L) --> - "\n", - csv_tr(L), - "
    ". + "\n", + csv_tr(L), + "
    ". csv_tr([]) --> []. csv_tr(L) --> - "\n", - csv_td(L, S), - "\n\n", - csv_tr(S). + "\n", + csv_td(L, S), + "\n\n", + csv_tr(S). csv_td(L, S) --> - "", - csv_td_in(L, S), - "". + "", + csv_td_in(L, S), + "". csv_td_in([], []) --> []. csv_td_in([10|L], L) --> []. csv_td_in([44|L], S) --> - "", - csv_td_in(L,S). + "", + csv_td_in(L,S). csv_td_in([60|T], S) --> - "<", - csv_td_in(T, S). + "<", + csv_td_in(T, S). csv_td_in([62|T], S) --> - ">", - csv_td_in(T, S). + ">", + csv_td_in(T, S). csv_td_in([H|T], S) --> - [H], - csv_td_in(T, S). + [H], + csv_td_in(T, S). diff --git a/Task/CSV-to-HTML-translation/Prolog/csv-to-html-translation-3.pro b/Task/CSV-to-HTML-translation/Prolog/csv-to-html-translation-3.pro index 317040a50e..c5c27aeaa0 100644 --- a/Task/CSV-to-HTML-translation/Prolog/csv-to-html-translation-3.pro +++ b/Task/CSV-to-HTML-translation/Prolog/csv-to-html-translation-3.pro @@ -1,5 +1,5 @@ csv_html_plus :- - L = + L = "Character,Speech The multitude,The messiah! Show us the messiah! Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away! @@ -7,84 +7,84 @@ The multitude,Who are you? Brians mother,I'm his mother; that's who! The multitude,Behold his mother! Behold his mother!", - csv_html_plus(L, Out1, []), - string_to_list(Str1, Out1), - writeln(Str1). + csv_html_plus(L, Out1, []), + string_to_list(Str1, Out1), + writeln(Str1). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % HTML + % csv_html_plus(L) --> - "\n", - csv_head(L, R), - csv_body(R), - "
    ". + "\n", + csv_head(L, R), + csv_body(R), + "
    ". csv_head(L, R) --> - "\n", - csv_head_tr(L, R), - "\n". + "\n", + csv_head_tr(L, R), + "\n". csv_head_tr(L, R) --> - "\n", - csv_head_th(L, R), - "\n\n". + "\n", + csv_head_th(L, R), + "\n\n". csv_head_th(L, S) --> - "", - csv_head_th_in(L, S), - "". + "", + csv_head_th_in(L, S), + "". csv_head_th_in([], []) --> []. csv_head_th_in([10|L], L) --> []. csv_head_th_in([44|L], S) --> - "", - csv_head_th_in(L,S). + "", + csv_head_th_in(L,S). csv_head_th_in([H|T], S) --> - [H], - csv_head_th_in(T, S). + [H], + csv_head_th_in(T, S). csv_body(L) --> - "\n", - csv_body_tr(L), - "\n". + "\n", + csv_body_tr(L), + "\n". csv_body_tr([]) --> []. csv_body_tr(L) --> - "\n", - csv_body_td(L, S), - "\n\n", - csv_body_tr(S). + "\n", + csv_body_td(L, S), + "\n\n", + csv_body_tr(S). csv_body_td(L, S) --> - "", - csv_body_td_in(L, S), - "". + "", + csv_body_td_in(L, S), + "". csv_body_td_in([], []) --> []. csv_body_td_in([10|L], L) --> []. csv_body_td_in([44|L], S) --> - "", - csv_body_td_in(L,S). + "", + csv_body_td_in(L,S). csv_body_td_in([60|T], S) --> - "<", - csv_body_td_in(T, S). + "<", + csv_body_td_in(T, S). csv_body_td_in([62|T], S) --> - ">", - csv_body_td_in(T, S). + ">", + csv_body_td_in(T, S). csv_body_td_in([H|T], S) --> - [H], - csv_body_td_in(T, S). + [H], + csv_body_td_in(T, S). diff --git a/Task/CSV-to-HTML-translation/Raku/csv-to-html-translation-1.raku b/Task/CSV-to-HTML-translation/Raku/csv-to-html-translation-1.raku index f6bfab0ad8..c171689eae 100644 --- a/Task/CSV-to-HTML-translation/Raku/csv-to-html-translation-1.raku +++ b/Task/CSV-to-HTML-translation/Raku/csv-to-html-translation-1.raku @@ -25,4 +25,4 @@ printf # that / at the end is just an unspace, you can omit it, but then you have to delete # all whitespace and comments between split(…) and .map .map({tag 'td', $^cell}))})\ # map those cells as td - .join("\n"); # append a newline for nicer output + .join("\n"); # append a newline for nicer output diff --git a/Task/CSV-to-HTML-translation/Rebol/csv-to-html-translation-1.rebol b/Task/CSV-to-HTML-translation/Rebol/csv-to-html-translation-1.rebol deleted file mode 100644 index 406c067313..0000000000 --- a/Task/CSV-to-HTML-translation/Rebol/csv-to-html-translation-1.rebol +++ /dev/null @@ -1,53 +0,0 @@ -Rebol [ - title: "Rosetta code: CSV to HTML translation" - file: %CSV_to_HTML_translation.r3 - url: https://rosettacode.org/wiki/CSV_to_HTML_translation - needs: 3.15.0 ;; or something like that -] -import csv - -csv-to-html: function/with [ - "Generate string with html table from csv data file" - csv [string! file!] "input .csv data" -][ - escape-html csv - - data: decode 'csv csv - html: copy "^/" - - emit-row/head data/1 - foreach row next data [ emit-row row ] - emit
    -][ - html: none - emit: func [val][ - if block? val [val: ajoin val] - append html val - ] - emit-row: func[row /head][ - emit [""] - foreach col row [ - emit-tag either head ['th]['td] col - ] - emit "^/" - ] - emit-tag: func [tag content][ - emit [#"<" tag #">" content ""] - ] - escape-html: function/with [str][ - parse str [any[ - to esc [ - change #"<" "<" - | change #">" ">" - | change #"&" "&" - ] - ]] - ][ esc: charset "<>&" ] -] - -print csv-to-html {Character,Speech -The multitude,The messiah! Show us the messiah! -Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away! -The multitude,Who are you? -Brians mother,I'm his mother; that's who! -The multitude,Behold his mother! Behold his mother!} diff --git a/Task/CSV-to-HTML-translation/Rebol/csv-to-html-translation-2.rebol b/Task/CSV-to-HTML-translation/Rebol/csv-to-html-translation-2.rebol deleted file mode 100644 index dfebcd13ff..0000000000 --- a/Task/CSV-to-HTML-translation/Rebol/csv-to-html-translation-2.rebol +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - -
    CharacterSpeech
    The multitudeThe messiah! Show us the messiah!
    Brians mother<angry>Now you listen here! He's not the messiah; he's a very naughty boy! Now go away!</angry>
    The multitudeWho are you?
    Brians motherI'm his mother; that's who!
    The multitudeBehold his mother! Behold his mother!
    diff --git a/Task/CSV-to-HTML-translation/Run-BASIC/csv-to-html-translation.basic b/Task/CSV-to-HTML-translation/Run-BASIC/csv-to-html-translation.basic index 41e53b8200..4fa25a5ea3 100644 --- a/Task/CSV-to-HTML-translation/Run-BASIC/csv-to-html-translation.basic +++ b/Task/CSV-to-HTML-translation/Run-BASIC/csv-to-html-translation.basic @@ -5,7 +5,7 @@ The multitude,Who are you? Brians mother,I'm his mother; that's who! The multitude,Behold his mother! Behold his mother!" -k = instr(csv$,",") ' 2 exra lines to get heading +k = instr(csv$,",") ' 2 exra lines to get heading csv$ = left$(csv$,k - 1) + " + mid$(csv$,k + 1) csv$ = strRep$(csv$,",","") @@ -15,10 +15,10 @@ wait ' string replace rep str with ' -------------------------------- FUNCTION strRep$(strRep$,rep$,with$) -ln = len(rep$) -k = instr(strRep$,rep$) +ln = len(rep$) +k = instr(strRep$,rep$) while k - strRep$ = left$(strRep$,k - 1) + with$ + mid$(strRep$,k + ln) - k = instr(strRep$,rep$) + strRep$ = left$(strRep$,k - 1) + with$ + mid$(strRep$,k + ln) + k = instr(strRep$,rep$) WEND END FUNCTION diff --git a/Task/CSV-to-HTML-translation/Rust/csv-to-html-translation-1.rs b/Task/CSV-to-HTML-translation/Rust/csv-to-html-translation-1.rust similarity index 100% rename from Task/CSV-to-HTML-translation/Rust/csv-to-html-translation-1.rs rename to Task/CSV-to-HTML-translation/Rust/csv-to-html-translation-1.rust diff --git a/Task/CSV-to-HTML-translation/Rust/csv-to-html-translation-2.rs b/Task/CSV-to-HTML-translation/Rust/csv-to-html-translation-2.rust similarity index 100% rename from Task/CSV-to-HTML-translation/Rust/csv-to-html-translation-2.rs rename to Task/CSV-to-HTML-translation/Rust/csv-to-html-translation-2.rust diff --git a/Task/CSV-to-HTML-translation/Tcl/csv-to-html-translation-1.tcl b/Task/CSV-to-HTML-translation/Tcl/csv-to-html-translation-1.tcl index 2761df41e6..6b41ae0db4 100644 --- a/Task/CSV-to-HTML-translation/Tcl/csv-to-html-translation-1.tcl +++ b/Task/CSV-to-HTML-translation/Tcl/csv-to-html-translation-1.tcl @@ -18,7 +18,7 @@ html::init puts [subst { [html::openTag table {summary="csv2html program output"}] [html::while {[rows size]} { - [html::row {*}[html::quoteFormValue [rows get]]] + [html::row {*}[html::quoteFormValue [rows get]]] }] [html::closeTag] }] diff --git a/Task/CSV-to-HTML-translation/Tcl/csv-to-html-translation-2.tcl b/Task/CSV-to-HTML-translation/Tcl/csv-to-html-translation-2.tcl index 18c6bcdfff..748d62eea4 100644 --- a/Task/CSV-to-HTML-translation/Tcl/csv-to-html-translation-2.tcl +++ b/Task/CSV-to-HTML-translation/Tcl/csv-to-html-translation-2.tcl @@ -37,9 +37,9 @@ foreach line [split $csvData "\n"] { # Generate the output puts [subst { [table { - [tr [html::quoteFormValue [rows get]] {bgcolor="yellow"}] - [html::while {[rows size]} { - [tr [html::quoteFormValue [rows get]]] - }] + [tr [html::quoteFormValue [rows get]] {bgcolor="yellow"}] + [html::while {[rows size]} { + [tr [html::quoteFormValue [rows get]]] + }] }] }] diff --git a/Task/CSV-to-HTML-translation/Uiua/csv-to-html-translation.uiua b/Task/CSV-to-HTML-translation/Uiua/csv-to-html-translation.uiua deleted file mode 100644 index 8b7fe76408..0000000000 --- a/Task/CSV-to-HTML-translation/Uiua/csv-to-html-translation.uiua +++ /dev/null @@ -1,9 +0,0 @@ -$ Character,Speech -$ The multitude,The messiah! Show us the messiah! -$ Brians mother,Now you listen here! He's not the messiah; he's a very naughty boy! Now go away! -$ The multitude,Who are you? -$ Brians mother,I'm his mother; that's who! -$ The multitude,Behold his mother! Behold his mother! -⊜(□$"_"/◇⊂⊜(□$"_")⊸≠@,)⊸≠@\n -/◇$"_\n_" -&p$"\n\n_\n
    CharacterSpeech
    " diff --git a/Task/CSV-to-HTML-translation/VBScript/csv-to-html-translation.vb b/Task/CSV-to-HTML-translation/VBScript/csv-to-html-translation.vb new file mode 100644 index 0000000000..2eadb9ed6f --- /dev/null +++ b/Task/CSV-to-HTML-translation/VBScript/csv-to-html-translation.vb @@ -0,0 +1,33 @@ +Set objfso = CreateObject("Scripting.FileSystemObject") + +parent_folder = objfso.GetParentFolderName(WScript.ScriptFullName) & "\" + +Set objcsv = objfso.OpenTextFile(parent_folder & "in.csv",1,False) +Set objhtml = objfso.OpenTextFile(paren_folder & "out.html",2,True) + +objhtml.Write(csv_to_html(objcsv.ReadAll)) + +objcsv.Close +objhtml.Close +Set objfso = Nothing + +Function csv_to_html(s) + row = Split(s,vbCrLf) + 'write the header + tmp = "" + For i = 0 To UBound(row) + field = Split(row(i),",") + If i = 0 Then + tmp = tmp & "" + Else + tmp = tmp & "" + End If + Next + 'write the footer + tmp = tmp & "
    " & replace_chars(field(0)) & "" & replace_chars(field(1)) & "
    " & replace_chars(field(0)) & "" & replace_chars(field(1)) & "
    " + csv_to_html = tmp +End Function + +Function replace_chars(s) + replace_chars = Replace(Replace(s,"<","<"),">",">") +End Function diff --git a/Task/CSV-to-HTML-translation/VBScript/csv-to-html-translation.vbs b/Task/CSV-to-HTML-translation/VBScript/csv-to-html-translation.vbs deleted file mode 100644 index 33894748ed..0000000000 --- a/Task/CSV-to-HTML-translation/VBScript/csv-to-html-translation.vbs +++ /dev/null @@ -1,33 +0,0 @@ -Set objfso = CreateObject("Scripting.FileSystemObject") - -parent_folder = objfso.GetParentFolderName(WScript.ScriptFullName) & "\" - -Set objcsv = objfso.OpenTextFile(parent_folder & "in.csv",1,False) -Set objhtml = objfso.OpenTextFile(paren_folder & "out.html",2,True) - -objhtml.Write(csv_to_html(objcsv.ReadAll)) - -objcsv.Close -objhtml.Close -Set objfso = Nothing - -Function csv_to_html(s) - row = Split(s,vbCrLf) - 'write the header - tmp = "" - For i = 0 To UBound(row) - field = Split(row(i),",") - If i = 0 Then - tmp = tmp & "" - Else - tmp = tmp & "" - End If - Next - 'write the footer - tmp = tmp & "
    " & replace_chars(field(0)) & "" & replace_chars(field(1)) & "
    " & replace_chars(field(0)) & "" & replace_chars(field(1)) & "
    " - csv_to_html = tmp -End Function - -Function replace_chars(s) - replace_chars = Replace(Replace(s,"<","<"),">",">") -End Function diff --git a/Task/CUSIP/11l/cusip.11l b/Task/CUSIP/11l/cusip.11l index c3bafa6306..3728e24945 100644 --- a/Task/CUSIP/11l/cusip.11l +++ b/Task/CUSIP/11l/cusip.11l @@ -4,7 +4,7 @@ F cusip_check(=cusip) cusip = cusip.uppercase() V total = 0 - L(i) 0.<8 + L(i) 8 V v = 0 V c = cusip[i] I c.is_digit() diff --git a/Task/CUSIP/ALGOL-68/cusip.alg b/Task/CUSIP/ALGOL-68/cusip.alg index 95cae39ff8..32d1c0bad0 100644 --- a/Task/CUSIP/ALGOL-68/cusip.alg +++ b/Task/CUSIP/ALGOL-68/cusip.alg @@ -1,35 +1,44 @@ -BEGIN # validate CUSIP codes # - - # returns TRUE if cusip string is a valid CUSIP code, FALSE otherwise # - OP ISCUSIP = ( STRING cusip string )BOOL: - IF UPB cusip string - LWB cusip string /= 8 - THEN FALSE # CUSIP code is not 9 characters long # - ELSE # CUSIP code has the correct length # - - # returns the base 39 digit corresponding to a character of a CUSIP code # - PROC cusip digit = ( CHAR c char )INT: - IF STRING cusip digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*@#"[ AT 0 ]; - INT digit := 0; - char in string( c char, digit, cusip digits ) - THEN digit - ELSE -999 # invalid digit # - FI # cusip digit # ; - - []CHAR cusip = cusip string[ AT 1 ]; - INT sum := 0; - INT check digit = cusip digit( cusip[ UPB cusip ] ); - FOR c pos TO UPB cusip - 1 DO - INT digit := cusip digit( cusip[ c pos ] ); - IF NOT ODD c pos THEN digit *:= 2 FI; - sum +:= ( digit OVER 10 ) + ( digit MOD 10 ) - OD; - ( 10 - ( sum MOD 10 ) ) MOD 10 = check digit - FI # is cusip # ; +BEGIN + # returns TRUE if cusip is a valid CUSIP code # + OP ISCUSIP = ( STRING cusip )BOOL: + IF ( UPB cusip - LWB cusip ) /= 8 + THEN + # code is wrong length # + FALSE + ELSE + # string is 9 characters long - check it is valid # + STRING cusip digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*@#"[ AT 0 ]; + INT check digit := 0; + IF NOT char in string( cusip[ UPB cusip ], check digit, cusip digits ) + THEN + # invalid check digit # + FALSE + ELSE + # OK so far compare the calculated check sum to the supplied one # + INT sum := 0; + INT c pos := LWB cusip - 1; + FOR i TO 8 DO + INT digit := 0; + IF NOT char in string( cusip[ i + c pos ], digit, cusip digits ) + THEN + # invalid digit # + digit := -999 + FI; + IF NOT ODD i + THEN + # even digit # + digit *:= 2 + FI; + sum +:= ( digit OVER 10 ) + ( digit MOD 10 ) + OD; + ( 10 - ( sum MOD 10 ) ) MOD 10 = check digit + FI + FI ; # ISCUSIP # # task test cases # PROC test cusip = ( STRING cusip )VOID: - print( ( cusip, IF ISCUSIP cusip THEN " valid" ELSE " invalid" FI, newline ) ); + print( ( cusip, IF ISCUSIP cusip THEN " valid" ELSE " invalid" FI, newline ) ); test cusip( "037833100" ); test cusip( "17275R102" ); diff --git a/Task/CUSIP/ANSI-BASIC/cusip.basic b/Task/CUSIP/ANSI-BASIC/cusip.basic deleted file mode 100644 index 13e8080304..0000000000 --- a/Task/CUSIP/ANSI-BASIC/cusip.basic +++ /dev/null @@ -1,63 +0,0 @@ -100 REM CUSIP -110 DECLARE EXTERNAL SUB PrintVerdict -120 DECLARE EXTERNAL FUNCTION CusipCheckDigit -130 DECLARE EXTERNAL FUNCTION IsValidCusip -140 PRINT "CUSIP Verdict" -150 CALL PrintVerdict("037833100") -160 CALL PrintVerdict("17275R102") -170 CALL PrintVerdict("38259P508") -180 CALL PrintVerdict("594918104") -190 CALL PrintVerdict("68389X106") -200 CALL PrintVerdict("68389X105") -210 END -220 REM ** -230 EXTERNAL FUNCTION CusipCheckDigit(Cusip$) -240 LET I = 1 -250 LET Sum = 0 -260 LET L = LEN(Cusip$) -270 DO WHILE I < L -280 LET C$ = Cusip$(I:I) -290 IF ("0" <= C$) AND (C$ <= "9") THEN -300 LET V = VAL(C$) -310 ELSEIF ("A" <= C$) AND (C$ <= "Z") THEN -320 LET V = ORD(C$) - 65 + 10 -330 ELSEIF C$ = "*" THEN -340 LET V = 36 -350 ELSEIF C$ = "@" THEN -360 LET V = 37 -370 ELSEIF C$ = "#" THEN -380 LET V = 38 -390 ELSE -400 LET CusipCheckDigit = -1 -410 EXIT FUNCTION -420 END IF -430 IF MOD(I - 1, 2) = 1 THEN LET V = 2 * V -440 IF I <= 8 THEN LET Sum = Sum + INT(V / 10) + MOD(V, 10) -450 LET I = I + 1 -460 LOOP -470 IF I <> 9 THEN -480 LET CusipCheckDigit = -1 -490 ELSE -500 LET CusipCheckDigit = MOD(10 - MOD(Sum, 10), 10) -510 END IF -520 END FUNCTION -530 REM ** -540 EXTERNAL FUNCTION IsValidCusip (Cusip$) -550 LET Check = CusipCheckDigit(Cusip$) -560 IF Check < 0 THEN -570 LET IsValidCusip = 0 -580 ELSEIF Cusip$(9:9) = CHR$(48 + Check) THEN -590 LET IsValidCusip = -1 -600 ELSE -610 LET IsValidCusip = 0 -620 END IF -630 END FUNCTION -640 REM ** -650 EXTERNAL SUB PrintVerdict (Cusip$) -660 PRINT Cusip$; -670 IF IsValidCusip(Cusip$) <>0 THEN -680 PRINT " : Valid" -690 ELSE -700 PRINT " : Invalid" -710 END IF -720 END SUB diff --git a/Task/CUSIP/Ada/cusip.adb b/Task/CUSIP/Ada/cusip.ada similarity index 100% rename from Task/CUSIP/Ada/cusip.adb rename to Task/CUSIP/Ada/cusip.ada diff --git a/Task/CUSIP/Arturo/cusip.arturo b/Task/CUSIP/Arturo/cusip.arturo index bde0bd1ddc..b8615d3d49 100644 --- a/Task/CUSIP/Arturo/cusip.arturo +++ b/Task/CUSIP/Arturo/cusip.arturo @@ -1,17 +1,17 @@ validCUSIP?: function [cusip][ s: 0 - alpha: 'A'..'Z' + alpha: `A`..`Z` loop.with:'i chop cusip 'c [ v: 0 - when.has: c [ - [|numeric?] -> v: to :integer to :string c - [|in? alpha] -> v: (index alpha c) + 1 + 9 - [= '*'] -> v: 36 - [= '@'] -> v: 37 - [= '#'] -> v: 38 - ] + case ø + when? [numeric? c] -> v: to :integer to :string c + when? [in? c alpha] -> v: (index alpha c) + 1 + 9 + when? [c = `*`] -> v: 36 + when? [c = `@`] -> v: 37 + when? [c = `#`] -> v: 38 + else [] if odd? i -> v: 2 * v diff --git a/Task/CUSIP/BQN/cusip.bqn b/Task/CUSIP/BQN/cusip.bqn deleted file mode 100644 index dd8bf31a89..0000000000 --- a/Task/CUSIP/BQN/cusip.bqn +++ /dev/null @@ -1,5 +0,0 @@ -d ← ∾"0A*@#"+⟜↕¨10‿26‿1‿1‿1 -m ← 8⥊1‿2 -Check ← ¯1(⊑=10|0-˜´10(|+⌊∘÷˜)m×↓)d⊐⊢ - -Check¨ "037833100"‿"17275R102"‿"38259P508"‿"594918104"‿"68389X106"‿"68389X105" diff --git a/Task/CUSIP/Crystal/cusip.cr b/Task/CUSIP/Crystal/cusip.cr deleted file mode 100644 index f601d4b0cf..0000000000 --- a/Task/CUSIP/Crystal/cusip.cr +++ /dev/null @@ -1,28 +0,0 @@ -def cusip_check (input) - return false unless input.size == 9 - sum = 0 - input.chars.each_with_index do |c, i| - break if i == 8 - v = case c - when .ascii_number? then c.to_i - when .ascii_uppercase? then c.ord - 'A'.ord + 10 - when '*' then 36 - when '@' then 37 - when '#' then 38 - else return false - end - v *= 2 if (i+1).even? - - sum += v // 10 + v % 10 - end - input[-1].to_i? == (10 - sum % 10) % 10 -end - -["037833100", - "17275R102", - "38259P508", - "594918104", - "68389X106", - "68389X105"].each do |cusip| - print cusip, ": ", cusip_check(cusip) ? "valid" : "invalid", "\n" -end diff --git a/Task/CUSIP/Delphi/cusip.pas b/Task/CUSIP/Delphi/cusip.delphi similarity index 100% rename from Task/CUSIP/Delphi/cusip.pas rename to Task/CUSIP/Delphi/cusip.delphi diff --git a/Task/CUSIP/EasyLang/cusip.easy b/Task/CUSIP/EasyLang/cusip.easy index 574de473d0..f9ebc73bfc 100644 --- a/Task/CUSIP/EasyLang/cusip.easy +++ b/Task/CUSIP/EasyLang/cusip.easy @@ -12,10 +12,12 @@ func check inp$ . elif c = 35 v = 38 . - if i mod 2 = 0 : v *= 2 + if i mod 2 = 0 + v *= 2 + . sum += v div 10 + v mod 10 . - return if (10 - sum mod 10) mod 10 = number substr inp$ 9 1 + return if (10 - (sum mod 10)) mod 10 = number substr inp$ 9 1 . for s$ in [ "037833100" "17275R102" "38259P508" "594918104" "68389X106" "68389X105" ] write s$ & " is " diff --git a/Task/CUSIP/Julia/cusip.jl b/Task/CUSIP/Julia/cusip.julia similarity index 100% rename from Task/CUSIP/Julia/cusip.jl rename to Task/CUSIP/Julia/cusip.julia diff --git a/Task/CUSIP/Kotlin/cusip.kts b/Task/CUSIP/Kotlin/cusip.kotlin similarity index 100% rename from Task/CUSIP/Kotlin/cusip.kts rename to Task/CUSIP/Kotlin/cusip.kotlin diff --git a/Task/CUSIP/Langur/cusip-1.langur b/Task/CUSIP/Langur/cusip-1.langur index 69451c3430..7153ac3e7b 100644 --- a/Task/CUSIP/Langur/cusip-1.langur +++ b/Task/CUSIP/Langur/cusip-1.langur @@ -1,21 +1,23 @@ -val isCusip = fn(s string) { - if len(s) != 9 : return false - - val basechars = '0'..'9' ~ 'A'..'Z' ~ "*@#" - - val sum = for[=0] i of 8 { - var v = index(basechars, by=s2s(s, of=i)) - if not v: return false - v = v[1]-1 - if i div 2: v *= 2 - _for += v \ 10 + v rem 10 +val .isCusip = fn(.s) { + if .s is not string or len(.s) != 9 { + return false } - s[9]-'0' == (10-(sum rem 10)) rem 10 + val .basechars = '0'..'9' ~ 'A'..'Z' ~ "*@#" + + val .sum = for[=0] .i of 8 { + var .v = index(s2s(.s, .i), .basechars) + if not .v: return false + .v = .v[1]-1 + if .i div 2: .v *= 2 + _for += .v \ 10 + .v rem 10 + } + + .s[9]-'0' == (10-(.sum rem 10)) rem 10 } -val candidates = fw/037833100 17275R102 38259P508 594918104 68389X106 68389X105/ +val .candidates = fw/037833100 17275R102 38259P508 594918104 68389X106 68389X105/ -for c in candidates { - writeln c, ": ", if(isCusip(c): "good" ; "bad") +for .c in .candidates { + writeln .c, ": ", if(.isCusip(.c): "good" ; "bad") } diff --git a/Task/CUSIP/Langur/cusip-2.langur b/Task/CUSIP/Langur/cusip-2.langur index ed2dd39a3f..792cec79d2 100644 --- a/Task/CUSIP/Langur/cusip-2.langur +++ b/Task/CUSIP/Langur/cusip-2.langur @@ -1,35 +1,35 @@ -val isCusip = fn(s string) { - if len(s) != 9 : return false +val .isCusip = fn(.s) { + if .s is not string or len(.s) != 9 { + return false + } - val basechars = '0'..'9' ~ 'A'..'Z' ~ "*@#" + val .sum = for[=0] .i of 8 { + val .c = .s[.i] + var .v = 0 - val sum = for[=0] i of 8 { - val c = s[i] - var v = 0 - - switch[and] c { + switch[and] .c { case >= '0', <= '9': - v = c-'0' + .v = .c-'0' case >= 'A', <= 'Z': - v = c-55 # c-'A'+10 + .v = .c-55 # .c-'A'+10 - case '*': v = 36 - case '@': v = 37 - case '#': v = 38 + case '*': .v = 36 + case '@': .v = 37 + case '#': .v = 38 default: return false } - if i div 2: v *= 2 - _for += v \ 10 + v rem 10 + if .i div 2: .v *= 2 + _for += .v \ 10 + .v rem 10 } - s[9]-'0' == (10-(sum rem 10)) rem 10 + .s[9]-'0' == (10-(.sum rem 10)) rem 10 } -val candidates = fw/037833100 17275R102 38259P508 594918104 68389X106 68389X105/ +val .candidates = w/037833100 17275R102 38259P508 594918104 68389X106 68389X105/ -for c in candidates { - writeln c, ": ", if(isCusip(c): "good" ; "bad") +for .c in .candidates { + writeln .c, ": ", if(.isCusip(.c): "good" ; "bad") } diff --git a/Task/CUSIP/Loglan82/cusip.loglan82 b/Task/CUSIP/Loglan82/cusip.loglan82 deleted file mode 100644 index 7a3a1210de..0000000000 --- a/Task/CUSIP/Loglan82/cusip.loglan82 +++ /dev/null @@ -1,89 +0,0 @@ -(* CUSIP *) - -block - - unit check_digit: function (cusip: string): integer; - var - sum, v, i_first, i_last, i: integer, - c: character, - check_needed: boolean, - ccusip: arrayof character; - begin - sum := 0; - ccusip := unpack(cusip); - i, i_first := lower(ccusip); - i_last := upper(ccusip); - check_needed := true; - while (i < i_last) and check_needed - do - c := ccusip(i); - if ord(c) >= ord('0') and ord(c) <= ord('9') - then - v := ord(c) - ord('0') - else - if ord('A') <= ord(c) and ord(c) <= ord('Z') - then - v := ord(c) - ord('A') + 10 - else - case c - when '*': v := 36; - when '@': v := 37; - when '#': v := 38; - otherwise - result := -1; - check_needed := false - esac - fi - fi; - if check_needed - then - if (i - i_first) mod 2 = 1 then v := 2 * v fi; - if i - i_first <= 7 then sum := sum + v div 10 + v mod 10 fi; - i := i + 1 - fi; - od; - if check_needed - then - if i - i_first =/= 8 - then - result := -1 - else - result := (10 - sum mod 10) mod 10 - fi; - fi; - end check_digit; - - unit is_valid: function (cusip: string): boolean; - var - check: integer, - ccusip: arrayof character; - begin - check := check_digit(cusip); - if check < 0 - then - result := false - else - ccusip := unpack(cusip); - result := ord(ccusip(lower(ccusip) + 8)) = ord('0') + check - fi; - end is_valid; - - unit write_verdict: procedure (cusip: string); - begin - if is_valid(cusip) - then - writeln(cusip, " : Valid") - else - writeln(cusip, " : Invalid") - fi - end write_verdict; - -begin - writeln("CUSIP Verdict"); - call write_verdict("037833100"); - call write_verdict("17275R102"); - call write_verdict("38259P508"); - call write_verdict("594918104"); - call write_verdict("68389X106"); - call write_verdict("68389X105"); -end; diff --git a/Task/CUSIP/Oberon-07/cusip.oberon b/Task/CUSIP/Oberon-07/cusip.oberon deleted file mode 100644 index 23d635fd12..0000000000 --- a/Task/CUSIP/Oberon-07/cusip.oberon +++ /dev/null @@ -1,60 +0,0 @@ -MODULE Cusip; (* validate CUSIP codes *) - IMPORT Strings, Out; - - CONST cusipBase = 39; - cusipLength = 9; - VAR cusipDigits : ARRAY cusipBase + 1 OF CHAR; (* 39 digits + trailing nul *) - - (* returns TRUE if cusip is a valid CUSIP code, FALSE otherwise *) - PROCEDURE isCusip( cusip : ARRAY OF CHAR ) : BOOLEAN; - VAR sum, digit, cPos, checkDigit : INTEGER; - isValid : BOOLEAN; - - (* returns the base 39 digit corresponding to a character of a CUSIP code *) - PROCEDURE cusipDigit( cChar : CHAR ) : INTEGER; - VAR digit, dPos : INTEGER; - BEGIN - digit := -999; - dPos := 0; - WHILE ( dPos <= cusipBase ) & ( digit < 0 ) DO - IF cusipDigits[ dPos ] = cChar THEN digit := dPos END; - INC( dPos ) - END - RETURN digit - END cusipDigit ; - - BEGIN - IF Strings.Length( cusip ) # cusipLength THEN - isValid := FALSE (* invalid length code *) - ELSE - (* CUSIP code has the correct length *) - sum := 0; - checkDigit := cusipDigit( cusip[ cusipLength - 1 ] ); - FOR cPos := 0 TO cusipLength - 2 DO - digit := cusipDigit( cusip[ cPos ] ); - IF ODD( cPos ) THEN digit := digit * 2 END; - INC( sum, ( digit DIV 10 ) + ( digit MOD 10 ) ) - END; - isValid := ( 10 - ( sum MOD 10 ) ) MOD 10 = checkDigit - END - RETURN isValid - END isCusip ; - - PROCEDURE testCusip( cusip : ARRAY OF CHAR ) ; - BEGIN - Out.String( cusip ); - IF isCusip( cusip ) THEN Out.String( " valid" ) ELSE Out.String( " invalid" ) END; - Out.Ln - END testCusip; - -BEGIN - - cusipDigits := "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*@#"; - - testCusip( "037833100" ); - testCusip( "17275R102" ); - testCusip( "38259P508" ); - testCusip( "594918104" ); - testCusip( "68389X106" ); - testCusip( "68389X105" ) -END Cusip. diff --git a/Task/CUSIP/Pascal-P/cusip.pas b/Task/CUSIP/Pascal-P/cusip.pas deleted file mode 100644 index 34d081a34a..0000000000 --- a/Task/CUSIP/Pascal-P/cusip.pas +++ /dev/null @@ -1,70 +0,0 @@ -program cusip(output); - -const - cusiplen = 9; - -type - tcusip = array [1 .. cusiplen] of char; - - function cusipcheckdigit(cusip: tcusip): integer; - (* Check digit *) - var - i, sum, v: integer; - c: char; - contcheck: boolean; (* Continue checking? *) - begin - i := 1; - sum := 0; - contcheck := true; - while (i <= cusiplen) and contcheck do - begin - c := cusip[i]; - if ('0' <= c) and (c <= '9') then v := ord(c) - 48 - else if ('A' <= c) and (c <= 'Z') then v := ord(c) - 65 + 10 - else if c = '*' then v := 36 - else if c = '@' then v := 37 - else if c = '#' then v := 38 - else - begin - cusipcheckdigit := -1; - contcheck := false; - end; - if contcheck then - begin - if (i - 1) mod 2 = 1 then v := 2 * v; - if i <= 8 then sum := sum + (v div 10) + (v mod 10); - i := i + 1; - end; - end; - if contcheck then - if i <> 10 then cusipcheckdigit := -1 - else cusipcheckdigit := (10 - (sum mod 10)) mod 10; - end; - - function isvalidcusip(cusip: tcusip): boolean; - var - check: integer; - begin - check := cusipcheckdigit(cusip); - if check < 0 then isvalidcusip := false - else isvalidcusip := (ord(cusip[9]) = ord(48 + check)); - end; - - procedure writeverdict(cusip: tcusip); - (* Write the verdict *) - begin - write(cusip); - if isvalidcusip(cusip) then writeln(' : Valid') - else writeln(' : Invalid'); - end; - -begin - writeln('CUSIP Verdict'); - writeverdict('037833100'); - writeverdict('17275R102'); - writeverdict('38259P508'); - writeverdict('594918104'); - writeverdict('68389X106'); - writeverdict('68389X105'); - (* readln; *) -end. diff --git a/Task/CUSIP/PascalABC.NET/cusip.pas b/Task/CUSIP/PascalABC.NET/cusip.pas deleted file mode 100644 index 30d756c32e..0000000000 --- a/Task/CUSIP/PascalABC.NET/cusip.pas +++ /dev/null @@ -1,32 +0,0 @@ -function IsCusip(s: string): boolean; -begin - result := false; - if (s.Length <> 9) then exit; - var sum := 0; - var v := 0; - for var i := 1 to 8 do - begin - var c := s[i]; - if c.isdigit then - v := c.todigit - else if (c >= 'A') and (c <= 'Z') then - v := ord(c) - ord('A') + 10 - else if c = '*' then - v := 36 - else if c = '@' then - v := 37 - else if c = '#' then - v := 38; - if (i mod 2) = 0 then - v := v * 2; - sum += (v div 10) + (v mod 10); - end; - var check := (10 - (sum mod 10)) mod 10; - result := s[9].todigit = check; -end; - -begin - var candidates := |'037833100', '17275R102', '38259P508', '594918104', '68389X106', '68389X105'|; - foreach var candidate in candidates do - println(candidate, if IsCusip(candidate) then 'correct' else 'incorrect'); -end. diff --git a/Task/CUSIP/Phix/cusip.phix b/Task/CUSIP/Phix/cusip.phix index e0bfdfac32..4db8980c3d 100644 --- a/Task/CUSIP/Phix/cusip.phix +++ b/Task/CUSIP/Phix/cusip.phix @@ -1,40 +1,42 @@ -sequence cch = {} +(phixonline)--> + sequence cch = {} -function CusipCheckDigit(string cusip) -integer s = 0, c, v - if length(cch)=0 then - cch = repeat(-1,256) - for i='0' to '9' do - cch[i] = i-'0' - end for - for i='A' to 'Z' do - cch[i] = i-55 - end for - cch['*'] = 36 - cch['@'] = 37 - cch['#'] = 38 - end if - if length(cusip)!=9 or find('\0',cusip) then return 0 end if - for i=1 to 8 do - c := cusip[i] - v := cch[c] - if v=-1 then return 0 end if - if remainder(i,2)=0 then - v *= 2 - end if - s += floor(v/10)+mod(v,10) - end for - return cusip[9]=mod(10-mod(s,10),10)+'0' -end function + function CusipCheckDigit(string cusip) + integer s = 0, c, v + if length(cch)=0 then + cch = repeat(-1,256) + for i='0' to '9' do + cch[i] = i-'0' + end for + for i='A' to 'Z' do + cch[i] = i-55 + end for + cch['*'] = 36 + cch['@'] = 37 + cch['#'] = 38 + end if + if length(cusip)!=9 or find('\0',cusip) then return 0 end if + for i=1 to 8 do + c := cusip[i] + v := cch[c] + if v=-1 then return 0 end if + if remainder(i,2)=0 then + v *= 2 + end if + s += floor(v/10)+mod(v,10) + end for + return cusip[9]=mod(10-mod(s,10),10)+'0' + end function -sequence tests = {"037833100", -- Apple Incorporated - "17275R102", -- Cisco Systems - "38259P508", -- Google Incorporated - "594918104", -- Microsoft Corporation - "68389X106", -- Oracle Corporation (incorrect) - "68389X105"} -- Oracle Corporation + sequence tests = {"037833100", -- Apple Incorporated + "17275R102", -- Cisco Systems + "38259P508", -- Google Incorporated + "594918104", -- Microsoft Corporation + "68389X106", -- Oracle Corporation (incorrect) + "68389X105"} -- Oracle Corporation -for i=1 to length(tests) do - string ti = tests[i] - printf(1,"%s : %s\n",{ti,{"invalid","valid"}[CusipCheckDigit(ti)+1]}) -end for + for i=1 to length(tests) do + string ti = tests[i] + printf(1,"%s : %s\n",{ti,{"invalid","valid"}[CusipCheckDigit(ti)+1]}) + end for + + with javascript_semantics + requires("1.0.2") -- (builtin constant E renamed as EULER) + atom e0 = 0, e = 2, n = 0, fact = 1 + while abs(e-e0)>=1e-15 do + e0 = e + n += 1 + fact *= 2*n*(2*n+1) + e += (2*n+2)/fact + end while + printf(1,"Computed e = %.15f\n",e) + printf(1," Real e = %.15f\n",EULER) + printf(1," Error = %g\n",EULER-e) + printf(1,"Number of iterations = %d\n",n) + + without js -- not from a browser, mate! + string {libname,funcname} = iff(platform()=WINDOWS?{"user32","CharLowerA"}:{"libc","tolower"}) + atom lib = open_dll(libname) + integer func = define_c_func(lib,funcname,{C_INT},C_INT) + if func=-1 then + ?{{lower('A')}} -- (you don't //have// to crash!) + else + ?c_func(func,{'A'}) -- ('A'==65) + end if + + without js -- (no class in p2js) + class test + string msg = "this is a test" + procedure show() ?this.msg end procedure + procedure inst() ?"this is dynamic" end procedure + end class + test t = new() + t.show() -- prints "this is a test" + t.inst() -- prints "this is dynamic" + t.inst = t.show + t.inst() -- prints "this is a test" + {ToSnakeCase(text)}"); - } - - Console.WriteLine(); - Console.WriteLine($"{"=== To camelCase ===",48}"); - foreach (string text in variableNames) - { - Console.WriteLine($"{text,34} --> {ToCamelCase(text)}"); - } - } - - private static string ToSnakeCase(string aCamel) - { - aCamel = aCamel.Trim().Replace(SPACE, UNDERSCORE).Replace(HYPHEN, UNDERSCORE); - StringBuilder snake = new StringBuilder(); - bool first = true; - foreach (char ch in aCamel) - { - if (first) - { - snake.Append(ch); - first = false; - } - else if (!first && char.IsUpper(ch)) - { - if (snake.ToString().EndsWith(UNDERSCORE)) - { - snake.Append(char.ToLower(ch)); - } - else - { - snake.Append(UNDERSCORE + char.ToLower(ch)); - } - } - else - { - snake.Append(ch); - } - } - return snake.ToString(); - } - - private static string ToCamelCase(string aSnake) - { - aSnake = aSnake.Trim().Replace(SPACE, UNDERSCORE).Replace(HYPHEN, UNDERSCORE); - StringBuilder camel = new StringBuilder(); - bool underscore = false; - foreach (char ch in aSnake) - { - if (ch.ToString().Equals(UNDERSCORE)) - { - underscore = true; - } - else if (underscore) - { - camel.Append(char.ToUpper(ch)); - underscore = false; - } - else - { - camel.Append(ch); - } - } - return camel.ToString(); - } - - private static readonly string SPACE = " "; - private static readonly string UNDERSCORE = "_"; - private static readonly string HYPHEN = "-"; -} diff --git a/Task/Camel-case-and-snake-case/Crystal/camel-case-and-snake-case.cr b/Task/Camel-case-and-snake-case/Crystal/camel-case-and-snake-case.cr deleted file mode 100644 index 38a8fc567f..0000000000 --- a/Task/Camel-case-and-snake-case/Crystal/camel-case-and-snake-case.cr +++ /dev/null @@ -1,6 +0,0 @@ -["snakeCase", "snake_case", "variable_10_case", "variable10Case", "ɛrgo rE tHis", - "hurry-up-joe!", "c://my-docs/happy_Flag-Day/12.doc", " spaces "].each do |ident| - print ident, " => " - print ident.strip.gsub(/[ -]/, "_").camelcase, ", " - puts ident.strip.gsub(/[ -]/, "_").underscore -end diff --git a/Task/Camel-case-and-snake-case/Delphi/camel-case-and-snake-case.pas b/Task/Camel-case-and-snake-case/Delphi/camel-case-and-snake-case.delphi similarity index 100% rename from Task/Camel-case-and-snake-case/Delphi/camel-case-and-snake-case.pas rename to Task/Camel-case-and-snake-case/Delphi/camel-case-and-snake-case.delphi diff --git a/Task/Camel-case-and-snake-case/Ed/camel-case-and-snake-case.ed b/Task/Camel-case-and-snake-case/Ed/camel-case-and-snake-case.ed deleted file mode 100644 index cd21f1e1b7..0000000000 --- a/Task/Camel-case-and-snake-case/Ed/camel-case-and-snake-case.ed +++ /dev/null @@ -1,7 +0,0 @@ -# by Artyom Bologov -H -g/.*/s/\([A-Z]\)/_&/g -g/^\<_*/s/// -g/^_*\>/s/// -,p -Q diff --git a/Task/Camel-case-and-snake-case/Fortran/camel-case-and-snake-case.f b/Task/Camel-case-and-snake-case/Fortran/camel-case-and-snake-case.f deleted file mode 100644 index 8d54399adc..0000000000 --- a/Task/Camel-case-and-snake-case/Fortran/camel-case-and-snake-case.f +++ /dev/null @@ -1,291 +0,0 @@ -! Camel case and snake case -! -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.04 -! GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 on Kubuntu 25.04 -! -! -! U.B., August 2025 -! -program CaseConverter - -implicit none - -! sep is a marker to separate words within given strings. -! Selected "§" because this is never part of a legit text. -! -character, parameter :: sep='§' - -character (len=:), allocatable :: testWord - - -print *, ' ***** Converting test strings to Snake Case *****' - -testWord = 'snakeCase' -call printResult (testWord, toSnakeCase (testWord)) - -testWord = 'snake_case' -call printResult (testWord, toSnakeCase (testWord)) - -testWord = 'variable_10_case' -call printResult (testWord, toSnakeCase (testWord)) - -testWord = 'variable10Case' -call printResult (testWord, toSnakeCase (testWord)) - -testWord = 'ɛrgo rE tHis' -call printResult (testWord, toSnakeCase (testWord)) - -testWord = 'hurry-up-joe!' -call printResult (testWord, toSnakeCase (testWord)) - -testWord = 'c://my-docs/happy_Flag-Day/12.doc' -call printResult (testWord, toSnakeCase (testWord)) - -testWord = ' spaces ' -call printResult (testWord, toSnakeCase (testWord)) - -print * -print *, ' ***** Converting test strings to Camel Case *****' - -testWord = 'snakeCase' -call printResult ( testWord, toCamelCase (testWord) ) - -testWord = 'snake_case' -call printResult ( testWord, toCamelCase (testWord) ) - -testWord = 'variable_10_case' -call printResult ( testWord, toCamelCase (testWord) ) - -testWord = 'variable10Case' -call printResult ( testWord, toCamelCase (testWord) ) - -testWord = 'ɛrgo rE tHis' -call printResult (testWord, toCamelCase(testWord)) - -testWord = 'hurry-up-joe!' -call printResult ( testWord, toCamelCase (testWord) ) - -testWord = 'c://my-docs/happy_Flag-Day/12.doc' -call printResult ( testWord, toCamelCase (testWord) ) - -testWord = ' spaces ' -call printResult ( testWord, toCamelCase (testWord) ) - - - - -contains - - -! ---------------------------------------------------------- -! print with variable format to display the greek "ɛ" -! and the following text positioned correctly. -! Letter "ɛ" uses 2 bytes so len("ɛ") = 2 but ulen("ɛ") = 1 -! ---------------------------------------------------------- - -subroutine printResult (a,b) -character*(*), intent(in) :: a,b -character (len=100) ::fmt -write (fmt, *) '(A', 34+ (len(a)-ulen(a)) ,', " => ",A)' -print fmt, a, b - -end subroutine printResult - - -!--------------------------------------- -! change ASCII a...z to upper case a...z -!--------------------------------------- -function toupper (c) result(retc) - -character ::c -character :: retc - -if (c >='a' .and. c <= 'z') then - retc = achar (iachar('A') + (iachar(c)-iachar('a'))) -else - retc = c -end if - -end function toupper - -!--------------------------------------- -! change ASCII A...Z to lower case a...z -!--------------------------------------- -function tolower (c) result(retc) - -character ::c -character :: retc - -if (c >='A' .and. c <= 'Z') then ! is upper case - retc = achar (iachar('a') + (iachar(c)-iachar('A'))) -else - retc = c -end if - -end function tolower - -!--------------------------------------------------------------------------------- -! Scan input text, mark all positions between distinct words within the text -! so that later in the actual conversion these points can be rewritten accordingly. -!--------------------------------------------------------------------------------- -function prepare (txt) result (newtext) - -character (len=*), intent (in) :: txt -character (len=:), allocatable :: text, newtext -integer :: ip1, ip2, ip3, l -character :: beginword - - -newtext=''; - -! First remove leading and trailing spaces -text = trim (txt) -text = adjustl (text) -text = trim (text) -l = len_trim(text) - -ip1 = 1 -ip2 = 2 -ip3 = 1 -do while (ip2 <= l) - if (text(ip2:ip2) >= 'A' .and. text(ip2:ip2) <='Z' ) then ! upcase letter indicates beginning of a word - newtext = newtext(:len_trim(newtext)) // text(ip1:ip2-1) // sep - ip1 = ip2 - ip2 = ip1+1 - else if (text(ip2:ip2) .eq. '_' & - .or. text(ip2:ip2) .eq. '-' & - .or. text(ip2:ip2) .eq. ' ' ) then ! Separator is behind current word, new word following. - if (ip2 .lt. l) then ! ip2+1 still inside text - beginword = tolower (text(ip2+1:ip2+1)) - newtext = newtext(:len_trim(newtext)) // text (ip1:ip2-1) // sep // beginword - else - ! separator at ip2 is last character of text. Just drop it. - newtext = newtext(:len_trim(newtext)) // text (ip1:ip2-1) - endif - ip1 = ip2+2 ! skip separator and begin of next word - ip2 = ip1 - else - ip2 = ip2 + 1 - end if -end do - -newtext = newtext(:len_trim(newtext)) // text(ip1:) - -end function prepare - -!----------------------------------- -! Convert prepared text to CamelCase -!----------------------------------- -function toCamelCase (txt) result(newtext) -! -! 1st char is lowercase, all spaces removed and word beginnings upperCase -! -character (len=*), intent (in) :: txt -character (:), allocatable :: text, newtext -integer :: ip, l -character :: beginword - -newtext = '' -text = prepare (txt) - -l = len_trim(text) -newtext = newtext(:len_trim(newtext)) // tolower (text(1:1)) - -ip = 2 - -do while (ip <= l) - if (text(ip:ip) .eq. sep) then - ip = ip + 1 ! skip the separator - if (ip ( int(Z'C0') + 1)) .and. ( ich < int(Z'E0') )) THEN - retlen=2 - else if ( ich < int(Z'F0') ) THEN - retlen=3 - else if ( ich <= int(Z'F4') ) THEN - retlen=4 - else - retlen=1 !assume we process larger seqences, 1 by 1 bytes - end if -end function - - -end program diff --git a/Task/Camel-case-and-snake-case/Go/camel-case-and-snake-case.go b/Task/Camel-case-and-snake-case/Go/camel-case-and-snake-case.go deleted file mode 100644 index 143ef584c5..0000000000 --- a/Task/Camel-case-and-snake-case/Go/camel-case-and-snake-case.go +++ /dev/null @@ -1,104 +0,0 @@ -package main - -import ( - "fmt" - "strings" - "unicode" -) - -func snakeCaseToCamelCase(word string, sep rune) string { - var sb strings.Builder - - wordRunes := []rune(strings.TrimSpace(word)) - wordLen := len(wordRunes) - - for i := 0; i < wordLen; i++ { - c := wordRunes[i] - - if c == sep { - if i+1 < wordLen && wordRunes[i+1] != sep { - sb.WriteRune(unicode.ToUpper(wordRunes[i+1])) - i++ - } - } else { - if i == 0 { - c = unicode.ToLower(c) - } - sb.WriteRune(c) - } - } - - return sb.String() -} - -func camelCaseToSnakeCase(word string, sep rune) string { - word = strings.TrimSpace(word) - var sb strings.Builder - var lastRune rune - - for i, c := range word { - if i != 0 && unicode.IsUpper(c) { - if lastRune != sep { - sb.WriteRune(sep) - } - } - sb.WriteRune(unicode.ToLower(c)) - lastRune = c - } - - return sb.String() -} - -func main() { - words := []string{ - "snakeCase", - "snake_case", - "variable_10_case", - "variable10Case", - "ɛrgo rE tHis", - "hurry-up-joe!", - "c://my-docs/happy_Flag-Day/12.doc", - " spaces ", - } - - fmt.Print("snake_case to camelCase:\n\n") - - for _, word := range words { - fmt.Println(word, "=>", snakeCaseToCamelCase(word, '_')) - } - - fmt.Println() - fmt.Print("kebab-case to camelCase:\n\n") - - for _, word := range words { - fmt.Println(word, "=>", snakeCaseToCamelCase(word, '-')) - } - - fmt.Println() - fmt.Print("space case to camelCase:\n\n") - - for _, word := range words { - fmt.Println(word, "=>", snakeCaseToCamelCase(word, ' ')) - } - - fmt.Println() - fmt.Print("camelCase to snake_case:\n\n") - - for _, word := range words { - fmt.Println(word, "=>", camelCaseToSnakeCase(word, '_')) - } - - fmt.Println() - fmt.Print("camelCase to kebab-case:\n\n") - - for _, word := range words { - fmt.Println(word, "=>", camelCaseToSnakeCase(word, '-')) - } - - fmt.Println() - fmt.Print("camelCase to space case:\n\n") - - for _, word := range words { - fmt.Println(word, "=>", camelCaseToSnakeCase(word, ' ')) - } -} diff --git a/Task/Camel-case-and-snake-case/JavaScript/camel-case-and-snake-case.js b/Task/Camel-case-and-snake-case/JavaScript/camel-case-and-snake-case.js deleted file mode 100644 index 73b10c2641..0000000000 --- a/Task/Camel-case-and-snake-case/JavaScript/camel-case-and-snake-case.js +++ /dev/null @@ -1,82 +0,0 @@ -const HYPHEN = '-'; -const SPACE = ' '; -const UNDERSCORE = '_'; -const WHITESPACE = " \n\r\t\f\v"; - -function leftTrim(text) { - const start = text.search(/\S/); // Find the index of the first non-whitespace character - return start === -1 ? "" : text.substring(start); -} - -function rightTrim(text) { - const end = text.search(/\S(?![\s\S]*\S)/); // Find the index of the last non-whitespace character - return end === -1 ? "" : text.substring(0, end + 1); -} - -function trim(text) { - return leftTrim(rightTrim(text)); -} - -function prepareForConversion(text) { - text = trim(text); - text = text.replace(new RegExp(SPACE, 'g'), UNDERSCORE); - text = text.replace(new RegExp(HYPHEN, 'g'), UNDERSCORE); - return text; // Return the modified text -} - -function toSnakeCase(camel) { - camel = prepareForConversion(camel); - let snake = ""; - let first = true; - for (const ch of camel) { - if (first) { - snake += ch; - first = false; - } else if (!first && ch >= 'A' && ch <= 'Z') { - if (snake.slice(-1) === UNDERSCORE) { - snake += ch.toLowerCase(); - } else { - snake += UNDERSCORE; - snake += ch.toLowerCase(); - } - } else { - snake += ch; - } - } - return snake; -} - -function toCamelCase(snake) { - snake = prepareForConversion(snake); - let camel = ""; - let underscore = false; - for (const ch of snake) { - if (ch === UNDERSCORE) { - underscore = true; - } else if (underscore) { - camel += ch.toUpperCase(); - underscore = false; - } else { - camel += ch; - } - } - return camel; -} - -function main() { - const variableNames = ["snakeCase", "snake_case", "variable_10_case", - "variable10Case", "ergo rE tHis", "hurry-up-joe!", "c://my-docs/happy_Flag-Day/12.doc", " spaces "]; - - console.log("".padEnd(48, " ") + "=== To snake_case ==="); - for (const text of variableNames) { - console.log("".padEnd(34, " ") + text + " --> " + toSnakeCase(text)); - } - - console.log("\n"); - console.log("".padEnd(48, " ") + "=== To camelCase ==="); - for (const text of variableNames) { - console.log("".padEnd(34, " ") + text + " --> " + toCamelCase(text)); - } -} - -main(); diff --git a/Task/Camel-case-and-snake-case/Julia/camel-case-and-snake-case.jl b/Task/Camel-case-and-snake-case/Julia/camel-case-and-snake-case.julia similarity index 100% rename from Task/Camel-case-and-snake-case/Julia/camel-case-and-snake-case.jl rename to Task/Camel-case-and-snake-case/Julia/camel-case-and-snake-case.julia diff --git a/Task/Camel-case-and-snake-case/Kotlin/camel-case-and-snake-case.kts b/Task/Camel-case-and-snake-case/Kotlin/camel-case-and-snake-case.kotlin similarity index 100% rename from Task/Camel-case-and-snake-case/Kotlin/camel-case-and-snake-case.kts rename to Task/Camel-case-and-snake-case/Kotlin/camel-case-and-snake-case.kotlin diff --git a/Task/Camel-case-and-snake-case/Mathematica/camel-case-and-snake-case.math b/Task/Camel-case-and-snake-case/Mathematica/camel-case-and-snake-case.math deleted file mode 100644 index ecae1a970d..0000000000 --- a/Task/Camel-case-and-snake-case/Mathematica/camel-case-and-snake-case.math +++ /dev/null @@ -1,85 +0,0 @@ -(* String case conversion functions in Mathematica *) - -snakeToCamelCase[nam_String, sep_String : "[_]+", lcmiddle_ : False] := Module[{words}, - If[nam == "", Return[nam]]; - words = StringSplit[StringTrim[nam], RegularExpression[sep]]; - If[lcmiddle, words = ToLowerCase /@ words]; - words[[2 ;;]] = StringJoin[ToUpperCase[StringTake[#, 1]], StringDrop[#, 1]] & /@ Select[words[[2 ;;]], StringLength[#] > 0 &]; - StringJoin[words] -] - -spaceToCamelCase[nam_String] := snakeToCamelCase[nam, "\\s+"] - -kebabToCamelCase[nam_String] := snakeToCamelCase[nam, "[\\-]+"] - -periodToCamelCase[nam_String] := snakeToCamelCase[nam, "[\\.]+"] - -allsepToCamelCase[nam_String] := snakeToCamelCase[nam, "[ \\-_\\.]+"] - -lowermiddleAllsepToCamelCase[nam_String] := snakeToCamelCase[nam, "[ \\-_\\.]+", True] - -camelToSnakeCase[nam_String, sep_String : "_", allsep_String : "[_]+", lcmiddle_ : True] := Module[{result, sep1, words}, - result = StringReplace[StringTrim[nam], RegularExpression["([A-Z]+)"] -> sep <> "$1"]; - sep1 = If[sep == ".", "\\.", sep]; - If[lcmiddle, - words = Select[StringSplit[result, sep1], StringLength[#] > 0 &]; - result = StringRiffle[ToLowerCase /@ words, sep], - words = Select[StringSplit[result, sep1], StringLength[#] > 0 &]; - result = StringRiffle[StringJoin[ToLowerCase[StringTake[#, 1]], StringDrop[#, 1]] & /@ words, sep] - ]; - StringReplace[result, RegularExpression[allsep] -> sep] -] - -preserveMidcapsCamelToSnakeCase[nam_String] := camelToSnakeCase[nam, "_", "[_]+", False] - -allsepToSnakeCase[nam_String] := camelToSnakeCase[nam, "_", "[ \\-\\._]+"] - -allsepToKebabCase[nam_String] := camelToSnakeCase[nam, "-", "[ \\-\\._]+"] - -allsepToSpaceCase[nam_String] := camelToSnakeCase[nam, " ", "[ \\-\\._]+"] - -allsepToPeriodCase[nam_String] := camelToSnakeCase[nam, ".", "[ \\-\\._]+"] - -allsepToSlashCase[nam_String] := camelToSnakeCase[nam, "/", "[ \\-\\._]+"] - -(* Test the functions *) -testFunctions = { - snakeToCamelCase, - spaceToCamelCase, - kebabToCamelCase, - periodToCamelCase, - allsepToCamelCase, - lowermiddleAllsepToCamelCase, - camelToSnakeCase, - preserveMidcapsCamelToSnakeCase, - allsepToSnakeCase, - allsepToKebabCase, - allsepToSpaceCase, - allsepToPeriodCase, - allsepToSlashCase -}; - -testStrings = { - "snakeCase", - "snake_case", - "snake-case", - "snake case", - "snake CASE", - "snake.case", - "variable_10_case", - "variable10Case", - "ɛrgo rE tHis", - "hurry-up-joe!", - "c://my-docs/happy_Flag-Day/12.doc", - " spaces " -}; - -Do[ - Print["Testing function ", f, ":"]; - Do[ - Print[StringPadLeft[testString, 36], " => ", f[testString]], - {testString, testStrings} - ]; - Print[""], - {f, testFunctions} -] diff --git a/Task/Camel-case-and-snake-case/OmniMark/camel-case-and-snake-case.xom b/Task/Camel-case-and-snake-case/OmniMark/camel-case-and-snake-case.xom deleted file mode 100644 index 69c54a13fc..0000000000 --- a/Task/Camel-case-and-snake-case/OmniMark/camel-case-and-snake-case.xom +++ /dev/null @@ -1,58 +0,0 @@ -define stream function to_snake_case (value stream txt) as - local stream ls - open ls as buffer - repeat scan txt - match white-space* value-end - ; "trailing whitespace may be ignored" - match value-start white-space* - ; "leading ... whitespace may be ignored" - match (lc | digit) => char1 uc => char2 - put ls '%x(char1)_%lx(char2)' - match ('_' | space | "-" | '.') - ; normalise to underscore and lowercase letter - put ls '_' - match any => char - ; all other characters are lowercase - put ls '%lx(char)' - again - close ls - return ls - -define stream function toCamelCase (value stream txt) as - local stream ls - open ls as buffer - repeat scan txt - match white-space* value-end - ; "trailing whitespace may be ignored" - match value-start white-space* letter+ => word1 - ; "leading ... whitespace may be ignored" - put ls word1 - match ('_' | space | "-" | '.') any => makeUpper - ; consume dividing underscore, space, hyphen or full stop - put ls '%ux(makeUpper)' - match ([digit] letter) => chars - ; a letter preceded by a numeral should be uppercase - put ls '%ux(chars)' - match any => char - ; all other characters are lowercase - put ls '%lx(char)' - again - close ls - return ls - -process - local stream ls variable initial {"snakeCase", "snake_case", - "variable_10_case", "variable10Case", - "ɛrgo rE tHis", "hurry-up-joe!", "c://my-docs/happy_Flag-Day/12.doc", - " spaces "} - output 'to_snake_case%n' - output '=============%n' - repeat over ls - output ls || ' => ' || to_snake_case(ls) || '%n' - again - output '%n' - output 'toCamelCase%n' - output '===========%n' - repeat over ls - output ls || ' => ' || toCamelCase(ls) || '%n' - again diff --git a/Task/Camel-case-and-snake-case/Phix/camel-case-and-snake-case.phix b/Task/Camel-case-and-snake-case/Phix/camel-case-and-snake-case.phix index ff87c84e3a..c9a701e73d 100644 --- a/Task/Camel-case-and-snake-case/Phix/camel-case-and-snake-case.phix +++ b/Task/Camel-case-and-snake-case/Phix/camel-case-and-snake-case.phix @@ -1,31 +1,33 @@ -with javascript_semantics -function to_snake_case(string s) - string snake = substitute(trim(s)," ","_") - for i=length(snake) to 1 by -1 do - if isupper(snake[i]) then - snake[i..i] = '_'&lower(snake[i]) - end if - end for - return snake -end function +(phixonline)--> + with javascript_semantics + function to_snake_case(string s) + string snake = substitute(trim(s)," ","_") + for i=length(snake) to 1 by -1 do + if isupper(snake[i]) then + snake[i..i] = '_'&lower(snake[i]) + end if + end for + return snake + end function -function toCamelCase(string s) - string camel = substitute_all(trim(s),"- ","__") - for i=length(camel)-1 to 1 by -1 do - if camel[i]='_' then - camel[i..i+1] = upper(camel[i+1..i+1]) - end if - end for - return camel -end function + function toCamelCase(string s) + string camel = substitute_all(trim(s),"- ","__") + for i=length(camel)-1 to 1 by -1 do + if camel[i]='_' then + camel[i..i+1] = upper(camel[i+1..i+1]) + end if + end for + return camel + end function -constant tests = {"snakeCase", "snake_case", "variable_10_case", "variable10Case", "ergo rE tHis", - "hurry-up-joe!", "c://my-docs/happy_Flag-Day/12.doc", " spaces "} -procedure test(string title, integer fn) - printf(1,title) - for i=1 to length(tests) do - printf(1,"%33s ===> %s\n", {tests[i], fn(tests[i])}) - end for -end procedure -test(" === to_snake_case ===\n",to_snake_case) -test("\n === toCamelCase ===\n",toCamelCase) + constant tests = {"snakeCase", "snake_case", "variable_10_case", "variable10Case", "ergo rE tHis", + "hurry-up-joe!", "c://my-docs/happy_Flag-Day/12.doc", " spaces "} + procedure test(string title, integer fn) + printf(1,title) + for i=1 to length(tests) do + printf(1,"%33s ===> %s\n", {tests[i], fn(tests[i])}) + end for + end procedure + test(" === to_snake_case ===\n",to_snake_case) + test("\n === toCamelCase ===\n",toCamelCase) + {}", text, to_snake_case(text)); - } - - println!(); - println!("{:>48}", "=== To camelCase ==="); - for text in &variable_names { - println!("{:>34} --> {}", text, to_camel_case(text)); - } -} diff --git a/Task/Camel-case-and-snake-case/Zig/camel-case-and-snake-case.zig b/Task/Camel-case-and-snake-case/Zig/camel-case-and-snake-case.zig deleted file mode 100644 index faee5b8822..0000000000 --- a/Task/Camel-case-and-snake-case/Zig/camel-case-and-snake-case.zig +++ /dev/null @@ -1,134 +0,0 @@ -const std = @import("std"); -const print = std.debug.print; -const ArrayList = std.ArrayList; - -const HYPHEN: u8 = '-'; -const SPACE: u8 = ' '; -const UNDERSCORE: u8 = '_'; -const WHITESPACE = " \n\r\t\x0C\x0B"; - -fn isWhitespace(ch: u8) bool { - for (WHITESPACE) |ws| { - if (ch == ws) return true; - } - return false; -} - -fn leftTrim(text: []const u8) []const u8 { - var start: usize = 0; - while (start < text.len and isWhitespace(text[start])) { - start += 1; - } - return text[start..]; -} - -fn rightTrim(text: []const u8) []const u8 { - var end: usize = text.len; - while (end > 0 and isWhitespace(text[end - 1])) { - end -= 1; - } - return text[0..end]; -} - -fn trim(text: []const u8) []const u8 { - return rightTrim(leftTrim(text)); -} - -fn prepareForConversion(allocator: std.mem.Allocator, text: []const u8) ![]u8 { - const trimmed = trim(text); - var result = try ArrayList(u8).initCapacity(allocator, trimmed.len); - defer result.deinit(); - - for (trimmed) |ch| { - if (ch == SPACE or ch == HYPHEN) { - try result.append(UNDERSCORE); - } else { - try result.append(ch); - } - } - - return result.toOwnedSlice(); -} - -fn toSnakeCase(allocator: std.mem.Allocator, camel: []const u8) ![]u8 { - const text = try prepareForConversion(allocator, camel); - defer allocator.free(text); - - var snake = ArrayList(u8).init(allocator); - defer snake.deinit(); - - var first = true; - - for (text) |ch| { - if (first) { - try snake.append(ch); - first = false; - } else if (std.ascii.isUpper(ch)) { - if (snake.items.len > 0 and snake.items[snake.items.len - 1] == UNDERSCORE) { - try snake.append(std.ascii.toLower(ch)); - } else { - try snake.append(UNDERSCORE); - try snake.append(std.ascii.toLower(ch)); - } - } else { - try snake.append(ch); - } - } - - return snake.toOwnedSlice(); -} - -fn toCamelCase(allocator: std.mem.Allocator, snake: []const u8) ![]u8 { - const text = try prepareForConversion(allocator, snake); - defer allocator.free(text); - - var camel = ArrayList(u8).init(allocator); - defer camel.deinit(); - - var underscore = false; - - for (text) |ch| { - if (ch == UNDERSCORE) { - underscore = true; - } else if (underscore) { - try camel.append(std.ascii.toUpper(ch)); - underscore = false; - } else { - try camel.append(ch); - } - } - - return camel.toOwnedSlice(); -} - -pub fn main() !void { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - defer _ = gpa.deinit(); - const allocator = gpa.allocator(); - - const variable_names = [_][]const u8{ - "snakeCase", - "snake_case", - "variable_10_case", - "variable10Case", - "ergo rE tHis", - "hurry-up-joe!", - "c://my-docs/happy_Flag-Day/12.doc", - " spaces " - }; - - print("{s:>48}\n", .{"=== To snake_case ==="}); - for (variable_names) |text| { - const snake = try toSnakeCase(allocator, text); - defer allocator.free(snake); - print("{s:>34} --> {s}\n", .{ text, snake }); - } - - print("\n", .{}); - print("{s:>48}\n", .{"=== To camelCase ==="}); - for (variable_names) |text| { - const camel = try toCamelCase(allocator, text); - defer allocator.free(camel); - print("{s:>34} --> {s}\n", .{ text, camel }); - } -} diff --git a/Task/Canny-edge-detector/FreeBASIC/canny-edge-detector.basic b/Task/Canny-edge-detector/FreeBASIC/canny-edge-detector.basic deleted file mode 100644 index 947ea3deca..0000000000 --- a/Task/Canny-edge-detector/FreeBASIC/canny-edge-detector.basic +++ /dev/null @@ -1,116 +0,0 @@ -#define MIN(a, b) iif((a) < (b), (a), (b)) -#define MAX(a, b) iif((a) > (b), (a), (b)) - -Const MaxBrightness = 255 - -' Función para leer un archivo PPM -Function readPPM(nombre As String, Byref ancho As Integer, Byref alto As Integer, image() As Ubyte) As Boolean - Dim As Integer ff - Dim As String t, dcol - - If nombre = "" Then - Print "No PPM file name indicated." - Return False - End If - - ff = Freefile - Open nombre For Binary As #ff - If Err Then - Print "File "; nombre; " not found." - Return False - End If - - Line Input #ff, t - If t <> "P6" Then - Print "File is NOT PPM P6 type." - Close #ff - Return False - End If - - Do - Line Input #ff, t - Loop While Left(t, 1) = "#" - - Dim As Integer posic = 1 - While Mid(t, posic, 1) = " " - posic += 1 - Wend - ancho = Val(Mid(t, posic)) - - While Mid(t, posic, 1) <> " " - posic += 1 - Wend - While Mid(t, posic, 1) = " " - posic += 1 - Wend - alto = Val(Mid(t, posic)) - - Line Input #ff, dcol - - Redim image(0 To ancho * alto * 3 - 1) - Get #ff, , image() - - Close #ff - Return True -End Function - -Dim As Integer ancho, alto -Dim image() As Ubyte - -If readPPM("i:\Lena.ppm", ancho, alto, image()) Then - Dim As Integer newAncho = ancho, newAlto = alto - Dim pixelsGray(newAncho - 1, newAlto - 1) As Integer - Dim C_E_D(2, 2) As Integer - - ' Define edge detection filter - Dim As Integer dato(8) => {-1, -1, -1, -1, 8, -1, -1, -1, -1} - Dim As Integer i, j - For i = 0 To 2 - For j = 0 To 2 - C_E_D(i, j) = dato(i * 3 + j) - Next j - Next i - - ' Convert image to grayscale - Dim As Integer x, y, r, g, b, lumin, k - For y = 0 To newAlto - 1 - For x = 0 To newAncho - 1 - r = image((y * newAncho + x) * 3) - g = image((y * newAncho + x) * 3 + 1) - b = image((y * newAncho + x) * 3 + 2) - lumin = Int(0.2126 * r + 0.7152 * g + 0.0722 * b) - pixelsGray(x, y) = lumin - Next x - Next y - - Dim new_image(newAncho - 1, newAlto - 1) As Integer - Dim As Integer divisor = 1 - - ' Apply edge detection filter - Dim As Integer newRGB - For y = 1 To newAlto - 2 - For x = 1 To newAncho - 2 - newRGB = 0 - For i = -1 To 1 - For j = -1 To 1 - newRGB += C_E_D(i + 1, j + 1) * pixelsGray(x + i, y + j) - Next j - Next i - new_image(x, y) = Max(Min(newRGB / divisor, 255), 0) - Next x - Next y - - ' Show the result - Screenres newAncho, newAlto, 32 - Windowtitle ("Canny edge detector") - For y = 0 To newAlto - 1 - For x = 0 To newAncho - 1 - k = new_image(x, y) - Pset (x, y), Rgb(k, k, k) - Next x - Next y -Else - Print "Error loading PPM file." -End If - -Sleep diff --git a/Task/Canny-edge-detector/Julia/canny-edge-detector.jl b/Task/Canny-edge-detector/Julia/canny-edge-detector.julia similarity index 100% rename from Task/Canny-edge-detector/Julia/canny-edge-detector.jl rename to Task/Canny-edge-detector/Julia/canny-edge-detector.julia diff --git a/Task/Canonicalize-CIDR/ALGOL-68/canonicalize-cidr.alg b/Task/Canonicalize-CIDR/ALGOL-68/canonicalize-cidr.alg index 6a3f49135f..7befa0b1eb 100644 --- a/Task/Canonicalize-CIDR/ALGOL-68/canonicalize-cidr.alg +++ b/Task/Canonicalize-CIDR/ALGOL-68/canonicalize-cidr.alg @@ -1,22 +1,22 @@ BEGIN # show IPv4 addresses in CIDR notation in canonical form # # mode to hold an IPv4 address in CIDR notation # - MODE CIDR = STRUCT( LONG BITS address - , INT network bits - , BOOL valid - , STRING error + MODE CIDR = STRUCT( BITS address + , INT network bits + , BOOL valid + , STRING error ); # returns a CIDR parsed from address # OP TOCIDR = ( STRING address text )CIDR: BEGIN - STRING addr = "." + address text + "$"; - STRING error := ""; - LONG BITS address := 16r0; - INT bits count := 0; - INT dot count := 0; - INT slash count := 0; - BOOL valid := TRUE; - INT s pos := LWB addr; - INT s max = UPB addr; + STRING addr = "." + address text + "$"; + STRING error := ""; + BITS address := 16r0; + INT bits count := 0; + INT dot count := 0; + INT slash count := 0; + BOOL valid := TRUE; + INT s pos := LWB addr; + INT s max = UPB addr; WHILE s pos < s max AND valid DO IF addr[ s pos ] = "." THEN # must have an octet next # @@ -70,7 +70,7 @@ BEGIN # show IPv4 addresses in CIDR notation in canonical form # address ELSE # valid address - retain the top most bits # - CIDR( address OF address AND ( LONG 16rffffffff + CIDR( address OF address AND ( 16rffffffff SHL ( 32 - network bits OF address ) ) , network bits OF address @@ -82,9 +82,9 @@ BEGIN # show IPv4 addresses in CIDR notation in canonical form # OP TOSTRING = ( CIDR address )STRING: BEGIN [ 1 : 4 ]INT octet; - LONG BITS addr := address OF address; + BITS addr := address OF address; FOR o pos FROM UPB octet BY -1 TO LWB octet DO - octet[ o pos ] := SHORTEN ABS ( addr AND 16rff ); + octet[ o pos ] := ABS ( addr AND 16rff ); addr := addr SHR 8 OD; STRING result := whole( octet[ LWB octet ], 0 ); diff --git a/Task/Canonicalize-CIDR/Ada/canonicalize-cidr.adb b/Task/Canonicalize-CIDR/Ada/canonicalize-cidr.adb deleted file mode 100644 index a138a754ae..0000000000 --- a/Task/Canonicalize-CIDR/Ada/canonicalize-cidr.adb +++ /dev/null @@ -1,105 +0,0 @@ -with Ada.Strings; -with Ada.Strings.Fixed; -with Ada.Strings.Maps; -with Ada.Text_IO; - -use Ada.Strings; -use Ada.Strings.Fixed; -use Ada.Strings.Maps; -use Ada.Text_IO; - -procedure Canonicalize_CIDR is - type IP_Octet_Type is mod 256; - - type IP_Record_Type is record - A, B, C, D : IP_Octet_Type; - end record - with Size => 32; - - for IP_Record_Type use record - -- Use little-endian ordering to match bit array - D at 0 range 0 .. 7; - C at 1 range 0 .. 7; - B at 2 range 0 .. 7; - A at 3 range 0 .. 7; - end record; - - type IP_Bitarray_Type is array (0 .. 31) of Boolean - with Component_Size => 1; - - subtype IP_Mask_Type is Natural range 0 .. 32; - - type IP_CIDR_Type is record - IP : IP_Record_Type; - Mask : IP_Mask_Type; - end record; - - function Parse_IP_CIDR (S : String) return IP_CIDR_Type is - IP_Record : IP_CIDR_Type; - Digit_Range : Character_Range := ('0', '9'); - Digit_Set : Character_Set := To_Set (Digit_Range); - Octets : array (1 .. 4) of IP_Octet_Type; - First : Positive; - Last : Natural := 0; - begin - for I in Octets'Range loop - Find_Token (S, Digit_Set, Last + 1, Inside, First, Last); - Octets (I) := IP_Octet_Type'Value (S (First .. Last)); - end loop; - IP_Record.IP.A := Octets (1); - IP_Record.IP.B := Octets (2); - IP_Record.IP.C := Octets (3); - IP_Record.IP.D := Octets (4); - - Find_Token (S, Digit_Set, Last + 1, Inside, First, Last); - IP_Record.Mask := IP_Mask_Type'Value (S (First .. Last)); - - return IP_Record; - end Parse_IP_CIDR; - - procedure Canonicalize_IP_CIDR (Addr : in out IP_CIDR_Type) is - -- Fun part. I can overlay different types over the same bits. - Bit_Overlay : IP_Bitarray_Type with Address => Addr.IP'Address; - begin - for I in Bit_Overlay'First .. Bit_Overlay'Last - Addr.Mask loop - Bit_Overlay (I) := False; - end loop; - end Canonicalize_IP_CIDR; - - procedure Put_IP_CIDR (Addr : IP_CIDR_TYPE) is - package Octet_IO is new Ada.Text_IO.Modular_IO (IP_Octet_Type); - package Mask_IO is new Ada.Text_IO.Integer_IO (IP_Mask_Type); - begin - Octet_IO.Put (Addr.IP.A, 0); - Put ("."); - Octet_IO.Put (Addr.IP.B, 0); - Put ("."); - Octet_IO.Put (Addr.IP.C, 0); - Put ("."); - Octet_IO.Put (Addr.IP.D, 0); - Put ("/"); - Mask_IO.Put (Addr.Mask, 0); - end Put_IP_CIDR; - - procedure Show_IP_Canonicalize (S : String) is - Canon : IP_CIDR_Type := Parse_IP_CIDR (S); - begin - Canonicalize_IP_Cidr (Canon); - Put (S & " -> "); - Put_IP_CIDR (Canon); - New_Line; - end Show_IP_Canonicalize; - - Test_IPs : array (1 .. 5) of String (1 .. 18) := - ( - "36.18.154.103/12 ", - "62.62.197.11/29 ", - "67.137.119.181/4 ", - "161.214.74.21/24 ", - "184.232.176.184/18" - ); -begin - for I of Test_IPs loop - Show_IP_Canonicalize (I); - end loop; -end Canonicalize_CIDR; diff --git a/Task/Canonicalize-CIDR/EasyLang/canonicalize-cidr.easy b/Task/Canonicalize-CIDR/EasyLang/canonicalize-cidr.easy index 7c1c9054e8..64d7aae038 100644 --- a/Task/Canonicalize-CIDR/EasyLang/canonicalize-cidr.easy +++ b/Task/Canonicalize-CIDR/EasyLang/canonicalize-cidr.easy @@ -1,15 +1,23 @@ func$ can_cidr s$ . - n[] = number strtok s$ "./" - if len n[] <> 5 : return "" + n[] = number strsplit s$ "./" + if len n[] <> 5 + return "" + . for i to 4 - if n[i] < 0 or n[i] > 255 : return "" + if n[i] < 0 or n[i] > 255 + return "" + . ad = ad * 256 + n[i] . - if n[5] > 31 or n[5] < 1 : return "" + if n[5] > 31 or n[5] < 1 + return "" + . mask = bitnot (bitshift 1 (32 - n[5]) - 1) ad = bitand ad mask for i to 4 - if r$ <> "" : r$ = "." & r$ + if r$ <> "" + r$ = "." & r$ + . r$ = ad mod 256 & r$ ad = ad div 256 . diff --git a/Task/Canonicalize-CIDR/FreeBASIC/canonicalize-cidr.basic b/Task/Canonicalize-CIDR/FreeBASIC/canonicalize-cidr.basic index bd4af5e919..97b62bc879 100644 --- a/Task/Canonicalize-CIDR/FreeBASIC/canonicalize-cidr.basic +++ b/Task/Canonicalize-CIDR/FreeBASIC/canonicalize-cidr.basic @@ -1,99 +1,54 @@ -Const MAX_OCTET = 255 -Const MIN_NETWORK = 1 -Const MAX_NETWORK = 32 -Const OCTET_BITS = 8 +#lang "qb" -Type IPAddress - octets(3) As Integer -End Type - -Function isDigit(Byval ch As String) As Boolean - Return (Asc(ch) >= Asc("0")) And (Asc(ch) <= Asc("9")) -End Function - -Function ParseIPAddress(cidr As String, Byref networkWidth As Integer) As IPAddress - Dim As IPAddress ip - Dim As Integer slashPos = Instr(cidr, "/") - Dim As String ipPart = Left(cidr, slashPos - 1) - - networkWidth = Val(Mid(cidr, slashPos + 1)) - - Dim As Integer i, currentOctet = 0, octetValue = 0 - For i = 1 To Len(ipPart) - If Mid(ipPart, i, 1) = "." Then - ip.octets(currentOctet) = octetValue - currentOctet += 1 - octetValue = 0 - Elseif IsDigit(Mid(ipPart, i, 1)) Then - octetValue = octetValue * 10 + Val(Mid(ipPart, i, 1)) +REM THE Binary OPS ONLY WORK On SIGNED 16-Bit NUMBERS +REM SO WE STORE THE IP ADDRESS As AN ARRAY OF FOUR OCTETS +Cls +Dim IP(3) +Do + REM Read DEMO Data + 140 Read CI$ + If CI$ = "" Then Exit Do 'Sleep: End + REM FIND / + SL = 0 + For I = Len(CI$) To 1 Step -1 + If Mid$(CI$,I,1) = "/" Then SL = I : I = 1 + Next I + If SL = 0 Then Print "INVALID CIDR STRING: '"; CI$; "'": Goto 140 + NW = Val(Mid$(CI$,SL+1)) + If NW < 1 Or NW > 32 Then Print "INVALID NETWORK WIDTH:"; NW: Goto 140 + REM PARSE OCTETS INTO IP ARRAY + BY = 0 : N = 0 + For I = 1 To SL-1 + C$ = Mid$(CI$,I,1) + If Not (C$ <> ".") Then + IP(N) = BY : N = N + 1 + BY = 0 + If IP(N-1) < 256 Then 310 + Print "INVALID OCTET VALUE:"; IP(N-1): Goto 140 + Else C = Val(C$):If C Or (C$="0") Then BY = BY*10+C End If - Next - ip.octets(currentOctet) = octetValue - - Return ip -End Function - -Function ApplyNetworkMask(ip As IPAddress, networkWidth As Integer) As IPAddress - Dim As IPAddress result = ip - Dim As Integer completeOctets = networkWidth \ OCTET_BITS - Dim As Integer remainingBits = networkWidth And 7 - - ' Apply mask to partial octet - If completeOctets < 4 Then - result.octets(completeOctets) And= (MAX_OCTET - 2^(OCTET_BITS-remainingBits) + 1) - ' Zero remaining octets - For i As Integer = completeOctets + 1 To 3 - result.octets(i) = 0 - Next - End If - - Return result -End Function - -Function ValidateInput(ip As IPAddress, networkWidth As Integer, cidr As String) As Boolean - If Instr(cidr, "/") = 0 Then - Print "INVALID CIDR STRING: '"; cidr; "'" - Return False - End If - - If networkWidth < MIN_NETWORK Or networkWidth > MAX_NETWORK Then - Print "INVALID NETWORK WIDTH:"; networkWidth - Return False - End If - - For i As Integer = 0 To 3 - If ip.octets(i) > MAX_OCTET Then - Print "INVALID OCTET VALUE:"; ip.octets(i) - Return False - End If - Next - - Return True -End Function - -Sub ProcessCIDR(cidr As String) - Dim As Integer networkWidth - Dim As IPAddress ip = ParseIPAddress(cidr, networkWidth) - - If Not ValidateInput(ip, networkWidth, cidr) Then Exit Sub - - ip = ApplyNetworkMask(ip, networkWidth) - - Dim As String result = Str(ip.octets(0)) - For i As Integer = 1 To 3 - result &= "." & Str(ip.octets(i)) - Next - Print result & "/" & networkWidth -End Sub - -' Main program -Dim As String cidr(9) = { _ -"87.70.141.1/22", "36.18.154.103/12", "62.62.197.11/29", _ -"67.137.119.181/4", "161.214.74.21/24", "184.232.176.184/18", _ -"127.0.0.1", "123.45.67.89/0", "98.76.54.32/100", "123.456.789.0/12" } - -For i As Integer = 0 To 9 - ProcessCIDR(cidr(i)) -Next + 310 ' + Next I + IP(N) = BY : N = N + 1 + If IP(N-1) > 255 Then Print "INVALID OCTET VALUE:"; IP(N-1): Goto 140 + REM NUMBER OF COMPLETE OCTETS IN NETWORK PART + NB = Int(NW/8) + REM NUMBER OF NETWORK BITS IN PARTIAL OCTET + XB = NW And 7 + REM ZERO Out HOST BITS IN PARTIAL OCTET + IP(NB) = IP(NB) And (255 - 2^(8-XB) + 1) + REM And SET Any ALL-HOST OCTETS To 0 + If NB < 3 Then For I = NB +1 To 3 : IP(I) = 0 : Next I + REM Print Out THE RESULT + Print Mid$(Str$(IP(0)),2); + For I = 1 To 3 + Print "."; Mid$(Str$(IP( I)),2); + Next I + Print Mid$(CI$,SL) +Loop +Data "87.70.141.1/22", "36.18.154.103/12", "62.62.197.11/29" +Data "67.137.119.181/4", "161.214.74.21/24", "184.232.176.184/18" +REM SOME INVALID INPUTS +Data "127.0.0.1", "123.45.67.89/0", "98.76.54.32/100", "123.456.789.0/12" Sleep diff --git a/Task/Canonicalize-CIDR/FutureBasic/canonicalize-cidr.basic b/Task/Canonicalize-CIDR/FutureBasic/canonicalize-cidr.basic deleted file mode 100644 index 8594d42eb7..0000000000 --- a/Task/Canonicalize-CIDR/FutureBasic/canonicalize-cidr.basic +++ /dev/null @@ -1,132 +0,0 @@ -// -// Canonicalize CIDR -// -// Using FutureBasic 7.0.34 -// August 25, R.W -// -// Given a Classless Inter-Domain Routing (CIDR) -// IPv4 address, returns the canonical form. -// - -Int networkWidth // network width in bits -CFStringRef errorCode // global err and CCIDR -CFStringRef CCIDR // canonical CIDR IPv4 - -// Type for IP address -begin record IPv4_Address - Int octets[3] // xxx.xxx.xxx.xx/xx -end record - -// Validate CIDR string -local fn ValidateCIDR(ip as IPv4_Address, SnetworkWidth as Int, cidr as CFStringRef) as Boolean - Int i - boolean result - result = _True - if instr(0, cidr, @"/") == NSNotFound - errorCode = concat(@"Bad CIDR ",cidr) - result = _False - return result - end if - if SnetworkWidth < 1 || SnetworkWidth > 32 //validate network width - errorCode = concat(@"Bad Net Width",str(networkWidth)) - result = _False - return result - end if - for i = 0 to 3 - if ip.octets[i] > 255 - errorCode = concat(@"Bad Octet ",str(ip.octets[i])) - result = _False - return result - end if - next -end fn = result - -// Check if a character is a digit -local fn IsDigit(ch as CFStringRef) as boolean - Boolean IsDigit - IsDigit = (ucc(ch) > 47) && (ucc(ch) < 58) -end fn = IsDigit - -// Parse CIDR string into IP structure and network width -local fn ParseIPv4_Address(cidr as CFStringRef) as IPv4_Address - IPv4_Address ip - Int i, slashPos, currentOctet, octetValue - CFStringRef ipPart - ipPart = @"" - slashPos = instr(0, cidr, @"/") - if slashPos > 0 - ipPart = left(cidr, slashPos) - networkWidth = Intval(mid(cidr, slashPos + 1)) - else - ipPart = cidr - networkWidth = -1 - end if - currentOctet = 0: octetValue = 0 - for i = 0 to len(ipPart)-1 - select case mid(ipPart, i, 1) - case @"." - ip.octets[currentOctet] = octetValue - currentOctet ++ - octetValue = 0 - case else - if fn IsDigit(mid(ipPart, i, 1)) - octetValue = octetValue * 10 + Intval(mid(ipPart, i, 1)) - end if - end select - next - ip.octets[currentOctet] = octetValue -end fn = ip - -// Apply network mask to IP -local fn ApplyNetworkMask(ip as IPv4_Address, SnetworkWidth as Int) as IPv4_Address - IPv4_Address result - Int completeOctets, remainingBits, i - result = ip - completeOctets = SnetworkWidth \ 8 //octet bits - remainingBits = SnetworkWidth AND 7 - if completeOctets < 4 - result.octets[completeOctets] = result.octets[completeOctets] AND (255 - 2^(8 - remainingBits) + 1) - for i = completeOctets + 1 to 3 - result.octets[i] = 0 - next - end if -end fn = result - -// Process a CIDR string, sets global CCIDR -local fn ProcessCIDR(cidr as CFStringRef) as CFStringRef - IPv4_Address ip - CFStringRef result - Int i - result = @"" - ip = fn ParseIPv4_Address(cidr) - if fn ValidateCIDR(ip, networkWidth, cidr) // validate - ip = fn ApplyNetworkMask(ip, networkWidth) - result = mid(str(ip.octets[0]),1) - for i = 1 to 3 - result = concat(result,@".",mid(str(ip.octets[i]),1)) - next - result = concat(result,@"/",mid(str(networkWidth),1)) - else - print@ errorCode - end if - CCIDR = result -end fn = result - -// -// Main - -Window 1,@"Canonicalize CIDR" -print@ - -// Test data from the Rosetta Stone task - -CFStringRef cidr(5) = {@"87.70.141.1/22", @"36.18.154.103/12", @"62.62.197.11/29", ¬ -@"67.137.119.181/4", @"161.214.74.21/24", @"184.232.176.184/18"} - -for Int i = 0 to 5 - print@ fn ProcessCIDR(cidr(i)) -next - -HandleEvents - -// diff --git a/Task/Canonicalize-CIDR/Julia/canonicalize-cidr.jl b/Task/Canonicalize-CIDR/Julia/canonicalize-cidr.julia similarity index 100% rename from Task/Canonicalize-CIDR/Julia/canonicalize-cidr.jl rename to Task/Canonicalize-CIDR/Julia/canonicalize-cidr.julia diff --git a/Task/Canonicalize-CIDR/OCaml/canonicalize-cidr.ml b/Task/Canonicalize-CIDR/OCaml/canonicalize-cidr.ocaml similarity index 100% rename from Task/Canonicalize-CIDR/OCaml/canonicalize-cidr.ml rename to Task/Canonicalize-CIDR/OCaml/canonicalize-cidr.ocaml diff --git a/Task/Canonicalize-CIDR/Phix/canonicalize-cidr.phix b/Task/Canonicalize-CIDR/Phix/canonicalize-cidr.phix index aca9dd0ac3..187988d1b3 100644 --- a/Task/Canonicalize-CIDR/Phix/canonicalize-cidr.phix +++ b/Task/Canonicalize-CIDR/Phix/canonicalize-cidr.phix @@ -1,31 +1,35 @@ -with javascript_semantics -function canonicalize_cidr(string cidr) - cidr = substitute(cidr,"."," ") -- (else %d eats 0.0 etc) - if not find('/',cidr) then cidr &= "/32" end if - sequence res = scanf(cidr,"%d %d %d %d/%d") - if length(res)=1 then - integer {a,b,c,d,m} = res[1] - if a>=0 and a<=255 - and b>=0 and b<=255 - and c>=0 and c<=255 - and d>=0 and d<=255 - and m>=1 and m<=32 then - atom mask = power(2,32-m)-1, - addr = bytes_to_int({d,c,b,a}) - addr -= and_bits(addr,mask) - {d,c,b,a} = int_to_bytes(addr) - return sprintf("%d.%d.%d.%d/%d",{a,b,c,d,m}) - end if - end if - return "???" -end function +(phixonline)--> + with javascript_semantics -- (not likely useful) + function canonicalize_cidr(string cidr) + cidr = substitute(cidr,"."," ") -- (else %d eats 0.0 etc) + if not find('/',cidr) then cidr &= "/32" end if + sequence res = scanf(cidr,"%d %d %d %d/%d") + if length(res)=1 then + integer {a,b,c,d,m} = res[1] + if a>=0 and a<=255 + and b>=0 and b<=255 + and c>=0 and c<=255 + and d>=0 and d<=255 + and m>=1 and m<=32 then + atom mask = power(2,32-m)-1, + addr = bytes_to_int({d,c,b,a}) + addr -= and_bits(addr,mask) + {d,c,b,a} = int_to_bytes(addr) + return sprintf("%d.%d.%d.%d/%d",{a,b,c,d,m}) + end if + end if + return "???" + end function -constant tests = {"87.70.141.1/22", - "36.18.154.103/12", - "62.62.197.11/29", - "67.137.119.181/4", - "161.214.74.21/24", - "184.232.176.184/18"} -for t in tests do - printf(1,"%-18s -> %s\n",{t,canonicalize_cidr(t)}) -end for + constant tests = {"87.70.141.1/22", + "36.18.154.103/12", + "62.62.197.11/29", + "67.137.119.181/4", + "161.214.74.21/24", + "184.232.176.184/18"} + + for i=1 to length(tests) do + string ti = tests[i] + printf(1,"%-18s -> %s\n",{ti,canonicalize_cidr(ti)}) + end for + + integer n = 5, + w = power(3,n-1), + len = w + string line = repeat('#',w)&"\n" + + while 1 do + puts(1,line) + if len=1 then exit end if + len /= 3 + integer pos = 1 + while pos<(w-len) do + pos += len + line[pos..pos+len-1] = ' ' + pos += len + end while + end while + + with javascript_semantics + integer count = 0 + for p1=1 to 61 do + if is_prime(p1) then + for h3=1 to p1 do + atom h3p1 = h3 + p1 + for d=1 to h3p1-1 do + if mod(h3p1*(p1-1),d)=0 + and mod(-(p1*p1),h3) = mod(d,h3) then + atom p2 := 1 + floor(((p1-1)*h3p1)/d), + p3 := 1 +floor(p1*p2/h3) + if is_prime(p2) + and is_prime(p3) + and mod(p2*p3,p1-1)=1 then + if count<5 or count>65 then + printf(1,"%d * %d * %d = %d\n",{p1,p2,p3,p1*p2*p3}) + elsif count=35 then puts(1,"...\n") end if + count += 1 + end if + end if + end for + end for + end if + end for + printf(1,"%d Carmichael numbers found\n",count) + [ ) + [ over witheach + [ over nested + swap nested join + nested dip rot join + unrot ] + drop ] drop ] is cartprod ( [ [ --> [ ) - [ behead swap witheach cart ] is n-cart ( [ --> [ ) - - ' [ 1 2 ] ' [ 3 4 ] cart echo cr cr - ' [ 1 2 ] ' [ ] cart echo cr cr - ' [ ] ' [ 1 2 ] cart echo cr cr - - ' [ [ 1776 1789 ] [ 7 12 ] [ 4 14 23 ] [ 0 1 ] ] n-cart - say "[ " - witheach - [ i^ 0 != if [ say " " ] - echo - i 0 = if [ say " ]" ] cr ] - cr - - ' [ [ 1 2 3 ] [ 30 ] [ 500 100 ] ] n-cart echo cr cr - ' [ [ 1 2 3 ] [ ] [ 500 100 ] ] n-cart echo cr cr + ' [ 1 2 ] ' [ 3 4 ] cartprod echo cr + ' [ 3 4 ] ' [ 1 2 ] cartprod echo cr + ' [ 1 2 ] ' [ ] cartprod echo cr + ' [ ] ' [ 1 2 ] cartprod echo cr diff --git a/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-1.rs b/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-1.rs deleted file mode 100644 index 4bde4f9f43..0000000000 --- a/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-1.rs +++ /dev/null @@ -1,42 +0,0 @@ -fn cartesian_product<'a, T>(lists: &[&'a [T]]) -> Vec> { - let mut res = vec![vec![]]; - - for &list in lists { - let mut tmp = Vec::new(); - - for r in res { - for item in list { - let mut r = r.clone(); - r.push(item); - tmp.push(r); - } - } - - res = tmp; - } - - res -} - -fn main() { - let cases: [&[&[u32]]; 7] = [ - &[&[1, 2], &[3, 4]], - &[&[3, 4], &[1, 2]], - &[&[1, 2], &[]], - &[&[], &[1, 2]], - &[&[1776, 1789], &[7, 12], &[4, 14, 23], &[0, 1]], - &[&[1, 2, 3], &[30], &[500, 100]], - &[&[1, 2, 3], &[], &[500, 100]], - ]; - - for case in cases { - println!( - "{}\n{:?}\n", - case.iter() - .map(|c| format!("{:?}", c)) - .collect::>() - .join(" × "), - cartesian_product(case) - ) - } -} diff --git a/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-2.rs b/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-2.rs deleted file mode 100644 index 88f569f91f..0000000000 --- a/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-2.rs +++ /dev/null @@ -1,2 +0,0 @@ -[dependencies] -itertools = { version = "0.14.0", features = ["use_alloc"] } diff --git a/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-3.rs b/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-3.rs deleted file mode 100644 index e8d4eff8e3..0000000000 --- a/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists-3.rs +++ /dev/null @@ -1,28 +0,0 @@ -use itertools::{Itertools, MultiProduct}; - -fn cartesian_product<'a, T>(inputs: &[&'a [T]]) -> MultiProduct> { - inputs - .iter() - .map(|slice| slice.iter()) - .multi_cartesian_product() -} - -fn main() { - let cases: [&[&[u32]]; 7] = [ - &[&[1, 2], &[3, 4]], - &[&[3, 4], &[1, 2]], - &[&[1, 2], &[]], - &[&[], &[1, 2]], - &[&[1776, 1789], &[7, 12], &[4, 14, 23], &[0, 1]], - &[&[1, 2, 3], &[30], &[500, 100]], - &[&[1, 2, 3], &[], &[500, 1000]], - ]; - - for case in cases { - println!( - "{:?}\n[{:?}]\n", - case.iter().format(" × "), - cartesian_product(case).format(", ") - ); - } -} diff --git a/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists.rust b/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists.rust new file mode 100644 index 0000000000..9345a4ad79 --- /dev/null +++ b/Task/Cartesian-product-of-two-or-more-lists/Rust/cartesian-product-of-two-or-more-lists.rust @@ -0,0 +1,41 @@ +fn cartesian_product(lists: &Vec>) -> Vec> { + let mut res = vec![]; + + let mut list_iter = lists.iter(); + if let Some(first_list) = list_iter.next() { + for &i in first_list { + res.push(vec![i]); + } + } + for l in list_iter { + let mut tmp = vec![]; + for r in res { + for &el in l { + let mut tmp_el = r.clone(); + tmp_el.push(el); + tmp.push(tmp_el); + } + } + res = tmp; + } + res +} + +fn main() { + let cases = vec![ + vec![vec![1, 2], vec![3, 4]], + vec![vec![3, 4], vec![1, 2]], + vec![vec![1, 2], vec![]], + vec![vec![], vec![1, 2]], + vec![vec![1776, 1789], vec![7, 12], vec![4, 14, 23], vec![0, 1]], + vec![vec![1, 2, 3], vec![30], vec![500, 100]], + vec![vec![1, 2, 3], vec![], vec![500, 100]], + ]; + for case in cases { + println!( + "{}\n{:?}\n", + case.iter().map(|c| format!("{:?}", c)).collect::>().join(" × "), + cartesian_product(&case) + ) + } +} diff --git a/Task/Cartesian-product-of-two-or-more-lists/Scheme/cartesian-product-of-two-or-more-lists.scm b/Task/Cartesian-product-of-two-or-more-lists/Scheme/cartesian-product-of-two-or-more-lists.ss similarity index 100% rename from Task/Cartesian-product-of-two-or-more-lists/Scheme/cartesian-product-of-two-or-more-lists.scm rename to Task/Cartesian-product-of-two-or-more-lists/Scheme/cartesian-product-of-two-or-more-lists.ss diff --git a/Task/Cartesian-product-of-two-or-more-lists/Uiua/cartesian-product-of-two-or-more-lists.uiua b/Task/Cartesian-product-of-two-or-more-lists/Uiua/cartesian-product-of-two-or-more-lists.uiua deleted file mode 100644 index 2895add665..0000000000 --- a/Task/Cartesian-product-of-two-or-more-lists/Uiua/cartesian-product-of-two-or-more-lists.uiua +++ /dev/null @@ -1,9 +0,0 @@ -# Cartesian products - -☇1⊞⊂[1 2] [3 4] -☇1⊞⊂[3 4] [1 2] -☇1⊞⊂[3 4] [] -C ← /◇(☇1⊞⊂) -≡⍚C{{[1776 1789] [7 12] [4 14 23] [0 1]} - {[1 2 3] [30] [500 100]} - {[1 2 3] [] [500 100]}} diff --git a/Task/Case-sensitivity-of-identifiers/ALGOL-M/case-sensitivity-of-identifiers.alg b/Task/Case-sensitivity-of-identifiers/ALGOL-M/case-sensitivity-of-identifiers.alg deleted file mode 100644 index 5e25c79838..0000000000 --- a/Task/Case-sensitivity-of-identifiers/ALGOL-M/case-sensitivity-of-identifiers.alg +++ /dev/null @@ -1,13 +0,0 @@ -begin - -string dog; -comment - An attempt to declare Dog or DOG after declaring - dog will result in a compile-time error ("Doubly - Declared identifier"); -dog := "Benjamin"; -Dog := "Samba"; -DOG := "Bernie"; -write("There is just one dog named ", dog); - -end diff --git a/Task/Case-sensitivity-of-identifiers/Ada/case-sensitivity-of-identifiers.adb b/Task/Case-sensitivity-of-identifiers/Ada/case-sensitivity-of-identifiers.ada similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Ada/case-sensitivity-of-identifiers.adb rename to Task/Case-sensitivity-of-identifiers/Ada/case-sensitivity-of-identifiers.ada diff --git a/Task/Case-sensitivity-of-identifiers/Ballerina/case-sensitivity-of-identifiers.ballerina b/Task/Case-sensitivity-of-identifiers/Ballerina/case-sensitivity-of-identifiers.ballerina deleted file mode 100644 index 6b87eea744..0000000000 --- a/Task/Case-sensitivity-of-identifiers/Ballerina/case-sensitivity-of-identifiers.ballerina +++ /dev/null @@ -1,8 +0,0 @@ -import ballerina/io; - -public function main() { - string dog = "Benjamin"; - string Dog = "Samba"; - string DOG = "Bernie"; - io:println(`The three dogs are named ${dog}, ${Dog} and ${DOG}.`); -} diff --git a/Task/Case-sensitivity-of-identifiers/COBOL/case-sensitivity-of-identifiers.cob b/Task/Case-sensitivity-of-identifiers/COBOL/case-sensitivity-of-identifiers.cobol similarity index 100% rename from Task/Case-sensitivity-of-identifiers/COBOL/case-sensitivity-of-identifiers.cob rename to Task/Case-sensitivity-of-identifiers/COBOL/case-sensitivity-of-identifiers.cobol diff --git a/Task/Case-sensitivity-of-identifiers/Crystal/case-sensitivity-of-identifiers.cr b/Task/Case-sensitivity-of-identifiers/Crystal/case-sensitivity-of-identifiers.crystal similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Crystal/case-sensitivity-of-identifiers.cr rename to Task/Case-sensitivity-of-identifiers/Crystal/case-sensitivity-of-identifiers.crystal diff --git a/Task/Case-sensitivity-of-identifiers/D/case-sensitivity-of-identifiers.d b/Task/Case-sensitivity-of-identifiers/D/case-sensitivity-of-identifiers.d index 549512886a..c140100011 100644 --- a/Task/Case-sensitivity-of-identifiers/D/case-sensitivity-of-identifiers.d +++ b/Task/Case-sensitivity-of-identifiers/D/case-sensitivity-of-identifiers.d @@ -5,6 +5,6 @@ void main() { // identifiers that start with capital letters are type names string Dog = "Samba"; string DOG = "Bernie"; - writeln("There are three dogs named ", - dog, ", ", Dog, ", and ", DOG, "."); + writefln("There are three dogs named ", + dog, ", ", Dog, ", and ", DOG, "'"); } diff --git a/Task/Case-sensitivity-of-identifiers/Delphi/case-sensitivity-of-identifiers.pas b/Task/Case-sensitivity-of-identifiers/Delphi/case-sensitivity-of-identifiers.delphi similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Delphi/case-sensitivity-of-identifiers.pas rename to Task/Case-sensitivity-of-identifiers/Delphi/case-sensitivity-of-identifiers.delphi diff --git a/Task/Case-sensitivity-of-identifiers/DuckDB/case-sensitivity-of-identifiers-1.duckdb b/Task/Case-sensitivity-of-identifiers/DuckDB/case-sensitivity-of-identifiers-1.duckdb deleted file mode 100644 index 0b9cd57834..0000000000 --- a/Task/Case-sensitivity-of-identifiers/DuckDB/case-sensitivity-of-identifiers-1.duckdb +++ /dev/null @@ -1,3 +0,0 @@ -create or replace function task(dog, Dog, DOG) as ( - format('The three dogs are named {:s}, {:s} and {:s}.', dog, Dog, DOG) -); diff --git a/Task/Case-sensitivity-of-identifiers/DuckDB/case-sensitivity-of-identifiers-2.duckdb b/Task/Case-sensitivity-of-identifiers/DuckDB/case-sensitivity-of-identifiers-2.duckdb deleted file mode 100644 index d7c7d9bd1c..0000000000 --- a/Task/Case-sensitivity-of-identifiers/DuckDB/case-sensitivity-of-identifiers-2.duckdb +++ /dev/null @@ -1,2 +0,0 @@ -select format('The three dogs are named {:s}, {:s} and {:s}.', dog, Dog, DOG) as example -from (select 'Benjamin' as dog, 'Samba' as Dog, 'Bernie' as DOG); diff --git a/Task/Case-sensitivity-of-identifiers/Elena/case-sensitivity-of-identifiers.elena b/Task/Case-sensitivity-of-identifiers/Elena/case-sensitivity-of-identifiers.elena index 2deacb71ce..b33d071054 100644 --- a/Task/Case-sensitivity-of-identifiers/Elena/case-sensitivity-of-identifiers.elena +++ b/Task/Case-sensitivity-of-identifiers/Elena/case-sensitivity-of-identifiers.elena @@ -1,9 +1,9 @@ import extensions; -public Program() +public program() { var dog := "Benjamin"; var Dog := "Samba"; var DOG := "Bernie"; - Console.printLineFormatted("The three dogs are named {0}, {1} and {2}", dog, Dog, DOG) + console.printLineFormatted("The three dogs are named {0}, {1} and {2}", dog, Dog, DOG) } diff --git a/Task/Case-sensitivity-of-identifiers/Elixir/case-sensitivity-of-identifiers.ex b/Task/Case-sensitivity-of-identifiers/Elixir/case-sensitivity-of-identifiers.elixir similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Elixir/case-sensitivity-of-identifiers.ex rename to Task/Case-sensitivity-of-identifiers/Elixir/case-sensitivity-of-identifiers.elixir diff --git a/Task/Case-sensitivity-of-identifiers/Euphoria/case-sensitivity-of-identifiers.eu b/Task/Case-sensitivity-of-identifiers/Euphoria/case-sensitivity-of-identifiers.euphoria similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Euphoria/case-sensitivity-of-identifiers.eu rename to Task/Case-sensitivity-of-identifiers/Euphoria/case-sensitivity-of-identifiers.euphoria diff --git a/Task/Case-sensitivity-of-identifiers/GW-BASIC/case-sensitivity-of-identifiers.basic b/Task/Case-sensitivity-of-identifiers/GW-BASIC/case-sensitivity-of-identifiers.basic new file mode 100644 index 0000000000..33a43f9953 --- /dev/null +++ b/Task/Case-sensitivity-of-identifiers/GW-BASIC/case-sensitivity-of-identifiers.basic @@ -0,0 +1,5 @@ +10 dog$ = "Benjamin" +20 dog$ = "Smokey" +30 dog$ = "Samba" +40 dog$ = "Bernie" +50 print "There is just one dog, named ";dog$ diff --git a/Task/Case-sensitivity-of-identifiers/Joy/case-sensitivity-of-identifiers.joy b/Task/Case-sensitivity-of-identifiers/Joy/case-sensitivity-of-identifiers.joy deleted file mode 100644 index 5e074a15e6..0000000000 --- a/Task/Case-sensitivity-of-identifiers/Joy/case-sensitivity-of-identifiers.joy +++ /dev/null @@ -1,17 +0,0 @@ -DEFINE dog == "Benjamin". -DEFINE Dog == "Samba". -DEFINE DOG == "Bernie". -"The three dogs are named" -"." DOG "and" Dog "," dog "The three dogs are named" -. -"The three dogs are named" -. -"Benjamin" -. -"," -. -"Samba" -. -"and" -. -"Bernie" diff --git a/Task/Case-sensitivity-of-identifiers/Julia/case-sensitivity-of-identifiers.jl b/Task/Case-sensitivity-of-identifiers/Julia/case-sensitivity-of-identifiers.julia similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Julia/case-sensitivity-of-identifiers.jl rename to Task/Case-sensitivity-of-identifiers/Julia/case-sensitivity-of-identifiers.julia diff --git a/Task/Case-sensitivity-of-identifiers/Kotlin/case-sensitivity-of-identifiers.kts b/Task/Case-sensitivity-of-identifiers/Kotlin/case-sensitivity-of-identifiers.kotlin similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Kotlin/case-sensitivity-of-identifiers.kts rename to Task/Case-sensitivity-of-identifiers/Kotlin/case-sensitivity-of-identifiers.kotlin diff --git a/Task/Case-sensitivity-of-identifiers/LOLCODE/case-sensitivity-of-identifiers.lol b/Task/Case-sensitivity-of-identifiers/LOLCODE/case-sensitivity-of-identifiers.lol deleted file mode 100644 index bbf2bc3047..0000000000 --- a/Task/Case-sensitivity-of-identifiers/LOLCODE/case-sensitivity-of-identifiers.lol +++ /dev/null @@ -1,12 +0,0 @@ -HAI 1.3 - -I HAS A dog ITZ "Benjamin" -I HAS A Dog ITZ "Samba" -I HAS A DOG ITZ "Bernie" - -EITHER OF DIFFRINT dog AN Dog AN DIFFRINT Dog AN DOG, O RLY? - YA RLY, VISIBLE "TEH 3 DOGZ R NAEMD :{dog}, :{Dog}, AN :{DOG}." - NO WAI, VISIBLE "THERE IZ JUST 1 DOG NAEMD :{DOG}." -OIC - -KTHXBYE diff --git a/Task/Case-sensitivity-of-identifiers/Nim/case-sensitivity-of-identifiers.nim b/Task/Case-sensitivity-of-identifiers/Nim/case-sensitivity-of-identifiers.nim index 37894e4681..6968431516 100644 --- a/Task/Case-sensitivity-of-identifiers/Nim/case-sensitivity-of-identifiers.nim +++ b/Task/Case-sensitivity-of-identifiers/Nim/case-sensitivity-of-identifiers.nim @@ -3,7 +3,7 @@ var dog, Dog: string if dog == Dog: if dog == DOG: - echo "There is only one dog, ", DOG + echo "There is only one dog, ", DOG) else: echo "There are two dogs: ", dog, " and ", DOG elif Dog == DOG : diff --git a/Task/Case-sensitivity-of-identifiers/OCaml/case-sensitivity-of-identifiers.ml b/Task/Case-sensitivity-of-identifiers/OCaml/case-sensitivity-of-identifiers.ocaml similarity index 100% rename from Task/Case-sensitivity-of-identifiers/OCaml/case-sensitivity-of-identifiers.ml rename to Task/Case-sensitivity-of-identifiers/OCaml/case-sensitivity-of-identifiers.ocaml diff --git a/Task/Case-sensitivity-of-identifiers/PascalABC.NET/case-sensitivity-of-identifiers.pas b/Task/Case-sensitivity-of-identifiers/PascalABC.NET/case-sensitivity-of-identifiers.pas deleted file mode 100644 index d697568ba5..0000000000 --- a/Task/Case-sensitivity-of-identifiers/PascalABC.NET/case-sensitivity-of-identifiers.pas +++ /dev/null @@ -1,8 +0,0 @@ -var - dog: string; -begin - dog := 'Benjamin'; - Dog := 'Samba'; - DOG := 'Bernie'; - Writeln('There is just one dog named ' + dog); -end. diff --git a/Task/Case-sensitivity-of-identifiers/Pluto/case-sensitivity-of-identifiers.pluto b/Task/Case-sensitivity-of-identifiers/Pluto/case-sensitivity-of-identifiers.pluto deleted file mode 100644 index 79d19b3417..0000000000 --- a/Task/Case-sensitivity-of-identifiers/Pluto/case-sensitivity-of-identifiers.pluto +++ /dev/null @@ -1,13 +0,0 @@ -do - local dog = "Benjamin"; - do - local Dog = "Samba"; - do - local DOG = "Bernie"; - if DOG != Dog or DOG != dog - then print( $"The three dogs are named: {dog}, {Dog} and {DOG}" ) - else print( $"There is just one dog named: {DOG}" ) - end - end - end -end diff --git a/Task/Case-sensitivity-of-identifiers/PowerShell/case-sensitivity-of-identifiers.ps1 b/Task/Case-sensitivity-of-identifiers/PowerShell/case-sensitivity-of-identifiers.psh similarity index 100% rename from Task/Case-sensitivity-of-identifiers/PowerShell/case-sensitivity-of-identifiers.ps1 rename to Task/Case-sensitivity-of-identifiers/PowerShell/case-sensitivity-of-identifiers.psh diff --git a/Task/Case-sensitivity-of-identifiers/Red/case-sensitivity-of-identifiers.red b/Task/Case-sensitivity-of-identifiers/Red/case-sensitivity-of-identifiers.red deleted file mode 100644 index 5d1432eea1..0000000000 --- a/Task/Case-sensitivity-of-identifiers/Red/case-sensitivity-of-identifiers.red +++ /dev/null @@ -1,8 +0,0 @@ -dog: "Benjamin" -Dog: "Samba" -DOG: "Bernie" - -print [ "The three dogs are " dog "," Dog "," DOG ] - -;- as Red is not case sensitive, will ouput -;- The three dogs are Bernie , Bernie , Bernie diff --git a/Task/Case-sensitivity-of-identifiers/Refal/case-sensitivity-of-identifiers.refal b/Task/Case-sensitivity-of-identifiers/Refal/case-sensitivity-of-identifiers.refal deleted file mode 100644 index 11adce0813..0000000000 --- a/Task/Case-sensitivity-of-identifiers/Refal/case-sensitivity-of-identifiers.refal +++ /dev/null @@ -1,6 +0,0 @@ -$ENTRY Go { - , 'Benjamin': e.dog - , 'Samba': e.Dog - , 'Bernie': e.DOG - = ; -}; diff --git a/Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-1.rs b/Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-1.rust similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-1.rs rename to Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-1.rust diff --git a/Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-2.rs b/Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-2.rust similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-2.rs rename to Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-2.rust diff --git a/Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-3.rs b/Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-3.rust similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-3.rs rename to Task/Case-sensitivity-of-identifiers/Rust/case-sensitivity-of-identifiers-3.rust diff --git a/Task/Case-sensitivity-of-identifiers/S-BASIC/case-sensitivity-of-identifiers.basic b/Task/Case-sensitivity-of-identifiers/S-BASIC/case-sensitivity-of-identifiers.basic deleted file mode 100644 index de5524ecca..0000000000 --- a/Task/Case-sensitivity-of-identifiers/S-BASIC/case-sensitivity-of-identifiers.basic +++ /dev/null @@ -1,13 +0,0 @@ -var dog = string -comment - An attempt to declare Dog or DOG after declaring dog - will result in a compile-time error ("One of these VAR - names in use") -end - -dog = "Benjamin" -Dog = "Samba" -DOG = "Bernie" -print "There is just one dog named "; dog - -end diff --git a/Task/Case-sensitivity-of-identifiers/Scheme/case-sensitivity-of-identifiers.scm b/Task/Case-sensitivity-of-identifiers/Scheme/case-sensitivity-of-identifiers.ss similarity index 100% rename from Task/Case-sensitivity-of-identifiers/Scheme/case-sensitivity-of-identifiers.scm rename to Task/Case-sensitivity-of-identifiers/Scheme/case-sensitivity-of-identifiers.ss diff --git a/Task/Case-sensitivity-of-identifiers/Swift/case-sensitivity-of-identifiers.swift b/Task/Case-sensitivity-of-identifiers/Swift/case-sensitivity-of-identifiers.swift index e0af4e9df0..b027c8aadd 100644 --- a/Task/Case-sensitivity-of-identifiers/Swift/case-sensitivity-of-identifiers.swift +++ b/Task/Case-sensitivity-of-identifiers/Swift/case-sensitivity-of-identifiers.swift @@ -1,4 +1,4 @@ let dog = "Benjamin" let Dog = "Samba" let DOG = "Bernie" -print("The three dogs are named \(dog), \(Dog), and \(DOG).") +println("The three dogs are named \(dog), \(Dog), and \(DOG).") diff --git a/Task/Casting-out-nines/Fortran/casting-out-nines.f b/Task/Casting-out-nines/Fortran/casting-out-nines.f deleted file mode 100644 index a2e0705db8..0000000000 --- a/Task/Casting-out-nines/Fortran/casting-out-nines.f +++ /dev/null @@ -1,220 +0,0 @@ -program main - implicit none - - type :: test_case - integer :: base - character(len=10) :: begin, end_ - character(len=10), dimension(5) :: kaprekar - integer :: nkap - end type test_case - - type(test_case), dimension(2) :: testcases - type(test_case) :: tc - integer :: it, i, j - character(len=20), allocatable :: s(:) - logical :: found - - ! Initialize test cases - testcases(1)%base = 10 - testcases(1)%begin = '1' - testcases(1)%end_ = '100' - testcases(1)%kaprekar(1:5) = (/'1 ', '9 ', '45 ', '55 ', '99 '/) - testcases(1)%nkap = 5 - - testcases(2)%base = 17 - testcases(2)%begin = '10' - testcases(2)%end_ = 'gg' - testcases(2)%kaprekar(1:3) = (/'3d', 'd4', 'gg'/) - testcases(2)%nkap = 3 - - do it = 1, 2 - tc = testcases(it) - write(*, *) '' - write(*, '(A, I0, A, A, A, A)') 'Test case base = ', tc%base, ', begin = ', trim(tc%begin), ', end = ', trim(tc%end_) - call subset(tc%base, tc%begin, tc%end_, s) - write(*, '(A)', advance='no') 'Subset: ' - do i = 1, size(s) - write(*, '(A, A)', advance='no') trim(s(i)), ' ' - end do - write(*, *) - write(*, '(A)', advance='no') 'Kaprekar: ' - do i = 1, tc%nkap - write(*, '(A, A)', advance='no') trim(tc%kaprekar(i)), ' ' - end do - write(*, *) - - ! Check if all Kaprekar are in subset - j = 1 - do i = 1, tc%nkap - found = .false. - do while (j <= size(s)) - if (trim(s(j)) == trim(tc%kaprekar(i))) then - found = .true. - j = j + 1 - exit - end if - j = j + 1 - end do - if (.not. found) then - write(*, '(A, A, A)') 'Fail: ', trim(tc%kaprekar(i)), ' not in subset' - stop - end if - end do - write(*, *) 'Valid subset.' - if (allocated(s)) deallocate(s) - end do - -contains - - subroutine subset(base, begin, end_, s) - integer, intent(in) :: base - character(len=*), intent(in) :: begin, end_ - character(len=20), allocatable, intent(out) :: s(:) - integer(8) :: begin64, end64, k, kk - character(len=20) :: ks, kks - character(1) :: rk, rk2 - - begin64 = str_to_int(base, begin) - end64 = str_to_int(base, end_) - - allocate(s(0)) ! Start empty - - do k = begin64, end64 - ks = int_to_str(base, k) - rk = check_digit(base, ks) - kk = k * k - kks = int_to_str(base, kk) - rk2 = check_digit(base, kks) - if (rk == rk2) then - call append_str(s, ks) - end if - end do - end subroutine subset - - subroutine append_str(list, val) - character(len=20), allocatable, intent(inout) :: list(:) - character(len=*), intent(in) :: val - character(len=20), allocatable :: tmp(:) - - if (allocated(list)) then - allocate(tmp(size(list))) - tmp = list - deallocate(list) - allocate(list(size(tmp) + 1)) - list(1:size(tmp)) = tmp - list(size(tmp) + 1) = val - else - allocate(list(1)) - list(1) = val - end if - end subroutine append_str - - recursive function check_digit(base, n) result(r) - integer, intent(in) :: base - character(len=*), intent(in) :: n - character(1) :: r - character(1) :: d, b9 - character(len=20) :: s, s9 - integer :: i, v9 - - v9 = base - 1 - s9 = int_to_str(base, int(v9, 8)) - b9 = s9(1:1) ! Single digit - - r = '0' - do i = 1, len_trim(n) - d = n(i:i) - if (d == b9) cycle - if (r == '0') then - r = d - cycle - end if - s = add_digits(base, r, d) - if (trim(s) == trim(s9)) then - r = '0' - cycle - end if - if (len_trim(s) == 1) then - r = s(1:1) - cycle - end if - ! Recurse on two-digit sum - r = check_digit(base, trim(s)) - end do - end function check_digit - - function add_digits(base, a, b) result(res) - integer, intent(in) :: base - character(1), intent(in) :: a, b - character(len=20) :: res - integer :: ai, bi - - ai = digit_value(a, base) - bi = digit_value(b, base) - res = int_to_str(base, int(ai + bi, 8)) - end function add_digits - - function digit_value(c, base) result(v) - character(1), intent(in) :: c - integer, intent(in) :: base - integer :: v - - if (c >= '0' .and. c <= '9') then - v = iachar(c) - iachar('0') - else if (c >= 'a' .and. c <= 'z') then - v = 10 + iachar(c) - iachar('a') - else - stop 'invalid digit' - end if - if (v < 0 .or. v >= base) stop 'invalid digit for base' - end function digit_value - - function value_to_digit(v) result(c) - integer, intent(in) :: v - character(1) :: c - - if (v < 10) then - c = achar(iachar('0') + v) - else - c = achar(iachar('a') + v - 10) - end if - end function value_to_digit - - function int_to_str(base, k) result(s) - integer, intent(in) :: base - integer(8), intent(in) :: k - character(len=20) :: s - integer(8) :: kk - integer :: digit - - kk = k - if (kk < 0) kk = -kk ! But not handling negatives in this context - s = '' - if (kk == 0) then - s = '0' - return - end if - do while (kk > 0) - digit = mod(kk, int(base, 8)) - s = value_to_digit(digit) // s - kk = kk / int(base, 8) - end do - end function int_to_str - - function str_to_int(base, s) result(val) - integer, intent(in) :: base - character(len=*), intent(in) :: s - integer(8) :: val - integer :: i, lens, v - character(len=20) :: ss - - ss = adjustl(s) - lens = len_trim(ss) - val = 0 - do i = 1, lens - v = digit_value(ss(i:i), base) - val = val * int(base, 8) + int(v, 8) - end do - end function str_to_int - -end program main diff --git a/Task/Casting-out-nines/Julia/casting-out-nines.jl b/Task/Casting-out-nines/Julia/casting-out-nines.julia similarity index 100% rename from Task/Casting-out-nines/Julia/casting-out-nines.jl rename to Task/Casting-out-nines/Julia/casting-out-nines.julia diff --git a/Task/Casting-out-nines/Kotlin/casting-out-nines.kts b/Task/Casting-out-nines/Kotlin/casting-out-nines.kotlin similarity index 100% rename from Task/Casting-out-nines/Kotlin/casting-out-nines.kts rename to Task/Casting-out-nines/Kotlin/casting-out-nines.kotlin diff --git a/Task/Casting-out-nines/PascalABC.NET/casting-out-nines.pas b/Task/Casting-out-nines/PascalABC.NET/casting-out-nines.pas deleted file mode 100644 index 3c185151a6..0000000000 --- a/Task/Casting-out-nines/PascalABC.NET/casting-out-nines.pas +++ /dev/null @@ -1,16 +0,0 @@ -## -function co9(x: integer): integer; -begin - if x = 9 then result := 0 - else if x < 9 then result := x - else result := co9(x.ToString.select(x -> StrToInt(x)).sum); -end; - -var kaprekars := [1, 9, 45, 55, 99, 297, 703, 999]; - -Print('Checksums: '); (1..20).Select(x -> co9(x)).Println; -Print('co9(k) = co9(k*k): '); -Println((1..1000).Where(x -> co9(x) = co9(x * x))); -var part2 := (1..1000).Where(x -> co9(x) = co9(x * x)).ToSet; -Println('Kaprekars: ', kaprekars); -if kaprekars <= part2 then Println('Kaprekars are included.', part2.Count, 'numbers in range 1000'); diff --git a/Task/Casting-out-nines/Pluto/casting-out-nines.pluto b/Task/Casting-out-nines/Pluto/casting-out-nines.pluto deleted file mode 100644 index 123bf40ebc..0000000000 --- a/Task/Casting-out-nines/Pluto/casting-out-nines.pluto +++ /dev/null @@ -1,30 +0,0 @@ -local function cast_out(base, start, finish) - local b = base - 1 - local ran = range(0, b - 1):filter(|n| -> n % b == (n * n) % b) - local x = start // b - local result = {} - while true do - for ran as n do - local k = b * x + n - if k >= start then - if k > finish then return result end - result:insert(k) - end - end - ++x - end -end - -local function print_array(a, w = 3, n = 10) - for i = 1, #a do - io.write(string.format($"%{w}d ", a[i])) - if i % n == 0 then print() end - end - if #a % 10 != n then print() end -end - -print_array(cast_out(16, 1, 255)) -print() -print_array(cast_out(10, 1, 99)) -print() -print_array(cast_out(17, 1, 288)) diff --git a/Task/Casting-out-nines/Rust/casting-out-nines.rs b/Task/Casting-out-nines/Rust/casting-out-nines.rust similarity index 100% rename from Task/Casting-out-nines/Rust/casting-out-nines.rs rename to Task/Casting-out-nines/Rust/casting-out-nines.rust diff --git a/Task/Catalan-numbers-Pascals-triangle/360-Assembly/catalan-numbers-pascals-triangle.360 b/Task/Catalan-numbers-Pascals-triangle/360-Assembly/catalan-numbers-pascals-triangle.360 index 633d55d35e..a0cc83dae1 100644 --- a/Task/Catalan-numbers-Pascals-triangle/360-Assembly/catalan-numbers-pascals-triangle.360 +++ b/Task/Catalan-numbers-Pascals-triangle/360-Assembly/catalan-numbers-pascals-triangle.360 @@ -68,7 +68,7 @@ ENLOOP2J EQU * MVC C,Z OI C+L'C-1,X'F0' MVC WTOBUF(8),C+8 - WTO MF=(E,WTOMSG) + WTO MF=(E,WTOMSG) B LOOPI ENDLOOPI EQU * * ---- END CODE diff --git a/Task/Catalan-numbers-Pascals-triangle/Ada/catalan-numbers-pascals-triangle.adb b/Task/Catalan-numbers-Pascals-triangle/Ada/catalan-numbers-pascals-triangle.ada similarity index 100% rename from Task/Catalan-numbers-Pascals-triangle/Ada/catalan-numbers-pascals-triangle.adb rename to Task/Catalan-numbers-Pascals-triangle/Ada/catalan-numbers-pascals-triangle.ada diff --git a/Task/Catalan-numbers-Pascals-triangle/AutoHotkey/catalan-numbers-pascals-triangle.ahk b/Task/Catalan-numbers-Pascals-triangle/AutoHotkey/catalan-numbers-pascals-triangle.ahk index 67ce3c01c6..4921c4ed98 100644 --- a/Task/Catalan-numbers-Pascals-triangle/AutoHotkey/catalan-numbers-pascals-triangle.ahk +++ b/Task/Catalan-numbers-Pascals-triangle/AutoHotkey/catalan-numbers-pascals-triangle.ahk @@ -6,25 +6,25 @@ Array := [], Array[2,1] := Array[2,2] := 1 ; Array inititated and 2nd row of pas INI := 3 ; starts with calculating the 3rd row and as such the value Loop, 31 ; every odd row is taken for calculating catalan number as such to obtain 15 we need 2n+1 { - if ( A_index > 2 ) - { - Loop, % A_INDEX - { - old := ini-1, index := A_index, index_1 := A_index + 1 - Array[ini, index_1] := Array[old, index] + Array[old, index_1] - Array[ini, 1] := Array[ini, ini] := 1 - line .= Array[ini, A_index] " " - } - ;~ MsgBox % line ; gives rows of pascal's triangle - ; calculating every odd row starting from 1st so as to obtain catalan's numbers - if ( mod(ini,2) != 0) - { - StringSplit, res, line, %A_Space% - ans := res0//2, ans_1 := ans++ - result := result . res%ans_1% - res%ans% " " - } - line := - ini++ - } + if ( A_index > 2 ) + { + Loop, % A_INDEX + { + old := ini-1, index := A_index, index_1 := A_index + 1 + Array[ini, index_1] := Array[old, index] + Array[old, index_1] + Array[ini, 1] := Array[ini, ini] := 1 + line .= Array[ini, A_index] " " + } + ;~ MsgBox % line ; gives rows of pascal's triangle + ; calculating every odd row starting from 1st so as to obtain catalan's numbers + if ( mod(ini,2) != 0) + { + StringSplit, res, line, %A_Space% + ans := res0//2, ans_1 := ans++ + result := result . res%ans_1% - res%ans% " " + } + line := + ini++ + } } MsgBox % result diff --git a/Task/Catalan-numbers-Pascals-triangle/Batch-File/catalan-numbers-pascals-triangle.bat b/Task/Catalan-numbers-Pascals-triangle/Batch-File/catalan-numbers-pascals-triangle.bat index 9c096844a1..707de0dc95 100644 --- a/Task/Catalan-numbers-Pascals-triangle/Batch-File/catalan-numbers-pascals-triangle.bat +++ b/Task/Catalan-numbers-Pascals-triangle/Batch-File/catalan-numbers-pascals-triangle.bat @@ -8,15 +8,15 @@ for /L %%i in (1,1,%n%) do ( set /A ip=%%i+1 for /L %%j in (%%i,-1,1) do ( set /A jm=%%j-1 - set /A t.%%j=t.%%j+t.!jm! - ) - set /A t.!ip!=t.%%i + set /A t.%%j=t.%%j+t.!jm! + ) + set /A t.!ip!=t.%%i for /L %%j in (!ip!,-1,1) do ( set /A jm=%%j-1 - set /A t.%%j=t.%%j+t.!jm! - ) + set /A t.%%j=t.%%j+t.!jm! + ) set /A ci=t.!ip!-t.%%i - echo !ci! + echo !ci! ) ) pause diff --git a/Task/Catalan-numbers-Pascals-triangle/DuckDB/catalan-numbers-pascals-triangle-1.duckdb b/Task/Catalan-numbers-Pascals-triangle/DuckDB/catalan-numbers-pascals-triangle-1.duckdb deleted file mode 100644 index 90833b9fbe..0000000000 --- a/Task/Catalan-numbers-Pascals-triangle/DuckDB/catalan-numbers-pascals-triangle-1.duckdb +++ /dev/null @@ -1,20 +0,0 @@ -# Compute nCr naively using UHUGEINT -# The caller should ensure 2r < n -create or replace function nCr_(n, r) as - (with recursive cte as - (SELECT 1::UHUGEINT as c, n as numerator, 1::UHUGEINT as m - UNION ALL - SELECT (c * numerator / m) as c, - (numerator - 1) as numerator, - (m + 1) as m - FROM cte - WHERE m <= r) - SELECT last(c order by m) - FROM cte -); - -create or replace function nCr(n,r) as ( - if( n - N2=N*(S+S), - D2=D*S, - K = N2 div D2 ; + N2=N*(S+S), + D2=D*S, + K = N2 div D2 ; mul(N,D,S,L)-> - N2=N*(S+L), - D2=D*L, - K = mul(N2,D2,S,L+1). - + N2=N*(S+L), + D2=D*L, + K = mul(N2,D2,S,L+1). + catl(Ans,16) -> Ans; catl(D,S)-> - C=mul(1,1,S,2), - catl([D|C],S+1). + C=mul(1,1,S,2), + catl([D|C],S+1). main()-> - Ans=catl(1,2). + Ans=catl(1,2). diff --git a/Task/Catalan-numbers-Pascals-triangle/Fortran/catalan-numbers-pascals-triangle.f b/Task/Catalan-numbers-Pascals-triangle/Fortran/catalan-numbers-pascals-triangle.f deleted file mode 100644 index aeb18b829c..0000000000 --- a/Task/Catalan-numbers-Pascals-triangle/Fortran/catalan-numbers-pascals-triangle.f +++ /dev/null @@ -1,64 +0,0 @@ - ! Catalan numbers/Pascal's triangle - ! - ! tested with Intel ifx (IFX) 2025.2.0 20250605 on Kubuntu 25.04 - ! GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 on Kubuntu 25.04 - ! VSI Fortran x86-64 V8.6-001 on OpenVMS x86_64 V9.2-3 - ! Note that VMS requires switch $Fortran/ccdefault=LIST - ! otherwise 1st character of each output line is interpreted as - ! Carriage Control character. - ! U.B., July 2025 - - program calc_catalan - implicit none - - integer, parameter :: nMax=15 ! Number of catalan numbers to print - integer :: catalan ! result of calculation - integer :: i, j ! Loop indices - integer :: t(nMax+3) ! 1 line of pascal's triangle - - ! straight copy of the algorithm presented in the C++ solution - ! - ! Try to explain what we are doing: - ! - ! Pascal's Triangle - ! # 1: 1 - ! # 2: 1 2 1 C1 = 2-1 = 1 - ! # 3: 1 3 3 1 - ! # 4: 1 4 6 4 1 C2 = 6-4 = 2 - ! # 5: 1 5 10 10 5 1 - ! # 6: 1 6 15 20 15 6 1 C3 = 20 - 15 = 5 - ! # 7: 1 7 21 35 35 21 7 1 - ! # 8: 1 8 28 56 70 56 28 8 1 C4 = 70 - 56 = 14 - ! t1 2 3 4 5 ... - ! etc. Note for Cn we need even row #(2*n) up to index n+1. - ! and we dont need to store all values, just go from row to row. - t(1) = 0 - t(2) = 1 ! first odd row (i.e. row #1) will be t(2)+t(1) - - do i=2, nMax+1 ! to calculate C(1)... C(nMax) - ! get entries of next odd row (at index 2...i). - ! currently t has values of previous even row - do j = i, 2, -1 - t(j) = t(j) + t(j-1) - end do - ! Now t has values of next odd row. - - ! shift index by 1 so that soon "t" will carry values of next even row - t(i+1) = t(i) - - ! combine values of previously odd row to become values of even row - do j=i+1, 2, -1 - t(j) = t(j) + t(j-1) - end do - ! Now t has values 1...n+1 of 2n'th row of pascals triangle. - - ! Result: catalan number is center number - (left of center)number - ! e. g. for C4 its t(5)-t(4) = 70-56 = 14 - ! (remember i is 5 to calculate C4.) - catalan = t(i+1) - t(i) - - write (*, '(I0,x) ', ADVANCE='NO') catalan ! all in 1 line - end do - - write (*,*) ' ' ! Terminate output line - end program calc_catalan diff --git a/Task/Catalan-numbers-Pascals-triangle/FutureBasic/catalan-numbers-pascals-triangle.basic b/Task/Catalan-numbers-Pascals-triangle/FutureBasic/catalan-numbers-pascals-triangle.basic deleted file mode 100644 index f8d7a51702..0000000000 --- a/Task/Catalan-numbers-Pascals-triangle/FutureBasic/catalan-numbers-pascals-triangle.basic +++ /dev/null @@ -1,20 +0,0 @@ - local fn CatalanNumbers( levels as int ) - int k, n - double num, den, cat - - printf @"1" - - for n = 2 to levels - num = 1 : den = 1 - for k = 2 to n - num *= ( n + k ) - den *= k - cat = num / den - next - printf @"%.f", cat - next -end fn - -fn CatalanNumbers( 30 ) - -HandleEvents diff --git a/Task/Catalan-numbers-Pascals-triangle/Julia/catalan-numbers-pascals-triangle.jl b/Task/Catalan-numbers-Pascals-triangle/Julia/catalan-numbers-pascals-triangle.julia similarity index 100% rename from Task/Catalan-numbers-Pascals-triangle/Julia/catalan-numbers-pascals-triangle.jl rename to Task/Catalan-numbers-Pascals-triangle/Julia/catalan-numbers-pascals-triangle.julia diff --git a/Task/Catalan-numbers-Pascals-triangle/Kotlin/catalan-numbers-pascals-triangle.kts b/Task/Catalan-numbers-Pascals-triangle/Kotlin/catalan-numbers-pascals-triangle.kotlin similarity index 100% rename from Task/Catalan-numbers-Pascals-triangle/Kotlin/catalan-numbers-pascals-triangle.kts rename to Task/Catalan-numbers-Pascals-triangle/Kotlin/catalan-numbers-pascals-triangle.kotlin diff --git a/Task/Catalan-numbers-Pascals-triangle/OCaml/catalan-numbers-pascals-triangle.ml b/Task/Catalan-numbers-Pascals-triangle/OCaml/catalan-numbers-pascals-triangle.ocaml similarity index 100% rename from Task/Catalan-numbers-Pascals-triangle/OCaml/catalan-numbers-pascals-triangle.ml rename to Task/Catalan-numbers-Pascals-triangle/OCaml/catalan-numbers-pascals-triangle.ocaml diff --git a/Task/Catalan-numbers-Pascals-triangle/Objeck/catalan-numbers-pascals-triangle.objeck b/Task/Catalan-numbers-Pascals-triangle/Objeck/catalan-numbers-pascals-triangle.objeck deleted file mode 100644 index 37ecabb22c..0000000000 --- a/Task/Catalan-numbers-Pascals-triangle/Objeck/catalan-numbers-pascals-triangle.objeck +++ /dev/null @@ -1,23 +0,0 @@ -class Test { - function : Main(args : String[]) ~ Nil { - N := 15; - t := Int->New[N + 2]; - t[1] := 1; - - for(i := 1; i <= N; i++) { - - for(j := i; j > 1; j--){ - t[j] := t[j] + t[j - 1]; - }; - - t[i + 1] := t[i]; - - for(j := i + 1; j > 1; j--) { - t[j] := t[j] + t[j - 1]; - }; - - v := t[i + 1] - t[i]; - "{$v} "->Print(); - }; - } -} diff --git a/Task/Catalan-numbers-Pascals-triangle/PascalABC.NET/catalan-numbers-pascals-triangle.pas b/Task/Catalan-numbers-Pascals-triangle/PascalABC.NET/catalan-numbers-pascals-triangle.pas deleted file mode 100644 index f031c01feb..0000000000 --- a/Task/Catalan-numbers-Pascals-triangle/PascalABC.NET/catalan-numbers-pascals-triangle.pas +++ /dev/null @@ -1,14 +0,0 @@ -const - n = 15; - -begin - var t: array[0..n + 1] of integer; - t[1] := 1; - for var i := 1 to n do - begin - for var j := i downto 1 do t[j] += t[j - 1]; - t[i + 1] := t[i]; - for var j := i + 1 downto 1 do t[j] += t[j - 1]; - print(t[i + 1] - t[i]); - end; -end. diff --git a/Task/Catalan-numbers-Pascals-triangle/Phix/catalan-numbers-pascals-triangle-1.phix b/Task/Catalan-numbers-Pascals-triangle/Phix/catalan-numbers-pascals-triangle-1.phix index 9df9e2a484..636407e5ea 100644 --- a/Task/Catalan-numbers-Pascals-triangle/Phix/catalan-numbers-pascals-triangle-1.phix +++ b/Task/Catalan-numbers-Pascals-triangle/Phix/catalan-numbers-pascals-triangle-1.phix @@ -1,12 +1,16 @@ -constant N = 15 -- accurate to 30, nan/inf for anything over 514 (gmp version is below). -sequence catalan = {}, -- (>=1 only) - p = repeat(1,N+1) -for i=1 to N do - atom p1 = p[1]*2 - catalan = append(catalan,p1-p[2]) - for j=1 to N-i+1 do - p1 += p[j+1] - p[j] = p1 - end for -end for -?catalan +(phixonline)--> + constant N = 15 -- accurate to 30, nan/inf for anything over 514 (gmp version is below). + sequence catalan = {}, -- (>=1 only) + p = repeat(1,N+1) + atom p1 + for i=1 to N do + p1 = p[1]*2 + catalan = append(catalan,p1-p[2]) + for j=1 to N-i+1 do + p1 += p[j+1] + p[j] = p1 + end for + -- ?p[1..N-i+1] + end for + ?catalan + + with javascript_semantics + include builtins\mpfr.e -function catalanB(integer n) -- very very fast! -sequence catalan = mpz_inits(n), - p = mpz_inits(n+1,1) -mpz p1 = mpz_init(1) - if n=0 then return p1 end if - for i=1 to n do - mpz_mul_si(p1,p[1],2) - mpz_sub(catalan[i],p1,p[2]) - for j=1 to n-i+1 do - mpz_add(p1,p1,p[j+1]) - mpz_set(p[j],p1) - end for - end for - return catalan[n] -end function + function catalanB(integer n) -- very very fast! + sequence catalan = mpz_inits(n), + p = mpz_inits(n+1,1) + mpz p1 = mpz_init(1) + if n=0 then return p1 end if + for i=1 to n do + mpz_mul_si(p1,p[1],2) + mpz_sub(catalan[i],p1,p[2]) + for j=1 to n-i+1 do + mpz_add(p1,p1,p[j+1]) + mpz_set(p[j],p1) + end for + end for + return catalan[n] + end function -printf(1,"%d: %s\n",{100,shorten(mpz_get_str(catalanB(100)))}) -printf(1,"%d: %s\n",{250,shorten(mpz_get_str(catalanB(250)))}) + printf(1,"%d: %s\n",{100,shorten(mpz_get_str(catalanB(100)))}) + printf(1,"%d: %s\n",{250,shorten(mpz_get_str(catalanB(250)))}) + + with javascript_semantics + -- returns inf/-nan for n>85, and needs the rounding for n>=14, accurate to n=29 + function catalan1(integer n) + return floor(factorial(2*n)/(factorial(n+1)*factorial(n))+0.5) + end function --- returns inf for n>519, accurate to n=30: -function catalan2(integer n) -- NB: very slow! -atom res = not n - n -= 1 - for i=0 to n do - res += catalan2(i)*catalan2(n-i) - end for - return res -end function + -- returns inf for n>519, accurate to n=30: + function catalan2(integer n) -- NB: very slow! + atom res = not n + n -= 1 + for i=0 to n do + res += catalan2(i)*catalan2(n-i) + end for + return res + end function --- returns inf for n>514, accurate to n=30: -function catalan3(integer n) - if n=0 then return 1 end if - return 2*(2*n-1)/(1+n)*catalan3(n-1) -end function + -- returns inf for n>514, accurate to n=30: + function catalan3(integer n) + if n=0 then return 1 end if + return 2*(2*n-1)/(1+n)*catalan3(n-1) + end function -sequence res = repeat(repeat(0,4),16), - times = repeat(0,3) -for t=1 to 4 do - atom t1 = time() - for i=0 to 15 do - switch t do - case 1: res[i+1][2] = catalan1(i) - case 2: res[i+1][3] = catalan2(i) - case 3: res[i+1][4] = catalan3(i) - case 4: res[i+1][1] = i; printf(1,"%2d: %10d %10d %10d\n",res[i+1]) - end switch - end for - if t=4 then exit end if - times[t] = elapsed(time()-t1) -end for -printf(1,"times:%8s %10s %10s\n",times) + sequence res = repeat(repeat(0,4),16), + times = repeat(0,3) + for t=1 to 4 do + atom t0 = time() + for i=0 to 15 do + switch t do + case 1: res[i+1][2] = catalan1(i) + case 2: res[i+1][3] = catalan2(i) + case 3: res[i+1][4] = catalan3(i) + case 4: res[i+1][1] = i; printf(1,"%2d: %10d %10d %10d\n",res[i+1]) + end switch + end for + if t=4 then exit end if + times[t] = elapsed(time()-t0) + end for + printf(1,"times:%8s %10s %10s\n",times) + + with javascript_semantics + include builtins\mpfr.e -sequence c2cache = {} + sequence c2cache = {} -function catalan2m(integer n) -- very fast! -object r -- result (a [cached/shared] mpz) - -- (nb: modifying result will mess up cache) - if n<=0 then return mpz_init(1) end if - if n<=length(c2cache) then - r = c2cache[n] - if r!=0 then return r end if - else - c2cache &= repeat(0,n-length(c2cache)) - end if - r = mpz_init(0) - mpz t = mpz_init() - for i=0 to n-1 do - mpz_mul(t,catalan2m(i),catalan2m(n-1-i)) - mpz_add(r,r,t) - end for - t = mpz_free(t) - c2cache[n] = r - return r -end function + function catalan2m(integer n) -- very fast! + object r -- result (a [cached/shared] mpz) + -- (nb: modifying result will mess up cache) + if n<=0 then return mpz_init(1) end if + if n<=length(c2cache) then + r = c2cache[n] + if r!=0 then return r end if + else + c2cache &= repeat(0,n-length(c2cache)) + end if + r = mpz_init(0) + mpz t = mpz_init() + for i=0 to n-1 do + mpz_mul(t,catalan2m(i),catalan2m(n-1-i)) + mpz_add(r,r,t) + end for + t = mpz_free(t) + c2cache[n] = r + return r + end function -sequence s = {} -for i=0 to 15 do s = append(s,mpz_get_str(catalan2m(i))) end for -printf(1,"0..15: %s\n",join(s,",")) -printf(1,"100: %s\n",{mpz_get_str(catalan2m(100))}) + sequence s = {} + for i=0 to 15 do s = append(s,mpz_get_str(catalan2m(i))) end for + printf(1,"0..15: %s\n",join(s,",")) + printf(1,"100: %s\n",{mpz_get_str(catalan2m(100))}) + int32) is native($glutlib) {*} - -# OpenGL Bindings -constant $gllib = 'GL'; -sub glClear(int32) is native($gllib) {*} -sub glClearColor(num32, num32, num32, num32) is native($gllib) {*} -sub glClearDepth(num64) is native($gllib) {*} -sub glEnable(int32) is native($gllib) {*} -sub glDisable(int32) is native($gllib) {*} -sub glViewport(int32, int32, int32, int32) is native($gllib) {*} -sub glMatrixMode(int32) is native($gllib) {*} -sub glLoadIdentity() is native($gllib) {*} -sub glBegin(int32) is native($gllib) {*} -sub glEnd() is native($gllib) {*} -sub glVertex3f(num32, num32, num32) is native($gllib) {*} -sub glVertex3fv(CArray[num32]) is native($gllib) {*} -sub glNormal3fv(CArray[num32]) is native($gllib) {*} -sub glColor3f(num32, num32, num32) is native($gllib) {*} -sub glPushAttrib(int32) is native($gllib) {*} -sub glPopAttrib() is native($gllib) {*} -sub glMaterialfv(int32, int32, CArray[num32]) is native($gllib) {*} -sub glLightfv(int32, int32, CArray[num32]) is native($gllib) {*} -sub glPolygonMode(int32, int32) is native($gllib) {*} -sub glFrustum(num64, num64, num64, num64, num64, num64) is native($gllib) {*} -sub glTranslatef(num32, num32, num32) is native($gllib) {*} -sub glRotatef(num32, num32, num32, num32) is native($gllib) {*} -sub glScalef(num32, num32, num32) is native($gllib) {*} - -# Vector Math -class Vec3 { has num32 ($.x, $.y, $.z); - method new(num32 $x = 0e0, num32 $y = 0e0, num32 $z = 0e0) { - self.bless(:$x, :$y, :$z) - } - method copy() { Vec3.new: $!x, $!y, $!z } - method add(Vec3 $v) { Vec3.new: $!x + $v.x, $!y + $v.y, $!z + $v.z } - method sub(Vec3 $v) { Vec3.new: $!x - $v.x, $!y - $v.y, $!z - $v.z } - method mul(num32 $s) { Vec3.new: $!x * $s, $!y * $s, $!z * $s } - method dot(Vec3 $v) { $!x * $v.x + $!y * $v.y + $!z * $v.z } - method len() { sqrt(self.dot(self)).Num } - method normalize() { do given self { .len > 0 ?? .mul(1e0/.len) !! .copy } } - method cross(Vec3 $v) { - Vec3.new: $!y*$v.z - $!z*$v.y, $!z*$v.x - $!x*$v.z, $!x*$v.y - $!y*$v.x - } - method to-array() { CArray[num32].new: $!x, $!y, $!z } -} - -# Mesh Data Structures -class Vertex { - has (@.edges, @.faces) is rw; - has Vec3 ($.pos, $.newpos) is rw; - method new(Vec3 :$pos!) { self.bless(:$pos, newpos => $pos.copy) } -} - -class Face { - has @.verts is rw; - has Int $.fvert is rw; -} - -class Edge { has Int ($.v0, $.v1, $.f0, $.f1, $.evert) is rw } - -class Mesh { has (@.vertices, @.normals, @.faces); - method add-vertex(Vec3 $v) { @!vertices.push($v) } - method add-normal(Vec3 $n) { @!normals.push($n) } - method add-face(@verts) { @!faces.push: Face.new(:verts(@verts),:fvert(-1)) } - - method compute-normals() { - @!normals = Vec3.new xx @!vertices.elems; - for @!faces -> $face { - for ^$face.verts.elems -> \j { - my $v0=@!vertices[$face.verts[j]]; - my $v1=@!vertices[$face.verts[(j+1) % +$face.verts]]; - my $v2=@!vertices[$face.verts[(j+ +$face.verts-1) % +$face.verts]]; - given $v1.sub($v0).cross($v2.sub($v0)) { - @!normals[$face.verts[j]] .= add: $_ - } - } - } - $_ .= normalize for @!normals - } -} - -# Subdivision -class SubdivMesh { has (@.verts, @.faces, @.edges); - method find-edge(Int $v0, Int $v1) { - for @!verts[$v0].edges -> $ei { - my $e = @!edges[$ei]; - return $ei if $e.v0==$v0 && $e.v1==$v1 or $e.v0==$v1 && $e.v1==$v0 - } - return -1; - } - - method update-links() { - for @!verts { ( .faces, .edges ) = | [] xx 2 } - @!edges = []; - for @!faces.kv -> $fi, $face { - for ^$face.verts.elems -> $j { - @!verts[ my $v0 = $face.verts[$j] ].faces.push: $fi; - my $v1 = $face.verts[ ($j+1) % $face.verts.elems ]; - if ( my $ei = self.find-edge($v0, $v1) ) == -1 { - @!edges.push: Edge.new( :v0($v0), :v1($v1), - :f0($fi), :f1(-1), :evert(-1)); - given $ei=+@!edges-1 { @!verts[$_].edges.push($ei) for $v0,$v1 } - } else { - @!edges[$ei].f1 = $fi - } - } - } - } - - method subdivide() { - my ($V, $F, $E) = [ @!verts, @!faces, @!edges].map: *.elems; - for @!faces -> $face { # Create face vertices - my $p = Vec3.new; - for $face.verts -> $vi { $p .= add: @!verts[$vi].pos } - @!verts.push: Vertex.new(pos => $p.mul(1e0 / $face.verts.elems)); - $face.fvert = @!verts.elems - 1 - } - for @!edges -> $edge { # Create edge vertices - my $p = Vec3.new; - $p .= add(@!verts[$edge.v0].pos); - $p .= add(@!verts[$edge.v1].pos); - $p .= add(@!verts[@!faces[$edge.f0].fvert].pos); - $p .= add(@!verts[@!faces[$edge.f1].fvert].pos); - @!verts.push: Vertex.new(pos => $p.mul(0.25e0)); - $edge.evert = @!verts.elems - 1 - } - for ^$V -> $vi { # Update original vertices - my $n = (my $v = @!verts[$vi]).faces.elems; - my ($newp,$p1) = $v.pos.mul(($n-2e0)/$n), Vec3.new; - - for $v.faces -> $fi { $p1 .= add(@!verts[@!faces[$fi].fvert].pos) } - $newp .= add($p1.mul(1e0 / ($n * $n))); - my $p2 = Vec3.new; - for $v.edges -> $ei { - given @!edges[$ei] { $p2 .= add(@!verts[.v0==$vi??.v1!!.v0].pos) } - } - $v.newpos = $newp .= add($p2.mul(1e0 / ($n * $n))) - } - for ^$V -> $vi { @!verts[$vi].pos = @!verts[$vi].newpos.copy } - - @!faces = gather for @!faces -> $face { # Create new faces - for ^$face.verts.elems -> $j { - my $v0 = $face.verts[($j-1+$face.verts.elems) % $face.verts.elems]; - my $v = $face.verts[$j]; - my $v1 = $face.verts[($j + 1) % $face.verts.elems]; - my $e0 = @!edges[self.find-edge($v0, $v)]; - my $e1 = @!edges[self.find-edge($v, $v1)]; - take Face.new(:verts($e0.evert,$v,$e1.evert,$face.fvert),:fvert(-1)) - } - } - self.update-links(); - } - - method to-mesh() { - my $mesh = Mesh.new; - for @!verts -> $v { $mesh.add-vertex($v.pos) } - for @!faces -> $face { $mesh.add-face($face.verts) } - $mesh.compute-normals; - return $mesh - } -} - -sub load-cube() { # Load Cube OBJ - my $mesh = Mesh.new; - for (-1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1).rotor(3) { - $mesh.add-vertex(Vec3.new: | ($_ X* 0.5e0)) # 8 Corner vertices - } - for [0,1,3,2], [2,3,5,4], [4,5,7,6], [6,7,1,0], [1,7,5,3], [6,0,2,4] { - $mesh.add-face: $_ # 6 Faces - } - $mesh.compute-normals; - return $mesh -} - -sub create-subdivision-levels(Mesh $base, Int $levels) { - my @meshes = $base; - my $sd = SubdivMesh.new; - - for $base.vertices -> $v { $sd.verts.push(Vertex.new(pos => $v)) } - for $base.faces -> $face { - $sd.faces.push(Face.new(verts => $face.verts, fvert => -1)) - } - $sd.update-links; - return @meshes.append: ^($levels - 1) .map: { - $sd.subdivide; - $sd.to-mesh - } -} - -sub render-mesh(Mesh $mesh) { - for $mesh.faces -> $face { - glBegin(GL_POLYGON); - for $face.verts -> $vi { - glNormal3fv($mesh.normals[$vi].to-array); - glVertex3fv($mesh.vertices[$vi].to-array); - } - glEnd - } -} - -sub draw-xyz() { # Draw XYZ Axis Lines - glPushAttrib(GL_LIGHTING_BIT +| GL_ENABLE_BIT); - glDisable(GL_LIGHTING); - glBegin(GL_LINES); - for (1e0,0e0,0e0), (0e0,1e0,0e0), (0e0,0e0,1e0) -> @color { # XYZ <-> RGB - glColor3f(|@color); - glVertex3f(0e0, 0e0, 0e0); - glVertex3f(|@color) - } - glEnd; - glPopAttrib -} - -# Global State -my ( $auto-phase, $auto-dir, $auto-level, $cur-level, $y-rot, $x-rot ) = - 0, 1, 0, 0, 0e0, 0e0 ; -my ($wireframe, @meshes) = False; - -sub display() { - glClear(GL_COLOR_BUFFER_BIT +| GL_DEPTH_BUFFER_BIT); - - # Setup projection - glMatrixMode(GL_PROJECTION); - glLoadIdentity; - my ( $fovy, $near, $far, $aspect ) = - 60e0, 0.1e0, 1000e0, WIN-WIDTH.Num / WIN-HEIGHT.Num ; - my $top = $near * tan($fovy * pi / 360e0); - glFrustum(-$top * $aspect, $top * $aspect, -$top, $top, $near, 1000e0); - - # Setup modelview - glMatrixMode(GL_MODELVIEW); - glLoadIdentity; - - # Headlamp Lighting - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glLightfv(GL_LIGHT0, GL_DIFFUSE, CArray[num32].new(1e0, 1e0, 1e0, 1e0)); - glLightfv(GL_LIGHT0, GL_POSITION, CArray[num32].new(0e0, 0e0, 0e0, 1e0)); - - # Transformations - glTranslatef(0e0, 0e0, -5e0); # Move back from camera - glRotatef($x-rot, 1e0, 0e0, 0e0); # Rotate around X - glRotatef($y-rot, 0e0, 1e0, 0e0); # Rotate around Y - - # Scale Object - glScalef(OBJ-SCALE, OBJ-SCALE, OBJ-SCALE); - - # Render mesh - glPushAttrib(GL_LIGHTING_BIT +| GL_POLYGON_BIT); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, CArray[num32].new(1e0, 1e0, 1e0, 1e0)); - - if $wireframe { - glDisable(GL_LIGHTING); - glColor3f(0e0, 1e0, 0e0); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE) - } - render-mesh(@meshes[$cur-level]); - glPopAttrib; - draw-xyz(); - glutSwapBuffers; -} - -sub reshape(int32 $w, int32 $h) { - glViewport(0, 0, $w, $h); - glClearDepth(1e0); - glClearColor(0e0, 0e0, 0e0, 0e0); - glEnable(GL_DEPTH_TEST) -} - -sub keyboard(uint8 $key, int32 $x, int32 $y) { - given $key.chr { when 'q' | 'Q' | "\x1b" { exit(0) } } # q, Q, or Esc -} - -sub auto-step() { - return unless @meshes.Bool; - ($wireframe, $cur-level) = ($auto-phase == 0), $auto-level; - - if $auto-dir > 0 { - $auto-level >= @meshes.elems - 1 ?? ( $auto-dir = -1 ) !! $auto-level++ - } else { - $auto-level <= 0 ?? (($auto-phase,$auto-dir) = ($auto-phase + 1) % 2, 1) - !! $auto-level-- - } -} - -sub idle() { - state ($last-ms, $last-auto-ms) = -1, -1; - my $now = glutGet(GLUT_ELAPSED_TIME); - if $last-ms < 0 { ($last-ms, $last-auto-ms) = $now xx 2 } - - given my $dt = ($now - $last-ms) / 1000e0 { - $last-ms = $now; - $y-rot += 35e0 * $dt; - $x-rot = 15e0 * sin($now * X-ROT-FREQ); - } - if ($now - $last-auto-ms) >= 500 { - auto-step(); - $last-auto-ms = $now; - } - glutPostRedisplay -} - -# Main -glutInit(CArray[uint32].new, CArray[Str].new); -glutInitDisplayMode(0x0000 +| 0x0002 +| 0x0010); -glutInitWindowSize(WIN-WIDTH, WIN-HEIGHT); -glutCreateWindow("Catmull-Clark (Raku)"); -glutReshapeFunc(&reshape); -glutDisplayFunc(&display); -glutKeyboardFunc(&keyboard); -glutIdleFunc(&idle); - -say "Generating meshes..."; -@meshes = create-subdivision-levels(load-cube(), 5); -say "Starting loop.\nPress , or to quit."; - -glutMainLoop; diff --git a/Task/Catmull-Clark-subdivision-surface/Rust/catmull-clark-subdivision-surface.rs b/Task/Catmull-Clark-subdivision-surface/Rust/catmull-clark-subdivision-surface.rust similarity index 100% rename from Task/Catmull-Clark-subdivision-surface/Rust/catmull-clark-subdivision-surface.rs rename to Task/Catmull-Clark-subdivision-surface/Rust/catmull-clark-subdivision-surface.rust diff --git a/Task/Chaocipher/00-TASK.txt b/Task/Chaocipher/00-TASK.txt index d328256b71..8c2723b21f 100644 --- a/Task/Chaocipher/00-TASK.txt +++ b/Task/Chaocipher/00-TASK.txt @@ -1,7 +1,7 @@ ;Description: The [[wp:Chaocipher|Chaocipher]] was invented by J.F.Byrne in 1918 and, although simple by modern cryptographic standards, does not appear to have been broken until the algorithm was finally disclosed by his family in 2010. -The algorithm is described in [http://www.chaocipher.com/ActualChaocipher/Chaocipher-Revealed-Algorithm.pdf this paper] by M.Rubin in 2010 and there is a C# implementation [https://www.c-sharpcorner.com/UploadFile/b942f9/implementing-the-chaocipher-in-C-Sharp/ here]. +The algorithm is described in [http://www.mountainvistasoft.com/chaocipher/ActualChaocipher/Chaocipher-Revealed-Algorithm.pdf this paper] by M.Rubin in 2010 and there is a C# implementation [https://www.c-sharpcorner.com/UploadFile/b942f9/implementing-the-chaocipher-in-C-Sharp/ here]. ;Task: diff --git a/Task/Chaocipher/ALGOL-68/chaocipher.alg b/Task/Chaocipher/ALGOL-68/chaocipher.alg deleted file mode 100644 index ceaedc0ca8..0000000000 --- a/Task/Chaocipher/ALGOL-68/chaocipher.alg +++ /dev/null @@ -1,75 +0,0 @@ -BEGIN # Chaocipher, translated from the Kotlin with permutations as in Ada # - - STRING lalphabet = "HXUCZVAMDSLKPEFJRIGTWOBNYQ"; - STRING ralphabet = "PTLNBQDEOYSFAVZKGJRIHWXUMC"; - - PROC chaocipher = ( STRING text in, BOOL encrypt, show steps )STRING: - BEGIN - STRING left := lalphabet[ AT 1 ]; - STRING right := ralphabet[ AT 1 ]; - STRING text = text in [ AT 1 ]; - OP LENGTH = ( STRING s )INT: UPB s - LWB s + 1; - [ 1 : LENGTH text ]CHAR e text; - [ 1 : LENGTH left ]CHAR temp; - - FOR i TO UPB text DO - IF show steps THEN print( ( left, " ", right, newline ) ) FI; - INT index; - IF encrypt THEN - VOID( char in string( text[ i ], index, right ) ); - e text[ i ] := IF index >= LWB left AND index <= UPB left - THEN left[ index ] - ELSE "?" - FI - ELSE - VOID( char in string( text[ i ], index, left ) ); - e text[ i ] := IF index >= LWB right AND index <= UPB right - THEN right[ index ] - ELSE "?" - FI - FI; - IF index > 1 THEN - CHAR store; - - # the permutations are performed using array slices # - # rather than explicit loops # - - # permute left # - - INT offset = 26 - index; - temp[ 1 : offset + 1 ] := left[ index : index + offset ]; - temp[ offset + 2 : 26 ] := left[ 1 : index - 1 ]; - store := temp[ 2 ]; - - temp[ 2 : 13 ] := temp[ 3 : 14 ]; - temp[ 14 ] := store; - left := temp; - - # permute right # - - temp[ 1 : offset + 1 ] := right[ index : index + offset ]; - temp[ offset + 2 : 26 ] := right[ 1 : index - 1 ]; - store := temp[ 1 ]; - - temp[ 1 : 25 ] := temp[ 2 : 26 ]; - temp[ 26 ] := store; - store := temp[ 3 ]; - - temp[ 3 : 13 ] := temp[ 4 : 14 ]; - temp[ 14 ] := store; - right := temp - FI - OD; - e text - END # chaocipher # ; - - STRING plaintext = "WELLDONEISBETTERTHANWELLSAID"; - print( ( "The original plaintext is : ", plaintext, newline ) ); - print( ( newline, "The left and right alphabets after each permutation" ) ); - print( ( " during encryption are :", newline, newline ) ); - STRING ciphertext = chaocipher( plaintext, TRUE, TRUE ); - print( ( newline, "The ciphertext is : ", ciphertext, newline ) ); - STRING plaintext2 = chaocipher( ciphertext, FALSE, FALSE ); - print( ( newline, "The recovered plaintext is : ", plaintext2 ) ); - print( ( " ", IF plaintext = plaintext2 THEN "" ELSE "NOT " FI, "as expected", newline ) ) -END diff --git a/Task/Chaocipher/Ada/chaocipher.adb b/Task/Chaocipher/Ada/chaocipher.ada similarity index 100% rename from Task/Chaocipher/Ada/chaocipher.adb rename to Task/Chaocipher/Ada/chaocipher.ada diff --git a/Task/Chaocipher/Crystal/chaocipher.cr b/Task/Chaocipher/Crystal/chaocipher.cr deleted file mode 100644 index 452e1edf99..0000000000 --- a/Task/Chaocipher/Crystal/chaocipher.cr +++ /dev/null @@ -1,40 +0,0 @@ -enum Chaoperation - Encode - Decode -end - -class Array - # useful method to work on parts of the array - def slice (start, length) - start = size - start if start < 0 - raise "Out of bounds" unless start >= 0 && length >= 0 && start + length <= size - Slice.new(to_unsafe + start, length) - end -end - -def chaocipher (message : String, left : String, right : String, - op : Chaoperation = Chaoperation::Encode) - ct = left.chars - pt = right.chars - String.build do |s| - message.each_char do |ch| - idx = (op == Chaoperation::Encode ? pt : ct).index! ch - s << (op == Chaoperation::Encode ? ct : pt)[idx] - # permute left - ct.rotate! idx - ct.slice(1, 13).rotate! 1 - # permute right - pt.rotate! idx+1 - pt.slice(2, 12).rotate! 1 - end - end -end - -left = "HXUCZVAMDSLKPEFJRIGTWOBNYQ" -right = "PTLNBQDEOYSFAVZKGJRIHWXUMC" -message = "WELLDONEISBETTERTHANWELLSAID" - -encoded = chaocipher(message, left, right) -decoded = chaocipher(encoded, left, right, Chaoperation::Decode) - -print message, " -> ", encoded, " -> ", decoded, "\n" diff --git a/Task/Chaocipher/Delphi/chaocipher.pas b/Task/Chaocipher/Delphi/chaocipher.delphi similarity index 100% rename from Task/Chaocipher/Delphi/chaocipher.pas rename to Task/Chaocipher/Delphi/chaocipher.delphi diff --git a/Task/Chaocipher/EMal/chaocipher.emal b/Task/Chaocipher/EMal/chaocipher.emal index 968427b1f1..5409bcda5d 100644 --- a/Task/Chaocipher/EMal/chaocipher.emal +++ b/Task/Chaocipher/EMal/chaocipher.emal @@ -3,49 +3,49 @@ enum int ENCRYPT, DECRYPT end type Chaocipher -text L_ALPHABET ← "HXUCZVAMDSLKPEFJRIGTWOBNYQ" -text R_ALPHABET ← "PTLNBQDEOYSFAVZKGJRIHWXUMC" -fun exec ← text by text value, Chaocipher:Mode mode, logic showSteps +text L_ALPHABET = "HXUCZVAMDSLKPEFJRIGTWOBNYQ" +text R_ALPHABET = "PTLNBQDEOYSFAVZKGJRIHWXUMC" +fun exec = text by text value, Chaocipher:Mode mode, logic showSteps ^|since texts are mutable, we can operate directly on them without the need of Lists|^ - text left ← *L_ALPHABET # by using the valueOf operator we are sure that the string is copied - text right ← *R_ALPHABET - text eText ← text(" ", value.length) - text temp ← text(" ", 26) - for int i ← 0; i < value.length; ++i + text left = *L_ALPHABET # by using the valueOf operator we are sure that the string is copied + text right = *R_ALPHABET + text eText = text(" ", value.length) + text temp = text(" ", 26) + for int i = 0; i < value.length; ++i if showSteps do writeLine(left + " " + right) end - int index ← 0 - if mode æ Chaocipher:Mode.ENCRYPT - index ← right.find(value[i]) - eText[i] ← left[index] + int index = 0 + if mode == Chaocipher:Mode.ENCRYPT + index = right.find(value[i]) + eText[i] = left[index] else - index ← left.find(value[i]) - eText[i] ← right[index] + index = left.find(value[i]) + eText[i] = right[index] end - if i æ value.length - 1 do break end + if i == value.length - 1 do break end # permute left - for int j ← index; j < 26; ++j do temp[j - index] ← left[j] end - for int j ← 0; j < index; ++j do temp[26 - index + j] ← left[j] end - var store ← temp[1] - for int j ← 2; j < 14; ++j do temp[j - 1] ← temp[j] end - temp[13] ← store - left ← *temp + for int j = index; j < 26; ++j do temp[j - index] = left[j] end + for int j = 0; j < index; ++j do temp[26 - index + j] = left[j] end + var store = temp[1] + for int j = 2; j < 14; ++j do temp[j - 1] = temp[j] end + temp[13] = store + left = *temp # permute right - for int j ← index; j < 26; ++j do temp[j - index] ← right[j] end - for int j ← 0; j < index; ++j do temp[26 - index + j] ← right[j] end - store ← temp[0] - for int j ← 1; j < 26; ++j do temp[j - 1] ← temp[j] end - temp[25] ← store - store ← temp[2] - for int j ← 3; j < 14; ++j do temp[j - 1] ← temp[j] end - temp[13] ← store - right ← *temp + for int j = index; j < 26; ++j do temp[j - index] = right[j] end + for int j = 0; j < index; ++j do temp[26 - index + j] = right[j] end + store = temp[0] + for int j = 1; j < 26; ++j do temp[j - 1] = temp[j] end + temp[25] = store + store = temp[2] + for int j = 3; j < 14; ++j do temp[j - 1] = temp[j] end + temp[13] = store + right = *temp end return eText end -var plainText ← "WELLDONEISBETTERTHANWELLSAID" -writeLine("The original plaintext is : ", plainText) -writeLine(EOL, "The left and right alphabets after each permutation during encryption are :", EOL) -var cipherText ← exec(plainText, Chaocipher:Mode.ENCRYPT, true) -writeLine(EOL, "The ciphertext is : ", cipherText) -var plainText2 ← exec(cipherText, Chaocipher:Mode.DECRYPT, false) -writeLine(EOL, "The recovered plaintext is : ", plainText2) +var plainText = "WELLDONEISBETTERTHANWELLSAID" +writeLine("The original plaintext is : " + plainText) +writeLine(EOL + "The left and right alphabets after each permutation during encryption are :" + EOL) +var cipherText = exec(plainText, Chaocipher:Mode.ENCRYPT, true) +writeLine(EOL + "The ciphertext is : " + cipherText) +var plainText2 = exec(cipherText, Chaocipher:Mode.DECRYPT, false) +writeLine(EOL + "The recovered plaintext is : " + plainText2) diff --git a/Task/Chaocipher/EasyLang/chaocipher.easy b/Task/Chaocipher/EasyLang/chaocipher.easy index f2eb029db7..f748565f29 100644 --- a/Task/Chaocipher/EasyLang/chaocipher.easy +++ b/Task/Chaocipher/EasyLang/chaocipher.easy @@ -1,8 +1,10 @@ -func index a$[] c$ . +proc index c$ . a$[] ind . for ind = 1 to len a$[] - if a$[ind] = c$ : return ind + if a$[ind] = c$ + return + . . - return 0 + ind = 0 . left$ = "HXUCZVAMDSLKPEFJRIGTWOBNYQ" right$ = "PTLNBQDEOYSFAVZKGJRIHWXUMC" @@ -12,12 +14,15 @@ func$ chao txt$ mode . right$[] = strchars right$ len tmp$[] 26 for c$ in strchars txt$ + # print strjoin left$[] & " " & strjoin right$[] if mode = 1 - ind = index right$[] c$ - if ind = 0 : return "" + index c$ right$[] ind + if ind = 0 + return "" + . r$ &= left$[ind] else - ind = index left$[] c$ + index c$ left$[] ind if ind = 0 print c$ return "" diff --git a/Task/Chaocipher/Forth/chaocipher.fth b/Task/Chaocipher/Forth/chaocipher.fth deleted file mode 100644 index 630e902613..0000000000 --- a/Task/Chaocipher/Forth/chaocipher.fth +++ /dev/null @@ -1,77 +0,0 @@ - \ triple words -: 3drop drop drop drop ; ( n1 n2 n3 ---) -: 3dup >r over over r@ rot rot r> ; ( n1 n2 n3 -- n1 n2 n3 n1 n2 n3) - \ ASCIIZ string words -: zstring create chars allot ; ( a1 -- a1 n1) -: zcount dup begin dup c@ while char+ repeat over - ; -: zplace over chars over + >r swap cmove 0 r> c! ; -: +zplace zcount chars + zplace ; ( a1 n1 a2 --) - \ find character in string -: where? ( c a1 n1 -- n2) - 0 ?do over over i chars + c@ = if drop i negate leave then loop nip negate ; - -64 constant /str \ size of input/output string -27 constant /alpha \ size of alphabet - -/str zstring {i} \ input string -/str zstring {o} \ output string - -/alpha zstring l \ left alphabet -/alpha zstring r \ right alphabet -/alpha zstring t \ temporary alphabet - -: [] chars + ; ( a n -- a+n) -: .tab 9 emit ; ( --) -: .list cr .tab zcount type cr ; ( a --) - -: PermuteLeft ( index --) - 26 over ?do t over negate i + [] l i [] c@ swap c! loop - dup 0 ?do t over negate 26 i + + [] l i [] c@ swap c! loop drop - t char+ c@ >r t 2 [] dup char- 12 cmove r> t 13 [] c! t zcount l zplace -; - -: PermuteRight ( index --) - 26 over ?do t over negate i + [] r i [] c@ swap c! loop - dup 0 ?do t over negate 26 i + + [] r i [] c@ swap c! loop drop - t c@ >r t char+ dup char- 25 cmove r> t 25 [] c! - t 2 [] c@ >r t 3 [] dup char- 11 cmove r> t 13 [] c! t zcount r zplace -; - -: Encrypt ( input output index1 -- index2) - >r swap r@ [] c@ r /alpha where? dup 0< abort" Corrupt right alphabet" - l over [] c@ rot r> [] c! -; - -: Decrypt ( input output index1 -- index2) - >r swap r@ [] c@ l /alpha where? dup 0< abort" Corrupt left alphabet" - r over [] c@ rot r> [] c! -; - -: chao ( i o xt f --) - s" HXUCZVAMDSLKPEFJRIGTWOBNYQ" l zplace - s" PTLNBQDEOYSFAVZKGJRIHWXUMC" r zplace - t /alpha erase >r \ erase temporary string - ( i o xt R: f) - r@ if cr ." The left and right alphabets after each permutation:" cr then - >r over r> swap zcount 1- nip >r ( i o xt R: f len) - - 0 begin ( i o xt 0 R: f len) - r> r@ if l zcount type 2 spaces r zcount type cr then >r - >r 3dup r@ swap execute r> dup r@ < - while ( i o xt 0 R: f len) - >r dup PermuteLeft PermuteRight r> 1+ - repeat rdrop rdrop drop drop 3drop -; - -: main - s" WELLDONEISBETTERTHANWELLSAID" {i} zplace - {o} /str erase \ initialize output string - - ." The original plaintext is :" {i} .list - {i} {o} ['] Encrypt true chao - cr ." The ciphertext is :" {o} .list - {o} {i} ['] Decrypt false chao - cr ." The recovered plaintext is :" {i} .list -; - -main diff --git a/Task/Chaocipher/Fortran/chaocipher.f b/Task/Chaocipher/Fortran/chaocipher.f deleted file mode 100644 index ef2f081da9..0000000000 --- a/Task/Chaocipher/Fortran/chaocipher.f +++ /dev/null @@ -1,190 +0,0 @@ -! -!This program implements the **Chaocipher encryption algorithm** in FORTRAN, extended to handle all printable ASCII characters (32-127). -! The Chaocipher is a polyalphabetic cipher invented by John F. Byrne in 1918, which dynamically permutes two alphabets after -! processing each character, making it highly secure and resistant to cryptanalysis. -! -!#### Key Features: -!1. **Initialization**: -! - Two alphabets (`left` and `right`) are initialized with shuffled ASCII characters (32-127). -! - The `plaintext` is set to "WELLDONEISBETTERTHANWELLSAID". -! -!2. **Enciphering**: -! - For each character in the plaintext: -! - Locate the character in the `right` alphabet. -! - Find the corresponding ciphertext character in the `left` alphabet. -! - Permute both alphabets based on the Chaocipher rules: -! - The `left` alphabet is rotated to bring the ciphertext character to the top, and a specific character is moved to a new position. -! - The `right` alphabet is similarly rotated, with an additional rotation step. -! -!3. **Deciphering**: -! - The ciphertext is decrypted back into plaintext using the reverse process: -! - Locate the ciphertext character in the `left` alphabet. -! - Find the corresponding plaintext character in the `right` alphabet. -! - Permute both alphabets identically as in enciphering. -! -!4. **Verification**: -! - After enciphering and deciphering, the program compares the original plaintext with the decrypted text to ensure correctness. -! -!#### Output: -!The program prints: -!- Initial left and right alphabets. -!- Enciphered ciphertext. -!- Deciphered plaintext. -!- A success message if decryption matches the original plaintext. -! -!#### Example Execution: -!For input plaintext "WELLDONEISBETTERTHANWELLSAID", the program outputs: -!- Ciphertext: `OAHQHCNYNXTSZJRRHJBYHQKSOUJY` -!- Decrypted Text: `WELLDONEISBETTERTHANWELLSAID` -!- Verification: "Decryption successful: plaintext matches decrypted text." -! -!This implementation demonstrates both encryption and decryption processes while adhering to Chaocipher's dynamic permutation rules, -!extended for modern ASCII characters. -! -! -PROGRAM Chaocipher - IMPLICIT NONE - CHARACTER(LEN=96) :: left, right, left_orig, right_orig - CHARACTER(LEN=1000) :: plaintext, ciphertext, decrypted - INTEGER :: i, len, ascii_start - LOGICAL :: trace - - ! Initialize alphabets and input - CALL initialize_alphabets(left, right) - left_orig = left - right_orig = right - plaintext = 'Well, when I was in Egypt, I had a conversation with the Sphinx! She taught me how to sew.' - ciphertext = '' - decrypted = '' - trace = .FALSE. - ascii_start = 32 ! ASCII start at space character - - len = LEN_TRIM(plaintext) - - PRINT *, 'Initial Left: ', left - PRINT *, 'Initial Right:', right - PRINT *, 'Plaintext: ', TRIM(plaintext) - - ! Encipher - DO i = 1, len - CALL encipher(plaintext(i:i), ciphertext(i:i), left, right, ascii_start) - IF (trace) THEN - PRINT *, 'Step ', i - PRINT *, 'Left: ', left - PRINT *, 'Right: ', right - END IF - END DO - - PRINT *, 'Ciphertext: ', TRIM(ciphertext) - - ! Reset alphabets for deciphering - left = left_orig - right = right_orig - - ! Decipher - DO i = 1, len - CALL decipher(ciphertext(i:i), decrypted(i:i), left, right, ascii_start) - END DO - - PRINT *, 'Decrypted: ', TRIM(decrypted) - - ! Check for correctness - IF (plaintext == decrypted) THEN - PRINT *, 'Decryption successful: plaintext matches decrypted text' - ELSE - PRINT *, 'Decryption failed: plaintext does not match decrypted text' - END IF - -CONTAINS - - SUBROUTINE initialize_alphabets(left, right) - CHARACTER(LEN=96), INTENT(OUT) :: left, right - INTEGER :: i, j - CHARACTER :: temp - REAL :: r - - ! Initialize alphabets with ASCII characters 32-127 - DO i = 1, 96 - left(i:i) = CHAR(i + 31) - right(i:i) = CHAR(i + 31) - END DO - - ! Fisher-Yates shuffle for left alphabet - DO i = 96, 2, -1 - CALL RANDOM_NUMBER(r) - j = 1 + FLOOR(i * r) - temp = left(i:i) - left(i:i) = left(j:j) - left(j:j) = temp - END DO - - ! Fisher-Yates shuffle for right alphabet - DO i = 96, 2, -1 - CALL RANDOM_NUMBER(r) - j = 1 + FLOOR(i * r) - temp = right(i:i) - right(i:i) = right(j:j) - right(j:j) = temp - END DO -END SUBROUTINE initialize_alphabets - - SUBROUTINE encipher(p, c, left, right, ascii_start) - CHARACTER(LEN=1), INTENT(IN) :: p - CHARACTER(LEN=1), INTENT(OUT) :: c - CHARACTER(LEN=96), INTENT(INOUT) :: left, right - INTEGER, INTENT(IN) :: ascii_start - INTEGER :: pos - - pos = INDEX(right, p) - c = left(pos:pos) - - CALL permute_left(left, c, ascii_start) - CALL permute_right(right, p, ascii_start) - END SUBROUTINE encipher - - SUBROUTINE decipher(c, p, left, right, ascii_start) - CHARACTER(LEN=1), INTENT(IN) :: c - CHARACTER(LEN=1), INTENT(OUT) :: p - CHARACTER(LEN=96), INTENT(INOUT) :: left, right - INTEGER, INTENT(IN) :: ascii_start - INTEGER :: pos - - pos = INDEX(left, c) - p = right(pos:pos) - - CALL permute_left(left, c, ascii_start) - CALL permute_right(right, p, ascii_start) - END SUBROUTINE decipher - - SUBROUTINE permute_left(alphabet, pivot, ascii_start) - CHARACTER(LEN=96), INTENT(INOUT) :: alphabet - CHARACTER(LEN=1), INTENT(IN) :: pivot - INTEGER, INTENT(IN) :: ascii_start - INTEGER :: pos - CHARACTER(LEN=1) :: temp - - pos = INDEX(alphabet, pivot) - alphabet = alphabet(pos:) // alphabet(:pos-1) - - temp = alphabet(2:2) - alphabet(2:49) = alphabet(3:50) - alphabet(50:50) = temp - END SUBROUTINE permute_left - - SUBROUTINE permute_right(alphabet, pivot, ascii_start) - CHARACTER(LEN=96), INTENT(INOUT) :: alphabet - CHARACTER(LEN=1), INTENT(IN) :: pivot - INTEGER, INTENT(IN) :: ascii_start - INTEGER :: pos - CHARACTER(LEN=1) :: temp - - pos = INDEX(alphabet, pivot) - alphabet = alphabet(pos:) // alphabet(:pos-1) - alphabet = alphabet(2:) // alphabet(1:1) - - temp = alphabet(3:3) - alphabet(3:49) = alphabet(4:50) - alphabet(50:50) = temp - END SUBROUTINE permute_right - -END PROGRAM Chaocipher diff --git a/Task/Chaocipher/Jq/chaocipher.jq b/Task/Chaocipher/Jq/chaocipher.jq deleted file mode 100644 index 8035df93a1..0000000000 --- a/Task/Chaocipher/Jq/chaocipher.jq +++ /dev/null @@ -1,58 +0,0 @@ -# If using jaq, then see remark above regarding `inform/1` -# Convenience function for emitting progress messages: -def inform(msg): - (msg | tostring | stderr | empty), .; - -# $encrypt should be one of true (for encryption) or false (for decryption) -def Chao($encrypt; $showSteps): - . as $text - | length as $len - | if any(explode[]; . > 128) - then "Text contains non-ASCII characters." | error - else {left: "HXUCZVAMDSLKPEFJRIGTWOBNYQ", - right: "PTLNBQDEOYSFAVZKGJRIHWXUMC", - eText: "", - temp: [range(0;26) | ""] - } - | reduce range(0; $len) as $i (.; - if $showSteps then inform("\(.left) \(.right)\n") end - - | if $encrypt - then .index = (.left|index($text[$i:$i+1])) - | .eText += .right[.index:.index+1] - else .index = (.right|index($text[$i:$i+1])) - | .eText += .left[.index:.index+1] - end - - | if $i == $len - 1 then . - else # permute left - reduce range(.index; 26) as $j (.; .temp[$j-.index] = .left[$j:$j+1]) - | reduce range(0; .index) as $j (.; .temp[26-.index+$j] = .left[$j:$j+1]) - | .store = .temp[1] - | reduce range(2; 14) as $j (.; .temp[$j-1] = .temp[$j]) - | .temp[13] = .store - | .left = (.temp | join("")) - - # permute right - | reduce range(.index; 26) as $j (.; .temp[$j-.index] = .right[$j:$j+1]) - | reduce range(0; .index) as $j (.; .temp[26-.index+$j] = .right[$j:$j+1]) - | .store = .temp[0] - | reduce range(1; 26) as $j (.; .temp[$j-1] = .temp[$j]) - | .temp[25] = .store - | .store = .temp[2] - | reduce range(3; 14) as $j (.; .temp[$j-1] = .temp[$j]) - | .temp[13] = .store - | .right = (.temp | join("")) - end ) - | .eText - end ; - -# Input: plaintext -def task: - "The original plaintext is : \(.)", - "The left and right alphabets after each permutation during encryption are:", - (Chao(true; true) - | "The ciphertext is : \(.)", - "The recovered plaintext is : \(Chao(false; false))" ); - -"WELLDONEISBETTERTHANWELLSAID" | task diff --git a/Task/Chaocipher/Julia/chaocipher.jl b/Task/Chaocipher/Julia/chaocipher.julia similarity index 100% rename from Task/Chaocipher/Julia/chaocipher.jl rename to Task/Chaocipher/Julia/chaocipher.julia diff --git a/Task/Chaocipher/Kotlin/chaocipher.kts b/Task/Chaocipher/Kotlin/chaocipher.kotlin similarity index 100% rename from Task/Chaocipher/Kotlin/chaocipher.kts rename to Task/Chaocipher/Kotlin/chaocipher.kotlin diff --git a/Task/Chaocipher/Pluto/chaocipher.pluto b/Task/Chaocipher/Pluto/chaocipher.pluto deleted file mode 100644 index 92add48042..0000000000 --- a/Task/Chaocipher/Pluto/chaocipher.pluto +++ /dev/null @@ -1,55 +0,0 @@ -require "table2" - -enum chao begin - encrypt, - decrypt -end - -local function exec(text, mode, show_steps) - local len = #text - local left = "HXUCZVAMDSLKPEFJRIGTWOBNYQ" - local right = "PTLNBQDEOYSFAVZKGJRIHWXUMC" - local etext = table.rep(len, 0) - local temp = table.rep(26, "") - for i = 1, len do - if show_steps then print($"{left} {right}") end - local index - if mode == chao.encrypt then - index = right:find(text[i], 1, true) - etext[i] = left[index] - else - index = left:find(text[i], 1, true) - etext[i] = right[index] - end - if i == len then break end - - -- Permute left. - for j = index, 26 do temp[j - index + 1] = left[j] end - for j = 1, index - 1 do temp[27 - index + j] = left[j] end - local store = temp[2] - for j = 3, 14 do temp[j - 1] = temp[j] end - temp[14] = store - left = temp:concat("") - - -- Permute right. - for j = index, 26 do temp[j - index + 1] = right[j] end - for j = 1, index - 1 do temp[27 - index + j] = right[j] end - store = temp[1] - for j = 2, 26 do temp[j - 1] = temp[j] end - temp[26] = store - store = temp[3] - for j = 4, 14 do temp[j - 1] = temp[j] end - temp[14] = store - right = temp:concat("") - end - return etext:concat("") -end - -local plain_text = "WELLDONEISBETTERTHANWELLSAID" -print($"The original plaintext is : {plain_text}") -io.write("\nThe left and right alphabets after each permutation ") -print("during encryption are :\n") -local cipher_text = exec(plain_text, chao.encrypt, true) -print($"\nThe ciphertext is : {cipher_text}") -local plain_text2 = exec(cipher_text, chao.decrypt, false) -print($"\nThe recovered plaintext is : {plain_text2}") diff --git a/Task/Chaocipher/Rust/chaocipher.rs b/Task/Chaocipher/Rust/chaocipher.rust similarity index 100% rename from Task/Chaocipher/Rust/chaocipher.rs rename to Task/Chaocipher/Rust/chaocipher.rust diff --git a/Task/Chaocipher/Swift/chaocipher.swift b/Task/Chaocipher/Swift/chaocipher.swift deleted file mode 100644 index ae0cc62b27..0000000000 --- a/Task/Chaocipher/Swift/chaocipher.swift +++ /dev/null @@ -1,84 +0,0 @@ -enum Mode { - case encrypt - case decrypt -} - -class Chaocipher { - private static let L_ALPHABET = "HXUCZVAMDSLKPEFJRIGTWOBNYQ" - private static let R_ALPHABET = "PTLNBQDEOYSFAVZKGJRIHWXUMC" - - private static func indexOf(array: [Character], char: Character) -> Int { - for i in 0.. String { - var left = Array(L_ALPHABET) - var right = Array(R_ALPHABET) - var eText = [Character](repeating: " ", count: text.count) - var temp = [Character](repeating: " ", count: 26) - - let textChars = Array(text) - - for i in 0.. String { - return exec(text: text, mode: .encrypt, showSteps: showSteps) - } - - static func decrypt(text: String, showSteps: Bool = false) -> String { - return exec(text: text, mode: .decrypt, showSteps: showSteps) - } -} - -// Main program -let plainText = "WELLDONEISBETTERTHANWELLSAID" -print("The original plaintext is : \(plainText)") -print("\nThe left and right alphabets after each permutation during encryption are:") -let cipherText = Chaocipher.encrypt(text: plainText, showSteps: true) -print("\nThe cipher text is : \(cipherText)") -let plainText2 = Chaocipher.decrypt(text: cipherText) -print("\nThe recovered plaintext is : \(plainText2)") diff --git a/Task/Chaocipher/Tcl/chaocipher.tcl b/Task/Chaocipher/Tcl/chaocipher.tcl deleted file mode 100644 index a0fc593619..0000000000 --- a/Task/Chaocipher/Tcl/chaocipher.tcl +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env tclsh - -# Tcl implementation of Chaocipher -# (John F. Byrne, 1918) -# -# from paper "CHAOCIPHER REVEALED: THE ALGORITHM" -# (Moshe Rubin, 2010) -# http://www.mountainvistasoft.com/chaocipher/ActualChaocipher/Chaocipher-Revealed-Algorithm.pdf -# - -# ============ globals "wheels" ============ -variable l_key {HXUCZVAMDSLKPEFJRIGTWOBNYQ} -variable r_key {PTLNBQDEOYSFAVZKGJRIHWXUMC} - - - -# ============ procedures ================== - - -# swap range of n letters from end to front -proc permute {alpha n } { - - set A [string range $alpha 0 $n-1 ] - set B [string range $alpha $n end ] - - return "${B}${A}" -} - - -# rotate based on key in right alphabet -# (permute each by same amnount) -proc rotate { left right key } { - - set idx [string first $key $right] - - set L [permute $left $idx ] - - set R [permute $right $idx] - - return [list $L $R] -} - - -# split and rearrange each alphabet -# according to recipe -proc cycle { left right } { - - # (0)(2-13)(1)(14-25) - set l1 [string index $left 0 ] - set l2 [string range $left 2 13 ] - set l3 [string index $left 1 ] - set l4 [string range $left 14 end] - - set L [join [list $l1 $l2 $l3 $l4] ""] - - # (1-2)(4-14)(3)(15-25)(0) - set r1 [string range $right 1 2 ] - set r2 [string range $right 4 14 ] - set r3 [string index $right 3 ] - set r4 [string range $right 15 end] - set r5 [string index $right 0 ] - - set R [join [list $r1 $r2 $r3 $r4 $r5] ""] - - return [list $L $R] -} - - -# rotate wheels and generate cipher text or -# recover plain text -proc chao { input left right mode verbose } { - - set out {} - - set wheels {} - - set len [string length $input] - - if { $verbose } { - puts stdout "input\t$input\tLENGTH $len" - - set s [format "%-${len}s\t|\t%-${len}s" $left $right] - - puts stdout "keys:\t$s" - - puts stdout "\ncycled keys:" - } - - # string -> list - set input_list [split $input ""] - - set count 0 - # iterate each letter - foreach letter $input_list { - - incr count - - if {$mode eq "encrypt" } { - # encrypt - - # rotate and permute - set wheels [rotate $left $right $letter] - lassign $wheels left right - - # ciphered letter to output (left[0]) - lappend out [string index $left 0] - - } else { - - # decrypt - - # rotate and permute - set wheels [rotate $right $left $letter] - lassign $wheels right left - - # deciphered letter to output (right[0]) - lappend out [string index $right 0] - } - - # cycle the alphabets - set cycled [cycle $left $right] - lassign $cycled left right - - if {$verbose} { puts stderr "${count}\t${left}\t|\t${right}" } - - - } ; # foreach letter - - # list -> string - set out [join $out ""] - - return $out -} - - -# ============= main ================= -if { [info script] eq $::argv0 } { - - # --------- init ------------------ - set left $l_key - set right $r_key - set plain_text "WELLDONEISBETTERTHANWELLSAID" - - # ---------- encipher ------------- - - set cipher_text [chao $plain_text $left $right encrypt 1] - - # ---------- decipher ------------- - - set decrypted_text [chao $cipher_text $left $right decrypt 0] - # ----------- output -------------- - - puts stdout "\nplain text: \t ${plain_text}" - puts stdout "\ncipher text: \t ${cipher_text}" - puts stdout "\ndecrypted: \t ${decrypted_text}" - - return 0 -} - -# end diff --git a/Task/Chaos-game/Ada/chaos-game.adb b/Task/Chaos-game/Ada/chaos-game.adb deleted file mode 100644 index fe213c85fc..0000000000 --- a/Task/Chaos-game/Ada/chaos-game.adb +++ /dev/null @@ -1,45 +0,0 @@ -pragma Ada_2022; -with Ada.Numerics; use Ada.Numerics; -with Ada.Numerics.Discrete_Random; -with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions; -with Easy_Graphics; use Easy_Graphics; - -procedure Chaos_Game is - Img : Easy_Image := New_Image ((1, 1), (512, 512), WHITE); - - procedure Chaos (Image : in out Easy_Image; - Vertex_Count : Positive; - Radius : Float; - Iters : Positive) is - type Vertex_Array is array (1 .. Vertex_Count) of Point; - Vertices : Vertex_Array; - subtype Vertex_Range is Integer range 1 .. Vertex_Count; - package Rand_V is new Ada.Numerics.Discrete_Random (Vertex_Range); - use Rand_V; - Gen : Generator; - Half_X : constant Integer := X_Last (Image) / 2; - Half_Y : constant Integer := Y_Last (Image) / 2; - Half_Pi : constant Float := Float (Pi) / 2.0; - Two_Pi : constant Float := Float (Pi) * 2.0; - V : Integer; - X : Integer := Half_X; - Y : Integer := Half_Y; - begin - for V in 1 .. Vertex_Count loop - Vertices (V).X := Half_X + Integer (Float (Half_X) * - Cos (Half_Pi + (Float (V - 1)) * Two_Pi / Float (Vertex_Count))); - Vertices (V).Y := Half_Y - Integer (Float (Half_Y) * - Sin (Half_Pi + (Float (V - 1)) * Two_Pi / Float (Vertex_Count))); - end loop; - for I in 1 .. Iters loop - V := Random (Gen); - X := X + Integer (Radius * Float (Vertices (V).X - X)); - Y := Y + Integer (Radius * Float (Vertices (V).Y - Y)); - Plot (Image, (X, Y), BLACK); - end loop; - end Chaos; - -begin - Chaos (Img, 3, 0.5, 250_000); - Write_GIF (Img, "chaos_game.gif"); -end Chaos_Game; diff --git a/Task/Chaos-game/AmigaBASIC/chaos-game.basic b/Task/Chaos-game/AmigaBASIC/chaos-game.basic deleted file mode 100644 index 637e89a1da..0000000000 --- a/Task/Chaos-game/AmigaBASIC/chaos-game.basic +++ /dev/null @@ -1,28 +0,0 @@ -DEFINT a-z -w=600:h=180:w2=300 -x=w*RND:y=h*RND - -FOR i=1 TO 32000 - v=2*RND+1 - ON v GOTO One, Two, Three - -One: - x=x/2 - y=y/2 - GOTO Draw - -Two: - x=w2+(w2-x)/2 - y=h-(h-y)/2 - GOTO Draw - -Three: - x=w-(w-x)/2 - y=y/2 - -Draw: - PSET (x,y),v -NEXT - -loop: - GOTO loop diff --git a/Task/Chaos-game/Atari-BASIC/chaos-game.basic b/Task/Chaos-game/Atari-BASIC/chaos-game.basic deleted file mode 100644 index b612f7a348..0000000000 --- a/Task/Chaos-game/Atari-BASIC/chaos-game.basic +++ /dev/null @@ -1,18 +0,0 @@ -10 GRAPHICS 7+16 -20 W=159:H=95:W2=79 -30 X=INT(W*RND(0)) -40 Y=INT(H*RND(0)) -50 FOR I=1 TO 5000 -60 V=INT(3*RND(0))+1 -70 GOTO 100*V -100 X=X/2:Y=Y/2 -110 GOTO 500 -200 X=W2+(W2-X)/2 -210 Y=H-(H-Y)/2 -220 GOTO 500 -300 X=W-(W-X)/2 -310 Y=Y/2 -500 COLOR V -510 PLOT X,Y -520 NEXT I -530 GOTO 530 diff --git a/Task/Chaos-game/Delphi/chaos-game.pas b/Task/Chaos-game/Delphi/chaos-game.delphi similarity index 100% rename from Task/Chaos-game/Delphi/chaos-game.pas rename to Task/Chaos-game/Delphi/chaos-game.delphi diff --git a/Task/Chaos-game/EasyLang/chaos-game.easy b/Task/Chaos-game/EasyLang/chaos-game.easy index ae10673f1b..1981fc43a7 100644 --- a/Task/Chaos-game/EasyLang/chaos-game.easy +++ b/Task/Chaos-game/EasyLang/chaos-game.easy @@ -1,11 +1,12 @@ -gcolor 900 +color 900 x[] = [ 0 100 50 ] -y[] = [ 14 14 100 ] +y[] = [ 7 7 93 ] x = randomf * 100 y = randomf * 100 for i = 1 to 100000 - grect x y 0.3 0.3 - h = random 1 3 + move x y + rect 0.3 0.3 + h = randint 3 x = (x + x[h]) / 2 y = (y + y[h]) / 2 . diff --git a/Task/Chaos-game/Emacs-Lisp/chaos-game.el b/Task/Chaos-game/Emacs-Lisp/chaos-game.l similarity index 100% rename from Task/Chaos-game/Emacs-Lisp/chaos-game.el rename to Task/Chaos-game/Emacs-Lisp/chaos-game.l diff --git a/Task/Chaos-game/J/chaos-game.j b/Task/Chaos-game/J/chaos-game.j index bad0f35b60..bdf828c34e 100644 --- a/Task/Chaos-game/J/chaos-game.j +++ b/Task/Chaos-game/J/chaos-game.j @@ -1,6 +1,33 @@ +Note 'plan, Working in complex plane' + Make an equilateral triangle. + Make a list of N targets + Starting with a random point near the triangle, + iteratively generate new points. + plot the new points. + + j has a particularly rich notation for numbers. + + 1ad_90 specifies a complex number with radius 1 + at an angle of negative 90 degrees. + + 2p1 is 2 times (pi raised to the first power). +) + +N=: 3000 + require'plot' -NB. equilateral triangle with vertices on unit circle. rotated for fun. -Triangle=: *1ad_90 1ad150 1ad30*j./2 1 o.(2p1%6)*?0 -Targets=: (?3000#3) { Triangle -Start=: j./2 1 o.2p1*?0 NB. start on unit circle -'marker' plot ((+/%#)@(,{.) , ])/Targets,Start +TAU=: 2p1 NB. tauday.com +mean=: +/ % # + +NB. equilateral triangle with vertices on unit circle +NB. rotated for fun. +TRIANGLE=: *(j./2 1 o.(TAU%6)*?0)*1ad_90 1ad150 1ad30 + +TARGETS=: (N ?@:# 3) { TRIANGLE + +NB. start on unit circle +START=: j./2 1 o.TAU*?0 + +NEW_POINTS=: (mean@:(, {.) , ])/ TARGETS , START + +'marker'plot NEW_POINTS diff --git a/Task/Chaos-game/Julia/chaos-game.jl b/Task/Chaos-game/Julia/chaos-game.julia similarity index 100% rename from Task/Chaos-game/Julia/chaos-game.jl rename to Task/Chaos-game/Julia/chaos-game.julia diff --git a/Task/Chaos-game/Kotlin/chaos-game.kts b/Task/Chaos-game/Kotlin/chaos-game.kotlin similarity index 100% rename from Task/Chaos-game/Kotlin/chaos-game.kts rename to Task/Chaos-game/Kotlin/chaos-game.kotlin diff --git a/Task/Chaos-game/Rust/chaos-game.rs b/Task/Chaos-game/Rust/chaos-game.rust similarity index 100% rename from Task/Chaos-game/Rust/chaos-game.rs rename to Task/Chaos-game/Rust/chaos-game.rust diff --git a/Task/Chaos-game/Uxntal/chaos-game.uxnatl b/Task/Chaos-game/Uxntal/chaos-game.uxnatl deleted file mode 100644 index 13873818ad..0000000000 --- a/Task/Chaos-game/Uxntal/chaos-game.uxnatl +++ /dev/null @@ -1,82 +0,0 @@ -|00 @System/vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 -|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 -|c0 @DateTime &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 - -|00 - @State &x $2 &y $2 - -|0100 -@on-reset ( -> ) - .DateTime/minute DEI2 SWP #20 SFT2 lcg/ - - #0f0f DUP2k - .System/r DEO2 - .System/g DEO2 - .System/b DEO2 - - ( 256 x 222 fits all three reference points ) - #0100 .Screen/width DEO2 - #00de .Screen/height DEO2 - - start-point - .State/x STZ2 - .State/y STZ2 - - ;on-frame .Screen/vector DEO2 - BRK - -@on-frame ( -> ) - [ LIT2 00 -State/x ] LDZ .Screen/x DEO2 - [ LIT2 00 -State/y ] LDZ .Screen/y DEO2 - [ LIT2 01 -Screen/pixel ] DEO - - next-point - .State/x STZ2 - .State/y STZ2 - BRK - -@start-point ( -- y* x* ) - ( pick a random point in a square ) - lcg/next lcg/next - ( mirror point if needed to move point to top left triangle ) - ADD2k OVR2 GTH2 ?{ - #0000 SWP2 SUB2 SWP2 - #0000 SWP2 SUB2 - } - ( skew points so triangle has a point in the bottom middle ) - SWP2 OVR2 #01 SFT2 ADD2 - ( mirror points vertically to make the triangle point up ) - STH2 #0000 SWP2 SUB2 - ( fixed point multiply y by cos 30deg to make it equilateral ) - ( hi * hi ) OVR #00 SWP #00dd MUL2 STH2 - ( hi * lo ) SWP #00 SWP #00b4 MUL2 STH2 - ( lo * hi ) #00 SWP #00dd MUL2 - ( add low bytes ) STH2r ADD2 #08 SFT2 - ( add to high product ) STH2r ADD2 - STH2r - - JMP2r - -@next-point ( -- y* x* ) - ( midpoint of previous State and a random corner ) - random-corner - #01 SFT2 .State/x LDZ2 #01 SFT2 ADD2 - STH2 - #01 SFT2 .State/y LDZ2 #01 SFT2 ADD2 - STH2r JMP2r - -@random-corner ( -- y* x* ) - ( randomly pick one of the three corners ) - lcg/next - #0003 DIV2k INC2 MUL2 SUB2 NIP - INC DUP ?{ POP #0000 #8000 JMP2r } - INC DUP ?{ POP #ddb4 #0000 JMP2r } - POP #ddb4 #ffff JMP2r - -@lcg/ ( seed* -- ) - ,&State STR2 JMP2r - -@lcg/next ( -- x* ) - [ LIT2 &State $2 ] - #0815 MUL2 #1419 ADD2 DUP2 ,&State STR2 - JMP2r diff --git a/Task/Character-codes/Ada/character-codes.adb b/Task/Character-codes/Ada/character-codes.ada similarity index 100% rename from Task/Character-codes/Ada/character-codes.adb rename to Task/Character-codes/Ada/character-codes.ada diff --git a/Task/Character-codes/Agena/character-codes.agena b/Task/Character-codes/Agena/character-codes.agena deleted file mode 100644 index a1410f30ad..0000000000 --- a/Task/Character-codes/Agena/character-codes.agena +++ /dev/null @@ -1,2 +0,0 @@ -print( abs "a" ); # prints the character code of a (97 in ASCII) -print( char( 97 ) ); # prints the character corresponding to code 97 ("a" in ASCII) diff --git a/Task/Character-codes/ArkScript/character-codes.ark b/Task/Character-codes/ArkScript/character-codes.ark deleted file mode 100644 index d96abc35c4..0000000000 --- a/Task/Character-codes/ArkScript/character-codes.ark +++ /dev/null @@ -1,4 +0,0 @@ -(import std.String) - -(print (string:ord "a")) -(print (string:chr 97)) diff --git a/Task/Character-codes/Arturo/character-codes.arturo b/Task/Character-codes/Arturo/character-codes.arturo index f9ac1ae91b..e98e2586e9 100644 --- a/Task/Character-codes/Arturo/character-codes.arturo +++ b/Task/Character-codes/Arturo/character-codes.arturo @@ -1,3 +1,3 @@ print to :integer first "a" -print to :integer 'a' +print to :integer `a` print to :char 97 diff --git a/Task/Character-codes/Ballerina/character-codes.ballerina b/Task/Character-codes/Ballerina/character-codes.ballerina deleted file mode 100644 index c16ce85fc2..0000000000 --- a/Task/Character-codes/Ballerina/character-codes.ballerina +++ /dev/null @@ -1,15 +0,0 @@ -import ballerina/io; - -public function main() returns error? { - int[] cps = []; - foreach string c in ["a", "π", "字", "🐘"] { - int cp = c[0].toCodePointInt(); - cps.push(cp); - io:println(`${c} = ${cp}`); - } - io:println(); - foreach int i in cps { - var c = check string:fromCodePointInt(i); - io:println(`${i} = ${c}`); - } -} diff --git a/Task/Character-codes/COBOL/character-codes.cob b/Task/Character-codes/COBOL/character-codes.cobol similarity index 100% rename from Task/Character-codes/COBOL/character-codes.cob rename to Task/Character-codes/COBOL/character-codes.cobol diff --git a/Task/Character-codes/Crystal/character-codes.cr b/Task/Character-codes/Crystal/character-codes.cr deleted file mode 100644 index 5fb1cfa9e7..0000000000 --- a/Task/Character-codes/Crystal/character-codes.cr +++ /dev/null @@ -1,2 +0,0 @@ -'Ω'.ord # => 937 -937.chr # => 'Ω' diff --git a/Task/Character-codes/Dart/character-codes.dart b/Task/Character-codes/Dart/character-codes.dart deleted file mode 100644 index b1b602f4bd..0000000000 --- a/Task/Character-codes/Dart/character-codes.dart +++ /dev/null @@ -1,6 +0,0 @@ -void main() { - const string = 'D'; - print(string.runes.first); - var out = String.fromCharCode(67); - print(out); -} diff --git a/Task/Character-codes/Delphi/character-codes.pas b/Task/Character-codes/Delphi/character-codes.delphi similarity index 100% rename from Task/Character-codes/Delphi/character-codes.pas rename to Task/Character-codes/Delphi/character-codes.delphi diff --git a/Task/Character-codes/EMal/character-codes.emal b/Task/Character-codes/EMal/character-codes.emal index f7b1fe0929..d5b9bb52d9 100644 --- a/Task/Character-codes/EMal/character-codes.emal +++ b/Task/Character-codes/EMal/character-codes.emal @@ -4,11 +4,14 @@ writeLine(chr(97)) # prints "a" writeLine(ord("π")) # prints "960" writeLine(chr(960)) # prints "π" writeLine() -var cps ← int[] +var cps = int[] for each var c in text["a", "π", "字", "🐘"] - var cp ← ord(c) + var cp = ord(c) cps.append(cp) - writeLine(c, " = ", cp) + writeLine(c + " = " + cp) end writeLine() -cps.list(",ASC("a") - PRINT "97 ->",CHR$(97) - GET -ENDP diff --git a/Task/Character-codes/Odin/character-codes.odin b/Task/Character-codes/Odin/character-codes.odin deleted file mode 100644 index 0acc50a345..0000000000 --- a/Task/Character-codes/Odin/character-codes.odin +++ /dev/null @@ -1,11 +0,0 @@ -package main - -import "core:fmt" - -main :: proc() { - // No difference between chracters and ints - a:int=97 - fmt.println(rune(a)) - number:int='a' - fmt.println(number) -} diff --git a/Task/Character-codes/PL-I-80/character-codes.pli b/Task/Character-codes/PL-I-80/character-codes.pli deleted file mode 100644 index e41644b762..0000000000 --- a/Task/Character-codes/PL-I-80/character-codes.pli +++ /dev/null @@ -1,8 +0,0 @@ -char_codes: procedure options (main); - dcl ch char(1); - dcl n fixed bin; - ch = 'a'; - n = 97; - put skip edit (ch,' = ',rank(ch)) (a, a, f(2)); - put skip edit (n,' = ',ascii(n)) (f(2), a, a); -end char_codes; diff --git a/Task/Character-codes/PascalABC.NET/character-codes.pas b/Task/Character-codes/PascalABC.NET/character-codes.pas deleted file mode 100644 index deacfdd34e..0000000000 --- a/Task/Character-codes/PascalABC.NET/character-codes.pas +++ /dev/null @@ -1,6 +0,0 @@ -begin - var c := 'a'; - var i := c.Code; - Println(i); - Println(Chr(i)) -end. diff --git a/Task/Character-codes/PowerShell/character-codes-1.ps1 b/Task/Character-codes/PowerShell/character-codes-1.psh similarity index 100% rename from Task/Character-codes/PowerShell/character-codes-1.ps1 rename to Task/Character-codes/PowerShell/character-codes-1.psh diff --git a/Task/Character-codes/PowerShell/character-codes-2.ps1 b/Task/Character-codes/PowerShell/character-codes-2.psh similarity index 100% rename from Task/Character-codes/PowerShell/character-codes-2.ps1 rename to Task/Character-codes/PowerShell/character-codes-2.psh diff --git a/Task/Character-codes/PowerShell/character-codes-3.ps1 b/Task/Character-codes/PowerShell/character-codes-3.psh similarity index 100% rename from Task/Character-codes/PowerShell/character-codes-3.ps1 rename to Task/Character-codes/PowerShell/character-codes-3.psh diff --git a/Task/Character-codes/PowerShell/character-codes-4.ps1 b/Task/Character-codes/PowerShell/character-codes-4.psh similarity index 100% rename from Task/Character-codes/PowerShell/character-codes-4.ps1 rename to Task/Character-codes/PowerShell/character-codes-4.psh diff --git a/Task/Character-codes/PowerShell/character-codes-5.ps1 b/Task/Character-codes/PowerShell/character-codes-5.psh similarity index 100% rename from Task/Character-codes/PowerShell/character-codes-5.ps1 rename to Task/Character-codes/PowerShell/character-codes-5.psh diff --git a/Task/Character-codes/Rebol/character-codes.rebol b/Task/Character-codes/Rebol/character-codes.rebol deleted file mode 100644 index 8566b5bd09..0000000000 --- a/Task/Character-codes/Rebol/character-codes.rebol +++ /dev/null @@ -1,7 +0,0 @@ -print to integer! first "a" ;; == 97 -print to integer! #"a" ;; == 97 -print to binary! "a" ;; == #{61} -print to char! 97 ;; == a -print to char! 0#61 ;; == a ;; available only in Rebol3 -print #"^(61)" ;; == a -print to-hex #"a" ;; == 61 ;; since Rebol 3.20.0 diff --git a/Task/Character-codes/Retro/character-codes.retro b/Task/Character-codes/Retro/character-codes.retro index 783d9773d1..2272064c6f 100644 --- a/Task/Character-codes/Retro/character-codes.retro +++ b/Task/Character-codes/Retro/character-codes.retro @@ -1,2 +1 @@ -$a n:put nl -#97 c:put nl +'c putc diff --git a/Task/Character-codes/Rust/character-codes.rs b/Task/Character-codes/Rust/character-codes.rust similarity index 100% rename from Task/Character-codes/Rust/character-codes.rs rename to Task/Character-codes/Rust/character-codes.rust diff --git a/Task/Character-codes/S-BASIC/character-codes.basic b/Task/Character-codes/S-BASIC/character-codes.basic deleted file mode 100644 index c3a772f23b..0000000000 --- a/Task/Character-codes/S-BASIC/character-codes.basic +++ /dev/null @@ -1,14 +0,0 @@ -var ch = char -var n = integer - -ch = 'a' -n = ch -print ch; " = "; n -print ch; " = "; asc(ch) - -n = 97 -ch = n -print n; " = "; ch -print n; " = "; chr$(n) - -end diff --git a/Task/Character-codes/Scheme/character-codes.scm b/Task/Character-codes/Scheme/character-codes.ss similarity index 100% rename from Task/Character-codes/Scheme/character-codes.scm rename to Task/Character-codes/Scheme/character-codes.ss diff --git a/Task/Character-codes/TAV/character-codes.tav b/Task/Character-codes/TAV/character-codes.tav deleted file mode 100644 index 727bf15da6..0000000000 --- a/Task/Character-codes/TAV/character-codes.tav +++ /dev/null @@ -1,2 +0,0 @@ - print string 'a' code point at 1 \ print 'a'.Codepoint - print integer 97 code point as string \ print 97.Character diff --git a/Task/Character-codes/Tcl/character-codes.tcl b/Task/Character-codes/Tcl/character-codes.tcl new file mode 100644 index 0000000000..949c5ff094 --- /dev/null +++ b/Task/Character-codes/Tcl/character-codes.tcl @@ -0,0 +1,6 @@ +# ASCII +puts [scan "a" %c] ;# ==> 97 +puts [format %c 97] ;# ==> a +# Unicode is the same +puts [scan "π" %c] ;# ==> 960 +puts [format %c 960] ;# ==> π diff --git a/Task/Character-codes/Uiua/character-codes.uiua b/Task/Character-codes/Uiua/character-codes.uiua deleted file mode 100644 index 75f72c71f7..0000000000 --- a/Task/Character-codes/Uiua/character-codes.uiua +++ /dev/null @@ -1,2 +0,0 @@ --@\0@a -+@\097 diff --git a/Task/Character-codes/Uxntal/character-codes.uxnatl b/Task/Character-codes/Uxntal/character-codes.uxnatl index f2fd52e587..0429ace25f 100644 --- a/Task/Character-codes/Uxntal/character-codes.uxnatl +++ b/Task/Character-codes/Uxntal/character-codes.uxnatl @@ -1,19 +1,26 @@ -%\n { 0a } -%newline { [ LIT2 \n -Console/write ] DEO } +( uxnasm char-codes.tal char-codes.rom && uxncli char-codes.rom ) -|18 @Console/write +|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 +|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 -|100 - -[ LIT "a ] print/byte newline -#61 .Console/write DEO newline +|0100 + [ LIT "a ] print-hex + newline + #61 .Console/write DEO + newline + ( exit ) + #80 .System/state DEO BRK -@print/byte ( byte -- ) - DUP #04 SFT /nibble - ( >> ) - -@print/nibble ( byte -- ) - #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD .Console/write DEO - JMP2r +@print-hex + DUP #04 SFT print-digit #0f AND print-digit +JMP2r + +@print-digit + DUP #09 GTH #27 MUL ADD #30 ADD .Console/write DEO +JMP2r + +@newline + #0a .Console/write DEO +JMP2r diff --git a/Task/Character-codes/VBScript/character-codes.vbs b/Task/Character-codes/VBScript/character-codes.vb similarity index 100% rename from Task/Character-codes/VBScript/character-codes.vbs rename to Task/Character-codes/VBScript/character-codes.vb diff --git a/Task/Chat-server/Ada/chat-server.adb b/Task/Chat-server/Ada/chat-server.ada similarity index 100% rename from Task/Chat-server/Ada/chat-server.adb rename to Task/Chat-server/Ada/chat-server.ada diff --git a/Task/Chat-server/FreeBASIC/chat-server.basic b/Task/Chat-server/FreeBASIC/chat-server.basic deleted file mode 100644 index 4070f9e3cd..0000000000 --- a/Task/Chat-server/FreeBASIC/chat-server.basic +++ /dev/null @@ -1,122 +0,0 @@ -#include once "windows.bi" -#include once "win/winsock2.bi" - -Type SOCKET As Ulongint -Type ThreadCallback As Sub(Byval As Any Ptr) - -Const MAX_CLIENTS = 10 -Const CRLF = Chr(13) & Chr(10) -Const BUFFER_SIZE = 256 - -Dim Shared clients(MAX_CLIENTS) As SOCKET -Dim Shared nicknames(MAX_CLIENTS) As String -Dim Shared clientCount As Integer = 0 - -' Initialize Winsock -Dim As WSADATA wsaData -If WSAStartup(&h0202, @wsaData) Then - Print "Error initializing Winsock" - End 1 -End If - -' Create server socket -Dim As SOCKET serverSocket = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0) -If serverSocket = INVALID_SOCKET Then - Print "Error creating socket" - WSACleanup() - End 1 -End If - -' Configure server address -Dim As sockaddr_in serverAddr -With serverAddr - .sin_family = AF_INET - .sin_addr.s_addr = INADDR_ANY - .sin_port = htons(8080) -End With - -' Bind socket -If bind(serverSocket, Cast(sockaddr Ptr, @serverAddr), Sizeof(sockaddr_in)) = SOCKET_ERROR Then - Print "Error binding socket" - closesocket(serverSocket) - WSACleanup() - End 1 -End If - -' Listen for incoming connections -If listen(serverSocket, SOMAXCONN) = SOCKET_ERROR Then - Print "Error listening on socket" - closesocket(serverSocket) - WSACleanup() - End 1 -End If - -Print "Chat server is running on port 8080" - -Sub broadcastMessage(message As String) - Dim As String fullMsg = message - For i As Integer = 0 To clientCount - 1 - If clients(i) <> 0 Then - send(clients(i), Strptr(fullMsg), Len(fullMsg), 0) - End If - Next i -End Sub - -Sub handleClient(Byval param As Any Ptr) - Dim As Integer clientIndex = Cast(Integer, param) - Dim As SOCKET clientSocket = clients(clientIndex) - Dim As String nickname - Dim As ZString * BUFFER_SIZE buffer - Dim As Long bytesReceived - - ' Get nickname - Dim As String welcomeMsg = "Enter your nickname: " - send(clientSocket, Strptr(welcomeMsg), Len(welcomeMsg), 0) - bytesReceived = recv(clientSocket, @buffer, BUFFER_SIZE-1, 0) - If bytesReceived > 0 Then - nickname = Left(buffer, bytesReceived - 2) - nicknames(clientIndex) = nickname - - ' Announce new user - broadcastMessage(nickname & " has joined the chat." & CRLF) - - ' Message loop - Do - bytesReceived = recv(clientSocket, @buffer, BUFFER_SIZE-1, 0) - If bytesReceived <= 0 Then Exit Do - buffer[bytesReceived] = 0 - broadcastMessage(nickname & ": " & *Cast(ZString Ptr, @buffer) & CRLF) - Loop - - ' Announce departure - broadcastMessage(nickname & " has left the chat." & CRLF) - End If - - ' Cleanup - closesocket(clientSocket) - clients(clientIndex) = 0 - nicknames(clientIndex) = "" -End Sub - -' Main server loop -Do - Dim As sockaddr_in clientAddr - Dim As Long clientAddrLen = Sizeof(sockaddr_in) - - Dim As SOCKET clientSocket = accept(serverSocket, Cast(sockaddr Ptr, @clientAddr), @clientAddrLen) - If clientSocket <> INVALID_SOCKET Then - If clientCount < MAX_CLIENTS Then - clients(clientCount) = clientSocket - clientCount += 1 - Threadcreate(Cast(ThreadCallback, @handleClient), Cast(Any Ptr, clientCount - 1)) - Else - Dim As String fullMsg = "Server is full." & CRLF - send(clientSocket, Strptr(fullMsg), Len(fullMsg), 0) - closesocket(clientSocket) - End If - End If -Loop - -' Final cleaning -closesocket(serverSocket) -WSACleanup() diff --git a/Task/Chat-server/Julia/chat-server.jl b/Task/Chat-server/Julia/chat-server.julia similarity index 100% rename from Task/Chat-server/Julia/chat-server.jl rename to Task/Chat-server/Julia/chat-server.julia diff --git a/Task/Chat-server/Kotlin/chat-server.kts b/Task/Chat-server/Kotlin/chat-server.kotlin similarity index 100% rename from Task/Chat-server/Kotlin/chat-server.kts rename to Task/Chat-server/Kotlin/chat-server.kotlin diff --git a/Task/Chat-server/Rust/chat-server.rs b/Task/Chat-server/Rust/chat-server.rust similarity index 100% rename from Task/Chat-server/Rust/chat-server.rs rename to Task/Chat-server/Rust/chat-server.rust diff --git a/Task/Check-Machin-like-formulas/00-TASK.txt b/Task/Check-Machin-like-formulas/00-TASK.txt index c28978d512..d6db6e1191 100644 --- a/Task/Check-Machin-like-formulas/00-TASK.txt +++ b/Task/Check-Machin-like-formulas/00-TASK.txt @@ -35,7 +35,7 @@ These identities are useful in calculating the values:
    You can store the equations in any convenient data structure, but for extra credit parse them from human-readable [[Check_Machin-like_formulas/text_equations|text input]]. -Note: to formally prove the formula correct, it would have to be shown that ''{-3 \pi \over 4} < right hand side < {5 \pi \over 4}'' due to ''\tan()'' periodicity. +Note: to formally prove the formula correct, it would have to be shown that ''{-3 pi \over 4} < right hand side < {5 pi \over 4}'' due to ''\tan()'' periodicity.

    diff --git a/Task/Check-Machin-like-formulas/Julia/check-machin-like-formulas.jl b/Task/Check-Machin-like-formulas/Julia/check-machin-like-formulas.julia similarity index 100% rename from Task/Check-Machin-like-formulas/Julia/check-machin-like-formulas.jl rename to Task/Check-Machin-like-formulas/Julia/check-machin-like-formulas.julia diff --git a/Task/Check-Machin-like-formulas/Kotlin/check-machin-like-formulas.kts b/Task/Check-Machin-like-formulas/Kotlin/check-machin-like-formulas.kotlin similarity index 100% rename from Task/Check-Machin-like-formulas/Kotlin/check-machin-like-formulas.kts rename to Task/Check-Machin-like-formulas/Kotlin/check-machin-like-formulas.kotlin diff --git a/Task/Check-Machin-like-formulas/OCaml/check-machin-like-formulas.ml b/Task/Check-Machin-like-formulas/OCaml/check-machin-like-formulas.ocaml similarity index 100% rename from Task/Check-Machin-like-formulas/OCaml/check-machin-like-formulas.ml rename to Task/Check-Machin-like-formulas/OCaml/check-machin-like-formulas.ocaml diff --git a/Task/Check-input-device-is-a-terminal/Ada/check-input-device-is-a-terminal.adb b/Task/Check-input-device-is-a-terminal/Ada/check-input-device-is-a-terminal.ada similarity index 100% rename from Task/Check-input-device-is-a-terminal/Ada/check-input-device-is-a-terminal.adb rename to Task/Check-input-device-is-a-terminal/Ada/check-input-device-is-a-terminal.ada diff --git a/Task/Check-input-device-is-a-terminal/Batch-File/check-input-device-is-a-terminal.bat b/Task/Check-input-device-is-a-terminal/Batch-File/check-input-device-is-a-terminal.bat deleted file mode 100644 index 8fcd2d94e2..0000000000 --- a/Task/Check-input-device-is-a-terminal/Batch-File/check-input-device-is-a-terminal.bat +++ /dev/null @@ -1 +0,0 @@ -(timeout /t 0 >nul 2>nul && echo Stdin is a terminal || echo Stdin is not a terminal) b.out will write to b.out, and this contains unit 5 is a terminal but unit 6 ism't -! ./checktty < a.out >b.out will write to b.out, and both units 5 and 6 are not terminals. -! -! Check units 1...10 if they are connected to a terminal. -do unit=1,10 - if (isatty (unit)) then - write (*, '("Unit ", i2, " is a Terminal")') unit - else - write (*, '("Unit ", i2, " is NOT a Terminal")') unit - endif -enddo - -end program checkTTY diff --git a/Task/Check-input-device-is-a-terminal/Janet/check-input-device-is-a-terminal.janet b/Task/Check-input-device-is-a-terminal/Janet/check-input-device-is-a-terminal.janet deleted file mode 100644 index f0fb90c650..0000000000 --- a/Task/Check-input-device-is-a-terminal/Janet/check-input-device-is-a-terminal.janet +++ /dev/null @@ -1,3 +0,0 @@ -(if (os/isatty stdin) - (print "The input device is a terminal.") - (print "The input device is not a terminal.")) diff --git a/Task/Check-input-device-is-a-terminal/Julia/check-input-device-is-a-terminal.jl b/Task/Check-input-device-is-a-terminal/Julia/check-input-device-is-a-terminal.julia similarity index 100% rename from Task/Check-input-device-is-a-terminal/Julia/check-input-device-is-a-terminal.jl rename to Task/Check-input-device-is-a-terminal/Julia/check-input-device-is-a-terminal.julia diff --git a/Task/Check-input-device-is-a-terminal/Kotlin/check-input-device-is-a-terminal.kts b/Task/Check-input-device-is-a-terminal/Kotlin/check-input-device-is-a-terminal.kotlin similarity index 100% rename from Task/Check-input-device-is-a-terminal/Kotlin/check-input-device-is-a-terminal.kts rename to Task/Check-input-device-is-a-terminal/Kotlin/check-input-device-is-a-terminal.kotlin diff --git a/Task/Check-input-device-is-a-terminal/Lua/check-input-device-is-a-terminal.lua b/Task/Check-input-device-is-a-terminal/Lua/check-input-device-is-a-terminal.lua deleted file mode 100644 index 53aa2d1991..0000000000 --- a/Task/Check-input-device-is-a-terminal/Lua/check-input-device-is-a-terminal.lua +++ /dev/null @@ -1,6 +0,0 @@ -local posix = require"posix" -print( - posix.unistd.isatty(posix.stdio.fileno(io.stdin)) - and "stdin is a terminal" - or "stdin is not a terminal" -) diff --git a/Task/Check-input-device-is-a-terminal/Nu/check-input-device-is-a-terminal.nu b/Task/Check-input-device-is-a-terminal/Nu/check-input-device-is-a-terminal.nu deleted file mode 100644 index 0a1e81828c..0000000000 --- a/Task/Check-input-device-is-a-terminal/Nu/check-input-device-is-a-terminal.nu +++ /dev/null @@ -1 +0,0 @@ -$'stdin is a terminal: (is-terminal -i)' diff --git a/Task/Check-input-device-is-a-terminal/OCaml/check-input-device-is-a-terminal.ml b/Task/Check-input-device-is-a-terminal/OCaml/check-input-device-is-a-terminal.ocaml similarity index 100% rename from Task/Check-input-device-is-a-terminal/OCaml/check-input-device-is-a-terminal.ml rename to Task/Check-input-device-is-a-terminal/OCaml/check-input-device-is-a-terminal.ocaml diff --git a/Task/Check-input-device-is-a-terminal/PascalABC.NET/check-input-device-is-a-terminal.pas b/Task/Check-input-device-is-a-terminal/PascalABC.NET/check-input-device-is-a-terminal.pas deleted file mode 100644 index 0c5e7e3fdb..0000000000 --- a/Task/Check-input-device-is-a-terminal/PascalABC.NET/check-input-device-is-a-terminal.pas +++ /dev/null @@ -1,3 +0,0 @@ -## -uses system; -system.Console.IsInputRedirected.println; diff --git a/Task/Check-input-device-is-a-terminal/Phix/check-input-device-is-a-terminal.phix b/Task/Check-input-device-is-a-terminal/Phix/check-input-device-is-a-terminal.phix index 8f2a7843e3..a8e739efdc 100644 --- a/Task/Check-input-device-is-a-terminal/Phix/check-input-device-is-a-terminal.phix +++ b/Task/Check-input-device-is-a-terminal/Phix/check-input-device-is-a-terminal.phix @@ -1,2 +1,4 @@ -without js -- (no input redirection in a browser!) -printf(1,"stdin:%t, stdout:%t, stderr:%t\n",{isatty(0),isatty(1),isatty(2)}) +(notonline)--> + without js -- (no input redirection in a browser!) + printf(1,"stdin:%t, stdout:%t, stderr:%t\n",{isatty(0),isatty(1),isatty(2)}) + + without js -- (no input or output redirection in a browser!) + printf(1,"stdin:%t, stdout:%t, stderr:%t\n",{isatty(0),isatty(1),isatty(2)}) + + without js -- (file i/o) + procedure check(string name) + bool bExists = file_exists(name), + bDir = get_file_type(name)=FILETYPE_DIRECTORY + string exists = iff(bExists?"exists":"does not exist"), + dfs = iff(bExists?iff(bDir?"directory ":"file "):"") + printf(1,"%s%s %s.\n",{dfs,name,exists}) + end procedure -check("input.txt") -check("docs") -check("/input.txt") -check("/docs") -check("/pagefile.sys") -check("/Program Files (x86)") + check("input.txt") + check("docs") + check("/input.txt") + check("/docs") + check("/pagefile.sys") + check("/Program Files (x86)") + + with javascript_semantics + function chernick_carmichael_factors(integer n, m) + sequence res = {6*m + 1, 12*m + 1} + for i=1 to n-2 do + res &= power(2,i) * 9*m + 1 + end for + return res + end function + + include mpfr.e + mpz p = mpz_init() + + function m_prime(atom a) + mpz_set_d(p,a) + return mpz_prime(p) + end function + + function is_chernick_carmichael(integer n, m) + return iff(n==2 ? m_prime(6*m + 1) and m_prime(12*m + 1) + : m_prime(power(2,n-2) * 9*m + 1) and + is_chernick_carmichael(n-1, m)) + end function + + function chernick_carmichael_number(integer n) + integer m = iff(n>4 ? power(2,n-4) : 1), mm = m + while not is_chernick_carmichael(n, mm) do mm += m end while + return {chernick_carmichael_factors(n, mm),mm} + end function + + for n=3 to 9 do + {sequence f, integer m} = chernick_carmichael_number(n) + mpz_set_si(p,1) + for i=1 to length(f) do + mpz_mul_d(p,p,f[i]) + f[i] = sprintf("%d",f[i]) + end for + printf(1,"U(%d,%d): %s = %s\n",{n,m,mpz_get_str(p),join(f," * ")}) + end for + + with javascript_semantics + include mpfr.e + sequence ppp = {3,5,7,11,13,17,19,23} + function primality_pretest(atom k) + for i=1 to length(ppp) do + if remainder(k,ppp[i])=0 then return (k<=23) end if + end for + return true + end function + + function probprime(atom k, mpz n) + mpz_set_d(n, k) + return mpz_prime(n) + end function + + function is_chernick(integer n, atom m, mpz z) + atom t = 9 * m; + if primality_pretest(6 * m + 1) == false then return false end if + if primality_pretest(12 * m + 1) == false then return false end if + for i=1 to n-3 do + if primality_pretest(t*power(2,i) + 1) == false then return false end if + end for + if probprime(6 * m + 1, z) == false then return false end if + if probprime(12 * m + 1, z) == false then return false end if + for i=1 to n-2 do + if probprime(t*power(2,i) + 1, z) == false then return false end if + end for + return true + end function + + procedure main() + atom t0 = time() + mpz z = mpz_init(0) + + for n=3 to 10 do + atom multiplier = iff(n>4 ? power(2,n-4) : 1), k = 1 + if n>5 then multiplier *= 5 end if + + while true do + if n=10 then k += 12564168 end if -- cheat! + atom m = k * multiplier; + if is_chernick(n, m, z) then + printf(1,"a(%d) has m = %d\n", {n, m}) + exit + end if + k += 1 + end while + end for + ?elapsed(time()-t0) + end procedure + main() + + -- demo\rosetta\Cheryls_Birthday.exw + with javascript_semantics + sequence choices = {{5, 15}, {5, 16}, {5, 19}, {6, 17}, {6, 18}, + {7, 14}, {7, 16}, {8, 14}, {8, 15}, {8, 17}} -sequence mwud = repeat(false,12) -- months with unique days + sequence mwud = repeat(false,12) -- months with unique days -for step=1 to 4 do - sequence {months,days} = columnize(choices) - bool impossible = false - for i=length(choices) to 1 by -1 do - integer {m,d} = choices[i] - switch step do - case 1: mwud[m] += (sum(sq_eq(days,d))=1) - case 2: impossible = mwud[m] - case 3: impossible = (sum(sq_eq(days,d))!=1) - case 4: impossible = (sum(sq_eq(months,m))!=1) - end switch - if impossible then - choices[i..i] = {} - end if - end for -end for -?choices + for step=1 to 4 do + sequence {months,days} = columnize(choices) + bool impossible = false + for i=length(choices) to 1 by -1 do + integer {m,d} = choices[i] + switch step do + case 1: mwud[m] += (sum(sq_eq(days,d))=1) + case 2: impossible = mwud[m] + case 3: impossible = (sum(sq_eq(days,d))!=1) + case 4: impossible = (sum(sq_eq(months,m))!=1) + end switch + if impossible then + choices[i..i] = {} + end if + end for + end for + ?choices + + with javascript_semantics + enum MONTH, DAY -function unique_month(sequence si, months) - return sum(sq_eq(months,si[MONTH]))=1 -end function + function unique_month(sequence si, months) + return sum(sq_eq(months,si[MONTH]))=1 + end function -function unique_day(sequence si, days) - return sum(sq_eq(days,si[DAY]))=1 -end function + function unique_day(sequence si, days) + return sum(sq_eq(days,si[DAY]))=1 + end function -function month_without_unique_day(sequence si, months_with_unique_day) - return not find(si[MONTH],months_with_unique_day) -end function + function month_without_unique_day(sequence si, months_with_unique_day) + return not find(si[MONTH],months_with_unique_day) + end function -sequence choices = {{5, 15}, {5, 16}, {5, 19}, {6, 17}, {6, 18}, - {7, 14}, {7, 16}, {8, 14}, {8, 15}, {8, 17}} + sequence choices = {{5, 15}, {5, 16}, {5, 19}, {6, 17}, {6, 18}, + {7, 14}, {7, 16}, {8, 14}, {8, 15}, {8, 17}} --- Albert knows the month but does not know the day. --- So the month cannot be unique within the choices. --- However this step would change nothing, hence omit it. --- (obvs. non_unique_month() would be as above, but !=1) ---choices = filter(choices,non_unique_month,vslice(choices,MONTH)) + -- Albert knows the month but does not know the day. + -- So the month cannot be unique within the choices. + -- However this step would change nothing, hence omit it. + -- (obvs. non_unique_month() would be as above, but !=1) + --choices = filter(choices,non_unique_month,vslice(choices,MONTH)) --- Albert also knows that Bernard doesn't know the answer. --- So the month cannot have a unique day. -sequence unique_days = filter(choices,unique_day,vslice(choices,DAY)) -sequence months_with_unique_day = unique(vslice(unique_days,MONTH)) + -- Albert also knows that Bernard doesn't know the answer. + -- So the month cannot have a unique day. + sequence unique_days = filter(choices,unique_day,vslice(choices,DAY)) + sequence months_with_unique_day = unique(vslice(unique_days,MONTH)) -choices = filter(choices,month_without_unique_day,months_with_unique_day) + choices = filter(choices,month_without_unique_day,months_with_unique_day) --- Bernard now knows the answer. --- So the day must be unique within the remaining choices. -choices = filter(choices,unique_day,vslice(choices,DAY)) + -- Bernard now knows the answer. + -- So the day must be unique within the remaining choices. + choices = filter(choices,unique_day,vslice(choices,DAY)) --- Albert now knows the answer too. --- So the month must be unique within the remaining choices. -choices = filter(choices,unique_month,vslice(choices,MONTH)) + -- Albert now knows the answer too. + -- So the month must be unique within the remaining choices. + choices = filter(choices,unique_month,vslice(choices,MONTH)) -if length(choices)!=1 then crash("Something went wrong!") end if + if length(choices)!=1 then crash("Something went wrong!") end if -include builtins\timedate.e -timedate td = repeat(0,6) -{td[DT_MONTH],td[DT_DAY]} = choices[1] -printf(1,"Cheryl's birthday is %s\n", {format_timedate(td,"Mmmm ddth")}) + include builtins\timedate.e + timedate td = repeat(0,6) + {td[DT_MONTH],td[DT_DAY]} = choices[1] + printf(1,"Cheryl's birthday is %s\n", {format_timedate(td,"Mmmm ddth")}) + + with javascript_semantics + constant animals = {"Rat","Ox","Tiger","Rabbit","Dragon","Snake","Horse","Goat","Monkey","Rooster","Dog","Pig"}, + elements = {"Wood","Fire","Earth","Metal","Water"}, + yinyang = {"yang","yin"}, + years = {1935,1938,1968,1972,1976,2018} -for i=1 to length(years) do - integer year = years[i], - cycle = mod(year-4,60) - string element = elements[floor(mod(cycle,10)/2)+1], - animal = animals[mod(cycle,12)+1], - yy = yinyang[mod(cycle,2)+1] - printf(1,"%d: %s %s; %s, year %d of the cycle.\n", - {year,element,animal,yy,cycle+1}) -end for + for i=1 to length(years) do + integer year = years[i], + cycle = mod(year-4,60) + string element = elements[floor(mod(cycle,10)/2)+1], + animal = animals[mod(cycle,12)+1], + yy = yinyang[mod(cycle,2)+1] + printf(1,"%d: %s %s; %s, year %d of the cycle.\n", + {year,element,animal,yy,cycle+1}) + end for + list of strings +fcn ceToChineseZodiac(ce_year){ // --> list of strings # encoding: utf-8 var [const] pinyin=SD( // create some static variables, SD is small fixed dictionary "甲","jiă", "乙","yĭ", "丙","bĭng", "丁","dīng", "戊","wù", "己","jĭ", @@ -11,7 +11,7 @@ fcn ceToChineseZodiac(ce_year){ // --> list of strings celestial =T("甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"), terrestrial=T("子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"), animals =T("Rat", "Ox", "Tiger", "Rabbit", "Dragon", "Snake", - "Horse", "Goat", "Monkey", "Rooster", "Dog", "Pig"), + "Horse", "Goat", "Monkey", "Rooster", "Dog", "Pig"), elements =T("Wood", "Fire", "Earth", "Metal", "Water"), aspects =T("yang","yin"), ; @@ -28,5 +28,5 @@ fcn ceToChineseZodiac(ce_year){ // --> list of strings branch_han,branch_pinyin := terrestrial[branch_number], pinyin[branch_han]; return(stem_han,branch_han, - stem_pinyin,branch_pinyin, element,animal,aspect) + stem_pinyin,branch_pinyin, element,animal,aspect) } diff --git a/Task/Cholesky-decomposition/Ada/cholesky-decomposition-1.adb b/Task/Cholesky-decomposition/Ada/cholesky-decomposition-1.ada similarity index 100% rename from Task/Cholesky-decomposition/Ada/cholesky-decomposition-1.adb rename to Task/Cholesky-decomposition/Ada/cholesky-decomposition-1.ada diff --git a/Task/Cholesky-decomposition/Ada/cholesky-decomposition-2.adb b/Task/Cholesky-decomposition/Ada/cholesky-decomposition-2.ada similarity index 100% rename from Task/Cholesky-decomposition/Ada/cholesky-decomposition-2.adb rename to Task/Cholesky-decomposition/Ada/cholesky-decomposition-2.ada diff --git a/Task/Cholesky-decomposition/Ada/cholesky-decomposition-3.adb b/Task/Cholesky-decomposition/Ada/cholesky-decomposition-3.ada similarity index 100% rename from Task/Cholesky-decomposition/Ada/cholesky-decomposition-3.adb rename to Task/Cholesky-decomposition/Ada/cholesky-decomposition-3.ada diff --git a/Task/Cholesky-decomposition/EasyLang/cholesky-decomposition.easy b/Task/Cholesky-decomposition/EasyLang/cholesky-decomposition.easy deleted file mode 100644 index f06a3216a5..0000000000 --- a/Task/Cholesky-decomposition/EasyLang/cholesky-decomposition.easy +++ /dev/null @@ -1,19 +0,0 @@ -func[][] cholesky a[][] . - n = len a[][] - len r[][] n - for i to n - len r[i][] n - for j to i - s = 0 - for k to j : s += r[i][k] * r[j][k] - if i = j - r[i][j] = sqrt (a[i][i] - s) - else - r[i][j] = 1 / r[j][j] * (a[i][j] - s) - . - . - . - return r[][] -. -print cholesky [ [ 25 15 -5 ] [ 15 18 0 ] [ -5 0 11 ] ] -print cholesky [ [ 18 22 54 42 ] [ 22 70 86 62 ] [ 54 86 174 134 ] [ 42 62 134 106 ] ] diff --git a/Task/Cholesky-decomposition/Excel/cholesky-decomposition.excel b/Task/Cholesky-decomposition/Excel/cholesky-decomposition.excel deleted file mode 100644 index 1586be05f1..0000000000 --- a/Task/Cholesky-decomposition/Excel/cholesky-decomposition.excel +++ /dev/null @@ -1,38 +0,0 @@ -=LAMBDA(A, - LET( - r, ROWS(A), - sqa, SQRT(INDEX(A,1,1)), - IF( - r=1, - sqa, - REDUCE( - VSTACK(sqa, DROP(TAKE(A,,1),1)/sqa), - SEQUENCE(r-1,,2), - LAMBDA(s, t, - LET( - diag, SQRT(INDEX(A,t,t) - SUMSQ(INDEX(s,t))), - HSTACK( - s, - VSTACK( - EXPAND(0,t-1,1,0), - IF( - t=r, - diag, - REDUCE( - diag, - SEQUENCE(r-t,1,t+1), - LAMBDA(x,y, - VSTACK( - x, - (INDEX(A,y,t) - SUM(INDEX(s,t)*INDEX(s,y))) / diag - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) -) diff --git a/Task/Cholesky-decomposition/Julia/cholesky-decomposition.jl b/Task/Cholesky-decomposition/Julia/cholesky-decomposition.julia similarity index 100% rename from Task/Cholesky-decomposition/Julia/cholesky-decomposition.jl rename to Task/Cholesky-decomposition/Julia/cholesky-decomposition.julia diff --git a/Task/Cholesky-decomposition/Kotlin/cholesky-decomposition.kts b/Task/Cholesky-decomposition/Kotlin/cholesky-decomposition.kotlin similarity index 100% rename from Task/Cholesky-decomposition/Kotlin/cholesky-decomposition.kts rename to Task/Cholesky-decomposition/Kotlin/cholesky-decomposition.kotlin diff --git a/Task/Cholesky-decomposition/OCaml/cholesky-decomposition.ml b/Task/Cholesky-decomposition/OCaml/cholesky-decomposition.ocaml similarity index 100% rename from Task/Cholesky-decomposition/OCaml/cholesky-decomposition.ml rename to Task/Cholesky-decomposition/OCaml/cholesky-decomposition.ocaml diff --git a/Task/Cholesky-decomposition/PascalABC.NET/cholesky-decomposition.pas b/Task/Cholesky-decomposition/PascalABC.NET/cholesky-decomposition.pas deleted file mode 100644 index 94dfe940b1..0000000000 --- a/Task/Cholesky-decomposition/PascalABC.NET/cholesky-decomposition.pas +++ /dev/null @@ -1,51 +0,0 @@ -function Cholesky(a: array of real): array of real; -begin - var n := Round(Sqrt(a.Length)); - Result := new real[n * n]; - for var i := 0 to n - 1 do - begin - for var j := 0 to i do - begin - var s := 0.0; - for var k := 0 to j - 1 do - s += Result[i * n + k] * Result[j * n + k]; - if i = j then - Result[i * n + j] := Sqrt(a[i * n + i] - s) - else Result[i * n + j] := 1 / Result[j * n + j] * (a[i * n + j] - s); - end; - end; -end; - -procedure ShowMatrix(a: array of real); -begin - var n := Round(Sqrt(a.Length)); - for var i := 0 to n - 1 do - begin - for var j := 0 to n - 1 do - write(a[i * n + j]:10:5); - PrintLn(''); - end; -end; - -begin - var m1 := new real[9]; - m1 := |25.0, 15.0, -5.0, - 15.0, 18.0, 0.0, - -5.0, 0.0, 11.0 |; - var c1 := Cholesky(m1); - ShowMatrix(m1); - println('=>'); - ShowMatrix(c1); - - PrintLn(''); - - var m2: array of real := - |18.0, 22.0, 54.0, 42.0, - 22.0, 70.0, 86.0, 62.0, - 54.0, 86.0, 174.0, 134.0, - 42.0, 62.0, 134.0, 106.0 |; - var c2 := Cholesky(m2); - Showmatrix(m2); - println('=>'); - ShowMatrix(c2); -end. diff --git a/Task/Cholesky-decomposition/Pluto/cholesky-decomposition.pluto b/Task/Cholesky-decomposition/Pluto/cholesky-decomposition.pluto deleted file mode 100644 index 5a31f92f26..0000000000 --- a/Task/Cholesky-decomposition/Pluto/cholesky-decomposition.pluto +++ /dev/null @@ -1,21 +0,0 @@ -require "matrix" - -local arrays = { - { {25, 15, -5}, - {15, 18, 0}, - {-5, 0, 11} }, - - { {18, 22, 54, 42}, - {22, 70, 86, 62}, - {54, 86, 174, 134}, - {42, 62, 134, 106} } -} - -for arrays as array do - local m = matrix.from(array) - print("Original:") - print(m) - print("\nLower Cholesky factor:") - print(m:cholesky():format("%8.5f")) - print() -end diff --git a/Task/Cholesky-decomposition/PowerShell/cholesky-decomposition.ps1 b/Task/Cholesky-decomposition/PowerShell/cholesky-decomposition.psh similarity index 100% rename from Task/Cholesky-decomposition/PowerShell/cholesky-decomposition.ps1 rename to Task/Cholesky-decomposition/PowerShell/cholesky-decomposition.psh diff --git a/Task/Cholesky-decomposition/Rust/cholesky-decomposition.rs b/Task/Cholesky-decomposition/Rust/cholesky-decomposition.rust similarity index 100% rename from Task/Cholesky-decomposition/Rust/cholesky-decomposition.rs rename to Task/Cholesky-decomposition/Rust/cholesky-decomposition.rust diff --git a/Task/Cholesky-decomposition/Scheme/cholesky-decomposition.scm b/Task/Cholesky-decomposition/Scheme/cholesky-decomposition.scm deleted file mode 100644 index fbe516a678..0000000000 --- a/Task/Cholesky-decomposition/Scheme/cholesky-decomposition.scm +++ /dev/null @@ -1,55 +0,0 @@ -(import srfi/231) - -(define (Cholesky A) - ;; Assumes the domain of A is [0,n)\\times [0,n) - (let ((n (interval-upper-bound (array-domain A) 0)) - (A_ (array-getter A)) - (A! (array-setter A))) - (do ((i 0 (+ i 1))) - ((= i n) A) - (let* ((pivot (sqrt (A_ i i))) - (column/row-domain - ;; both will be one-dimensional - (make-interval (vector (+ i 1)) (vector n))) - (column - ;; the column below the (i,i) entry - (specialized-array-share A - column/row-domain - (lambda (k) (values k i)))) - (row - ;; the row to the right of the (i,i) entry - (specialized-array-share A - column/row-domain - (lambda (k) (values i k)))) - (subarray - ;; the subarray to the right and below the (i,i) entry - (array-extract A (make-interval (vector (+ i 1) (+ i 1)) (vector n n))))) - ;; set diagonal value - (A! pivot i i) - ;; compute multipliers - (array-assign! column (array-map (lambda (x) (/ x pivot)) column)) - ;; zero the rest of the ith row, preserving exactness - (array-assign! row (make-array column/row-domain - ;; a zero with the same exactness as pivot - (lambda (j) (- pivot pivot)))) - ;; subtract the outer product of i'th - ;; row and column from the subarray - (array-assign! subarray - (array-map - - subarray - (array-outer-product * column column))))))) - -(define Example-1 - (list*->array 2 '((25 15 -5) - (15 18 0) - (-5 0 11)))) - -(define Example-2 - (list*->array 2 '((18 22 54 42) - (22 70 86 62) - (54 86 174 134) - (42 62 134 106)))) - -(pretty-print (array->list* (Cholesky Example-1))) -(newline) -(pretty-print (array->list* (Cholesky Example-2))) diff --git a/Task/Cholesky-decomposition/Zig/cholesky-decomposition.zig b/Task/Cholesky-decomposition/Zig/cholesky-decomposition.zig deleted file mode 100644 index 39a4ebad30..0000000000 --- a/Task/Cholesky-decomposition/Zig/cholesky-decomposition.zig +++ /dev/null @@ -1,64 +0,0 @@ -const std = @import("std"); - -fn cholesky(mat: []const f64, n: usize, allocator: std.mem.Allocator) ![]f64 { - const res = try allocator.alloc(f64, mat.len); - @memset(res, 0.0); - - for (0..n) |i| { - for (0..i+1) |j| { - var s: f64 = 0.0; - for (0..j) |k| { - s += res[i * n + k] * res[j * n + k]; - } - - res[i * n + j] = if (i == j) - std.math.sqrt(mat[i * n + i] - s) - else - (1.0 / res[j * n + j] * (mat[i * n + j] - s)); - } - } - return res; -} - -fn showMatrix(matrix: []const f64, n: usize) void { - for (0..n) |i| { - for (0..n) |j| { - std.debug.print("{d:.4}\t", .{matrix[i * n + j]}); - } - std.debug.print("\n", .{}); - } - std.debug.print("\n", .{}); -} - -pub fn main() !void { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - const allocator = gpa.allocator(); - defer _ = gpa.deinit(); - - { - const dimension: usize = 3; - const m1 = [_]f64{ - 25.0, 15.0, -5.0, - 15.0, 18.0, 0.0, - -5.0, 0.0, 11.0 - }; - - const res1 = try cholesky(&m1, dimension, allocator); - defer allocator.free(res1); - showMatrix(res1, dimension); - } - - { - const dimension: usize = 4; - const m2 = [_]f64{ - 18.0, 22.0, 54.0, 42.0, - 22.0, 70.0, 86.0, 62.0, - 54.0, 86.0, 174.0, 134.0, - 42.0, 62.0, 134.0, 106.0 - }; - - const res2 = try cholesky(&m2, dimension, allocator); - defer allocator.free(res2); - showMatrix(res2, dimension); - } -} diff --git a/Task/Chowla-numbers/ALGOL-68/chowla-numbers.alg b/Task/Chowla-numbers/ALGOL-68/chowla-numbers.alg index 6fefcfb901..641726dfd2 100644 --- a/Task/Chowla-numbers/ALGOL-68/chowla-numbers.alg +++ b/Task/Chowla-numbers/ALGOL-68/chowla-numbers.alg @@ -1,33 +1,16 @@ BEGIN # find some Chowla numbers ( Chowla n = sum of divisors of n exclusing n and 1 ) # - - # returns the divisor sums of [1 n], the sums exclude 1 and n # - PROC sum divisors = ( INT n )[]INT: - BEGIN - [ 1 : n ]INT sums; - FOR i TO n DO sums[ i ] := 0 OD; - FOR i FROM 2 TO n DO - FOR j FROM i + i BY i TO n DO sums[ j ] +:= i OD - OD; - sums - END # sum divisors # ; - - []INT ds = sum divisors( 10 000 000 ); # get a table of divisor sums for 1..n # - # returs the Chowla number of n # PROC chowla = ( INT n )INT: - IF n < 2 - THEN 0 - ELIF n <= UPB ds - LWB ds + 1 - THEN ds[ n ] - ELSE INT sum := 0; - FOR i FROM 2 WHILE i * i <= n DO - IF n MOD i = 0 THEN - INT j = n OVER i; - sum +:= i + IF i = j THEN 0 ELSE j FI - FI - OD; - sum - FI # chowla # ; + BEGIN + INT sum := 0; + FOR i FROM 2 WHILE i * i <= n DO + IF n MOD i = 0 THEN + INT j = n OVER i; + sum +:= i + IF i = j THEN 0 ELSE j FI + FI + OD; + sum + END # chowla # ; FOR n TO 37 DO print( ( "chowla(", whole( n, 0 ), ") = ", whole( chowla( n ), 0 ), newline ) ) OD; @@ -40,7 +23,7 @@ BEGIN # find some Chowla numbers ( Chowla n = sum of divisors of n exclusing n a FI OD; count := 0; - INT limit = 35 000 000; + INT limit = 350 000 000; INT k := 2, kk := 3; WHILE INT p = k * kk; p <= limit diff --git a/Task/Chowla-numbers/Ada/chowla-numbers.ada b/Task/Chowla-numbers/Ada/chowla-numbers.ada new file mode 100644 index 0000000000..8b9451b145 --- /dev/null +++ b/Task/Chowla-numbers/Ada/chowla-numbers.ada @@ -0,0 +1,70 @@ +with Ada.Text_IO; + +procedure Chowla_Numbers is + + function Chowla (N : Positive) return Natural is + Sum : Natural := 0; + I : Positive := 2; + J : Positive; + begin + while I * I <= N loop + if N mod I = 0 then + J := N / I; + Sum := Sum + I + (if I = J then 0 else J); + end if; + I := I + 1; + end loop; + return Sum; + end Chowla; + + procedure Put_37_First is + use Ada.Text_IO; + begin + for A in Positive range 1 .. 37 loop + Put_Line ("chowla(" & A'Image & ") = " & Chowla (A)'Image); + end loop; + end Put_37_First; + + procedure Put_Prime is + use Ada.Text_IO; + Count : Natural := 0; + Power : Positive := 100; + begin + for N in Positive range 2 .. 10_000_000 loop + if Chowla (N) = 0 then + Count := Count + 1; + end if; + if N mod Power = 0 then + Put_Line ("There is " & Count'Image & " primes < " & Power'Image); + Power := Power * 10; + end if; + end loop; + end Put_Prime; + + procedure Put_Perfect is + use Ada.Text_IO; + Count : Natural := 0; + Limit : constant := 350_000_000; + K : Natural := 2; + Kk : Natural := 3; + P : Natural; + begin + loop + P := K * Kk; + exit when P > Limit; + + if Chowla (P) = P - 1 then + Put_Line (P'Image & " is a perfect number"); + Count := Count + 1; + end if; + K := Kk + 1; + Kk := Kk + K; + end loop; + Put_Line ("There are " & Count'Image & " perfect numbers < " & Limit'Image); + end Put_Perfect; + +begin + Put_37_First; + Put_Prime; + Put_Perfect; +end Chowla_Numbers; diff --git a/Task/Chowla-numbers/Ada/chowla-numbers.adb b/Task/Chowla-numbers/Ada/chowla-numbers.adb deleted file mode 100644 index 4f48ba270c..0000000000 --- a/Task/Chowla-numbers/Ada/chowla-numbers.adb +++ /dev/null @@ -1,70 +0,0 @@ -with Ada.Text_IO; - -procedure Chowla_Numbers is - - function Chowla (N : Positive) return Natural is - Sum : Natural := 0; - I : Positive := 2; - J : Positive; - begin - while I * I <= N loop - if N mod I = 0 then - J := N / I; - Sum := Sum + I + (if I = J then 0 else J); - end if; - I := I + 1; - end loop; - return Sum; - end Chowla; - - procedure Put_37_First is - use Ada.Text_IO; - begin - for A in Positive range 1 .. 37 loop - Put_Line ("chowla(" & A'Image & ") = " & Chowla (A)'Image); - end loop; - end Put_37_First; - - procedure Put_Prime is - use Ada.Text_IO; - Count : Natural := 0; - Power : Positive := 100; - begin - for N in Positive range 2 .. 10_000_000 loop - if Chowla (N) = 0 then - Count := Count + 1; - end if; - if N mod Power = 0 then - Put_Line ("There are " & Count'Image & " primes < " & Power'Image); - Power := Power * 10; - end if; - end loop; - end Put_Prime; - - procedure Put_Perfect is - use Ada.Text_IO; - Count : Natural := 0; - Limit : constant := 350_000_000; - K : Natural := 2; - Kk : Natural := 3; - P : Natural; - begin - loop - P := K * Kk; - exit when P > Limit; - - if Chowla (P) = P - 1 then - Put_Line (P'Image & " is a perfect number"); - Count := Count + 1; - end if; - K := Kk + 1; - Kk := Kk + K; - end loop; - Put_Line ("There are " & Count'Image & " perfect numbers < " & Limit'Image); - end Put_Perfect; - -begin - Put_37_First; - Put_Prime; - Put_Perfect; -end Chowla_Numbers; diff --git a/Task/Chowla-numbers/Agena/chowla-numbers.agena b/Task/Chowla-numbers/Agena/chowla-numbers.agena deleted file mode 100644 index f483192c9a..0000000000 --- a/Task/Chowla-numbers/Agena/chowla-numbers.agena +++ /dev/null @@ -1,57 +0,0 @@ -scope # find some Chowla numbers ( Chowla n = sum of divisors of n exclusing n and 1 ) - - # returns the divisor sums of [1 n], the sums exclude 1 and n - local proc sumDivisors( n :: number ) :: sequence - local constant sums := seq(); - for i to n do sums[ i ] := 0 od; - for i from 2 to n do - for j from i + i to n by i do sums[ j ] +:= i od - od; - return sums - end; - - local constant ds := sumDivisors( 10_000_000 ); - - local proc chowla( n :: number ) :: number # returns the Chowla number of n - local sum := 0; - if n > 0 then - if n <= size ds then - sum := ds[ n ] - else - for i from 2 while i * i <= n do - if n mod i = 0 then - local constant j := n \ i; - sum +:= i + if i = j then 0 else j fi - fi - od - fi - fi; - return sum - end; - - # first 37 chowla numbers - for n to 37 do printf( "chowla(%d) = %d\n", n, chowla( n ) ) od; - - # number of primes up to 10_000_000 - local count, power := 0, 100; - for n from 2 to 10_000_000 do - if chowla( n ) = 0 then count +:= 1 fi; - if n mod power = 0 then - printf( "There are %6d primes < %d\n", count, power ); - power *:= 10 - fi - od; - - # perfect numbers to 35_000_000 - local constant perfectMax := 35_000_000; - count := 0; - local k, kk, p := 2, 3, 6; # p is k * kk; - while p <= perfectMax do - if chowla( p ) = p - 1 then - printf( " %8d is a perfect number\n", p ); - count +:= 1 - fi; - k := kk + 1; kk +:= k; p := k * kk - od; - printf( "There are %d perfect numbers < %d\n", count, perfectMax ) -end diff --git a/Task/Chowla-numbers/EMal/chowla-numbers.emal b/Task/Chowla-numbers/EMal/chowla-numbers.emal index cd3aa6dcee..ae58e913ba 100644 --- a/Task/Chowla-numbers/EMal/chowla-numbers.emal +++ b/Task/Chowla-numbers/EMal/chowla-numbers.emal @@ -1,44 +1,44 @@ -fun chowla ← int by int n - int sum ← 0 - int j ← 0 - for int i ← 2; i * i ≤ n; ++i do - if n % i æ 0 do sum += i + when(i æ (j ← n / i), 0, j) end +fun chowla = int by int n + int sum = 0 + int j = 0 + for int i = 2; i * i <= n; i++ do + if n % i == 0 do sum += i + when(i == (j = n / i), 0, j) end end return sum end -fun sieve ← List by int limit - List c ← logic[].with(limit) - for int i ← 3; i * 3 < limit; i += 2 - if c[i] or chowla(i) ≠ 0 do continue end - for int j ← 3 * i; j < limit; j += 2 * i do c[j] ← true end +fun sieve = List by int limit + List c = logic[].with(limit) + for int i = 3; i * 3 < limit; i += 2 + if c[i] or chowla(i) != 0 do continue end + for int j = 3 * i; j < limit; j += 2 * i do c[j] = true end end return c end # find and display (1 per line) for the 1st 37 integers -for int i ← 1; i ≤ 37; ++i do writeLine("chowla(" + i + ") = ", chowla(i)) end -int count ← 1 -int limit ← 10000000 -int power ← 100 -List c ← sieve(limit) -for int i ← 3; i < limit; i += 2 - if not c[i] do ++count end - if i æ power - 1 - writeLine("Count of primes up to ", power, " = ", count) +for int i = 1; i <= 37; i++ do writeLine("chowla(" + i + ") = " + chowla(i)) end +int count = 1 +int limit = 10000000 +int power = 100 +List c = sieve(limit) +for int i = 3; i < limit; i += 2 + if not c[i] do count++ end + if i == power - 1 + writeLine("Count of primes up to " + power + " = " + count) power *= 10 end end -count ← 0 -limit ← 35000000 -int k ← 2 -int kk ← 3 +count = 0 +limit = 35000000 +int k = 2 +int kk = 3 int p -for int i ← 2; ; ++i - if (p ← k * kk) > limit do break end - if chowla(p) æ p - 1 - writeLine(p, " is a number that is perfect") - ++count +for int i = 2; ; i++ + if (p = k * kk) > limit do break end + if chowla(p) == p - 1 + writeLine(p + " is a number that is perfect") + count++ end - k ← kk + 1 + k = kk + 1 kk += k end -writeLine("There are ", count, " perfect numbers ≤ 35,000,000") +writeLine("There are " + count + " perfect numbers <= 35,000,000") diff --git a/Task/Chowla-numbers/EasyLang/chowla-numbers.easy b/Task/Chowla-numbers/EasyLang/chowla-numbers.easy index 3cecf7520f..612642b535 100644 --- a/Task/Chowla-numbers/EasyLang/chowla-numbers.easy +++ b/Task/Chowla-numbers/EasyLang/chowla-numbers.easy @@ -1,4 +1,5 @@ fastfunc chowla n . + sum = 0 i = 2 while i * i <= n if n mod i = 0 @@ -13,7 +14,7 @@ fastfunc chowla n . . return sum . -proc sieve &c[] . +proc sieve . c[] . i = 3 while i * 3 <= len c[] if c[i] = 0 @@ -28,22 +29,23 @@ proc sieve &c[] . i += 2 . . -func$ comma n . +proc commatize n . s$ . s$[] = strchars n s$ = "" l = len s$[] for i = 1 to len s$[] - if i > 1 and l mod 3 = 0 : s$ &= "," + if i > 1 and l mod 3 = 0 + s$ &= "," + . l -= 1 s$ &= s$[i] . - return s$ . print "chowla number from 1 to 37" for i = 1 to 37 print " " & i & ": " & chowla i . -proc main . +proc main . . print "" len c[] 10000000 count = 1 @@ -51,9 +53,13 @@ proc main . power = 100 i = 3 while i <= len c[] - if c[i] = 0 : count += 1 + if c[i] = 0 + count += 1 + . if i = power - 1 - print "There are " & comma count & " primes up to " & comma power + commatize power p$ + commatize count c$ + print "There are " & c$ & " primes up to " & p$ power *= 10 . i += 2 @@ -68,13 +74,15 @@ proc main . p = k * kk until p > limit if chowla p = p - 1 - print comma p & " is a perfect number" + commatize p s$ + print s$ & " is a perfect number" count += 1 . k = kk + 1 kk += k i += 1 . - print "There are " & count & " perfect mumbers up to " & comma limit + commatize limit s$ + print "There are " & count & " perfect mumbers up to " & s$ . main diff --git a/Task/Chowla-numbers/Fennel/chowla-numbers.fennel b/Task/Chowla-numbers/Fennel/chowla-numbers.fennel deleted file mode 100644 index 5bfb4bd8c4..0000000000 --- a/Task/Chowla-numbers/Fennel/chowla-numbers.fennel +++ /dev/null @@ -1,61 +0,0 @@ -(do ;;; find some Chowla numbers ( Chowla n = sum of divisors of n exclusing n and 1 ) - - (fn sum-divisors [n] - (local sums {}) - (for [i 1 n] (tset sums i 0)) - (for [i 2 n] - (for [j (+ i i) n i] (tset sums j (+ (. sums j) i))) - ) - sums - ) - - (local ds (sum-divisors 10_000_000)) - - (fn chowla [n] ; returns the Chowla number of n - (var sum 0) - (when (> n 0) - (if (<= n (length ds)) - (set sum (. ds n)) - ;else - (for [i 2 (math.floor (math.sqrt n))] - (when (= 0 (% n i)) - (local j (math.floor (/ n i))) - (set sum (+ sum i (if (= i j) 0 j))) - ) - ) - ) - ) - sum - ) - - - ; first 37 chowla numbers - (for [n 1 37] (print (.. "chowla(" n ") = " (chowla n)))) - - ; number of primes up to 10_000_000 - (var (count power) (values 0 100)) - (for [n 2 10_000_000] - (when (= 0 (chowla n)) - (set count (+ count 1)) - ) - (when (= 0 (% n power)) - (print (string.format "There are %6d primes < %d" count power)) - (set power (* power 10)) - ) - ) - - ; perfect numbers to 35_000_000 - (local perfect-max 35_000_000) - (set count 0) - (var (k kk p) (values 2 3 6)) ; p is k * kk - (while (<= p perfect-max) - (when (= (chowla p) (- p 1)) - (print (string.format " %8d is a perfect number" p)) - (set count (+ count 1)) - ) - (set k (+ kk 1)) - (set kk (+ kk k)) - (set p (* kk k)) - ) - (print (.. "There are " count " perfect numbers < " perfect-max)) -) diff --git a/Task/Chowla-numbers/JavaScript/chowla-numbers.js b/Task/Chowla-numbers/JavaScript/chowla-numbers.js deleted file mode 100644 index 1ff725b65f..0000000000 --- a/Task/Chowla-numbers/JavaScript/chowla-numbers.js +++ /dev/null @@ -1,79 +0,0 @@ -// Chowla function: calculates sum of proper divisors of n (excluding n itself) -function chowla(n) { - let sum = 0; - for (let i = 2; i * i <= n; i++) { - if (n % i === 0) { - const j = n / i; - sum += i + (i === j ? 0 : j); - } - } - return sum; -} - -// Sieve function: returns array where true denotes composite, false denotes prime -// Only interested in odd numbers >= 3 -function sieve(limit) { - // True denotes composite, false denotes prime - const c = new Array(limit).fill(false); - - for (let i = 3; i * 3 < limit; i += 2) { - if (!c[i] && chowla(i) === 0) { - for (let j = 3 * i; j < limit; j += 2 * i) { - c[j] = true; - } - } - } - return c; -} - -// Main execution -function main() { - // Part 1: Print chowla values for 1-37 - console.log("Chowla function values for 1-37:"); - for (let i = 1; i <= 37; i++) { - console.log(`chowla(${i}) = ${chowla(i)}`); - } - console.log("\n"); - - // Part 2: Count primes up to powers of 10 - console.log("Prime counting using Chowla's sieve:"); - let count = 1; - const limit = 10000000; // 1e7 - let power = 100; - - const c = sieve(limit); - - for (let i = 3; i < limit; i += 2) { - if (!c[i]) count++; - - if (i === power - 1) { - console.log(`Count of primes up to ${power.toLocaleString()} = ${count.toLocaleString()}`); - power *= 10; - } - } - console.log("\n"); - - // Part 3: Find perfect numbers - console.log("Perfect numbers <= 35,000,000:"); - count = 0; - const perfectLimit = 35000000; - - let k = 2, kk = 3, p; - for (let i = 2; ; i++) { - p = k * kk; - if (p > perfectLimit) break; - - if (chowla(p) === p - 1) { - console.log(`${p.toLocaleString()} is a perfect number`); - count++; - } - - k = kk + 1; - kk += k; - } - - console.log(`\nThere are ${count} perfect numbers <= 35,000,000`); -} - -// Execute the main function -main(); diff --git a/Task/Chowla-numbers/Julia/chowla-numbers.jl b/Task/Chowla-numbers/Julia/chowla-numbers.jl deleted file mode 100644 index 1402756727..0000000000 --- a/Task/Chowla-numbers/Julia/chowla-numbers.jl +++ /dev/null @@ -1,40 +0,0 @@ -using Primes, Format - -function chowla(n) - if n < 1 - throw("Chowla function argument must be positive") - elseif n < 4 - return zero(n) - else - f = [one(n)] - for (p,e) in factor(n) - f = reduce(vcat, [f*p^j for j in 1:e], init=f) - end - return sum(f) - one(n) - n - end -end - -function countchowlas(n, asperfect=false, verbose=false) - count = 0 - for i in 2:n # 1 is not prime or perfect so skip - chow = chowla(i) - if (asperfect && chow == i - 1) || (!asperfect && chow == 0) - count += 1 - verbose && println("The number $(format(i, commas=true)) is ", asperfect ? "perfect." : "prime.") - end - end - count -end - -function testchowla() - println("The first 37 chowla numbers are:") - for i in 1:37 - println("Chowla($i) is ", chowla(i)) - end - for i in [100, 1000, 10000, 100000, 1000000, 10000000] - println("The count of the primes up to $(format(i, commas=true)) is $(format(countchowlas(i), commas=true))") - end - println("The count of perfect numbers up to 35,000,000 is $(countchowlas(35000000, true, true)).") -end - -testchowla() diff --git a/Task/Chowla-numbers/Julia/chowla-numbers.julia b/Task/Chowla-numbers/Julia/chowla-numbers.julia new file mode 100644 index 0000000000..cc27df514d --- /dev/null +++ b/Task/Chowla-numbers/Julia/chowla-numbers.julia @@ -0,0 +1,40 @@ +using Primes, Formatting + +function chowla(n) + if n < 1 + throw("Chowla function argument must be positive") + elseif n < 4 + return zero(n) + else + f = [one(n)] + for (p,e) in factor(n) + f = reduce(vcat, [f*p^j for j in 1:e], init=f) + end + return sum(f) - one(n) - n + end +end + +function countchowlas(n, asperfect=false, verbose=false) + count = 0 + for i in 2:n # 1 is not prime or perfect so skip + chow = chowla(i) + if (asperfect && chow == i - 1) || (!asperfect && chow == 0) + count += 1 + verbose && println("The number $(format(i, commas=true)) is ", asperfect ? "perfect." : "prime.") + end + end + count +end + +function testchowla() + println("The first 37 chowla numbers are:") + for i in 1:37 + println("Chowla($i) is ", chowla(i)) + end + for i in [100, 1000, 10000, 100000, 1000000, 10000000] + println("The count of the primes up to $(format(i, commas=true)) is $(format(countchowlas(i), commas=true))") + end + println("The count of perfect numbers up to 35,000,000 is $(countchowlas(35000000, true, true)).") +end + +testchowla() diff --git a/Task/Chowla-numbers/Kotlin/chowla-numbers.kts b/Task/Chowla-numbers/Kotlin/chowla-numbers.kotlin similarity index 100% rename from Task/Chowla-numbers/Kotlin/chowla-numbers.kts rename to Task/Chowla-numbers/Kotlin/chowla-numbers.kotlin diff --git a/Task/Chowla-numbers/Maxima/chowla-numbers.maxima b/Task/Chowla-numbers/Maxima/chowla-numbers.maxima deleted file mode 100644 index be58f3e5ab..0000000000 --- a/Task/Chowla-numbers/Maxima/chowla-numbers.maxima +++ /dev/null @@ -1,13 +0,0 @@ -chowla(n) := if(n=1) then 0 else divsum(n)-n-1$ -chowla_seq(n, start) := map(chowla, makelist(i,i,start,n))$ -chowla_seq(37, 1); - -chowla_numprimes(n) := length(sublist_indices(chowla_seq(n, 2), lambda([x], x=0)))$ -map(chowla_numprimes, makelist(10^i, i, 2, 7)); - -chowla_perfects(n) := block( - chowla_list: chowla_seq(n, 1), - is_perfect(x) := if(x>n or x=0) then false else x=chowla_list[x+1], - unique(sublist(chowla_list, is_perfect)+1))$ - -chowla_perfects(10000); diff --git a/Task/Chowla-numbers/PascalABC.NET/chowla-numbers.pas b/Task/Chowla-numbers/PascalABC.NET/chowla-numbers.pas deleted file mode 100644 index 7274f05fc9..0000000000 --- a/Task/Chowla-numbers/PascalABC.NET/chowla-numbers.pas +++ /dev/null @@ -1,54 +0,0 @@ -function chowla(n: Integer): Integer; -begin - result := 0; - var i := 2; - while i * i <= n do - begin - if n mod i = 0 then - result += i + (if i = n div i then 0 else n div i); - i += 1 - end; -end; - -function sieve(limit: Integer): array of Boolean; -begin - result := new Boolean[limit]; - for var i := 3 to limit div 3 step 2 do - if not result[i] and (chowla(i) = 0) Then - for var j := 3 * i to limit step 2 * i do - result[j] := true; -end; - -begin - for var i := 1 To 37 do - WriteLn('chowla(', i, ') = ', chowla(i)); - - var count := 1; - var limit := 10_000_000; - var power := 100; - var c := sieve(limit); - for var i := 3 To limit Step 2 do - begin - if not c[i] Then count += 1; - if i = power - 1 Then begin - WriteLn('Count of primes up to ', power:8, ' = ', count); - power *= 10; - end; - end; - - count := 0; - limit := 35_000_000; - var k := 2; var kk := 3; - while True do - begin - var p := k * kk; - if p > limit Then break; - if chowla(p) = p - 1 Then begin - WriteLn(p:8, ' is a number that is perfect'); - count += 1; - end; - k := kk + 1; - kk += k; - end; - WriteLn('There are ', count, ' perfect numbers <= 35,000,000') -end. diff --git a/Task/Chowla-numbers/Pluto/chowla-numbers.pluto b/Task/Chowla-numbers/Pluto/chowla-numbers.pluto deleted file mode 100644 index 7170013ac8..0000000000 --- a/Task/Chowla-numbers/Pluto/chowla-numbers.pluto +++ /dev/null @@ -1,57 +0,0 @@ -do -- find some Chowla numbers ( Chowla n = sum of divisors of n exclusing n and 1 ) - - -- returns the divisor sums of [1 n], the sums exclude 1 and n - local function sumDivisors( n : number ) : table - local sums = {} - for i = 1, n do sums[ i ] = 0 end - for i = 2, n do - for j = i + i, n, i do sums[ j ] += i end - end - return sums - end - - local ds = sumDivisors( 10_000_000 ) - - local function chowla( n : number ) : number -- returns the Chowla number of n - local sum = 0 - if n > 0 then - if n <= # ds then - sum = ds[ n ] - else - for i = 2, math.floor( math.sqrt( n ) ) do - if n % i == 0 then - local j = n // i - sum += i + if i == j then 0 else j end - end - end - end - end - return sum - end - - -- first 37 chowla numbers - for n = 1, 37 do print( $"chowla({n}) = {chowla(n)}" ) end - - -- number of primes up to 10_000_000 - local count, power = 0, 100 - for n = 2, 10_000_000 do - if chowla( n ) == 0 then count += 1 end - if n % power == 0 then - print( string.format( "There are %6d primes < %d", count, power ) ) - power *= 10 - end - end - - -- perfect numbers to 35_000_000 - local perfectMax = 35_000_000 - count = 0 - local k, kk, p = 2, 3, 6 -- p is k * kk - while p <= perfectMax do - if chowla( p ) == p - 1 then - print( string.format( " %8d is a perfect number", p ) ) - count += 1 - end - k = kk + 1; kk += k; p = k * kk - end - print( $"There are {count} perfect numbers < {perfectMax}" ) -end diff --git a/Task/Chowla-numbers/Quackery/chowla-numbers.quackery b/Task/Chowla-numbers/Quackery/chowla-numbers.quackery deleted file mode 100644 index 6fc47e0c39..0000000000 --- a/Task/Chowla-numbers/Quackery/chowla-numbers.quackery +++ /dev/null @@ -1,31 +0,0 @@ - [ 2 max - dup sqrt+ - iff 0 else [ dup negate ] - unrot - times - [ dup i^ 1+ /mod - 0 = iff - [ i^ 1+ + - swap dip + ] - else drop ] - 1+ - ] is chowla ( n --> n ) - - 37 times - [ say "chowla(" - i^ 1+ dup echo - say ")= " - chowla echo cr ] - cr - ' [ 100 1000 10000 100000 1000000 10000000 ] - witheach - [ 0 over 2 - times - [ i^ 2 + chowla 0 = + ] - say "There are " echo - say " primes less than " - echo cr ] - cr - 35000000 2 - times - [ i^ 2 + dup chowla 1+ = if - [ i^ 2 + echo - say " is perfect" - cr ] ] diff --git a/Task/Chowla-numbers/REXX/chowla-numbers.rexx b/Task/Chowla-numbers/REXX/chowla-numbers.rexx index 7f52a942e8..54447064f1 100644 --- a/Task/Chowla-numbers/REXX/chowla-numbers.rexx +++ b/Task/Chowla-numbers/REXX/chowla-numbers.rexx @@ -1,73 +1,29 @@ --- 21 Feb 2026 -include Setting -numeric digits 12 +/*REXX program computes/displays chowla numbers (and may count primes & perfect numbers.*/ +parse arg LO HI . /*obtain optional arguments from the CL*/ +if LO=='' | LO=="," then LO= 1 /*Not specified? Then use the default.*/ +perf= LO<0; LO= abs(LO) /*Negative? Then determine if perfect.*/ +if HI=='' | HI=="," then HI= LO /*Not specified? Then use the default.*/ +prim= HI<0; HI= abs(HI) /*Negative? Then determine if a prime.*/ +numeric digits max(9, length(HI) + 1 ) /*use enough decimal digits for // */ +w= length( commas(HI) ) /*W: used in aligning output numbers.*/ +tell= \(prim | perf) /*set boolean value for showing chowlas*/ +p= 0 /*the number of primes found (so far).*/ + do j=LO to HI; #= chowla(j) /*compute the cholwa number for J. */ + if tell then say right('chowla('commas(j)")", w+9) ' = ' right( commas(#), w) + else if #==0 then if j>1 then p= p+1 + if perf then if j-1==# & j>1 then say right(commas(j), w) ' is a perfect number.' + end /*j*/ -say 'CHOWLA NUMBERS' -say version -say -call ChowlaNumbers -call Timer 'R' -call PrimeCount -call Timer 'R' -call PerfectNumbers -call Timer 'R' -exit - -ChowlaNumbers: -procedure expose Memo. -call Time('r'); sep = Copies('-',12) -say sep; say ' n Chowla(n)'; say sep -m = 37 -do i = 1 to m - say Right(i,2) Right(Chowla(i),9) -end -say sep -return - -PrimeCount: -procedure expose Memo. work. -sep = Copies('-',17) -say sep; say Right('n',8) Right('Primes d then do - say Right(10**e,8) Right(n,8) - d = e - end - if work.i = 0 then - iterate i - if Chowla(i) = 0 then do - n = n+1 - if i > 1 then do - j = i+i - do while j < m - work.j = 0; j = j+i - end - end - end -end -say sep -return - -PerfectNumbers: -procedure expose Divi. Memo. -sep = Copies('-',12) -say sep; say Right('Perfect',12); say sep -k = 2; kk = 3; m = 140e9; n = 0 -do forever - p = k * kk - if p > 140e9 then - leave - if Chowla(p) = p-1 then do - n = n+1 - say Right(p,12) - end - k = kk+1; kk = kk+k -end -say sep -say n 'perfect numbers found below 140e9' -return - --- Chowla; Xpon; Timer -include Math +if prim & \perf then say 'number of primes found for the range ' commas(LO) " to " , + commas(HI) " (inclusive) is: " commas(p) +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +chowla: procedure; parse arg x; if x<2 then return 0; odd= x // 2 + s=0 /* [↓] use EVEN or ODD integers. ___*/ + do k=2+odd by 1+odd while k*k perfect_limit) break; - if (chowla(p) == p - 1) { - std.debug.print("{} is a number that is perfect\n", .{p}); - perfect_count += 1; - } - k = kk + 1; - kk += k; - } - - std.debug.print("There are {} perfect numbers <= 35,000,000\n", .{perfect_count}); -} diff --git a/Task/Church-numerals/Applesoft-BASIC/church-numerals.basic b/Task/Church-numerals/Applesoft-BASIC/church-numerals.basic deleted file mode 100644 index 954ef14625..0000000000 --- a/Task/Church-numerals/Applesoft-BASIC/church-numerals.basic +++ /dev/null @@ -1,29 +0,0 @@ - 0 DIM OP(13),N(13),X(13,1):READ OP(ZERO),N(ZERO),X(ZERO,0),X(ZERO,1):CN = CN + 1:DATA1,0,0,1 - 1 C = ZERO:GOSUB 10:C=R:GOSUB 10:C=R:GOSUB 10:THREE = R - 2 C = THREE :GOSUB 10:FOUR = R - 3 C = THREE :GOSUB 80:PRINT "THREE -> "R - 4 C = FOUR :GOSUB 80:PRINT "FOUR -> "R - 5 C = THREE:D = FOUR :GOSUB 50:C = R:GOSUB 80:PRINT "THREE + FOUR -> "R - 6 C = THREE:D = FOUR :GOSUB 60:C = R:GOSUB 80:PRINT "THREE * FOUR -> "R - 7 C = THREE:D = FOUR :GOSUB 70:C = R:GOSUB 80:PRINT "THREE ^ FOUR -> "R - 8 C = FOUR :D = THREE:GOSUB 70:C = R:GOSUB 80:PRINT "FOUR ^ THREE -> "R - 9 I = 5 :GOSUB 90:C = R:GOSUB 80:PRINT "5 -> FIVE -> "R;:END -REM SUCC - 10 R = CN:OP(R) = OP(C):N(R) = N(C) + 1:X(R,0) = X(C,0):X(R,1) = X(C,1):CN = CN + 1:RETURN -REM SUM - 20 FOR I = 1 TO N:A = A + B:NEXT I:R = A:RETURN -REM MUL - 30 FOR I = 1 TO N:A = A * B:NEXT I:R = A:RETURN -REM POW - 40 FOR I = 1 TO N:A = A ^ B:NEXT I:R = INT (A):RETURN -REM CHURCH SUM - 50 RES = CN:OP(RES) = 1:N(RES) = 1:X(RES,0) = N(C):X(RES,1) = N(D):CN = CN + 1:R = RES:RETURN -REM CHURCH MUL - 60 RES = CN:OP(RES) = 2:N(RES) = 1:X(RES,0) = N(C):X(RES,1) = N(D):CN = CN + 1:R = RES:RETURN -REM CHURCH POW - 70 RES = CN:OP(RES) = 3:N(RES) = 1:X(RES,0) = N(C):X(RES,1) = N(D):CN = CN + 1:R = RES:RETURN -REM CHURCH TO NUM - 80 N = N(C):A = X(C,0):B = X(C,1):ON OP(C) GOTO 20,30,40:STOP -REM NUM TO CHURCH - 90 R = ZERO:IF I = 0 THEN RETURN - 91 I = I - 1:GOSUB 90:C = R:GOTO 10"SUCC diff --git a/Task/Church-numerals/Binary-Lambda-Calculus/church-numerals.blc b/Task/Church-numerals/Binary-Lambda-Calculus/church-numerals.blc deleted file mode 100644 index d228e6480d..0000000000 --- a/Task/Church-numerals/Binary-Lambda-Calculus/church-numerals.blc +++ /dev/null @@ -1,27 +0,0 @@ -(let ((zero 0) - (succ (lambda (n f x) - (f (n f x)))) - (one (succ zero)) - (two (succ one)) - (three (succ two)) - (four (succ three)) - (plus (lambda (m n f x) - (m f (n f x)))) - (times (lambda (m n f) - (m (n f)))) - (power (lambda (m n) - (n m))) - (cons (lambda (x y f) - (f x y)))) - (lambda (in) - (cons - (plus three four) - (cons - (times three four) - (cons - (power three four) - (cons - (power four three) - (cons - (power (power two two) (plus two one)) - nil))))))) diff --git a/Task/Church-numerals/Chapel/church-numerals.chpl b/Task/Church-numerals/Chapel/church-numerals.chapel similarity index 100% rename from Task/Church-numerals/Chapel/church-numerals.chpl rename to Task/Church-numerals/Chapel/church-numerals.chapel diff --git a/Task/Church-numerals/Crystal/church-numerals.cr b/Task/Church-numerals/Crystal/church-numerals.crystal similarity index 100% rename from Task/Church-numerals/Crystal/church-numerals.cr rename to Task/Church-numerals/Crystal/church-numerals.crystal diff --git a/Task/Church-numerals/Julia/church-numerals-1.jl b/Task/Church-numerals/Julia/church-numerals-1.julia similarity index 100% rename from Task/Church-numerals/Julia/church-numerals-1.jl rename to Task/Church-numerals/Julia/church-numerals-1.julia diff --git a/Task/Church-numerals/Julia/church-numerals-2.jl b/Task/Church-numerals/Julia/church-numerals-2.julia similarity index 100% rename from Task/Church-numerals/Julia/church-numerals-2.jl rename to Task/Church-numerals/Julia/church-numerals-2.julia diff --git a/Task/Church-numerals/OCaml/church-numerals.ml b/Task/Church-numerals/OCaml/church-numerals.ocaml similarity index 100% rename from Task/Church-numerals/OCaml/church-numerals.ml rename to Task/Church-numerals/OCaml/church-numerals.ocaml diff --git a/Task/Church-numerals/Phix/church-numerals.phix b/Task/Church-numerals/Phix/church-numerals.phix index 3f885e80e9..3765569a3c 100644 --- a/Task/Church-numerals/Phix/church-numerals.phix +++ b/Task/Church-numerals/Phix/church-numerals.phix @@ -1,86 +1,91 @@ -with javascript_semantics +(phixonline)--> + with javascript_semantics -type church(object c) --- eg {r_add,1,{a,b}} - return sequence(c) and length(c)=3 - and integer(c[1]) and integer(c[2]) - and sequence(c[3]) and length(c[3])=2 -end type + type church(object c) + -- eg {r_add,1,{a,b}} + return sequence(c) and length(c)=3 + and integer(c[1]) and integer(c[2]) + and sequence(c[3]) and length(c[3])=2 + end type -function succ(church c) --- eg {add,1,{a,b}} => {add,2,{a,b}} aka a+b => a+b+b - c = deep_copy(c) - c[2] += 1 - return c -end function + function succ(church c) + -- eg {r_add,1,{a,b}} => {r_add,2,{a,b}} aka a+b -> a+b+b + c = deep_copy(c) + c[2] += 1 + return c + end function --- three normal integer-handling routines... -function add(integer n, a, b) - for i=1 to n do - a += b - end for - return a -end function + -- three normal integer-handling routines... + function add(integer n, a, b) + for i=1 to n do + a += b + end for + return a + end function + constant r_add = routine_id("add") -function mul(integer n, a, b) - for i=1 to n do - a *= b - end for - return a -end function + function mul(integer n, a, b) + for i=1 to n do + a *= b + end for + return a + end function + constant r_mul = routine_id("mul") -function pow(integer n, a, b) - for i=1 to n do - a = power(a,b) - end for - return a -end function + function pow(integer n, a, b) + for i=1 to n do + a = power(a,b) + end for + return a + end function + constant r_pow = routine_id("pow") --- ...and three church constructors to match --- (no maths here, just pure static data) -function addch(church c, d) - church res = {add,1,{c,d}} - return res -end function + -- ...and three church constructors to match + -- (no maths here, just pure static data) + function addch(church c, d) + church res = {r_add,1,{c,d}} + return res + end function -function mulch(church c, d) - church res = {mul,1,{c,d}} - return res -end function + function mulch(church c, d) + church res = {r_mul,1,{c,d}} + return res + end function -function powch(church c, d) - church res = {pow,1,{c,d}} - return res -end function + function powch(church c, d) + church res = {r_pow,1,{c,d}} + return res + end function -function tointch(church c) --- note this is where the bulk of any processing happens - {integer rid, integer n, object x} = c - x = deep_copy(x) - for i=1 to length(x) do - if church(x[i]) then x[i] = tointch(x[i]) end if - end for --- return call_func(rid,n&x) - x = deep_copy({n})&deep_copy(x) - return call_func(rid,x) -end function + function tointch(church c) + -- note this is where the bulk of any processing happens + {integer rid, integer n, object x} = c + x = deep_copy(x) + for i=1 to length(x) do + if church(x[i]) then x[i] = tointch(x[i]) end if + end for + -- return call_func(rid,n&x) + x = deep_copy({n})&deep_copy(x) + return call_func(rid,x) + end function -constant church zero = {add,0,{0,1}} + constant church zero = {r_add,0,{0,1}} -function inttoch(integer i) - if i=0 then - return zero - else - return succ(inttoch(i-1)) - end if -end function + function inttoch(integer i) + if i=0 then + return zero + else + return succ(inttoch(i-1)) + end if + end function -church three = succ(succ(succ(zero))), - four = succ(three) -printf(1,"three -> %d\n",tointch(three)) -printf(1,"four -> %d\n",tointch(four)) -printf(1,"three + four -> %d\n",tointch(addch(three,four))) -printf(1,"three * four -> %d\n",tointch(mulch(three,four))) -printf(1,"three ^ four -> %d\n",tointch(powch(three,four))) -printf(1,"four ^ three -> %d\n",tointch(powch(four,three))) -printf(1,"5 -> five -> %d\n",tointch(inttoch(5))) + church three = succ(succ(succ(zero))), + four = succ(three) + printf(1,"three -> %d\n",tointch(three)) + printf(1,"four -> %d\n",tointch(four)) + printf(1,"three + four -> %d\n",tointch(addch(three,four))) + printf(1,"three * four -> %d\n",tointch(mulch(three,four))) + printf(1,"three ^ four -> %d\n",tointch(powch(three,four))) + printf(1,"four ^ three -> %d\n",tointch(powch(four,three))) + printf(1,"5 -> five -> %d\n",tointch(inttoch(5))) + + with javascript_semantics + constant tests = {{0.1234, 0.9876, 0.8765, 0.2345, 2.0}, + {0.0000, 2.0000, 0.0000, 0.0000, 1.0}, + {0.1234, 0.9876, 0.1234, 0.9876, 2.0}, + {0.1234, 0.9876, 0.8765, 0.2345, 0.5}, + {0.1234, 0.9876, 0.1234, 0.9876, 0.0}} + for i=1 to length(tests) do + atom {x1,y1,x2,y2,r} = tests[i], + xd = x2-x1, yd = y1-y2, + s2 = xd*xd+yd*yd, sep = sqrt(s2), + xh = (x1+x2)/2, yh = (y1+y2)/2 + string txt + if sep=0 then + txt = "same points/"&iff(r=0?"radius is zero":"infinite solutions") + elsif sep=2*r then + txt = sprintf("opposite ends of diameter with centre {%.4f,%.4f}",{xh,yh}) + elsif sep>2*r then + txt = sprintf("too far apart (%.4f > %.4f)",{sep,2*r}) + else + atom md = sqrt(r*r-s2/4), xs = md*xd/sep, ys = md*yd/sep + txt = sprintf("{%.4f,%.4f} and {%.4f,%.4f}",{xh+ys,yh+xs,xh-ys,yh-xs}) + end if + printf(1,"points {%.4f,%.4f}, {%.4f,%.4f} with radius %.1f ==> %s\n",{x1,y1,x2,y2,r,txt}) + end for + + with javascript_semantics + function circular(integer p) + integer len = length(sprintf("%d",p)), + pow = power(10,len-1), + p0 = p + for i=1 to len-1 do + p = pow*remainder(p,10)+floor(p/10) + if p<p0 or not is_prime(p) then return false end if + end for + return true + end function -sequence c = {} -integer n = 1 -while length(c)<19 do - integer p = get_prime(n) - if circular(p) then c &= p end if - n += 1 -end while -printf(1,"The first 19 circular primes are:\n%v\n\n",{c}) + sequence c = {} + integer n = 1 + while length(c)<19 do + integer p = get_prime(n) + if circular(p) then c &= p end if + n += 1 + end while + printf(1,"The first 19 circular primes are:\n%v\n\n",{c}) -include mpfr.e -c = {} -n = 7 -mpz z = mpz_init() -while length(c)<4 do - mpz_set_str(z,repeat('1',n)) - if mpz_prime(z) then - c = append(c,sprintf("R(%d)",n)) - end if - n += 1 -end while -printf(1,"The next 4 circular primes, in repunit format, are:\n%s\n\n",{join(c)}) + include mpfr.e + procedure repunit(mpz z, integer n) + mpz_set_str(z,repeat('1',n)) + end procedure + + c = {} + n = 7 + mpz z = mpz_init() + while length(c)<4 do + repunit(z,n) + if mpz_prime(z) then + c = append(c,sprintf("R(%d)",n)) + end if + n += 1 + end while + printf(1,"The next 4 circular primes, in repunit format, are:\n%s\n\n",{join(c)}) + + constant t = {5003, 9887, 15073, 25031, 35317, 49081} + printf(1,"The following repunits are probably circular primes:\n") + for i=1 to length(t) do + integer ti = t[i] + atom t0 = time() + repunit(z,ti) + bool bPrime = mpz_prime(z,1) + printf(1,"R(%d) : %t (%s)\n", {ti, bPrime, elapsed(time()-t0)}) + end for + + with javascript_semantics + function bruteForceClosestPair(sequence s) + atom {x1,y1} = s[1], {x2,y2} = s[2], + dx = x1-x2, dy = y1-y2, + mind = dx*dx+dy*dy + sequence minp = s[1..2] + for i=1 to length(s)-1 do + {x1,y1} = s[i] + for j=i+1 to length(s) do + {x2,y2} = s[j] + dx = x1-x2 + dx = dx*dx + if dx<mind then + dy = y1-y2 + dx += dy*dy + if dx<mind then + mind = dx + minp = {s[i],s[j]} + end if + end if + end for + end for + return {sqrt(mind),minp} + end function -sequence testset = sq_rnd(repeat({1,1},10000)) -atom t0 = time() -atom {d, {{x1,y1},{x2,y2}}} = bruteForceClosestPair(testset) --- (Sorting the final point pair makes brute/dc more likely to tally. Note however --- when >1 equidistant pairs exist, brute and dc may well return different pairs; --- it is only a problem if they decide to return different minimum distances.) -printf(1,"Closest pair: {%f,%f} {%f,%f}, distance=%f (%3.2fs)\n",{x1,y2,x2,y2,d,time()-t0}) + sequence testset = sq_rnd(repeat({1,1},10000)) + atom t0 = time() + {atom d, sequence points} = bruteForceClosestPair(testset) + -- (Sorting the final point pair makes brute/dc more likely to tally. Note however + -- when >1 equidistant pairs exist, brute and dc may well return different pairs; + -- it is only a problem if they decide to return different minimum distances.) + atom {{x1,y1},{x2,y2}} = sort(deep_copy(points)) + printf(1,"Closest pair: {%f,%f} {%f,%f}, distance=%f (%3.2fs)\n",{x1,y2,x2,y2,d,time()-t0}) -t0 = time() -constant X = 1, Y = 2 -sequence xP = sort(deep_copy(testset)), - yP = sort_columns(deep_copy(testset),{Y}) + t0 = time() + constant X = 1, Y = 2 + sequence xP = sort(deep_copy(testset)) -function distsq(sequence p1,p2) - atom {x1,y1} = p1, {x2,y2} = p2 - x1 -= x2 - y1 -= y2 - return x1*x1 + y1*y1 -end function + function byY(sequence p1, p2) + return compare(p1[Y],p2[Y]) + end function + sequence yP = custom_sort(routine_id("byY"),deep_copy(testset)) -function closestPair(sequence xP, yP) --- where xP is P(1) .. P(N) sorted by x coordinate, and --- yP is P(1) .. P(N) sorted by y coordinate (ascending order) - integer N = length(xP), - midN = floor(N/2) - assert(length(yP)=N) - if N<=3 then - return bruteForceClosestPair(xP) - end if - sequence xL = xP[1..midN], - xR = xP[midN+1..N], - yL = {}, - yR = {} - atom xm = xP[midN][X] - for yi in yP do - if yi[X]<=xm then - yL = append(yL,yi) - else - yR = append(yR,yi) - end if - end for - {atom dmin, sequence pairMin} = min(closestPair(xL, yL), - closestPair(xR, yR)) - sequence yS = {} - for yi in yP do - if abs(xm-yi[X])=dmin then exit end if - d = distsq(yk,yi) - if dfunction distsq(sequence p1,p2) + atom {x1,y1} = p1, {x2,y2} = p2 + x1 -= x2 + y1 -= y2 + return x1*x1 + y1*y1 + end function -{d,{{x1,y1},{x2,y2}}} = closestPair(xP,yP) -printf(1,"Closest pair: {%f,%f} {%f,%f}, distance=%f (%3.2fs)\n",{x1,y2,x2,y2,d,time()-t0}) + function closestPair(sequence xP, yP) + -- where xP is P(1) .. P(N) sorted by x coordinate, and + -- yP is P(1) .. P(N) sorted by y coordinate (ascending order) + integer N = length(xP), + midN = floor(N/2) + assert(length(yP)=N) + if N<=3 then + return bruteForceClosestPair(xP) + end if + sequence xL = xP[1..midN], + xR = xP[midN+1..N], + yL = {}, + yR = {} + atom xm = xP[midN][X] + for i=1 to N do + if yP[i][X]<=xm then + yL = append(yL,yP[i]) + else + yR = append(yR,yP[i]) + end if + end for + {atom dL, sequence pairL} = closestPair(xL, yL) + {atom dR, sequence pairR} = closestPair(xR, yR) + {atom dmin, sequence pairMin} = min({dL, pairL},{dR, pairR}) + sequence yS = {} + for i=1 to length(yP) do + if abs(xm-yP[i][X])<dmin then + yS = append(yS,yP[i]) + end if + end for + integer nS = length(yS) + {atom closest, sequence cPair} = {dmin*dmin, pairMin} + for i=1 to nS-1 do + integer k = i + 1 + while k<=nS and (yS[k][Y]-yS[i][Y])<dmin do + d = distsq(yS[k],yS[i]) + if d<closest then + {closest, cPair} = {d, {yS[k], yS[i]}} + end if + k += 1 + end while + end for + return {sqrt(closest), cPair} + end function + + {d,points} = closestPair(xP,yP) + {{x1,y1},{x2,y2}} = sort(deep_copy(points)) -- (see note above) + printf(1,"Closest pair: {%f,%f} {%f,%f}, distance=%f (%3.2fs)\n",{x1,y2,x2,y2,d,time()-t0}) + with javascript_semantics sequence collection = {} collection = append(collection,"one") collection = prepend(collection,2) ? collection -- {2,"one"} + with javascript_semantics setd("one",0) setd(2,0) @@ -7,3 +7,4 @@ return 1 end function traverse_dict(routine_id("visitor")) -- shows 2, "one" + + with javascript_semantics + function colourful(integer n) + if n<10 then return n>=0 end if + sequence digits = sq_sub(sprintf("%d",n),'0'), + ud = unique(deep_copy(digits)) + integer ln = length(digits) + if ud[1]<=1 or length(ud)!=ln then return false end if + for i=1 to ln-1 do + for j=i+1 to ln do + atom prod = product(digits[i..j]) + if find(prod,ud) then return false end if + ud &= prod + end for + end for + return true + end function -atom t0 = time() -sequence cn = apply(true,sprintf,{{"%2d"},filter(tagset(100,0),colourful)}) -printf(1,"The %d colourful numbers less than 100 are:\n%s\n", - {length(cn),join_by(cn,1,10," ")}) + atom t0 = time() + sequence cn = apply(true,sprintf,{{"%2d"},filter(tagset(100,0),colourful)}) + printf(1,"The %d colourful numbers less than 100 are:\n%s\n", + {length(cn),join_by(cn,1,10," ")}) -sequence count = repeat(0,8), - used = repeat(false,10) -integer largestcn = 0 + sequence count = repeat(0,8), + used = repeat(false,10) + integer largestcn = 0 -procedure count_colourful(integer taken=0, string n="") - if taken=0 then - for digit='0' to '9' do - integer dx = digit-'0'+1 - used[dx] = true - count_colourful(iff(digit<'2'?9:1),""&digit) - used[dx] = false - end for - else - integer nn = to_integer(n) - if colourful(nn) then - integer ln = length(n) - count[ln] += 1 - if nn>largestcn then largestcn = nn end if - end if - if taken<9 then - for digit='2' to '9' do - integer dx = digit-'0'+1 - if not used[dx] then - used[dx] = true - count_colourful(taken+1,n&digit) - used[dx] = false - end if - end for - end if - end if -end procedure -count_colourful() -printf(1,"The largest possible colourful number is: %,d\n\n",largestcn) -atom pow = 10 -for dc=1 to length(count) do - printf(1," %d digit colourful number count: %,6d - %7.3f%%\n", - {dc, count[dc], 100*count[dc]/pow}) - pow = iff(pow=10?90:pow*10) -end for -printf(1,"\nTotal colourful numbers: %,d\n", sum(count)) -?elapsed(time()-t0) + procedure count_colourful(integer taken=0, string n="") + if taken=0 then + for digit='0' to '9' do + integer dx = digit-'0'+1 + used[dx] = true + count_colourful(iff(digit<'2'?9:1),""&digit) + used[dx] = false + end for + else + integer nn = to_integer(n) + if colourful(nn) then + integer ln = length(n) + count[ln] += 1 + if nn>largestcn then largestcn = nn end if + end if + if taken<9 then + for digit='2' to '9' do + integer dx = digit-'0'+1 + if not used[dx] then + used[dx] = true + count_colourful(taken+1,n&digit) + used[dx] = false + end if + end for + end if + end if + end procedure + count_colourful() + printf(1,"The largest possible colourful number is: %,d\n\n",largestcn) + atom pow = 10 + for dc=1 to length(count) do + printf(1," %d digit colourful number count: %,6d - %7.3f%%\n", + {dc, count[dc], 100*count[dc]/pow}) + pow = iff(pow=10?90:pow*10) + end for + printf(1,"\nTotal colourful numbers: %,d\n", sum(count)) + ?elapsed(time()-t0) + n ) - - [ dip dup - ! dip ! / ] is p ( n n --> n ) - - [ tuck p swap ! / ] is c ( n n --> n ) - - ' [ [ 1 0 ] [ 12 4 ] [ 60 20 ] [ 105 103 ] [ 15000 333 ] ] - witheach - [ unpack 2dup - say " P(" - swap echo say "," echo - say ") = " - p shorten echo$ cr ] - cr - ' [ [ 10 5 ] [ 60 30 ] [ 50 48 ] [ 900 675 ] [ 970 730 ] ] - witheach - [ unpack 2dup - say " C(" - swap echo say "," echo - say ") = " - c shorten echo$ cr ] diff --git a/Task/Combinations-and-permutations/Rust/combinations-and-permutations.rs b/Task/Combinations-and-permutations/Rust/combinations-and-permutations.rust similarity index 100% rename from Task/Combinations-and-permutations/Rust/combinations-and-permutations.rs rename to Task/Combinations-and-permutations/Rust/combinations-and-permutations.rust diff --git a/Task/Combinations-and-permutations/Scheme/combinations-and-permutations.scm b/Task/Combinations-and-permutations/Scheme/combinations-and-permutations.ss similarity index 100% rename from Task/Combinations-and-permutations/Scheme/combinations-and-permutations.scm rename to Task/Combinations-and-permutations/Scheme/combinations-and-permutations.ss diff --git a/Task/Combinations-and-permutations/Uiua/combinations-and-permutations.uiua b/Task/Combinations-and-permutations/Uiua/combinations-and-permutations.uiua deleted file mode 100644 index ec81fca266..0000000000 --- a/Task/Combinations-and-permutations/Uiua/combinations-and-permutations.uiua +++ /dev/null @@ -1,15 +0,0 @@ -P ← /×+1˜↙⇡⊙¯ # Simple Perm calc. -C ← ÷/×+1⇡⤙P # Simple Comb calc. -# Better version: casts out common factors first. -C ← ( - AllFactors ← map⊕(⊃⊢⧻)⊸⊛▽⊸>₁/⊂(°/×) - ⊃(+1⇡◌|+1˜↙⇡⊙¯) # Collect numerator, denominator terms. - ⍆◴⊂◡∩(⊙◌°map)∩AllFactors # Identify common factors. - /×ⁿ⤚(-∩⌞≡⬚0get⊙¤⊙⊙¤) # Cast out, mult -) -≡⌞P 12 ↘1⇡12 -≡⌞C 60 ×10↘1⇡6 - -P 105 103 -P 15000 333 -C 900 674 diff --git a/Task/Combinations-and-permutations/VBScript/combinations-and-permutations.vbs b/Task/Combinations-and-permutations/VBScript/combinations-and-permutations.vb similarity index 100% rename from Task/Combinations-and-permutations/VBScript/combinations-and-permutations.vbs rename to Task/Combinations-and-permutations/VBScript/combinations-and-permutations.vb diff --git a/Task/Combinations-with-repetitions/Ada/combinations-with-repetitions.adb b/Task/Combinations-with-repetitions/Ada/combinations-with-repetitions.ada similarity index 100% rename from Task/Combinations-with-repetitions/Ada/combinations-with-repetitions.adb rename to Task/Combinations-with-repetitions/Ada/combinations-with-repetitions.ada diff --git a/Task/Combinations-with-repetitions/Crystal/combinations-with-repetitions.cr b/Task/Combinations-with-repetitions/Crystal/combinations-with-repetitions.crystal similarity index 100% rename from Task/Combinations-with-repetitions/Crystal/combinations-with-repetitions.cr rename to Task/Combinations-with-repetitions/Crystal/combinations-with-repetitions.crystal diff --git a/Task/Combinations-with-repetitions/DuckDB/combinations-with-repetitions.duckdb b/Task/Combinations-with-repetitions/DuckDB/combinations-with-repetitions.duckdb deleted file mode 100644 index b2312e949b..0000000000 --- a/Task/Combinations-with-repetitions/DuckDB/combinations-with-repetitions.duckdb +++ /dev/null @@ -1,49 +0,0 @@ -create or replace function choose(lst,k) as table ( - with recursive cte as ( - select 0 as ix, - lst[0:0] as combination -- i.e. an empty array of the correct type - union all - select ix+1, combination || [ lst[j] ] - from cte, range(ix+1, 1+length(lst) ) _(j) - where length(combination) < k - ) - select combination - from cte - where ix = k -); - -# Assume 0 0 s$ = "" @@ -14,7 +14,7 @@ proc output . print s$ . . -proc combine pos val . +proc combine pos val . . if pos > k output else diff --git a/Task/Combinations-with-repetitions/Elixir/combinations-with-repetitions.ex b/Task/Combinations-with-repetitions/Elixir/combinations-with-repetitions.elixir similarity index 100% rename from Task/Combinations-with-repetitions/Elixir/combinations-with-repetitions.ex rename to Task/Combinations-with-repetitions/Elixir/combinations-with-repetitions.elixir diff --git a/Task/Combinations-with-repetitions/Jq/combinations-with-repetitions-1.jq b/Task/Combinations-with-repetitions/Jq/combinations-with-repetitions-1.jq index bb25c96913..3972206ac5 100644 --- a/Task/Combinations-with-repetitions/Jq/combinations-with-repetitions-1.jq +++ b/Task/Combinations-with-repetitions/Jq/combinations-with-repetitions-1.jq @@ -6,5 +6,3 @@ def pick(n): else ([.[m]] + pick(n-1; m)), pick(n; m+1) end; pick(n;0) ; - -def count(s): reduce s as $_ (0; .+1); diff --git a/Task/Combinations-with-repetitions/Jq/combinations-with-repetitions-2.jq b/Task/Combinations-with-repetitions/Jq/combinations-with-repetitions-2.jq index 50f06bd1e4..6c2692b448 100644 --- a/Task/Combinations-with-repetitions/Jq/combinations-with-repetitions-2.jq +++ b/Task/Combinations-with-repetitions/Jq/combinations-with-repetitions-2.jq @@ -1,4 +1,4 @@ -"Pick 2:", + "Pick 2:", (["iced", "jam", "plain"] | pick(2)), - (count( [range(0;10)] | pick(3)) as $n - | "There are \($n) ways to pick 3 objects with replacement from 10.") + ([[range(0;10)] | pick(3)] | length) as $n + | "There are \($n) ways to pick 3 objects with replacement from 10." diff --git a/Task/Combinations-with-repetitions/Julia/combinations-with-repetitions.jl b/Task/Combinations-with-repetitions/Julia/combinations-with-repetitions.julia similarity index 100% rename from Task/Combinations-with-repetitions/Julia/combinations-with-repetitions.jl rename to Task/Combinations-with-repetitions/Julia/combinations-with-repetitions.julia diff --git a/Task/Combinations-with-repetitions/Kotlin/combinations-with-repetitions.kts b/Task/Combinations-with-repetitions/Kotlin/combinations-with-repetitions.kotlin similarity index 100% rename from Task/Combinations-with-repetitions/Kotlin/combinations-with-repetitions.kts rename to Task/Combinations-with-repetitions/Kotlin/combinations-with-repetitions.kotlin diff --git a/Task/Combinations-with-repetitions/OCaml/combinations-with-repetitions-1.ml b/Task/Combinations-with-repetitions/OCaml/combinations-with-repetitions-1.ocaml similarity index 100% rename from Task/Combinations-with-repetitions/OCaml/combinations-with-repetitions-1.ml rename to Task/Combinations-with-repetitions/OCaml/combinations-with-repetitions-1.ocaml diff --git a/Task/Combinations-with-repetitions/OCaml/combinations-with-repetitions-2.ml b/Task/Combinations-with-repetitions/OCaml/combinations-with-repetitions-2.ocaml similarity index 100% rename from Task/Combinations-with-repetitions/OCaml/combinations-with-repetitions-2.ml rename to Task/Combinations-with-repetitions/OCaml/combinations-with-repetitions-2.ocaml diff --git a/Task/Combinations-with-repetitions/PascalABC.NET/combinations-with-repetitions.pas b/Task/Combinations-with-repetitions/PascalABC.NET/combinations-with-repetitions.pas deleted file mode 100644 index be42b9c098..0000000000 --- a/Task/Combinations-with-repetitions/PascalABC.NET/combinations-with-repetitions.pas +++ /dev/null @@ -1,8 +0,0 @@ -## -var t:=|'iced', 'jam', 'plain'|; -var p:=t.CartesianPower(2).Where(t->t[0]<=t[1]); -write($'{p.Count}'); -Print(':'); -p.Println; -write((1..10).CartesianPower(3).Where(t->(t[0]<=t[1])and(t[1]<=t[2])).count); -Print(': Choices of 3 from 10'); diff --git a/Task/Combinations-with-repetitions/Pluto/combinations-with-repetitions.pluto b/Task/Combinations-with-repetitions/Pluto/combinations-with-repetitions.pluto deleted file mode 100644 index a5fb293809..0000000000 --- a/Task/Combinations-with-repetitions/Pluto/combinations-with-repetitions.pluto +++ /dev/null @@ -1,15 +0,0 @@ -require "perm" -local fmt = require "fmt" - -local function rep(a, multiple) - local aa = {} - for i = 1, #a do - for _ = 1, multiple do aa:insert(a[i]) end - end - return aa -end - -local a = {"iced", "jam", "plain"} -fmt.lprint(comb.list(rep(a, 2), 2, true)) -a = range(1, 10) -print(#comb.list(rep(a, 3), 3, true)) diff --git a/Task/Combinations-with-repetitions/Rust/combinations-with-repetitions.rs b/Task/Combinations-with-repetitions/Rust/combinations-with-repetitions.rust similarity index 100% rename from Task/Combinations-with-repetitions/Rust/combinations-with-repetitions.rs rename to Task/Combinations-with-repetitions/Rust/combinations-with-repetitions.rust diff --git a/Task/Combinations-with-repetitions/Scheme/combinations-with-repetitions-1.scm b/Task/Combinations-with-repetitions/Scheme/combinations-with-repetitions-1.ss similarity index 100% rename from Task/Combinations-with-repetitions/Scheme/combinations-with-repetitions-1.scm rename to Task/Combinations-with-repetitions/Scheme/combinations-with-repetitions-1.ss diff --git a/Task/Combinations-with-repetitions/Scheme/combinations-with-repetitions-2.scm b/Task/Combinations-with-repetitions/Scheme/combinations-with-repetitions-2.ss similarity index 100% rename from Task/Combinations-with-repetitions/Scheme/combinations-with-repetitions-2.scm rename to Task/Combinations-with-repetitions/Scheme/combinations-with-repetitions-2.ss diff --git a/Task/Combinations-with-repetitions/VBScript/combinations-with-repetitions.vbs b/Task/Combinations-with-repetitions/VBScript/combinations-with-repetitions.vb similarity index 100% rename from Task/Combinations-with-repetitions/VBScript/combinations-with-repetitions.vbs rename to Task/Combinations-with-repetitions/VBScript/combinations-with-repetitions.vb diff --git a/Task/Combinations/APL/combinations-1.apl b/Task/Combinations/APL/combinations-1.apl deleted file mode 100644 index 1fde8720bc..0000000000 --- a/Task/Combinations/APL/combinations-1.apl +++ /dev/null @@ -1,7 +0,0 @@ - comb←{(⍺=0)∨⍺=⍵:⌷⍉⍪⍳⍺ ⋄ (0,1+(⍺-1)∇ ⍵-1)⍪1+⍺ ∇ ⍵-1} - 4 comb 5 -0 1 2 3 -0 1 2 5 -0 1 4 5 -0 3 4 5 -2 3 4 5 diff --git a/Task/Combinations/APL/combinations-2.apl b/Task/Combinations/APL/combinations-2.apl deleted file mode 100644 index c0eebd9932..0000000000 --- a/Task/Combinations/APL/combinations-2.apl +++ /dev/null @@ -1,7 +0,0 @@ -comb←{ - ⍺{ - 0=⍺:⊂⍬ - 0=≢⍵:⍬ - ((⊃⍵),¨(⍺-1)∇r),⍺∇r←1↓⍵ - }⍳⍵ -} diff --git a/Task/Combinations/Ada/combinations-1.adb b/Task/Combinations/Ada/combinations-1.ada similarity index 100% rename from Task/Combinations/Ada/combinations-1.adb rename to Task/Combinations/Ada/combinations-1.ada diff --git a/Task/Combinations/Ada/combinations-2.adb b/Task/Combinations/Ada/combinations-2.ada similarity index 100% rename from Task/Combinations/Ada/combinations-2.adb rename to Task/Combinations/Ada/combinations-2.ada diff --git a/Task/Combinations/Crystal/combinations-1.cr b/Task/Combinations/Crystal/combinations-1.crystal similarity index 100% rename from Task/Combinations/Crystal/combinations-1.cr rename to Task/Combinations/Crystal/combinations-1.crystal diff --git a/Task/Combinations/Crystal/combinations-2.cr b/Task/Combinations/Crystal/combinations-2.crystal similarity index 100% rename from Task/Combinations/Crystal/combinations-2.cr rename to Task/Combinations/Crystal/combinations-2.crystal diff --git a/Task/Combinations/DuckDB/combinations.duckdb b/Task/Combinations/DuckDB/combinations.duckdb deleted file mode 100644 index 714f42167e..0000000000 --- a/Task/Combinations/DuckDB/combinations.duckdb +++ /dev/null @@ -1,22 +0,0 @@ -CREATE OR REPLACE FUNCTION combinations(n, k) as table ( - WITH RECURSIVE cte(current, remaining) AS ( - -- start with empty combination and the full list - SELECT - [], - range(1, n + 1) - UNION ALL - -- recursive case: add one item to the current combination - SELECT - current || remaining[j:j], - remaining[j+1:] - FROM cte, range(1, length(remaining)+1) _(j) - WHERE length(current) < k - ) - SELECT current AS combination - FROM cte - WHERE length(current) = k -); - -## Example: -FROM combinations(5,3) -ORDER BY combination; diff --git a/Task/Combinations/EasyLang/combinations.easy b/Task/Combinations/EasyLang/combinations.easy index 34c4b35b4d..17b909ce4a 100644 --- a/Task/Combinations/EasyLang/combinations.easy +++ b/Task/Combinations/EasyLang/combinations.easy @@ -2,14 +2,14 @@ n = 5 m = 3 len result[] m # -proc combinations pos val . - if pos > m +proc combinations pos val . . + if pos <= m + for i = val to n - m + result[pos] = pos + i + combinations pos + 1 i + . + else print result[] - return - . - for i = val to pos + n - m - result[pos] = i - combinations pos + 1 i + 1 . . -combinations 1 1 +combinations 1 0 diff --git a/Task/Combinations/Elena/combinations.elena b/Task/Combinations/Elena/combinations.elena index 2cd24012e3..c4903032f5 100644 --- a/Task/Combinations/Elena/combinations.elena +++ b/Task/Combinations/Elena/combinations.elena @@ -10,13 +10,13 @@ Numbers(n) ^ Array.allocate(n).populate::(int n => n) } -public Program() +public program() { var numbers := Numbers(N); Combinator.new(M, numbers).forEach::(row) { - Console.printLine(row.toString()) + console.printLine(row.toString()) }; - Console.readChar() + console.readChar() } diff --git a/Task/Combinations/Elixir/combinations.ex b/Task/Combinations/Elixir/combinations.elixir similarity index 100% rename from Task/Combinations/Elixir/combinations.ex rename to Task/Combinations/Elixir/combinations.elixir diff --git a/Task/Combinations/Emacs-Lisp/combinations.el b/Task/Combinations/Emacs-Lisp/combinations.l similarity index 100% rename from Task/Combinations/Emacs-Lisp/combinations.el rename to Task/Combinations/Emacs-Lisp/combinations.l diff --git a/Task/Combinations/Euphoria/combinations.eu b/Task/Combinations/Euphoria/combinations.eu deleted file mode 100644 index 522f4df73e..0000000000 --- a/Task/Combinations/Euphoria/combinations.eu +++ /dev/null @@ -1,32 +0,0 @@ -sequence combinations = {} - -procedure recurse(sequence remaining, /* digits remaining to compute */ - integer ne, /* number of digits expected for a valid combination */ - sequence selected = {}) /* digits already selected for a potential combination */ - integer nr = length(remaining) -- number of digits remaining to compute - integer ns = length(selected) -- number of digits already selected for a potential combination - if ns+nr = ne then - combinations = append(combinations, selected & remaining) - return - end if - if nr = 1 or ns = ne then - combinations = append(combinations, selected) - return - end if - -- select next - recurse(remove(remaining, 1), ne, selected & remaining[1]) - -- skip next - recurse(remove(remaining, 1), ne, selected) -end procedure - -function get_combinations(sequence s, integer lg) - combinations = {} - recurse(s, lg) - return combinations -end function - -constant TEST_SEQUENCE = {0,1,2,3,4} - -combinations = {} -recurse(TEST_SEQUENCE, 3) -? combinations diff --git a/Task/Combinations/FOCAL/combinations.focal b/Task/Combinations/FOCAL/combinations.focal deleted file mode 100644 index 9a95a01740..0000000000 --- a/Task/Combinations/FOCAL/combinations.focal +++ /dev/null @@ -1,17 +0,0 @@ -01.10 S M=3 -01.20 S N=5 -01.30 D 2 -01.40 Q - -02.10 F I=1,M;S C(I)=I-1 -02.20 D 3 -02.30 S I=M -02.40 S C(I)=C(I)+1 -02.50 I (C(I)-N+M-I)2.8 -02.60 S I=I-1 -02.70 I (-I)2.4;R -02.80 F J=I+1,M;S C(J)=C(J-1)+1 -02.90 G 2.2 - -03.10 F I=1,M;T %3,C(I) -03.20 T ! diff --git a/Task/Combinations/Frink/combinations.frink b/Task/Combinations/Frink/combinations.frink deleted file mode 100644 index 16a86a5857..0000000000 --- a/Task/Combinations/Frink/combinations.frink +++ /dev/null @@ -1,7 +0,0 @@ -combinations[m, n] := -{ - a = toArray[0 to n-1] - return lexicalSort[a.combinations[m]] -} - -println[formatTable[combinations[3,5]]] diff --git a/Task/Combinations/FutureBasic/combinations.basic b/Task/Combinations/FutureBasic/combinations.basic deleted file mode 100644 index 6953e2870c..0000000000 --- a/Task/Combinations/FutureBasic/combinations.basic +++ /dev/null @@ -1,16 +0,0 @@ -void local fn Combinations( currStr as CFStringRef, start as int, stp as int, depth as int ) - int i - - for i = start to stp - if depth = 0 then printf @"%@ %d", currStr, i - fn Combinations( fn StringWithFormat( @"%@ %d", currStr, i ), i+1, stp, depth-1 ) - next -end fn - -int n : n = 3 -int m : m = 5 - -printf @" %d combinations of integers 0 through %d are:", n, m-1 -fn Combinations( @"", 0, m-1, n-1 ) - -HandleEvents diff --git a/Task/Combinations/J/combinations-10.j b/Task/Combinations/J/combinations-10.j deleted file mode 100644 index 13e4c36a64..0000000000 --- a/Task/Combinations/J/combinations-10.j +++ /dev/null @@ -1 +0,0 @@ -combb=: (#~ ((-:/:~)>/:~-:\:~)"1)@(# #: [: i. ^~) diff --git a/Task/Combinations/J/combinations-5.j b/Task/Combinations/J/combinations-5.j index c026f8839f..b3a630bb1f 100644 --- a/Task/Combinations/J/combinations-5.j +++ b/Task/Combinations/J/combinations-5.j @@ -1 +1,3 @@ -combr=: ((0,.$:&.<:),1+($:<:))` (<:i.@,[) @.(>:+.0=[)M. +combr=: dyad define M. + if. (x>:y)+.0=x do. i.(x<:y),x else. (0,.x combr&.<: y),1+x combr y-1 end. +) diff --git a/Task/Combinations/J/combinations-6.j b/Task/Combinations/J/combinations-6.j index b3a630bb1f..980099ca22 100644 --- a/Task/Combinations/J/combinations-6.j +++ b/Task/Combinations/J/combinations-6.j @@ -1,3 +1,7 @@ -combr=: dyad define M. - if. (x>:y)+.0=x do. i.(x<:y),x else. (0,.x combr&.<: y),1+x combr y-1 end. + combr=: dyad define + if.(x=#y) +. x=1 do. + y + else. + (({.y) ,. (x-1) combr (}.y)) , (x combr }.y) + end. ) diff --git a/Task/Combinations/J/combinations-7.j b/Task/Combinations/J/combinations-7.j index e1c75813ab..13e4c36a64 100644 --- a/Task/Combinations/J/combinations-7.j +++ b/Task/Combinations/J/combinations-7.j @@ -1 +1 @@ -combr1=: (({.@],.<:@[$:}.@]),($:}.))` ] @.((= #)+.1=[) +combb=: (#~ ((-:/:~)>/:~-:\:~)"1)@(# #: [: i. ^~) diff --git a/Task/Combinations/J/combinations-8.j b/Task/Combinations/J/combinations-8.j deleted file mode 100644 index 399595ae74..0000000000 --- a/Task/Combinations/J/combinations-8.j +++ /dev/null @@ -1,7 +0,0 @@ - combr1=: dyad define - if.(x=#y) +. x=1 do. - y - else. - (({.y) ,. (x-1) combr (}.y)) , (x combr }.y) - end. -) diff --git a/Task/Combinations/J/combinations-9.j b/Task/Combinations/J/combinations-9.j deleted file mode 100644 index b5d40efaeb..0000000000 --- a/Task/Combinations/J/combinations-9.j +++ /dev/null @@ -1 +0,0 @@ -comb3=: ((= +/"1) |.@:I.@# ]) #:@i.@(2&^) diff --git a/Task/Combinations/Java/combinations-2.java b/Task/Combinations/Java/combinations-2.java deleted file mode 100644 index 7a9bfe00d0..0000000000 --- a/Task/Combinations/Java/combinations-2.java +++ /dev/null @@ -1,29 +0,0 @@ -import java.util.ArrayList; -import java.util.List; - -public final class Combinations { - - public static void main(String[] args) { - System.out.println(createCombinations(List.of( 0, 1, 2, 3, 4 ), 3)); - System.out.println(createCombinations(List.of( "Crosby", "Nash", "Stills", "Young" ), 3)); - } - - private static List> createCombinations(List elements, int k) { - List> combinations = new ArrayList>(); - createCombinations(elements, k, new ArrayList(), combinations, 0); - return combinations; - } - - private static void createCombinations( - List elements, int k, List accumulator, List> combinations, int index) { - if ( accumulator.size() == k ) { - combinations.addFirst( new ArrayList(accumulator) ); - } else if ( k - accumulator.size() <= elements.size() - index ) { - createCombinations(elements, k, accumulator, combinations, index + 1); - accumulator.add(elements.get(index)); - createCombinations(elements, k, accumulator, combinations, index + 1); - accumulator.removeLast(); - } - } - -} diff --git a/Task/Combinations/Java/combinations-1.java b/Task/Combinations/Java/combinations.java similarity index 100% rename from Task/Combinations/Java/combinations-1.java rename to Task/Combinations/Java/combinations.java diff --git a/Task/Combinations/Julia/combinations-1.jl b/Task/Combinations/Julia/combinations-1.julia similarity index 100% rename from Task/Combinations/Julia/combinations-1.jl rename to Task/Combinations/Julia/combinations-1.julia diff --git a/Task/Combinations/Julia/combinations-2.jl b/Task/Combinations/Julia/combinations-2.julia similarity index 100% rename from Task/Combinations/Julia/combinations-2.jl rename to Task/Combinations/Julia/combinations-2.julia diff --git a/Task/Combinations/Julia/combinations-3.jl b/Task/Combinations/Julia/combinations-3.julia similarity index 100% rename from Task/Combinations/Julia/combinations-3.jl rename to Task/Combinations/Julia/combinations-3.julia diff --git a/Task/Combinations/Kotlin/combinations-1.kts b/Task/Combinations/Kotlin/combinations-1.kotlin similarity index 100% rename from Task/Combinations/Kotlin/combinations-1.kts rename to Task/Combinations/Kotlin/combinations-1.kotlin diff --git a/Task/Combinations/Kotlin/combinations-2.kts b/Task/Combinations/Kotlin/combinations-2.kotlin similarity index 100% rename from Task/Combinations/Kotlin/combinations-2.kts rename to Task/Combinations/Kotlin/combinations-2.kotlin diff --git a/Task/Combinations/M2000-Interpreter/combinations-1.m2000 b/Task/Combinations/M2000-Interpreter/combinations-1.m2000 index 47e46a34ce..a5f1f5bb7e 100644 --- a/Task/Combinations/M2000-Interpreter/combinations-1.m2000 +++ b/Task/Combinations/M2000-Interpreter/combinations-1.m2000 @@ -1,32 +1,41 @@ Module Checkit { - Function Combinations (m as long, n as long){ - Global a$ - Document a$ + Global a$ + Document a$ + Module Combinations (m as long, n as long){ Module Level (n, s, h) { - If n=1 then - while Len(s) - a$<=h#str$("-")+"-"+car(s)#str$()+{ - } + If n=1 then { + while Len(s) { + Print h, car(s) + ToClipBoard() s=cdr(s) - End While - Else - While len(s) + } + } Else { + While len(s) { call Level n-1, cdr(s), cons(h, car(s)) s=cdr(s) - End While - End if + } + } + Sub ToClipBoard() + local m=each(h) + Local b$="" + While m { + b$+=If$(Len(b$)<>0->" ","")+Format$("{0::-10}",Array(m)) + } + b$+=If$(Len(b$)<>0->" ","")+Format$("{0::-10}",Array(s,0))+{ + } + a$<=b$ ' assign to global need <= + End Sub } If m<1 or n<1 then Error s=(,) - for i=0 to n-1 - Append s, (i,) - next - s=s#sort() + for i=0 to n-1 { + s=cons(s, (i,)) + } Head=(,) Call Level m, s, Head - =a$ } - ClipBoard Combinations( 3, 5) - report clipboard$ + Clear a$ + Combinations 3, 5 + ClipBoard a$ } Checkit diff --git a/Task/Combinations/M2000-Interpreter/combinations-2.m2000 b/Task/Combinations/M2000-Interpreter/combinations-2.m2000 index 9d851f853b..96566c892d 100644 --- a/Task/Combinations/M2000-Interpreter/combinations-2.m2000 +++ b/Task/Combinations/M2000-Interpreter/combinations-2.m2000 @@ -1,55 +1,45 @@ Module StepByStep { - Function CombinationsStep (a, nn) { - c1=lambda (&f, &a) ->{ - =car(a) : a=cdr(a) : f=len(a)=0 - } - m=len(a) - c=c1 - n=m-nn+1 - p=2 - While m>n - c1=lambda c2=c,n=p, z=(,) (&f, &m) ->{ - if len(z)=0 then z=cdr(m) - =cons(car(m),c2(&f, &z)) - if f then z=(,) : m=cdr(m) : f=len(m)+len(z) { - =c(&f, &a) + Function CombinationsStep (a, nn) { + c1=lambda (&f, &a) ->{ + =car(a) : a=cdr(a) : f=len(a)=0 } - } - enum out {screen="", file="out.txt"} - m=each(out) - while m - open eval(m) for output as #f - k=false - StepA=CombinationsStep((1, 2, 3, 4,5), 3) - While not k - Print #f, StepA(&k)#str$() - End While - Print #f - k=false - StepA=CombinationsStep((0, 1, 2, 3, 4), 3) - While not k - Print #f, StepA(&k)#str$() - End While - Print #f - k=false - StepA=CombinationsStep(("A", "B", "C", "D","E"), 3) - While not k - Print #f, StepA(&k)#str$("-") - End While - Print #f - k=false - StepA=CombinationsStep(("CAT", "DOG", "BAT"), 2) - While not k - Print #f, StepA(&k)#str$("-") - End While - close #f - end while - win "notepad", dir$+file + m=len(a) + c=c1 + n=m-nn+1 + p=2 + while m>n { + c1=lambda c2=c,n=p, z=(,) (&f, &m) ->{ + if len(z)=0 then z=cdr(m) + =cons(car(m),c2(&f, &z)) + if f then z=(,) : m=cdr(m) : f=len(m)+len(z) { + =c(&f, &a) + } + } + k=false + StepA=CombinationsStep((1, 2, 3, 4,5), 3) + while not k { + Print StepA(&k) + } + k=false + StepA=CombinationsStep((0, 1, 2, 3, 4), 3) + while not k { + Print StepA(&k) + } + k=false + StepA=CombinationsStep(("A", "B", "C", "D","E"), 3) + while not k { + Print StepA(&k) + } + k=false + StepA=CombinationsStep(("CAT", "DOG", "BAT"), 2) + while not k { + Print StepA(&k) + } } StepByStep diff --git a/Task/Combinations/Miranda/combinations.miranda b/Task/Combinations/Miranda/combinations.miranda deleted file mode 100644 index eecb62e799..0000000000 --- a/Task/Combinations/Miranda/combinations.miranda +++ /dev/null @@ -1,8 +0,0 @@ -main :: [sys_message] -main = [Stdout (lay (map show (comb 3 5)))] - -comb :: num->num->[[num]] -comb m n = comb' m [0..n-1] - where comb' 0 xs = [[]] - comb' m [] = [] - comb' m (x:xs) = map (x:) (comb' (m-1) xs) ++ comb' m xs diff --git a/Task/Combinations/OCaml/combinations.ml b/Task/Combinations/OCaml/combinations.ocaml similarity index 100% rename from Task/Combinations/OCaml/combinations.ml rename to Task/Combinations/OCaml/combinations.ocaml diff --git a/Task/Combinations/PascalABC.NET/combinations.pas b/Task/Combinations/PascalABC.NET/combinations.pas deleted file mode 100644 index c57e1ec639..0000000000 --- a/Task/Combinations/PascalABC.NET/combinations.pas +++ /dev/null @@ -1,2 +0,0 @@ -## -(0..4).combinations(3).printlines; diff --git a/Task/Combinations/Pluto/combinations.pluto b/Task/Combinations/Pluto/combinations.pluto deleted file mode 100644 index 7ce223467b..0000000000 --- a/Task/Combinations/Pluto/combinations.pluto +++ /dev/null @@ -1,10 +0,0 @@ -require "perm" -local fmt = require "fmt" - -local a = range(0, 4) -local co = coroutine.create(comb.generate) -while true do - local _, res = coroutine.resume(co, a, 3) - if !res then break end - fmt.lprint(res) -end diff --git a/Task/Combinations/PowerShell/combinations.ps1 b/Task/Combinations/PowerShell/combinations.psh similarity index 100% rename from Task/Combinations/PowerShell/combinations.ps1 rename to Task/Combinations/PowerShell/combinations.psh diff --git a/Task/Combinations/Pyret/combinations.arr b/Task/Combinations/Pyret/combinations.pyret similarity index 100% rename from Task/Combinations/Pyret/combinations.arr rename to Task/Combinations/Pyret/combinations.pyret diff --git a/Task/Combinations/Quackery/combinations-1.quackery b/Task/Combinations/Quackery/combinations-1.quackery index ccf881afbe..697808559d 100644 --- a/Task/Combinations/Quackery/combinations-1.quackery +++ b/Task/Combinations/Quackery/combinations-1.quackery @@ -1,21 +1,48 @@ + [ 0 swap + [ dup 0 != while + dup 1 & if + [ dip 1+ ] + 1 >> again ] + drop ] is bits ( n --> n ) + + [ [] unrot + bit times + [ i bits + over = if + [ dip + [ i join ] ] ] + drop ] is combnums ( n n --> [ ) + + [ [] 0 rot + [ dup 0 != while + dup 1 & if + [ dip + [ dup dip join ] ] + dip 1+ + 1 >> + again ] + 2drop ] is makecomb ( n --> [ ) + [ over 0 = iff - [ 2drop ' [ [ ] ] ] - done - dup [] = iff nip done - 1 split rot tuck - 1 - over recurse - dip [ rot [] ] - witheach - [ dip over join - nested join ] - nip unrot recurse join ] is comb ( n [ --> [ ) + [ 2drop [] ] done + combnums + [] swap witheach + [ makecomb + nested join ] ] is comb ( n n --> [ ) - [ [] swap times - [ i^ join ] - comb - witheach - [ witheach - [ echo sp ] - cr ] ] is task ( n n --> ) + [ behead swap witheach max ] is largest ( [ --> n ) - 3 5 task + [ 0 rot witheach + [ [ dip [ over * ] ] + ] + nip ] is comborder ( [ n --> n ) + + [ dup [] != while + sortwith + [ 2dup join + largest 1+ dup dip + [ comborder swap ] + comborder < ] ] is sortcombs ( [ --> [ ) + + 3 5 comb + sortcombs + witheach [ witheach [ echo sp ] cr ] diff --git a/Task/Combinations/Quackery/combinations-2.quackery b/Task/Combinations/Quackery/combinations-2.quackery index 697808559d..5626470d75 100644 --- a/Task/Combinations/Quackery/combinations-2.quackery +++ b/Task/Combinations/Quackery/combinations-2.quackery @@ -1,48 +1,31 @@ - [ 0 swap - [ dup 0 != while - dup 1 & if - [ dip 1+ ] - 1 >> again ] - drop ] is bits ( n --> n ) + [ stack ] is comb.stack + [ stack ] is comb.items + [ stack ] is comb.required + [ stack ] is comb.result - [ [] unrot - bit times - [ i bits - over = if - [ dip - [ i join ] ] ] - drop ] is combnums ( n n --> [ ) - - [ [] 0 rot - [ dup 0 != while - dup 1 & if - [ dip - [ dup dip join ] ] - dip 1+ - 1 >> - again ] - 2drop ] is makecomb ( n --> [ ) - - [ over 0 = iff - [ 2drop [] ] done - combnums - [] swap witheach - [ makecomb - nested join ] ] is comb ( n n --> [ ) - - [ behead swap witheach max ] is largest ( [ --> n ) - - [ 0 rot witheach - [ [ dip [ over * ] ] + ] - nip ] is comborder ( [ n --> n ) - - [ dup [] != while - sortwith - [ 2dup join - largest 1+ dup dip - [ comborder swap ] - comborder < ] ] is sortcombs ( [ --> [ ) + [ 1 - comb.items put + 1+ comb.required put + 0 comb.stack put + [] comb.result put + [ comb.required share + comb.stack size = if + [ comb.result take + comb.stack behead + drop nested join + comb.result put ] + comb.stack take + dup comb.items share + = iff + [ drop + comb.stack size 1 > iff + [ 1 comb.stack tally ] ] + else + [ dup comb.stack put + 1+ comb.stack put ] + comb.stack size 1 = until ] + comb.items release + comb.required release + comb.result take ] is comb ( n n --> ) 3 5 comb - sortcombs witheach [ witheach [ echo sp ] cr ] diff --git a/Task/Combinations/Quackery/combinations-3.quackery b/Task/Combinations/Quackery/combinations-3.quackery index 5626470d75..721a651555 100644 --- a/Task/Combinations/Quackery/combinations-3.quackery +++ b/Task/Combinations/Quackery/combinations-3.quackery @@ -1,31 +1,16 @@ - [ stack ] is comb.stack - [ stack ] is comb.items - [ stack ] is comb.required - [ stack ] is comb.result - - [ 1 - comb.items put - 1+ comb.required put - 0 comb.stack put - [] comb.result put - [ comb.required share - comb.stack size = if - [ comb.result take - comb.stack behead - drop nested join - comb.result put ] - comb.stack take - dup comb.items share - = iff - [ drop - comb.stack size 1 > iff - [ 1 comb.stack tally ] ] - else - [ dup comb.stack put - 1+ comb.stack put ] - comb.stack size 1 = until ] - comb.items release - comb.required release - comb.result take ] is comb ( n n --> ) + [ dup size dip + [ witheach + [ over swap peek swap ] ] + nip pack ] is arrange ( [ [ --> [ ) + ' [ 10 20 30 40 50 ] 3 5 comb - witheach [ witheach [ echo sp ] cr ] + witheach + [ dip dup arrange + witheach [ echo sp ] + cr ] + drop + cr + $ "zero one two three four" nest$ + ' [ 4 3 1 0 1 4 3 ] arrange + witheach [ echo$ sp ] diff --git a/Task/Combinations/Quackery/combinations-4.quackery b/Task/Combinations/Quackery/combinations-4.quackery deleted file mode 100644 index 721a651555..0000000000 --- a/Task/Combinations/Quackery/combinations-4.quackery +++ /dev/null @@ -1,16 +0,0 @@ - [ dup size dip - [ witheach - [ over swap peek swap ] ] - nip pack ] is arrange ( [ [ --> [ ) - - ' [ 10 20 30 40 50 ] - 3 5 comb - witheach - [ dip dup arrange - witheach [ echo sp ] - cr ] - drop - cr - $ "zero one two three four" nest$ - ' [ 4 3 1 0 1 4 3 ] arrange - witheach [ echo$ sp ] diff --git a/Task/Combinations/Refal/combinations.refal b/Task/Combinations/Refal/combinations.refal deleted file mode 100644 index 8b8d5ce984..0000000000 --- a/Task/Combinations/Refal/combinations.refal +++ /dev/null @@ -1,23 +0,0 @@ -$ENTRY Go { - = >; -}; - -Comb { - s.M s.N = >>; -}; - -Comb1 { - 0 e.X = (); - s.M = ; - s.M s.X e.X = e.X>> ; -}; - -PfxEach { - s.X = ; - s.X (e.X) e.Y = (s.X e.X) ; -}; - -Iota { - s.E s.E = s.E; - s.S s.E = s.S s.E>; -}; diff --git a/Task/Combinations/Rust/combinations-1.rs b/Task/Combinations/Rust/combinations-1.rust similarity index 100% rename from Task/Combinations/Rust/combinations-1.rs rename to Task/Combinations/Rust/combinations-1.rust diff --git a/Task/Combinations/Rust/combinations-2.rs b/Task/Combinations/Rust/combinations-2.rust similarity index 100% rename from Task/Combinations/Rust/combinations-2.rs rename to Task/Combinations/Rust/combinations-2.rust diff --git a/Task/Combinations/Rust/combinations-3.rs b/Task/Combinations/Rust/combinations-3.rust similarity index 100% rename from Task/Combinations/Rust/combinations-3.rs rename to Task/Combinations/Rust/combinations-3.rust diff --git a/Task/Combinations/Scheme/combinations.scm b/Task/Combinations/Scheme/combinations.ss similarity index 100% rename from Task/Combinations/Scheme/combinations.scm rename to Task/Combinations/Scheme/combinations.ss diff --git a/Task/Combinations/Tailspin/combinations.tailspin b/Task/Combinations/Tailspin/combinations.tailspin deleted file mode 100644 index 9f728e50c4..0000000000 --- a/Task/Combinations/Tailspin/combinations.tailspin +++ /dev/null @@ -1,7 +0,0 @@ -operator (m comb n) - [by 0..~$n] -> # - when <[](..~$m)> do [$..., by $(last)~..~$n] -> # - otherwise $! -end comb - -(3 comb 5) -> !OUT::write diff --git a/Task/Combinations/Uiua/combinations.uiua b/Task/Combinations/Uiua/combinations.uiua deleted file mode 100644 index e0d299cce6..0000000000 --- a/Task/Combinations/Uiua/combinations.uiua +++ /dev/null @@ -1,3 +0,0 @@ -3 5 # 3 combo 5 -⊙⇡ # Create the array of numbers -⧅< # Get the permutations diff --git a/Task/Combinations/VBScript/combinations.vbs b/Task/Combinations/VBScript/combinations.vb similarity index 100% rename from Task/Combinations/VBScript/combinations.vbs rename to Task/Combinations/VBScript/combinations.vb diff --git a/Task/Comma-quibbling/00-TASK.txt b/Task/Comma-quibbling/00-TASK.txt index 6e334a374a..4e431d60f7 100644 --- a/Task/Comma-quibbling/00-TASK.txt +++ b/Task/Comma-quibbling/00-TASK.txt @@ -1,4 +1,4 @@ -Comma quibbling is a task originally set by Eric Lippert in his [https://web.archive.org/web/20190202111812/https://blogs.msdn.microsoft.com/ericlippert/2009/04/15/comma-quibbling/ blog]. +Comma quibbling is a task originally set by Eric Lippert in his [http://blogs.msdn.com/b/ericlippert/archive/2009/04/15/comma-quibbling.aspx blog]. ;Task: @@ -11,15 +11,12 @@ Write a function to generate a string output which is the concatenation of input
    Test your function with the following series of inputs showing your output here on this page: -* [] # (No input words). +* [] # (No input words). * ["ABC"] * ["ABC", "DEF"] * ["ABC", "DEF", "G", "H"]
    Note: Assume words are non-empty strings of uppercase characters for this task. - - -{{Template:Strings}}

    diff --git a/Task/Comma-quibbling/AArch64-Assembly/comma-quibbling.aarch64 b/Task/Comma-quibbling/AArch64-Assembly/comma-quibbling.aarch64 deleted file mode 100644 index 50ff3b829d..0000000000 --- a/Task/Comma-quibbling/AArch64-Assembly/comma-quibbling.aarch64 +++ /dev/null @@ -1,270 +0,0 @@ -/* ARM assembly AARCH64 Raspberry PI 3B */ -/* program Comma quibbling */ - -/*******************************************/ -/* Constantes */ -/*******************************************/ -/* for this file see task include a file in language AArch64 assembly*/ -.include "../includeConstantesARM64.inc" -.equ BUFFERSIZE, 80 - -/*******************************************/ -/* macros */ -/*******************************************/ -//.include "../../ficmacros64.inc" // for developper debugging - -/*********************************/ -/* Initialized data */ -/*********************************/ -.data -szMessDebutPgm: .asciz "Program 64 bits start. \n" -szCarriageReturn: .asciz "\n" -szMessFinOK: .asciz "Program normal end. \n" -szMessStringError: .asciz "Error : Empty string !!!\n" -szMessBufferError: .asciz "Error : Buffer too small !!\n" -szMessEndStringError: .asciz "Error: End string, not ].\n" -szMessWordErr: .asciz "Error word empty.\n" -szAnd: .asciz " and " -szString1: .asciz "[]" -szString2: .asciz "[\"ABC\"]" -szString3: .asciz "[\"ABC\",\"DEF\"]" -szString4: .asciz "[\"ABC\",\"DEF\",\"G\",\"H\"]" -szString5: .asciz "[\"AB" -szString6: .asciz "[\"ABC\",,\"DEF\"]" - -.align 4 -/*********************************/ -/* UnInitialized data */ -/*********************************/ -.bss -sBuffer: .skip BUFFERSIZE -.align 4 - -/*********************************/ -/* code section */ -/*********************************/ -.text -.global main -main: - ldr x0,qAdrszMessDebutPgm - bl affichageMess // start message - - ldr x0,qAdrszString1 - bl execTest - ldr x0,qAdrszString2 - bl execTest - ldr x0,qAdrszString3 - bl execTest - ldr x0,qAdrszString4 - bl execTest - ldr x0,qAdrszString5 - bl execTest - ldr x0,qAdrszString6 - bl execTest - - ldr x0,qAdrszMessFinOK - bl affichageMess - -100: - mov x8,EXIT - svc #0 // system call -qAdrszMessDebutPgm: .quad szMessDebutPgm -qAdrszMessFinOK: .quad szMessFinOK -qAdrszCarriageReturn: .quad szCarriageReturn -qAdrszString1: .quad szString1 -qAdrszString2: .quad szString2 -qAdrszString3: .quad szString3 -qAdrszString4: .quad szString4 -qAdrszString5: .quad szString5 -qAdrszString6: .quad szString6 -qAdrsBuffer: .quad sBuffer -/******************************************************************/ -/* test execution */ -/******************************************************************/ -/* x0 contains string address */ -execTest: - stp x1,lr,[sp,-16]! - stp x2,x4,[sp,-16]! - mov x4,x0 - bl affichageMess // display start string - ldr x0,qAdrszCarriageReturn - bl affichageMess - mov x0,x4 // string address - ldr x1,qAdrsBuffer // buffer address - mov x2,#BUFFERSIZE - bl stringAnalyse - cmp x0,#-1 // error ? - beq 100f - ldr x0,qAdrsBuffer // buffer display - bl affichageMess - ldr x0,qAdrszCarriageReturn - bl affichageMess -100: - ldp x2,x4,[sp],16 - ldp x1,lr,[sp],16 - ret -/******************************************************************/ -/* string conversion */ -/******************************************************************/ -/* x0 contains string address */ -/* x1 contains buffer address */ -/* x2 contains buffer length */ -stringAnalyse: - stp x1,lr,[sp,-16]! - stp x2,x3,[sp,-16]! - stp x4,x5,[sp,-16]! - stp x6,x7,[sp,-16]! - stp x8,x9,[sp,-16]! - sub sp,sp,#BUFFERSIZE // reserve area on stack for temporary buffer - mov fp,sp - mov x7,#0 // indice write buffer - mov x5,#0 // word counter - mov x6,#0 // word char count - - mov x3,#0 // indice string -1: - ldrb w4,[x0,x3] // load string char - cmp x4,#0 // end ? - bne 2f - cmp x3,#0 // first char ? - beq 97f // error empty string - b 97f // end string error -2: - cmp x4,#'[' // first symbol ? - bne 3f - mov x4,#'{' // write symbol - strb w4,[x1,x7] - add x7,x7,#1 - cmp x7,x2 - bge 99f // buffer error - add x3,x3,#1 // increment indice - b 1b // and loop - 3: - cmp x4,#']' // end symbol ? - bne 8f - cmp x5,#0 // no word ? - beq 7f - cmp x5,#1 - beq 5f // last and first word - - mov x9,#0 - ldr x12,qAdrszAnd -4: // loop write and - ldrb w4,[x12,x9] - strb w4,[x1,x7] - add x7,x7,#1 - cmp x7,x2 - bge 99f // buffer error - add x9,x9,#1 - cmp x9,#5 - blt 4b - -5: // last word - mov x9,#0 -6: // loop write temporary buffer - ldrb w4,[fp,x9] - strb w4,[x1,x7] - add x7,x7,#1 - cmp x7,x2 - bge 99f // buffer error - add x9,x9,#1 - cmp x9,x6 - blt 6b - mov x6,#0 // raz indice temporary buffer -7: - mov x4,#'}' - strb w4,[x1,x7] - add x7,x7,#1 - cmp x7,x2 - bge 99f // buffer error - mov x4,#0 - strb w4,[x1,x7] // final 0 - b 100f -8: - cmp x4,#',' // comma ? - beq 9f - cmp x6,#0 - cinc x5,x5,eq // new word increment word counter - //addeq x5,x5,#1 // new word increment word counter - strb w4,[fp,x6] // store char in temporary buffer - add x6,x6,#1 - add x3,x3,#1 - b 1b // loop - -9: - cmp x6,#0 // word empty ? - beq 96f - cmp x5,#1 // first word ? - bne 11f - // first word, write only the word - mov x9,#0 -10: // loop write temporary buffer - ldrb w4,[fp,x9] - strb w4,[x1,x7] - add x7,x7,#1 - cmp x7,x2 - bge 99f // buffer error - add x9,x9,#1 - cmp x9,x6 - blt 10b - mov x6,#0 // raz indice temporary buffer - add x3,x3,#1 - b 1b // loop -11: - mov x4,#',' - strb w4,[x1,x7] - add x7,x7,#1 - cmp x7,x2 - bge 99f // buffer error - - mov x9,#0 -12: // loop write temporary buffer - ldrb w4,[fp,x9] - strb w4,[x1,x7] - add x7,x7,#1 - cmp x7,x2 - bge 99f // buffer error - add x9,x9,#1 - cmp x9,x6 - blt 12b - mov x6,#0 // raz indice temporary buffer - add x3,x3,#1 - b 1b // loop - -96: // errors messages - ldr x0,qAdrszMessWordErr - bl affichageMess - mov x0,#-1 - b 100f -97: - ldr x0,qAdrszMessEndStringErr - bl affichageMess - mov x0,#-1 - b 100f -98: - ldr x0,qAdrszMessStringError - bl affichageMess - mov x0,#-1 - b 100f -99: - ldr x0,qAdrszMessBufferError - bl affichageMess - mov x0,#-1 -100: - add sp,sp,#BUFFERSIZE - ldp x8,x9,[sp],16 - ldp x6,x7,[sp],16 - ldp x4,x5,[sp],16 - ldp x2,x3,[sp],16 - ldp x1,lr,[sp],16 - ret -qAdrszMessStringError: .quad szMessStringError -qAdrszMessBufferError: .quad szMessBufferError -qAdrszMessEndStringErr: .quad szMessEndStringError -qAdrszMessWordErr: .quad szMessWordErr -qAdrszAnd: .quad szAnd -/***************************************************/ -/* ROUTINES INCLUDE */ -/***************************************************/ -/* for this file see task include a file in language AArch64 assembly*/ -.include "../includeARM64.inc" diff --git a/Task/Comma-quibbling/ARM-Assembly/comma-quibbling.arm b/Task/Comma-quibbling/ARM-Assembly/comma-quibbling.arm deleted file mode 100644 index ebbae869ca..0000000000 --- a/Task/Comma-quibbling/ARM-Assembly/comma-quibbling.arm +++ /dev/null @@ -1,260 +0,0 @@ -/* ARM assembly Raspberry PI */ -/* program Comma quibbling */ - -/* REMARK 1 : this program use routines in a include file - see task Include a file language arm assembly - for the routine affichageMess conversion10 - see at end of this program the instruction include */ - -/*******************************************/ -/* Constantes */ -/*******************************************/ -.include "../constantes.inc" -.equ BUFFERSIZE, 80 - -/*******************************************/ -/* macros */ -/*******************************************/ -//.include "../../ficmacros32.inc" @ for developper debugging - -/*********************************/ -/* Initialized data */ -/*********************************/ -.data -szMessDebutPgm: .asciz "Program 32 bits start. \n" -szCarriageReturn: .asciz "\n" -szMessFinOK: .asciz "Program normal end. \n" -szMessStringError: .asciz "Error : Empty string !!!\n" -szMessBufferError: .asciz "Error : Buffer too small !!\n" -szMessEndStringError: .asciz "Error: End string, not ].\n" -szMessWordErr: .asciz "Error word empty.\n" -szAnd: .asciz " and " -szString1: .asciz "[]" -szString2: .asciz "[\"ABC\"]" -szString3: .asciz "[\"ABC\",\"DEF\"]" -szString4: .asciz "[\"ABC\",\"DEF\",\"G\",\"H\"]" -szString5: .asciz "[\"AB" -szString6: .asciz "[\"ABC\",,\"DEF\"]" - -.align 4 -/*********************************/ -/* UnInitialized data */ -/*********************************/ -.bss -sBuffer: .skip BUFFERSIZE -.align 4 - -/*********************************/ -/* code section */ -/*********************************/ -.text -.global main -main: - ldr r0,iAdrszMessDebutPgm - bl affichageMess @ start message - - ldr r0,iAdrszString1 - bl execTest - ldr r0,iAdrszString2 - bl execTest - ldr r0,iAdrszString3 - bl execTest - ldr r0,iAdrszString4 - bl execTest - ldr r0,iAdrszString5 - bl execTest - ldr r0,iAdrszString6 - bl execTest - - ldr r0,iAdrszMessFinOK - bl affichageMess - -100: - mov r7,#EXIT @ program end - svc #0 @ system call -iAdrszMessDebutPgm: .int szMessDebutPgm -iAdrszMessFinOK: .int szMessFinOK -iAdrszCarriageReturn: .int szCarriageReturn -iAdrszString1: .int szString1 -iAdrszString2: .int szString2 -iAdrszString3: .int szString3 -iAdrszString4: .int szString4 -iAdrszString5: .int szString5 -iAdrszString6: .int szString6 -iAdrsBuffer: .int sBuffer -/******************************************************************/ -/* test execution */ -/******************************************************************/ -/* r0 contains string address */ -execTest: - push {r1-r4,lr} @ save registers - mov r4,r0 - bl affichageMess @ display start string - ldr r0,iAdrszCarriageReturn - bl affichageMess - mov r0,r4 @ string address - ldr r1,iAdrsBuffer @ buffer address - mov r2,#BUFFERSIZE - bl stringAnalyse - cmp r0,#-1 @ error ? - beq 100f - ldr r0,iAdrsBuffer @ buffer display - bl affichageMess - ldr r0,iAdrszCarriageReturn - bl affichageMess -100: - pop {r1-r4,pc} -/******************************************************************/ -/* string conversion */ -/******************************************************************/ -/* r0 contains string address */ -/* r1 contains buffer address */ -/* r2 contains buffer length */ -stringAnalyse: - push {r1-r9,fp,lr} @ save registers - sub sp,sp,#BUFFERSIZE @ reserve area on stack for temporary buffer - mov fp,sp - mov r7,#0 @ indice write buffer - mov r5,#0 @ word counter - mov r6,#0 @ word char count - - mov r3,#0 @ indice string -1: - ldrb r4,[r0,r3] @ load string char - cmp r4,#0 @ end ? - bne 2f - cmp r3,#0 @ first char ? - beq 97f @ error empty string - b 97f @ end string error -2: - cmp r4,#'[' @ first symbol ? - bne 3f - mov r4,#'{' @ write symbol - strb r4,[r1,r7] - add r7,r7,#1 - cmp r7,r2 - bge 99f @ buffer error - add r3,r3,#1 @ increment indice - b 1b @ and loop - 3: - cmp r4,#']' @ end symbol ? - bne 8f - cmp r5,#0 @ no word ? - beq 7f - cmp r5,#1 - beq 5f @ last and first word - - mov r9,#0 - ldr r12,iAdrszAnd -4: @ loop write and - ldrb r4,[r12,r9] - strb r4,[r1,r7] - add r7,r7,#1 - cmp r7,r2 - bge 99f @ buffer error - add r9,r9,#1 - cmp r9,#5 - blt 4b - -5: @ last word - mov r9,#0 -6: @ loop write temporary buffer - ldrb r4,[fp,r9] - strb r4,[r1,r7] - add r7,r7,#1 - cmp r7,r2 - bge 99f @ buffer error - add r9,r9,#1 - cmp r9,r6 - blt 6b - mov r6,#0 @ raz indice temporary buffer -7: - mov r4,#'}' - strb r4,[r1,r7] - add r7,r7,#1 - cmp r7,r2 - bge 99f @ buffer error - mov r4,#0 - strb r4,[r1,r7] @ final 0 - b 100f -8: - cmp r4,#',' @ comma ? - beq 9f - cmp r6,#0 - addeq r5,r5,#1 @ new word increment word counter - strb r4,[fp,r6] @ store char in temporary buffer - add r6,r6,#1 - add r3,r3,#1 - b 1b @ loop - -9: - cmp r6,#0 @ word empty ? - beq 96f - cmp r5,#1 @ first word ? - bne 11f - @ first word, write only the word - mov r9,#0 -10: @ loop write temporary buffer - ldrb r4,[fp,r9] - strb r4,[r1,r7] - add r7,r7,#1 - cmp r7,r2 - bge 99f @ buffer error - add r9,r9,#1 - cmp r9,r6 - blt 10b - mov r6,#0 @ raz indice temporary buffer - add r3,r3,#1 - b 1b @ loop -11: - mov r4,#',' - strb r4,[r1,r7] - add r7,r7,#1 - cmp r7,r2 - bge 99f @ buffer error - - mov r9,#0 -12: @ loop write temporary buffer - ldrb r4,[fp,r9] - strb r4,[r1,r7] - add r7,r7,#1 - cmp r7,r2 - bge 99f @ buffer error - add r9,r9,#1 - cmp r9,r6 - blt 12b - mov r6,#0 @ raz indice temporary buffer - add r3,r3,#1 - b 1b @ loop - -96: @ errors messages - ldr r0,iAdrszMessWordErr - bl affichageMess - mov r0,#-1 - b 100f -97: - ldr r0,iAdrszMessEndStringErr - bl affichageMess - mov r0,#-1 - b 100f -98: - ldr r0,iAdrszMessStringError - bl affichageMess - mov r0,#-1 - b 100f -99: - ldr r0,iAdrszMessBufferError - bl affichageMess - mov r0,#-1 -100: - add sp,sp,#BUFFERSIZE - pop {r1-r9,fp,pc} -iAdrszMessStringError: .int szMessStringError -iAdrszMessBufferError: .int szMessBufferError -iAdrszMessEndStringErr: .int szMessEndStringError -iAdrszMessWordErr: .int szMessWordErr -iAdrszAnd: .int szAnd -/***************************************************/ -/* ROUTINES INCLUDE */ -/***************************************************/ -.include "../affichage.inc" diff --git a/Task/Comma-quibbling/Ada/comma-quibbling.adb b/Task/Comma-quibbling/Ada/comma-quibbling.ada similarity index 100% rename from Task/Comma-quibbling/Ada/comma-quibbling.adb rename to Task/Comma-quibbling/Ada/comma-quibbling.ada diff --git a/Task/Comma-quibbling/Arturo/comma-quibbling.arturo b/Task/Comma-quibbling/Arturo/comma-quibbling.arturo index a427253a6f..e34a1676ac 100644 --- a/Task/Comma-quibbling/Arturo/comma-quibbling.arturo +++ b/Task/Comma-quibbling/Arturo/comma-quibbling.arturo @@ -1,9 +1,9 @@ quibble: $[sequence :block][ - if 0 = size sequence - -> return "{}" + if? 0 = size sequence + -> return "{}" - if 1 = size sequence - -> return ~"{|sequence\0|}" + if? 1 = size sequence + -> return ~"{|sequence\0|}" last: pop 'sequence return ~« {|join.with: ", " sequence| and |last|} diff --git a/Task/Comma-quibbling/COBOL/comma-quibbling.cob b/Task/Comma-quibbling/COBOL/comma-quibbling.cobol similarity index 100% rename from Task/Comma-quibbling/COBOL/comma-quibbling.cob rename to Task/Comma-quibbling/COBOL/comma-quibbling.cobol diff --git a/Task/Comma-quibbling/Crystal/comma-quibbling.cr b/Task/Comma-quibbling/Crystal/comma-quibbling.cr deleted file mode 100644 index c9464e6016..0000000000 --- a/Task/Comma-quibbling/Crystal/comma-quibbling.cr +++ /dev/null @@ -1,19 +0,0 @@ -def comma_quibble (arr) - "{" + - case arr.size - when 0 - "" - when 1 - arr[0] - else - arr[..-2].join(", ") + " and #{arr[-1]}" - end + "}" -end - -[[] of String, # (No input words). - ["ABC"], - ["ABC", "DEF"], - ["ABC", "DEF", "G", "H"], -].each do |input| - puts comma_quibble(input) -end diff --git a/Task/Comma-quibbling/EasyLang/comma-quibbling.easy b/Task/Comma-quibbling/EasyLang/comma-quibbling.easy index 9241769aeb..b3d7618ce4 100644 --- a/Task/Comma-quibbling/EasyLang/comma-quibbling.easy +++ b/Task/Comma-quibbling/EasyLang/comma-quibbling.easy @@ -2,9 +2,13 @@ func$ tolist s$ . s$[] = strsplit s$ " " r$ = "{" n = len s$[] - for i = 1 to n - 2 : r$ &= s$[i] & ", " + for i = 1 to n - 2 + r$ &= s$[i] & ", " + . if n > 0 - if n > 1 : r$ &= s$[n - 1] & " and " + if n > 1 + r$ &= s$[n - 1] & " and " + . r$ &= s$[n] . r$ &= "}" diff --git a/Task/Comma-quibbling/Ed/comma-quibbling.ed b/Task/Comma-quibbling/Ed/comma-quibbling.ed deleted file mode 100644 index ac9da0cba8..0000000000 --- a/Task/Comma-quibbling/Ed/comma-quibbling.ed +++ /dev/null @@ -1,8 +0,0 @@ -# by Artyom Bologov -H -,p -g/.*/s/ /, /g -g/[,]/s/,\([^,]*\)$/ and\1/ -g/.*/s//{&}/ -,p -Q diff --git a/Task/Comma-quibbling/Elena/comma-quibbling-1.elena b/Task/Comma-quibbling/Elena/comma-quibbling-1.elena deleted file mode 100644 index 7d110e9b1f..0000000000 --- a/Task/Comma-quibbling/Elena/comma-quibbling-1.elena +++ /dev/null @@ -1,23 +0,0 @@ -import system'routines; -import extensions; -import extensions'text; - -public extension QuibbleOp : Array -{ - string quibble() - { - ^ self.zipBy( - self.Length.coundDown().selectBy::(n => (n == self.Length) ? EmptyString : ((n == 1) ? " and " : ", ") ), - (word, prefix => prefix + word) - ) - .summarize(StringWriter.load("{")) + "}" - } -} - -public Program() -{ - Console.printLine(new string[] { }.quibble()); - Console.printLine(new string[] { "ABC" }.quibble()); - Console.printLine(new string[] { "ABC", "ADF" }.quibble()); - Console.printLine(new string[] { "ABC", "DEF", "G", "H" }.quibble()) -} diff --git a/Task/Comma-quibbling/Elena/comma-quibbling-2.elena b/Task/Comma-quibbling/Elena/comma-quibbling-2.elena deleted file mode 100644 index f59b89451f..0000000000 --- a/Task/Comma-quibbling/Elena/comma-quibbling-2.elena +++ /dev/null @@ -1,31 +0,0 @@ -import extensions; -import textgen; - -const string Script = "<={{=>for (var i := 0; i < self.Length; i := i + 1) { - if (i > 0) { - if (i == self.Length - 1) { - <= and => - } - else { - <=, => - } - }; - - <={self[i]}=> - }; <=}}=>"; - -public extension QuibbleOp : Array -{ - string quibble() - { - ^ self.generateFrom(Script); - } -} - -public Program() -{ - Console.printLine(new string[] { }.quibble()); - Console.printLine(new string[] { "ABC" }.quibble()); - Console.printLine(new string[] { "ABC", "ADF" }.quibble()); - Console.printLine(new string[] { "ABC", "DEF", "G", "H" }.quibble()) -} diff --git a/Task/Comma-quibbling/Elixir/comma-quibbling.ex b/Task/Comma-quibbling/Elixir/comma-quibbling.elixir similarity index 100% rename from Task/Comma-quibbling/Elixir/comma-quibbling.ex rename to Task/Comma-quibbling/Elixir/comma-quibbling.elixir diff --git a/Task/Comma-quibbling/FutureBasic/comma-quibbling-3.basic b/Task/Comma-quibbling/FutureBasic/comma-quibbling-3.basic deleted file mode 100644 index aca32cb04f..0000000000 --- a/Task/Comma-quibbling/FutureBasic/comma-quibbling-3.basic +++ /dev/null @@ -1,16 +0,0 @@ -local fn Quibble( string as CFStringRef ) as CFStringRef - CfArrayRef arr = fn StringComponentsSeparatedByString( string, @" " ) - CFStringRef rst - if ( len(arr) == 0 ) then rst = @"" else rst = fn StringWithFormat( @"%@", fn ArrayLastObject( arr ) ) - if ( len(arr) > 1 ) - CFArrayRef subArray = fn ArraySubarrayWithRange( arr, fn CFRangeMake( 0, len(arr) - 1 ) ) - rst = fn StringWithFormat( @"%@ and %@", fn ArrayComponentsJoinedByString( subArray, @", " ), rst ) - end if -end fn = fn StringWithFormat( @"{%@}", rst ) - -print fn Quibble( @"" ) -print fn Quibble( @"ABC") -print fn Quibble( @"ABC DEF" ) -print fn Quibble( @"ABC DEF G H" ) - -HandleEvents diff --git a/Task/Comma-quibbling/Julia/comma-quibbling.jl b/Task/Comma-quibbling/Julia/comma-quibbling.julia similarity index 100% rename from Task/Comma-quibbling/Julia/comma-quibbling.jl rename to Task/Comma-quibbling/Julia/comma-quibbling.julia diff --git a/Task/Comma-quibbling/Kotlin/comma-quibbling.kts b/Task/Comma-quibbling/Kotlin/comma-quibbling.kotlin similarity index 100% rename from Task/Comma-quibbling/Kotlin/comma-quibbling.kts rename to Task/Comma-quibbling/Kotlin/comma-quibbling.kotlin diff --git a/Task/Comma-quibbling/Nu/comma-quibbling.nu b/Task/Comma-quibbling/Nu/comma-quibbling.nu deleted file mode 100644 index 1af48327db..0000000000 --- a/Task/Comma-quibbling/Nu/comma-quibbling.nu +++ /dev/null @@ -1,13 +0,0 @@ -def quibble [] { - if ($in | length) < 3 { $in } else [($in | drop | str join ', ') ($in | last)] - | $'{($in | str join " and ")}' -} - -# test -[ - [] - [ABC] - [ABC DEF] - [ABC DEF G H] -] -| each { quibble } diff --git a/Task/Comma-quibbling/OCaml/comma-quibbling-1.ml b/Task/Comma-quibbling/OCaml/comma-quibbling-1.ocaml similarity index 100% rename from Task/Comma-quibbling/OCaml/comma-quibbling-1.ml rename to Task/Comma-quibbling/OCaml/comma-quibbling-1.ocaml diff --git a/Task/Comma-quibbling/OCaml/comma-quibbling-2.ml b/Task/Comma-quibbling/OCaml/comma-quibbling-2.ocaml similarity index 100% rename from Task/Comma-quibbling/OCaml/comma-quibbling-2.ml rename to Task/Comma-quibbling/OCaml/comma-quibbling-2.ocaml diff --git a/Task/Comma-quibbling/Pluto/comma-quibbling.pluto b/Task/Comma-quibbling/Pluto/comma-quibbling.pluto deleted file mode 100644 index ae82288a57..0000000000 --- a/Task/Comma-quibbling/Pluto/comma-quibbling.pluto +++ /dev/null @@ -1,10 +0,0 @@ -local function quibbling(w) - local c = #w - if c == 0 then return "{}" end - if c == 1 then return $"\{{w[1]}}" end - if c == 2 then return $"\{{w[1]} and {w[2]}}" end - return $"\{{w:slice(1, #w - 1):concat(", ")} and {w[#w]}}" -end - -local words = { {}, {"ABC"}, {"ABC", "DEF"}, {"ABC", "DEF", "G", "H"} } -for words as w do print(quibbling(w)) end diff --git a/Task/Comma-quibbling/PowerShell/comma-quibbling-1.ps1 b/Task/Comma-quibbling/PowerShell/comma-quibbling-1.psh similarity index 100% rename from Task/Comma-quibbling/PowerShell/comma-quibbling-1.ps1 rename to Task/Comma-quibbling/PowerShell/comma-quibbling-1.psh diff --git a/Task/Comma-quibbling/PowerShell/comma-quibbling-2.ps1 b/Task/Comma-quibbling/PowerShell/comma-quibbling-2.psh similarity index 100% rename from Task/Comma-quibbling/PowerShell/comma-quibbling-2.ps1 rename to Task/Comma-quibbling/PowerShell/comma-quibbling-2.psh diff --git a/Task/Comma-quibbling/PowerShell/comma-quibbling-3.ps1 b/Task/Comma-quibbling/PowerShell/comma-quibbling-3.psh similarity index 100% rename from Task/Comma-quibbling/PowerShell/comma-quibbling-3.ps1 rename to Task/Comma-quibbling/PowerShell/comma-quibbling-3.psh diff --git a/Task/Comma-quibbling/Rebol/comma-quibbling-2.rebol b/Task/Comma-quibbling/REBOL/comma-quibbling-1.rebol similarity index 100% rename from Task/Comma-quibbling/Rebol/comma-quibbling-2.rebol rename to Task/Comma-quibbling/REBOL/comma-quibbling-1.rebol diff --git a/Task/Comma-quibbling/REBOL/comma-quibbling-2.rebol b/Task/Comma-quibbling/REBOL/comma-quibbling-2.rebol new file mode 100644 index 0000000000..42c9c25002 --- /dev/null +++ b/Task/Comma-quibbling/REBOL/comma-quibbling-2.rebol @@ -0,0 +1,24 @@ +Rebol [] + +; builds string instead of using an intermediate block + +comma-quibbling: func [block /oxford /local s length] [ + length: length? block + rejoin [ + "^{" + + either length < 2 [to-string block] [ + s: to-string block/1 + for n 2 (length - 1) 1 [repend s [", " pick block n]] + if all [oxford (length > 2)] [append s ","] + repend s [" and " last block] + ] + + "^}" + ] +] + +test: [[] [ABC] [ABC DEF] [ABC DEF G H]] +foreach t test [print comma-quibbling t] +print "Now with Oxford comma" +foreach t test [print comma-quibbling/oxford t] diff --git a/Task/Comma-quibbling/Rebol/comma-quibbling-1.rebol b/Task/Comma-quibbling/Rebol/comma-quibbling-1.rebol deleted file mode 100644 index 9adf877190..0000000000 --- a/Task/Comma-quibbling/Rebol/comma-quibbling-1.rebol +++ /dev/null @@ -1,2 +0,0 @@ -head change/part find/last combine/with [ABC DEF G H] ", " #"," " and" 1 -;== "ABC, DEF, G and H" diff --git a/Task/Comma-quibbling/Rebol/comma-quibbling-3.rebol b/Task/Comma-quibbling/Rebol/comma-quibbling-3.rebol deleted file mode 100644 index 1680b96b7d..0000000000 --- a/Task/Comma-quibbling/Rebol/comma-quibbling-3.rebol +++ /dev/null @@ -1,24 +0,0 @@ -Rebol [] - -; builds string instead of using an intermediate block - -comma-quibbling: func [block /oxford /local s length] [ - length: length? block - rejoin [ - "^{" - - either length < 2 [to string! block] [ - s: to string! block/1 - for n 2 (length - 1) 1 [repend s [", " pick block n]] - if all [oxford (length > 2)] [append s ","] - repend s [" and " last block] - ] - - "^}" - ] -] - -test: [[] [ABC] [ABC DEF] [ABC DEF G H]] -foreach t test [print comma-quibbling t] -print "Now with Oxford comma" -foreach t test [print comma-quibbling/oxford t] diff --git a/Task/Comma-quibbling/Rust/comma-quibbling.rs b/Task/Comma-quibbling/Rust/comma-quibbling.rust similarity index 100% rename from Task/Comma-quibbling/Rust/comma-quibbling.rs rename to Task/Comma-quibbling/Rust/comma-quibbling.rust diff --git a/Task/Comma-quibbling/Scheme/comma-quibbling.scm b/Task/Comma-quibbling/Scheme/comma-quibbling.ss similarity index 100% rename from Task/Comma-quibbling/Scheme/comma-quibbling.scm rename to Task/Comma-quibbling/Scheme/comma-quibbling.ss diff --git a/Task/Comma-quibbling/Uiua/comma-quibbling.uiua b/Task/Comma-quibbling/Uiua/comma-quibbling.uiua index 318a769baa..4a39d94b1f 100644 --- a/Task/Comma-quibbling/Uiua/comma-quibbling.uiua +++ b/Task/Comma-quibbling/Uiua/comma-quibbling.uiua @@ -2,5 +2,7 @@ Tests ← {{} {"ABC"} {"ABC" "DEF"} {"ABC" "DEF" "G" "H"}} -Quibble ← |1 ⨬(⋅""|°□⊢|$"_ and _"°⊟|Quibble⊂⊃(□$"_, _"°⊟↙2)↘₂)↧3⊸⧻ -⍚(&p$"{_}"Quibble) Tests +Jam ← ◇⊂◇⊂:□ +Quibble ← |1 ⟨""◌|°□⊢|Jam" and "°⊟|Quibble⊂⊃(□Jam", "°⊟↙2)(↘2)⟩↧3⧻. +Wrap ← ⊂⊂"{" : "}" Quibble +⍚(&pWrap) Tests diff --git a/Task/Comma-quibbling/V-(Vlang)/comma-quibbling.v b/Task/Comma-quibbling/V-(Vlang)/comma-quibbling.v index 6d8c5779ea..dbfb561110 100644 --- a/Task/Comma-quibbling/V-(Vlang)/comma-quibbling.v +++ b/Task/Comma-quibbling/V-(Vlang)/comma-quibbling.v @@ -1,15 +1,23 @@ fn q(s []string) string { match s.len { - 0 { return "{}" } - 1 { return "{${s[0]}}" } - 2 { return "{${s[0]} and ${s[1]}}" } - else { return "{${s[0..s.len-1].join(", ")} and ${s[s.len-1]}}" } + 0 { + return '{}' + } + 1 { + return '{${s[0]}}' + } + 2 { + return '{${s[0]} and ${s[1]}}' + } + else{ + return '{${s[0..s.len-1].join(', ')} and ${s[s.len-1]}}' + } } } fn main(){ println(q([])) - println(q(["ABC"])) - println(q(["ABC","DEF"])) - println(q(["ABC","DEF","G","H"])) + println(q(['ABC'])) + println(q(['ABC','DEF'])) + println(q(['ABC','DEF','G','H'])) } diff --git a/Task/Comma-quibbling/VBScript/comma-quibbling.vbs b/Task/Comma-quibbling/VBScript/comma-quibbling.vb similarity index 100% rename from Task/Comma-quibbling/VBScript/comma-quibbling.vbs rename to Task/Comma-quibbling/VBScript/comma-quibbling.vb diff --git a/Task/Command-line-arguments/AArch64-Assembly/command-line-arguments-2.aarch64 b/Task/Command-line-arguments/AArch64-Assembly/command-line-arguments-2.aarch64 deleted file mode 100644 index 134551fb07..0000000000 --- a/Task/Command-line-arguments/AArch64-Assembly/command-line-arguments-2.aarch64 +++ /dev/null @@ -1,26 +0,0 @@ -.global _start -.text -_start: - mov x9, sp // move stack pointer to x9 - 0: ldr x0, [x9, #8]! // add 8 to x9, load long int value at x9 into x0 - cbz x0, 9f // if x0 is zero (null pointer) jump forward to 9: - bl writez // call our function that prints a null terminated string - adr x0, lfz // load address of lfz (line feed, zero) into x0 - bl writez // print it - b 0b // jump backward to label 0: - 9: mov x8, #93 // 93 is exit - mov x0, xzr // return (0); - svc #0 // syscall - // If using as a function in C declare it as -writez: // extern long writez(char *str); - mov x1, x0 // address of str needs to be in x1 for syscall - sub x0, x0, #1 // decrement x0, because the next statement increments it first. - 0: ldrb w2, [x0, #1]! // increment x0, load byte value at x0 in w2 - cbnz w2, 0b // if w2 is not zero jump back to 0: label - sub x2, x0, x1 // subtract x1 from x0, load into x2. length of str - mov x0, #1 // mov into x0 1. stdout - mov x8, #64 // mov into x8 64. write - svc #0 // syscall - ret // return from function. - // return value is number of characters written. -lfz: .byte 10, 0 // line feed (0x0a), zero (null character) diff --git a/Task/Command-line-arguments/AArch64-Assembly/command-line-arguments-1.aarch64 b/Task/Command-line-arguments/AArch64-Assembly/command-line-arguments.aarch64 similarity index 100% rename from Task/Command-line-arguments/AArch64-Assembly/command-line-arguments-1.aarch64 rename to Task/Command-line-arguments/AArch64-Assembly/command-line-arguments.aarch64 diff --git a/Task/Command-line-arguments/Ada/command-line-arguments-1.adb b/Task/Command-line-arguments/Ada/command-line-arguments-1.ada similarity index 100% rename from Task/Command-line-arguments/Ada/command-line-arguments-1.adb rename to Task/Command-line-arguments/Ada/command-line-arguments-1.ada diff --git a/Task/Command-line-arguments/Ada/command-line-arguments-2.adb b/Task/Command-line-arguments/Ada/command-line-arguments-2.ada similarity index 100% rename from Task/Command-line-arguments/Ada/command-line-arguments-2.adb rename to Task/Command-line-arguments/Ada/command-line-arguments-2.ada diff --git a/Task/Command-line-arguments/ArkScript/command-line-arguments.ark b/Task/Command-line-arguments/ArkScript/command-line-arguments.ark deleted file mode 100644 index c7a36a1db6..0000000000 --- a/Task/Command-line-arguments/ArkScript/command-line-arguments.ark +++ /dev/null @@ -1,2 +0,0 @@ -(import std.Sys) -(print sys:args) diff --git a/Task/Command-line-arguments/COBOL/command-line-arguments-1.cob b/Task/Command-line-arguments/COBOL/command-line-arguments-1.cobol similarity index 100% rename from Task/Command-line-arguments/COBOL/command-line-arguments-1.cob rename to Task/Command-line-arguments/COBOL/command-line-arguments-1.cobol diff --git a/Task/Command-line-arguments/COBOL/command-line-arguments-2.cob b/Task/Command-line-arguments/COBOL/command-line-arguments-2.cobol similarity index 100% rename from Task/Command-line-arguments/COBOL/command-line-arguments-2.cob rename to Task/Command-line-arguments/COBOL/command-line-arguments-2.cobol diff --git a/Task/Command-line-arguments/COBOL/command-line-arguments-3.cob b/Task/Command-line-arguments/COBOL/command-line-arguments-3.cobol similarity index 100% rename from Task/Command-line-arguments/COBOL/command-line-arguments-3.cob rename to Task/Command-line-arguments/COBOL/command-line-arguments-3.cobol diff --git a/Task/Command-line-arguments/Delphi/command-line-arguments.pas b/Task/Command-line-arguments/Delphi/command-line-arguments.delphi similarity index 100% rename from Task/Command-line-arguments/Delphi/command-line-arguments.pas rename to Task/Command-line-arguments/Delphi/command-line-arguments.delphi diff --git a/Task/Command-line-arguments/Elena/command-line-arguments.elena b/Task/Command-line-arguments/Elena/command-line-arguments.elena index 5fc9385721..538889e4e8 100644 --- a/Task/Command-line-arguments/Elena/command-line-arguments.elena +++ b/Task/Command-line-arguments/Elena/command-line-arguments.elena @@ -1,8 +1,8 @@ import system'routines; import extensions; -public Program() +public program() { - Program_arguments.forEvery::(int i) - { Console.printLine("Argument ",i," is ",Program_arguments[i]) } + program_arguments.forEvery::(int i) + { console.printLine("Argument ",i," is ",program_arguments[i]) } } diff --git a/Task/Command-line-arguments/Elixir/command-line-arguments-1.ex b/Task/Command-line-arguments/Elixir/command-line-arguments-1.elixir similarity index 100% rename from Task/Command-line-arguments/Elixir/command-line-arguments-1.ex rename to Task/Command-line-arguments/Elixir/command-line-arguments-1.elixir diff --git a/Task/Command-line-arguments/Elixir/command-line-arguments-2.ex b/Task/Command-line-arguments/Elixir/command-line-arguments-2.elixir similarity index 100% rename from Task/Command-line-arguments/Elixir/command-line-arguments-2.ex rename to Task/Command-line-arguments/Elixir/command-line-arguments-2.elixir diff --git a/Task/Command-line-arguments/Emacs-Lisp/command-line-arguments.el b/Task/Command-line-arguments/Emacs-Lisp/command-line-arguments.l similarity index 100% rename from Task/Command-line-arguments/Emacs-Lisp/command-line-arguments.el rename to Task/Command-line-arguments/Emacs-Lisp/command-line-arguments.l diff --git a/Task/Command-line-arguments/Euphoria/command-line-arguments.eu b/Task/Command-line-arguments/Euphoria/command-line-arguments.euphoria similarity index 100% rename from Task/Command-line-arguments/Euphoria/command-line-arguments.eu rename to Task/Command-line-arguments/Euphoria/command-line-arguments.euphoria diff --git a/Task/Command-line-arguments/FutureBasic/command-line-arguments.basic b/Task/Command-line-arguments/FutureBasic/command-line-arguments.basic deleted file mode 100644 index ed30014088..0000000000 --- a/Task/Command-line-arguments/FutureBasic/command-line-arguments.basic +++ /dev/null @@ -1,14 +0,0 @@ -include "NSLog.incl" - -void local fn DoCommandLineArguments - CFArrayRef args = fn ProcessInfoArguments - NSLog(@"This program is named %@.",args[0]) - NSLog(@"There are %d arguments.",len(args)-1) - for long i = 1 to len(args)-1 - NSLog(@"the argument #%d is %@", i, args[i]) - next -end fn - -fn DoCommandLineArguments - -HandleEvents diff --git a/Task/Command-line-arguments/Julia/command-line-arguments.jl b/Task/Command-line-arguments/Julia/command-line-arguments.julia similarity index 100% rename from Task/Command-line-arguments/Julia/command-line-arguments.jl rename to Task/Command-line-arguments/Julia/command-line-arguments.julia diff --git a/Task/Command-line-arguments/Kotlin/command-line-arguments.kts b/Task/Command-line-arguments/Kotlin/command-line-arguments.kotlin similarity index 100% rename from Task/Command-line-arguments/Kotlin/command-line-arguments.kts rename to Task/Command-line-arguments/Kotlin/command-line-arguments.kotlin diff --git a/Task/Command-line-arguments/LDPL/command-line-arguments-1.ldpl b/Task/Command-line-arguments/LDPL/command-line-arguments-1.ldpl deleted file mode 100644 index 26aa218485..0000000000 --- a/Task/Command-line-arguments/LDPL/command-line-arguments-1.ldpl +++ /dev/null @@ -1,10 +0,0 @@ -DATA: - argument_count IS NUMBER - -PROCEDURE: - GET LENGTH OF argv IN argument_count - IF argument_count IS EQUAL TO 0 THEN - DISPLAY "No arguments!" CRLF - ELSE - DISPLAY argv:0 CRLF - END IF diff --git a/Task/Command-line-arguments/LDPL/command-line-arguments-2.ldpl b/Task/Command-line-arguments/LDPL/command-line-arguments-2.ldpl deleted file mode 100644 index 6cc4b9df78..0000000000 --- a/Task/Command-line-arguments/LDPL/command-line-arguments-2.ldpl +++ /dev/null @@ -1,6 +0,0 @@ -$ ldpl argv.ldpl -* Loading argv.ldpl -* Compiling argv.ldpl -* Building argv-bin -* Saved as argv-bin -* File(s) compiled successfully. diff --git a/Task/Command-line-arguments/LDPL/command-line-arguments-3.ldpl b/Task/Command-line-arguments/LDPL/command-line-arguments-3.ldpl deleted file mode 100644 index ff51e1fe0c..0000000000 --- a/Task/Command-line-arguments/LDPL/command-line-arguments-3.ldpl +++ /dev/null @@ -1,4 +0,0 @@ -$ ./argv-bin test -test -$ ./argv-bin -No arguments! diff --git a/Task/Command-line-arguments/OCaml/command-line-arguments-1.ml b/Task/Command-line-arguments/OCaml/command-line-arguments-1.ocaml similarity index 100% rename from Task/Command-line-arguments/OCaml/command-line-arguments-1.ml rename to Task/Command-line-arguments/OCaml/command-line-arguments-1.ocaml diff --git a/Task/Command-line-arguments/OCaml/command-line-arguments-2.ml b/Task/Command-line-arguments/OCaml/command-line-arguments-2.ocaml similarity index 100% rename from Task/Command-line-arguments/OCaml/command-line-arguments-2.ml rename to Task/Command-line-arguments/OCaml/command-line-arguments-2.ocaml diff --git a/Task/Command-line-arguments/PascalABC.NET/command-line-arguments.pas b/Task/Command-line-arguments/PascalABC.NET/command-line-arguments.pas deleted file mode 100644 index 657c2b12b1..0000000000 --- a/Task/Command-line-arguments/PascalABC.NET/command-line-arguments.pas +++ /dev/null @@ -1,4 +0,0 @@ -begin - for var i:=1 to ParamCount do - Print(ParamStr(i)); -end. diff --git a/Task/Command-line-arguments/Pluto/command-line-arguments.pluto b/Task/Command-line-arguments/Pluto/command-line-arguments.pluto deleted file mode 100644 index b002fdaeb6..0000000000 --- a/Task/Command-line-arguments/Pluto/command-line-arguments.pluto +++ /dev/null @@ -1 +0,0 @@ -arg:slice(1):foreach(print) diff --git a/Task/Command-line-arguments/PowerShell/command-line-arguments.ps1 b/Task/Command-line-arguments/PowerShell/command-line-arguments.psh similarity index 100% rename from Task/Command-line-arguments/PowerShell/command-line-arguments.ps1 rename to Task/Command-line-arguments/PowerShell/command-line-arguments.psh diff --git a/Task/Command-line-arguments/REXX/command-line-arguments-1.rexx b/Task/Command-line-arguments/REXX/command-line-arguments-1.rexx index 7d8785a1c8..2355afa823 100644 --- a/Task/Command-line-arguments/REXX/command-line-arguments-1.rexx +++ b/Task/Command-line-arguments/REXX/command-line-arguments-1.rexx @@ -1,32 +1,2 @@ --- 12 Sep 2025 -include Setting - --- Use arguments -c "alpha beta" -h "gamma" -say 'COMMAND-LINE ARGUMENTS (SPACE SEPARATED)' -say version -say -say 'parse arg xx:' -parse arg xx; say 'xx='xx -say -say 'arg xx:' -arg xx; say 'xx='xx -say -say 'arg x1 x2 x3 x4 x5:' -arg x1 x2 x3 x4 x5; say 'x1='x1 'x2='x2 'x3='x3 'x4='x4 'x5='x5 -say -say 'parse arg x1 x2 x3 x4 x5:' -parse arg x1 x2 x3 x4 x5; say 'x1='x1 'x2='x2 'x3='x3 'x4='x4 'x5='x5 -say -say 'arg x1 . x3 (placeholder):' -arg x1 . x3; say 'x1='x1 'x3='x3 -say -say 'Arg(1):' -say Arg(1) -say -say 'Words:' -do n = 1 to Words(Arg(1)) - say 'n='n 'Word(Arg(1),n)='Word(Arg(1),n) -end -exit - -include Abend +say 'command arguments:' +say arg(1) diff --git a/Task/Command-line-arguments/REXX/command-line-arguments-2.rexx b/Task/Command-line-arguments/REXX/command-line-arguments-2.rexx index 3b97099b75..bd43c95964 100644 --- a/Task/Command-line-arguments/REXX/command-line-arguments-2.rexx +++ b/Task/Command-line-arguments/REXX/command-line-arguments-2.rexx @@ -1,27 +1,22 @@ --- 12 Sep 2025 -include Setting +parse arg aaa /*get the arguments. */ + /*another version: */ + /* aaa=arg(1) */ +say 'command arguments:' +say aaa --- Use arguments -c,alpha beta,-h,gamma -say 'COMMAND-LINE ARGUMENTS (COMMA SEPARATED)' -say version -say -say 'parse arg xx:' -parse arg xx; say xx -say -say 'arg xx:' -arg xx; say xx -say -say 'parse arg x1,x2,x3,x4:' -parse arg x1','x2','x3','x4; say 'x1' x1 'x2' x2 'x3' x3 'x4' x4 -say -say 'arg x1,x2,x3,x4:' -arg x1','x2','x3','x4; say 'x1' x1 'x2' x2 'x3' x3 'x4' x4 -say -say 'parse arg x1,.,x3 (placeholder):' -parse arg x1','.','x3; say 'x1' x1 'x3' x3 -say -say 'arg(1):' -say arg(1) -exit +opts='' /*placeholder for options. */ +data='' /*placeholder for data. */ -include Abend + do j=1 to words(aaa) + x=word(aaa,j) + if left(x,1)=='-' then opts=opts x /*Option? Then add to opts.*/ + else data=data x /*Must be data. Add to data.*/ + end + + /*the above process adds a leading blank to OPTS and DATA*/ + +opts=strip(opts,'L') /*strip leading blanks. */ +data=strip(data,'l') /*strip leading blanks. */ +say +say 'options='opts +say ' data='data diff --git a/Task/Command-line-arguments/Rust/command-line-arguments-1.rs b/Task/Command-line-arguments/Rust/command-line-arguments-1.rust similarity index 100% rename from Task/Command-line-arguments/Rust/command-line-arguments-1.rs rename to Task/Command-line-arguments/Rust/command-line-arguments-1.rust diff --git a/Task/Command-line-arguments/Rust/command-line-arguments-2.rs b/Task/Command-line-arguments/Rust/command-line-arguments-2.rust similarity index 100% rename from Task/Command-line-arguments/Rust/command-line-arguments-2.rs rename to Task/Command-line-arguments/Rust/command-line-arguments-2.rust diff --git a/Task/Command-line-arguments/Scheme/command-line-arguments.scm b/Task/Command-line-arguments/Scheme/command-line-arguments.ss similarity index 100% rename from Task/Command-line-arguments/Scheme/command-line-arguments.scm rename to Task/Command-line-arguments/Scheme/command-line-arguments.ss diff --git a/Task/Command-line-arguments/TAV/command-line-arguments.tav b/Task/Command-line-arguments/TAV/command-line-arguments.tav deleted file mode 100644 index 9586ed1181..0000000000 --- a/Task/Command-line-arguments/TAV/command-line-arguments.tav +++ /dev/null @@ -1,3 +0,0 @@ -main (parms):+ - ?# i =: give keys parms - print i __ parms[i] diff --git a/Task/Command-line-arguments/Tcl/command-line-arguments-1.tcl b/Task/Command-line-arguments/Tcl/command-line-arguments-1.tcl deleted file mode 100644 index 3e39085837..0000000000 --- a/Task/Command-line-arguments/Tcl/command-line-arguments-1.tcl +++ /dev/null @@ -1,3 +0,0 @@ -if { $argc >= 1 } { - puts [lindex $argv 0] -} diff --git a/Task/Command-line-arguments/Tcl/command-line-arguments-2.tcl b/Task/Command-line-arguments/Tcl/command-line-arguments-2.tcl deleted file mode 100644 index 8db1f98495..0000000000 --- a/Task/Command-line-arguments/Tcl/command-line-arguments-2.tcl +++ /dev/null @@ -1,2 +0,0 @@ -$ tclsh file.tcl test -test diff --git a/Task/Command-line-arguments/Tcl/command-line-arguments.tcl b/Task/Command-line-arguments/Tcl/command-line-arguments.tcl new file mode 100644 index 0000000000..0827817f9e --- /dev/null +++ b/Task/Command-line-arguments/Tcl/command-line-arguments.tcl @@ -0,0 +1,3 @@ +if { $argc > 1 } { + puts [lindex $argv 1] +} diff --git a/Task/Command-line-arguments/Uiua/command-line-arguments.uiua b/Task/Command-line-arguments/Uiua/command-line-arguments.uiua deleted file mode 100644 index 6d3c8fe5b3..0000000000 --- a/Task/Command-line-arguments/Uiua/command-line-arguments.uiua +++ /dev/null @@ -1 +0,0 @@ -&args diff --git a/Task/Command-line-arguments/VBScript/command-line-arguments.vbs b/Task/Command-line-arguments/VBScript/command-line-arguments.vb similarity index 100% rename from Task/Command-line-arguments/VBScript/command-line-arguments.vbs rename to Task/Command-line-arguments/VBScript/command-line-arguments.vb diff --git a/Task/Command-line-arguments/X86-64-Assembly/command-line-arguments.x86-64 b/Task/Command-line-arguments/X86-64-Assembly/command-line-arguments.x86-64 deleted file mode 100644 index 42af33fb12..0000000000 --- a/Task/Command-line-arguments/X86-64-Assembly/command-line-arguments.x86-64 +++ /dev/null @@ -1,58 +0,0 @@ -format ELF64 executable 3 -entry start - -segment executable readable -start: - pop rax ; pop argc off stack. It should be at least 1 - .loop0: - pop rdi ; pop the pointer to argument string off stack - call prints ; call a function to print a string - mov rdi, 0x0a ; parameter to next function. 0x0a = line feed = 10 - call printc ; call a function to print a single character - dec rax ; decrement RAX. - jnz .loop0 ; get next argument if RAX is not yet 0 - .exit: - mov rax, 60 - mov rdi, 0 - syscall - -prints: ; function that prints a zero terminated string - push rax - push rdi - push rsi - push rdx - xor rdx, rdx - cmp byte [rdi + rdx], 0 - je .return - .stloop: - cmp byte [rdi + rdx], 0 - je .printit - inc rdx - jmp .stloop - .printit: - mov rax, 1 - mov rsi, rdi - mov rdi, 1 - syscall - .return: - pop rdx - pop rsi - pop rdi - pop rax - ret - -printc: ;function that prints a single character in rdi (dil). - push rax - push rsi - push rdx - push rdi - mov rax, 1 - mov rdi, 1 - mov rsi, rsp - mov rdx, 1 - syscall - pop rdi - pop rdx - pop rsi - pop rax - ret diff --git a/Task/Command-line-arguments/Zig/command-line-arguments.zig b/Task/Command-line-arguments/Zig/command-line-arguments.zig deleted file mode 100644 index 5b35ff255c..0000000000 --- a/Task/Command-line-arguments/Zig/command-line-arguments.zig +++ /dev/null @@ -1,13 +0,0 @@ -const std = @import("std"); - -pub fn main() !void { - const stdout = std.io.getStdOut().writer(); - - var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); - defer arena.deinit(); - const allocator = arena.allocator(); - - const args = try std.process.argsAlloc(allocator); - - try stdout.print("{s}\n", .{args}); -} diff --git a/Task/Commatizing-numbers/ALGOL-68/commatizing-numbers.alg b/Task/Commatizing-numbers/ALGOL-68/commatizing-numbers.alg index 161b62d233..290bfb3719 100644 --- a/Task/Commatizing-numbers/ALGOL-68/commatizing-numbers.alg +++ b/Task/Commatizing-numbers/ALGOL-68/commatizing-numbers.alg @@ -53,48 +53,35 @@ PROC commatize = ( STRING text, INT location, INT period, STRING separator )STRI # commatizing procedure # MODE COMMATIZINGOPTIONS = STRUCT( STRING text, INT location, INT period, STRING separator ); PRIO LOCATION = 9; -OP LOCATION = ( STRING text, INT location )COMMATIZINGOPTIONS: - COMMATIZINGOPTIONS( text, location, 0, "" ); +OP LOCATION = ( STRING text, INT location )COMMATIZINGOPTIONS: COMMATIZINGOPTIONS( text, location, 0, "" ); PRIO PERIOD = 9; -OP PERIOD = ( STRING text, INT period )COMMATIZINGOPTIONS: - COMMATIZINGOPTIONS( text, 0, period, "" ); +OP PERIOD = ( STRING text, INT period )COMMATIZINGOPTIONS: COMMATIZINGOPTIONS( text, 0, period, "" ); PRIO SEPARATOR = 9; -OP SEPARATOR = ( STRING text, CHAR separator )COMMATIZINGOPTIONS: - COMMATIZINGOPTIONS( text, 0, 0, separator ); -OP SEPARATOR = ( STRING text, STRING separator )COMMATIZINGOPTIONS: - COMMATIZINGOPTIONS( text, 0, 0, separator ); +OP SEPARATOR = ( STRING text, CHAR separator )COMMATIZINGOPTIONS: COMMATIZINGOPTIONS( text, 0, 0, separator ); +OP SEPARATOR = ( STRING text, STRING separator )COMMATIZINGOPTIONS: COMMATIZINGOPTIONS( text, 0, 0, separator ); OP LOCATION = ( COMMATIZINGOPTIONS opts, INT location )COMMATIZINGOPTIONS: - COMMATIZINGOPTIONS( text OF opts, location, period OF opts, separator OF opts ); + COMMATIZINGOPTIONS( text OF opts, location, period OF opts, separator OF opts ); OP PERIOD = ( COMMATIZINGOPTIONS opts, INT period )COMMATIZINGOPTIONS: - COMMATIZINGOPTIONS( text OF opts, location OF opts, period, separator OF opts ); + COMMATIZINGOPTIONS( text OF opts, location OF opts, period, separator OF opts ); OP SEPARATOR = ( COMMATIZINGOPTIONS opts, CHAR separator )COMMATIZINGOPTIONS: - COMMATIZINGOPTIONS( text OF opts, location OF opts, period OF opts, separator ); + COMMATIZINGOPTIONS( text OF opts, location OF opts, period OF opts, separator ); OP SEPARATOR = ( COMMATIZINGOPTIONS opts, STRING separator )COMMATIZINGOPTIONS: - COMMATIZINGOPTIONS( text OF opts, location OF opts, period OF opts, separator ); + COMMATIZINGOPTIONS( text OF opts, location OF opts, period OF opts, separator ); OP COMMATIZE = ( STRING text )STRING: commatize( text, 0, 0, "" ); OP COMMATIZE = ( COMMATIZINGOPTIONS opts )STRING: - commatize( text OF opts, location OF opts, period OF opts, separator OF opts ); + commatize( text OF opts, location OF opts, period OF opts, separator OF opts ); # test the commatization procedure and operators # -print( ( COMMATIZE( "pi=3.14159265358979323846264338327950288419716939937510582097494459231" - PERIOD 5 SEPARATOR " " LOCATION 6 ), newline ) ); -print( ( COMMATIZE( "The author has two Z$100000000000000 Zimbabwe notes (100 trillion)." - SEPARATOR "." ), newline ) ); -print( ( COMMATIZE( "The author has two Z$100000000000000 Zimbabwe notes (100 trillion)." - SEPARATOR "." PERIOD 6 ), newline ) ); -print( ( COMMATIZE( "The author has two Z$100000000000000 Zimbabwe notes (100 trillion)." - SEPARATOR "__" ), newline ) ); -print( ( COMMATIZE( "The author has two Z$100000000000000 Zimbabwe notes (100 trillion)." - LOCATION 26 PERIOD 1 SEPARATOR "::" ), newline ) ); -print( ( COMMATIZE """-in Aus$+1411.8millions""", newline ) ); -print( ( COMMATIZE "===US$0017440 millions=== (in 2000 dollars)", newline ) ); -print( ( COMMATIZE "123.e8000 is pretty big.", newline ) ); -print( ( COMMATIZE "The land area of the earth is 57268900(29% of the surface) square miles.", newline ) ); -print( ( COMMATIZE "Ain't no numbers in this here words, nohow, no way, Jose.", newline ) ); -print( ( COMMATIZE "James was never known as 0000000007", newline ) ); -print( ( COMMATIZE ( "Arthur Eddington wrote: I believe there are " - + "15747724136275002577605653961181555468044717914527116709366231425076185631031296 " - + "protons in the universe." - ), newline ) ); -print( ( COMMATIZE " $-140000±100 millions.", newline ) ); -print( ( COMMATIZE "6/9/1946 was a good year for some.", newline ) ) +print( ( COMMATIZE( "pi=3.14159265358979323846264338327950288419716939937510582097494459231" PERIOD 5 SEPARATOR " " LOCATION 6 ), + newline ) ); +print( ( COMMATIZE( "The author has two Z$100000000000000 Zimbabwe notes (100 trillion)." SEPARATOR "." ), newline ) ); +print( ( COMMATIZE """-in Aus$+1411.8millions""", newline ) ); +print( ( COMMATIZE "===US$0017440 millions=== (in 2000 dollars)", newline ) ); +print( ( COMMATIZE "123.e8000 is pretty big.", newline ) ); +print( ( COMMATIZE "The land area of the earth is 57268900(29% of the surface) square miles.", newline ) ); +print( ( COMMATIZE "Ain't no numbers in this here words, nohow, no way, Jose.", newline ) ); +print( ( COMMATIZE "James was never known as 0000000007", newline ) ); +print( ( COMMATIZE "Arthur Eddington wrote: I believe there are 15747724136275002577605653961181555468044717914527116709366231425076185631031296 protons in the universe.", + newline ) ); +print( ( COMMATIZE " $-140000±100 millions.", newline ) ); +print( ( COMMATIZE "6/9/1946 was a good year for some.", newline ) ) diff --git a/Task/Commatizing-numbers/Ballerina/commatizing-numbers.ballerina b/Task/Commatizing-numbers/Ballerina/commatizing-numbers.ballerina deleted file mode 100644 index 9b5aaf9eca..0000000000 --- a/Task/Commatizing-numbers/Ballerina/commatizing-numbers.ballerina +++ /dev/null @@ -1,90 +0,0 @@ -import ballerina/io; - -function commatize(string s, int begin = 0, int step = 3, string sep = ",") { - var invert = function(string n) returns string { - string t = ""; - foreach int i in int:range(n.length() - 1, -1, -1) { t += n[i]; } - return t; - }; - - var addSeps = function(string nn, boolean dp) returns string { - string n = nn; - string lz = ""; - if !dp && n.startsWith("0") && n != "0" { - string:RegExp pattern = re `^0+`; - string k = pattern.replace(n, ""); - if k == "" { k = "0"; } - foreach int i in 1 ... n.length() - k.length() { lz += "0"; } - n = k; - } - if dp { n = invert(n); } // invert if after decimal point - int i = n.length() - step; - while i >= 1 { - n = n.substring(0, i) + sep + n.substring(i); - i -= step; - } - if dp { n = invert(n); } // invert back - return lz + n; - }; - - var isExponent = function(string:Char c) returns boolean { - return "eEdDpP^∙x↑*⁰¹²³⁴⁵⁶⁷⁸⁹".includes(c); - }; - - string t = s; - string acc = (begin == 0) ? "" : t.substring(0, begin); - string n = ""; - boolean dp = false; - foreach int j in begin ..< t.length() { - string:Char c = t[j]; - if c >= "0" && c <= "9" { - n += t[j]; - if j == t.length() - 1 { - if acc != "" && isExponent(acc[acc.length() - 1]) { - acc = s; - } else { - acc += addSeps(n, dp); - } - } - } else if n != "" { - if acc != "" && isExponent(acc[acc.length() - 1]) { - acc = s; - break; - } else if t[j] != "." { - acc += addSeps(n, dp) + t.substring(j); - break; - } else { - acc += addSeps(n, dp) + t[j]; - dp = true; - n = ""; - } - } else { - acc += t[j]; - } - } - io:println(s); - io:println(acc); - io:println(); -} - -public function main() { - commatize("123456789.123456789", 0, 2, "*"); - commatize(".123456789", 0, 3, "-"); - commatize("57256.1D-4", 0, 4, "__"); - commatize("pi=3.14159265358979323846264338327950288419716939937510582097494459231", 0, 5, " "); - commatize("The author has two Z$100000000000000 Zimbabwe notes (100 trillion).", 0, 3, "."); - - string[] defaults = [ - "\"-in Aus$+1411.8millions\"", - "===US$0017440 millions=== (in 2000 dollars)", - "123.e8000 is pretty big.", - "The land area of the earth is 57268900(29% of the surface) square miles.", - "Ain't no numbers in this here words, nohow, no way, Jose.", - "James was never known as 0000000007", - "Arthur Eddington wrote: I believe there are 15747724136275002577605653961181555468044717914527116709366231425076185631031296 protons in the universe.", - " $-140000±100 millions.", - "6/9/1946 was a good year for some." - ]; - - foreach string d in defaults { commatize(d); } -} diff --git a/Task/Commatizing-numbers/C++/commatizing-numbers.cpp b/Task/Commatizing-numbers/C++/commatizing-numbers.cpp deleted file mode 100644 index f9e7ce9e09..0000000000 --- a/Task/Commatizing-numbers/C++/commatizing-numbers.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include -#include -#include - -bool contains(const std::string& haystack, const char needle) { - return haystack.find(needle) != std::string::npos; -} - -void commatize(std::string text, const int32_t& start_index = 0, - const int32_t& step = 3, const std::string& separator = ",") { - std::cout << "Before: " << text << std::endl; - const int32_t size = text.size(); - - for ( int32_t i = start_index; i < size; ++i ) { - if ( contains("123456789", text[i]) ) { - for ( int32_t j = i + 1; j <= size; ++j ) { - if ( j > size || ! contains("0123456789", text[j]) ) { - for ( int32_t k = j - 1 - step; k >= i; k -= step ) { - text.insert(k + 1, separator); - } - break; - } - } - break; - } - } - - std::cout << " After: " << text << std::endl << std::endl; -} - -int main() { - commatize("pi=3.14159265358979323846264338327950288419716939937510582097494459231", 6, 5, " "); - commatize("The author has two Z$100000000000000 Zimbabwe notes (100 trillion)."); - commatize("\"-in Aus$+1411.8millions\""); - commatize("===US$0017440 millions=== (in 2000 dollars)"); - commatize("123.e8000 is pretty big."); - commatize("The land area of the earth is 57268900(29% of the surface) square miles."); - commatize("Ain't no numbers in this here words, nohow, no way, Jose."); - commatize("James was never known as 0000000007"); - commatize("Arthur Eddington wrote: I believe there are " - "15747724136275002577605653961181555468044717914527116709366231425076185631031296" - " protons in the universe."); - commatize(" $-140000±100 millions."); - commatize("6/9/1946 was a good year for some."); -} diff --git a/Task/Commatizing-numbers/Delphi/commatizing-numbers.pas b/Task/Commatizing-numbers/Delphi/commatizing-numbers.delphi similarity index 100% rename from Task/Commatizing-numbers/Delphi/commatizing-numbers.pas rename to Task/Commatizing-numbers/Delphi/commatizing-numbers.delphi diff --git a/Task/Commatizing-numbers/Fortran/commatizing-numbers.f b/Task/Commatizing-numbers/Fortran/commatizing-numbers.f deleted file mode 100644 index 626b9ccf8f..0000000000 --- a/Task/Commatizing-numbers/Fortran/commatizing-numbers.f +++ /dev/null @@ -1,207 +0,0 @@ -! Commatizing numbers -! -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.04 -! GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 on Kubuntu 25.04 -! Note that VSI Fortran on VMS does not compile this code because its current version -! cannot handle allocatable character strings -! -! U.B., August 2025 -! -program commatisator - -implicit none - -logical, parameter ::DEBUG=.false. - - -call commatize("pi=3.14159265358979323846264338327950288419716939937510582097494459231", 3, 5) -call commatize("The author has two Z$100000000000000 Zimbabwe notes (100 trillion).", 1,3, '.') ! Use decimal point as separator -call commatize('"-in Aus$+1411.8millions"') ! Here the double quotes (") are part of the text. -call commatize("===US$0017440 millions=== (in 2000 dollars)") -call commatize("123.e8000 is pretty big.") -call commatize("The land area of the earth is 57268900(29% of the surface) square miles.") -call commatize("Ain't no numbers in this here words, nohow, no way, Jose.") -call commatize("James was never known as 0000000007", 0,3) -call commatize("Arthur Eddington wrote: I believe there are " // & - "15747724136275002577605653961181555468044717914527116709366231425076185631031296" // & - " protons in the universe.") -call commatize(" $-140000±100 millions.") -call commatize("6/9/1946 was a good year for some.") - -contains - -subroutine commatize (text, astartIdx, agroupSize, aseparator) - ! Arguments - character(*), intent(in) :: text - integer, intent(in), optional :: astartIdx - integer, intent(in), optional :: agroupSize - character, intent(in), optional :: aseparator - - ! These variables are there even if optional args are omitted. - integer :: startIdx - integer :: groupSize - character :: separator - - integer :: sz, ii - integer :: ipBegin, ipPoint, ipEnd - - character(:), allocatable :: newtext - ! - ! Defaults for optional arguments - ! and protect against invalid arguments - if (present (astartIdx)) then - startIDx = max (1, astartidx) - else - startIdx = 1 - endif - if (present (agroupSize)) then - groupsize = max(1, agroupsize) - else - groupsize = 3 - endif - if (present (aseparator)) then - separator = aseparator - else - separator = ',' - endif - - sz = len (text) - ipBegin = 0 - ipPoint = 0 - ipEnd = 0 - - ! Find beginning and end of the first numeric part of the string - do ii=startidx,sz - if (isadigit (text(ii:ii), '1','9')) then ! ignoring leading zeroes - ipBegin = ii - exit ! Only the very first number is of any interest. - else if (text(ii:ii) .eq. '.') then ! Leading Decimal point - if (ii .lt. sz) then - if (isadigit (text(ii+1:ii+1), '0','9')) then ! must be followed by a valid digit - ! Entire number starts here, it is something valid like ".123" - if (DEBUG) print *, 'Decimal point detected at ii,sz= ', ii, sz - ipBegin = ii - ipPoint = ii - exit - endif - endif - end if - end do - - ! Any number detected? Search for the end and, if necessary, the decimal point - if (ipBegin .gt. 0 .and. ipBegin .le. sz) then - do ii=ipBegin+1, sz+1 - if (ii > sz) then - ipEnd = sz - else if (text(ii:ii) .eq. '.' .and. ipPoint .eq. 0 .and. ii .lt. sz ) then - if (isadigit (text(ii+1:ii+1), '0','9')) then ! Decimal point must be followed by valid digit - ipPoint = ii - else - ipEnd = ii-1 ! Might be valid decimal point, but terminates the number. - exit ! no need to continue, have found the end. - endif - else if (.not. isadigit (text(ii:ii), '0','9')) then ! Anything other than a digit or point terminated the number. - ipEnd = ii-1 - exit - end if - enddo - end if - - ! Found a number? - ! Three possibe cases: real number (>=1) with decimal point and digits before and after - ! real number (<1) starting with decimal point such as .71 - ! integer number without decimal point. - if (ipBegin .ne. 0) then ! Any nmumber - if (ipPoint .gt. ipbegin) then ! Not starting with a decimal point but decimal point inside - if (ipBegin .gt. 1) then - newtext = text (:ipBegin-1) ! copy entire text before the numeric - else - newtext = '' ! In any case variable 'newtext' must be initialized - end if - newtext = newtext // setSeparators (text, ipPoint-1, ipBegin, & - groupsize, separator , requiredSize (ipPoint-1, ipBegin, groupsize)) // '.' - newtext = newtext // setSeparators (text, ipPoint+1, ipEnd, & - groupsize, separator, requiredSize (ipPoint+1, ipEnd ,groupsize)) - else if (ipPoint .ne. 0 .and. ipPoint .lt. sz) then ! Starting with decimal point - newtext = '.' // setSeparators (text, ipPoint+1, ipEnd, & - groupsize, separator, requiredSize (ipPoint+1, ipEnd,groupsize) ) - else ! Integer number - newtext = text (:ipBegin-1) // setSeparators (text, ipEnd, ipBegin, & - groupsize, separator, requiredSize (ipEnd, ipBegin, groupsize) ) - endif - if (ipEnd .lt. sz) then - newtext = newtext // text (ipend+1:) ! Append alltext behind the number - endif - else ! No number, just print straight copy - newtext = text - endif - - print '("Before: ", A)' , text - print '(" After: ", A/)', newtext - - -end subroutine commatize - - ! estimate how many separators wii be needed in a given range of digits - ! and calculate the new tring length therefrom. - function requiredSize (i0,i1,step) result (size) - integer, intent(in) :: i0, i1, step - integer :: size - integer :: l,c - - l = iabs (i1-i0) + 1 ! Length of the string to be considered - c = (l-1) / step ! Number of separators to insert - - size = l + c - end function requiredSize - - ! Insert separators into a numerical string - function setSeparators (text, i0, i1, step, separator, resSize ) result (ntext ) - character(*), intent(in) :: text ! entire text - integer, intent(in) :: i0,i1 ! The numeric part goes from i0 to i1 (incl) - integer, intent(in) :: step ! the group size between separators - character, intent(in) :: separator ! the separator character - integer, intent(in) :: resSize ! New size of result string - character(len=resSize) :: ntext ! The resultant string, including th e separators - integer :: ii, jj, cnt, direction ! Helpers - - ! character-wise copy the old text into new text - ! Loop index can go into either direction - if (i0 .gt. i1 ) then - direction = -1 - else - direction = 1 - end if - - ! Position of text(ii:ii) inside the resultant text - if (i0 .lt. i1) then - jj = 1 - else - jj = resSize - end if - - cnt = 0 - do ii = i0, i1, direction - ntext (jj:jj) = text (ii:ii) ! Copy characters - jj = jj + direction - cnt = cnt + 1 ! count copied characters - ! Group complete? Insert separator - if (cnt .eq. step .and. jj .gt. 0 .and. jj .lt. resSize) then - ntext(jj:jj) = separator - jj = jj + direction - cnt = 0 - end if - end do - end function setSeparators - -! Decide if a given character c is a digit in the range from "from" to "to". -function isadigit (c, from, to) result (YN) - character, intent(in) :: c, from, to - logical :: YN - - YN = c>= from .and. c<=to -end function isadigit - - - -end program commatisator diff --git a/Task/Commatizing-numbers/JavaScript/commatizing-numbers.js b/Task/Commatizing-numbers/JavaScript/commatizing-numbers.js deleted file mode 100644 index ab6c8185ab..0000000000 --- a/Task/Commatizing-numbers/JavaScript/commatizing-numbers.js +++ /dev/null @@ -1,42 +0,0 @@ -function contains(haystack, needle) { - return haystack.indexOf(needle) !== -1; -} - -function commatize(text, start_index = 0, step = 3, separator = ",") { - console.log("Before: " + text); - const size = text.length; - - for (let i = start_index; i < size; ++i) { - if (contains("123456789", text[i])) { - for (let j = i + 1; j <= size; ++j) { - if (j > size || !contains("0123456789", text[j])) { - for (let k = j - 1 - step; k >= i; k -= step) { - text = text.slice(0, k + 1) + separator + text.slice(k + 1); - } - break; - } - } - break; - } - } - - console.log(" After: " + text + "\n"); -} - -function main() { - commatize("pi=3.14159265358979323846264338327950288419716939937510582097494459231", 6, 5, " "); - commatize("The author has two Z$100000000000000 Zimbabwe notes (100 trillion)."); - commatize("\"-in Aus$+1411.8millions\""); - commatize("===US$0017440 millions=== (in 2000 dollars)"); - commatize("123.e8000 is pretty big."); - commatize("The land area of the earth is 57268900(29% of the surface) square miles."); - commatize("Ain't no numbers in this here words, nohow, no way, Jose."); - commatize("James was never known as 0000000007"); - commatize("Arthur Eddington wrote: I believe there are " + - "15747724136275002577605653961181555468044717914527116709366231425076185631031296" + - " protons in the universe."); - commatize(" $-140000±100 millions."); - commatize("6/9/1946 was a good year for some."); -} - -main(); diff --git a/Task/Commatizing-numbers/Julia/commatizing-numbers.jl b/Task/Commatizing-numbers/Julia/commatizing-numbers.julia similarity index 100% rename from Task/Commatizing-numbers/Julia/commatizing-numbers.jl rename to Task/Commatizing-numbers/Julia/commatizing-numbers.julia diff --git a/Task/Commatizing-numbers/Kotlin/commatizing-numbers.kts b/Task/Commatizing-numbers/Kotlin/commatizing-numbers.kotlin similarity index 100% rename from Task/Commatizing-numbers/Kotlin/commatizing-numbers.kts rename to Task/Commatizing-numbers/Kotlin/commatizing-numbers.kotlin diff --git a/Task/Commatizing-numbers/Pluto/commatizing-numbers.pluto b/Task/Commatizing-numbers/Pluto/commatizing-numbers.pluto deleted file mode 100644 index a364a0fa06..0000000000 --- a/Task/Commatizing-numbers/Pluto/commatizing-numbers.pluto +++ /dev/null @@ -1,78 +0,0 @@ -require "uchar" - -local function commatize(s, start = 1, step = 3, sep = ",") - local function add_seps(n, dp) - local lz = "" - if !dp and n:startswith("0") and n != "0" then - local k = n:lstrip("0") - if k == "" then k = "0" end - lz = "0":rep(#n - #k) - n = k - end - if dp then n = n:reverse() end -- invert if after decimal point - local i = #n - step + 1 - while i >= 2 do - n = n:sub(1, i - 1) .. sep .. n:sub(i) - i -= step - end - if dp then n = n:reverse() end -- invert back - return lz .. n - end - - local function is_exponent(c) return c in "eEdDpP^∙x↑*⁰¹²³⁴⁵⁶⁷⁸⁹" end - - local t = uchar.of(s) - local acc = start == 1 ? "" : t:sub(1, start - 1) - local n = "" - local dp = false - for j = start, t:len() do - local c = t:get(j) - if c >= "0" and c <= "9" then - n ..= t:get(j) - if j == t:len() do - if acc != "" and is_exponent(acc[-1]) then - acc = s - else - acc ..= add_seps(n, dp) - end - end - elseif n != "" then - if acc != "" and is_exponent(acc[-1]) then - acc = s - break - elseif t:get(j) != "." then - acc ..= add_seps(n, dp) .. t:sub(j) - break - else - acc ..= add_seps(n, dp) .. t:get(j) - dp = true - n = "" - end - else - acc ..= t:get(j) - end - end - print(s); - print(acc); - print() -end - -commatize("123456789.123456789", 1, 2, "*") -commatize(".123456789", 1, 3, "-") -commatize("57256.1D-4", 1, 4, "__") -commatize("pi=3.14159265358979323846264338327950288419716939937510582097494459231", 1, 5, " ") -commatize("The author has two Z$100000000000000 Zimbabwe notes (100 trillion).", 1, 3, ".") - -local defaults = { - "\"-in Aus$+1411.8millions\"", - "===US$0017440 millions=== (in 2000 dollars)", - "123.e8000 is pretty big.", - "The land area of the earth is 57268900(29% of the surface) square miles.", - "Ain't no numbers in this here words, nohow, no way, Jose.", - "James was never known as 0000000007", - "Arthur Eddington wrote: I believe there are 15747724136275002577605653961181555468044717914527116709366231425076185631031296 protons in the universe.", - " $-140000±100 millions.", - "6/9/1946 was a good year for some." -} - -for defaults as d do commatize(d) end diff --git a/Task/Commatizing-numbers/Rust/commatizing-numbers.rs b/Task/Commatizing-numbers/Rust/commatizing-numbers.rs deleted file mode 100644 index cc7751fc9f..0000000000 --- a/Task/Commatizing-numbers/Rust/commatizing-numbers.rs +++ /dev/null @@ -1,45 +0,0 @@ -use itertools::Itertools; - -fn commatize(old_text: &str, start_index: usize, step: usize, sep: &str) -> String { - let mut text = old_text.to_string(); - let len = text.len(); - let textchars = text.chars().collect_vec(); - for i in start_index..len { - if "123456789".contains(textchars[i]) { - for j in i + 1..=len { - if j >= len || !"0123456789".contains(textchars[j]) { //start at end - if step <= j - i { - for k in (i..j - step).rev().step_by(step) { - text.insert_str(k + 1, sep); - } - break; - } - } - } - break; - } - } - return text; -} - -fn main() { - let tests = [ - ("pi=3.14159265358979323846264338327950288419716939937510582097494459231", 6, 5, " "), - ("The author has two Z$100000000000000 Zimbabwe notes (100 trillion).", 0, 3, ","), - ("\"-in Aus$+1411.8millions\"", 0, 3, ","), - ("===US$0017440 millions=== (in 2000 dollars)", 0, 3, ","), - ("123.e8000 is pretty big.", 0, 3, ","), - ("The land area of the earth is 57268900(29% of the surface) square miles.", 0, 3, ","), - ("Ain't no numbers in this here words, nohow, no way, Jose.", 0, 3, ","), - ("James was never known as 0000000007", 0, 3, ","), - ("Arthur Eddington wrote: I believe there are 15747724136275002577605653961181555468044717914527116709366231425076185631031296 protons in the universe.", 0, 3, ","), - (" $-140000±100 millions.", 0, 3, ","), - ("6/9/1946 was a good year for some.", 0, 3, ","),]; - for t in tests { - println!( - "Before: {}\nAfter: {}\n", - t.0, - commatize(t.0, t.1, t.2, t.3) - ); - } -} diff --git a/Task/Commatizing-numbers/VBScript/commatizing-numbers.vbs b/Task/Commatizing-numbers/VBScript/commatizing-numbers.vb similarity index 100% rename from Task/Commatizing-numbers/VBScript/commatizing-numbers.vbs rename to Task/Commatizing-numbers/VBScript/commatizing-numbers.vb diff --git a/Task/Comments/Ada/comments.adb b/Task/Comments/Ada/comments.ada similarity index 100% rename from Task/Comments/Ada/comments.adb rename to Task/Comments/Ada/comments.ada diff --git a/Task/Comments/ArkScript/comments.ark b/Task/Comments/ArkScript/comments.ark deleted file mode 100644 index 3c09c8229b..0000000000 --- a/Task/Comments/ArkScript/comments.ark +++ /dev/null @@ -1,4 +0,0 @@ -# this is a comment - -# another comment -# with another below diff --git a/Task/Comments/AutoIt/comments.au3 b/Task/Comments/AutoIt/comments.au3 deleted file mode 100644 index 3fcfacc68f..0000000000 --- a/Task/Comments/AutoIt/comments.au3 +++ /dev/null @@ -1,5 +0,0 @@ -#cs -Everything between the cs and the ce is commented. -Commented code is not used by the computer. -#ce -;individual lines after a semicolon are commented. diff --git a/Task/Comments/AutoIt/comments.autoit b/Task/Comments/AutoIt/comments.autoit new file mode 100644 index 0000000000..260be4b084 --- /dev/null +++ b/Task/Comments/AutoIt/comments.autoit @@ -0,0 +1,5 @@ +#cs +Everything between the cs and and the ce is commented. +Commented code is not used by the computer. +#ce +;individual lines after a semicolon are commented. diff --git a/Task/Comments/Ballerina/comments.ballerina b/Task/Comments/Ballerina/comments.ballerina deleted file mode 100644 index 42158b75f2..0000000000 --- a/Task/Comments/Ballerina/comments.ballerina +++ /dev/null @@ -1,10 +0,0 @@ -// This is a single-line comment -int x = 10; // This is an inline comment - -# Represents a user record. -type User record { - # User's ID. - int id; - # User's name. - string name; -}; diff --git a/Task/Comments/Brainf---/comments-2.bf b/Task/Comments/Brainf---/comments-2.bf deleted file mode 100644 index 9b682b9f35..0000000000 --- a/Task/Comments/Brainf---/comments-2.bf +++ /dev/null @@ -1,3 +0,0 @@ -[ This is a header comment ] - -++++++++[->++++++++<]>. diff --git a/Task/Comments/Brainf---/comments-1.bf b/Task/Comments/Brainf---/comments.bf similarity index 100% rename from Task/Comments/Brainf---/comments-1.bf rename to Task/Comments/Brainf---/comments.bf diff --git a/Task/Comments/COBOL/comments-1.cob b/Task/Comments/COBOL/comments-1.cobol similarity index 100% rename from Task/Comments/COBOL/comments-1.cob rename to Task/Comments/COBOL/comments-1.cobol diff --git a/Task/Comments/COBOL/comments-2.cob b/Task/Comments/COBOL/comments-2.cobol similarity index 100% rename from Task/Comments/COBOL/comments-2.cob rename to Task/Comments/COBOL/comments-2.cobol diff --git a/Task/Comments/COBOL/comments-3.cob b/Task/Comments/COBOL/comments-3.cobol similarity index 100% rename from Task/Comments/COBOL/comments-3.cob rename to Task/Comments/COBOL/comments-3.cobol diff --git a/Task/Comments/COBOL/comments-4.cob b/Task/Comments/COBOL/comments-4.cobol similarity index 100% rename from Task/Comments/COBOL/comments-4.cob rename to Task/Comments/COBOL/comments-4.cobol diff --git a/Task/Comments/COBOL/comments-5.cob b/Task/Comments/COBOL/comments-5.cobol similarity index 100% rename from Task/Comments/COBOL/comments-5.cob rename to Task/Comments/COBOL/comments-5.cobol diff --git a/Task/Comments/COBOL/comments-6.cob b/Task/Comments/COBOL/comments-6.cobol similarity index 100% rename from Task/Comments/COBOL/comments-6.cob rename to Task/Comments/COBOL/comments-6.cobol diff --git a/Task/Comments/Chapel/comments.chpl b/Task/Comments/Chapel/comments.chapel similarity index 100% rename from Task/Comments/Chapel/comments.chpl rename to Task/Comments/Chapel/comments.chapel diff --git a/Task/Comments/Crystal/comments.cr b/Task/Comments/Crystal/comments.crystal similarity index 100% rename from Task/Comments/Crystal/comments.cr rename to Task/Comments/Crystal/comments.crystal diff --git a/Task/Comments/Delphi/comments.pas b/Task/Comments/Delphi/comments.delphi similarity index 100% rename from Task/Comments/Delphi/comments.pas rename to Task/Comments/Delphi/comments.delphi diff --git a/Task/Comments/Dragonstone/comments.dragonstone b/Task/Comments/Dragonstone/comments.dragonstone deleted file mode 100644 index e8359c75d5..0000000000 --- a/Task/Comments/Dragonstone/comments.dragonstone +++ /dev/null @@ -1,19 +0,0 @@ -#[ - Multi-Line Comment. -]# - -#[ - Nested Multi-Line Comment. - #[ - Inner comment. - #[ - It can go deep. - ]# - ]# - Outer comment. -]# - -# Single Line Comment - -#[ Multi-Line Comment on line ]# message = "Hello!" #[ Inside or Outside ]# -echo message # Another Trailing Comment. diff --git a/Task/Comments/Ed/comments.ed b/Task/Comments/Ed/comments.ed deleted file mode 100644 index 8ae6029f77..0000000000 --- a/Task/Comments/Ed/comments.ed +++ /dev/null @@ -1,3 +0,0 @@ -# A single-line comment. -# The only type of comment, really. -# No block comments in ed diff --git a/Task/Comments/Elixir/comments.ex b/Task/Comments/Elixir/comments.elixir similarity index 100% rename from Task/Comments/Elixir/comments.ex rename to Task/Comments/Elixir/comments.elixir diff --git a/Task/Comments/Emacs-Lisp/comments-1.el b/Task/Comments/Emacs-Lisp/comments-1.l similarity index 100% rename from Task/Comments/Emacs-Lisp/comments-1.el rename to Task/Comments/Emacs-Lisp/comments-1.l diff --git a/Task/Comments/Emacs-Lisp/comments-2.el b/Task/Comments/Emacs-Lisp/comments-2.l similarity index 100% rename from Task/Comments/Emacs-Lisp/comments-2.el rename to Task/Comments/Emacs-Lisp/comments-2.l diff --git a/Task/Comments/Emacs-Lisp/comments-3.el b/Task/Comments/Emacs-Lisp/comments-3.l similarity index 100% rename from Task/Comments/Emacs-Lisp/comments-3.el rename to Task/Comments/Emacs-Lisp/comments-3.l diff --git a/Task/Comments/Euphoria/comments-1.eu b/Task/Comments/Euphoria/comments-1.euphoria similarity index 100% rename from Task/Comments/Euphoria/comments-1.eu rename to Task/Comments/Euphoria/comments-1.euphoria diff --git a/Task/Comments/Euphoria/comments-2.eu b/Task/Comments/Euphoria/comments-2.euphoria similarity index 100% rename from Task/Comments/Euphoria/comments-2.eu rename to Task/Comments/Euphoria/comments-2.euphoria diff --git a/Task/Comments/FutureBasic/comments.basic b/Task/Comments/FutureBasic/comments.basic index 52cd38da36..d05a6c06d6 100644 --- a/Task/Comments/FutureBasic/comments.basic +++ b/Task/Comments/FutureBasic/comments.basic @@ -1,4 +1,5 @@ // Single line comment +' Single line comment rem Single line comment /* Single line comment */ diff --git a/Task/Comments/Gleam/comments.gleam b/Task/Comments/Gleam/comments.gleam deleted file mode 100644 index cc85cea83d..0000000000 --- a/Task/Comments/Gleam/comments.gleam +++ /dev/null @@ -1 +0,0 @@ -// comments start with "//" and continue to the end of the line. diff --git a/Task/Comments/Haxe/comments.hx b/Task/Comments/Haxe/comments.haxe similarity index 100% rename from Task/Comments/Haxe/comments.hx rename to Task/Comments/Haxe/comments.haxe diff --git a/Task/Comments/Idris/comments.idris b/Task/Comments/Idris/comments.idris deleted file mode 100644 index 6494468b7c..0000000000 --- a/Task/Comments/Idris/comments.idris +++ /dev/null @@ -1,9 +0,0 @@ -(according to Gemini AI): - -Idris2 uses comment characters similar to Haskell: - -Single-line comments: Start with -- (two hyphens). Everything from -- to the end of the line is a comment. - -Multi-line comments: Enclosed by {- and -}. These can span multiple lines and can also be nested. - -Additionally, Idris2 supports inline documentation comments which begin with ||| (three pipe symbols). These are parsed by the compiler and can be used to generate documentation. diff --git a/Task/Comments/Janet/comments.janet b/Task/Comments/Janet/comments.janet deleted file mode 100644 index c72e9ad78b..0000000000 --- a/Task/Comments/Janet/comments.janet +++ /dev/null @@ -1,7 +0,0 @@ -(according to Gemini AI): - -The Janet programming language uses the # character for comments. - -Single-line comments: Everything from # to the end of the line is treated as a comment. - -Janet does not have built-in multi-line comments in the same way some other languages do (like {- ... -} in Idris2 or /* ... */ in C-like languages). However, because Janet is expression-oriented, you can often use multi-line strings as a form of "comment" if you put them in a context where their value isn't used. diff --git a/Task/Comments/Julia/comments.jl b/Task/Comments/Julia/comments.julia similarity index 100% rename from Task/Comments/Julia/comments.jl rename to Task/Comments/Julia/comments.julia diff --git a/Task/Comments/Kotlin/comments.kts b/Task/Comments/Kotlin/comments.kotlin similarity index 100% rename from Task/Comments/Kotlin/comments.kts rename to Task/Comments/Kotlin/comments.kotlin diff --git a/Task/Comments/Modula-2/comments.mod2 b/Task/Comments/Modula-2/comments.mod2 index c6c4b9311c..0d7a59997a 100644 --- a/Task/Comments/Modula-2/comments.mod2 +++ b/Task/Comments/Modula-2/comments.mod2 @@ -1,4 +1,3 @@ -(* Modula-2/Modula-3 use the same style of comments *) -(* ...and comments (* can nest *) +(* Comments (* can nest *) and they can span multiple lines. *) diff --git a/Task/Comments/Modula-3/comments.mod3 b/Task/Comments/Modula-3/comments.mod3 new file mode 100644 index 0000000000..0d7a59997a --- /dev/null +++ b/Task/Comments/Modula-3/comments.mod3 @@ -0,0 +1,3 @@ +(* Comments (* can nest *) + and they can span multiple lines. + *) diff --git a/Task/Comments/OCaml/comments.ml b/Task/Comments/OCaml/comments.ocaml similarity index 100% rename from Task/Comments/OCaml/comments.ml rename to Task/Comments/OCaml/comments.ocaml diff --git a/Task/Comments/OPL/comments.opl b/Task/Comments/OPL/comments.opl deleted file mode 100644 index 901aa3e30b..0000000000 --- a/Task/Comments/OPL/comments.opl +++ /dev/null @@ -1,2 +0,0 @@ -REM This is a comment. -PAUSE 20 REM Can be placed behind statements, too. diff --git a/Task/Comments/Oberon/comments.oberon b/Task/Comments/Oberon/comments.oberon index 1177dbb75c..0af8c335d3 100644 --- a/Task/Comments/Oberon/comments.oberon +++ b/Task/Comments/Oberon/comments.oberon @@ -1,4 +1,4 @@ -(* Oberon-07/Oberon-2 use the same style of comments as Modula-2: this is a comment *) +(* this is a comment *) (* and this is a multiline comment diff --git a/Task/Comments/Odin/comments.odin b/Task/Comments/Odin/comments.odin deleted file mode 100644 index f8e21d0d05..0000000000 --- a/Task/Comments/Odin/comments.odin +++ /dev/null @@ -1,17 +0,0 @@ -(According to Gemini AI): - -The Odin programming language supports two types of comment characters: - -Single-line comments: Begin with //. - -Code snippet -// This is a single-line comment -my_variable: int // A comment for documentation -Multi-line comments: Begin with /* and end with */. Multi-line comments can also be nested. - -Code snippet -/* -This is a multi-line comment. -/* NOTE: comments can be nested! */ -You can have any text or code here and have it be commented. -*/ diff --git a/Task/Comments/PascalABC.NET/comments.pas b/Task/Comments/PascalABC.NET/comments.pas deleted file mode 100644 index 3af3369dfc..0000000000 --- a/Task/Comments/PascalABC.NET/comments.pas +++ /dev/null @@ -1,7 +0,0 @@ -(* This is a - multiline comment *) - -{ This is also a - multiline comment } - -// This is a single line comment diff --git a/Task/Comments/Pluto/comments.pluto b/Task/Comments/Pluto/comments.pluto deleted file mode 100644 index 357b06dcd5..0000000000 --- a/Task/Comments/Pluto/comments.pluto +++ /dev/null @@ -1,9 +0,0 @@ --- Single line comment - ---[[ Multi-line - comment ]] - ---[===[ - Another syntax - [[ which may contain square brackets ]] -]===] diff --git a/Task/Comments/PowerShell/comments-1.ps1 b/Task/Comments/PowerShell/comments-1.psh similarity index 100% rename from Task/Comments/PowerShell/comments-1.ps1 rename to Task/Comments/PowerShell/comments-1.psh diff --git a/Task/Comments/PowerShell/comments-2.ps1 b/Task/Comments/PowerShell/comments-2.psh similarity index 100% rename from Task/Comments/PowerShell/comments-2.ps1 rename to Task/Comments/PowerShell/comments-2.psh diff --git a/Task/Comments/Rebol/comments-1.rebol b/Task/Comments/REBOL/comments-1.rebol similarity index 100% rename from Task/Comments/Rebol/comments-1.rebol rename to Task/Comments/REBOL/comments-1.rebol diff --git a/Task/Comments/Rebol/comments-2.rebol b/Task/Comments/REBOL/comments-2.rebol similarity index 100% rename from Task/Comments/Rebol/comments-2.rebol rename to Task/Comments/REBOL/comments-2.rebol diff --git a/Task/Comments/Rust/comments.rs b/Task/Comments/Rust/comments.rust similarity index 100% rename from Task/Comments/Rust/comments.rs rename to Task/Comments/Rust/comments.rust diff --git a/Task/Comments/Scheme/comments.scm b/Task/Comments/Scheme/comments.ss similarity index 100% rename from Task/Comments/Scheme/comments.scm rename to Task/Comments/Scheme/comments.ss diff --git a/Task/Comments/Uiua/comments.uiua b/Task/Comments/Uiua/comments.uiua deleted file mode 100644 index 7dd15c1854..0000000000 --- a/Task/Comments/Uiua/comments.uiua +++ /dev/null @@ -1 +0,0 @@ -# This is a comment diff --git a/Task/Comments/Uxntal/comments.uxnatl b/Task/Comments/Uxntal/comments.uxnatl deleted file mode 100644 index 74169c1755..0000000000 --- a/Task/Comments/Uxntal/comments.uxnatl +++ /dev/null @@ -1,31 +0,0 @@ -( - Print a hex byte to decimal. -) - -( macros ) -%\n { 0a } -%newline { [ LIT2 \n -Console/write ] DEO } - -( devices ) -|10 @Console/vector $2 &read $1 ( &pad is unused ) &pad $5 &write $1 &error $1 - -( main program ) -|100 - -@on-reset ( -> ) - #42 print/dec newline - BRK - -( library ) -@print/dec ( dec -- ) - DUP #64 DIV /dec/try - DUP #0a DIV /dec/try - ( >> ) - - &dec/num ( num -- ) - #0a DIVk MUL SUB [ LIT "0 ] ADD .Console/write DEO - JMP2r - - &dec/try ( num -- ) - DUP ?/dec/num - POP JMP2r diff --git a/Task/Comments/VBScript/comments.vbs b/Task/Comments/VBScript/comments.vb similarity index 100% rename from Task/Comments/VBScript/comments.vbs rename to Task/Comments/VBScript/comments.vb diff --git a/Task/Comments/VHDL/comments.vhd b/Task/Comments/VHDL/comments.vhdl similarity index 100% rename from Task/Comments/VHDL/comments.vhd rename to Task/Comments/VHDL/comments.vhdl diff --git a/Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-1.adb b/Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-1.ada similarity index 100% rename from Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-1.adb rename to Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-1.ada diff --git a/Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-2.adb b/Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-2.ada similarity index 100% rename from Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-2.adb rename to Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-2.ada diff --git a/Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-3.adb b/Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-3.ada similarity index 100% rename from Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-3.adb rename to Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-3.ada diff --git a/Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-4.adb b/Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-4.ada similarity index 100% rename from Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-4.adb rename to Task/Compare-a-list-of-strings/Ada/compare-a-list-of-strings-4.ada diff --git a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-1.basic b/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-1.basic deleted file mode 100644 index 421239e7bb..0000000000 --- a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-1.basic +++ /dev/null @@ -1,2 +0,0 @@ -EQ = 1:N = VAL (S7$(0)): IF N > 1 THEN FOR I = 2 TO N:EQ = S7$(I - 1) = S7$(I): IF EQ THEN NEXT -LT = 1:N = VAL (S7$(0)): IF N > 1 THEN FOR I = 2 TO N:LT = S7$(I - 1) < S7$(I): IF LT THEN NEXT diff --git a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-2.basic b/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-2.basic deleted file mode 100644 index 1f1d5f90b0..0000000000 --- a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-2.basic +++ /dev/null @@ -1,12 +0,0 @@ - 0 GOSUB 4"PRINT & READ - 1 EQ = 1: IF N > 1 THEN FOR I = 2 TO N:EQ = S7$(I - 1) = S7$(I): IF EQ THEN NEXT : REMALL EQUAL - 2 LT = 1: IF N > 1 THEN FOR I = 2 TO N:LT = S7$(I - 1) < S7$(I): IF LT THEN NEXT : REMSTRICTLY ASCENDING - 3 FOR I = 0 TO 0: NEXT : END : GOTO : REMCLEAR ANY "FOR I" LOOP, QUIT & ALLOW "CONT" TO CONTINUE - 4 N = VAL (S7RING$(0)): IF N THEN FOR I = 1 TO N: PRINT MID$ (",",1,I > 1)S7RING$(I);: NEXT : REM​PRINT STRINGS - 5 READ S7RING$(0):N = VAL (S7RING$(0)): IF N THEN FOR I = 1 TO N: READ S7RING$(I): NEXT : REMREAD STRINGS - 6 RETURN - 160 DATA3,AA,BB,CC - 170 DATA3,AA,AA,AA - 180 DATA3,AA,CC,BB - 190 DATA4,AA,ACB,BB,CC - 200 DATA1,SINGLE ELEMENT diff --git a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-3.basic b/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-3.basic deleted file mode 100644 index 1e3c7bc6e9..0000000000 --- a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-3.basic +++ /dev/null @@ -1,2 +0,0 @@ -RUN -FOR J = 160 TO 200 STEP 10: PRINT EQ" "LT" ";: CONT diff --git a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-4.basic b/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-4.basic deleted file mode 100644 index 5bba4099eb..0000000000 --- a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-4.basic +++ /dev/null @@ -1 +0,0 @@ -NEXT diff --git a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-5.basic b/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-5.basic deleted file mode 100644 index 5bba4099eb..0000000000 --- a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-5.basic +++ /dev/null @@ -1 +0,0 @@ -NEXT diff --git a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-6.basic b/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-6.basic deleted file mode 100644 index 5bba4099eb..0000000000 --- a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-6.basic +++ /dev/null @@ -1 +0,0 @@ -NEXT diff --git a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-7.basic b/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-7.basic deleted file mode 100644 index 5bba4099eb..0000000000 --- a/Task/Compare-a-list-of-strings/Applesoft-BASIC/compare-a-list-of-strings-7.basic +++ /dev/null @@ -1 +0,0 @@ -NEXT diff --git a/Task/Compare-a-list-of-strings/Arturo/compare-a-list-of-strings.arturo b/Task/Compare-a-list-of-strings/Arturo/compare-a-list-of-strings.arturo index e019d6165f..647d6bb6be 100644 --- a/Task/Compare-a-list-of-strings/Arturo/compare-a-list-of-strings.arturo +++ b/Task/Compare-a-list-of-strings/Arturo/compare-a-list-of-strings.arturo @@ -1,4 +1,4 @@ -allEqual?: function [lst] -> one? unique lst +allEqual?: function [lst] -> 1 = size unique lst ascending?: function [lst] -> lst = sort lst lists: [ diff --git a/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-1.bqn b/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-1.bqn index a840cab418..513bc811cf 100644 --- a/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-1.bqn +++ b/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-1.bqn @@ -1 +1,8 @@ -⊣` +AllEq ← ⍋≡⍒ +Asc ← ¬∘AllEq∧∧≡⊢ + +•Show AllEq ⟨"AA", "AA", "AA", "AA"⟩ +•Show Asc ⟨"AA", "AA", "AA", "AA"⟩ + +•Show AllEq ⟨"AA", "ACB", "BB", "CC"⟩ +•Show Asc ⟨"AA", "ACB", "BB", "CC"⟩ diff --git a/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-2.bqn b/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-2.bqn index 51394587b4..680eb502aa 100644 --- a/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-2.bqn +++ b/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-2.bqn @@ -1,8 +1,4 @@ -AllEq ← ⍋≡⍒ # or ⊣`⊸≡ -Asc ← ⍷∘∧⊸≡ - -•Show AllEq ⟨"AA", "AA", "AA", "AA"⟩ -•Show Asc ⟨"AA", "AA", "AA", "AA"⟩ - -•Show AllEq ⟨"AA", "ACB", "BB", "CC"⟩ -•Show Asc ⟨"AA", "ACB", "BB", "CC"⟩ +1 +0 +0 +1 diff --git a/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-3.bqn b/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-3.bqn deleted file mode 100644 index 680eb502aa..0000000000 --- a/Task/Compare-a-list-of-strings/BQN/compare-a-list-of-strings-3.bqn +++ /dev/null @@ -1,4 +0,0 @@ -1 -0 -0 -1 diff --git a/Task/Compare-a-list-of-strings/COBOL/compare-a-list-of-strings.cob b/Task/Compare-a-list-of-strings/COBOL/compare-a-list-of-strings.cobol similarity index 100% rename from Task/Compare-a-list-of-strings/COBOL/compare-a-list-of-strings.cob rename to Task/Compare-a-list-of-strings/COBOL/compare-a-list-of-strings.cobol diff --git a/Task/Compare-a-list-of-strings/Crystal/compare-a-list-of-strings.cr b/Task/Compare-a-list-of-strings/Crystal/compare-a-list-of-strings.cr deleted file mode 100644 index d01e7aac6e..0000000000 --- a/Task/Compare-a-list-of-strings/Crystal/compare-a-list-of-strings.cr +++ /dev/null @@ -1,14 +0,0 @@ -def all_equal? (strings) - strings.all? {|elt| elt == strings[0] } -end - -def ascending? (strings) - strings.each.cons_pair.all? {|a, b| a < b } -end - -puts "strings all_equal? ascending?" -puts "-------------------------------" -["a a a a", "", "a", "a b c", "a c a"].each do |s| - ss = s.split - printf "%-10s %-5s %-5s\n", "["+ss.join(" ")+"]", all_equal?(ss), ascending?(ss) -end diff --git a/Task/Compare-a-list-of-strings/Delphi/compare-a-list-of-strings.pas b/Task/Compare-a-list-of-strings/Delphi/compare-a-list-of-strings.delphi similarity index 100% rename from Task/Compare-a-list-of-strings/Delphi/compare-a-list-of-strings.pas rename to Task/Compare-a-list-of-strings/Delphi/compare-a-list-of-strings.delphi diff --git a/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-1.duckdb b/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-1.duckdb deleted file mode 100644 index 1d1f8d16c8..0000000000 --- a/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-1.duckdb +++ /dev/null @@ -1,2 +0,0 @@ -select true = all (select coalesce( (lag(s) over ()) = s, true) - from t); diff --git a/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-2.duckdb b/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-2.duckdb deleted file mode 100644 index 42fd797832..0000000000 --- a/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-2.duckdb +++ /dev/null @@ -1,2 +0,0 @@ -select true = all (select coalesce(lag(s) over () <= s, true) - from t); diff --git a/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-3.duckdb b/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-3.duckdb deleted file mode 100644 index 4ad4d70f8b..0000000000 --- a/Task/Compare-a-list-of-strings/DuckDB/compare-a-list-of-strings-3.duckdb +++ /dev/null @@ -1,16 +0,0 @@ -create or replace function all_equal(lst) as ( - with l as (select unnest(lst) as s) - select true = all (select coalesce( (lag(s) over ()) = s, true) - from l) -); - -create or replace function monotonic_non_decreasing(lst) as ( - with l as (select unnest(lst) as s) - select true = all (select coalesce(lag(s) over () <= s, true) - from l) -); - -# Examples - -select l, all_equal(l), monotonic_non_decreasing(l) -from (select ['a','b'] as l union all select [] as l); diff --git a/Task/Compare-a-list-of-strings/EasyLang/compare-a-list-of-strings.easy b/Task/Compare-a-list-of-strings/EasyLang/compare-a-list-of-strings.easy index a451eb048b..86039c73d8 100644 --- a/Task/Compare-a-list-of-strings/EasyLang/compare-a-list-of-strings.easy +++ b/Task/Compare-a-list-of-strings/EasyLang/compare-a-list-of-strings.easy @@ -1,14 +1,22 @@ -proc test s$[] . +proc test s$[] . . ident = 1 ascend = 1 for i = 2 to len s$[] h = strcmp s$[i] s$[i - 1] - if h <> 0 : ident = 0 - if h <= 0 : ascend = 0 + if h <> 0 + ident = 0 + . + if h <= 0 + ascend = 0 + . . print s$[] - if ident = 1 : print "all equal" - if ascend = 1 : print "ascending" + if ident = 1 + print "all equal" + . + if ascend = 1 + print "ascending" + . print "" . test [ "AA" "BB" "CC" ] diff --git a/Task/Compare-a-list-of-strings/Elena/compare-a-list-of-strings.elena b/Task/Compare-a-list-of-strings/Elena/compare-a-list-of-strings.elena index 6329a3c522..b6c8ab0d12 100644 --- a/Task/Compare-a-list-of-strings/Elena/compare-a-list-of-strings.elena +++ b/Task/Compare-a-list-of-strings/Elena/compare-a-list-of-strings.elena @@ -26,13 +26,13 @@ testCases new string[]{"AA","ACB","BB","CC"}, new string[]{"single_element"}}; -public Program() +public program() { testCases.forEach::(list) { - Console.printLine(list.asEnumerable()," all equal - ",list.isEqual()); - Console.printLine(list.asEnumerable()," ascending - ",list.isAscending()) + console.printLine(list.asEnumerable()," all equal - ",list.isEqual()); + console.printLine(list.asEnumerable()," ascending - ",list.isAscending()) }; - Console.readChar() + console.readChar() } diff --git a/Task/Compare-a-list-of-strings/Elixir/compare-a-list-of-strings.ex b/Task/Compare-a-list-of-strings/Elixir/compare-a-list-of-strings.elixir similarity index 100% rename from Task/Compare-a-list-of-strings/Elixir/compare-a-list-of-strings.ex rename to Task/Compare-a-list-of-strings/Elixir/compare-a-list-of-strings.elixir diff --git a/Task/Compare-a-list-of-strings/Gleam/compare-a-list-of-strings.gleam b/Task/Compare-a-list-of-strings/Gleam/compare-a-list-of-strings.gleam deleted file mode 100644 index 501b6bb6ed..0000000000 --- a/Task/Compare-a-list-of-strings/Gleam/compare-a-list-of-strings.gleam +++ /dev/null @@ -1,12 +0,0 @@ -pub fn all_equal(strs: List(String)) -> Bool { - all_fulfill(fn(s1, s2) { s1 == s2 }, strs) -} - -pub fn all_increasing(strs: List(String)) -> Bool { - all_fulfill(fn(s1, s2) { string.compare(s1, s2) == order.Lt }, strs) -} - -fn all_fulfill(check: fn(String, String) -> Bool, strings: List(String)) -> Bool { - let pairs = list.zip(strings, list.drop(strings, 1)) - list.all(pairs, fn(pair) { check(pair.0, pair.1) }) -} diff --git a/Task/Compare-a-list-of-strings/Go/compare-a-list-of-strings.go b/Task/Compare-a-list-of-strings/Go/compare-a-list-of-strings.go index 920341f797..5c7546426d 100644 --- a/Task/Compare-a-list-of-strings/Go/compare-a-list-of-strings.go +++ b/Task/Compare-a-list-of-strings/Go/compare-a-list-of-strings.go @@ -11,7 +11,7 @@ func AllEqual(strings []string) bool { func AllLessThan(strings []string) bool { for i := 1; i < len(strings); i++ { - if strings[i - 1] >= strings[i] { + if !(strings[i - 1] < s) { return false } } diff --git a/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-2.icon b/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-2.icon deleted file mode 100644 index 05598811ee..0000000000 --- a/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-2.icon +++ /dev/null @@ -1,9 +0,0 @@ -# test for all identical -procedure allequal(L) - if *L >= 2 & !L ~== L[1] then fail else return -end - -# test for strictly ascending -procedure ascending(L) - if *L >= 2 & i := 1 to *L-1 & L[i] >>= L[i+1] then fail else return -end diff --git a/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-3.icon b/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-3.icon deleted file mode 100644 index 14327c0456..0000000000 --- a/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-3.icon +++ /dev/null @@ -1 +0,0 @@ -writes(if allequal(L) then "true" else "false") diff --git a/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-4.icon b/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-4.icon deleted file mode 100644 index bfd62b39e8..0000000000 --- a/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-4.icon +++ /dev/null @@ -1 +0,0 @@ -writes(if *L >= 2 & !L ~== L[1] then "false" else "true") diff --git a/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-1.icon b/Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings.icon similarity index 100% rename from Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings-1.icon rename to Task/Compare-a-list-of-strings/Icon/compare-a-list-of-strings.icon diff --git a/Task/Compare-a-list-of-strings/Jq/compare-a-list-of-strings-1.jq b/Task/Compare-a-list-of-strings/Jq/compare-a-list-of-strings-1.jq index 9a73ae5c6f..9d9694486b 100644 --- a/Task/Compare-a-list-of-strings/Jq/compare-a-list-of-strings-1.jq +++ b/Task/Compare-a-list-of-strings/Jq/compare-a-list-of-strings-1.jq @@ -1,11 +1,11 @@ # Are the strings all equal? def lexically_equal: - if length <= 1 then true - else . as $in - | all( range(0;length-1); $in[0] == $in[. + 1]) - end; + . as $in + | reduce range(0;length-1) as $i + (true; if . then $in[$i] == $in[$i + 1] else false end); -# Are the elements in strictly ascending order? +# Are the strings in strictly ascending order? def lexically_ascending: . as $in - | all( range(0;length-1); $in[.] < $in[. + 1]); + | reduce range(0;length-1) as $i + (true; if . then $in[$i] < $in[$i + 1] else false end); diff --git a/Task/Compare-a-list-of-strings/Julia/compare-a-list-of-strings.jl b/Task/Compare-a-list-of-strings/Julia/compare-a-list-of-strings.julia similarity index 100% rename from Task/Compare-a-list-of-strings/Julia/compare-a-list-of-strings.jl rename to Task/Compare-a-list-of-strings/Julia/compare-a-list-of-strings.julia diff --git a/Task/Compare-a-list-of-strings/K/compare-a-list-of-strings.k b/Task/Compare-a-list-of-strings/K/compare-a-list-of-strings.k deleted file mode 100644 index 94f07991ed..0000000000 --- a/Task/Compare-a-list-of-strings/K/compare-a-list-of-strings.k +++ /dev/null @@ -1,2 +0,0 @@ -alleq:&/1_~': -asc:&/(*<,)':,:' diff --git a/Task/Compare-a-list-of-strings/Kotlin/compare-a-list-of-strings.kts b/Task/Compare-a-list-of-strings/Kotlin/compare-a-list-of-strings.kotlin similarity index 100% rename from Task/Compare-a-list-of-strings/Kotlin/compare-a-list-of-strings.kts rename to Task/Compare-a-list-of-strings/Kotlin/compare-a-list-of-strings.kotlin diff --git a/Task/Compare-a-list-of-strings/M2000-Interpreter/compare-a-list-of-strings.m2000 b/Task/Compare-a-list-of-strings/M2000-Interpreter/compare-a-list-of-strings.m2000 index b02abbc166..14627c3e47 100644 --- a/Task/Compare-a-list-of-strings/M2000-Interpreter/compare-a-list-of-strings.m2000 +++ b/Task/Compare-a-list-of-strings/M2000-Interpreter/compare-a-list-of-strings.m2000 @@ -37,38 +37,3 @@ Module CheckIt { Print LessThan(A$())=False } Checkit -MODULE UsingLambdaFunctionAndFold { - equ=LAMBDA ->{ - =LAMBDA p$, c=0 -> { - IF c=0 THEN - p$=LETTER$: PUSH 1=1 : c++ - ELSE - READ q$ - IF STACKITEM() THEN - DROP - PUSH p$=q$ - p$=q$ - END IF - END IF - } - } - LessThan=LAMBDA ->{ - =LAMBDA p$, c=0 -> { - IF c=0 THEN - p$=LETTER$: PUSH 1=1 : c++ - ELSE - READ q$ - IF STACKITEM() THEN - DROP - PUSH p$ lst.First = x); - -function IsStrictAscending(lst: sequence of string): boolean - := lst.Pairwise.All(x -> x[0] < x[1]); - -begin - var strings := |'abc','abc','abc','abc'|; - Print(AllEqual(strings)); - var strings1 := |'abc','abd','ade','aef'|; - Print(IsStrictAscending(strings1)); -end. diff --git a/Task/Compare-a-list-of-strings/Phix/compare-a-list-of-strings.phix b/Task/Compare-a-list-of-strings/Phix/compare-a-list-of-strings.phix index 05991641e5..4faabce3f2 100644 --- a/Task/Compare-a-list-of-strings/Phix/compare-a-list-of-strings.phix +++ b/Task/Compare-a-list-of-strings/Phix/compare-a-list-of-strings.phix @@ -1,24 +1,26 @@ -with javascript_semantics -function allsame(sequence s) - for i=2 to length(s) do - if s[i]!=s[1] then return false end if - end for - return true -end function +(phixonline)--> + with javascript_semantics + function allsame(sequence s) + for i=2 to length(s) do + if s[i]!=s[1] then return false end if + end for + return true + end function -function strict_order(sequence s) - for i=2 to length(s) do - if s[i]<=s[i-1] then return false end if - end for - return true -end function + function strict_order(sequence s) + for i=2 to length(s) do + if s[i]<=s[i-1] then return false end if + end for + return true + end function -procedure test(sequence s) - printf(1,"%-22V allsame:%5t, strict_order:%5t\n",{s,allsame(s),strict_order(s)}) -end procedure + procedure test(sequence s) + printf(1,"%-22V allsame:%5t, strict_order:%5t\n",{s,allsame(s),strict_order(s)}) + end procedure -test({"AA","BB","CC"}) -test({"AA","AA","AA"}) -test({"AA","CC","BB"}) -test({"AA","ACB","BB","CC"}) -test({"single_element"}) + test({"AA","BB","CC"}) + test({"AA","AA","AA"}) + test({"AA","CC","BB"}) + test({"AA","ACB","BB","CC"}) + test({"single_element"}) + + integer a,b + a = 10*9*8*7*6*5*4*3*2*1 + b = factorial(10) + ?{a,b} + + -- + -- demo\rosetta\Compiler\interp.exw + -- ================================ + -- + with javascript_semantics + include parse.e -sequence vars = {}, - vals = {} + sequence vars = {}, + vals = {} -function var_idx(sequence inode) - if inode[1]!=tk_Identifier then ?9/0 end if - string ident = inode[2] - integer n = find(ident,vars) - if n=0 then - vars = append(vars,ident) - vals = append(vals,0) - n = length(vars) - end if - return n -end function + function var_idx(sequence inode) + if inode[1]!=tk_Identifier then ?9/0 end if + string ident = inode[2] + integer n = find(ident,vars) + if n=0 then + vars = append(vars,ident) + vals = append(vals,0) + n = length(vars) + end if + return n + end function -function interp(object t) - if t!=NULL then - integer ntype = t[1] - object t2 = t[2], - t3 = iff(length(t)=3?t[3]:0) - switch ntype do - case tk_Sequence: {} = interp(t2) {} = interp(t3) - case tk_assign: vals[var_idx(t2)] = interp(t3) - case tk_Identifier: return vals[var_idx(t)] - case tk_Integer: return t2 - case tk_String: return t2 - case tk_lt: return interp(t2) < interp(t3) - case tk_add: return interp(t2) + interp(t3) - case tk_sub: return interp(t2) - interp(t3) - case tk_while: while interp(t2) do {} = interp(t3) end while - case tk_Prints: puts(1,interp(t2)) - case tk_Printi: printf(1,"%d",interp(t2)) - case tk_putc: printf(1,"%c",interp(t2)) - case tk_and: return interp(t2) and interp(t3) - case tk_or: return interp(t2) or interp(t3) - case tk_le: return interp(t2) <= interp(t3) - case tk_ge: return interp(t2) >= interp(t3) - case tk_ne: return interp(t2) != interp(t3) - case tk_gt: return interp(t2) > interp(t3) - case tk_mul: return interp(t2) * interp(t3) - case tk_div: return trunc(interp(t2)/interp(t3)) - case tk_mod: return remainder(interp(t2),interp(t3)) - case tk_if: {} = interp(t3[iff(interp(t2)?2:3)]) - case tk_not: return not interp(t2) - case tk_neg: return - interp(t2) - else - error("unknown node type") - end switch - end if - return NULL -end function + function interp(object t) + if t!=NULL then + integer ntype = t[1] + object t2 = t[2], + t3 = iff(length(t)=3?t[3]:0) + switch ntype do + case tk_Sequence: {} = interp(t2) {} = interp(t3) + case tk_assign: vals[var_idx(t2)] = interp(t3) + case tk_Identifier: return vals[var_idx(t)] + case tk_Integer: return t2 + case tk_String: return t2 + case tk_lt: return interp(t2) < interp(t3) + case tk_add: return interp(t2) + interp(t3) + case tk_sub: return interp(t2) - interp(t3) + case tk_while: while interp(t2) do {} = interp(t3) end while + case tk_Prints: puts(1,interp(t2)) + case tk_Printi: printf(1,"%d",interp(t2)) + case tk_putc: printf(1,"%c",interp(t2)) + case tk_and: return interp(t2) and interp(t3) + case tk_or: return interp(t2) or interp(t3) + case tk_le: return interp(t2) <= interp(t3) + case tk_ge: return interp(t2) >= interp(t3) + case tk_ne: return interp(t2) != interp(t3) + case tk_gt: return interp(t2) > interp(t3) + case tk_mul: return interp(t2) * interp(t3) + case tk_div: return trunc(interp(t2)/interp(t3)) + case tk_mod: return remainder(interp(t2),interp(t3)) + case tk_if: {} = interp(t3[iff(interp(t2)?2:3)]) + case tk_not: return not interp(t2) + case tk_neg: return - interp(t2) + else + error("unknown node type") + end switch + end if + return NULL + end function -procedure main(sequence cl) - open_files(cl) - toks = lex() - object t = parse() - {} = interp(t) - close_files() -end procedure + procedure main(sequence cl) + open_files(cl) + toks = lex() + object t = parse() + {} = interp(t) + close_files() + end procedure ---main(command_line()) -main({0,0,"primes.c"}) + --main(command_line()) + main({0,0,"primes.c"}) + + -- + -- demo\rosetta\Compiler\cgen.e + -- ============================ + -- + -- The reusable part of cgen.exw + -- + without js -- (machine code!) + include parse.e -global sequence vars = {}, - strings = {}, - stringptrs = {} + global sequence vars = {}, + strings = {}, + stringptrs = {} -global integer chain = 0 -global sequence code = {} + global integer chain = 0 + global sequence code = {} -function var_idx(sequence inode) - if inode[1]!=tk_Identifier then ?9/0 end if - string ident = inode[2] - integer n = find(ident,vars) - if n=0 then - vars = append(vars,ident) - n = length(vars) - end if - return n -end function + function var_idx(sequence inode) + if inode[1]!=tk_Identifier then ?9/0 end if + string ident = inode[2] + integer n = find(ident,vars) + if n=0 then + vars = append(vars,ident) + n = length(vars) + end if + return n + end function -function string_idx(sequence inode) - if inode[1]!=tk_String then ?9/0 end if - string s = inode[2] - integer n = find(s,strings) - if n=0 then - strings = append(strings,s) - stringptrs = append(stringptrs,0) - n = length(strings) - end if - return n -end function + function string_idx(sequence inode) + if inode[1]!=tk_String then ?9/0 end if + string s = inode[2] + integer n = find(s,strings) + if n=0 then + strings = append(strings,s) + stringptrs = append(stringptrs,0) + n = length(strings) + end if + return n + end function -function gen_size(object t) --- note: must be kept precisely in sync with gen_rec! --- (relentlessly tested via estsize/actsize) -integer size = 0 - if t!=NULL then - integer n_type = t[1] - string node_type = tkNames[n_type] - switch n_type do - case tk_Sequence: - size += gen_size(t[2]) - size += gen_size(t[3]) - case tk_assign: - size += gen_size(t[3])+6 - case tk_Integer: - size += 5 - case tk_Identifier: - size += 6 - case tk_String: - size += 5 - case tk_while: - -- emit: @@:@@: - size += gen_size(t[2])+3 - integer body = gen_size(t[3]) - integer stail = iff(size+body+2>128?5:2) - integer stop = iff(body+stail >127?6:2) - size += stop+body+stail - case tk_lt: - case tk_le: - case tk_ne: - case tk_eq: - case tk_gt: - case tk_ge: - size += gen_size(t[2]) - size += gen_size(t[3]) - size += 10 - case tk_and: - case tk_or: - size += gen_size(t[2]) - size += gen_size(t[3]) - size += 15 - case tk_add: - case tk_sub: - size += gen_size(t[2]) - size += gen_size(t[3]) - size += 4 - case tk_mul: - size += gen_size(t[2]) - size += gen_size(t[3]) - size += 5 - case tk_div: - case tk_mod: - size += gen_size(t[2]) - size += gen_size(t[3]) - size += 6 - case tk_putc: - case tk_Printi: - case tk_Prints: - size += gen_size(t[2]) - size += 5 - case tk_if: - size += gen_size(t[2])+3 - if t[3][1]!=tk_if then ?9/0 end if - integer truesize = gen_size(t[3][2]) - integer falsesize = gen_size(t[3][3]) - integer elsejmp = iff(falsesize=0?0:iff(falsesize>127?5:2)) - integer mainjmp = iff(truesize+elsejmp>127?6:2) - size += mainjmp+truesize+elsejmp+falsesize - case tk_not: - size += gen_size(t[2]) - size += 9 - case tk_neg: - size += gen_size(t[2]) - size += 4 - else: - ?9/0 - end switch - end if - return size -end function + function gen_size(object t) + -- note: must be kept precisely in sync with gen_rec! + -- (relentlessly tested via estsize/actsize) + integer size = 0 + if t!=NULL then + integer n_type = t[1] + string node_type = tkNames[n_type] + switch n_type do + case tk_Sequence: + size += gen_size(t[2]) + size += gen_size(t[3]) + case tk_assign: + size += gen_size(t[3])+6 + case tk_Integer: + size += 5 + case tk_Identifier: + size += 6 + case tk_String: + size += 5 + case tk_while: + -- emit: @@:<condition><topjmp(@f)><body><tailjmp(@b)>@@: + size += gen_size(t[2])+3 + integer body = gen_size(t[3]) + integer stail = iff(size+body+2>128?5:2) + integer stop = iff(body+stail >127?6:2) + size += stop+body+stail + case tk_lt: + case tk_le: + case tk_ne: + case tk_eq: + case tk_gt: + case tk_ge: + size += gen_size(t[2]) + size += gen_size(t[3]) + size += 10 + case tk_and: + case tk_or: + size += gen_size(t[2]) + size += gen_size(t[3]) + size += 15 + case tk_add: + case tk_sub: + size += gen_size(t[2]) + size += gen_size(t[3]) + size += 4 + case tk_mul: + size += gen_size(t[2]) + size += gen_size(t[3]) + size += 5 + case tk_div: + case tk_mod: + size += gen_size(t[2]) + size += gen_size(t[3]) + size += 6 + case tk_putc: + case tk_Printi: + case tk_Prints: + size += gen_size(t[2]) + size += 5 + case tk_if: + size += gen_size(t[2])+3 + if t[3][1]!=tk_if then ?9/0 end if + integer truesize = gen_size(t[3][2]) + integer falsesize = gen_size(t[3][3]) + integer elsejmp = iff(falsesize=0?0:iff(falsesize>127?5:2)) + integer mainjmp = iff(truesize+elsejmp>127?6:2) + size += mainjmp+truesize+elsejmp+falsesize + case tk_not: + size += gen_size(t[2]) + size += 9 + case tk_neg: + size += gen_size(t[2]) + size += 4 + else: + ?9/0 + end switch + end if + return size + end function -procedure gen_rec(object t) --- the recursive part of code_gen - if t!=NULL then - integer initsize = length(code) - integer estsize = gen_size(t) -- (test the gen_size function) - integer n_type = t[1] - string node_type = tkNames[n_type] - switch n_type do - case tk_Sequence: - gen_rec(t[2]) - gen_rec(t[3]) - case tk_assign: - integer n = var_idx(t[2]) - gen_rec(t[3]) - code &= {0o217,0o005,chain,1,n,0} -- pop [i] - chain = length(code)-3 - case tk_Integer: - integer n = t[2] - code &= 0o150&int_to_bytes(n) -- push imm32 - case tk_while: - -- emit: @@:@@: - integer looptop = length(code) - gen_rec(t[2]) - code &= {0o130, -- pop eax - 0o205,0o300} -- test eax,eax - integer bodysize = gen_size(t[3]) - -- can we use short jumps? - -- disclaimer: size calcs are not heavily tested; if in - -- doubt reduce 128/7 by 8, and if that works - -- then yep, you just found a boundary case. - integer stail = iff(length(code)+bodysize+4-looptop>128?5:2) - integer offset = bodysize+stail - integer stop = iff(offset>127?6:2) - if stop=2 then - code &= {0o164,offset} -- jz (short) end - else - code &= {0o017,0o204}&int_to_bytes(offset) -- jz (long) end - end if - gen_rec(t[3]) - offset = looptop-(length(code)+stail) - if stail=2 then - code &= 0o353&offset -- jmp looptop (short) - else - code &= 0o351&int_to_bytes(offset) -- jmp looptop (long) - end if - case tk_lt: - case tk_le: - case tk_gt: - case tk_ge: - case tk_ne: - case tk_eq: - gen_rec(t[2]) - gen_rec(t[3]) - integer xrm - if n_type=tk_ne then xrm = 0o225 -- (#95) - elsif n_type=tk_lt then xrm = 0o234 -- (#9C) - elsif n_type=tk_ge then xrm = 0o235 -- (#9D) - elsif n_type=tk_le then xrm = 0o236 -- (#9E) - elsif n_type=tk_gt then xrm = 0o237 -- (#9F) - else ?9/0 - end if - code &= { 0o061,0o300, -- xor eax,eax - 0o132, -- pop edx - 0o131, -- pop ecx - 0o071,0o321, -- cmp ecx,edx - 0o017,xrm,0o300, -- setcc al - 0o120} -- push eax - case tk_or: - case tk_and: - gen_rec(t[2]) - gen_rec(t[3]) - integer op = find(n_type,{tk_or,0,0,tk_and}) - op *= 0o010 - code &= { 0o130, -- pop eax - 0o131, -- pop ecx - 0o205,0o300, -- test eax,eax - 0o017,0o225,0o300, -- setne al - 0o205,0o311, -- test ecx,ecx - 0o017,0o225,0o301, -- setne cl - op,0o310, -- or/and al,cl - 0o120} -- push eax - case tk_add: - case tk_sub: - gen_rec(t[2]) - gen_rec(t[3]) - integer op = find(n_type,{tk_add,0,0,0,0,tk_sub}) - op = 0o001 + (op-1)*0o010 - code &= { 0o130, -- pop eax - op,0o004,0o044} -- add/or/and/sub [esp],eax - case tk_mul: - gen_rec(t[2]) - gen_rec(t[3]) - code &= { 0o131, -- pop ecx - 0o130, -- pop eax - 0o367,0o341, -- mul ecx - 0o120} -- push eax - case tk_div: - case tk_mod: - gen_rec(t[2]) - gen_rec(t[3]) - integer push = 0o120+(n_type=tk_mod)*2 - code &= { 0o131, -- pop ecx - 0o130, -- pop eax - 0o231, -- cdq (eax -> edx:eax) - 0o367,0o371, -- idiv ecx - push} -- push eax|edx - case tk_Identifier: - integer n = var_idx(t) - code &= {0o377,0o065,chain,1,n,0} -- push [n] - chain = length(code)-3 - case tk_putc: - case tk_Printi: - case tk_Prints: - gen_rec(t[2]) - integer n = find(n_type,{tk_putc,tk_Printi,tk_Prints}) - code &= {0o350,chain,3,n,0} -- call :printc/i/s - chain = length(code)-3 - case tk_String: - integer n = string_idx(t) - code &= {0o150,chain,2,n,0} -- push RawStringPtr(string) - chain = length(code)-3 - case tk_if: - -- emit: [] - gen_rec(t[2]) - code &= {0o130, -- pop eax - 0o205,0o300} -- test eax,eax - if t[3][1]!=tk_if then ?9/0 end if - integer truesize = gen_size(t[3][2]) - integer falsesize = gen_size(t[3][3]) - integer elsejmp = iff(falsesize=0?0:iff(falsesize>127?5:2)) - integer offset = truesize+elsejmp - integer mainjmp = iff(offset>127?6:2) - if mainjmp=2 then - code &= {0o164,offset} -- jz (short) else/end - else - code &= {0o017,0o204}&int_to_bytes(offset) -- jz (long) else/end - end if - gen_rec(t[3][2]) - if falsesize!=0 then - offset = falsesize - if elsejmp=2 then - code &= 0o353&offset -- jmp end if (short) - else - code &= 0o351&int_to_bytes(offset) -- jmp end if (long) - end if - gen_rec(t[3][3]) - end if - case tk_not: - gen_rec(t[2]) - code &= {0o132, -- pop edx - 0o061,0o300, -- xor eax,eax - 0o205,0o322, -- test edx,edx - 0o017,0o224,0o300, -- setz al - 0o120} -- push eax - case tk_neg: - gen_rec(t[2]) - code &= {0o130, -- pop eax - 0o367,0o330, -- neg eax - 0o120} -- push eax - else: - error("error in code generator - found %d, expecting operator\n", {n_type}) - end switch - integer actsize = length(code) - if initsize+estsize!=actsize then ?"9/0" end if -- (test gen_size) - end if -end procedure + procedure gen_rec(object t) + -- the recursive part of code_gen + if t!=NULL then + integer initsize = length(code) + integer estsize = gen_size(t) -- (test the gen_size function) + integer n_type = t[1] + string node_type = tkNames[n_type] + switch n_type do + case tk_Sequence: + gen_rec(t[2]) + gen_rec(t[3]) + case tk_assign: + integer n = var_idx(t[2]) + gen_rec(t[3]) + code &= {0o217,0o005,chain,1,n,0} -- pop [i] + chain = length(code)-3 + case tk_Integer: + integer n = t[2] + code &= 0o150&int_to_bytes(n) -- push imm32 + case tk_while: + -- emit: @@:<condition><topjmp(@f)><body><tailjmp(@b)>@@: + integer looptop = length(code) + gen_rec(t[2]) + code &= {0o130, -- pop eax + 0o205,0o300} -- test eax,eax + integer bodysize = gen_size(t[3]) + -- can we use short jumps? + -- disclaimer: size calcs are not heavily tested; if in + -- doubt reduce 128/7 by 8, and if that works + -- then yep, you just found a boundary case. + integer stail = iff(length(code)+bodysize+4-looptop>128?5:2) + integer offset = bodysize+stail + integer stop = iff(offset>127?6:2) + if stop=2 then + code &= {0o164,offset} -- jz (short) end + else + code &= {0o017,0o204}&int_to_bytes(offset) -- jz (long) end + end if + gen_rec(t[3]) + offset = looptop-(length(code)+stail) + if stail=2 then + code &= 0o353&offset -- jmp looptop (short) + else + code &= 0o351&int_to_bytes(offset) -- jmp looptop (long) + end if + case tk_lt: + case tk_le: + case tk_gt: + case tk_ge: + case tk_ne: + case tk_eq: + gen_rec(t[2]) + gen_rec(t[3]) + integer xrm + if n_type=tk_ne then xrm = 0o225 -- (#95) + elsif n_type=tk_lt then xrm = 0o234 -- (#9C) + elsif n_type=tk_ge then xrm = 0o235 -- (#9D) + elsif n_type=tk_le then xrm = 0o236 -- (#9E) + elsif n_type=tk_gt then xrm = 0o237 -- (#9F) + else ?9/0 + end if + code &= { 0o061,0o300, -- xor eax,eax + 0o132, -- pop edx + 0o131, -- pop ecx + 0o071,0o321, -- cmp ecx,edx + 0o017,xrm,0o300, -- setcc al + 0o120} -- push eax + case tk_or: + case tk_and: + gen_rec(t[2]) + gen_rec(t[3]) + integer op = find(n_type,{tk_or,0,0,tk_and}) + op *= 0o010 + code &= { 0o130, -- pop eax + 0o131, -- pop ecx + 0o205,0o300, -- test eax,eax + 0o017,0o225,0o300, -- setne al + 0o205,0o311, -- test ecx,ecx + 0o017,0o225,0o301, -- setne cl + op,0o310, -- or/and al,cl + 0o120} -- push eax + case tk_add: + case tk_sub: + gen_rec(t[2]) + gen_rec(t[3]) + integer op = find(n_type,{tk_add,0,0,0,0,tk_sub}) + op = 0o001 + (op-1)*0o010 + code &= { 0o130, -- pop eax + op,0o004,0o044} -- add/or/and/sub [esp],eax + case tk_mul: + gen_rec(t[2]) + gen_rec(t[3]) + code &= { 0o131, -- pop ecx + 0o130, -- pop eax + 0o367,0o341, -- mul ecx + 0o120} -- push eax + case tk_div: + case tk_mod: + gen_rec(t[2]) + gen_rec(t[3]) + integer push = 0o120+(n_type=tk_mod)*2 + code &= { 0o131, -- pop ecx + 0o130, -- pop eax + 0o231, -- cdq (eax -> edx:eax) + 0o367,0o371, -- idiv ecx + push} -- push eax|edx + case tk_Identifier: + integer n = var_idx(t) + code &= {0o377,0o065,chain,1,n,0} -- push [n] + chain = length(code)-3 + case tk_putc: + case tk_Printi: + case tk_Prints: + gen_rec(t[2]) + integer n = find(n_type,{tk_putc,tk_Printi,tk_Prints}) + code &= {0o350,chain,3,n,0} -- call :printc/i/s + chain = length(code)-3 + case tk_String: + integer n = string_idx(t) + code &= {0o150,chain,2,n,0} -- push RawStringPtr(string) + chain = length(code)-3 + case tk_if: + -- emit: <condition><mainjmp><truepart>[<elsejmp><falsepart>] + gen_rec(t[2]) + code &= {0o130, -- pop eax + 0o205,0o300} -- test eax,eax + if t[3][1]!=tk_if then ?9/0 end if + integer truesize = gen_size(t[3][2]) + integer falsesize = gen_size(t[3][3]) + integer elsejmp = iff(falsesize=0?0:iff(falsesize>127?5:2)) + integer offset = truesize+elsejmp + integer mainjmp = iff(offset>127?6:2) + if mainjmp=2 then + code &= {0o164,offset} -- jz (short) else/end + else + code &= {0o017,0o204}&int_to_bytes(offset) -- jz (long) else/end + end if + gen_rec(t[3][2]) + if falsesize!=0 then + offset = falsesize + if elsejmp=2 then + code &= 0o353&offset -- jmp end if (short) + else + code &= 0o351&int_to_bytes(offset) -- jmp end if (long) + end if + gen_rec(t[3][3]) + end if + case tk_not: + gen_rec(t[2]) + code &= {0o132, -- pop edx + 0o061,0o300, -- xor eax,eax + 0o205,0o322, -- test edx,edx + 0o017,0o224,0o300, -- setz al + 0o120} -- push eax + case tk_neg: + gen_rec(t[2]) + code &= {0o130, -- pop eax + 0o367,0o330, -- neg eax + 0o120} -- push eax + else: + error("error in code generator - found %d, expecting operator\n", {n_type}) + end switch + integer actsize = length(code) + if initsize+estsize!=actsize then ?"9/0" end if -- (test gen_size) + end if + end procedure -global procedure code_gen(object t) --- --- Generates proper machine code. --- --- Example: i=10; print "\n"; print i; print "\n" --- Result in vars, strings, chain, code (declared above) --- where vars is: {"i"}, --- strings is {"\n"}, --- code is { 0o150,#0A,#00,#00,#00, -- 1: push 10 --- 0o217,0o005,0,1,1,0 -- 6: pop [i] --- 0o150,8,2,1,0, -- 12: push ("\n") --- 0o350,13,3,3,0, -- 17: call :prints --- 0o377,0o065,18,1,1,0, -- 22: push [i] --- 0o350,24,3,2,0, -- 28: call :printi --- 0o150,29,2,1,0, -- 33: push ("\n") --- 0o350,34,3,3,0, -- 38: call :prints --- 0o303} -- 43: ret --- and chain is 39 (->34->29->24->18->13->8->0) --- The chain connects all places where we need an actual address before --- the code is executed, with the byte after the link differentiating --- between var(1), string(2), and builtin(3), and the byte after that --- determining the instance of the given type - not that any of them --- are actually limited to a byte in the above intermediate form, and --- of course the trailing 0 of each {link,type,id,0} is just there to --- reserve the space we will need. --- - gen_rec(t) - code = append(code,0o303) -- ret (0o303=#C3) -end procedure + global procedure code_gen(object t) + -- + -- Generates proper machine code. + -- + -- Example: i=10; print "\n"; print i; print "\n" + -- Result in vars, strings, chain, code (declared above) + -- where vars is: {"i"}, + -- strings is {"\n"}, + -- code is { 0o150,#0A,#00,#00,#00, -- 1: push 10 + -- 0o217,0o005,0,1,1,0 -- 6: pop [i] + -- 0o150,8,2,1,0, -- 12: push ("\n") + -- 0o350,13,3,3,0, -- 17: call :prints + -- 0o377,0o065,18,1,1,0, -- 22: push [i] + -- 0o350,24,3,2,0, -- 28: call :printi + -- 0o150,29,2,1,0, -- 33: push ("\n") + -- 0o350,34,3,3,0, -- 38: call :prints + -- 0o303} -- 43: ret + -- and chain is 39 (->34->29->24->18->13->8->0) + -- The chain connects all places where we need an actual address before + -- the code is executed, with the byte after the link differentiating + -- between var(1), string(2), and builtin(3), and the byte after that + -- determining the instance of the given type - not that any of them + -- are actually limited to a byte in the above intermediate form, and + -- of course the trailing 0 of each {link,type,id,0} is just there to + -- reserve the space we will need. + -- + gen_rec(t) + code = append(code,0o303) -- ret (0o303=#C3) + end procedure -include builtins/VM/puts1.e -- low-level console i/o routines + include builtins/VM/puts1.e -- low-level console i/o routines -function setbuiltins() -atom printc,printi,prints - #ilASM{ - jmp :setbuiltins - ::printc - lea edi,[esp+4] - mov esi,1 - call :%puts1ediesi -- (edi=raw text, esi=length) - ret 4 - ::printi - mov eax,[esp+4] - push 0 -- no cr - call :%putsint -- (nb limited to +/-9,999,999,999) - ret 4 - ::prints - mov edi,[esp+4] - mov esi,[edi-12] - call :%puts1ediesi -- (edi=raw text, esi=length) - ret 4 - ::setbuiltins - mov eax,:printc - lea edi,[printc] - call :%pStoreMint - mov eax,:printi - lea edi,[printi] - call :%pStoreMint - mov eax,:prints - lea edi,[prints] - call :%pStoreMint - } - return {printc,printi,prints} -end function + function setbuiltins() + atom printc,printi,prints + #ilASM{ + jmp :setbuiltins + ::printc + lea edi,[esp+4] + mov esi,1 + call :%puts1ediesi -- (edi=raw text, esi=length) + ret 4 + ::printi + mov eax,[esp+4] + push 0 -- no cr + call :%putsint -- (nb limited to +/-9,999,999,999) + ret 4 + ::prints + mov edi,[esp+4] + mov esi,[edi-12] + call :%puts1ediesi -- (edi=raw text, esi=length) + ret 4 + ::setbuiltins + mov eax,:printc + lea edi,[printc] + call :%pStoreMint + mov eax,:printi + lea edi,[printi] + call :%pStoreMint + mov eax,:prints + lea edi,[prints] + call :%pStoreMint + } + return {printc,printi,prints} + end function -global constant builtin_names = {"printc","printi","prints"} -global constant builtins = setbuiltins() + global constant builtin_names = {"printc","printi","prints"} + global constant builtins = setbuiltins() -global atom var_mem, code_mem + global atom var_mem, code_mem -function RawStringPtr(integer n) -- (based on IupRawStringPtr from pGUI.e) --- --- Returns a raw string pointer for s, somewhat like allocate_string(s), but using the existing memory. --- NOTE: The return is only valid as long as the value passed as the parameter remains in existence. --- -atom res - string s = strings[n] - #ilASM{ - mov eax,[s] - lea edi,[res] - shl eax,2 - call :%pStoreMint - } - stringptrs[n] = res - return res -end function + function RawStringPtr(integer n) -- (based on IupRawStringPtr from pGUI.e) + -- + -- Returns a raw string pointer for s, somewhat like allocate_string(s), but using the existing memory. + -- NOTE: The return is only valid as long as the value passed as the parameter remains in existence. + -- + atom res + string s = strings[n] + #ilASM{ + mov eax,[s] + lea edi,[res] + shl eax,2 + call :%pStoreMint + } + stringptrs[n] = res + return res + end function -global procedure fixup() - var_mem = allocate(length(vars)*4) - mem_set(var_mem,0,length(vars)*4) - code_mem = allocate(length(code)) - poke(code_mem,code) - while chain!=0 do - integer this = chain - chain = code[this] - integer ftype = code[this+1] - integer id = code[this+2] - switch ftype do - case 1: -- vars - poke4(code_mem+this-1,var_mem+(id-1)*4) - case 2: -- strings - poke4(code_mem+this-1,RawStringPtr(id)) - case 3: -- builtins - poke4(code_mem+this-1,builtins[id]-(code_mem+this+3)) - end switch - end while -end procedure + global procedure fixup() + var_mem = allocate(length(vars)*4) + mem_set(var_mem,0,length(vars)*4) + code_mem = allocate(length(code)) + poke(code_mem,code) + while chain!=0 do + integer this = chain + chain = code[this] + integer ftype = code[this+1] + integer id = code[this+2] + switch ftype do + case 1: -- vars + poke4(code_mem+this-1,var_mem+(id-1)*4) + case 2: -- strings + poke4(code_mem+this-1,RawStringPtr(id)) + case 3: -- builtins + poke4(code_mem+this-1,builtins[id]-(code_mem+this+3)) + end switch + end while + end procedure + + -- + -- demo\rosetta\Compiler\cgen.exw + -- ============================== + -- + -- Generates 32-bit machine code (see note in vm.exw) + -- + without js -- (machine code!) + include cgen.e -function get_var_name(atom addr) - integer n = (addr-var_mem)/4+1 - if n<1 or n>length(vars) then ?9/0 end if - return vars[n] -end function + function get_var_name(atom addr) + integer n = (addr-var_mem)/4+1 + if n<1 or n>length(vars) then ?9/0 end if + return vars[n] + end function -function hxl(integer pc, object oh, string fmt, sequence args={}) --- helper routine to display the octal/hex bytes just decoded, --- along with the code offset and the human-readable text. - if length(args) then fmt = sprintf(fmt,args) end if - sequence octhex = {} - atom base = code_mem+pc - integer len = 0 - if integer(oh) then -- all octal - for i=1 to oh do - octhex = append(octhex,sprintf("0o%03o",peek(base))) - base += 1 - end for - len = oh - else -- some octal and some hex - for i=1 to length(oh) by 2 do - for j=1 to oh[i] do - octhex = append(octhex,sprintf("0o%03o",peek(base))) - base += 1 - end for - len += oh[i] - for j=1 to oh[i+1] do - octhex = append(octhex,sprintf("#%02x",peek(base))) - base += 1 - end for - len += oh[i+1] - end for - end if - printf(output_file,"%4d: %-30s %s\n",{pc+1,join(octhex,","),fmt}) - return len -end function + function hxl(integer pc, object oh, string fmt, sequence args={}) + -- helper routine to display the octal/hex bytes just decoded, + -- along with the code offset and the human-readable text. + if length(args) then fmt = sprintf(fmt,args) end if + sequence octhex = {} + atom base = code_mem+pc + integer len = 0 + if integer(oh) then -- all octal + for i=1 to oh do + octhex = append(octhex,sprintf("0o%03o",peek(base))) + base += 1 + end for + len = oh + else -- some octal and some hex + for i=1 to length(oh) by 2 do + for j=1 to oh[i] do + octhex = append(octhex,sprintf("0o%03o",peek(base))) + base += 1 + end for + len += oh[i] + for j=1 to oh[i+1] do + octhex = append(octhex,sprintf("#%02x",peek(base))) + base += 1 + end for + len += oh[i+1] + end for + end if + printf(output_file,"%4d: %-30s %s\n",{pc+1,join(octhex,","),fmt}) + return len + end function -constant cccodes = {"o?" ,"no?","b?" ,"ae?","z" ,"ne" ,"be?","a?", --- 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , - "s?" ,"ns?","pe?","po?","l" ,"ge" ,"le" ,"g" } --- 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 + constant cccodes = {"o?" ,"no?","b?" ,"ae?","z" ,"ne" ,"be?","a?", + -- 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , + "s?" ,"ns?","pe?","po?","l" ,"ge" ,"le" ,"g" } + -- 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 -constant regs = {"eax","ecx","edx"} -- (others as/when needed) + constant regs = {"eax","ecx","edx"} -- (others as/when needed) -procedure decode() --- for a much more complete (and better organised) disassembler, see p2asm.e -integer pc = 0, -- nb 0-based - opcode, xrm + procedure decode() + -- for a much more complete (and better organised) disassembler, see p2asm.e + integer pc = 0, -- nb 0-based + opcode, xrm - while pcwhile pc<length(code) do + opcode = peek(code_mem+pc) + xrm = -1 + switch opcode do + case 0o150: + atom vaddr = peek4s(code_mem+pc+1) + integer n = find(vaddr,stringptrs) + object arg = iff(n?enquote(strings[n]) + :sprintf("%d",vaddr)) + pc += hxl(pc,{1,4},"push %s",{arg}) + case 0o217: + case 0o377: + integer n = find(opcode,{0o217,0o377}) + string op = {"pop","push"}[n] + xrm = peek(code_mem+pc+1) + if n!=find(xrm,{0o005,0o065}) then exit end if + atom addr = peek4u(code_mem+pc+2) + pc += hxl(pc,{2,4},"%s [%s]",{op,get_var_name(addr)}) + case 0o061: + case 0o071: + case 0o205: + integer n = find(opcode,{0o061,0o071,0o205}) + string op = {"xor","cmp","test"}[n] + xrm = peek(code_mem+pc+1) + if and_bits(xrm,0o300)!=0o300 then exit end if + string r1 = regs[and_bits(xrm,0o070)/0o010+1] + string r2 = regs[and_bits(xrm,0o007)+1] + pc += hxl(pc,2,"%s %s,%s",{op,r1,r2}) + case 0o017: + xrm = peek(code_mem+pc+1) + switch xrm do + case 0o224: + case 0o225: + case 0o234: + case 0o235: + case 0o236: + case 0o237: + string cc = cccodes[and_bits(xrm,0o017)+1] + xrm = peek(code_mem+pc+2) + if xrm=0o300 then + pc += hxl(pc,3,"set%s al",{cc}) + elsif xrm=0o301 then + pc += hxl(pc,3,"set%s cl",{cc}) + else + exit + end if + case 0o204: + integer offset = peek4s(code_mem+pc+2) + pc += hxl(pc,{2,4},"jz %d",{pc+6+offset+1}) + else + exit + end switch + case 0o010: + case 0o040: + xrm = peek(code_mem+pc+1) + if xrm=0o310 then + string lop = {"or","and"}[find(opcode,{0o010,0o040})] + pc += hxl(pc,2,"%s al,cl",{lop}) + else + exit + end if + case 0o120: + case 0o122: + case 0o130: + case 0o131: + case 0o132: + string op = {"push","pop"}[find(and_bits(opcode,0o070),{0o020,0o030})] + string reg = regs[and_bits(opcode,0o007)+1] + pc += hxl(pc,1,"%s %s",{op,reg}) + case 0o231: + pc += hxl(pc,1,"cdq") + case 0o164: + case 0o353: + string jop = iff(opcode=0o164?"jz":"jmp") + integer offset = peek1s(code_mem+pc+1) + pc += hxl(pc,{1,1},"%s %d",{jop,pc+2+offset+1}) + case 0o351: + integer offset = peek4s(code_mem+pc+1) + pc += hxl(pc,{1,4},"jmp %d",{pc+5+offset+1}) + case 0o303: + pc += hxl(pc,1,"ret") + case 0o350: + integer offset = peek4s(code_mem+pc+1) + atom addr = offset+code_mem+pc+5 + integer n = find(addr,builtins) + pc += hxl(pc,{1,4},"call :%s",{builtin_names[n]}) + case 0o001: + case 0o041: + case 0o051: + integer n = find(opcode,{0o001,0o041,0o051}) + string op = {"add","and","sub"}[n] + xrm = peek(code_mem+pc+1) + switch xrm do + case 0o004: + if peek(code_mem+pc+2)=0o044 then + pc += hxl(pc,3,"%s [esp],eax",{op}) + else + exit + end if + else + exit + end switch + case 0o367: + xrm = peek(code_mem+pc+1) + if and_bits(xrm,0o300)!=0o300 then exit end if + integer n = find(and_bits(xrm,0o070),{0o030,0o040,0o070}) + if n=0 then exit end if + string op = {"neg","mul","idiv"}[n] + string reg = regs[and_bits(xrm,0o007)+1] + pc += hxl(pc,2,"%s %s",{op,reg}) + else + exit + end switch + end while + if pc<length(code) then + ?"incomplete:" + if xrm=-1 then + ?{pc+1,sprintf("0o%03o",opcode)} + else + ?{pc+1,sprintf("0o%03o 0o%03o",{opcode,xrm})} + end if + end if + end procedure -procedure main(sequence cl) - open_files(cl) - toks = lex() - object t = parse() - code_gen(t) - fixup() - decode() - free({var_mem,code_mem}) - close_files() -end procedure + procedure main(sequence cl) + open_files(cl) + toks = lex() + object t = parse() + code_gen(t) + fixup() + decode() + free({var_mem,code_mem}) + close_files() + end procedure ---main(command_line()) -main({0,0,"gcd.c"}) + --main(command_line()) + main({0,0,"gcd.c"}) + + -- + -- demo\rosetta\Compiler\core.e + -- ============================ + -- + -- Standard declarations and routines used by lex.exw, parse.exw, cgen.exw, and interp.exw + -- (included in distribution as above, which contains some additional sanity checks) + -- + with javascript_semantics + global constant EOF = -1, STDIN = 0, STDOUT = 1 -global enum NONE=0, UNARY=1, BINARY=2 -global type nary(integer n) return n=NONE or n=UNARY or n=BINARY end type + global enum NONE=0, UNARY=1, BINARY=2 + global type nary(integer n) return n=NONE or n=UNARY or n=BINARY end type -global sequence tkNames = {} -- eg/ie {"Op_multiply","Op_divide",..} -global sequence precedences = {} -global sequence narys = {} -- NONE/UNARY/BINARY -global sequence operators = {} -- eg/ie {"*","/","+","-","<","<=",..} -global sequence opcodes = {} -- idx to tkNames, matching operators + global sequence tkNames = {} -- eg/ie {"Op_multiply","Op_divide",..} + global sequence precedences = {} + global sequence narys = {} -- NONE/UNARY/BINARY + global sequence operators = {} -- eg/ie {"*","/","+","-","<","<=",..} + global sequence opcodes = {} -- idx to tkNames, matching operators -global constant KEYWORDS = new_dict() -- eg/ie {"if"=>idx to tkNames} + global constant KEYWORDS = new_dict() -- eg/ie {"if"=>idx to tkNames} -global enum OPERATOR=1, DIGIT, LETTER -- character classes + global enum OPERATOR=1, DIGIT, LETTER -- character classes -global sequence charmap = repeat(0,255) - charmap['0'..'9'] = DIGIT - charmap['A'..'Z'] = LETTER - charmap['a'..'z'] = LETTER - charmap['_'] = LETTER + global sequence charmap = repeat(0,255) + charmap['0'..'9'] = DIGIT + charmap['A'..'Z'] = LETTER + charmap['a'..'z'] = LETTER + charmap['_'] = LETTER -function tkName(string s, nary n = NONE, integer precedence = -1) - tkNames = append(tkNames,s) - narys = append(narys,n) - precedences = append(precedences,precedence) - return length(tkNames) -end function + function tkName(string s, nary n = NONE, integer precedence = -1) + tkNames = append(tkNames,s) + narys = append(narys,n) + precedences = append(precedences,precedence) + return length(tkNames) + end function -function tkOp(string s, string op, nary n, integer precedence) - integer res = tkName(s, n, precedence) - operators = append(operators,op) - opcodes = append(opcodes,res) - for i=1 to length(op) do - charmap[op[i]] = OPERATOR - end for - return res -end function + function tkOp(string s, string op, nary n, integer precedence) + integer res = tkName(s, n, precedence) + operators = append(operators,op) + opcodes = append(opcodes,res) + for i=1 to length(op) do + charmap[op[i]] = OPERATOR + end for + return res + end function -function tkKw(string s, string keyword) - integer res = tkName(s) - putd(keyword, res, KEYWORDS) - return res -end function + function tkKw(string s, string keyword) + integer res = tkName(s) + putd(keyword, res, KEYWORDS) + return res + end function -global constant - tk_EOI = tkName("End_of_input"), --1 - tk_mul = tkOp("Op_multiply", "*", BINARY,13), --2 - tk_div = tkOp("Op_divide", "/", BINARY,13), --3 - tk_mod = tkOp("Op_mod", "%", BINARY,13), --4 - tk_add = tkOp("Op_add", "+", BINARY,12), --5 - tk_sub = tkOp("Op_subtract", "-", BINARY,12), --6 - tk_neg = tkName("Op_negate", UNARY, 14), --7 - tk_not = tkOp("Op_not", "!", UNARY, 14), --8 - tk_lt = tkOp("Op_less", "<", BINARY,10), --9 - tk_le = tkOp("Op_lessequal", "<=",BINARY,10), --10 - tk_gt = tkOp("Op_greater", ">", BINARY,10), --11 - tk_ge = tkOp("Op_greaterequal", ">=",BINARY,10), --12 - tk_eq = tkOp("Op_equal", "==",BINARY, 9), --13 - tk_ne = tkOp("Op_notequal", "!=",BINARY, 9), --14 - tk_assign = tkOp("Op_assign", "=", NONE, -1), --15 - tk_and = tkOp("Op_and", "&&",BINARY, 5), --16 - tk_or = tkOp("Op_or", "||",BINARY, 4), --17 - tk_if = tkKw("Keyword_if", "if"), --18 - tk_else = tkKw("Keyword_else", "else"), --19 - tk_while = tkKw("Keyword_while","while"), --20 - tk_print = tkKw("Keyword_print","print"), --21 - tk_putc = tkKw("Keyword_putc", "putc"), --22 - tk_LeftParen = tkOp("LeftParen", "(", NONE, -1), --23 - tk_RightParen = tkOp("RightParen", ")", NONE, -1), --24 - tk_LeftBrace = tkOp("LeftBrace", "{", NONE, -1), --25 - tk_RightBrace = tkOp("RightBrace", "}", NONE, -1), --26 - tk_Semicolon = tkOp("Semicolon", ";", NONE, -1), --27 - tk_Comma = tkOp("Comma", ",", NONE, -1), --28 - tk_Identifier = tkName("Identifier"), --29 - tk_Integer = tkName("Integer"), --30 - tk_String = tkName("String"), --31 - tk_Sequence = tkName("Sequence"), --32 - tk_Prints = tkName("tk_Prints"), --33 - tk_Printi = tkName("tk_Printi") --34 + global constant + tk_EOI = tkName("End_of_input"), --1 + tk_mul = tkOp("Op_multiply", "*", BINARY,13), --2 + tk_div = tkOp("Op_divide", "/", BINARY,13), --3 + tk_mod = tkOp("Op_mod", "%", BINARY,13), --4 + tk_add = tkOp("Op_add", "+", BINARY,12), --5 + tk_sub = tkOp("Op_subtract", "-", BINARY,12), --6 + tk_neg = tkName("Op_negate", UNARY, 14), --7 + tk_not = tkOp("Op_not", "!", UNARY, 14), --8 + tk_lt = tkOp("Op_less", "<", BINARY,10), --9 + tk_le = tkOp("Op_lessequal", "<=",BINARY,10), --10 + tk_gt = tkOp("Op_greater", ">", BINARY,10), --11 + tk_ge = tkOp("Op_greaterequal", ">=",BINARY,10), --12 + tk_eq = tkOp("Op_equal", "==",BINARY, 9), --13 + tk_ne = tkOp("Op_notequal", "!=",BINARY, 9), --14 + tk_assign = tkOp("Op_assign", "=", NONE, -1), --15 + tk_and = tkOp("Op_and", "&&",BINARY, 5), --16 + tk_or = tkOp("Op_or", "||",BINARY, 4), --17 + tk_if = tkKw("Keyword_if", "if"), --18 + tk_else = tkKw("Keyword_else", "else"), --19 + tk_while = tkKw("Keyword_while","while"), --20 + tk_print = tkKw("Keyword_print","print"), --21 + tk_putc = tkKw("Keyword_putc", "putc"), --22 + tk_LeftParen = tkOp("LeftParen", "(", NONE, -1), --23 + tk_RightParen = tkOp("RightParen", ")", NONE, -1), --24 + tk_LeftBrace = tkOp("LeftBrace", "{", NONE, -1), --25 + tk_RightBrace = tkOp("RightBrace", "}", NONE, -1), --26 + tk_Semicolon = tkOp("Semicolon", ";", NONE, -1), --27 + tk_Comma = tkOp("Comma", ",", NONE, -1), --28 + tk_Identifier = tkName("Identifier"), --29 + tk_Integer = tkName("Integer"), --30 + tk_String = tkName("String"), --31 + tk_Sequence = tkName("Sequence"), --32 + tk_Prints = tkName("tk_Prints"), --33 + tk_Printi = tkName("tk_Printi") --34 -global integer input_file = STDIN, - output_file = STDOUT + global integer input_file = STDIN, + output_file = STDOUT -type strint(object o) - return string(o) or integer(o) -end type + type strint(object o) + return string(o) or integer(o) + end type -global strint tok_line, -- save of line/col at the start of - tok_col -- token/comment, for result/errors + global strint tok_line, -- save of line/col at the start of + tok_col -- token/comment, for result/errors -global object oneline = "" + global object oneline = "" -constant errfmt = "Line %s column %s:\n%s%s" + constant errfmt = "Line %s column %s:\n%s%s" -function errline() - oneline = substitute(trim(oneline,"\r\n"),'\t',' ') - string padding = repeat(' ',tok_col) - return sprintf("%s\n%s^ ",{oneline,padding}) -end function + function errline() + oneline = substitute(trim(oneline,"\r\n"),'\t',' ') + string padding = repeat(' ',tok_col) + return sprintf("%s\n%s^ ",{oneline,padding}) + end function -global procedure error(sequence msg, sequence args={}) - if length(args) then - msg = sprintf(msg,args) - end if - string el = iff(atom(oneline)?"":errline()) - if integer(tok_line) then tok_line = sprintf("%d",tok_line) end if - if integer(tok_col) then tok_col = sprintf("%d",tok_col) end if - printf(STDOUT,errfmt,{tok_line,tok_col,el,msg}) - {} = wait_key() - abort(1) -end procedure + global procedure error(sequence msg, sequence args={}) + if length(args) then + msg = sprintf(msg,args) + end if + string el = iff(atom(oneline)?"":errline()) + if integer(tok_line) then tok_line = sprintf("%d",tok_line) end if + if integer(tok_col) then tok_col = sprintf("%d",tok_col) end if + printf(STDOUT,errfmt,{tok_line,tok_col,el,msg}) + {} = wait_key() + abort(1) + end procedure -include js_io.e -- fake file i/o for running under pwa/p2js + include js_io.e -- fake file i/o for running under pwa/p2js -function open_file(string file_name, string mode) - integer fn = iff(platform()=JS?js_open(file_name) - :open(file_name, mode)) - if fn<=0 then - printf(STDOUT, "Could not open %s", {file_name}) - {} = wait_key() - abort(1) - end if - return fn -end function + function open_file(string file_name, string mode) + integer fn = iff(platform()=JS?js_open(file_name) + :open(file_name, mode)) + if fn<=0 then + printf(STDOUT, "Could not open %s", {file_name}) + {} = wait_key() + abort(1) + end if + return fn + end function -global procedure open_files(sequence cl) - if length(cl)>2 then - input_file = open_file(cl[3],"r") - if length(cl)>3 then - output_file = open_file(cl[4],"w") - end if - end if -end procedure + global procedure open_files(sequence cl) + if length(cl)>2 then + input_file = open_file(cl[3],"r") + if length(cl)>3 then + output_file = open_file(cl[4],"w") + end if + end if + end procedure -global procedure close_files() - if platform()!=JS then - if input_file!=STDIN then close(input_file) end if - if output_file!=STDOUT then close(output_file) end if - end if -end procedure + global procedure close_files() + if platform()!=JS then + if input_file!=STDIN then close(input_file) end if + if output_file!=STDOUT then close(output_file) end if + end if + end procedure -global function enquote(string s) - return sprintf(`"%s"`,substitute(s,"\n","\\n")) -end function + global function enquote(string s) + return sprintf(`"%s"`,substitute(s,"\n","\\n")) + end function -global function unquote(string s) - if s[1]!='\"' then ?9/0 end if - if s[$]!='\"' then ?9/0 end if - s = substitute(s[2..-2],"\\n","\n") - return s -end function + global function unquote(string s) + if s[1]!='\"' then ?9/0 end if + if s[$]!='\"' then ?9/0 end if + s = substitute(s[2..-2],"\\n","\n") + return s + end function + + -- + -- demo\rosetta\Compiler\js_io.e + -- ============================= + -- + -- Fake file i/o for running under pwa/p2js in a browser + -- Does not cover the human readable reload parts of extra.e + -- + with javascript_semantics + sequence {known_files,kfc} = columnize({ + {"test3.c",split(""" + /* + All lexical tokens - not syntactically correct, but that will + have to wait until syntax analysis + */ + /* Print */ print /* Sub */ - + /* Putc */ putc /* Lss */ < + /* If */ if /* Gtr */ > + /* Else */ else /* Leq */ <= + /* While */ while /* Geq */ >= + /* Lbrace */ { /* Eq */ == + /* Rbrace */ } /* Neq */ != + /* Lparen */ ( /* And */ && + /* Rparen */ ) /* Or */ || + /* Uminus */ - /* Semi */ ; + /* Not */ ! /* Comma */ , + /* Mul */ * /* Assign */ = + /* Div */ / /* Integer */ 42 + /* Mod */ % /* String */ "String literal" + /* Add */ + /* Ident */ variable_name + /* character literal */ '\n' + /* character literal **/ '\\' + /* character literal */ ' ' + ""","\n")}, + {"test4.c",split(""" + /*** test printing, embedded \n and comments with lots of '*' ***/ + print(42); + print("\nHello World\nGood Bye\nok\n"); + print("Print a slash n - \\n.\n"); + ""","\n")}, + {"primes.c",split(""" + /* + Simple prime number generator + */ + count = 1; + n = 1; + limit = 100; + while (n < limit) { + k=3; + p=1; + n=n+2; + while ((k*k<=n) && (p)) { + p=n/k*k!=n; + k=k+2; + } + if (p) { + print(n, " is prime\n"); + count = count + 1; + } + } + print("Total primes found: ", count, "\n"); + ""","\n")}, + {"gcd.c",split(""" + /* Compute the gcd of 1071, 1029: 21 */ -a = 1071; -b = 1029; + a = 1071; + b = 1029; -while (b != 0) { - new_a = b; - b = a % b; - a = new_a; -} -print(a); -`,"\n")}, -{"Header.h",split(` -#define area(h, w) h * w -`,"\n")}, -{"Source.t",split(` -#include "Header.h" -#define width 5 -#define height 6 -area = #area(height, width)#; -`,"\n")}}) + while (b != 0) { + new_a = b; + b = a % b; + a = new_a; + } + print(a); + ""","\n")}, + {"Header.h",split(""" + #define area(h, w) h * w + ""","\n")}, + {"Source.t",split(""" + #include "Header.h" + #define width 5 + #define height 6 + area = #area(height, width)#; + ""","\n")}}) -sequence linenos = repeat(-1,length(known_files)) + sequence linenos = repeat(-1,length(known_files)) -global function js_open(string filename) - integer fn = find(filename,known_files) - assert(fn!=0) - linenos[fn] = 0 - return fn -end function + global function js_open(string filename) + integer fn = find(filename,known_files) + assert(fn!=0) + linenos[fn] = 0 + return fn + end function -global function js_gets(integer fn) - integer lineno = linenos[fn]+1 - if lineno<=length(kfc[fn]) then - linenos[fn] = lineno - return kfc[fn][lineno] - end if - return EOF -end function + global function js_gets(integer fn) + integer lineno = linenos[fn]+1 + if lineno<=length(kfc[fn]) then + linenos[fn] = lineno + return kfc[fn][lineno] + end if + return EOF + end function + + -- + -- demo\\rosetta\\Compiler\\lex.e + -- ============================== + -- + -- The reusable part of lex.exw + -- This is only kept separate from core.e for consistency with later modules. -integer ch = ' ', - line = 0, - col = 0 + with javascript_semantics + include core.e -procedure eof(string s) - error("%s in %s literal",{iff(ch=EOF?"EOF":"EOL"),s}) -end procedure + integer ch = ' ', + line = 0, + col = 0 -function next_ch() - while 1 do - col += 1 - if oneline=EOF then - ch = EOF - exit - elsif col>length(oneline) then - line += 1 - col = 0 - oneline = iff(platform()=JS?js_gets(input_file) - :gets(input_file)) - else - ch = oneline[col] - exit - end if - end while - return ch -end function + procedure eof(string s) + error("%s in %s literal",{iff(ch=EOF?"EOF":"EOL"),s}) + end procedure --- for pwa/p2js (JavaScript *really* dislikes tabs in strings): ---constant whitespace = " \t\r\n\x0B\xA0" -constant whitespace = {' ','\t','\r','\n',#0B,#A0} --- (0x0B is Vertical Tab, 0xA0 is Non-breaking space) + function next_ch() + while 1 do + col += 1 + if oneline=EOF then + ch = EOF + exit + elsif col>length(oneline) then + line += 1 + col = 0 + oneline = iff(platform()=JS?js_gets(input_file) + :gets(input_file)) + else + ch = oneline[col] + exit + end if + end while + return ch + end function -procedure skipspacesandcomments() - while 1 do - if not find(ch,whitespace) then - if ch='/' and col-- for pwa/p2js (JavaScript *really* dislikes tabs in strings): + --constant whitespace = " \t\r\n\x0B\xA0" + constant whitespace = {' ','\t','\r','\n',#0B,#A0} + -- (0x0B is Vertical Tab, 0xA0 is Non-breaking space) -function escape_char(string s) - ch = next_ch() -- (discard the '\\') - if ch='n' then - ch = '\n' - elsif ch='\\' then - ch = '\\' - elsif ch=EOF - or ch='\n' then - eof(s) - else - error(`unknown escape sequence \%c`, {ch}) - end if - return ch -end function + procedure skipspacesandcomments() + while 1 do + if not find(ch,whitespace) then + if ch='/' and col<length(oneline) and oneline[col+1]='*' then + tok_line = line -- (in case of EOF error) + tok_col = col + ch = next_ch() -- (can be EOF) + ch = next_ch() -- ( "" ) + while 1 do + if ch='*' then + ch = next_ch() + if ch='/' then exit end if + elsif ch=EOF then + error("EOF in comment") + else + ch = next_ch() + end if + end while + else + exit + end if + end if + ch = next_ch() + end while + end procedure -function char_lit() - integer startch = ch, - res = next_ch() -- (skip opening quote, save res) - if ch=startch then - error("empty character constant") - elsif ch='\\' then - res = escape_char("character") - end if - ch = next_ch() - if ch=EOF - or ch='\n' then - eof("character") - elsif ch!=startch then - error("multi-character constant") - end if - ch = next_ch() - return {tk_Integer, res} -end function + function escape_char(string s) + ch = next_ch() -- (discard the '\\') + if ch='n' then + ch = '\n' + elsif ch='\\' then + ch = '\\' + elsif ch=EOF + or ch='\n' then + eof(s) + else + error(`unknown escape sequence \%c`, {ch}) + end if + return ch + end function -function string_lit() - integer startch = ch - string text = "" - while next_ch()!=startch do - if ch=EOF - or ch='\n' then - eof("string") - elsif ch='\\' then - ch = escape_char("string") - end if - text &= ch - end while - ch = next_ch() - return {tk_String, text} -end function + function char_lit() + integer startch = ch, + res = next_ch() -- (skip opening quote, save res) + if ch=startch then + error("empty character constant") + elsif ch='\\' then + res = escape_char("character") + end if + ch = next_ch() + if ch=EOF + or ch='\n' then + eof("character") + elsif ch!=startch then + error("multi-character constant") + end if + ch = next_ch() + return {tk_Integer, res} + end function -function get_op() --- sequence operator = {ch} - string operator = ""&ch - ch = next_ch() - while charmap[ch]=OPERATOR - and find(operator&ch,operators) do - -- (^ ie/eg merge ">=", but not ");") - operator &= ch - ch = next_ch() - end while - integer k = find(operator,operators) - if k=0 then error("unknown operator") end if - return {opcodes[k], 0} -- (0 unused) -end function + function string_lit() + integer startch = ch + string text = "" + while next_ch()!=startch do + if ch=EOF + or ch='\n' then + eof("string") + elsif ch='\\' then + ch = escape_char("string") + end if + text &= ch + end while + ch = next_ch() + return {tk_String, text} + end function -function get_int() - integer i = 0 - while charmap[ch]=DIGIT do - i = i*10 + (ch-'0') - ch = next_ch() - end while - if charmap[ch]=LETTER then - error("invalid number") - end if - return {tk_Integer, i} -end function + function get_op() + -- sequence operator = {ch} + string operator = ""&ch + ch = next_ch() + while charmap[ch]=OPERATOR + and find(operator&ch,operators) do + -- (^ ie/eg merge ">=", but not ");") + operator &= ch + ch = next_ch() + end while + integer k = find(operator,operators) + if k=0 then error("unknown operator") end if + return {opcodes[k], 0} -- (0 unused) + end function -function get_ident() - string text = "" - while find(charmap[ch],{LETTER,DIGIT}) do - text &= ch - ch = next_ch() - end while - integer keyword = getd(text,KEYWORDS) - if keyword!=NULL then - return {keyword, 0} -- (0 unused) - end if - return {tk_Identifier, text} -end function + function get_int() + integer i = 0 + while charmap[ch]=DIGIT do + i = i*10 + (ch-'0') + ch = next_ch() + end while + if charmap[ch]=LETTER then + error("invalid number") + end if + return {tk_Integer, i} + end function -function get_token() - skipspacesandcomments() - tok_line = line - tok_col = col - switch ch do - case EOF then return {tk_EOI, 0} -- (0 unused) - case '\'' then return char_lit() - case '"' then return string_lit() - else - switch charmap[ch] do - case OPERATOR then return get_op() - case DIGIT then return get_int() - case LETTER then return get_ident() - else error("unrecognized character: (%d)", {ch}) - end switch - end switch -end function + function get_ident() + string text = "" + while find(charmap[ch],{LETTER,DIGIT}) do + text &= ch + ch = next_ch() + end while + integer keyword = getd(text,KEYWORDS) + if keyword!=NULL then + return {keyword, 0} -- (0 unused) + end if + return {tk_Identifier, text} + end function -global function lex() - sequence toks = {} - integer tok = -1 - object v - while tok!=tk_EOI do - {tok,v} = get_token() - toks = append(toks,{tok_line,tok_col,tok,v}) - end while - return toks -end function + function get_token() + skipspacesandcomments() + tok_line = line + tok_col = col + switch ch do + case EOF then return {tk_EOI, 0} -- (0 unused) + case '\'' then return char_lit() + case '"' then return string_lit() + else + switch charmap[ch] do + case OPERATOR then return get_op() + case DIGIT then return get_int() + case LETTER then return get_ident() + else error("unrecognized character: (%d)", {ch}) + end switch + end switch + end function + + global function lex() + sequence toks = {} + integer tok = -1 + object v + while tok!=tk_EOI do + {tok,v} = get_token() + toks = append(toks,{tok_line,tok_col,tok,v}) + end while + return toks + end function + + -- + -- demo\rosetta\Compiler\extra.e + -- ============================= + -- + -- Routines to reload human-readable files (deviation from task requirement) + -- + without js -- (file i/o) ---The following can be used to load .lex files, as created by lex.exw: --- (in place of the existing get_tok() in parse.e) -function get_tok() - string line = trim(gets(input_file)) - sequence tok = split(line,' ',limit:=4,no_empty:=1) - integer k = find(tok[3],tkNames) - if k=0 then ?9/0 end if - tok[3] = k - return tok -end function + --The following can be used to load .lex files, as created by lex.exw: + -- (in place of the existing get_tok() in parse.e) + function get_tok() + string line = trim(gets(input_file)) + sequence tok = split(line,' ',limit:=4,no_empty:=1) + integer k = find(tok[3],tkNames) + if k=0 then ?9/0 end if + tok[3] = k + return tok + end function ---The following can be used to load .ast files, as created by parse.exw: --- (in place of the existing lex()/parse() pairs in cgen.exw and interp.exw) -function load_ast() - string line = trim(gets(input_file)) - -- Each line has at least one token - sequence node = split(line,' ',limit:=2,no_empty:=1) + --The following can be used to load .ast files, as created by parse.exw: + -- (in place of the existing lex()/parse() pairs in cgen.exw and interp.exw) + function load_ast() + string line = trim(gets(input_file)) + -- Each line has at least one token + sequence node = split(line,' ',limit:=2,no_empty:=1) - string node_type = node[1] + string node_type = node[1] - if node_type == ";" then -- a terminal node - return NULL - end if + if node_type == ";" then -- a terminal node + return NULL + end if - integer n_type = find(node_type,tkNames) - if n_type=0 then ?9/0 end if + integer n_type = find(node_type,tkNames) + if n_type=0 then ?9/0 end if - -- A line with two tokens is a leaf node - -- Leaf nodes are: Identifier, Integer, String - -- The 2nd token is the value - if length(node)>1 then - node[1] = n_type - if n_type=tk_Integer then - node[2] = to_integer(node[2]) - elsif n_type=tk_String then - node[2] = unquote(node[2]) - end if - return node - end if - object left = load_ast() - object right = load_ast() - return {n_type, left, right} -end function + -- A line with two tokens is a leaf node + -- Leaf nodes are: Identifier, Integer, String + -- The 2nd token is the value + if length(node)>1 then + node[1] = n_type + if n_type=tk_Integer then + node[2] = to_integer(node[2]) + elsif n_type=tk_String then + node[2] = unquote(node[2]) + end if + return node + end if + object left = load_ast() + object right = load_ast() + return {n_type, left, right} + end function + + -- + -- demo\rosetta\Compiler\lex.exw + -- ============================= + -- + with javascript_semantics + include lex.e -procedure main(sequence cl) - open_files(cl) - sequence toks = lex() - integer tok - object v - for i=1 to length(toks) do - {tok_line,tok_col,tok,v} = toks[i] - switch tok do - case tk_Identifier: v = sprintf(" %s",v) - case tk_Integer: v = sprintf(" %5d",v) - case tk_String: v = sprintf(" %s",enquote(v)) - else v = "" - end switch - printf(output_file, "%5d %5d %-10s%s\n", {tok_line,tok_col,tkNames[tok],v}) - end for - close_files() -end procedure + procedure main(sequence cl) + open_files(cl) + sequence toks = lex() + integer tok + object v + for i=1 to length(toks) do + {tok_line,tok_col,tok,v} = toks[i] + switch tok do + case tk_Identifier: v = sprintf(" %s",v) + case tk_Integer: v = sprintf(" %5d",v) + case tk_String: v = sprintf(" %s",enquote(v)) + else v = "" + end switch + printf(output_file, "%5d %5d %-10s%s\n", {tok_line,tok_col,tkNames[tok],v}) + end for + close_files() + end procedure ---main(command_line()) -main({0,0,"test4.c"}) + --main(command_line()) + main({0,0,"test4.c"}) + + -- + -- demo\rosetta\Compiler\parse.e + -- ============================= + -- + -- The reusable part of parse.exw + -- + with javascript_semantics + include lex.e -sequence tok + sequence tok -procedure errd(sequence msg, sequence args={}) - {tok_line,tok_col} = tok - error(msg,args) -end procedure + procedure errd(sequence msg, sequence args={}) + {tok_line,tok_col} = tok + error(msg,args) + end procedure -global sequence toks -integer next_tok = 1 + global sequence toks + integer next_tok = 1 -function get_tok() - sequence tok = toks[next_tok] - next_tok += 1 - return tok -end function + function get_tok() + sequence tok = toks[next_tok] + next_tok += 1 + return tok + end function -procedure expect(string msg, integer s) - integer tk = tok[3] - if tk!=s then - errd("%s: Expecting '%s', found '%s'\n", {msg, tkNames[s], tkNames[tk]}) - end if - tok = get_tok() -end procedure + procedure expect(string msg, integer s) + integer tk = tok[3] + if tk!=s then + errd("%s: Expecting '%s', found '%s'\n", {msg, tkNames[s], tkNames[tk]}) + end if + tok = get_tok() + end procedure -function expr(integer p) - object x = NULL, node - integer op = tok[3] + function expr(integer p) + object x = NULL, node + integer op = tok[3] - switch op do - case tk_LeftParen: - tok = get_tok() - x = expr(0) - expect("expr",tk_RightParen) - case tk_sub: - case tk_add: - tok = get_tok() - node = expr(precedences[tk_neg]); - x = iff(op==tk_sub?{tk_neg, node, NULL}:node) - case tk_not: - tok = get_tok(); - x = {tk_not, expr(precedences[tk_not]), NULL} - case tk_Identifier: - x = {tk_Identifier, tok[4]} - tok = get_tok(); - case tk_Integer: - x = {tk_Integer, tok[4]} - tok = get_tok(); - default: - errd("Expecting a primary, found: %s\n", tkNames[op]) - end switch + switch op do + case tk_LeftParen: + tok = get_tok() + x = expr(0) + expect("expr",tk_RightParen) + case tk_sub: + case tk_add: + tok = get_tok() + node = expr(precedences[tk_neg]); + x = iff(op==tk_sub?{tk_neg, node, NULL}:node) + case tk_not: + tok = get_tok(); + x = {tk_not, expr(precedences[tk_not]), NULL} + case tk_Identifier: + x = {tk_Identifier, tok[4]} + tok = get_tok(); + case tk_Integer: + x = {tk_Integer, tok[4]} + tok = get_tok(); + default: + errd("Expecting a primary, found: %s\n", tkNames[op]) + end switch - op = tok[3] - while narys[op]=BINARY - and precedences[op]>=p do - tok = get_tok() - x = {op, x, expr(precedences[op]+1)} - op = tok[3] - end while - return x; -end function + op = tok[3] + while narys[op]=BINARY + and precedences[op]>=p do + tok = get_tok() + x = {op, x, expr(precedences[op]+1)} + op = tok[3] + end while + return x; + end function -function paren_expr(string msg) - expect(msg, tk_LeftParen); - object t = expr(0) - expect(msg, tk_RightParen); - return t -end function + function paren_expr(string msg) + expect(msg, tk_LeftParen); + object t = expr(0) + expect(msg, tk_RightParen); + return t + end function -function stmt() - object t = NULL, e, s + function stmt() + object t = NULL, e, s - switch tok[3] do - case tk_if: - tok = get_tok(); - object condition = paren_expr("If-cond"); - object ifblock = stmt(); - object elseblock = NULL; - if tok[3] == tk_else then - tok = get_tok(); - elseblock = stmt(); - end if - t = {tk_if, condition, {tk_if, ifblock, elseblock}} - case tk_putc: - tok = get_tok(); - e = paren_expr("Prtc") - t = {tk_putc, e, NULL} - expect("Putc", tk_Semicolon); - case tk_print: - tok = get_tok(); - expect("Print",tk_LeftParen) - while 1 do - if tok[3] == tk_String then - e = {tk_Prints, {tk_String, tok[4]}, NULL} - tok = get_tok(); - else - e = {tk_Printi, expr(0), NULL} - end if - t = {tk_Sequence, t, e} - if tok[3]!=tk_Comma then exit end if - expect("Print", tk_Comma) - end while - expect("Print", tk_RightParen); - expect("Print", tk_Semicolon); - case tk_Semicolon: - tok = get_tok(); - case tk_Identifier: - object v - v = {tk_Identifier, tok[4]} - tok = get_tok(); - expect("assign", tk_assign); - e = expr(0); - t = {tk_assign, v, e} - expect("assign", tk_Semicolon); - case tk_while: - tok = get_tok(); - e = paren_expr("while"); - s = stmt(); - t = {tk_while, e, s} - case tk_LeftBrace: /* {stmt} */ - expect("LeftBrace", tk_LeftBrace) - while not find(tok[3],{tk_RightBrace,tk_EOI}) do - t = {tk_Sequence, t, stmt()} - end while - expect("LeftBrace", tk_RightBrace); - break; - case tk_EOI: - break; - default: - errd("expecting start of statement, found '%s'\n", tkNames[tok[3]]); - end switch - return t -end function + switch tok[3] do + case tk_if: + tok = get_tok(); + object condition = paren_expr("If-cond"); + object ifblock = stmt(); + object elseblock = NULL; + if tok[3] == tk_else then + tok = get_tok(); + elseblock = stmt(); + end if + t = {tk_if, condition, {tk_if, ifblock, elseblock}} + case tk_putc: + tok = get_tok(); + e = paren_expr("Prtc") + t = {tk_putc, e, NULL} + expect("Putc", tk_Semicolon); + case tk_print: + tok = get_tok(); + expect("Print",tk_LeftParen) + while 1 do + if tok[3] == tk_String then + e = {tk_Prints, {tk_String, tok[4]}, NULL} + tok = get_tok(); + else + e = {tk_Printi, expr(0), NULL} + end if + t = {tk_Sequence, t, e} + if tok[3]!=tk_Comma then exit end if + expect("Print", tk_Comma) + end while + expect("Print", tk_RightParen); + expect("Print", tk_Semicolon); + case tk_Semicolon: + tok = get_tok(); + case tk_Identifier: + object v + v = {tk_Identifier, tok[4]} + tok = get_tok(); + expect("assign", tk_assign); + e = expr(0); + t = {tk_assign, v, e} + expect("assign", tk_Semicolon); + case tk_while: + tok = get_tok(); + e = paren_expr("while"); + s = stmt(); + t = {tk_while, e, s} + case tk_LeftBrace: /* {stmt} */ + expect("LeftBrace", tk_LeftBrace) + while not find(tok[3],{tk_RightBrace,tk_EOI}) do + t = {tk_Sequence, t, stmt()} + end while + expect("LeftBrace", tk_RightBrace); + break; + case tk_EOI: + break; + default: + errd("expecting start of statement, found '%s'\n", tkNames[tok[3]]); + end switch + return t + end function -global function parse() - object t = NULL - tok = get_tok() - while 1 do - object s = stmt() - if s=NULL then exit end if - t = {tk_Sequence, t, s} - end while - return t -end function -And a simple test driver for the specific task: + global function parse() + object t = NULL + tok = get_tok() + while 1 do + object s = stmt() + if s=NULL then exit end if + t = {tk_Sequence, t, s} + end while + return t + end function + + -- + -- demo\rosetta\Compiler\parse.exw + -- =============================== + -- + with javascript_semantics + include parse.e -procedure print_ast(object t) - if t == NULL then - printf(output_file,";\n") - else - integer ttype = t[1] - printf(output_file,tkNames[ttype]) - if ttype=tk_Identifier then - printf(output_file," %s\n",t[2]) - elsif ttype=tk_Integer then - printf(output_file," %d\n",t[2]) - elsif ttype=tk_String then - printf(output_file," %s\n",enquote(t[2])) - else - printf(output_file,"\n") - print_ast(t[2]) - print_ast(t[3]) - end if - end if -end procedure + procedure print_ast(object t) + if t == NULL then + printf(output_file,";\n") + else + integer ttype = t[1] + printf(output_file,tkNames[ttype]) + if ttype=tk_Identifier then + printf(output_file," %s\n",t[2]) + elsif ttype=tk_Integer then + printf(output_file," %d\n",t[2]) + elsif ttype=tk_String then + printf(output_file," %s\n",enquote(t[2])) + else + printf(output_file,"\n") + print_ast(t[2]) + print_ast(t[3]) + end if + end if + end procedure -function ptree(object t) - if sequence(t) then - integer t1 = t[1] - t = deep_copy(t) - t[1] = tkNames[t1] - if not find(t1,{tk_Identifier,tk_String}) then - for i=2 to length(t) do - if t1=tk_Sequence and t[i]=NULL then - t[i] = "NULL" - else - t[i] = ptree(t[i]) - end if - end for - end if - end if - return t -end function + function ptree(object t) + if sequence(t) then + integer t1 = t[1] + t = deep_copy(t) + t[1] = tkNames[t1] + if not find(t1,{tk_Identifier,tk_String}) then + for i=2 to length(t) do + if t1=tk_Sequence and t[i]=NULL then + t[i] = "NULL" + else + t[i] = ptree(t[i]) + end if + end for + end if + end if + return t + end function -procedure main(sequence cl) - open_files(cl) - toks = lex() - object t = parse() - print_ast(t) -pp(ptree(t),{pp_Nest,10,pp_Pause,0,pp_IntCh,false}) - close_files() -end procedure + procedure main(sequence cl) + open_files(cl) + toks = lex() + object t = parse() + print_ast(t) + pp(ptree(t),{pp_Nest,10,pp_Pause,0,pp_IntCh,false}) + close_files() + end procedure ---main(command_line()) -main({0,0,"test3.c"}) -- not parseable! ---main({0,0,"primes.c"}) -- as Algol, C, Python (apart from spacing) ---main({0,0,"count.c"}) -- as AWK ( "" ) + --main(command_line()) + main({0,0,"test3.c"}) -- not parseable! + --main({0,0,"primes.c"}) -- as Algol, C, Python (apart from spacing) + --main({0,0,"count.c"}) -- as AWK ( "" ) + + -- + -- demo\rosetta\Compiler\vm.exw + -- ============================ + -- + -- Since we have generated executable machine code, the virtual machine, such as it is, is just + -- the higher level implementations of printc/i/s, see setbuiltins() in cgen.e + -- Otherwise the only difference between this and cgen.exw is call(code_mem) instead of decode(). + -- + -- A quick test (calculating fib(44) 10^6 times) suggests ~500 times faster than interp.exw - + -- which is to be expected given that a single add instruction (1 clock) here is implemented as + -- at least three (and quite possibly five!) resursive calls to interp() in the other. -procedure main(sequence cl) - open_files(cl) - toks = lex() - object t = parse() - code_gen(t) - fixup() - if machine_bits()=32 then - -- ^ as per note above - call(code_mem) - end if - free({var_mem,code_mem}) - close_files() -end procedure + format PE32 + --format ELF32 + -- Note: cgen generates 32-bit machine code, which cannot be executed directly from a 64-bit interpreter. + -- You can however, via the magic of either the above format directives, use a 64-bit version of + -- Phix to compile this (just add a -c command line option) to a 32-bit executable, which can. + -- It would not be particularly difficult to emit 32 or 64 bit code, but some source code files + -- would, fairly obviously, then be very nearly twice as long, and a fair bit harder to read. ---main(command_line()) -main({0,0,"count.c"}) + without js -- (machine code!) + include cgen.e + + procedure main(sequence cl) + open_files(cl) + toks = lex() + object t = parse() + code_gen(t) + fixup() + if machine_bits()=32 then + -- ^ as per note above + call(code_mem) + end if + free({var_mem,code_mem}) + close_files() + end procedure + + --main(command_line()) + main({0,0,"count.c"}) + + with javascript_semantics + integer count = 0, n = 11*11, + limit = iff(platform()=JS?10:20) + atom t0 = time(), t1 = time() + while count<limit do + if gcd(n,3*5*7)=1 then + sequence f = prime_factors(n,true,-1) + if length(f)>1 then + string s = sprintf("%d",n) + bool valid = true + for i=1 to length(f) do + if (i=1 or f[i]!=f[i-1]) + and not match(sprintf("%d",f[i]),s) then + valid = false + exit + end if + end for + if valid then + count += 1 + string t = join(apply(f,sprint),"x"), + e = elapsed(time()-t1) + printf(1,"%2d: %,10d = %-17s (%s)\n",{count,n,t,e}) + t1 = time() + end if + end if + end if + n += 2 + end while + printf(1,"Total time:%s\n",{elapsed(time()-t0)}) + + with javascript_semantics + integer count = 0, n = 11*11, + limit = iff(platform()=JS?10:20) + atom t0 = time(), t1 = time() + while count<limit do + string s = sprintf("%d",n) + integer l = floor(sqrt(n)), k = n, f = 3 + bool valid = true + while true do + if remainder(k,f)=0 then + if f<10 or not match(sprintf("%d",f),s) then + valid = false + exit + end if + if f=k then exit end if + k /= f + else + f += 2 + if f>l then + if k=n or not match(sprintf("%d",k),s) then + valid = false + end if + exit + end if + end if + end while + if valid then + count += 1; + string t = join(apply(prime_factors(n,true,-1),sprint),"x"), + e = elapsed(time()-t1) + printf(1,"%2d: %,10d = %-17s (%s)\n",{count,n,t,e}) + t1 = time() + end if + n += 2 + end while + printf(1,"Total time:%s\n",{elapsed(time()-t0)}) + + without js -- (threads) + procedure echo(string s) + sleep(rand(100)/100) + enter_cs() + puts(1,s) + puts(1,'\n') + leave_cs() + end procedure -constant threads = {create_thread(routine_id("echo"),{"Enjoy"}), - create_thread(routine_id("echo"),{"Rosetta"}), - create_thread(routine_id("echo"),{"Code"})} + constant threads = {create_thread(routine_id("echo"),{"Enjoy"}), + create_thread(routine_id("echo"),{"Rosetta"}), + create_thread(routine_id("echo"),{"Code"})} -wait_thread(threads) -puts(1,"done") -{} = wait_key() + wait_thread(threads) + puts(1,"done") + {} = wait_key() + + with javascript_semantics + constant precision = 10000 -function continued_fraction(integer f, steps=precision) - atom a, b, res = 0 - for n=steps to 1 by -1 do - {a, b} = f(n) - res := b / (a + res) - end for - {a} = f(0) - return a + res -end function + function continued_fraction(integer f, steps=precision) + atom a, b, res = 0 + for n=steps to 1 by -1 do + {a, b} = f(n) + res := b / (a + res) + end for + {a} = f(0) + return a + res + end function -function sqr2(integer n) return {iff(n=0?1:2),1} end function + function sqr2(integer n) return {iff(n=0?1:2),1} end function -function nap(integer n) return {iff(n=0?2:n),iff(n=1?1:n-1)} end function + function nap(integer n) return {iff(n=0?2:n),iff(n=1?1:n-1)} end function -function pi(integer n) return {iff(n=0?3:6),power(2*n-1,2)} end function + function pi(integer n) return {iff(n=0?3:6),power(2*n-1,2)} end function -printf(1,"Precision: %d\n", {precision}) -printf(1,"Sqr(2): %.10g\n", {continued_fraction(sqr2)}) -printf(1,"Napier: %.10g\n", {continued_fraction(nap)}) -printf(1,"Pi: %.10g\n", {continued_fraction(pi)}) + printf(1,"Precision: %d\n", {precision}) + printf(1,"Sqr(2): %.10g\n", {continued_fraction(sqr2)}) + printf(1,"Napier: %.10g\n", {continued_fraction(nap)}) + printf(1,"Pi: %.10g\n", {continued_fraction(pi)}) + + with javascript_semantics + function decrat(string s) + integer nom = 0, + denom = 1 + assert(s[1..2]="0.") + for i=3 to length(s) do + integer ch = s[i] + assert(ch>='0' and ch<='9') + nom = nom*10 + ch-'0' + denom *= 10 + end for + return sq_div({nom,denom},gcd(nom,denom)) + end function -?decrat("0.9054054") -?decrat("0.518518") -?decrat("0.75") + ?decrat("0.9054054") + ?decrat("0.518518") + ?decrat("0.75") + + with javascript_semantics + ?elapsed(7259) + ?elapsed(86400) + ?elapsed(6000000) + + with javascript_semantics + include timedate.e + ?elapsed(6000000-timedelta(days:=6,hours:=10)) + stable - all [s = 0 n = 3] [00.00.127] ; new birth - true [black] ; barren - ] - xy: map-to-pixels x y - append draws compose [fill-pen (color) circle (xy) (rad)] - - ; process next generation - nxt/:x/:y: either any [ - all [mat/:x/:y = 1 n > 1 n < 4] ; lives on - all [mat/:x/:y = 0 n = 3] ; birth - ][1][0] - ] - ] - ; swap matrix - t: mat mat: nxt nxt: t - if (gen: gen + 1) > maxgen [init] - ] ; changer -] - -matrix-rand: func [a b][collect [loop a [keep/only collect [loop b [keep random/only [0 1]]]]]] -matrix-zero: func [a b][collect [loop a [keep/only collect [loop b [keep 0]]]]] - -; neighbour counting in a wrapped world! -nb: func [x y][ - xm1: x - 1 if xm1 < 1 [xm1: xmax] - xp1: x + 1 if xp1 > xmax [xp1: 1] - ym1: y - 1 if ym1 < 1 [ym1: ymax] - yp1: y + 1 if yp1 > ymax [yp1: 1] - mat/:xm1/:ym1 + mat/:xm1/:y + mat/:xm1/:yp1 + - mat/:x/:ym1 + mat/:x/:yp1 + - mat/:xp1/:ym1 + mat/:xp1/:y + mat/:xp1/:yp1 -] - -xmax: 100 ; number of cells, horiz -ymax: 100 ; vert -dispx: xmax * 10 ; display size for 10 pixels cell size -dispy: ymax * 10 ; vert -rad: 0 ; radial size for cells (calculated) - -; matrixes for generations: -mat: matrix-rand xmax ymax -nxt: matrix-zero xmax ymax - -; counters: -gen: 0 -maxgen: 500 - -init: does [ - mat: matrix-rand xmax ymax - nxt: matrix-zero xmax ymax - gen: 0 -] - -main: func [/local p][ - p: make plotter [] - p/header "Conway's Game of Life" - p/display-size: to-pair reduce [dispx dispy] ; display size regardless for x and y range - p/x1: 1 p/x2: xmax - p/y1: 1 p/y2: ymax - p/fn: func [x][x] ; dummy, not used - rad: (min (dispx / xmax) (dispy / ymax)) / 2 - p/draw ; generate drawing - p/draws/line-width: 0 - ;p/draws/pen: white - p/show ; display it -] -main diff --git a/Task/Conways-Game-of-Life/Red/conways-game-of-life.red b/Task/Conways-Game-of-Life/Red/conways-game-of-life.red new file mode 100644 index 0000000000..e72164f9bc --- /dev/null +++ b/Task/Conways-Game-of-Life/Red/conways-game-of-life.red @@ -0,0 +1,56 @@ +Red [ + Purpose: "Conway's Game of Life" + Author: "Joe Smith" +] + +neigh: [[0 1] [0 -1] [1 0] [-1 0] [1 1] [1 -1] [-1 1] [-1 -1]] +conway: function [petri] [ + new-petri: copy/deep petri + repeat row length? petri [ + repeat col length? petri [ + live-neigh: 0 + foreach cell neigh [ + try [ + if petri/(:row + cell/1)/(:col + cell/2) = 1 [live-neigh: live-neigh + 1] + ] + ] + switch petri/:row/:col [ + 1 [if any [live-neigh < 2 live-neigh > 3] + [new-petri/:row/:col: 0] + ] + 0 [if live-neigh = 3 [new-petri/:row/:col: 1]] + ]]] + clear insert petri new-petri +] + +*3-3: [ + [0 1 0] + [0 1 0] + [0 1 0] +] + +*8-8: [ + [0 0 1 0 0 0 0 0] + [0 0 0 1 0 0 0 0] + [0 1 1 1 0 0 0 0] + [0 0 0 0 0 0 0 0] + [0 0 0 0 0 0 0 0] + [0 0 0 0 0 0 0 0] + [0 0 0 0 0 0 0 0] + [0 0 0 0 0 0 0 0] +] + +display: function [table] [ + foreach row table [ + print replace/all (replace/all to-string row "0" "_") "1" "#" + ] print "" +] + +loop 5 [ + display *3-3 + conway *3-3 +] +loop 23 [ + display *8-8 + conway *8-8 +] diff --git a/Task/Conways-Game-of-Life/Rust/conways-game-of-life.rs b/Task/Conways-Game-of-Life/Rust/conways-game-of-life.rust similarity index 100% rename from Task/Conways-Game-of-Life/Rust/conways-game-of-life.rs rename to Task/Conways-Game-of-Life/Rust/conways-game-of-life.rust diff --git a/Task/Conways-Game-of-Life/Scheme/conways-game-of-life-2.scm b/Task/Conways-Game-of-Life/Scheme/conways-game-of-life-2.scm deleted file mode 100644 index b692b693b0..0000000000 --- a/Task/Conways-Game-of-Life/Scheme/conways-game-of-life-2.scm +++ /dev/null @@ -1,62 +0,0 @@ -(import (srfi 231)) - -(define (pad-array-with-zeros a N) - - ;; Pad two-dimensional array with N rows and columns of zeros, - ;; top and bottom, left and right. - ;; Assumes that the domain of a has zero lower bounds. - - (let* ((domain (array-domain a)) - (m (interval-upper-bound domain 0)) - (n (interval-upper-bound domain 1)) - (a_ (array-getter a))) - (make-array (interval-dilate domain (vector (- N) (- N)) (vector N N)) - (lambda (i j) - (or (and (< -1 i m) (< -1 j n) (a_ i j)) - 0))))) - -(define (neighbor-count a) - - ;; Returns a generalized array that contains the number - ;; of 1s in the 8 cells surrounding each cell in the original array. - - (let* ((big-a (array-copy! (pad-array-with-zeros a 1) - (array-storage-class a))) - (domain (array-domain a)) - (translates (map (lambda (translation) - (array-extract (array-translate big-a translation) domain)) - '(#(1 0) #(0 1) #(-1 0) #(0 -1) - #(1 1) #(1 -1) #(-1 1) #(-1 -1))))) - (apply array-map + translates))) - -(define (game-rules a neighbor-count) - - ;; a is the value in a single cell, neighbor-count is the count of 1s in - ;; its 8 neighboring cells. - - (if (zero? a) - (if (eqv? neighbor-count 3) 1 0) - (if (<= 2 neighbor-count 3) 1 0))) - -(define (advance a) - (array-copy! (array-map game-rules a (neighbor-count a)) - (array-storage-class a))) - -(define life-storage-class u1-storage-class) - -(define glider - (list*->array - 2 - '((0 0 0 0 0 0) - (0 0 1 0 0 0) - (0 0 0 1 0 0) - (0 1 1 1 0 0) - (0 0 0 0 0 0) - (0 0 0 0 0 0)) - life-storage-class)) - -(do ((i 0 (+ i 1)) - (pattern glider (advance pattern))) - ((= i 5)) - (pretty-print (array->list* pattern)) - (newline)) diff --git a/Task/Conways-Game-of-Life/Scheme/conways-game-of-life-1.scm b/Task/Conways-Game-of-Life/Scheme/conways-game-of-life.ss similarity index 100% rename from Task/Conways-Game-of-Life/Scheme/conways-game-of-life-1.scm rename to Task/Conways-Game-of-Life/Scheme/conways-game-of-life.ss diff --git a/Task/Conways-Game-of-Life/SequenceL/conways-game-of-life-1.sequencel b/Task/Conways-Game-of-Life/SequenceL/conways-game-of-life-1.sequencel index f4b1ca088b..3307c338b7 100644 --- a/Task/Conways-Game-of-Life/SequenceL/conways-game-of-life-1.sequencel +++ b/Task/Conways-Game-of-Life/SequenceL/conways-game-of-life-1.sequencel @@ -1,21 +1,21 @@ life(Cells(2))[I, J] := - let - numNeighbors := Cells[I-1,J-1] + Cells[I-1,J] + Cells[I-1,J+1] + - Cells[I,J-1] +/*current cell*/Cells[I,J+1] + - Cells[I+1,J-1] + Cells[I+1,J] + Cells[I+1,J+1]; - in - 0 when I=1 or J=1 or I=size(Cells) or J=size(Cells[I]) //On Border - else - 0 when numNeighbors < 2 or numNeighbors > 3 //Cell Dies - else - 1 when Cells[I,J] = 1 and numNeighbors = 2 or numNeighbors = 3 //Cell lives on or is born. - else - Cells[I,J]; //No Change - - + let + numNeighbors := Cells[I-1,J-1] + Cells[I-1,J] + Cells[I-1,J+1] + + Cells[I,J-1] +/*current cell*/Cells[I,J+1] + + Cells[I+1,J-1] + Cells[I+1,J] + Cells[I+1,J+1]; + in + 0 when I=1 or J=1 or I=size(Cells) or J=size(Cells[I]) //On Border + else + 0 when numNeighbors < 2 or numNeighbors > 3 //Cell Dies + else + 1 when Cells[I,J] = 1 and numNeighbors = 2 or numNeighbors = 3 //Cell lives on or is born. + else + Cells[I,J]; //No Change + + stressTestInput(n(0))[y,x] := - 0 when not y = n / 2 - else - 1 - foreach y within 1 ... n, - x within 1 ... n; + 0 when not y = n / 2 + else + 1 + foreach y within 1 ... n, + x within 1 ... n; diff --git a/Task/Conways-Game-of-Life/SequenceL/conways-game-of-life-2.sequencel b/Task/Conways-Game-of-Life/SequenceL/conways-game-of-life-2.sequencel index 54e33fabc0..5c10981d9f 100644 --- a/Task/Conways-Game-of-Life/SequenceL/conways-game-of-life-2.sequencel +++ b/Task/Conways-Game-of-Life/SequenceL/conways-game-of-life-2.sequencel @@ -17,150 +17,150 @@ std::string get_file_contents(const char*); int main(int argc, char ** argv) { - int cores = 0; - int maxSize = 700; + int cores = 0; + int maxSize = 700; - int drawSkip = 1; - int drawWait = 0; + int drawSkip = 1; + int drawWait = 0; - string inputFile = "test"; + string inputFile = "test"; - if(argc > 1) - { - inputFile = argv[1]; - } - if(argc > 2) - { - cores = atoi(argv[2]); - } + if(argc > 1) + { + inputFile = argv[1]; + } + if(argc > 2) + { + cores = atoi(argv[2]); + } - if(argc > 3) - { - maxSize = atoi(argv[3]); - } + if(argc > 3) + { + maxSize = atoi(argv[3]); + } - if(argc > 4) - { - drawSkip = atoi(argv[4]); + if(argc > 4) + { + drawSkip = atoi(argv[4]); - if(drawSkip < 0) - { - drawWait = abs(drawSkip); - drawSkip = 1; - } - } + if(drawSkip < 0) + { + drawWait = abs(drawSkip); + drawSkip = 1; + } + } - sl_init(cores); + sl_init(cores); - SLTimer drawTimer; + SLTimer drawTimer; - sprintf(titleBuffer, "Conway's Game of Life in SequenceL: %d Cores", cores); + sprintf(titleBuffer, "Conway's Game of Life in SequenceL: %d Cores", cores); - int width = 0; - int height = 0; + int width = 0; + int height = 0; - //Read input file-------------- - Sequence> initialGrid; + //Read input file-------------- + Sequence> initialGrid; - if(inputFile != "test") - { - stringstream ss(get_file_contents(inputFile.c_str())); - string stringItem; - vector elems; - char delim = ','; + if(inputFile != "test") + { + stringstream ss(get_file_contents(inputFile.c_str())); + string stringItem; + vector elems; + char delim = ','; - getline(ss, stringItem, delim); - width = atoi(stringItem.c_str()); - getline(ss, stringItem, delim); - height = atoi(stringItem.c_str()); + getline(ss, stringItem, delim); + width = atoi(stringItem.c_str()); + getline(ss, stringItem, delim); + height = atoi(stringItem.c_str()); - while(getline(ss, stringItem, delim)) - { - elems.push_back(atoi(stringItem.c_str())); - } + while(getline(ss, stringItem, delim)) + { + elems.push_back(atoi(stringItem.c_str())); + } - //Sequence Pointer Constructor---- - int gridDims[] = {height, width, 0}; - Sequence> tempGrid( (void*)&elems[0], gridDims); - initialGrid.hard_copy(tempGrid, 0); - //----------------------------- - } - else - { - width = maxSize; - height = maxSize; - sl_stressTestInput(maxSize, cores, initialGrid); - } - //-------- + //Sequence Pointer Constructor---- + int gridDims[] = {height, width, 0}; + Sequence> tempGrid( (void*)&elems[0], gridDims); + initialGrid.hard_copy(tempGrid, 0); + //----------------------------- + } + else + { + width = maxSize; + height = maxSize; + sl_stressTestInput(maxSize, cores, initialGrid); + } + //-------- - Sequence> result; + Sequence> result; - const unsigned char black[] = {0}; + const unsigned char black[] = {0}; - CImg visu(width * 4, height * 4, 1, 1, 0); - CImgDisplay draw_disp(visu, titleBuffer); - cout << "Conway's Game of Life in SequenceL" << endl << "Cores: " << cores << endl; + CImg visu(width * 4, height * 4, 1, 1, 0); + CImgDisplay draw_disp(visu, titleBuffer); + cout << "Conway's Game of Life in SequenceL" << endl << "Cores: " << cores << endl; - int generations = 0; - double compTime = 0; - double drawTime = 0; - SLTimer t; + int generations = 0; + double compTime = 0; + double drawTime = 0; + SLTimer t; - while(!draw_disp.is_closed()) - { - t.start(); - sl_life(initialGrid, cores, result); - generations++; - initialGrid.hard_copy(result, 0); - t.stop(); - compTime += t.getTime(); + while(!draw_disp.is_closed()) + { + t.start(); + sl_life(initialGrid, cores, result); + generations++; + initialGrid.hard_copy(result, 0); + t.stop(); + compTime += t.getTime(); - drawTimer.start(); + drawTimer.start(); - if(drawSkip > 0 && generations % drawSkip == 0) - { + if(drawSkip > 0 && generations % drawSkip == 0) + { - visu.fill(255); + visu.fill(255); - for(int i = 1; i <= result.size(); i++) - { - for(int j = 1; j <= result[i].size(); j++) - { - if(result[i][j] == 1) visu.draw_circle((j-1) * 4, (i - 1) * 4, 2, black, 1); - } - } + for(int i = 1; i <= result.size(); i++) + { + for(int j = 1; j <= result[i].size(); j++) + { + if(result[i][j] == 1) visu.draw_circle((j-1) * 4, (i - 1) * 4, 2, black, 1); + } + } - visu.display(draw_disp); + visu.display(draw_disp); - int drawWidth = maxSize; - int drawHeight = maxSize; + int drawWidth = maxSize; + int drawHeight = maxSize; - if(width < height) - { - drawWidth = ((double)drawHeight * ((double)width / (double)height)); - } - else - { - drawHeight = ((double)drawWidth * ((double)height / (double)width)); - } + if(width < height) + { + drawWidth = ((double)drawHeight * ((double)width / (double)height)); + } + else + { + drawHeight = ((double)drawWidth * ((double)height / (double)width)); + } - draw_disp.resize(drawWidth, drawHeight, false); + draw_disp.resize(drawWidth, drawHeight, false); - draw_disp.wait(drawWait); - drawTimer.stop(); - drawTime += drawTimer.getTime(); - } - } + draw_disp.wait(drawWait); + drawTimer.stop(); + drawTime += drawTimer.getTime(); + } + } - cout << "Total Generations: " << generations << endl; + cout << "Total Generations: " << generations << endl; - cout << "Average Compute Time: " << compTime / generations << " seconds" << endl; + cout << "Average Compute Time: " << compTime / generations << " seconds" << endl; - cout << "Average Draw Time: " << drawTime / generations << " seconds" << endl; + cout << "Average Draw Time: " << drawTime / generations << " seconds" << endl; - sl_done(); + sl_done(); - return 0; + return 0; } std::string get_file_contents(const char *filename) diff --git a/Task/Conways-Game-of-Life/Smalltalk/conways-game-of-life-2.st b/Task/Conways-Game-of-Life/Smalltalk/conways-game-of-life-2.st index 444c414241..2819d03b89 100644 --- a/Task/Conways-Game-of-Life/Smalltalk/conways-game-of-life-2.st +++ b/Task/Conways-Game-of-Life/Smalltalk/conways-game-of-life-2.st @@ -9,7 +9,7 @@ GameOfLife class>>withAliveCells: aCollectionOfCells ofSize: aBoardSize ^self new initializeWithAliveCells: aCollectionOfCells ofSize: aBoardSize GameOfLife class>>assertAll: aCollectionOfAliveCells areInside: aSize - | origin | + | origin | origin := 0@0. aCollectionOfAliveCells do: [:aCell | (aCell between: origin and: aSize) ifFalse: [ self error: 'Cell ', aCell printString,' out of range' ]] diff --git a/Task/Conways-Game-of-Life/Smalltalk/conways-game-of-life-4.st b/Task/Conways-Game-of-Life/Smalltalk/conways-game-of-life-4.st index aec636a5e2..dcdbda1181 100644 --- a/Task/Conways-Game-of-Life/Smalltalk/conways-game-of-life-4.st +++ b/Task/Conways-Game-of-Life/Smalltalk/conways-game-of-life-4.st @@ -12,7 +12,7 @@ GameOfLifeView class>>openFor: aGameOfLife GameOfLifeView class>>blinker ^GameOfLife withAliveCells: { 4@2. 4@3. 4@4. 3@3. 4@3. 5@3 } ofSize: 10@10 - + GameOfLifeView class>>toad ^GameOfLife withAliveCells: { 2@4. 3@4. 4@4. 3@3. 4@3. 5@3 } ofSize: 10@10 @@ -20,7 +20,7 @@ GameOfLifeView class>>openBlinker ^self openFor: self blinker GameOfLifeView class>>openToad - ^self openFor: self toad + ^self openFor: self toad initializeFor: aGameOfLife game := aGameOfLife. diff --git a/Task/Conways-Game-of-Life/Uiua/conways-game-of-life.uiua b/Task/Conways-Game-of-Life/Uiua/conways-game-of-life.uiua deleted file mode 100644 index fe9d89fede..0000000000 --- a/Task/Conways-Game-of-Life/Uiua/conways-game-of-life.uiua +++ /dev/null @@ -1,4 +0,0 @@ -Life ← ↥⊙↧∩=3⊃⋅∘⊙∘2⊸˜-/+≡↻♭₂-1⇡3_3⊸¤ -⁅×0.6 ≡₀⋅⚂ ↯⟜⊚ 50 # Init -⇌◌⍥(⟜⊂Life)300⟜¤ # Run -≡(▽⟜≡▽4) # Upscale diff --git a/Task/Conways-Game-of-Life/V-(Vlang)/conways-game-of-life.v b/Task/Conways-Game-of-Life/V-(Vlang)/conways-game-of-life.v index bb952499d4..5406961503 100644 --- a/Task/Conways-Game-of-Life/V-(Vlang)/conways-game-of-life.v +++ b/Task/Conways-Game-of-Life/V-(Vlang)/conways-game-of-life.v @@ -4,95 +4,95 @@ import time struct Field { mut: - s [][]bool - w int - h int + s [][]bool + w int + h int } fn new_field(w int, h int) Field { - s := [][]bool{len: h, init: []bool{len: w}} - return Field{s, w, h} + s := [][]bool{len: h, init: []bool{len: w}} + return Field{s, w, h} } fn (mut f Field) set(x int, y int, b bool) { - f.s[y][x] = b + f.s[y][x] = b } fn (f Field) next(x int, y int) bool { - mut on := 0 - for i := -1; i <= 1; i++ { - for j := -1; j <= 1; j++ { - if f.state(x+i, y+j) && !(j == 0 && i == 0) { - on++ - } - } - } - return on == 3 || (on == 2 && f.state(x, y)) + mut on := 0 + for i := -1; i <= 1; i++ { + for j := -1; j <= 1; j++ { + if f.state(x+i, y+j) && !(j == 0 && i == 0) { + on++ + } + } + } + return on == 3 || (on == 2 && f.state(x, y)) } fn (f Field) state(xx int, yy int) bool { - mut x, mut y := xx, yy - for y < 0 { - y += f.h - } - for x < 0 { - x += f.w - } - return f.s[y%f.h][x%f.w] + mut x, mut y := xx, yy + for y < 0 { + y += f.h + } + for x < 0 { + x += f.w + } + return f.s[y%f.h][x%f.w] } struct Life { mut: - w int - h int - a Field - b Field + w int + h int + a Field + b Field } fn new_life(w int, h int) Life { - mut a := new_field(w, h) - for _ in 0..(w * h / 2) { - a.set(rand.intn(w) or {0}, rand.intn(h) or {0}, true) - } - return Life{ - a: a, - b: new_field(w, h), - w: w - h: h, - } + mut a := new_field(w, h) + for _ in 0..(w * h / 2) { + a.set(rand.intn(w) or {0}, rand.intn(h) or {0}, true) + } + return Life{ + a: a, + b: new_field(w, h), + w: w + h: h, + } } fn (mut l Life) step() { - for y in 0..l.h { - for x in 0.. l.w { - l.b.set(x, y, l.a.next(x, y)) - } - } - l.a, l.b = l.b, l.a + for y in 0..l.h { + for x in 0.. l.w { + l.b.set(x, y, l.a.next(x, y)) + } + } + l.a, l.b = l.b, l.a } fn (l Life) str() string { - mut buf := strings.new_builder(128) - for y in 0..l.h { - for x in 0..l.w { - mut b := ' ' - if l.a.state(x, y) { - b = '*' - } - buf.write_string(b) - } - buf.write_string('\n') - } - return buf.str() + mut buf := strings.new_builder(128) + for y in 0..l.h { + for x in 0..l.w { + mut b := ' ' + if l.a.state(x, y) { + b = '*' + } + buf.write_string(b) + } + buf.write_string('\n') + } + return buf.str() } fn main() { - mut l := new_life(80, 15) - for i := 0; i < 300; i++ { - l.step() - //println("------------------------------------------------") - print('\x0c') - println(l) - time.sleep(time.second / 30) - } + mut l := new_life(80, 15) + for i := 0; i < 300; i++ { + l.step() + //println("------------------------------------------------") + print('\x0c') + println(l) + time.sleep(time.second / 30) + } } diff --git a/Task/Conways-Game-of-Life/VBScript/conways-game-of-life-1.vb b/Task/Conways-Game-of-Life/VBScript/conways-game-of-life-1.vb new file mode 100644 index 0000000000..3f97b566c7 --- /dev/null +++ b/Task/Conways-Game-of-Life/VBScript/conways-game-of-life-1.vb @@ -0,0 +1,85 @@ +option explicit +const tlcr=3, tlcc=3 +const maxdim=15 + +dim a(15,15) +dim b(15,15) +dim ans0:ans0=chr(27)&"[" +dim gen,n + +erase a +'glider +a(0,1)=true:a(1,2)=true:a(2,0)=true:a(2,1)=true:a(2,2)=true +'blinker +a(3,13)=true:a(4,13)=true:a(5,13)=true +'beacon +a(11,1)=true:a(11,2)=true: a(12,1)=true:a(12,2)=true +a(13,3)=true:a(13,4)=true: a(14,3)=true:a(14,4)=true + +gen=0 +doframe + +do + display + wscript.sleep(100) + n=newgen +loop until n=0 +display + +sub cls() wscript.StdOut.Write ans0 &"2J"&ans0 &"?25l":end sub 'hide cursor too +sub toxy(r,c,s) wscript.StdOut.Write ans0 & r & ";" & c & "f" & s :end sub +function iif(a,b,c) if a then iif=b else iif=c end if :end function + +sub doframe + dim r,c,s + const frame="@" + cls + toxy 1,tlcc-1, "Conway's Game of Life" + toxy tlcr-1,tlcc-1,string(maxdim+3,frame) + s=frame&space(maxdim+1)&frame + for r=0 to maxdim + toxy tlcr+r,tlcc-1,s + next + toxy tlcr+maxdim+1,tlcc-1,string(maxdim+3,frame) +end sub + +sub display +dim r,c +const pix="#" +for r=0 to maxdim + for c=0 to maxdim + toxy tlcr+r,tlcc+c,iif (a(r,c),pix," ") + next +next +toxy tlcr+maxdim+2,tlcc-1,gen & " " & n +toxy tlcr+maxdim+3,tlcc-1,"" +gen=gen+1 +end sub + +function newgen + dim r,c,cnt,cp,cm,rp,rm + for r=0 to maxdim + for c=0 to maxdim + cp=(c+1) and maxdim 'wrap around + cm=(c-1) and maxdim + rp=(r+1) and maxdim + rm=(r-1) and maxdim + cnt=0 + cnt=- a(rp,cp) - a(rp,c) - a(rp,cm) 'true =-1 + cnt=cnt- a(r,cp)- a(r,cm) + cnt=cnt- a(rm,cp)- a(rm,c) - a(rm,cm) + + if a(r,c) then + b(r,c)=iif (cnt=2 or cnt=3,true,false) + else + b(r,c)=iif (cnt=3,true,false) + end if + next + next + for r=0 to maxdim + for c=0 to maxdim + a(r,c)=b(r,c) + newgen=newgen- b(r,c) + next + next +end function diff --git a/Task/Conways-Game-of-Life/VBScript/conways-game-of-life-1.vbs b/Task/Conways-Game-of-Life/VBScript/conways-game-of-life-1.vbs deleted file mode 100644 index 66315d235d..0000000000 --- a/Task/Conways-Game-of-Life/VBScript/conways-game-of-life-1.vbs +++ /dev/null @@ -1,85 +0,0 @@ -option explicit -const tlcr=3, tlcc=3 -const maxdim=15 - -dim a(15,15) -dim b(15,15) -dim ans0:ans0=chr(27)&"[" -dim gen,n - -erase a -'glider -a(0,1)=true:a(1,2)=true:a(2,0)=true:a(2,1)=true:a(2,2)=true -'blinker -a(3,13)=true:a(4,13)=true:a(5,13)=true -'beacon -a(11,1)=true:a(11,2)=true: a(12,1)=true:a(12,2)=true -a(13,3)=true:a(13,4)=true: a(14,3)=true:a(14,4)=true - -gen=0 -doframe - -do - display - wscript.sleep(100) - n=newgen -loop until n=0 -display - -sub cls() wscript.StdOut.Write ans0 &"2J"&ans0 &"?25l":end sub 'hide cursor too -sub toxy(r,c,s) wscript.StdOut.Write ans0 & r & ";" & c & "f" & s :end sub -function iif(a,b,c) if a then iif=b else iif=c end if :end function - -sub doframe - dim r,c,s - const frame="@" - cls - toxy 1,tlcc-1, "Conway's Game of Life" - toxy tlcr-1,tlcc-1,string(maxdim+3,frame) - s=frame&space(maxdim+1)&frame - for r=0 to maxdim - toxy tlcr+r,tlcc-1,s - next - toxy tlcr+maxdim+1,tlcc-1,string(maxdim+3,frame) -end sub - -sub display -dim r,c -const pix="#" -for r=0 to maxdim - for c=0 to maxdim - toxy tlcr+r,tlcc+c,iif (a(r,c),pix," ") - next -next -toxy tlcr+maxdim+2,tlcc-1,gen & " " & n -toxy tlcr+maxdim+3,tlcc-1,"" -gen=gen+1 -end sub - -function newgen - dim r,c,cnt,cp,cm,rp,rm - for r=0 to maxdim - for c=0 to maxdim - cp=(c+1) and maxdim 'wrap around - cm=(c-1) and maxdim - rp=(r+1) and maxdim - rm=(r-1) and maxdim - cnt=0 - cnt=- a(rp,cp) - a(rp,c) - a(rp,cm) 'true =-1 - cnt=cnt- a(r,cp)- a(r,cm) - cnt=cnt- a(rm,cp)- a(rm,c) - a(rm,cm) - - if a(r,c) then - b(r,c)=iif (cnt=2 or cnt=3,true,false) - else - b(r,c)=iif (cnt=3,true,false) - end if - next - next - for r=0 to maxdim - for c=0 to maxdim - a(r,c)=b(r,c) - newgen=newgen- b(r,c) - next - next -end function diff --git a/Task/Conways-Game-of-Life/VBScript/conways-game-of-life-2.vbs b/Task/Conways-Game-of-Life/VBScript/conways-game-of-life-2.vb similarity index 100% rename from Task/Conways-Game-of-Life/VBScript/conways-game-of-life-2.vbs rename to Task/Conways-Game-of-Life/VBScript/conways-game-of-life-2.vb diff --git a/Task/Conways-Game-of-Life/Vedit-macro-language/conways-game-of-life.vedit b/Task/Conways-Game-of-Life/Vedit-macro-language/conways-game-of-life.vedit index 069dd75cfb..c1f5784b3a 100644 --- a/Task/Conways-Game-of-Life/Vedit-macro-language/conways-game-of-life.vedit +++ b/Task/Conways-Game-of-Life/Vedit-macro-language/conways-game-of-life.vedit @@ -3,7 +3,7 @@ IT(".O.") IN IT(".O.") IN IT(".O.") -#9 = 2 // number of generations to calculate +#9 = 2 // number of generations to calculate #10 = Cur_Line #11 = Cur_Col-1 for (#2 = 1; #2 <= #9; #2++) { @@ -20,24 +20,24 @@ Return :calculate: Goto_Line(2) While (At_EOF == 0) { - Search("|A",ERRBREAK) // find next living cell + Search("|A",ERRBREAK) // find next living cell #3 = Cur_Line #4 = #7 = #8 = Cur_Col - if (#4 > 1) { // increment cell at left + if (#4 > 1) { // increment cell at left #7 = #4-1 Goto_Col(#7) Ins_Char(Cur_Char+1,OVERWRITE) } - if (#4 < #11) { // increment cell at right + if (#4 < #11) { // increment cell at right #8 = #4+1 Goto_Col(#8) Ins_Char(Cur_Char+1,OVERWRITE) } - if (#3 > 2) { // increment 3 cells above + if (#3 > 2) { // increment 3 cells above Goto_Line(#3-1) Call("inc_3") } - if (#3 < #10) { // increment 3 cells below + if (#3 < #10) { // increment 3 cells below Goto_Line(#3+1) Call("inc_3") } @@ -45,7 +45,7 @@ While (At_EOF == 0) { Goto_Col(#4+1) } -Replace("[1QR]", "O", REGEXP+BEGIN+ALL) // these cells alive +Replace("[1QR]", "O", REGEXP+BEGIN+ALL) // these cells alive Replace("[/-7P-X]", ".", REGEXP+BEGIN+ALL) // these cells dead Return diff --git a/Task/Conways-Game-of-Life/YAMLScript/conways-game-of-life.ys b/Task/Conways-Game-of-Life/YAMLScript/conways-game-of-life.ys deleted file mode 100644 index ae2f9357d5..0000000000 --- a/Task/Conways-Game-of-Life/YAMLScript/conways-game-of-life.ys +++ /dev/null @@ -1,42 +0,0 @@ -!YS-v0 - -glider =: \{[1 0] [2 1] [0 2] [1 2] [2 2]} -blinker =: \{[1 2] [2 2] [3 2]} - -defn main(): - game-of-life 10 40: glider - -defn game-of-life(size steps cells): - loop s steps, cells cells: - shell:: clear - print-world: cells size - sleep: 0.25 - when 0 < s: - recur s.--: step(cells) - -defn print-world: - (cells): - print-world: cells 10 - - (cells size): - each y (0 .. size): - row =: - join: - for x (0 .. size): - cells([x y]).if('* ' ' ') - say: "| $row|" - -defn step(cells): - set: - ? for [cell count] - neighborhood.mapcat(cells):frequencies - :when ((3 == count) || - ((2 == count) && - cell.in?(cells))) - : cell - -defn neighborhood([x y]): - ? for dx [-1 0 1] - dy [-1 0 1] - :when [dx dy].ne([0 0]) - : vector: (x + dx) (y + dy) diff --git a/Task/Conways-Game-of-Life/Zig/conways-game-of-life.zig b/Task/Conways-Game-of-Life/Zig/conways-game-of-life.zig deleted file mode 100644 index 524afe1ece..0000000000 --- a/Task/Conways-Game-of-Life/Zig/conways-game-of-life.zig +++ /dev/null @@ -1,85 +0,0 @@ -const std = @import("std"); -const mem = std.mem; - -pub fn main() !void { - // ---------------------------- pseudo random number generator - var prng = std.Random.DefaultPrng.init(blk: { - var seed: u64 = undefined; - std.posix.getrandom(mem.asBytes(&seed)) catch unreachable; - break :blk seed; - }); - const random = prng.random(); - // ---------------------------------------------------------- - const stdout = std.io.getStdOut(); - var bw = std.io.bufferedWriter(stdout.writer()); - const writer = bw.writer(); - // ---------------------------------------------------------- - var life = Life(80, 15).init(random); - for (0..300) |_| { - life.step(); - try writer.writeByte('\x0c'); - try writer.print("{}", .{life}); - try bw.flush(); - std.time.sleep(comptime (1_000_000_000 / 30)); // 1/30th second - } -} -fn Life(comptime w: usize, comptime h: usize) type { - return struct { - const Self = @This(); - a: Field(w, h), - b: Field(w, h), - - fn init(random: std.Random) Self { - var life = Self{ - .a = Field(w, h).init(), - .b = Field(w, h).init(), - }; - for (0..w * h / 2) |_| { - const x = random.uintLessThan(usize, w); - const y = random.uintLessThan(usize, h); - life.a.set(x, y, true); - } - return life; - } - fn step(self: *Self) void { - for (0..h) |y| - for (0..w) |x| - self.b.set(x, y, self.a.next(x, y)); - mem.swap(Field(w, h), &self.a, &self.b); - } - pub fn format(self: *const Self, comptime _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void { - for (0..h) |y| { - for (0..w) |x| - try writer.writeByte(if (self.a.state(x, y)) '*' else ' '); - try writer.writeByte('\n'); - } - } - }; -} -fn Field(comptime w: usize, comptime h: usize) type { - return struct { - const Self = @This(); - s: std.StaticBitSet(w * h), - - fn init() Self { - return .{ .s = std.StaticBitSet(w * h).initEmpty() }; - } - fn set(self: *Self, x: usize, y: usize, b: bool) void { - self.s.setValue(y * w + x, b); - } - fn next(self: *const Self, x_: usize, y_: usize) bool { - var on: usize = 0; - // Use wraparound arithmetic, i.e. -% - inline for ([3]usize{ x_ -% 1, x_, x_ + 1 }) |x| - inline for ([3]usize{ y_ -% 1, y_, y_ + 1 }) |y| - if (self.state(x, y)) { - on += 1; - }; - return on == 3 or on == 2 and self.state(x_, y_); - } - fn state(self: *const Self, x: usize, y: usize) bool { - if (x >= w or y >= h) return false; - return self.s.isSet(y * w + x); - } - }; -} diff --git a/Task/Conways-Game-of-Life/Zkl/conways-game-of-life-1.zkl b/Task/Conways-Game-of-Life/Zkl/conways-game-of-life-1.zkl index 73b0d9723d..da3f4350f4 100644 --- a/Task/Conways-Game-of-Life/Zkl/conways-game-of-life-1.zkl +++ b/Task/Conways-Game-of-Life/Zkl/conways-game-of-life-1.zkl @@ -3,7 +3,7 @@ class Life{ var N=n, cells=Data(n*n), tmp=Data(n*n), ds=T(T(-1,-1),T(-1,0),T(-1,1), T(0,-1),T(0,1), T(1,-1),T(1,0),T(1,1)); icells:=vm.arglist[1,*]; - (N*N).pump(Void,cells.append.fpM("1-",0)); // clear board + (N*N).pump(Void,cells.append.fpM("1-",0)); // clear board icells.pump(Void,Void.Read,fcn(row,col){ cells[row*N+col]=1 }); } fcn get(row,col){ diff --git a/Task/Conways-Game-of-Life/Zkl/conways-game-of-life-2.zkl b/Task/Conways-Game-of-Life/Zkl/conways-game-of-life-2.zkl index ca7561ab4d..7d59e7b5c2 100644 --- a/Task/Conways-Game-of-Life/Zkl/conways-game-of-life-2.zkl +++ b/Task/Conways-Game-of-Life/Zkl/conways-game-of-life-2.zkl @@ -1,4 +1,4 @@ -cells:=Life(4, 0,1, 1,1, 2,1); // blinker +cells:=Life(4, 0,1, 1,1, 2,1); // blinker do(3){ cells.println("="*4); cells.cycle(); } cells:=Life(30, 0,1, 1,2, 2,0, 2,1, 2,2); // glider diff --git a/Task/Copy-a-string/68000-Assembly/copy-a-string-2.68000 b/Task/Copy-a-string/68000-Assembly/copy-a-string-2.68000 index 10041191cb..7f91645c39 100644 --- a/Task/Copy-a-string/68000-Assembly/copy-a-string-2.68000 +++ b/Task/Copy-a-string/68000-Assembly/copy-a-string-2.68000 @@ -7,7 +7,10 @@ LEA myString,A3 LEA StringRam,A4 CopyString: -MOVE.B (A3)+,(A4)+ ;Copy one byte. -BNE CopyString ;Not zero, do more bytes. +MOVE.B (A3)+,D0 +MOVE.B D0,(A4)+ ;we could have used "MOVE.B (A3)+,(A4)+" but this makes it easier to check for the terminator. +BEQ Terminated +BRA CopyString +Terminated: ;the null terminator is already stored along with the string itself, so we are done. ;program ends here. diff --git a/Task/Copy-a-string/ALGOL-W/copy-a-string.alg b/Task/Copy-a-string/ALGOL-W/copy-a-string.alg new file mode 100644 index 0000000000..24bae16956 --- /dev/null +++ b/Task/Copy-a-string/ALGOL-W/copy-a-string.alg @@ -0,0 +1,9 @@ +begin + % strings are (fixed length) values in algol W. Assignment makes a copy % + string(10) a, copyOfA; + a := "some text"; + copyOfA := a; + % assignment to a will not change copyOfA % + a := "new value"; + write( a, copyOfA ) +end. diff --git a/Task/Copy-a-string/Ada/copy-a-string-1.adb b/Task/Copy-a-string/Ada/copy-a-string-1.ada similarity index 100% rename from Task/Copy-a-string/Ada/copy-a-string-1.adb rename to Task/Copy-a-string/Ada/copy-a-string-1.ada diff --git a/Task/Copy-a-string/Ada/copy-a-string-2.adb b/Task/Copy-a-string/Ada/copy-a-string-2.ada similarity index 100% rename from Task/Copy-a-string/Ada/copy-a-string-2.adb rename to Task/Copy-a-string/Ada/copy-a-string-2.ada diff --git a/Task/Copy-a-string/Ada/copy-a-string-3.adb b/Task/Copy-a-string/Ada/copy-a-string-3.ada similarity index 100% rename from Task/Copy-a-string/Ada/copy-a-string-3.adb rename to Task/Copy-a-string/Ada/copy-a-string-3.ada diff --git a/Task/Copy-a-string/Ada/copy-a-string-4.adb b/Task/Copy-a-string/Ada/copy-a-string-4.ada similarity index 100% rename from Task/Copy-a-string/Ada/copy-a-string-4.adb rename to Task/Copy-a-string/Ada/copy-a-string-4.ada diff --git a/Task/Copy-a-string/ArkScript/copy-a-string.ark b/Task/Copy-a-string/ArkScript/copy-a-string.ark deleted file mode 100644 index 4ceafe0b2d..0000000000 --- a/Task/Copy-a-string/ArkScript/copy-a-string.ark +++ /dev/null @@ -1,7 +0,0 @@ -(mut str "hello world") -(mut copy str) - -(set copy "clone destroyed") - -(print str) -(print copy) diff --git a/Task/Copy-a-string/Arturo/copy-a-string.arturo b/Task/Copy-a-string/Arturo/copy-a-string.arturo index 0001140d7d..41cb6efd44 100644 --- a/Task/Copy-a-string/Arturo/copy-a-string.arturo +++ b/Task/Copy-a-string/Arturo/copy-a-string.arturo @@ -1,4 +1,4 @@ -a: "Hello" +a: new "Hello" b: a ; reference the same string ; changing one string in-place diff --git a/Task/Copy-a-string/AutoIt/copy-a-string.au3 b/Task/Copy-a-string/AutoIt/copy-a-string.autoit similarity index 100% rename from Task/Copy-a-string/AutoIt/copy-a-string.au3 rename to Task/Copy-a-string/AutoIt/copy-a-string.autoit diff --git a/Task/Copy-a-string/Applesoft-BASIC/copy-a-string-4.basic b/Task/Copy-a-string/BaCon/copy-a-string-1.bacon similarity index 100% rename from Task/Copy-a-string/Applesoft-BASIC/copy-a-string-4.basic rename to Task/Copy-a-string/BaCon/copy-a-string-1.bacon diff --git a/Task/Copy-a-string/Applesoft-BASIC/copy-a-string-5.basic b/Task/Copy-a-string/BaCon/copy-a-string-2.bacon similarity index 100% rename from Task/Copy-a-string/Applesoft-BASIC/copy-a-string-5.basic rename to Task/Copy-a-string/BaCon/copy-a-string-2.bacon diff --git a/Task/Copy-a-string/Ballerina/copy-a-string.ballerina b/Task/Copy-a-string/Ballerina/copy-a-string.ballerina deleted file mode 100644 index ed5f916660..0000000000 --- a/Task/Copy-a-string/Ballerina/copy-a-string.ballerina +++ /dev/null @@ -1,7 +0,0 @@ -import ballerina/io; - -public function main() { - string s = "ballerina"; - string t = s; - io:println(`Are s and t equal? ${t == s}`); -} diff --git a/Task/Copy-a-string/COBOL/copy-a-string.cob b/Task/Copy-a-string/COBOL/copy-a-string.cobol similarity index 100% rename from Task/Copy-a-string/COBOL/copy-a-string.cob rename to Task/Copy-a-string/COBOL/copy-a-string.cobol diff --git a/Task/Copy-a-string/Crystal/copy-a-string.cr b/Task/Copy-a-string/Crystal/copy-a-string.crystal similarity index 100% rename from Task/Copy-a-string/Crystal/copy-a-string.cr rename to Task/Copy-a-string/Crystal/copy-a-string.crystal diff --git a/Task/Copy-a-string/Delphi/copy-a-string.pas b/Task/Copy-a-string/Delphi/copy-a-string.delphi similarity index 100% rename from Task/Copy-a-string/Delphi/copy-a-string.pas rename to Task/Copy-a-string/Delphi/copy-a-string.delphi diff --git a/Task/Copy-a-string/DuckDB/copy-a-string.duckdb b/Task/Copy-a-string/DuckDB/copy-a-string.duckdb deleted file mode 100644 index b039bd2ade..0000000000 --- a/Task/Copy-a-string/DuckDB/copy-a-string.duckdb +++ /dev/null @@ -1,40 +0,0 @@ -D create or replace table t as (select 'This is a string' as s); - -D from t; -┌──────────────────┐ -│ s │ -│ varchar │ -├──────────────────┤ -│ This is a string │ -└──────────────────┘ - -# Now make two copies. -D create or replace table tt as (select s as s1, s as s2 from t); - -D from tt; -┌──────────────────┬──────────────────┐ -│ s1 │ s2 │ -│ varchar │ varchar │ -├──────────────────┼──────────────────┤ -│ This is a string │ This is a string │ -└──────────────────┴──────────────────┘ - -# Change s2 and then verify that s1 is unaltered -D UPDATE tt SET s2 = s2[1]; - -D from tt; -┌──────────────────┬─────────┐ -│ s1 │ s2 │ -│ varchar │ varchar │ -├──────────────────┼─────────┤ -│ This is a string │ T │ -└──────────────────┴─────────┘ - -# Check that s and s1 are also still equal -D select s = s1 from t positional join tt; -┌──────────┐ -│ (s = s1) │ -│ boolean │ -├──────────┤ -│ true │ -└──────────┘ diff --git a/Task/Copy-a-string/EMal/copy-a-string.emal b/Task/Copy-a-string/EMal/copy-a-string.emal index 81e78bf2e8..c7d403d343 100644 --- a/Task/Copy-a-string/EMal/copy-a-string.emal +++ b/Task/Copy-a-string/EMal/copy-a-string.emal @@ -1,10 +1,11 @@ -^|in EMal strings are mutable|^ -text original ← "Yellow world" -text ref ← original # copying the reference -text copied ← *original # copying the content -original[0] ← "H" # texts are indexable and mutable -original[5] ← "," +text original = "Yellow world" +text ref = original # copying the reference +text copied = *original # copying the content +original[0] = "H" # texts are indexable and mutable +original[5] = "," ref.append("!") # texts are coercible and growable copied += "?" -writeLine(original æ ref and original æ "Hello, world!") -writeLine(copied æ "Yellow world?") +^| + | original == ref == "Hello, world!" + | copied == "Yellow world?" + |^ diff --git a/Task/Copy-a-string/EasyLang/copy-a-string.easy b/Task/Copy-a-string/EasyLang/copy-a-string.easy index 17fa4c005b..dbe2fe3be1 100644 --- a/Task/Copy-a-string/EasyLang/copy-a-string.easy +++ b/Task/Copy-a-string/EasyLang/copy-a-string.easy @@ -1,5 +1,3 @@ a$ = "hello" b$ = a$ -a$ &= " a" -print a$ print b$ diff --git a/Task/Copy-a-string/Ed/copy-a-string.ed b/Task/Copy-a-string/Ed/copy-a-string.ed deleted file mode 100644 index a2732d422d..0000000000 --- a/Task/Copy-a-string/Ed/copy-a-string.ed +++ /dev/null @@ -1 +0,0 @@ -,t diff --git a/Task/Copy-a-string/Elixir/copy-a-string.ex b/Task/Copy-a-string/Elixir/copy-a-string.elixir similarity index 100% rename from Task/Copy-a-string/Elixir/copy-a-string.ex rename to Task/Copy-a-string/Elixir/copy-a-string.elixir diff --git a/Task/Copy-a-string/Emacs-Lisp/copy-a-string.el b/Task/Copy-a-string/Emacs-Lisp/copy-a-string.l similarity index 100% rename from Task/Copy-a-string/Emacs-Lisp/copy-a-string.el rename to Task/Copy-a-string/Emacs-Lisp/copy-a-string.l diff --git a/Task/Copy-a-string/Euphoria/copy-a-string.eu b/Task/Copy-a-string/Euphoria/copy-a-string.euphoria similarity index 100% rename from Task/Copy-a-string/Euphoria/copy-a-string.eu rename to Task/Copy-a-string/Euphoria/copy-a-string.euphoria diff --git a/Task/Copy-a-string/Extended-Color-BASIC/copy-a-string.basic b/Task/Copy-a-string/Extended-Color-BASIC/copy-a-string.basic deleted file mode 100644 index 5f6527cb7a..0000000000 --- a/Task/Copy-a-string/Extended-Color-BASIC/copy-a-string.basic +++ /dev/null @@ -1,7 +0,0 @@ -10 A$ = "HELLO" -20 REM COPY CONTENTS OF A$ TO B$ -30 B$ = A$ -40 REM CHANGE CONTENTS OF A$ -50 A$ = "WORLD" -60 REM DISPLAY CONTENTS -70 PRINT A$, B$ diff --git a/Task/Copy-a-string/Gleam/copy-a-string.gleam b/Task/Copy-a-string/Gleam/copy-a-string.gleam deleted file mode 100644 index cfe412774e..0000000000 --- a/Task/Copy-a-string/Gleam/copy-a-string.gleam +++ /dev/null @@ -1,2 +0,0 @@ -let src = "Hello" -let dest = src diff --git a/Task/Copy-a-string/Julia/copy-a-string.jl b/Task/Copy-a-string/Julia/copy-a-string.julia similarity index 100% rename from Task/Copy-a-string/Julia/copy-a-string.jl rename to Task/Copy-a-string/Julia/copy-a-string.julia diff --git a/Task/Copy-a-string/Kotlin/copy-a-string.kts b/Task/Copy-a-string/Kotlin/copy-a-string.kotlin similarity index 100% rename from Task/Copy-a-string/Kotlin/copy-a-string.kts rename to Task/Copy-a-string/Kotlin/copy-a-string.kotlin diff --git a/Task/Copy-a-string/LOLCODE/copy-a-string.lol b/Task/Copy-a-string/LOLCODE/copy-a-string.lol deleted file mode 100644 index eaa7cf013b..0000000000 --- a/Task/Copy-a-string/LOLCODE/copy-a-string.lol +++ /dev/null @@ -1,10 +0,0 @@ -HAI 1.3 - - I HAS A FRANK ITZ "Hello," - I HAS A PAUL ITZ "World!" - VISIBLE FRANK " " PAUL - - FRANK R PAUL - VISIBLE FRANK " " PAUL - -KTHXBYE diff --git a/Task/Copy-a-string/OCaml/copy-a-string-1.ml b/Task/Copy-a-string/OCaml/copy-a-string-1.ocaml similarity index 100% rename from Task/Copy-a-string/OCaml/copy-a-string-1.ml rename to Task/Copy-a-string/OCaml/copy-a-string-1.ocaml diff --git a/Task/Copy-a-string/OCaml/copy-a-string-2.ml b/Task/Copy-a-string/OCaml/copy-a-string-2.ocaml similarity index 100% rename from Task/Copy-a-string/OCaml/copy-a-string-2.ml rename to Task/Copy-a-string/OCaml/copy-a-string-2.ocaml diff --git a/Task/Copy-a-string/OCaml/copy-a-string-3.ml b/Task/Copy-a-string/OCaml/copy-a-string-3.ocaml similarity index 100% rename from Task/Copy-a-string/OCaml/copy-a-string-3.ml rename to Task/Copy-a-string/OCaml/copy-a-string-3.ocaml diff --git a/Task/Copy-a-string/OCaml/copy-a-string-4.ml b/Task/Copy-a-string/OCaml/copy-a-string-4.ocaml similarity index 100% rename from Task/Copy-a-string/OCaml/copy-a-string-4.ml rename to Task/Copy-a-string/OCaml/copy-a-string-4.ocaml diff --git a/Task/Copy-a-string/OPL/copy-a-string.opl b/Task/Copy-a-string/OPL/copy-a-string.opl deleted file mode 100644 index db34e40a63..0000000000 --- a/Task/Copy-a-string/OPL/copy-a-string.opl +++ /dev/null @@ -1,8 +0,0 @@ -PROC main: - LOCAL src$(6),dst$(5) - src$="Hello" - dst$=src$ - src$="world!" - PRINT dst$,src$ - GET -ENDP diff --git a/Task/Copy-a-string/PascalABC.NET/copy-a-string.pas b/Task/Copy-a-string/PascalABC.NET/copy-a-string.pas deleted file mode 100644 index 92afc0925c..0000000000 --- a/Task/Copy-a-string/PascalABC.NET/copy-a-string.pas +++ /dev/null @@ -1,4 +0,0 @@ -begin - var s: string := 'Hello'; - var s1 := s; -end. diff --git a/Task/Copy-a-string/PowerShell/copy-a-string-1.ps1 b/Task/Copy-a-string/PowerShell/copy-a-string-1.psh similarity index 100% rename from Task/Copy-a-string/PowerShell/copy-a-string-1.ps1 rename to Task/Copy-a-string/PowerShell/copy-a-string-1.psh diff --git a/Task/Copy-a-string/PowerShell/copy-a-string-2.ps1 b/Task/Copy-a-string/PowerShell/copy-a-string-2.psh similarity index 100% rename from Task/Copy-a-string/PowerShell/copy-a-string-2.ps1 rename to Task/Copy-a-string/PowerShell/copy-a-string-2.psh diff --git a/Task/Copy-a-string/Rebol/copy-a-string.rebol b/Task/Copy-a-string/REBOL/copy-a-string.rebol similarity index 98% rename from Task/Copy-a-string/Rebol/copy-a-string.rebol rename to Task/Copy-a-string/REBOL/copy-a-string.rebol index 02d96fc778..07ad9d7e8b 100644 --- a/Task/Copy-a-string/Rebol/copy-a-string.rebol +++ b/Task/Copy-a-string/REBOL/copy-a-string.rebol @@ -1,4 +1,4 @@ -Rebol [ +REBOL [ Title: "String Copy" URL: http://rosettacode.org/wiki/Copy_a_string ] diff --git a/Task/Copy-a-string/REXX/copy-a-string.rexx b/Task/Copy-a-string/REXX/copy-a-string.rexx index 9db0cf1336..6d7223de5c 100644 --- a/Task/Copy-a-string/REXX/copy-a-string.rexx +++ b/Task/Copy-a-string/REXX/copy-a-string.rexx @@ -1,16 +1,2 @@ --- 8 Nov 2025 -include Setting - -say 'COPY A STRING' -say version -say -say 'Just assign the string variable to a new one.' -a='This is a string.' -b=a -say a b -c="This is also a string." -d=c -say d c -exit - -include Abend +src = "this is a string" +dst = src diff --git a/Task/Copy-a-string/Rust/copy-a-string-1.rs b/Task/Copy-a-string/Rust/copy-a-string-1.rust similarity index 100% rename from Task/Copy-a-string/Rust/copy-a-string-1.rs rename to Task/Copy-a-string/Rust/copy-a-string-1.rust diff --git a/Task/Copy-a-string/Rust/copy-a-string-2.rs b/Task/Copy-a-string/Rust/copy-a-string-2.rust similarity index 100% rename from Task/Copy-a-string/Rust/copy-a-string-2.rs rename to Task/Copy-a-string/Rust/copy-a-string-2.rust diff --git a/Task/Copy-a-string/Rye/copy-a-string.rye b/Task/Copy-a-string/Rye/copy-a-string.rye deleted file mode 100644 index 39ec8eac96..0000000000 --- a/Task/Copy-a-string/Rye/copy-a-string.rye +++ /dev/null @@ -1,8 +0,0 @@ -str:: "Hello" -;Returns [String: Hello] -str2:: str -;Returns [String: Hello] -str:: "World" -;Returns [String: World] -str2 -;Returns [String: Hello] diff --git a/Task/Copy-a-string/S-BASIC/copy-a-string.basic b/Task/Copy-a-string/S-BASIC/copy-a-string.basic deleted file mode 100644 index 81d04da265..0000000000 --- a/Task/Copy-a-string/S-BASIC/copy-a-string.basic +++ /dev/null @@ -1,23 +0,0 @@ -var original, copy = string -based referenced = string -var strloc = integer - -rem - position referenced string on top of original string -location var strloc = original -base referenced at strloc - -original = "Hello, World" -copy = original - -print "Original : ", original -print "Copy : ", copy -print "Referenced: ", referenced -print - -original = "Goodbye, World" - -print "Original : ", original rem - changed -print "Copy : ", copy rem - unchanged -print "Referenced: ", referenced rem - changed - -end diff --git a/Task/Copy-a-string/Scheme/copy-a-string.scm b/Task/Copy-a-string/Scheme/copy-a-string.ss similarity index 100% rename from Task/Copy-a-string/Scheme/copy-a-string.scm rename to Task/Copy-a-string/Scheme/copy-a-string.ss diff --git a/Task/Copy-a-string/TAV/copy-a-string.tav b/Task/Copy-a-string/TAV/copy-a-string.tav deleted file mode 100644 index c885d727e1..0000000000 --- a/Task/Copy-a-string/TAV/copy-a-string.tav +++ /dev/null @@ -1,6 +0,0 @@ - s =: "hello" - print s.Usecount - t =: s \ reference copy - print s.Usecount - u =: string (s _ 'x') clip upto -2 - print (quote u), u.Usecount, s.Usecount diff --git a/Task/Copy-a-string/Tcl/copy-a-string-2.tcl b/Task/Copy-a-string/Tcl/copy-a-string-2.tcl deleted file mode 100644 index 2b6c1980c5..0000000000 --- a/Task/Copy-a-string/Tcl/copy-a-string-2.tcl +++ /dev/null @@ -1,28 +0,0 @@ -set A "a string" - -set B $A ; # B is a reference to the string - -Set C "$A" ; # a new string is created - -set D "This is $C" ; # the string bound to C is copied into a new string. - - -# the append command is internally optimized -# for adding to the end of a string or list -# as is string index for returning a letter - -# reverse a string -proc reverse {s} { - set len [string length $s] - set r "" - for { set i $len} { $i >= 0} {incr i -1} { - append r [string index $s $i] - } - return $r -} - -set a 12345 - -set b [reverse $a] - -puts stdout "b: $b" diff --git a/Task/Copy-a-string/Tcl/copy-a-string-3.tcl b/Task/Copy-a-string/Tcl/copy-a-string-3.tcl deleted file mode 100644 index cfbdcf9402..0000000000 --- a/Task/Copy-a-string/Tcl/copy-a-string-3.tcl +++ /dev/null @@ -1,4 +0,0 @@ -# replace substrings in a string - -set rep [string map {"apple" "orange"} "I like apples."] -puts stdout $rep diff --git a/Task/Copy-a-string/Tcl/copy-a-string-1.tcl b/Task/Copy-a-string/Tcl/copy-a-string.tcl similarity index 100% rename from Task/Copy-a-string/Tcl/copy-a-string-1.tcl rename to Task/Copy-a-string/Tcl/copy-a-string.tcl diff --git a/Task/Copy-a-string/Uiua/copy-a-string.uiua b/Task/Copy-a-string/Uiua/copy-a-string.uiua deleted file mode 100644 index be6db2389c..0000000000 --- a/Task/Copy-a-string/Uiua/copy-a-string.uiua +++ /dev/null @@ -1,2 +0,0 @@ -."hello" -first diff --git a/Task/Copy-a-string/Uxntal/copy-a-string.uxnatl b/Task/Copy-a-string/Uxntal/copy-a-string.uxnatl deleted file mode 100644 index 0b7adb7b1a..0000000000 --- a/Task/Copy-a-string/Uxntal/copy-a-string.uxnatl +++ /dev/null @@ -1,25 +0,0 @@ -%\n { 0a } %\0 { 00 } - -|18 @Console/write - -|100 - -;str2 ;str1 copy-str -;str2 print-str - -BRK - -@copy/str ( dest* src* -: ) - STH2 - &loop - LDAkr STH2k STAr INC2 LDAkr STHr INC2r ?/loop - POP2 POP2r - JMP2r - -@print/str_ ( str* -: ) - LDAk .Console/write DEO - INC2 @print/str LDAk ?/str_ - POP2 JMP2r - -@str1 "Uxntal \n \0 -@str2 diff --git a/Task/Copy-stdin-to-stdout/Ada/copy-stdin-to-stdout.adb b/Task/Copy-stdin-to-stdout/Ada/copy-stdin-to-stdout.ada similarity index 100% rename from Task/Copy-stdin-to-stdout/Ada/copy-stdin-to-stdout.adb rename to Task/Copy-stdin-to-stdout/Ada/copy-stdin-to-stdout.ada diff --git a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-1.bat b/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-1.bat deleted file mode 100644 index c395545bf5..0000000000 --- a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-1.bat +++ /dev/null @@ -1 +0,0 @@ -findstr ^^ diff --git a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-2.bat b/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-2.bat deleted file mode 100644 index 4993fe87a3..0000000000 --- a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-2.bat +++ /dev/null @@ -1 +0,0 @@ -findstr "^" diff --git a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-3.bat b/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-3.bat deleted file mode 100644 index b4d82224f4..0000000000 --- a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-3.bat +++ /dev/null @@ -1 +0,0 @@ -findstr $ diff --git a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-4.bat b/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-4.bat deleted file mode 100644 index e45275e17e..0000000000 --- a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-4.bat +++ /dev/null @@ -1 +0,0 @@ -find/v "" diff --git a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-5.bat b/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-5.bat deleted file mode 100644 index ef49dd86a6..0000000000 --- a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-5.bat +++ /dev/null @@ -1 +0,0 @@ -more diff --git a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-6.bat b/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-6.bat deleted file mode 100644 index 6482121afa..0000000000 --- a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-6.bat +++ /dev/null @@ -1 +0,0 @@ -copy con[:] con[:] diff --git a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-7.bat b/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-7.bat deleted file mode 100644 index bd13d6aad4..0000000000 --- a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-7.bat +++ /dev/null @@ -1 +0,0 @@ -type con[:] diff --git a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-8.bat b/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-8.bat deleted file mode 100644 index 2cc3128981..0000000000 --- a/Task/Copy-stdin-to-stdout/Batch-File/copy-stdin-to-stdout-8.bat +++ /dev/null @@ -1,2 +0,0 @@ -@setlocal enabledelayedexpansion -@ -int main() { - int c; - while ((c = getchar()) != EOF) { +int main(){ + char c; + while ( (c=getchar()) != EOF ){ putchar(c); } return 0; diff --git a/Task/Copy-stdin-to-stdout/Crystal/copy-stdin-to-stdout.cr b/Task/Copy-stdin-to-stdout/Crystal/copy-stdin-to-stdout.crystal similarity index 100% rename from Task/Copy-stdin-to-stdout/Crystal/copy-stdin-to-stdout.cr rename to Task/Copy-stdin-to-stdout/Crystal/copy-stdin-to-stdout.crystal diff --git a/Task/Copy-stdin-to-stdout/Fortran/copy-stdin-to-stdout-1.f b/Task/Copy-stdin-to-stdout/Fortran/copy-stdin-to-stdout-1.f deleted file mode 100644 index 892373388e..0000000000 --- a/Task/Copy-stdin-to-stdout/Fortran/copy-stdin-to-stdout-1.f +++ /dev/null @@ -1,20 +0,0 @@ -! Copy stdin to stdout -! tested with GNU Fortran (Ubuntu 15.2.0-4ubuntu4) 15.2.0 on Kubuntu 25.10 -! uses non-standard function fget and gput, both are available in gfortran only. -! ------------------------------------------------------------------------------------------ -! -program cp - -implicit none - -character :: c ! The chcaracter to read -integer :: ios ! IO Status - - -do - ios = fget (c) ! gfortran only - if (ios .ne. 0) exit - call fput(c) ! gfortran only -end do - -end program cp diff --git a/Task/Copy-stdin-to-stdout/Fortran/copy-stdin-to-stdout-2.f b/Task/Copy-stdin-to-stdout/Fortran/copy-stdin-to-stdout-2.f deleted file mode 100644 index 8a0d0d80df..0000000000 --- a/Task/Copy-stdin-to-stdout/Fortran/copy-stdin-to-stdout-2.f +++ /dev/null @@ -1,20 +0,0 @@ -! Copy stdin to stdout -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.10 -! -! can also be compiled with gfortran but fails at run-time because it cannot change the access parameter -! ------------------------------------------------------------------------------------------------------- -! -program cp -character :: c -integer:: ios - -open (unit=5, form='unformatted', access='stream', action ='read') -open (unit=6, form='unformatted', access='stream', action ='write') - -do - read (5, iostat=ios) c - if (ios .ne. 0) exit - write (6) c -end do - -end program cp diff --git a/Task/Copy-stdin-to-stdout/FutureBasic/copy-stdin-to-stdout.basic b/Task/Copy-stdin-to-stdout/FutureBasic/copy-stdin-to-stdout.basic deleted file mode 100644 index 277e5331b6..0000000000 --- a/Task/Copy-stdin-to-stdout/FutureBasic/copy-stdin-to-stdout.basic +++ /dev/null @@ -1,13 +0,0 @@ -// Create file handles for standard input and output -FileHandleRef stdIn = fn FileHandleWithStandardInput -FileHandleRef stdOut = fn FileHandleWithStandardOutput - -// Continuously read from standard input… -while (YES) - CFDataRef availableData = fn FileHandleAvailableData( stdIn ) - if ( fn DataLength( availableData ) == 0 ) - break // End of input - end if - // … and write to standard output - fn FileHandleWriteData( stdOut, availableData, NULL ) -wend diff --git a/Task/Copy-stdin-to-stdout/Icon/copy-stdin-to-stdout.icon b/Task/Copy-stdin-to-stdout/Icon/copy-stdin-to-stdout.icon deleted file mode 100644 index ceec19034b..0000000000 --- a/Task/Copy-stdin-to-stdout/Icon/copy-stdin-to-stdout.icon +++ /dev/null @@ -1,3 +0,0 @@ -procedure main() - every write(!&input) -end diff --git a/Task/Copy-stdin-to-stdout/Java/copy-stdin-to-stdout-2.java b/Task/Copy-stdin-to-stdout/Java/copy-stdin-to-stdout-2.java deleted file mode 100644 index df4b2adbe3..0000000000 --- a/Task/Copy-stdin-to-stdout/Java/copy-stdin-to-stdout-2.java +++ /dev/null @@ -1,5 +0,0 @@ -public class CopyStdinToStdout { - public static void main(String[] args) throws java.io.IOException { - System.in.transferTo(System.out); - } -} diff --git a/Task/Copy-stdin-to-stdout/Java/copy-stdin-to-stdout-1.java b/Task/Copy-stdin-to-stdout/Java/copy-stdin-to-stdout.java similarity index 100% rename from Task/Copy-stdin-to-stdout/Java/copy-stdin-to-stdout-1.java rename to Task/Copy-stdin-to-stdout/Java/copy-stdin-to-stdout.java diff --git a/Task/Copy-stdin-to-stdout/Julia/copy-stdin-to-stdout.jl b/Task/Copy-stdin-to-stdout/Julia/copy-stdin-to-stdout.julia similarity index 100% rename from Task/Copy-stdin-to-stdout/Julia/copy-stdin-to-stdout.jl rename to Task/Copy-stdin-to-stdout/Julia/copy-stdin-to-stdout.julia diff --git a/Task/Copy-stdin-to-stdout/Kotlin/copy-stdin-to-stdout.kts b/Task/Copy-stdin-to-stdout/Kotlin/copy-stdin-to-stdout.kotlin similarity index 100% rename from Task/Copy-stdin-to-stdout/Kotlin/copy-stdin-to-stdout.kts rename to Task/Copy-stdin-to-stdout/Kotlin/copy-stdin-to-stdout.kotlin diff --git a/Task/Copy-stdin-to-stdout/OCaml/copy-stdin-to-stdout.ml b/Task/Copy-stdin-to-stdout/OCaml/copy-stdin-to-stdout.ocaml similarity index 100% rename from Task/Copy-stdin-to-stdout/OCaml/copy-stdin-to-stdout.ml rename to Task/Copy-stdin-to-stdout/OCaml/copy-stdin-to-stdout.ocaml diff --git a/Task/Copy-stdin-to-stdout/Oberon-07/copy-stdin-to-stdout.oberon b/Task/Copy-stdin-to-stdout/Oberon-07/copy-stdin-to-stdout.oberon deleted file mode 100644 index 32bc3ee1b1..0000000000 --- a/Task/Copy-stdin-to-stdout/Oberon-07/copy-stdin-to-stdout.oberon +++ /dev/null @@ -1,10 +0,0 @@ -MODULE CopyStdinToStdout; - IMPORT In, Out; - VAR c : CHAR; -BEGIN - In.Char( c ); - WHILE In.Done DO - Out.Char( c ); - In.Char( c ) - END -END CopyStdinToStdout. diff --git a/Task/Copy-stdin-to-stdout/Objeck/copy-stdin-to-stdout.objeck b/Task/Copy-stdin-to-stdout/Objeck/copy-stdin-to-stdout.objeck deleted file mode 100644 index 05e460ff31..0000000000 --- a/Task/Copy-stdin-to-stdout/Objeck/copy-stdin-to-stdout.objeck +++ /dev/null @@ -1,9 +0,0 @@ -class StdInToOut { - function : Main(args : String[]) ~ Nil { - do { - input := System.IO.Console->ReadLine(); - System.IO.Console->PrintLine(input); - } - while(<>input->IsEmpty()); - } -} diff --git a/Task/Copy-stdin-to-stdout/PascalABC.NET/copy-stdin-to-stdout.pas b/Task/Copy-stdin-to-stdout/PascalABC.NET/copy-stdin-to-stdout.pas deleted file mode 100644 index 1b297471d0..0000000000 --- a/Task/Copy-stdin-to-stdout/PascalABC.NET/copy-stdin-to-stdout.pas +++ /dev/null @@ -1,2 +0,0 @@ -## -Console.OpenStandardInput().CopyTo(Console.OpenStandardOutput()); diff --git a/Task/Copy-stdin-to-stdout/Phix/copy-stdin-to-stdout.phix b/Task/Copy-stdin-to-stdout/Phix/copy-stdin-to-stdout.phix index f1b2eaf38c..6d08a056ab 100644 --- a/Task/Copy-stdin-to-stdout/Phix/copy-stdin-to-stdout.phix +++ b/Task/Copy-stdin-to-stdout/Phix/copy-stdin-to-stdout.phix @@ -1,6 +1,8 @@ -without js -while true do - integer ch = wait_key() - if ch=#1B then exit end if - puts(1,ch) -end while +(notonline)--> + without js + while true do + integer ch = wait_key() + if ch=#1B then exit end if + puts(1,ch) + end while + + with javascript_semantics + procedure factorise(integer n) + sequence res = prime_factors(n,true) + res = join(apply(res,sprint)," x ") + printf(1,"%2d: %s\n",{n,res}) + end procedure -papply(tagset(10)&{2144,1_000_000_000},factorise) - --- And this is how you deal with larger numbers - you'd have to cap maxprime --- for anything larger, and in fact I had to do just that for this to work on --- 32-bit (295593 found by binary chop), and of course some numbers will get --- incredibly slow, or you could try using mpz_pollard_rho() instead. -puts(1,"\n") -include mpfr.e -for i=0 to 35 by 5 do - string s = "1"&repeat('0',i) - if even(i) then s[$] = '1' end if - integer maxprime = iff(machine_bits()=32?295593: - floor(sqrt(power(10,i)))) - sequence res = mpz_prime_factors(s,maxprime) - printf(1,"%s: %s\n",{s,mpz_factorstring(res)}) -end for + papply(tagset(10)&{2144,1000000000},factorise) + + sequence tests = {{"the three truths","th"}, + {"ababababab","abab"}, + {"ababababab","aba"}, + {"ababababab","ab"}, + {"ababababab","a"}, + {"ababababab",""}} + integer start, count + string test, substring + for i=1 to length(tests) do + start = 1 + count = 0 + {test, substring} = tests[i] + while 1 do + start = match(substring,test,start) + if start=0 then exit end if + start += length(substring) + count += 1 + end while + printf(1,"The string \"%s\" occurs as a non-overlapping substring %d times in \"%s\"\n",{substring,count,test}) + end for +') !Disclaiming responsibility... - INDEEP = 1 !Finishing the content of the header. - CALL HTML("") !Enough of that. - CALL HTML("") !A fresh line seems polite. - INDEEP = 2 !Its content follows.. - END SUBROUTINE HTMLSTART !Others will follow on. Hopefully, correctly. - SUBROUTINE HTMLSTOP !And hopefully, this will be a good closure. + CALL HTML('') !But said to be worthy. + CALL HTML(METAH//'Description" Content="'//DESC//'">') !Hopefully, helpful. + CALL HTML(METAH//'Generator" Content="'//I AM//'">') !I said. + CALL DATE_AND_TIME(DATE = D,TIME = T) !Not assignments, but attachments. + CALL HTML(METAH//'Created" Content="' !Convert the timestamp + 1 //D(1:4)//"-"//D(5:6)//"-"//D(7:8) !Into an international standard. + 2 //" "//T(1:2)//":"//T(3:4)//":"//T(5:10)//'">') !For date and time. + IF (LUSERCODE.GT.0) CALL HTML(METAH !Possibly, the user's code is known. + 1 //'Author" Content="'//USERCODE(1:LUSERCODE) !If so, reveal. + 2 //'"> ') !Disclaiming responsibility... + INDEEP = 1 !Finishing the content of the header. + CALL HTML("") !Enough of that. + CALL HTML("") !A fresh line seems polite. + INDEEP = 2 !Its content follows.. + END SUBROUTINE HTMLSTART !Others will follow on. Hopefully, correctly. + SUBROUTINE HTMLSTOP !And hopefully, this will be a good closure. Could be more sophisticated and track the stack via INDEEP+- and names, to enable a desperate close-off if INDEEP is not 2. - IF (INDEEP.NE.2) CALL ECART("Misclosure! InDeep not 2 but" !But, - 1 //I8FMT(INDEEP)) !It may not be. - INDEEP = 1 !Retreat to the first level. - CALL HTML("") !End the "body". - INDEEP = 0 !Retreat to the start level. - CALL HTML("") !End the whole thing. - END SUBROUTINE HTMLSTOP !Ah... + IF (INDEEP.NE.2) CALL ECART("Misclosure! InDeep not 2 but" !But, + 1 //I8FMT(INDEEP)) !It may not be. + INDEEP = 1 !Retreat to the first level. + CALL HTML("") !End the "body". + INDEEP = 0 !Retreat to the start level. + CALL HTML("") !End the whole thing. + END SUBROUTINE HTMLSTOP !Ah... - SUBROUTINE HTMLTSTART(B,SUMMARY) !Start a table. - INTEGER B !Border thickness. - CHARACTER*(*) SUMMARY !Some well-chosen words. - CALL HTML("') !Not displayed, but potentially used by non-display agencies... - INDEEP = INDEEP + 1 !Another level dug. + SUBROUTINE HTMLTSTART(B,SUMMARY) !Start a table. + INTEGER B !Border thickness. + CHARACTER*(*) SUMMARY !Some well-chosen words. + CALL HTML("
    ') !Not displayed, but potentially used by non-display agencies... + INDEEP = INDEEP + 1 !Another level dug. END SUBROUTINE HTMLTSTART!That part was easy. - SUBROUTINE HTMLTSTOP !And the ending is easy too. - INDEEP = INDEEP - 1 !Withdraw a level. - CALL HTML("
    ") !Hopefully, aligning. - END SUBROUTINE HTMLTSTOP !The bounds are easy. + SUBROUTINE HTMLTSTOP !And the ending is easy too. + INDEEP = INDEEP - 1 !Withdraw a level. + CALL HTML("") !Hopefully, aligning. + END SUBROUTINE HTMLTSTOP !The bounds are easy. - SUBROUTINE HTMLTHEADSTART !Start a table's heading. - CALL HTML("") !Thus. - INDEEP = INDEEP + 1 !Dig deeper. - END SUBROUTINE HTMLTHEADSTART !Content should follow. - SUBROUTINE HTMLTHEADSTOP !And now, enough. - INDEEP = INDEEP - 1 !Retreat a level. - CALL HTML("") !And end the head. - END SUBROUTINE HTMLTHEADSTOP !At the neck of the body? + SUBROUTINE HTMLTHEADSTART !Start a table's heading. + CALL HTML("") !Thus. + INDEEP = INDEEP + 1 !Dig deeper. + END SUBROUTINE HTMLTHEADSTART !Content should follow. + SUBROUTINE HTMLTHEADSTOP !And now, enough. + INDEEP = INDEEP - 1 !Retreat a level. + CALL HTML("") !And end the head. + END SUBROUTINE HTMLTHEADSTOP !At the neck of the body? - SUBROUTINE HTMLTHEAD(N,TEXT) !Cast forth a whole-span table heading. - INTEGER N !The count of columns to be spanned. - CHARACTER*(*) TEXT !A brief description to place there. - CALL HTML3("',"") !Start the specification. - CALL HTML3("",TEXT(1:LSTNB(TEXT)),"") !This text, possibly verbose. - END SUBROUTINE HTMLTHEAD !Thus, all contained on one line. + SUBROUTINE HTMLTHEAD(N,TEXT) !Cast forth a whole-span table heading. + INTEGER N !The count of columns to be spanned. + CHARACTER*(*) TEXT !A brief description to place there. + CALL HTML3("',"") !Start the specification. + CALL HTML3("",TEXT(1:LSTNB(TEXT)),"") !This text, possibly verbose. + END SUBROUTINE HTMLTHEAD !Thus, all contained on one line. - SUBROUTINE HTMLTBODYSTART !Start on the table body. - CALL HTML(' ') !And I don't think much of the "comment" formalism, either. - INDEEP = INDEEP + 1 !Anyway, we're ready with the alignment. - END SUBROUTINE HTMLTBODYSTART !Others will provide the body. - SUBROUTINE HTMLTBODYSTOP !And, they've had enough. - INDEEP = INDEEP - 1 !So, up out of the hole. - CALL HTML("") !Take a breath. - END SUBROUTINE HTMLTBODYSTOP !And wander off. - SUBROUTINE HTMLTROWTEXT(TEXT,N) !Roll a row of column headings. - CHARACTER*(*) TEXT(:) !The headings. - INTEGER N !Their number. - INTEGER I,L !Assistants. - CALL HTML3("","","") !Start a row of headings-to-come, and don't end the line. - DO I = 1,N !Step through the headings. - L = LSTNB(TEXT(I)) !Trailing spaces are to be ignored. - IF (L.LE.0) THEN !Thus discovering blank texts. - CALL HTML3(""," ","") !This prevents the cell being collapsed. - ELSE !But for those with text, - CALL HTML3("",""//TEXT(I)(1:L)//"","") !Roll it. - END IF !So much for that text. - END DO !On to the next. - CALL HTML3("","","") !Finish the row, and thus the line. - END SUBROUTINE HTMLTROWTEXT !So much for texts. - SUBROUTINE HTMLTROWINTEGER(V,N) !Now for all integers. - INTEGER V(:) !The integers. - INTEGER N !Their number. - INTEGER I !A stepper. - CALL HTML3('',"","") !Start a row of entries. - DO I = 1,N !Work through the row's values. - CALL HTML3("",""//I8FMT(V(I))//"","") !One by one. - END DO !On to the next. - CALL HTML3("","","") !Finish the row, and thus the line. - END SUBROUTINE HTMLTROWINTEGER !All the same type is not troublesome. - END MODULE HTMLSTUFF !Enough already. + SUBROUTINE HTMLTBODYSTART !Start on the table body. + CALL HTML(' ') !And I don't think much of the "comment" formalism, either. + INDEEP = INDEEP + 1 !Anyway, we're ready with the alignment. + END SUBROUTINE HTMLTBODYSTART !Others will provide the body. + SUBROUTINE HTMLTBODYSTOP !And, they've had enough. + INDEEP = INDEEP - 1 !So, up out of the hole. + CALL HTML("") !Take a breath. + END SUBROUTINE HTMLTBODYSTOP !And wander off. + SUBROUTINE HTMLTROWTEXT(TEXT,N) !Roll a row of column headings. + CHARACTER*(*) TEXT(:) !The headings. + INTEGER N !Their number. + INTEGER I,L !Assistants. + CALL HTML3("","","") !Start a row of headings-to-come, and don't end the line. + DO I = 1,N !Step through the headings. + L = LSTNB(TEXT(I)) !Trailing spaces are to be ignored. + IF (L.LE.0) THEN !Thus discovering blank texts. + CALL HTML3(""," ","") !This prevents the cell being collapsed. + ELSE !But for those with text, + CALL HTML3("",""//TEXT(I)(1:L)//"","") !Roll it. + END IF !So much for that text. + END DO !On to the next. + CALL HTML3("","","") !Finish the row, and thus the line. + END SUBROUTINE HTMLTROWTEXT !So much for texts. + SUBROUTINE HTMLTROWINTEGER(V,N) !Now for all integers. + INTEGER V(:) !The integers. + INTEGER N !Their number. + INTEGER I !A stepper. + CALL HTML3('',"","") !Start a row of entries. + DO I = 1,N !Work through the row's values. + CALL HTML3("",""//I8FMT(V(I))//"","") !One by one. + END DO !On to the next. + CALL HTML3("","","") !Finish the row, and thus the line. + END SUBROUTINE HTMLTROWINTEGER !All the same type is not troublesome. + END MODULE HTMLSTUFF !Enough already. PROGRAM MAKETABLE USE PARAMETERS USE ASSISTANCE USE HTMLSTUFF INTEGER KBD,MSG - INTEGER NCOLS !The usage of V must conform to this! - PARAMETER (NCOLS = 4) !Specified number of columns. - CHARACTER*3 COLNAME(NCOLS) !And they have names. - PARAMETER (COLNAME = (/"","X","Y","Z"/)) !As specified. - INTEGER V(NCOLS) !A scratchpad for a line's worth. - COMMON KBD,MSG !I/O units. - KBD = 5 !Keyboard. - MSG = 6 !Screen. - CALL GETLOG(USERCODE) !Who has poked me into life? - LUSERCODE = LSTNB(USERCODE) !Ah, text gnashing. + INTEGER NCOLS !The usage of V must conform to this! + PARAMETER (NCOLS = 4) !Specified number of columns. + CHARACTER*3 COLNAME(NCOLS) !And they have names. + PARAMETER (COLNAME = (/"","X","Y","Z"/)) !As specified. + INTEGER V(NCOLS) !A scratchpad for a line's worth. + COMMON KBD,MSG !I/O units. + KBD = 5 !Keyboard. + MSG = 6 !Screen. + CALL GETLOG(USERCODE) !Who has poked me into life? + LUSERCODE = LSTNB(USERCODE) !Ah, text gnashing. - CALL HTMLSTART(MSG,"Powers","Table of integer powers") !Output to the screen will do. - CALL HTMLTSTART(1,"Successive powers of successive integers") !Start the table. - CALL HTMLTHEADSTART !The table heading. - CALL HTMLTHEAD(NCOLS,"Successive powers") !A full-width heading. - CALL HTMLTROWTEXT(COLNAME,NCOLS) !Headings for each column. - CALL HTMLTHEADSTOP !So much for the heading. - CALL HTMLTBODYSTART !Now for the content. - DO I = 1,10 !This should be enough. - V(1) = I !The unheaded row number. - V(2) = I**2 !Its square. - V(3) = I**3 !Cube. - V(4) = I**4 !Fourth power. - CALL HTMLTROWINTEGER(V,NCOLS) !Show a row's worth.. - END DO !On to the next line. - CALL HTMLTBODYSTOP !No more content. - CALL HTMLTSTOP !End the table. + CALL HTMLSTART(MSG,"Powers","Table of integer powers") !Output to the screen will do. + CALL HTMLTSTART(1,"Successive powers of successive integers") !Start the table. + CALL HTMLTHEADSTART !The table heading. + CALL HTMLTHEAD(NCOLS,"Successive powers") !A full-width heading. + CALL HTMLTROWTEXT(COLNAME,NCOLS) !Headings for each column. + CALL HTMLTHEADSTOP !So much for the heading. + CALL HTMLTBODYSTART !Now for the content. + DO I = 1,10 !This should be enough. + V(1) = I !The unheaded row number. + V(2) = I**2 !Its square. + V(3) = I**3 !Cube. + V(4) = I**4 !Fourth power. + CALL HTMLTROWINTEGER(V,NCOLS) !Show a row's worth.. + END DO !On to the next line. + CALL HTMLTBODYSTOP !No more content. + CALL HTMLTSTOP !End the table. CALL HTMLSTOP END diff --git a/Task/Create-an-HTML-table/Java/create-an-html-table-3.java b/Task/Create-an-HTML-table/Java/create-an-html-table-3.java index 3c85302f31..f5306aa7ac 100644 --- a/Task/Create-an-HTML-table/Java/create-an-html-table-3.java +++ b/Task/Create-an-HTML-table/Java/create-an-html-table-3.java @@ -1,25 +1,25 @@ public class HTML { - public static String array2HTML(Object[][] array){ - StringBuilder html = new StringBuilder( - ""); - for(Object elem:array[0]){ - html.append(""); - } - for(int i = 1; i < array.length; i++){ - Object[] row = array[i]; - html.append(""); - for(Object elem:row){ - html.append(""); - } - html.append(""); - } - html.append("
    " + elem.toString() + "
    " + elem.toString() + "
    "); - return html.toString(); - } - - public static void main(String[] args){ - Object[][] ints = {{"","X","Y","Z"},{1,1,2,3},{2,4,5,6},{3,7,8,9},{4,10,11,12}}; - System.out.println(array2HTML(ints)); - } + public static String array2HTML(Object[][] array){ + StringBuilder html = new StringBuilder( + ""); + for(Object elem:array[0]){ + html.append(""); + } + for(int i = 1; i < array.length; i++){ + Object[] row = array[i]; + html.append(""); + for(Object elem:row){ + html.append(""); + } + html.append(""); + } + html.append("
    " + elem.toString() + "
    " + elem.toString() + "
    "); + return html.toString(); + } + + public static void main(String[] args){ + Object[][] ints = {{"","X","Y","Z"},{1,1,2,3},{2,4,5,6},{3,7,8,9},{4,10,11,12}}; + System.out.println(array2HTML(ints)); + } } diff --git a/Task/Create-an-HTML-table/JavaScript/create-an-html-table-1.js b/Task/Create-an-HTML-table/JavaScript/create-an-html-table-1.js index 9ba8c08860..02d28e0f6d 100644 --- a/Task/Create-an-HTML-table/JavaScript/create-an-html-table-1.js +++ b/Task/Create-an-HTML-table/JavaScript/create-an-html-table-1.js @@ -4,32 +4,32 @@ Node.prototype.a = function (e) { this.appendChild(e); return this } function ce(tag, txt) { - var x = document.createElement(tag); - x.textContent = (txt === undefined) ? '' : txt; - return x; + var x = document.createElement(tag); + x.textContent = (txt === undefined) ? '' : txt; + return x; } function make_table(cols, rows) { - var tbl = ce('table', ''), tr = ce('tr'), th; + var tbl = ce('table', ''), tr = ce('tr'), th; - tbl.a(tr.a(ce('th'))); + tbl.a(tr.a(ce('th'))); - var z = 'Z'.charCodeAt(0); - for (var l = z - cols + 1; l <= z; l++) - tr.a(ce('th', String.fromCharCode(l))); + var z = 'Z'.charCodeAt(0); + for (var l = z - cols + 1; l <= z; l++) + tr.a(ce('th', String.fromCharCode(l))); - for (var r = 1; r <= rows; r++) { - tbl.a(tr = ce('tr').a(ce('th', r))); - for (var c = 0; c < cols; c++) - tr.a(ce('td', Math.floor(Math.random() * 10000))); - } + for (var r = 1; r <= rows; r++) { + tbl.a(tr = ce('tr').a(ce('th', r))); + for (var c = 0; c < cols; c++) + tr.a(ce('td', Math.floor(Math.random() * 10000))); + } - document.body - .a(ce('style', - 'td, th {border: 1px solid #696;' + - 'padding:.4ex} td {text-align: right }' + - 'table { border-collapse: collapse}')) - .a(tbl); + document.body + .a(ce('style', + 'td, th {border: 1px solid #696;' + + 'padding:.4ex} td {text-align: right }' + + 'table { border-collapse: collapse}')) + .a(tbl); } diff --git a/Task/Create-an-HTML-table/Julia/create-an-html-table-1.jl b/Task/Create-an-HTML-table/Julia/create-an-html-table-1.julia similarity index 100% rename from Task/Create-an-HTML-table/Julia/create-an-html-table-1.jl rename to Task/Create-an-HTML-table/Julia/create-an-html-table-1.julia diff --git a/Task/Create-an-HTML-table/Julia/create-an-html-table-2.jl b/Task/Create-an-HTML-table/Julia/create-an-html-table-2.julia similarity index 100% rename from Task/Create-an-HTML-table/Julia/create-an-html-table-2.jl rename to Task/Create-an-HTML-table/Julia/create-an-html-table-2.julia diff --git a/Task/Create-an-HTML-table/Kotlin/create-an-html-table-1.kts b/Task/Create-an-HTML-table/Kotlin/create-an-html-table-1.kotlin similarity index 100% rename from Task/Create-an-HTML-table/Kotlin/create-an-html-table-1.kts rename to Task/Create-an-HTML-table/Kotlin/create-an-html-table-1.kotlin diff --git a/Task/Create-an-HTML-table/Kotlin/create-an-html-table-2.kts b/Task/Create-an-HTML-table/Kotlin/create-an-html-table-2.kotlin similarity index 100% rename from Task/Create-an-HTML-table/Kotlin/create-an-html-table-2.kts rename to Task/Create-an-HTML-table/Kotlin/create-an-html-table-2.kotlin diff --git a/Task/Create-an-HTML-table/Lasso/create-an-html-table.lasso b/Task/Create-an-HTML-table/Lasso/create-an-html-table.lasso index bac8e0748f..738052d5ac 100644 --- a/Task/Create-an-HTML-table/Lasso/create-an-html-table.lasso +++ b/Task/Create-an-HTML-table/Lasso/create-an-html-table.lasso @@ -1,20 +1,20 @@ define rand4dig => integer_random(9999, 1) local( - output = '\n' + output = '
    \n' ) with el in (' ,X,Y,Z') -> split(',') do { - #output -> append('') + #output -> append('') } #output -> append('\n') loop(5) => { - #output -> append('\n') - loop(3) => { - #output -> append('') - } - #output -> append('\n') + #output -> append('\n') + loop(3) => { + #output -> append('') + } + #output -> append('\n') } #output -> append('
    ' + #el + '' + #el + '
    ' + loop_count + '' + rand4dig + '
    ' + loop_count + '' + rand4dig + '
    \n') diff --git a/Task/Create-an-HTML-table/M2000-Interpreter/create-an-html-table.m2000 b/Task/Create-an-HTML-table/M2000-Interpreter/create-an-html-table.m2000 index e212abd32f..a4f9c77305 100644 --- a/Task/Create-an-HTML-table/M2000-Interpreter/create-an-html-table.m2000 +++ b/Task/Create-an-HTML-table/M2000-Interpreter/create-an-html-table.m2000 @@ -1,36 +1,36 @@ MODULE HtmlTable { - tag$=LAMBDA$ (a$)-> { - =LAMBDA$ a$ -> { - IF ISNUM THEN w$=STR$(NUMBER,0) ELSE w$=LETTER$ - READ ? part$ - ="<"+a$+IF$(LEN(part$)>0->" "+part$,"")+">"+w$+""+CHR$(13)+CHR$(10) - } - } - INVENTORY Fun - STACK NEW { - DATA "html", "head", "body", "table", "tr", "th", "td" - WHILE NOT EMPTY - OVER ' duplicate top of stack - APPEND Fun, LETTER$:=tag$(LETTER$) - END WHILE - } - DEF body0$="",body$="" - STACK NEW { - DATA "", "X", "Y", "Z" - FOR i=1 TO 4 - body0$+=Fun$("th")(LETTER$) - z$="" - FOR j=1 TO 3 : z$+=Fun$("td")(RANDOM(0, 9999), {align="right"}) : NEXT j - body$+=Fun$("tr")(Fun$("th")(i)+z$) - NEXT i - } - table$=fun$("table")(fun$("tr")(body0$)+body$,"border=1 cellpadding=10 cellspacing=0") - DOCUMENT final$=""+CHR$(13)+CHR$(10) - final$=fun$("html")(fun$("head")("")+fun$("body")(table$), {lang="en"}) - file$="c:\doc.html" - REPORT final$ - CLIPBOARD final$ - SAVE.DOC final$, file$ - WIN file$ ' execute, no wait + tag$=LAMBDA$ (a$)-> { + =LAMBDA$ a$ -> { + IF ISNUM THEN w$=STR$(NUMBER,0) ELSE w$=LETTER$ + READ ? part$ + ="<"+a$+IF$(LEN(part$)>0->" "+part$,"")+">"+w$+""+CHR$(13)+CHR$(10) + } + } + INVENTORY Fun + STACK NEW { + DATA "html", "head", "body", "table", "tr", "th", "td" + WHILE NOT EMPTY + OVER ' duplicate top of stack + APPEND Fun, LETTER$:=tag$(LETTER$) + END WHILE + } + DEF body0$="",body$="" + STACK NEW { + DATA "", "X", "Y", "Z" + FOR i=1 TO 4 + body0$+=Fun$("th")(LETTER$) + z$="" + FOR j=1 TO 3 : z$+=Fun$("td")(RANDOM(0, 9999), {align="right"}) : NEXT j + body$+=Fun$("tr")(Fun$("th")(i)+z$) + NEXT i + } + table$=fun$("table")(fun$("tr")(body0$)+body$,"border=1 cellpadding=10 cellspacing=0") + DOCUMENT final$=""+CHR$(13)+CHR$(10) + final$=fun$("html")(fun$("head")("")+fun$("body")(table$), {lang="en"}) + file$="c:\doc.html" + REPORT final$ + CLIPBOARD final$ + SAVE.DOC final$, file$ + WIN file$ ' execute, no wait } HtmlTable diff --git a/Task/Create-an-HTML-table/Modula-3/create-an-html-table.mod3 b/Task/Create-an-HTML-table/Modula-3/create-an-html-table.mod3 index a78a020685..86b0df0df1 100644 --- a/Task/Create-an-HTML-table/Modula-3/create-an-html-table.mod3 +++ b/Task/Create-an-HTML-table/Modula-3/create-an-html-table.mod3 @@ -5,16 +5,16 @@ FROM Fmt IMPORT Int, F; BEGIN IO.Put("" - & "" + & "" - & "", - Int(I), - Int(rand.integer(0, 1000)), - Int(rand.integer(0, 1000)), - Int(rand.integer(0, 1000)))); - END; + FOR I := 0 TO 3 DO + IO.Put(F("" + & "", + Int(I), + Int(rand.integer(0, 1000)), + Int(rand.integer(0, 1000)), + Int(rand.integer(0, 1000)))); + END; END; END Table. diff --git a/Task/Create-an-HTML-table/Nanoquery/create-an-html-table.nanoquery b/Task/Create-an-HTML-table/Nanoquery/create-an-html-table.nanoquery index b5ff55121d..e3c367c973 100644 --- a/Task/Create-an-HTML-table/Nanoquery/create-an-html-table.nanoquery +++ b/Task/Create-an-HTML-table/Nanoquery/create-an-html-table.nanoquery @@ -9,11 +9,11 @@ println "" // generate five rows for i in range(1, 5) - println "" - println "" - println "" - println "" - println "" + println "" + println "" + println "" + println "" + println "" end for println "
    XY"); + & "border: 1px solid\">XY"); WITH rand = NEW(Random.Default).init() DO - FOR I := 0 TO 3 DO - IO.Put(F("
    %s%s%s%s
    %s%s%s%s
    XYZ
    " + i + "" + int($random.getInt(8999) + 1000) + "" + int($random.getInt(8999) + 1000) + "" + int($random.getInt(8999) + 1000) + "
    " + i + "" + int($random.getInt(8999) + 1000) + "" + int($random.getInt(8999) + 1000) + "" + int($random.getInt(8999) + 1000) + "
    " diff --git a/Task/Create-an-HTML-table/OCaml/create-an-html-table-1.ml b/Task/Create-an-HTML-table/OCaml/create-an-html-table-1.ocaml similarity index 100% rename from Task/Create-an-HTML-table/OCaml/create-an-html-table-1.ml rename to Task/Create-an-HTML-table/OCaml/create-an-html-table-1.ocaml diff --git a/Task/Create-an-HTML-table/OCaml/create-an-html-table-2.ml b/Task/Create-an-HTML-table/OCaml/create-an-html-table-2.ocaml similarity index 100% rename from Task/Create-an-HTML-table/OCaml/create-an-html-table-2.ml rename to Task/Create-an-HTML-table/OCaml/create-an-html-table-2.ocaml diff --git a/Task/Create-an-HTML-table/OCaml/create-an-html-table-3.ml b/Task/Create-an-HTML-table/OCaml/create-an-html-table-3.ocaml similarity index 100% rename from Task/Create-an-HTML-table/OCaml/create-an-html-table-3.ml rename to Task/Create-an-HTML-table/OCaml/create-an-html-table-3.ocaml diff --git a/Task/Create-an-HTML-table/OCaml/create-an-html-table-4.ml b/Task/Create-an-HTML-table/OCaml/create-an-html-table-4.ocaml similarity index 100% rename from Task/Create-an-HTML-table/OCaml/create-an-html-table-4.ml rename to Task/Create-an-HTML-table/OCaml/create-an-html-table-4.ocaml diff --git a/Task/Create-an-HTML-table/Oz/create-an-html-table.oz b/Task/Create-an-HTML-table/Oz/create-an-html-table.oz index e7695d8b19..8d353080da 100644 --- a/Task/Create-an-HTML-table/Oz/create-an-html-table.oz +++ b/Task/Create-an-HTML-table/Oz/create-an-html-table.oz @@ -5,30 +5,30 @@ declare fun {Table Session} html( head(title("Show a table with row and column headings") - style(type:"text/css" - css(td 'text-align':center) - )) + style(type:"text/css" + css(td 'text-align':center) + )) body( - {TagFromList table - tr(th th("X") th("Y") th("Z")) - | - {CreateRows 3 5} - })) + {TagFromList table + tr(th th("X") th("Y") th("Z")) + | + {CreateRows 3 5} + })) end fun {CreateRows NumCols NumRows} {List.map {List.number 1 NumRows 1} fun {$ Row} {TagFromList tr - td( {Int.toString Row} ) - | - {List.map {List.number 1 NumCols 1} - fun {$ Col} - SequentialNumber = (Row-1)*NumCols + Col - in - td( {Int.toString SequentialNumber} ) - end - }} + td( {Int.toString Row} ) + | + {List.map {List.number 1 NumCols 1} + fun {$ Col} + SequentialNumber = (Row-1)*NumCols + Col + in + td( {Int.toString SequentialNumber} ) + end + }} end } end diff --git a/Task/Create-an-HTML-table/PHP/create-an-html-table-1.php b/Task/Create-an-HTML-table/PHP/create-an-html-table-1.php index 78ddb2115b..f7fc655559 100644 --- a/Task/Create-an-HTML-table/PHP/create-an-html-table-1.php +++ b/Task/Create-an-HTML-table/PHP/create-an-html-table-1.php @@ -9,27 +9,27 @@ $rows = 3; $html = ''; foreach($cols as $col) { - $html .= ''; + $html .= ''; } unset($col); $html .= ''; foreach($cols as $col) { - $html .= ""; + $html .= ""; } unset($col); $html .= ''; for($r = 1; $r <= $rows; $r++) { - $html .= ''; - foreach($cols as $key => $col) - { - $html .= ''; - } - unset($col); - $html .= ''; + $html .= ''; + foreach($cols as $key => $col) + { + $html .= ''; + } + unset($col); + $html .= ''; } $html .= '
    {$col}{$col}
    ' . (($key > 0) ? rand(1, 9999) : $r) . '
    ' . (($key > 0) ? rand(1, 9999) : $r) . '
    '; diff --git a/Task/Create-an-HTML-table/PHP/create-an-html-table-2.php b/Task/Create-an-HTML-table/PHP/create-an-html-table-2.php index 3abf9fd3ee..a13b5fb1b9 100644 --- a/Task/Create-an-HTML-table/PHP/create-an-html-table-2.php +++ b/Task/Create-an-HTML-table/PHP/create-an-html-table-2.php @@ -9,27 +9,27 @@ $rows = 3; - - - - - - - - - - - - - - - - $col): ?> - - - - - + + + + + + + + + + + + + + + + $col): ?> + + + + +
    0) ? rand(1, 9999) : $r ?>
    0) ? rand(1, 9999) : $r ?>
    diff --git a/Task/Create-an-HTML-table/Peloton/create-an-html-table.peloton b/Task/Create-an-HTML-table/Peloton/create-an-html-table.peloton index 37ba932a85..45b01ab02e 100644 --- a/Task/Create-an-HTML-table/Peloton/create-an-html-table.peloton +++ b/Task/Create-an-HTML-table/Peloton/create-an-html-table.peloton @@ -1,17 +1,17 @@ <@ SDCLIT> - <@ DTBLIT> - <@ DTRLITLIT> - <@ DTDLITLIT>|[style]background-color:white - <@ DTD>X - <@ DTD>Y - <@ DTD>Z|[style]width:100%; background-color:brown;color:white; text-align:center - <@ ITEFORLIT>10| - <@ DTRLITCAP> - <@ DTDPOSFORLIT>...|[style]background-color:Brown; color:white; text-align:right - <@ DTDCAPLIT><@ SAYR!ILI2>1|9999|[style]width:50;text-align:right - <@ DTDCAPLIT><@ SAYR!ILI2>1|9999|[style]width:50;text-align:right - <@ DTDCAPLIT><@ SAYR!ILI2>1|9999|[style]width:50;text-align:right - |[style]background-color:white;color:black - - + <@ DTBLIT> + <@ DTRLITLIT> + <@ DTDLITLIT>|[style]background-color:white + <@ DTD>X + <@ DTD>Y + <@ DTD>Z|[style]width:100%; background-color:brown;color:white; text-align:center + <@ ITEFORLIT>10| + <@ DTRLITCAP> + <@ DTDPOSFORLIT>...|[style]background-color:Brown; color:white; text-align:right + <@ DTDCAPLIT><@ SAYR!ILI2>1|9999|[style]width:50;text-align:right + <@ DTDCAPLIT><@ SAYR!ILI2>1|9999|[style]width:50;text-align:right + <@ DTDCAPLIT><@ SAYR!ILI2>1|9999|[style]width:50;text-align:right + |[style]background-color:white;color:black + + |Number Table diff --git a/Task/Create-an-HTML-table/PowerShell/create-an-html-table-1.ps1 b/Task/Create-an-HTML-table/PowerShell/create-an-html-table-1.psh similarity index 100% rename from Task/Create-an-HTML-table/PowerShell/create-an-html-table-1.ps1 rename to Task/Create-an-HTML-table/PowerShell/create-an-html-table-1.psh diff --git a/Task/Create-an-HTML-table/PowerShell/create-an-html-table-2.ps1 b/Task/Create-an-HTML-table/PowerShell/create-an-html-table-2.psh similarity index 100% rename from Task/Create-an-HTML-table/PowerShell/create-an-html-table-2.ps1 rename to Task/Create-an-HTML-table/PowerShell/create-an-html-table-2.psh diff --git a/Task/Create-an-HTML-table/PowerShell/create-an-html-table-3.ps1 b/Task/Create-an-HTML-table/PowerShell/create-an-html-table-3.psh similarity index 100% rename from Task/Create-an-HTML-table/PowerShell/create-an-html-table-3.ps1 rename to Task/Create-an-HTML-table/PowerShell/create-an-html-table-3.psh diff --git a/Task/Create-an-HTML-table/Prolog/create-an-html-table-1.pro b/Task/Create-an-HTML-table/Prolog/create-an-html-table-1.pro index cac87a0a7f..b84bdb97ae 100644 --- a/Task/Create-an-HTML-table/Prolog/create-an-html-table-1.pro +++ b/Task/Create-an-HTML-table/Prolog/create-an-html-table-1.pro @@ -5,12 +5,12 @@ trows([],_) --> []. trows([R|T], N) --> html(tr([td(N),\trow(R)])), { N1 is N + trow([]) --> []. trow([E|T]) --> html(td(E)), trow(T). table :- - Header = ['X','Y','Z'], - Rows = [ - [7055,5334,5795], - [2895,3019,7747], - [140,7607,8144], - [7090,475,4140] - ], - phrase(html(table([tr(\theader(Header)), \trows(Rows,1)])), Out, []), - print_html(Out). + Header = ['X','Y','Z'], + Rows = [ + [7055,5334,5795], + [2895,3019,7747], + [140,7607,8144], + [7090,475,4140] + ], + phrase(html(table([tr(\theader(Header)), \trows(Rows,1)])), Out, []), + print_html(Out). diff --git a/Task/Create-an-HTML-table/R/create-an-html-table.r b/Task/Create-an-HTML-table/R/create-an-html-table.r deleted file mode 100644 index 4818c382a0..0000000000 --- a/Task/Create-an-HTML-table/R/create-an-html-table.r +++ /dev/null @@ -1,15 +0,0 @@ -html_table <- function(headings, nrows){ - ncols <- length(headings) - pad_table <- function(s, char2="d"){ - pad <- paste0("", s, "", collapse="") - paste0("", pad, "", collapse="") - } - theader <- pad_table(c("", headings), char2="h") - gen_row <- function(n) c(n, sample(9999, ncols)) - tbody <- lapply(1:nrows, gen_row) |> sapply(pad_table) - cat("", theader, sep="\n") - writeLines(tbody) - cat("
    \n") -} - -html_table(c("X", "Y", "Z"), 3) diff --git a/Task/Create-an-HTML-table/Rascal/create-an-html-table-1.rascal b/Task/Create-an-HTML-table/Rascal/create-an-html-table-1.rascal index 47f6edacf3..6d7cfdfdd8 100644 --- a/Task/Create-an-HTML-table/Rascal/create-an-html-table-1.rascal +++ b/Task/Create-an-HTML-table/Rascal/create-an-html-table-1.rascal @@ -8,11 +8,11 @@ str tr(str content) = item("tr", content); str td(str content) = item("td", content); public str generateTable(int rows){ - int i(){return arbInt(10000);}; - rows = (tr(td("")+td("X")+td("Y")+td("Z")) - | it + tr(td("")+td("")+td("")+td("")) - | x <- [1..rows]); - writeFile(|file:///location|, - html("Rosetta Code Table", table(rows))); - return "written"; + int i(){return arbInt(10000);}; + rows = (tr(td("")+td("X")+td("Y")+td("Z")) + | it + tr(td("")+td("")+td("")+td("")) + | x <- [1..rows]); + writeFile(|file:///location|, + html("Rosetta Code Table", table(rows))); + return "written"; } diff --git a/Task/Create-an-HTML-table/Rebol/create-an-html-table-1.rebol b/Task/Create-an-HTML-table/Rebol/create-an-html-table-1.rebol deleted file mode 100644 index 6460883556..0000000000 --- a/Task/Create-an-HTML-table/Rebol/create-an-html-table-1.rebol +++ /dev/null @@ -1,37 +0,0 @@ -Rebol [ - title: "Rosetta code: Create an HTML table" - file: %Create_an_HTML_table.r3 - url: https://rosettacode.org/wiki/Create_an_HTML_table - note: "Based on Red language implementation!" -] -table-rows: func [][rejoin [ - first-tr newline - rand-tr 1 newline - rand-tr 2 newline - rand-tr 3 newline - rand-tr 4 newline - rand-tr 5 newline -]] -td-data: does [999 + random 9000] -rand-td: does [form-tag 'td td-data] -rand-tr: func [i][rejoin [ - form-tag 'tr - rejoin [(form-tag 'td i) rand-td rand-td rand-td] -]] -first-tr: func[][rejoin [ - form-tag 'tr rejoin [ - form-tag 'th "" - form-tag 'th "X" - form-tag 'th "Y" - form-tag 'th "Z" - ] -]] -form-tag: func [tag contents /attr a][ - ajoin [ - "<" tag (if attr [ajoin [" " a/1 "=" {"} a/2 {"}]]) ">" - contents - "" - ] -] - -print form-tag 'table table-rows diff --git a/Task/Create-an-HTML-table/Rebol/create-an-html-table-2.rebol b/Task/Create-an-HTML-table/Rebol/create-an-html-table-2.rebol deleted file mode 100644 index c3c7cbc8af..0000000000 --- a/Task/Create-an-HTML-table/Rebol/create-an-html-table-2.rebol +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -
    XYZ
    1209634429408
    2967939177056
    3215143569440
    4274197384967
    5237771907304
    diff --git a/Task/Create-an-HTML-table/Rust/create-an-html-table-1.rs b/Task/Create-an-HTML-table/Rust/create-an-html-table-1.rust similarity index 100% rename from Task/Create-an-HTML-table/Rust/create-an-html-table-1.rs rename to Task/Create-an-HTML-table/Rust/create-an-html-table-1.rust diff --git a/Task/Create-an-HTML-table/Rust/create-an-html-table-2.rs b/Task/Create-an-HTML-table/Rust/create-an-html-table-2.rust similarity index 100% rename from Task/Create-an-HTML-table/Rust/create-an-html-table-2.rs rename to Task/Create-an-HTML-table/Rust/create-an-html-table-2.rust diff --git a/Task/Create-an-HTML-table/SNOBOL4/create-an-html-table.sno b/Task/Create-an-HTML-table/SNOBOL4/create-an-html-table.sno index 496e49d4ba..df2ca8af52 100644 --- a/Task/Create-an-HTML-table/SNOBOL4/create-an-html-table.sno +++ b/Task/Create-an-HTML-table/SNOBOL4/create-an-html-table.sno @@ -1,12 +1,12 @@ * HTML Table - output = "" - output = " " - i = 1 -o1 output = "" - j = 1 -o2 output = "" - j = lt(j,3) j + 1 :s(o2) - output = "" - i = lt(i,3) i + 1 :s(o1) - output = "
    XYZ
    " i "" i j "
    " + output = "" + output = " " + i = 1 +o1 output = "" + j = 1 +o2 output = "" + j = lt(j,3) j + 1 :s(o2) + output = "" + i = lt(i,3) i + 1 :s(o1) + output = "
    XYZ
    " i "" i j "
    " end diff --git a/Task/Create-an-HTML-table/Scheme/create-an-html-table.scm b/Task/Create-an-HTML-table/Scheme/create-an-html-table.ss similarity index 100% rename from Task/Create-an-HTML-table/Scheme/create-an-html-table.scm rename to Task/Create-an-HTML-table/Scheme/create-an-html-table.ss diff --git a/Task/Create-an-HTML-table/Standard-ML/create-an-html-table.ml b/Task/Create-an-HTML-table/Standard-ML/create-an-html-table.ml index 4446dc7c10..9ffc1b1e25 100644 --- a/Task/Create-an-HTML-table/Standard-ML/create-an-html-table.ml +++ b/Task/Create-an-HTML-table/Standard-ML/create-an-html-table.ml @@ -1,34 +1,34 @@ (* * val mkHtmlTable : ('a list * 'b list) -> ('a -> string * 'b -> string) - * -> (('a * 'b) -> string) -> string + * -> (('a * 'b) -> string) -> string * The int list is list of colums, the function returns the values * at a given colum and row. * returns the HTML code of the generated table. *) fun mkHtmlTable (columns, rows) (rowToStr, colToStr) values = - let - val text = ref "\n" - in - (* Add headers *) - map (fn colum => text := !text ^ "") columns; + let + val text = ref "
    " ^ (colToStr colum) ^ "
    \n" + in + (* Add headers *) + map (fn colum => text := !text ^ "") columns; - text := !text ^ "\n"; - (* Add data rows *) - map (fn row => - (* row name *) - (text := !text ^ ""; - (* data *) - map (fn col => text := !text ^ "") columns; - text := !text ^ "\n") - ) rows; - !text ^ "
    " ^ (colToStr colum) ^ "
    " ^ (rowToStr row) ^ "" ^ (values (row, col)) ^ "
    " - end + text := !text ^ "\n"; + (* Add data rows *) + map (fn row => + (* row name *) + (text := !text ^ "" ^ (rowToStr row) ^ ""; + (* data *) + map (fn col => text := !text ^ "" ^ (values (row, col)) ^ "") columns; + text := !text ^ "\n") + ) rows; + !text ^ "" + end fun mkHtmlWithBody (title, body) = "\n\n" ^ title ^ "\n\n\n" ^ body ^ "\n\n\n" fun samplePage () = mkHtmlWithBody ("Sample Page", - mkHtmlTable ([1.0,2.0,3.0,4.0,5.0], [1.0,2.0,3.0,4.0]) - (Real.toString, Real.toString) - (fn (a, b) => Real.toString (Math.pow (a, b)))) + mkHtmlTable ([1.0,2.0,3.0,4.0,5.0], [1.0,2.0,3.0,4.0]) + (Real.toString, Real.toString) + (fn (a, b) => Real.toString (Math.pow (a, b)))) val _ = print (samplePage ()) diff --git a/Task/Create-an-HTML-table/Stata/create-an-html-table-1.stata b/Task/Create-an-HTML-table/Stata/create-an-html-table-1.stata index 0bca7e1ec7..e0aac840d1 100644 --- a/Task/Create-an-HTML-table/Stata/create-an-html-table-1.stata +++ b/Task/Create-an-HTML-table/Stata/create-an-html-table-1.stata @@ -16,19 +16,19 @@ file write `f' `""' _n file write `f' "" _n file write `f' "" _n forv j = 1/`nc' { - local s `: word `j' of `cn'' - file write `f' `""' _n + local s `: word `j' of `cn'' + file write `f' `""' _n } file write `f' "" _n * write row names & data forv i = 1/`nr' { - file write `f' "" _n - local s `: word `i' of `rn'' - file write `f' `""' _n - forv j = 1/`nc' { - file write `f' `""' _n - } - file write `f' "" _n + file write `f' "" _n + local s `: word `i' of `rn'' + file write `f' `""' _n + forv j = 1/`nc' { + file write `f' `""' _n + } + file write `f' "" _n } file write `f' "
    `s'`s'
    `s'`=el(`1',`i',`j')'
    `s'`=el(`1',`i',`j')'
    " _n file write `f' "" _n diff --git a/Task/Create-an-HTML-table/Tcl/create-an-html-table.tcl b/Task/Create-an-HTML-table/Tcl/create-an-html-table.tcl index 0c28ec5b37..0a25494ed2 100644 --- a/Task/Create-an-HTML-table/Tcl/create-an-html-table.tcl +++ b/Task/Create-an-HTML-table/Tcl/create-an-html-table.tcl @@ -3,7 +3,7 @@ proc TAG {name args} { set body [lindex $args end] set result "<$name" foreach {t v} [lrange $args 0 end-1] { - append result " $t=\"" $v "\"" + append result " $t=\"" $v "\"" } append result ">" [string trim [uplevel 1 [list subst $body]]] "" } @@ -21,21 +21,21 @@ set data {} for {set x 0} {$x < 4} {incr x} { # Inspired by the Go solution, but with extra arbitrary digits to show 4-char wide values lappend data [list \ - [expr {$x+1}] [expr {$x*3010}] [expr {$x*3+1298}] [expr {$x*2579+2182}]] + [expr {$x+1}] [expr {$x*3010}] [expr {$x*3+1298}] [expr {$x*2579+2182}]] } # Write the table to standard out puts [TAG table border 1 { [TAG tr bgcolor #f0f0f0 { - [FOREACH head $titles { - [TAG th {$head}] - }] + [FOREACH head $titles { + [TAG th {$head}] + }] }] [FOREACH row $data { - [TAG tr bgcolor #ffffff { - [FOREACH col $row { - [TAG td align right {$col}] - }] - }] + [TAG tr bgcolor #ffffff { + [FOREACH col $row { + [TAG td align right {$col}] + }] + }] }] }] diff --git a/Task/Create-an-HTML-table/VBScript/create-an-html-table.vb b/Task/Create-an-HTML-table/VBScript/create-an-html-table.vb new file mode 100644 index 0000000000..35deed3f02 --- /dev/null +++ b/Task/Create-an-HTML-table/VBScript/create-an-html-table.vb @@ -0,0 +1,40 @@ +Set objFSO = CreateObject("Scripting.FileSystemObject") + +'Open the input csv file for reading. The file is in the same folder as the script. +Set objInFile = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) &_ + "\in.csv",1) + +'Create the output html file. +Set objOutHTML = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) &_ + "\out.html",2,True) + +'Write the html opening tags. +objOutHTML.Write "" & vbCrLf + +'Declare table properties. +objOutHTML.Write "" & vbCrLf + +'Write column headers. +objOutHTML.Write "" & vbCrLf + +'Go through each line of the input csv file and write to the html output file. +n = 1 +Do Until objInFile.AtEndOfStream + line = objInFile.ReadLine + If Len(line) > 0 Then + token = Split(line,",") + objOutHTML.Write "" + For i = 0 To UBound(token) + objOutHTML.Write "" + Next + objOutHTML.Write "" & vbCrLf + End If + n = n + 1 +Loop + +'Write the html closing tags. +objOutHTML.Write "
    XYZ
    " & n & "" & token(i) & "
    " + +objInFile.Close +objOutHTML.Close +Set objFSO = Nothing diff --git a/Task/Create-an-HTML-table/VBScript/create-an-html-table.vbs b/Task/Create-an-HTML-table/VBScript/create-an-html-table.vbs deleted file mode 100644 index 488b88273f..0000000000 --- a/Task/Create-an-HTML-table/VBScript/create-an-html-table.vbs +++ /dev/null @@ -1,40 +0,0 @@ -Set objFSO = CreateObject("Scripting.FileSystemObject") - -'Open the input csv file for reading. The file is in the same folder as the script. -Set objInFile = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) &_ - "\in.csv",1) - -'Create the output html file. -Set objOutHTML = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) &_ - "\out.html",2,True) - -'Write the html opening tags. -objOutHTML.Write "" & vbCrLf - -'Declare table properties. -objOutHTML.Write "" & vbCrLf - -'Write column headers. -objOutHTML.Write "" & vbCrLf - -'Go through each line of the input csv file and write to the html output file. -n = 1 -Do Until objInFile.AtEndOfStream - line = objInFile.ReadLine - If Len(line) > 0 Then - token = Split(line,",") - objOutHTML.Write "" - For i = 0 To UBound(token) - objOutHTML.Write "" - Next - objOutHTML.Write "" & vbCrLf - End If - n = n + 1 -Loop - -'Write the html closing tags. -objOutHTML.Write "
    XYZ
    " & n & "" & token(i) & "
    " - -objInFile.Close -objOutHTML.Close -Set objFSO = Nothing diff --git a/Task/Create-an-HTML-table/X86-64-Assembly/create-an-html-table.x86-64 b/Task/Create-an-HTML-table/X86-64-Assembly/create-an-html-table.x86-64 deleted file mode 100644 index 1df6b26b15..0000000000 --- a/Task/Create-an-HTML-table/X86-64-Assembly/create-an-html-table.x86-64 +++ /dev/null @@ -1,323 +0,0 @@ -; creating html table -; assembly X86 window -; download and install visual studio 2022 free site microsoft -; search and open X64 native tools command prompt -; compil and link program with this command : -; ml64 .asm /link /ENTRY:main /SUBSYSTEM:console kernel32.lib user32.lib Shell32.lib -; this program respects the 64-bit calling convention : -; registers arguments : rcx rdx r8 r9 and stack -; registers saved : rbx,rbp,rdi,rsi, r12-r15 -; ATTENTION les registres rax,rcx,rdx,r8-r11 peuvent être -; perdus lors d'un appel de fonction -;********************************* -; constantes -;********************************* -STD_OUTPUT_HANDLE equ -11 - -NBLIGNES equ 5 -BUFFERSIZE equ 200 - -;********************************* -; MACROS -;********************************* -afficherLib MACRO messa -local mess1,LGMESS1C -.data - mess1 db messa,10,0 - LGMESS1C equ $ - mess1 -.code - push rax - push rcx - push rdx - push r8 - push r9 - push r10 - push r11 - mov rcx, offset mess1 - mov rdx,LGMESS1C - call afficherConsole - pop r11 - pop r10 - pop r9 - pop r8 - pop rdx - pop rcx - pop rax - -ENDM - -;********************************* -; user data -;********************************* -.data -szarrayheader db " ",10,0 -LGSZARRAYHEADER equ $ - szarrayheader -1 -szarrayend db "
    ",10,0 -LGSZARRAYEND equ $ - szarrayend -1 -szLine1 db "XYZ",10,0 -LGSZLINE1 equ $ - szLine1 - 1 -szDebLine db "",0 -LGSZDEBLINE equ $ - szDebLine - 1 -szEndLine db "",10,0 -LGSZENDLINE equ $ - szEndLine - 1 -szEndCol db "",0 -LGSZENDCOL equ $ - szEndCol - 1 - -sBuffer db BUFFERSIZE dup (' ') - -szRetourLigne db 10,0 -sZoneConv db 24 dup (' ') -sZoneConv1 db 24 dup (' ') -sZoneConv2 db 24 dup (' ') -sZoneConv3 db 24 dup (' ') - -align 8 -qgraine dq 123456789 -qNbDep1 dq 0019660dh -qNbDep2 dq 3c6ef35fh -hConsole dq 0 - -;********************************* -; user code fonction principale -;********************************* -.code - -extern WriteFile : proc, GetStdHandle : proc, ExitProcess : proc -extern GetLastError : proc - -main PROC public - afficherLib "Program start." - mov rcx, offset szarrayheader - mov rdx,LGSZARRAYHEADER - call afficherConsole - - mov rcx, offset szLine1 - mov rdx,LGSZLINE1 - call afficherConsole - - mov rbx,1 ; indice loop -lineLoop: ; line loop begin - mov rcx,rbx - mov rdx,offset sZoneConv - call conversion10 - mov rax, offset szDebLine - push rax - mov rax,LGSZDEBLINE - push rax - mov rax,offset sZoneConv - push rax - push 1 - mov rax,offset szEndCol - push rax - mov rax,LGSZENDCOL - push rax - mov rcx,10000 - call randomNumber - mov rcx,rax - mov rdx,offset sZoneConv1 - call conversion10 - mov rcx,offset sZoneConv1 - push rcx - push rax - mov rax,offset szEndCol - push rax - mov rax,LGSZENDCOL - push rax - mov rcx,10000 - call randomNumber - mov rcx,rax - mov rdx,offset sZoneConv2 - call conversion10 - mov rcx,offset sZoneConv2 - push rcx - push rax - - mov rax,offset szEndCol - push rax - mov rax,LGSZENDCOL - push rax - mov rcx,10000 - call randomNumber - mov rcx,rax - mov rdx,offset sZoneConv3 - call conversion10 - mov rcx,offset sZoneConv3 - push rcx - push rax - - mov rax, offset szEndLine - push rax - mov rax,LGSZENDLINE - push rax - mov rcx, offset sBuffer - mov rdx,BUFFERSIZE - mov r8,9 - call grouperChaines - add rsp,8 * 2 * 9 - - mov rcx, offset sBuffer - mov rdx,rax - call afficherConsole - - inc rbx - cmp rbx,NBLIGNES - jle lineLoop - - mov rcx, offset szarrayend - mov rdx,LGSZARRAYEND - call afficherConsole - - - mov rcx, offset szRetourLigne - mov rdx,1 - call afficherConsole - - -finProgramme: - afficherLib "Programm end." - sub rsp,28h - mov rcx,0 ; return code - call ExitProcess -main ENDP - -;************************************** -; console display -;************************************** -; rcx : string address -; rdx : length string -afficherConsole: - push rbx - push r12 - sub rsp,28h ; 40 bytes on stack (shadow variables) - mov rbx,rcx ; string address - mov r12,rdx ; size string - - cmp QWORD ptr hConsole,0 ; console handle ? - jne @B3 - mov rcx,STD_OUTPUT_HANDLE - call GetStdHandle ; load console handle - mov hConsole, rax ; save in data -@B3: - mov rcx,hconsole ; handle - mov rdx,rbx ; string address - mov r8,r12 ; string length - mov r9,0 ; - - sub rsp,8 ; stack alignement (one push) - push 0 - sub rsp,20h ; stack for shadow variable - call WriteFile ; winapi function - add rsp,20h - add rsp,10h ; 1 push and alignement - add rsp,28h ; stack alignement - pop r12 - pop rbx - ret -;*************************************************** -;conversion to unsigned base 10 -;with removal of unnecessary zeros -;and left shift -;**************************************************** -; rcx : value to convert -; rdx : conversion area address length > 22 -LONGUEUR equ 24 -conversion10: - push rbx - push rdi - mov rdi,rdx ; conversion area address - mov BYTE ptr [rdi+LONGUEUR],0 ; 0 final conversion area - mov rax,rcx ; value - mov rcx,LONGUEUR-1 - mov rbx ,10 -CA1: ; loop begin - mov rdx,0 ; division rax by 10 - div rbx - add rdx,'0' ; remainder conversion ascii - mov byte ptr [rdi+rcx],dl - dec rcx - cmp rax,0 ; end ? - jne CA1 - xor rax,rax - inc rcx -CA5: ; copy loop - mov dl,[rdi+rcx] ; load a result character - mov byte ptr [rdi+rax],dl ; and store at conversion area begin - inc rcx - inc rax - cmp rcx,LONGUEUR ; loop if not zero final - jle CA5 - pop rdi - pop rbx - ret -;************************************** -; generate random number -;************************************** -; rcx number limit -randomNumber: - mov rax,0 - cmp rcx,0 - je randfin - mov rax, qGraine ; load seed - mov r8,qNbDep1 - mov rdx,qNbDep2 - mul r8 - add rax,rdx - mov qGraine,rax ; store new seed - inc rcx - mov rdx,0 - div rcx - mov rax,rdx ; result = remainder -randfin: - ret -;*************************************************** -; string concatenation -;************************************************** -; rcx destination area address -; rdx destination area length -; r8 strings number -; r9 0 -; on stack address and length of each string -; in order of insertion -grouperChaines: - enter 0,0 - push rbx - push r12 - push r13 - cmp r8,0 - je fingrp - mov r12,rdx - mov r9,0 ; indice strings - mov r10,0 ; number of characters inserted -bouclezone: - mov r13,r8 - shl r13,1 - mov rbx,[rbp+8+(r13 * 8)] ; string address - mov rax,[rbp+(r13 * 8)] ; sring length - mov r11,0 -bouclecopie: ; loop string copy - mov dl,byte ptr[rbx+r11] - mov byte ptr[rcx+r10],dl - inc r11 - cmp r11,rax - jg finbouclecopie - inc r10 ;number of characters inserted - cmp r10,r12 ; max? - jge erreur - jmp bouclecopie -finbouclecopie: - dec r8 ; other string - jnz bouclezone - - mov rax,r10 ; return size final string - jmp fingrp -erreur: - afficherLib "reception area too small" - mov rax,0 -fingrp: - pop r13 - pop r12 - pop rbx - leave - ret - -end diff --git a/Task/Create-an-object-at-a-given-address/Ada/create-an-object-at-a-given-address-1.adb b/Task/Create-an-object-at-a-given-address/Ada/create-an-object-at-a-given-address-1.ada similarity index 100% rename from Task/Create-an-object-at-a-given-address/Ada/create-an-object-at-a-given-address-1.adb rename to Task/Create-an-object-at-a-given-address/Ada/create-an-object-at-a-given-address-1.ada diff --git a/Task/Create-an-object-at-a-given-address/Ada/create-an-object-at-a-given-address-2.adb b/Task/Create-an-object-at-a-given-address/Ada/create-an-object-at-a-given-address-2.ada similarity index 100% rename from Task/Create-an-object-at-a-given-address/Ada/create-an-object-at-a-given-address-2.adb rename to Task/Create-an-object-at-a-given-address/Ada/create-an-object-at-a-given-address-2.ada diff --git a/Task/Create-an-object-at-a-given-address/COBOL/create-an-object-at-a-given-address.cob b/Task/Create-an-object-at-a-given-address/COBOL/create-an-object-at-a-given-address.cobol similarity index 100% rename from Task/Create-an-object-at-a-given-address/COBOL/create-an-object-at-a-given-address.cob rename to Task/Create-an-object-at-a-given-address/COBOL/create-an-object-at-a-given-address.cobol diff --git a/Task/Create-an-object-at-a-given-address/Delphi/create-an-object-at-a-given-address.pas b/Task/Create-an-object-at-a-given-address/Delphi/create-an-object-at-a-given-address.delphi similarity index 100% rename from Task/Create-an-object-at-a-given-address/Delphi/create-an-object-at-a-given-address.pas rename to Task/Create-an-object-at-a-given-address/Delphi/create-an-object-at-a-given-address.delphi diff --git a/Task/Create-an-object-at-a-given-address/Julia/create-an-object-at-a-given-address.jl b/Task/Create-an-object-at-a-given-address/Julia/create-an-object-at-a-given-address.julia similarity index 100% rename from Task/Create-an-object-at-a-given-address/Julia/create-an-object-at-a-given-address.jl rename to Task/Create-an-object-at-a-given-address/Julia/create-an-object-at-a-given-address.julia diff --git a/Task/Create-an-object-at-a-given-address/Kotlin/create-an-object-at-a-given-address.kts b/Task/Create-an-object-at-a-given-address/Kotlin/create-an-object-at-a-given-address.kotlin similarity index 100% rename from Task/Create-an-object-at-a-given-address/Kotlin/create-an-object-at-a-given-address.kts rename to Task/Create-an-object-at-a-given-address/Kotlin/create-an-object-at-a-given-address.kotlin diff --git a/Task/Create-an-object-at-a-given-address/PascalABC.NET/create-an-object-at-a-given-address.pas b/Task/Create-an-object-at-a-given-address/PascalABC.NET/create-an-object-at-a-given-address.pas deleted file mode 100644 index 1feef12947..0000000000 --- a/Task/Create-an-object-at-a-given-address/PascalABC.NET/create-an-object-at-a-given-address.pas +++ /dev/null @@ -1,12 +0,0 @@ -begin - var pi: ^integer; - New(pi); - pi^ := 3; - Writeln(pi,' ',pi^); - pi^ := 5; - Writeln(pi,' ',pi^); - var pi1: ^integer := pi; - pi1^ := 666; - Writeln(pi1,' ',pi1^); - Writeln(pi,' ',pi^); -end. diff --git a/Task/Create-an-object-at-a-given-address/Rust/create-an-object-at-a-given-address.rs b/Task/Create-an-object-at-a-given-address/Rust/create-an-object-at-a-given-address.rust similarity index 100% rename from Task/Create-an-object-at-a-given-address/Rust/create-an-object-at-a-given-address.rs rename to Task/Create-an-object-at-a-given-address/Rust/create-an-object-at-a-given-address.rust diff --git a/Task/Create-an-object-at-a-given-address/V-(Vlang)/create-an-object-at-a-given-address.v b/Task/Create-an-object-at-a-given-address/V-(Vlang)/create-an-object-at-a-given-address.v deleted file mode 100644 index f0895f2e33..0000000000 --- a/Task/Create-an-object-at-a-given-address/V-(Vlang)/create-an-object-at-a-given-address.v +++ /dev/null @@ -1,22 +0,0 @@ -fn main() { - // create an integer object - - mut target := 42 - mut target_ref := &target - - println("Here is an integer: ${target}") - - // print the machine address of the object - - println("And its reference is: ${target_ref}") - - // take the address of the object and create another integer object at this address - - unsafe{(*target_ref) = 69} - - println("Newly assigned value is: ${*target_ref}") - - // print the value of this object to verify that it is same as one of the origin - - println("Compared with referent: ${target}") -} diff --git a/Task/Create-an-object-at-a-given-address/XPL0/create-an-object-at-a-given-address.xpl0 b/Task/Create-an-object-at-a-given-address/XPL0/create-an-object-at-a-given-address.xpl0 deleted file mode 100644 index fd3ff6cb00..0000000000 --- a/Task/Create-an-object-at-a-given-address/XPL0/create-an-object-at-a-given-address.xpl0 +++ /dev/null @@ -1,15 +0,0 @@ -int Obj; \create an integer object -char Addr; -[HexOut(0, @Obj); \print the machine address of the object (relative to some base) -CrLf(0); -Addr:= @Obj; \take the address of the object and -Addr(0):= $78; \ create another integer object at this address -Addr(1):= $56; -Addr(2):= $34; -Addr(3):= $12; -HexOut(0, Obj); \print the value of this object to verify that -CrLf(0); \ it is same as one of the origin -Obj:= $DEADBEEF; \change the value of the origin and verify it again -HexOut(0, Obj); -CrLf(0); -] diff --git a/Task/Cuban-primes/AWK/cuban-primes.awk b/Task/Cuban-primes/AWK/cuban-primes.awk deleted file mode 100644 index 93acddba9e..0000000000 --- a/Task/Cuban-primes/AWK/cuban-primes.awk +++ /dev/null @@ -1,28 +0,0 @@ -# syntax: GAWK -f CUBAN_PRIMES.AWK -# converted from EasyLang -BEGIN { - limit = 200 - printf("The first %d cuban primes are:\n",limit) - while (count < 10000 ) { - i++ - di = 3 * i * (i + 1) + 1 - if (is_prime(di) == 1) { - if (++count <= limit) { - printf("%8d%s",di,count%10?"":"\n") - } - } - } - printf("\ncuban prime # %d is: %'d\n",count,di) - exit(0) -} -function is_prime(x, i) { - if (x <= 1) { - return(0) - } - for (i=2; i<=int(sqrt(x)); i++) { - if (x % i == 0) { - return(0) - } - } - return(1) -} diff --git a/Task/Cuban-primes/Ada/cuban-primes.adb b/Task/Cuban-primes/Ada/cuban-primes.adb deleted file mode 100644 index d824856bc4..0000000000 --- a/Task/Cuban-primes/Ada/cuban-primes.adb +++ /dev/null @@ -1,136 +0,0 @@ --- Rosetta Code Task written in Ada --- Cuban primes (related to "Cubes", not "Cubans") --- https://rosettacode.org/wiki/Cuban_primes --- July 2024, R. B. E. - --- Using this Cuban Primes Definition: primes of the form: n^3 - (n-1)^3. - --- ToDo: --- Commatize the results (an advanced subtask) --- Could replace the "activity dots" generated during the big calculations with a spinner - --- NOTE: Using GNAT Big_Numbers package. --- Takes a very long time to generate the 100_000th cuban prime: about 75 minutes on a M1 Mac Mini. - -pragma Ada_2022; -with Ada.Text_IO; use Ada.Text_IO; -with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; -with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions; -with Ada.Numerics.Big_Numbers.Big_Integers; use Ada.Numerics.Big_Numbers.Big_Integers; -with Ada.Strings; use Ada.Strings; -with Ada.Strings.Fixed; use Ada.Strings.Fixed; -with Ada.Strings.Maps; use Ada.Strings.Maps; -with Ada.Real_Time; use Ada.Real_Time; - -procedure Cuban_Primes is - - function Is_Prime (A : Positive) return Boolean is - D : Positive; - begin - if A < 2 then - return False; - end if; - if A in 2 .. 3 then - return True; - end if; - if A mod 2 = 0 then - return False; - end if; - if A mod 3 = 0 then - return False; - end if; - D := 5; - while D * D <= A loop - if A mod D = 0 then - return False; - end if; - D := D + 2; - if A mod D = 0 then - return False; - end if; - D := D + 4; - end loop; - return True; - end Is_Prime; - - function Is_Prime (A : Big_Natural) return Boolean is - D : Big_Natural; - B0 : constant Big_Natural := To_Big_Integer (0); - B1 : constant Big_Natural := To_Big_Integer (1); - B2 : constant Big_Natural := To_Big_Integer (2); - B3 : constant Big_Natural := To_Big_Integer (3); - B4 : constant Big_Natural := To_Big_Integer (4); - B5 : constant Big_Natural := To_Big_Integer (5); - begin - if A < B2 then - return False; - end if; - if (A = B2) or (A = B3) then - return True; - end if; - if A mod B2 = B0 then - return False; - end if; - if A mod B3 = B0 then - return False; - end if; - D := B5; - while D * D <= A loop - if A mod D = B0 then - return False; - end if; - D := D + B2; - if A mod D = B0 then - return False; - end if; - D := D + B4; - end loop; - return True; - end Is_Prime; - - Cuban_Count : Natural := 1; - Candidate : Natural; - Big_Candidate : Big_Natural; - Max_Cuban_for_the_Table : constant Integer := 200; - Max_Cuban_below_the_Table : constant Integer := 100_000; - Start_Time, Stop_Time : Time; - Elapsed_Time : Time_Span; - -begin - Put ("The first "); - Put (Max_Cuban_for_the_Table, 1); - Put_Line (" Cuban Primes..."); - for I in 1 .. Integer'Last loop - Candidate := ((I + 1) ** 3) - (I ** 3); - if Is_Prime (Candidate) then - Put (Candidate, 8); - if ((Cuban_Count rem 14) = 0) then - New_Line; - end if; - Cuban_Count := Cuban_Count + 1; - end if; - exit when Cuban_Count > Max_Cuban_for_the_Table; - end loop; - New_Line (2); - Cuban_Count := 1; - Start_Time := Clock; - Put ("The "); - Put (Max_Cuban_below_the_Table, 1); - Put ("th Cuban Prime is: "); - for I in 1 .. Integer'Last loop - Big_Candidate := (((To_Big_Integer (I) + 1) ** 3) - (To_Big_Integer (I) ** 3)); - if Is_Prime (Big_Candidate) then - Cuban_Count := Cuban_Count + 1; - if (Cuban_Count rem 10_000) = 0 then - Put ("."); - end if; - end if; - exit when Cuban_Count = Max_Cuban_below_the_Table; - end loop; - New_Line; - Put (Trim (To_String (Big_Candidate), Right)); - Stop_Time := Clock; - Elapsed_Time := Stop_Time - Start_Time; - New_Line; - Put_Line ("Elapsed time to calculate: " & Duration'Image (To_Duration (Elapsed_Time)) & " seconds"); -end Cuban_Primes; diff --git a/Task/Cuban-primes/EasyLang/cuban-primes.easy b/Task/Cuban-primes/EasyLang/cuban-primes.easy index 8140fa46a5..69a869b15b 100644 --- a/Task/Cuban-primes/EasyLang/cuban-primes.easy +++ b/Task/Cuban-primes/EasyLang/cuban-primes.easy @@ -1,24 +1,27 @@ -fastfunc isprim num . - if num mod 2 = 0 : return 0 - if num mod 3 = 0 : return 0 - i = 5 +fastfunc isprim_odd num . + i = 3 while i <= sqrt num - if num mod i = 0 : return 0 + if num mod i = 0 + return 0 + . i += 2 - if num mod i = 0 : return 0 - i += 4 . return 1 . +numfmt 0 7 i = 1 -while cnt < 50000 +while cnt < 100000 di = 3 * i * (i + 1) + 1 - if isprim di = 1 + if isprim_odd di = 1 cnt += 1 - if cnt <= 200 : write di & " " + if cnt <= 200 + write di & " " + if cnt mod 5 = 0 + print "" + . + . . i += 1 . print "" -print "" print di diff --git a/Task/Cuban-primes/Fortran/cuban-primes.f b/Task/Cuban-primes/Fortran/cuban-primes.f deleted file mode 100644 index d2dcee4458..0000000000 --- a/Task/Cuban-primes/Fortran/cuban-primes.f +++ /dev/null @@ -1,201 +0,0 @@ -! Cuban Prime Numbers -! tested with GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 on Kubuntu 25.04 -! -! Note that both intel ifx and VSI Fortran do not compile this code because they do not -! support 16-byte-integers. -! -! U.B., September 2025 -! - -program CubanPrimes - implicit none - - integer, parameter :: llint=16 - integer, parameter ::strLen = 20 - - integer (kind=llint) :: nc = 0, i=0, di - character (len=strLen) :: sdi ! for formatted output of di - - write (*, *) 'The first 200 cuban prime numbers are:' - do while (nc .lt. 100001) - di = diff_cubes(i) - if (isprime(di)) then - nc = nc + 1 - if (nc .le. 200) then - sdi = GroupedDigits (di, 10) - write (*, '(A10)', advance='no') sdi - if (mod (nc,10) .eq. 0 ) then - write (*,*) - end if - end if - if (nc .eq. 100000) then - sdi = GroupedDigits (di, 18) - write (*,'(//"The 100000th cuban prime number is: ", A)') sdi - exit - end if - end if - i = i + 1 - end do - - - contains - - !------------------------------------------------ - ! Calculate difference (n+1)³ - n³ = 3n² + 3n + 1 - !------------------------------------------------ - function diff_cubes( n ) result (n3) - integer (kind=llint),intent(in) ::n - integer (kind=llint) :: n3 - n3 = 3*n*(n+1) + 1 - end function - - - ! ---------------------------------------------------------------- - ! Fortran does not have a way to use locales for output. - ! Manual insert of separating commas such as 1,345,678 for 1345678 - ! ---------------------------------------------------------------- - function GroupedDigits (n, width) result (outStr) - integer(kind=llint), intent (in) :: n - integer :: width - character (len=width) :: outStr - character (len=2*strLen) :: workStr - integer :: ii, jj, cnt, trueLen - - - ! Write n into a string, then copy the digits to a second string, - ! inserting separater after every 3 digits. - write (workStr, '(i0)') n - ! Adjust left, then cutoff trailing blanks - workstr = adjustl (workstr) - trueLen = len_trim (workStr) - - outStr = ' ' - jj = width - cnt = 0 - do ii=trueLen, 1, -1 ! Copy backwards for correct grouping. - outStr (jj:jj) = workStr (ii:ii) - jj = jj -1 - cnt = cnt + 1 - ! Insert comma after 3 digits, but only if more digits follow. - if (mod (cnt, 3) .eq. 0 .and. ii .gt. 1 .and. workStr(ii-1:ii-1) .ne. ' ') then - outStr (jj:jj) = ',' - jj = jj - 1 - endif - end do - - end function GroupedDigits - - - - - - - ! ---------------------------------------- - ! Miller-Rabin test if n is a prime number - ! ---------------------------------------- - function isPrime(n) result (YN) - - integer(kind=llint), intent(in) ::n - logical :: YN - integer (kind=llint) :: ar (5), i - - ! Early return in most trivial cases - if (n .le. 1) then ! Too small - YN=.false. - return - endif - if (n .eq. 2) then ! 2 is prime - YN=.true. - return - endif - if (mod (n , 2) .eq. 0) then ! all other even number are not prime - YN=.false. - return - endif - if (n .lt. 9) then ! all odd numbers < 9 are prime - YN=.true. - return - endif - if (mod (n , 3) .eq. 0) then ! multiples of 3 aren't prime - YN=.false. - return - endif - if (mod (n , 5) .eq. 0) then ! multiples of 5 aren't prime - YN=.false. - return - endif - - ! these 5 bases are required and sufficient to test numbers up to 2,152,302,898,747 - ar(1) = 2 - ar(2) = 3 - ar(3) = 5 - ar(4) = 7 - ar(5) = 11 - do i = 1, 5 - if (Witness(ar(i), n)) then - YN=.false. ! Not prime - return - endif - end do - YN= .true. ! prime - - end function isPrime - - ! ------------------------------------- - ! helper function for Miller Rabin test - ! ------------------------------------- - function Witness(a, n) result (YN) - - integer (kind=llint) , intent(in) :: a - integer (kind=llint) , intent(in) :: n - - - integer (kind=llint) :: t, u, i - logical :: YN - integer (kind=llint) :: xi1, xi2 - - t = 0 - u = n - 1 - do while (iand(u , 1_llint) .eq. 0) - t = t + 1 - u = u / 2 - end do - - xi1 = ModularExp(a, u, n); - do i = 0, t-1 - xi2 = mod (xi1 * xi1 , n) - if ((xi2 .eq. 1) .and. (xi1 .ne. 1) .and. (xi1 .ne. (n - 1))) then - YN = .true. - return - endif - xi1 = xi2 - end do - if (xi1 .ne. 1) then - YN=.true. - else - YN = .false. - endif - end function Witness - - ! ------------------------------------- - ! helper function for Miller Rabin test - ! ------------------------------------- - function ModularExp(a, b, n) result(d) - - integer(kind=llint) , intent(in) :: a,b,n - integer (kind=llint) :: d - integer (kind=llint) :: i, k - d = 1 - k = 0 - do while (ishft (b, -k) .gt. 0) - k = k + 1 - end do - do i = k - 1, 0, -1 - d = mod (d*d, n) - if (iand (ishft (b, -i) , 1_llint) .gt. 0) d = mod (d*a ,n); - end do - - end function ModularExp - - -end program diff --git a/Task/Cuban-primes/FutureBasic/cuban-primes.basic b/Task/Cuban-primes/FutureBasic/cuban-primes.basic deleted file mode 100644 index 3bbad2af09..0000000000 --- a/Task/Cuban-primes/FutureBasic/cuban-primes.basic +++ /dev/null @@ -1,40 +0,0 @@ -BBOOL local fn IsPrime( p as UInt64 ) - if ( p < 2 ) then return NO - if ( p % 2 == 0 ) then return ( p == 2 ) - UInt64 limit = fn sqrt( (double)p ) - for UInt64 i = 3 to limit step 2 - if ( p % i == 0 ) then return NO - next -end fn = YES - -local fn CubanPrimes( howMany as NSUInteger ) - CFMutableArrayRef cubanPrimes = fn MutableArrayNew - UInt64 n = 1 - - while ( fn ArrayCount( cubanPrimes ) < howMany ) - UInt64 p = 3 * n * n + 3 * n + 1 - if ( fn IsPrime( p ) ) - MutableArrayAddObject( cubanPrimes, @(p) ) - end if - n++ - wend - - printf @"\nFirst 200 Cuban primes:\n" - for NSUInteger i = 0 to fn ArrayCount( cubanPrimes ) - 1 - printf @"%7lu\b", fn NumberUnsignedLongValue( cubanPrimes[i] ) - if ( i < fn ArrayCount( cubanPrimes ) - 1 ) - if ( i % 8 == 7 ) - print - else - print @"\t" - end if - end if - next - print -end fn - -window 1, @"cuban Primes", ( 0, 0, 630, 440 ) - -fn CubanPrimes( 200 ) - -HandleEvents diff --git a/Task/Cuban-primes/JavaScript/cuban-primes.js b/Task/Cuban-primes/JavaScript/cuban-primes.js deleted file mode 100644 index 86fd7b9358..0000000000 --- a/Task/Cuban-primes/JavaScript/cuban-primes.js +++ /dev/null @@ -1,68 +0,0 @@ -const MAX = 1400000; -const primes = new Array(MAX); - -function preCompute() { - // Initialize sieve - for (let i = 2; i < MAX; i++) { - primes[i] = true; - } - - // Sieve of Eratosthenes - for (let i = 2; i < MAX; i++) { - if (primes[i]) { - for (let j = 2 * i; j < MAX; j += i) { - primes[j] = false; - } - } - } -} - -function isPrime(n) { - if (n < MAX) { - return primes[n]; - } - const max = Math.floor(Math.sqrt(n)); - for (let i = 3; i <= max; i++) { - if (primes[i] && n % i === 0) { - return false; - } - } - return true; -} - -function cubanPrime(n, display) { - let count = 0; - let result = 0; - let output = ''; - - for (let i = 0; count < n; i++) { - const test = 1 + 3 * i * (i + 1); - if (isPrime(test)) { - count++; - result = test; - if (display) { - const formatted = test.toLocaleString('en-US').padStart(10); - output += formatted + (count % 10 === 0 ? '\n' : ''); - } - } - } - - if (display) { - console.log(output); - } - return result; -} - -// Main execution -preCompute(); - -// First 200 Cuban primes -cubanPrime(200, true); -console.log(); - -// Specific Cuban primes -for (let i = 1; i <= 5; i++) { - const max = Math.pow(10, i); - const prime = cubanPrime(max, false); - console.log(`${max.toLocaleString('en-US')}-th cuban prime = ${prime.toLocaleString('en-US')}`); -} diff --git a/Task/Cuban-primes/Julia/cuban-primes.jl b/Task/Cuban-primes/Julia/cuban-primes.julia similarity index 100% rename from Task/Cuban-primes/Julia/cuban-primes.jl rename to Task/Cuban-primes/Julia/cuban-primes.julia diff --git a/Task/Cuban-primes/Kotlin/cuban-primes.kts b/Task/Cuban-primes/Kotlin/cuban-primes.kotlin similarity index 100% rename from Task/Cuban-primes/Kotlin/cuban-primes.kts rename to Task/Cuban-primes/Kotlin/cuban-primes.kotlin diff --git a/Task/Cuban-primes/OCaml/cuban-primes.ml b/Task/Cuban-primes/OCaml/cuban-primes.ml deleted file mode 100644 index af8c106059..0000000000 --- a/Task/Cuban-primes/OCaml/cuban-primes.ml +++ /dev/null @@ -1,51 +0,0 @@ -let is_prime (n : int) : bool = - if n = 2 then true else if n < 2 || n mod 2 = 0 then false else - let lim = (n |> float_of_int |> sqrt |> int_of_float) + 1 in - let rec loop = function - | i when i > lim -> true - | i when n mod i = 0 -> false - | i -> loop (i + 2) - in loop 3 - -let char_list_of_string s = List.init (String.length s) (String.get s) - -let commatize (str : string) : string = - let revchars = List.rev (char_list_of_string str) in - let rec take_threes = function - | s, c1 :: c2 :: c3 :: rest -> - take_threes ([c3; c2; c1] :: s, rest) - | ss, rest -> if rest = [] then ss else List.rev rest :: ss - in take_threes ([], List.map Char.escaped revchars) - |> List.map (String.concat "") |> String.concat "," - -let cube (n: int) : int = n * n * n - -let scan_for_cubans (num : int) : int list = - let rec loop = function - | n, ps when List.length ps >= num -> ps - | n, ps -> - let c = cube (n + 1) - cube n in - if is_prime c then loop (n + 1, c :: ps) - else loop (n + 1, ps) in - loop (1, []) |> List.rev - -let nth_cuban (n : int) : int = - let rec loop = function - | i, c, p when c = n -> p - | i, c, p -> - let k = cube (i + 1) - cube i in - if is_prime k then loop (i + 1, c + 1, k) - else loop (i + 1, c, p) in - loop (0, 0, 0) - -let () = - print_endline "The first 200 cuban primes are: "; - scan_for_cubans 200 - |> List.map string_of_int - |> List.map commatize - |> String.concat " | " - |> Printf.printf "[%s]\n\n"; - nth_cuban 100_000 - |> string_of_int - |> commatize - |> Printf.printf "The 100,000th cuban prime is %s\n" diff --git a/Task/Cuban-primes/PascalABC.NET/cuban-primes.pas b/Task/Cuban-primes/PascalABC.NET/cuban-primes.pas deleted file mode 100644 index f54de0f00f..0000000000 --- a/Task/Cuban-primes/PascalABC.NET/cuban-primes.pas +++ /dev/null @@ -1,67 +0,0 @@ -const - cutOff = 200; - bigUn = 100000; - chunks = 50; - little = bigUn div chunks; - -begin - writeln('The first ', cutOff, ' cuban primes:'); - var primes := |int64(3), int64(5)|.ToList; - var c := 0; - var u: int64 := 0; - var v: int64 := 1; - var showEach := true; - while true do - begin - var found := false; - u += 6; - v += u; - var mx := real(v).sqrt.ceil; - foreach var item in primes do - begin - if item > mx then break; - if v mod item = 0 then - begin - found := true; - break - end; - end; - if not found then - begin - c += 1; - if showEach then - begin - for var z := primes.last + 2 to v - 2 step 2 do - begin - var fnd := false; - foreach var item in primes do - begin - if item > mx then break; - if z mod item = 0 then - begin - fnd := true; - break - end; - end; - if not fnd then primes.Add(z); - end; - primes.Add(v); - write(v:9); - if c mod 10 = 0 then writeln; - if c = cutOff then - begin - showEach := false; - write('Progress to the ', bigUn, 'th cuban prime: ') - end; - end; - if c mod little = 0 then - begin - write('.'); - if c = bigUn then break; - end; - end; - end; - writeln(); - writeln('The ', c, 'th cuban prime is ', v); - writeln('Computation time was ', milliseconds / 1000, ' seconds'); -end. diff --git a/Task/Cuban-primes/Phix/cuban-primes.phix b/Task/Cuban-primes/Phix/cuban-primes.phix index 7aa90398b7..29da36d962 100644 --- a/Task/Cuban-primes/Phix/cuban-primes.phix +++ b/Task/Cuban-primes/Phix/cuban-primes.phix @@ -1,32 +1,34 @@ -with javascript_semantics -include mpfr.e -integer np = 0, - i = 2 -mpz p3 = mpz_init(1*1*1), - i3 = mpz_init(), - p = mpz_init(), - pn = mpz_init() +(phixonline)--> + with javascript_semantics + include mpfr.e + integer np = 0, + i = 2 + mpz p3 = mpz_init(1*1*1), + i3 = mpz_init(), + p = mpz_init(), + pn = mpz_init() -printf(1,"The first 200 cuban primes are:\n") -sequence first200 = {} -atom t0 = time() -constant lim = iff(platform()=JS?10000:100000) -while npprintf(1,"The first 200 cuban primes are:\n") + sequence first200 = {} + atom t0 = time() + constant lim = iff(platform()=JS?10000:100000) + while np<lim do + mpz_ui_pow_ui(i3,i,3) + mpz_sub(p,i3,p3) + if mpz_prime(p) then + mpz_set(pn,p) + np += 1 + if np<=200 then + first200 = append(first200,sprintf("%,9d",mpz_get_integer(pn))) + if mod(np,10)=0 then + printf(1,"%s\n",join(first200[-10..-1])) + end if + end if + end if + mpz_set(p3,i3) + i += 1 + end while + printf(1,"\nThe %,dth cuban prime is %s\n",{np,mpz_get_str(pn,comma_fill:=true)}) + {p3,i3,p} = mpz_free({p3,i3,p}) + ?elapsed(time()-t0) + + with javascript_semantics + + atom sdn = 0, sdsum = 0, sdsumsq = 0 + + procedure sdadd(atom n) + sdn += 1 + sdsum += n + sdsumsq += n*n + end procedure + + function sdavg() + return sdsum/sdn + end function + + function sddev() + return sqrt(sdsumsq/sdn - power(sdsum/sdn,2)) + end function + + --test code: + constant testset = {2, 4, 4, 4, 5, 5, 7, 9} + integer ti + for i=1 to length(testset) do + ti = testset[i] + sdadd(ti) + printf(1,"N=%d Item=%d Avg=%5.3f StdDev=%5.3f\n",{i,ti,sdavg(),sddev()}) + end for +: make op! :curry ; curry operator - -; This function will print a string as a heading and print any codes -; to the screen before executing it. -demo: function [s b] [print ["^/==" s "==^/^/" mold/only b "^/>>"] do b] - -demo "Real Currying in Red" [ - -sum: func [a b c][a + b + c] ; -] - -demo "Curry one arg from 'sum', return func with two args (s1)" [ -s1: 'sum -> 1 -print s1 2 3 ; 6 -] - -demo "Curry one arg from 's2', return func with one arg (s2)" [ -s2: 's1 -> 2 -print s2 3 ; 6 -] - -demo "Curry one arg from 's3', return the result" [ -s3: 's2 -> 3 -print s3 ; 6 -] - -demo "Currying all args at once, return the result" [ -print 'sum -> 1 -> 2 -> 3 ; 6 -] - -demo "Currying native control" [ -i: 1 -'while -> [i <= 10] -> [print i i: i + 1] -] - -demo "Currying native control" [ -'repeat -> 'i -> 10 -> [print ["repeating" i]] -] - -demo "Currying anonymous function (lambda)" [ -print (func [a b][a + b]) -> 10 -> 20 ; 30 -] - -demo "Skipping args" [ -f: 'sum -> [] -> [] -> 30 -print f 10 20 -] - -demo "Sample generated code" [ -?? f -] diff --git a/Task/Currying/Rust/currying.rs b/Task/Currying/Rust/currying.rust similarity index 100% rename from Task/Currying/Rust/currying.rs rename to Task/Currying/Rust/currying.rust diff --git a/Task/Curzon-numbers/ALGOL-68/curzon-numbers.alg b/Task/Curzon-numbers/ALGOL-68/curzon-numbers.alg index 67e0b873b7..a2e3971cb0 100644 --- a/Task/Curzon-numbers/ALGOL-68/curzon-numbers.alg +++ b/Task/Curzon-numbers/ALGOL-68/curzon-numbers.alg @@ -5,13 +5,13 @@ BEGIN # find some generalised Curzon numbers - translation of the C++ sample # ELSE LONG INT result := 1; LONG INT base := rqd base MOD mod; - LONG INT ex := rqd exp; - WHILE ex > 0 DO - IF ODD ex THEN + LONG INT exp := rqd exp; + WHILE exp > 0 DO + IF ODD exp THEN result TIMESAB base MODAB mod FI; base TIMESAB base MODAB mod; - ex OVERAB 2 + exp OVERAB 2 OD; result FI # modpow # ; @@ -20,7 +20,7 @@ BEGIN # find some generalised Curzon numbers - translation of the C++ sample # BEGIN LONG INT m = k * n + 1; modpow( k, n, m ) + 1 = m - END # is curzon # ; + END # is curon # ; FOR k FROM 2 BY 2 TO 10 DO print( ( "Curzon numbers with base ", whole( k, 0 ), ":", newline ) ); diff --git a/Task/Curzon-numbers/Ada/curzon-numbers.adb b/Task/Curzon-numbers/Ada/curzon-numbers.adb deleted file mode 100644 index 31133f80d5..0000000000 --- a/Task/Curzon-numbers/Ada/curzon-numbers.adb +++ /dev/null @@ -1,57 +0,0 @@ -with Ada.Text_IO; use Ada.Text_IO; -with Ada.Long_Long_Integer_Text_IO; use Ada.Long_Long_Integer_Text_IO; - -procedure Curzon is - - function Mod_Pow(Base, Exp, Modulo : Long_Long_Integer) return Long_Long_Integer is - Result : Long_Long_Integer := 1; - B : Long_Long_Integer := Base mod Modulo; - E : Long_Long_Integer := Exp; - begin - if Modulo = 1 then return 0; end if; - - while E > 0 loop - if (E mod 2) = 1 then - Result := (Result * B) mod Modulo; - end if; - B := (B * B) mod Modulo; - E := E / 2; - end loop; - - return Result; - end Mod_Pow; - - function Curzon_Check(K, N : Long_Long_Integer) return Boolean is - R : Long_Long_Integer := K * N; - begin - return Mod_Pow(K, N, R + 1) = R; - end Curzon_Check; - - N : Long_Long_Integer; - Count : Integer; - -begin - for K in Long_Long_Integer range 2..10 when K mod 2 = 0 loop - Put("The first 50 Curzon numbers of base "); Put(K, 1); Put(":"); New_Line; - N := 1; - Count := 1; - while Count <= 1000 loop - if Curzon_Check(K, N) then - if Count <= 50 then - Put(N, 4); - if Count mod 10 = 0 then - New_Line; - else - Put(" "); - end if; - end if; - if Count = 1000 then - Put("The 1000th Curzon number of base "); Put(K, 1); Put(": "); Put(N, 5); - New_Line(2); - end if; - Count := @ + 1; - end if; - N := @ + 1; - end loop; - end loop; -end Curzon; diff --git a/Task/Curzon-numbers/Arturo/curzon-numbers.arturo b/Task/Curzon-numbers/Arturo/curzon-numbers.arturo index bf2b21b54d..3b5d0dc511 100644 --- a/Task/Curzon-numbers/Arturo/curzon-numbers.arturo +++ b/Task/Curzon-numbers/Arturo/curzon-numbers.arturo @@ -1,12 +1,24 @@ -curzon?: function [n,base] -> +curzon?: function [n,base]-> zero? (inc base^n) % inc base*n first50: function [b][ - select.first:50 1..∞ 'i -> curzon? i b + result: new [] + i: 1 + while [50 > size result][ + if curzon? i b -> 'result ++ i + i: i + 1 + ] + return result ] oneThousandth: function [b][ - select.n:1000 1..∞ 'i -> curzon? i b + cnt: 0 + i: 1 + while [cnt < 1000][ + if curzon? i b -> cnt: cnt+1 + i: i + 1 + ] + return dec i ] loop select 2..10 => even? 'withBase [ diff --git a/Task/Curzon-numbers/EasyLang/curzon-numbers.easy b/Task/Curzon-numbers/EasyLang/curzon-numbers.easy index 4af14d89ff..377ecd0a69 100644 --- a/Task/Curzon-numbers/EasyLang/curzon-numbers.easy +++ b/Task/Curzon-numbers/EasyLang/curzon-numbers.easy @@ -12,7 +12,7 @@ func pow_mod b power modulus . for k = 2 step 2 to 10 numfmt 0 0 print "First 50 Curzon numbers using a base of " & k & ":" - numfmt 4 0 + numfmt 0 4 n = 1 count = 0 repeat @@ -22,7 +22,9 @@ for k = 2 step 2 to 10 count += 1 if count <= 50 write " " & n - if count mod 9 = 0 : print "" + if count mod 9 = 0 + print "" + . . . until count = 1000 diff --git a/Task/Curzon-numbers/Fortran/curzon-numbers.f b/Task/Curzon-numbers/Fortran/curzon-numbers.f deleted file mode 100644 index 7f03146a4a..0000000000 --- a/Task/Curzon-numbers/Fortran/curzon-numbers.f +++ /dev/null @@ -1,72 +0,0 @@ -! -! Curzon Numbers -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.04 -! GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 on Kubuntu 25.04 -! VSI Fortran x86-64 V8.6-001 on OpenVMS x86_64 V9.2-3 -! No Non-standard features used, should compile on any fairly recent Fortran. -! U.B., September 2025 -! -program Curzon - - implicit none - - integer, parameter :: kint = 8 ! 8-byte-integers are big enough, 4 bytes is insufficient. - - integer (kind=kint) :: base, num, count - - do base=2,10,2 - print ("( 'Curzon numbers with base ', i2,':')"), base - count = 0 - num = 1 - do while (count .lt. 50) - if (isCurzon (num, base)) then - count = count + 1 - write (*, '(i5)', advance='no') num - if (mod (count, 10) .eq. 0 ) write (*,*) ! EOL - end if - num = num + 1 - end do - do - if (isCurzon (num,base)) then - count = count + 1 - if (count .eq. 1000) exit - endif - num = num + 1 - end do - print ("('1000th Curzon number with base ', i0, ': ', i0/)") , base, num - - end do - - contains - - - function isCurzon (n, k) result (YN) - - integer(kind=kint), intent(in) :: n,k - integer(kind=kint) :: m, p - logical :: YN - - m = k*n+1 - p = ModularExp (k,n,m) + 1 - YN = m .eq. p - - end function isCurzon - - function ModularExp(a, b, n) result(d) - - integer(kind=kint) , intent(in) :: a,b,n - integer (kind=kint) :: d - integer (kind=kint) :: i, k - d = 1 - k = 0 - do while (ishft (b, -k) .gt. 0) - k = k + 1 - end do - do i = k - 1, 0, -1 - d = mod (d*d, n) - if (iand (ishft (b, -i) , 1_kint) .gt. 0) d = mod (d*a ,n); - end do - - end function ModularExp - -end program Curzon diff --git a/Task/Curzon-numbers/FutureBasic/curzon-numbers.basic b/Task/Curzon-numbers/FutureBasic/curzon-numbers.basic deleted file mode 100644 index 8582321486..0000000000 --- a/Task/Curzon-numbers/FutureBasic/curzon-numbers.basic +++ /dev/null @@ -1,48 +0,0 @@ -include "NSLog.incl" -_thereIsHope = _true -nsLogSetTitle(@"Curzon numbers in Futurebasic") -NumberFormatterRef form : form = fn NumberFormatterInit -NumberFormatterSetPositiveFormat( form, @"#,###,###" ) - -local fn comma( n as uint32, pad as byte )as CFStringRef - CFStringRef s = fn NumberFormatterStringFromNumber( form,¬ - fn NumberWithInteger( n ) ) -end fn = fn StringWithFormat(@"%@%@", right(@" ", pad-len(s)), s) - -local fn powMod(b as uint64, p as uint64, m as uint64) as uint64 - uint64 x = 1 - while p - if (p & 1) then x = (x * b) % m - b = (b * b) % m - p = p >> 1 - wend -end fn = x - -local fn curzon - CFStringRef s - uint64 k, n, kn1, count - - for k = 2 to 12 step 2 - n = 1 : count = 0 : kn1 = k * n + 1 : s = @"" - NSLog( @"\n First 50 Curzon numbers with base = %d:", k ) - - while _thereIsHope - if fn powMod(k, n, kn1) + 1 == kn1 - count ++ - select count - case <= 50 : s = fn StringWithFormat(@"%@%@", s, fn comma(n, 7)) - if (count Mod 10) = 0 Then s = fn StringWithFormat(@"%@\n", s) - case 1000 : nslog( @"%@ 1,000th: %@", s, fn comma(n, 0)) - break - end select - end if - n++ : kn1 += k - wend - - next - -end fn - -fn curzon - -handleevents diff --git a/Task/Curzon-numbers/Icon/curzon-numbers.icon b/Task/Curzon-numbers/Icon/curzon-numbers.icon deleted file mode 100644 index 6b7af7dfe8..0000000000 --- a/Task/Curzon-numbers/Icon/curzon-numbers.icon +++ /dev/null @@ -1,18 +0,0 @@ -procedure main(A) - limit := \A[1] | 50 - every b := 2 to 10 by 2 do { - writes("Base integer ",b,":") - every (cnt := 0, n := curzon(b)\1000, cnt +:= 1) do - if cnt <= 50 then writes(" ",n) - write("\n\t1000th Curzon number is ",n) - write("\n") - } -end - -procedure curzon(b) - every n := seq() do { - x := b^n+1 - y := b*n+1 - suspend ((x/y)*y = x, n) - } -end diff --git a/Task/Curzon-numbers/JavaScript/curzon-numbers.js b/Task/Curzon-numbers/JavaScript/curzon-numbers.js deleted file mode 100644 index d267fa088f..0000000000 --- a/Task/Curzon-numbers/JavaScript/curzon-numbers.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Curzon Numbers - * - * A generalized Curzon number is a positive integer n such that: - * k^n + 1 is divisible by (k * n + 1) - * For k = 2, this gives the classic definition of Curzon numbers - */ - -function isGeneralisedCurzonNumber(aK, aN) { - const r = aK * aN; - return modulusPower(aK, aN, r + 1) === r; -} - -function modulusPower(aBase, aExponent, aModulus) { - if (aModulus === 1) { - return 0; - } - - aBase %= aModulus; - let result = 1; - while (aExponent > 0) { - if ((aExponent & 1) === 1) { - result = (result * aBase) % aModulus; - } - aBase = (aBase * aBase) % aModulus; - aExponent >>= 1; - } - return result; -} - -function main() { - for (let k = 2; k <= 10; k += 2) { - console.log(`Generalised Curzon numbers with base ${k}:`); - - let n = 1; - let count = 0; - const results = []; - - // Find the first 50 Curzon numbers - while (count < 50) { - if (isGeneralisedCurzonNumber(k, n)) { - results.push(n); - count++; - } - n++; - } - - // Print in rows of 10 - for (let i = 0; i < results.length; i++) { - const lineEnd = (i + 1) % 10 === 0 ? '\n' : ' '; - process.stdout.write(`${results[i].toString().padStart(4)}${lineEnd}`); - } - - // Reset and find the 1000th Curzon number - count = 0; - while (count < 1000) { - if (isGeneralisedCurzonNumber(k, n)) { - count++; - } - n++; - } - - console.log(`1,000th Generalised Curzon number with base ${k}: ${n - 1}`); - console.log(); - } -} - -main(); diff --git a/Task/Curzon-numbers/Julia/curzon-numbers.jl b/Task/Curzon-numbers/Julia/curzon-numbers.julia similarity index 100% rename from Task/Curzon-numbers/Julia/curzon-numbers.jl rename to Task/Curzon-numbers/Julia/curzon-numbers.julia diff --git a/Task/Curzon-numbers/OCaml/curzon-numbers.ml b/Task/Curzon-numbers/OCaml/curzon-numbers.ocaml similarity index 100% rename from Task/Curzon-numbers/OCaml/curzon-numbers.ml rename to Task/Curzon-numbers/OCaml/curzon-numbers.ocaml diff --git a/Task/Curzon-numbers/PascalABC.NET/curzon-numbers.pas b/Task/Curzon-numbers/PascalABC.NET/curzon-numbers.pas deleted file mode 100644 index abf583bd72..0000000000 --- a/Task/Curzon-numbers/PascalABC.NET/curzon-numbers.pas +++ /dev/null @@ -1,27 +0,0 @@ -## -function isCurzon(n: integer; k: biginteger) := (Power(k, n) + 1) mod (k * n + 1) = 0; - -function curzonnumbers(k: integer): sequence of integer; -begin - var n := 1; - while true do - begin - if iscurzon(n, k) then yield n; - n += 1; - end; -end; - -foreach var k in |2, 4, 6, 8, 10| do -begin - var i := 1; - println('Curzonnumbers with base', k); - foreach var n in curzonnumbers(k) do - begin - Write(n:5); - if (i mod 10) = 0 then println; - if i = 50 then break; - i += 1; - end; - println('1000th Curzon number', curzonnumbers(k).Skip(999).First); - println; -end; diff --git a/Task/Curzon-numbers/Pluto/curzon-numbers.pluto b/Task/Curzon-numbers/Pluto/curzon-numbers.pluto deleted file mode 100644 index 4f3877ba38..0000000000 --- a/Task/Curzon-numbers/Pluto/curzon-numbers.pluto +++ /dev/null @@ -1,27 +0,0 @@ -local int = require "int" -local fmt = require "fmt" - -local function is_curzon(n, k) - local r = k * n - return int.modpow(k, n, r+1) == r -end - -for k = 2, 10, 2 do - print($"The first 50 Curzon numbers with base {k}:") - local n = 1 - local count = 0 - while count < 50 do - if is_curzon(n, k) then - fmt.write("%4d ", n) - count += 1 - if count % 10 == 0 then print() end - end - n += 1 - end - while true do - if is_curzon(n, k) then count += 1 end - if count == 1000 then break end - n += 1 - end - fmt.print("\nOne thousandth: %s\n", fmt.int(n)) -end diff --git a/Task/Curzon-numbers/R/curzon-numbers.r b/Task/Curzon-numbers/R/curzon-numbers.r deleted file mode 100644 index 8a16e5057d..0000000000 --- a/Task/Curzon-numbers/R/curzon-numbers.r +++ /dev/null @@ -1,18 +0,0 @@ -library(gmp) - -first50curzons <- function(k){ - n <- 1 - big_k <- as.bigz(k) - curzons <- numeric(0) - while(length(curzons)<50){ - if(denominator((1+big_k^n)/(1+big_k*n))==1){ - curzons <- c(curzons, n) - } - n <- n+1 - } - return(curzons) -} - -curzons_list <- lapply(2*(1:5), first50curzons) -names(curzons_list) <- sapply(2*(1:5), function(k) paste("Base", k)) -print(curzons_list) diff --git a/Task/Curzon-numbers/Rust/curzon-numbers.rs b/Task/Curzon-numbers/Rust/curzon-numbers.rust similarity index 100% rename from Task/Curzon-numbers/Rust/curzon-numbers.rs rename to Task/Curzon-numbers/Rust/curzon-numbers.rust diff --git a/Task/Curzon-numbers/V-(Vlang)/curzon-numbers.v b/Task/Curzon-numbers/V-(Vlang)/curzon-numbers.v index e83025f01d..97ef9aecdd 100644 --- a/Task/Curzon-numbers/V-(Vlang)/curzon-numbers.v +++ b/Task/Curzon-numbers/V-(Vlang)/curzon-numbers.v @@ -15,12 +15,16 @@ fn main() { d := k*n + 1 bd := big.integer_from_i64(d) if z%bd == zero { - if count < 50 {curzon50 << n} + if count < 50 { + curzon50 << n + } count++ if count == 50 { for i in 0..curzon50.len { print("${curzon50[i]:4} ") - if (i+1)%10 == 0 {println("")} + if (i+1)%10 == 0 { + println('') + } } print("\nOne thousandth: ") } @@ -32,6 +36,6 @@ fn main() { n++ pow *= bk } - println("") + println('') } } diff --git a/Task/Cut-a-rectangle/11l/cut-a-rectangle.11l b/Task/Cut-a-rectangle/11l/cut-a-rectangle.11l index 8d7453b033..d4b659d834 100644 --- a/Task/Cut-a-rectangle/11l/cut-a-rectangle.11l +++ b/Task/Cut-a-rectangle/11l/cut-a-rectangle.11l @@ -19,7 +19,7 @@ F cut_it(=h, =w) V t = y * (@w + 1) + x @grid[t] = @grid[@blen - t] = 1B - L(i) 0.<4 + L(i) 4 I !@grid[t + @next[i]] count = @walk(y + @dirs[i][0], x + @dirs[i][1], count) diff --git a/Task/Cut-a-rectangle/Delphi/cut-a-rectangle.pas b/Task/Cut-a-rectangle/Delphi/cut-a-rectangle.delphi similarity index 100% rename from Task/Cut-a-rectangle/Delphi/cut-a-rectangle.pas rename to Task/Cut-a-rectangle/Delphi/cut-a-rectangle.delphi diff --git a/Task/Cut-a-rectangle/EasyLang/cut-a-rectangle.easy b/Task/Cut-a-rectangle/EasyLang/cut-a-rectangle.easy index fb028df61c..adf933a05a 100644 --- a/Task/Cut-a-rectangle/EasyLang/cut-a-rectangle.easy +++ b/Task/Cut-a-rectangle/EasyLang/cut-a-rectangle.easy @@ -1,7 +1,7 @@ global grid[] blen w h cnt . dir[][] = [ [ 0 -1 ] [ -1 0 ] [ 0 1 ] [ 1 0 ] ] # -proc walk y x . +proc walk y x . . if y = 0 or y = h or x = 0 or x = w cnt += 2 return @@ -20,10 +20,12 @@ proc walk y x . grid[t] -= 1 grid[blen - t] -= 1 . -proc solve hh ww recur . +proc solve hh ww recur . . w = ww h = hh - if h mod 2 = 1 : swap h w + if h mod 2 = 1 + swap h w + . if h mod 2 = 1 cnt = 0 return @@ -61,7 +63,7 @@ proc solve hh ww recur . solve w h 0 . . -proc main . +proc main . . for y = 1 to 8 for x = 1 to y if x mod 2 = 0 or y mod 2 = 0 diff --git a/Task/Cut-a-rectangle/Elixir/cut-a-rectangle-1.ex b/Task/Cut-a-rectangle/Elixir/cut-a-rectangle-1.elixir similarity index 100% rename from Task/Cut-a-rectangle/Elixir/cut-a-rectangle-1.ex rename to Task/Cut-a-rectangle/Elixir/cut-a-rectangle-1.elixir diff --git a/Task/Cut-a-rectangle/Elixir/cut-a-rectangle-2.ex b/Task/Cut-a-rectangle/Elixir/cut-a-rectangle-2.elixir similarity index 100% rename from Task/Cut-a-rectangle/Elixir/cut-a-rectangle-2.ex rename to Task/Cut-a-rectangle/Elixir/cut-a-rectangle-2.elixir diff --git a/Task/Cut-a-rectangle/FreeBASIC/cut-a-rectangle.basic b/Task/Cut-a-rectangle/FreeBASIC/cut-a-rectangle.basic deleted file mode 100644 index f5feed96bb..0000000000 --- a/Task/Cut-a-rectangle/FreeBASIC/cut-a-rectangle.basic +++ /dev/null @@ -1,77 +0,0 @@ -Dim Shared As Ubyte grilla() -Dim Shared As Integer ancho, alto, longitud -Dim Shared As Integer cnt -Dim Shared As Integer sgte(3) -Dim Shared As Integer direcc(3, 1) => {{0, -1}, {-1, 0}, {0, 1}, {1, 0}} - -Sub Camino(y As Integer, x As Integer) - If y = 0 Or y = alto Or x = 0 Or x = ancho Then - cnt += 2 - Return - End If - Dim As Integer t = y * (ancho + 1) + x - grilla(t) += 1 - grilla(longitud - t) += 1 - For i As Integer = 0 To 3 - If grilla(t + sgte(i)) = 0 Then Camino(y + direcc(i, 0), x + direcc(i, 1)) - Next - grilla(t) -= 1 - grilla(longitud - t) -= 1 -End Sub - -Function Solve(hh As Integer, ww As Integer, recur As Boolean) As Integer - alto = hh - ancho = ww - - If (alto And 1) <> 0 Then Swap alto, ancho - - Select Case True - Case (alto And 1) = 1 - Return 0 - Case ancho = 1 - Return 1 - Case ancho = 2 - Return alto - Case alto = 2 - Return ancho - End Select - - Dim As Integer cy = alto \ 2 - Dim As Integer cx = ancho \ 2 - - Redim grilla((alto + 1) * (ancho + 1)) - longitud = (alto + 1) * (ancho + 1) - 1 - sgte(0) = -1 - sgte(1) = -ancho - 1 - sgte(2) = 1 - sgte(3) = ancho + 1 - - If recur Then cnt = 0 - - For x As Integer = cx + 1 To ancho - 1 - Dim As Integer t = cy * (ancho + 1) + x - grilla(t) = 1 - grilla(longitud - t) = 1 - Camino(cy - 1, x) - Next - cnt += 1 - - If alto = ancho Then - cnt *= 2 - Elseif (ancho And 1) = 0 And recur Then - Solve(ancho, alto, 0) - End If - - Return cnt -End Function - -Dim As Integer y, x -For y = 1 To 10 - For x = 1 To y - If (x And 1) = 0 Or (y And 1) = 0 Then - Print Using "& x &: &"; y; x; Solve(y, x, True) - End If - Next -Next - -Sleep diff --git a/Task/Cut-a-rectangle/Julia/cut-a-rectangle.jl b/Task/Cut-a-rectangle/Julia/cut-a-rectangle.julia similarity index 100% rename from Task/Cut-a-rectangle/Julia/cut-a-rectangle.jl rename to Task/Cut-a-rectangle/Julia/cut-a-rectangle.julia diff --git a/Task/Cut-a-rectangle/Kotlin/cut-a-rectangle.kts b/Task/Cut-a-rectangle/Kotlin/cut-a-rectangle.kotlin similarity index 100% rename from Task/Cut-a-rectangle/Kotlin/cut-a-rectangle.kts rename to Task/Cut-a-rectangle/Kotlin/cut-a-rectangle.kotlin diff --git a/Task/Cut-a-rectangle/Pluto/cut-a-rectangle.pluto b/Task/Cut-a-rectangle/Pluto/cut-a-rectangle.pluto deleted file mode 100644 index cbb8e6370a..0000000000 --- a/Task/Cut-a-rectangle/Pluto/cut-a-rectangle.pluto +++ /dev/null @@ -1,68 +0,0 @@ -require "table2" -local fmt = require "fmt" - -local count = {0} -local dir = {{0, -1}, {-1, 0}, {0, 1}, {1, 0}} - -local function walk(y, x, h, w, grid, len, nxt) - if y == 0 or y == h or x == 0 or x == w then - count[1] += 2 - return - end - local t = y * (w + 1) + x - grid[t + 1] += 1 - grid[len - t + 1] += 1 - for i = 1, 4 do - if grid[t + nxt[i] + 1] == 0 then - walk(y + dir[i][1], x + dir[i][2], h, w, grid, len, nxt) - end - end - grid[t + 1] -= 1 - grid[len - t + 1] -= 1 -end - -local function cutrectangle(hh, ww, recur) - local h, w - if hh % 2 != 0 then - h, w = ww, hh - else - h, w = hh, ww - end - if h % 2 != 0 then - return 0 - elseif w == 1 then - return 1 - elseif w == 2 then - return h - elseif h == 2 then - return w - end - local cy = h // 2 - local cx = w // 2 - local len = (h + 1) * (w + 1) - local grid = table.rep(len, 0) - len -= 1 - local nxt = {-1, -w - 1, 1, w + 1} - if recur then count[1] = 0 end - for x = cx + 1, w - 1 do - local t = cy * (w + 1) + x - grid[t + 1] = 1 - grid[len - t + 1] = 1 - walk(cy - 1, x, h, w, grid, len, nxt) - end - count[1] += 1 - if h == w then - count[1] *= 2 - elseif w % 2 == 0 and recur then - cutrectangle(w, h, false) - end - return count[1] -end - -for y = 1, 10 do - for x = 1, y do - if x % 2 == 0 or y % 2 == 0 then - fmt.print($"%2d x %2d: %d", y, x, cutrectangle(y, x, true)) - end - end -end diff --git a/Task/Cut-a-rectangle/Rust/cut-a-rectangle.rs b/Task/Cut-a-rectangle/Rust/cut-a-rectangle.rust similarity index 100% rename from Task/Cut-a-rectangle/Rust/cut-a-rectangle.rs rename to Task/Cut-a-rectangle/Rust/cut-a-rectangle.rust diff --git a/Task/Cut-a-rectangle/Uiua/cut-a-rectangle.uiua b/Task/Cut-a-rectangle/Uiua/cut-a-rectangle.uiua deleted file mode 100644 index 8244367fdb..0000000000 --- a/Task/Cut-a-rectangle/Uiua/cut-a-rectangle.uiua +++ /dev/null @@ -1,6 +0,0 @@ -Set ← ⍜⊡⋅2++¯1ׯ1⊙⊸△ ⟜⍜⊡⋅1 -HasSpace ← >0/+♭⌕0 -N₄ ← [1_0 0_1 ¯1_0 0_¯1] -Nexts ← ◴≡⌟Set▽=0◡⬚¯1⊡♭₂⊞+N₄⊚⊸⌕1 -Cuts ← ◴≡⊣path(□◴/◇⊂≡(□Nexts)°□|¬HasSpace°□) □[Set 0_0] ↯⊙0 -≡(&s&p⊸⧻°□⊢Cuts) [2_3 3_4 4_5] diff --git a/Task/Cyclops-numbers/Arturo/cyclops-numbers.arturo b/Task/Cyclops-numbers/Arturo/cyclops-numbers.arturo index dcd7b02c78..eea8b0fc9d 100644 --- a/Task/Cyclops-numbers/Arturo/cyclops-numbers.arturo +++ b/Task/Cyclops-numbers/Arturo/cyclops-numbers.arturo @@ -3,7 +3,7 @@ cyclops?: function [n][ all? @[ -> odd? size digs -> zero? digs\[(size digs)/2] - -> one? match.count to :string n "0" + -> 1 = size match to :string n "0" ] ] diff --git a/Task/Cyclops-numbers/C-sharp/cyclops-numbers.cs b/Task/Cyclops-numbers/C-sharp/cyclops-numbers.cs deleted file mode 100644 index 272a948842..0000000000 --- a/Task/Cyclops-numbers/C-sharp/cyclops-numbers.cs +++ /dev/null @@ -1,191 +0,0 @@ -internal class Program -{ - private static void Main(string[] args) - { - long number = 1; - int displayMax = 50; - long highBar = 10_000_000; - - List cyclops = []; - int cyclopsCount = 0; - long firstCyclopsOverHighBar = 0; - int firstCyclopsOverHighBarIndex = 0; - List primeCyclops = []; - int primeCyclopsCount = 0; - long firstPrimeCyclopsOverHighBar = 0; - int firstPrimeCyclopsOverHighBarIndex = 0; - List primeBlindCyclops = []; - int primeBlindCyclopsCount = 0; - long firstPrimeBlindCyclopsOverHighBar = 0; - int firstPrimeBlindCyclopsOverHighBarIndex = 0; - List primePalindroneCyclops = []; - int primePalindromCyclopsCount = 0; - long firstPrimePalindromeCyclopsOverHighBar = 0; - int firstPrimePalindromeCyclopsOverHighBarIndex = 0; - - while (firstCyclopsOverHighBarIndex == 0 || cyclopsCount < displayMax - || firstPrimeCyclopsOverHighBarIndex == 0 || primeCyclopsCount < displayMax - || firstPrimeBlindCyclopsOverHighBarIndex == 0 || primeBlindCyclopsCount < displayMax - || firstPrimePalindromeCyclopsOverHighBarIndex == 0 || primePalindromCyclopsCount < displayMax) - { - if (IsCyclopsNumber(number)) - { - cyclopsCount++; - - if (cyclops.Count < displayMax) - { - cyclops.Add(number); - } - - if (firstCyclopsOverHighBarIndex == 0 && number > highBar) - { - firstCyclopsOverHighBar = number; - firstCyclopsOverHighBarIndex = cyclopsCount; - } - - if (IsPrime(number)) - { - primeCyclopsCount++; - - if (firstPrimeCyclopsOverHighBarIndex == 0 && number > highBar) - { - firstPrimeCyclopsOverHighBar = number; - firstPrimeCyclopsOverHighBarIndex = primeCyclopsCount; - } - - if (primeCyclops.Count < displayMax) - { - primeCyclops.Add(number); - } - - if (IsPrime(BlindCyclopsNumber(number))) - { - primeBlindCyclopsCount++; - - if (firstPrimeBlindCyclopsOverHighBarIndex == 0 && number > highBar) - { - firstPrimeBlindCyclopsOverHighBar = number; - firstPrimeBlindCyclopsOverHighBarIndex = primeBlindCyclopsCount; - } - - if (primeBlindCyclops.Count < displayMax) - { - primeBlindCyclops.Add(number); - } - } - - if (IsPalindrome(number.ToString())) - { - primePalindromCyclopsCount++; - - if (firstPrimePalindromeCyclopsOverHighBarIndex == 0 && number > highBar) - { - firstPrimePalindromeCyclopsOverHighBar = number; - firstPrimePalindromeCyclopsOverHighBarIndex = primePalindromCyclopsCount; - } - - if (primePalindroneCyclops.Count < displayMax) - { - primePalindroneCyclops.Add(number); - } - } - } - } - - number++; - } - - DisplayNumberSequence(cyclops, $"First {displayMax} Cyclops Numbers", highBar, firstCyclopsOverHighBarIndex, firstCyclopsOverHighBar); - DisplayNumberSequence(primeCyclops, $"First {displayMax} Prime Cyclops Numbers", highBar, firstPrimeCyclopsOverHighBarIndex, firstPrimeCyclopsOverHighBar); - DisplayNumberSequence(primeBlindCyclops, $"First {displayMax} Blind Prime Cyclops Numbers", highBar, firstPrimeBlindCyclopsOverHighBarIndex, firstPrimeBlindCyclopsOverHighBar); - DisplayNumberSequence(primePalindroneCyclops, $"First {displayMax} Palidrome Cyclops Numbers", highBar, firstPrimePalindromeCyclopsOverHighBarIndex, firstPrimePalindromeCyclopsOverHighBar); - } - - private static void DisplayNumberSequence(List numbers, string title, - long highBar, long firstIndexOverHighBar, long firstOverHighBar) - { - Console.WriteLine(title); - - for (int i = 0; i < numbers.Count; i++) - { - Console.Write($"{numbers[i],-7} "); - - if ((i + 1) % 10 == 0) - { - Console.WriteLine(); - } - } - - Console.WriteLine($"The first such number > {highBar} is the {firstIndexOverHighBar}th: {firstOverHighBar}"); - Console.WriteLine(); - } - - private static bool IsCyclopsNumber(long number ) - { - string numberAsString = number.ToString(); - int numberLength = numberAsString.Length; - int middleDigit = numberLength / 2; - - if (numberLength > 1 && numberLength % 2 !=0 // the number has an odd number of digits greater than one - && numberAsString.Count(c => c == '0') == 1 // there is only one zero - && numberAsString[middleDigit] == '0') // Zero is the middle digit - { - return true; - } - return false; - } - - private static bool IsPalindrome(string stringInput) - { - if (stringInput != null && stringInput.Length > 0) - { - var reversedString = new string(stringInput.ToCharArray().Reverse().ToArray()); - return stringInput == reversedString; - } - - return false; - } - - private static long BlindCyclopsNumber(long number) - { - string numberAsString = number.ToString(); - int numberLength = numberAsString.Length; - int middleDigit = numberLength / 2; - string blindNumber = string.Concat(numberAsString.AsSpan(0, middleDigit), numberAsString.AsSpan(middleDigit + 1, numberLength - (middleDigit + 1))); - return long.Parse(blindNumber); - } - - private static bool IsPrime(long number) - { - if (number < 2) - { - return false; - } - - if (number % 2 == 0) - { - return number == 2; - } - - if (number % 3 == 0) - { - return number == 3; - } - - int delta = 2; - long k = 5; - - while (k * k <= number) - { - if (number % k == 0) - { - return false; - } - - k += delta; - delta = 6 - delta; - } - - return true; - } -} diff --git a/Task/Cyclops-numbers/Delphi/cyclops-numbers.pas b/Task/Cyclops-numbers/Delphi/cyclops-numbers.delphi similarity index 100% rename from Task/Cyclops-numbers/Delphi/cyclops-numbers.pas rename to Task/Cyclops-numbers/Delphi/cyclops-numbers.delphi diff --git a/Task/Cyclops-numbers/EasyLang/cyclops-numbers.easy b/Task/Cyclops-numbers/EasyLang/cyclops-numbers.easy index ad71b86e86..24688034b0 100644 --- a/Task/Cyclops-numbers/EasyLang/cyclops-numbers.easy +++ b/Task/Cyclops-numbers/EasyLang/cyclops-numbers.easy @@ -1,5 +1,7 @@ -fastfunc is_cyclops n . - if n = 0 : return 1 +func is_cyclops n . + if n = 0 + return 1 + . m = n mod 10 while m <> 0 count += 1 @@ -13,13 +15,14 @@ fastfunc is_cyclops n . n = n div 10 m = n mod 10 . - if n = 0 and count = 0 : return 1 - return 0 + return if n = 0 and count = 0 . fastfunc isprim num . i = 2 while i <= sqrt num - if num mod i = 0 : return 0 + if num mod i = 0 + return 0 + . i += 1 . return 1 @@ -39,17 +42,16 @@ func blind n . . return n . -fastfunc is_palindr n . +func is_palindr n . l = n while l <> 0 m = l mod 10 k = 10 * k + m l = l div 10 . - if n = k : return 1 - return 0 + return if n = k . -proc show . +proc show . . while cnt < 50 if is_cyclops i = 1 write i & " " @@ -62,7 +64,7 @@ proc show . i = 2 cnt = 0 while cnt < 50 - if isprim i = 1 and is_cyclops i = 1 + if is_cyclops i = 1 and isprim i = 1 write i & " " cnt += 1 . @@ -93,6 +95,5 @@ proc show . . i += 1 . - print "" . show diff --git a/Task/Cyclops-numbers/Elixir/cyclops-numbers.ex b/Task/Cyclops-numbers/Elixir/cyclops-numbers.elixir similarity index 100% rename from Task/Cyclops-numbers/Elixir/cyclops-numbers.ex rename to Task/Cyclops-numbers/Elixir/cyclops-numbers.elixir diff --git a/Task/Cyclops-numbers/Fortran/cyclops-numbers.f b/Task/Cyclops-numbers/Fortran/cyclops-numbers.f deleted file mode 100644 index 161c8af7aa..0000000000 --- a/Task/Cyclops-numbers/Fortran/cyclops-numbers.f +++ /dev/null @@ -1,615 +0,0 @@ -! -! Cyclops Numbers -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.10 -! GNU Fortran (Ubuntu 15.2.0-4ubuntu4) 15.2.0 on Kubuntu 25.10 -! VSI Fortran x86-64 V8.6-001 on OpenVMS x86_64 V9.2-3 -! No Non-standard features used, should compile on any fairly recent Fortran. -! Original Pascal code converted to Fortran -! U.B., October 2025 -!============================================================================== - -module CyclopsNumbers - implicit none - -! Constants - integer, parameter :: BIGLIMIT = 10000000 ! Upper limit for number search - integer, parameter :: MAX_DIGITS = 10 ! Maximum digits in base-9 representation - - ! Type for numbers in base-9 representation - type Num9 - integer :: nmdgts(0:MAX_DIGITS) ! Digits in base-9 (0-8) - integer :: nmMaxDgtIdx ! Highest digit index used - integer(kind=8) :: nmNum ! Actual numerical value - end type Num9 - - ! Type for cyclops numbers (left + zero + right parts) - type CyclopsNum - type(Num9) :: cnRight, cnLeft ! Right and left parts around zero - integer(kind=8) :: cnNum ! Complete cyclops number - integer :: cndigits ! Number of digits in each side - integer :: cnIdx ! Index of cyclops number - end type CyclopsNum - - ! Global arrays for precomputed values - integer(kind=8) :: cnMin(0:15) ! Minimum values for digit counts - integer(kind=8) :: cnPow10Shift(0:15) ! Powers of 10 for shifting - integer(kind=8) :: cnPow9(0:15) ! Powers of 9 for indexing - - ! Dynamic array to store found cyclops numbers - integer(kind=8), allocatable :: Cyclops(:) - -contains - - !============================================================================ - ! Initialize precomputed arrays for minimum values and powers - ! cnMin: (0, 1, 11, 111, 1111, ...) - minimum values for n-digit numbers - ! cnPow10Shift: (100, 1000, 10000, ...) - powers of 10 for position shifting - ! cnPow9: (1, 9, 81, 729, ...) - powers of 9 for base conversion - !============================================================================ - subroutine InitCnMinPow() - integer :: i - integer(kind=8) :: min_val, pow, pow9 - - min_val = 0 - pow = 100 - pow9 = 1 - - do i = 0, 15 - cnMin(i) = min_val - min_val = 10 * min_val + 1 ! Build numbers like 1, 11, 111, ... - cnPow10Shift(i) = pow - pow = pow * 10 ! Next power of 10 - cnPow9(i) = pow9 - pow9 = pow9 * 9 ! Next power of 9 - end do - end subroutine InitCnMinPow - - !============================================================================ - ! Reset a Num9 type to minimum value for given digit count - ! @param tn: Num9 object to clear - ! @param idx: Digit count index - !============================================================================ - subroutine ClearNum9 (tn, idx) - type(Num9), intent(out) :: tn - integer, intent(in) :: idx - integer :: i - - tn%nmdgts = 0 ! Clear all digits - tn%nmMaxDgtIdx = 0 ! Reset max digit index - tn%nmNum = cnMin(idx + 1) ! Set to minimum value - end subroutine ClearNum9 - - !============================================================================ - ! Initialize a cyclops number to starting state - ! @param cn: CyclopsNum object to initialize - !============================================================================ - subroutine InitCycNum(cn) - type(CyclopsNum), intent(out) :: cn - - cn%cndigits = 0 ! Start with 0 digits each side - call ClearNum9(cn%cnLeft, 0) ! Clear left part - call ClearNum9(cn%cnRight, 0) ! Clear right part - cn%cnNum = 0 ! Zero value - cn%cnIdx = 0 ! Start index - end subroutine InitCycNum - - !============================================================================ - ! Increment a base-9 number, handling carry-over - ! @param tn: Num9 object to increment - !============================================================================ - subroutine IncNum9(tn) - type(Num9), intent(inout) :: tn - integer :: idx, fac, n, i - - idx = 0 - fac = 1 - n = tn%nmdgts(0) + 1 ! Increment least significant digit - tn%nmNum = tn%nmNum + 1 ! Increment numerical value - - ! Handle carry-over propagation - do - if (n < 9) exit ! No carry-over needed - - ! Carry-over occurs - tn%nmNum = tn%nmNum + fac ! Adjust numerical value - tn%nmdgts(idx) = 0 ! Reset current digit - idx = idx + 1 ! Move to next digit - fac = fac * 10 ! Increase factor for numerical adjustment - - if (idx > MAX_DIGITS) exit ! Check bounds - n = tn%nmdgts(idx) + 1 ! Get next digit + 1 - end do - - ! Store final digit value - if (idx <= MAX_DIGITS) then - tn%nmdgts(idx) = n - if (tn%nmMaxDgtIdx < idx) then - tn%nmMaxDgtIdx = idx ! Update max digit index if needed - end if - end if - end subroutine IncNum9 - - !============================================================================ - ! Generate the next cyclops number in sequence - ! @param cycnum: Current cyclops number to advance - !============================================================================ - subroutine NextCycNum(cycnum) - type(CyclopsNum), intent(inout) :: cycnum - - if (cycnum%cnIdx /= 0) then - ! Normal case: increment from previous number - call IncNum9(cycnum%cnRight) ! Increment right part - - ! Check if right part overflowed (needs more digits) - if (cycnum%cnRight%nmMaxDgtIdx > cycnum%cndigits) then - call ClearNum9(cycnum%cnRight, cycnum%cndigits) ! Reset right to minimum - call IncNum9(cycnum%cnLeft) ! Increment left part - - ! Check if left part overflowed (needs more digits) - if (cycnum%cnLeft%nmMaxDgtIdx > cycnum%cndigits) then - cycnum%cndigits = cycnum%cndigits + 1 ! Increase digit count - call ClearNum9(cycnum%cnLeft, cycnum%cndigits) ! Reset left - call ClearNum9(cycnum%cnRight, cycnum%cndigits) ! Reset right - if (cycnum%cndigits > MAX_DIGITS) then - cycnum%cndigits = MAX_DIGITS ! Enforce maximum - end if - end if - end if - - ! Reconstruct complete cyclops number: left * 10^(digits+1) + right - cycnum%cnNum = cycnum%cnLeft%nmNum * cnPow10Shift(cycnum%cndigits) + cycnum%cnRight%nmNum - cycnum%cnIdx = cycnum%cnIdx + 1 - else - ! Special case: first cyclops number - cycnum%cnNum = 101 - cycnum%cnIdx = 1 - end if - end subroutine NextCycNum - - - !============================================================================ - ! Make a complete Palindromic Cyclops number when left half is already setup. - ! Argument is already initialized to have its left half setup as needed. - ! Fill digits of right half in reversed order. - ! @param cycnum: half-filled Cyclops number to be completed as palindrome. - !============================================================================ - - subroutine MakePalinCycNum (cycnum) - type(CyclopsNum), intent(inout) :: cycnum - - ! make right to have reversed digits of left - integer :: n,dgt - integer :: i,j - - n = 0 - i = 0 - do j = cycnum%cnDigits, 0 , -1 - dgt = cycnum%cnLeft%nmdgts(i) - cycnum%cnRight%nmdgts(j) = dgt - n = 10*n+(dgt+1) - i = i + 1 - end do - cycnum%cnRight%nmNum = n - cycnum%cnNum = cycnum%cnLeft%nmNum*cnPow10Shift(cycnum%cndigits)+n - end subroutine MakePalinCycNum - - - - !============================================================================ - ! Increment left half of a Cyclops number, handling carry-over - !============================================================================ - - subroutine IncLeftCn( cn ) - - type(CyclopsNum), intent(inout) :: cn - - ! set right digits to minimum - call ClearNum9 (cn%cnRight,cn%cndigits) - ! increment left digits - call IncNum9 (cn%cnLeft) - ! One more digit in left half? - if (cn%cnLeft%nmMaxDgtIdx > cn%cndigits) then ! left has more digits than before? - cn%cndigits = cn%cndigits + 1 ! Increment for entire Cyclops number - call ClearNum9(cn%cnLeft,cn%cndigits) ! Set left to minimum for new number of digits - call ClearNum9(cn%cnRight,cn%cndigits) ! Set right to minimum for new number of digits - if (cn%cndigits>MAX_DIGITS) then - cn%cndigits = MAX_DIGITS - endif - endif - cn%cnNum = cn%cnLeft%nmNum*cnPow10Shift(cn%cndigits)+cn%cnRight%nmNUm - end subroutine IncLeftCn - - !============================================================================ - ! Convert a zero-based index to the corresponding cyclops number - ! Uses combinatorial counting based on digit positions in base-9 - ! @param n: Zero-based index - ! @return: Corresponding cyclops number - !============================================================================ - function IndexToCyclops(n) result(result_cn) - integer(kind=8), intent(in) :: n - type(CyclopsNum) :: result_cn - integer :: dgtCnt, i - integer(kind=8) :: p9, q, num, local_n - - call InitCycNum(result_cn) - if (n == 0) return ! Index 0 returns initialized (0) - - result_cn%cnIdx = n - dgtCnt = 0 - local_n = n - - ! Determine number of digits needed - do - p9 = cnPow9(dgtCnt) * cnPow9(dgtCnt) ! Combinations for dgtCnt digits - if (local_n < p9) exit ! Found correct digit count - local_n = local_n - p9 ! Subtract counted combinations - dgtCnt = dgtCnt + 1 ! Try next digit count - if (dgtCnt > 10) exit ! Safety limit - end do - - dgtCnt = dgtCnt - 1 ! Adjust to actual digit count - - ! Process right digits (convert from base-9 to base-10) - result_cn%cnRight%nmMaxDgtIdx = dgtCnt - do i = 0, dgtCnt - q = local_n / 9 ! Integer division - result_cn%cnRight%nmdgts(i) = local_n - 9 * q ! Remainder gives base-9 digit - local_n = q ! Continue with quotient - end do - - ! Convert base-9 digits to base-10 number (adding 1 to each digit) - num = 0 - do i = dgtCnt, 0, -1 ! Most significant digit first - num = num * 10 + result_cn%cnRight%nmdgts(i) + 1 - end do - result_cn%cnRight%nmNum = num - result_cn%cnNum = num ! Temporary: only right part - - ! Process left digits (same algorithm) - result_cn%cnLeft%nmMaxDgtIdx = dgtCnt - do i = 0, dgtCnt - q = local_n / 9 - result_cn%cnLeft%nmdgts(i) = local_n - 9 * q - local_n = q - end do - - ! Convert left digits to base-10 number - num = 0 - do i = dgtCnt, 0, -1 - num = num * 10 + result_cn%cnLeft%nmdgts(i) + 1 - end do - result_cn%cnLeft%nmNum = num - - ! Combine left and right with zero in middle: left * 10^(dgtCnt+1) + right - result_cn%cnNum = result_cn%cnNum + num * cnPow10Shift(dgtCnt) - result_cn%cndigits = dgtCnt - end function IndexToCyclops - - !============================================================================ - ! Display cyclops numbers in formatted columns - ! @param cl: Array of cyclops numbers - ! @param colw: Column width for formatting - ! @param colc: Number of columns per row - !============================================================================ - subroutine Out_Cyclops(cl, colw, colc) - integer(kind=8), intent(in) :: cl(:) - integer, intent(in) :: colw, colc - integer :: i, n - character (len=50) :: colFormat - - n = size(cl) - if (n > 100) n = 100 - - ! Create suitable format string to nicely printout columns using colw as width - write (colformat, '("(I", I0, " )" )') colw - - ! Print all "n=size(cl)" Numbers of array cl - do i = 1, n - write(*, colformat, advance='no') cl(i) ! Print number using calculated format string - if (mod(i, colc) == 0) then - write(*, *) ! New line after colc numbers - else - write(*, '(A)', advance='no') ' ' ! Space between numbers - end if - end do - - ! Terminate line if incomplete - if (mod(i, colc) /= 0) write(*, *) - end subroutine Out_Cyclops - - !============================================================================ - ! Check if a number is prime (simple trial division) - ! @param n: Number to check - ! @return: .true. if prime, .false. otherwise - !============================================================================ - logical function isPrime(n) - integer(kind=8), intent(in) :: n - integer(kind=8) :: p, q - - ! Handle small numbers and simple cases - if (n <= 1) then - isPrime = .false. - return - end if - - if (n == 2 .or. n == 3 .or. n == 5) then - isPrime = .true. - return - end if - - ! Even numbers and multiples of 3 - if (mod(n, 2) == 0 .or. mod(n, 3) == 0) then - isPrime = .false. - return - end if - - ! Trial division for remaining numbers - p = 5 - do - q = n / p - if (n - q * p == 0) then ! Divisible by p - isPrime = .false. - return - end if - p = p + 2 ! Next odd number - - q = n / p - if (n - q * p == 0) then ! Divisible by p+2 - isPrime = .false. - return - end if - - if (q < p) exit ! No need to check further - p = p + 4 ! Skip to next candidate - end do - - isPrime = .true. ! No divisors found - end function isPrime - - !============================================================================ - ! Generate the first 'cnt' basic cyclops numbers - ! @param cnt: Number of cyclops numbers to generate - ! @return: Last cyclops number generated (for continuation) - !============================================================================ - function FirstCyclops(cnt) result(result_cn) - integer, intent(in) :: cnt - type(CyclopsNum) :: result_cn - integer :: i - - ! Allocate storage for results - if (allocated(Cyclops)) deallocate(Cyclops) - allocate(Cyclops(cnt)) - - i = 1 - call InitCycNum(result_cn) - - ! Generate requested number of cyclops numbers - do while (i <= cnt) - Cyclops(i) = result_cn%cnNum - i = i + 1 - call NextCycNum(result_cn) - end do - - ! Continue until beyond BIGLIMIT for reporting - do while (result_cn%cnNum <= BIGLIMIT) - call NextCycNum(result_cn) - end do - end function FirstCyclops - - !============================================================================ - ! Generate the first 'cnt' prime cyclops numbers - ! @param cnt: Number of prime cyclops numbers to generate - ! @return: Last prime cyclops number with updated index - ! Algorithm as in function FirstCyclops, but check for each generated - ! Cyclops number if its prime. - !============================================================================ - function FirstPrimeCyclops(cnt) result(result_cn) - integer, intent(in) :: cnt - type(CyclopsNum) :: result_cn - integer :: i - - if (allocated(Cyclops)) deallocate(Cyclops) - allocate(Cyclops(cnt)) - - i = 1 - call InitCycNum(result_cn) - - do while (i <= cnt) - if (isPrime(result_cn%cnNum)) then ! only consider prime Cyclops numbers - Cyclops(i) = result_cn%cnNum - i = i + 1 - end if - call NextCycNum(result_cn) - end do - - - ! Continue until prime Cyclops number is beyond BIGLIMIT for reporting - do - if (isPrime(result_cn%cnNum)) then - result_cn%cnIdx = i ! result_cn%cnIdx + 1 - if (result_cn%cnNum .gt. BIGLIMIT) exit - i = i + 1 - end if - call NextCycNum(result_cn) - end do - end function FirstPrimeCyclops - - - - !============================================================================ - ! Generate the first 'cnt' prime blind cyclops numbers - ! @param cnt: Number of prime cyclops numbers to generate - ! @return: Last prime cyclops number with updated index - ! Algorithm as in function FirstCyclops, but check for each generated - ! Cyclops number if its prime, then construct blind number from this, and - ! check again if result is prime as well. - !============================================================================ - function FirstPrimeBlindCyclops(cnt) result(result_cn) - integer, intent(in) :: cnt - type(CyclopsNum) :: result_cn - integer :: i - integer (kind=8) :: n - - if (allocated(Cyclops)) deallocate(Cyclops) - allocate(Cyclops(cnt)) - - i = 1 - call InitCycNum(result_cn) - - do while (i <= cnt) - if (isPrime(result_cn%cnNum)) then - - n = result_cn%cnRight%nmnum - if (result_cn%cndigits .gt. 0) then - n = n + result_cn%cnLeft%nmnum*cnPow10Shift(result_cn%cndigits-1) - else - n = n + result_cn%cnLeft%nmnum*10 - endif - if (isPrime (n)) then - Cyclops(i) =result_cn%cnNum - i = i + 1 - endif - end if - call NextCycNum(result_cn) - end do - - do - if (isPrime(result_cn%cnNum)) then - n = result_cn%cnRight%nmnum - if (result_cn%cndigits .gt. 0) then - n = n + result_cn%cnLeft%nmnum*cnPow10Shift(result_cn%cndigits-1) - else - n = n + result_cn%cnLeft%nmnum*10 - endif - if (isPrime (n)) then - result_cn%cnIdx = i - if (result_cn%cnNum .gt. BIGLIMIT) exit - i = i + 1 - end if - end if - call NextCycNum(result_cn) - end do - end function FirstPrimeBlindCyclops - - !============================================================================ - ! Generate the first 'cnt' prime palindromic cyclops numbers - ! @param cnt: Number of prime palindromic cyclops numbers to generate - ! @return: Last prime cyclops number with updated index - ! Algorithm: directly create palindromic cyclops numbers and look for primes. - !============================================================================ - function FirstPrimePalindromicCyclops(cnt) result(result_cn) - integer, intent(in) :: cnt - type(CyclopsNum) :: result_cn - integer :: i - integer (kind=8) :: n - - if (allocated(Cyclops)) deallocate(Cyclops) - allocate(Cyclops(cnt)) - - i = 1 - call InitCycNum(result_cn) - - do while (i <= cnt) - call MakePalinCycNum (result_cn) ! Complete prepare Cyclops number to a palindrome - if (isPrime(result_cn%cnNum)) then ! Consider only if its prime. - Cyclops(i) =result_cn%cnNum - i = i + 1 - end if - call IncLeftCn (result_cn) ! Next one. - - ! Last digit cannot be even because we need only prime numbers - do while (result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 1 .AND. & - result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 3 .and. & - result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 5 .and. & - result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 7 .and. & - result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 9) - call IncLeftCn(result_cn) - end do - end do - - do - call MakePalinCycNum (result_cn) - if (isPrime(result_cn%cnNum)) then - result_cn%cnIdx = i - if (result_cn%cnNum .gt. BIGLIMIT) exit - i = i + 1 - end if - call IncLeftCn (result_cn) - - do while (result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 1 .AND. & - result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 3 .and. & - result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 5 .and. & - result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 7 .and. & - result_cn%cnLeft%nmdgts(result_cn%cnDigits)+1 .ne. 9) - call IncLeftCn(result_cn) - end do - end do - - end function FirstPrimePalindromicCyclops - -end module CyclopsNumbers - -program main - use CyclopsNumbers - implicit none - - type(CyclopsNum) :: cycnum - integer :: cnt - integer(kind=8) :: i, large_cnt - - call InitCnMinPow() - - ! First 50 cyclops numbers - cnt = 50 - write(*, "( 'The first ', I0, ' cyclops numbers are:')") cnt - cycnum = FirstCyclops(cnt) - call Out_Cyclops(Cyclops, 5, 10) - write(*, "('First cyclops number > ', I0, ' is ', I0, ' at 1-based index ', I0, / )") BIGLIMIT, cycnum%cnNum, cycnum%cnIdx - - ! First 50 prime cyclops numbers - cnt = 50 - write(*, "('The first ', I0, ' prime cyclops numbers are:')") cnt - cycnum = FirstPrimeCyclops(cnt) - call Out_Cyclops(Cyclops, 7, 10) - write(*, "('First prime cyclops number > ', I0, ' is ', I0, ' at 1-based index ', I0, / )") BIGLIMIT, cycnum%cnNum, cycnum%cnIdx - write(*, *) - - -! First 50 prime blind cyclops numbers - cnt = 50 - write(*, "('The first ', I0, ' prime blind cyclops numbers are:')") cnt - cycnum = FirstPrimeBlindCyclops(cnt) - call Out_Cyclops(Cyclops, 7, 10) - write(*, "('First prime blind cyclops number > ', I0, ' is ', I0, ' at 1-based index ', I0, / )") BIGLIMIT, cycnum%cnNum, cycnum%cnIdx - -! First 50 prime palindromic cyclops numbers - cnt = 50 - write(*, "( 'The first ', I0, ' prime palindromic cyclops numbers are:')") cnt - cycnum = FirstPrimePalindromicCyclops(cnt) - call Out_Cyclops(Cyclops, 7, 10) - write(*, "('First palindromic prime cyclops number > ', I0, ' is ', I0, ' at 1-based index ', I0, / )") BIGLIMIT, cycnum%cnNum, cycnum%cnIdx - - - - - ! Additional test cases for large indices - write(*, '(A/)') 'Demonstrating Cyclops calculation for large indices:' - write(*, '(A)') ' Index Cyclop Number Calculated Cyclop Number ' - large_cnt = 100 - do while (large_cnt <= 1000000000000000_8) - write(*, '(I17, A)', advance='no') large_cnt, ' ' - if (large_cnt <= 10000) then ! For small index values evaluate Cyclops number sequentially - call InitCycNum(cycnum) - do i = 1, large_cnt-1 ! at index 1 we have 0, is already there by initialisation - call NextCycNum(cycnum) ! hence we need only (large_cnt-1) next sequence elements - end do - write(*, '(I7)', advance='no') cycnum%cnNum - else - write (*, '(" ")', advance='no') - end if - cycnum = IndexToCyclops(large_cnt-1) ! direct calculation, for comparison when index is small - write(*, *) ' ', cycnum%cnNum - large_cnt = large_cnt * 10 ! next order of magnitude - end do - -end program main diff --git a/Task/Cyclops-numbers/Java/cyclops-numbers.java b/Task/Cyclops-numbers/Java/cyclops-numbers.java deleted file mode 100644 index e5172e10c8..0000000000 --- a/Task/Cyclops-numbers/Java/cyclops-numbers.java +++ /dev/null @@ -1,132 +0,0 @@ -import java.util.ArrayList; -import java.util.List; - -public final class CyclopsNumbers { - - public static void main(String[] args) { - List cyclops = new ArrayList(); - List primeCyclops = new ArrayList(); - List blindPrimeCyclops = new ArrayList(); - List palindromicPrimeCyclops = new ArrayList(); - - List> ranges = List.of( List.of( 0, 0), List.of( 101, 909), - List.of( 11011, 99099 ), List.of( 1110111, 9990999 ), List.of( 111101111, 119101111 ) ); - - for ( List range : ranges) { - for ( int i = range.getFirst(); i <= range.getLast(); i++ ) { - String value = String.valueOf(i); - if ( isCyclopsNumber(value) ) { - cyclops.addLast(i); - if ( isPrime(i) ) { - primeCyclops.addLast(i); - if ( isBlind(value) ) { - blindPrimeCyclops.addLast(i); - } - if ( isPalindromic(value) ) { - palindromicPrimeCyclops.addLast(i); - } - } - } - } - } - - System.out.println("The first 50 Cyclops numbers:"); - for ( int i = 0; i < 50; i++ ) { - System.out.print(String.format("%6s%s", cyclops.get(i), ( i % 10 == 9 ? "\n" : "" ))); - } - System.out.println(); - int firstIndex = firstIndex(cyclops); - System.out.println("The first cyclops number greater than ten million is " - + cyclops.get(firstIndex) + " at zero based index " + firstIndex); - System.out.println(); - - System.out.println("The first 50 prime Cyclops numbers:"); - for ( int i = 0; i < 50; i++ ) { - System.out.print(String.format("%7s%s", primeCyclops.get(i), ( i % 10 == 9 ? "\n" : "" ))); - } - System.out.println(); - firstIndex = firstIndex(primeCyclops); - System.out.println("The first prime cyclops number greater than ten million is " - + primeCyclops.get(firstIndex) + " at zero based index " + firstIndex); - System.out.println(); - - System.out.println("The first 50 blind prime Cyclops numbers:"); - for ( int i = 0; i < 50; i++ ) { - System.out.print(String.format("%7s%s", blindPrimeCyclops.get(i), ( i % 10 == 9 ? "\n" : "" ))); - } - System.out.println(); - firstIndex = firstIndex(blindPrimeCyclops); - System.out.println("The first blind prime cyclops number greater than ten million is " - + blindPrimeCyclops.get(firstIndex) + " at zero based index " + firstIndex); - System.out.println(); - - System.out.println("The first 50 palindromic prime Cyclops numbers:"); - for ( int i = 0; i < 50; i++ ) { - System.out.print( - String.format("%9s%s", palindromicPrimeCyclops.get(i), ( i % 10 == 9 ? "\n" : "" ))); - } - System.out.println(); - firstIndex = firstIndex(palindromicPrimeCyclops); - System.out.println("The first palindromic prime cyclops number greater than ten million is " - + palindromicPrimeCyclops.get(firstIndex) + " at zero based index " + firstIndex); - System.out.println(); - } - - private static int firstIndex(List numbers) { - int start = 0; - int end = numbers.size() - 1; - while ( start <= end ) { - final int mid = start + ( end - start ) / 2; - if ( numbers.get(mid) <= 10_000_000 ) { - start = mid + 1; - } else { - end = mid - 1; - } - } - return start; - } - - private static boolean isCyclopsNumber(String text) { - return text.charAt(text.length() / 2) == '0' && text.indexOf('0') == text.lastIndexOf('0'); - } - - private static boolean isPalindromic(String text) { - for ( int i = 0; i < text.length() / 2; i++ ) { - if ( text.charAt(i) != text.charAt(text.length() - 1 - i) ) { - return false; - } - } - return true; - } - - private static boolean isBlind(String text) { - final int middle = text.length() / 2; - final String withoutZero = text.substring(0, middle) + text.substring(middle + 1); - return isPrime(Integer.valueOf(withoutZero)); - } - - private static boolean isPrime(int number) { - if ( number < 2 ) { - return false; - } - if ( number % 2 == 0 ) { - return number == 2; - } - if ( number % 3 == 0 ) { - return number == 3; - } - int k = 5; - while ( k * k <= number ) { - if ( number % k == 0 ) { - return false; - } - k += 2; - if ( number % k == 0 ) { - return false; - } - k += 4; - } - return true; - } - -} diff --git a/Task/Cyclops-numbers/JavaScript/cyclops-numbers.js b/Task/Cyclops-numbers/JavaScript/cyclops-numbers.js deleted file mode 100644 index d252c63019..0000000000 --- a/Task/Cyclops-numbers/JavaScript/cyclops-numbers.js +++ /dev/null @@ -1,136 +0,0 @@ -// Cyclops Numbers - JavaScript implementation - -function main() { - const cyclops = []; - const primeCyclops = []; - const blindPrimeCyclops = []; - const palindromicPrimeCyclops = []; - - const ranges = [ - [0, 0], - [101, 909], - [11011, 99099], - [1110111, 9990999], - [111101111, 119101111] - ]; - - for (const range of ranges) { - for (let i = range[0]; i <= range[1]; i++) { - const value = String(i); - if (isCyclopsNumber(value)) { - cyclops.push(i); - if (isPrime(i)) { - primeCyclops.push(i); - if (isBlind(value)) { - blindPrimeCyclops.push(i); - } - if (isPalindromic(value)) { - palindromicPrimeCyclops.push(i); - } - } - } - } - } - - console.log("The first 50 Cyclops numbers:"); - for (let i = 0; i < 50; i++) { - process.stdout.write(String(cyclops[i]).padStart(6) + (i % 10 === 9 ? "\n" : "")); - } - console.log(); - let idx = firstIndex(cyclops); - console.log("The first cyclops number greater than ten million is " + - cyclops[idx] + " at zero based index " + idx); - console.log(); - - console.log("The first 50 prime Cyclops numbers:"); - for (let i = 0; i < 50; i++) { - process.stdout.write(String(primeCyclops[i]).padStart(7) + (i % 10 === 9 ? "\n" : "")); - } - console.log(); - idx = firstIndex(primeCyclops); - console.log("The first prime cyclops number greater than ten million is " + - primeCyclops[idx] + " at zero based index " + idx); - console.log(); - - console.log("The first 50 blind prime Cyclops numbers:"); - for (let i = 0; i < 50; i++) { - process.stdout.write(String(blindPrimeCyclops[i]).padStart(7) + (i % 10 === 9 ? "\n" : "")); - } - console.log(); - idx = firstIndex(blindPrimeCyclops); - console.log("The first blind prime cyclops number greater than ten million is " + - blindPrimeCyclops[idx] + " at zero based index " + idx); - console.log(); - - console.log("The first 50 palindromic prime Cyclops numbers:"); - for (let i = 0; i < 50; i++) { - process.stdout.write(String(palindromicPrimeCyclops[i]).padStart(9) + (i % 10 === 9 ? "\n" : "")); - } - console.log(); - idx = firstIndex(palindromicPrimeCyclops); - console.log("The first palindromic prime cyclops number greater than ten million is " + - palindromicPrimeCyclops[idx] + " at zero based index " + idx); - console.log(); -} - -function firstIndex(numbers) { - let start = 0; - let end = numbers.length - 1; - - while (start <= end) { - const mid = start + Math.floor((end - start) / 2); - if (numbers[mid] <= 10000000) { - start = mid + 1; - } else { - end = mid - 1; - } - } - return start; -} - -function isCyclopsNumber(text) { - const middleIndex = Math.floor(text.length / 2); - return text[middleIndex] === '0' && text.indexOf('0') === text.lastIndexOf('0'); -} - -function isPalindromic(text) { - for (let i = 0; i < Math.floor(text.length / 2); i++) { - if (text[i] !== text[text.length - 1 - i]) { - return false; - } - } - return true; -} - -function isBlind(text) { - const middle = Math.floor(text.length / 2); - const withoutZero = text.substring(0, middle) + text.substring(middle + 1); - return isPrime(parseInt(withoutZero, 10)); -} - -function isPrime(number) { - if (number < 2) { - return false; - } - if (number % 2 === 0) { - return number === 2; - } - if (number % 3 === 0) { - return number === 3; - } - let k = 5; - while (k * k <= number) { - if (number % k === 0) { - return false; - } - k += 2; - if (number % k === 0) { - return false; - } - k += 4; - } - return true; -} - -// Run the main function -main(); diff --git a/Task/Cyclops-numbers/Julia/cyclops-numbers.jl b/Task/Cyclops-numbers/Julia/cyclops-numbers.julia similarity index 100% rename from Task/Cyclops-numbers/Julia/cyclops-numbers.jl rename to Task/Cyclops-numbers/Julia/cyclops-numbers.julia diff --git a/Task/Cyclops-numbers/Phix/cyclops-numbers-1.phix b/Task/Cyclops-numbers/Phix/cyclops-numbers-1.phix index 1e01179aed..27bbdc089f 100644 --- a/Task/Cyclops-numbers/Phix/cyclops-numbers-1.phix +++ b/Task/Cyclops-numbers/Phix/cyclops-numbers-1.phix @@ -1,67 +1,69 @@ -with javascript_semantics -atom t0 = time() -function bump(sequence half) - -- add a digit to valid halves - -- eg {0} --> {1..9} (no zeroes) - -- --> {11..99} ("") - -- --> {111..999}, etc - sequence res = {} - for i=1 to length(half) do - integer hi = half[i]*10 - for digit=1 to 9 do - res &= hi+digit - end for - end for - return res -end function +(phixonline)--> + with javascript_semantics + atom t0 = time() + function bump(sequence half) + -- add a digit to valid halves + -- eg {0} --> {1..9} (no zeroes) + -- --> {11..99} ("") + -- --> {111..999}, etc + sequence res = {} + for i=1 to length(half) do + integer hi = half[i]*10 + for digit=1 to 9 do + res &= hi+digit + end for + end for + return res + end function -procedure cyclops(string s="") - sequence res = {}, - half = {0} -- valid digits, see bump() - integer left = 1, -- half[] before the 0 - right = 0, -- half[] after the 0 - hlen = 1, -- length(half) - cpow = 10, -- cyclops power (of 10) - bcpow = 1, -- blind cyclops power - cn = 0 -- cyclops number (scratch) - bool valid = false, - bPrime = match("prime",s), - bBlind = match("blind",s), - bPalin = match("palindromic",s) - while length(res)<50 or cn<=1e7 or not valid do - right += 1 - if right>hlen then - right = 1 - left += 1 - if left>hlen then - half = bump(half) - hlen = length(half) - cpow *= 10 - bcpow *= 10 - left = 1 - end if - end if - integer lh = half[left], - rh = half[right] - cn = lh*cpow+rh -- cyclops number - valid = not bPrime or is_prime(cn) - if valid and bBlind then - valid = is_prime(lh*bcpow+rh) - end if - if valid and bPalin then - valid = sprintf("%d",lh) == reverse(sprintf("%d",rh)) - end if - if valid then - res = append(res,sprintf("%7d",cn)) - end if - end while - printf(1,"First 50 %scyclops numbers:\n%s\n",{s,join_by(res[1..50],1,10)}) - printf(1,"First %scyclops number > 10,000,000: %s at (one based) index: %d\n\n", - {s,res[$],length(res)}) -end procedure + procedure cyclops(string s="") + sequence res = {}, + half = {0} -- valid digits, see bump() + integer left = 1, -- half[] before the 0 + right = 0, -- half[] after the 0 + hlen = 1, -- length(half) + cpow = 10, -- cyclops power (of 10) + bcpow = 1, -- blind cyclops power + cn = 0 -- cyclops number (scratch) + bool valid = false, + bPrime = match("prime",s), + bBlind = match("blind",s), + bPalin = match("palindromic",s) + while length(res)<50 or cn<=1e7 or not valid do + right += 1 + if right>hlen then + right = 1 + left += 1 + if left>hlen then + half = bump(half) + hlen = length(half) + cpow *= 10 + bcpow *= 10 + left = 1 + end if + end if + integer lh = half[left], + rh = half[right] + cn = lh*cpow+rh -- cyclops number + valid = not bPrime or is_prime(cn) + if valid and bBlind then + valid = is_prime(lh*bcpow+rh) + end if + if valid and bPalin then + valid = sprintf("%d",lh) == reverse(sprintf("%d",rh)) + end if + if valid then + res = append(res,sprintf("%7d",cn)) + end if + end while + printf(1,"First 50 %scyclops numbers:\n%s\n",{s,join_by(res[1..50],1,10)}) + printf(1,"First %scyclops number > 10,000,000: %s at (one based) index: %d\n\n", + {s,res[$],length(res)}) + end procedure -cyclops() -cyclops("prime ") -cyclops("blind prime ") -cyclops("palindromic prime ") -?elapsed(time()-t0) + cyclops() + cyclops("prime ") + cyclops("blind prime ") + cyclops("palindromic prime ") + ?elapsed(time()-t0) + + with javascript_semantics + atom t0 = time() + function bump(sequence half) -- (exactly the same as above) + -- add a digit to valid halves + -- eg {0} --> {1..9} (no zeroes) + -- --> {11..99} ("") + -- --> {111..999}, etc + sequence res = {} + for i=1 to length(half) do + integer hi = half[i]*10 + for digit=1 to 9 do + res &= hi+digit + end for + end for + return res + end function -procedure nth_cyclops(atom n) - string cyclops = "0" - if n>1 then - atom hlen = 1, hlen2 = 1, w = n-1, digits = 0 - while w>=hlen2 do - w -= hlen2 - hlen *= 9 - hlen2 = power(hlen,2) - digits += 1 - end while - string hf = sprintf("%%0%da/%%0%da",digits) - cyclops = sq_add(1,sprintf(hf,{{9,floor(w/hlen)},{9,round(remainder(w,hlen))}})) - end if - string fmt = "The %,d%s cyclops number is %s%s\n", - e = elapsed(time()-t0,0.1," (%s)") - printf(1,fmt,{n,ord(n),cyclops,e}) -end procedure -for n=0 to iff(machine_bits()=32?15:18) do - nth_cyclops(power(10,n)) -end for -?elapsed(time()-t0) + sequence half = {0} -- valid digits, see bump() + integer hlen = 1, + cpow = 10 -- cyclops power (of 10) + integer n = 1_000_000_000 + atom hlen2 = 1 + while n>hlen2 do + n -= hlen2 + half = bump(half) + hlen = length(half) + hlen2 = power(hlen,2) + cpow *= 10 + end while + integer left = floor(n/hlen)+1, -- half[] before the 0 + right = remainder(n,hlen)+1 -- half[] after the 0 + string fmt = "The 1,000,000,000th cyclops number is %d (%s)\n", + e = elapsed(time()-t0) + printf(1,fmt,{half[left]*cpow+half[right],e}) + + without js + include builtins\cffi.e -constant AF_UNSPEC = 0, --- AF_INET = 2, --- AF_INET6 = 23, --- SOCK_STREAM = 1, - SOCK_DGRAM = 2, --- IPPROTO_TCP = 6, - NI_MAXHOST = 1025, - NI_NUMERICHOST = iff(platform()=LINUX?1:2) + constant AF_UNSPEC = 0, + -- AF_INET = 2, + -- AF_INET6 = 23, + -- SOCK_STREAM = 1, + SOCK_DGRAM = 2, + -- IPPROTO_TCP = 6, + NI_MAXHOST = 1025, + NI_NUMERICHOST = iff(platform()=LINUX?1:2) -constant tWAD = """ -typedef struct WSAData { - WORD wVersion; - WORD wHighVersion; - char szDescription[257]; - char szSystemStatus[129]; - unsigned short iMaxSockets; - unsigned short iMaxUdpDg; - char *lpVendorInfo; -} WSADATA, *LPWSADATA; -""", -tWAS = """ -int WSAStartup( - _In_ WORD wVersionRequested, - _Out_ LPWSADATA lpWSAData -); -""", -tWAC = """ -int WSACleanup(void); -""", -tAI_W=""" -typedef struct addrinfo { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - char *ai_canonname; - struct sockaddr *ai_addr; - struct addrinfo *ai_next; -} ADDRINFOA, *PADDRINFOA; -""", -tAI_L=""" -typedef struct addrinfo { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - int ai_addrlen; - struct sockaddr *ai_addr; - char *ai_canonname; - struct addrinfo *ai_next; -}; -""", -tGAI = """ -int getaddrinfo( - _In_opt_ PCSTR pNodeName, - _In_opt_ PCSTR pServiceName, - _In_opt_ const ADDRINFOA *pHints, - _Out_ PADDRINFOA *ppResult -); -""", ---int getaddrinfo(const char *node, const char *service, --- const struct addrinfo *hints, --- struct addrinfo **res); -tGNI = """ -int getnameinfo( - _In_ sockaddr *sa, - _In_ int salen, - _Out_ char *host, - _In_ DWORD hostlen, - _Out_ char *serv, - _In_ DWORD servlen, - _In_ int flags -); -""", ---int getnameinfo(const struct sockaddr *addr, socklen_t addrlen, --- char *host, socklen_t hostlen, --- char *serv, socklen_t servlen, int flags); -tFAI = """ -void freeaddrinfo( - _In_ struct addrinfo *ai -); -""" ---void freeaddrinfo(struct addrinfo *res); + constant tWAD = """ + typedef struct WSAData { + WORD wVersion; + WORD wHighVersion; + char szDescription[257]; + char szSystemStatus[129]; + unsigned short iMaxSockets; + unsigned short iMaxUdpDg; + char *lpVendorInfo; + } WSADATA, *LPWSADATA; + """, + tWAS = """ + int WSAStartup( + _In_ WORD wVersionRequested, + _Out_ LPWSADATA lpWSAData + ); + """, + tWAC = """ + int WSACleanup(void); + """, + tAI_W=""" + typedef struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct addrinfo *ai_next; + } ADDRINFOA, *PADDRINFOA; + """, + tAI_L=""" + typedef struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + int ai_addrlen; + struct sockaddr *ai_addr; + char *ai_canonname; + struct addrinfo *ai_next; + }; + """, + tGAI = """ + int getaddrinfo( + _In_opt_ PCSTR pNodeName, + _In_opt_ PCSTR pServiceName, + _In_opt_ const ADDRINFOA *pHints, + _Out_ PADDRINFOA *ppResult + ); + """, + --int getaddrinfo(const char *node, const char *service, + -- const struct addrinfo *hints, + -- struct addrinfo **res); + tGNI = """ + int getnameinfo( + _In_ sockaddr *sa, + _In_ int salen, + _Out_ char *host, + _In_ DWORD hostlen, + _Out_ char *serv, + _In_ DWORD servlen, + _In_ int flags + ); + """, + --int getnameinfo(const struct sockaddr *addr, socklen_t addrlen, + -- char *host, socklen_t hostlen, + -- char *serv, socklen_t servlen, int flags); + tFAI = """ + void freeaddrinfo( + _In_ struct addrinfo *ai + ); + """ + --void freeaddrinfo(struct addrinfo *res); -integer xgetaddrinfo = NULL, xgetnameinfo, xfreeaddrinfo, idAI, - xwsastartup, xwsacleanup, error + integer xgetaddrinfo = NULL, xgetnameinfo, xfreeaddrinfo, idAI, + xwsastartup, xwsacleanup, error -function get_name_info(string fqdn) - if xgetaddrinfo=NULL then - atom lib - if platform()=WINDOWS then - integer idWAD = define_struct(tWAD) - atom pWAD = allocate_struct(idWAD,cleanup:=true) - lib = open_dll("Ws2_32.dll") - xwsastartup = define_cffi_func(lib,tWAS) - xwsacleanup = define_cffi_func(lib,tWAC) - error = c_func(xwsastartup,{#00020002,pWAD}) - if error then ?9/0 end if - idAI = define_struct(tAI_W) - elsif platform()=LINUX then - lib = open_dll("libc.so.6") - idAI = define_struct(tAI_L) - end if - xgetaddrinfo = define_cffi_func(lib,tGAI) - xgetnameinfo = define_cffi_func(lib,tGNI) - xfreeaddrinfo = define_cffi_proc(lib,tFAI) - end if - atom hints = allocate_struct(idAI,cleanup:=true), - res = allocate(machine_word(),cleanup:=true), - host = allocate(NI_MAXHOST,cleanup:=true) - set_struct_field(idAI,hints,"ai_family",AF_UNSPEC) --- set_struct_field(idAI,hints,"ai_socktype",SOCK_STREAM) - set_struct_field(idAI,hints,"ai_socktype",SOCK_DGRAM) - error = c_func(xgetaddrinfo,{fqdn,NULL,hints,res}) - if error then ?9/0 end if - res = peekNS(res,machine_word(),false) - atom ptr = res - sequence results = {} - while ptr!=NULL do - atom addr = get_struct_field(idAI,ptr,"ai_addr") - integer len = get_struct_field(idAI,ptr,"ai_addrlen") - error = c_func(xgetnameinfo,{addr, len, host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST}) - if error then ?9/0 end if - results = append(results,peek_string(host)) - ptr = get_struct_field(idAI,ptr,"ai_next") - end while - c_proc(xfreeaddrinfo,{res}) - return results -end function + function get_name_info(string fqdn) + if xgetaddrinfo=NULL then + atom lib + if platform()=WINDOWS then + integer idWAD = define_struct(tWAD) + atom pWAD = allocate_struct(idWAD,cleanup:=true) + lib = open_dll("Ws2_32.dll") + xwsastartup = define_cffi_func(lib,tWAS) + xwsacleanup = define_cffi_func(lib,tWAC) + error = c_func(xwsastartup,{#00020002,pWAD}) + if error then ?9/0 end if + idAI = define_struct(tAI_W) + elsif platform()=LINUX then + lib = open_dll("libc.so.6") + idAI = define_struct(tAI_L) + end if + xgetaddrinfo = define_cffi_func(lib,tGAI) + xgetnameinfo = define_cffi_func(lib,tGNI) + xfreeaddrinfo = define_cffi_proc(lib,tFAI) + end if + atom hints = allocate_struct(idAI,cleanup:=true), + res = allocate(machine_word(),cleanup:=true), + host = allocate(NI_MAXHOST,cleanup:=true) + set_struct_field(idAI,hints,"ai_family",AF_UNSPEC) + -- set_struct_field(idAI,hints,"ai_socktype",SOCK_STREAM) + set_struct_field(idAI,hints,"ai_socktype",SOCK_DGRAM) + error = c_func(xgetaddrinfo,{fqdn,NULL,hints,res}) + if error then ?9/0 end if + res = peekNS(res,machine_word(),false) + atom ptr = res + sequence results = {} + while ptr!=NULL do + atom addr = get_struct_field(idAI,ptr,"ai_addr") + integer len = get_struct_field(idAI,ptr,"ai_addrlen") + error = c_func(xgetnameinfo,{addr, len, host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST}) + if error then ?9/0 end if + results = append(results,peek_string(host)) + ptr = get_struct_field(idAI,ptr,"ai_next") + end while + c_proc(xfreeaddrinfo,{res}) + return results + end function -procedure WSACleanup() - if platform()=WINDOWS then - error = c_func(xwsacleanup,{}) - if error then crash("WSACleanup failed: %d\n",{error}) end if - end if -end procedure + procedure WSACleanup() + if platform()=WINDOWS then + error = c_func(xwsacleanup,{}) + if error then crash("WSACleanup failed: %d\n",{error}) end if + end if + end procedure -?get_name_info("www.kame.net") -WSACleanup() + ?get_name_info("www.kame.net") + WSACleanup() + + with javascript_semantics + include builtins\timedate.e + ?format_timedate(date(),"YYYY-MM-DD") + ?format_timedate(date(),"Dddd, Mmmm d, YYYY") + + include builtins\timedate.e + set_timedate_formats({"Mmmm d yyyy h:mmpm tz"}) + timedate td = parse_date_string("March 7 2009 7:30pm EST") + atom twelvehours = timedelta(hours:=12) + td = adjust_timedate(td,twelvehours) + ?format_timedate(td) + td = change_timezone(td,"ACDT") -- extra credit + ?format_timedate(td) + td = adjust_timedate(td,timedelta(days:=31*4)) + ?format_timedate(td) + + string deBruijn = "" + for n=0 to 99 do + string a = sprintf("%02d",n) + integer a1 = a[1], + a2 = a[2] + if a2>=a1 then + deBruijn &= iff(a1=a2?a1:a) + for m=n+1 to 99 do + string ms = sprintf("%02d",m) + if ms[2]>a1 then + deBruijn &= a&ms + end if + end for + end if + end for + deBruijn &= "000" + printf(1,"de Bruijn sequence length: %d\n\n",length(deBruijn)) + printf(1,"First 130 characters:\n%s\n\n",deBruijn[1..130]) + printf(1,"Last 130 characters:\n%s\n\n",deBruijn[-130..-1]) -function check(string text) - sequence res = {} - sequence found = repeat(0,10000) - integer k - for i=1 to length(text)-3 do - k = to_integer(text[i..i+3],-1)+1 - if k!=0 then found[k] += 1 end if - end for - for i=1 to 10000 do - k = found[i] - if k!=1 then - string e = sprintf("Pin number %04d ",i-1) - e &= iff(k=0?"missing":sprintf("occurs %d times",k)) - res = append(res,e) - end if - end for - k = length(res) - if k=0 then - res = "No errors found" - else - string s = iff(k=1?"":"s") - res = sprintf("%d error%s found:\n ",{k,s})&join(res,"\n ") - end if - return res -end function + function check(string text) + sequence res = {} + sequence found = repeat(0,10000) + integer k + for i=1 to length(text)-3 do + k = to_integer(text[i..i+3],-1)+1 + if k!=0 then found[k] += 1 end if + end for + for i=1 to 10000 do + k = found[i] + if k!=1 then + string e = sprintf("Pin number %04d ",i-1) + e &= iff(k=0?"missing":sprintf("occurs %d times",k)) + res = append(res,e) + end if + end for + k = length(res) + if k=0 then + res = "No errors found" + else + string s = iff(k=1?"":"s") + res = sprintf("%d error%s found:\n ",{k,s})&join(res,"\n ") + end if + return res + end function -printf(1,"Missing 4 digit PINs in this sequence: %s\n", check(deBruijn)) -printf(1,"Missing 4 digit PINs in the reversed sequence: %s\n",check(reverse(deBruijn))) -printf(1,"4444th digit in the sequence: %c (setting it to .)\n", deBruijn[4444]) -deBruijn[4444] = '.' -printf(1,"Re-running checks: %s\n",check(deBruijn)) + printf(1,"Missing 4 digit PINs in this sequence: %s\n", check(deBruijn)) + printf(1,"Missing 4 digit PINs in the reversed sequence: %s\n",check(reverse(deBruijn))) + printf(1,"4444th digit in the sequence: %c (setting it to .)\n", deBruijn[4444]) + deBruijn[4444] = '.' + printf(1,"Re-running checks: %s\n",check(deBruijn)) + + object a, b + a = {1,{2,3},"four",{5.6,7,{8.9}}} + b = a + b[3] = 4 + ?a + ?b + + function deep_copy(object o) + object res + if atom(o) then + res = o + else + res = repeat(' ',length(o)) + for i=1 to length(o) do + res[i] = deep_copy(o[i]) + end for + end if + return res + end function -object c = deep_copy(b) -?c + object c = deep_copy(b) + ?c + + include builtins\serialize.e + object d = deserialize(serialize(a)) + ?d + + with javascript_semantics + function descending_primes(sequence res, atom p=0, max_digit=9) + for d=1 to max_digit do + atom np = p*10+d + if odd(d) and is_prime(np) then res &= np end if + res = descending_primes(res,np,d-1) + end for + return res + end function -sequence r = sort(descending_primes({2})), ---sequence r = descending_primes({2}), - j = join_by(r,1,11," ","\n","%8d") -printf(1,"There are %,d descending primes:\n%s\n",{length(r),j}) + sequence r = sort(descending_primes({2})), + --sequence r = descending_primes({2}), + j = join_by(r,1,11," ","\n","%8d") + printf(1,"There are %,d descending primes:\n%s\n",{length(r),j}) + + with javascript_semantics + function descending_primes() + sequence powerset = tagset(9), + res = {} + while length(powerset) do + res &= filter(powerset,is_prime) + sequence next = {} + for i=1 to length(powerset) do + for d=1 to remainder(powerset[i],10)-1 do + next &= powerset[i]*10+d + end for + end for + powerset = next + end while + return res + end function -sequence r = descending_primes(), - j = join_by(r,1,11," ","\n","%8d") -printf(1,"There are %,d descending primes:\n%s\n",{length(r),j}) + sequence r = descending_primes(), + j = join_by(r,1,11," ","\n","%8d") + printf(1,"There are %,d descending primes:\n%s\n",{length(r),j}) + + try + integer i = 1/0 + catch e + ?e[E_USER] + end try + puts(1,"still running...\n") + + with javascript_semantics + procedure samechar(sequence s) + string msg = "all characters are the same" + integer l = length(s) + if l>=2 then + integer ch = s[1] + for i=2 to l do + integer si = s[i] + if si!=ch then + string su = utf32_to_utf8({si}) + msg = sprintf(`first different character "%s"(#%02x) at position %d`,{su,si,i}) + exit + end if + end for + end if + printf(1,"\"%s\" (length %d): %s\n",{utf32_to_utf8(s),l,msg}) + end procedure -constant tests = {""," ","2","333",".55","tttTTT","4444 444k", - utf8_to_utf32("🐶🐶🐺🐶"),utf8_to_utf32("🎄🎄🎄🎄")} -for i=1 to length(tests) do samechar(tests[i]) end for + constant tests = {""," ","2","333",".55","tttTTT","4444 444k", + utf8_to_utf32("🐶🐶🐺🐶"),utf8_to_utf32("🎄🎄🎄🎄")} + for i=1 to length(tests) do samechar(tests[i]) end for + + procedure all_uniq(sequence s) + string chars = "" + sequence posns = {}, + multi = {} + integer lm = 0 + for i=1 to length(s) do + integer si = s[i], + k = find(si,chars) + if k=0 then + chars &= si + posns &= {{i}} + else + posns[k] &= i + if length(posns[k])=2 then + multi &= k + lm += 1 + end if + end if + end for + string msg = sprintf("\"%s\" (length %d): ",{s,length(s)}), + nod = ordinal(lm,true), + ess = "s"[1..lm>1], + res = iff(lm=0?"all characters are unique" + :sprintf("contains %s duplicate%s:",{nod,ess})) + printf(1,"%s %s\n",{msg,res}) + res = repeat(' ',length(msg)) + for i=1 to length(multi) do + integer mi = multi[i], + ci = chars[mi] + printf(1,"%s '%c'(#%02x) at %V\n",{res,ci,ci,posns[mi]}) + end for + printf(1,"\n") + end procedure -constant tests = {"",".","abcABC","XYZ ZYX","1234567890ABCDEFGHIJKLMN0PQRSTUVWXYZ", - "01234567890ABCDEFGHIJKLMN0PQRSTUVWXYZ0X", - " ","2","333","55","tttTTT","tTTTtt","4444 444k"} -papply(tests,all_uniq) + constant tests = {"",".","abcABC","XYZ ZYX","1234567890ABCDEFGHIJKLMN0PQRSTUVWXYZ", + "01234567890ABCDEFGHIJKLMN0PQRSTUVWXYZ0X", + " ","2","333","55","tttTTT","tTTTtt","4444 444k"} + papply(tests,all_uniq) + + function isNumber(string s) + return scanf(s,"%f")!={} + -- Alt: isNumberString(object s) and + -- return string(s) and scanf(s,"%f")!={}, or even + -- return string(s) and scanf(substitute(trim(s),",",""),"%f")!={} + end function -constant tests = {"#a","#A","0xA","0(16)A","#FF","255","0", - "0.","0.0","000.000","0e0","0e-2000"," ", - ".14",".05","-5.2","0xf","ten","1B","#1B", - " 12 ",trim(" 12 "),"1","0o16","0o18", - "0b10101111_11110000_11110000_00110011", - "1_000","50e","+123","+ 123","-0b10101", - "NaN","+.345","12..34","12e3.4","0-2", - "192.168.0.1","1.2e","1 2","12.34","", - "beef","#beef","1,000,000","Inf","1/2", - "1.5e+27","0x10.5","1."} + constant tests = {"#a","#A","0xA","0(16)A","#FF","255","0", + "0.","0.0","000.000","0e0","0e-2000"," ", + ".14",".05","-5.2","0xf","ten","1B","#1B", + " 12 ",trim(" 12 "),"1","0o16","0o18", + "0b10101111_11110000_11110000_00110011", + "1_000","50e","+123","+ 123","-0b10101", + "NaN","+.345","12..34","12e3.4","0-2", + "192.168.0.1","1.2e","1 2","12.34","", + "beef","#beef","1,000,000","Inf","1/2", + "1.5e+27","0x10.5","1."} -sequence numeric = {}, - notnumb = {} -for i=1 to length(tests) do - string ti = tests[i] - if isNumber(ti) then - numeric = append(numeric,ti) - else - notnumb = append(notnumb,ti) - end if -end for -puts(1,"numeric: ") -pp(numeric,{pp_Indent,9}) -puts(1,"\nnot numeric: ") -pp(notnumb,{pp_Indent,13}) + sequence numeric = {}, + notnumb = {} + for i=1 to length(tests) do + string ti = tests[i] + if isNumber(ti) then + numeric = append(numeric,ti) + else + notnumb = append(notnumb,ti) + end if + end for + puts(1,"numeric: ") + pp(numeric,{pp_Indent,9}) + puts(1,"\nnot numeric: ") + pp(notnumb,{pp_Indent,13}) + n ) - -[ 4 pack 0 swap - ' [ roll dip roll > ] join - 10000 times - [ dup do swap dip + ] drop - say "0." echo cr ] is prob ( a b c d --> ) - -randomise -9 4 6 6 prob -5 10 6 7 prob diff --git a/Task/Dice-game-probabilities/Rust/dice-game-probabilities.rs b/Task/Dice-game-probabilities/Rust/dice-game-probabilities.rust similarity index 100% rename from Task/Dice-game-probabilities/Rust/dice-game-probabilities.rs rename to Task/Dice-game-probabilities/Rust/dice-game-probabilities.rust diff --git a/Task/Digital-root-Multiplicative-digital-root/Ada/digital-root-multiplicative-digital-root.adb b/Task/Digital-root-Multiplicative-digital-root/Ada/digital-root-multiplicative-digital-root.ada similarity index 100% rename from Task/Digital-root-Multiplicative-digital-root/Ada/digital-root-multiplicative-digital-root.adb rename to Task/Digital-root-Multiplicative-digital-root/Ada/digital-root-multiplicative-digital-root.ada diff --git a/Task/Digital-root-Multiplicative-digital-root/Crystal/digital-root-multiplicative-digital-root.cr b/Task/Digital-root-Multiplicative-digital-root/Crystal/digital-root-multiplicative-digital-root.cr deleted file mode 100644 index dac178580a..0000000000 --- a/Task/Digital-root-Multiplicative-digital-root/Crystal/digital-root-multiplicative-digital-root.cr +++ /dev/null @@ -1,33 +0,0 @@ -struct Int - def mdr - n, p = self, 0 - return {0, 0} unless n > 0 - while n >= 10 - n = n.digits.product - p += 1 - end - { n, p } - end -end - -puts <<-EOH - n MDR MP -------------- -EOH -[123321, 7739, 893, 899998].each do |n| - printf "%6d %d %d\n", n, *n.mdr -end -puts -puts <<-EOH -MDR: [n0..n4] -=== ======== -EOH -buckets = Array(Array(Int32)).new(10) { [] of Int32 } -(0..).each do |n| - mdr, _ = n.mdr - buckets[mdr] << n - break if buckets.all? {|b| b.size >= 5 } -end -buckets.each_with_index do |b, i| - printf "%3d: %s\n", i, b.first(5) -end diff --git a/Task/Digital-root-Multiplicative-digital-root/EasyLang/digital-root-multiplicative-digital-root.easy b/Task/Digital-root-Multiplicative-digital-root/EasyLang/digital-root-multiplicative-digital-root.easy index 1037d26810..1e560243bc 100644 --- a/Task/Digital-root-Multiplicative-digital-root/EasyLang/digital-root-multiplicative-digital-root.easy +++ b/Task/Digital-root-Multiplicative-digital-root/EasyLang/digital-root-multiplicative-digital-root.easy @@ -1,5 +1,7 @@ -proc _mdr n &md &mp . - if n > 0 : r = 1 +proc _mdr n . md mp . + if n > 0 + r = 1 + . while n > 0 r *= n mod 10 n = n div 10 @@ -11,11 +13,11 @@ proc _mdr n &md &mp . md = r . . -proc mdr n &md &mp . +proc mdr n . md mp . mp = 0 _mdr n md mp . -numfmt 6 0 +numfmt 0 6 print "Number MDR MP" for v in [ 123321 7739 893 899998 ] mdr v md mp @@ -23,7 +25,9 @@ for v in [ 123321 7739 893 899998 ] . width = 5 len table[] 10 * width +arrbase table[] 0 len tfill[] 10 +arrbase tfill[] 0 numfmt 0 0 while total < 10 * width mdr i md mp @@ -39,7 +43,9 @@ for i = 0 to 9 write i & ": [" for j = 0 to width - 1 write table[i * width + j] - if j < width - 1 : write "," + if j < width - 1 + write "," + . . print "]" . diff --git a/Task/Digital-root-Multiplicative-digital-root/Elixir/digital-root-multiplicative-digital-root.ex b/Task/Digital-root-Multiplicative-digital-root/Elixir/digital-root-multiplicative-digital-root.elixir similarity index 100% rename from Task/Digital-root-Multiplicative-digital-root/Elixir/digital-root-multiplicative-digital-root.ex rename to Task/Digital-root-Multiplicative-digital-root/Elixir/digital-root-multiplicative-digital-root.elixir diff --git a/Task/Digital-root-Multiplicative-digital-root/JavaScript/digital-root-multiplicative-digital-root.js b/Task/Digital-root-Multiplicative-digital-root/JavaScript/digital-root-multiplicative-digital-root.js deleted file mode 100644 index fb6df86d65..0000000000 --- a/Task/Digital-root-Multiplicative-digital-root/JavaScript/digital-root-multiplicative-digital-root.js +++ /dev/null @@ -1,31 +0,0 @@ -function digmul(n) { - return [...String(n)].reduce((x, y) => Number(x) * Number(y)); -} - -function mdr_mp(n) { - let m = n, i = 0; - while (m > 9) { - m = digmul(m); - i++; - } - return {"MDR": m, "MP": i}; -} - -for (const n of [123321, 7739, 893, 899998]) { - console.log(`${n} has MDR ${mdr_mp(n)["MDR"]} and MP ${mdr_mp(n)["MP"]}`); -} - -function first5mdr(n) { - let m = 0, nums = []; - while (nums.length < 5) { - if (mdr_mp(m)["MDR"] == n) { - nums.push(m); - } - m++; - } - return `First 5 numbers with MDR ${n}: ${nums.join(", ")}`; -} - -for (let i = 0; i < 10; i++) { - console.log(first5mdr(i)); -} diff --git a/Task/Digital-root-Multiplicative-digital-root/Julia/digital-root-multiplicative-digital-root-1.jl b/Task/Digital-root-Multiplicative-digital-root/Julia/digital-root-multiplicative-digital-root-1.julia similarity index 100% rename from Task/Digital-root-Multiplicative-digital-root/Julia/digital-root-multiplicative-digital-root-1.jl rename to Task/Digital-root-Multiplicative-digital-root/Julia/digital-root-multiplicative-digital-root-1.julia diff --git a/Task/Digital-root-Multiplicative-digital-root/Julia/digital-root-multiplicative-digital-root-2.jl b/Task/Digital-root-Multiplicative-digital-root/Julia/digital-root-multiplicative-digital-root-2.julia similarity index 100% rename from Task/Digital-root-Multiplicative-digital-root/Julia/digital-root-multiplicative-digital-root-2.jl rename to Task/Digital-root-Multiplicative-digital-root/Julia/digital-root-multiplicative-digital-root-2.julia diff --git a/Task/Digital-root-Multiplicative-digital-root/Kotlin/digital-root-multiplicative-digital-root.kts b/Task/Digital-root-Multiplicative-digital-root/Kotlin/digital-root-multiplicative-digital-root.kotlin similarity index 100% rename from Task/Digital-root-Multiplicative-digital-root/Kotlin/digital-root-multiplicative-digital-root.kts rename to Task/Digital-root-Multiplicative-digital-root/Kotlin/digital-root-multiplicative-digital-root.kotlin diff --git a/Task/Digital-root-Multiplicative-digital-root/PascalABC.NET/digital-root-multiplicative-digital-root.pas b/Task/Digital-root-Multiplicative-digital-root/PascalABC.NET/digital-root-multiplicative-digital-root.pas deleted file mode 100644 index dfe2204da1..0000000000 --- a/Task/Digital-root-Multiplicative-digital-root/PascalABC.NET/digital-root-multiplicative-digital-root.pas +++ /dev/null @@ -1,33 +0,0 @@ -## -function MulDigitalRoot(num: int64): (integer, integer); -begin - var mulpersistence := 0; - while num > 9 do - begin - num := num.ToString.ToCharArray.Select(x -> x.ToDigit).Aggregate((x, y) -> x * y); - mulpersistence += 1; - end; - result := (mulpersistence, integer(num)); -end; - -var nums := |123321, 7739, 893, 899998|; -foreach var num in nums do -begin - var t := MulDigitalRoot(num); - Writeln(num, ' has multiplicative persistence ', t[0], ' and multiplicative digital root ', t[1]) -end; - -var twidth := 5; -var table := new List[10]; -for var i := 0 to 9 do - table[i] := new List(); -var number := -1; -while (table.Any(x -> x.Count < twidth)) do -begin - number += 1; - var t := MulDigitalRoot(number); - if (table[t[1]].Count < twidth) then - table[t[1]].Add(number); -end; -for var i := 0 to 9 do - WriteLn(i, ' : [', string.Join(', ', table[i]), ']'); diff --git a/Task/Digital-root-Multiplicative-digital-root/Phix/digital-root-multiplicative-digital-root-1.phix b/Task/Digital-root-Multiplicative-digital-root/Phix/digital-root-multiplicative-digital-root-1.phix index 16ee10b968..cc996c596b 100644 --- a/Task/Digital-root-Multiplicative-digital-root/Phix/digital-root-multiplicative-digital-root-1.phix +++ b/Task/Digital-root-Multiplicative-digital-root/Phix/digital-root-multiplicative-digital-root-1.phix @@ -1,44 +1,46 @@ -with javascript_semantics -function mdr_mp(integer m) - integer mp = 0 - while m>9 do - integer newm = 1 - while m do - newm *= remainder(m,10) - m = floor(m/10) - end while - m = newm - mp += 1 - end while - return {m,mp} -end function +(phixonline)--> + with javascript_semantics + function mdr_mp(integer m) + integer mp = 0 + while m>9 do + integer newm = 1 + while m do + newm *= remainder(m,10) + m = floor(m/10) + end while + m = newm + mp += 1 + end while + return {m,mp} + end function -constant tests = {123321, 7739, 893, 899998} -printf(1,"Number MDR MP\n") -printf(1,"====== === ==\n") -for i=1 to length(tests) do - integer ti = tests[i] - printf(1,"%6d %6d %6d\n",ti&mdr_mp(ti)) -end for + constant tests = {123321, 7739, 893, 899998} + printf(1,"Number MDR MP\n") + printf(1,"====== === ==\n") + for i=1 to length(tests) do + integer ti = tests[i] + printf(1,"%6d %6d %6d\n",ti&mdr_mp(ti)) + end for -integer i=0, found = 0 -sequence res = columnize({tagset(9,0)}) - -- (ie {{0},{1},..,{9}}) -while found<50 do -- (ie the full 10*5) - integer mdr1 = mdr_mp(i)[1]+1 - sequence m1 = res[mdr1] - if length(m1)<6 then - res[mdr1] = 0 -- (avoid p2js violation) - m1 &= i - res[mdr1] = m1 - found += 1 - end if - i += 1 -end while + integer i=0, found = 0 + sequence res = columnize({tagset(9,0)}) + -- (ie {{0},{1},..,{9}}) + while found<50 do -- (ie the full 10*5) + integer mdr1 = mdr_mp(i)[1]+1 + sequence m1 = res[mdr1] + if length(m1)<6 then + res[mdr1] = 0 -- (avoid p2js violation) + m1 &= i + res[mdr1] = m1 + found += 1 + end if + i += 1 + end while -printf(1,"\nMDR 1 2 3 4 5") -printf(1,"\n=== ===========================\n") + printf(1,"\nMDR 1 2 3 4 5") + printf(1,"\n=== ===========================\n") -for i=1 to 10 do - printf(1,"%2d %5d %5d %5d %5d %5d\n",res[i]) -end for + for i=1 to 10 do + printf(1,"%2d %5d %5d %5d %5d %5d\n",res[i]) + end for + + with javascript_semantics + function pdd(integer n) return sprintf("%2d",product(sq_sub(sprint(n),'0'))) end function + printf(1,"Product of the decimal digits of 1..100:\n%s\n", {join_by(apply(tagset(100),pdd),1,10)}) + s ) - - [ temp share 0 peek ] is baker ( --> n ) - [ temp share 1 peek ] is cooper ( --> n ) - [ temp share 2 peek ] is fletcher ( --> n ) - [ temp share 3 peek ] is miller ( --> n ) - [ temp share 4 peek ] is smith ( --> n ) - - [ temp share size = ] is top ( n --> b ) - [ 1 = ] is bottom ( n --> b ) - [ > ] is higher ( n n --> b ) - [ - abs 1 = ] is adjacent ( n n --> b ) - - [ if ]done[ ] is exclude ( b --> ) - [ not if ]done[ ] is require ( b --> ) - [ temp share nested join ] is include ( [ --> [ ) - - [ ]'[ ' include join - problem put - [] - ' [ 1 2 3 4 5 ] - permutations - witheach - [ temp put - problem share do - temp release ] - problem release - say " B C F M S" cr - witheach [ echo cr ] ] is solve ( --> ) - - solve - [ baker top exclude - cooper bottom exclude - fletcher top - fletcher bottom or exclude - miller cooper higher require - smith fletcher adjacent exclude - fletcher cooper adjacent exclude ] diff --git a/Task/Dinesmans-multiple-dwelling-problem/Rust/dinesmans-multiple-dwelling-problem.rs b/Task/Dinesmans-multiple-dwelling-problem/Rust/dinesmans-multiple-dwelling-problem.rust similarity index 100% rename from Task/Dinesmans-multiple-dwelling-problem/Rust/dinesmans-multiple-dwelling-problem.rs rename to Task/Dinesmans-multiple-dwelling-problem/Rust/dinesmans-multiple-dwelling-problem.rust diff --git a/Task/Dinesmans-multiple-dwelling-problem/Tailspin/dinesmans-multiple-dwelling-problem-2.tailspin b/Task/Dinesmans-multiple-dwelling-problem/Tailspin/dinesmans-multiple-dwelling-problem-2.tailspin index 0fe1190c3f..e4eaad513f 100644 --- a/Task/Dinesmans-multiple-dwelling-problem/Tailspin/dinesmans-multiple-dwelling-problem-2.tailspin +++ b/Task/Dinesmans-multiple-dwelling-problem/Tailspin/dinesmans-multiple-dwelling-problem-2.tailspin @@ -1,29 +1,24 @@ -permutations templates - when <|=1> do [1] ! - otherwise - n is $; - expand templates - p is $; - 1..$n -> templates - k is $; - [$p(..$k - 1)..., $n, $p($k..)...] ! - end ! - end expand - $n - 1 -> # -> expand ! -end permutations +// We add a zero to be able to express e.g. "not top floor" +def floors: [0..5 -> (floor:$)]; +def names: [['Ground', 'Baker', 'Cooper', 'Fletcher', 'Miller', 'Smith']... -> (name:$)]; -names is ['Baker', 'Cooper', 'Fletcher', 'Miller', 'Smith']; +def dwellings: [$floors, $names] -> \( + def solver: $ -> EinsteinSolver; -5 -> permutations -> $names($) - -> if <|?($(.. as i; -> if <|='Baker'> -> $i)... matches <~|=5>)> - -> if <|?($(.. as i; -> if <|='Cooper'> -> $i)... matches <~|=1>)> - -> if <|?($(.. as i; -> if <|='Fletcher'> -> $i)... matches <~|=1|=5>)> - -> templates - miller is $(.. as i; -> if <|='Miller'> -> $i)...; - $ -> if <|?($(.. as i; -> if <|='Cooper'> -> $i)... matches <|..$miller>)> ! - end - -> if <|?(($(.. as i; -> if <|='Smith'> -> $i)...) - ($(.. as i; -> if <|='Fletcher'> -> $i)...) matches <~|=1|=-1>)> - -> if <|?(($(.. as i; -> if <|='Cooper'> -> $i)...) - ($(.. as i; -> if <|='Fletcher'> -> $i)...) matches <~|=1|=-1>)> - -> $(.. as i; -> '$i;:$;$#10;') - -> $(..:-1) - -> '$...;$#10;' ! + {name: 'Ground', floor: 0} -> !solver::isFact + ({name: 'Ground'} solver::nextTo&{byField: :(floor:), bMinusA: [1..4]} {name: 'Baker'}) -> !VOID + ({name: 'Ground'} solver::nextTo&{byField: :(floor:), bMinusA: [2..5]} {name: 'Cooper'}) -> !VOID + ({name: 'Ground'} solver::nextTo&{byField: :(floor:), bMinusA: [2..4]} {name: 'Fletcher'}) -> !VOID + ({name: 'Cooper'} solver::nextTo&{byField: :(floor:), bMinusA: [1..4]} {name: 'Miller'}) -> !VOID + ({name: 'Fletcher'} solver::nextTo&{byField: :(floor:), bMinusA: [-4..-2, 2..4]} {name: 'Smith'}) -> !VOID + ({name: 'Fletcher'} solver::nextTo&{byField: :(floor:), bMinusA: [-4..-2, 2..4]} {name: 'Cooper'}) -> !VOID + + [$solver::solutions&{required: 6} ... -> ($ notMatching {| {name: 'Ground'} |})]! +\); + +$dwellings -> \[i]('Solution $i;: +$... -> '$; +'; +'! \)... -> !OUT::write +'No more solutions +' -> !OUT::write diff --git a/Task/Dinesmans-multiple-dwelling-problem/Tailspin/dinesmans-multiple-dwelling-problem-3.tailspin b/Task/Dinesmans-multiple-dwelling-problem/Tailspin/dinesmans-multiple-dwelling-problem-3.tailspin deleted file mode 100644 index e4eaad513f..0000000000 --- a/Task/Dinesmans-multiple-dwelling-problem/Tailspin/dinesmans-multiple-dwelling-problem-3.tailspin +++ /dev/null @@ -1,24 +0,0 @@ -// We add a zero to be able to express e.g. "not top floor" -def floors: [0..5 -> (floor:$)]; -def names: [['Ground', 'Baker', 'Cooper', 'Fletcher', 'Miller', 'Smith']... -> (name:$)]; - -def dwellings: [$floors, $names] -> \( - def solver: $ -> EinsteinSolver; - - {name: 'Ground', floor: 0} -> !solver::isFact - ({name: 'Ground'} solver::nextTo&{byField: :(floor:), bMinusA: [1..4]} {name: 'Baker'}) -> !VOID - ({name: 'Ground'} solver::nextTo&{byField: :(floor:), bMinusA: [2..5]} {name: 'Cooper'}) -> !VOID - ({name: 'Ground'} solver::nextTo&{byField: :(floor:), bMinusA: [2..4]} {name: 'Fletcher'}) -> !VOID - ({name: 'Cooper'} solver::nextTo&{byField: :(floor:), bMinusA: [1..4]} {name: 'Miller'}) -> !VOID - ({name: 'Fletcher'} solver::nextTo&{byField: :(floor:), bMinusA: [-4..-2, 2..4]} {name: 'Smith'}) -> !VOID - ({name: 'Fletcher'} solver::nextTo&{byField: :(floor:), bMinusA: [-4..-2, 2..4]} {name: 'Cooper'}) -> !VOID - - [$solver::solutions&{required: 6} ... -> ($ notMatching {| {name: 'Ground'} |})]! -\); - -$dwellings -> \[i]('Solution $i;: -$... -> '$; -'; -'! \)... -> !OUT::write -'No more solutions -' -> !OUT::write diff --git a/Task/Dining-philosophers/Ada/dining-philosophers-1.adb b/Task/Dining-philosophers/Ada/dining-philosophers-1.ada similarity index 100% rename from Task/Dining-philosophers/Ada/dining-philosophers-1.adb rename to Task/Dining-philosophers/Ada/dining-philosophers-1.ada diff --git a/Task/Dining-philosophers/Ada/dining-philosophers-2.adb b/Task/Dining-philosophers/Ada/dining-philosophers-2.ada similarity index 100% rename from Task/Dining-philosophers/Ada/dining-philosophers-2.adb rename to Task/Dining-philosophers/Ada/dining-philosophers-2.ada diff --git a/Task/Dining-philosophers/Ada/dining-philosophers-3.adb b/Task/Dining-philosophers/Ada/dining-philosophers-3.ada similarity index 100% rename from Task/Dining-philosophers/Ada/dining-philosophers-3.adb rename to Task/Dining-philosophers/Ada/dining-philosophers-3.ada diff --git a/Task/Dining-philosophers/Delphi/dining-philosophers.pas b/Task/Dining-philosophers/Delphi/dining-philosophers.delphi similarity index 100% rename from Task/Dining-philosophers/Delphi/dining-philosophers.pas rename to Task/Dining-philosophers/Delphi/dining-philosophers.delphi diff --git a/Task/Dining-philosophers/Elixir/dining-philosophers.ex b/Task/Dining-philosophers/Elixir/dining-philosophers.elixir similarity index 100% rename from Task/Dining-philosophers/Elixir/dining-philosophers.ex rename to Task/Dining-philosophers/Elixir/dining-philosophers.elixir diff --git a/Task/Dining-philosophers/Euphoria/dining-philosophers.eu b/Task/Dining-philosophers/Euphoria/dining-philosophers.euphoria similarity index 100% rename from Task/Dining-philosophers/Euphoria/dining-philosophers.eu rename to Task/Dining-philosophers/Euphoria/dining-philosophers.euphoria diff --git a/Task/Dining-philosophers/Fortran/dining-philosophers.f b/Task/Dining-philosophers/Fortran/dining-philosophers.f deleted file mode 100644 index 25b8a072a6..0000000000 --- a/Task/Dining-philosophers/Fortran/dining-philosophers.f +++ /dev/null @@ -1,86 +0,0 @@ -!Deadlock prevented by making one philosopher "left-handed" -!and making orderly use of omp locks which protect forks by ensuring that only one philosopher can use each fork at a time - program dining_philosophers - use omp_lib - implicit none - - integer, parameter :: N = 5 - integer(omp_lock_kind) :: forks(N) - character(len=20), dimension(N) :: names = [character(len=20) :: & - "Aristotle", "Kant", "Spinoza", "Marx", "Russell"] - integer :: i - integer :: next_thread = 0 ! Shared sequencing variable - - ! Initialize forks (mutexes) - do i = 1, N - call omp_init_lock(forks(i)) - end do - - ! Parallel region with N threads - !$omp parallel num_threads(N) private(i) shared(next_thread, forks, names) - i = omp_get_thread_num() + 1 ! Philosopher IDs: 1 to N - call philosopher(i, next_thread, forks, names) - !$omp end parallel - - ! Destroy locks - do i = 1, N - call omp_destroy_lock(forks(i)) - end do - -contains - - subroutine philosopher(id, next_thread, forks, names) - integer, intent(in) :: id - integer, intent(inout) :: next_thread - integer(omp_lock_kind), intent(inout) :: forks(:) - character(len=20), intent(in) :: names(:) - integer :: left, right, meals - - left = id - right = mod(id, size(forks)) + 1 ! Wrap around for right fork - !$omp barrier - ! Wait for turn to start - do while (id - 1 /= next_thread) - !$omp flush(next_thread) - end do - - print *, trim(names(id)), " sits down at the table." - - !$omp atomic - next_thread = next_thread + 1 - !$omp flush(next_thread) - - ! Philosopher's meal loop - do meals = 1, 20 -! print *, trim(names(id)), " is thinking." -! call sleep(1) - - ! Asymmetric fork acquisition to prevent deadlock - if (id < size(forks)) then - call omp_set_lock(forks(left)) - print *, trim(names(id)), " picked up left fork ", left - call omp_set_lock(forks(right)) - print *, trim(names(id)), " picked up right fork ", right - else - call omp_set_lock(forks(right)) - print *, trim(names(id)), " picked up right fork ", right - call omp_set_lock(forks(left)) - print *, trim(names(id)), " picked up left fork ", left - end if - - print *, trim(names(id)), " is eating." - call sleep(1) - - call omp_unset_lock(forks(left)) - call omp_unset_lock(forks(right)) - print *, trim(names(id)), " put down forks." - print *, trim(names(id)), " is thinking." - call sleep(1) - print *, trim(names(id)), " returns to the table." - - end do - - print *, trim(names(id)), " leaves the table." - end subroutine philosopher - -end program dining_philosophers diff --git a/Task/Dining-philosophers/FreeBASIC/dining-philosophers.basic b/Task/Dining-philosophers/FreeBASIC/dining-philosophers.basic deleted file mode 100644 index 4909077304..0000000000 --- a/Task/Dining-philosophers/FreeBASIC/dining-philosophers.basic +++ /dev/null @@ -1,108 +0,0 @@ -Const NUM_PHILOSOPHERS = 5 -Const HUNGER = 3 -Const THINK_TIME = 1000 -Const EAT_TIME = 1000 - -Type Fork - mutex As Any Ptr - available As Boolean -End Type - -Type Philosopher - nombre As String - leftFork As Fork Ptr - rightFork As Fork Ptr - hunger As Integer -End Type - -Dim Shared As Philosopher philosophers(NUM_PHILOSOPHERS-1) -Dim Shared As Fork forks(NUM_PHILOSOPHERS-1) -Dim Shared As Any Ptr printMutex - -Function threadSafePrint(text As String) As Integer - Mutexlock(printMutex) - Print text - Mutexunlock(printMutex) - Return 0 -End Function - -Sub delay(ms As Integer) - Dim As Double t = Timer - While (Timer - t) * 1000 < ms - Sleep 1, 1 - Wend -End Sub - -Function philosopherThread(param As Any Ptr) As Any Ptr - Dim As Philosopher Ptr phil = param - - threadSafePrint(phil->nombre + " seated") - - While phil->hunger > 0 - threadSafePrint(phil->nombre + " hungry") - - Mutexlock(phil->leftFork->mutex) - Mutexlock(phil->rightFork->mutex) - - threadSafePrint(phil->nombre + " eating") - delay(EAT_TIME) - - Mutexunlock(phil->leftFork->mutex) - Mutexunlock(phil->rightFork->mutex) - - threadSafePrint(phil->nombre + " thinking") - delay(THINK_TIME) - - phil->hunger -= 1 - Wend - - threadSafePrint(phil->nombre + " satisfied") - threadSafePrint(phil->nombre + " left the table") - - Return 0 -End Function - -' Main program -Dim As Integer i -Dim As String names(NUM_PHILOSOPHERS-1) = {"Aristotle", "Kant", "Spinoza", "Marx", "Russell"} -Print "Table empty" - -printMutex = Mutexcreate() - -' Initialize forks -For i = 0 To NUM_PHILOSOPHERS-1 - forks(i).mutex = Mutexcreate() - forks(i).available = True -Next - -' Initialize philosophers -For i = 0 To NUM_PHILOSOPHERS-1 - philosophers(i).nombre = names(i) - philosophers(i).hunger = HUNGER - philosophers(i).leftFork = @forks(i) - philosophers(i).rightFork = @forks((i + 1) Mod NUM_PHILOSOPHERS) -Next - -' Make last philosopher left-handed -Swap philosophers(NUM_PHILOSOPHERS-1).leftFork, philosophers(NUM_PHILOSOPHERS-1).rightFork - -' Create threads -Dim As Any Ptr threads(NUM_PHILOSOPHERS-1) -For i = 0 To NUM_PHILOSOPHERS-1 - threads(i) = Threadcreate(Cast(Sub(As Any Ptr), @philosopherThread), @philosophers(i)) -Next - -' Wait for all threads -For i = 0 To NUM_PHILOSOPHERS-1 - Threadwait(threads(i)) -Next - -' Cleanup -For i = 0 To NUM_PHILOSOPHERS-1 - Mutexdestroy(forks(i).mutex) -Next - -Mutexdestroy(printMutex) -Print "Table empty" - -Sleep diff --git a/Task/Dining-philosophers/Julia/dining-philosophers.jl b/Task/Dining-philosophers/Julia/dining-philosophers.julia similarity index 100% rename from Task/Dining-philosophers/Julia/dining-philosophers.jl rename to Task/Dining-philosophers/Julia/dining-philosophers.julia diff --git a/Task/Dining-philosophers/Kotlin/dining-philosophers.kts b/Task/Dining-philosophers/Kotlin/dining-philosophers.kotlin similarity index 100% rename from Task/Dining-philosophers/Kotlin/dining-philosophers.kts rename to Task/Dining-philosophers/Kotlin/dining-philosophers.kotlin diff --git a/Task/Dining-philosophers/Rust/dining-philosophers.rs b/Task/Dining-philosophers/Rust/dining-philosophers.rust similarity index 100% rename from Task/Dining-philosophers/Rust/dining-philosophers.rs rename to Task/Dining-philosophers/Rust/dining-philosophers.rust diff --git a/Task/Disarium-numbers/Ada/disarium-numbers.adb b/Task/Disarium-numbers/Ada/disarium-numbers.ada similarity index 100% rename from Task/Disarium-numbers/Ada/disarium-numbers.adb rename to Task/Disarium-numbers/Ada/disarium-numbers.ada diff --git a/Task/Disarium-numbers/Agena/disarium-numbers.agena b/Task/Disarium-numbers/Agena/disarium-numbers.agena deleted file mode 100644 index 8f83231d93..0000000000 --- a/Task/Disarium-numbers/Agena/disarium-numbers.agena +++ /dev/null @@ -1,34 +0,0 @@ -scope # find some Disarium numbers - numbers whose digit position-power sums - # are equal to the number, e.g. 135 = 1^1 + 3^2 + 5^3 - - # compute the nth powers of 0-9 - local constant power := seq( [], [], [], [], [], [], [], [], [] ); - for d from 0 to 9 do power[ 1, d ] := d od; - for n from 2 to 9 do - power[ n, 0 ] := 0; - for d to 9 do - power[ n, d ] := power[ n - 1, d ] * d - od - od; - # print the first few Disarium numbers - local constant maxDisarium := 19; - local count, powerOfTen, length := 0, 10, 1; - for n from 0 while count < maxDisarium do - if n = powerOfTen then - # the number of digits just increased - powerOfTen *:= 10; - length +:= 1 - fi; - # form the digit power sum - local v, dps := n, 0; - for p from length to 1 by -1 do - dps +:= power[ p, v mod 10 ]; - v \:= 10 - od; - if dps = n then - # n is Disarium - count +:= 1; - printf( " %d", n ) - fi - od -end diff --git a/Task/Disarium-numbers/COBOL/disarium-numbers.cob b/Task/Disarium-numbers/COBOL/disarium-numbers.cobol similarity index 100% rename from Task/Disarium-numbers/COBOL/disarium-numbers.cob rename to Task/Disarium-numbers/COBOL/disarium-numbers.cobol diff --git a/Task/Disarium-numbers/Delphi/disarium-numbers.pas b/Task/Disarium-numbers/Delphi/disarium-numbers.delphi similarity index 100% rename from Task/Disarium-numbers/Delphi/disarium-numbers.pas rename to Task/Disarium-numbers/Delphi/disarium-numbers.delphi diff --git a/Task/Disarium-numbers/EasyLang/disarium-numbers.easy b/Task/Disarium-numbers/EasyLang/disarium-numbers.easy index 08d03576da..b321c158ab 100644 --- a/Task/Disarium-numbers/EasyLang/disarium-numbers.easy +++ b/Task/Disarium-numbers/EasyLang/disarium-numbers.easy @@ -1,21 +1,18 @@ -fastfunc disarium n . - n0 = n - ndig = floor log n 10 + 1 - for i = ndig downto 1 - h += pow (n mod 10) i - n = n div 10 +func disarium x . + h = x + while h > 0 + d[] &= h mod 10 + h = h div 10 . - if h = n0 : return 1 -. -fastfunc nextdisarium n . - repeat - n += 1 - until disarium n = 1 + for i = 1 to len d[] + h += pow d[i] (len d[] - i + 1) . - return n + return if h = x . -for i to 18 - n = nextdisarium n - write n & " " +while count < 19 + if disarium n = 1 + count += 1 + print n + . + n += 1 . -print "" diff --git a/Task/Disarium-numbers/Fortran/disarium-numbers.f b/Task/Disarium-numbers/Fortran/disarium-numbers.f deleted file mode 100644 index 5839193fc7..0000000000 --- a/Task/Disarium-numbers/Fortran/disarium-numbers.f +++ /dev/null @@ -1,112 +0,0 @@ -! Disarium numbers -! -! tested with Intel ifx (IFX) 2025.2.0 20250605 on Kubuntu 25.04 -! GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 on Kubuntu 25.04 -! VSI Fortran x86-64 V8.6-001 on OpenVMS x86_64 V9.2-3 -! Note that VMS requires switch $Fortran/ccdefault=LIST -! otherwise 1st character of each output line is interpreted as -! Carriage Control character. -! U.B., July 2025 - -program progDisarium - -implicit none - -! Others have already shown: 20th Disarium number has 20 digits -! This will not fit in signed 8-byte-integer. Current Fortran does -! not have unsigned integers of any size, so we can only calculate 19 Disarium numbers -! (unless we start to fiddle with homegrown extended precision integers) -! These 19 numbers all fit in 4 byte integers, so we can limit ourselves to -! signed 4-byte integers, with maximum possible number of digits is 10. - - integer, parameter :: maxDigs = 10 ! Maximum number of digits - integer , parameter :: nMax = 19 ! Number of Disarim numbers to print - integer :: ii ! loop index - integer :: count ! result counter - - ii=0 - count=0 - - do while (count .lt. nMax) ! finish when count is nMax. - if (isDisarium (ii)) then ! found another result - count = count + 1 - write (6,'(i0, x)', advance='no') ii ! print one by one, but all in 1 line - end if - ii = ii + 1 - end do - write (6,*) ! terminate line only - - contains - - function isDisarium (n) result(yn) - - integer, intent(in) :: n ! decide if n is disarium number - logical :: yn ! return value, true or false - integer :: numD, sum ! number of digits, sum of pow(digits,loc) - integer :: theDigits (maxDigs) ! vector with the numD digits of n - integer :: jj ! loop index - sum = 0 - - numD = getDigits (n, theDigits) ! Decompose n into numD Digits - - do jj=1, numD - if (theDigits(jj) .ne. 0) then - sum = sum + ipow(theDigits(jj), jj) - endif - end do - yn = (sum .eq. n) - end function isDisarium - - - function getDigits (n, d) result (ndigs) - - integer, intent(in) :: n ! decompose this into its digits - integer, intent(out) :: d(maxDigs) ! result: digits of n - integer :: ndigs ! return value: number of digits - integer :: ii ! loop index - integer :: localN ! Local copy of n to work with - - if (n .lt. 10) then ! Do the trivial case without further calculation - ndigs = 1 - d(1) = n - return - endif - - ndigs = 0 - localN = n - ! store them right-justified in array d - do while (localN .gt. 0) - d(maxDigs - ndigs) = mod(localN, 10) - ndigs = ndigs + 1 - localN = localN / 10 - end do - - ! Need to shift so that most significant digit appears at d (1) - do ii = 1, ndigs - d (ii) = d (maxDigs-ndigs+ii) - end do - - end function getDigits - - - ! Integer power: calculate n ^ pw - function ipow (n,pw) result (p) - integer, intent(in) :: n ! take this... - integer, intent(in) :: pw ! ... to the power of that - integer :: p ! Return value - integer :: ii ! Loop index - - p = 1 - - if (pw .lt. 0 .or. n.le. 0) then - print *, "function ipow(n,p) is only defined for values n,p both >0" - return - end if - - do ii=1, pw - p = p * n - end do - - end function ipow - -end program progDisarium diff --git a/Task/Disarium-numbers/Frink/disarium-numbers.frink b/Task/Disarium-numbers/Frink/disarium-numbers.frink deleted file mode 100644 index 82f3f23e70..0000000000 --- a/Task/Disarium-numbers/Frink/disarium-numbers.frink +++ /dev/null @@ -1,12 +0,0 @@ -isDisarium = {|n| - s = 0 - p = 1 - for d = integerDigits[n] - { - s = s + d^p - p = p + 1 - } - return n==s -} - -println[first[select[count[0], isDisarium], 19]] diff --git a/Task/Disarium-numbers/Icon/disarium-numbers.icon b/Task/Disarium-numbers/Icon/disarium-numbers.icon deleted file mode 100644 index 86618f4a21..0000000000 --- a/Task/Disarium-numbers/Icon/disarium-numbers.icon +++ /dev/null @@ -1,11 +0,0 @@ -procedure main(A) - limit := \A[1] | 18 - every writes(" ",disarium(seq(0)))\limit - write() -end - -procedure disarium(n) - ns := string(n) # Avoid redundant conversions later - every ((s := i := 0), j := !ns, i +:= 1) do s +:= ns[i]^i - return s = n -end diff --git a/Task/Disarium-numbers/Julia/disarium-numbers.jl b/Task/Disarium-numbers/Julia/disarium-numbers.julia similarity index 100% rename from Task/Disarium-numbers/Julia/disarium-numbers.jl rename to Task/Disarium-numbers/Julia/disarium-numbers.julia diff --git a/Task/Disarium-numbers/Kotlin/disarium-numbers.kts b/Task/Disarium-numbers/Kotlin/disarium-numbers.kotlin similarity index 100% rename from Task/Disarium-numbers/Kotlin/disarium-numbers.kts rename to Task/Disarium-numbers/Kotlin/disarium-numbers.kotlin diff --git a/Task/Disarium-numbers/OCaml/disarium-numbers.ml b/Task/Disarium-numbers/OCaml/disarium-numbers.ocaml similarity index 100% rename from Task/Disarium-numbers/OCaml/disarium-numbers.ml rename to Task/Disarium-numbers/OCaml/disarium-numbers.ocaml diff --git a/Task/Disarium-numbers/Objeck/disarium-numbers.objeck b/Task/Disarium-numbers/Objeck/disarium-numbers.objeck deleted file mode 100644 index f79e3d6f25..0000000000 --- a/Task/Disarium-numbers/Objeck/disarium-numbers.objeck +++ /dev/null @@ -1,29 +0,0 @@ -class DisariumNumbers { - function : Main(args : String[]) ~ Nil { - i := 0; - count := 0; - while(count <= 18) { - if(IsDisarium(i)) { - "{$i} "->Print(); - count++; - }; - - i++; - }; - '\n'->Print(); - } - - function : IsDisarium(num : Int) ~ Bool { - n := num; - len := n->ToString()->Size(); - sum := 0; - i := 1; - while (n > 0) { - sum += Int->Pow(n % 10, len - i + 1); - n /= 10; - i ++; - }; - - return sum = num; - } -} diff --git a/Task/Disarium-numbers/PARI-GP/disarium-numbers.parigp b/Task/Disarium-numbers/PARI-GP/disarium-numbers.parigp deleted file mode 100644 index 2f0215c66a..0000000000 --- a/Task/Disarium-numbers/PARI-GP/disarium-numbers.parigp +++ /dev/null @@ -1,20 +0,0 @@ -/* Function to check if a number is a Disarium number */ -IsDisarium(n) = { - my(digs = digits(n)); /* Get digits of n */ - my(mypowers = vector(#digs, i, digs[i]^i)); /* Raise each digit to its position */ - sum(i=1, #digs, mypowers[i]) == n /* Return 1 if sum equals original number */ -} - -/* Function to find Disarium numbers up to a limit */ -find_disarium(limit) = { - my(result = [], n = 0); - while(#result < limit, - if(IsDisarium(n), result = concat(result, n)); - n++; - ); - return(result); -} - -/* Main execution */ -disariumNumbers = find_disarium(19); -print("The first 19 Disarium numbers: ", disariumNumbers); diff --git a/Task/Disarium-numbers/PascalABC.NET/disarium-numbers.pas b/Task/Disarium-numbers/PascalABC.NET/disarium-numbers.pas deleted file mode 100644 index 6e4ae6f80d..0000000000 --- a/Task/Disarium-numbers/PascalABC.NET/disarium-numbers.pas +++ /dev/null @@ -1,15 +0,0 @@ -## -function disariums: sequence of integer; -begin - var n := 0; - while true do - begin - var sum := 0.0; - foreach var x in n.ToString.ToCharArray index i do - sum := sum + power((x.todigit), i + 1); - if sum = n then yield (n); - n += 1; - end; -end; - -disariums.Take(19).Println; diff --git a/Task/Disarium-numbers/Pluto/disarium-numbers.pluto b/Task/Disarium-numbers/Pluto/disarium-numbers.pluto deleted file mode 100644 index 4952e62669..0000000000 --- a/Task/Disarium-numbers/Pluto/disarium-numbers.pluto +++ /dev/null @@ -1,29 +0,0 @@ -do -- find some Disarium numbers, numbers that are equal to their digit position power sums - - -- compute the nth powers of 0-9 # - local power = { { [0] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, {}, {}, {}, {}, {}, {}, {}, {}, {} } - for n = 2, 9 do - power[n][0] = 0 - for d = 1, 9 do - power[n][d] = power[n - 1][d] * d - end - end - - local function isDisarium (x) - local str, sum = tostring(x), 0 - for pos = 1, #str do - local digit = tonumber(str[pos]) - sum += power[pos][digit] - end - return sum == x - end - - local count, n = 0, 0 - while count < 19 do - if isDisarium( n ) then - ++ count - io.write( " ", n ) - end - ++ n - end -end diff --git a/Task/Disarium-numbers/R/disarium-numbers.r b/Task/Disarium-numbers/R/disarium-numbers.r deleted file mode 100644 index bee77272bc..0000000000 --- a/Task/Disarium-numbers/R/disarium-numbers.r +++ /dev/null @@ -1,12 +0,0 @@ -disarium_sum <- function(n, i=ceiling(log10(n))){ - ifelse(n>9, (n%%10)^i+disarium_sum(n%/%10, i-1), n) -} - -count <- num <- 0 -while(count<19){ - if(num==disarium_sum(num)){ - print(num) - count <- count+1 - } - num <- num+1 -} diff --git a/Task/Disarium-numbers/Refal/disarium-numbers.refal b/Task/Disarium-numbers/Refal/disarium-numbers.refal deleted file mode 100644 index 24e17b740b..0000000000 --- a/Task/Disarium-numbers/Refal/disarium-numbers.refal +++ /dev/null @@ -1,32 +0,0 @@ -$ENTRY Go { - = ; -}; - -Digits { - 0 = ; - s.N, : (s.R) s.D = s.D; -}; - -Pow { - s.N 0 = 1; - s.N s.P = <* s.N >>; -}; - -PowSum { - () e.P = 0; - (s.I e.X) e.P = <+ >>; - e.X = ; -}; - -Disarium { - e.N, >: e.N = True; - e.N = False; -}; - -FindDisarium { - 0 s.N = ; - s.I s.N, : { - True = <+ s.N 1>>; - False = >; - }; -}; diff --git a/Task/Disarium-numbers/Rust/disarium-numbers.rs b/Task/Disarium-numbers/Rust/disarium-numbers.rust similarity index 100% rename from Task/Disarium-numbers/Rust/disarium-numbers.rs rename to Task/Disarium-numbers/Rust/disarium-numbers.rust diff --git a/Task/Disarium-numbers/Uiua/disarium-numbers.uiua b/Task/Disarium-numbers/Uiua/disarium-numbers.uiua deleted file mode 100644 index 37dbf6e7ff..0000000000 --- a/Task/Disarium-numbers/Uiua/disarium-numbers.uiua +++ /dev/null @@ -1,2 +0,0 @@ -IsDis ← =⊸(/+≡ⁿ+1⇡⊸⧻≡₀⋕°⋕) -⍜now(⋅⇌⍢(+1⍥⟜⊂⊸IsDis|<19⋅⧻)0[]) diff --git a/Task/Discordian-date/ALGOL-68/discordian-date.alg b/Task/Discordian-date/ALGOL-68/discordian-date.alg index 11d03d007b..ebf5dda235 100644 --- a/Task/Discordian-date/ALGOL-68/discordian-date.alg +++ b/Task/Discordian-date/ALGOL-68/discordian-date.alg @@ -1,11 +1,9 @@ BEGIN # DISCORDIAN DATE CALCULATION - TRANSLATION OF MAD VIA ALGOL W # - INT gmonth, gday, gyear; + INT greg, gmonth, gday, gyear; []STRING holys = []STRING( "MUNG", "MOJO", "SYA", "ZARA", "MALA" )[ AT 0 ]; []STRING holys0 = []STRING( "CHAO", "DISCO", "CONFU", "BURE", "AF" )[ AT 0 ]; - []STRING disday = - []STRING( "SWEETMORN", "BOOMTIME", "PUNGENDAY", "PRICKLE-PRICKLE", "SETTING ORANGE" )[ AT 0 ]; - []STRING disssn = - []STRING( "CHAOS", "DISCORD", "CONFUSION", "BUREAUCRACY", "THE AFTERMATH" )[ AT 0 ]; + []STRING disday = []STRING( "SWEETMORN", "BOOMTIME", "PUNGENday", "PRICKLE-PRICKLE", "SETTING ORANGE" )[ AT 0 ]; + []STRING disssn = []STRING( "CHAOS", "DISCORD", "CONFUSION", "BUREAUCRACY", "THE AFTERMATH" )[ AT 0 ]; []INT mlengt = []INT( 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 )[ AT 0 ]; CHAR slash1, slash2; diff --git a/Task/Discordian-date/Ada/discordian-date.adb b/Task/Discordian-date/Ada/discordian-date.ada similarity index 100% rename from Task/Discordian-date/Ada/discordian-date.adb rename to Task/Discordian-date/Ada/discordian-date.ada diff --git a/Task/Discordian-date/Delphi/discordian-date.pas b/Task/Discordian-date/Delphi/discordian-date.delphi similarity index 100% rename from Task/Discordian-date/Delphi/discordian-date.pas rename to Task/Discordian-date/Delphi/discordian-date.delphi diff --git a/Task/Discordian-date/EasyLang/discordian-date.easy b/Task/Discordian-date/EasyLang/discordian-date.easy index 600746ed03..b619721dea 100644 --- a/Task/Discordian-date/EasyLang/discordian-date.easy +++ b/Task/Discordian-date/EasyLang/discordian-date.easy @@ -12,7 +12,9 @@ func day_of_year y m d . m -= 1 until m = 0 d += days[m] - if m = 2 and leap y = 1 : d += 1 + if m = 2 and leap y = 1 + d += 1 + . . return d . @@ -22,7 +24,9 @@ func$ ddate y m d . if leap y = 1 and m = 2 and d = 29 return "St. Tib's Day, in the YOLD " & dyear . - if leap y = 1 and doy >= 60 : doy -= 1 + if leap y = 1 and doy >= 60 + doy -= 1 + . dsday = doy mod1 73 dseason = doy div1 73 r$ = weekday$[doy mod1 5] & ", day " & dsday & " of " & seasons$[dseason] @@ -34,7 +38,7 @@ func$ ddate y m d . . return r$ . -proc show d$ . +proc show d$ . . a[] = number strsplit d$ "-" write d$ & " --> " print ddate a[1] a[2] a[3] diff --git a/Task/Discordian-date/Euphoria/discordian-date.eu b/Task/Discordian-date/Euphoria/discordian-date.euphoria similarity index 100% rename from Task/Discordian-date/Euphoria/discordian-date.eu rename to Task/Discordian-date/Euphoria/discordian-date.euphoria diff --git a/Task/Discordian-date/Julia/discordian-date.jl b/Task/Discordian-date/Julia/discordian-date.julia similarity index 100% rename from Task/Discordian-date/Julia/discordian-date.jl rename to Task/Discordian-date/Julia/discordian-date.julia diff --git a/Task/Discordian-date/Kotlin/discordian-date.kts b/Task/Discordian-date/Kotlin/discordian-date.kotlin similarity index 100% rename from Task/Discordian-date/Kotlin/discordian-date.kts rename to Task/Discordian-date/Kotlin/discordian-date.kotlin diff --git a/Task/Discordian-date/Phix/discordian-date.phix b/Task/Discordian-date/Phix/discordian-date.phix index 9404c2065d..2a44d313c0 100644 --- a/Task/Discordian-date/Phix/discordian-date.phix +++ b/Task/Discordian-date/Phix/discordian-date.phix @@ -1,41 +1,43 @@ -with javascript_semantics -constant seasons = {"Chaos", "Discord", "Confusion", "Bureaucracy", "The Aftermath"}, - weekday = {"Sweetmorn", "Boomtime", "Pungenday", "Prickle-Prickle", "Setting Orange"}, - apostle = {"Mungday", "Mojoday", "Syaday", "Zaraday", "Maladay"}, - holiday = {"Chaoflux", "Discoflux", "Confuflux", "Bureflux", "Afflux"} +(phixonline)--> + with javascript_semantics + constant seasons = {"Chaos", "Discord", "Confusion", "Bureaucracy", "The Aftermath"}, + weekday = {"Sweetmorn", "Boomtime", "Pungenday", "Prickle-Prickle", "Setting Orange"}, + apostle = {"Mungday", "Mojoday", "Syaday", "Zaraday", "Maladay"}, + holiday = {"Chaoflux", "Discoflux", "Confuflux", "Bureflux", "Afflux"} -function discordianDate(sequence dt) - integer {y,m,d} = dt, - leap = is_leap_year(y), - doy = day_of_year(y,m,d)-1 - string dyear = sprintf("%d",y+1166) - if leap and m=2 and d=29 then - return "St. Tib's Day, in the YOLD " & dyear - end if - if leap and doy>=60 then - doy -= 1 - end if - integer dsday = remainder(doy,73)+1, - dseason = floor(doy/73+1) - if dsday=5 then - return apostle[dseason] & ", in the YOLD " & dyear - elsif dsday=50 then - return holiday[dseason] & ", in the YOLD " & dyear - end if - string dseas = seasons[dseason], - dwday = weekday[remainder(doy,5)+1] - return sprintf("%s, day %d of %s in the YOLD %s", {dwday, dsday, dseas, dyear}) -end function + function discordianDate(sequence dt) + integer {y,m,d} = dt, + leap = is_leap_year(y), + doy = day_of_year(y,m,d)-1 + string dyear = sprintf("%d",y+1166) + if leap and m=2 and d=29 then + return "St. Tib's Day, in the YOLD " & dyear + end if + if leap and doy>=60 then + doy -= 1 + end if + integer dsday = remainder(doy,73)+1, + dseason = floor(doy/73+1) + if dsday=5 then + return apostle[dseason] & ", in the YOLD " & dyear + elsif dsday=50 then + return holiday[dseason] & ", in the YOLD " & dyear + end if + string dseas = seasons[dseason], + dwday = weekday[remainder(doy,5)+1] + return sprintf("%s, day %d of %s in the YOLD %s", {dwday, dsday, dseas, dyear}) + end function --- test code + -- test code -sequence dt = {2015,1,1,0,0,0,0,0} -include timedate.e -atom oneday = timedelta(days:=1) -set_timedate_formats({"DD/MM/YYYY"}) -for i=1 to 5 do - printf(1,"%s: %s\n",{format_timedate(dt),discordianDate(dt)}) - dt = adjust_timedate(dt,oneday*72) - printf(1,"%s: %s\n",{format_timedate(dt),discordianDate(dt)}) - dt = adjust_timedate(dt,oneday) -end for + sequence dt = {2015,1,1,0,0,0,0,0} + include timedate.e + atom oneday = timedelta(days:=1) + set_timedate_formats({"DD/MM/YYYY"}) + for i=1 to 5 do + printf(1,"%s: %s\n",{format_timedate(dt),discordianDate(dt)}) + dt = adjust_timedate(dt,oneday*72) + printf(1,"%s: %s\n",{format_timedate(dt),discordianDate(dt)}) + dt = adjust_timedate(dt,oneday) + end for + + with javascript_semantics + function linear_combination(sequence f) + string res = "" + for e=1 to length(f) do + integer fe = f[e] + if fe!=0 then + if fe=1 then + if length(res) then res &= "+" end if + elsif fe=-1 then + res &= "-" + elsif fe>0 and length(res) then + res &= sprintf("+%d*",fe) + else + res &= sprintf("%d*",fe) + end if + res &= sprintf("e(%d)",e) + end if + end for + if res="" then res = "0" end if + return res + end function -constant tests = {{1,2,3},{0,1,2,3},{1,0,3,4},{1,2,0},{0,0,0}, - {0},{1,1,1},{-1,-1,-1},{-1,-2,0,-3},{-1}} -for t in tests do - printf(1,"%12v -> %s\n",{t, linear_combination(t)}) -end for + constant tests = {{1,2,3}, + {0,1,2,3}, + {1,0,3,4}, + {1,2,0}, + {0,0,0}, + {0}, + {1,1,1}, + {-1,-1,-1}, + {-1,-2,0,-3}, + {-1}} + for i=1 to length(tests) do + sequence ti = tests[i] + printf(1,"%12s -> %s\n",{sprint(ti), linear_combination(ti)}) + end for + + without js -- file i/o + enum Airport_ID, Name, City, Country, IATA, ICAO, Latitude, Longitude, Altitude, Timezone, DST, Tz_Olson, Type, Source + function tabulate(sequence s) + s = split(trim(s),"\n") + for i,ri in s do + ri = split(ri,',') + if length(ri)!=14 then + ri[2] &= ","&ri[3] + ri[3..3] = {} + end if + for j in {Airport_ID, Latitude, Longitude, Altitude} do + ri[j] = to_number(ri[j]) + end for + for j in {Name,City,Country,ICAO} do + ri[j] = trim(ri[j],`"`) + end for + s[i] = ri + end for + return s + end function -constant airports = tabulate(get_text("airports.dat")) + constant airports = tabulate(get_text("airports.dat")) -function distance(atom lat1, lon1, lat2, lon2, integer units) - atom dist = 0 - if lat1!=lat2 or lon1!=lon2 then - atom radlat1 = lat1*PI/180, - radlat2 = lat2*PI/180, - radtheta = (lon1-lon2)*PI/180 - dist = sin(radlat1)*sin(radlat2) + cos(radlat1)*cos(radlat2)*cos(radtheta) - dist = arccos(min(dist,1))*180/PI * 60*1.1515576 -- in Statute Miles - if units = 'K' then dist *= 1.609344 end if -- in Kilometres - if units = 'N' then dist *= 0.868976 end if -- in Nautical Miles - end if - return dist -end function + function distance(atom lat1, lon1, lat2, lon2, integer units) + atom dist = 0 + if lat1!=lat2 or lon1!=lon2 then + atom radlat1 = lat1*PI/180, + radlat2 = lat2*PI/180, + radtheta = (lon1-lon2)*PI/180 + dist = sin(radlat1)*sin(radlat2) + cos(radlat1)*cos(radlat2)*cos(radtheta) + dist = arccos(min(dist,1))*180/PI * 60*1.1515576 -- in Statute Miles + if units = 'K' then dist *= 1.609344 end if -- in Kilometres + if units = 'N' then dist *= 0.868976 end if -- in Nautical Miles + end if + return dist + end function -function bearing(atom lat1, lon1, lat2, lon2) - atom bear = NULL - if lat1!=lat2 or lon1!=lon2 then - atom radlat1 = lat1*PI/180, - radlat2 = lat2*PI/180, - raddlon = (lon2-lon1)*PI/180, - y = sin(raddlon)*cos(radlat2), - x = cos(radlat1)*sin(radlat2) - sin(radlat1)*cos(radlat2)*cos(raddlon) - bear = remainder(atan2(y, x)*180/PI+360,360) - end if - return bear; -end function + function bearing(atom lat1, lon1, lat2, lon2) + atom bear = NULL + if lat1!=lat2 or lon1!=lon2 then + atom radlat1 = lat1*PI/180, + radlat2 = lat2*PI/180, + raddlon = (lon2-lon1)*PI/180, + y = sin(raddlon)*cos(radlat2), + x = cos(radlat1)*sin(radlat2) - sin(radlat1)*cos(radlat2)*cos(raddlon) + bear = remainder(atan2(y, x)*180/PI+360,360) + end if + return bear; + end function -procedure query(atom lat,lon, integer rows=20) - sequence r = {} - for a in airports do - atom lat2 = a[Latitude], - lon2 = a[Longitude], - dist = round(distance(lat,lon,lat2,lon2,'N'),10), - bear = round(bearing(lat,lon,lat2,lon2)) - r = append(r,{a[Name],a[Country],a[ICAO],dist,bear}) - end for - r = sort_columns(r,{4})[1..rows] - printf(1," Name | Country | ICAO | Distance in NM | Bearing in ° \n") - printf(1,"-------------------------------------+----------------+------+----------------+--------------\n") - printf(1,"%s\n",{join(r,"\n",fmt:=" %-36s| %-15s| %4s | %4.1f | %3d")}) - printf(1,"(%d rows)\n",rows) -end procedure + procedure query(atom lat,lon, integer rows=20) + sequence r = {} + for a in airports do + atom lat2 = a[Latitude], + lon2 = a[Longitude], + dist = round(distance(lat,lon,lat2,lon2,'N'),10), + bear = round(bearing(lat,lon,lat2,lon2)) + r = append(r,{a[Name],a[Country],a[ICAO],dist,bear}) + end for + r = sort_columns(r,{4})[1..rows] + printf(1," Name | Country | ICAO | Distance in NM | Bearing in ° \n") + printf(1,"-------------------------------------+----------------+------+----------------+--------------\n") + printf(1,"%s\n",{join(r,"\n",fmt:=" %-36s| %-15s| %4s | %4.1f | %3d")}) + printf(1,"(%d rows)\n",rows) + end procedure -query(51.514669, 2.198581) + query(51.514669, 2.198581) + + with javascript_semantics + sequence rfs = {1} -- reverse factorial(1) in base 1000 -function init_zc() - sequence zc = repeat(0,999) - for x=1 to 9 do - zc[x] = 2 -- 00x - zc[10*x] = 2 -- 0x0 - zc[100*x] = 2 -- x00 - for y=10 to 90 by 10 do - zc[y+x] = 1 -- 0yx - zc[10*y+x] = 1 -- y0x - zc[10*(y+x)] = 1 -- yx0 - end for - end for - return zc -end function -constant zc = init_zc() + function init_zc() + sequence zc = repeat(0,999) + for x=1 to 9 do + zc[x] = 2 -- 00x + zc[10*x] = 2 -- 0x0 + zc[100*x] = 2 -- x00 + for y=10 to 90 by 10 do + zc[y+x] = 1 -- 0yx + zc[10*y+x] = 1 -- y0x + zc[10*(y+x)] = 1 -- yx0 + end for + end for + return zc + end function + constant zc = init_zc() -atom t0 = time(), - total = 0 -integer trail = 1, - first = 0 -for f=2 to iff(platform()=JS?10000:50000) do - integer carry = 0, d999, - zeroes = (trail-1)*3, - j = trail, l = length(rfs) - while j<=l or carry do - if j<=l then - carry = (rfs[j])*f+carry - end if - d999 = remainder(carry,1000) - if j<=l then - rfs[j] = d999 - else - rfs &= d999 - end if - zeroes += iff(d999=0?3:zc[d999]) - carry = floor(carry/1000) - j += 1 - end while - while rfs[trail]=0 do trail += 1 end while - -- d999 := quick correction for length and zeroes: - d999 = rfs[$] - d999 = iff(d999<100?iff(d999<10?2:1):0) - zeroes -= d999 - integer digits = length(rfs)*3-d999 + atom t0 = time(), + total = 0 + integer trail = 1, + first = 0 + for f=2 to iff(platform()=JS?10000:50000) do + integer carry = 0, d999, + zeroes = (trail-1)*3, + j = trail, l = length(rfs) + while j<=l or carry do + if j<=l then + carry = (rfs[j])*f+carry + end if + d999 = remainder(carry,1000) + if j<=l then + rfs[j] = d999 + else + rfs &= d999 + end if + zeroes += iff(d999=0?3:zc[d999]) + carry = floor(carry/1000) + j += 1 + end while + while rfs[trail]=0 do trail += 1 end while + -- d999 := quick correction for length and zeroes: + d999 = rfs[$] + d999 = iff(d999<100?iff(d999<10?2:1):0) + zeroes -= d999 + integer digits = length(rfs)*3-d999 - total += zeroes/digits - atom ratio = total/f - if ratio>=0.16 then - first = 0 - elsif first=0 then - first = f - end if - if find(f,{100,1000,10000}) then - string e = elapsed(time()-t0) - printf(1,"Mean proportion of zero digits in factorials to %d is %.10f (%s)\n",{f,ratio,e}) - end if -end for -if platform()!=JS then - string e = elapsed(time()-t0) - printf(1,"The mean proportion dips permanently below 0.16 at %d. (%s)\n",{first,e}) -end if + total += zeroes/digits + atom ratio = total/f + if ratio>=0.16 then + first = 0 + elsif first=0 then + first = f + end if + if find(f,{100,1000,10000}) then + string e = elapsed(time()-t0) + printf(1,"Mean proportion of zero digits in factorials to %d is %.10f (%s)\n",{f,ratio,e}) + end if + end for + if platform()!=JS then + string e = elapsed(time()-t0) + printf(1,"The mean proportion dips permanently below 0.16 at %d. (%s)\n",{first,e}) + end if + + with javascript_semantics + atom t0 = time(), + f10 = log10(1), + total = 0 + integer first = 0 + for f=2 to 50000 do + f10 += log10(f) + integer digits = ceil(f10), + zeroes = 0, + v = 5 + while v<=f do + zeroes += floor(f/v) + v *= 5 + end while + total += zeroes/digits + atom ratio = total/f + if ratio>=0.07 then + first = 0 + elsif first=0 then + first = f + end if + if find(f,{100,1000,10000}) then + printf(1,"Mean proportion of trailing zeroes in factorials to %d is %f\n",{f,ratio}) + end if + end for + string e = elapsed(time()-t0) + printf(1,"The mean proportion dips permanently below 0.07 at %d. (%s)\n",{first,e}) + s ) - [ stack ] is zeroes ( --> s ) - - [ 0 digits put - 0 zeroes put - [ 1 digits tally - 10 /mod 0 = - zeroes tally - dup 0 = until ] - drop - zeroes take - digits take - reduce ] is zeroprop ( n --> n/d ) - - [ dup dip - [ 0 n->v - 1 ] - times - [ i^ 1+ * - dup zeroprop - rot dip v+ ] - drop - rot n->v v/ ] is distribution ( n --> n/d ) - - 100 distribution 10 point$ echo$ cr - 1000 distribution 10 point$ echo$ cr - 10000 distribution 10 point$ echo$ cr diff --git a/Task/Distribution-of-0-digits-in-factorial-series/Rust/distribution-of-0-digits-in-factorial-series.rs b/Task/Distribution-of-0-digits-in-factorial-series/Rust/distribution-of-0-digits-in-factorial-series.rust similarity index 100% rename from Task/Distribution-of-0-digits-in-factorial-series/Rust/distribution-of-0-digits-in-factorial-series.rs rename to Task/Distribution-of-0-digits-in-factorial-series/Rust/distribution-of-0-digits-in-factorial-series.rust diff --git a/Task/Diversity-prediction-theorem/ANSI-BASIC/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/ANSI-BASIC/diversity-prediction-theorem.basic index fc652fbb06..1bffb0d693 100644 --- a/Task/Diversity-prediction-theorem/ANSI-BASIC/diversity-prediction-theorem.basic +++ b/Task/Diversity-prediction-theorem/ANSI-BASIC/diversity-prediction-theorem.basic @@ -1,12 +1,12 @@ 100 PROGRAM DiversityPredictionTheorem 110 OPTION BASE 0 -120 DIM test(1, 4) +120 DIM Estimates(1, 4) 130 FOR I = 0 TO 1 140 LET J = 0 -150 READ test(I, J) -160 DO WHILE test(I, J) <> 0 +150 READ Estimates(I, J) +160 DO WHILE Estimates(I, J) <> 0 170 LET J = J + 1 -180 READ test(I, J) +180 READ Estimates(I, J) 190 LOOP 200 NEXT I 210 DATA 48.0, 47.0, 51.0, 0.0 @@ -15,16 +15,16 @@ 240 FOR I = 0 TO 1 250 LET Sum = 0 260 LET J = 0 -270 DO WHILE test(I, J) <> 0 -280 LET Sum = Sum + (test(I, J) - TrueVal) ^ 2 +270 DO WHILE Estimates(I, J) <> 0 +280 LET Sum = Sum + (Estimates(I, J) - TrueVal) ^ 2 290 LET J = J + 1 300 LOOP 310 LET AvgErr = Sum / J 320 PRINT USING "Average error : ##.###": AvgErr 330 LET Sum = 0 340 LET J = 0 -350 DO WHILE test(I, J) <> 0 -360 LET Sum = Sum + test(I, J) +350 DO WHILE Estimates(I, J) <> 0 +360 LET Sum = Sum + Estimates(I, J) 370 LET J = J + 1 380 LOOP 390 LET Avg = Sum / J diff --git a/Task/Diversity-prediction-theorem/Ada/diversity-prediction-theorem.adb b/Task/Diversity-prediction-theorem/Ada/diversity-prediction-theorem.ada similarity index 100% rename from Task/Diversity-prediction-theorem/Ada/diversity-prediction-theorem.adb rename to Task/Diversity-prediction-theorem/Ada/diversity-prediction-theorem.ada diff --git a/Task/Diversity-prediction-theorem/Asymptote/diversity-prediction-theorem.asymptote b/Task/Diversity-prediction-theorem/Asymptote/diversity-prediction-theorem.asymptote deleted file mode 100644 index d76b741bc3..0000000000 --- a/Task/Diversity-prediction-theorem/Asymptote/diversity-prediction-theorem.asymptote +++ /dev/null @@ -1,31 +0,0 @@ -import math; - -real[][] estimates = { - {48, 47, 51}, - {48, 47, 51, 42} -}; - -real trueVal = 49; - -for (int i = 0; i < estimates.length; ++i) { - - real vari = 0; - real sum = 0; - - for (int j = 0; j < estimates[i].length; ++j) { - real d = estimates[i][j] - trueVal; - vari += d*d; - sum += estimates[i][j]; - } - - real n = estimates[i].length; - real avgErr = vari / n; - real refAvg = sum / n; - real crowdErr = (trueVal - refAvg)^2; - real div = avgErr - crowdErr; - - write("Average error : ", avgErr); - write(" Crowd error : ", crowdErr); - write(" Diversity : ", div); - write(""); -} diff --git a/Task/Diversity-prediction-theorem/Chipmunk-Basic/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/Chipmunk-Basic/diversity-prediction-theorem.basic deleted file mode 100644 index 6c9a24f887..0000000000 --- a/Task/Diversity-prediction-theorem/Chipmunk-Basic/diversity-prediction-theorem.basic +++ /dev/null @@ -1,28 +0,0 @@ -100 cls -110 dim estimates(1,5) -120 estimates(0,0) = 48 -130 estimates(0,1) = 47 -140 estimates(0,2) = 51 -150 estimates(1,0) = 48 -160 estimates(1,1) = 47 -170 estimates(1,2) = 51 -180 estimates(1,3) = 42 -190 trueval = 49 -200 for i = 0 to 1 -210 vari = 0 -220 sum = 0 -230 c = 0 -240 while estimates(i,c) <> 0 -250 vari = vari+(estimates(i,c)-trueval)^2 -260 sum = sum+estimates(i,c) -270 c = c+1 -280 wend -290 avgerr = vari/c -300 refavg = sum/c -310 crowderr = (trueval-refavg)^2 -320 print using "Average error : ###.###";avgerr -330 print using " Crowd error : ###.###";crowderr -340 print using " Diversity : ###.###";avgerr-crowderr -350 print -360 next i -370 end diff --git a/Task/Diversity-prediction-theorem/Crystal/diversity-prediction-theorem.cr b/Task/Diversity-prediction-theorem/Crystal/diversity-prediction-theorem.cr deleted file mode 100644 index e0d89e569a..0000000000 --- a/Task/Diversity-prediction-theorem/Crystal/diversity-prediction-theorem.cr +++ /dev/null @@ -1,22 +0,0 @@ -module Enumerable - def average - sum / size - end -end - -def get_values (true_value, crowd_estimates) - avg_individual_error = crowd_estimates.map {|e| (e - true_value)**2 }.average - collective_error = (crowd_estimates.average - true_value)**2 - crowd_avg = crowd_estimates.average - prediction_diversity = crowd_estimates.map {|e| (e - crowd_avg)**2 }.average - - { avg_individual_error, collective_error, prediction_diversity } -end - -puts "Value Crowd estimates Average error Crowd error Prediction diversity" -puts "---------------------------------------------------------------------------" - -[{49, [48, 47, 51]}, {49, [48, 47, 51, 42]}].each do |true_value, crowd_estimates| - printf " %2d %-20s %9.5f %9.5f %9.5f\n", true_value, crowd_estimates, - *get_values(true_value, crowd_estimates) -end diff --git a/Task/Diversity-prediction-theorem/Dart/diversity-prediction-theorem.dart b/Task/Diversity-prediction-theorem/Dart/diversity-prediction-theorem.dart deleted file mode 100644 index bd5382f318..0000000000 --- a/Task/Diversity-prediction-theorem/Dart/diversity-prediction-theorem.dart +++ /dev/null @@ -1,33 +0,0 @@ -double sum(List array) { - double s = 0; - for (var x in array) s += x; - return s; -} - -double square(double x) => x * x; - -double mean(List array) => sum(array) / array.length; - -double averageSquareDiff(double a, List predictions) { - List results = []; - for (var x in predictions) { - results.add(square(x - a)); - } - return mean(results); -} - -void diversityTheorem(double truth, List predictions) { - double avgErr = averageSquareDiff(truth, predictions); - double avg = mean(predictions); - double crowdErr = square(truth - avg); - double diversity = averageSquareDiff(avg, predictions); - - print("Average error: ${avgErr.toStringAsFixed(4)}"); - print(" Crowd error: ${crowdErr.toStringAsFixed(4)}"); - print(" Diversity: ${diversity.toStringAsFixed(4)}\n"); -} - -void main() { - diversityTheorem(49, [48, 47, 51]); - diversityTheorem(49, [48, 47, 51, 42]); -} diff --git a/Task/Diversity-prediction-theorem/Delphi/diversity-prediction-theorem.pas b/Task/Diversity-prediction-theorem/Delphi/diversity-prediction-theorem.delphi similarity index 100% rename from Task/Diversity-prediction-theorem/Delphi/diversity-prediction-theorem.pas rename to Task/Diversity-prediction-theorem/Delphi/diversity-prediction-theorem.delphi diff --git a/Task/Diversity-prediction-theorem/DuckDB/diversity-prediction-theorem.duckdb b/Task/Diversity-prediction-theorem/DuckDB/diversity-prediction-theorem.duckdb deleted file mode 100644 index 2cb2f486dd..0000000000 --- a/Task/Diversity-prediction-theorem/DuckDB/diversity-prediction-theorem.duckdb +++ /dev/null @@ -1,31 +0,0 @@ -create or replace function mean(lst) as ( - list_sum(lst)::DOUBLE / length(lst) -); - -# average absolute deviation relative to value -create or replace function aad(lst, value) as - list_transform(lst, x -> @(x-value)).list_sum() / length(lst) ; - -# average sum of squares -create or replace function ass(lst) as - list_transform(lst, x -> x ^ 2).list_sum() / length(lst); - -# Average sum of squared deviations relative to value -create or replace function asd(lst, value) as - list_transform(lst, x -> x - value).ass(); - -create or replace function diversitytheorem(actual, estimates) as table ( - select length(estimates) as "sample size", - actual as actual, - mean(estimates)::DECIMAL(4,2) as mean, - aad(estimates, actual)::DECIMAL(4,2) as "aad about actual", - aad(estimates, mean)::DECIMAL(4,2) as "aad about mean", - asd(estimates, actual)::DECIMAL(4,2) as "asd about actual", - asd(estimates, mean)::DECIMAL(4,2) as "asd about mean", - ((mean - actual) ^ 2)::DECIMAL(4,2) as "(mean-actual)^2" -); - -# The tasks: -from diversitytheorem(49, [48, 47, 51]) -union all -from diversitytheorem(49, [48, 47, 51, 42]); diff --git a/Task/Diversity-prediction-theorem/EasyLang/diversity-prediction-theorem.easy b/Task/Diversity-prediction-theorem/EasyLang/diversity-prediction-theorem.easy index 2993d3082c..5ebd3731b8 100644 --- a/Task/Diversity-prediction-theorem/EasyLang/diversity-prediction-theorem.easy +++ b/Task/Diversity-prediction-theorem/EasyLang/diversity-prediction-theorem.easy @@ -1,4 +1,4 @@ -proc calc TrueVal test[] . +proc calc TrueVal test[] . . for test in test[] h = (test - TrueVal) Vari += h * h @@ -10,8 +10,8 @@ proc calc TrueVal test[] . h = (TrueVal - RefAvg) CrowdErr = h * h print "Average error : " & AvgErr - print "Crowd error : " & CrowdErr - print "Diversity : " & AvgErr - CrowdErr + print " Crowd error : " & CrowdErr + print " Diversity : " & AvgErr - CrowdErr print "" . calc 49 [ 48 47 51 ] diff --git a/Task/Diversity-prediction-theorem/Fortran/diversity-prediction-theorem.f b/Task/Diversity-prediction-theorem/Fortran/diversity-prediction-theorem.f deleted file mode 100644 index 1de6707869..0000000000 --- a/Task/Diversity-prediction-theorem/Fortran/diversity-prediction-theorem.f +++ /dev/null @@ -1,58 +0,0 @@ -! Diversity prediction theorem -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.10 -! GNU gfortran (Ubuntu 15.2.0-4ubuntu4) 15.2.0 on Kubuntu 25.10 -! VSI Fortran x86-64 V8.7-001 on OpenVMS V9.2-3 -program DivTheo - -implicit none -integer, parameter :: DP = 8 ! Kind for double precision Reals - -real (kind=DP), dimension(3), parameter :: Case1 =[48._DP,47._DP,51._DP] -real (kind=DP), dimension(4), parameter :: Case2 =[48._DP,47._DP,51._DP,42._DP] - - -call diversityTheorem (49._DP, case1, size(Case1)) -write (*,*) -call diversityTheorem (49._DP, case2, size(Case2)) - -contains -subroutine diversityTheorem (trueValue, predictions, n) -real (kind=DP), intent(in) :: trueValue -integer, intent(in) :: n -integer :: i -real (kind=DP), dimension(n), intent(in) :: predictions - -real (kind=DP) :: avPred - -avPred = sum(predictions,n) / n -! From the task desciption: -! show... -! the true value and the crowd estimates -! the average error -! the crowd error -! the prediction diversity -write (*, '("true value :", F4.0)') trueValue -write (*, '("crowd''s estimate :", 8F4.0)') (predictions(i),i=1,n) -write (*, '("average error :", F8.4 )') avSqDiff (trueValue, predictions, n) -write (*, '("crowd error :", F8.4 )') (trueValue - avPred) ** 2 -write (*, '("diversity :", F8.4 )') avSqDiff (avPred, predictions, n) -end subroutine diversityTheorem - - - -function avSqDiff (av, pred, n) result (sqDiff) - -integer, intent(in) :: n -real (kind=DP), intent(in) :: av -real (kind=DP), dimension(n), intent(in) :: pred -real (kind=DP) sqDiff -integer :: ii -sqDiff = 0 -do ii=1,n - sqdiff = sqdiff + (av-pred(ii))**2 -enddo -sqDiff = sqDiff / n - -end function avSqDiff - -end program DivTheo diff --git a/Task/Diversity-prediction-theorem/FreeBASIC/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/FreeBASIC/diversity-prediction-theorem.basic index 43b33a4ac2..2b67d7c69a 100644 --- a/Task/Diversity-prediction-theorem/FreeBASIC/diversity-prediction-theorem.basic +++ b/Task/Diversity-prediction-theorem/FreeBASIC/diversity-prediction-theorem.basic @@ -18,9 +18,9 @@ For i = 0 To 1 RefAvg = Sum / c CrowdErr = (TrueVal - RefAvg) ^2 - Print Using "Average error : ##.####"; AvgErr - Print Using " Crowd error : ##.####"; CrowdErr - Print Using " Diversity : ##.####"; AvgErr - CrowdErr + Print Using "Average error : ###.###"; AvgErr + Print Using " Crowd error : ###.###"; CrowdErr + Print Using " Diversity : ###.###"; AvgErr - CrowdErr Print Sleep diff --git a/Task/Diversity-prediction-theorem/FutureBasic/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/FutureBasic/diversity-prediction-theorem.basic deleted file mode 100644 index 33e8b12ae8..0000000000 --- a/Task/Diversity-prediction-theorem/FutureBasic/diversity-prediction-theorem.basic +++ /dev/null @@ -1,28 +0,0 @@ -include "NSLog.incl" - -double local fn Square( d as double ) -end fn = d * d - -double local fn AverageSquareDiff( d as double, predictions as CFArrayRef ) - double sum = 0.0 - for CFNumberRef num in predictions - sum += fn Square( fn NumberDoubleValue( num ) - d ) - next - return sum / fn ArrayCount( predictions ) -end fn = 0.0 - -CFStringRef local fn DiversityTheorem( truth as double, predictions as CFArrayRef ) - double average = fn NumberDoubleValue( fn ObjectValueForKeyPath( predictions, @"@avg.self" ) ) - CFStringRef avgErr = fn StringWithFormat( @"%4.5f", fn AverageSquareDiff( truth, predictions ) ) - CFStringRef crowdErr = fn StringWithFormat( @"%6.5f", fn Square( truth - average ) ) - CFStringRef diversity = fn StringWithFormat( @"%6.5f", fn AverageSquareDiff( average, predictions ) ) - return fn StringWithFormat( @"Average error : %@\nCrowd error : %@\nDiversity : %@\n", avgErr, crowdErr, diversity ) -end fn = NULL - -NSLog( @"Diversity prediction with crowd estimates of 48, 47 and 51:" ) -NSLog( @"%@\n", fn DiversityTheorem( 49.0, @[@48.0, @47.0, @51.0] ) ) - -NSLog( @"Diversity prediction with crowd estimates of 48, 47, 51 and 42:" ) -NSLog( @"%@\n", fn DiversityTheorem( 49.0, @[@48.0, @47.0, @51.0, @42.0] ) ) - -HandleEvents diff --git a/Task/Diversity-prediction-theorem/Gambas/diversity-prediction-theorem.gambas b/Task/Diversity-prediction-theorem/Gambas/diversity-prediction-theorem.gambas deleted file mode 100644 index 0c4b0f6e73..0000000000 --- a/Task/Diversity-prediction-theorem/Gambas/diversity-prediction-theorem.gambas +++ /dev/null @@ -1,39 +0,0 @@ -Public Sub Main() - - Dim test As New Float[2, 5] - - test[0, 0] = 48 - test[0, 1] = 47 - test[0, 2] = 51 - test[1, 0] = 48 - test[1, 1] = 47 - test[1, 2] = 51 - test[1, 3] = 42 - - Dim TrueVal As Float = 49 - Dim AvgErr As Float, CrowdErr As Float, RefAvg As Float - Dim Vari As Float, Sum As Float - Dim i As Integer, c As Integer - - For i = 0 To 1 - Vari = 0 - Sum = 0 - c = 0 - - While test[i, c] <> 0 - Vari += (test[i, c] - TrueVal) ^ 2 - Sum += test[i, c] - c += 1 - Wend - - AvgErr = Vari / c - RefAvg = Sum / c - CrowdErr = (TrueVal - RefAvg) ^ 2 - - Print "Average error : "; Format$(AvgErr, "##.###0") - Print " Crowd error : "; Format$(CrowdErr, "##.###0") - Print " Diversity : "; Format$(AvgErr - CrowdErr, "##.###0") - Print - Next - -End diff --git a/Task/Diversity-prediction-theorem/Julia/diversity-prediction-theorem.jl b/Task/Diversity-prediction-theorem/Julia/diversity-prediction-theorem.julia similarity index 100% rename from Task/Diversity-prediction-theorem/Julia/diversity-prediction-theorem.jl rename to Task/Diversity-prediction-theorem/Julia/diversity-prediction-theorem.julia diff --git a/Task/Diversity-prediction-theorem/Kotlin/diversity-prediction-theorem.kts b/Task/Diversity-prediction-theorem/Kotlin/diversity-prediction-theorem.kotlin similarity index 100% rename from Task/Diversity-prediction-theorem/Kotlin/diversity-prediction-theorem.kts rename to Task/Diversity-prediction-theorem/Kotlin/diversity-prediction-theorem.kotlin diff --git a/Task/Diversity-prediction-theorem/Loglan82/diversity-prediction-theorem.loglan82 b/Task/Diversity-prediction-theorem/Loglan82/diversity-prediction-theorem.loglan82 deleted file mode 100644 index 076c7fc72c..0000000000 --- a/Task/Diversity-prediction-theorem/Loglan82/diversity-prediction-theorem.loglan82 +++ /dev/null @@ -1,53 +0,0 @@ -program diverspredict; -(* Diversity prediction theorem *) - -var - true_val: real, - estims: arrayof arrayof real, - sum, avg, avg_err, crowd_err, diff: real, - i, j: integer; -begin - array estims dim (0 : 1); - for i := 0 to 1 - do - array estims(i) dim (0 : 4) - od; - - estims(0, 0) := 48.0; - estims(0, 1) := 47.0; - estims(0, 2) := 51.0; - estims(0, 3) := 0.0; - estims(0, 4) := 0.0; - estims(1, 0) := 48.0; - estims(1, 1) := 47.0; - estims(1, 2) := 51.0; - estims(1, 3) := 42.0; - estims(1, 4) := 0.0; - true_val := 49.0; - for i := 0 to 1 - do - sum := 0.0; - j := 0; - while estims(i, j) =/= 0 - do - diff := estims(i, j) - true_val; - sum := sum + diff * diff; - j := j + 1; - od; - avg_err := sum / j; - writeln("Average error : ", avg_err: 7: 3); - sum := 0; - j := 0; - while estims(i, j) =/= 0 - do - sum := sum + estims(i, j); - j := j + 1; - od; - avg := sum / j; - diff := true_val - avg; - crowd_err := diff * diff; - writeln("Crowd error : ", crowd_err: 7: 3); - writeln("Diversity : ", avg_err - crowd_err: 7: 3); - writeln; - od -end diff --git a/Task/Diversity-prediction-theorem/MSX-Basic/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/MSX-Basic/diversity-prediction-theorem.basic deleted file mode 100644 index 6884ab01b3..0000000000 --- a/Task/Diversity-prediction-theorem/MSX-Basic/diversity-prediction-theorem.basic +++ /dev/null @@ -1,33 +0,0 @@ -100 CLS -110 DIM TS!(1,4) -120 TS!(0,0) = 48 -130 TS!(0,1) = 47 -140 TS!(0,2) = 51 -170 TS!(1,0) = 48 -180 TS!(1,1) = 47 -190 TS!(1,2) = 51 -200 TS!(1,3) = 42 -220 EV! = 49 -230 FOR I = 0 TO 1 -240 VA! = 0 -250 SM! = 0 -260 N = 0 -270 C = 0 -280 IF TS!(I,C) = 0 THEN 340 -290 DF! = TS!(I,C) - EV! -300 VA! = VA! + EXP(LOG(ABS(DF!)) * 2) -310 SM! = SM! + TS!(I,C) -320 N = N + 1 -330 C = C + 1 : GOTO 280 -340 C = C - 1 -350 IF N = 0 THEN 440 ' por si acaso -360 AV! = VA!/N -370 RV! = SM!/N -380 DF! = EV!-RV! -390 CR! = EXP(LOG(ABS(DF!))*2) -400 PRINT USING "Average error : ##.####";AV! -410 PRINT USING " Crowd error : ##.####";CR! -420 PRINT USING " Diversity : ##.####";AV!-CR! -430 PRINT -440 NEXT -350 END diff --git a/Task/Diversity-prediction-theorem/Maxima/diversity-prediction-theorem.maxima b/Task/Diversity-prediction-theorem/Maxima/diversity-prediction-theorem.maxima deleted file mode 100644 index d25d8de345..0000000000 --- a/Task/Diversity-prediction-theorem/Maxima/diversity-prediction-theorem.maxima +++ /dev/null @@ -1,10 +0,0 @@ -diversityprediction(obs, ests) := block( - sprint("True value:", obs), newline(), - apply(sprint, cons("Estimates:", ests)), newline(), - sprint("Average error:", mean((obs-ests)^2)), newline(), - sprint("Crowd error:", (obs-mean(ests))^2), newline(), - sprint("Prediction diversity:", mean((mean(ests)-ests)^2)) -)$ - -diversityprediction(49, [48, 47, 51])$ -diversityprediction(49, [48, 47, 51, 42])$ diff --git a/Task/Diversity-prediction-theorem/Modula-2/diversity-prediction-theorem.mod2 b/Task/Diversity-prediction-theorem/Modula-2/diversity-prediction-theorem.mod2 deleted file mode 100644 index 38528dab9d..0000000000 --- a/Task/Diversity-prediction-theorem/Modula-2/diversity-prediction-theorem.mod2 +++ /dev/null @@ -1,48 +0,0 @@ -MODULE DiversPredict; -(* Diversity prediction theorem *) - -FROM STextIO IMPORT - WriteLn, WriteString; -FROM SRealIO IMPORT - WriteFixed; - -TYPE - TEstims = ARRAY [0 .. 1], [0 .. 4] OF REAL; -VAR - Estims: TEstims; - TrueVal, Sum, AvgErr, Avg, CrowdErr, Diff: REAL; - I, J: CARDINAL; -BEGIN - Estims := TEstims{{48.0, 47.0, 51.0, 0.0, 0.0}, - {48.0, 47.0, 51.0, 42.0, 0.0}}; - TrueVal := 49.0; - FOR I := 0 TO 1 DO - Sum := 0.0; - J := 0; - WHILE Estims[I, J] <> 0.0 DO - Diff := Estims[I, J] - TrueVal; - Sum := Sum + Diff * Diff; - J := J + 1; - END; - AvgErr := Sum / FLOAT(J); - WriteString("Average error: "); - WriteFixed(AvgErr, 3, 7); - WriteLn; - Sum := 0.0; - J := 0; - WHILE Estims[I, J] <> 0.0 DO - Sum := Sum + Estims[I, J]; - J := J + 1; - END; - Avg := Sum / FLOAT(J); - Diff := TrueVal - Avg; - CrowdErr := Diff * Diff; - WriteString("Crowd error : "); - WriteFixed(CrowdErr, 3, 7); - WriteLn; - WriteString("Diversity : "); - WriteFixed(AvgErr - CrowdErr, 3, 7); - WriteLn; - WriteLn; - END; -END DiversPredict. diff --git a/Task/Diversity-prediction-theorem/Nascom-BASIC/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/Nascom-BASIC/diversity-prediction-theorem.basic index a934c0e988..3136029ccc 100644 --- a/Task/Diversity-prediction-theorem/Nascom-BASIC/diversity-prediction-theorem.basic +++ b/Task/Diversity-prediction-theorem/Nascom-BASIC/diversity-prediction-theorem.basic @@ -1,5 +1,5 @@ 10 REM Diversity prediction theorem -20 DIM EST(1,4):REM test +20 DIM EST(1,4):REM Estimates 30 FOR I=0 TO 1 40 J=0:READ EST(I,J) 50 IF EST(I,J)=0 THEN 80 diff --git a/Task/Diversity-prediction-theorem/OxygenBasic/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/OxygenBasic/diversity-prediction-theorem.basic deleted file mode 100644 index 6c4feeb2c1..0000000000 --- a/Task/Diversity-prediction-theorem/OxygenBasic/diversity-prediction-theorem.basic +++ /dev/null @@ -1,37 +0,0 @@ -uses console - -dim float test(1, 4) -test(0,0) = 48 -test(0,1) = 47 -test(0,2) = 51 -test(1,0) = 48 -test(1,1) = 47 -test(1,2) = 51 -test(1,3) = 42 -test(1,4) = 0 - -dim float TrueVal = 49 -dim float AvgErr, CrowdErr, RefAvg, Vari, Sum -int i, c - -for i = 0 to 1 - Vari = 0 - Sum = 0 - c = 0 - while test(i,c) <> 0 - Vari += pow(test(i,c) - TrueVal) - Sum += test(i,c) - c += 1 - wend - AvgErr = Vari / c - RefAvg = Sum / c - CrowdErr = pow(TrueVal - RefAvg) - - printl "Average error : " AvgErr - printl " Crowd error : " CrowdErr - printl " Diversity : " AvgErr - CrowdErr - printl -next i - -printl cr "Enter ..." -waitkey diff --git a/Task/Diversity-prediction-theorem/PHP/diversity-prediction-theorem.php b/Task/Diversity-prediction-theorem/PHP/diversity-prediction-theorem.php deleted file mode 100644 index fb7d657c1f..0000000000 --- a/Task/Diversity-prediction-theorem/PHP/diversity-prediction-theorem.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/Task/Diversity-prediction-theorem/PL-I/diversity-prediction-theorem.pli b/Task/Diversity-prediction-theorem/PL-I/diversity-prediction-theorem.pli deleted file mode 100644 index 3dcf57be5b..0000000000 --- a/Task/Diversity-prediction-theorem/PL-I/diversity-prediction-theorem.pli +++ /dev/null @@ -1,36 +0,0 @@ -/* Diversity prediction theorem */ - -diversity_predict: - procedure options(main); - declare - true_val float binary(15) static initial(49.0), - estims(0 : 1, 0 : 4) float binary(15) - static initial(48.0, 47.0, 51.0, 0.0, 0.0, - 48.0, 47.0, 51.0, 42.0, 0.0), - (sum, avg, avg_err, crowd_err) float binary(24), - (i, j) fixed binary(15); - do i = 0 to 1; - sum = 0.0; - j = 0; - do while (estims(i, j) ~= 0); - sum = sum + ((estims(i, j) - true_val) * (estims(i, j) - true_val)); - j = j + 1; - end; - avg_err = sum / j; - put skip list('Average error : '); - put edit(avg_err)(f(6, 3)); - sum = 0; - j = 0; - do while (estims(i, j) ~= 0); - sum = sum + estims(i, j); - j = j + 1; - end; - avg = sum / j; - crowd_err = (true_val - avg) * (true_val - avg); - put skip list('Crowd error : '); - put edit(crowd_err)(f(6, 3)); - put skip list('Diversity : '); - put edit(avg_err - crowd_err)(f(6, 3)); - put skip list(''); - end; -end diversity_predict; diff --git a/Task/Diversity-prediction-theorem/Pascal-P/diversity-prediction-theorem.pas b/Task/Diversity-prediction-theorem/Pascal-P/diversity-prediction-theorem.pas deleted file mode 100644 index b473430016..0000000000 --- a/Task/Diversity-prediction-theorem/Pascal-P/diversity-prediction-theorem.pas +++ /dev/null @@ -1,46 +0,0 @@ -program diverspred(output); - - (* Diversity prediction theorem *) - -var - trueval, sum, avg, avgerr, crowderr: real; - estims: array [0 .. 1, 0 .. 4] of real; - i, j: integer; -begin - estims[0, 0] := 48.0; - estims[0, 1] := 47.0; - estims[0, 2] := 51.0; - estims[0, 3] := 0.0; - estims[0, 4] := 0.0; - estims[1, 0] := 48.0; - estims[1, 1] := 47.0; - estims[1, 2] := 51.0; - estims[1, 3] := 42.0; - estims[1, 4] := 0.0; - trueval := 49.0; - for i := 0 to 1 do - begin - sum := 0.0; - j := 0; - while estims[i, j] <> 0 do - begin - sum := sum + sqr(estims[i, j] - trueval); - j := j + 1; - end; - avgerr := sum / j; - writeln('Average error : ', avgerr: 10); - sum := 0; - j := 0; - while estims[i, j] <> 0 do - begin - sum := sum + estims[i, j]; - j := j + 1; - end; - avg := sum / j; - crowderr := sqr(trueval - avg); - writeln('Crowd error : ', crowderr: 10); - writeln('Diversity : ', avgerr - crowderr: 10); - writeln; - end; - (* readln; *) -end. diff --git a/Task/Diversity-prediction-theorem/PascalABC.NET/diversity-prediction-theorem.pas b/Task/Diversity-prediction-theorem/PascalABC.NET/diversity-prediction-theorem.pas deleted file mode 100644 index 972e2e8c39..0000000000 --- a/Task/Diversity-prediction-theorem/PascalABC.NET/diversity-prediction-theorem.pas +++ /dev/null @@ -1,14 +0,0 @@ -## -function AverageSquareDiff(a: real; predictions: array of real) := - predictions.Select(x -> (x - a).Sqr).Average; - -procedure DiversityTheorem(truth: real; predictions: array of real); -begin - var average := predictions.Average; - WriteLn('average-error: ', AverageSquareDiff(truth, predictions)); - WriteLn('crowd-error: ', (truth - average).Sqr); - WriteLn('diversity: ', AverageSquareDiff(average, predictions)); -end; - -DiversityTheorem(49.0, [48.0, 47.0, 51.0]); -DiversityTheorem(49.0, [48.0, 47.0, 51.0, 42.0]) diff --git a/Task/Diversity-prediction-theorem/Pluto/diversity-prediction-theorem.pluto b/Task/Diversity-prediction-theorem/Pluto/diversity-prediction-theorem.pluto deleted file mode 100644 index 1d972f1fd2..0000000000 --- a/Task/Diversity-prediction-theorem/Pluto/diversity-prediction-theorem.pluto +++ /dev/null @@ -1,25 +0,0 @@ -local fmt = require "fmt" -require "table2" - -local function average_square_diff(f, preds) - local av = 0 - for preds as pred do av += (pred - f) * (pred - f) end - return av / #preds -end - -local function diversity_theorem(truth, preds) - local av = preds:mean() - local av_err = average_square_diff(truth, preds) - local crowd_err = (truth - av) * (truth - av) - local div = average_square_diff(av, preds) - return av_err, crowd_err, div -end - -local preds_list = { {48, 47, 51}, {48, 47, 51, 42} } -local truth = 49 -for preds_list as preds do - local av_err, crowd_err, div = diversity_theorem(truth, preds) - fmt.print("Average-error : %6.3f", av_err) - fmt.print("Crowd-error : %6.3f", crowd_err) - fmt.print("Diversity : %6.3f\n", div) -end diff --git a/Task/Diversity-prediction-theorem/Python/diversity-prediction-theorem-1.py b/Task/Diversity-prediction-theorem/Python/diversity-prediction-theorem-1.py deleted file mode 100644 index e4b11515ad..0000000000 --- a/Task/Diversity-prediction-theorem/Python/diversity-prediction-theorem-1.py +++ /dev/null @@ -1,15 +0,0 @@ -def mean(lst): - return sum(lst)/len(lst) - -def squarediffs(x, lst): - return [(x-y)**2 for y in lst] - -def diversityprediction(obs, ests): - print("True value:", obs) - print("Estimates:", *ests) - print("Average error:", mean(squarediffs(obs, ests))) - print("Crowd error:", (obs-mean(ests))**2) - print("Prediction diversity:", mean(squarediffs(mean(ests), ests))) - -diversityprediction(49, [48, 47, 51]) -diversityprediction(49, [48, 47, 51, 42]) diff --git a/Task/Diversity-prediction-theorem/Python/diversity-prediction-theorem-2.py b/Task/Diversity-prediction-theorem/Python/diversity-prediction-theorem.py similarity index 100% rename from Task/Diversity-prediction-theorem/Python/diversity-prediction-theorem-2.py rename to Task/Diversity-prediction-theorem/Python/diversity-prediction-theorem.py diff --git a/Task/Diversity-prediction-theorem/QBasic/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/QBasic/diversity-prediction-theorem.basic deleted file mode 100644 index 874655f894..0000000000 --- a/Task/Diversity-prediction-theorem/QBasic/diversity-prediction-theorem.basic +++ /dev/null @@ -1,29 +0,0 @@ -DIM test(0 TO 1, 0 TO 4) AS DOUBLE -test(0, 0) = 48! -test(0, 1) = 47! -test(0, 2) = 51! -test(1, 0) = 48! -test(1, 1) = 47! -test(1, 2) = 51! -test(1, 3) = 42! - -TrueVal = 49! - -FOR i = 0 TO 1 - Vari = 0! - Sum = 0! - c = 0 - WHILE test(i, c) <> 0 - Vari = Vari + (test(i, c) - TrueVal) ^ 2 - Sum = Sum + test(i, c) - c = c + 1 - WEND - AvgErr = Vari / c - RefAvg = Sum / c - CrowdErr = (TrueVal - RefAvg) ^ 2 - - PRINT USING "Average error : ##.####"; AvgErr - PRINT USING " Crowd error : ##.####"; CrowdErr - PRINT USING " Diversity : ##.####"; AvgErr - CrowdErr - PRINT -NEXT i diff --git a/Task/Diversity-prediction-theorem/QuickBASIC/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/QuickBASIC/diversity-prediction-theorem.basic index e35a3355d0..99ab57b239 100644 --- a/Task/Diversity-prediction-theorem/QuickBASIC/diversity-prediction-theorem.basic +++ b/Task/Diversity-prediction-theorem/QuickBASIC/diversity-prediction-theorem.basic @@ -1,11 +1,11 @@ REM Diversity prediction theorem -DIM test(1, 4) +DIM Estimates(1, 4) FOR I% = 0 TO 1 J% = 0 - READ test(I%, J%) - WHILE test(I%, J%) <> 0! + READ Estimates(I%, J%) + WHILE Estimates(I%, J%) <> 0! J% = J% + 1 - READ test(I%, J%) + READ Estimates(I%, J%) WEND NEXT I% DATA 48.0, 47.0, 51.0, 0.0 @@ -13,14 +13,14 @@ DATA 48.0, 47.0, 51.0, 42.0, 0.0 TrueVal = 49! FOR I% = 0 TO 1 Sum = 0!: J% = 0 - WHILE test(I%, J%) <> 0! - Sum = Sum + (test(I%, J%) - TrueVal) ^ 2: J% = J% + 1 + WHILE Estimates(I%, J%) <> 0! + Sum = Sum + (Estimates(I%, J%) - TrueVal) ^ 2: J% = J% + 1 WEND AvgErr = Sum / J% PRINT USING "Average error : ##.###"; AvgErr Sum = 0!: J% = 0 - WHILE test(I%, J%) <> 0! - Sum = Sum + test(I%, J%): J% = J% + 1 + WHILE Estimates(I%, J%) <> 0! + Sum = Sum + Estimates(I%, J%): J% = J% + 1 WEND Avg = Sum / J% CrowdErr = (TrueVal - Avg) ^ 2 diff --git a/Task/Diversity-prediction-theorem/Ruby/diversity-prediction-theorem.rb b/Task/Diversity-prediction-theorem/Ruby/diversity-prediction-theorem.rb index fb07cc9e10..5916702ef5 100644 --- a/Task/Diversity-prediction-theorem/Ruby/diversity-prediction-theorem.rb +++ b/Task/Diversity-prediction-theorem/Ruby/diversity-prediction-theorem.rb @@ -1,5 +1,5 @@ def mean(a) = a.sum(0.0) / a.size -def mean_square_diff(a, predictions) = mean(predictions.map { |x| (x - a)**2 }) +def mean_square_diff(a, predictions) = mean(predictions.map { |x| square(x - a)**2 }) def diversity_theorem(truth, predictions) average = mean(predictions) diff --git a/Task/Diversity-prediction-theorem/True-BASIC/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/True-BASIC/diversity-prediction-theorem.basic deleted file mode 100644 index 0ca506e3ca..0000000000 --- a/Task/Diversity-prediction-theorem/True-BASIC/diversity-prediction-theorem.basic +++ /dev/null @@ -1,27 +0,0 @@ -DIM test(0 to 1, 0 to 4) -LET test(0, 0) = 48.0 -LET test(0, 1) = 47.0 -LET test(0, 2) = 51.0 -LET test(1, 0) = 48.0 -LET test(1, 1) = 47.0 -LET test(1, 2) = 51.0 -LET test(1, 3) = 42.0 -LET trueval = 49.0 -FOR i = 0 to 1 - LET vari = 0.0 - LET sum = 0.0 - LET c = 0 - DO while test(i, c) <> 0 - LET vari = vari+(test(i, c)-trueval)^2 - LET sum = sum+test(i, c) - LET c = c+1 - LOOP - LET avgerr = vari/c - LET refavg = sum/c - LET crowderr = (trueval-refavg)^2 - PRINT using "Average error : ###.###": avgerr - PRINT using " Crowd error : ###.###": crowderr - PRINT using " Diversity : ###.###": avgerr-crowderr - PRINT -NEXT i -END diff --git a/Task/Diversity-prediction-theorem/XBasic/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/XBasic/diversity-prediction-theorem.basic deleted file mode 100644 index b96d40c2e3..0000000000 --- a/Task/Diversity-prediction-theorem/XBasic/diversity-prediction-theorem.basic +++ /dev/null @@ -1,36 +0,0 @@ -PROGRAM "Diversity prediction theorem" -VERSION "0.0000" - -DECLARE FUNCTION Entry () - -FUNCTION Entry () - DIM test![1,4] - test![0, 0] = 48.0 - test![0, 1] = 47.0 - test![0, 2] = 51.0 - test![1, 0] = 48.0 - test![1, 1] = 47.0 - test![1, 2] = 51.0 - test![1, 3] = 42.0 - TrueVal! = 49.0 - - FOR i = 0 TO 1 - Vari! = 0.0 - Sum! = 0.0 - c = 0 - DO WHILE test![i, c] <> 0 - Vari! = Vari! + (test![i, c] - TrueVal!) ** 2 - Sum! = Sum! + test![i, c] - INC c - LOOP - AvgErr! = Vari! / c - RefAvg! = Sum! / c - CrowdErr! = (TrueVal! - RefAvg!) ** 2 - - PRINT "Average error : "; FORMAT$(STR$(AvgErr!), "##.###") - PRINT " Crowd error : "; FORMAT$(STR$(CrowdErr!), "##.###") - PRINT " Diversity : "; FORMAT$(STR$(AvgErr! - CrowdErr!), "##.###") - PRINT - NEXT i -END FUNCTION -END PROGRAM diff --git a/Task/Diversity-prediction-theorem/Yabasic/diversity-prediction-theorem.basic b/Task/Diversity-prediction-theorem/Yabasic/diversity-prediction-theorem.basic deleted file mode 100644 index 55f6e04847..0000000000 --- a/Task/Diversity-prediction-theorem/Yabasic/diversity-prediction-theorem.basic +++ /dev/null @@ -1,30 +0,0 @@ -dim test(1,4) -test(0,0) = 48.0 -test(0,1) = 47.0 -test(0,2) = 51.0 - -test(1,0) = 48.0 -test(1,1) = 47.0 -test(1,2) = 51.0 -test(1,3) = 42.0 - -TrueVal = 49.0 - -for i = 0 to 1 - Vari = 0.0 - Sum = 0.0 - c = 0 - while test(i,c) <> 0.0 - Vari = Vari + (test(i,c) - TrueVal) ^2 - Sum = Sum + test(i,c) - c = c + 1 - wend - AvgErr = Vari / c - RefAvg = Sum / c - CrowdErr = (TrueVal - RefAvg) ^2 - - print "Average error : ", AvgErr using("##.###") - print " Crowd error : ", CrowdErr using("##.###") - print " Diversity : ", AvgErr - CrowdErr using("##.###") - print -next i diff --git a/Task/Documentation/AWK/documentation.awk b/Task/Documentation/AWK/documentation.awk deleted file mode 100644 index f12f3545a5..0000000000 --- a/Task/Documentation/AWK/documentation.awk +++ /dev/null @@ -1,2 +0,0 @@ -# AWK doesn't support this construct, you will have to use comments. -# The hash symbol # starts a comment. It ends at EOL. diff --git a/Task/Documentation/Ada/documentation.adb b/Task/Documentation/Ada/documentation.ada similarity index 100% rename from Task/Documentation/Ada/documentation.adb rename to Task/Documentation/Ada/documentation.ada diff --git a/Task/Documentation/C++/documentation.cpp b/Task/Documentation/C++/documentation.cpp deleted file mode 100644 index 5298cffd6d..0000000000 --- a/Task/Documentation/C++/documentation.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Program Title: Rosetta Code, Documentation - * Author : John Doe - * Version : 0.1 - * Date : 2023/12/31 - * Copyright : Public domain - * Description : An example of C++ program documentation -*/ -#include -#include - -/* - * Calculates the area of a circle with the given radius - */ -double area_circle(const double& radius) { - return (std::numbers::pi * radius * radius); -} - -// Controls the program -int main() { - // Obtain the users input - double radius; - std::cout << "Enter the radius of a circle in centimetres: "; - std::cin >> radius; - - // Display the result - std::cout << "The area of the circle is " << area_circle(radius) << " cm\u00b2" << "\n"; -} diff --git a/Task/Documentation/COBOL/documentation-1.cob b/Task/Documentation/COBOL/documentation-1.cobol similarity index 100% rename from Task/Documentation/COBOL/documentation-1.cob rename to Task/Documentation/COBOL/documentation-1.cobol diff --git a/Task/Documentation/COBOL/documentation-2.cob b/Task/Documentation/COBOL/documentation-2.cobol similarity index 100% rename from Task/Documentation/COBOL/documentation-2.cob rename to Task/Documentation/COBOL/documentation-2.cobol diff --git a/Task/Documentation/Crystal/documentation.cr b/Task/Documentation/Crystal/documentation.crystal similarity index 100% rename from Task/Documentation/Crystal/documentation.cr rename to Task/Documentation/Crystal/documentation.crystal diff --git a/Task/Documentation/Delphi/documentation.pas b/Task/Documentation/Delphi/documentation.delphi similarity index 100% rename from Task/Documentation/Delphi/documentation.pas rename to Task/Documentation/Delphi/documentation.delphi diff --git a/Task/Documentation/DuckDB/documentation-1.duckdb b/Task/Documentation/DuckDB/documentation-1.duckdb deleted file mode 100644 index 6c629e36b7..0000000000 --- a/Task/Documentation/DuckDB/documentation-1.duckdb +++ /dev/null @@ -1,4 +0,0 @@ -CREATE TABLE t AS (SELECT unnest([])); -COMMENT ON TABLE t IS /* this is just an example */ 'foo bar'; -- ignore me - -select comment from duckdb_tables where table_name = 't'; diff --git a/Task/Documentation/DuckDB/documentation-2.duckdb b/Task/Documentation/DuckDB/documentation-2.duckdb deleted file mode 100644 index 4a22932f1c..0000000000 --- a/Task/Documentation/DuckDB/documentation-2.duckdb +++ /dev/null @@ -1 +0,0 @@ -COMMENT ON MACRO TABLE is ; diff --git a/Task/Documentation/DuckDB/documentation-3.duckdb b/Task/Documentation/DuckDB/documentation-3.duckdb deleted file mode 100644 index 09ed87c083..0000000000 --- a/Task/Documentation/DuckDB/documentation-3.duckdb +++ /dev/null @@ -1,3 +0,0 @@ -COMMENT ON TABLE main.test_table IS 'very nice table'; - -COMMENT ON COLUMN test_table.test_table_column IS 'very nice column'; diff --git a/Task/Documentation/Elixir/documentation-1.ex b/Task/Documentation/Elixir/documentation-1.elixir similarity index 100% rename from Task/Documentation/Elixir/documentation-1.ex rename to Task/Documentation/Elixir/documentation-1.elixir diff --git a/Task/Documentation/Elixir/documentation-2.ex b/Task/Documentation/Elixir/documentation-2.elixir similarity index 100% rename from Task/Documentation/Elixir/documentation-2.ex rename to Task/Documentation/Elixir/documentation-2.elixir diff --git a/Task/Documentation/Emacs-Lisp/documentation-1.el b/Task/Documentation/Emacs-Lisp/documentation-1.l similarity index 100% rename from Task/Documentation/Emacs-Lisp/documentation-1.el rename to Task/Documentation/Emacs-Lisp/documentation-1.l diff --git a/Task/Documentation/Emacs-Lisp/documentation-2.el b/Task/Documentation/Emacs-Lisp/documentation-2.l similarity index 100% rename from Task/Documentation/Emacs-Lisp/documentation-2.el rename to Task/Documentation/Emacs-Lisp/documentation-2.l diff --git a/Task/Documentation/Julia/documentation-1.jl b/Task/Documentation/Julia/documentation-1.julia similarity index 100% rename from Task/Documentation/Julia/documentation-1.jl rename to Task/Documentation/Julia/documentation-1.julia diff --git a/Task/Documentation/Julia/documentation-2.jl b/Task/Documentation/Julia/documentation-2.julia similarity index 100% rename from Task/Documentation/Julia/documentation-2.jl rename to Task/Documentation/Julia/documentation-2.julia diff --git a/Task/Documentation/Kotlin/documentation.kts b/Task/Documentation/Kotlin/documentation.kotlin similarity index 100% rename from Task/Documentation/Kotlin/documentation.kts rename to Task/Documentation/Kotlin/documentation.kotlin diff --git a/Task/Documentation/Phix/documentation.phix b/Task/Documentation/Phix/documentation.phix index fcc24396b9..d6302271c7 100644 --- a/Task/Documentation/Phix/documentation.phix +++ b/Task/Documentation/Phix/documentation.phix @@ -1,10 +1,12 @@ -procedure StoreVar(integer N, integer NTyp) --- --- Store a variable, applying any final operator as needed. --- If N is zero, PopFactor (ie store in a new temporary variable of --- the specified type). Otherwise N should be an index to symtab. --- If storeConst is 1, NTyp is ignored/overridden, otherwise it --- should usually be the declared or local type of N. --- - ... -end procedure +(phixonline)--> + procedure StoreVar(integer N, integer NTyp) + -- + -- Store a variable, applying any final operator as needed. + -- If N is zero, PopFactor (ie store in a new temporary variable of + -- the specified type). Otherwise N should be an index to symtab. + -- If storeConst is 1, NTyp is ignored/overridden, otherwise it + -- should usually be the declared or local type of N. + -- + ... + end procedure + Bool ) { - die unless @sol.all eq .any; - my BagHash $b .= new; - for @sol.keys -> $p1 { - given @sol[$p1] { - when 'L' { my $p2 = $p1+1; die unless @sol[$p2] eq 'R'; $b{ domino( @tab[$p1,$p2].join ) }++; } - when 'D' { my $p2 = $p1+$cols; die unless @sol[$p2] eq 'U'; $b{ domino( @tab[$p1,$p2].join ) }++; } - } - } - die unless $b.values.max == 1 and $b.elems == $rows * $cols / 2; - return True; -} -for @tests -> ( $rows, $cols, $flat_table ) { - my @solutions = solve($rows, $cols, $flat_table.comb); - say 'Solutions found: ', +@solutions; - - # Confirm that every solution is valid. - solution_works($rows, $cols, $flat_table.comb, $_) or die for @solutions; - - # Print first solution - say .join.trans( [] => [<╼ ╾ ╽ ╿>]) for @solutions[0].batch($cols); - - if ++$ == 1 { - say 'Bonus:'; - say .value.fmt("%45d "), .key.tclc for bonus($rows, $cols); - say ''; - } -} diff --git a/Task/Dominoes/Uiua/dominoes.uiua b/Task/Dominoes/Uiua/dominoes.uiua deleted file mode 100644 index fc73e2f14a..0000000000 --- a/Task/Dominoes/Uiua/dominoes.uiua +++ /dev/null @@ -1,29 +0,0 @@ -GridOne ← ↯7_∞"05132231055052464303662006235126113002452143346664515414" -GridTwo ← ↯7_∞"64220650162341432102355113505610426040114420536366525334" # 2025 solutions - -Offsets ← [1_0 0_1] -FirstFreeCell ← ⊢⬚1▽⤚(¬°⊚⨂)⊙◌↯∞_2°⊡⊃(⋅∘|∘) -# Get pair of cells for down- and right- facing dominos. -CandDoms ← ≡⌞⊂⟜(≡˜⊟⊸+Offsets˙⊟ FirstFreeCell) -# Is the tail-cell of each domino in bounds and not visited? -ValidDoms ← ↧⊃(¬˜∊°⊂⇌|≠@_⬚@_⊡⊣) -# Has this domino already been 'played'? -NotDupeDom ← ⨬(¬˜∊°⊂≡⍆↯∞_2⇌⊡|⋅1) ⊸(=2⧻) -# Find two possible next doms, check them, and step. -Nexts ← ▽⤚≡NotDupeDom▽◡≡ValidDoms⊙¤ ⊸CandDoms -Done ← =∩⧻⊙♭ - -# Add spaces to a solution grid, for MarkDominos to fill. -SpacedGrid ← ↘1↯[∞ ∘]÷2⧻⊸⊢≡⊂˜↯@\s⊸△≡/(⊂$"_ ") -MarkDominos ← ∧(⍜⊡⋅@+)≡(/+↯∞_2) ↯∞_4 - -Solve ← ( - ⟜SpacedGrid - °□⊣⊢path(≡□Nexts°□|Done°□)□[] # Show first solution. - MarkDominos -) -&p"Only solution for first grid:" -&s Solve GridOne -Count ← ⧻path(≡□Nexts°□|Done°□)□[] # Count all solutions. -&p"Count of solutions for second grid:" -Count GridTwo diff --git a/Task/Doomsday-rule/00-TASK.txt b/Task/Doomsday-rule/00-TASK.txt index 75b51e7e72..cfd6e09909 100644 --- a/Task/Doomsday-rule/00-TASK.txt +++ b/Task/Doomsday-rule/00-TASK.txt @@ -6,7 +6,7 @@ The algorithm was based on calculating the distance of a given date from certain "anchor days" which follow a pattern for the day of the week upon which they fall. ; Algorithm -The formula is calculated assuming that Sunday is 0, Monday 1, and so forth up to Saturday 6, and +The formula is calculated assuming that Sunday is 0, Monday 1, and so forth with Saturday 7, and doomsday = (Tuesday(or 2) + 5(y mod 4) + 4(y mod 100) + 6(y mod 400)) % 7 diff --git a/Task/Doomsday-rule/C/doomsday-rule.c b/Task/Doomsday-rule/C/doomsday-rule.c index 66b4f73d16..01166bb55b 100644 --- a/Task/Doomsday-rule/C/doomsday-rule.c +++ b/Task/Doomsday-rule/C/doomsday-rule.c @@ -13,7 +13,7 @@ bool leap(uint16_t year) { } const char *weekday(Date date) { - static const uint8_t leapdoom[] = {4,1,7,4,2,6,4,1,5,3,7,5}; + static const uint8_t leapdoom[] = {4,1,7,2,4,6,4,1,5,3,7,5}; static const uint8_t normdoom[] = {3,7,7,4,2,6,4,1,5,3,7,5}; static const char *days[] = { "Sunday", "Monday", "Tuesday", "Wednesday", diff --git a/Task/Doomsday-rule/Draco/doomsday-rule.draco b/Task/Doomsday-rule/Draco/doomsday-rule.draco deleted file mode 100644 index 73e8211a33..0000000000 --- a/Task/Doomsday-rule/Draco/doomsday-rule.draco +++ /dev/null @@ -1,50 +0,0 @@ -type Date = struct { - word year; - byte month; - byte day; -}; - -proc leap_year(word y) bool: - y%4 = 0 and (y%100 /= 0 or y % 400 = 0) -corp - -proc weekday(Date date) *char: - [12]byte leapdoom = (4,1,7,4,2,6,4,1,5,3,7,5); - [12]byte normdoom = (3,7,7,4,2,6,4,1,5,3,7,5); - word c, r, s, t, c_anchor, doom, anchor; - - c := date.year / 100; - r := date.year % 100; - s := r / 12; - t := r % 12; - - c_anchor := (5 * (c % 4) + 2) % 7; - doom := (s + t + (t/4) + c_anchor) % 7; - anchor := if leap_year(date.year) - then leapdoom[date.month-1] - else normdoom[date.month-1] - fi; - - case (doom+date.day-anchor+7)%7 - incase 0: "Sunday" - incase 1: "Monday" - incase 2: "Tuesday" - incase 3: "Wednesday" - incase 4: "Thursday" - incase 5: "Friday" - incase 6: "Saturday" - esac -corp - -proc main() void: - [7]Date dates = ( - (1800,1,6), (1875,3,29), (1915,12,7), (1970,12,23), (2043,5,14), - (2077,2,12), (2101,4,2) - ); - - word d; - for d from 0 upto 6 do - writeln(dates[d].month:2, '/', dates[d].day:2, '/', dates[d].year:4, - ": ", weekday(dates[d])) - od -corp diff --git a/Task/Doomsday-rule/JavaScript/doomsday-rule.js b/Task/Doomsday-rule/JavaScript/doomsday-rule.js deleted file mode 100644 index bd59065f59..0000000000 --- a/Task/Doomsday-rule/JavaScript/doomsday-rule.js +++ /dev/null @@ -1,52 +0,0 @@ -// doom.js -const LEAP_DOOM = [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]; -const NORM_DOOM = [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]; -const WEEKDAYS = [ - 'Sunday', 'Monday', 'Tuesday', 'Wednesday', - 'Thursday', 'Friday', 'Saturday' -]; - -class Date { - constructor(year, month, day) { - this.year = year; - this.month = month; // 1-based - this.day = day; - } - - isLeapYear() { - const y = this.year; - return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); - } - - format() { - const { month, day, year } = this; - return `${String(month).padStart(2, '0')}/${String(day).padStart(2, '0')}/${year}`; - } - - weekday() { - const { year, month, day } = this; - const c = Math.floor(year / 100); - const r = year % 100; - const s = Math.floor(r / 12); - const t = r % 12; - - const cAnchor = (5 * (c % 4) + 2) % 7; - const doom = (s + t + Math.floor(t / 4) + cAnchor) % 7; - const anchor = (this.isLeapYear() ? LEAP_DOOM : NORM_DOOM)[month - 1]; - - return WEEKDAYS[(doom + day - anchor + 7) % 7]; - } -} - -/* ---------- demo ---------- */ -const dates = [ - new Date(1800, 1, 6), - new Date(1875, 3, 29), - new Date(1915, 12, 7), - new Date(1970, 12, 23), - new Date(2043, 5, 14), - new Date(2077, 2, 12), - new Date(2101, 4, 2) -]; - -dates.forEach(d => console.log(`${d.format()}: ${d.weekday()}`)); diff --git a/Task/Doomsday-rule/Julia/doomsday-rule.jl b/Task/Doomsday-rule/Julia/doomsday-rule.julia similarity index 100% rename from Task/Doomsday-rule/Julia/doomsday-rule.jl rename to Task/Doomsday-rule/Julia/doomsday-rule.julia diff --git a/Task/Doomsday-rule/M2000-Interpreter/doomsday-rule.m2000 b/Task/Doomsday-rule/M2000-Interpreter/doomsday-rule.m2000 deleted file mode 100644 index bc2bab76ac..0000000000 --- a/Task/Doomsday-rule/M2000-Interpreter/doomsday-rule.m2000 +++ /dev/null @@ -1,60 +0,0 @@ -' MAKE USING("FORMAT STRING", PAR1, PAR2, ...PARN) -' WE USE READ V TO READ MORE PARAMETERS. -FUNCTION USING(A$) { - VARIANT V : LONG D, S, E, I=1: S$="" - WHILE I<=LEN(A$) - IF S THEN - IF MID$(A$,I,1)<>"#" THEN - IF MID$(A$,I,1)="." THEN D=I ELSE E=I - END IF - ELSE - IF MID$(A$,I,1)="#" THEN S=I - END IF - IF S AND E THEN - IF S>1 THEN S$+=LEFT$(A$, S-1) - A$=MID$(A$, E) - G() - S=0:E=0:D=0 - I=1 - END IF - I++ - END WHILE - IF S THEN - IF S>1 THEN S$+=LEFT$(A$, S-1):E=I-S+1: S=1 ELSE E=I - G() - =S$ - ELSE - =S$+A$ - END IF - SUB G() - IF ISNUM THEN - READ V - IF D>0 THEN - S$+=STR$(V, STRING$("#",E-D-1)+"0."+STRING$("0",D-S+1)) - ELSE - S$+=STR$(V, STRING$("0",E-S-1)+"0") - END IF - ELSE - V="" - READ V - S$+=LEFT$(V+STRING$(" ", E-S), E-S) - END IF - END SUB -} -05 FLUSH : GOSUB 110 -10 DIM D$(1 TO 7): FOR I=1 TO 7: READ D$(I): NEXT I -20 DIM D(1 TO 12, 0 TO 1): FOR I=0 TO 1: FOR J=1 TO 12: READ D(J, I): NEXT J : NEXT I -30 READ Y: IF Y=0 THEN BREAK ELSE READ M,D -40 PRINT USING("##/##/#### ", M, D, Y); -50 C=Y DIV 100: R=Y MOD 100 -60 S=R DIV 12: T=R MOD 12 -70 A=(5*BINARY.AND(C, 3)+2) MOD 7 -80 B=(S+T+(T DIV 4)+A) MOD 7 -90 PRINT D$((B+D-D(M,-(Y MOD 4=0 AND (Y MOD 100<>0 OR Y MOD 400=0)))+7) MOD 7+1) -100 GOTO 30 -110 DATA "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" -120 DATA 3,7,7,4,2,6,4,1,5,3,7,5 -130 DATA 4,1,7,4,2,6,4,1,5,3,7,5 -140 DATA 1800,1,6,1875,3,29,1915,12,7,1970,12,23 -150 DATA 2043,5,14,2077,2,12,2101,4,2,0 -160 RETURN diff --git a/Task/Doomsday-rule/Mathematica/doomsday-rule.math b/Task/Doomsday-rule/Mathematica/doomsday-rule.math deleted file mode 100644 index 45a6d46d9e..0000000000 --- a/Task/Doomsday-rule/Mathematica/doomsday-rule.math +++ /dev/null @@ -1,13 +0,0 @@ -doomsday[year_Integer?Positive] := Mod[2 + 5 Mod[year, 4] + 4 Mod[year, 100] + 6 Mod[year, 400], 7]; - -firstDoomsday[month_Integer /; 1 <= month <= 2, year_Integer?Positive /; LeapYearQ[{year}]] := {4, 1}[[month]]; -firstDoomsday[month_Integer /; 1 <= month <= 2, year_Integer?Positive] := {3, 7}[[month]]; -firstDoomsday[month_Integer /; 3 <= month <= 12, year_Integer?Positive] := {7, 4, 2, 6, 4, 1, 5, 3, 7, 5}[[month - 2]]; - -weekday[{year_Integer?Positive, month_Integer?Positive /; 1 <= month <= 12, day_Integer?Positive /; 1 <= day <= 31}] := Mod[doomsday[year] + 7 + day - firstDoomsday[month, year], 7]; - -weekdayName[weekday_Integer /; 0 <= weekday <= 6] := {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}[[weekday + 1]]; - -dates = {{1800, 1, 6}, {1875, 3, 29}, {1915, 12, 7}, {1970, 12, 23}, {2043, 5, 14}, {2077, 2, 12}, {2101, 4, 2}}; - -weekdayName /@ weekday /@ dates diff --git a/Task/Doomsday-rule/Maxima/doomsday-rule.maxima b/Task/Doomsday-rule/Maxima/doomsday-rule.maxima deleted file mode 100644 index 1fd7bccc28..0000000000 --- a/Task/Doomsday-rule/Maxima/doomsday-rule.maxima +++ /dev/null @@ -1,15 +0,0 @@ -daynames: ["Sunday", "Monday", "Tuesday", - "Wednesday", "Thursday", "Friday", "Saturday"]$ - -isleapyear(y) := mod(y, 4)=0 and (mod(y, 100)#0 or mod(y, 400)=0)$ -anchors(y) := [if isleapyear(y) then 4 else 3, - if isleapyear(y) then 1 else 7, - 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]$ - -doomsday(y) := mod(2+5*mod(y, 4)+4*mod(y, 100)+6*mod(y, 400), 7)$ -wd(y, m, d) := mod(doomsday(y)+d-anchors(y)[m], 7)$ - -test_dates: [[1800, 1, 6], [1875, 3, 29], [1915, 12, 7], [1970, 12, 23], [2043, 5, 14], [2077, 2, 12], [2101, 4, 2]]$ - -raw_wds: map(lambda([l], apply(wd, l)), test_dates)$ -for i in raw_wds do(sprint(daynames[i+1]))$ diff --git a/Task/Doomsday-rule/Miranda/doomsday-rule.miranda b/Task/Doomsday-rule/Miranda/doomsday-rule.miranda deleted file mode 100644 index de3b570449..0000000000 --- a/Task/Doomsday-rule/Miranda/doomsday-rule.miranda +++ /dev/null @@ -1,29 +0,0 @@ -main :: [sys_message] -main = [Stdout (lay [showdate d ++ ": " ++ weekday d | d<-tests])] - -date ::= Date (num,num,num) - -showdate :: date->[char] -showdate (Date (y,m,d)) = show m ++ "/" ++ show d ++ "/" ++ show y - -tests :: [date] -tests = map Date [ - (1800,1,6), (1875,3,29), (1915,12,7), (1970,12,23), (2043,5,14), - (2077,2,12), (2101,4,2)] - -weekday :: date->[char] -weekday (Date (year,month,day)) - = weekdays ! daynum - where weekdays = ["Sunday","Monday","Tuesday","Wednesday","Thursday", - "Friday","Saturday"] - doomtab = leapdoom, if leapyear - = normdoom, otherwise - leapdoom = [4,1,7,2,4,6,4,1,5,3,7,5] - normdoom = [3,7,7,4,2,6,4,1,5,3,7,5] - leapyear = year mod 4=0 & (year mod 100~=0 \/ year mod 400=0) - (c, r) = (year div 100, year mod 100) - (s, t) = (r div 12, r mod 12) - c_anchor = (5 * (c mod 4) + 2) mod 7 - doom = (s + t + t div 4 + c_anchor) mod 7 - anchor = doomtab ! (month - 1) - daynum = (doom + day - anchor + 7) mod 7 diff --git a/Task/Doomsday-rule/PascalABC.NET/doomsday-rule.pas b/Task/Doomsday-rule/PascalABC.NET/doomsday-rule.pas deleted file mode 100644 index 2f45724a97..0000000000 --- a/Task/Doomsday-rule/PascalABC.NET/doomsday-rule.pas +++ /dev/null @@ -1,26 +0,0 @@ -const - days: array of string = ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); - dooms: array of array of integer = ((3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5), - (4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5)); - -function isleap(year: integer) := (year mod 4 = 0) and ((year mod 100 <> 0) or (year mod 400 = 0)); - -function weekday(year, month, day: integer): string; -begin - var c := year div 100; - var r := year mod 100; - var s := r div 12; - var t := r mod 12; - var c_anchor := (5 * (c mod 4) + 2) mod 7; - var doomsday := (s + t + (t div 4) + c_anchor) mod 7; - var anchorday := dooms[if isleap(year) then 1 else 0][month - 1]; - var weekday := (doomsday + day - anchorday + 7) mod 7; - result := days[weekday]; -end; - -begin - var dates := |(1800, 1, 6), (1875, 3, 29), (1915, 12, 7), (1970, 12, 23), - (2043, 5, 14), (2077, 2, 12), (2101, 4, 2)|; - foreach var d in dates do - writeln(d[0], '-', d[1]:2, '-', d[2]:2, ' -> ', weekday(d[0], d[1], d[2])); -end. diff --git a/Task/Doomsday-rule/Pluto/doomsday-rule.pluto b/Task/Doomsday-rule/Pluto/doomsday-rule.pluto deleted file mode 100644 index 8ce12b27df..0000000000 --- a/Task/Doomsday-rule/Pluto/doomsday-rule.pluto +++ /dev/null @@ -1,42 +0,0 @@ -local fmt = require "fmt" - -local anchor_day = |y| -> (2 + 5 * (y % 4) + 4 *(y % 100) + 6 * (y % 400)) % 7 - -local is_leap_year = |y| -> y % 4 == 0 and (y % 100 != 0 or y % 400 == 0) - -local first_days_common = {3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5} -local first_days_leap = {4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5} - -local dates = { - "1800-01-06", - "1875-03-29", - "1915-12-07", - "1970-12-23", - "2043-05-14", - "2077-02-12", - "2101-04-02" -} - -local function parse(date) - local y = tonumber(date:sub(1, 4)) - local m = tonumber(date:sub(6, 7)) - local d = tonumber(date:sub(9, 10)) - return y, m, d -end - -print("Days of week given by Doomsday rule:") -for dates as date do - local y, m, d = parse(date) - local a = anchor_day(y) - local w = d - (is_leap_year(y) ? first_days_leap[m] : first_days_common[m]) - if w < 0 then w += 7 end - local dow = (a + w) % 7 - print($"{date} -> {fmt.weekday(dow)}") -end - -print("\nDays of week given by standard library functions:") -for dates as date do - local y, m, d = parse(date) - local t = os.time({year = y, month = m, day = d}) - print($"{date} -> {os.date("%A", t)}") -end diff --git a/Task/Doomsday-rule/Quackery/doomsday-rule.quackery b/Task/Doomsday-rule/Quackery/doomsday-rule.quackery deleted file mode 100644 index 5dfa5b0e1d..0000000000 --- a/Task/Doomsday-rule/Quackery/doomsday-rule.quackery +++ /dev/null @@ -1,26 +0,0 @@ - [ dup 400 mod 0 = iff [ drop true ] done - dup 100 mod 0 = iff [ drop false ] done - 4 mod 0 = ] is leap ( y --> b ) - - [ dup 4 mod 5 * - over 100 mod 4 * + - swap 400 mod 6 * + 2 + 7 mod ] is doomsday ( y --> n ) - - [ leap iff [ ' [ table 0 4 1 ] ] - else [ ' [ table 0 3 7 ] ] - ' [ 7 4 2 6 4 1 5 3 7 5 ] join do ] is close ( m y --> n ) - - [ dup doomsday unrot close - + 7 mod ] is weekday ( d m y --> n ) - - [ [ table $ "Sunday" $ "Monday" - $ "Tuesday" $ "Wednesday" $ "Thursday" - $ "Friday" $ "Saturday" ] do echo$ ] is echoday ( d --> ) - - ' [ [ 6 1 1800 ] - [ 29 3 1875 ] - [ 7 12 1915 ] - [ 23 12 1970 ] - [ 14 5 2043 ] - [ 12 2 2077 ] - [ 2 4 2101 ] ] - witheach [ unpack weekday echoday cr ] diff --git a/Task/Doomsday-rule/R/doomsday-rule.r b/Task/Doomsday-rule/R/doomsday-rule.r deleted file mode 100644 index 9106214930..0000000000 --- a/Task/Doomsday-rule/R/doomsday-rule.r +++ /dev/null @@ -1,22 +0,0 @@ -daynames <- c("Sunday", "Monday", "Tuesday", "Wednesday", - "Thursday", "Friday", "Saturday") - -isleapyear <- function(y) (y%%4==0)&((y%%100!=0)|(y%%400==0)) - -anchors <- function(y) c(ifelse(isleapyear(y), 4, 3), - ifelse(isleapyear(y), 1, 7), - 7, 4, 2, 6, 4, 1, 5, 3, 7, 5) - -doomsday <- function(y) (2+5*(y%%4)+4*(y%%100)+6*(y%%400))%%7 -wd <- function(y, m, d) (doomsday(y)+d-anchors(y)[m])%%7 - -test_dates <- list(c(1800, 1, 6), - c(1875, 3, 29), - c(1915, 12, 7), - c(1970, 12, 23), - c(2043, 5, 14), - c(2077, 2, 12), - c(2101, 4, 2)) - -raw_wds <- sapply(test_dates, function(v) do.call(wd, as.list(v))) -cat(daynames[raw_wds+1], "\n") diff --git a/Task/Doomsday-rule/Refal/doomsday-rule.refal b/Task/Doomsday-rule/Refal/doomsday-rule.refal deleted file mode 100644 index 611e530466..0000000000 --- a/Task/Doomsday-rule/Refal/doomsday-rule.refal +++ /dev/null @@ -1,43 +0,0 @@ -$ENTRY Go { - , (1800 1 6) (1875 3 29) (1915 12 7) (1970 12 23) - (2043 5 14) (2077 2 12) (2101 4 2): e.Tests - = ; -}; - -Test { - e.Test = >; -}; - -LeapYear { - s.Year = > - > - >>>; -}; - -Weekday { - s.Year s.Month s.Day, - 4 1 7 4 2 6 4 1 5 3 7 5: e.LeapDoom, - 3 7 7 4 2 6 4 1 5 3 7 5: e.NormDoom, - Sunday Monday Tuesday Wednesday Thursday Friday Saturday: e.Days, - : (s.C) s.R, - : (s.S) s.T, - >> 7>: s.CAn, - >>> 7>: s.Doom, - (e.LeapDoom) (e.NormDoom)>: (e.DoomTab), - e.DoomTab>: e.Anchor, - e.Anchor>> 7>: s.Weekday - = ; -}; - -Item { - 0 s.X e.XS = s.X; - s.N s.X e.XS = e.XS>; -}; - -If { True t.T t.F = t.T; False t.T t.F = t.F; }; -Eq { t.X t.X = True; t.X t.Y = False; }; -Or { True s.Y = True; False s.Y = s.Y; }; -And { False s.Y = False; True s.Y = s.Y; }; -Not { True = False; False = True; }; -Neq { t.X t.Y = >; }; -Each { (e.F) = ; (e.F) (e.X) e.XS = ; }; diff --git a/Task/Doomsday-rule/Rust/doomsday-rule.rs b/Task/Doomsday-rule/Rust/doomsday-rule.rust similarity index 100% rename from Task/Doomsday-rule/Rust/doomsday-rule.rs rename to Task/Doomsday-rule/Rust/doomsday-rule.rust diff --git a/Task/Doomsday-rule/SETL/doomsday-rule.setl b/Task/Doomsday-rule/SETL/doomsday-rule.setl deleted file mode 100644 index cf225f497f..0000000000 --- a/Task/Doomsday-rule/SETL/doomsday-rule.setl +++ /dev/null @@ -1,29 +0,0 @@ -program doomsday; - tests := [[1800,1,6], [1875,3,29], [1915,12,7], [1970,12,23], - [2043,5,14], [2077,2,12], [2101,4,2]]; - - loop for [year, month, day] in tests do - print(str day + "/" + str month + "/" + str year + ": " + - weekday(year, month, day)); - end loop; - - proc leap(y); - return y mod 4 = 0 and (y mod 100 /= 0 or y mod 400 = 0); - end proc; - - proc weekday(year, month, day); - leapdoom := [4,1,7,4,2,6,4,1,5,3,7,5]; - normdoom := [3,7,7,4,2,6,4,1,5,3,7,5]; - weekdays := ["Sunday","Monday","Tuesday","Wednesday","Thursday", - "Friday","Saturday"]; - - c := year div 100; - r := year mod 100; - s := r div 12; - t := r mod 12; - c_anchor := (5 * (c mod 4) + 2) mod 7; - doom := (s + t + (t div 4) + c_anchor) mod 7; - anchor := if leap(year) then leapdoom else normdoom end(month); - return weekdays((doom+day-anchor+7) mod 7+1); - end proc; -end program; diff --git a/Task/Doomsday-rule/UNIX-Shell/doomsday-rule.sh b/Task/Doomsday-rule/UNIX-Shell/doomsday-rule.sh index 891530b914..10334c8be4 100644 --- a/Task/Doomsday-rule/UNIX-Shell/doomsday-rule.sh +++ b/Task/Doomsday-rule/UNIX-Shell/doomsday-rule.sh @@ -5,14 +5,14 @@ day-of-the-week() then local -ra names=({Sun,Mon,Tues,Wednes,Thurs,Fri,Satur}day) doomsday=({37,41}7426415375) local -i i c s t a b - local -i {y,m,d}=${BASH_REMATCH[++i]} + local -i {year,month,day}=${BASH_REMATCH[++i]} echo ${names[ - c=y/100, - s=(y%100)/12, - t=(y % 100) % 12, + c=year/100, + s=(year%100)/12, + t=(year % 100) % 12, a=(5*(c%4)+2) % 7, b=(s + t + (t / 4) + a ) % 7, - (b + d - ${doomsday[(y%4 == 0) && ((y%100) || (y%400 == 0))]:m-1:1} + 7) % 7 + (b + day - ${doomsday[(year%4 == 0) && ((year%100) || (year%400 == 0))]:month-1:1} + 7) % 7 ]} else return 1 fi diff --git a/Task/Doomsday-rule/Uiua/doomsday-rule.uiua b/Task/Doomsday-rule/Uiua/doomsday-rule.uiua deleted file mode 100644 index e8c760542c..0000000000 --- a/Task/Doomsday-rule/Uiua/doomsday-rule.uiua +++ /dev/null @@ -1,7 +0,0 @@ -Ds ← [3 7 7 4 2 6 4 1 5 3 7 5] -Ly ← ↧↥⊃(=0◿400|≠0◿100|=0◿4) -D ← ◿7+⊃(Ly|+2++⊃(×5◿4|×4◿100|×6◿400)) -Wd ← ["Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"] -DoW ← ⊡:Wd◿7+D⊙(-⊡-1:Ds)°[⊙⊙∘] -[[1800 1 6][1875 3 29][1915 12 7][1970 12 23][2043 5 14][2077 2 12][2101 4 2]] -≡(&p$"_\t_"/$"_-_"°⋕⇌⟜DoW) diff --git a/Task/Doomsday-rule/V-(Vlang)/doomsday-rule.v b/Task/Doomsday-rule/V-(Vlang)/doomsday-rule.v index 002a8b84fc..bc6194f84e 100644 --- a/Task/Doomsday-rule/V-(Vlang)/doomsday-rule.v +++ b/Task/Doomsday-rule/V-(Vlang)/doomsday-rule.v @@ -1,4 +1,5 @@ -const ( +const +( days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] first_days_common = [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5] first_days_leap = [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5] @@ -23,11 +24,15 @@ fn main() { d = date[8..10].int() a = anchor_day(y) f = first_days_common[m] - if is_leap_year(y) {f = first_days_leap[m]} + if is_leap_year(y) { + f = first_days_leap[m] + } w = d - f - if w < 0 {w = 7 + w} + if w < 0 { + w = 7 + w + } dow = (a + w) % 7 - println("$date -> ${days[dow]}") + println('$date -> ${days[dow]}') } } diff --git a/Task/Dot-product/00-TASK.txt b/Task/Dot-product/00-TASK.txt index 40361afe8d..e3ca21eba5 100644 --- a/Task/Dot-product/00-TASK.txt +++ b/Task/Dot-product/00-TASK.txt @@ -15,7 +15,7 @@ If implementing the dot product of two vectors directly: :::*   sum the products   (to produce the answer) -;Related tasks: -* [[Arrays]], [[Vector]], [[Dot product]], [[Vector products]], [[Matrices]], [[Bivector]], [[Antivector]], [[Tensor]], [[Quaternion]], [[Rotor]], [[Motor]], [[Sedenion]], [[Octonion]] +;Related task: +*   [[Vector products]]

    diff --git a/Task/Dot-product/ANSI-BASIC/dot-product.basic b/Task/Dot-product/ANSI-BASIC/dot-product.basic deleted file mode 100644 index 1f3bf387b2..0000000000 --- a/Task/Dot-product/ANSI-BASIC/dot-product.basic +++ /dev/null @@ -1,45 +0,0 @@ -100 REM Dot product -110 DECLARE EXTERNAL FUNCTION DotProduct -120 OPTION BASE 0 -130 DIM Zero3D(2), X(2), Y(2), Z(2), Q(2), R(2) ! some example vectors -140 LET Zero3D(0) = 0 -150 LET Zero3D(1) = 0 -160 LET Zero3D(2) = 0 -170 ! -180 LET X(0) = 1 -190 LET X(1) = 0 -200 LET X(2) = 0 -210 ! -220 LET Y(0) = 0 -230 LET Y(1) = 1 -240 LET Y(2) = 0 -250 ! -260 LET Z(0) = 0 -270 LET Z(1) = 0 -280 LET Z(2) = 1 -290 ! -300 LET Q(0) = 1 -310 LET Q(1) = 1 -320 LET Q(2) = 3.14159 -330 ! -340 LET R(0) = -1 -350 LET R(1) = 2.618033989 -360 LET R(2) = 3 -370 ! -380 PRINT " Q dot R ="; DotProduct(Q, R) -390 PRINT " Zero3D dot X ="; DotProduct(Zero3D, X) -400 PRINT " Z dot Z ="; DotProduct(Z, Z) -410 PRINT " Y dot Z ="; DotProduct(Y, Z) -420 END -430 ! -440 EXTERNAL FUNCTION DotProduct(A(), B()) -450 IF UBOUND(A) <> UBOUND(B) THEN -460 PRINT "Sizes of arrays should be equal." -470 STOP -480 END IF -490 LET DP = 0 -500 FOR I = 0 TO UBOUND(A) -510 LET DP = DP + (A(I) * B(I)) -520 NEXT I -530 LET DotProduct = DP -540 END FUNCTION diff --git a/Task/Dot-product/Ada/dot-product.adb b/Task/Dot-product/Ada/dot-product.ada similarity index 100% rename from Task/Dot-product/Ada/dot-product.adb rename to Task/Dot-product/Ada/dot-product.ada diff --git a/Task/Dot-product/Apple/dot-product.apple b/Task/Dot-product/Apple/dot-product.apple deleted file mode 100644 index 8f7bb17fb2..0000000000 --- a/Task/Dot-product/Apple/dot-product.apple +++ /dev/null @@ -1 +0,0 @@ -[(+)/(*)`(x::Vec n float) y] ⟨1,3,_5⟩ ⟨4,_2,_1::float⟩ diff --git a/Task/Dot-product/ArkScript/dot-product.ark b/Task/Dot-product/ArkScript/dot-product.ark deleted file mode 100644 index f59407ce57..0000000000 --- a/Task/Dot-product/ArkScript/dot-product.ark +++ /dev/null @@ -1,12 +0,0 @@ -(let dotProduct (fun (v1 v2) { - (assert (= (len v1) (len v2)) "vectors should have the same length") - - (mut result 0) - (mut i 0) - (while (< i (len v1)) { - (set result (+ result (* (@ v1 i) (@ v2 i)))) - (set i (+ 1 i)) }) - - result })) - -(print (dotProduct [1 3 -5] [4 -2 -1])) diff --git a/Task/Dot-product/Ballerina/dot-product.ballerina b/Task/Dot-product/Ballerina/dot-product.ballerina deleted file mode 100644 index 230674a31a..0000000000 --- a/Task/Dot-product/Ballerina/dot-product.ballerina +++ /dev/null @@ -1,13 +0,0 @@ -import ballerina/io; - -function dot(float[] a, float[] b) returns float { - float sum = 0.0; - foreach any[] [idx, val] in a.enumerate() { - sum += val * b[idx]; - } - return sum; -} - -public function main() { - io:println(dot([1, 3, -5], [4, -2, -1])); -} diff --git a/Task/Dot-product/C++/dot-product-1.cpp b/Task/Dot-product/C++/dot-product-1.cpp new file mode 100644 index 0000000000..cb26a2e3a5 --- /dev/null +++ b/Task/Dot-product/C++/dot-product-1.cpp @@ -0,0 +1,12 @@ +#include +#include + +int main() +{ + int a[] = { 1, 3, -5 }; + int b[] = { 4, -2, -1 }; + + std::cout << std::inner_product(a, a + sizeof(a) / sizeof(a[0]), b, 0) << std::endl; + + return 0; +} diff --git a/Task/Dot-product/C++/dot-product-2.cpp b/Task/Dot-product/C++/dot-product-2.cpp new file mode 100644 index 0000000000..476a7f64a5 --- /dev/null +++ b/Task/Dot-product/C++/dot-product-2.cpp @@ -0,0 +1,14 @@ +#include +#include + +int main() +{ + std::valarray xs = {1,3,-5}; + std::valarray ys = {4,-2,-1}; + + double result = (xs * ys).sum(); + + std::cout << result << '\n'; + + return 0; +} diff --git a/Task/Dot-product/C++/dot-product-3.cpp b/Task/Dot-product/C++/dot-product-3.cpp new file mode 100644 index 0000000000..69af05bce8 --- /dev/null +++ b/Task/Dot-product/C++/dot-product-3.cpp @@ -0,0 +1,11 @@ +#include +#include +#include + +int main() { + std::vector v1 { 1, 3, -5, }; + std::vector v2 { 4, -2, -1, }; + auto dp = std::inner_product(v1.cbegin(), v1.cend(), v2.cbegin(), 0); + std::cout << "dot.product of {1,3,-5} and {4,-2,-1}: " << dp << std::endl; + return 0; +} diff --git a/Task/Dot-product/C++/dot-product.cpp b/Task/Dot-product/C++/dot-product.cpp deleted file mode 100644 index 18d21a5a35..0000000000 --- a/Task/Dot-product/C++/dot-product.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -#include -#include -#include - -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wgnu-alignof-expression" -#endif - -#ifdef _MSC_VER -#define INLINE __force_inline __flatten __declspec(nothrow) __declspec(noalias) inline -#else -#define INLINE __attribute__((always_inline)) __attribute__((flatten)) __attribute__((nothrow)) __attribute__((const)) inline -#endif - -template(N)> -struct alignas((N == N_POW2 ? N_POW2 : 1) * alignof(T)) vec : std::array -{ -}; - -/* n-dimensional dot/scalar product */ -template -INLINE T dot(const vec& a, const vec& b, T dst = (T)0) -{ - #pragma omp simd reduction(+:dst) - for(size_t i = 0; i < N; i++) dst += a[i] * b[i]; - return dst; -} - -int main() -{ - vec a = { 1, 3, -5 }; - vec b = { 4, -2, -1 }; - vec c = { 1, 2, 3, 4 }; - vec,3> d = { a, b, a }; - vec,4> e = { c, c, c, c }; - - printf("dot.product of {1,3,-5} and {4,-2,-1}: %d", dot(a,b)); puts(""); - printf("type align/size"); puts(""); - printf("vec %4zu/%-4zu",alignof(a), sizeof(a)); puts(""); - printf("vec %4zu/%-4zu",alignof(c), sizeof(c)); puts(""); - printf("vec,3> %4zu/%-4zu",alignof(d), sizeof(d)); puts(""); - printf("vec,4> %4zu/%-4zu",alignof(e), sizeof(e)); puts(""); - - exit(EXIT_SUCCESS); -} diff --git a/Task/Dot-product/C/dot-product-1.c b/Task/Dot-product/C/dot-product-1.c deleted file mode 100644 index e56b20f598..0000000000 --- a/Task/Dot-product/C/dot-product-1.c +++ /dev/null @@ -1,37 +0,0 @@ -#include "array.h" - -#define dot(a,b,t,n,i) \ -({ \ - static_assert((isarray(a) || isvector(a)), \ - "ERROR: dot - a is not of array or vector type!"); \ - static_assert((isarray(b) || isvector(b)), \ - "ERROR: dot - b is not of array or vector type!"); \ - t _dst = (t)i; \ - size_t len = (size_t)llabs((ssize_t)n); \ - len = MIN(MIN(!isarray(a) ? vec_countof(a) : countof(a), \ - !isarray(b) ? vec_countof(b) : countof(b)), \ - (ssize_t)n>0?len:0); \ - _Pragma("omp simd reduction(+:_dst)") \ - for(size_t j = 0; j < len; j++) \ - _dst += (t)((a)[j]) * (t)((b)[j]); \ - _dst; \ -}) - -typedef double real; - -#define dot3(a,b) dot(a,b,real,3,0) -#define dot4(a,b) dot(a,b,real,4,0) - -#define out_eol puts("") -#define fout_num(stream,prefix,number,suffix) fprintf(stream, "%s%+e%s", prefix, (double)number, suffix) -#define out_num(number) fout_num(stdout,"",number,"") - -int main(int argc, char** argv) -{ - vec(real,3) a = { 1, 3, -5}; - arr(real,3) b = { 4, -2, -1}; - - out_num(dot3(a, b)); out_eol; - - exit(EXIT_SUCCESS); -} diff --git a/Task/Dot-product/C/dot-product-2.c b/Task/Dot-product/C/dot-product-2.c deleted file mode 100644 index a0b238ba51..0000000000 --- a/Task/Dot-product/C/dot-product-2.c +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************************************************************* - * C preprocessor macro vector/array types * - * * - * vec(T,N) - padded to bitceil(N) with operators/accessors * - * * - * arr(T,N) - alignas((N == bitceil(N) ? N : 1) * alignof(T)) * - * * - * vla(T) - flexible/variable length default alignment * - * * - * CFLAGS=" * - * -march=native * - * -O3 * - * -std=23 * - * -mfpmath= * - * -ftree-vectorize * - * -fopenmp * - * -fopenmp-simd" * - * * - * For MSVC see: https://learn.microsoft.com/en-us/cpp/parallel/openmp/openmp-simd?view=msvc-180 * - *************************************************************************************************/ -#pragma once -#include -#include -#include -#include -#include -#include -#include - -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wgnu-alignof-expression" -#endif - -#ifdef _MSC_VER -#define INLINE __force_inline __flatten __declspec(nothrow) __declspec(noalias) inline -#else -#define INLINE __attribute__((always_inline,flatten,nothrow,const)) inline -#endif - -#define BITOP_RUP01__(x) ( (x) | ( (x) >> 1)) -#define BITOP_RUP02__(x) (BITOP_RUP01__(x) | (BITOP_RUP01__(x) >> 2)) -#define BITOP_RUP04__(x) (BITOP_RUP02__(x) | (BITOP_RUP02__(x) >> 4)) -#define BITOP_RUP08__(x) (BITOP_RUP04__(x) | (BITOP_RUP04__(x) >> 8)) -#define BITOP_RUP16__(x) (BITOP_RUP08__(x) | (BITOP_RUP08__(x) >> 16)) - -#define bitceil(x) (const uint32_t)(BITOP_RUP16__(((uint32_t)(x)) - 1) + 1) - -/* arr(T,N) aligned array type */ -#define arr(t,n) alignas((n == bitceil(n) ? n : 1) * alignof(t)) typeof(t[n]) -#define countof(a) sizeof((a))/sizeof(typeof((a)[0])) -#define isarray(a) __builtin_choose_expr(__builtin_types_compatible_p(typeof((a)[0]) [], typeof((a))), true, false) - -#define rc_arr(src,n) (*(arr(typeof((src)[0]),n)*)&src) -#define rc_vec(src,n) (*(vec(typeof((src)[0]),n)*)&src) - -/* vec(T,N) for LLVM SIMD Vector Extension */ -#if defined(__clang__) -#define vec(T,N) typeof(T __attribute__((ext_vector_type(N)))) -#define vec_countof(a) __builtin_vectorelements(rc_vec(a,countof(a))) -#define isvector(a) !isarray(a) && \ -__builtin_choose_expr( \ -bitceil(vec_countof(a)) == countof(a),true,false) - -/* vec(T,N) for GCC SIMD Vector Extension */ -#elif defined(__GNUC__) -#define vec(T,N) typeof(T __attribute__((vector_size(bitceil(N) * alignof(T))))) -#define vec_countof(a) countof(a) -#define isvector(a) !isarray(a) && \ -_Generic(__builtin_convertvector(rc_vec(a,vec_countof(a)), \ - vec(float,bitceil(vec_countof(a)))), \ - vec(float,bitceil(vec_countof(a))): true, \ - default: false) -/* vec_ext(T,N) for other compilers */ -#else -#define vec(T,N) arr(T,N) -#warn "Your compiler doens't support vector extensions." -#warn "Using aligned arrays without operators instead." -#endif diff --git a/Task/Dot-product/C/dot-product.c b/Task/Dot-product/C/dot-product.c new file mode 100644 index 0000000000..4825c675e3 --- /dev/null +++ b/Task/Dot-product/C/dot-product.c @@ -0,0 +1,28 @@ +#include +#include + +int dot_product(int *, int *, size_t); + +int +main(void) +{ + int a[3] = {1, 3, -5}; + int b[3] = {4, -2, -1}; + + printf("%d\n", dot_product(a, b, sizeof(a) / sizeof(a[0]))); + + return EXIT_SUCCESS; +} + +int +dot_product(int *a, int *b, size_t n) +{ + int sum = 0; + size_t i; + + for (i = 0; i < n; i++) { + sum += a[i] * b[i]; + } + + return sum; +} diff --git a/Task/Dot-product/Crystal/dot-product.cr b/Task/Dot-product/Crystal/dot-product.crystal similarity index 100% rename from Task/Dot-product/Crystal/dot-product.cr rename to Task/Dot-product/Crystal/dot-product.crystal diff --git a/Task/Dot-product/Delphi/dot-product.pas b/Task/Dot-product/Delphi/dot-product.delphi similarity index 100% rename from Task/Dot-product/Delphi/dot-product.pas rename to Task/Dot-product/Delphi/dot-product.delphi diff --git a/Task/Dot-product/DuckDB/dot-product-1.duckdb b/Task/Dot-product/DuckDB/dot-product-1.duckdb deleted file mode 100644 index d7683fd5f7..0000000000 --- a/Task/Dot-product/DuckDB/dot-product-1.duckdb +++ /dev/null @@ -1 +0,0 @@ -select list_dot_product( [1, 3, -5], [4, -2, -1]); diff --git a/Task/Dot-product/DuckDB/dot-product-2.duckdb b/Task/Dot-product/DuckDB/dot-product-2.duckdb deleted file mode 100644 index ac8ab5ae33..0000000000 --- a/Task/Dot-product/DuckDB/dot-product-2.duckdb +++ /dev/null @@ -1,3 +0,0 @@ -SELECT sum(A.N*B.N) as '.' -FROM A JOIN B -ON A.rowid=B.rowid; diff --git a/Task/Dot-product/DuckDB/dot-product-3.duckdb b/Task/Dot-product/DuckDB/dot-product-3.duckdb deleted file mode 100644 index ecbeac52c6..0000000000 --- a/Task/Dot-product/DuckDB/dot-product-3.duckdb +++ /dev/null @@ -1,7 +0,0 @@ -CREATE OR REPLACE TABLE A AS - SELECT rowid, N - FROM (select [1, 3, -5] as l, unnest(l) as N, generate_subscripts(l, 1) AS rowid); - -CREATE OR REPLACE TABLE B AS - SELECT rowid, N - FROM (select [4, -2, -1] as l, unnest(l) as N, generate_subscripts(l, 1) AS rowid); diff --git a/Task/Dot-product/DuckDB/dot-product-4.duckdb b/Task/Dot-product/DuckDB/dot-product-4.duckdb deleted file mode 100644 index 31a7b61cad..0000000000 --- a/Task/Dot-product/DuckDB/dot-product-4.duckdb +++ /dev/null @@ -1,13 +0,0 @@ -# Define innerProduct/2 as a scalar function; -# the names of the columns are however fixed. -create or replace function innerProduct(TableA, TableB) as ( - (select * from - (with - AT as (from query_table(TableA)), - BT as (from query_table(TableB)) - select sum(AT.N * BT.N) - from AT join BT - on AT.rowid=BT.rowid ) -)); - -select innerProduct('A', 'B'); diff --git a/Task/Dot-product/Elena/dot-product.elena b/Task/Dot-product/Elena/dot-product.elena index 33f37c0614..c705cf4014 100644 --- a/Task/Dot-product/Elena/dot-product.elena +++ b/Task/Dot-product/Elena/dot-product.elena @@ -7,7 +7,7 @@ extension op = self.zipBy(array, (x,y => x * y)).summarize(); } -public Program() +public program() { - Console.printLine(new int[]{1, 3, -5}.dotProduct(new int[]{4, -2, -1})) + console.printLine(new int[]{1, 3, -5}.dotProduct(new int[]{4, -2, -1})) } diff --git a/Task/Dot-product/Elixir/dot-product.ex b/Task/Dot-product/Elixir/dot-product.elixir similarity index 100% rename from Task/Dot-product/Elixir/dot-product.ex rename to Task/Dot-product/Elixir/dot-product.elixir diff --git a/Task/Dot-product/Emacs-Lisp/dot-product.el b/Task/Dot-product/Emacs-Lisp/dot-product.l similarity index 100% rename from Task/Dot-product/Emacs-Lisp/dot-product.el rename to Task/Dot-product/Emacs-Lisp/dot-product.l diff --git a/Task/Dot-product/Euphoria/dot-product-1.eu b/Task/Dot-product/Euphoria/dot-product-1.euphoria similarity index 100% rename from Task/Dot-product/Euphoria/dot-product-1.eu rename to Task/Dot-product/Euphoria/dot-product-1.euphoria diff --git a/Task/Dot-product/Euphoria/dot-product-2.eu b/Task/Dot-product/Euphoria/dot-product-2.euphoria similarity index 100% rename from Task/Dot-product/Euphoria/dot-product-2.eu rename to Task/Dot-product/Euphoria/dot-product-2.euphoria diff --git a/Task/Dot-product/Fennel/dot-product.fennel b/Task/Dot-product/Fennel/dot-product.fennel deleted file mode 100644 index adc1d7ecd1..0000000000 --- a/Task/Dot-product/Fennel/dot-product.fennel +++ /dev/null @@ -1,11 +0,0 @@ -(fn dotProduct [v1 v2] - (assert (= (length v1) (length v2)) "vectors should have the same length") - - (var result 0) - (for [i 1 (length v1)] - (set result (+ result (* (. v1 i) (. v2 i)))) - ) - result -) - -(print (dotProduct [1 3 -5] [4 -2 -1])) diff --git a/Task/Dot-product/Gleam/dot-product.gleam b/Task/Dot-product/Gleam/dot-product.gleam deleted file mode 100644 index 646cd40690..0000000000 --- a/Task/Dot-product/Gleam/dot-product.gleam +++ /dev/null @@ -1,18 +0,0 @@ -pub fn main() { - let _ = echo dot_product([1, 3, -5], [4, -2, -1]) - let _ = echo dot_product([1, 3, -5], [4, -2]) -} - -pub fn dot_product(u: List(Int), v: List(Int)) -> Result(Int, String) { - dot_product_loop(u, v, 0) -} - -fn dot_product_loop(u: List(Int), v: List(Int), sum: Int) -> Result(Int, String) { - case u, v { - [], [_, ..] -> Error("Inputs must have the same length.") - [_, ..], [] -> Error("Inputs must have the same length.") - [x, ..rest_u], [y, ..rest_v] -> - dot_product_loop(rest_u, rest_v, x * y + sum) - [], [] -> Ok(sum) - } -} diff --git a/Task/Dot-product/Julia/dot-product.jl b/Task/Dot-product/Julia/dot-product.julia similarity index 100% rename from Task/Dot-product/Julia/dot-product.jl rename to Task/Dot-product/Julia/dot-product.julia diff --git a/Task/Dot-product/Kotlin/dot-product.kts b/Task/Dot-product/Kotlin/dot-product.kotlin similarity index 100% rename from Task/Dot-product/Kotlin/dot-product.kts rename to Task/Dot-product/Kotlin/dot-product.kotlin diff --git a/Task/Dot-product/LFE/dot-product.lfe b/Task/Dot-product/LFE/dot-product.lfe index 6208adb21f..4936a177ac 100644 --- a/Task/Dot-product/LFE/dot-product.lfe +++ b/Task/Dot-product/LFE/dot-product.lfe @@ -1,2 +1,3 @@ (defun dot-product (a b) - (lists:foldl #'+/2 0 (lists:zipwith #'*/2 a b))) + (: lists foldl #'+/2 0 + (: lists zipwith #'*/2 a b))) diff --git a/Task/Dot-product/LOLCODE/dot-product.lol b/Task/Dot-product/LOLCODE/dot-product.lol deleted file mode 100644 index 97687f6b7d..0000000000 --- a/Task/Dot-product/LOLCODE/dot-product.lol +++ /dev/null @@ -1,23 +0,0 @@ -HAI 1.3 BTW DOT PRODUKT - - OBTW FIND DOT PRODUKT OF AV AN BV - - AV AN BV MUST BE BUKKITS WITH LENGTH AN SRS 0, SRS 1, ... SRS DIFF OF LENGTH AN 1 - BOTH SAEM AV'Z LENGTH AN BV'Z LENGTH MUST BE WIN - TLDR - HOW IZ I DOTTIN YR AV AN YR BV - I HAS A REZULT ITZ 0 - IM IN YR INNERPRODUKT UPPIN YR I TIL BOTH SAEM I AN BIGGR OF I AN AV'Z LENGTH - REZULT R SUM OF REZULT AN PRODUKT OF AV'Z SRS I AN BV'Z SRS I - IM OUTTA YR INNERPRODUKT - FOUND YR REZULT - IF U SAY SO - - BTW MAEK AV AN BV BE 3 ELEMENT VEKTORS - I HAS A AV ITZ A BUKKIT, AV HAS A LENGTH ITZ 3 - AV HAS A SRS 0 ITZ 1, AV HAS A SRS 1 ITZ 3, AV HAS A SRS 2 ITZ -5 - I HAS A BV ITZ A BUKKIT, BV HAS A LENGTH ITZ 3 - BV HAS A SRS 0 ITZ 4, BV HAS A SRS 1 ITZ -2, BV HAS A SRS 2 ITZ -1 - - VISIBLE I IZ DOTTIN YR AV AN YR BV MKAY - -KTHXBYE diff --git a/Task/Dot-product/Loglan82/dot-product.loglan82 b/Task/Dot-product/Loglan82/dot-product.loglan82 deleted file mode 100644 index 58d21b8f35..0000000000 --- a/Task/Dot-product/Loglan82/dot-product.loglan82 +++ /dev/null @@ -1,17 +0,0 @@ -(* Dot product *) - -block - unit vector: class (x, y, z: real); - end vector; - - unit dot_product: function (u, v: vector) : real; - begin - result := u.x * v.x + u.y * v.y + u.z * v.z - end dot_product; - -var - dp: real; -begin - dp := dot_product(new vector(1.0, 3.0, -5.0), new vector(4.0, -2.0, -1.0)); - writeln(dp) -end diff --git a/Task/Dot-product/Nu/dot-product.nu b/Task/Dot-product/Nu/dot-product.nu deleted file mode 100644 index 655132cc4e..0000000000 --- a/Task/Dot-product/Nu/dot-product.nu +++ /dev/null @@ -1,5 +0,0 @@ -def 'math dot' [v] { - zip $v | each { math product } | math sum -} - -[1 3 -5] | math dot [4 -2 -1] diff --git a/Task/Dot-product/OCaml/dot-product-1.ml b/Task/Dot-product/OCaml/dot-product-1.ocaml similarity index 100% rename from Task/Dot-product/OCaml/dot-product-1.ml rename to Task/Dot-product/OCaml/dot-product-1.ocaml diff --git a/Task/Dot-product/OCaml/dot-product-2.ml b/Task/Dot-product/OCaml/dot-product-2.ocaml similarity index 100% rename from Task/Dot-product/OCaml/dot-product-2.ml rename to Task/Dot-product/OCaml/dot-product-2.ocaml diff --git a/Task/Dot-product/Pascal-P/dot-product.pas b/Task/Dot-product/Pascal-P/dot-product.pas deleted file mode 100644 index db1cfeb348..0000000000 --- a/Task/Dot-product/Pascal-P/dot-product.pas +++ /dev/null @@ -1,29 +0,0 @@ -program dotproduct(output); - (* Dot product *) - -const - maxi = 2; - -type - realarray = array [0 .. maxi] of real; - -var - x, y: realarray; - - function dotproduct(a, b: realarray): real; - var - i: integer; - res: real; - begin - res := 0; - for i := 0 to maxi do - res := res + (a[i] * b[i]); - dotproduct := res; - end; - -begin - x[0] := 1; x[1] := 3; x[2] := -5; - y[0] := 4; y[1] := -2; y[2] := -1; - writeln(dotproduct(x, y)); - (* readln; *) -end. diff --git a/Task/Dot-product/PascalABC.NET/dot-product.pas b/Task/Dot-product/PascalABC.NET/dot-product.pas deleted file mode 100644 index 71d0c2418d..0000000000 --- a/Task/Dot-product/PascalABC.NET/dot-product.pas +++ /dev/null @@ -1,4 +0,0 @@ -## -function DotProduct(a, b: array of real) := a.Zip(b, (x, y) -> x * y).Sum; - -DotProduct(|1.0, 3, -5|, |4.0, -2, -1|).println; diff --git a/Task/Dot-product/Perl/dot-product-2.pl b/Task/Dot-product/Perl/dot-product-2.pl deleted file mode 100644 index 3ee16d9b23..0000000000 --- a/Task/Dot-product/Perl/dot-product-2.pl +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/perl - -use strict; # https://rosettacode.org/wiki/Dot_product -use warnings; -use List::AllUtils qw( sum zip_by product ); - -sub dotprod { return sum zip_by { product @_ } @_ } - -my @vec_a = (1,3,-5); -my @vec_b = (4,-2,-1); - -print dotprod(\@vec_a, \@vec_b), "\n"; diff --git a/Task/Dot-product/Perl/dot-product-1.pl b/Task/Dot-product/Perl/dot-product.pl similarity index 100% rename from Task/Dot-product/Perl/dot-product-1.pl rename to Task/Dot-product/Perl/dot-product.pl diff --git a/Task/Dot-product/PowerShell/dot-product.ps1 b/Task/Dot-product/PowerShell/dot-product.psh similarity index 100% rename from Task/Dot-product/PowerShell/dot-product.ps1 rename to Task/Dot-product/PowerShell/dot-product.psh diff --git a/Task/Dot-product/REBOL/dot-product.rebol b/Task/Dot-product/REBOL/dot-product.rebol new file mode 100644 index 0000000000..a2d960f24d --- /dev/null +++ b/Task/Dot-product/REBOL/dot-product.rebol @@ -0,0 +1,16 @@ +REBOL [] + +a: [1 3 -5] +b: [4 -2 -1] + +dot-product: function [v1 v2] [sum] [ + if (length? v1) != (length? v2) [ + make error! "error: vector sizes must match" + ] + sum: 0 + repeat i length? v1 [ + sum: sum + ((pick v1 i) * (pick v2 i)) + ] +] + +dot-product a b diff --git a/Task/Dot-product/Rebol/dot-product.rebol b/Task/Dot-product/Rebol/dot-product.rebol deleted file mode 100644 index f8299d6371..0000000000 --- a/Task/Dot-product/Rebol/dot-product.rebol +++ /dev/null @@ -1,16 +0,0 @@ -Rebol [] -a: [1 3 -5] -b: [4 -2 -1] - -dot-product: func [v1 v2 /local len sum] [ - len: length? v1 - if len <> length? v2 [ - make error! "error: vector sizes must match" - ] - sum: 0 - repeat i len [ - sum: sum + (v1/:i * v2/:i) - ] -] - -dot-product a b diff --git a/Task/Dot-product/Red/dot-product.red b/Task/Dot-product/Red/dot-product.red deleted file mode 100644 index 1996c9335e..0000000000 --- a/Task/Dot-product/Red/dot-product.red +++ /dev/null @@ -1,10 +0,0 @@ -Red [ "Dot product - hinjolicious" ] - -#include %mylib/pipe-map.red -#include %mylib/transpose-zip.Red - -demo "Dot product" [ -a: [1 3 -5] -b: [4 -2 -1] -(reduce [a b]) |> zip ==> [_m/1 * _m/2] |> sum |> probe ; 3 -] diff --git a/Task/Dot-product/Rust/dot-product-1.rs b/Task/Dot-product/Rust/dot-product-1.rust similarity index 100% rename from Task/Dot-product/Rust/dot-product-1.rs rename to Task/Dot-product/Rust/dot-product-1.rust diff --git a/Task/Dot-product/Rust/dot-product-2.rs b/Task/Dot-product/Rust/dot-product-2.rust similarity index 100% rename from Task/Dot-product/Rust/dot-product-2.rs rename to Task/Dot-product/Rust/dot-product-2.rust diff --git a/Task/Dot-product/Rye/dot-product.rye b/Task/Dot-product/Rye/dot-product.rye deleted file mode 100644 index 28deb83a66..0000000000 --- a/Task/Dot-product/Rye/dot-product.rye +++ /dev/null @@ -1 +0,0 @@ -print dot-product vector { 1 3 -5 } vector { 4 -2 -1 } diff --git a/Task/Dot-product/Scheme/dot-product.scm b/Task/Dot-product/Scheme/dot-product.ss similarity index 100% rename from Task/Dot-product/Scheme/dot-product.scm rename to Task/Dot-product/Scheme/dot-product.ss diff --git a/Task/Dot-product/Uiua/dot-product.uiua b/Task/Dot-product/Uiua/dot-product.uiua deleted file mode 100644 index f0af9bb367..0000000000 --- a/Task/Dot-product/Uiua/dot-product.uiua +++ /dev/null @@ -1,2 +0,0 @@ -[4 ¯2 ¯1] [1 3 ¯5] -/+× diff --git a/Task/Dot-product/VBScript/dot-product.vbs b/Task/Dot-product/VBScript/dot-product.vb similarity index 100% rename from Task/Dot-product/VBScript/dot-product.vbs rename to Task/Dot-product/VBScript/dot-product.vb diff --git a/Task/Dot-product/Zig/dot-product.zig b/Task/Dot-product/Zig/dot-product.zig index 1118520c95..82ecb11802 100644 --- a/Task/Dot-product/Zig/dot-product.zig +++ b/Task/Dot-product/Zig/dot-product.zig @@ -1,9 +1,10 @@ const std = @import("std"); +const Vector = std.meta.Vector; pub fn main() !void { - const a = @Vector(3, i32){ 1, 3, -5 }; - const b = @Vector(3, i32){ 4, -2, -1 }; - const dot: i32 = @reduce(.Add, a * b); + const a: Vector(3, i32) = [_]i32{1, 3, -5}; + const b: Vector(3, i32) = [_]i32{4, -2, -1}; + var dot: i32 = @reduce(.Add, a*b); try std.io.getStdOut().writer().print("{d}\n", .{dot}); } diff --git a/Task/Doubly-linked-list-Definition/Delphi/doubly-linked-list-definition.pas b/Task/Doubly-linked-list-Definition/Delphi/doubly-linked-list-definition.delphi similarity index 100% rename from Task/Doubly-linked-list-Definition/Delphi/doubly-linked-list-definition.pas rename to Task/Doubly-linked-list-Definition/Delphi/doubly-linked-list-definition.delphi diff --git a/Task/Doubly-linked-list-Definition/FutureBasic/doubly-linked-list-definition.basic b/Task/Doubly-linked-list-Definition/FutureBasic/doubly-linked-list-definition.basic deleted file mode 100644 index 32155d51d0..0000000000 --- a/Task/Doubly-linked-list-Definition/FutureBasic/doubly-linked-list-definition.basic +++ /dev/null @@ -1,67 +0,0 @@ -begin globals - str255 List(8) //create a new list of strings (List(0) not used -end globals - - -local fn ShowList(title As str255) - //display all elements from list of string - short j - Print title; - For j = 1 to 7 - Print List(j); " "; - Next j - Print "" -End fn - - -/////////// MAIN PROGRAM //////////// - -Dim As str255 item //items to add to the list -Dim As short i,j, c = 0 - -//the list of data that will be added to the list -data: -Data "One", "Two", "Three", "Four", "Five", "Six", "EndOfData" - -Restore -c = 0 -Do - Read item - If item <> "EndOfData" Then List(c) = item - c ++ -Until item = "EndOfData" - -str255 ListTMP(7) - -For j = 1 To 7 - ListTMP(7-j) = List(j) -Next j -For j = 1 To 7 - Swap List(j), ListTMP(j) -Next j -fn ShowList("Insertion at Head: ") - -for i = 1 to 7 : List(i) = "" : next i // clear list -Restore -c = 0 -Do - Read item //: c += 1 - If item <> "EndOfData" Then List(c) = item - c ++ -Until item = "EndOfData" -fn ShowList("Insertion at Tail: ") - -for i = 1 to 7 : List(i) = "" : next i // clear list -Restore -c = 0 -Do - Read item //: c += 1 - If item <> "EndOfData" Then List(c) = item - c ++ -Until item = "EndOfData" - -Swap List(3), List(6) -fn ShowList("Insertion in Middle: ") - - -handleevents diff --git a/Task/Doubly-linked-list-Definition/Julia/doubly-linked-list-definition-1.jl b/Task/Doubly-linked-list-Definition/Julia/doubly-linked-list-definition-1.julia similarity index 100% rename from Task/Doubly-linked-list-Definition/Julia/doubly-linked-list-definition-1.jl rename to Task/Doubly-linked-list-Definition/Julia/doubly-linked-list-definition-1.julia diff --git a/Task/Doubly-linked-list-Definition/Julia/doubly-linked-list-definition-2.jl b/Task/Doubly-linked-list-Definition/Julia/doubly-linked-list-definition-2.julia similarity index 100% rename from Task/Doubly-linked-list-Definition/Julia/doubly-linked-list-definition-2.jl rename to Task/Doubly-linked-list-Definition/Julia/doubly-linked-list-definition-2.julia diff --git a/Task/Doubly-linked-list-Definition/Kotlin/doubly-linked-list-definition.kts b/Task/Doubly-linked-list-Definition/Kotlin/doubly-linked-list-definition.kotlin similarity index 100% rename from Task/Doubly-linked-list-Definition/Kotlin/doubly-linked-list-definition.kts rename to Task/Doubly-linked-list-Definition/Kotlin/doubly-linked-list-definition.kotlin diff --git a/Task/Doubly-linked-list-Definition/PascalABC.NET/doubly-linked-list-definition.pas b/Task/Doubly-linked-list-Definition/PascalABC.NET/doubly-linked-list-definition.pas deleted file mode 100644 index a97277863b..0000000000 --- a/Task/Doubly-linked-list-Definition/PascalABC.NET/doubly-linked-list-definition.pas +++ /dev/null @@ -1,75 +0,0 @@ -type Node = auto class - data: T; - prev,next: Node; -end; - -type - MyLinkedList = class - first, last: Node; - procedure AddFirst(x: T); - begin - if first = nil then - begin - first := new Node(x,nil,nil); - last := first - end - else - begin - var p := new Node(x,nil,first); - first.prev := p; - first := p; - end; - end; - procedure AddLast(x: T); - begin - if first = nil then - begin - first := new Node(x,nil,nil); - last := first - end - else - begin - var p := new Node(x,last,nil); - last.next := p; - last := p; - end; - end; - procedure AddAfter(p: Node; x: T); - begin - if last = p then - AddLast(x) - else begin - var pp := new Node(x,p,p.next); - p.next := pp; - pp.next.prev := pp; - end - end; - procedure PrintList(); - begin - var p := first; - while p<>nil do - begin - Print(p.data); - p := p.next; - end; - end; - procedure PrintBack(); - begin - var p := last; - while p<>nil do - begin - Print(p.data); - p := p.prev; - end; - end; - end; - -begin - var lst := new MyLinkedList; - lst.AddFirst(2); lst.AddFirst(3); - lst.AddLast(5); - lst.AddAfter(lst.first,555); - lst.PrintList; - Println; - lst.PrintBack; -end. diff --git a/Task/Doubly-linked-list-Definition/Pluto/doubly-linked-list-definition.pluto b/Task/Doubly-linked-list-Definition/Pluto/doubly-linked-list-definition.pluto deleted file mode 100644 index c165dcf1c8..0000000000 --- a/Task/Doubly-linked-list-Definition/Pluto/doubly-linked-list-definition.pluto +++ /dev/null @@ -1,18 +0,0 @@ -require "list" - -local d = dlist.of("A", "B") -print(d) --- Add an element at the head. -d:prepend("C") --- Add an element in the middle. -d:insert(2, "D") --- Add an element at the tail. -d:push("E") -print(d) - --- Remove an element by index (indexing is 1 based). -d:remove(2) -print(d) --- Remove an element by value. -d:erase("A") -print(d) diff --git a/Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-1.ps1 b/Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-1.psh similarity index 100% rename from Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-1.ps1 rename to Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-1.psh diff --git a/Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-2.ps1 b/Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-2.psh similarity index 100% rename from Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-2.ps1 rename to Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-2.psh diff --git a/Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-3.ps1 b/Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-3.psh similarity index 100% rename from Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-3.ps1 rename to Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-3.psh diff --git a/Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-4.ps1 b/Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-4.psh similarity index 100% rename from Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-4.ps1 rename to Task/Doubly-linked-list-Definition/PowerShell/doubly-linked-list-definition-4.psh diff --git a/Task/Doubly-linked-list-Definition/RISC-V-Assembly/doubly-linked-list-definition.asm b/Task/Doubly-linked-list-Definition/RISC-V-Assembly/doubly-linked-list-definition.asm deleted file mode 100644 index e3c89ff6db..0000000000 --- a/Task/Doubly-linked-list-Definition/RISC-V-Assembly/doubly-linked-list-definition.asm +++ /dev/null @@ -1,347 +0,0 @@ -# riscv assembly raspberry pico2 rp2350 -# program dbllinkedlist.s -# connexion putty com3 -/*********************************************/ -/* CONSTANTES */ -/********************************************/ -/* for this file see risc-v task include a file */ -.include "../../../constantesRiscv.inc" -.equ HEAPSIZE, 50000 -/****************************************************/ -/* MACROS */ -/****************************************************/ -#.include "../ficmacrosriscv.inc" # only for debugging - -/*******************************************/ -/* STRUCTURE */ -/*******************************************/ -/* structure Doublylinkedlist*/ - .struct 0 -dllist_head: # head node - .struct dllist_head + 4 -dllist_tail: # tail node - .struct dllist_tail + 4 -dllist_end: -/* structure Node Doublylinked List*/ - .struct 0 -NDlist_next: # next element - .struct NDlist_next + 4 -NDlist_prev: # previous element - .struct NDlist_prev + 4 -NDlist_value: # element value or key - .struct NDlist_value + 4 -NDlist_end: -/*******************************************/ -/* INITIALED DATAS */ -/*******************************************/ -.data -szMessStart: .asciz "Program riscv start.\r\n" -szMessEndOk: .asciz "Program riscv end OK.\r\n" -szCariageReturn: .asciz "\r\n" - -szMessInitListe: .asciz "List initialized.\n" -szMessErreur: .asciz "Error detected.\n" -szMessResult: .asciz "Element No :" -szMessResultValue: .asciz " value : " -szMessInverse: .asciz "\nList inverse : \n" -.align 2 -ptHeapReserve: .int heapReserve -/*******************************************/ -/* UNINITIALED DATA */ -/*******************************************/ -.bss -sConvArea: .skip 24 -.align 2 -dlList1: .skip dllist_end # list memory place -heapReserve: .skip HEAPSIZE - -/**********************************************/ -/* SECTION CODE */ -/**********************************************/ -.text -.global main - -main: - call stdio_init_all # général init -1: # start loop connexion - li a0,0 # raz argument register - call tud_cdc_n_connected # waiting for USB connection - beqz a0,1b # return code = zero ? yes -> loop - - la a0,szMessStart # message address - call writeString # display message - - la a0,dlList1 - call newDList # create new list - la a0,szMessInitListe - call writeString - - - - la a0,dlList1 # list address - li a1,5000 # value to insert - call insertTail # insertion at head - bgez a0,2f # error ? - la a0,szMessErreur - call writeString - j 10f -2: - la a0,dlList1 # list address - li a1,42 # value to insert - call insertHead # insertion at head - bgez a0,3f # error ? - la a0,szMessErreur - call writeString - j 10f - -3: - la a0,dlList1 # list address - li a1,42 # search value - li a2,1234567 # value to insert - call insertAfter # insertion after node contains search value - bgez a0,4f # error ? - la a0,szMessErreur - call writeString - j 10f -4: - - la s0,dlList1 # list address - lw s0,dllist_head(s0) - beqz s0,10f # empty list - li s1,1 # n0 element -5: - lw s2,NDlist_value(s0) # load pointer - #beqz s2,10f # end list ? - la a0,szMessResult - call writeString - mv a0,s1 # conversion and display N° element - la a1,sConvArea - call conversion10 - la a0,sConvArea - call writeString - - la a0,szMessResultValue - call writeString - mv a0,s2 # conversion and display value element - la a1,sConvArea - call conversion10 - la a0,sConvArea - call writeString - la a0,szCariageReturn - call writeString - addi s1,s1,1 - lw s0,NDlist_next(s0) # load next pointer - bnez s0,5b # not null pointer -> loop - - la a0,szMessInverse - call writeString - la s0,dlList1 # list address - lw s0,dllist_tail(s0) - beqz s0,10f # empty list - li s1,1 # n0 element -6: - lw s2,NDlist_value(s0) # load pointer - #beqz s2,10f # end list ? - la a0,szMessResult - call writeString - mv a0,s1 # conversion and display N° element - la a1,sConvArea - call conversion10 - la a0,sConvArea - call writeString - - la a0,szMessResultValue - call writeString - mv a0,s2 # conversion and display value element - la a1,sConvArea - call conversion10 - la a0,sConvArea - call writeString - la a0,szCariageReturn - call writeString - addi s1,s1,1 - lw s0,NDlist_prev(s0) # load next pointer - bnez s0,6b # not null pointer -> loop - -10: - la a0,szMessEndOk # message address - call writeString # display message - call getchar -100: # final loop - j 100b - -/**********************************************/ -/* create new double linked list */ -/**********************************************/ -/* a0 linked list address */ -newDList: # INFO: newDList - addi sp, sp, -4 - sw ra, 0(sp) - - sw x0,dllist_tail(a0) # raz pointer - sw x0,dllist_head(a0) # raz pointer - - lw ra, 0(sp) - addi sp, sp, 4 - ret -/**********************************************/ -/* insertion value in head */ -/**********************************************/ -/* a0 double linked list address */ -/* a1 contains the value of element */ -/* a0 returns address of element or - 1 if error */ -insertHead: # INFO: insertTail - addi sp, sp, -8 - sw ra, 0(sp) - sw s0, 4(sp) - mv s0,a0 # save address - mv a0,a1 # value - call createNode # create new node - bltz a0,100f # error ? - - lw t0,dllist_head(s0) # load address first node - sw t0,NDlist_next(a0) # store in next pointer on new node - sw x0,NDlist_prev(a0) # store null on prev pointer - sw a0,dllist_head(s0) # store address new node on list head - beqz t0,1f # address last node is null ? - sw a0,NDlist_prev(t0) # no store address new node in next pointer - j 2f -1: - sw a0,dllist_tail(s0) # else store in head list -2: - -100: - lw ra, 0(sp) - lw s0, 4(sp) - addi sp, sp, 8 - ret - -/**********************************************/ -/* insertion value in Tail */ -/**********************************************/ -/* a0 double linked list address */ -/* a1 contains the value of element */ -/* a0 returns address of element or - 1 if error */ -insertTail: # INFO: insertTail - addi sp, sp, -8 - sw ra, 0(sp) - sw s0, 4(sp) - mv s0,a0 # save address - mv a0,a1 # value - call createNode # create new node - bltz a0,100f # error ? - - lw t0,dllist_tail(s0) # load address last node - sw t0,NDlist_prev(a0) # store in previous pointer on new node - sw x0,NDlist_next(a0) # store null un next pointer - sw a0,dllist_tail(s0) # store address new node on list tail - beqz t0,1f # address last node is null ? - sw a0,NDlist_next(t0) # no store address new node in next pointer - j 2f -1: - sw a0,dllist_head(s0) # else store in head list -2: - -100: - lw ra, 0(sp) - lw s0, 4(sp) - addi sp, sp, 8 - ret -/**********************************************/ -/* insertion value in after search value */ -/**********************************************/ -/* a0 double linked list address */ -/* a1 contains the search value after that insert */ -/* a2 contains the value of element */ -/* a0 returns address of element or - 1 if error */ -insertAfter: # INFO: insertAfter - addi sp, sp, -12 - sw ra, 0(sp) - sw s0, 4(sp) - sw s1, 8(sp) - mv s0,a0 # save address - call searchValue - bltz a0,100f # error ? - mv s1,a0 # save address find node - mv a0,a2 # value - call createNode # create new node - bltz a0,100f # error ? - - lw t0,NDlist_next(s1) # load pointer next of find node - sw a0,NDlist_next(s1) # store new node in pointer next - sw s1,NDlist_prev(a0) # store address find node in previous pointer on new node - sw t0,NDlist_next(a0) # store pointer next of find node on pointer next on new node - - beqz t0,1f # address next node null ? - sw a0,NDlist_prev(t0) # no store address new node in previous pointer - j 2f -1: - sw a0,dllist_tail(s0) # else store in tail list -2: - -100: - lw ra, 0(sp) - lw s0, 4(sp) - lw s1, 8(sp) - addi sp, sp, 12 - ret - -/**********************************************/ -/* search value in double linked list */ -/**********************************************/ -/* a0 contains the address of the list structure */ -/* a1 contains the value to search */ -/* a0 return address of node or -1 if not found */ -searchValue: # INFO: searchValue - addi sp, sp, -4 - sw ra, 0(sp) - lw t0,dllist_head(a0) # load first node -1: - bnez t0,2f # equal zero ? - li a0,-1 # yes -> not found -> end - j 100f -2: - lw t1,NDlist_value(t0) # load node value - bne t1,a1,3f # equal search value ? - mv a0,t0 # yes -> end - j 100f -3: - lw t0,NDlist_next(t0) # load address nex node - j 1b # and loop - -100: - lw ra, 0(sp) - addi sp, sp, 4 - ret -/**********************************************/ -/* create node on heap */ -/**********************************************/ -/* a0 value */ -/* a0 return node address or -1 if error */ -createNode: # INFO: createNode - addi sp, sp, -4 - sw ra, 0(sp) - la t0,ptHeapReserve - lw t1,(t0) # free heap address - addi t2,t1,NDlist_end # reserve area on heap - la t3,heapReserve - li t4,HEAPSIZE - add t3,t3,t4 - blt t2,t3,2f - li a0,-1 - j 100f -2: - sw t2,(t0) # save new value heap used - sw a0,NDlist_value(t1) # store value on heap - sw x0,NDlist_next(t1) # raz pointer next - sw x0,NDlist_prev(t1) # raz pointer previous - mv a0,t1 # return node address -100: - lw ra, 0(sp) - addi sp, sp, 4 - ret -/************************************/ -/* file include Fonctions */ -/***********************************/ -/* for this file see risc-v task include a file */ -.include "../../../includeFunctions.s" diff --git a/Task/Doubly-linked-list-Definition/Raku/doubly-linked-list-definition.raku b/Task/Doubly-linked-list-Definition/Raku/doubly-linked-list-definition.raku index ba49db0aee..5ee1919518 100644 --- a/Task/Doubly-linked-list-Definition/Raku/doubly-linked-list-definition.raku +++ b/Task/Doubly-linked-list-Definition/Raku/doubly-linked-list-definition.raku @@ -4,29 +4,29 @@ role DLElem[::T] { has T $.payload = T; method pre-insert(T $payload) { - die "Can't insert before beginning" unless $!prev; - my $elem = ::?CLASS.new(:$payload); - $!prev.next = $elem; - $elem.prev = $!prev; - $elem.next = self; - $!prev = $elem; - $elem; + die "Can't insert before beginning" unless $!prev; + my $elem = ::?CLASS.new(:$payload); + $!prev.next = $elem; + $elem.prev = $!prev; + $elem.next = self; + $!prev = $elem; + $elem; } method post-insert(T $payload) { - die "Can't insert after end" unless $!next; - my $elem = ::?CLASS.new(:$payload); - $!next.prev = $elem; - $elem.next = $!next; - $elem.prev = self; - $!next = $elem; - $elem; + die "Can't insert after end" unless $!next; + my $elem = ::?CLASS.new(:$payload); + $!next.prev = $elem; + $elem.next = $!next; + $elem.prev = self; + $!next = $elem; + $elem; } method delete { - die "Can't delete a sentinel" unless $!prev and $!next; - $!next.prev = $!prev; - $!prev.next = $!next; # conveniently returns next element + die "Can't delete a sentinel" unless $!prev and $!next; + $!next.prev = $!prev; + $!prev.next = $!next; # conveniently returns next element } } @@ -35,10 +35,10 @@ role DLList[::DLE] { has DLE $.last; submethod BUILD { - $!first = DLE.new; - $!last = DLE.new; - $!first.next = $!last; - $!last.prev = $!first; + $!first = DLE.new; + $!last = DLE.new; + $!first.next = $!last; + $!last.prev = $!first; } method list { ($!first.next, *.next ...^ !*.next).map: *.payload } diff --git a/Task/Doubly-linked-list-Definition/Rust/doubly-linked-list-definition-1.rs b/Task/Doubly-linked-list-Definition/Rust/doubly-linked-list-definition-1.rs deleted file mode 100644 index 2dbdcfbc18..0000000000 --- a/Task/Doubly-linked-list-Definition/Rust/doubly-linked-list-definition-1.rs +++ /dev/null @@ -1,7 +0,0 @@ -// We are ommitting the allocator for these examples -pub struct LinkedList { - head: Option>>, - tail: Option>>, - len: usize, - marker: PhantomData>>, // We logically hold an owned pointer to Node -} diff --git a/Task/Doubly-linked-list-Definition/Rust/doubly-linked-list-definition-2.rs b/Task/Doubly-linked-list-Definition/Rust/doubly-linked-list-definition-2.rs deleted file mode 100644 index c0e18e5933..0000000000 --- a/Task/Doubly-linked-list-Definition/Rust/doubly-linked-list-definition-2.rs +++ /dev/null @@ -1,40 +0,0 @@ -trait ListExt { - fn insert(&mut self, elt: T, at: usize); -} - -impl ListExt for std::collections::LinkedList { - // The following references the standard library's implementation of `LinkedList::remove` - fn insert(&mut self, elt: T, at: usize) { - let len = self.len(); - assert!( - at <= len, - "The given index must be a valid index after insertion", - ); - - let offset_from_end = len - at; - if at < offset_from_end { - let mut cursor = self.cursor_front_mut(); - for _ in 0..at { - cursor.move_next(); - } - cursor.insert_before(elt); - } else { - let mut cursor = self.cursor_back_mut(); - for _ in 0..offset_from_end { - cursor.move_prev(); - } - cursor.insert_after(elt); - } - } -} - -fn definition() { - use std::collections::LinkedList; - - let mut list = LinkedList::new(); - list.push_back('B'); - list.push_front('A'); - list.insert('C', 1); - - assert_eq!(list, ['A', 'C', 'B'].into()); -} diff --git a/Task/Doubly-linked-list-Definition/Scheme/doubly-linked-list-definition.scm b/Task/Doubly-linked-list-Definition/Scheme/doubly-linked-list-definition.ss similarity index 100% rename from Task/Doubly-linked-list-Definition/Scheme/doubly-linked-list-definition.scm rename to Task/Doubly-linked-list-Definition/Scheme/doubly-linked-list-definition.ss diff --git a/Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-1.adb b/Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-1.ada similarity index 100% rename from Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-1.adb rename to Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-1.ada diff --git a/Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-2.adb b/Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-2.ada similarity index 100% rename from Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-2.adb rename to Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-2.ada diff --git a/Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-3.adb b/Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-3.ada similarity index 100% rename from Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-3.adb rename to Task/Doubly-linked-list-Element-definition/Ada/doubly-linked-list-element-definition-3.ada diff --git a/Task/Doubly-linked-list-Element-definition/Delphi/doubly-linked-list-element-definition.pas b/Task/Doubly-linked-list-Element-definition/Delphi/doubly-linked-list-element-definition.delphi similarity index 100% rename from Task/Doubly-linked-list-Element-definition/Delphi/doubly-linked-list-element-definition.pas rename to Task/Doubly-linked-list-Element-definition/Delphi/doubly-linked-list-element-definition.delphi diff --git a/Task/Doubly-linked-list-Element-definition/Julia/doubly-linked-list-element-definition.jl b/Task/Doubly-linked-list-Element-definition/Julia/doubly-linked-list-element-definition.julia similarity index 100% rename from Task/Doubly-linked-list-Element-definition/Julia/doubly-linked-list-element-definition.jl rename to Task/Doubly-linked-list-Element-definition/Julia/doubly-linked-list-element-definition.julia diff --git a/Task/Doubly-linked-list-Element-definition/Kotlin/doubly-linked-list-element-definition.kts b/Task/Doubly-linked-list-Element-definition/Kotlin/doubly-linked-list-element-definition.kotlin similarity index 100% rename from Task/Doubly-linked-list-Element-definition/Kotlin/doubly-linked-list-element-definition.kts rename to Task/Doubly-linked-list-Element-definition/Kotlin/doubly-linked-list-element-definition.kotlin diff --git a/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-1.ml b/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-1.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-1.ml rename to Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-1.ocaml diff --git a/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-2.ml b/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-2.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-2.ml rename to Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-2.ocaml diff --git a/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-3.ml b/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-3.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-3.ml rename to Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-3.ocaml diff --git a/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-4.ml b/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-4.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-4.ml rename to Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-4.ocaml diff --git a/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-5.ml b/Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-5.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-5.ml rename to Task/Doubly-linked-list-Element-definition/OCaml/doubly-linked-list-element-definition-5.ocaml diff --git a/Task/Doubly-linked-list-Element-definition/PascalABC.NET/doubly-linked-list-element-definition.pas b/Task/Doubly-linked-list-Element-definition/PascalABC.NET/doubly-linked-list-element-definition.pas deleted file mode 100644 index 41706415b2..0000000000 --- a/Task/Doubly-linked-list-Element-definition/PascalABC.NET/doubly-linked-list-element-definition.pas +++ /dev/null @@ -1,4 +0,0 @@ -type Node = auto class - data: T; - prev,next: Node; -end; diff --git a/Task/Doubly-linked-list-Element-definition/Pluto/doubly-linked-list-element-definition.pluto b/Task/Doubly-linked-list-Element-definition/Pluto/doubly-linked-list-element-definition.pluto deleted file mode 100644 index 6172bb682a..0000000000 --- a/Task/Doubly-linked-list-Element-definition/Pluto/doubly-linked-list-element-definition.pluto +++ /dev/null @@ -1,9 +0,0 @@ -require "list" - -local s = dlist.of(1, 2, 3) -local n1 = s:node(1) -local n2 = s:node(2) -local n3 = s:node(3) -print($"node 1: value = {n1.value}, next = {tostring(n1.next?.value)}, prev = {tostring(n1.prev?.value)}") -print($"node 2: value = {n2.value}, next = {tostring(n2.next?.value)}, prev = {tostring(n2.prev?.value)}") -print($"node 3: value = {n3.value}, next = {tostring(n3.next?.value)}, prev = {tostring(n3.prev?.value)}") diff --git a/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition-1.rust b/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition-1.rust new file mode 100644 index 0000000000..14f822a8eb --- /dev/null +++ b/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition-1.rust @@ -0,0 +1,5 @@ +use std::collections::LinkedList; +fn main() { + // Doubly linked list containing 32-bit integers + let list = LinkedList::::new(); +} diff --git a/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition-2.rust b/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition-2.rust new file mode 100644 index 0000000000..f05fe72380 --- /dev/null +++ b/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition-2.rust @@ -0,0 +1,12 @@ +pub struct LinkedList { + head: Option>>, + tail: Option>>, + len: usize, + marker: PhantomData>>, // Indicates that we logically own a boxed (owned pointer) Node> +} + +struct Node { + next: Option>>, + prev: Option>>, + element: T, +} diff --git a/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition.rs b/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition.rs deleted file mode 100644 index 235ae6bd30..0000000000 --- a/Task/Doubly-linked-list-Element-definition/Rust/doubly-linked-list-element-definition.rs +++ /dev/null @@ -1,5 +0,0 @@ -struct Node { - next: Option>>, - prev: Option>>, - element: T, -} diff --git a/Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-1.adb b/Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-1.ada similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-1.adb rename to Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-1.ada diff --git a/Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-2.adb b/Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-2.ada similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-2.adb rename to Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-2.ada diff --git a/Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-3.adb b/Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-3.ada similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-3.adb rename to Task/Doubly-linked-list-Element-insertion/Ada/doubly-linked-list-element-insertion-3.ada diff --git a/Task/Doubly-linked-list-Element-insertion/Delphi/doubly-linked-list-element-insertion.pas b/Task/Doubly-linked-list-Element-insertion/Delphi/doubly-linked-list-element-insertion.delphi similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/Delphi/doubly-linked-list-element-insertion.pas rename to Task/Doubly-linked-list-Element-insertion/Delphi/doubly-linked-list-element-insertion.delphi diff --git a/Task/Doubly-linked-list-Element-insertion/Julia/doubly-linked-list-element-insertion.jl b/Task/Doubly-linked-list-Element-insertion/Julia/doubly-linked-list-element-insertion.julia similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/Julia/doubly-linked-list-element-insertion.jl rename to Task/Doubly-linked-list-Element-insertion/Julia/doubly-linked-list-element-insertion.julia diff --git a/Task/Doubly-linked-list-Element-insertion/Kotlin/doubly-linked-list-element-insertion.kts b/Task/Doubly-linked-list-Element-insertion/Kotlin/doubly-linked-list-element-insertion.kotlin similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/Kotlin/doubly-linked-list-element-insertion.kts rename to Task/Doubly-linked-list-Element-insertion/Kotlin/doubly-linked-list-element-insertion.kotlin diff --git a/Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-1.ml b/Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-1.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-1.ml rename to Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-1.ocaml diff --git a/Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-2.ml b/Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-2.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-2.ml rename to Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-2.ocaml diff --git a/Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-3.ml b/Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-3.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-3.ml rename to Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-3.ocaml diff --git a/Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-4.ml b/Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-4.ocaml similarity index 100% rename from Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-4.ml rename to Task/Doubly-linked-list-Element-insertion/OCaml/doubly-linked-list-element-insertion-4.ocaml diff --git a/Task/Doubly-linked-list-Element-insertion/PascalABC.NET/doubly-linked-list-element-insertion.pas b/Task/Doubly-linked-list-Element-insertion/PascalABC.NET/doubly-linked-list-element-insertion.pas deleted file mode 100644 index 3b2f5422ce..0000000000 --- a/Task/Doubly-linked-list-Element-insertion/PascalABC.NET/doubly-linked-list-element-insertion.pas +++ /dev/null @@ -1,33 +0,0 @@ -type Node = auto class - data: T; - prev,next: Node; -end; - -type - MyLinkedList = class - first, last: Node; - procedure AddLast(x: T); - begin - if first = nil then - begin - first := new Node(x,nil,nil); - last := first - end - else - begin - var p := new Node(x,last,nil); - last.next := p; - last := p; - end; - end; - procedure AddAfter(p: Node; x: T); - begin - if last = p then - AddLast(x) - else begin - var pp := new Node(x,p,p.next); - p.next := pp; - pp.prev.next := pp; - end - end; - end; diff --git a/Task/Doubly-linked-list-Element-insertion/Pluto/doubly-linked-list-element-insertion.pluto b/Task/Doubly-linked-list-Element-insertion/Pluto/doubly-linked-list-element-insertion.pluto deleted file mode 100644 index 8b25ea3df0..0000000000 --- a/Task/Doubly-linked-list-Element-insertion/Pluto/doubly-linked-list-element-insertion.pluto +++ /dev/null @@ -1,5 +0,0 @@ -require "list" - -local dll = dlist.of("A", "B") -dll:insert(2, "C") -print(dll) diff --git a/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-1.rs b/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-1.rs deleted file mode 100644 index 3c28daad17..0000000000 --- a/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-1.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![feature(linked_list_cursors)] - -pub struct Cursor<'a, T: 'a> { - index: usize, - current: Option>>, - list: &'a LinkedList, -} - -pub struct CursorMut<'a, T: 'a> { - index: usize, - current: Option>>, - list: &'a mut LinkedList, -} diff --git a/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-1.rust b/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-1.rust new file mode 100644 index 0000000000..6846a0b845 --- /dev/null +++ b/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-1.rust @@ -0,0 +1,5 @@ +use std::collections::LinkedList; +fn main() { + let mut list = LinkedList::new(); + list.push_front(8); +} diff --git a/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-2.rs b/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-2.rs deleted file mode 100644 index 7f29f65ef6..0000000000 --- a/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-2.rs +++ /dev/null @@ -1,63 +0,0 @@ -#![feature(linked_list_cursors)] - -trait CursorExt { - fn insert_between(&mut self, l: &T, elt: T, r: &T); - fn rinsert_between(&mut self, l: &T, elt: T, r: &T); -} - -impl CursorExt for std::collections::linked_list::CursorMut<'_, T> { - fn insert_between(&mut self, l: &T, elt: T, r: &T) { - // Pointing at the sentinel, move to head - if self.current().is_none() { - self.move_next(); - } - - let next = |cursor: &mut Self| { - let left = cursor.current()? == a; - let right = cursor.peek_next()? == b; - - Some(left && right) - }; - - while let Some(found) = next(self) { - if found { - self.insert_after(elt); - - return; - } - } - } - - fn rinsert_between(&mut self, l: &T, elt: T, r: &T) { - // Pointing at the sentinel, move to tail - if self.current().is_none() { - self.move_prev(); - } - - let prev = |cursor: &mut Self| { - let left = cursor.peek_prev()? == a; - let right = cursor.current()? == b; - - Some(left && right) - }; - - while let Some(found) = prev(self) { - if found { - self.insert_before(elt); - - return; - } - } - } -} - -fn element_insertion() { - use std::collections::LinkedList; - - let mut list = LinkedList::from(['A', 'B']); - - list.cursor_front_mut().insert_between(&'A', 'C', &'B'); - // list.cursor_back_mut().rinsert_between(&'A', 'C', &'B'); - - assert_eq!(list, ['A', 'C', 'B'].into()); -} diff --git a/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-2.rust b/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-2.rust new file mode 100644 index 0000000000..3b478b7869 --- /dev/null +++ b/Task/Doubly-linked-list-Element-insertion/Rust/doubly-linked-list-element-insertion-2.rust @@ -0,0 +1,52 @@ +impl Node { + fn new(v: T) -> Node { + Node {value: v, next: None, prev: Rawlink::none()} + } +} + +impl Rawlink { + fn none() -> Self { + Rawlink {p: ptr::null_mut()} + } + + fn some(n: &mut T) -> Rawlink { + Rawlink{p: n} + } +} + +impl<'a, T> From<&'a mut Link> for Rawlink> { + fn from(node: &'a mut Link) -> Self { + match node.as_mut() { + None => Rawlink::none(), + Some(ptr) => Rawlink::some(ptr) + } + } +} + + +fn link_no_prev(mut next: Box>) -> Link { + next.prev = Rawlink::none(); + Some(next) +} + +impl LinkedList { + #[inline] + fn push_front_node(&mut self, mut new_head: Box>) { + match self.list_head { + None => { + self.list_head = link_no_prev(new_head); + self.list_tail = Rawlink::from(&mut self.list_head); + } + Some(ref mut head) => { + new_head.prev = Rawlink::none(); + head.prev = Rawlink::some(&mut *new_head); + mem::swap(head, &mut new_head); + head.next = Some(new_head); + } + } + self.length += 1; + } + pub fn push_front(&mut self, elt: T) { + self.push_front_node(Box::new(Node::new(elt))); + } +} diff --git a/Task/Doubly-linked-list-Traversal/Ada/doubly-linked-list-traversal.adb b/Task/Doubly-linked-list-Traversal/Ada/doubly-linked-list-traversal.ada similarity index 100% rename from Task/Doubly-linked-list-Traversal/Ada/doubly-linked-list-traversal.adb rename to Task/Doubly-linked-list-Traversal/Ada/doubly-linked-list-traversal.ada diff --git a/Task/Doubly-linked-list-Traversal/Delphi/doubly-linked-list-traversal.pas b/Task/Doubly-linked-list-Traversal/Delphi/doubly-linked-list-traversal.delphi similarity index 100% rename from Task/Doubly-linked-list-Traversal/Delphi/doubly-linked-list-traversal.pas rename to Task/Doubly-linked-list-Traversal/Delphi/doubly-linked-list-traversal.delphi diff --git a/Task/Doubly-linked-list-Traversal/Julia/doubly-linked-list-traversal.jl b/Task/Doubly-linked-list-Traversal/Julia/doubly-linked-list-traversal.julia similarity index 100% rename from Task/Doubly-linked-list-Traversal/Julia/doubly-linked-list-traversal.jl rename to Task/Doubly-linked-list-Traversal/Julia/doubly-linked-list-traversal.julia diff --git a/Task/Doubly-linked-list-Traversal/Kotlin/doubly-linked-list-traversal.kts b/Task/Doubly-linked-list-Traversal/Kotlin/doubly-linked-list-traversal.kotlin similarity index 100% rename from Task/Doubly-linked-list-Traversal/Kotlin/doubly-linked-list-traversal.kts rename to Task/Doubly-linked-list-Traversal/Kotlin/doubly-linked-list-traversal.kotlin diff --git a/Task/Doubly-linked-list-Traversal/PascalABC.NET/doubly-linked-list-traversal.pas b/Task/Doubly-linked-list-Traversal/PascalABC.NET/doubly-linked-list-traversal.pas deleted file mode 100644 index 5e67b3187f..0000000000 --- a/Task/Doubly-linked-list-Traversal/PascalABC.NET/doubly-linked-list-traversal.pas +++ /dev/null @@ -1,9 +0,0 @@ -begin - var lst := new LinkedList(1..10); - var current := lst.First; - while current <> nil do - begin - Print(current.Value); - current := current.Next; - end; -end. diff --git a/Task/Doubly-linked-list-Traversal/Pluto/doubly-linked-list-traversal.pluto b/Task/Doubly-linked-list-Traversal/Pluto/doubly-linked-list-traversal.pluto deleted file mode 100644 index 17ae6ed4d6..0000000000 --- a/Task/Doubly-linked-list-Traversal/Pluto/doubly-linked-list-traversal.pluto +++ /dev/null @@ -1,24 +0,0 @@ -require "list" -local fmt = require "fmt" - --- Create a doubly-linked list containing the first 50 positive integers. -local d = dlist.of(range(1, 50):unpack()) - --- Now traverse from beginning to end and print them in tabular form. -local node = d:node(1) -local count = 0 -while node do - fmt.write("%4d ", node.value) - node = node.next - if ++count % 10 == 0 then print() end -end -print() - --- Now traverse them in the opposite direction and print then in tabular form. -node = d:node(d:size()) -count = 0 -while node do - fmt.write("%4d ", node.value) - node = node.prev - if ++count % 10 == 0 then print() end -end diff --git a/Task/Doubly-linked-list-Traversal/Rust/doubly-linked-list-traversal.rs b/Task/Doubly-linked-list-Traversal/Rust/doubly-linked-list-traversal.rs deleted file mode 100644 index 05a8db2f1a..0000000000 --- a/Task/Doubly-linked-list-Traversal/Rust/doubly-linked-list-traversal.rs +++ /dev/null @@ -1,15 +0,0 @@ -fn traversal() { - use std::collections::LinkedList; - - let numbers = LinkedList::from([1, 5, 7, 0, 3, 2]); - - for i in &numbers { - print!("{i} "); - } - println!(); - - for i in numbers.iter().rev() { - print!("{i} "); - } - println!(); -} diff --git a/Task/Dragon-curve/ALGOL-68/dragon-curve-4.alg b/Task/Dragon-curve/ALGOL-68/dragon-curve-4.alg index 4d180563f7..55d2235f9e 100644 --- a/Task/Dragon-curve/ALGOL-68/dragon-curve-4.alg +++ b/Task/Dragon-curve/ALGOL-68/dragon-curve-4.alg @@ -53,7 +53,7 @@ BEGIN # Dragon Curve in SVG # put( svg file, ( "'/>", newline, "", newline ) ); close( svg file ) - FI # dragon curve # ; + FI # sierpinski square # ; dragon curve( "dragon.svg", 1200, 5, 12, 400, 200 ) diff --git a/Task/Dragon-curve/ASIC/dragon-curve.asic b/Task/Dragon-curve/ASIC/dragon-curve.asic deleted file mode 100644 index 5697f69b99..0000000000 --- a/Task/Dragon-curve/ASIC/dragon-curve.asic +++ /dev/null @@ -1,130 +0,0 @@ -REM Dragon curve -DIM S@(7) -DIM C@(7) -DIM R(27) -REM SIN, COS in arrays for PI/4 multipl. -DATA 0@, 0.70711@, 1@, 0.70711@, 0@, -0.70711@, -1@, -0.70711@ -DATA 1@, 0.70711@, 0@, -0.70711@, -1@, -0.70711@, 0@, 0.70711@ -Sqrt2@ = 1.41421@ -FOR I = 0 TO 7 - READ S@(I) -NEXT I -FOR I = 0 TO 7 - READ C@(I) -NEXT I -Level = 17 -Insize@ = 256 -REM Insize@ = 2^WHOLE_NUM looks fine -X@ = 224 -Y@ = 124 -RotQPi = 0 -RQ = 1 -SCREEN 9 -GOSUB Dragon: -LOCATE 20, 1 -PRINT "Press any key to exit." -Loop: - X$=INKEY$ - IF X$="" THEN Loop: -SCREEN 0 -END - -Dragon: -RotQPi = RotQPi MOD 8 -WHILE RotQPi < 0 - RotQPi = RotQPi + 8 -WEND -IF Level <= 1 THEN - YN@ = S@(RotQPi) * Insize@ - YN@ = YN@ + Y@ - XN@ = C@(RotQPi) * Insize@ - XN@ = XN@ + X@ - GOSUB DrawLine: - X@ = XN@ - Y@ = YN@ -ELSE - Insize@ = Insize@ * Sqrt2@ - Insize@ = Insize@ / 2@ - RotQPi = RotQPi + RQ - RotQPi = RotQPi MOD 8 - WHILE RotQPi < 0 - RotQPi = RotQPi + 8 - WEND - Level = Level - 1 - R(Level) = RQ - RQ = 1 - GOSUB Dragon: - RLevelM2 = R(Level) * 2 - RotQPi = RotQPi - RLevelM2 - RotQPi = RotQPi MOD 8 - WHILE RotQPi < 0 - RotQPi = RotQPi + 8 - WEND - RQ = -1 - GOSUB Dragon: - RQ = R(Level) - RotQPi = RotQPi + RQ - RotQPi = RotQPi MOD 8 - WHILE RotQPi < 0 - RotQPi = RotQPi + 8 - WEND - Level = Level + 1 - Insize@ = Insize@ * Sqrt2@ -ENDIF -RETURN - -DrawLine: -REM Draw a line from (X@, Y@) to (XN@, YN@) -REM Coordinates decimal, but converted in PSET. -DX@ = XN@ - X@ -DY@ = YN@ - Y@ -AbsDX@ = ABS(DX@) -AbsDY@ = ABS(DY@) -IF AbsDX@ <= AbsDY@ THEN - REM More vertical line - IF AbsDY@ <= 1@ THEN - REM The same pixel or neighboring ones, because AbsDX@ <= AbsDY@ <= 1. - PSET (Y@, X@), 10 - PSET (YN@, XN@), 10 - ELSE - REM There are pixels in between. - A@ = DX@ / DY@ - IF YN@ >= Y@ THEN - D@ = 1@ - ELSE - D@ = -1@ - ENDIF - CoordY@ = Y@ - WHILE CoordY@ <= YN@ - CoordX@ = CoordY@ - Y@ - CoordX@ = A@ * CoordX@ - CoordX@ = X@ + CoordX@ - PSET (CoordY@, CoordX@), 10 - CoordY@ = CoordY@ + D@ - WEND - ENDIF -ELSE - REM More horizontal line - IF AbsDX@ <= 1@ THEN - REM The same pixel or neighboring ones, because AbsDY@ < AbsDX@ <= 1. - PSET (Y@, X@), 10 - PSET (YN@, XN@), 10 - ELSE - REM There are pixels in between. - A@ = DY@ / DX@ - IF XN@ >= X@ THEN - D@ = 1@ - ELSE - D@ = -1@ - ENDIF - CoordX@ = X@ - WHILE CoordX@ <= XN@ - CoordY@ = CoordX@ - X@ - CoordY@ = A@ * CoordY@ - CoordY@ = Y@ + CoordY@ - PSET (CoordY@, CoordX@), 10 - CoordX@ = CoordX@ + D@ - WEND - ENDIF -ENDIF -RETURN diff --git a/Task/Dragon-curve/Ada/dragon-curve-1.adb b/Task/Dragon-curve/Ada/dragon-curve-1.ada similarity index 100% rename from Task/Dragon-curve/Ada/dragon-curve-1.adb rename to Task/Dragon-curve/Ada/dragon-curve-1.ada diff --git a/Task/Dragon-curve/Ada/dragon-curve-2.adb b/Task/Dragon-curve/Ada/dragon-curve-2.ada similarity index 100% rename from Task/Dragon-curve/Ada/dragon-curve-2.adb rename to Task/Dragon-curve/Ada/dragon-curve-2.ada diff --git a/Task/Dragon-curve/Ada/dragon-curve-3.adb b/Task/Dragon-curve/Ada/dragon-curve-3.ada similarity index 100% rename from Task/Dragon-curve/Ada/dragon-curve-3.adb rename to Task/Dragon-curve/Ada/dragon-curve-3.ada diff --git a/Task/Dragon-curve/Ada/dragon-curve-4.adb b/Task/Dragon-curve/Ada/dragon-curve-4.ada similarity index 100% rename from Task/Dragon-curve/Ada/dragon-curve-4.adb rename to Task/Dragon-curve/Ada/dragon-curve-4.ada diff --git a/Task/Dragon-curve/Applesoft-BASIC/dragon-curve.basic b/Task/Dragon-curve/Applesoft-BASIC/dragon-curve.basic deleted file mode 100644 index b9f8bff709..0000000000 --- a/Task/Dragon-curve/Applesoft-BASIC/dragon-curve.basic +++ /dev/null @@ -1,37 +0,0 @@ -10 REM Dragon curve -20 DEF FN MOD(M) = M - INT(M / 8) * 8 -30 REM SIN, COS in arrays for PI/4 multipl. -40 DIM S(7), C(7) -50 QPI = ATN(1): SQ = SQR(2) -60 FOR I = 0 TO 7 -70 S(I) = SIN(I * QPI): C(I) = COS(I * QPI) -80 NEXT I -90 LEVEL = 15 -100 INSIZE = 128: REM 2^WHOLE_NUM (looks better) -110 X = 98: Y = 68 -120 ROTQPI = 0: RQ = 1 -130 DIM R(LEVEL) -140 HGR2: HCOLOR = 1 -150 GOSUB 170 -160 END -170 REM ** Dragon -180 ROTQPI = FN MOD8(ROTQPI) -190 IF LEVEL > 1 THEN GOTO 250 -200 YN = S(ROTQPI) * INSIZE + Y -210 XN = C(ROTQPI) * INSIZE + X -220 HPLOT X, Y TO XN, YN -230 X = XN: Y = YN -240 RETURN -250 INSIZE = INSIZE * SQ / 2 -260 ROTQPI = FN MOD8(ROTQPI + RQ) -270 LEVEL = LEVEL - 1 -280 R(LEVEL) = RQ: RQ = 1 -290 GOSUB 170 -300 ROTQPI = FN MOD8(ROTQPI - R(LEVEL) * 2) -310 RQ = -1 -320 GOSUB 170 -330 RQ = R(LEVEL) -340 ROTQPI = FN MOD8(ROTQPI + RQ) -350 LEVEL = LEVEL + 1 -360 INSIZE = INSIZE * SQ -370 RETURN diff --git a/Task/Dragon-curve/BASIC/dragon-curve.basic b/Task/Dragon-curve/BASIC/dragon-curve.basic index 7b94fc271c..249e1fcd18 100644 --- a/Task/Dragon-curve/BASIC/dragon-curve.basic +++ b/Task/Dragon-curve/BASIC/dragon-curve.basic @@ -12,11 +12,11 @@ SUB dragon (length AS Double, split AS Integer, d AS Double) IF split=0 THEN forward length ELSE - turn d*45 - dragon length/1.4142136, split-1, 1 - turn -d*90 - dragon length/1.4142136, split-1, -1 - turn d*45 + turn d*45 + dragon length/1.4142136, split-1, 1 + turn -d*90 + dragon length/1.4142136, split-1, -1 + turn d*45 END IF END SUB diff --git a/Task/Dragon-curve/BASIC256/dragon-curve.basic b/Task/Dragon-curve/BASIC256/dragon-curve.basic index 03e75f4098..25b1b0983a 100644 --- a/Task/Dragon-curve/BASIC256/dragon-curve.basic +++ b/Task/Dragon-curve/BASIC256/dragon-curve.basic @@ -2,15 +2,15 @@ graphsize 390,270 -level = 18 : insize = 247 # initial values -x = 92 : y = 94 # +level = 18 : insize = 247 # initial values +x = 92 : y = 94 # -iters = 2^level # total number of iterations -qiter = 510/iters # constant for computing colors -SQ = sqrt(2) : QPI = pi/4 # constants +iters = 2^level # total number of iterations +qiter = 510/iters # constant for computing colors +SQ = sqrt(2) : QPI = pi/4 # constants -rotation = 0 : iter = 0 : rq = 1.0 # state variables -dim rqs(level) # stack for rq (rotation coefficient) +rotation = 0 : iter = 0 : rq = 1.0 # state variables +dim rqs(level) # stack for rq (rotation coefficient) color white fastgraphics @@ -22,29 +22,29 @@ imgsave "Dragon_curve_BASIC-256.png", "PNG" end dragon: - if level<=0 then - yn = sin(rotation)*insize + y - xn = cos(rotation)*insize + x - if iter*2r += c; p->g += X; return; - case 1: p->r += X; p->g += c; return; - case 2: p->g += c; p->b += X; return; - case 3: p->g += X; p->b += c; return; - case 4: p->r += X; p->b += c; return; - default: - p->r += c; p->b += X; - } + switch((int)h) { + case 0: p->r += c; p->g += X; return; + case 1: p->r += X; p->g += c; return; + case 2: p->g += c; p->b += X; return; + case 3: p->g += X; p->b += c; return; + case 4: p->r += X; p->b += c; return; + default: + p->r += c; p->b += X; + } } /* string rewriting. No need to keep the string itself, just execute @@ -53,16 +53,16 @@ void h_rgb(long long x, long long y) */ void iter_string(const char * str, int d) { - long tmp; -# define LEFT tmp = -dy; dy = dx; dx = tmp -# define RIGHT tmp = dy; dy = -dx; dx = tmp - while (*str != '\0') { - switch(*(str++)) { - case 'X': if (d) iter_string("X+YF+", d - 1); continue; - case 'Y': if (d) iter_string("-FX-Y", d - 1); continue; - case '+': RIGHT; continue; - case '-': LEFT; continue; - case 'F': + long tmp; +# define LEFT tmp = -dy; dy = dx; dx = tmp +# define RIGHT tmp = dy; dy = -dx; dx = tmp + while (*str != '\0') { + switch(*(str++)) { + case 'X': if (d) iter_string("X+YF+", d - 1); continue; + case 'Y': if (d) iter_string("-FX-Y", d - 1); continue; + case '+': RIGHT; continue; + case '-': LEFT; continue; + case 'F': /* draw: increment path length; add color; move. Here * is why the code does not allow user to choose arbitrary * image size: if it's not a power of two, aliasing will @@ -71,59 +71,59 @@ void iter_string(const char * str, int d) * involves computing multiplicative order and would be a huge * bore. */ - clen ++; - h_rgb(x/scale, y/scale); - x += dx; y += dy; - continue; - } - } + clen ++; + h_rgb(x/scale, y/scale); + x += dx; y += dy; + continue; + } + } } void dragon(long leng, int depth) { - long i, d = leng / 3 + 1; - long h = leng + 3, w = leng + d * 3 / 2 + 2; + long i, d = leng / 3 + 1; + long h = leng + 3, w = leng + d * 3 / 2 + 2; - /* allocate pixel buffer */ - rgb *buf = malloc(sizeof(rgb) * w * h); - pix = malloc(sizeof(rgb *) * h); - for (i = 0; i < h; i++) - pix[i] = buf + w * i; - memset(buf, 0, sizeof(rgb) * w * h); + /* allocate pixel buffer */ + rgb *buf = malloc(sizeof(rgb) * w * h); + pix = malloc(sizeof(rgb *) * h); + for (i = 0; i < h; i++) + pix[i] = buf + w * i; + memset(buf, 0, sizeof(rgb) * w * h); /* init coords; scale up to desired; exec string */ - x = y = d; dx = leng; dy = 0; scale = 1; clen = 0; - for (i = 0; i < depth; i++) sc_up(); - iter_string("FX", depth); + x = y = d; dx = leng; dy = 0; scale = 1; clen = 0; + for (i = 0; i < depth; i++) sc_up(); + iter_string("FX", depth); - /* write color PNM file */ - unsigned char *fpix = malloc(w * h * 3); - double maxv = 0, *dbuf = (double*)buf; + /* write color PNM file */ + unsigned char *fpix = malloc(w * h * 3); + double maxv = 0, *dbuf = (double*)buf; /* find highest value among pixels; normalize image according * to it. Highest value would be at points most travelled, so * this ends up giving curve edge a nice fade -- it's more apparaent * if we increase iteration depth by one or two. */ - for (i = 3 * w * h - 1; i >= 0; i--) - if (dbuf[i] > maxv) maxv = dbuf[i]; - for (i = 3 * h * w - 1; i >= 0; i--) - fpix[i] = 255 * dbuf[i] / maxv; + for (i = 3 * w * h - 1; i >= 0; i--) + if (dbuf[i] > maxv) maxv = dbuf[i]; + for (i = 3 * h * w - 1; i >= 0; i--) + fpix[i] = 255 * dbuf[i] / maxv; - printf("P6\n%ld %ld\n255\n", w, h); - fflush(stdout); /* printf and fwrite may treat buffer differently */ - fwrite(fpix, h * w * 3, 1, stdout); + printf("P6\n%ld %ld\n255\n", w, h); + fflush(stdout); /* printf and fwrite may treat buffer differently */ + fwrite(fpix, h * w * 3, 1, stdout); } int main(int c, char ** v) { - int size, depth; + int size, depth; - depth = (c > 1) ? atoi(v[1]) : 10; - size = 1 << depth; + depth = (c > 1) ? atoi(v[1]) : 10; + size = 1 << depth; - fprintf(stderr, "size: %d depth: %d\n", size, depth); - dragon(size, depth * 2); + fprintf(stderr, "size: %d depth: %d\n", size, depth); + dragon(size, depth * 2); - return 0; + return 0; } diff --git a/Task/Dragon-curve/COBOL/dragon-curve.cob b/Task/Dragon-curve/COBOL/dragon-curve.cobol similarity index 100% rename from Task/Dragon-curve/COBOL/dragon-curve.cob rename to Task/Dragon-curve/COBOL/dragon-curve.cobol diff --git a/Task/Dragon-curve/Delphi/dragon-curve.pas b/Task/Dragon-curve/Delphi/dragon-curve.delphi similarity index 100% rename from Task/Dragon-curve/Delphi/dragon-curve.pas rename to Task/Dragon-curve/Delphi/dragon-curve.delphi diff --git a/Task/Dragon-curve/EasyLang/dragon-curve.easy b/Task/Dragon-curve/EasyLang/dragon-curve.easy index c789f92105..81f64de949 100644 --- a/Task/Dragon-curve/EasyLang/dragon-curve.easy +++ b/Task/Dragon-curve/EasyLang/dragon-curve.easy @@ -1,14 +1,15 @@ -gcolor 050 -glinewidth 0.5 +color 050 +linewidth 0.5 x = 25 y = 60 +move x y angle = 0 # -proc dragon size lev d . +proc dragon size lev d . . if lev = 0 x -= cos angle * size y += sin angle * size - glineto x y + line x y else dragon size / sqrt 2 lev - 1 1 angle -= d * 90 diff --git a/Task/Dragon-curve/Emacs-Lisp/dragon-curve.el b/Task/Dragon-curve/Emacs-Lisp/dragon-curve.l similarity index 100% rename from Task/Dragon-curve/Emacs-Lisp/dragon-curve.el rename to Task/Dragon-curve/Emacs-Lisp/dragon-curve.l diff --git a/Task/Dragon-curve/Haskell/dragon-curve-2.hs b/Task/Dragon-curve/Haskell/dragon-curve-2.hs index ddb5a8b72a..797d72b985 100644 --- a/Task/Dragon-curve/Haskell/dragon-curve-2.hs +++ b/Task/Dragon-curve/Haskell/dragon-curve-2.hs @@ -4,8 +4,8 @@ y 0 = "" y n = " - f"++(x$n-1)++" -"++(y$n-1) dragon n = - concat ["0 setlinewidth 300 400 moveto", - "/f{2 0 rlineto}def/+{90 rotate}def/-{-90 rotate}def\n", - "f", x n, " stroke showpage"] + concat ["0 setlinewidth 300 400 moveto", + "/f{2 0 rlineto}def/+{90 rotate}def/-{-90 rotate}def\n", + "f", x n, " stroke showpage"] main = putStrLn $ dragon 14 diff --git a/Task/Dragon-curve/Julia/dragon-curve.jl b/Task/Dragon-curve/Julia/dragon-curve.julia similarity index 100% rename from Task/Dragon-curve/Julia/dragon-curve.jl rename to Task/Dragon-curve/Julia/dragon-curve.julia diff --git a/Task/Dragon-curve/Kotlin/dragon-curve.kts b/Task/Dragon-curve/Kotlin/dragon-curve.kotlin similarity index 100% rename from Task/Dragon-curve/Kotlin/dragon-curve.kts rename to Task/Dragon-curve/Kotlin/dragon-curve.kotlin diff --git a/Task/Dragon-curve/Locomotive-Basic/dragon-curve.basic b/Task/Dragon-curve/Locomotive-Basic/dragon-curve.basic deleted file mode 100644 index 6cf4caa101..0000000000 --- a/Task/Dragon-curve/Locomotive-Basic/dragon-curve.basic +++ /dev/null @@ -1,29 +0,0 @@ -100 MODE 2 -110 DIM s(7),c(7) -120 qpi=ATN(1):sq2=SQR(2) -130 FOR i=0 TO 7 -140 s(i)=SIN(i*qpi) -150 c(i)=COS(i*qpi) -160 NEXT -170 level=11 -180 DIM r(level) -190 insize=128*2 -200 MOVE 200,150 -210 rotqpi=0:rq=1 -220 GOSUB 250 -230 END -240 ' -250 IF level=1 THEN DRAWR c(rotqpi)*insize,s(rotqpi)*insize:RETURN -260 insize=insize*sq2/2 -270 rotqpi=(rotqpi+rq) AND 7 -280 level=level-1 -290 r(level)=rq:rq=1 -300 GOSUB 250 -310 rotqpi=(rotqpi-r(level)*2) AND 7 -320 rq=-1 -330 GOSUB 250 -340 rq=r(level) -350 rotqpi=(rotqpi+rq) AND 7 -360 level=level+1 -370 insize=insize*sq2 -380 RETURN diff --git a/Task/Dragon-curve/Metafont/dragon-curve.metafont b/Task/Dragon-curve/Metafont/dragon-curve.metafont index 446a318703..a2061d786f 100644 --- a/Task/Dragon-curve/Metafont/dragon-curve.metafont +++ b/Task/Dragon-curve/Metafont/dragon-curve.metafont @@ -7,10 +7,10 @@ beginchar("D", 25pt#, 25pt#, 0pt#); for i = 1 upto dragoniter: for v = 1 step mstep until (2-mstep): if unknown z[v+mstep]: - pair t; - t := .7071[ z[v], z[v+2mstep] ]; - z[v+mstep] = t rotatedaround(z[v], 45sg); - sg := -1*sg; + pair t; + t := .7071[ z[v], z[v+2mstep] ]; + z[v+mstep] = t rotatedaround(z[v], 45sg); + sg := -1*sg; fi endfor mstep := mstep/2; diff --git a/Task/Dragon-curve/Nascom-BASIC/dragon-curve.basic b/Task/Dragon-curve/Nascom-BASIC/dragon-curve.basic deleted file mode 100644 index 2f42679f86..0000000000 --- a/Task/Dragon-curve/Nascom-BASIC/dragon-curve.basic +++ /dev/null @@ -1,54 +0,0 @@ -10 REM Dragon curve -20 REM SIN, COS in arrays for PI/4 multipl. -30 DIM S(7), C(7) -40 QPI=ATN(1):SQ=SQR(2) -50 FOR I=0 TO 7 -60 S(I)=SIN(I*QPI):C(I)=COS(I*QPI) -70 NEXT I -80 LEVEL=15 -90 INSIZE=32:REM 2^WHOLE_NUM (looks better) -100 X=34:Y=16 -110 ROTQPI=0:RQ=1 -120 DIM R(LEVEL) -130 CLS -140 GOSUB 160 -150 END -160 REM ** Dragon -170 ROTQPI=ROTQPI AND 7 -180 IF LEVEL>1 THEN GOTO 240 -190 YN=S(ROTQPI)*INSIZE+Y -200 XN=C(ROTQPI)*INSIZE+X -210 GOSUB 370 -220 X=XN:Y=YN -230 RETURN -240 INSIZE=INSIZE*SQ/2 -250 ROTQPI=(ROTQPI+RQ)AND 7 -260 LEVEL=LEVEL-1 -270 R(LEVEL)=RQ:RQ=1 -280 GOSUB 160 -290 ROTQPI=(ROTQPI-R(LEVEL)*2)AND 7 -300 RQ=-1 -310 GOSUB 160 -320 RQ=R(LEVEL) -330 ROTQPI=(ROTQPI+RQ)AND 7 -340 LEVEL=LEVEL+1 -350 INSIZE=INSIZE*SQ -360 RETURN -370 REM ** Draw a line from (X, Y) to (XN, YN) -380 IF ABS(XN-X)>1 OR ABS(YN-Y)>1 THEN 400 -390 SET(X,Y):SET(XN,YN):RETURN -400 IF ABS(XN-X)>ABS(YN-Y) THEN 480 -410 REM More vertical line -420 A=(XN-X)/(YN-Y) -430 IF YN>Y THEN D=1 ELSE D=-1 -440 FOR YC=Y TO YN STEP D -450 SET(X+A*(YC-Y),YC) -460 NEXT YC -470 RETURN -480 REM More horizontal line -490 A=(YN-Y)/(XN-X) -500 IF XN>X THEN D=1 ELSE D=-1 -510 FOR XC=X TO XN STEP D -520 SET(XC,Y+A*(XC-X)) -530 NEXT XC -540 RETURN diff --git a/Task/Dragon-curve/OCaml/dragon-curve-1.ml b/Task/Dragon-curve/OCaml/dragon-curve-1.ocaml similarity index 100% rename from Task/Dragon-curve/OCaml/dragon-curve-1.ml rename to Task/Dragon-curve/OCaml/dragon-curve-1.ocaml diff --git a/Task/Dragon-curve/OCaml/dragon-curve-2.ml b/Task/Dragon-curve/OCaml/dragon-curve-2.ocaml similarity index 100% rename from Task/Dragon-curve/OCaml/dragon-curve-2.ml rename to Task/Dragon-curve/OCaml/dragon-curve-2.ocaml diff --git a/Task/Dragon-curve/PascalABC.NET/dragon-curve.pas b/Task/Dragon-curve/PascalABC.NET/dragon-curve.pas deleted file mode 100644 index 7ac53bfab2..0000000000 --- a/Task/Dragon-curve/PascalABC.NET/dragon-curve.pas +++ /dev/null @@ -1,34 +0,0 @@ -uses Turtle; - -var - Atom,FStr,XStr,YStr: string; - angle,len,x0,y0: real; - n: integer; - -procedure Init1; // Dragon -begin - (Atom,FStr,XStr,YStr) := ('fx','f','x+yf+','-fx-y'); - (angle,len,n,x0,y0) := (90,3,15,300,450); -end; - -procedure RunStr(s: string; n: integer); -begin - foreach var c in s do - case c of - '+': Turn(angle); - '-': Turn(-angle); - 'f','F': if n>0 then RunStr(FStr,n-1) else Forw(len); - 'x','X': if n>0 then RunStr(XStr,n-1); - 'y','Y': if n>0 then RunStr(YStr,n-1); - else Print('error') - end; -end; - -begin - Init1; - ToPoint(x0,y0); - SetWidth(0.5); - Down; - RunStr(Atom,n); - Up; -end. diff --git a/Task/Dragon-curve/Pluto/dragon-curve.pluto b/Task/Dragon-curve/Pluto/dragon-curve.pluto deleted file mode 100644 index 52840da6b5..0000000000 --- a/Task/Dragon-curve/Pluto/dragon-curve.pluto +++ /dev/null @@ -1,43 +0,0 @@ -require "bitmap" -require "table2" - -local bmp = bitmap.of(800, 600, color.black, "Dragon curve") - -local function get_sequence(iterations) - local turn_sequence = {} - for _ = 1, iterations do - local copy = {} - copy:join(turn_sequence) - if #copy > 1 then copy:reverse() end - turn_sequence:insert(1) - copy:foreach(|i| -> turn_sequence:insert(-i)) - end - return turn_sequence -end - -local function dragon(turns, starting_angle, side) - local col = pico.blue - local angle = starting_angle - local x1 = 230 - local y1 = 350 - local x2 = x1 + math.trunc(math.cos(angle) * side) - local y2 = y1 + math.trunc(math.sin(angle) * side) - bmp:line(x1, y1, x2, y2, col) - x1 = x2 - y1 = y2 - for turns as turn do - angle += turn * math.pi / 2 - x2 = x1 + math.trunc(math.cos(angle) * side) - y2 = y1 + math.trunc(math.sin(angle) * side) - bmp:line(x1, y1, x2, y2, col) - x1 = x2 - y1 = y2 - end -end - -local iter = 14 -local turns = get_sequence(iter) -local starting_angle = -iter * math.pi / 4 -local side = 400 / (2 ^ (iter / 2)) -dragon(turns, starting_angle, side) -bmp:view() diff --git a/Task/Dragon-curve/Prolog/dragon-curve.pro b/Task/Dragon-curve/Prolog/dragon-curve.pro index fa667e6ce7..cca7a2d174 100644 --- a/Task/Dragon-curve/Prolog/dragon-curve.pro +++ b/Task/Dragon-curve/Prolog/dragon-curve.pro @@ -1,60 +1,60 @@ dragonCurve(N) :- - dcg_dg(N, [left], DCL, []), - Side = 4, - Angle is -N * (pi/4), - dcg_computePath(Side, Angle, DCL, point(180,400), P, []), - new(D, window('Dragon Curve')), - send(D, size, size(800,600)), - new(Path, path(poly)), - send_list(Path, append, P), - send(D, display, Path), - send(D, open). + dcg_dg(N, [left], DCL, []), + Side = 4, + Angle is -N * (pi/4), + dcg_computePath(Side, Angle, DCL, point(180,400), P, []), + new(D, window('Dragon Curve')), + send(D, size, size(800,600)), + new(Path, path(poly)), + send_list(Path, append, P), + send(D, display, Path), + send(D, open). % compute the list of points of the Dragon Curve dcg_computePath(Side, Angle, [left | DCT], point(X1, Y1)) --> - [point(X1, Y1)], - { X2 is X1 + Side * cos(Angle), - Y2 is Y1 + Side * sin(Angle), - Angle1 is Angle + pi / 2 - }, - dcg_computePath(Side, Angle1, DCT, point(X2, Y2)). + [point(X1, Y1)], + { X2 is X1 + Side * cos(Angle), + Y2 is Y1 + Side * sin(Angle), + Angle1 is Angle + pi / 2 + }, + dcg_computePath(Side, Angle1, DCT, point(X2, Y2)). dcg_computePath(Side, Angle, [right | DCT], point(X1, Y1)) --> - [point(X1, Y1)], - { X2 is X1 + Side * cos(Angle), - Y2 is Y1 + Side * sin(Angle), - Angle1 is Angle - pi / 2 - }, - dcg_computePath(Side, Angle1, DCT, point(X2, Y2)). + [point(X1, Y1)], + { X2 is X1 + Side * cos(Angle), + Y2 is Y1 + Side * sin(Angle), + Angle1 is Angle - pi / 2 + }, + dcg_computePath(Side, Angle1, DCT, point(X2, Y2)). dcg_computePath(_Side, _Angle, [], point(X1, Y1)) --> - [ point(X1, Y1)]. + [ point(X1, Y1)]. % compute the list of the "turns" of the Dragon Curve dcg_dg(1, L) --> L. dcg_dg(N, L) --> - {dcg_dg(L, L1, []), - N1 is N - 1}, - dcg_dg(N1, L1). + {dcg_dg(L, L1, []), + N1 is N - 1}, + dcg_dg(N1, L1). % one interation of the process dcg_dg(L) --> - L, - [left], - inverse(L). + L, + [left], + inverse(L). inverse([H | T]) --> - inverse(T), - inverse(H). + inverse(T), + inverse(H). inverse([]) --> []. inverse(left) --> - [right]. + [right]. inverse(right) --> - [left]. + [left]. diff --git a/Task/Dragon-curve/Raku/dragon-curve.raku b/Task/Dragon-curve/Raku/dragon-curve.raku index 09ffdd7994..65d40f60b8 100644 --- a/Task/Dragon-curve/Raku/dragon-curve.raku +++ b/Task/Dragon-curve/Raku/dragon-curve.raku @@ -3,7 +3,7 @@ use SVG; role Lindenmayer { has %.rules; method succ { - self.comb.map( { %!rules{$^c} // $c } ).join but Lindenmayer(%!rules) + self.comb.map( { %!rules{$^c} // $c } ).join but Lindenmayer(%!rules) } } diff --git a/Task/Dragon-curve/Rebol/dragon-curve.rebol b/Task/Dragon-curve/Rebol/dragon-curve.rebol deleted file mode 100644 index 43e3817fca..0000000000 --- a/Task/Dragon-curve/Rebol/dragon-curve.rebol +++ /dev/null @@ -1,67 +0,0 @@ -Rebol [ - title: "Rosetta code: Dragon curve" - file: %Dragon_curve.r3 - url: https://rosettacode.org/wiki/Dragon_curve - needs: 3.0.0 -] - -bit-count: function [n [integer!]] [ - count: 0 - while [n > 0] [ - count: count + (n & 1) ;; add lowest bit - n: n >> 1 ;; logical right-shift by 1 - ] - count -] - -dragon-curve: function [steps [integer!]][ - ;; Initialize state - x: y: minx: maxx: miny: maxy: 0 - data: make map! [] - - ;; Loop for each step - for i 0 steps 1 [ - ;; Convert iteration number to direction using Gray code modulo 4 - dir: (bit-count (i xor (i >> 1))) % 4 - - ;; Compute next coordinates - nx: x + pickz [1 0 -1 0] dir - ny: y + pickz [0 1 0 -1] dir - - ;; Determine outbound/inbound bits - set [ob: ib:] pickz [[8 4] [2 1] [4 8] [1 2]] dir - - ;; Update cell at current position - key-cur: as-pair y x - data/:key-cur: ob or any [data/:key-cur 0] - - ;; Update cell at next position - key-nxt: as-pair ny nx - data/:key-nxt: ib or any [data/:key-nxt 0] - - ;; Update bounding box - minx: min minx nx - maxx: max maxx nx - miny: min miny ny - maxy: max maxy ny - - ;; Advance position - x: nx - y: ny - ] - - ;; Draw the result - chars: " ╵╷│╴┘┐┤╶└┌├─┴┬┼" - for y miny maxy 1 [ - line: clear "" - for x minx maxx 1 [ - key: as-pair y x - val: 1 + any [data/:key 0] - append line chars/:val - ] - print line - ] -] - -;; Draw result: -dragon-curve 511 diff --git a/Task/Dragon-curve/Rust/dragon-curve.rs b/Task/Dragon-curve/Rust/dragon-curve.rust similarity index 100% rename from Task/Dragon-curve/Rust/dragon-curve.rs rename to Task/Dragon-curve/Rust/dragon-curve.rust diff --git a/Task/Dragon-curve/SequenceL/dragon-curve-1.sequencel b/Task/Dragon-curve/SequenceL/dragon-curve-1.sequencel index e1905a0651..fe187b5084 100644 --- a/Task/Dragon-curve/SequenceL/dragon-curve-1.sequencel +++ b/Task/Dragon-curve/SequenceL/dragon-curve-1.sequencel @@ -4,35 +4,35 @@ import ; initPoints := [[0,0],[1,0]]; f1(point(1)) := - let - matrix := [[cos(45 * (pi/180)), -sin(45 * (pi/180))], - [sin(45 * (pi/180)), cos(45 * (pi/180))]]; - in - head(transpose((1/sqrt(2)) * matmul(matrix, transpose([point])))); - + let + matrix := [[cos(45 * (pi/180)), -sin(45 * (pi/180))], + [sin(45 * (pi/180)), cos(45 * (pi/180))]]; + in + head(transpose((1/sqrt(2)) * matmul(matrix, transpose([point])))); + f2(point(1)) := - let - matrix := [[cos(135 * (pi/180)), -sin(135 * (pi/180))], - [sin(135 * (pi/180)), cos(135 * (pi/180))]]; - in - head(transpose((1/sqrt(2)) * matmul(matrix, transpose([point])))) + initPoints[2]; + let + matrix := [[cos(135 * (pi/180)), -sin(135 * (pi/180))], + [sin(135 * (pi/180)), cos(135 * (pi/180))]]; + in + head(transpose((1/sqrt(2)) * matmul(matrix, transpose([point])))) + initPoints[2]; matmul(X(2),Y(2))[i,j] := sum(X[i,all]*Y[all,j]); entry(steps(0), maxX(0), maxY(0)) := - let - scaleX := maxX / 1.5; - scaleY := maxY; - - shiftX := maxX / 3.0 / 1.5; - shiftY := maxY / 3.0; - in - round(run(steps, initPoints) * [scaleX, scaleY] + [shiftX, shiftY]); + let + scaleX := maxX / 1.5; + scaleY := maxY; + + shiftX := maxX / 3.0 / 1.5; + shiftY := maxY / 3.0; + in + round(run(steps, initPoints) * [scaleX, scaleY] + [shiftX, shiftY]); run(steps(0), result(2)) := - let - next := f1(result) ++ f2(result); - in - result when steps <= 0 - else - run(steps - 1, next); + let + next := f1(result) ++ f2(result); + in + result when steps <= 0 + else + run(steps - 1, next); diff --git a/Task/Dragon-curve/SequenceL/dragon-curve-2.sequencel b/Task/Dragon-curve/SequenceL/dragon-curve-2.sequencel index aa6cb2eec4..f60e233fdc 100644 --- a/Task/Dragon-curve/SequenceL/dragon-curve-2.sequencel +++ b/Task/Dragon-curve/SequenceL/dragon-curve-2.sequencel @@ -9,66 +9,66 @@ using namespace std; int main(int argc, char** argv) { - int threads = 0; - if(argc > 1) threads = atoi(argv[1]); - Sequence< Sequence > result; + int threads = 0; + if(argc > 1) threads = atoi(argv[1]); + Sequence< Sequence > result; - sl_init(threads); + sl_init(threads); - int width = 500; - if(argc > 2) width = atoi(argv[2]); - int height = width; - if(argc > 3) height = atoi(argv[3]); + int width = 500; + if(argc > 2) width = atoi(argv[2]); + int height = width; + if(argc > 3) height = atoi(argv[3]); - CImg visu(width, height, 1, 3, 0); - CImgDisplay draw_disp(visu); + CImg visu(width, height, 1, 3, 0); + CImgDisplay draw_disp(visu); - SLTimer compTimer; - SLTimer drawTimer; + SLTimer compTimer; + SLTimer drawTimer; - int steps = 0; - int maxSteps = 18; - if(argc > 4) maxSteps = atoi(argv[4]); - int waitTime = 200; - if(argc > 5) waitTime = atoi(argv[5]); - bool adding = true; - while(!draw_disp.is_closed()) - { - compTimer.start(); - sl_entry(steps, width, height, threads, result); - compTimer.stop(); + int steps = 0; + int maxSteps = 18; + if(argc > 4) maxSteps = atoi(argv[4]); + int waitTime = 200; + if(argc > 5) waitTime = atoi(argv[5]); + bool adding = true; + while(!draw_disp.is_closed()) + { + compTimer.start(); + sl_entry(steps, width, height, threads, result); + compTimer.stop(); - drawTimer.start(); - visu.fill(0); + drawTimer.start(); + visu.fill(0); - double thirdSize = ((result.size() / 2.0) / 3.0); - thirdSize = (int)thirdSize == 0 ? 1 : thirdSize; + double thirdSize = ((result.size() / 2.0) / 3.0); + thirdSize = (int)thirdSize == 0 ? 1 : thirdSize; - for(int i = 1; i <= result.size(); i+=2) - { - unsigned char shade = (unsigned char)(255 * ((((i / 2) % (int)thirdSize) / thirdSize)) + 0.5); + for(int i = 1; i <= result.size(); i+=2) + { + unsigned char shade = (unsigned char)(255 * ((((i / 2) % (int)thirdSize) / thirdSize)) + 0.5); - unsigned char r = i / 2 <= thirdSize ? shade : 255/2; - unsigned char g = thirdSize < i / 2 && i / 2 <= thirdSize * 2 ? shade : 255/2; - unsigned char b = thirdSize * 2 < i / 2 && i / 2 <= thirdSize * 3 ? shade : 255/2; - const unsigned char color[] = {r,g,b}; + unsigned char r = i / 2 <= thirdSize ? shade : 255/2; + unsigned char g = thirdSize < i / 2 && i / 2 <= thirdSize * 2 ? shade : 255/2; + unsigned char b = thirdSize * 2 < i / 2 && i / 2 <= thirdSize * 3 ? shade : 255/2; + const unsigned char color[] = {r,g,b}; - visu.draw_line(result[i][1], result[i][2], 0, result[i + 1][1], result[i + 1][2], 0, color); - } - visu.display(draw_disp); - drawTimer.stop(); + visu.draw_line(result[i][1], result[i][2], 0, result[i + 1][1], result[i + 1][2], 0, color); + } + visu.display(draw_disp); + drawTimer.stop(); - draw_disp.set_title("Dragon Curve in SequenceL: %d Threads | Steps: %d | CompTime: %f Seconds | Draw Time: %f Seconds", threads, steps, drawTimer.getTime(), compTimer.getTime()); + draw_disp.set_title("Dragon Curve in SequenceL: %d Threads | Steps: %d | CompTime: %f Seconds | Draw Time: %f Seconds", threads, steps, drawTimer.getTime(), compTimer.getTime()); - if(adding) steps++; - else steps--; + if(adding) steps++; + else steps--; - if(steps <= 0) adding = true; - else if(steps >= maxSteps) adding = false; + if(steps <= 0) adding = true; + else if(steps >= maxSteps) adding = false; - draw_disp.wait(waitTime); - } + draw_disp.wait(waitTime); + } - sl_done(); - return 0; + sl_done(); + return 0; } diff --git a/Task/Dragon-curve/Tcl/dragon-curve.tcl b/Task/Dragon-curve/Tcl/dragon-curve.tcl index e662357b4b..1dcd79c6ad 100644 --- a/Task/Dragon-curve/Tcl/dragon-curve.tcl +++ b/Task/Dragon-curve/Tcl/dragon-curve.tcl @@ -15,14 +15,14 @@ proc forward {len} { proc dragon {len split {d 1}} { global r2 coords if {$split == 0} { - forward $len - return + forward $len + return } # This next part is only necessary to allow the illustration of progress if {$split == 10 && [llength $::coords]>2} { - .c coords dragon $::coords - update + .c coords dragon $::coords + update } incr split -1 diff --git a/Task/Dragon-curve/V-(Vlang)/dragon-curve.v b/Task/Dragon-curve/V-(Vlang)/dragon-curve.v deleted file mode 100644 index eeb9bfa2ce..0000000000 --- a/Task/Dragon-curve/V-(Vlang)/dragon-curve.v +++ /dev/null @@ -1,78 +0,0 @@ -import gg -import gx -import math - -struct App { - mut: - iter int - turns []int - start_angle f64 - side f64 - angle f64 - x1 int - y1 int - x2 int - y2 int - col gx.Color - ctx gg.Context -} - -fn get_sequence(iterations int) []int { - mut turn_sequence := []int{} - for _ in 0 .. iterations { - mut copy := turn_sequence.clone() - if copy.len > 1 { copy = copy.reverse() } - turn_sequence << 1 - for i in copy { - turn_sequence << -i - } - } - return turn_sequence -} - -fn (mut app App) dragon() { - app.angle = app.start_angle - app.x1 = 230 - app.y1 = 350 - app.x2 = app.x1 + int(math.cos(app.angle) * app.side) - app.y2 = app.y1 + int(math.sin(app.angle) * app.side) - app.ctx.draw_line(app.x1, app.y1, app.x2, app.y2, app.col) - app.x1 = app.x2 - app.y1 = app.y2 - for turn in app.turns { - app.angle += f64(turn) * math.pi / 2 - app.x2 = app.x1 + int(math.cos(app.angle) * app.side) - app.y2 = app.y1 + int(math.sin(app.angle) * app.side) - app.ctx.draw_line(app.x1, app.y1, app.x2, app.y2, app.col) - app.x1 = app.x2 - app.y1 = app.y2 - } -} - -fn (mut app App) init() { - app.iter = 14 - app.turns = get_sequence(app.iter) - app.start_angle = -f64(app.iter) * math.pi / 4 - app.side = 400.0 / math.pow(2, f64(app.iter) / 2) - app.col = gx.blue -} - -fn frame(mut app App) { - app.ctx.begin() - app.dragon() - app.ctx.end() -} - -fn main() { - mut app := App{} - mut context := gg.new_context( - width: 800 - height: 600 - window_title: 'Dragon curve' - user_data: &app - frame_fn: frame - bg_color: gx.white - ) - app.init() - context.run() -} diff --git a/Task/Dragon-curve/VBScript/dragon-curve.vbs b/Task/Dragon-curve/VBScript/dragon-curve.vb similarity index 100% rename from Task/Dragon-curve/VBScript/dragon-curve.vbs rename to Task/Dragon-curve/VBScript/dragon-curve.vb diff --git a/Task/Dragon-curve/Vedit-macro-language/dragon-curve.vedit b/Task/Dragon-curve/Vedit-macro-language/dragon-curve.vedit index f8755cfac0..45025fd0ee 100644 --- a/Task/Dragon-curve/Vedit-macro-language/dragon-curve.vedit +++ b/Task/Dragon-curve/Vedit-macro-language/dragon-curve.vedit @@ -1,16 +1,16 @@ File_Open("|(USER_MACRO)\dragon.bmp", OVERWRITE+NOEVENT) BOF Del_Char(ALL) -#11 = 640 // width of the image -#12 = 480 // height of the image +#11 = 640 // width of the image +#12 = 480 // height of the image Call("CREATE_BMP") -#1 = 384 // dx -#2 = 0 // dy -#3 = 6 // depth of recursion -#4 = 1 // flip -#5 = 150 // x -#6 = 300 // y +#1 = 384 // dx +#2 = 0 // dy +#3 = 6 // depth of recursion +#4 = 1 // flip +#5 = 150 // x +#6 = 300 // y Call("DRAGON") Buf_Close(NOMSG) @@ -29,15 +29,15 @@ if (#3 == 0) { #2 /= 2 #3-- if (#4) { - Num_Push(1,4) #4=1; #7=#1; #1=#2; #2=-#7; Call("DRAGON") Num_Pop(1,4) - Num_Push(1,4) #4=0; Call("DRAGON") Num_Pop(1,4) - Num_Push(1,4) #4=1; #7=#1; #1=-#2; #2=#7; Call("DRAGON") Num_Pop(1,4) - Num_Push(1,4) #4=0; Call("DRAGON") Num_Pop(1,4) + Num_Push(1,4) #4=1; #7=#1; #1=#2; #2=-#7; Call("DRAGON") Num_Pop(1,4) + Num_Push(1,4) #4=0; Call("DRAGON") Num_Pop(1,4) + Num_Push(1,4) #4=1; #7=#1; #1=-#2; #2=#7; Call("DRAGON") Num_Pop(1,4) + Num_Push(1,4) #4=0; Call("DRAGON") Num_Pop(1,4) } else { - Num_Push(1,4) #4=1; Call("DRAGON") Num_Pop(1,4) - Num_Push(1,4) #4=0; #7=#1; #1=-#2; #2=#7; Call("DRAGON") Num_Pop(1,4) - Num_Push(1,4) #4=1; Call("DRAGON") Num_Pop(1,4) - Num_Push(1,4) #4=0; #7=#1; #1=#2; #2=-#7; Call("DRAGON") Num_Pop(1,4) + Num_Push(1,4) #4=1; Call("DRAGON") Num_Pop(1,4) + Num_Push(1,4) #4=0; #7=#1; #1=-#2; #2=#7; Call("DRAGON") Num_Pop(1,4) + Num_Push(1,4) #4=1; Call("DRAGON") Num_Pop(1,4) + Num_Push(1,4) #4=0; #7=#1; #1=#2; #2=-#7; Call("DRAGON") Num_Pop(1,4) } } return @@ -53,7 +53,7 @@ while (#1 || #2 ) { #5 += #21; #1 -= #21 #6 += #22; #2 -= #22 Goto_Pos(1078 + #5 + #6*#11) - IC(255, OVERWRITE) // plot a pixel + IC(255, OVERWRITE) // plot a pixel } return @@ -64,19 +64,19 @@ return :CREATE_BMP: // BITMAPFILEHEADER: -IT("BM") // bfType -#10 = 1078+#11*#12 // file size +IT("BM") // bfType +#10 = 1078+#11*#12 // file size Call("INS_4BYTES") -IC(0, COUNT, 4) // reserved -#10 = 1078; Call("INS_4BYTES") // offset to bitmap data +IC(0, COUNT, 4) // reserved +#10 = 1078; Call("INS_4BYTES") // offset to bitmap data // BITMAPINFOHEADER: -#10 = 40; Call("INS_4BYTES") // size of BITMAPINFOHEADER -#10 = #11; Call("INS_4BYTES") // width of image -#10 = #12; Call("INS_4BYTES") // height of image -IC(1) IC(0) // number of bitplanes = 1 -IC(8) IC(0) // bits/pixel = 8 -IC(0, COUNT, 24) // compression, number of colors etc. +#10 = 40; Call("INS_4BYTES") // size of BITMAPINFOHEADER +#10 = #11; Call("INS_4BYTES") // width of image +#10 = #12; Call("INS_4BYTES") // height of image +IC(1) IC(0) // number of bitplanes = 1 +IC(8) IC(0) // bits/pixel = 8 +IC(0, COUNT, 24) // compression, number of colors etc. // Color table - create greyscale palette for (#1 = 0; #1 < 256; #1++) { @@ -96,5 +96,5 @@ return for (#1 = 0; #1 < 4; #1++) { Ins_Char(#10 & 0xff) #10 = #10 >> 8 -} +} return diff --git a/Task/Dragon-curve/YAMLScript/dragon-curve.ys b/Task/Dragon-curve/YAMLScript/dragon-curve.ys deleted file mode 100644 index a2d4b04861..0000000000 --- a/Task/Dragon-curve/YAMLScript/dragon-curve.ys +++ /dev/null @@ -1,29 +0,0 @@ -!YS-v0 - -defn main(steps=511): - data [minx maxx miny maxy] =: - loop i 0 [x y], [0 0], data {}, [minx maxx miny maxy] [0 0 0 0]: - dir =: i-to-dir(i) - nx ny =: + - [(x + condp(== dir 0 1 2 -1 0)) - (y + condp(== dir 1 1 3 -1 0))] - ob ib =: dir.nth([[8 4][2 1][4 8][1 2]]) - data =: update-in(data [y x] safe-bit-or ob) - .update-in([ny nx] safe-bit-or ib) - bbox =: + - [min(minx nx) max(maxx nx) - min(miny ny) max(maxy ny)] - if i < steps: - recur: i.++, [nx ny], data, bbox - vector: data bbox - - each y (miny .. maxy): - say: !:join - each x (minx .. maxx): - get-in(data [y x] 0).nth(" ╵╷│╴┘┐┤╶└┌├─┴┬┼") - -defn i-to-dir(n): - n.bit-xor(bit-shift-right(n 1)):Long/bitCount % 4 - -defn safe-bit-or(v bit): - (v || 0).bit-or(bit) diff --git a/Task/Dragon-curve/Yabasic/dragon-curve-1.basic b/Task/Dragon-curve/Yabasic/dragon-curve-1.basic index 9d47421a36..1d6082d45d 100644 --- a/Task/Dragon-curve/Yabasic/dragon-curve-1.basic +++ b/Task/Dragon-curve/Yabasic/dragon-curve-1.basic @@ -15,30 +15,30 @@ clear window dragon() sub dragon() - if level<=0 then - yn = sin(rotation)*insize + y - xn = cos(rotation)*insize + x - if iter*20 THEN 230 -210 PLOT XC,YC:DRAWTO HX,HY -220 PLOT XC,YC:DRAWTO MX,MY -230 PLOT XC,YC:DRAWTO SX,SY -240 GOSUB 500 -250 COLOR 2 -260 PLOT XC,YC:DRAWTO HX,HY -270 PLOT XC,YC:DRAWTO MX,MY -280 COLOR 1 -290 PLOT XC,YC:DRAWTO SX,SY -300 JIFFIES=256*PEEK(19)+PEEK(20) -310 NSEC=INT(JIFFIES/FPS):IF NSEC=60 THEN GOSUB 400:GOTO 100 -320 IF NSEC>SS THEN SS=NSEC:GOTO 2OO -330 GOTO 300 -400 REM INCREASE MINUTE AND HOUR -410 MM=MM+1 -420 IF MM=60 THEN MM=0:HH=HH+1 -430 IF HH=24 THEN HH=0 -440 REM DISABLE SCREEN SAVER/ATTRACT MODE -450 POKE 77,0 -460 RETURN -500 IF SS>0 THEN 550:REM CALCULATE X AND Y POSITIONS OF HANDS -510 HX=XC+R*SIN(30*HH+MM/2)*0.5 -520 HY=YC-R*COS(30*HH+MM/2)*0.5 -530 MX=XC+R*SIN(6*MM) -540 MY=YC-R*COS(6*MM) -550 SX=XC+R*SIN(6*SS) -560 SY=YC-R*COS(6*SS) -570 RETURN -800 REM DRAW CLOCK FACE -810 COLOR 3 -820 FOR I=30 TO 360 STEP 30 -830 PLOT XC+RF*SIN(I),YC-RF*COS(I) -840 NEXT I -850 RETURN diff --git a/Task/Draw-a-clock/Batch-File/draw-a-clock.bat b/Task/Draw-a-clock/Batch-File/draw-a-clock.bat index ae8d23ce99..42149ed54e 100644 --- a/Task/Draw-a-clock/Batch-File/draw-a-clock.bat +++ b/Task/Draw-a-clock/Batch-File/draw-a-clock.bat @@ -7,7 +7,7 @@ title Sample Batch Clock setlocal enabledelayedexpansion chcp 65001 - ::Set the characters... + ::Set the characters... set "#0_1=█████" set "#0_2=█ █" set "#0_3=█ █" @@ -75,26 +75,26 @@ set "#C_4=█" set "#C_5= " :clock_loop - ::Clear display [leaving a whitespace]... + ::Clear display [leaving a whitespace]... for /l %%C in (1,1,5) do set "display%%C= " - ::Get current time [all spaces will be replaced to zero]... - ::Also, all colons will be replaced to "C" because colon has a function in variables... + ::Get current time [all spaces will be replaced to zero]... + ::Also, all colons will be replaced to "C" because colon has a function in variables... set "curr_time=%time: =0%" set "curr_time=%curr_time::=C%" - ::Process the numbers to display [we will now use the formats we SET above]... + ::Process the numbers to display [we will now use the formats we SET above]... for /l %%T in (0,1,7) do ( - ::Check for each number and colons... - for %%N in (0 1 2 3 4 5 6 7 8 9 C) do ( - if "!curr_time:~%%T,1!"=="%%N" ( - ::Now, barbeque each formatted char in 5 rows... - for /l %%D in (1,1,5) do set "display%%D=!display%%D!!#%%N_%%D! " - ) - ) + ::Check for each number and colons... + for %%N in (0 1 2 3 4 5 6 7 8 9 C) do ( + if "!curr_time:~%%T,1!"=="%%N" ( + ::Now, barbeque each formatted char in 5 rows... + for /l %%D in (1,1,5) do set "display%%D=!display%%D!!#%%N_%%D! " + ) + ) ) - ::Refresh the clock... + ::Refresh the clock... cls echo. echo.[%display1%] diff --git a/Task/Draw-a-clock/C++/draw-a-clock.cpp b/Task/Draw-a-clock/C++/draw-a-clock.cpp index 176b1c771b..95f8885642 100644 --- a/Task/Draw-a-clock/C++/draw-a-clock.cpp +++ b/Task/Draw-a-clock/C++/draw-a-clock.cpp @@ -19,15 +19,15 @@ public: void set( int a, int b ) { x = a; y = b; } void rotate( float angle_r ) { - float _x = static_cast( x ), - _y = static_cast( y ), - s = sinf( angle_r ), - c = cosf( angle_r ), - a = _x * c - _y * s, - b = _x * s + _y * c; + float _x = static_cast( x ), + _y = static_cast( y ), + s = sinf( angle_r ), + c = cosf( angle_r ), + a = _x * c - _y * s, + b = _x * s + _y * c; - x = static_cast( a ); - y = static_cast( b ); + x = static_cast( a ); + y = static_cast( b ); } int x, y; }; @@ -38,94 +38,94 @@ public: myBitmap() : pen( NULL ), brush( NULL ), clr( 0 ), wid( 1 ) {} ~myBitmap() { - DeleteObject( pen ); - DeleteObject( brush ); - DeleteDC( hdc ); - DeleteObject( bmp ); + DeleteObject( pen ); + DeleteObject( brush ); + DeleteDC( hdc ); + DeleteObject( bmp ); } bool create( int w, int h ) { - BITMAPINFO bi; - ZeroMemory( &bi, sizeof( bi ) ); - bi.bmiHeader.biSize = sizeof( bi.bmiHeader ); - bi.bmiHeader.biBitCount = sizeof( DWORD ) * 8; - bi.bmiHeader.biCompression = BI_RGB; - bi.bmiHeader.biPlanes = 1; - bi.bmiHeader.biWidth = w; - bi.bmiHeader.biHeight = -h; + BITMAPINFO bi; + ZeroMemory( &bi, sizeof( bi ) ); + bi.bmiHeader.biSize = sizeof( bi.bmiHeader ); + bi.bmiHeader.biBitCount = sizeof( DWORD ) * 8; + bi.bmiHeader.biCompression = BI_RGB; + bi.bmiHeader.biPlanes = 1; + bi.bmiHeader.biWidth = w; + bi.bmiHeader.biHeight = -h; - HDC dc = GetDC( GetConsoleWindow() ); - bmp = CreateDIBSection( dc, &bi, DIB_RGB_COLORS, &pBits, NULL, 0 ); - if( !bmp ) return false; + HDC dc = GetDC( GetConsoleWindow() ); + bmp = CreateDIBSection( dc, &bi, DIB_RGB_COLORS, &pBits, NULL, 0 ); + if( !bmp ) return false; - hdc = CreateCompatibleDC( dc ); - SelectObject( hdc, bmp ); - ReleaseDC( GetConsoleWindow(), dc ); + hdc = CreateCompatibleDC( dc ); + SelectObject( hdc, bmp ); + ReleaseDC( GetConsoleWindow(), dc ); - width = w; height = h; - return true; + width = w; height = h; + return true; } void clear( BYTE clr = 0 ) { - memset( pBits, clr, width * height * sizeof( DWORD ) ); + memset( pBits, clr, width * height * sizeof( DWORD ) ); } void setBrushColor( DWORD bClr ) { - if( brush ) DeleteObject( brush ); - brush = CreateSolidBrush( bClr ); - SelectObject( hdc, brush ); + if( brush ) DeleteObject( brush ); + brush = CreateSolidBrush( bClr ); + SelectObject( hdc, brush ); } void setPenColor( DWORD c ) { - clr = c; - createPen(); + clr = c; + createPen(); } void setPenWidth( int w ) { - wid = w; - createPen(); + wid = w; + createPen(); } void saveBitmap( string path ) { - BITMAPFILEHEADER fileheader; - BITMAPINFO infoheader; - BITMAP bitmap; - DWORD wb; - - GetObject( bmp, sizeof( bitmap ), &bitmap ); - DWORD* dwpBits = new DWORD[bitmap.bmWidth * bitmap.bmHeight]; + BITMAPFILEHEADER fileheader; + BITMAPINFO infoheader; + BITMAP bitmap; + DWORD wb; + GetObject( bmp, sizeof( bitmap ), &bitmap ); + DWORD* dwpBits = new DWORD[bitmap.bmWidth * bitmap.bmHeight]; + ZeroMemory( dwpBits, bitmap.bmWidth * bitmap.bmHeight * sizeof( DWORD ) ); - ZeroMemory( &infoheader, sizeof( BITMAPINFO ) ); - ZeroMemory( &fileheader, sizeof( BITMAPFILEHEADER ) ); + ZeroMemory( &infoheader, sizeof( BITMAPINFO ) ); + ZeroMemory( &fileheader, sizeof( BITMAPFILEHEADER ) ); - infoheader.bmiHeader.biBitCount = sizeof( DWORD ) * 8; - infoheader.bmiHeader.biCompression = BI_RGB; - infoheader.bmiHeader.biPlanes = 1; - infoheader.bmiHeader.biSize = sizeof( infoheader.bmiHeader ); - infoheader.bmiHeader.biHeight = bitmap.bmHeight; - infoheader.bmiHeader.biWidth = bitmap.bmWidth; - infoheader.bmiHeader.biSizeImage = bitmap.bmWidth * bitmap.bmHeight * sizeof( DWORD ); + infoheader.bmiHeader.biBitCount = sizeof( DWORD ) * 8; + infoheader.bmiHeader.biCompression = BI_RGB; + infoheader.bmiHeader.biPlanes = 1; + infoheader.bmiHeader.biSize = sizeof( infoheader.bmiHeader ); + infoheader.bmiHeader.biHeight = bitmap.bmHeight; + infoheader.bmiHeader.biWidth = bitmap.bmWidth; + infoheader.bmiHeader.biSizeImage = bitmap.bmWidth * bitmap.bmHeight * sizeof( DWORD ); - fileheader.bfType = 0x4D42; - fileheader.bfOffBits = sizeof( infoheader.bmiHeader ) + sizeof( BITMAPFILEHEADER ); - fileheader.bfSize = fileheader.bfOffBits + infoheader.bmiHeader.biSizeImage; + fileheader.bfType = 0x4D42; + fileheader.bfOffBits = sizeof( infoheader.bmiHeader ) + sizeof( BITMAPFILEHEADER ); + fileheader.bfSize = fileheader.bfOffBits + infoheader.bmiHeader.biSizeImage; - GetDIBits( hdc, bmp, 0, height, ( LPVOID )dwpBits, &infoheader, DIB_RGB_COLORS ); + GetDIBits( hdc, bmp, 0, height, ( LPVOID )dwpBits, &infoheader, DIB_RGB_COLORS ); - HANDLE file = CreateFile( path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); - WriteFile( file, &fileheader, sizeof( BITMAPFILEHEADER ), &wb, NULL ); - WriteFile( file, &infoheader.bmiHeader, sizeof( infoheader.bmiHeader ), &wb, NULL ); - WriteFile( file, dwpBits, bitmap.bmWidth * bitmap.bmHeight * 4, &wb, NULL ); - CloseHandle( file ); + HANDLE file = CreateFile( path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); + WriteFile( file, &fileheader, sizeof( BITMAPFILEHEADER ), &wb, NULL ); + WriteFile( file, &infoheader.bmiHeader, sizeof( infoheader.bmiHeader ), &wb, NULL ); + WriteFile( file, dwpBits, bitmap.bmWidth * bitmap.bmHeight * 4, &wb, NULL ); + CloseHandle( file ); - delete [] dwpBits; + delete [] dwpBits; } HDC getDC() const { return hdc; } @@ -135,9 +135,9 @@ public: private: void createPen() { - if( pen ) DeleteObject( pen ); - pen = CreatePen( PS_SOLID, wid, clr ); - SelectObject( hdc, pen ); + if( pen ) DeleteObject( pen ); + pen = CreatePen( PS_SOLID, wid, clr ); + SelectObject( hdc, pen ); } HBITMAP bmp; @@ -154,16 +154,16 @@ class clock public: clock() { - _bmp.create( BMP_SIZE, BMP_SIZE ); - _bmp.clear( 100 ); - _bmp.setPenWidth( 2 ); - _ang = DegToRadian( 6 ); + _bmp.create( BMP_SIZE, BMP_SIZE ); + _bmp.clear( 100 ); + _bmp.setPenWidth( 2 ); + _ang = DegToRadian( 6 ); } - + void setNow() { - GetLocalTime( &_sysTime ); - draw(); + GetLocalTime( &_sysTime ); + draw(); } float DegToRadian( float degree ) { return degree * ( PI / 180.0f ); } @@ -173,70 +173,70 @@ public: private: void drawTicks( HDC dc ) { - vector2 line; - _bmp.setPenWidth( 1 ); - for( int x = 0; x < 60; x++ ) - { - line.set( 0, 50 ); - line.rotate( static_cast( x + 30 ) * _ang ); - MoveToEx( dc, CENTER - static_cast( 2.5f * static_cast( line.x ) ), CENTER - static_cast( 2.5f * static_cast( line.y ) ), NULL ); - LineTo( dc, CENTER - static_cast( 2.81f * static_cast( line.x ) ), CENTER - static_cast( 2.81f * static_cast( line.y ) ) ); - } + vector2 line; + _bmp.setPenWidth( 1 ); + for( int x = 0; x < 60; x++ ) + { + line.set( 0, 50 ); + line.rotate( static_cast( x + 30 ) * _ang ); + MoveToEx( dc, CENTER - static_cast( 2.5f * static_cast( line.x ) ), CENTER - static_cast( 2.5f * static_cast( line.y ) ), NULL ); + LineTo( dc, CENTER - static_cast( 2.81f * static_cast( line.x ) ), CENTER - static_cast( 2.81f * static_cast( line.y ) ) ); + } - _bmp.setPenWidth( 3 ); - for( int x = 0; x < 60; x += 5 ) - { - line.set( 0, 50 ); - line.rotate( static_cast( x + 30 ) * _ang ); - MoveToEx( dc, CENTER - static_cast( 2.5f * static_cast( line.x ) ), CENTER - static_cast( 2.5f * static_cast( line.y ) ), NULL ); - LineTo( dc, CENTER - static_cast( 2.81f * static_cast( line.x ) ), CENTER - static_cast( 2.81f * static_cast( line.y ) ) ); - } + _bmp.setPenWidth( 3 ); + for( int x = 0; x < 60; x += 5 ) + { + line.set( 0, 50 ); + line.rotate( static_cast( x + 30 ) * _ang ); + MoveToEx( dc, CENTER - static_cast( 2.5f * static_cast( line.x ) ), CENTER - static_cast( 2.5f * static_cast( line.y ) ), NULL ); + LineTo( dc, CENTER - static_cast( 2.81f * static_cast( line.x ) ), CENTER - static_cast( 2.81f * static_cast( line.y ) ) ); + } } void drawHands( HDC dc ) { - float hp = DegToRadian( ( 30.0f * static_cast( _sysTime.wMinute ) ) / 60.0f ); - int h = ( _sysTime.wHour > 12 ? _sysTime.wHour - 12 : _sysTime.wHour ) * 5; + float hp = DegToRadian( ( 30.0f * static_cast( _sysTime.wMinute ) ) / 60.0f ); + int h = ( _sysTime.wHour > 12 ? _sysTime.wHour - 12 : _sysTime.wHour ) * 5; + + _bmp.setPenWidth( 3 ); + _bmp.setPenColor( RGB( 0, 0, 255 ) ); + drawHand( dc, HOUR_LEN, ( _ang * static_cast( 30 + h ) ) + hp ); - _bmp.setPenWidth( 3 ); - _bmp.setPenColor( RGB( 0, 0, 255 ) ); - drawHand( dc, HOUR_LEN, ( _ang * static_cast( 30 + h ) ) + hp ); + _bmp.setPenColor( RGB( 0, 128, 0 ) ); + drawHand( dc, MIN_LEN, _ang * static_cast( 30 + _sysTime.wMinute ) ); - _bmp.setPenColor( RGB( 0, 128, 0 ) ); - drawHand( dc, MIN_LEN, _ang * static_cast( 30 + _sysTime.wMinute ) ); - - _bmp.setPenWidth( 2 ); - _bmp.setPenColor( RGB( 255, 0, 0 ) ); - drawHand( dc, SEC_LEN, _ang * static_cast( 30 + _sysTime.wSecond ) ); + _bmp.setPenWidth( 2 ); + _bmp.setPenColor( RGB( 255, 0, 0 ) ); + drawHand( dc, SEC_LEN, _ang * static_cast( 30 + _sysTime.wSecond ) ); } void drawHand( HDC dc, int len, float ang ) { - vector2 line; - line.set( 0, len ); - line.rotate( ang ); - MoveToEx( dc, CENTER, CENTER, NULL ); - LineTo( dc, line.x + CENTER, line.y + CENTER ); + vector2 line; + line.set( 0, len ); + line.rotate( ang ); + MoveToEx( dc, CENTER, CENTER, NULL ); + LineTo( dc, line.x + CENTER, line.y + CENTER ); } void draw() { - HDC dc = _bmp.getDC(); + HDC dc = _bmp.getDC(); - _bmp.setBrushColor( RGB( 250, 250, 250 ) ); - Ellipse( dc, 0, 0, BMP_SIZE, BMP_SIZE ); - _bmp.setBrushColor( RGB( 230, 230, 230 ) ); - Ellipse( dc, 10, 10, BMP_SIZE - 10, BMP_SIZE - 10 ); + _bmp.setBrushColor( RGB( 250, 250, 250 ) ); + Ellipse( dc, 0, 0, BMP_SIZE, BMP_SIZE ); + _bmp.setBrushColor( RGB( 230, 230, 230 ) ); + Ellipse( dc, 10, 10, BMP_SIZE - 10, BMP_SIZE - 10 ); - drawTicks( dc ); - drawHands( dc ); + drawTicks( dc ); + drawHands( dc ); - _bmp.setPenColor( 0 ); _bmp.setBrushColor( 0 ); - Ellipse( dc, CENTER - 5, CENTER - 5, CENTER + 5, CENTER + 5 ); + _bmp.setPenColor( 0 ); _bmp.setBrushColor( 0 ); + Ellipse( dc, CENTER - 5, CENTER - 5, CENTER + 5, CENTER + 5 ); - _wdc = GetDC( _hwnd ); - BitBlt( _wdc, 0, 0, BMP_SIZE, BMP_SIZE, dc, 0, 0, SRCCOPY ); - ReleaseDC( _hwnd, _wdc ); + _wdc = GetDC( _hwnd ); + BitBlt( _wdc, 0, 0, BMP_SIZE, BMP_SIZE, dc, 0, 0, SRCCOPY ); + ReleaseDC( _hwnd, _wdc ); } myBitmap _bmp; @@ -252,67 +252,67 @@ public: wnd() { _inst = this; } int wnd::Run( HINSTANCE hInst ) { - _hInst = hInst; - _hwnd = InitAll(); - SetTimer( _hwnd, MY_TIMER, 1000, NULL ); - _clock.setHWND( _hwnd ); + _hInst = hInst; + _hwnd = InitAll(); + SetTimer( _hwnd, MY_TIMER, 1000, NULL ); + _clock.setHWND( _hwnd ); - ShowWindow( _hwnd, SW_SHOW ); - UpdateWindow( _hwnd ); + ShowWindow( _hwnd, SW_SHOW ); + UpdateWindow( _hwnd ); - MSG msg; - ZeroMemory( &msg, sizeof( msg ) ); - while( msg.message != WM_QUIT ) - { - if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) != 0 ) - { - TranslateMessage( &msg ); - DispatchMessage( &msg ); - } - } - return UnregisterClass( "_MY_CLOCK_", _hInst ); + MSG msg; + ZeroMemory( &msg, sizeof( msg ) ); + while( msg.message != WM_QUIT ) + { + if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) != 0 ) + { + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } + } + return UnregisterClass( "_MY_CLOCK_", _hInst ); } private: void wnd::doPaint( HDC dc ) { _clock.setNow(); } void wnd::doTimer() { _clock.setNow(); } static int WINAPI wnd::WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) { - switch( msg ) - { - case WM_DESTROY: PostQuitMessage( 0 ); break; - case WM_PAINT: - { - PAINTSTRUCT ps; - HDC dc = BeginPaint( hWnd, &ps ); - _inst->doPaint( dc ); - EndPaint( hWnd, &ps ); - return 0; - } - case WM_TIMER: _inst->doTimer(); break; - default: - return DefWindowProc( hWnd, msg, wParam, lParam ); - } - return 0; + switch( msg ) + { + case WM_DESTROY: PostQuitMessage( 0 ); break; + case WM_PAINT: + { + PAINTSTRUCT ps; + HDC dc = BeginPaint( hWnd, &ps ); + _inst->doPaint( dc ); + EndPaint( hWnd, &ps ); + return 0; + } + case WM_TIMER: _inst->doTimer(); break; + default: + return DefWindowProc( hWnd, msg, wParam, lParam ); + } + return 0; } HWND InitAll() { - WNDCLASSEX wcex; - ZeroMemory( &wcex, sizeof( wcex ) ); - wcex.cbSize = sizeof( WNDCLASSEX ); - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = ( WNDPROC )WndProc; - wcex.hInstance = _hInst; - wcex.hCursor = LoadCursor( NULL, IDC_ARROW ); - wcex.hbrBackground = ( HBRUSH )( COLOR_WINDOW + 1 ); - wcex.lpszClassName = "_MY_CLOCK_"; + WNDCLASSEX wcex; + ZeroMemory( &wcex, sizeof( wcex ) ); + wcex.cbSize = sizeof( WNDCLASSEX ); + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = ( WNDPROC )WndProc; + wcex.hInstance = _hInst; + wcex.hCursor = LoadCursor( NULL, IDC_ARROW ); + wcex.hbrBackground = ( HBRUSH )( COLOR_WINDOW + 1 ); + wcex.lpszClassName = "_MY_CLOCK_"; - RegisterClassEx( &wcex ); + RegisterClassEx( &wcex ); - RECT rc = { 0, 0, BMP_SIZE, BMP_SIZE }; - AdjustWindowRect( &rc, WS_SYSMENU | WS_CAPTION, FALSE ); - int w = rc.right - rc.left, h = rc.bottom - rc.top; - return CreateWindow( "_MY_CLOCK_", ".: Clock -- PJorente :.", WS_SYSMENU, CW_USEDEFAULT, 0, w, h, NULL, NULL, _hInst, NULL ); + RECT rc = { 0, 0, BMP_SIZE, BMP_SIZE }; + AdjustWindowRect( &rc, WS_SYSMENU | WS_CAPTION, FALSE ); + int w = rc.right - rc.left, h = rc.bottom - rc.top; + return CreateWindow( "_MY_CLOCK_", ".: Clock -- PJorente :.", WS_SYSMENU, CW_USEDEFAULT, 0, w, h, NULL, NULL, _hInst, NULL ); } static wnd* _inst; diff --git a/Task/Draw-a-clock/C/draw-a-clock-1.c b/Task/Draw-a-clock/C/draw-a-clock-1.c index 90f51a7d51..197d668b3d 100644 --- a/Task/Draw-a-clock/C/draw-a-clock-1.c +++ b/Task/Draw-a-clock/C/draw-a-clock-1.c @@ -9,85 +9,85 @@ const char * shades = " .:-*ca&#%@"; /* distance of (x, y) from line segment (0, 0)->(x0, y0) */ double dist(double x, double y, double x0, double y0) { - double l = (x * x0 + y * y0) / (x0 * x0 + y0 * y0); + double l = (x * x0 + y * y0) / (x0 * x0 + y0 * y0); - if (l > 1) { - x -= x0; - y -= y0; - } else if (l >= 0) { - x -= l * x0; - y -= l * y0; - } - return sqrt(x * x + y * y); + if (l > 1) { + x -= x0; + y -= y0; + } else if (l >= 0) { + x -= l * x0; + y -= l * y0; + } + return sqrt(x * x + y * y); } enum { sec = 0, min, hur }; // for subscripts void draw(int size) { -# define for_i for(int i = 0; i < size; i++) -# define for_j for(int j = 0; j < size * 2; j++) +# define for_i for(int i = 0; i < size; i++) +# define for_j for(int j = 0; j < size * 2; j++) - double angle, cx = size / 2.; - double sx[3], sy[3], sw[3]; - double fade[] = { 1, .35, .35 }; /* opacity of each arm */ - struct timeval tv; - struct tm *t; + double angle, cx = size / 2.; + double sx[3], sy[3], sw[3]; + double fade[] = { 1, .35, .35 }; /* opacity of each arm */ + struct timeval tv; + struct tm *t; - /* set width of each arm */ - sw[sec] = size * .02; - sw[min] = size * .03; - sw[hur] = size * .05; + /* set width of each arm */ + sw[sec] = size * .02; + sw[min] = size * .03; + sw[hur] = size * .05; every_second: - gettimeofday(&tv, 0); - t = localtime(&tv.tv_sec); + gettimeofday(&tv, 0); + t = localtime(&tv.tv_sec); - angle = t->tm_sec * PI / 30; - sy[sec] = -cx * cos(angle); - sx[sec] = cx * sin(angle); + angle = t->tm_sec * PI / 30; + sy[sec] = -cx * cos(angle); + sx[sec] = cx * sin(angle); - angle = (t->tm_min + t->tm_sec / 60.) / 30 * PI; - sy[min] = -cx * cos(angle) * .8; - sx[min] = cx * sin(angle) * .8; + angle = (t->tm_min + t->tm_sec / 60.) / 30 * PI; + sy[min] = -cx * cos(angle) * .8; + sx[min] = cx * sin(angle) * .8; - angle = (t->tm_hour + t->tm_min / 60.) / 6 * PI; - sy[hur] = -cx * cos(angle) * .6; - sx[hur] = cx * sin(angle) * .6; + angle = (t->tm_hour + t->tm_min / 60.) / 6 * PI; + sy[hur] = -cx * cos(angle) * .6; + sx[hur] = cx * sin(angle) * .6; - printf("\033[s"); /* save cursor position */ - for_i { - printf("\033[%d;0H", i); /* goto row i, col 0 */ - double y = i - cx; - for_j { - double x = (j - 2 * cx) / 2; + printf("\033[s"); /* save cursor position */ + for_i { + printf("\033[%d;0H", i); /* goto row i, col 0 */ + double y = i - cx; + for_j { + double x = (j - 2 * cx) / 2; - int pix = 0; - /* calcs how far the "pixel" is from each arm and set - * shade, with some anti-aliasing. It's ghetto, but much - * easier than a real scanline conversion. - */ - for (int k = hur; k >= sec; k--) { - double d = dist(x, y, sx[k], sy[k]); - if (d < sw[k] - .5) - pix = 10 * fade[k]; - else if (d < sw[k] + .5) - pix = (5 + (sw[k] - d) * 10) * fade[k]; - } - putchar(shades[pix]); - } - } - printf("\033[u"); /* restore cursor pos so you can bg the job -- value unclear */ + int pix = 0; + /* calcs how far the "pixel" is from each arm and set + * shade, with some anti-aliasing. It's ghetto, but much + * easier than a real scanline conversion. + */ + for (int k = hur; k >= sec; k--) { + double d = dist(x, y, sx[k], sy[k]); + if (d < sw[k] - .5) + pix = 10 * fade[k]; + else if (d < sw[k] + .5) + pix = (5 + (sw[k] - d) * 10) * fade[k]; + } + putchar(shades[pix]); + } + } + printf("\033[u"); /* restore cursor pos so you can bg the job -- value unclear */ - fflush(stdout); - sleep(1); /* sleep 1 can at times miss a second, but will catch up next update */ - goto every_second; + fflush(stdout); + sleep(1); /* sleep 1 can at times miss a second, but will catch up next update */ + goto every_second; } int main(int argc, char *argv[]) { - int s; - if (argc <= 1 || (s = atoi(argv[1])) <= 0) s = 20; - draw(s); - return 0; + int s; + if (argc <= 1 || (s = atoi(argv[1])) <= 0) s = 20; + draw(s); + return 0; } diff --git a/Task/Draw-a-clock/ContextFree/draw-a-clock.cf b/Task/Draw-a-clock/ContextFree/draw-a-clock.cf index 95b5690c00..a03d242674 100644 --- a/Task/Draw-a-clock/ContextFree/draw-a-clock.cf +++ b/Task/Draw-a-clock/ContextFree/draw-a-clock.cf @@ -3,12 +3,12 @@ startshape START TIME_IN_SECONDS = 60 shape START { - SECOND_HAND[r (TIME_IN_SECONDS*-6)] - CIRCLE[s 50 50] + SECOND_HAND[r (TIME_IN_SECONDS*-6)] + CIRCLE[s 50 50] } shape SECOND_HAND { - TRIANGLE [[z 1 s 1 30 y 0.26 b 1]] + TRIANGLE [[z 1 s 1 30 y 0.26 b 1]] } diff --git a/Task/Draw-a-clock/Delphi/draw-a-clock-1.pas b/Task/Draw-a-clock/Delphi/draw-a-clock-1.delphi similarity index 100% rename from Task/Draw-a-clock/Delphi/draw-a-clock-1.pas rename to Task/Draw-a-clock/Delphi/draw-a-clock-1.delphi diff --git a/Task/Draw-a-clock/Delphi/draw-a-clock-2.pas b/Task/Draw-a-clock/Delphi/draw-a-clock-2.delphi similarity index 100% rename from Task/Draw-a-clock/Delphi/draw-a-clock-2.pas rename to Task/Draw-a-clock/Delphi/draw-a-clock-2.delphi diff --git a/Task/Draw-a-clock/EasyLang/draw-a-clock.easy b/Task/Draw-a-clock/EasyLang/draw-a-clock.easy index f53a4939f8..7d2dc2ddee 100644 --- a/Task/Draw-a-clock/EasyLang/draw-a-clock.easy +++ b/Task/Draw-a-clock/EasyLang/draw-a-clock.easy @@ -1,32 +1,38 @@ -proc draw hour min sec . +proc draw hour min sec . . # dial - gcolor 333 - gcircle 50 50 45 - gcolor 797 - gcircle 50 50 44 - gcolor 333 + color 333 + move 50 50 + circle 45 + color 797 + circle 44 + color 333 for i range0 60 a = i * 6 - if i mod 5 = 0 - gcircle 50 + sin a * 40 50 + cos a * 40 1 - else - gcircle 50 + sin a * 40 50 + cos a * 40 0.25 - . + move 50 + sin a * 40 50 + cos a * 40 + circle 0.25 + . + for i range0 12 + a = i * 30 + move 50 + sin a * 40 50 + cos a * 40 + circle 1 . # hour - glinewidth 2 - gcolor 000 + linewidth 2 + color 000 a = (hour * 60 + min) / 2 - gline 50 50 50 + sin a * 32 50 + cos a * 32 + move 50 50 + line 50 + sin a * 32 50 + cos a * 32 # min - glinewidth 1.5 + linewidth 1.5 a = (sec + min * 60) / 10 - gline 50 50 50 + sin a * 40 50 + cos a * 40 + move 50 50 + line 50 + sin a * 40 50 + cos a * 40 # sec - glinewidth 1 - gcolor 700 + linewidth 1 + color 700 a = sec * 6 - gline 50 50 50 + sin a * 40 50 + cos a * 40 + move 50 50 + line 50 + sin a * 40 50 + cos a * 40 . on timer if t <> floor systime @@ -35,9 +41,11 @@ on timer sec = number substr h$ 18 2 min = number substr h$ 15 2 hour = number substr h$ 12 2 - if hour > 12 : hour -= 12 + if hour > 12 + hour -= 12 + . draw hour min sec . - timer 0.05 + timer 0.1 . timer 0 diff --git a/Task/Draw-a-clock/Go/draw-a-clock-1.go b/Task/Draw-a-clock/Go/draw-a-clock-1.go index 1dcf2cd406..3b45a2348f 100644 --- a/Task/Draw-a-clock/Go/draw-a-clock-1.go +++ b/Task/Draw-a-clock/Go/draw-a-clock-1.go @@ -1,88 +1,88 @@ package main import ( - "golang.org/x/net/websocket" - "flag" - "fmt" - "html/template" - "io" - "math" - "net/http" - "time" + "golang.org/x/net/websocket" + "flag" + "fmt" + "html/template" + "io" + "math" + "net/http" + "time" ) var ( - Portnum string - Hostsite string + Portnum string + Hostsite string ) type PageSettings struct { - Host string - Port string + Host string + Port string } const ( - Canvaswidth = 512 - Canvasheight = 512 - //color constants - HourColor = "#ff7373" // pinkish - MinuteColor = "#00b7e4" //light blue - SecondColor = "#b58900" //gold + Canvaswidth = 512 + Canvasheight = 512 + //color constants + HourColor = "#ff7373" // pinkish + MinuteColor = "#00b7e4" //light blue + SecondColor = "#b58900" //gold ) func main() { - flag.StringVar(&Portnum, "Port", "1234", "Port to host server.") - flag.StringVar(&Hostsite, "Site", "localhost", "Site hosting server") - flag.Parse() - http.HandleFunc("/", webhandler) - http.Handle("/ws", websocket.Handler(wshandle)) - err := http.ListenAndServe(Hostsite+":"+Portnum, nil) - if err != nil { - fmt.Println(err) - } - fmt.Println("server running") + flag.StringVar(&Portnum, "Port", "1234", "Port to host server.") + flag.StringVar(&Hostsite, "Site", "localhost", "Site hosting server") + flag.Parse() + http.HandleFunc("/", webhandler) + http.Handle("/ws", websocket.Handler(wshandle)) + err := http.ListenAndServe(Hostsite+":"+Portnum, nil) + if err != nil { + fmt.Println(err) + } + fmt.Println("server running") } func webhandler(w http.ResponseWriter, r *http.Request) { - wsurl := PageSettings{Host: Hostsite, Port: Portnum} - template, _ := template.ParseFiles("clock.html") - template.Execute(w, wsurl) + wsurl := PageSettings{Host: Hostsite, Port: Portnum} + template, _ := template.ParseFiles("clock.html") + template.Execute(w, wsurl) } //Given a websocket connection, //serves updating time function func wshandle(ws *websocket.Conn) { - for { - hour, min, sec := time.Now().Clock() - hourx, houry := HourCords(hour, Canvasheight/2) - minx, miny := MinSecCords(min, Canvasheight/2) - secx, secy := MinSecCords(sec, Canvasheight/2) - msg := "CLEAR\n" - msg += fmt.Sprintf("HOUR %d %d %s\n", hourx, houry, HourColor) - msg += fmt.Sprintf("MIN %d %d %s\n", minx, miny, MinuteColor) - msg += fmt.Sprintf("SEC %d %d %s", secx, secy, SecondColor) - io.WriteString(ws, msg) - time.Sleep(time.Second / 60.0) - } + for { + hour, min, sec := time.Now().Clock() + hourx, houry := HourCords(hour, Canvasheight/2) + minx, miny := MinSecCords(min, Canvasheight/2) + secx, secy := MinSecCords(sec, Canvasheight/2) + msg := "CLEAR\n" + msg += fmt.Sprintf("HOUR %d %d %s\n", hourx, houry, HourColor) + msg += fmt.Sprintf("MIN %d %d %s\n", minx, miny, MinuteColor) + msg += fmt.Sprintf("SEC %d %d %s", secx, secy, SecondColor) + io.WriteString(ws, msg) + time.Sleep(time.Second / 60.0) + } } //Given current minute or second time(i.e 30 min, 60 minutes) //and the radius, returns pair of cords to draw line to func MinSecCords(ctime int, radius int) (int, int) { - //converts min/sec to angle and then to radians + //converts min/sec to angle and then to radians - theta := ((float64(ctime)*6 - 90) * (math.Pi / 180)) - x := float64(radius) * math.Cos(theta) - y := float64(radius) * math.Sin(theta) - return int(x) + 256, int(y) + 256 + theta := ((float64(ctime)*6 - 90) * (math.Pi / 180)) + x := float64(radius) * math.Cos(theta) + y := float64(radius) * math.Sin(theta) + return int(x) + 256, int(y) + 256 } //Given current hour time(i.e. 12, 8) and the radius, //returns pair of cords to draw line to func HourCords(ctime int, radius int) (int, int) { - //converts hours to angle and then to radians - theta := ((float64(ctime)*30 - 90) * (math.Pi / 180)) - x := float64(radius) * math.Cos(theta) - y := float64(radius) * math.Sin(theta) - return int(x) + 256, int(y) + 256 + //converts hours to angle and then to radians + theta := ((float64(ctime)*30 - 90) * (math.Pi / 180)) + x := float64(radius) * math.Cos(theta) + y := float64(radius) * math.Sin(theta) + return int(x) + 256, int(y) + 256 } diff --git a/Task/Draw-a-clock/Go/draw-a-clock-2.go b/Task/Draw-a-clock/Go/draw-a-clock-2.go index fd18474571..5dad3296a3 100644 --- a/Task/Draw-a-clock/Go/draw-a-clock-2.go +++ b/Task/Draw-a-clock/Go/draw-a-clock-2.go @@ -10,10 +10,10 @@ var hourhand; function wsConnect() { - //get contexts for drawing + //get contexts for drawing //var canvas = document.getElementById( "canvas" ); //ctx = canvas.getContext( '2d' ); - var canvas = document.getElementById("rim"); + var canvas = document.getElementById("rim"); //draw circle for rim rim = canvas.getContext('2d'); rim.beginPath(); @@ -83,19 +83,19 @@

    Clock

    - + Sorry, your browser does not support Canvas - + Sorry, your browser does not support Canvas - + Sorry, your browser does not support Canvas - + Sorry, your browser does not support Canvas - + diff --git a/Task/Draw-a-clock/JavaScript/draw-a-clock-1.js b/Task/Draw-a-clock/JavaScript/draw-a-clock-1.js index 62e1f5b9f7..4a3b8b27f0 100644 --- a/Task/Draw-a-clock/JavaScript/draw-a-clock-1.js +++ b/Task/Draw-a-clock/JavaScript/draw-a-clock-1.js @@ -1,47 +1,47 @@ var sec_old = 0; function update_clock() { - var t = new Date(); - var arms = [t.getHours(), t.getMinutes(), t.getSeconds()]; - if (arms[2] == sec_old) return; - sec_old = arms[2]; + var t = new Date(); + var arms = [t.getHours(), t.getMinutes(), t.getSeconds()]; + if (arms[2] == sec_old) return; + sec_old = arms[2]; - var c = document.getElementById('clock'); - var ctx = c.getContext('2d'); - ctx.fillStyle = "rgb(0,200,200)"; - ctx.fillRect(0, 0, c.width, c.height); - ctx.fillStyle = "white"; - ctx.fillRect(3, 3, c.width - 6, c.height - 6); - ctx.lineCap = 'round'; + var c = document.getElementById('clock'); + var ctx = c.getContext('2d'); + ctx.fillStyle = "rgb(0,200,200)"; + ctx.fillRect(0, 0, c.width, c.height); + ctx.fillStyle = "white"; + ctx.fillRect(3, 3, c.width - 6, c.height - 6); + ctx.lineCap = 'round'; - var orig = { x: c.width / 2, y: c.height / 2 }; - arms[1] += arms[2] / 60; - arms[0] += arms[1] / 60; - draw_arm(ctx, orig, arms[0] * 30, c.width/2.5 - 15, c.width / 20, "green"); - draw_arm(ctx, orig, arms[1] * 6, c.width/2.2 - 10, c.width / 30, "navy"); - draw_arm(ctx, orig, arms[2] * 6, c.width/2.0 - 6, c.width / 100, "maroon"); + var orig = { x: c.width / 2, y: c.height / 2 }; + arms[1] += arms[2] / 60; + arms[0] += arms[1] / 60; + draw_arm(ctx, orig, arms[0] * 30, c.width/2.5 - 15, c.width / 20, "green"); + draw_arm(ctx, orig, arms[1] * 6, c.width/2.2 - 10, c.width / 30, "navy"); + draw_arm(ctx, orig, arms[2] * 6, c.width/2.0 - 6, c.width / 100, "maroon"); } function draw_arm(ctx, orig, deg, len, w, style) { - ctx.save(); - ctx.lineWidth = w; - ctx.lineCap = 'round'; - ctx.translate(orig.x, orig.y); - ctx.rotate((deg - 90) * Math.PI / 180); - ctx.strokeStyle = style; - ctx.beginPath(); - ctx.moveTo(-len / 10, 0); - ctx.lineTo(len, 0); - ctx.stroke(); - ctx.restore(); + ctx.save(); + ctx.lineWidth = w; + ctx.lineCap = 'round'; + ctx.translate(orig.x, orig.y); + ctx.rotate((deg - 90) * Math.PI / 180); + ctx.strokeStyle = style; + ctx.beginPath(); + ctx.moveTo(-len / 10, 0); + ctx.lineTo(len, 0); + ctx.stroke(); + ctx.restore(); } function init_clock() { - var clock = document.createElement('canvas'); - clock.width = 100; - clock.height = 100; - clock.id = "clock"; - document.body.appendChild(clock); + var clock = document.createElement('canvas'); + clock.width = 100; + clock.height = 100; + clock.id = "clock"; + document.body.appendChild(clock); - window.setInterval(update_clock, 200); + window.setInterval(update_clock, 200); } diff --git a/Task/Draw-a-clock/Julia/draw-a-clock.jl b/Task/Draw-a-clock/Julia/draw-a-clock.julia similarity index 100% rename from Task/Draw-a-clock/Julia/draw-a-clock.jl rename to Task/Draw-a-clock/Julia/draw-a-clock.julia diff --git a/Task/Draw-a-clock/Kotlin/draw-a-clock.kts b/Task/Draw-a-clock/Kotlin/draw-a-clock.kotlin similarity index 100% rename from Task/Draw-a-clock/Kotlin/draw-a-clock.kts rename to Task/Draw-a-clock/Kotlin/draw-a-clock.kotlin diff --git a/Task/Draw-a-clock/M2000-Interpreter/draw-a-clock.m2000 b/Task/Draw-a-clock/M2000-Interpreter/draw-a-clock.m2000 index 8d8e6c0c7b..365ce205dd 100644 --- a/Task/Draw-a-clock/M2000-Interpreter/draw-a-clock.m2000 +++ b/Task/Draw-a-clock/M2000-Interpreter/draw-a-clock.m2000 @@ -5,89 +5,89 @@ cls, 0 window 6, window Module Led_Clock{ - Escape Off - Smooth off - Dim D(-1 to 9) - D(-1)=(0,0,0,0,0,0,0) - D(0)=(1,1,1,0,1,1,1) - D(1)=(0,0,1,0,0,1,0) - D(2)=(1,0,1,1,1,0,1) - D(3)=(1,0,1,1,0,1,1) - D(4)=(0,1,1,1,0,1,0) - D(5)=(1,1,0,1,0,1,1) - D(6)=(1,1,0,1,1,1,1) - D(7)=(1,0,1,0,0,1,0) - D(8)=(1,1,1,1,1,1,1) - D(9)=(1,1,1,1,0,1,1) - N=240 - XX=(scale.x-N*75) div 2 - YY=scale.y-N*22 - NN=N - BackColor=0 - CLS BackColor, 0 - Back {CLS BackColor,0} - desktop 255, BackColor - Forecolor=12 - C=BackColor-Forecolor - pen BackColor - for i=0 to 9: cc=d(i): cc*=c:next - m=1 - move XX+N*23.2, YY+N*5.2 - polygon BackColor-C, N,-N, N,N, -N, N, -N, -N - move XX+N*23.2,YY+N*13.2 - polygon BackColor-C, N,-N, N,N, -N, N, -N, -N - move XX+N*49.2,YY+N*5.2 - polygon BackColor-C, N,-N, N,N, -N, N, -N, -N - move XX+N*49.2,YY+N*13.2 - polygon BackColor-C, N,-N, N,N, -N, N, -N, -N - dsk=True - every 1000/2 { - k=now - k1=val(str$(k, "hh")) - k2=val(str$(k, "nn")) - k3=val(str$(k, "ss")) - LED(XX, D(k1 div 10)) - LED(XX+N*12, D(k1 mod 10)) - LED(XX+N*26, D(k2 div 10)) - LED(XX+N*38, D(k2 mod 10)) - LED(XX+N*52, D(k3 div 10)) - LED(XX+N*64, D(k3 mod 10)) - refresh 1000 - if keypress(32) then - dsk~ - if dsk then desktop 255 else desktop 255, BackColor - end if - if keypress(27) or mouse=2 then exit - } - desktop 255 - pen 14 - refresh 50 - mode 16 - wait 1000 - Escape On + Escape Off + Smooth off + Dim D(-1 to 9) + D(-1)=(0,0,0,0,0,0,0) + D(0)=(1,1,1,0,1,1,1) + D(1)=(0,0,1,0,0,1,0) + D(2)=(1,0,1,1,1,0,1) + D(3)=(1,0,1,1,0,1,1) + D(4)=(0,1,1,1,0,1,0) + D(5)=(1,1,0,1,0,1,1) + D(6)=(1,1,0,1,1,1,1) + D(7)=(1,0,1,0,0,1,0) + D(8)=(1,1,1,1,1,1,1) + D(9)=(1,1,1,1,0,1,1) + N=240 + XX=(scale.x-N*75) div 2 + YY=scale.y-N*22 + NN=N + BackColor=0 + CLS BackColor, 0 + Back {CLS BackColor,0} + desktop 255, BackColor + Forecolor=12 + C=BackColor-Forecolor + pen BackColor + for i=0 to 9: cc=d(i): cc*=c:next + m=1 + move XX+N*23.2, YY+N*5.2 + polygon BackColor-C, N,-N, N,N, -N, N, -N, -N + move XX+N*23.2,YY+N*13.2 + polygon BackColor-C, N,-N, N,N, -N, N, -N, -N + move XX+N*49.2,YY+N*5.2 + polygon BackColor-C, N,-N, N,N, -N, N, -N, -N + move XX+N*49.2,YY+N*13.2 + polygon BackColor-C, N,-N, N,N, -N, N, -N, -N + dsk=True + every 1000/2 { + k=now + k1=val(str$(k, "hh")) + k2=val(str$(k, "nn")) + k3=val(str$(k, "ss")) + LED(XX, D(k1 div 10)) + LED(XX+N*12, D(k1 mod 10)) + LED(XX+N*26, D(k2 div 10)) + LED(XX+N*38, D(k2 mod 10)) + LED(XX+N*52, D(k3 div 10)) + LED(XX+N*64, D(k3 mod 10)) + refresh 1000 + if keypress(32) then + dsk~ + if dsk then desktop 255 else desktop 255, BackColor + end if + if keypress(27) or mouse=2 then exit + } + desktop 255 + pen 14 + refresh 50 + mode 16 + wait 1000 + Escape On - sub LED(XX, S()) - move XX+N*1.2, YY+NN - \\ LED - UPPER - polygon BackColor-S(0), N,-N,N*6,0, N,N, -N, N,-N*6,0, -N, -N - \\ LED | LEFT UPPER - move XX+N*1.2-N*1.2, YY+N*1.2+NN - polygon BackColor-S(1), N,-N,N,N,0,N*6,-N, N, -N, -N, 0, -N*6 - move XX+N*1.2+N*7.2, YY+N*1.2+NN - \\ LED | RIGHT UPPER - polygon BackColor-S(2), N,-N,N,N,0,N*6,-N, N, -N, -N, 0, -N*6 - move XX+N*1.2, YY+N*8.4+NN - \\ LED - MIDDLE - polygon BackColor-S(3), N,-N,N*6,0, N,N, -N, N,-N*6,0, -N, -N - \\ LED | LEFT BOTTOM - move XX+N*1.2-N*1.2, YY+N*9.6+NN - polygon BackColor-S(4), N,-N,N,N,0,N*6,-N, N, -N, -N, 0, -N*6 - \\ LED | RIGHT BOTTOM - move XX+N*1.2+N*7.2, YY+N*9.6+NN - polygon BackColor-S(5), N,-N,N,N,0,N*6,-N, N, -N, -N, 0, -N*6 - \\ LED - BOTTOM - move XX+N*1.2, YY+N*16.8+NN - polygon BackColor-S(6), N,-N,N*6,0, N,N, -N, N,-N*6,0, -N, -N - end sub + sub LED(XX, S()) + move XX+N*1.2, YY+NN + \\ LED - UPPER + polygon BackColor-S(0), N,-N,N*6,0, N,N, -N, N,-N*6,0, -N, -N + \\ LED | LEFT UPPER + move XX+N*1.2-N*1.2, YY+N*1.2+NN + polygon BackColor-S(1), N,-N,N,N,0,N*6,-N, N, -N, -N, 0, -N*6 + move XX+N*1.2+N*7.2, YY+N*1.2+NN + \\ LED | RIGHT UPPER + polygon BackColor-S(2), N,-N,N,N,0,N*6,-N, N, -N, -N, 0, -N*6 + move XX+N*1.2, YY+N*8.4+NN + \\ LED - MIDDLE + polygon BackColor-S(3), N,-N,N*6,0, N,N, -N, N,-N*6,0, -N, -N + \\ LED | LEFT BOTTOM + move XX+N*1.2-N*1.2, YY+N*9.6+NN + polygon BackColor-S(4), N,-N,N,N,0,N*6,-N, N, -N, -N, 0, -N*6 + \\ LED | RIGHT BOTTOM + move XX+N*1.2+N*7.2, YY+N*9.6+NN + polygon BackColor-S(5), N,-N,N,N,0,N*6,-N, N, -N, -N, 0, -N*6 + \\ LED - BOTTOM + move XX+N*1.2, YY+N*16.8+NN + polygon BackColor-S(6), N,-N,N*6,0, N,N, -N, N,-N*6,0, -N, -N + end sub } Led_Clock diff --git a/Task/Draw-a-clock/MiniScript/draw-a-clock.mini b/Task/Draw-a-clock/MiniScript/draw-a-clock.mini index 9233919be6..f9d7b1464c 100644 --- a/Task/Draw-a-clock/MiniScript/draw-a-clock.mini +++ b/Task/Draw-a-clock/MiniScript/draw-a-clock.mini @@ -21,6 +21,6 @@ display(4).sprites.push hand // main loop while true - hand.rotation = 90 - floor(time) % 60 * 6 - wait + hand.rotation = 90 - floor(time) % 60 * 6 + wait end while diff --git a/Task/Draw-a-clock/OCaml/draw-a-clock-1.ml b/Task/Draw-a-clock/OCaml/draw-a-clock-1.ocaml similarity index 100% rename from Task/Draw-a-clock/OCaml/draw-a-clock-1.ml rename to Task/Draw-a-clock/OCaml/draw-a-clock-1.ocaml diff --git a/Task/Draw-a-clock/OCaml/draw-a-clock-2.ml b/Task/Draw-a-clock/OCaml/draw-a-clock-2.ocaml similarity index 100% rename from Task/Draw-a-clock/OCaml/draw-a-clock-2.ml rename to Task/Draw-a-clock/OCaml/draw-a-clock-2.ocaml diff --git a/Task/Draw-a-clock/OPL/draw-a-clock.opl b/Task/Draw-a-clock/OPL/draw-a-clock.opl deleted file mode 100644 index fbb6eccc6e..0000000000 --- a/Task/Draw-a-clock/OPL/draw-a-clock.opl +++ /dev/null @@ -1,6 +0,0 @@ -REM Series 3a and Series 5 use different modes. This version runs on Series 3a. For Series 5, remove the "2" in the gCLOCK line. - -PROC main: - gCLOCK ON,$29 - GET -ENDP diff --git a/Task/Draw-a-clock/Odin/draw-a-clock.odin b/Task/Draw-a-clock/Odin/draw-a-clock.odin deleted file mode 100644 index f1fd0e6408..0000000000 --- a/Task/Draw-a-clock/Odin/draw-a-clock.odin +++ /dev/null @@ -1,87 +0,0 @@ -package clock - -import rl "vendor:raylib" -import "core:time" -import "core:time/datetime" -import "core:time/timezone" -import "core:os" -import "core:math" - -TimePeriod :: enum { - AM, - PM -} - -DistanceAngle :: proc(distance: f32, angle: f32) -> (vector: rl.Vector2) { - vector.x = math.sin_f32(angle) - vector.y = -math.cos_f32(angle) - vector *= distance - - return -} - -main :: proc() { - tz, ok := timezone.region_load("local") - - rl.SetConfigFlags({.MSAA_4X_HINT}) - rl.InitWindow(640, 480, "Rosetta Code - draw a clock") - - screen_center := rl.Vector2 {f32(rl.GetScreenWidth()) / 2, f32(rl.GetScreenHeight()) / 2} - - for !rl.WindowShouldClose() { - rl.BeginDrawing() - - rl.ClearBackground(rl.RAYWHITE) - - conversion_succeeded: bool = true - date_time: datetime.DateTime - date_time, ok = time.time_to_datetime(time.now()) - if !ok do conversion_succeeded = false - - date_time, ok = timezone.datetime_to_tz(date_time, tz) - if !ok do conversion_succeeded = false - - regular_time: time.Time - regular_time, ok = time.datetime_to_time(date_time) - if !ok do conversion_succeeded = false - - if !conversion_succeeded do os.exit(1) - - period: TimePeriod - hour, min, sec := time.clock_from_time(regular_time) - if hour > 12 { - hour -= 12 - period = .PM - } - - radius := f32(rl.GetScreenHeight()) / 2.5 - - rl.DrawCircleV(screen_center, radius, rl.LIGHTGRAY) - - rl.DrawLineEx(screen_center, screen_center + DistanceAngle(radius * .75, (f32(hour) / 12) * math.TAU), 4, rl.BLACK) - rl.DrawLineEx(screen_center, screen_center + DistanceAngle(radius * .7, (f32(min) / 60) * math.TAU), 4, rl.DARKGREEN) - rl.DrawLineEx(screen_center, screen_center + DistanceAngle(radius * .5, (f32(sec) / 60) * math.TAU), 4, rl.RED) - - for i := 0; i < 60; i += 1 { - angle := (f32(i) / 60) * math.TAU - - inside_distance: f32 = .8 - thickness: f32 = 1.5 - - if i % 5 == 0 { - inside_distance = .775 - thickness = 3 - } - - rl.DrawLineEx(screen_center + DistanceAngle(radius * inside_distance, angle), screen_center + DistanceAngle(radius * .95, angle), thickness, rl.DARKGRAY) - } - - //fmt.printfln("%2d:%2d:%2d %s", hour, min, sec, period) - - rl.EndDrawing() - } - - rl.CloseWindow() - - timezone.region_destroy(tz) -} diff --git a/Task/Draw-a-clock/Perl/draw-a-clock-2.pl b/Task/Draw-a-clock/Perl/draw-a-clock-2.pl deleted file mode 100644 index 3cf966a4c3..0000000000 --- a/Task/Draw-a-clock/Perl/draw-a-clock-2.pl +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/perl - -use strict; # https://rosettacode.org/wiki/Draw_a_clock -use warnings; -use Tk; - -my $halfsize = 200; -my $twopi = 2 * atan2 0, -1; -my $mw = MainWindow->new; -my $c = $mw->Canvas( -width => 2 * $halfsize, -height => 2 * $halfsize)->pack; -$mw->repeat(1000 => \&draw); -MainLoop; - -sub draw - { - $c->delete('all'); - my $angle = time % 60 / 60 * $twopi; - $c->createLine( $halfsize, $halfsize, - $halfsize * (1 + sin $angle), - $halfsize * (1 - cos $angle), - -width => 5); - } diff --git a/Task/Draw-a-clock/Perl/draw-a-clock-1.pl b/Task/Draw-a-clock/Perl/draw-a-clock.pl similarity index 100% rename from Task/Draw-a-clock/Perl/draw-a-clock-1.pl rename to Task/Draw-a-clock/Perl/draw-a-clock.pl diff --git a/Task/Draw-a-clock/Rebol/draw-a-clock.rebol b/Task/Draw-a-clock/Rebol/draw-a-clock.rebol deleted file mode 100644 index 6c3403e1bd..0000000000 --- a/Task/Draw-a-clock/Rebol/draw-a-clock.rebol +++ /dev/null @@ -1,26 +0,0 @@ -Rebol [ - title: "Rosetta code: Draw a clock (CLI)" - file: %Draw_a_clock.r3 - url: https://rosettacode.org/wiki/Draw_a_clock -] - -;; two spaced-separated blocks of Braille-like glyphs (top and bottom halves for digits 0-9 and separator) -s: join { ⡎⢉⢵ ⠀⢺⠀ ⠊⠉⡱ ⠊⣉⡱ ⢀⠔⡇ ⣏⣉⡉ ⣎⣉⡁ ⠊⢉⠝ ⢎⣉⡱ ⡎⠉⢱ ⠀⠶ } - { ⢗⣁⡸ ⢀⣸⣀ ⣔⣉⣀ ⢄⣀⡸ ⠉⠉⡏ ⢄⣀⡸ ⢇⣀⡸ ⢰⠁⠀ ⢇⣀⡸ ⢈⣉⡹ ⠀⠶ } -;; split the big string every 4 chars to get a block of 22 glyph cells (11 top + 11 bottom) -s: split s 4 - -forever [ ;; loop to update the clock every second - tm: format-date-time now "hh:mm:ss" ;; current time string, e.g., "12:34:56" - l1: clear "" ;; buffer for the top line of the big digits - l2: clear "" ;; buffer for the bottom line of the big digits - foreach c tm [ ;; for each character in the time string - i: 1 + c - #"0" ;; convert digit char to 1-based index - append l1 s/(i) ;; append top-half glyph for the digit (for ":" this will intentionally pick the separator at index 11) - append l2 s/(i + 11) ;; append bottom-half glyph (offset by 11 to access the lower row set) - ] - print l1 ;; print top line of large digits - print l2 ;; print bottom line of large digits - wait 1 ;; pause one second - prin "^[[2A" ;; move cursor up 2 lines (ANSI escape) to overwrite in place next iteration -] diff --git a/Task/Draw-a-clock/Red/draw-a-clock-2.red b/Task/Draw-a-clock/Red/draw-a-clock-2.red index 54e7b08da4..7d9f1c70e7 100644 --- a/Task/Draw-a-clock/Red/draw-a-clock-2.red +++ b/Task/Draw-a-clock/Red/draw-a-clock-2.red @@ -1,6 +1,6 @@ Red [ - Needs: 'View - Purpose: {simple analog clock based on Nenad Rakocevic's eve-clock.red, + Needs: 'View + Purpose: {simple analog clock based on Nenad Rakocevic's eve-clock.red, see http://www.red-lang.org/2016/07/eve-style-clock-demo-in-red-livecoded.html} ] diff --git a/Task/Draw-a-clock/Ring/draw-a-clock.ring b/Task/Draw-a-clock/Ring/draw-a-clock.ring deleted file mode 100644 index 2423676512..0000000000 --- a/Task/Draw-a-clock/Ring/draw-a-clock.ring +++ /dev/null @@ -1,96 +0,0 @@ -# Author: Gal Zsolt (CalmoSoft) -load "libsdl.ring" -load "stdlibcore.ring" - -# Settings -screen_w = 640 -screen_h = 480 -xp = screen_w/2 -yp = screen_h/2 -size = 200 -pi = 3.14159265 - -sdl_init(SDL_INIT_EVERYTHING) -window = sdl_createwindow("Analog Clock - CalmoSoft", 100, 100, screen_w, screen_h, SDL_WINDOW_SHOWN) -render = sdl_createrenderer(window, -1, SDL_RENDERER_ACCELERATED) -ev = sdl_new_sdl_event() - -while true - # Event handling - sdl_pollevent(ev) - if sdl_get_sdl_event_type(ev) = SDL_QUIT exit ok - - # Get system time - t = time() - h = 0 + substr(t,1,2) - m = 0 + substr(t,4,2) - s = 0 + substr(t,7,2) - - # Clear background (Black) - sdl_setrenderdrawcolor(render, 0, 0, 0, 255) - sdl_renderclear(render) - - # Draw the clock components - draw_clock(render, xp, yp, size, h, m, s, pi) - - sdl_renderpresent(render) - sdl_delay(100) -end - -# Clean up -sdl_destroyrenderer(render) -sdl_destroywindow(window) -sdl_quit() - -func draw_clock render, x, y, r, h, m, s, pi - # 1. Draw Clock Face (White circle outline) - sdl_setrenderdrawcolor(render, 255, 255, 255, 255) - for i = 0 to 360 step 1 - angle = i * pi / 180 - sdl_renderdrawpoint(render, x + r * cos(angle), y + r * sin(angle)) - next - - # 2. Draw Hour Markers (Ticks) - sdl_setrenderdrawcolor(render, 255, 255, 255, 255) - for i = 1 to 12 - angle = i * 30 * pi / 180 - x1 = x + r * 0.95 * sin(angle) - y1 = y - r * 0.95 * cos(angle) - x2 = x + r * 0.85 * sin(angle) - y2 = y - r * 0.85 * cos(angle) - sdl_renderdrawline(render, x1, y1, x2, y2) - next - - # Calculate angles for hands - s_angle = (s / 60) * 2 * pi - m_angle = ((m + s/60) / 60) * 2 * pi - h_angle = ((h % 12 + m/60) / 12) * 2 * pi - - # 3. Draw Hands (Thickened) - - # Hour Hand (Green - thickest: 5px) - sdl_setrenderdrawcolor(render, 0, 255, 0, 255) - for i = -2 to 2 - sdl_renderdrawline(render, x+i, y+i, x + r*0.5*sin(h_angle)+i, y - r*0.5*cos(h_angle)+i) - next - - # Minute Hand (Blue - medium: 3px) - sdl_setrenderdrawcolor(render, 0, 100, 255, 255) - for i = -1 to 1 - sdl_renderdrawline(render, x+i, y+i, x + r*0.8*sin(m_angle)+i, y - r*0.8*cos(m_angle)+i) - next - - # Second Hand (Red - 2px) - sdl_setrenderdrawcolor(render, 255, 0, 0, 255) - for i = 0 to 1 - sdl_renderdrawline(render, x+i, y+i, x + r*0.9*sin(s_angle)+i, y - r*0.9*cos(s_angle)+i) - next - - # 4. Center Cap (Axis) - sdl_setrenderdrawcolor(render, 200, 200, 200, 255) - for i = 0 to 360 step 10 - angle = i * pi / 180 - for radius = 0 to 5 - sdl_renderdrawpoint(render, x + radius * cos(angle), y + radius * sin(angle)) - next - next diff --git a/Task/Draw-a-clock/Run-BASIC/draw-a-clock.basic b/Task/Draw-a-clock/Run-BASIC/draw-a-clock.basic index db2e14893c..ba1d79746f 100644 --- a/Task/Draw-a-clock/Run-BASIC/draw-a-clock.basic +++ b/Task/Draw-a-clock/Run-BASIC/draw-a-clock.basic @@ -1,10 +1,10 @@ ' -------------------------------------------- ' clock. I got nothing but time ' --------------------------------------------- -n = 12 ' num of points -r = 95 ' radius -pi = 22/7 -alpha = pi * 2 / n +n = 12 ' num of points +r = 95 ' radius +pi = 22/7 +alpha = pi * 2 / n dim points(n) graphic #g2, 200, 200 ' -------------------------------------- @@ -22,58 +22,58 @@ graphic #g2, 200, 200 #g2 place(90,185) #g2 "\6" for i = 0 to n - 1 - theta = alpha * i - px = cos( theta ) * r - py = sin( theta ) * r - px = px + 100 - py = py + 100 - #g2 place(px,py) - #g2 circle(2) + theta = alpha * i + px = cos( theta ) * r + py = sin( theta ) * r + px = px + 100 + py = py + 100 + #g2 place(px,py) + #g2 circle(2) next i [shoTime] ' ------------------------- ' clear previous sec,min,hr ' ------------------------- -r = 63 -p = se +r = 63 +p = se #g2 color("white") gosub [h2Dot] -r = 50 -p = mi +r = 50 +p = mi #g2 color("white") gosub [h2Dot] -r = 30 ' radius -p = hr * 5 +r = 30 ' radius +p = hr * 5 #g2 color("white") gosub [h2Dot] ' ------------------------- ' Show new time ' ------------------------- -a$ = time$() -hr = val(word$(a$,1,":")) -mi = val(word$(a$,2,":")) -se = val(word$(a$,3,":")) +a$ = time$() +hr = val(word$(a$,1,":")) +mi = val(word$(a$,2,":")) +se = val(word$(a$,3,":")) ' put time on the clock - gimme a hand #g2 size(4) ' second hand -n = 60 -r = 63 -p = se +n = 60 +r = 63 +p = se #g2 color("blue") gosub [h2Dot] ' minute hand -r = 50 -p = mi +r = 50 +p = mi #g2 color("green") gosub [h2Dot] ' hour hand -r = 30 ' radius -p = hr * 5 +r = 30 ' radius +p = hr * 5 #g2 color("red") gosub [h2Dot] @@ -82,13 +82,13 @@ end ' a one liner [h2Dot] -alpha = pi * 2 / n -i = p - 15 -theta = alpha * i -px = cos( theta ) * r -py = sin( theta ) * r -px = px + 100 -py = py + 100 +alpha = pi * 2 / n +i = p - 15 +theta = alpha * i +px = cos( theta ) * r +py = sin( theta ) * r +px = px + 100 +py = py + 100 #g2 place(px,py) #g2 circle(2) #g2 line(100,100,px,py) diff --git a/Task/Draw-a-clock/Rust/draw-a-clock.rs b/Task/Draw-a-clock/Rust/draw-a-clock.rust similarity index 100% rename from Task/Draw-a-clock/Rust/draw-a-clock.rs rename to Task/Draw-a-clock/Rust/draw-a-clock.rust diff --git a/Task/Draw-a-clock/Scheme/draw-a-clock.scm b/Task/Draw-a-clock/Scheme/draw-a-clock.ss similarity index 100% rename from Task/Draw-a-clock/Scheme/draw-a-clock.scm rename to Task/Draw-a-clock/Scheme/draw-a-clock.ss diff --git a/Task/Draw-a-clock/Tcl/draw-a-clock.tcl b/Task/Draw-a-clock/Tcl/draw-a-clock.tcl index 807543cf21..9facb5b050 100644 --- a/Task/Draw-a-clock/Tcl/draw-a-clock.tcl +++ b/Task/Draw-a-clock/Tcl/draw-a-clock.tcl @@ -13,9 +13,9 @@ proc updateClock t { set m [expr {$m + $s/60.0}] set h [expr {($h % 12 + $m/60.0) * 5}] foreach tag {hour minute second} value [list $h $m $s] len {50 80 80} { - .c coords $tag 100 100 \ - [expr {100 + $len*sin($value/30.0*3.14159)}] \ - [expr {100 - $len*cos($value/30.0*3.14159)}] + .c coords $tag 100 100 \ + [expr {100 + $len*sin($value/30.0*3.14159)}] \ + [expr {100 - $len*cos($value/30.0*3.14159)}] } } @@ -26,8 +26,8 @@ proc ticker {} { set t [clock seconds] after 250 ticker if {$t != $time} { - set time $t - updateClock $t + set time $t + updateClock $t } } ticker diff --git a/Task/Draw-a-clock/V-(Vlang)/draw-a-clock.v b/Task/Draw-a-clock/V-(Vlang)/draw-a-clock.v index f09fa7b1a3..dc23e77300 100644 --- a/Task/Draw-a-clock/V-(Vlang)/draw-a-clock.v +++ b/Task/Draw-a-clock/V-(Vlang)/draw-a-clock.v @@ -7,164 +7,164 @@ import math import time const ( - // All coordinates are designed for a clock size of this many pixel. - // You cannot change the size of the clock by adjusting this value. - design_size = 700 - center = 350 + // All coordinates are designed for a clock size of this many pixel. + // You cannot change the size of the clock by adjusting this value. + design_size = 700 + center = 350 - // Half the width of a tic-mark. - tw = 9 - // Height of a minute tic-mark. (hour is twice, 3-hour is thrice) - th = 25 - // Padding of tic-mark to window border - tp = 10 + // Half the width of a tic-mark. + tw = 9 + // Height of a minute tic-mark. (hour is twice, 3-hour is thrice) + th = 25 + // Padding of tic-mark to window border + tp = 10 - tic_color = gx.Color{ - r: 50 - g: 50 - b: 50 - } - hand_color = gx.black - second_hand_color = gx.red + tic_color = gx.Color{ + r: 50 + g: 50 + b: 50 + } + hand_color = gx.black + second_hand_color = gx.red ) struct App { - minutes_tic []f32 = [f32(center - tw), tp, center + tw, tp, center + tw, tp, center + tw, - tp + 1 * th, center - tw, tp + 1 * th] - hours_tic []f32 = [f32(center - tw), tp, center + tw, tp, center + tw, tp, center + tw, tp + 2 * th, - center - tw, tp + 2 * th] - hours3_tic []f32 = [f32(center - tw), tp, center + tw, tp, center + tw, tp, center + tw, tp + 3 * th, - center - tw, tp + 3 * th] + minutes_tic []f32 = [f32(center - tw), tp, center + tw, tp, center + tw, tp, center + tw, + tp + 1 * th, center - tw, tp + 1 * th] + hours_tic []f32 = [f32(center - tw), tp, center + tw, tp, center + tw, tp, center + tw, tp + 2 * th, + center - tw, tp + 2 * th] + hours3_tic []f32 = [f32(center - tw), tp, center + tw, tp, center + tw, tp, center + tw, tp + 3 * th, + center - tw, tp + 3 * th] - hour_hand []f32 = [f32(329), 161, 350, 140, 371, 161, 371, 413, 329, 413] - minute_hand []f32 = [f32(334.25), 40.25, 350, 24.5, 365.75, 40.25, 365.75, 427, 334.25, 427] - second_hand []f32 = [f32(345.8), 38.5, 350, 34.3, 354.2000, 38.5, 358.75, 427, 341.25, 427] - mut: - gg &gg.Context = unsafe { nil } - draw_flag bool = true - dpi_scale f32 = 1.0 + hour_hand []f32 = [f32(329), 161, 350, 140, 371, 161, 371, 413, 329, 413] + minute_hand []f32 = [f32(334.25), 40.25, 350, 24.5, 365.75, 40.25, 365.75, 427, 334.25, 427] + second_hand []f32 = [f32(345.8), 38.5, 350, 34.3, 354.2000, 38.5, 358.75, 427, 341.25, 427] + mut: + gg &gg.Context = unsafe { nil } + draw_flag bool = true + dpi_scale f32 = 1.0 } fn on_frame(mut app App) { - if !app.draw_flag { - return - } - app.gg.begin() + if !app.draw_flag { + return + } + app.gg.begin() - for i in 0 .. 60 { // draw minute tics - draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.minutes_tic, tic_color, - i * 6) - } - for i in 0 .. 12 { // hours - draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.hours_tic, tic_color, i * 30) - } - for i in 0 .. 4 { // 3 hours - draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.hours3_tic, tic_color, - i * 90) - } + for i in 0 .. 60 { // draw minute tics + draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.minutes_tic, tic_color, + i * 6) + } + for i in 0 .. 12 { // hours + draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.hours_tic, tic_color, i * 30) + } + for i in 0 .. 4 { // 3 hours + draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.hours3_tic, tic_color, + i * 90) + } - n := time.now() + n := time.now() - // draw hour hand - i := f32(n.hour) + f32(n.minute) / 60.0 - draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.hour_hand, hand_color, i * 30) + // draw hour hand + i := f32(n.hour) + f32(n.minute) / 60.0 + draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.hour_hand, hand_color, i * 30) - // draw minute hand - mut j := f32(n.minute) - if n.second == 59 { // make minute hand move smoothly - j += f32(math.sin(f32(n.microsecond) / 1e6 * math.pi / 2.0)) - } - draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.minute_hand, hand_color, j * 6) + // draw minute hand + mut j := f32(n.minute) + if n.second == 59 { // make minute hand move smoothly + j += f32(math.sin(f32(n.microsecond) / 1e6 * math.pi / 2.0)) + } + draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.minute_hand, hand_color, j * 6) - // draw second hand with smooth transition - k := f32(n.second) + f32(math.sin(f32(n.microsecond) / 1e6 * math.pi / 2.0)) - draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.second_hand, second_hand_color, - 0 + k * 6) + // draw second hand with smooth transition + k := f32(n.second) + f32(math.sin(f32(n.microsecond) / 1e6 * math.pi / 2.0)) + draw_convex_poly_rotate(mut app.gg, app.dpi_scale, app.second_hand, second_hand_color, + 0 + k * 6) - app.gg.end() + app.gg.end() } // Rotate a polygon round the centerpoint [manualfree] fn draw_convex_poly_rotate(mut ctx gg.Context, dpi_scale f32, points []f32, c gx.Color, angle f32) { - sa := math.sin(math.pi * angle / 180.0) - ca := math.cos(math.pi * angle / 180.0) + sa := math.sin(math.pi * angle / 180.0) + ca := math.cos(math.pi * angle / 180.0) - mut rotated_points := []f32{cap: points.len} - for i := 0; i < points.len / 2; i++ { - x := points[2 * i] - y := points[2 * i + 1] - xn := f32((x - center) * ca - (y - center) * sa) - yn := f32((x - center) * sa + (y - center) * ca) - rotated_points << (xn + center) * dpi_scale - rotated_points << (yn + center) * dpi_scale - } - ctx.draw_convex_poly(rotated_points, c) - unsafe { rotated_points.free() } + mut rotated_points := []f32{cap: points.len} + for i := 0; i < points.len / 2; i++ { + x := points[2 * i] + y := points[2 * i + 1] + xn := f32((x - center) * ca - (y - center) * sa) + yn := f32((x - center) * sa + (y - center) * ca) + rotated_points << (xn + center) * dpi_scale + rotated_points << (yn + center) * dpi_scale + } + ctx.draw_convex_poly(rotated_points, c) + unsafe { rotated_points.free() } } fn (mut app App) resize() { - size := gg.window_size() - // avoid calls when minimized - if size.width < 2 && size.height < 2 { - return - } - w := f32(size.width) / design_size - h := f32(size.height) / design_size - app.dpi_scale = if w < h { w } else { h } + size := gg.window_size() + // avoid calls when minimized + if size.width < 2 && size.height < 2 { + return + } + w := f32(size.width) / design_size + h := f32(size.height) / design_size + app.dpi_scale = if w < h { w } else { h } } fn on_event(e &gg.Event, mut app App) { - match e.typ { - .resized, .resumed { - app.resize() - } - .iconified { - app.draw_flag = false - } - .restored { - app.draw_flag = true - app.resize() - } - else { - if e.typ == .key_down { - match e.key_code { - .q { - println('Good bye.') - // do we need to free anything here? - app.gg.quit() - } - else {} - } - } - } - } + match e.typ { + .resized, .resumed { + app.resize() + } + .iconified { + app.draw_flag = false + } + .restored { + app.draw_flag = true + app.resize() + } + else { + if e.typ == .key_down { + match e.key_code { + .q { + println('Good bye.') + // do we need to free anything here? + app.gg.quit() + } + else {} + } + } + } + } } fn on_init(mut app App) { - app.resize() + app.resize() } fn main() { - println("Press 'q' to quit.") - mut font_path := os.resource_abs_path(os.join_path('..', 'assets', 'fonts', 'RobotoMono-Regular.ttf')) - $if android { - font_path = 'fonts/RobotoMono-Regular.ttf' - } + println("Press 'q' to quit.") + mut font_path := os.resource_abs_path(os.join_path('..', 'assets', 'fonts', 'RobotoMono-Regular.ttf')) + $if android { + font_path = 'fonts/RobotoMono-Regular.ttf' + } - mut app := &App{} + mut app := &App{} - app.gg = gg.new_context( - width: design_size - height: design_size - window_title: 'Clock!' - bg_color: gx.white - user_data: app - frame_fn: on_frame - event_fn: on_event - init_fn: on_init - font_path: font_path - ) + app.gg = gg.new_context( + width: design_size + height: design_size + window_title: 'Clock!' + bg_color: gx.white + user_data: app + frame_fn: on_frame + event_fn: on_event + init_fn: on_init + font_path: font_path + ) - app.gg.run() + app.gg.run() } diff --git a/Task/Draw-a-clock/VBScript/draw-a-clock.vbs b/Task/Draw-a-clock/VBScript/draw-a-clock.vb similarity index 100% rename from Task/Draw-a-clock/VBScript/draw-a-clock.vbs rename to Task/Draw-a-clock/VBScript/draw-a-clock.vb diff --git a/Task/Draw-a-clock/XPL0/draw-a-clock.xpl0 b/Task/Draw-a-clock/XPL0/draw-a-clock.xpl0 deleted file mode 100644 index bc2a9acaa1..0000000000 --- a/Task/Draw-a-clock/XPL0/draw-a-clock.xpl0 +++ /dev/null @@ -1,48 +0,0 @@ -include xpllib; \for DrawCircle, DrawLine, LineWidth, MovePen, Deg2Rad -def X0=400, Y0=300; \center coordinate -int Hour, Minute, Second; - -proc DrawHand(Angle, Length, Width, Color); -real Angle, Length; -int Width, Color; -int X, Y; -[X:= fix(Length*Sin(Angle)); - Y:= fix(Length*Cos(Angle)); -LineWidth:= Width; -MovePen(X0, Y0); -DrawLine(X0+X, Y0-Y, Color); -]; - -proc DrawClock; \Show analog clock with current time -real Angle; -int N, X, Y; -[DrawCircle(X0, Y0, 299, LCyan, true); -Angle:= 0.; -for N:= 0 to 59 do \draw tick marks - [X:= fix(260.*Cos(Angle)); - Y:= fix(260.*Sin(Angle)); - DrawCircle(X+X0, Y+Y0, if rem(N/5) then 4 else 8, Black, true); - Angle:= Angle + 6.*Deg2Rad; - ]; -Angle:= float((Hour*60+Minute)/2) * Deg2Rad; -DrawHand(Angle, 210., 8, Black); -Angle:= float((Minute*60+Second)/10) * Deg2Rad; -DrawHand(Angle, 240., 5, Black); -Angle:= float(Second*6) * Deg2Rad; -DrawHand(Angle, 260., 3, LRed); -DrawCircle(X0, Y0, 8, Black, true); -]; - -int Second0; -char Time; -[SetVid($103); \800x600x8 -InitDraw; -repeat Time:= GetDateTime; - Hour:= Time(3); - if Hour>=12 then Hour:= Hour-12; - Minute:= Time(4); - Second:= Time(5); - if Second # Second0 then - [Second0:= Second; DrawClock]; -until KeyHit; -] diff --git a/Task/Draw-a-clock/Yabasic/draw-a-clock-2.basic b/Task/Draw-a-clock/Yabasic/draw-a-clock-2.basic index b45d5ff708..fa5e883c66 100644 --- a/Task/Draw-a-clock/Yabasic/draw-a-clock-2.basic +++ b/Task/Draw-a-clock/Yabasic/draw-a-clock-2.basic @@ -27,142 +27,142 @@ clockface() do - hour = val(mid$(time$,1,2)) - mins = val(mid$(time$,4,2)) - sec = val(mid$(time$,7,2)) + hour = val(mid$(time$,1,2)) + mins = val(mid$(time$,4,2)) + sec = val(mid$(time$,7,2)) + + updatehand("sec") + updatehand("mins") + updatehand("hour") - updatehand("sec") - updatehand("mins") - updatehand("hour") - - pause .25 + pause .25 loop sub updatehand(hand$) + + switch(hand$) + case "sec" + h_len = shand + angle = sec * 6 + width = 6 + color 255,0,0 + ox = osx + oy = osy + oxm1 = osxm1 + oxm2 = osxm2 + oym1 = osym1 + oym2 = osym2 + break + case "mins" + h_len = mhand + angle = mins * 6 + int(sec/10) + width = 12 + color 0,255,0 + ox = omx + oy = omy + oxm1 = omxm1 + oxm2 = omxm2 + oym1 = omym1 + oym2 = omym2 + break + case "hour" + h_len = hhand + angle = ((hour * 30) + (minutes / 12) * 6) + int(mins/2) + width = 15 + color 0,0,255 + ox = ohx + oy = ohy + oxm1 = ohxm1 + oxm2 = ohxm2 + oym1 = ohym1 + oym2 = ohym2 + break + end switch - switch(hand$) - case "sec" - h_len = shand - angle = sec * 6 - width = 6 - color 255,0,0 - ox = osx - oy = osy - oxm1 = osxm1 - oxm2 = osxm2 - oym1 = osym1 - oym2 = osym2 - break - case "mins" - h_len = mhand - angle = mins * 6 + int(sec/10) - width = 12 - color 0,255,0 - ox = omx - oy = omy - oxm1 = omxm1 - oxm2 = omxm2 - oym1 = omym1 - oym2 = omym2 - break - case "hour" - h_len = hhand - angle = ((hour * 30) + (minutes / 12) * 6) + int(mins/2) - width = 15 - color 0,0,255 - ox = ohx - oy = ohy - oxm1 = ohxm1 - oxm2 = ohxm2 - oym1 = ohym1 - oym2 = ohym2 - break - end switch + h_angle1 = angle - width + if h_angle1 < 0 then + h_angle1 = h_angle1 + 360 + endif + h_angle1 = h_angle1 / DEG_PER_RAD + + h_angle2 = angle + width + if h_angle2 > 360 then + h_angle2 = h_angle2 - 360 + endif + h_angle2 = h_angle2 / DEG_PER_RAD + + angle = angle / DEG_PER_RAD + + x = (hx + (sin(angle) * h_len)) + xm1 = (hx + (sin(h_angle1) * int(h_len * .2))) + xm2 = (hx + (sin(h_angle2) * int(h_len * .2))) - h_angle1 = angle - width - if h_angle1 < 0 then - h_angle1 = h_angle1 + 360 - endif - h_angle1 = h_angle1 / DEG_PER_RAD + y = (hy - (cos(angle) * h_len)) + ym1 = (hy - (cos(h_angle1) * int(h_len * .2))) + ym2 = (hy - (cos(h_angle2) * int(h_len * .2))) - h_angle2 = angle + width - if h_angle2 > 360 then - h_angle2 = h_angle2 - 360 - endif - h_angle2 = h_angle2 / DEG_PER_RAD - - angle = angle / DEG_PER_RAD - - x = (hx + (sin(angle) * h_len)) - xm1 = (hx + (sin(h_angle1) * int(h_len * .2))) - xm2 = (hx + (sin(h_angle2) * int(h_len * .2))) - - y = (hy - (cos(angle) * h_len)) - ym1 = (hy - (cos(h_angle1) * int(h_len * .2))) - ym2 = (hy - (cos(h_angle2) * int(h_len * .2))) - - clear line hx,hy,oxm1,oym1 - clear line hx,hy,oxm2,oym2 - clear line oxm1,oym1,ox,oy - clear line oxm2,oym2,ox,oy - line hx,hy,xm1,ym1 - line hx,hy,xm2,ym2 - line xm1,ym1,x,y - line xm2,ym2,x,y - - REM save off the old vals - switch(hand$) - case "sec" - osx = x - osy = y - osxm1 = xm1 - osxm2 = xm2 - osym1 = ym1 - osym2 = ym2 - break - case "mins" - omx = x - omy = y - omxm1 = xm1 - omxm2 = xm2 - omym1 = ym1 - omym2 = ym2 - break - case "hour" - ohx = x - ohy = y - ohxm1 = xm1 - ohxm2 = xm2 - ohym1 = ym1 - ohym2 = ym2 - break - end switch + clear line hx,hy,oxm1,oym1 + clear line hx,hy,oxm2,oym2 + clear line oxm1,oym1,ox,oy + clear line oxm2,oym2,ox,oy + line hx,hy,xm1,ym1 + line hx,hy,xm2,ym2 + line xm1,ym1,x,y + line xm2,ym2,x,y + + REM save off the old vals + switch(hand$) + case "sec" + osx = x + osy = y + osxm1 = xm1 + osxm2 = xm2 + osym1 = ym1 + osym2 = ym2 + break + case "mins" + omx = x + omy = y + omxm1 = xm1 + omxm2 = xm2 + omym1 = ym1 + omym2 = ym2 + break + case "hour" + ohx = x + ohy = y + ohxm1 = xm1 + ohxm2 = xm2 + ohym1 = ym1 + ohym2 = ym2 + break + end switch end sub sub clockface() - circle hx,hy,radius + circle hx,hy,radius + + htick = radius / 10 + mtick = htick / 2 + + for z=0 to 360 step 6 + REM Begin at zero deg and stop before 360 deg - htick = radius / 10 - mtick = htick / 2 - - for z=0 to 360 step 6 - REM Begin at zero deg and stop before 360 deg - - REM draw the hour markers - angle = z - angle = angle / DEG_PER_RAD - x2 = (hx + (sin(angle) * radius)) - y2 = (hy - (cos(angle) * radius)) - if mod(z,30) = 0 then - tick = htick - else - tick = mtick - endif - x3 = (hx + (sin(angle) * (radius - tick))) - y3 = (hy - (cos(angle) * (radius - tick))) - color 255,0,0 - line x2,y2,x3,y3 - color 0,0,0 - next z + REM draw the hour markers + angle = z + angle = angle / DEG_PER_RAD + x2 = (hx + (sin(angle) * radius)) + y2 = (hy - (cos(angle) * radius)) + if mod(z,30) = 0 then + tick = htick + else + tick = mtick + endif + x3 = (hx + (sin(angle) * (radius - tick))) + y3 = (hy - (cos(angle) * (radius - tick))) + color 255,0,0 + line x2,y2,x3,y3 + color 0,0,0 + next z end sub diff --git a/Task/Draw-a-clock/Zkl/draw-a-clock.zkl b/Task/Draw-a-clock/Zkl/draw-a-clock.zkl index 50f06ab266..9819c7b3a4 100644 --- a/Task/Draw-a-clock/Zkl/draw-a-clock.zkl +++ b/Task/Draw-a-clock/Zkl/draw-a-clock.zkl @@ -4,7 +4,7 @@ var while(True){ x:=Time.Date.ctime()[11,8] // or Time.Date.to24HString() (no seconds) .pump(List,fcn(n){ n.toAsc() - 0x30 }); //-->L(2,3,10,4,3,10,5,2) - print("\e[H\e[J"); // home and clear screen on ANSI terminals + print("\e[H\e[J"); // home and clear screen on ANSI terminals println(x.pump(String,t.get),"\n",x.pump(String,b.get)); Atomic.sleep(1); } diff --git a/Task/Draw-a-cuboid/ALGOL-68/draw-a-cuboid.alg b/Task/Draw-a-cuboid/ALGOL-68/draw-a-cuboid.alg deleted file mode 100644 index a10b794b17..0000000000 --- a/Task/Draw-a-cuboid/ALGOL-68/draw-a-cuboid.alg +++ /dev/null @@ -1,58 +0,0 @@ -BEGIN # draw some cuboids using ASCII art # - - # draws a cuboid standing on one edge using ASCII art # - PROC aa cuboid = ( INT h, w, l )VOID: - BEGIN - # top line # - TO l DO print( ( " " ) ) OD; - TO w + 1 DO print( ( "_" ) ) OD; - print( ( newline ) ); - # rest of the top face and part of the visible side # - INT face width := 0; - INT edge pos := 0; - FOR i TO l DO - TO l - i DO print( ( " " ) ) OD; - print( ( "/" ) ); - TO w DO print( ( IF i = l THEN "_" ELSE " " FI ) ) OD; - print( ( "/" ) ); - edge pos +:= 1; - IF edge pos <= h THEN - # drsw the back edge # - face width := 2 * ( edge pos - 1 ); - TO face width DO print( ( " " ) ) OD; - print( ( "\" ) ) - ELSE - # draw the bottom edge # - TO face width + 1 DO print( ( " " ) ) OD; - print( ( "/" ) ) - FI; - print( ( newline ) ) - OD; - # other vidible face # - FOR i TO h DO - TO i - 1 DO print( ( " " ) ) OD; - print( ( "\" ) ); - TO w DO print( ( IF i = h THEN "_" ELSE " " FI ) ) OD; - print( ( "\" ) ); - edge pos +:= 1; - IF edge pos <= h THEN - # drsw the back edge # - TO face width + 1 DO print( ( " " ) ) OD; - print( ( "\" ) ) - ELSE - # draw the bottom edge # - TO face width DO print( ( " " ) ) OD; - face width -:= 2; - print( ( "/" ) ) - FI; - print( ( newline ) ) - OD - - END # aa cuboid # ; - - aa cuboid( 3, 2, 4 ); - aa cuboid( 4, 3, 2 ); - aa cuboid( 2, 4, 3 ); - aa cuboid( 2, 3, 4 ) - -END diff --git a/Task/Draw-a-cuboid/Ada/draw-a-cuboid.adb b/Task/Draw-a-cuboid/Ada/draw-a-cuboid.ada similarity index 100% rename from Task/Draw-a-cuboid/Ada/draw-a-cuboid.adb rename to Task/Draw-a-cuboid/Ada/draw-a-cuboid.ada diff --git a/Task/Draw-a-cuboid/Delphi/draw-a-cuboid.pas b/Task/Draw-a-cuboid/Delphi/draw-a-cuboid.delphi similarity index 100% rename from Task/Draw-a-cuboid/Delphi/draw-a-cuboid.pas rename to Task/Draw-a-cuboid/Delphi/draw-a-cuboid.delphi diff --git a/Task/Draw-a-cuboid/EasyLang/draw-a-cuboid.easy b/Task/Draw-a-cuboid/EasyLang/draw-a-cuboid.easy index 382a35c46e..7a8d34b01a 100644 --- a/Task/Draw-a-cuboid/EasyLang/draw-a-cuboid.easy +++ b/Task/Draw-a-cuboid/EasyLang/draw-a-cuboid.easy @@ -1,12 +1,14 @@ node[][] = [ [ -1 -2 -2 ] [ -1 -2 1 ] [ -1 2 -2 ] [ -1 2 1 ] [ 1 -2 -2 ] [ 1 -2 1 ] [ 1 2 -2 ] [ 1 2 1 ] ] edge[][] = [ [ 1 2 ] [ 2 4 ] [ 4 3 ] [ 3 1 ] [ 5 6 ] [ 6 8 ] [ 8 7 ] [ 7 5 ] [ 1 5 ] [ 2 6 ] [ 3 7 ] [ 4 8 ] ] # -proc scale f . - for i = 1 to len node[][] : for d = 1 to 3 - node[i][d] *= f +proc scale f . . + for i = 1 to len node[][] + for d = 1 to 3 + node[i][d] *= f + . . . -proc rotate angx angy . +proc rotate angx angy . . sinx = sin angx cosx = cos angx siny = sin angy @@ -22,9 +24,10 @@ proc rotate angx angy . . . len nd[] 3 -proc draw . - gclear - gtext 2 2 "Arrow keys to rotate" +proc draw . . + clear + move 2 2 + text "Arrow keys to rotate" m = 99999 mi = -1 for i = 1 to len node[][] @@ -43,21 +46,24 @@ proc draw . ix += 1 . . - for ni = 1 to len nd[] : for i = 1 to len edge[][] - if edge[i][1] = nd[ni] or edge[i][2] = nd[ni] - x1 = node[edge[i][1]][1] - y1 = node[edge[i][1]][2] - x2 = node[edge[i][2]][1] - y2 = node[edge[i][2]][2] - gline x1 + 50 y1 + 50 x2 + 50 y2 + 50 + for ni = 1 to len nd[] + for i = 1 to len edge[][] + if edge[i][1] = nd[ni] or edge[i][2] = nd[ni] + x1 = node[edge[i][1]][1] + y1 = node[edge[i][1]][2] + x2 = node[edge[i][2]][1] + y2 = node[edge[i][2]][2] + move x1 + 50 y1 + 50 + line x2 + 50 y2 + 50 + . . . . -gtextsize 3 +textsize 3 scale 15 rotate 45 45 draw -on key_down +on key if keybkey = "ArrowUp" rotate 0 1 elif keybkey = "ArrowDown" diff --git a/Task/Draw-a-cuboid/Elixir/draw-a-cuboid.ex b/Task/Draw-a-cuboid/Elixir/draw-a-cuboid.elixir similarity index 100% rename from Task/Draw-a-cuboid/Elixir/draw-a-cuboid.ex rename to Task/Draw-a-cuboid/Elixir/draw-a-cuboid.elixir diff --git a/Task/Draw-a-cuboid/Jq/draw-a-cuboid.jq b/Task/Draw-a-cuboid/Jq/draw-a-cuboid.jq deleted file mode 100644 index 6f59cbd05c..0000000000 --- a/Task/Draw-a-cuboid/Jq/draw-a-cuboid.jq +++ /dev/null @@ -1,27 +0,0 @@ -def cubLine($n; $dx; $dy; $cde): - def s: if . == 0 then "" else . * " " end; # for jaq - reduce range(1; 9*$dx) as $d ("\($n|s)\($cde[0:1])"; - . + $cde[1:2] ) - + $cde[0:1] - + ("\($dy|s)\($cde[2:])"); - -def cuboid($dx; $dy; $dz): - "cuboid \($dx) \($dy) \($dz):", - # top - cubLine($dy+1; $dx; 0; "+-"), - # top and side - (range(1; 1+$dy) as $i | cubLine($dy-$i+1; $dx; $i-1; "/ |")), - cubLine(0; $dx; $dy; "+-|"), - # front and side - (range(1; 4*$dz -$dy-2) as $i | cubLine(0; $dx; $dy; "| |")), - cubLine(0; $dx; $dy; "| +"), - # front and bottom - (range(1; 1+$dy) as $i | cubLine(0; $dx; $dy-$i; "| /")), - # bottom - cubLine(0; $dx; 0; "+-\n"); - -cuboid(2; 3; 4), -"", -cuboid(1; 1; 1), -"", -cuboid(6; 2; 1) diff --git a/Task/Draw-a-cuboid/Julia/draw-a-cuboid.jl b/Task/Draw-a-cuboid/Julia/draw-a-cuboid.julia similarity index 100% rename from Task/Draw-a-cuboid/Julia/draw-a-cuboid.jl rename to Task/Draw-a-cuboid/Julia/draw-a-cuboid.julia diff --git a/Task/Draw-a-cuboid/Kotlin/draw-a-cuboid.kts b/Task/Draw-a-cuboid/Kotlin/draw-a-cuboid.kotlin similarity index 100% rename from Task/Draw-a-cuboid/Kotlin/draw-a-cuboid.kts rename to Task/Draw-a-cuboid/Kotlin/draw-a-cuboid.kotlin diff --git a/Task/Draw-a-cuboid/Locomotive-Basic/draw-a-cuboid.basic b/Task/Draw-a-cuboid/Locomotive-Basic/draw-a-cuboid.basic deleted file mode 100644 index c7b41f6d6b..0000000000 --- a/Task/Draw-a-cuboid/Locomotive-Basic/draw-a-cuboid.basic +++ /dev/null @@ -1,6 +0,0 @@ -10 mode 2: origin 100,0: w=120: height=w*1.5: depth=w*2 -20 x=80: y=10 -30 plot x,y -40 drawr 0,height: drawr w,0: drawr 0,-height: drawr -w,0: rem front -50 plot x,y+height: drawr depth/2,height: drawr w,0: drawr 0,-height: drawr -w,-height -60 plot x+w,y+height: drawr depth/2,height diff --git a/Task/Draw-a-cuboid/Odin/draw-a-cuboid.odin b/Task/Draw-a-cuboid/Odin/draw-a-cuboid.odin deleted file mode 100644 index aa3dcf8563..0000000000 --- a/Task/Draw-a-cuboid/Odin/draw-a-cuboid.odin +++ /dev/null @@ -1,35 +0,0 @@ -package cuboid - -import rl "vendor:raylib" - -main :: proc() { - rl.InitWindow(640, 480, "Rosetta Code - draw a cuboid") - - camera: rl.Camera3D - camera.fovy = 45 - camera.position = {0, 5, 10} - camera.up = {0, 1, 0} - - for !rl.WindowShouldClose() { - rl.UpdateCamera(&camera, .ORBITAL) - - rl.BeginDrawing() - - rl.ClearBackground(rl.RAYWHITE) - - rl.BeginMode3D(camera) - - rl.DrawGrid(25, .5) - - cube := rl.Vector3 {2, 3, 4} - - rl.DrawCubeV({}, cube, rl.LIME) - rl.DrawCubeWiresV({}, cube, rl.DARKGREEN) - - rl.EndMode3D() - - rl.EndDrawing() - } - - rl.CloseWindow() -} diff --git a/Task/Draw-a-cuboid/PL-M/draw-a-cuboid.plm b/Task/Draw-a-cuboid/PL-M/draw-a-cuboid.plm deleted file mode 100644 index 09220af2ea..0000000000 --- a/Task/Draw-a-cuboid/PL-M/draw-a-cuboid.plm +++ /dev/null @@ -1,81 +0,0 @@ -100H: /* DRAW SOME CUBOIDS USING ASCII ART */ - - /* CP/M BDOS SYSTEM CALL AND I/O ROUTINES */ - BDOS: PROCEDURE( FN, ARG ); DECLARE FN BYTE, ARG ADDRESS; GOTO 5; END; - PR$CHAR: PROCEDURE( C ); DECLARE C BYTE; CALL BDOS( 2, C ); END; - PR$NL: PROCEDURE; CALL PR$CHAR( 0DH ); CALL PR$CHAR( 0AH ); END; - - /* TASK */ - - /* DRAWS A CUBOID STANDING ON ONE EDGE USING ASCII ART */ - DRAW$CUBOID: PROCEDURE( H, W, L ); - DECLARE ( H, W, L ) BYTE; - DECLARE ( I, J, FACE$WIDTH, EDGE$POS ) BYTE; - - BACKSLASH: PROCEDURE; CALL PR$CHAR( 92 ); END; /* PRINTS A BACKSLASH */ - REPEAT$CHAR: PROCEDURE( CH, COUNT ); /* PRINTS CH COUNT TIMES */ - DECLARE ( CH, COUNT ) BYTE; - DECLARE I BYTE; - IF COUNT > 0 THEN DO; - DO I = 1 TO COUNT; CALL PR$CHAR( CH ); END; - END; - END REPEAT$CHAR; - UNDERSCORES: PROCEDURE( COUNT ); /* PRINTS COUNT UNDERSCORES */ - DECLARE COUNT BYTE; - CALL REPEAT$CHAR( 95, COUNT ); - END UNDERSCORES; - - /* TOP LINE */ - CALL REPEAT$CHAR( ' ', L ); CALL UNDERSCORES( W + 1 ); CALL PR$NL; - /* REST OF THE TOP FACE AND PART OF THE VISIBLE SIDE */ - FACE$WIDTH = 0; - EDGE$POS = 0; - DO I = 1 TO L; - CALL REPEAT$CHAR( ' ', L - I ); - CALL PR$CHAR( '/' ); - IF I = L THEN CALL UNDERSCORES( W ); - ELSE CALL REPEAT$CHAR( ' ', W ); - CALL PR$CHAR( '/' ); - EDGE$POS = EDGE$POS + 1; - IF EDGE$POS <= H THEN DO; - /* DRAW THE BACK EDGE */ - FACE$WIDTH = 2 * ( EDGE$POS - 1 ); - CALL REPEAT$CHAR( ' ', FACE$WIDTH ); - CALL BACKSLASH; - END; - ELSE DO; - /* DRAW THE BOTTOM EDGE AND THE MORE OF THE VISIBLE SIDE */ - CALL REPEAT$CHAR( ' ', FACE$WIDTH + 1 ); - CALL PR$CHAR( '/' ); - END; - CALL PR$NL; - END; - /* OTHER VISIBLE FACE */ - DO I = 1 TO H; - CALL REPEAT$CHAR( ' ', I - 1 ); - CALL BACKSLASH; - IF I = H THEN CALL UNDERSCORES( W ); - ELSE CALL REPEAT$CHAR( ' ', W ); - CALL BACKSLASH; - EDGE$POS = EDGE$POS + 1; - IF EDGE$POS <= H THEN DO; - /* DRAW THE BACK EDGE */ - CALL REPEAT$CHAR( ' ', FACE$WIDTH + 1 ); - CALL BACKSLASH; - END; - ELSE DO; - /* DRAW THE BOTTOM EDGE */ - CALL REPEAT$CHAR( ' ', FACE$WIDTH ); - FACE$WIDTH = FACE$WIDTH - 2; - CALL PR$CHAR( '/' ); - END; - CALL PR$NL; - END; - END DRAW$CUBOID; - - CALL DRAW$CUBOID( 3, 2, 4 ); - CALL DRAW$CUBOID( 4, 3, 2 ); - CALL DRAW$CUBOID( 2, 4, 3 ); - CALL DRAW$CUBOID( 2, 3, 4 ); - -EOF diff --git a/Task/Draw-a-cuboid/R/draw-a-cuboid.r b/Task/Draw-a-cuboid/R/draw-a-cuboid.r deleted file mode 100644 index ea0ab1b2f8..0000000000 --- a/Task/Draw-a-cuboid/R/draw-a-cuboid.r +++ /dev/null @@ -1,14 +0,0 @@ -cuboid <- function(w, h, d){ - plot(x=NA, xlim=c(0,(w+d)*sqrt(3)/2), ylim=c(0,h+(w+d)/2), xlab=NA, ylab=NA, asp=1) - polygon(x=c(0, w*sqrt(3)/2, w*sqrt(3)/2, 0), - y=c(w/2, 0, h, h+w/2), - col="red") - polygon(x=c(0, w*sqrt(3)/2, (w+d)*sqrt(3)/2, d*sqrt(3)/2), - y=c(h+w/2, h, h+d/2, h+(w+d)/2), - col="blue") - polygon(x=c(w*sqrt(3)/2, (w+d)*sqrt(3)/2, (w+d)*sqrt(3)/2, w*sqrt(3)/2), - y=c(0, d/2, h+d/2, h), - col="yellow") -} - -cuboid(2, 3, 4) diff --git a/Task/Draw-a-cuboid/V-(Vlang)/draw-a-cuboid.v b/Task/Draw-a-cuboid/V-(Vlang)/draw-a-cuboid.v deleted file mode 100644 index 19ec039f32..0000000000 --- a/Task/Draw-a-cuboid/V-(Vlang)/draw-a-cuboid.v +++ /dev/null @@ -1,32 +0,0 @@ -fn cuboid(dx int, dy int, dz int) { - println("cuboid $dx $dy $dz:") - cub_line(dy + 1, dx, 0, "+-|") - for i in 1 .. dy + 1 { - cub_line(dy - i + 1, dx, i - 1, "/ |") - } - cub_line(0, dx, dy, "+-|") - for _ in 0 .. (4 * dz - dy - 2) { - cub_line(0, dx, dy, "| |") - } - cub_line(0, dx, dy, "| +") - for i in 1 .. dy + 1 { - cub_line(0, dx, dy - i, "| /") - } - last_line := "+-" - print("".repeat(1) + last_line[0].ascii_str()) - println(last_line[1].ascii_str().repeat(9 * dx - 1) + last_line[0].ascii_str()) -} - -fn cub_line(nir int, dx int, dy int, cde string) { - if cde.len < 3 { return } - print(" ".repeat(nir + 1) + cde[0].ascii_str()) - print(cde[1].ascii_str().repeat(9 * dx - 1)) - print(cde[0].ascii_str()) - println(" ".repeat(dy + 1) + cde[2].ascii_str()) -} - -fn main() { - cuboid(2, 3, 4) - cuboid(1, 1, 1) - cuboid(6, 2, 1) -} diff --git a/Task/Draw-a-cuboid/VBScript/draw-a-cuboid.vbs b/Task/Draw-a-cuboid/VBScript/draw-a-cuboid.vb similarity index 100% rename from Task/Draw-a-cuboid/VBScript/draw-a-cuboid.vbs rename to Task/Draw-a-cuboid/VBScript/draw-a-cuboid.vb diff --git a/Task/Draw-a-pixel/ARM-Assembly/draw-a-pixel.arm b/Task/Draw-a-pixel/ARM-Assembly/draw-a-pixel.arm index 1e582d7d8b..78039d03f4 100644 --- a/Task/Draw-a-pixel/ARM-Assembly/draw-a-pixel.arm +++ b/Task/Draw-a-pixel/ARM-Assembly/draw-a-pixel.arm @@ -47,7 +47,7 @@ szTexte2: .asciz "Press q for close window or clic X in system me szLibDW: .asciz "WM_DELETE_WINDOW" @ special label for correct close error /*************************************************/ -szMessErr: .ascii "Error code hexa : " +szMessErr: .ascii "Error code hexa : " sHexa: .space 9,' ' .ascii " decimal : " sDeci: .space 15,' ' @@ -441,7 +441,7 @@ conversion16: and r0,r3,r4 @value register and mask lsr r0,r2 @ move right cmp r0,#10 @ compare value - addlt r0,#48 @ <10 ->digit + addlt r0,#48 @ <10 ->digit addge r0,#55 @ >10 ->letter A-F strb r0,[r1],#1 @ store digit on area and + 1 in area address lsr r4,#4 @ shift mask 4 positions @@ -507,7 +507,7 @@ divisionpar10U: sub r1,r4,r2, lsl #1 @ r1 <- r4 - (r2 * 2) = r4 - (r0 * 10) pop {r2,r3,r4,lr} bx lr @ leave function -iMagicNumber: .int 0xCCCCCCCD +iMagicNumber: .int 0xCCCCCCCD /***************************************************/ /* integer division unsigned */ /***************************************************/ diff --git a/Task/Draw-a-pixel/Ada/draw-a-pixel.adb b/Task/Draw-a-pixel/Ada/draw-a-pixel.ada similarity index 100% rename from Task/Draw-a-pixel/Ada/draw-a-pixel.adb rename to Task/Draw-a-pixel/Ada/draw-a-pixel.ada diff --git a/Task/Draw-a-pixel/AutoHotkey/draw-a-pixel.ahk b/Task/Draw-a-pixel/AutoHotkey/draw-a-pixel.ahk index aa35877040..86bccdddd4 100644 --- a/Task/Draw-a-pixel/AutoHotkey/draw-a-pixel.ahk +++ b/Task/Draw-a-pixel/AutoHotkey/draw-a-pixel.ahk @@ -4,9 +4,9 @@ Gui, Show, w320 h240, Example return CreatePixel(Color, Handle) { - VarSetCapacity(BMBITS, 4, 0), Numput("0x" . Color, &BMBITS, 0, "UInt") - hBM := DllCall("Gdi32.dll\CreateBitmap", "Int", 1, "Int", 1, "UInt", 1, "UInt", 24, "Ptr", 0, "Ptr") - hBM := DllCall("User32.dll\CopyImage", "Ptr", hBM, "UInt", 0, "Int", 0, "Int", 0, "UInt", 0x2008, "Ptr") - DllCall("Gdi32.dll\SetBitmapBits", "Ptr", hBM, "UInt", 3, "Ptr", &BMBITS) - DllCall("User32.dll\SendMessage", "Ptr", Handle, "UInt", 0x172, "Ptr", 0, "Ptr", hBM) + VarSetCapacity(BMBITS, 4, 0), Numput("0x" . Color, &BMBITS, 0, "UInt") + hBM := DllCall("Gdi32.dll\CreateBitmap", "Int", 1, "Int", 1, "UInt", 1, "UInt", 24, "Ptr", 0, "Ptr") + hBM := DllCall("User32.dll\CopyImage", "Ptr", hBM, "UInt", 0, "Int", 0, "Int", 0, "UInt", 0x2008, "Ptr") + DllCall("Gdi32.dll\SetBitmapBits", "Ptr", hBM, "UInt", 3, "Ptr", &BMBITS) + DllCall("User32.dll\SendMessage", "Ptr", Handle, "UInt", 0x172, "Ptr", 0, "Ptr", hBM) } diff --git a/Task/Draw-a-pixel/C/draw-a-pixel-1.c b/Task/Draw-a-pixel/C/draw-a-pixel-1.c index 3bbd254b80..a9ce8075bf 100644 --- a/Task/Draw-a-pixel/C/draw-a-pixel-1.c +++ b/Task/Draw-a-pixel/C/draw-a-pixel-1.c @@ -2,11 +2,11 @@ int main() { - initwindow(320,240,"Red Pixel"); - - putpixel(100,100,RED); - - getch(); - - return 0; + initwindow(320,240,"Red Pixel"); + + putpixel(100,100,RED); + + getch(); + + return 0; } diff --git a/Task/Draw-a-pixel/C/draw-a-pixel-2.c b/Task/Draw-a-pixel/C/draw-a-pixel-2.c index 41626fc1f6..e6e3a806bd 100644 --- a/Task/Draw-a-pixel/C/draw-a-pixel-2.c +++ b/Task/Draw-a-pixel/C/draw-a-pixel-2.c @@ -6,66 +6,66 @@ int main(void) - { - Atom wm_both_protocols[1]; - Atom wm_delete; - Atom wm_protocols; - Display *display; - GC gc; - Window root; - Window window; - XEvent event; - XSetWindowAttributes attr; - int more = 1; + { + Atom wm_both_protocols[1]; + Atom wm_delete; + Atom wm_protocols; + Display *display; + GC gc; + Window root; + Window window; + XEvent event; + XSetWindowAttributes attr; + int more = 1; - display = XOpenDisplay(NULL); - if(display == NULL) - { - fprintf(stderr,"Error: The display cannot be opened\n"); - exit(1); - } - root = DefaultRootWindow(display); - wm_delete = XInternAtom(display, "WM_DELETE_WINDOW", False); - wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False); - attr.background_pixel = 0x000000; - attr.event_mask = ExposureMask; - window = XCreateWindow(display, root, - 0, 0, 320, 240, 0, - CopyFromParent, InputOutput, CopyFromParent, - CWBackPixel | CWEventMask, - &attr - ); - XStoreName(display, window, "Draw a Pixel"); - wm_both_protocols[0] = wm_delete; - XSetWMProtocols(display, window, wm_both_protocols, 1); - gc = XCreateGC(display, window, 0, NULL); - XSetForeground(display, gc, 0xFF0000); - XMapWindow(display, window); + display = XOpenDisplay(NULL); + if(display == NULL) + { + fprintf(stderr,"Error: The display cannot be opened\n"); + exit(1); + } + root = DefaultRootWindow(display); + wm_delete = XInternAtom(display, "WM_DELETE_WINDOW", False); + wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False); + attr.background_pixel = 0x000000; + attr.event_mask = ExposureMask; + window = XCreateWindow(display, root, + 0, 0, 320, 240, 0, + CopyFromParent, InputOutput, CopyFromParent, + CWBackPixel | CWEventMask, + &attr + ); + XStoreName(display, window, "Draw a Pixel"); + wm_both_protocols[0] = wm_delete; + XSetWMProtocols(display, window, wm_both_protocols, 1); + gc = XCreateGC(display, window, 0, NULL); + XSetForeground(display, gc, 0xFF0000); + XMapWindow(display, window); - while(more) - { - XNextEvent(display, &event); - switch(event.type) - { - case Expose: - XDrawPoint(display, window, gc, 100, 100); - break; + while(more) + { + XNextEvent(display, &event); + switch(event.type) + { + case Expose: + XDrawPoint(display, window, gc, 100, 100); + break; - case ClientMessage: // for close request from WM - if(event.xclient.window == window && - event.xclient.message_type == wm_protocols && - event.xclient.format == 32 && - event.xclient.data.l[0] == wm_delete) - { - more = 0; - } - break; + case ClientMessage: // for close request from WM + if(event.xclient.window == window && + event.xclient.message_type == wm_protocols && + event.xclient.format == 32 && + event.xclient.data.l[0] == wm_delete) + { + more = 0; + } + break; - default: - printf("unexpected event.type %d\n", event.type);; - } - } + default: + printf("unexpected event.type %d\n", event.type);; + } + } - XCloseDisplay(display); - exit(0); - } + XCloseDisplay(display); + exit(0); + } diff --git a/Task/Draw-a-pixel/Delphi/draw-a-pixel.pas b/Task/Draw-a-pixel/Delphi/draw-a-pixel.delphi similarity index 100% rename from Task/Draw-a-pixel/Delphi/draw-a-pixel.pas rename to Task/Draw-a-pixel/Delphi/draw-a-pixel.delphi diff --git a/Task/Draw-a-pixel/EasyLang/draw-a-pixel.easy b/Task/Draw-a-pixel/EasyLang/draw-a-pixel.easy index cba3accc14..cb12f03975 100644 --- a/Task/Draw-a-pixel/EasyLang/draw-a-pixel.easy +++ b/Task/Draw-a-pixel/EasyLang/draw-a-pixel.easy @@ -1,2 +1,3 @@ -gcolor 900 -grect 50 50 0.5 0.5 +color 900 +move 50 50 +rect 0.5 0.5 diff --git a/Task/Draw-a-pixel/Forth/draw-a-pixel.fth b/Task/Draw-a-pixel/Forth/draw-a-pixel.fth index 5d6ed34ccc..5df2b5490a 100644 --- a/Task/Draw-a-pixel/Forth/draw-a-pixel.fth +++ b/Task/Draw-a-pixel/Forth/draw-a-pixel.fth @@ -1,13 +1,13 @@ \ Bindings to SDL2 functions s" SDL2" add-lib \c #include -c-function sdl-init SDL_Init n -- n -c-function sdl-quit SDL_Quit -- void -c-function sdl-createwindow SDL_CreateWindow a n n n n n -- a -c-function sdl-createrenderer SDL_CreateRenderer a n n -- a -c-function sdl-setdrawcolor SDL_SetRenderDrawColor a n n n n -- n -c-function sdl-drawpoint SDL_RenderDrawPoint a n n -- n -c-function sdl-renderpresent SDL_RenderPresent a -- void +c-function sdl-init SDL_Init n -- n +c-function sdl-quit SDL_Quit -- void +c-function sdl-createwindow SDL_CreateWindow a n n n n n -- a +c-function sdl-createrenderer SDL_CreateRenderer a n n -- a +c-function sdl-setdrawcolor SDL_SetRenderDrawColor a n n n n -- n +c-function sdl-drawpoint SDL_RenderDrawPoint a n n -- n +c-function sdl-renderpresent SDL_RenderPresent a -- void c-function sdl-delay SDL_Delay n -- void : pixel ( -- ) diff --git a/Task/Draw-a-pixel/GML/draw-a-pixel.gml b/Task/Draw-a-pixel/GML/draw-a-pixel.gml index e29266b1f2..cf522016a3 100644 --- a/Task/Draw-a-pixel/GML/draw-a-pixel.gml +++ b/Task/Draw-a-pixel/GML/draw-a-pixel.gml @@ -1,2 +1 @@ -draw_set_color(c_red) -draw_point(100, 100) +draw_point(100, 100); diff --git a/Task/Draw-a-pixel/Go/draw-a-pixel-2.go b/Task/Draw-a-pixel/Go/draw-a-pixel-2.go index 7a083d1030..89d068dd45 100644 --- a/Task/Draw-a-pixel/Go/draw-a-pixel-2.go +++ b/Task/Draw-a-pixel/Go/draw-a-pixel-2.go @@ -1,22 +1,22 @@ package main import ( - "image" - "image/color" - "image/draw" - "image/png" - "os" + "image" + "image/color" + "image/draw" + "image/png" + "os" ) func main() { - // Create a 320 x 240 image - img := image.NewRGBA(image.Rect(0, 0, 320, 240)) - // fill img in white - draw.Draw(img, img.Bounds(), &image.Uniform{color.RGBA{0, 0, 0, 0}}, image.ZP, draw.Src) - // Draw a red dot at (100, 100) - img.Set(100, 100, color.RGBA{255, 0, 0, 255}) - // Save to new.png - w, _ := os.OpenFile("new.png", os.O_WRONLY|os.O_CREATE, 0600) - defer w.Close() - png.Encode(w, img) + // Create a 320 x 240 image + img := image.NewRGBA(image.Rect(0, 0, 320, 240)) + // fill img in white + draw.Draw(img, img.Bounds(), &image.Uniform{color.RGBA{0, 0, 0, 0}}, image.ZP, draw.Src) + // Draw a red dot at (100, 100) + img.Set(100, 100, color.RGBA{255, 0, 0, 255}) + // Save to new.png + w, _ := os.OpenFile("new.png", os.O_WRONLY|os.O_CREATE, 0600) + defer w.Close() + png.Encode(w, img) } diff --git a/Task/Draw-a-pixel/Go/draw-a-pixel-3.go b/Task/Draw-a-pixel/Go/draw-a-pixel-3.go index f6bc3aace1..9fb62304ea 100644 --- a/Task/Draw-a-pixel/Go/draw-a-pixel-3.go +++ b/Task/Draw-a-pixel/Go/draw-a-pixel-3.go @@ -4,7 +4,7 @@ package main import "github.com/zserge/webview" func main() { - // Open wikipedia in a 320*240 resizable window - webview.Open("Minimal webview example", - "https://en.m.wikipedia.org/wiki/Main_Page", 320, 240, true) + // Open wikipedia in a 320*240 resizable window + webview.Open("Minimal webview example", + "https://en.m.wikipedia.org/wiki/Main_Page", 320, 240, true) } diff --git a/Task/Draw-a-pixel/Java/draw-a-pixel-1.java b/Task/Draw-a-pixel/Java/draw-a-pixel-1.java index 7636004f0b..51805bb233 100644 --- a/Task/Draw-a-pixel/Java/draw-a-pixel-1.java +++ b/Task/Draw-a-pixel/Java/draw-a-pixel-1.java @@ -3,18 +3,18 @@ import java.awt.Graphics; import javax.swing.JFrame; public class DrawAPixel extends JFrame{ - public DrawAPixel() { - super("Red Pixel"); - setSize(320, 240); - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - setVisible(true); - } - @Override - public void paint(Graphics g) { - g.setColor(new Color(255, 0, 0)); - g.drawRect(100, 100, 1, 1); - } - public static void main(String[] args) { - new DrawAPixel(); - } + public DrawAPixel() { + super("Red Pixel"); + setSize(320, 240); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setVisible(true); + } + @Override + public void paint(Graphics g) { + g.setColor(new Color(255, 0, 0)); + g.drawRect(100, 100, 1, 1); + } + public static void main(String[] args) { + new DrawAPixel(); + } } diff --git a/Task/Draw-a-pixel/Java/draw-a-pixel-2.java b/Task/Draw-a-pixel/Java/draw-a-pixel-2.java index ecb25f50b5..c4f07a05b8 100644 --- a/Task/Draw-a-pixel/Java/draw-a-pixel-2.java +++ b/Task/Draw-a-pixel/Java/draw-a-pixel-2.java @@ -4,30 +4,30 @@ import java.awt.image.BufferedImage; import javax.swing.JFrame; import javax.swing.JPanel; -public class DrawAPixel extends JPanel{ - private BufferedImage puffer; - private JFrame window; - private Graphics g; - public DrawAPixel() { - window = new JFrame("Red Pixel"); - window.setSize(320, 240); - window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - window.setLayout(null); - setBounds(0, 0, 320, 240); - window.add(this); - window.setVisible(true); - } - @Override - public void paint(Graphics gr) { - if(g == null) { - puffer = (BufferedImage) createImage(getWidth(), getHeight()); - g = puffer.getGraphics(); - } - g.setColor(new Color(255, 0, 0)); - g.drawRect(100, 100, 1, 1); - gr.drawImage(puffer, 0, 0, this); - } - public static void main(String[] args) { - new DrawAPixel(); - } +public class DrawAPixel extends JPanel{ + private BufferedImage puffer; + private JFrame window; + private Graphics g; + public DrawAPixel() { + window = new JFrame("Red Pixel"); + window.setSize(320, 240); + window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + window.setLayout(null); + setBounds(0, 0, 320, 240); + window.add(this); + window.setVisible(true); + } + @Override + public void paint(Graphics gr) { + if(g == null) { + puffer = (BufferedImage) createImage(getWidth(), getHeight()); + g = puffer.getGraphics(); + } + g.setColor(new Color(255, 0, 0)); + g.drawRect(100, 100, 1, 1); + gr.drawImage(puffer, 0, 0, this); + } + public static void main(String[] args) { + new DrawAPixel(); + } } diff --git a/Task/Draw-a-pixel/Julia/draw-a-pixel.jl b/Task/Draw-a-pixel/Julia/draw-a-pixel.julia similarity index 100% rename from Task/Draw-a-pixel/Julia/draw-a-pixel.jl rename to Task/Draw-a-pixel/Julia/draw-a-pixel.julia diff --git a/Task/Draw-a-pixel/Kotlin/draw-a-pixel.kts b/Task/Draw-a-pixel/Kotlin/draw-a-pixel.kotlin similarity index 100% rename from Task/Draw-a-pixel/Kotlin/draw-a-pixel.kts rename to Task/Draw-a-pixel/Kotlin/draw-a-pixel.kotlin diff --git a/Task/Draw-a-pixel/Lua/draw-a-pixel.lua b/Task/Draw-a-pixel/Lua/draw-a-pixel.lua index 7050f8b22d..525421de1f 100644 --- a/Task/Draw-a-pixel/Lua/draw-a-pixel.lua +++ b/Task/Draw-a-pixel/Lua/draw-a-pixel.lua @@ -2,9 +2,9 @@ local SDL = require "SDL" local ret = SDL.init { SDL.flags.Video } local window = SDL.createWindow { - title = "Pixel", - height = 320, - width = 240 + title = "Pixel", + height = 320, + width = 240 } local renderer = SDL.createRenderer(window, 0, 0) diff --git a/Task/Draw-a-pixel/OCaml/draw-a-pixel-1.ml b/Task/Draw-a-pixel/OCaml/draw-a-pixel-1.ocaml similarity index 100% rename from Task/Draw-a-pixel/OCaml/draw-a-pixel-1.ml rename to Task/Draw-a-pixel/OCaml/draw-a-pixel-1.ocaml diff --git a/Task/Draw-a-pixel/OCaml/draw-a-pixel-2.ml b/Task/Draw-a-pixel/OCaml/draw-a-pixel-2.ocaml similarity index 100% rename from Task/Draw-a-pixel/OCaml/draw-a-pixel-2.ml rename to Task/Draw-a-pixel/OCaml/draw-a-pixel-2.ocaml diff --git a/Task/Draw-a-pixel/OPL/draw-a-pixel.opl b/Task/Draw-a-pixel/OPL/draw-a-pixel.opl deleted file mode 100644 index f880013ec3..0000000000 --- a/Task/Draw-a-pixel/OPL/draw-a-pixel.opl +++ /dev/null @@ -1,11 +0,0 @@ -REM Psion devices up to Series 5 have no colour, so the pixel is black. The Series 7 and later do have colour, but I don't own any of those, so I can neither test it nor am I familiar with OPL beyond Series 5. -REM The Series 3 also has a resolution of only 480x160, so the window falls off the screen. - -PROC main: - LOCAL wndw% - wndw%=gCREATE(80,0,320,240,1,1) - gXBORDER 1,1 - gAT 100,100 - gLINEBY 0,0 - GET -ENDP diff --git a/Task/Draw-a-pixel/Oberon/draw-a-pixel.oberon b/Task/Draw-a-pixel/Oberon/draw-a-pixel.oberon index 12a93b93a9..8a9cf70323 100644 --- a/Task/Draw-a-pixel/Oberon/draw-a-pixel.oberon +++ b/Task/Draw-a-pixel/Oberon/draw-a-pixel.oberon @@ -1,9 +1,9 @@ MODULE pixel; - IMPORT XYplane; - + IMPORT XYplane; + BEGIN - XYplane.Open; - XYplane.Dot(100, 100, XYplane.draw); - REPEAT UNTIL XYplane.Key() = "q" + XYplane.Open; + XYplane.Dot(100, 100, XYplane.draw); + REPEAT UNTIL XYplane.Key() = "q" END pixel. diff --git a/Task/Draw-a-pixel/Odin/draw-a-pixel-2.odin b/Task/Draw-a-pixel/Odin/draw-a-pixel-2.odin deleted file mode 100644 index ee0880c648..0000000000 --- a/Task/Draw-a-pixel/Odin/draw-a-pixel-2.odin +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import rl "vendor:raylib" - -main :: proc() { - rl.InitWindow(320, 240, "Rosetta Code - Draw a pixel") - - for !rl.WindowShouldClose() { - rl.BeginDrawing() - - rl.ClearBackground(rl.BLACK) - - rl.DrawPixelV({100, 100}, {255, 0, 0, 255}) - - rl.EndDrawing() - } - - rl.CloseWindow() -} diff --git a/Task/Draw-a-pixel/Odin/draw-a-pixel-1.odin b/Task/Draw-a-pixel/Odin/draw-a-pixel.odin similarity index 100% rename from Task/Draw-a-pixel/Odin/draw-a-pixel-1.odin rename to Task/Draw-a-pixel/Odin/draw-a-pixel.odin diff --git a/Task/Draw-a-pixel/PascalABC.NET/draw-a-pixel.pas b/Task/Draw-a-pixel/PascalABC.NET/draw-a-pixel.pas deleted file mode 100644 index caaee3cf72..0000000000 --- a/Task/Draw-a-pixel/PascalABC.NET/draw-a-pixel.pas +++ /dev/null @@ -1,6 +0,0 @@ -uses GraphWPF; - -begin - Window.SetSize(320,240); - SetPixel(100,100,Colors.Red); -end. diff --git a/Task/Draw-a-pixel/Perl/draw-a-pixel-3.pl b/Task/Draw-a-pixel/Perl/draw-a-pixel-3.pl index 37bdd615b4..7d859637e7 100644 --- a/Task/Draw-a-pixel/Perl/draw-a-pixel-3.pl +++ b/Task/Draw-a-pixel/Perl/draw-a-pixel-3.pl @@ -6,39 +6,39 @@ use X11::Protocol; my $x = new X11::Protocol or die "X11 connection failed"; $x->CreateWindow(my $id = $x->new_rsrc, $x->root, 'InputOutput', - $x->root_depth, 'CopyFromParent', - 0, 0, 320, 240, 0, - background_pixel => 0x000000, - event_mask => $x->pack_event_mask( qw( Exposure )), - ); + $x->root_depth, 'CopyFromParent', + 0, 0, 320, 240, 0, + background_pixel => 0x000000, + event_mask => $x->pack_event_mask( qw( Exposure )), + ); $x->ChangeProperty($id, $x->atom('WM_NAME'), $x->atom('STRING'), - 8, 'Replace', 'Draw a Pixel'); + 8, 'Replace', 'Draw a Pixel'); $x->ChangeProperty($id, $x->atom('WM_PROTOCOLS'), $x->atom('ATOM'), - 32, 'Replace', pack('L', $x->atom('WM_DELETE_WINDOW'))); + 32, 'Replace', pack('L', $x->atom('WM_DELETE_WINDOW'))); $x->CreateGC(my $gc = $x->new_rsrc, $id, foreground => 0xff0000); $x->MapWindow($id); $x->event_handler('queue'); my ($more, $name, %e) = 1; while($more) - { - %e = $x->next_event; - $name = $e{name}; - EVENT->$name; - } + { + %e = $x->next_event; + $name = $e{name}; + EVENT->$name; + } sub EVENT::Expose { $x->PolyPoint($id, $gc, 'ORIGIN', 100, 100) } sub EVENT::ConfigureNotify { } sub EVENT::ClientMessage - { - if($e{type} == $x->atom('WM_PROTOCOLS') && - unpack('L', $e{data}) == $x->atom('WM_DELETE_WINDOW')) - { - $more = 0; - } - else - { - warn "Unknown $name, $e{type}\n"; - } - } + { + if($e{type} == $x->atom('WM_PROTOCOLS') && + unpack('L', $e{data}) == $x->atom('WM_DELETE_WINDOW')) + { + $more = 0; + } + else + { + warn "Unknown $name, $e{type}\n"; + } + } sub EVENT::AUTOLOAD { die "Sorry, no handler for $name\n" } diff --git a/Task/Draw-a-pixel/R/draw-a-pixel.r b/Task/Draw-a-pixel/R/draw-a-pixel.r deleted file mode 100644 index 4fd8762de5..0000000000 --- a/Task/Draw-a-pixel/R/draw-a-pixel.r +++ /dev/null @@ -1,9 +0,0 @@ -disp_h <- 240 -disp_w <- 320 -mat <- matrix(0, nrow = disp_w, ncol = disp_h) -mat[100, 100] <- 1 -png("DrawPixel-R.png", disp_w, disp_h) -op <- par(mar = rep(0, 4), mai = rep(0, 4)) -image(mat, col = c("white", "red"), useRaster = TRUE, axes = FALSE) -par(op) -dev.off() diff --git a/Task/Draw-a-pixel/ReScript/draw-a-pixel-1.res b/Task/Draw-a-pixel/ReScript/draw-a-pixel-1.re similarity index 100% rename from Task/Draw-a-pixel/ReScript/draw-a-pixel-1.res rename to Task/Draw-a-pixel/ReScript/draw-a-pixel-1.re diff --git a/Task/Draw-a-pixel/ReScript/draw-a-pixel-2.res b/Task/Draw-a-pixel/ReScript/draw-a-pixel-2.re similarity index 100% rename from Task/Draw-a-pixel/ReScript/draw-a-pixel-2.res rename to Task/Draw-a-pixel/ReScript/draw-a-pixel-2.re diff --git a/Task/Draw-a-pixel/Rebol/draw-a-pixel.rebol b/Task/Draw-a-pixel/Rebol/draw-a-pixel.rebol deleted file mode 100644 index 657fa8b619..0000000000 --- a/Task/Draw-a-pixel/Rebol/draw-a-pixel.rebol +++ /dev/null @@ -1,10 +0,0 @@ -Rebol [ - title: "Rosetta code: Draw a pixel" - file: %Draw_a_pixel.r3 - url: https://rosettacode.org/wiki/Draw_a_pixel -] - -img: make image! 320x240 ;; Create a new image of size 320x240 pixels -img/(100x100): 255.0.0 ;; Set the pixel at position 100x100 to pure red -save %test.png img ;; Save the image to a PNG file named "test.png" -browse %test.png ;; Open the saved image file using the default browser diff --git a/Task/Draw-a-pixel/Rust/draw-a-pixel.rs b/Task/Draw-a-pixel/Rust/draw-a-pixel.rust similarity index 100% rename from Task/Draw-a-pixel/Rust/draw-a-pixel.rs rename to Task/Draw-a-pixel/Rust/draw-a-pixel.rust diff --git a/Task/Draw-a-pixel/Uxntal/draw-a-pixel.uxnatl b/Task/Draw-a-pixel/Uxntal/draw-a-pixel.uxnatl new file mode 100644 index 0000000000..26c8170b96 --- /dev/null +++ b/Task/Draw-a-pixel/Uxntal/draw-a-pixel.uxnatl @@ -0,0 +1,22 @@ +( $ uxnasm draw-pixel.tal draw-pixel.rom && uxnemu draw-pixel.rom ) + +|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 +|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 + +|0100 + ( set theme ) + #0f00 .System/r DEO2 + #0000 .System/g DEO2 + #0000 .System/b DEO2 + + ( set screen size ) + #0140 .Screen/width DEO2 + #00f0 .Screen/height DEO2 + + ( set position ) + #0064 .Screen/x DEO2 + #0064 .Screen/y DEO2 + + ( draw pixel ) + #01 .Screen/pixel DEO +BRK diff --git a/Task/Draw-a-pixel/V-(Vlang)/draw-a-pixel.v b/Task/Draw-a-pixel/V-(Vlang)/draw-a-pixel.v index 80701bae65..f8ec8e887e 100644 --- a/Task/Draw-a-pixel/V-(Vlang)/draw-a-pixel.v +++ b/Task/Draw-a-pixel/V-(Vlang)/draw-a-pixel.v @@ -1,4 +1,5 @@ import gg +import gx fn main() { mut context := gg.new_context( @@ -11,6 +12,6 @@ fn main() { fn frame(mut ctx gg.Context) { ctx.begin() - ctx.draw_pixel(100, 100, gg.red) + ctx.draw_pixel(100, 100, gx.red) ctx.end() } diff --git a/Task/Draw-a-rotating-cube/Ada/draw-a-rotating-cube.adb b/Task/Draw-a-rotating-cube/Ada/draw-a-rotating-cube.ada similarity index 100% rename from Task/Draw-a-rotating-cube/Ada/draw-a-rotating-cube.adb rename to Task/Draw-a-rotating-cube/Ada/draw-a-rotating-cube.ada diff --git a/Task/Draw-a-rotating-cube/Delphi/draw-a-rotating-cube-1.pas b/Task/Draw-a-rotating-cube/Delphi/draw-a-rotating-cube-1.delphi similarity index 100% rename from Task/Draw-a-rotating-cube/Delphi/draw-a-rotating-cube-1.pas rename to Task/Draw-a-rotating-cube/Delphi/draw-a-rotating-cube-1.delphi diff --git a/Task/Draw-a-rotating-cube/Delphi/draw-a-rotating-cube-2.pas b/Task/Draw-a-rotating-cube/Delphi/draw-a-rotating-cube-2.delphi similarity index 100% rename from Task/Draw-a-rotating-cube/Delphi/draw-a-rotating-cube-2.pas rename to Task/Draw-a-rotating-cube/Delphi/draw-a-rotating-cube-2.delphi diff --git a/Task/Draw-a-rotating-cube/EasyLang/draw-a-rotating-cube.easy b/Task/Draw-a-rotating-cube/EasyLang/draw-a-rotating-cube.easy index 09df71826d..4b30030a05 100644 --- a/Task/Draw-a-rotating-cube/EasyLang/draw-a-rotating-cube.easy +++ b/Task/Draw-a-rotating-cube/EasyLang/draw-a-rotating-cube.easy @@ -1,12 +1,14 @@ node[][] = [ [ -1 -1 -1 ] [ -1 -1 1 ] [ -1 1 -1 ] [ -1 1 1 ] [ 1 -1 -1 ] [ 1 -1 1 ] [ 1 1 -1 ] [ 1 1 1 ] ] edge[][] = [ [ 1 2 ] [ 2 4 ] [ 4 3 ] [ 3 1 ] [ 5 6 ] [ 6 8 ] [ 8 7 ] [ 7 5 ] [ 1 5 ] [ 2 6 ] [ 3 7 ] [ 4 8 ] ] # -proc scale f . - for i = 1 to len node[][] : for d = 1 to 3 - node[i][d] *= f +proc scale f . . + for i = 1 to len node[][] + for d = 1 to 3 + node[i][d] *= f + . . . -proc rotate angx angy . +proc rotate angx angy . . sinx = sin angx cosx = cos angx siny = sin angy @@ -22,8 +24,8 @@ proc rotate angx angy . . . len nd[] 3 -proc draw . - gclear +proc draw . . + clear m = 999 mi = -1 for i = 1 to len node[][] @@ -42,13 +44,16 @@ proc draw . ix += 1 . . - for ni = 1 to len nd[] : for i = 1 to len edge[][] - if edge[i][1] = nd[ni] or edge[i][2] = nd[ni] - x1 = node[edge[i][1]][1] - y1 = node[edge[i][1]][2] - x2 = node[edge[i][2]][1] - y2 = node[edge[i][2]][2] - gline x1 + 50 y1 + 50 x2 + 50 y2 + 50 + for ni = 1 to len nd[] + for i = 1 to len edge[][] + if edge[i][1] = nd[ni] or edge[i][2] = nd[ni] + x1 = node[edge[i][1]][1] + y1 = node[edge[i][1]][2] + x2 = node[edge[i][2]][1] + y2 = node[edge[i][2]][2] + move x1 + 50 y1 + 50 + line x2 + 50 y2 + 50 + . . . . diff --git a/Task/Draw-a-rotating-cube/Julia/draw-a-rotating-cube.jl b/Task/Draw-a-rotating-cube/Julia/draw-a-rotating-cube.julia similarity index 100% rename from Task/Draw-a-rotating-cube/Julia/draw-a-rotating-cube.jl rename to Task/Draw-a-rotating-cube/Julia/draw-a-rotating-cube.julia diff --git a/Task/Draw-a-rotating-cube/Kotlin/draw-a-rotating-cube.kts b/Task/Draw-a-rotating-cube/Kotlin/draw-a-rotating-cube.kotlin similarity index 100% rename from Task/Draw-a-rotating-cube/Kotlin/draw-a-rotating-cube.kts rename to Task/Draw-a-rotating-cube/Kotlin/draw-a-rotating-cube.kotlin diff --git a/Task/Draw-a-rotating-cube/PascalABC.NET/draw-a-rotating-cube.pas b/Task/Draw-a-rotating-cube/PascalABC.NET/draw-a-rotating-cube.pas deleted file mode 100644 index 37d716f15c..0000000000 --- a/Task/Draw-a-rotating-cube/PascalABC.NET/draw-a-rotating-cube.pas +++ /dev/null @@ -1,6 +0,0 @@ -uses Graph3D; - -begin - var Cube := Box(Origin,Sz3D(3,3,3),Colors.Green); - Cube.AnimRotate(OrtZ,180).Forever.Begin -end. diff --git a/Task/Draw-a-rotating-cube/Python/draw-a-rotating-cube-2.py b/Task/Draw-a-rotating-cube/Python/draw-a-rotating-cube-2.py deleted file mode 100644 index f7a42efcbe..0000000000 --- a/Task/Draw-a-rotating-cube/Python/draw-a-rotating-cube-2.py +++ /dev/null @@ -1,14 +0,0 @@ -import bpy -import math -bpy.context.preferences.edit.keyframe_new_interpolation_type="LINEAR" -bpy.ops.object.select_all(action="SELECT") -bpy.ops.object.delete() -bpy.ops.mesh.primitive_cube_add() -bpy.context.active_object.name="spinningcube" -spinningcube=bpy.data.objects["spinningcube"] -spinningcube.rotation_euler=(math.radians(45),math.radians(35.264),math.radians(0)) -spinningcube.keyframe_insert(data_path="rotation_euler",frame=1) -spinningcube.rotation_euler=(math.radians(45),math.radians(35.264),math.radians(2700)) -spinningcube.keyframe_insert(data_path="rotation_euler",frame=250) -bpy.context.scene.frame_set(1) -bpy.ops.screen.animation_play() diff --git a/Task/Draw-a-rotating-cube/Python/draw-a-rotating-cube-1.py b/Task/Draw-a-rotating-cube/Python/draw-a-rotating-cube.py similarity index 100% rename from Task/Draw-a-rotating-cube/Python/draw-a-rotating-cube-1.py rename to Task/Draw-a-rotating-cube/Python/draw-a-rotating-cube.py diff --git a/Task/Draw-a-rotating-cube/V-(Vlang)/draw-a-rotating-cube.v b/Task/Draw-a-rotating-cube/V-(Vlang)/draw-a-rotating-cube.v deleted file mode 100644 index 597f4f3661..0000000000 --- a/Task/Draw-a-rotating-cube/V-(Vlang)/draw-a-rotating-cube.v +++ /dev/null @@ -1,122 +0,0 @@ -import gg -import gx -import math - -struct RotatingCube { - mut: - width int - height int - fore gx.Color - nodes [][]f64 - edges [][]int - scale_f f64 -} - -fn new_rotating_cube(width int, height int) RotatingCube { - mut nodes := [ - [f64(-1.0), -1, -1], - [f64(-1.0), -1, 1], - [f64(-1.0), 1, -1], - [f64(-1.0), 1, 1], - [f64(1.0), -1, -1], - [f64(1.0), -1, 1], - [f64(1.0), 1, -1], - [f64(1.0), 1, 1], - ] - mut edges := [ - [0, 1], - [1, 3], - [3, 2], - [2, 0], - [4, 5], - [5, 7], - [7, 6], - [6, 4], - [0, 4], - [1, 5], - [2, 6], - [3, 7], - ] - mut cube := RotatingCube{ - width: width - height: height - fore: gx.blue - nodes: nodes - edges: edges - scale_f: 100.0 - } - cube.scale(cube.scale_f) - cube.rotate_cube(math.pi / 4, math.sqrt(math.atan(2.0))) - return cube -} - -fn (mut rc RotatingCube) scale(s f64) { - for i in 0 .. rc.nodes.len { - for j in 0 .. 3 { - rc.nodes[i][j] = rc.nodes[i][j] * s - } - } -} - -fn (mut rc RotatingCube) rotate_cube(angle_x f64, angle_y f64) { - sin_x := math.sin(angle_x) - cos_x := math.cos(angle_x) - sin_y := math.sin(angle_y) - cos_y := math.cos(angle_y) - for i in 0 .. rc.nodes.len { - x := rc.nodes[i][0] - y := rc.nodes[i][1] - z := rc.nodes[i][2] - rc.nodes[i][0] = x * cos_x - z * sin_x - rc.nodes[i][2] = z * cos_x + x * sin_x - z_new := rc.nodes[i][2] - rc.nodes[i][1] = y * cos_y - z_new * sin_y - rc.nodes[i][2] = z_new * cos_y + y * sin_y - } -} - -fn (mut rc RotatingCube) draw_cube(mut ctx gg.Context) { - ctx.begin() - cx := f32(rc.width / 2) - cy := f32(rc.height / 2) - for edge in rc.edges { - n1 := rc.nodes[edge[0]] - n2 := rc.nodes[edge[1]] - x1 := f32(n1[0]) + cx - y1 := f32(n1[1]) + cy - x2 := f32(n2[0]) + cx - y2 := f32(n2[1]) + cy - ctx.draw_line(x1, y1, x2, y2, rc.fore) - } - for node in rc.nodes { - x := f32(node[0]) + cx - 4 - y := f32(node[1]) + cy - 4 - ctx.draw_rect_filled(x, y, 8, 8, rc.fore) - } - ctx.end() -} - -fn (mut rc RotatingCube) update() { - rc.rotate_cube(math.pi / 180, 0) -} - -fn frame(mut cube RotatingCube) { - mut ctx := gg.Context{} - cube.update() - cube.draw_cube(mut ctx) -} - -fn main() { - width := 640 - height := 640 - mut cube := new_rotating_cube(width, height) - mut context := gg.new_context( - width: width - height: height - window_title: "Rotating cube" - bg_color: gx.white - frame_fn: frame - user_data: &cube - ) - context.run() -} diff --git a/Task/Draw-a-sphere/Ada/draw-a-sphere-1.adb b/Task/Draw-a-sphere/Ada/draw-a-sphere-1.ada similarity index 100% rename from Task/Draw-a-sphere/Ada/draw-a-sphere-1.adb rename to Task/Draw-a-sphere/Ada/draw-a-sphere-1.ada diff --git a/Task/Draw-a-sphere/Ada/draw-a-sphere-2.adb b/Task/Draw-a-sphere/Ada/draw-a-sphere-2.ada similarity index 100% rename from Task/Draw-a-sphere/Ada/draw-a-sphere-2.adb rename to Task/Draw-a-sphere/Ada/draw-a-sphere-2.ada diff --git a/Task/Draw-a-sphere/Delphi/draw-a-sphere.pas b/Task/Draw-a-sphere/Delphi/draw-a-sphere.delphi similarity index 100% rename from Task/Draw-a-sphere/Delphi/draw-a-sphere.pas rename to Task/Draw-a-sphere/Delphi/draw-a-sphere.delphi diff --git a/Task/Draw-a-sphere/EasyLang/draw-a-sphere.easy b/Task/Draw-a-sphere/EasyLang/draw-a-sphere.easy deleted file mode 100644 index 972b539b5d..0000000000 --- a/Task/Draw-a-sphere/EasyLang/draw-a-sphere.easy +++ /dev/null @@ -1,25 +0,0 @@ -func vdot a[] b[] . - for i to len a[] : r += a[i] * b[i] - return r -. -func[] norm v[] . - d = vdot v[] v[] - invl = 1 / sqrt d - for i to 3 : r[] &= v[i] * invl - return r[] -. -proc sphere r k amb dir[] . - for x = -r to r : for y = -r to r - z = r * r - x * x - y * y - if z >= 0 - s = vdot dir[] norm [ x y sqrt z ] - if s < 0 : s = 0 - lum = (pow s k + amb) / (1 + amb) - gcolor3 lum lum lum - grect 50 + x / 5, 50 + y / 5, 0.3 0.3 - . - . -. -gbackground 000 -gclear -sphere 200 1.5 0.2 norm [ -30 30 50 ] diff --git a/Task/Draw-a-sphere/Emacs-Lisp/draw-a-sphere.el b/Task/Draw-a-sphere/Emacs-Lisp/draw-a-sphere.l similarity index 100% rename from Task/Draw-a-sphere/Emacs-Lisp/draw-a-sphere.el rename to Task/Draw-a-sphere/Emacs-Lisp/draw-a-sphere.l diff --git a/Task/Draw-a-sphere/Julia/draw-a-sphere-1.jl b/Task/Draw-a-sphere/Julia/draw-a-sphere-1.julia similarity index 100% rename from Task/Draw-a-sphere/Julia/draw-a-sphere-1.jl rename to Task/Draw-a-sphere/Julia/draw-a-sphere-1.julia diff --git a/Task/Draw-a-sphere/Julia/draw-a-sphere-2.jl b/Task/Draw-a-sphere/Julia/draw-a-sphere-2.julia similarity index 100% rename from Task/Draw-a-sphere/Julia/draw-a-sphere-2.jl rename to Task/Draw-a-sphere/Julia/draw-a-sphere-2.julia diff --git a/Task/Draw-a-sphere/Kotlin/draw-a-sphere.kts b/Task/Draw-a-sphere/Kotlin/draw-a-sphere.kotlin similarity index 100% rename from Task/Draw-a-sphere/Kotlin/draw-a-sphere.kts rename to Task/Draw-a-sphere/Kotlin/draw-a-sphere.kotlin diff --git a/Task/Draw-a-sphere/Locomotive-Basic/draw-a-sphere-2.basic b/Task/Draw-a-sphere/Locomotive-Basic/draw-a-sphere-2.basic deleted file mode 100644 index c343edc95d..0000000000 --- a/Task/Draw-a-sphere/Locomotive-Basic/draw-a-sphere-2.basic +++ /dev/null @@ -1,32 +0,0 @@ -10 MODE 2:ORIGIN 320,200:INK 0,0:INK 1,26 -20 DIM v(2),vec(2) -30 v(0)=30:v(1)=30:v(2)=-50 -40 lung=SQR(v(0)*v(0)+v(1)*v(1)+v(2)*v(2)) -50 v(0)=v(0)/lung -60 v(1)=v(1)/lung -70 v(2)=v(2)/lung -80 r=180:k=1.5:ambient=0.03 -90 FOR i=INT(-r) TO INT(r) -100 x=i -110 FOR j=INT(-2*r) TO INT(2*r) -120 y=j/2 -130 IF (x*x+y*y<=r*r) THEN GOSUB 1000 -140 NEXT j -160 NEXT i -170 END -1000 vec(0)=x -1010 vec(1)=y -1020 vec(2)=SQR(r*r-x*x-y*y) -1030 GOSUB 2000 -1040 GOSUB 3000 -1050 b=(d^k+ambient)/(1+ambient) -1060 IF b>rnd THEN PLOT x,-y -1100 RETURN -2000 lung=SQR(vec(0)*vec(0)+vec(1)*vec(1)+vec(2)*vec(2)) -2010 vec(0)=vec(0)/lung -2020 vec(1)=vec(1)/lung -2030 vec(2)=vec(2)/lung -2040 RETURN -3000 d=v(0)*vec(0)+v(1)*vec(1)+v(2)*vec(2) -3010 IF d<0 THEN d=-d ELSE d=0 -3020 RETURN diff --git a/Task/Draw-a-sphere/Locomotive-Basic/draw-a-sphere-1.basic b/Task/Draw-a-sphere/Locomotive-Basic/draw-a-sphere.basic similarity index 100% rename from Task/Draw-a-sphere/Locomotive-Basic/draw-a-sphere-1.basic rename to Task/Draw-a-sphere/Locomotive-Basic/draw-a-sphere.basic diff --git a/Task/Draw-a-sphere/Odin/draw-a-sphere.odin b/Task/Draw-a-sphere/Odin/draw-a-sphere.odin deleted file mode 100644 index 394ba7fcef..0000000000 --- a/Task/Draw-a-sphere/Odin/draw-a-sphere.odin +++ /dev/null @@ -1,32 +0,0 @@ -package sphere - -import rl "vendor:raylib" - -main :: proc() { - rl.InitWindow(640, 480, "Rosetta Code - draw a sphere") - - camera: rl.Camera3D - camera.fovy = 45 - camera.position = {0, 2.5, 5} - camera.up = {0, 1, 0} - - for !rl.WindowShouldClose() { - rl.UpdateCamera(&camera, .ORBITAL) - - rl.BeginDrawing() - - rl.ClearBackground(rl.RAYWHITE) - - rl.BeginMode3D(camera) - - rl.DrawGrid(10, .5) - - rl.DrawSphere({}, .5, rl.LIME) - - rl.EndMode3D() - - rl.EndDrawing() - } - - rl.CloseWindow() -} diff --git a/Task/Draw-a-sphere/Pluto/draw-a-sphere.pluto b/Task/Draw-a-sphere/Pluto/draw-a-sphere.pluto deleted file mode 100644 index 2c693f9de4..0000000000 --- a/Task/Draw-a-sphere/Pluto/draw-a-sphere.pluto +++ /dev/null @@ -1,8 +0,0 @@ -require "bitmap" - -local bmp = bitmap.of(400, 400, color.white, "Draw a sphere") -for n = 1, 100 do - local clr = bitmap.rgbColor(2 * n, 2 * n, 2 * n) - bmp:circle(math.round(150-2 * n / 3) + 50, math.round(150 - n / 2) + 50, 150 - n, clr) -end -bmp:view() diff --git a/Task/Draw-a-sphere/R/draw-a-sphere.r b/Task/Draw-a-sphere/R/draw-a-sphere.r deleted file mode 100644 index c6f8e5fbd1..0000000000 --- a/Task/Draw-a-sphere/R/draw-a-sphere.r +++ /dev/null @@ -1,12 +0,0 @@ -library(lattice) -theta <- seq(0, pi, length.out=100) -phi <- seq(0, 2*pi, length.out=100) -x <- outer(sin(theta), cos(phi)) -y <- outer(sin(theta), sin(phi)) -z <- sqrt(1-x^2-y^2) -xx <- kronecker(matrix(1, 2, 2), x) -yy <- kronecker(matrix(1, 2, 2), y) -zz <- kronecker(matrix(c(1, -1, -1, 1), 2, 2), z) -png(filename="Sphere-R.png", width=1000, height=1000) -wireframe(zz ~ xx*yy) -dev.off() diff --git a/Task/Draw-a-sphere/Rust/draw-a-sphere.rs b/Task/Draw-a-sphere/Rust/draw-a-sphere.rust similarity index 100% rename from Task/Draw-a-sphere/Rust/draw-a-sphere.rs rename to Task/Draw-a-sphere/Rust/draw-a-sphere.rust diff --git a/Task/Draw-a-sphere/VBScript/draw-a-sphere.vbs b/Task/Draw-a-sphere/VBScript/draw-a-sphere.vb similarity index 100% rename from Task/Draw-a-sphere/VBScript/draw-a-sphere.vbs rename to Task/Draw-a-sphere/VBScript/draw-a-sphere.vb diff --git a/Task/Duffinian-numbers/Arturo/duffinian-numbers.arturo b/Task/Duffinian-numbers/Arturo/duffinian-numbers.arturo index 67e076411f..5aca5135af 100644 --- a/Task/Duffinian-numbers/Arturo/duffinian-numbers.arturo +++ b/Task/Duffinian-numbers/Arturo/duffinian-numbers.arturo @@ -5,7 +5,7 @@ duffinian?: function [n]-> [1] = intersection factors sum fn fn ] -first50: [] +first50: new [] i: 0 while [50 > size first50][ if duffinian? i -> 'first50 ++ i @@ -17,7 +17,7 @@ loop split.every: 10 first50 'row [ print map to [:string] row 'item -> pad item 3 ] -first15: [] +first15: new [] i: 0 while [15 > size first15][ if every? i..i+2 => duffinian? [ @@ -30,5 +30,5 @@ while [15 > size first15][ print "" print "The first 15 Duffinian triplets:" loop split.every: 5 first15 'row [ - print map row 'item -> pad.right express item 17 + print map row 'item -> pad.right as.code item 17 ] diff --git a/Task/Duffinian-numbers/Delphi/duffinian-numbers.pas b/Task/Duffinian-numbers/Delphi/duffinian-numbers.delphi similarity index 100% rename from Task/Duffinian-numbers/Delphi/duffinian-numbers.pas rename to Task/Duffinian-numbers/Delphi/duffinian-numbers.delphi diff --git a/Task/Duffinian-numbers/EasyLang/duffinian-numbers.easy b/Task/Duffinian-numbers/EasyLang/duffinian-numbers.easy index b50d820e3d..6cc97d01fb 100644 --- a/Task/Duffinian-numbers/EasyLang/duffinian-numbers.easy +++ b/Task/Duffinian-numbers/EasyLang/duffinian-numbers.easy @@ -1,7 +1,9 @@ fastfunc isprim num . i = 2 while i <= sqrt num - if num mod i = 0 : return 0 + if num mod i = 0 + return 0 + . i += 1 . return 1 @@ -21,7 +23,9 @@ func sumdiv num . until d > quot if num mod d = 0 sum += d - if d <> quot : sum += quot + if d <> quot + sum += quot + . . d += 1 . @@ -33,7 +37,7 @@ func isduff n . . return 0 . -proc duffs . +proc duffs . . print "First 50 Duffinian numbers:" n = 4 repeat diff --git a/Task/Duffinian-numbers/Forth/duffinian-numbers.fth b/Task/Duffinian-numbers/Forth/duffinian-numbers.fth deleted file mode 100644 index 264737eeb8..0000000000 --- a/Task/Duffinian-numbers/Forth/duffinian-numbers.fth +++ /dev/null @@ -1,61 +0,0 @@ -: gcd ( u1 u2 -- u3 ) - dup 0= if drop exit then - tuck mod recurse ; - -: duffinian? ( u -- ? ) - dup 2 = if drop false exit then - 1 >r dup 2 - begin - over 2 mod 0= - while - dup r> + >r 2* swap 2/ swap - repeat - drop 3 - begin - 2dup dup * >= - while - dup 1 >r - begin - 2 pick 2 pick mod 0= - while - dup r> + >r over * >r tuck / swap r> - repeat - 2r> * >r drop 2 + - repeat - drop - 2dup = if 2drop rdrop false exit then - dup 1 > if 1+ r> * else drop r> then - gcd 1 = ; - -: main - ." First 50 Duffinian numbers:" cr - 0 1 - begin - over 50 < - while - dup duffinian? if - dup 3 .r - swap 1+ swap - over 10 mod 0= if cr else space then - then - 1+ - repeat - 2drop - cr ." First 30 Duffinian triplets:" cr - 0 >r 0 1 - begin - r@ 30 < - while - dup duffinian? if swap 1+ swap else nip 0 swap then - over 3 = if - r> 1+ >r - dup 2 - 5 .r space - dup 1- 5 .r space - dup 5 .r cr - then - 1+ - repeat - rdrop 2drop ; - -main -bye diff --git a/Task/Duffinian-numbers/Free-Pascal-Lazarus/duffinian-numbers.pas b/Task/Duffinian-numbers/Free-Pascal-Lazarus/duffinian-numbers.pas deleted file mode 100644 index 17e3029649..0000000000 --- a/Task/Duffinian-numbers/Free-Pascal-Lazarus/duffinian-numbers.pas +++ /dev/null @@ -1,79 +0,0 @@ -program DuffinianNumbers; - -CONST - MaxSigma = 10000; - -VAR - seen, cur: CARDINAL; - sigma: ARRAY [1..MaxSigma] OF CARDINAL; - -PROCEDURE CalculateSigmaTable; - VAR i, j: CARDINAL; -BEGIN - FOR i := 1 TO MaxSigma DO - BEGIN - sigma[i] := 0 - END; - FOR i := 1 TO MaxSigma DO - BEGIN - j := i;//2*i -> sigma(n)-n - WHILE j <= MaxSigma DO - Begin - INC(sigma[j], i); - INC(j, i); - END - END -END;// CalculateSigmaTable; - -FUNCTION GCD(a, b: CARDINAL): CARDINAL; -VAR c: CARDINAL; -BEGIN - WHILE b <>0 DO - Begin - c := a MOD b; - a := b; - b := c - END; - EXIT(A) -END;// GCD; - -function IsDuffinian(n: CARDINAL): BOOLEAN; -BEGIN - EXIT( (sigma[n] > n+1) AND (GCD(n, sigma[n]) = 1)) -END;// IsDuffinian; - -FUNCTION IsDuffinianTriple(n: CARDINAL): BOOLEAN; -BEGIN - EXIT(IsDuffinian(n) AND IsDuffinian(n+1) AND IsDuffinian(n+2)); -END;// IsDuffinianTriple; - -BEGIN - CalculateSigmaTable; - Writeln('First 50 Duffinian numbers:'); - WriteLn; - cur := 0; - FOR seen := 1 TO 50 DO - Begin - REPEAT - INC(cur) - UNTIL IsDuffinian(cur); - Write(cur:4); - IF seen MOD 10 = 0 THEN - WriteLn; - END; - - WriteLn; - WriteLn('First 15 Duffinian triples:'); - WriteLn; - cur := 0; - FOR seen := 1 TO 15 DO - BEGIN - REPEAT - INC(cur) - UNTIL IsDuffinianTriple(cur); - Write(cur:6); - Write(cur+1:6); - Write(cur+2:6); - WriteLn; - END -END.// DuffinianNumbers. diff --git a/Task/Duffinian-numbers/Haskell/duffinian-numbers.hs b/Task/Duffinian-numbers/Haskell/duffinian-numbers.hs deleted file mode 100644 index 9bc2ce04f3..0000000000 --- a/Task/Duffinian-numbers/Haskell/duffinian-numbers.hs +++ /dev/null @@ -1,50 +0,0 @@ -import Data.List ( tail ) -import qualified Data.Set as S -import Data.List.Split ( divvy ) - -divisors :: Int -> [Int] -divisors n = [d | d <- [1..n] , mod n d == 0] - -primeFactors :: Int -> [Int] -primeFactors n = snd $ until ( (== 1 ) . fst ) step (n , [] ) - where - step :: (Int , [Int]) -> (Int , [Int]) - step ( aNumber , factors ) = ( div aNumber smallest , factors ++ - [smallest] ) - where - smallest :: Int - smallest = head $ tail $ divisors aNumber - -isRelativelyPrime :: Int -> Int -> Bool -isRelativelyPrime a b = S.null $ S.intersection ( S.fromList $ - primeFactors a ) ( S.fromList $ primeFactors b ) - -isDuffinian :: Int -> Bool -isDuffinian n = and [(length $ primeFactors n ) > 1 , isRelativelyPrime - ( sum $ divisors n ) n] - -solution :: [Int] -solution = take 50 $ filter isDuffinian [1..] - -findTriplets :: [[Int]] -findTriplets = take 15 $ filter condition $ divvy 3 1 $ filter - isDuffinian [1..] - where - condition :: [Int] -> Bool - condition [a , b , c] = b == a + 1 && c == b + 1 - -outputTriplet :: [Int] -> String -outputTriplet [a , b , c] = "(" ++ replicate ( 6 - length sa ) ' ' ++ - sa ++ replicate (6 - length sb) ' ' ++ sb ++ replicate (6 - length sc ) - ' ' ++ sc ++ " )" - where - sa = show a - sb = show b - sc = show c - -main :: IO ( ) -main = do - putStrLn "The first 50 Duffinian numbers are :" - print solution - putStrLn "The first 15 Duffinian triplets are:" - mapM_ (\t -> putStrLn $ outputTriplet t ) findTriplets diff --git a/Task/Duffinian-numbers/Icon/duffinian-numbers.icon b/Task/Duffinian-numbers/Icon/duffinian-numbers.icon deleted file mode 100644 index 5ca26be44f..0000000000 --- a/Task/Duffinian-numbers/Icon/duffinian-numbers.icon +++ /dev/null @@ -1,28 +0,0 @@ -procedure main(A) - write("The first 50 Duffian numbers:") - every writes(" ",isduffinian(seq())\50) - write("\n") - limit := 15 - write("The first ",limit," Duffian triples:") - every (isduffinian(n := seq()),isduffinian(n+1),isduffinian(n+2))\limit do - write("\t(",n,",",n+1,",",n+2,")") -end - -procedure isduffinian(n) - x := \cfact(n)**\afact(sumfactors(n)) - return (*\x = 1, !x = 1, n) -end - -procedure cfact(n) # all factors of n if n is a composite number - return (*(f := afact(n)) > 2, f) -end - -procedure afact(n) # all factors of n - every (f := set(), i := 1 to n, n%i = 0,insert(f,i)) - return f -end - -procedure sumfactors(n) - every (s := 0, i := 1 to n, n%i = 0) do s +:= i - return s -end diff --git a/Task/Duffinian-numbers/JavaScript/duffinian-numbers.js b/Task/Duffinian-numbers/JavaScript/duffinian-numbers.js deleted file mode 100644 index 1c0331bc11..0000000000 --- a/Task/Duffinian-numbers/JavaScript/duffinian-numbers.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -// ---------- helpers ---------- -const gcd = (a, b) => { - while (b !== 0) [a, b] = [b, a % b]; - return a; -}; - -// ---------- core logic ---------- -function createDuffians(limit) { - // divisor-sum table: divSum[i] = σ(i) - const divSum = new Array(limit).fill(1); - for (let i = 2; i < limit; ++i) { - for (let j = i; j < limit; j += i) divSum[j] += i; - } - - // mark non-Duffinians with 0 - divSum[1] = 0; // 1 is not Duffinian - for (let n = 2; n < limit; ++n) { - const s = divSum[n]; - if (s === n + 1 || gcd(n, s) !== 1) divSum[n] = 0; - } - return divSum; -} - -// ---------- main ---------- -const duffians = createDuffians(11_000); - -console.log('The first 50 Duffinian numbers:'); -let count = 0, n = 1; -while (count < 50) { - if (duffians[n] > 0) { - process.stdout.write(String(n).padStart(4) + (++count % 25 ? '' : '\n')); - } - ++n; -} -console.log(); - -console.log('The first 16 Duffinian triplets:'); -count = 0; -n = 3; -while (count < 16) { - if (duffians[n - 2] && duffians[n - 1] && duffians[n]) { - const triplet = `(${n - 2}, ${n - 1}, ${n})`; - process.stdout.write(triplet.padStart(22) + (++count % 4 ? '' : '\n')); - } - ++n; -} -console.log(); diff --git a/Task/Duffinian-numbers/Julia/duffinian-numbers.jl b/Task/Duffinian-numbers/Julia/duffinian-numbers.julia similarity index 100% rename from Task/Duffinian-numbers/Julia/duffinian-numbers.jl rename to Task/Duffinian-numbers/Julia/duffinian-numbers.julia diff --git a/Task/Duffinian-numbers/Lua/duffinian-numbers.lua b/Task/Duffinian-numbers/Lua/duffinian-numbers.lua deleted file mode 100644 index a8422b4049..0000000000 --- a/Task/Duffinian-numbers/Lua/duffinian-numbers.lua +++ /dev/null @@ -1,58 +0,0 @@ -function gcd(a, b) - while b ~= 0 do - a, b = b, a % b - end - return a -end - -function duffinian(n) - if n == 2 then return false end - local total = 1 - local power = 2 - local m = n - while (n & 1) == 0 do - total = total + power - power = power << 1 - n = n >> 1 - end - local p = 3 - while p * p <= n do - local sum = 1 - local power = p - while n % p == 0 do - sum = sum + power - power = power * p - n = n / p - end - total = total * sum - p = p + 2 - end - if m == n then return false end - if n > 1 then total = total * (n + 1) end - return gcd(total, m) == 1 -end - -print("First 50 Duffinian numbers:") -count = 0 -n = 1 -while count < 50 do - if duffinian(n) then - count = count + 1 - if count % 10 == 0 then space = 10 else space = 32 end - io.write(string.format('%3d%c', n, space)) - end - n = n + 1 -end - -print("\nFirst 30 Duffinian triplets:") -n = 1 -m = 0 -count = 0 -while count < 30 do - if duffinian(n) then m = m + 1 else m = 0 end - if m == 3 then - count = count + 1 - print(string.format('%d, %d, %d', n - 2, n - 1, n)) - end - n = n + 1 -end diff --git a/Task/Duffinian-numbers/PascalABC.NET/duffinian-numbers.pas b/Task/Duffinian-numbers/PascalABC.NET/duffinian-numbers.pas deleted file mode 100644 index e0d2dd58cb..0000000000 --- a/Task/Duffinian-numbers/PascalABC.NET/duffinian-numbers.pas +++ /dev/null @@ -1,36 +0,0 @@ -uses school; - -function is_duffinian(x: integer) := - (gcd(x, divisors(x).Sum) = 1) and - (divisors(x).ToArray.Length > 2); - -begin - var count := 0; - var i := 0; - writeln('First 50 Duffinian numbers:'); - while count < 50 do - begin - if is_duffinian(i) then - begin - write(i:4); - count += 1; - if count mod 10 = 0 then writeln; - end; - i += 1 - end; - - count := 0; - i := 0; - writeln; - writeln('First 15 Duffinian triplets:'); - while count < 15 do - begin - if is_duffinian(i) and is_duffinian(i + 1) and is_duffinian(i + 2) then - begin - writeln(i:6, i + 1:6, i + 2:6); - count += 1; - i += 3; - end; - i += 1; - end; -end. diff --git a/Task/Duffinian-numbers/Refal/duffinian-numbers.refal b/Task/Duffinian-numbers/Refal/duffinian-numbers.refal deleted file mode 100644 index 576fa3f49d..0000000000 --- a/Task/Duffinian-numbers/Refal/duffinian-numbers.refal +++ /dev/null @@ -1,76 +0,0 @@ -$ENTRY Go { - = - >> - - - >; -}; - -ShowTriple { - s.N = >; -}; - -Each { - s.F = ; - s.F t.I e.X = ; -}; - -Group { - s.N = ; - s.N e.X, : (e.1) e.2 = (e.1) ; -}; - -Gen { - s.N s.F = ; - 0 s.F s.I = ; - s.N s.F s.I, : { - True = s.I s.F >; - False = >; - }; -}; - -DuffinianTriple { - s.N, - > - >: True True True = True; - s.N = False; -}; - -Duffinian { - s.N, : s.S, - : s.P, - s.S : { - s.P s.1 = False; - s.Q 1 = True; - s.1 s.2 = False; - }; -}; - -Gcd { - s.A 0 = s.A; - s.A s.B = >; -}; - -SigmaSum { - s.N = 2 >; - s.N s.Sum s.D s.Max, : '+' = s.Sum; - s.N s.Sum s.D s.Max, : s.N = ; - s.N s.Sum s.D s.Max, : 0 = - >> - s.Max>; - s.N s.Sum s.D s.Max = s.Max>; -}; - -Sqrt { - 0 = 1; - 1 = 1; - s.N = >; - s.N s.X0, -
    > 2>: s.X1, - : { - '+' = ; - s.C = s.X0; - }; -}; diff --git a/Task/Duffinian-numbers/Ring/duffinian-numbers.ring b/Task/Duffinian-numbers/Ring/duffinian-numbers.ring deleted file mode 100644 index c7de980c3e..0000000000 --- a/Task/Duffinian-numbers/Ring/duffinian-numbers.ring +++ /dev/null @@ -1,97 +0,0 @@ -Load "stdlibcore.ring" - -nr = 0 -num = 0 -sig1 = 0 -cmp = 0 - -see "FIRST 50 DUFFINIAN NUMBERS:" + nl - -while nr < 50 - num = num + 1 - sigma = 0 - cmp = comp(num) - if cmp = 1 - sgm = sigm1(num) - relat1prim() - ok -end - -nr = 0 -fok = 0 -numc = 1 -sig1 = 0 -sig2 = 0 -sig3 = 0 - -see nl + "FIRST 15 DUFFINIAN TRIPLETS:" + nl - -while nr < 15 - - num1 = numc - num2 = num1 + 1 - num3 = num2 + 1 - cmp1 = comp(num1) - cmp2 = comp(num2) - cmp3 = comp(num3) - if (cmp1 = 1) and (cmp2 = 1) and (cmp3 = 1) - sigm1(num1) - sigm2(num2) - sigm3(num3) - ok - numc = numc + 1 -end - -func comp(nm) - fok = 0 - flag = 0 - for n = 1 to nm - if nm%n = 0 - flag = flag + 1 - ok - if flag > 2 - fok = 1 - exit - ok - next - return fok - -func sigm1(num1) - sig1 = 0 - for n = 1 to num1 - if num1%n = 0 - sig1 = sig1 + n - ok - next - -func sigm2(num2) - sig2 = 0 - for n = 1 to num2 - if num2%n = 0 - sig2 = sig2 + n - ok - next - -func sigm3(num3) - sig3 = 0 - for n = 1 to num3 - if num3%n = 0 - sig3 = sig3 + n - ok - next - - relat2prim() - -func relat1prim() - if (gcd(num,sig1) = 1) - nr = nr + 1 - see "" + num + " " - ok - return nr - -func relat2prim() - if ((gcd(num1,sig1) = 1) and (gcd(num2,sig2) = 1) and (gcd(num3,sig3) = 1)) - nr = nr + 1 - see "" + num1 + "-" + num3 + " " - ok - return nr diff --git a/Task/Duffinian-numbers/Rust/duffinian-numbers.rs b/Task/Duffinian-numbers/Rust/duffinian-numbers.rs deleted file mode 100644 index e6b44a1472..0000000000 --- a/Task/Duffinian-numbers/Rust/duffinian-numbers.rs +++ /dev/null @@ -1,97 +0,0 @@ -fn gcd(mut a: i32, mut b: i32) -> i32 { - while b != 0 { - let temp = b; - b = a % b; - a = temp; - } - a -} - -fn duffinian(n: i32) -> bool { - if n == 2 { - return false; - } - - let mut total = 1; - let mut power = 2; - let m = n; - let mut n = n; - - // Handle powers of 2 - while (n & 1) == 0 { - total += power; - power <<= 1; - n >>= 1; - } - - // Handle odd prime factors - let mut p = 3; - while p * p <= n { - let mut sum = 1; - power = p; - while n % p == 0 { - sum += power; - power *= p; - n /= p; - } - total *= sum; - p += 2; - } - - // Check if n is composite - if m == n { - return false; - } - - // Handle remaining prime factor - if n > 1 { - total *= n + 1; - } - - gcd(total, m) == 1 -} - -fn main() { - println!("First 50 Duffinian numbers:"); - let mut count = 0; - let mut n = 1; - - while count < 50 { - if duffinian(n) { - print!("{:3}", n); - count += 1; - if count % 10 == 0 { - println!(); - } else { - print!(" "); - } - } - n += 1; - } - - println!("\nFirst 50 Duffinian triplets:"); - let mut n = 1; - let mut m = 0; - let mut count = 0; - - while count < 50 { - if duffinian(n) { - m += 1; - } else { - m = 0; - } - - if m == 3 { - let triplet = format!("({}, {}, {})", n - 2, n - 1, n); - print!("{:<24}", triplet); - count += 1; - if count % 3 == 0 { - println!(); - } else { - print!(" "); - } - } - n += 1; - } - println!(); -} diff --git a/Task/Duffinian-numbers/SETL/duffinian-numbers.setl b/Task/Duffinian-numbers/SETL/duffinian-numbers.setl deleted file mode 100644 index 792e5adddc..0000000000 --- a/Task/Duffinian-numbers/SETL/duffinian-numbers.setl +++ /dev/null @@ -1,48 +0,0 @@ -program duffinian_numbers; - init sigma := divisor_sum_table(20000); - - print("First 50 Duffinian numbers:"); - loop for n in first(50, routine is_duffinian) do - nprint(lpad(str n, 6)); - if (col +:= 1) mod 10 = 0 then print; end if; - end loop; - - print; - print("First 15 Duffinian triplets:"); - loop for n in first(15, routine is_duffinian_triplet) do - print(+/[lpad(str i, 6) : i in [n,n+1,n+2]]); - end loop; - - proc first(num, pred); - ls := []; - loop while #ls < num do - loop until call(pred, n) do - n +:= 1; - end loop; - ls with:= n; - end loop; - return ls; - end proc; - - proc is_duffinian_triplet(n); - return and/[is_duffinian(i) : i in [n,n+1,n+2]]; - end proc; - - proc is_duffinian(n); - return sigma(n) > n+1 and gcd(n, sigma(n)) = 1; - end proc; - - proc gcd(a,b); - return if b=0 then a else gcd(b, a mod b) end; - end proc; - - proc divisor_sum_table(sz); - ds := [0] * sz; - loop for i in [1..sz] do - loop for j in [i,i+i..sz] do - ds(j) +:= i; - end loop; - end loop; - return ds; - end proc; -end program; diff --git a/Task/Dutch-national-flag-problem/ANSI-BASIC/dutch-national-flag-problem.basic b/Task/Dutch-national-flag-problem/ANSI-BASIC/dutch-national-flag-problem.basic deleted file mode 100644 index 1c951186b3..0000000000 --- a/Task/Dutch-national-flag-problem/ANSI-BASIC/dutch-national-flag-problem.basic +++ /dev/null @@ -1,59 +0,0 @@ -100 REM Dutch national flag problem -110 DECLARE EXTERNAL SUB PrintColorSeq -120 DECLARE EXTERNAL SUB SortByColor -130 REM 0: blue, 1: while, 2: red -140 DIM T(0 TO 19) -150 LET UP = UBOUND(T) -160 REM Set colors -170 RANDOMIZE -180 FOR I = 0 TO UP -190 LET T(I) = INT(RND * 3) -200 NEXT I -210 PRINT "Unsorted:" -220 CALL PrintColorSeq(T) -230 CALL SortByColor(T) -240 PRINT -250 PRINT "Sorted:" -260 CALL PrintColorSeq(T) -270 END -280 ! -290 EXTERNAL SUB PrintColorSeq (T()) -300 FOR I = 0 TO UBOUND(T) -310 SELECT CASE T(I) -320 CASE 0 -330 PRINT "B"; -340 CASE 1 -350 PRINT "W"; -360 CASE 2 -370 PRINT "R"; -380 END SELECT -390 NEXT I -400 PRINT -410 END SUB -420 ! -430 EXTERNAL SUB SortByColor (T()) -440 DECLARE EXTERNAL SUB Swap -450 LET B = 0 -460 LET W = 0 -470 LET R = UBOUND(T) -480 DO WHILE W <= R -490 SELECT CASE T(W) -500 CASE 1 -510 LET W = W + 1 -520 CASE 0 -530 CALL Swap(T(B), T(W)) -540 LET B = B + 1 -550 LET W = W + 1 -560 CASE 2 -570 call Swap(T(W), T(R)) -580 LET R = R - 1 -590 END SELECT -600 LOOP -610 END SUB -620 ! -630 EXTERNAL SUB Swap(A, B) -640 REM Some implementations have the SWAP statement, but it is not standard -650 LET Tmp = A -660 LET A = B -670 LET B = Tmp -680 END SUB diff --git a/Task/Dutch-national-flag-problem/Ada/dutch-national-flag-problem.adb b/Task/Dutch-national-flag-problem/Ada/dutch-national-flag-problem.ada similarity index 100% rename from Task/Dutch-national-flag-problem/Ada/dutch-national-flag-problem.adb rename to Task/Dutch-national-flag-problem/Ada/dutch-national-flag-problem.ada diff --git a/Task/Dutch-national-flag-problem/AutoIt/dutch-national-flag-problem.au3 b/Task/Dutch-national-flag-problem/AutoIt/dutch-national-flag-problem.autoit similarity index 100% rename from Task/Dutch-national-flag-problem/AutoIt/dutch-national-flag-problem.au3 rename to Task/Dutch-national-flag-problem/AutoIt/dutch-national-flag-problem.autoit diff --git a/Task/Dutch-national-flag-problem/BQN/dutch-national-flag-problem.bqn b/Task/Dutch-national-flag-problem/BQN/dutch-national-flag-problem.bqn deleted file mode 100644 index bfa3b6664a..0000000000 --- a/Task/Dutch-national-flag-problem/BQN/dutch-national-flag-problem.bqn +++ /dev/null @@ -1,5 +0,0 @@ -Make ← •rand.Range⟜≠⊏⊢ -IsSorted ← ∧´·≤˝˘2↕⊐ -Arrange ← /⁼∘⊐/⊣ - -20(⊢(⊢⋈IsSorted)⎉1⊢(⊢≍Arrange)Make)"RWB" diff --git a/Task/Dutch-national-flag-problem/C-sharp/dutch-national-flag-problem-2.cs b/Task/Dutch-national-flag-problem/C-sharp/dutch-national-flag-problem-2.cs deleted file mode 100644 index 4a1787555d..0000000000 --- a/Task/Dutch-national-flag-problem/C-sharp/dutch-national-flag-problem-2.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Dutch national flag problem -using System; - -class DutchFlagProblem -{ - enum Color {Blue, White, Red}; - - static void WriteColorSeq(Color[] t) - { - uint n = (uint)t.Length; - for (uint i = 0; i < n; i++) - { - switch (t[i]) - { - case Color.Blue: - Console.Write("B"); - break; - case Color.White: - Console.Write("W"); - break; - case Color.Red: - Console.Write("R"); - break; - }; - } - Console.WriteLine(); - } - - static void Swap(ref Color x, ref Color y) - { - Color temp = x; - x = y; - y = temp; - } - - static void SortByColor(Color[] t) - { - uint b = 0, w = 0, r = (uint)t.Length - 1; - while (w <= r) - { - switch (t[w]) - { - case Color.White: - w++; - break; - case Color.Blue: - Swap(ref t[b], ref t[w]); - b++; - w++; - break; - case Color.Red: - Swap(ref t[w], ref t[r]); - r--; - break; - } - } - } - - static void Main() - { - const uint N = 20; - Color[] t = new Color[N]; - - // Set colors - Random rand = new Random(); - for (uint i = 0; i < N; i++) - t[i] = (Color)(rand.Next(3)); - - Console.WriteLine("Unsorted:"); - WriteColorSeq(t); - SortByColor(t); - Console.WriteLine(); - Console.WriteLine("Sorted:"); - WriteColorSeq(t); - } -} diff --git a/Task/Dutch-national-flag-problem/C-sharp/dutch-national-flag-problem-1.cs b/Task/Dutch-national-flag-problem/C-sharp/dutch-national-flag-problem.cs similarity index 100% rename from Task/Dutch-national-flag-problem/C-sharp/dutch-national-flag-problem-1.cs rename to Task/Dutch-national-flag-problem/C-sharp/dutch-national-flag-problem.cs diff --git a/Task/Dutch-national-flag-problem/Crystal/dutch-national-flag-problem.cr b/Task/Dutch-national-flag-problem/Crystal/dutch-national-flag-problem.cr deleted file mode 100644 index 3bbbfee1f8..0000000000 --- a/Task/Dutch-national-flag-problem/Crystal/dutch-national-flag-problem.cr +++ /dev/null @@ -1,34 +0,0 @@ -enum FlagColor - Red - White - Blue - - def to_s - ["🔴", "⚪", "🔵"][value] - end -end - -module Indexable - def sorted? - (1...size).each do |i| - if self[i] < self[i-1] - return false - end - end - true - end -end - -balls = loop do - arr = Array.new(20) { FlagColor.values.sample } - break arr unless arr.sorted? -end - -puts balls.join -puts "Sorted: #{balls.sorted?}" -puts - -balls.sort! - -puts balls.join -puts "Sorted: #{balls.sorted?}" diff --git a/Task/Dutch-national-flag-problem/D/dutch-national-flag-problem-1.d b/Task/Dutch-national-flag-problem/D/dutch-national-flag-problem-1.d index bed0a7a25d..afeef682f4 100644 --- a/Task/Dutch-national-flag-problem/D/dutch-national-flag-problem-1.d +++ b/Task/Dutch-national-flag-problem/D/dutch-national-flag-problem-1.d @@ -3,7 +3,7 @@ import std.stdio, std.random, std.algorithm, std.traits, std.array; enum DutchColors { red, white, blue } void dutchNationalFlagSort(DutchColors[] items) pure nothrow @nogc { - ulong lo, mid, hi = items.length - 1; + int lo, mid, hi = items.length - 1; while (mid <= hi) final switch (items[mid]) { diff --git a/Task/Dutch-national-flag-problem/D/dutch-national-flag-problem-2.d b/Task/Dutch-national-flag-problem/D/dutch-national-flag-problem-2.d index f6ba27017a..03a077347b 100644 --- a/Task/Dutch-national-flag-problem/D/dutch-national-flag-problem-2.d +++ b/Task/Dutch-national-flag-problem/D/dutch-national-flag-problem-2.d @@ -62,7 +62,7 @@ void main() { // More tests: foreach (i; 0 .. 100_000) { - ulong n = uniform(0, balls.length); + int n = uniform(0, balls.length); foreach (ref ball; balls[0 .. n]) ball = [EnumMembers!DutchColors][uniform(0, $)]; balls[0 .. n].dutchNationalFlagSort(DutchColors.red, diff --git a/Task/Dutch-national-flag-problem/Delphi/dutch-national-flag-problem.pas b/Task/Dutch-national-flag-problem/Delphi/dutch-national-flag-problem.delphi similarity index 100% rename from Task/Dutch-national-flag-problem/Delphi/dutch-national-flag-problem.pas rename to Task/Dutch-national-flag-problem/Delphi/dutch-national-flag-problem.delphi diff --git a/Task/Dutch-national-flag-problem/EasyLang/dutch-national-flag-problem.easy b/Task/Dutch-national-flag-problem/EasyLang/dutch-national-flag-problem.easy index 10f3b5828a..97bf8d02eb 100644 --- a/Task/Dutch-national-flag-problem/EasyLang/dutch-national-flag-problem.easy +++ b/Task/Dutch-national-flag-problem/EasyLang/dutch-national-flag-problem.easy @@ -1,10 +1,12 @@ col$[] = [ "red" "white" "blue" ] for i to 8 - b[] &= random 1 3 + b[] &= randint 3 . for b in b[] write col$[b] & " " - if b < b0 : not_sorted = 1 + if b < b0 + not_sorted = 1 + . b0 = b . print "" @@ -14,7 +16,9 @@ if not_sorted = 0 else for i = 1 to len b[] - 1 for j = i + 1 to len b[] - if b[j] < b[i] : swap b[j] b[i] + if b[j] < b[i] + swap b[j] b[i] + . . . for b in b[] diff --git a/Task/Dutch-national-flag-problem/Elixir/dutch-national-flag-problem.ex b/Task/Dutch-national-flag-problem/Elixir/dutch-national-flag-problem.elixir similarity index 100% rename from Task/Dutch-national-flag-problem/Elixir/dutch-national-flag-problem.ex rename to Task/Dutch-national-flag-problem/Elixir/dutch-national-flag-problem.elixir diff --git a/Task/Dutch-national-flag-problem/Erlang/dutch-national-flag-problem-1.erl b/Task/Dutch-national-flag-problem/Erlang/dutch-national-flag-problem-1.erl index 4015d07d23..53fef5d216 100644 --- a/Task/Dutch-national-flag-problem/Erlang/dutch-national-flag-problem-1.erl +++ b/Task/Dutch-national-flag-problem/Erlang/dutch-national-flag-problem-1.erl @@ -5,7 +5,7 @@ ball(red) -> 1; ball(white) -> 2; ball(blue) -> 3. -random_ball() -> lists:nth(rand:uniform(3), [red, white, blue]). +random_ball() -> lists:nth(random:uniform(3), [red, white, blue]). random_balls(N) -> random_balls(N,[]). random_balls(0,L) -> L; diff --git a/Task/Dutch-national-flag-problem/Free-Pascal-Lazarus/dutch-national-flag-problem.pas b/Task/Dutch-national-flag-problem/Free-Pascal-Lazarus/dutch-national-flag-problem.pas deleted file mode 100644 index 8745222d90..0000000000 --- a/Task/Dutch-national-flag-problem/Free-Pascal-Lazarus/dutch-national-flag-problem.pas +++ /dev/null @@ -1,74 +0,0 @@ -program DutchF; - - { Dutch national flag problem } - -type - TColor = (Blue, White, Red); - -const - N = 20; - -var - T: array [0 .. N - 1] of TColor; - I: cardinal; - - procedure Swap(var A, B: TColor); - var - Tmp: TColor; - begin - Tmp := A; - A := B; - B := Tmp; - end; - - procedure WriteColorSeq(T: array of TColor); - var - I: cardinal; - begin - for I := low(T) to high(T) do - case T[I] of - Blue: Write('B'); - White: Write('W'); - Red: Write('R'); - end; - WriteLn; - end; - - procedure SortByColor(var T: array of TColor); - var - B, W, R: cardinal; - begin - B := Low(T); - W := Low(T); - R := High(T); - while W <= R do - case T[W] of - White: - Inc(W); - Blue: - begin - Swap(T[B], T[W]); - Inc(B); - Inc(W); - end; - Red: - begin - Swap(T[W], T[R]); - Dec(R); - end; - end; - end; - -begin - { Set colors } - Randomize; - for I := 0 to N - 1 do - T[I] := TColor(Random(3)); - writeln('Unsorted:'); - WriteColorSeq(T); - SortByColor(T); - WriteLn; - writeln('Sorted:'); - WriteColorSeq(T); - {readln;} -end. diff --git a/Task/Dutch-national-flag-problem/FutureBasic/dutch-national-flag-problem.basic b/Task/Dutch-national-flag-problem/FutureBasic/dutch-national-flag-problem.basic deleted file mode 100644 index f7c621a282..0000000000 --- a/Task/Dutch-national-flag-problem/FutureBasic/dutch-national-flag-problem.basic +++ /dev/null @@ -1,43 +0,0 @@ -void local fn DrawBalls( y as long, balls as CFArrayRef, sort as BOOL ) - long col, prevCol = 0, x = 10 - CFArrayRef cols = @[fn ColorWithSRGB(.78,.06,.18,1.0),fn ColorWhite,fn ColorWithSRGB(0,.24,.65,1.0)] - if ( sort ) then balls = fn ArraySortedArrayUsingSelector( balls, @"compare:" ) - - pen -1 - for long i = 0 to len(balls) - 1 - col = intval(balls[i]) - if ( sort == YES ) - if ( col != prevCol ) then y += 30 : x = 10 - else - if ( i > 0 && i % 15 == 0 ) then y += 30 : x = 10 - end if - oval fill (x,y,30,30), cols[col] - x += 30 - prevCol = col - next -end fn - -void local fn DutchNationalFlagProblem - window 1, @"Dutch national flag problem", (0,0,470,230) - WindowSetBackgroundColor( 1, fn ColorWithSRGB(1.0,.61,0,1.0) ) - - CFMutableArrayRef balls = fn MutableArrayNew - - text @"Menlo-Bold",, fn ColorWhite - - for long i = 0 to 29 - balls[i] = @(rnd(3)-1) - next - - print @"Unsorted:" - fn DrawBalls( 20, balls, NO ) - - print %(3,100)@"Sorted:" - fn DrawBalls( 120, balls, YES ) -end fn - -random - -fn DutchNationalFlagProblem - -HandleEvents diff --git a/Task/Dutch-national-flag-problem/GW-BASIC/dutch-national-flag-problem.basic b/Task/Dutch-national-flag-problem/GW-BASIC/dutch-national-flag-problem.basic deleted file mode 100644 index d0fd2bce6a..0000000000 --- a/Task/Dutch-national-flag-problem/GW-BASIC/dutch-national-flag-problem.basic +++ /dev/null @@ -1,42 +0,0 @@ -100 REM Dutch national flag problem -110 REM 0: blue, 1: while, 2: red -120 OPTION BASE 0 -130 N% = 20 -140 UP% = N% - 1 -150 DIM T%(UP%) -160 REM Set colors -170 RANDOMIZE -180 FOR I% = 0 TO UP% -190 T%(I%) = INT(RND * 3) -200 NEXT I% -210 PRINT "Unsorted:" -220 GOSUB 1000 -230 GOSUB 2000 -240 PRINT -250 PRINT "Sorted:" -260 GOSUB 1000 -270 END -1000 REM ** Print color sequence -1010 FOR I% = 0 TO UP% -1020 IF T%(I%) = 0 THEN PRINT "B"; ELSE IF T%(I%) = 1 THEN PRINT "W"; ELSE PRINT "R"; -1030 NEXT I% -1040 PRINT -1050 RETURN -2000 REM ** Sort by color -2010 B% = 0: W% = 0: R% = UP% -2020 WHILE W% <= R% -2030 IF T%(W%) <> 1 THEN 2070 -2040 REM white -2050 W% = W% + 1 -2060 GOTO 2160 -2070 IF T%(W%) <> 0 THEN 2130 -2080 REM blue -2090 SWAP T%(B%), T%(W%) -2100 B% = B% + 1 -2110 W% = W% + 1 -2120 GOTO 2160 -2130 REM red -2140 SWAP T%(W%), T%(R%) -2150 R% = R% - 1 -2160 WEND -2170 RETURN diff --git a/Task/Dutch-national-flag-problem/Java/dutch-national-flag-problem-2.java b/Task/Dutch-national-flag-problem/Java/dutch-national-flag-problem-2.java deleted file mode 100644 index 3c8b7d46da..0000000000 --- a/Task/Dutch-national-flag-problem/Java/dutch-national-flag-problem-2.java +++ /dev/null @@ -1,79 +0,0 @@ -// Dutch national flag problem - -public class Main { - - enum Color {BLUE, WHITE, RED}; - - static final int N = 20; - - static void printColorSeq(Color[] t) { - int n = t.length; - for (int i = 0; i < n; i++) { - switch (t[i]) { - case BLUE: - System.out.print("B"); - break; - case WHITE: - System.out.print("W"); - break; - case RED: - System.out.print("R"); - break; - } - } - System.out.println(); - } - - static void swapElems(Color[] arr, int i, int j) { - Color temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - } - - static void sortByColor(Color[] t) { - int b = 0, w = 0, r = t.length - 1; - while (w <= r) { - switch (t[w]) { - case WHITE: - w++; - break; - case BLUE: - swapElems(t, b, w); - b++; - w++; - break; - case RED: - swapElems(t, w, r); - r--; - break; - } - } - } - - public static void main(String[] args) { - Color[] t = new Color[N]; - - // Set colors - for (int i = 0; i < N; i++) { - int ci = (int)(Math.random() * 3); - switch (ci) { - case 0: - t[i] = Color.BLUE; - break; - case 1: - t[i] = Color.WHITE; - break; - case 2: - t[i] = Color.RED; - break; - } - } - - System.out.println("Unsorted:"); - printColorSeq(t); - sortByColor(t); - System.out.println(); - System.out.println("Sorted:"); - printColorSeq(t); - } -} diff --git a/Task/Dutch-national-flag-problem/Java/dutch-national-flag-problem-1.java b/Task/Dutch-national-flag-problem/Java/dutch-national-flag-problem.java similarity index 100% rename from Task/Dutch-national-flag-problem/Java/dutch-national-flag-problem-1.java rename to Task/Dutch-national-flag-problem/Java/dutch-national-flag-problem.java diff --git a/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-1.jl b/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-1.jl deleted file mode 100644 index 5aa84ff6c8..0000000000 --- a/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-1.jl +++ /dev/null @@ -1,26 +0,0 @@ -using Printf - -const COLORS = ["red", "white", "blue"] - -function dutchsort!(a::AbstractVector, lo=COLORS[1], hi=COLORS[end]) - i = 1 - j = 1 - n = length(a) - while j <= n - if a[j] == lo - a[i], a[j] = a[j], a[i] - i += 1 - j += 1 - elseif a[j] == hi - a[j], a[n] = a[n], a[j] - n -= 1 - else - j += 1 - end - end - return a -end - -function dutchsort(a::AbstractVector, lo=COLORS[1], hi=COLORS[end]) - dutchsort!(copy(a), lo, hi) -end diff --git a/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-1.julia b/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-1.julia new file mode 100644 index 0000000000..6ac9875975 --- /dev/null +++ b/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-1.julia @@ -0,0 +1,24 @@ +const COLORS = ["red", "white", "blue"] + +function dutchsort!(a::Array{ASCIIString,1}, lo=COLORS[1], hi=COLORS[end]) + i = 1 + j = 1 + n = length(a) + while j <= n + if a[j] == lo + a[i], a[j] = a[j], a[i] + i += 1 + j += 1 + elseif a[j] == hi + a[j], a[n] = a[n], a[j] + n -= 1 + else + j += 1 + end + end + return a +end + +function dutchsort(a::Array{ASCIIString,1}, lo=COLORS[1], hi=COLORS[end]) + dutchsort!(copy(a), lo, hi) +end diff --git a/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-2.jl b/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-2.jl deleted file mode 100644 index fc37d7ec80..0000000000 --- a/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-2.jl +++ /dev/null @@ -1,30 +0,0 @@ -function formatdf(a::AbstractVector) - i = 0 - s = " " - for c in a - s *= @sprintf "%6s" c - i += 1 - i %= 8 - if i == 0 - s *= "\n " - end - end - return s -end - -const cnum = 20 -const d = [COLORS[rand(1:3)] for i in 1:cnum] -while d == dutchsort(d) - d .= [COLORS[rand(1:3)] for i in 1:cnum] -end - -println("The original list is:") -println(formatdf(d)) - -print("Sorting with dutchsort, after") -@time e = dutchsort(d) -println(formatdf(e)) - -print("Sorting conventionally, after") -@time e = sort(d, by = x -> findfirst(==(x), COLORS)) -println(formatdf(e)) diff --git a/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-2.julia b/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-2.julia new file mode 100644 index 0000000000..d597551c58 --- /dev/null +++ b/Task/Dutch-national-flag-problem/Julia/dutch-national-flag-problem-2.julia @@ -0,0 +1,30 @@ +function formatdf(a::Array{ASCIIString,1}) + i = 0 + s = " " + for c in a + s *= @sprintf "%6s" c + i += 1 + i %= 8 + if i == 0 + s *= "\n " + end + end + return s +end + +cnum = 20 +d = [COLORS[rand(1:3)] for i in 1:cnum] +while d == dutchsort(d) + d = [COLORS[rand(1:3)] for i in 1:cnum] +end + +println("The original list is:") +println(formatdf(d)) + +print("Sorting with dutchsort, ") +@time e = dutchsort(d) +println(formatdf(e)) + +print("Sorting conventionally, ") +@time e = sort(d, by=x->findfirst(COLORS, x)) +println(formatdf(e)) diff --git a/Task/Dutch-national-flag-problem/Kotlin/dutch-national-flag-problem.kts b/Task/Dutch-national-flag-problem/Kotlin/dutch-national-flag-problem.kotlin similarity index 100% rename from Task/Dutch-national-flag-problem/Kotlin/dutch-national-flag-problem.kts rename to Task/Dutch-national-flag-problem/Kotlin/dutch-national-flag-problem.kotlin diff --git a/Task/Dutch-national-flag-problem/Loglan82/dutch-national-flag-problem.loglan82 b/Task/Dutch-national-flag-problem/Loglan82/dutch-national-flag-problem.loglan82 deleted file mode 100644 index dee8475b53..0000000000 --- a/Task/Dutch-national-flag-problem/Loglan82/dutch-national-flag-problem.loglan82 +++ /dev/null @@ -1,71 +0,0 @@ -(* Dutch national flag problem *) - -block -const - c_blue = 0, c_white = 1, c_red = 2, - n = 20; -var - i: integer, - t: arrayof integer; - - unit writeln_color_seq: procedure (t: arrayof integer); - var - i: integer; - begin - for i := lower(t) to upper(t) - do - case t(i) - when c_blue: - write("B"); - when c_white: - write("W"); - when c_red: - write("R"); - esac; - od; - writeln; - end writeln_color_seq; - - unit swap: procedure (inout a, b: integer); - var - tmp: integer; - begin - tmp := a; - a := b; - b := tmp - end swap; - - unit sort_by_color: procedure (t: arrayof integer); - var - b, w, r: integer; - begin - b, w := lower(t); - r := upper(t); - while (w <= r) - do - case t(w) - when c_white: - w := w + 1; - when c_blue: - call swap(t(b), t(w)); - b := b + 1; - w := w + 1; - when c_red: - call swap(t(w), t(r)); - r := r - 1; - esac - od; - end sort_by_color; - -begin - array t dim (0 : n - 1); - - (* Set colors *) - for i := 0 to n - 1 do t(i) := entier(random * 3) od; - writeln("Unsorted:"); - call writeln_color_seq(t); - call sort_by_color(t); - writeln; - writeln("Sorted:"); - call writeln_color_seq(t); -end; diff --git a/Task/Dutch-national-flag-problem/M2000-Interpreter/dutch-national-flag-problem-1.m2000 b/Task/Dutch-national-flag-problem/M2000-Interpreter/dutch-national-flag-problem-1.m2000 deleted file mode 100644 index 12e0137b20..0000000000 --- a/Task/Dutch-national-flag-problem/M2000-Interpreter/dutch-national-flag-problem-1.m2000 +++ /dev/null @@ -1,23 +0,0 @@ - SortElse=lambda white (a(), &swaps, &compares)->{ - long mid=white - long i, j, k=len(a())-1 - while j<=k - - if a(j)mid then - compares+=2 - swap a(j), a(k) - swaps++ - k-- - else - compares+=2 - j++ - end if - end while - =a() - } diff --git a/Task/Dutch-national-flag-problem/M2000-Interpreter/dutch-national-flag-problem-2.m2000 b/Task/Dutch-national-flag-problem/M2000-Interpreter/dutch-national-flag-problem-2.m2000 deleted file mode 100644 index acaf408117..0000000000 --- a/Task/Dutch-national-flag-problem/M2000-Interpreter/dutch-national-flag-problem-2.m2000 +++ /dev/null @@ -1,88 +0,0 @@ -function Dutch_national_flag_problem { - enum bands {red=1, white, blue} - s=red - check_in_order=lambda s, (a as array) ->{ - boolean true=@true, false - k=each(a) - m=s - Z=S - =true - while k - z=array(k) - if m=z else - if m=blue then - =false - break - else - m++ - if m=z else =false : break - end if - end if - end while - } - SortElse=lambda (m(), &swaps, &compares)->{ - long t=len(m()) - dim c(1 to 3)=t - c=1 - for i=0 to len(m())-1 - rem ? "pos:";i;" "; - w=m(i) - if w0 - if c(k)=t then k-- : continue - if m(j)c(k) then c(m(j))=c(k) - rem ? "swap:";m(j);" at pos "+j;" with ";m(c(k)); " at pos ";c(k) - swap m(j), m(c(k)) - rem ? "just swapped array :", m()#str$() - rem ? "c()", c()#str$() - swaps++ - j=c(k) - c(k)++ - end if - k-- - rem ? "k=";k, c(k) - end while - else.if w>c then - c=w - if i-c(c)>1 else c(c)=i - end if - next - =m() - } - random_band=lambda->random(1, 3) - n=random(10, 20) - if n<3 then exit ' need at least 3 colors for the flag - although n now didn't get value 3 we place it to remember it later - do - do - dim balls(n)< { + if size<1 then size=1 + randomitem=lambda a->a#val(random(0,2)) + dim a(size)<{ + Document r$=eval$(array(s)) + if len(s)>1 then + For i=1 to len(s)-1 { + r$=", "+eval$(array(s,i)) + } + end if + =r$ +} +TestSort$=lambda$ (s as array)-> { + ="unsorted: " + x=array(s) + for i=1 to len(s)-1 { + k=array(s,i) + if x>k then break + swap x, k + } + ="sorted: " +} +Positions=lambda mid=White (a as array) ->{ + m=len(a) + dim Base 0, b(m)=-1 + low=-1 + high=m + m-- + i=0 + medpos=stack + link a to a() + for i=m to 0 { + if a(i)<=mid then exit + high-- + b(high)=high + } + for i=0 to m { + if a(i)>=mid then exit + low++ + b(low)=low + } + if high-low>1 then + for i=low+1 to high-1 { + select case a(i)<=>Mid + case -1 + low++ : b(low)=i + case 1 + { + high-- :b(high)=i + if High0 then + dim c() + c()=array(medpos) + stock c(0) keep len(c()), b(low+1) + for i=low+1 to high-1 + if b(i)>low and b(i)i then swap b(b(i)), b(i) + next i + end if + if low>0 then + for i=0 to low + if b(i)<=low and b(i)<>i then swap b(b(i)), b(i) + next + end if + if High=High and b(i)<>i then swap b(b(i)), b(i) + next + end if + =b() +} +InPlace=Lambda (&p(), &Final()) ->{ + def i=0, j=-1, k=-1, many=0 + for i=0 to len(p())-1 + if p(i)<>i then + j=i + z=final(j) + do + final(j)=final(p(j)) + k=j + j=p(j) + p(k)=k + many++ + until j=i + final(k)=z + end if + next + =many +} + + +Dim final(), p(), second(), p1() +Rem final()=(White,Red,Blue,White,Red, Red, Blue) +Rem final()=(white, blue, red, blue, white) + +final()=fillarray(30) +Print "Items: ";len(final()) +Report TestSort$(final())+Display$(final()) +\\ backup for final() for second example +second()=final() +p()=positions(final()) +\\ backup p() to p1() for second example +p1()=p() + + +Report Center, "InPlace" +rem Print p() ' show array items +many=InPlace(&p(), &final()) +rem print p() ' show array items +Report TestSort$(final())+Display$(final()) +print "changes: "; many + + +Report Center, "Using another array to make the changes" +final()=second() +\\ using a second array to place only the changes +item=each(p1()) +many=0 +While item { + if item^=array(item) else final(item^)=second(array(item)) : many++ +} +Report TestSort$(final())+Display$(final()) +print "changes: "; many +Module three_way_partition (A as array, mid as balls, &swaps) { + Def i, j, k + k=Len(A) + Link A to A() + While j < k + if A(j) < mid Then + Swap A(i), A(j) + swaps++ + i++ + j++ + Else.if A(j) > mid Then + k-- + Swap A(j), A(k) + swaps++ + Else + j++ + End if + End While +} +Many=0 +Z=second() +Print +Report center, {Three Way Partition +} +Report TestSort$(Z)+Display$(Z) +three_way_partition Z, White, &many +Print +Report TestSort$(Z)+Display$(Z) +Print "changes: "; many diff --git a/Task/Dutch-national-flag-problem/Modula-2/dutch-national-flag-problem.mod2 b/Task/Dutch-national-flag-problem/Modula-2/dutch-national-flag-problem.mod2 deleted file mode 100644 index 2802b39ad3..0000000000 --- a/Task/Dutch-national-flag-problem/Modula-2/dutch-national-flag-problem.mod2 +++ /dev/null @@ -1,80 +0,0 @@ -MODULE DutchF; -(* Dutch national flag problem *) - -FROM RandomNumbers IMPORT - Rnd; -FROM STextIO IMPORT - WriteLn, WriteString; - -TYPE - TColor = (Blue, White, Red); - -CONST - N = 20; - -VAR - T: ARRAY [0 .. N - 1] OF TColor; - I: CARDINAL; - -PROCEDURE Swap(VAR A, B: TColor); -VAR - Tmp: TColor; -BEGIN - Tmp := A; - A := B; - B := Tmp -END Swap; - -PROCEDURE WriteColorSeq(T: ARRAY OF TColor); -VAR - I: CARDINAL; -BEGIN - FOR I := 0 TO HIGH(T) DO - CASE T[I] OF - | Blue: - WriteString("B"); - | White: - WriteString("W"); - | Red: - WriteString("R"); - END - END; - WriteLn; -END WriteColorSeq; - -PROCEDURE SortByColor(VAR T: ARRAY OF TColor); -VAR - B, W, R: CARDINAL; -BEGIN - B := 0; - W := 0; - R := HIGH(T); - WHILE W <= R DO - CASE T[W] OF - | White: - W := W + 1; - | Blue: - Swap(T[B], T[W]); - B := B + 1; - W := W + 1; - | Red: - Swap(T[W], T[R]); - R := R - 1; - END; - END; -END SortByColor; - -BEGIN - (* Set colors *) - FOR I := 0 TO N - 1 DO - T[I] := VAL(TColor, Rnd(3)); - END; - WriteString("Unsorted:"); - WriteLn; - WriteColorSeq(T); - SortByColor(T); - WriteLn; - WriteString("Sorted:"); - WriteLn; - WriteColorSeq(T); -END DutchF. diff --git a/Task/Dutch-national-flag-problem/PascalABC.NET/dutch-national-flag-problem.pas b/Task/Dutch-national-flag-problem/PascalABC.NET/dutch-national-flag-problem.pas deleted file mode 100644 index eaa7d1319a..0000000000 --- a/Task/Dutch-national-flag-problem/PascalABC.NET/dutch-national-flag-problem.pas +++ /dev/null @@ -1,33 +0,0 @@ -type - colors = (red, white, blue); - -procedure threeWayPartition(a: array of colors; mid: colors); -begin - var (i, j) := (0, 0); - var k := a.High; - while j <= k do - if a[j] < mid then - begin - swap(a[i], a[j]); - i += 1; - j += 1; - end - else if a[j] > mid then - begin - swap(a[j], a[k]); - k -= 1; - end - else j += 1; -end; - -begin - var balls: array of colors; - repeat - balls := ArrGen(10, i -> |red, white, blue|.randomelement); - until balls <> balls.Sorted; - - println('Original ball order:', balls); - threewaypartition(balls, white); - println('Sorted ball order: ', balls); - assert(balls <> balls.sorted, 'Not sorted!'); -end. diff --git a/Task/Dutch-national-flag-problem/Phix/dutch-national-flag-problem.phix b/Task/Dutch-national-flag-problem/Phix/dutch-national-flag-problem.phix index 6167e25ead..a0357d6a9b 100644 --- a/Task/Dutch-national-flag-problem/Phix/dutch-national-flag-problem.phix +++ b/Task/Dutch-national-flag-problem/Phix/dutch-national-flag-problem.phix @@ -1,39 +1,41 @@ -with javascript_semantics -function three_way_partition(sequence s, integer mid) - integer i=1, j=1, n = length(s) - while j <= n do - if s[j] < mid then - {s[i],s[j]} = {s[j],s[i]} - i += 1 - j += 1 - elsif s[j] > mid then - {s[j],s[n]} = {s[n],s[j]} - n -= 1 - else - j += 1 - end if - end while - return s -end function +(phixonline)--> + with javascript_semantics + function three_way_partition(sequence s, integer mid) + integer i=1, j=1, n = length(s) + while j <= n do + if s[j] < mid then + {s[i],s[j]} = {s[j],s[i]} + i += 1 + j += 1 + elsif s[j] > mid then + {s[j],s[n]} = {s[n],s[j]} + n -= 1 + else + j += 1 + end if + end while + return s + end function -constant colours = {"red","white","blue"} -enum /*red,*/ white = 2, blue, maxc = blue + constant colours = {"red","white","blue"} + enum /*red,*/ white = 2, blue, maxc = blue -procedure show(string msg, sequence s) - sequence t = repeat(0,length(s)) - for i=1 to length(s) do - t[i] = colours[s[i]] - end for - printf(1,"%s: %s\n",{msg,join(t)}) -end procedure + procedure show(string msg, sequence s) + sequence t = repeat(0,length(s)) + for i=1 to length(s) do + t[i] = colours[s[i]] + end for + printf(1,"%s: %s\n",{msg,join(t)}) + end procedure -sequence unsorted, sorted -while 1 do - unsorted = sq_rand(repeat(maxc,12)) --- sorted = sort(deep_copy(unsorted)) -- (works just as well) - sorted = three_way_partition(deep_copy(unsorted), white) - if unsorted!=sorted then exit end if - ?"oops" -end while -show("Unsorted",unsorted) -show("Sorted",sorted) + sequence unsorted, sorted + while 1 do + unsorted = sq_rand(repeat(maxc,12)) + -- sorted = sort(deep_copy(unsorted)) -- (works just as well) + sorted = three_way_partition(deep_copy(unsorted), white) + if unsorted!=sorted then exit end if + ?"oops" + end while + show("Unsorted",unsorted) + show("Sorted",sorted) + n ) - [ 2 ] is white ( --> n ) - [ 3 ] is blue ( --> n ) - - randomise - - [] ' [ red white blue ] - witheach - [ nested swap - 5 random times [ over join ] - swap join ] - - dup [ shuffle 2dup != until ] nip - - say "Before sorting: " dup echo cr - say " After sorting: " sortwith [ dip do do > ] echo cr diff --git a/Task/Dutch-national-flag-problem/QuickBASIC/dutch-national-flag-problem.basic b/Task/Dutch-national-flag-problem/QuickBASIC/dutch-national-flag-problem.basic deleted file mode 100644 index cca5c51dbe..0000000000 --- a/Task/Dutch-national-flag-problem/QuickBASIC/dutch-national-flag-problem.basic +++ /dev/null @@ -1,57 +0,0 @@ -' Dutch national flag problem -DECLARE SUB PrintColorSeq (T() AS INTEGER) -DECLARE SUB SortByColor (T() AS INTEGER) - -CONST CBLUE% = 0, CWHITE% = 1, CRED% = 2 -CONST N% = 20 -DIM T(0 TO N% - 1) AS INTEGER -DIM I AS INTEGER - -' Set colors -RANDOMIZE TIMER -FOR I = 0 TO N% - 1 - T(I) = INT(RND * 3) -NEXT I - -PRINT "Unsorted:" -CALL PrintColorSeq(T()) -CALL SortByColor(T()) -PRINT -PRINT "Sorted:" -CALL PrintColorSeq(T()) -END - -SUB PrintColorSeq (T() AS INTEGER) - DIM I AS INTEGER - FOR I = 0 TO UBOUND(T) - SELECT CASE T(I) - CASE CBLUE% - PRINT "B"; - CASE CWHITE% - PRINT "W"; - CASE CRED% - PRINT "R"; - END SELECT - NEXT I - PRINT -END SUB - -SUB SortByColor (T() AS INTEGER) - DIM B AS INTEGER, W AS INTEGER, R AS INTEGER - B = 0 - W = 0 - R = UBOUND(T) - DO WHILE W <= R - SELECT CASE T(W) - CASE CWHITE% - W = W + 1 - CASE CBLUE% - SWAP T(B), T(W) - B = B + 1 - W = W + 1 - CASE CRED% - SWAP T(W), T(R) - R = R - 1 - END SELECT - LOOP -END SUB diff --git a/Task/Dutch-national-flag-problem/R/dutch-national-flag-problem.r b/Task/Dutch-national-flag-problem/R/dutch-national-flag-problem.r deleted file mode 100644 index bf63f230ae..0000000000 --- a/Task/Dutch-national-flag-problem/R/dutch-national-flag-problem.r +++ /dev/null @@ -1,26 +0,0 @@ -colours <- c("Red", "White", "Blue") - -rand_balls <- function(v, f){ - repeat{ - balls <- sample(v, sample(10:20, 1), replace=TRUE) - balls_sorted <- f(balls) - if(!identical(balls, balls_sorted)){ - print(list("Unsorted"=balls, "Sorted"=balls_sorted), quote=FALSE) - break - } - } -} - -#Method 1: converting the vector of colours to a factor and using the built-in sort() function - -colours_ordered <- factor(1:3, labels=colours) -rand_balls(colours_ordered, sort) - -#Method 2: simple counting sort (showcasing the conciseness of R's rep() function) - -counting_sort <- function(v){ - counts <- sapply(1:3, function(n) sum(v==colours[n])) - rep(colours, times=counts) -} - -rand_balls(colours, counting_sort) diff --git a/Task/Dutch-national-flag-problem/Rust/dutch-national-flag-problem.rs b/Task/Dutch-national-flag-problem/Rust/dutch-national-flag-problem.rs deleted file mode 100644 index 325af2792e..0000000000 --- a/Task/Dutch-national-flag-problem/Rust/dutch-national-flag-problem.rs +++ /dev/null @@ -1,43 +0,0 @@ -extern crate rand; // 0.10.0 used - -use rand::prelude::*; - -// Color enums will be sorted by their top-to-bottom declaration order -#[derive(Eq,Ord,PartialOrd,PartialEq,Debug)] -enum Color { - Red, - White, - Blue -} - -fn is_sorted(list: &Vec) -> bool { - let mut state = &Color::Red; - for current in list.iter() { - if current < state { return false; } - if current > state { state = current; } - } - true -} - -fn main() { - let mut rng = rand::rng(); - let mut colors: Vec = Vec::new(); - - for _ in 1..10 { - let r = rng.random_range(0..3); - if r == 0 { colors.push(Color::Red); } - else if r == 1 { colors.push(Color::White); } - else if r == 2 { colors.push(Color::Blue); } - } - - while is_sorted(&colors) { - colors.shuffle(&mut rng); - } - - println!("Before: {:?}", colors); - colors.sort(); - println!("After: {:?}", colors); - if !is_sorted(&colors) { - println!("Oops, did not sort colors correctly!"); - } -} diff --git a/Task/Dutch-national-flag-problem/Rust/dutch-national-flag-problem.rust b/Task/Dutch-national-flag-problem/Rust/dutch-national-flag-problem.rust new file mode 100644 index 0000000000..0a6e2a4972 --- /dev/null +++ b/Task/Dutch-national-flag-problem/Rust/dutch-national-flag-problem.rust @@ -0,0 +1,44 @@ +extern crate rand; + +use rand::Rng; + +// Color enums will be sorted by their top-to-bottom declaration order +#[derive(Eq,Ord,PartialOrd,PartialEq,Debug)] +enum Color { + Red, + White, + Blue +} + +fn is_sorted(list: &Vec) -> bool { + let mut state = &Color::Red; + for current in list.iter() { + if current < state { return false; } + if current > state { state = current; } + } + true +} + + +fn main() { + let mut rng = rand::thread_rng(); + let mut colors: Vec = Vec::new(); + + for _ in 1..10 { + let r = rng.gen_range(0, 3); + if r == 0 { colors.push(Color::Red); } + else if r == 1 { colors.push(Color::White); } + else if r == 2 { colors.push(Color::Blue); } + } + + while is_sorted(&colors) { + rng.shuffle(&mut colors); + } + + println!("Before: {:?}", colors); + colors.sort(); + println!("After: {:?}", colors); + if !is_sorted(&colors) { + println!("Oops, did not sort colors correctly!"); + } +} diff --git a/Task/Dutch-national-flag-problem/Uiua/dutch-national-flag-problem.uiua b/Task/Dutch-national-flag-problem/Uiua/dutch-national-flag-problem.uiua deleted file mode 100644 index 354f52209c..0000000000 --- a/Task/Dutch-national-flag-problem/Uiua/dutch-national-flag-problem.uiua +++ /dev/null @@ -1,3 +0,0 @@ -&p.[⍥(⊡⌊×3⚂"RWB")30] # Build it. -&p.⊏▽⊸>2⍏⊛.⊂"RWB" # Sort it, providing model for sort order. -&p⨬("oops"|"good")≍⊏⊸⍏.⊛ # Confirm it's sorted. diff --git a/Task/Dutch-national-flag-problem/V-(Vlang)/dutch-national-flag-problem.v b/Task/Dutch-national-flag-problem/V-(Vlang)/dutch-national-flag-problem.v deleted file mode 100644 index 7f5ba932b3..0000000000 --- a/Task/Dutch-national-flag-problem/V-(Vlang)/dutch-national-flag-problem.v +++ /dev/null @@ -1,25 +0,0 @@ -import rand - -fn main() { - flag := ["Red","White","Blue"] - mut balls := [10]string{} - mut color :="" - mut number := 0 - - print("Random: |") - for idx in 0..10 { - number = rand.int_in_range(0, 3) or {println("Error: invalid number") exit(1)} - balls[idx] = flag[number] - print("${balls[idx]}" + " |") - } - println("") - - print("Sorted: |") - for idx in 0..3 { - color = flag[idx] - for jdx in 0..10 { - if balls[jdx] == color {print("${balls[jdx]}" + " |")} - } - } - println("") -} diff --git a/Task/Dutch-national-flag-problem/VBScript/dutch-national-flag-problem.vbs b/Task/Dutch-national-flag-problem/VBScript/dutch-national-flag-problem.vb similarity index 100% rename from Task/Dutch-national-flag-problem/VBScript/dutch-national-flag-problem.vbs rename to Task/Dutch-national-flag-problem/VBScript/dutch-national-flag-problem.vb diff --git a/Task/Dynamic-variable-names/ALGOL-68/dynamic-variable-names.alg b/Task/Dynamic-variable-names/ALGOL-68/dynamic-variable-names.alg index 7a8a5853f6..793b3d5407 100644 --- a/Task/Dynamic-variable-names/ALGOL-68/dynamic-variable-names.alg +++ b/Task/Dynamic-variable-names/ALGOL-68/dynamic-variable-names.alg @@ -2,8 +2,7 @@ BEGIN # Simulate dynamic variables using an array, translation of the FreeBASIC MODE DYNAMICVARIABLE = STRUCT( STRING name, value ); - OP LCASE = ( CHAR c )CHAR: - IF c >= "A" AND c <= "Z" THEN REPR( ( ABS c - ABS "A" ) + ABS "a" ) ELSE c FI; + OP LCASE = ( CHAR c )CHAR: IF c >= "A" AND c <= "Z" THEN REPR( ( ABS c - ABS "A" ) + ABS "a" ) ELSE c FI; OP LCASE = ( STRING s )STRING: BEGIN STRING lc := s; @@ -18,13 +17,13 @@ BEGIN # Simulate dynamic variables using an array, translation of the FreeBASIC s[ left : right ] END # TRIM # ; - PROC find variable index = ( []DYNAMICVARIABLE dyvar, STRING v, INT n elements )INT: + PROC find variable index = ( []DYNAMICVARIABLE a, STRING v, INT n elements )INT: BEGIN STRING name = LCASE TRIM v; - INT index := LWB dyvar - 1; + INT index := LWB a - 1; INT max index = index + n elements; - FOR i FROM LWB dyvar TO max index WHILE index < LWB dyvar DO - IF name OF dyvar[ i ] = name THEN index := i FI + FOR i FROM LWB a TO max index WHILE index < LWB a DO + IF name OF a[ i ] = name THEN index := i FI OD; index END # find variable index # ; diff --git a/Task/Dynamic-variable-names/Ballerina/dynamic-variable-names.ballerina b/Task/Dynamic-variable-names/Ballerina/dynamic-variable-names.ballerina deleted file mode 100644 index 6019bb031b..0000000000 --- a/Task/Dynamic-variable-names/Ballerina/dynamic-variable-names.ballerina +++ /dev/null @@ -1,16 +0,0 @@ -import ballerina/io; - -public function main() returns error? { - map nvs = {}; - io:println("Enter three variables:"); - foreach var _ in 0...2 { - string name = io:readln("\n name : "); - string value = io:readln(" value : "); - nvs[name] = check int:fromString(value); - } - - io:println("\nYour variables are:\n"); - foreach string name in nvs.keys() { - io:println(` ${name} = ${nvs[name]}`); - } -} diff --git a/Task/Dynamic-variable-names/C/dynamic-variable-names.c b/Task/Dynamic-variable-names/C/dynamic-variable-names.c deleted file mode 100644 index d48225edc0..0000000000 --- a/Task/Dynamic-variable-names/C/dynamic-variable-names.c +++ /dev/null @@ -1,135 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -static inline uint64_t hash(void const *cp, size_t n) { - uint64_t h = 0; - uint64_t const e = UINT64_C(2718281828459045235); // e * 10**18 - for(uint8_t const *cb = cp; n > 0; n--) { - h = ((h + n) * e) ^ ((*cb++ & 0xFF) * e); - } - return h; -} - -static void *dup(void const *cp, size_t n) { - void *p = malloc(n); - return memcpy(p, cp, n); -} - -static void *nodup(void const *cp, size_t n) { - return (void*)cp; -} - -#define MAPPED struct mapped_s -MAPPED { - size_t n; - char const *s; -}; -#define MAP struct map_s -MAP { - size_t u; - size_t w; - size_t m; - char a[]; -}; - -static MAP *map_alloc(size_t m, size_t z) { - const size_t N = (((m * z) + (sizeof(MAP)-1)) / sizeof(MAP)) + 1; - MAP *t = calloc(N, sizeof(MAP)); - t->m = m; - t->w = 3 * m / 4; - return t; -} - -static void *map(MAP **t, size_t z, char const *s, size_t n, void *(*dup)(void const *, size_t)) { - if(!*t) { - *t = map_alloc(sizeof(size_t) * CHAR_BIT, z); - } - MAP *f = *t; - uint64_t const h = hash(s, n); - size_t x = (h / f->m) % f->m; - size_t const k = x + !x; - size_t const l = f->m - k; - size_t const y = h % f->m; - x = y; - do { - MAPPED *p = (MAPPED *)&f->a[x*z]; - if((p->n == n) && (memcmp(p->s, s, n) == 0)) { - return p; - } - if((p->n == 0) && dup) { - if(f->u == f->w) { - *t = map_alloc(2 * f->m, z); - for(size_t i = 0; f->u < f->w; i++) { - MAPPED *q = (MAPPED *)&f->a[i*z]; - if(q->n > 0) { - (void)map(t, z, q->s, q->n, nodup); - } - } - free(f); - return map(t, z, s, n, dup); - } - f->u++; - p->n = n; - p->s = dup(s, n); - return p; - } - x = (x >= l) ? ((x + 1) % k) : (x + k); - } while(x != y) - ; - return NULL; -} - -static double mapf(char const *s, double v, void *(*dup)(void const *, size_t)) { - static MAP *t = NULL; - struct { - MAPPED; - double v; - } *p = map(&t, sizeof(*p), s, strlen(s), dup); - if(p) { - if(dup) p->v = v; - return p->v; - } - return NAN; -} - -static inline double assignf(char const *s, double v) { - return mapf(s, v, dup); -} - -static inline double valuef(char const *s) { - return mapf(s, 0, 0); -} - -static char *enter(char const *prompt) { - static char buf[256]; - fputs(prompt, stdout); fflush(stdout); - fgets(buf, sizeof(buf), stdin); - char *s = buf; - for(; *s && !isgraph(*s); s++) - ; - char *t = s + strlen(s); - for(; (t > s) && !isgraph(*(t-1)); t--) - ; - *t = '\0'; - return s; -} - -int main(int argc, char **argv) { - for(;;) { - char const *name = enter("Enter: "); - if(!*name) break; - char *val = strchr(name, '='); - if(val) { - *val++ = '\0'; - assignf(name, strtod(val, NULL)); - } else { - printf("%s = %F\n", name, valuef(name)); - } - } - return 0; -} diff --git a/Task/Dynamic-variable-names/DuckDB/dynamic-variable-names.duckdb b/Task/Dynamic-variable-names/DuckDB/dynamic-variable-names.duckdb deleted file mode 100644 index e5e9804bf2..0000000000 --- a/Task/Dynamic-variable-names/DuckDB/dynamic-variable-names.duckdb +++ /dev/null @@ -1 +0,0 @@ -select COLUMNS(x -> x = getenv('variablename')) from t; diff --git a/Task/Dynamic-variable-names/EMal/dynamic-variable-names.emal b/Task/Dynamic-variable-names/EMal/dynamic-variable-names.emal deleted file mode 100644 index f55c9b8919..0000000000 --- a/Task/Dynamic-variable-names/EMal/dynamic-variable-names.emal +++ /dev/null @@ -1,37 +0,0 @@ -^|EMal doesn't support the creation of user-defined variable names. - |It can manage symbolic references to existing variables. - |It can use Records to dynamically create fields. - |^ -Record data ← [] -fun fillData ← void by block - for ever - ^|we ask for key/value pairs|^ - text key ← ask(text, "Enter the key or press Enter to quit: ") - if key æ Text.EMPTY do break end - text value ← ask(text, "Enter the value: ") - data[key] ← value ^|here we set the user-defined key field - |on the record data, with the provided value - |^ - end - writeLine() -end -^|here we show how symbolic reference works by using var("variableName")|^ -fun dumpData ← void by text recordName - writeLine("dumping the fields for the record named '", recordName, "'") - Record.keys(var(recordName)).list( 5 { - n = strconv.atoi(os.input("Integer variables (max 5): ")) or { - println("Invalid input!") - continue - } - } - for i <= n { - println("OK, enter the variable names and their values, below:") - println("Variable ${i}") - name = os.input_opt(" Name: ") or { panic("Invalid input!") } - for { - value = strconv.atoi(os.input(" Value: ")) or { - println("Must be a valid number!") - continue - } - break - } - vars[name] += value - i++ - } - println("\n" + "Enter q to quit") - for { - name = os.input_opt("Which variable do you want to inspect: ") or { panic("Invalid input!") } - if name.to_lower() == "q" { break } - if name !in vars { println("Sorry there's no variable of that name, try again!") } - else { println("Its value is ${vars[name]}") } - } -} diff --git a/Task/EKG-sequence-convergence/Ada/ekg-sequence-convergence.adb b/Task/EKG-sequence-convergence/Ada/ekg-sequence-convergence.ada similarity index 100% rename from Task/EKG-sequence-convergence/Ada/ekg-sequence-convergence.adb rename to Task/EKG-sequence-convergence/Ada/ekg-sequence-convergence.ada diff --git a/Task/EKG-sequence-convergence/Arturo/ekg-sequence-convergence.arturo b/Task/EKG-sequence-convergence/Arturo/ekg-sequence-convergence.arturo deleted file mode 100644 index 6f6c56d98c..0000000000 --- a/Task/EKG-sequence-convergence/Arturo/ekg-sequence-convergence.arturo +++ /dev/null @@ -1,37 +0,0 @@ -ekg: function [start, limit][ - result: @[1 start] - - while [limit > size result][ - candidate: 2 - while ø [ - if and? [not? contains? result candidate] - [1 < gcd @[last result candidate]][ - 'result ++ candidate - break - ] - inc 'candidate - ] - ] - - return result -] - -loop [2 5 7 9 10] 'n -> - print ["EKG(" ++ (to :string n) ++ "):" join.with:", " ekg n 10] - -print "" -ekg5: ekg 5 100 -ekg7: ekg 7 100 - -converged?: false -loop 2..99 'i [ - if and? -> ekg5\[i] = ekg7\[i] - -> equal? sort slice ekg5 0 i sort slice ekg7 0 i [ - print ["EKG(5) and EKG(7) converge at term" i+1] - converged?: true - break - ] -] - -unless converged? -> - print "EKG(5) and EKG(7) do not converge within 100 terms" diff --git a/Task/EKG-sequence-convergence/EasyLang/ekg-sequence-convergence.easy b/Task/EKG-sequence-convergence/EasyLang/ekg-sequence-convergence.easy deleted file mode 100644 index 3c42057e99..0000000000 --- a/Task/EKG-sequence-convergence/EasyLang/ekg-sequence-convergence.easy +++ /dev/null @@ -1,22 +0,0 @@ -func contains a[] b . - for a in a[] : if a = b : return 1 - return 0 -. -func gcd a b . - if b = 0 : return a - return gcd b (a mod b) -. -starts[] = [ 2 5 7 9 10 ] -len ekg[][] 5 -for s to 5 - ekg[s][] = [ 1 starts[s] ] - for n = 2 to 10 - for i = 2 to 1 / 0 - if contains ekg[s][] i = 0 and gcd ekg[s][n], i > 1 - ekg[s][] &= i - break 1 - . - . - . - print ekg[s][] -. diff --git a/Task/EKG-sequence-convergence/Fortran/ekg-sequence-convergence.f b/Task/EKG-sequence-convergence/Fortran/ekg-sequence-convergence.f deleted file mode 100644 index fddf573531..0000000000 --- a/Task/EKG-sequence-convergence/Fortran/ekg-sequence-convergence.f +++ /dev/null @@ -1,168 +0,0 @@ - ! EKG sequence convergence - ! tested with Intel ifx (IFX) 2025.2.0 20250605 on Kubuntu 25.04 - ! GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 on Kubuntu 25.04 - ! VSI Fortran x86-64 V8.6-001 on OpenVMS x86_64 V9.2-3 - ! Note that VMS requires switch $Fortran/ccdefault=LIST - ! otherwise 1st character of each output line is interpreted as - ! Carriage Control character. - ! -module EKG -implicit none - -integer, parameter :: nElementsToPrint=10 - - -contains - -subroutine ekgSequence (secondElm, nElm, isq) - ! - ! Construct first 'nElm' elements of the EKG Sequence that has 'secondElm' - ! as second element, knowing first element ios always 1. - ! - - integer, intent(in) :: secondElm - integer, intent(in) :: nElm - - integer, intent(out) :: isq (*) - - integer :: candidate=2 - integer :: ncurrent - - isq(1) = 1 ! 1st element always 1 - isq(2) = secondElm ! 2nd element from argument - ncurrent = 2 ! index to highest known element of sequence isq - - do while (ncurrent .le. nElm) - ! 'candidate' is next element of isq if it is not already in this sequence AND - ! if it shares at least 1 prime factor with highest known element if isq - ! which means GCD(candidate, highest element of isq) is >1 - if ( (.not. containsElement (isq, ncurrent, candidate)) & - .and. gcd(isq(ncurrent), candidate) > 1 ) then - ! found next element of isq - ncurrent = ncurrent + 1 - isq(ncurrent) = candidate - candidate = 2; ! start over again - else - ! Not a candidate: try next one. - candidate= candidate + 1 - end if - end do -end subroutine ekgSequence - -function containsElement (isq, nElm, elm) result (yes) - ! - ! return .true. if number 'elm' can be found within - ! first 'nElm' elements of sequence 'isq' . - ! - integer, intent(in) :: nElm - integer, intent(in) :: isq (nElm) - integer, intent(in) :: elm - logical :: yes - integer :: ii - - ! Straightforward: Loop until elm found or - ! last element reached - do ii = 1, nElm - if (isq(ii) == elm) then - yes=.true. - return - end if - end do - yes=.false. - return -end function containsElement - - -function gcd (n,m) result (rgcd) - ! - ! euclid's algorithm - ! to find greatest common divisor - ! - integer, intent(in) :: n,m - integer :: rgcd - integer :: a - integer :: b - - a=n - b=m - - if (a .eq. 0) then - rgcd = 0 - else - do while (b .ne. 0) - if ( a .gt. b ) then - a = a - b - else - b = b - a; - end if - end do - rgcd =a - end if -end function gcd - - -subroutine printThem (isq) -! -! Print the pedefined number of elements of sequence isq -! -integer, intent(in) :: isq(nElementsToPrint) -integer :: ii - -! print the Introduction like EKG(2) and first elemment -write (6, '("EKG(", I2,") = [", i1,x)', advance='no') isq(2), isq(1) - -! print remaining elements except the last -do ii = 2, nElementsToPrint-1 - write (6,'(i2, x)', advance = 'no' ) isq(ii) -end do - -! Terminate output line: last element and close "]" -write (6,'(I2, "]")') isq(nElementsToPrint) - -end subroutine printThem - -end module EKG - - -program EKGMain - - use EKG - - implicit none - - integer :: myekg(100) - integer :: ekg5 (100) - integer :: ekg7 (100) - integer :: nx(5) = [2,5,7,9,10] - integer :: match - integer:: ii, jj - ! - ! Produce and print first 10 elements of first 5 sequences - ! - do ii=1,5 - call ekgSequence (nx(ii), nElementsToPrint, myekg) - call printThem (myekg) - end do - ! - ! Produce 100 elements of EKG(5) and EKG(7) - ! - call ekgSequence (5, 100, ekg5) - call ekgSequence (7, 100, ekg7) - ! - ! see where they converge - ! - match = -1 - do ii=2, 100 - if (ekg5(ii) .eq. ekg7(ii)) then - ! Memoize first identical elements and - ! see if all following elements are identical as well. - if (match .lt. 0) match = ii - do jj=ii+1,100 - if (ekg5(jj) .ne. ekg7(jj)) then - match = -1 ! Not same - endif - end do - end if - end do - write (6, "( /'EKG(5) and EKG(7) converge at index ', i0, '.')") match -end program EKGMain diff --git a/Task/EKG-sequence-convergence/JavaScript/ekg-sequence-convergence.js b/Task/EKG-sequence-convergence/JavaScript/ekg-sequence-convergence.js deleted file mode 100644 index 8ffa394a5c..0000000000 --- a/Task/EKG-sequence-convergence/JavaScript/ekg-sequence-convergence.js +++ /dev/null @@ -1,71 +0,0 @@ -// Calculate and show here the first 10 members of EKG[2], EKG[5], EKG[7], EKG[9] and EKG[10] -for (const i of [2, 5, 7, 9, 10]) { - console.log(`EKG[${i}] = [${ekg(i, 10).join(', ')}]`); -} - -console.log("Calculate and show here at which term EKG[5] and EKG[7] converge."); -const ekg5 = ekg(5, 100); -const ekg7 = ekg(7, 100); - -for (let i = 1; i < ekg5.length; i++) { - if (ekg5[i] === ekg7[i] && sameSeq(ekg5, ekg7, i)) { - console.log(`EKG[5](${i + 1}) = EKG[7](${i + 1}) = ${ekg5[i]}, and are identical from this term on`); - break; - } -} - -// Same last element, and all elements in sequence are identical -function sameSeq(seq1, seq2, n) { - const list1 = seq1.slice(0, n).sort((a, b) => a - b); - const list2 = seq2.slice(0, n).sort((a, b) => a - b); - - for (let i = 0; i < n; i++) { - if (list1[i] !== list2[i]) { - return false; - } - } - return true; -} - -// Without Map to identify seen terms, need to examine list. -// Calculating 3000 terms in this manner takes 10 seconds -// With Map to identify the seen terms, calculating 3000 terms takes .1 sec. -function ekg(two, maxN) { - const result = []; - result.push(1); - result.push(two); - - const seen = new Map(); - seen.set(1, 1); - seen.set(two, 1); - - let minUnseen = two === 2 ? 3 : 2; - let prev = two; - - for (let n = 3; n <= maxN; n++) { - let test = minUnseen - 1; - while (true) { - test++; - if (!seen.has(test) && gcd(test, prev) > 1) { - result.push(test); - seen.set(test, n); - prev = test; - - if (minUnseen === test) { - do { - minUnseen++; - } while (seen.has(minUnseen)); - } - break; - } - } - } - return result; -} - -function gcd(a, b) { - if (b === 0) { - return a; - } - return gcd(b, a % b); -} diff --git a/Task/EKG-sequence-convergence/Julia/ekg-sequence-convergence.jl b/Task/EKG-sequence-convergence/Julia/ekg-sequence-convergence.julia similarity index 100% rename from Task/EKG-sequence-convergence/Julia/ekg-sequence-convergence.jl rename to Task/EKG-sequence-convergence/Julia/ekg-sequence-convergence.julia diff --git a/Task/EKG-sequence-convergence/Kotlin/ekg-sequence-convergence.kts b/Task/EKG-sequence-convergence/Kotlin/ekg-sequence-convergence.kotlin similarity index 100% rename from Task/EKG-sequence-convergence/Kotlin/ekg-sequence-convergence.kts rename to Task/EKG-sequence-convergence/Kotlin/ekg-sequence-convergence.kotlin diff --git a/Task/EKG-sequence-convergence/Pluto/ekg-sequence-convergence.pluto b/Task/EKG-sequence-convergence/Pluto/ekg-sequence-convergence.pluto deleted file mode 100644 index e2e276d6ff..0000000000 --- a/Task/EKG-sequence-convergence/Pluto/ekg-sequence-convergence.pluto +++ /dev/null @@ -1,38 +0,0 @@ -require "table2" -local int = require "int" -local fmt = require "fmt" - -local limit = 100 -local starts = {2, 5, 7, 9, 10} -local ekg = {} -for i = 1, 5 do ekg[i] = table.rep(limit, 0) end -local s = 1 -for starts as start do - ekg[s][1] = 1 - ekg[s][2] = start - for n = 3, limit do - local i = 2 - while true do - -- A potential sequence member cannot already have been used - -- and must have a factor in common with previous member. - if !ekg[s]:slice(1, n):contains(i) and int.gcd(ekg[s][n - 1], i) > 1 then - ekg[s][n] = i - break - end - i += 1 - end - end - fmt.write("EKG(%2d): ", start) - fmt.tprint("%2d", ekg[s]:slice(1, 30), 30) - s += 1 -end - --- Now compare EKG5 and EKG7 for convergence. -for i = 3, limit do - if ekg[2][i] == ekg[3][i] and - table.same(ekg[2]:slice(1, i - 1):sort(), ekg[3]:slice(1, i - 1):sort()) then - print($"\nEKG(5) and EKG(7) converge at term {i}.") - os.exit() - end -end -print($"\nEKG5(5) and EKG(7) do not converge within {limit} terms.") diff --git a/Task/EKG-sequence-convergence/Rust/ekg-sequence-convergence.rs b/Task/EKG-sequence-convergence/Rust/ekg-sequence-convergence.rust similarity index 100% rename from Task/EKG-sequence-convergence/Rust/ekg-sequence-convergence.rs rename to Task/EKG-sequence-convergence/Rust/ekg-sequence-convergence.rust diff --git a/Task/Earliest-difference-between-prime-gaps/EasyLang/earliest-difference-between-prime-gaps.easy b/Task/Earliest-difference-between-prime-gaps/EasyLang/earliest-difference-between-prime-gaps.easy deleted file mode 100644 index c91415599e..0000000000 --- a/Task/Earliest-difference-between-prime-gaps/EasyLang/earliest-difference-between-prime-gaps.easy +++ /dev/null @@ -1,41 +0,0 @@ -fastfunc nextPrimeOdd n . - i = n + 2 - repeat - j = 3 - while j <= sqrt i and i mod j <> 0 - j += 2 - . - until j > sqrt i - i += 2 - . - return i -. -lastPrime = 3 -len gapStarts[] 1e7 -# -func findGapStart gap . - if gapStarts[gap] <> 0 : return gapStarts[gap] - repeat - prev = lastPrime - lastPrime = nextPrimeOdd lastPrime - diff = lastPrime - prev - if gapStarts[diff] = 0 : gapStarts[diff] = prev - until gap = diff - . - return prev -. -# -gap = 2 -pm = 10 -repeat - start1 = findGapStart gap - start2 = findGapStart (gap + 2) - diff = abs (start2 - start1) - if diff > pm - print "> " & pm & ": gaps " & gap & "/" & gap + 2 & " range " & start1 & "-" & start2 & " (" & diff & ")" - pm *= 10 - else - gap += 2 - . - until pm = 1e7 -. diff --git a/Task/Earliest-difference-between-prime-gaps/FreeBASIC/earliest-difference-between-prime-gaps.basic b/Task/Earliest-difference-between-prime-gaps/FreeBASIC/earliest-difference-between-prime-gaps.basic index a20865e78c..0b2a1db241 100644 --- a/Task/Earliest-difference-between-prime-gaps/FreeBASIC/earliest-difference-between-prime-gaps.basic +++ b/Task/Earliest-difference-between-prime-gaps/FreeBASIC/earliest-difference-between-prime-gaps.basic @@ -21,7 +21,7 @@ Function findGapStart(Byref pg As PrimeGaps, gap As Ulongint) As Ulongint prev = pg.lastPrime pg.lastPrime = NextPrime(pg.lastPrime) diff = pg.lastPrime - prev - If pg.gapStarts(diff) = 0 Then pg.gapStarts(diff) = prev + pg.gapStarts(diff) = prev If gap = diff Then Return prev Loop End Function diff --git a/Task/Earliest-difference-between-prime-gaps/Julia/earliest-difference-between-prime-gaps.jl b/Task/Earliest-difference-between-prime-gaps/Julia/earliest-difference-between-prime-gaps.julia similarity index 100% rename from Task/Earliest-difference-between-prime-gaps/Julia/earliest-difference-between-prime-gaps.jl rename to Task/Earliest-difference-between-prime-gaps/Julia/earliest-difference-between-prime-gaps.julia diff --git a/Task/Earliest-difference-between-prime-gaps/Phix/earliest-difference-between-prime-gaps.phix b/Task/Earliest-difference-between-prime-gaps/Phix/earliest-difference-between-prime-gaps.phix index 6db651adc0..330c9e14e2 100644 --- a/Task/Earliest-difference-between-prime-gaps/Phix/earliest-difference-between-prime-gaps.phix +++ b/Task/Earliest-difference-between-prime-gaps/Phix/earliest-difference-between-prime-gaps.phix @@ -1,33 +1,35 @@ -with javascript_semantics -constant limit = iff(platform()=JS?1e7:1e8), - gslim = 250 -sequence primes = get_primes_le(limit*4), - gapstarts = repeat(0,gslim) -for i=2 to length(primes) do - integer gap = primes[i]-primes[i-1] - if gapstarts[gap]=0 then - gapstarts[gap] = primes[i-1] - end if -end for +(phixonline)--> + with javascript_semantics + constant limit = iff(platform()=JS?1e7:1e8), + gslim = 250 + sequence primes = get_primes_le(limit*4), + gapstarts = repeat(0,gslim) + for i=2 to length(primes) do + integer gap = primes[i]-primes[i-1] + if gapstarts[gap]=0 then + gapstarts[gap] = primes[i-1] + end if + end for -integer pm = 10, gap1 = 2 -while true do - while gapstarts[gap1]=0 do gap1 += 2 end while - integer start1 = gapstarts[gap1], - gap2 = gap1 + 2 - if gapstarts[gap2]=0 then - gap1 = gap2 + 2 - else - integer start2 = gapstarts[gap2], - diff = abs(start2 - start1) - if diff>pm then - printf(1,"Earliest difference >%,d between adjacent prime gap starting primes:\n",{pm}) - printf(1,"Gap %d starts at %,d, gap %d starts at %,d, difference is %,d.\n\n", - {gap1, start1, gap2, start2, diff}) - if pm=limit then exit end if - pm *= 10 - else - gap1 = gap2 - end if - end if -end while + integer pm = 10, gap1 = 2 + while true do + while gapstarts[gap1]=0 do gap1 += 2 end while + integer start1 = gapstarts[gap1], + gap2 = gap1 + 2 + if gapstarts[gap2]=0 then + gap1 = gap2 + 2 + else + integer start2 = gapstarts[gap2], + diff = abs(start2 - start1) + if diff>pm then + printf(1,"Earliest difference >%,d between adjacent prime gap starting primes:\n",{pm}) + printf(1,"Gap %d starts at %,d, gap %d starts at %,d, difference is %,d.\n\n", + {gap1, start1, gap2, start2, diff}) + if pm=limit then exit end if + pm *= 10 + else + gap1 = gap2 + end if + end if + end while + + requires(64) + enum X, Y -- rational ec point + enum A, B, N, G, R -- elliptic curve parameters + -- also signature pair(A,B) -constant mxN = 1073741789 -- maximum modulus -constant mxr = 1073807325 -- max order G = mxN + 65536 -constant inf = -2147483647 -- symbolic infinity + constant mxN = 1073741789 -- maximum modulus + constant mxr = 1073807325 -- max order G = mxN + 65536 + constant inf = -2147483647 -- symbolic infinity -sequence e = {0,0,0,{0,0},0} -- single global curve -constant zerO = {inf,0} -- point at infinity zerO + sequence e = {0,0,0,{0,0},0} -- single global curve + constant zerO = {inf,0} -- point at infinity zerO -bool inverr -- impossible inverse mod N + bool inverr -- impossible inverse mod N -function exgcd(atom v, u) --- return mod(v^-1, u) -atom q, t, r = 0, s = 1 - if v<0 then v += u end if + function exgcd(atom v, u) + -- return mod(v^-1, u) + atom q, t, r = 0, s = 1 + if v<0 then v += u end if - while v do - q = floor(u/v) - t = u-q*v - u = v - v = t - t = r-q*s - r = s - s = t - end while + while v do + q = floor(u/v) + t = u-q*v + u = v + v = t + t = r-q*s + r = s + s = t + end while - if u!=1 then - printf(1," impossible inverse mod N, gcd = %d\n",{u}) - inverr = true - end if + if u!=1 then + printf(1," impossible inverse mod N, gcd = %d\n",{u}) + inverr = true + end if - return r -end function + return r + end function -function modn(atom a) --- return mod(a, N) - a = mod(a,e[N]) - if a<0 then a += e[N] end if - return a -end function + function modn(atom a) + -- return mod(a, N) + a = mod(a,e[N]) + if a<0 then a += e[N] end if + return a + end function -function modr(atom a) --- return mod(a, r) - a = mod(a,e[R]) - if a<0 then a += e[R] end if - return a -end function + function modr(atom a) + -- return mod(a, r) + a = mod(a,e[R]) + if a<0 then a += e[R] end if + return a + end function -function disc() --- return the discriminant of E - atom a = e[A], b = e[B], - c = 4*modn(a*modn(a*a)) - return modn(-16*(c+27*modn(b*b))) -end function + function disc() + -- return the discriminant of E + atom a = e[A], b = e[B], + c = 4*modn(a*modn(a*a)) + return modn(-16*(c+27*modn(b*b))) + end function -function isO(sequence p) --- return true if P = zerO - return (p[X]=inf and p[Y]=0) -end function + function isO(sequence p) + -- return true if P = zerO + return (p[X]=inf and p[Y]=0) + end function -function ison(sequence p) --- return true if P is on curve E - atom r = 0, s = 0 - if not isO(p) then - r = modn(e[B]+p[X]*modn(e[A]+p[X]*p[X])) - s = modn(p[Y]*p[Y]) - end if - return (r=s) -end function + function ison(sequence p) + -- return true if P is on curve E + atom r = 0, s = 0 + if not isO(p) then + r = modn(e[B]+p[X]*modn(e[A]+p[X]*p[X])) + s = modn(p[Y]*p[Y]) + end if + return (r=s) + end function -procedure pprint(string f, sequence p) --- print point P with prefix f - if isO(p) then - printf(1,"%s (0)\n",{f}) - else - atom y = p[Y] - if y>e[N]-y then y -= e[N] end if - printf(1,"%s (%d,%d)\n",{f,p[X],y}) - end if -end procedure + procedure pprint(string f, sequence p) + -- print point P with prefix f + if isO(p) then + printf(1,"%s (0)\n",{f}) + else + atom y = p[Y] + if y>e[N]-y then y -= e[N] end if + printf(1,"%s (%d,%d)\n",{f,p[X],y}) + end if + end procedure -function padd(sequence p, q) --- full ec point addition -atom la, t + function padd(sequence p, q) + -- full ec point addition + atom la, t - if isO(p) then return q end if - if isO(q) then return p end if + if isO(p) then return q end if + if isO(q) then return p end if - if p[X]!=q[X] then -- R := P + Q - t = p[Y]-q[Y] - la = modn(t*exgcd(p[X]-q[X], e[N])) + if p[X]!=q[X] then -- R := P + Q + t = p[Y]-q[Y] + la = modn(t*exgcd(p[X]-q[X], e[N])) - else -- P = Q, R := 2P - if (p[Y]=q[Y]) and (p[Y]!=0) then - t = modn(3*modn(p[X]*p[X])+e[A]) - la = modn(t*exgcd(2*p[Y], e[N])) - else - return zerO -- P = -Q, R := O - end if - end if + else -- P = Q, R := 2P + if (p[Y]=q[Y]) and (p[Y]!=0) then + t = modn(3*modn(p[X]*p[X])+e[A]) + la = modn(t*exgcd(2*p[Y], e[N])) + else + return zerO -- P = -Q, R := O + end if + end if - t = modn(la*la-p[X]-q[X]) - sequence r = deep_copy(zerO) - r[Y] = modn(la*(p[X]-t)-p[Y]) - r[X] = t - if inverr then r = zerO end if - return r -end function + t = modn(la*la-p[X]-q[X]) + sequence r = deep_copy(zerO) + r[Y] = modn(la*(p[X]-t)-p[Y]) + r[X] = t + if inverr then r = zerO end if + return r + end function -function pmul(sequence p, atom k) --- R:= multiple kP - sequence s = zerO, q = p + function pmul(sequence p, atom k) + -- R:= multiple kP + sequence s = zerO, q = p - while k do - if and_bits(k,1) then - s = padd(s, q) - end if - if inverr then s = zerO; exit end if - k = floor(k/2) - q = padd(q, q) - end while - return s -end function + while k do + if and_bits(k,1) then + s = padd(s, q) + end if + if inverr then s = zerO; exit end if + k = floor(k/2) + q = padd(q, q) + end while + return s + end function -function ellinit(sequence i) --- initialize elliptic curve -atom a = i[1], b = i[2] - inverr = false - e[N] = i[3] + function ellinit(sequence i) + -- initialize elliptic curve + atom a = i[1], b = i[2] + inverr = false + e[N] = i[3] - if (e[N]<5) or (e[N]>mxN) then return 0 end if + if (e[N]<5) or (e[N]>mxN) then return 0 end if - e[A] = modn(a) - e[B] = modn(b) - e[G][X] = modn(i[4]) - e[G][Y] = modn(i[5]) - e[R] = i[6] + e[A] = modn(a) + e[B] = modn(b) + e[G][X] = modn(i[4]) + e[G][Y] = modn(i[5]) + e[R] = i[6] - if (e[R]<5) or (e[R]>mxr) then return 0 end if + if (e[R]<5) or (e[R]>mxr) then return 0 end if - printf(1,"E: y^2 = x^3 + %dx + %d (mod %d)\n",{a,b,e[N]}) - pprint("base point G", e[G]) - printf(1,"order(G, E) = %d\n",{e[R]}) + printf(1,"E: y^2 = x^3 + %dx + %d (mod %d)\n",{a,b,e[N]}) + pprint("base point G", e[G]) + printf(1,"order(G, E) = %d\n",{e[R]}) - return -1 -end function + return -1 + end function -function signature(atom s, f) --- signature primitive -atom c, d, u, u1 -sequence V + function signature(atom s, f) + -- signature primitive + atom c, d, u, u1 + sequence V - printf(1,"signature computation\n") - while true do - while true do --- u = rand(e[R]-1) - u = 571533488 -- match FreeBASIC output --- u = 605163545 -- match C output - V = pmul(e[G], u) - c = modr(V[X]) - if c!=0 then exit end if - end while + printf(1,"signature computation\n") + while true do + while true do + -- u = rand(e[R]-1) + u = 571533488 -- match FreeBASIC output + -- u = 605163545 -- match C output + V = pmul(e[G], u) + c = modr(V[X]) + if c!=0 then exit end if + end while - u1 = exgcd(u, e[R]) - d = modr(u1*(f+modr(s*c))) - if d!=0 then exit end if - end while - printf(1,"one-time u = %d\n",u) - pprint("V = uG", V) - return {c,d} -end function + u1 = exgcd(u, e[R]) + d = modr(u1*(f+modr(s*c))) + if d!=0 then exit end if + end while + printf(1,"one-time u = %d\n",u) + pprint("V = uG", V) + return {c,d} + end function -function verify(sequence W, atom f, sequence sg) --- verification primitive -atom c = sg[A], d = sg[B], - t, c1, h1, h2, h -sequence V, V2 + function verify(sequence W, atom f, sequence sg) + -- verification primitive + atom c = sg[A], d = sg[B], + t, c1, h1, h2, h + sequence V, V2 - --domain check - t = (c>0) and (c0) and (d--domain check + t = (c>0) and (c<e[R]) + t = t and (d>0) and (d<e[R]) + if not t then return 0 end if - printf(1,"\nsignature verification\n") - h = exgcd(d, e[R]) - h1 = modr(f*h) - h2 = modr(c*h) - printf(1,"h1,h2 = %d,%d\n",{h1,h2}) - V = pmul(e[G], h1) - V2 = pmul(W, h2) - pprint("h1G", V) - pprint("h2W", V2) - V = padd(V, V2) - pprint("+ =", V) - if isO(V) then return 0 end if - c1 = modr(V[X]) - printf(1,"c' = %d\n",c1) + printf(1,"\nsignature verification\n") + h = exgcd(d, e[R]) + h1 = modr(f*h) + h2 = modr(c*h) + printf(1,"h1,h2 = %d,%d\n",{h1,h2}) + V = pmul(e[G], h1) + V2 = pmul(W, h2) + pprint("h1G", V) + pprint("h2W", V2) + V = padd(V, V2) + pprint("+ =", V) + if isO(V) then return 0 end if + c1 = modr(V[X]) + printf(1,"c' = %d\n",c1) - return (c1=c) -end function + return (c1=c) + end function -procedure errmsg() - printf(1,"invalid parameter set\n") - printf(1,"_____________________\n") -end procedure + procedure errmsg() + printf(1,"invalid parameter set\n") + printf(1,"_____________________\n") + end procedure -procedure ec_dsa(atom f, d) --- digital signature on message hash f, error bit d -atom i, s, t -sequence sg, W + procedure ec_dsa(atom f, d) + -- digital signature on message hash f, error bit d + atom i, s, t + sequence sg, W - --parameter check - t = (disc()=0) - t = t or isO(e[G]) - W = pmul(e[G], e[R]) - t = t or not isO(W) - t = t or not ison(e[G]) - if t then errmsg() return end if + --parameter check + t = (disc()=0) + t = t or isO(e[G]) + W = pmul(e[G], e[R]) + t = t or not isO(W) + t = t or not ison(e[G]) + if t then errmsg() return end if - puts(1,"\nkey generation\n") --- s = rand(e[R] - 1) - s = 509100772 -- match FreeBASIC output --- s = 1343570 -- match C output - W = pmul(e[G], s) - printf(1,"private key s = %d\n",{s}) - pprint("public key W = sG", W) + puts(1,"\nkey generation\n") + -- s = rand(e[R] - 1) + s = 509100772 -- match FreeBASIC output + -- s = 1343570 -- match C output + W = pmul(e[G], s) + printf(1,"private key s = %d\n",{s}) + pprint("public key W = sG", W) - --next highest power of 2 - 1 - t = e[R] - i = 1 - while i<32 do - t = or_bits(t,floor(t/power(2,i))) - i *= 2 - end while - while f>t do - f = floor(f/2) - end while - printf(1,"\naligned hash %x\n\n",{f}) + --next highest power of 2 - 1 + t = e[R] + i = 1 + while i<32 do + t = or_bits(t,floor(t/power(2,i))) + i *= 2 + end while + while f>t do + f = floor(f/2) + end while + printf(1,"\naligned hash %x\n\n",{f}) - sg = signature(s, f) - if inverr then errmsg() return end if - printf(1,"signature c,d = %d,%d\n",sg) + sg = signature(s, f) + if inverr then errmsg() return end if + printf(1,"signature c,d = %d,%d\n",sg) - if d>0 then - while d>t do - d = floor(d/2) - end while - f = xor_bits(f,d) - printf(1,"corrupted hash %x\n",{f}) - end if + if d>0 then + while d>t do + d = floor(d/2) + end while + f = xor_bits(f,d) + printf(1,"corrupted hash %x\n",{f}) + end if - t = verify(W, f, sg) - if inverr then errmsg() return end if - if t then - printf(1,"Valid\n_____\n") - else - printf(1,"invalid\n_______\n") - end if -end procedure + t = verify(W, f, sg) + if inverr then errmsg() return end if + if t then + printf(1,"Valid\n_____\n") + else + printf(1,"invalid\n_______\n") + end if + end procedure ---Test vectors: elliptic curve domain parameters, ---short Weierstrass model y^2 = x^3 + ax + b (mod N) + --Test vectors: elliptic curve domain parameters, + --short Weierstrass model y^2 = x^3 + ax + b (mod N) -constant tests = { --- a, b, modulus N, base point G, order(G, E), cofactor - {355, 671, 1073741789, 13693, 10088, 1073807281}, - { 0, 7, 67096021, 6580, 779, 16769911}, -- 4 - { -3, 1, 877073, 0, 1, 878159}, - { 0, 14, 22651, 63, 30, 151}, -- 151 - { 3, 2, 5, 2, 1, 5}, + constant tests = { + -- a, b, modulus N, base point G, order(G, E), cofactor + {355, 671, 1073741789, 13693, 10088, 1073807281}, + { 0, 7, 67096021, 6580, 779, 16769911}, -- 4 + { -3, 1, 877073, 0, 1, 878159}, + { 0, 14, 22651, 63, 30, 151}, -- 151 + { 3, 2, 5, 2, 1, 5}, - --ecdsa may fail if... - --the base point is of composite order - { 0, 7, 67096021, 2402, 6067, 33539822}, -- 2 - --the given order is a multiple of the true order - { 0, 7, 67096021, 6580, 779, 67079644}, -- 1 - --the modulus is not prime (deceptive example) - { 0, 7, 877069, 3, 97123, 877069}, - --fails if the modulus divides the discriminant - { 39, 387, 22651, 95, 27, 22651}} + --ecdsa may fail if... + --the base point is of composite order + { 0, 7, 67096021, 2402, 6067, 33539822}, -- 2 + --the given order is a multiple of the true order + { 0, 7, 67096021, 6580, 779, 67079644}, -- 1 + --the modulus is not prime (deceptive example) + { 0, 7, 877069, 3, 97123, 877069}, + --fails if the modulus divides the discriminant + { 39, 387, 22651, 95, 27, 22651}} ---Digital signature on message hash f, ---set d > 0 to simulate corrupted data -atom f = #789ABCDE, - d = 0 + --Digital signature on message hash f, + --set d > 0 to simulate corrupted data + atom f = #789ABCDE, + d = 0 ---for i=1 to length(tests) do -for i=1 to 1 do - if not ellinit(tests[i]) then exit end if - ec_dsa(f, d) -end for + --for i=1 to length(tests) do + for i=1 to 1 do + if not ellinit(tests[i]) then exit end if + ec_dsa(f, d) + end for + + with javascript_semantics + constant X=1, Y=2, bCoeff=7, INF = 1e300*1e300 -type point(object pt) - return sequence(pt) and length(pt)=2 and atom(pt[X]) and atom(pt[Y]) -end type + type point(object pt) + return sequence(pt) and length(pt)=2 and atom(pt[X]) and atom(pt[Y]) + end type -function zero() - point pt = {INF, INF} - return pt -end function + function zero() + point pt = {INF, INF} + return pt + end function -function is_zero(point p) - return p[X]>1e20 or p[X]<-1e20 -end function + function is_zero(point p) + return p[X]>1e20 or p[X]<-1e20 + end function -function neg(point p) - p = {p[X], -p[Y]} - return p -end function + function neg(point p) + p = {p[X], -p[Y]} + return p + end function -function dbl(point p) - point r = p - if not is_zero(p) then - atom L = (3*p[X]*p[X])/(2*p[Y]) - atom x = L*L-2*p[X] - r = {x, L*(p[X]-x)-p[Y]} - end if - return r -end function + function dbl(point p) + point r = p + if not is_zero(p) then + atom L = (3*p[X]*p[X])/(2*p[Y]) + atom x = L*L-2*p[X] + r = {x, L*(p[X]-x)-p[Y]} + end if + return r + end function -function add(point p, point q) - if p==q then return dbl(p) end if - if is_zero(p) then return q end if - if is_zero(q) then return p end if - atom L = (q[Y]-p[Y])/(q[X]-p[X]) - atom x = L*L-p[X]-q[X] - point r = {x, L*(p[X]-x)-p[Y]} - return r -end function + function add(point p, point q) + if p==q then return dbl(p) end if + if is_zero(p) then return q end if + if is_zero(q) then return p end if + atom L = (q[Y]-p[Y])/(q[X]-p[X]) + atom x = L*L-p[X]-q[X] + point r = {x, L*(p[X]-x)-p[Y]} + return r + end function -function mul(point p, integer n) - point r = zero() - integer i = 1 - while i<=n do - if and_bits(i, n) then r = add(r, p) end if - p = dbl(p) - i = i*2 - end while - return r -end function + function mul(point p, integer n) + point r = zero() + integer i = 1 + while i<=n do + if and_bits(i, n) then r = add(r, p) end if + p = dbl(p) + i = i*2 + end while + return r + end function -procedure show(string s, point p) - puts(1, s&iff(is_zero(p)?"Zero\n":sprintf("(%.3f, %.3f)\n", p))) -end procedure + procedure show(string s, point p) + puts(1, s&iff(is_zero(p)?"Zero\n":sprintf("(%.3f, %.3f)\n", p))) + end procedure -function cbrt(atom c) - return iff(c>=0?power(c,1/3):-power(-c,1/3)) -end function + function cbrt(atom c) + return iff(c>=0?power(c,1/3):-power(-c,1/3)) + end function -function from_y(atom y) - point r = {cbrt(y*y-bCoeff), y} - return r -end function + function from_y(atom y) + point r = {cbrt(y*y-bCoeff), y} + return r + end function -point a, b, c, d + point a, b, c, d -a = from_y(1) -b = from_y(2) -c = add(a, b) -d = neg(c) + a = from_y(1) + b = from_y(2) + c = add(a, b) + d = neg(c) -show("a = ", a) -show("b = ", b) -show("c = a + b = ", c) -show("d = -c = ", d) -show("c + d = ", add(c, d)) -show("a + b + d = ", add(a, add(b, d))) -show("a * 12345 = ", mul(a, 12345)) + show("a = ", a) + show("b = ", b) + show("c = a + b = ", c) + show("d = -c = ", d) + show("c + d = ", add(c, d)) + show("a + b + d = ", add(a, add(b, d))) + show("a * 12345 = ", mul(a, 12345)) + + with javascript_semantics + sequence emirps = {} -function rev(integer n) - integer res = 0 - while n do - res = res*10+remainder(n,10) - n = floor(n/10) - end while - return res -end function + function rev(integer n) + integer res = 0 + while n do + res = res*10+remainder(n,10) + n = floor(n/10) + end while + return res + end function -function emirp(integer n) - if is_prime(n) then - integer r = rev(n) - if r!=n and is_prime(r) then - return true - end if - end if - return false -end function + function emirp(integer n) + if is_prime(n) then + integer r = rev(n) + if r!=n and is_prime(r) then + return true + end if + end if + return false + end function -procedure usage() - printf(1,"use a single command line argument, with no spaces, eg \"1-20\" (first 20), \n") - printf(1,"\"7700..8000\" (between 7700 and 8000), or \"10000\" (the 10,000th).\n") - {} = wait_key() - abort(0) -end procedure + procedure usage() + printf(1,"use a single command line argument, with no spaces, eg \"1-20\" (first 20), \n") + printf(1,"\"7700..8000\" (between 7700 and 8000), or \"10000\" (the 10,000th).\n") + {} = wait_key() + abort(0) + end procedure -procedure main(string arg3) - sequence args - integer n,m - emirps = {} - if find('-',arg3) then -- nth to mth emirp range - args = scanf(arg3,"%d-%d") - if length(args)!=1 then usage() end if - {{n,m}} = args - integer k = 1 - while length(emirps)n then - for j=i to length(emirps) do - if emirps[j]>m then - printf(1,"emirps between %d and %d: %v\n",{n,m,emirps[i..j-1]}) - exit - end if - end for - exit - end if - end for - else -- nth emirp - args = scanf(arg3,"%d") - if length(args)!=1 then usage() end if - {{n}} = args - integer k = 1 - while length(emirps)procedure main(string arg3) + sequence args + integer n,m + if find('-',arg3) then -- nth to mth emirp range + args = scanf(arg3,"%d-%d") + if length(args)!=1 then usage() end if + {{n,m}} = args + integer k = 1 + while length(emirps)<m do + if emirp(k) then emirps &= k end if + k += 1 + end while + printf(1,"emirps %d to %d: %v\n",{n,m,emirps[n..m]}) + elsif match("..",arg3) then -- emirps between n amd m + args = scanf(arg3,"%d..%d") + if length(args)!=1 then usage() end if + {{n,m}} = args + integer k = 1 + while length(emirps)=0 or emirps[$]<m do + if emirp(k) then emirps &= k end if + k += 1 + end while + sequence s = {} + for i=1 to length(emirps) do + if emirps[i]>n then + for j=i to length(emirps) do + if emirps[j]>m then + printf(1,"emirps between %d and %d: %v\n",{n,m,emirps[i..j-1]}) + exit + end if + end for + exit + end if + end for + else -- nth emirp + args = scanf(arg3,"%d") + if length(args)!=1 then usage() end if + {{n}} = args + integer k = 1 + while length(emirps)<n do + if emirp(k) then emirps &= k end if + k += 1 + end while + printf(1,"emirp %d: %d\n",{n,emirps[n]}) + end if + end procedure -sequence cl = command_line() -if length(cl)=2 then - main("1-20") - main("7700..8000") - main("10000") -elsif length(cl)=3 then - main(cl[3]) -else - usage() -end if + sequence cl = command_line() + if length(cl)=2 then + main("1-20") + main("7700..8000") + main("10000") + elsif length(cl)=3 then + main(cl[3]) + else + usage() + end if + + without js -- command_line, file i/o + function entropy(sequence s) + sequence symbols = {}, + counts = {} + integer N = length(s) + for i=1 to N do + object si = s[i] + integer k = find(si,symbols) + if k=0 then + symbols = append(symbols,si) + counts = append(counts,1) + else + counts[k] += 1 + end if + end for + atom H = 0 + for i=1 to length(counts) do + atom ci = counts[i]/N + H -= ci*log2(ci) + end for + return H + end function -?entropy(get_text(open(substitute(command_line()[2],".exe",".exw")),"rb")) + ?entropy(get_text(open(substitute(command_line()[2],".exe",".exw")),"rb")) + + enum apple, banana, orange + enum apple=5, banana=10, orange= + + without js -- none such in a browser, that I know of + ?getenv("PATH") + + with javascript_semantics + atom t0 = time() + atom ps = 2, -- current prime sum + cs = 4 -- current composite sum + integer psn = 1, npi = 1, -- (see below) + csn = 1, nci = 3, nc = 4, ncp = 5, + found = 0 + constant limit = iff(platform()=JS?10:11) + while found<limit do + integer c = compare(ps,cs) -- {-1,0,+1} + if c=0 then + printf(1,"%,21d - %,10d%s prime sum, %,10d%s composite sum (%s)\n", + {ps, psn, ord(psn), csn, ord(csn), elapsed(time()-t0)}) + found += 1 + end if + if c<=0 then + psn += 1 -- prime sum number + npi += 1 -- next prime index + ps += get_prime(npi) + end if + if c>=0 then + csn += 1 -- composite sum number + nc += 1 -- next composite? + if nc=ncp then -- "", erm no + nci += 1 -- next prime index + ncp = get_prime(nci) + nc += 1 -- next composite (even!) + end if + cs += nc + end if + end while + + with javascript_semantics + function equilibrium(sequence s) + atom lower_sum = 0, + higher_sum = sum(s) + sequence res = {} + for i=1 to length(s) do + higher_sum -= s[i] + if lower_sum=higher_sum then + res &= i + end if + lower_sum += s[i] + end for + return res + end function -constant tests = {{-7,1,5,2,-4,3,0}, - {2,4,6},{2,9,2}, - {1,-1,1,-1,1,-1,1}, - {1},{}} -printf(1,"The equilibrium indices for the following sequences are:\n") -for t in tests do - printf(1,"%24v -> %v\n", {t,equilibrium(t)}) -end for + ?equilibrium({-7,1,5,2,-4,3,0}) + + with javascript_semantics + sequence escache = {} -function es_cat(integer p) - if p>length(escache) and platform()!=JS then - escache &= repeat(0,p-length(escache)) - end if - integer category = escache[p] - if not category then - sequence f = filter(prime_factors(p+1,false,-1),">",3) - category = 1 - if length(f) then - category += max(apply(f,es_cat)) - end if - escache[p] = category - end if - return category -end function + function es_cat(integer p) + if p>length(escache) and platform()!=JS then + escache &= repeat(0,p-length(escache)) + end if + integer category = escache[p] + if not category then + sequence f = filter(prime_factors(p+1,false,-1),">",3) + category = 1 + if length(f) then + category += max(apply(f,es_cat)) + end if + escache[p] = category + end if + return category + end function -procedure categorise(integer n) - sequence p = get_primes(n) - printf(1,"First %,d primes:\n",n) - atom t1 = time() - sequence es = {} - for i=1 to n do - if time()>t1 then - progress("categorising %d/%d...",{i,n}) - t1 = time()+1 - end if - integer category = es_cat(p[i]) - while length(es)procedure categorise(integer n) + sequence p = get_primes(n) + printf(1,"First %,d primes:\n",n) + atom t1 = time() + sequence es = {} + for i=1 to n do + if time()>t1 then + progress("categorising %d/%d...",{i,n}) + t1 = time()+1 + end if + integer category = es_cat(p[i]) + while length(es)<category do + es = append(es,{}) + end while + es[category] &= p[i] + end for + progress("") + for c=1 to length(es) do + sequence e = es[c] + if n=200 then + printf(1,"Category %d: %s\n",{c,join(shorten(e,"primes",5,"%d"),",")}) + else + printf(1,"Category %2d: %7d .. %-8d Count: %d\n",{c,e[1],e[$],length(e)}) + end if + end for + printf(1,"\n") + end procedure -atom t0 = time() -categorise(200) -categorise(1e6) -?elapsed(time()-t0) + atom t0 = time() + categorise(200) + categorise(1e6) + ?elapsed(time()-t0) + + constant aleph = "0123456789ABCDEF" -function efill(string s, integer ch, i) - -- min-fill, like 10101 or 54321 or 32101 - s[i] = ch - for j=i+1 to length(s) do - ch = iff(ch>='1'?iff(ch='A'?'9':ch-1):'1') - s[j] = ch - end for - return s -end function + function efill(string s, integer ch, i) + -- min-fill, like 10101 or 54321 or 32101 + s[i] = ch + for j=i+1 to length(s) do + ch = iff(ch>='1'?iff(ch='A'?'9':ch-1):'1') + s[j] = ch + end for + return s + end function -function esthetic(string s, integer base = 10) - -- generate the next esthetic number after s - -- the special case of s="" always yields "1" - -- (nb otherwise s is assumed to be esthetic) - for i=length(s) to 1 by -1 do - integer ch = s[i], cp = iff(i>1?s[i-1]:'0') - if chfunction esthetic(string s, integer base = 10) + -- generate the next esthetic number after s + -- (nb unpredictable results if s is not esthetic, or "") + for i=length(s) to 1 by -1 do + integer ch = s[i], cp = iff(i>1?s[i-1]:'0') + if ch<cp and cp<aleph[base] then + return efill(s,aleph[find(ch,aleph)+2],i) + elsif i=1 and ch<aleph[base] then + return efill(s,iff(ch='9'?'A':ch+1),i) + end if + end for + return efill("1"&s,'1',1) + end function -string s -sequence res -for base=2 to 16 do - integer hi = base*6, - lo = base*4 - {s,res} = {"",{}} - for i=1 to hi do - s = esthetic(s, base) - if i>=lo then - res = append(res,s) - end if - end for - res = join(shorten(res,"numbers",4)) - printf(1,"Base %d esthetic numbers[%d..%d]: %s\n",{base,lo,hi,res}) -end for + string s + sequence res + for base=2 to 16 do + integer hi = base*6, + lo = base*4 + {s,res} = {"",{}} + for i=1 to hi do + s = esthetic(s, base) + if i>=lo then + res = append(res,s) + end if + end for + res = join(shorten(res,"numbers",4)) + printf(1,"Base %d esthetic numbers[%d..%d]: %s\n",{base,lo,hi,res}) + end for -{s,res} = {efill("1000",'1',1),{}} -while length(s)=4 do - res = append(res,s) - s = esthetic(s) -end while -res = {join(shorten(res,"numbers",5))} -printf(1,"\nBase 10 esthetic numbers between 1,000 and 9,999: %s\n\n",res) + {s,res} = {efill("1000",'1',1),{}} + while length(s)=4 do + res = append(res,s) + s = esthetic(s) + end while + res = {join(shorten(res,"numbers",5))} + printf(1,"\nBase 10 esthetic numbers between 1,000 and 9,999: %s\n\n",res) -function comma(string s) - for i=length(s)-2 to 2 by -3 do - s[i..i-1] = "," - end for - return s -end function + function comma(string s) + for i=length(s)-2 to 2 by -3 do + s[i..i-1] = "," + end for + return s + end function -for k=7 to 19 by 3 do - string f = "10"&repeat('0',k), - t = "13"&repeat('0',k) - {s,res} = {efill(f,'1',1),{}} - while sfor k=7 to 19 by 3 do + string f = "10"&repeat('0',k), + t = "13"&repeat('0',k) + {s,res} = {efill(f,'1',1),{}} + while s<t do + res = append(res,s) + s = esthetic(s) + end while + res = join(shorten(res,"numbers",1)) + printf(1,"Base 10 esthetic numbers between %s and %s: %s\n", + {comma(f),comma(t),res}) + end for + + function count_esthetic(integer len, start=0) + -- a start digit of 0 means sum all 1..9 + sequence dc = repeat(repeat(1,10),len) -- nb 0..9 logically + for i=2 to len do + for d=0 to 9 do + dc[i][d+1] = iff(d=0?0:dc[i-1][d]) + iff(d=9?0:dc[i-1][d+2]) + end for + end for + if start=0 then return sum(dc[len][1..9]) end if -- (see note) + return dc[len][start+1] + end function -sequence t = tagset(iff(machine_bits()=64?63:57),9,3), - r = columnize({apply(true,count_esthetic,{t,1}),t}) -papply(true,printf,{1,{"There are %,26d %2d-digit esthetic numbers beginning with 1\n"},r}) -if machine_bits()=64 then - printf(1,"There are %,26d 64-digit esthetic numbers\n",{count_esthetic(64)}) - printf(1,"There are %,26d esthetic numbers with max 65 digits\n",{sum(apply(tagset(64),count_esthetic))}) -end if + sequence t = tagset(iff(machine_bits()=64?63:57),9,3), + r = columnize({apply(true,count_esthetic,{t,1}),t}) + papply(true,printf,{1,{"There are %,26d %2d-digit esthetic numbers beginning with 1\n"},r}) + if machine_bits()=64 then + printf(1,"There are %,26d 64-digit esthetic numbers\n",{count_esthetic(64)}) + printf(1,"There are %,26d esthetic numbers with max 65 digits\n",{sum(apply(tagset(64),count_esthetic))}) + end if + stdout // $0 is a temp register - LDA str,BUF+19 % points after the end of the string -2H SUB str,str,1 % update buffer pointer - DIV acc,acc,10 % do a divide and mod - GET $0,rR % get digit from special purpose reg. rR - % containing the remainder of the division - INCL $0,'0' % convert to ascii - STBU $0,str % place digit in buffer - PBNZ acc,2B % next - % 'str' points to the start of the result - TRAP 0,Fputs,StdOut % output answer to stdout - TRAP 0,Halt,0 % exit + LDA str,BUF+19 % points after the end of the string +2H SUB str,str,1 % update buffer pointer + DIV acc,acc,10 % do a divide and mod + GET $0,rR % get digit from special purpose reg. rR + % containing the remainder of the division + INCL $0,'0' % convert to ascii + STBU $0,str % place digit in buffer + PBNZ acc,2B % next + % 'str' points to the start of the result + TRAP 0,Fputs,StdOut % output answer to stdout + TRAP 0,Halt,0 % exit diff --git a/Task/Ethiopian-multiplication/MoonRock/ethiopian-multiplication.moonrock b/Task/Ethiopian-multiplication/MoonRock/ethiopian-multiplication.moonrock deleted file mode 100644 index 4a1893471c..0000000000 --- a/Task/Ethiopian-multiplication/MoonRock/ethiopian-multiplication.moonrock +++ /dev/null @@ -1,54 +0,0 @@ -' Ethiopian multiplication -BEGIN DEF -pointer word PtrA~ -pointer word PtrIsEven~ -SUB Double(PtrA~) -SUB Halve(PtrA~) -SUB CheckIfEven(PtrA~, PtrIsEven~) -SUB PrintStr(S$, Width%) - -BEGIN CODE -X% = 17 -Y% = 34 -Tot% = 0 -WHILE X% >= 1 - CALL PrintStr(STR(X%), 6) - PRINT " " - CALL CheckIfEven(X%, VARPTR(IsEven%)) - IF IsEven% = FALSE THEN - Tot% = Tot% + Y% - CALL PrintStr(STR(Y%), 6) - ENDIF - PRINT "\n" - CALL Halve(VARPTR(X%)) - CALL Double(VARPTR(Y%)) -WEND -PRINT "= " -CALL PrintStr(STR(Tot%), 6) -PRINT "\n" -END - -' Subroutines are required, though -' they complicate the code - -SUB Double(PtrA~) -[PtrA~] = 2 * [PtrA~] -END SUB - -SUB Halve(PtrA~) -[PtrA~] = [PtrA~] \ 2 -END SUB - -SUB CheckIfEven(A%, PtrIsEven~) -[PtrIsEven~] = A% MOD 2 -[PtrIsEven~] = [PtrIsEven~] - 1 -END SUB - -SUB PrintStr(S$, Width%) -IF LEN(S$) > Width% THEN - PRINT S$ -ELSE - S$ = SPACE(Width%) + S$ - PRINT RIGHT(S$, Width%) -ENDIF -END SUB diff --git a/Task/Ethiopian-multiplication/OCaml/ethiopian-multiplication.ml b/Task/Ethiopian-multiplication/OCaml/ethiopian-multiplication.ocaml similarity index 100% rename from Task/Ethiopian-multiplication/OCaml/ethiopian-multiplication.ml rename to Task/Ethiopian-multiplication/OCaml/ethiopian-multiplication.ocaml diff --git a/Task/Ethiopian-multiplication/Oberon-07/ethiopian-multiplication.oberon b/Task/Ethiopian-multiplication/Oberon-07/ethiopian-multiplication.oberon deleted file mode 100644 index c6fe2e64c9..0000000000 --- a/Task/Ethiopian-multiplication/Oberon-07/ethiopian-multiplication.oberon +++ /dev/null @@ -1,42 +0,0 @@ -MODULE EthopianMultiplication; (* translation of Loglan82 *) - IMPORT Out; - - VAR x, y, outp : INTEGER; - multiplying : BOOLEAN; - - PROCEDURE half( a : INTEGER ) : INTEGER; - BEGIN - RETURN a DIV 2 - END half; - - PROCEDURE doub( a : INTEGER ) : INTEGER; - BEGIN - RETURN a * 2 - END doub; - - PROCEDURE isEven( a : INTEGER ) : BOOLEAN; - BEGIN - RETURN ~ ODD( a ) - END isEven; - -BEGIN - x := 17; - y := 34; - outp := 0; - multiplying := TRUE; - WHILE multiplying DO - Out.Int( x, 6 );Out.String( " " ); - IF ~ isEven(x) THEN - outp := outp + y; - Out.Int( y, 6 ) - END; - Out.Ln; - IF x < 2 THEN - multiplying := FALSE - ELSE - x := half(x); - y := doub(y) - END - END; - Out.String( " = " );Out.Int( outp, 6 );Out.Ln -END EthopianMultiplication. diff --git a/Task/Ethiopian-multiplication/Octave/ethiopian-multiplication.octave b/Task/Ethiopian-multiplication/Octave/ethiopian-multiplication.octave index c6a81160b1..18d3a0af83 100644 --- a/Task/Ethiopian-multiplication/Octave/ethiopian-multiplication.octave +++ b/Task/Ethiopian-multiplication/Octave/ethiopian-multiplication.octave @@ -18,12 +18,12 @@ function r = ethiopicmult(plier, plicand, tutor=false) while(plier >= 1) if ( iseven(plier) ) if (tutor) - printf("%4d %6d struck\n", plier, plicand); + printf("%4d %6d struck\n", plier, plicand); endif else r = r + plicand; if (tutor) - printf("%4d %6d kept\n", plier, plicand); + printf("%4d %6d kept\n", plier, plicand); endif endif plier = halve(plier); diff --git a/Task/Ethiopian-multiplication/Oz/ethiopian-multiplication.oz b/Task/Ethiopian-multiplication/Oz/ethiopian-multiplication.oz index 2c5a6825bd..4eaecb27c7 100644 --- a/Task/Ethiopian-multiplication/Oz/ethiopian-multiplication.oz +++ b/Task/Ethiopian-multiplication/Oz/ethiopian-multiplication.oz @@ -10,9 +10,9 @@ declare L in X; L>0; {Halve L} %% C-like iterator: "Init; While; Next" R in Y; true; {Double R} collect:Collect - do - {Collect L#R} - end + do + {Collect L#R} + end OddRows = {Filter Rows LeftIsOdd} RightColumn = {Map OddRows SelectRight} diff --git a/Task/Ethiopian-multiplication/Pascal-P/ethiopian-multiplication.pas b/Task/Ethiopian-multiplication/Pascal-P/ethiopian-multiplication.pas deleted file mode 100644 index 1046cc6565..0000000000 --- a/Task/Ethiopian-multiplication/Pascal-P/ethiopian-multiplication.pas +++ /dev/null @@ -1,47 +0,0 @@ -program ethiopian(output); - (* Ethiopian multiplication *) -var - x, y, outp: integer; - - function doub(a: integer): integer; - begin - doub := a * 2; - end; - - function half(a: integer): integer; - begin - half := a div 2; - end; - - function iseven(a: integer): boolean; - begin - iseven := a mod 2 = 0; - end; - -begin - x := 17; - y := 34; - write(x: 6); - if not (iseven(x)) then - begin - outp := outp + y; - writeln(' ', y: 6); - end - else - writeln; - while x >= 2 do - begin - x := half(x); - y := doub(y); - write(x: 6); - if not (iseven(x)) then - begin - outp := outp + y; - writeln(' ', y: 6); - end - else - writeln; - end; - writeln(' = ', outp: 6); - (* readln; *) -end. diff --git a/Task/Ethiopian-multiplication/Pascal/ethiopian-multiplication.pas b/Task/Ethiopian-multiplication/Pascal/ethiopian-multiplication.pas new file mode 100644 index 0000000000..826258d7fd --- /dev/null +++ b/Task/Ethiopian-multiplication/Pascal/ethiopian-multiplication.pas @@ -0,0 +1,34 @@ +program EthiopianMultiplication; + {$IFDEF FPC} + {$MODE DELPHI} + {$ENDIF} + function Double(Number: Integer): Integer; + begin + Result := Number * 2 + end; + + function Halve(Number: Integer): Integer; + begin + Result := Number div 2 + end; + + function Even(Number: Integer): Boolean; + begin + Result := Number mod 2 = 0 + end; + + function Ethiopian(NumberA, NumberB: Integer): Integer; + begin + Result := 0; + while NumberA >= 1 do + begin + if not Even(NumberA) then + Result := Result + NumberB; + NumberA := Halve(NumberA); + NumberB := Double(NumberB) + end + end; + +begin + Write(Ethiopian(17, 34)) +end. diff --git a/Task/Ethiopian-multiplication/PascalABC.NET/ethiopian-multiplication.pas b/Task/Ethiopian-multiplication/PascalABC.NET/ethiopian-multiplication.pas deleted file mode 100644 index 64d7022701..0000000000 --- a/Task/Ethiopian-multiplication/PascalABC.NET/ethiopian-multiplication.pas +++ /dev/null @@ -1,17 +0,0 @@ -function halve(x: integer): integer := x div 2; -function double(x: integer): integer := x * 2; -function odd(x: integer): boolean := x mod 2 <> 0; - -function ethiopian(x, y: integer): integer; -begin - while x >= 1 do - begin - if odd(x) then result += y; - x := halve(x); - y := double(y); - end; -end; - -begin - ethiopian(17, 34).println; -end. diff --git a/Task/Ethiopian-multiplication/Perl/ethiopian-multiplication.pl b/Task/Ethiopian-multiplication/Perl/ethiopian-multiplication.pl index 85d7454124..9ffe136ab9 100644 --- a/Task/Ethiopian-multiplication/Perl/ethiopian-multiplication.pl +++ b/Task/Ethiopian-multiplication/Perl/ethiopian-multiplication.pl @@ -11,12 +11,12 @@ sub ethiopicmult my $r = 0; while ($plier >= 1) { - $r += $plicand unless iseven($plier); - if ($tutor) { - print "$plier, $plicand ", (iseven($plier) ? " struck" : " kept"), "\n"; - } - $plier = halve($plier); - $plicand = double($plicand); + $r += $plicand unless iseven($plier); + if ($tutor) { + print "$plier, $plicand ", (iseven($plier) ? " struck" : " kept"), "\n"; + } + $plier = halve($plier); + $plicand = double($plicand); } return $r; } diff --git a/Task/Ethiopian-multiplication/Pluto/ethiopian-multiplication.pluto b/Task/Ethiopian-multiplication/Pluto/ethiopian-multiplication.pluto deleted file mode 100644 index a0528544e6..0000000000 --- a/Task/Ethiopian-multiplication/Pluto/ethiopian-multiplication.pluto +++ /dev/null @@ -1,18 +0,0 @@ -local function halve(n) return n // 2 end - -local function double(n) return n * 2 end - -local function is_even(n) return n % 2 == 0 end - -local function ethiopian(x, y) - local sum = 0 - while x >= 1 do - if !is_even(x) then sum += y end - x = halve(x) - y = double(y) - end - return sum -end - -print($"17 x 34 = {ethiopian(17, 34)}") -print($"99 x 99 = {ethiopian(99, 99)}") diff --git a/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-1.ps1 b/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-1.ps1 deleted file mode 100644 index 7aea5a622d..0000000000 --- a/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-1.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -function isEven { - param ([int]$value) - return [bool]($value % 2 -eq 0) -} - -function doubleValue { - param ([int]$value) - return [int]($value * 2) -} - -function halveValue { - param ([int]$value) - return [int]($value / 2) -} - -function multiplyValues { - param ( - [int]$plier, - [int]$plicand, - [int]$temp = 0 - ) - - while ($plier -ge 1) - { - if (!(isEven $plier)) { - $temp += $plicand - } - $plier = halveValue $plier - $plicand = doubleValue $plicand - } - -return $temp -} - -multiplyValues 17 34 diff --git a/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-1.psh b/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-1.psh new file mode 100644 index 0000000000..04e4e45546 --- /dev/null +++ b/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-1.psh @@ -0,0 +1,35 @@ +function isEven { + param ([int]$value) + return [bool]($value % 2 -eq 0) +} + +function doubleValue { + param ([int]$value) + return [int]($value * 2) +} + +function halveValue { + param ([int]$value) + return [int]($value / 2) +} + +function multiplyValues { + param ( + [int]$plier, + [int]$plicand, + [int]$temp = 0 + ) + + while ($plier -ge 1) + { + if (!(isEven $plier)) { + $temp += $plicand + } + $plier = halveValue $plier + $plicand = doubleValue $plicand + } + +return $temp +} + +multiplyValues 17 34 diff --git a/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-2.ps1 b/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-2.ps1 deleted file mode 100644 index 1e797c3ed7..0000000000 --- a/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-2.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -function halveInt( [int] $rhs ) -{ - [math]::floor( $rhs / 2 ) -} - -function doubleInt( [int] $rhs ) -{ - $rhs*2 -} - -function isEven( [int] $rhs ) -{ - -not ( $_ % 2 ) -} - -function Ethiopian( [int] $lhs , [int] $rhs ) -{ - $scratch = @{} - 1..[math]::floor( [math]::log( $lhs , 2 ) + 1 ) | - ForEach-Object { - $scratch[$lhs] = $rhs - $lhs - $lhs = halveInt( $lhs ) - $rhs = doubleInt( $rhs ) } | - Where-Object { -not ( isEven $_ ) } | - ForEach-Object { $sum = 0 } { $sum += $scratch[$_] } { $sum } -} - -Ethiopian 17 34 diff --git a/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-2.psh b/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-2.psh new file mode 100644 index 0000000000..5ba27a7a0e --- /dev/null +++ b/Task/Ethiopian-multiplication/PowerShell/ethiopian-multiplication-2.psh @@ -0,0 +1,29 @@ +function halveInt( [int] $rhs ) +{ + [math]::floor( $rhs / 2 ) +} + +function doubleInt( [int] $rhs ) +{ + $rhs*2 +} + +function isEven( [int] $rhs ) +{ + -not ( $_ % 2 ) +} + +function Ethiopian( [int] $lhs , [int] $rhs ) +{ + $scratch = @{} + 1..[math]::floor( [math]::log( $lhs , 2 ) + 1 ) | + ForEach-Object { + $scratch[$lhs] = $rhs + $lhs + $lhs = halveInt( $lhs ) + $rhs = doubleInt( $rhs ) } | + Where-Object { -not ( isEven $_ ) } | + ForEach-Object { $sum = 0 } { $sum += $scratch[$_] } { $sum } +} + +Ethiopian 17 34 diff --git a/Task/Ethiopian-multiplication/Powerbuilder/ethiopian-multiplication.powerbuilder b/Task/Ethiopian-multiplication/Powerbuilder/ethiopian-multiplication.powerbuilder index af6a22f8fb..119c89c29a 100644 --- a/Task/Ethiopian-multiplication/Powerbuilder/ethiopian-multiplication.powerbuilder +++ b/Task/Ethiopian-multiplication/Powerbuilder/ethiopian-multiplication.powerbuilder @@ -11,13 +11,13 @@ public function long wf_ethiopianmultiplication (long al_multiplicand, long al_m long ll_product DO WHILE al_multiplicand >= 1 - IF wf_iseven(al_multiplicand) THEN - // do nothing - ELSE - ll_product += al_multiplier - END IF - al_multiplicand = wf_halve(al_multiplicand) - al_multiplier = wf_double(al_multiplier) + IF wf_iseven(al_multiplicand) THEN + // do nothing + ELSE + ll_product += al_multiplier + END IF + al_multiplicand = wf_halve(al_multiplicand) + al_multiplier = wf_double(al_multiplier) LOOP return ll_product diff --git a/Task/Ethiopian-multiplication/QuickBASIC/ethiopian-multiplication.basic b/Task/Ethiopian-multiplication/QuickBASIC/ethiopian-multiplication.basic deleted file mode 100644 index 6fdbb1e5c2..0000000000 --- a/Task/Ethiopian-multiplication/QuickBASIC/ethiopian-multiplication.basic +++ /dev/null @@ -1,33 +0,0 @@ -' Ethiopian multiplication -DECLARE FUNCTION Half% (A AS INTEGER) -DECLARE FUNCTION Doub% (A AS INTEGER) -DECLARE FUNCTION IsEven% (A AS INTEGER) - -DIM X AS INTEGER, Y AS INTEGER, OutP AS INTEGER -X = 17 -Y = 34 -DO - PRINT X, - IF NOT (IsEven(X)) THEN - OutP = OutP + Y - PRINT Y - ELSE - PRINT - END IF - IF X < 2 THEN EXIT DO - X = Half(X) - Y = Doub(Y) -LOOP -PRINT " =", OutP - -FUNCTION Doub% (A AS INTEGER) - Doub% = A * 2 -END FUNCTION - -FUNCTION Half% (A AS INTEGER) - Half% = A \ 2 -END FUNCTION - -FUNCTION IsEven% (A AS INTEGER) - IsEven% = (A MOD 2) - 1 -END FUNCTION diff --git a/Task/Ethiopian-multiplication/R/ethiopian-multiplication-2.r b/Task/Ethiopian-multiplication/R/ethiopian-multiplication-2.r index 5c2f395556..d105b32b1d 100644 --- a/Task/Ethiopian-multiplication/R/ethiopian-multiplication-2.r +++ b/Task/Ethiopian-multiplication/R/ethiopian-multiplication-2.r @@ -3,13 +3,13 @@ double <- function(a) a*2 iseven <- function(a) (a%%2)==0 ethiopicmult<-function(x,y){ - res<-ifelse(iseven(y),0,x) - while(!y==1){ - x<-double(x) - y<-halve(y) - if(!iseven(y)) res<-res+x - } - return(res) + res<-ifelse(iseven(y),0,x) + while(!y==1){ + x<-double(x) + y<-halve(y) + if(!iseven(y)) res<-res+x + } + return(res) } print(ethiopicmult(17,34)) diff --git a/Task/Ethiopian-multiplication/Raku/ethiopian-multiplication-1.raku b/Task/Ethiopian-multiplication/Raku/ethiopian-multiplication-1.raku index 00d9e4165a..1fb06da87d 100644 --- a/Task/Ethiopian-multiplication/Raku/ethiopian-multiplication-1.raku +++ b/Task/Ethiopian-multiplication/Raku/ethiopian-multiplication-1.raku @@ -5,9 +5,9 @@ sub even (Int $n --> Bool) { $n %% 2 } sub ethiopic-mult (Int $a is copy, Int $b is copy --> Int) { my Int $r = 0; while $a { - even $a or $r += $b; - halve $a; - double $b; + even $a or $r += $b; + halve $a; + double $b; } return $r; } diff --git a/Task/Ethiopian-multiplication/Rascal/ethiopian-multiplication.rascal b/Task/Ethiopian-multiplication/Rascal/ethiopian-multiplication.rascal index 63ddce167b..7efe02722d 100644 --- a/Task/Ethiopian-multiplication/Rascal/ethiopian-multiplication.rascal +++ b/Task/Ethiopian-multiplication/Rascal/ethiopian-multiplication.rascal @@ -7,12 +7,12 @@ public int double(int n) = n*2; public bool uneven(int n) = (n % 2) != 0); public int ethiopianMul(int n, int m) { - result = 0; - while(n >= 1) { - if(uneven(n)) - result += m; - n = halve(n); - m = double(m); - } - return result; + result = 0; + while(n >= 1) { + if(uneven(n)) + result += m; + n = halve(n); + m = double(m); + } + return result; } diff --git a/Task/Ethiopian-multiplication/Rebol/ethiopian-multiplication.rebol b/Task/Ethiopian-multiplication/Rebol/ethiopian-multiplication.rebol deleted file mode 100644 index 6d70881ef7..0000000000 --- a/Task/Ethiopian-multiplication/Rebol/ethiopian-multiplication.rebol +++ /dev/null @@ -1,31 +0,0 @@ -Rebol [ - title: "Rosetta code: Ethiopian multiplication" - file: %Ethiopian_multiplication.r3 - url: https://rosettacode.org/wiki/Ethiopian_multiplication -] - -halve: function [n][n >> 1] -double: function [n][n << 1] - -ethiopian-multiply: function [ - "Returns the product of two integers using Ethiopian multiplication, with a printed trace" - a [integer!] "The multiplicand (column halved)" - b [integer!] "The multiplier (column doubled)" -][ - result: 0 - while [a <> 0][ - prin pad a -7 - either odd? a [ - result: result + b - print [as-green pad b -5 "(keep)"] - ][ print pad b -5] - a: halve a - b: double b - ] - print "-------------" - print as-yellow pad result -12 - result -] - -; Example: should print the layout shown for input 17 and 34 -ethiopian-multiply 17 34 diff --git a/Task/Ethiopian-multiplication/Rust/ethiopian-multiplication.rs b/Task/Ethiopian-multiplication/Rust/ethiopian-multiplication.rust similarity index 100% rename from Task/Ethiopian-multiplication/Rust/ethiopian-multiplication.rs rename to Task/Ethiopian-multiplication/Rust/ethiopian-multiplication.rust diff --git a/Task/Ethiopian-multiplication/SNOBOL4/ethiopian-multiplication.sno b/Task/Ethiopian-multiplication/SNOBOL4/ethiopian-multiplication.sno index 1486374343..143f93f2f2 100644 --- a/Task/Ethiopian-multiplication/SNOBOL4/ethiopian-multiplication.sno +++ b/Task/Ethiopian-multiplication/SNOBOL4/ethiopian-multiplication.sno @@ -1,21 +1,21 @@ - define('halve(num)') :(halve_end) -halve eq(num,1) :s(freturn) - halve = num / 2 :(return) + define('halve(num)') :(halve_end) +halve eq(num,1) :s(freturn) + halve = num / 2 :(return) halve_end - define('double(num)') :(double_end) -double double = num * 2 :(return) + define('double(num)') :(double_end) +double double = num * 2 :(return) double_end - define('odd(num)') :(odd_end) -odd eq(num,1) :s(return) - eq(num,double(halve(num))) :s(freturn)f(return) + define('odd(num)') :(odd_end) +odd eq(num,1) :s(return) + eq(num,double(halve(num))) :s(freturn)f(return) -odd_end l = trim(input) - r = trim(input) - s = 0 -next s = odd(l) s + r - r = double(r) - l = halve(l) :s(next) -stop output = s +odd_end l = trim(input) + r = trim(input) + s = 0 +next s = odd(l) s + r + r = double(r) + l = halve(l) :s(next) +stop output = s end diff --git a/Task/Ethiopian-multiplication/Scheme/ethiopian-multiplication.scm b/Task/Ethiopian-multiplication/Scheme/ethiopian-multiplication.ss similarity index 100% rename from Task/Ethiopian-multiplication/Scheme/ethiopian-multiplication.scm rename to Task/Ethiopian-multiplication/Scheme/ethiopian-multiplication.ss diff --git a/Task/Ethiopian-multiplication/Smalltalk/ethiopian-multiplication-1.st b/Task/Ethiopian-multiplication/Smalltalk/ethiopian-multiplication-1.st index 9a607ae2c2..2d25a1a5cf 100644 --- a/Task/Ethiopian-multiplication/Smalltalk/ethiopian-multiplication-1.st +++ b/Task/Ethiopian-multiplication/Smalltalk/ethiopian-multiplication-1.st @@ -20,7 +20,7 @@ Number extend [ ifTrue: [ tutor ifTrue: [ ('%1, %2 struck' % { multiplier. multiplicand }) - displayNl + displayNl ] ]. multiplier := multiplier halve. diff --git a/Task/Ethiopian-multiplication/Tcl/ethiopian-multiplication-1.tcl b/Task/Ethiopian-multiplication/Tcl/ethiopian-multiplication-1.tcl index 873c47d443..5f594c4172 100644 --- a/Task/Ethiopian-multiplication/Tcl/ethiopian-multiplication-1.tcl +++ b/Task/Ethiopian-multiplication/Tcl/ethiopian-multiplication-1.tcl @@ -9,22 +9,22 @@ function even n {($n & 1) == 0} function mult {a b} { $a < 1 ? 0 : even($a) ? [logmult STRUCK] + mult(halve($a), double($b)) - : [logmult KEPT] + mult(halve($a), double($b)) + $b + : [logmult KEPT] + mult(halve($a), double($b)) + $b } # Wrapper to set up the logging proc ethiopianMultiply {a b {tutor false}} { if {$tutor} { - set wa [expr {[string length $a]+1}] - set wb [expr {$wa+[string length $b]-1}] - puts stderr "Ethiopian multiplication of $a and $b" - interp alias {} logmult {} apply {{wa wb msg} { - upvar 1 a a b b - puts stderr [format "%*d %*d %s" $wa $a $wb $b $msg] - return 0 - }} $wa $wb + set wa [expr {[string length $a]+1}] + set wb [expr {$wa+[string length $b]-1}] + puts stderr "Ethiopian multiplication of $a and $b" + interp alias {} logmult {} apply {{wa wb msg} { + upvar 1 a a b b + puts stderr [format "%*d %*d %s" $wa $a $wb $b $msg] + return 0 + }} $wa $wb } else { - proc logmult args {return 0} + proc logmult args {return 0} } return [expr {mult($a,$b)}] } diff --git a/Task/Ethiopian-multiplication/True-BASIC/ethiopian-multiplication.basic b/Task/Ethiopian-multiplication/True-BASIC/ethiopian-multiplication.basic index 938dbf5dca..2e096710f7 100644 --- a/Task/Ethiopian-multiplication/True-BASIC/ethiopian-multiplication.basic +++ b/Task/Ethiopian-multiplication/True-BASIC/ethiopian-multiplication.basic @@ -1,29 +1,29 @@ !RosettaCode: Ethiopian Multiplication ! True BASIC v6.007 PROGRAM EthiopianMultiplication - DECLARE DEF FNdouble - DECLARE DEF FNhalve - DECLARE DEF FNeven - - LET x = 17 - LET y = 34 - - DO - IF FNeven(x) = 0 THEN - LET p = p + y - PRINT x,y - ELSE - PRINT x," ---" - END IF - - LET x = FNhalve(x) - LET y = FNdouble(y) - LOOP UNTIL x = 0 - PRINT " ", " ===" - PRINT " ", p - GET KEY done - - DEF FNdouble(A) = A * 2 - DEF FNhalve(A) = INT(A / 2) - DEF FNeven(A) = MOD(A+1,2) + DECLARE DEF FNdouble + DECLARE DEF FNhalve + DECLARE DEF FNeven + + LET x = 17 + LET y = 34 + + DO + IF FNeven(x) = 0 THEN + LET p = p + y + PRINT x,y + ELSE + PRINT x," ---" + END IF + + LET x = FNhalve(x) + LET y = FNdouble(y) + LOOP UNTIL x = 0 + PRINT " ", " ===" + PRINT " ", p + GET KEY done + + DEF FNdouble(A) = A * 2 + DEF FNhalve(A) = INT(A / 2) + DEF FNeven(A) = MOD(A+1,2) END diff --git a/Task/Ethiopian-multiplication/UNIX-Shell/ethiopian-multiplication-1.sh b/Task/Ethiopian-multiplication/UNIX-Shell/ethiopian-multiplication-1.sh index f9a0dc4ee0..21f4a8aaaf 100644 --- a/Task/Ethiopian-multiplication/UNIX-Shell/ethiopian-multiplication-1.sh +++ b/Task/Ethiopian-multiplication/UNIX-Shell/ethiopian-multiplication-1.sh @@ -19,9 +19,9 @@ ethiopicmult() plicand=$2 r=0 while [ "$plier" -ge 1 ]; do - is_even "$plier" || r=`expr $r + "$plicand"` - plier=`halve "$plier"` - plicand=`double "$plicand"` + is_even "$plier" || r=`expr $r + "$plicand"` + plier=`halve "$plier"` + plicand=`double "$plicand"` done echo $r } diff --git a/Task/Ethiopian-multiplication/Uiua/ethiopian-multiplication.uiua b/Task/Ethiopian-multiplication/Uiua/ethiopian-multiplication.uiua deleted file mode 100644 index 8f809a29aa..0000000000 --- a/Task/Ethiopian-multiplication/Uiua/ethiopian-multiplication.uiua +++ /dev/null @@ -1,10 +0,0 @@ -Halve ← ⌊÷2 -Double ← ×2 -Odd ← ◿2 -EMul ← ◌◌⍢(⊓Halve Double⍥⊙⟜+⊸Odd)±⊙⊙0 - -┌─╴test - ⍤⤙≍ 578 EMul 17 34 - ⍤⤙≍ 0 EMul 17 0 - ⍤⤙≍ 6 EMul 2 3 -└─╴ diff --git a/Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-1.vb b/Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-1.vb new file mode 100644 index 0000000000..0746c78f8e --- /dev/null +++ b/Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-1.vb @@ -0,0 +1,89 @@ +option explicit + +class List + private theList + private nOccupiable + private nTop + + sub class_initialize + nTop = 0 + nOccupiable = 100 + redim theList( nOccupiable ) + end sub + + public sub store( x ) + if nTop >= nOccupiable then + nOccupiable = nOccupiable + 100 + redim preserve theList( nOccupiable ) + end if + theList( nTop ) = x + nTop = nTop + 1 + end sub + + public function recall( n ) + if n >= 0 and n <= nOccupiable then + recall = theList( n ) + else + err.raise vbObjectError + 1000,,"Recall bounds error" + end if + end function + + public sub replace( n, x ) + if n >= 0 and n <= nOccupiable then + theList( n ) = x + else + err.raise vbObjectError + 1001,,"Replace bounds error" + end if + end sub + + public property get listCount + listCount = nTop + end property + +end class + +function halve( n ) + halve = int( n / 2 ) +end function + +function twice( n ) + twice = int( n * 2 ) +end function + +function iseven( n ) + iseven = ( ( n mod 2 ) = 0 ) +end function + + +function multiply( n1, n2 ) + dim LL + set LL = new List + + dim RR + set RR = new List + + LL.store n1 + RR.store n2 + + do while n1 <> 1 + n1 = halve( n1 ) + LL.store n1 + n2 = twice( n2 ) + RR.store n2 + loop + + dim i + for i = 0 to LL.listCount + if iseven( LL.recall( i ) ) then + RR.replace i, 0 + end if + next + + dim total + total = 0 + for i = 0 to RR.listCount + total = total + RR.recall( i ) + next + + multiply = total +end function diff --git a/Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-1.vbs b/Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-1.vbs deleted file mode 100644 index ff896c9b1a..0000000000 --- a/Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-1.vbs +++ /dev/null @@ -1,89 +0,0 @@ -option explicit - -class List - private theList - private nOccupiable - private nTop - - sub class_initialize - nTop = 0 - nOccupiable = 100 - redim theList( nOccupiable ) - end sub - - public sub store( x ) - if nTop >= nOccupiable then - nOccupiable = nOccupiable + 100 - redim preserve theList( nOccupiable ) - end if - theList( nTop ) = x - nTop = nTop + 1 - end sub - - public function recall( n ) - if n >= 0 and n <= nOccupiable then - recall = theList( n ) - else - err.raise vbObjectError + 1000,,"Recall bounds error" - end if - end function - - public sub replace( n, x ) - if n >= 0 and n <= nOccupiable then - theList( n ) = x - else - err.raise vbObjectError + 1001,,"Replace bounds error" - end if - end sub - - public property get listCount - listCount = nTop - end property - -end class - -function halve( n ) - halve = int( n / 2 ) -end function - -function twice( n ) - twice = int( n * 2 ) -end function - -function iseven( n ) - iseven = ( ( n mod 2 ) = 0 ) -end function - - -function multiply( n1, n2 ) - dim LL - set LL = new List - - dim RR - set RR = new List - - LL.store n1 - RR.store n2 - - do while n1 <> 1 - n1 = halve( n1 ) - LL.store n1 - n2 = twice( n2 ) - RR.store n2 - loop - - dim i - for i = 0 to LL.listCount - if iseven( LL.recall( i ) ) then - RR.replace i, 0 - end if - next - - dim total - total = 0 - for i = 0 to RR.listCount - total = total + RR.recall( i ) - next - - multiply = total -end function diff --git a/Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-2.vbs b/Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-2.vb similarity index 100% rename from Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-2.vbs rename to Task/Ethiopian-multiplication/VBScript/ethiopian-multiplication-2.vb diff --git a/Task/Ethiopian-multiplication/X86-Assembly/ethiopian-multiplication-1.x86 b/Task/Ethiopian-multiplication/X86-Assembly/ethiopian-multiplication-1.x86 index ff6e3762ae..3d078eced9 100644 --- a/Task/Ethiopian-multiplication/X86-Assembly/ethiopian-multiplication-1.x86 +++ b/Task/Ethiopian-multiplication/X86-Assembly/ethiopian-multiplication-1.x86 @@ -1,109 +1,109 @@ - extern printf - global main + extern printf + global main - section .text + section .text halve - shr ebx, 1 - ret + shr ebx, 1 + ret double - shl ebx, 1 - ret + shl ebx, 1 + ret iseven - and ebx, 1 - cmp ebx, 0 - ret ; ret preserves flags + and ebx, 1 + cmp ebx, 0 + ret ; ret preserves flags main - push 1 ; tutor = true - push 34 ; 2nd operand - push 17 ; 1st operand - call ethiopicmult - add esp, 12 + push 1 ; tutor = true + push 34 ; 2nd operand + push 17 ; 1st operand + call ethiopicmult + add esp, 12 - push eax ; result of 17*34 - push fmt - call printf - add esp, 8 + push eax ; result of 17*34 + push fmt + call printf + add esp, 8 - ret + ret %define plier 8 %define plicand 12 %define tutor 16 - + ethiopicmult - enter 0, 0 - cmp dword [ebp + tutor], 0 - je .notut0 - push dword [ebp + plicand] - push dword [ebp + plier] - push preamblefmt - call printf - add esp, 12 + enter 0, 0 + cmp dword [ebp + tutor], 0 + je .notut0 + push dword [ebp + plicand] + push dword [ebp + plier] + push preamblefmt + call printf + add esp, 12 .notut0 - xor eax, eax ; eax -> result - mov ecx, [ebp + plier] ; ecx -> plier - mov edx, [ebp + plicand] ; edx -> plicand + xor eax, eax ; eax -> result + mov ecx, [ebp + plier] ; ecx -> plier + mov edx, [ebp + plicand] ; edx -> plicand .whileloop - cmp ecx, 1 - jl .multend - cmp dword [ebp + tutor], 0 - je .notut1 - call tutorme + cmp ecx, 1 + jl .multend + cmp dword [ebp + tutor], 0 + je .notut1 + call tutorme .notut1 - mov ebx, ecx - call iseven - je .iseven - add eax, edx ; result += plicand + mov ebx, ecx + call iseven + je .iseven + add eax, edx ; result += plicand .iseven - mov ebx, ecx ; plier >>= 1 - call halve - mov ecx, ebx + mov ebx, ecx ; plier >>= 1 + call halve + mov ecx, ebx - mov ebx, edx ; plicand <<= 1 - call double - mov edx, ebx - - jmp .whileloop + mov ebx, edx ; plicand <<= 1 + call double + mov edx, ebx + + jmp .whileloop .multend - leave - ret + leave + ret tutorme - push eax - push strucktxt - mov ebx, ecx - call iseven - je .nostruck - mov dword [esp], kepttxt + push eax + push strucktxt + mov ebx, ecx + call iseven + je .nostruck + mov dword [esp], kepttxt .nostruck - push edx - push ecx - push tutorfmt - call printf - add esp, 4 - pop ecx - pop edx - add esp, 4 - pop eax - ret + push edx + push ecx + push tutorfmt + call printf + add esp, 4 + pop ecx + pop edx + add esp, 4 + pop eax + ret - section .data + section .data fmt - db "%d", 10, 0 + db "%d", 10, 0 preamblefmt - db "ethiopic multiplication of %d and %d", 10, 0 + db "ethiopic multiplication of %d and %d", 10, 0 tutorfmt - db "%4d %6d %s", 10, 0 + db "%4d %6d %s", 10, 0 strucktxt - db "struck", 0 + db "struck", 0 kepttxt - db "kept", 0 + db "kept", 0 diff --git a/Task/Ethiopian-multiplication/Yabasic/ethiopian-multiplication.basic b/Task/Ethiopian-multiplication/Yabasic/ethiopian-multiplication.basic index 345137d134..38ab4861d9 100644 --- a/Task/Ethiopian-multiplication/Yabasic/ethiopian-multiplication.basic +++ b/Task/Ethiopian-multiplication/Yabasic/ethiopian-multiplication.basic @@ -3,28 +3,28 @@ x = 17 y = 34 do - print x, chr$(09); - if not (isEven(x)) then - outP = outP + y - print y - else - print - fi - if x < 2 break - x = half(x) - y = doub(y) + print x, chr$(09); + if not (isEven(x)) then + outP = outP + y + print y + else + print + fi + if x < 2 break + x = half(x) + y = doub(y) loop print "=", chr$(09), outP end sub doub (a) - return a * 2 + return a * 2 end sub sub half (a) - return int(a / 2) + return int(a / 2) end sub sub isEven (a) - return mod(a, 2) - 1 + return mod(a, 2) - 1 end sub diff --git a/Task/Ethiopian-multiplication/Z80-Assembly/ethiopian-multiplication.z80 b/Task/Ethiopian-multiplication/Z80-Assembly/ethiopian-multiplication.z80 index 5641a4f8c2..cbc6ebf0a0 100644 --- a/Task/Ethiopian-multiplication/Z80-Assembly/ethiopian-multiplication.z80 +++ b/Task/Ethiopian-multiplication/Z80-Assembly/ethiopian-multiplication.z80 @@ -1,114 +1,114 @@ - org &8000 + org &8000 - ld hl,17 - call Halve_Until_1 - - push bc - ld hl,34 - call Double_Until_1 - pop bc - - call SumOddEntries - ;returns Ethiopian product in IX. - - call NewLine - - call Primm - byte "0x",0 - - push ix - pop hl - - ld a,H - call ShowHex - ;Output should be in decimal but hex is easier. - ld a,L - call ShowHex - - ret + ld hl,17 + call Halve_Until_1 + + push bc + ld hl,34 + call Double_Until_1 + pop bc + + call SumOddEntries + ;returns Ethiopian product in IX. + + call NewLine + + call Primm + byte "0x",0 + + push ix + pop hl + + ld a,H + call ShowHex + ;Output should be in decimal but hex is easier. + ld a,L + call ShowHex + + ret Halve_Until_1: - ;input: HL = number you wish to halve. HL is unsigned. - ld de,Column_1 - ld a,1 - ld (Column_1),HL - inc de - inc de + ;input: HL = number you wish to halve. HL is unsigned. + ld de,Column_1 + ld a,1 + ld (Column_1),HL + inc de + inc de loop_HalveUntil_1: - SRL H - RR L - inc b - push af - ld a,L - ld (de),a - inc de - ld a,H - ld (de),a - inc de - pop af - CP L - jr nz,loop_HalveUntil_1 - ;b tracks how many times to double the second factor. - ret - + SRL H + RR L + inc b + push af + ld a,L + ld (de),a + inc de + ld a,H + ld (de),a + inc de + pop af + CP L + jr nz,loop_HalveUntil_1 + ;b tracks how many times to double the second factor. + ret + Double_Until_1: - ;doubles second factor B times. B is calculated by Halve_until_1 - ld de,Column_2 - ld (Column_2),HL - inc de - inc de + ;doubles second factor B times. B is calculated by Halve_until_1 + ld de,Column_2 + ld (Column_2),HL + inc de + inc de loop_double_until_1: - SLA L - RL H - PUSH AF - LD A,L - LD (DE),A - INC DE - LD A,H - LD (DE),A - INC DE - POP AF - DJNZ loop_double_until_1 - ret - + SLA L + RL H + PUSH AF + LD A,L + LD (DE),A + INC DE + LD A,H + LD (DE),A + INC DE + POP AF + DJNZ loop_double_until_1 + ret + SumOddEntries: - sla b ;double loop counter, this is also the offset to the "last" entry of - ;each table - ld h,>Column_1 - ld d,>Column_2 ;aligning the tables lets us get away with this. - ld l,b - ld e,b - ld ix,0 + sla b ;double loop counter, this is also the offset to the "last" entry of + ;each table + ld h,>Column_1 + ld d,>Column_2 ;aligning the tables lets us get away with this. + ld l,b + ld e,b + ld ix,0 loop: - ld a,(hl) - rrca ;we only need the result of the odd/even test. - jr nc,skipEven - push hl - push de - ld a,(de) - ld L,a - inc de - ld a,(de) - ld H,a - ex de,hl - add ix,de - pop de - pop hl + ld a,(hl) + rrca ;we only need the result of the odd/even test. + jr nc,skipEven + push hl + push de + ld a,(de) + ld L,a + inc de + ld a,(de) + ld H,a + ex de,hl + add ix,de + pop de + pop hl skipEven: - dec de - dec de - dec hl - dec hl - djnz loop - ret ;ix should contain the answer + dec de + dec de + dec hl + dec hl + djnz loop + ret ;ix should contain the answer - - align 8 ;aligns Column_1 to the nearest 256 byte boundary. This makes offsetting easier. + + align 8 ;aligns Column_1 to the nearest 256 byte boundary. This makes offsetting easier. Column_1: - ds 16,0 - - align 8 ;aligns Column_2 to the nearest 256 byte boundary. This makes offsetting easier. + ds 16,0 + + align 8 ;aligns Column_2 to the nearest 256 byte boundary. This makes offsetting easier. Column_2: - ds 16,0 + ds 16,0 diff --git a/Task/Euclid-Mullin-sequence/C++/euclid-mullin-sequence.cpp b/Task/Euclid-Mullin-sequence/C++/euclid-mullin-sequence.cpp deleted file mode 100644 index 11e98dc402..0000000000 --- a/Task/Euclid-Mullin-sequence/C++/euclid-mullin-sequence.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include - -uint64_t product = 2; - -uint64_t smallest_prime_factor(const uint64_t& number) { - if ( number % 3 == 0 ) { return 3; } - if ( number % 5 == 0 ) { return 5; } - - for ( uint64_t divisor = 7; divisor * divisor <= number; divisor += 2 ) { - if ( number % divisor == 0 ) { return divisor; } - } - - return number; -} - -uint64_t next_euclid_mullin() { - const uint64_t smallest_prime = smallest_prime_factor(product + 1); - product *= smallest_prime; - return smallest_prime; -} - -int main() { - std::cout << "The first 9 terms of the Euclid-Mullin sequence:" << "\n"; - std::cout << 2 << " "; - for ( uint32_t i = 1; i < 9; ++i ) { - std::cout << next_euclid_mullin() << " "; - } - std::cout << "\n"; -} diff --git a/Task/Euclid-Mullin-sequence/EasyLang/euclid-mullin-sequence.easy b/Task/Euclid-Mullin-sequence/EasyLang/euclid-mullin-sequence.easy index 0bbed926a2..961b4a0430 100644 --- a/Task/Euclid-Mullin-sequence/EasyLang/euclid-mullin-sequence.easy +++ b/Task/Euclid-Mullin-sequence/EasyLang/euclid-mullin-sequence.easy @@ -1,17 +1,17 @@ +limit = 8 arr[] = [ 2 ] -fastproc . - for i = 2 to 8 - k = 3 - repeat - em = 1 - for j = 1 to i - 1 - em = em * arr[j] mod k - . - em = (em + 1) mod k - until em = 0 - k += 2 +write 2 & " " +for i = 2 to limit + k = 3 + repeat + em = 1 + for j = 1 to i - 1 + em = em * arr[j] mod k . - arr[] &= k + em = (em + 1) mod k + until em = 0 + k += 2 . + arr[] &= k + write k & " " . -print arr[] diff --git a/Task/Euclid-Mullin-sequence/Fennel/euclid-mullin-sequence.fennel b/Task/Euclid-Mullin-sequence/Fennel/euclid-mullin-sequence.fennel deleted file mode 100644 index 5f18e0534c..0000000000 --- a/Task/Euclid-Mullin-sequence/Fennel/euclid-mullin-sequence.fennel +++ /dev/null @@ -1,18 +0,0 @@ -(do ;;; find elements of the Euclid-Mullin sequence: starting from 2, - ;;; the next element is the smallest prime factor of 1 + the product - ;;; of the previous elements - - (io.write "2") - (var product 2) - (for [i 2 9] - (var (nextV p found) (values (+ product 1) 3 false)) - ; find the first prime factor of nextV - (while (and (<= (* p p) nextV) (not found)) - (set found (= 0 (% nextV p))) - (when (not found) (set p (+ p 2))) - ) - (when found (set nextV p)) - (io.write (.. " " nextV)) - (set product (* product nextV)) - ) -) diff --git a/Task/Euclid-Mullin-sequence/FutureBasic/euclid-mullin-sequence.basic b/Task/Euclid-Mullin-sequence/FutureBasic/euclid-mullin-sequence.basic deleted file mode 100644 index f6c83a34f6..0000000000 --- a/Task/Euclid-Mullin-sequence/FutureBasic/euclid-mullin-sequence.basic +++ /dev/null @@ -1,57 +0,0 @@ -// -// Euclid-Mullin Sequence -// Using FutureBasic 7.0.35 -// -// September 2025, R.W. -// - -include "gmp.incl" - -_TERMS = 16 // first 16 Euclid–Mullin Sequence - -// Return a non-trivial factor of n using Pollard-Rho - -void local fn PollardRho( n as mpz_t, out as mpz_t ) - mpz_t x,y,c,d,absDiff - mpz_inits( x, y, c, d, absDiff, 0 ) - mpz_set_ui( x, 2 ) : mpz_set_ui( y, 2 ) : mpz_set_ui( c, 1 ) - mpz_set_ui( d, 1 ) - while fn mpz_cmp_ui( d, 1 ) == 0 - // x = (x*x + c) mod n - mpz_mul( x, x, x ) : mpz_add( x, x, c ) : mpz_mod( x, x, n ) - // y = f(f(y)) - mpz_mul( y, y, y ) : mpz_add( y, y, c ) : mpz_mod( y, y, n ) - mpz_mul( y, y, y ) : mpz_add( y, y, c ) : mpz_mod( y, y, n ) - // d = gcd(|x-y|, n) - mpz_sub( absDiff, x, y ) : mpz_abs( absDiff, absDiff ) - fn mpz_gcd( d, absDiff, n ) - wend - mpz_set( out, d ) - mpz_clears( x,y,c,d,absDiff,0 ) -end fn - -void local fn EuclidMullin( terms as long ) - CFStringRef result - mpz_t total, tmp, factor - mpz_inits( total, tmp, factor, 0 ) - mpz_set_ui( total, 1 ) - print @ - print @"First ";terms;" numbers of Euclid-Mullin sequence" - print @ - long k - for k = 1 to _TERMS - mpz_add_ui( tmp, total, 1 ) // tmp = total + 1 - fn PollardRho( tmp, factor ) // factor = some factor of tmp - result = fn mpz_cf2( factor ) - print result - mpz_mul( total, total, factor ) // total *= factor - next - - mpz_clears( total, tmp, factor, 0 ) -end fn - -window 1, @"Euclid-Mullin Sequence" - -fn EuclidMullin(_TERMS ) - -handleEvents diff --git a/Task/Euclid-Mullin-sequence/Java/euclid-mullin-sequence.java b/Task/Euclid-Mullin-sequence/Java/euclid-mullin-sequence.java index 6c4836716f..0acc583224 100644 --- a/Task/Euclid-Mullin-sequence/Java/euclid-mullin-sequence.java +++ b/Task/Euclid-Mullin-sequence/Java/euclid-mullin-sequence.java @@ -12,8 +12,7 @@ public final class EuclidMullinSequence { System.out.println("The first 27 terms of the Euclid-Mullin sequence:"); System.out.print(2 + " "); for ( int i = 1; i < 27; i++ ) { - System.out.print( - String.format("%s%s", nextEuclidMullin(), ( i == 14 || i == 27 ) ? "\n" : " ")); + System.out.print(String.format("%s%s", nextEuclidMullin(), ( i == 14 || i == 27 ) ? "\n" : " ")); } } @@ -68,7 +67,7 @@ public final class EuclidMullinSequence { sieve.set(2, aLimit + 1); for ( int i = 2; i * i <= aLimit; i = sieve.nextSetBit(i + 1) ) { - for ( int j = i * i; j <= aLimit; j += i ) { + for ( int j = i * i; j <= aLimit; j = j + i ) { sieve.clear(j); } } diff --git a/Task/Euclid-Mullin-sequence/JavaScript/euclid-mullin-sequence.js b/Task/Euclid-Mullin-sequence/JavaScript/euclid-mullin-sequence.js deleted file mode 100644 index 05dfefc61c..0000000000 --- a/Task/Euclid-Mullin-sequence/JavaScript/euclid-mullin-sequence.js +++ /dev/null @@ -1,20 +0,0 @@ - let product = 2n; - function smallestPrimeFactor(number) { - if (number % 3n === 0n) { return 3n; } - if (number % 5n === 0n) { return 5n; } - for (let divisor = 7n; divisor * divisor <= number; divisor += 2n) { - if (number % divisor === 0n) { return divisor; } - } - return number; - } - function nextEuclidMullin() { - const smallestPrime = smallestPrimeFactor(product + 1n); - product *= smallestPrime; - return smallestPrime; - } - console.log("The first 9 terms of the Euclid-Mullin sequence:"); - process.stdout.write(2 + " "); - for (let i = 1; i < 9; ++i) { - process.stdout.write(nextEuclidMullin() + " "); - } - console.log("\n"); diff --git a/Task/Euclid-Mullin-sequence/Julia/euclid-mullin-sequence.jl b/Task/Euclid-Mullin-sequence/Julia/euclid-mullin-sequence.julia similarity index 100% rename from Task/Euclid-Mullin-sequence/Julia/euclid-mullin-sequence.jl rename to Task/Euclid-Mullin-sequence/Julia/euclid-mullin-sequence.julia diff --git a/Task/Euclid-Mullin-sequence/Lua/euclid-mullin-sequence-1.lua b/Task/Euclid-Mullin-sequence/Lua/euclid-mullin-sequence-1.lua index d8ed7d4919..6213d7fddf 100644 --- a/Task/Euclid-Mullin-sequence/Lua/euclid-mullin-sequence-1.lua +++ b/Task/Euclid-Mullin-sequence/Lua/euclid-mullin-sequence-1.lua @@ -4,9 +4,11 @@ do io.write( "2" ) local product = 2 - for i = 2, 9 do - local nextV, p, found = product + 1, 3, false + for i = 2, 8 do + local nextV = product + 1 -- find the first prime factor of nextV + local p = 3 + local found = false while p * p <= nextV and not found do found = nextV % p == 0 if not found then p = p + 2 end diff --git a/Task/Euclid-Mullin-sequence/Oberon-07/euclid-mullin-sequence.oberon b/Task/Euclid-Mullin-sequence/Oberon-07/euclid-mullin-sequence.oberon deleted file mode 100644 index 178ae1c826..0000000000 --- a/Task/Euclid-Mullin-sequence/Oberon-07/euclid-mullin-sequence.oberon +++ /dev/null @@ -1,29 +0,0 @@ -MODULE EuclidMullinSequence; (* find elements of the Euclid-Mullin sequence: *) - IMPORT Out; (* starting from 2, the next element is the smallest *) - (* prime factor of 1 + the product of the previous *) - (* elements *) - - (* assuming INTEGER is 32-bit, we should be able to *) - (* find 8 elements, before the product overflows *) - - VAR product, i, nextV, p : INTEGER; - found : BOOLEAN; - -BEGIN - - Out.String( "2" ); - product := 2; - FOR i := 2 TO 8 DO - nextV := product + 1; - (* find the first prime factor of nextV *) - p := 3; - found := FALSE; - WHILE ~ found & ( p * p <= nextV ) DO - found := nextV MOD p = 0; - IF ~ found THEN INC( p, 2 ) END - END; - IF found THEN nextV := p END; - Out.String( " " );Out.Int( nextV, 0 ); - product := product * nextV - END -END EuclidMullinSequence. diff --git a/Task/Euclid-Mullin-sequence/Oberon/euclid-mullin-sequence.oberon b/Task/Euclid-Mullin-sequence/Oberon/euclid-mullin-sequence.oberon deleted file mode 100644 index b735a6b4c2..0000000000 --- a/Task/Euclid-Mullin-sequence/Oberon/euclid-mullin-sequence.oberon +++ /dev/null @@ -1,29 +0,0 @@ -MODULE EuclidMullinSequence; (* find elements of the Euclid-Mullin sequence: *) - IMPORT Out; (* starting from 2, the next element is the smallest *) - (* prime factor of 1 + the product of the previous *) - (* elements *) - - (* assuming LONGINT is 64-bit, we should be able to *) - (* find 9 elements, before the product overflows *) - - VAR product, i, nextV, p : LONGINT; - found : BOOLEAN; - -BEGIN - - Out.String( "2" ); - product := 2; - FOR i := 2 TO 9 DO - nextV := product + 1; - (* find the first prime factor of nextV *) - p := 3; - found := FALSE; - WHILE ~ found & ( p * p <= nextV ) DO - found := nextV MOD p = 0; - IF ~ found THEN INC( p, 2 ) END - END; - IF found THEN nextV := p END; - Out.String( " " );Out.Int( nextV, 0 ); - product := product * nextV - END -END EuclidMullinSequence. diff --git a/Task/Euclid-Mullin-sequence/PascalABC.NET/euclid-mullin-sequence.pas b/Task/Euclid-Mullin-sequence/PascalABC.NET/euclid-mullin-sequence.pas deleted file mode 100644 index 38999023a9..0000000000 --- a/Task/Euclid-Mullin-sequence/PascalABC.NET/euclid-mullin-sequence.pas +++ /dev/null @@ -1,29 +0,0 @@ -function smallest_prime_factor(number: biginteger): biginteger; -begin - var divisor := 3bi; - repeat - if (number mod divisor) = 0 then - begin - result := divisor; - exit - end; - divisor += 2; - until divisor * divisor > number; - result := number; -end; - -function euclid_mullin(): sequence of biginteger; -begin - var product := 2bi; - yield product; - while true do - begin - var smallest_prime := smallest_prime_factor(product + 1); - product *= smallest_prime; - yield smallest_prime; - end; -end; - -begin - euclid_mullin.take(16).println; -end. diff --git a/Task/Euclid-Mullin-sequence/Pluto/euclid-mullin-sequence.pluto b/Task/Euclid-Mullin-sequence/Pluto/euclid-mullin-sequence.pluto deleted file mode 100644 index 9e6b45651e..0000000000 --- a/Task/Euclid-Mullin-sequence/Pluto/euclid-mullin-sequence.pluto +++ /dev/null @@ -1,22 +0,0 @@ --- find elements of the Euclid-Mullin sequence: starting from 2, --- the next element is the smallest prime factor of 1 + the product --- of the previous elements -do - local bigint = require( "pluto:bigint" ) -- use the standard bigint library - - io.write( "2" ) - local b0 , b1 , b2 , b3 - = new bigint( 0 ), new bigint( 1 ), new bigint( 2 ), new bigint( 3 ) - local product = new bigint( 2 ) - for _ = 2, 16 do - local nextV, p, found = product + b1, b3, false - -- find the first prime factor of nextV - while p * p <= nextV and not found do - found = nextV % p == b0 - if not found then p += b2 end - end - if found then nextV = p end - io.write( $" { nextV:tostring() }" ) - product *= nextV - end -end diff --git a/Task/Euclid-Mullin-sequence/R/euclid-mullin-sequence.r b/Task/Euclid-Mullin-sequence/R/euclid-mullin-sequence.r deleted file mode 100644 index d81fa0cb94..0000000000 --- a/Task/Euclid-Mullin-sequence/R/euclid-mullin-sequence.r +++ /dev/null @@ -1,10 +0,0 @@ -library(gmp) - -next_term <- function(v) min(factorize(prod(v)+1)) -euclid_mullin <- function(n){ - v <- as.bigz(2) - replicate(n-1, v <<- c(v, next_term(v))) - print(v, initLine=FALSE) -} - -euclid_mullin(16) diff --git a/Task/Euclid-Mullin-sequence/REXX/euclid-mullin-sequence.rexx b/Task/Euclid-Mullin-sequence/REXX/euclid-mullin-sequence.rexx deleted file mode 100644 index c681066ff1..0000000000 --- a/Task/Euclid-Mullin-sequence/REXX/euclid-mullin-sequence.rexx +++ /dev/null @@ -1,22 +0,0 @@ --- 23 Aug 2025 -include Setting - -say 'EUCLID-MULLIN SEQUENCE' -say version -say -numeric digits 100 -call Euclids 16 -call Task 16 -say Format(Time('e'),,3) 'seconds' -exit - -Task: -arg xx -say 'The first' xx 'Euclid-Mullin numbers are:' -do i = 1 to xx - call Charout ,eucl.i' ' -end -say -return - -include Math diff --git a/Task/Euler-method/Ada/euler-method-1.adb b/Task/Euler-method/Ada/euler-method-1.ada similarity index 100% rename from Task/Euler-method/Ada/euler-method-1.adb rename to Task/Euler-method/Ada/euler-method-1.ada diff --git a/Task/Euler-method/Ada/euler-method-2.adb b/Task/Euler-method/Ada/euler-method-2.ada similarity index 100% rename from Task/Euler-method/Ada/euler-method-2.adb rename to Task/Euler-method/Ada/euler-method-2.ada diff --git a/Task/Euler-method/Ada/euler-method-3.adb b/Task/Euler-method/Ada/euler-method-3.ada similarity index 100% rename from Task/Euler-method/Ada/euler-method-3.adb rename to Task/Euler-method/Ada/euler-method-3.ada diff --git a/Task/Euler-method/BASIC256/euler-method.basic b/Task/Euler-method/BASIC256/euler-method.basic index 54074d0bd6..5ff323099b 100644 --- a/Task/Euler-method/BASIC256/euler-method.basic +++ b/Task/Euler-method/BASIC256/euler-method.basic @@ -1,17 +1,17 @@ print "Time "; tiempo = 0.0 while tiempo <= 100.1 - print rjust(string(tiempo), 5); " "; - tiempo += 10.0 + print rjust(string(tiempo), 5); " "; + tiempo += 10.0 end while print print "Dif eq "; tiempo = 0.0 while tiempo <= 100.1 - temperatura = 20.0 + (100.0-20.0) * exp(-0.07*tiempo) - print rjust(left(string(temperatura), 5), 5); " "; - tiempo += 10.0 + temperatura = 20.0 + (100.0-20.0) * exp(-0.07*tiempo) + print rjust(left(string(temperatura), 5), 5); " "; + tiempo += 10.0 end while print @@ -21,14 +21,14 @@ call Euler(10) end subroutine Euler(paso) - tiempo = 0 - temperatura = 100.0 - print "Step "; rjust(string(paso), 2); " "; + tiempo = 0 + temperatura = 100.0 + print "Step "; rjust(string(paso), 2); " "; - while tiempo <= 100 - if (tiempo mod 10) = 0 then print rjust(left(string(temperatura), 5), 5); " "; - temperatura += float(paso) * (-0.07*(temperatura-20.0)) - tiempo += paso - end while - print + while tiempo <= 100 + if (tiempo mod 10) = 0 then print rjust(left(string(temperatura), 5), 5); " "; + temperatura += float(paso) * (-0.07*(temperatura-20.0)) + tiempo += paso + end while + print end subroutine diff --git a/Task/Euler-method/C-sharp/euler-method.cs b/Task/Euler-method/C-sharp/euler-method.cs index 0491640ac8..9b7d1f041f 100644 --- a/Task/Euler-method/C-sharp/euler-method.cs +++ b/Task/Euler-method/C-sharp/euler-method.cs @@ -2,37 +2,37 @@ using System; namespace prog { - class MainClass - { - const float T0 = 100f; - const float TR = 20f; - const float k = 0.07f; - readonly static float[] delta_t = {2.0f,5.0f,10.0f}; - const int n = 100; - - public delegate float func(float t); - static float NewtonCooling(float t) - { - return -k * (t-TR); - } - - public static void Main (string[] args) - { - func f = new func(NewtonCooling); - for(int i=0; i x2 and x_start > x2) - ) - from cte -); - -create or replace function euler(x_start, y_start, x2, h) as ( - select last(y order by x) from euler_method(x_start, y_start, x2, h) -); - -## Example: -create or replace function cooling(x,y) as - -0.07 * (y - 20); - -select h, euler(0,100, 100, h) from unnest([1,2,5,10,20]) _(h); diff --git a/Task/Euler-method/EasyLang/euler-method.easy b/Task/Euler-method/EasyLang/euler-method.easy index db168de994..2103cb54ff 100644 --- a/Task/Euler-method/EasyLang/euler-method.easy +++ b/Task/Euler-method/EasyLang/euler-method.easy @@ -1,38 +1,39 @@ TR = 20 K = -0.07 +func analytic T0 t . + return TR + (T0 - TR) * pow 2.71828 (K * t) +. ytxt = 95 +proc draw_analytic a b . . + color 009 + move 80 ytxt + ytxt -= 5 + text "analytic" + for t = a to b + line t analytic 100 t + . +. drawgrid -glinewidth 0.3 -gtextsize 3 +linewidth 0.3 +textsize 3 +draw_analytic 0 100 # func newton_cooling temp . return K * (temp - TR) . -proc draw_euler y t t2 step col . - gcolor col - gtext 80 ytxt "step: " & step +proc draw_euler y0 a b step col . . + color col + move 80 ytxt ytxt -= 5 - gpenup - while t <= t2 - glineto t y + text "step: " & step + t = a + y = y0 + while t < b + line t y t += step y += step * newton_cooling y . . -func analytic T0 t . - return TR + (T0 - TR) * pow 2.71828 (K * t) -. -proc draw_analytic a b . - gcolor 009 - gtext 80 ytxt "analytic" - ytxt -= 5 - gpenup - for t = a to b - y = analytic 100 t - glineto t y - . -. draw_euler 100 0 100 10 900 draw_euler 100 0 100 5 555 draw_euler 100 0 100 2 090 -draw_analytic 0 100 diff --git a/Task/Euler-method/Elixir/euler-method.ex b/Task/Euler-method/Elixir/euler-method.elixir similarity index 100% rename from Task/Euler-method/Elixir/euler-method.ex rename to Task/Euler-method/Elixir/euler-method.elixir diff --git a/Task/Euler-method/Erlang/euler-method.erl b/Task/Euler-method/Erlang/euler-method.erl index 4bf8857e9e..4f1549d0c4 100644 --- a/Task/Euler-method/Erlang/euler-method.erl +++ b/Task/Euler-method/Erlang/euler-method.erl @@ -2,37 +2,37 @@ -export([main/0, euler/5]). cooling(_Time, Temperature) -> - (-0.07)*(Temperature-20). + (-0.07)*(Temperature-20). euler(_, Y, T, _, End) when End == T -> - io:fwrite("\n"), - Y; + io:fwrite("\n"), + Y; euler(Func, Y, T, Step, End) -> - if - T rem 10 == 0 -> - io:fwrite("~.3f ",[float(Y)]); - true -> - ok - end, - euler(Func, Y + Step * Func(T, Y), T + Step, Step, End). + if + T rem 10 == 0 -> + io:fwrite("~.3f ",[float(Y)]); + true -> + ok + end, + euler(Func, Y + Step * Func(T, Y), T + Step, Step, End). analytic(T, End) when T == End -> - io:fwrite("\n"), - T; + io:fwrite("\n"), + T; analytic(T, End) -> - Y = (20 + 80 * math:exp(-0.07 * T)), - io:fwrite("~.3f ", [Y]), - analytic(T+10, End). + Y = (20 + 80 * math:exp(-0.07 * T)), + io:fwrite("~.3f ", [Y]), + analytic(T+10, End). main() -> - io:fwrite("Analytic:\n"), - analytic(0, 100), - io:fwrite("Step 2:\n"), - euler(fun cooling/2, 100, 0, 2, 100), - io:fwrite("Step 5:\n"), - euler(fun cooling/2, 100, 0, 5, 100), - io:fwrite("Step 10:\n"), - euler(fun cooling/2, 100, 0, 10, 100), - ok. + io:fwrite("Analytic:\n"), + analytic(0, 100), + io:fwrite("Step 2:\n"), + euler(fun cooling/2, 100, 0, 2, 100), + io:fwrite("Step 5:\n"), + euler(fun cooling/2, 100, 0, 5, 100), + io:fwrite("Step 10:\n"), + euler(fun cooling/2, 100, 0, 10, 100), + ok. diff --git a/Task/Euler-method/FutureBasic/euler-method.basic b/Task/Euler-method/FutureBasic/euler-method.basic deleted file mode 100644 index dfb5d86659..0000000000 --- a/Task/Euler-method/FutureBasic/euler-method.basic +++ /dev/null @@ -1,33 +0,0 @@ -include "NSLog.incl" - -double local fn Cooling( t as double, temp as double ) - return -0.07 * (temp - 20 ) -end fn = 0.0 - -void local fn Euler( y as double, stepSize as int, endTime as double ) - int t = 0 - NSLog( @"\n Step %2d: \b", stepSize ) - while ( t <= endTime ) - if ( t % 10 == 0 ) then NSLog( @" %7.3f \b", y ) - y += stepSize * fn Cooling( t, y ) - t += stepSize - wend -end fn - -void local fn Analytic - NSLog( @" Time: \b" ) - for int t1 = 0 to 100 step 10 - NSLog( @" %8d\b", t1 ) - next - NSLog( @"\nAnalytic: \b" ) - for int t2 = 0 to 100 step 10 - NSLog( @"%9.3f\b", 20 + 80 * exp(-0.07 * t2 ) ) - next -end fn - -fn Analytic -fn Euler( 100.0, 2.0, 100.0 ) -fn Euler( 100.0, 5.0, 100.0 ) -fn Euler( 100.0, 10.0, 100.0 ) - -HandleEvents diff --git a/Task/Euler-method/JavaScript/euler-method.js b/Task/Euler-method/JavaScript/euler-method.js index edff7b850d..69666fe2e1 100644 --- a/Task/Euler-method/JavaScript/euler-method.js +++ b/Task/Euler-method/JavaScript/euler-method.js @@ -1,29 +1,29 @@ // Function that takes differential-equation, initial condition, // ending x, and step size as parameters function eulersMethod(f, x1, y1, x2, h) { - // Header - console.log("\tX\t|\tY\t"); - console.log("------------------------------------"); + // Header + console.log("\tX\t|\tY\t"); + console.log("------------------------------------"); - // Initial Variables - var x=x1, y=y1; + // Initial Variables + var x=x1, y=y1; - // While we're not done yet - // Both sides of the OR let you do Euler's Method backwards - while ((xx2 && x1>x2)) { - // Print what we have - console.log("\t" + x + "\t|\t" + y); + // While we're not done yet + // Both sides of the OR let you do Euler's Method backwards + while ((xx2 && x1>x2)) { + // Print what we have + console.log("\t" + x + "\t|\t" + y); - // Calculate the next values - y += h*f(x, y) - x += h; - } + // Calculate the next values + y += h*f(x, y) + x += h; + } - return y; + return y; } function cooling(x, y) { - return -0.07 * (y-20); + return -0.07 * (y-20); } eulersMethod(cooling, 0, 100, 100, 10); diff --git a/Task/Euler-method/Jq/euler-method-1.jq b/Task/Euler-method/Jq/euler-method-1.jq index 3121a16965..4036e91460 100644 --- a/Task/Euler-method/Jq/euler-method-1.jq +++ b/Task/Euler-method/Jq/euler-method-1.jq @@ -7,7 +7,7 @@ def euler_method(df; x1; y1; x2; h): | [x1, y1] | recurse( if ((.[0] < x2 and x1 < x2) or (.[0] > x2 and x1 > x2)) then - [ (.[0] + $h), (.[1] + $h*df) ] + [ (.[0] + $h), (.[1] + $h*df) ] else empty end ) | .[1] ; diff --git a/Task/Euler-method/Jq/euler-method-2.jq b/Task/Euler-method/Jq/euler-method-2.jq index dad3672557..cbb1cefb18 100644 --- a/Task/Euler-method/Jq/euler-method-2.jq +++ b/Task/Euler-method/Jq/euler-method-2.jq @@ -4,7 +4,7 @@ def euler_solution(df; x1; y1; x2; h): | [x1, y1] | recursion( if ((.[0] < x2 and x1 < x2) or (.[0] > x2 and x1 > x2)) then - [ (.[0] + $h), (.[1] + $h*df) ] + [ (.[0] + $h), (.[1] + $h*df) ] else empty end ) | .[1] ; diff --git a/Task/Euler-method/Julia/euler-method.jl b/Task/Euler-method/Julia/euler-method.julia similarity index 100% rename from Task/Euler-method/Julia/euler-method.jl rename to Task/Euler-method/Julia/euler-method.julia diff --git a/Task/Euler-method/K/euler-method.k b/Task/Euler-method/K/euler-method.k deleted file mode 100644 index 1bb3a2cd8c..0000000000 --- a/Task/Euler-method/K/euler-method.k +++ /dev/null @@ -1,15 +0,0 @@ -// make global variables with :: because while is only locally scoped -tn1::100 -tn::100 -// to store solution -sol::() -// these are constant, so only local scope -k:-0.07 -time:100 -steps:10 -h:time%steps -tr:20 -// applying x+h to 0 outside to end while loop -// bind to a variable to surpress output -var: {x<100}{tn1::tn+h*k*(tn-tr);sol::sol,tn;tn::tn1;x+h}\0 -sol diff --git a/Task/Euler-method/Kotlin/euler-method.kts b/Task/Euler-method/Kotlin/euler-method.kotlin similarity index 100% rename from Task/Euler-method/Kotlin/euler-method.kts rename to Task/Euler-method/Kotlin/euler-method.kotlin diff --git a/Task/Euler-method/Lambdatalk/euler-method.lambdatalk b/Task/Euler-method/Lambdatalk/euler-method.lambdatalk index 8f70a445a6..62f2efe8fb 100644 --- a/Task/Euler-method/Lambdatalk/euler-method.lambdatalk +++ b/Task/Euler-method/Lambdatalk/euler-method.lambdatalk @@ -14,14 +14,14 @@ {eulersMethod cooling 100 0 100 10} -> - 0 100 - 10 44 - 20 27.2 - 30 22.16 - 40 20.648 - 50 20.194 - 60 20.058 - 70 20.017 - 80 20.005 - 90 20.002 - 100 20 + 0 100 + 10 44 + 20 27.2 + 30 22.16 + 40 20.648 + 50 20.194 + 60 20.058 + 70 20.017 + 80 20.005 + 90 20.002 + 100 20 diff --git a/Task/Euler-method/Lua/euler-method.lua b/Task/Euler-method/Lua/euler-method.lua index e72469b893..bd34fd6cc1 100644 --- a/Task/Euler-method/Lua/euler-method.lua +++ b/Task/Euler-method/Lua/euler-method.lua @@ -10,8 +10,8 @@ NewtonCooling = function( t ) return -k * ( t - TR ) end function Euler( f, y0, n, h ) local y = y0 for x = 0, n, h do - print( "", x, y ) - y = y + h * f( y ) + print( "", x, y ) + y = y + h * f( y ) end end diff --git a/Task/Euler-method/Maple/euler-method-2.maple b/Task/Euler-method/Maple/euler-method-2.maple index 3c782c1955..491e6ef422 100644 --- a/Task/Euler-method/Maple/euler-method-2.maple +++ b/Task/Euler-method/Maple/euler-method-2.maple @@ -1,16 +1,16 @@ f := y -> (-0.07) * (y - 20): EulerMethod := proc(f, start_time, end_time, y0, h) # y0: initial value #h: step size - local cur, y, rate: - cur := start_time; - y := y0; - while cur <= end_time do - printf("%g %g\n", cur, y); - cur := cur + h; - rate := f(y); - y := y + h * rate; - end do; - return y; + local cur, y, rate: + cur := start_time; + y := y0; + while cur <= end_time do + printf("%g %g\n", cur, y); + cur := cur + h; + rate := f(y); + y := y + h * rate; + end do; + return y; end proc: # step size = 2 diff --git a/Task/Euler-method/OCaml/euler-method-1.ml b/Task/Euler-method/OCaml/euler-method-1.ocaml similarity index 100% rename from Task/Euler-method/OCaml/euler-method-1.ml rename to Task/Euler-method/OCaml/euler-method-1.ocaml diff --git a/Task/Euler-method/OCaml/euler-method-2.ml b/Task/Euler-method/OCaml/euler-method-2.ocaml similarity index 100% rename from Task/Euler-method/OCaml/euler-method-2.ml rename to Task/Euler-method/OCaml/euler-method-2.ocaml diff --git a/Task/Euler-method/Odin/euler-method.odin b/Task/Euler-method/Odin/euler-method.odin deleted file mode 100644 index b8f110cd72..0000000000 --- a/Task/Euler-method/Odin/euler-method.odin +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import "core:fmt" -import "core:math" - -ivp_euler ::proc(y:f32,step:i32,end:i32){ - - y:=y - t:=i32(0) - - for ;t<=end;t+=step{ - if(t%10==0){fmt.printfln("%.3f", y)} - y+=f32(step)*cooling(f32(t),y) - } -} - -cooling :: proc(t:f32,temp:f32)-> f32{ - return -0.07* (temp-20.0) -} - -analytic :: proc(){ - for t := 0; t <= 100; t += 10{ - fmt.printfln("%.3f",20+80*math.exp_f32(f32(-0.07)*f32(t))) - } -} - -main :: proc() { - fmt.println("Step: 2 Seconds") - ivp_euler(100.0, 2,100) - fmt.println("Step: 5 Seconds") - ivp_euler(100.0, 5, 100) - fmt.println("Step: 10 Seconds") - ivp_euler(100.0, 10, 100) - fmt.println("Analytic") - analytic() -} diff --git a/Task/Euler-method/Pascal/euler-method.pas b/Task/Euler-method/Pascal/euler-method.pas index 598e3d480b..52a98641e0 100644 --- a/Task/Euler-method/Pascal/euler-method.pas +++ b/Task/Euler-method/Pascal/euler-method.pas @@ -3,47 +3,47 @@ PROGRAM Euler; TYPE TNewtonCooling = FUNCTION (t: REAL) : REAL; -CONST T0 : REAL = 100.0; -CONST TR : REAL = 20.0; -CONST k : REAL = 0.07; -CONST time : INTEGER = 100; -CONST step : INTEGER = 10; -CONST dt : ARRAY[0..3] of REAL = (1.0,2.0,5.0,10.0); +CONST T0 : REAL = 100.0; +CONST TR : REAL = 20.0; +CONST k : REAL = 0.07; +CONST time : INTEGER = 100; +CONST step : INTEGER = 10; +CONST dt : ARRAY[0..3] of REAL = (1.0,2.0,5.0,10.0); -VAR i : INTEGER; +VAR i : INTEGER; FUNCTION NewtonCooling(t: REAL) : REAL; - BEGIN - NewtonCooling := -k * (t-TR); - END; - + BEGIN + NewtonCooling := -k * (t-TR); + END; + PROCEDURE Euler(F: TNewtonCooling; y, h : REAL; n: INTEGER); - VAR i: INTEGER = 0; - BEGIN - WRITE('dt=',trunc(h):2,':'); - REPEAT - IF (i mod 10 = 0) THEN WRITE(' ',y:2:3); - INC(i,trunc(h)); - y := y + h * F(y); - UNTIL (i >= n); - WRITELN; - END; + VAR i: INTEGER = 0; + BEGIN + WRITE('dt=',trunc(h):2,':'); + REPEAT + IF (i mod 10 = 0) THEN WRITE(' ',y:2:3); + INC(i,trunc(h)); + y := y + h * F(y); + UNTIL (i >= n); + WRITELN; + END; PROCEDURE Sigma; - VAR t: INTEGER = 0; - BEGIN - WRITE('Sigma:'); - REPEAT - WRITE(' ',(20 + 80 * exp(-0.07 * t)):2:3); - INC(t,step); - UNTIL (t>=time); - WRITELN; - END; + VAR t: INTEGER = 0; + BEGIN + WRITE('Sigma:'); + REPEAT + WRITE(' ',(20 + 80 * exp(-0.07 * t)):2:3); + INC(t,step); + UNTIL (t>=time); + WRITELN; + END; BEGIN - WRITELN('Newton cooling function: Analytic solution (Sigma) with 3 Euler approximations.'); - WRITELN('Time: ',0:7,10:7,20:7,30:7,40:7,50:7,60:7,70:7,80:7,90:7); - Sigma; - FOR i := 1 to 3 DO - Euler(NewtonCooling,T0,dt[i],time); + WRITELN('Newton cooling function: Analytic solution (Sigma) with 3 Euler approximations.'); + WRITELN('Time: ',0:7,10:7,20:7,30:7,40:7,50:7,60:7,70:7,80:7,90:7); + Sigma; + FOR i := 1 to 3 DO + Euler(NewtonCooling,T0,dt[i],time); END. diff --git a/Task/Euler-method/PascalABC.NET/euler-method.pas b/Task/Euler-method/PascalABC.NET/euler-method.pas deleted file mode 100644 index 474986e8f7..0000000000 --- a/Task/Euler-method/PascalABC.NET/euler-method.pas +++ /dev/null @@ -1,31 +0,0 @@ -procedure euler(f: (real) -> real; y0, a, b, h: real); -begin - var (t, y) := (a, y0); - write(' Step', h:3, ':'); - while t <= b do - begin - if integer(t) mod 10 = 0 then write(y:8:3); - t += h; - y += h * f(y); - end; - writeln; -end; - -procedure analytic(); -begin - write(' Time:'); - for var t := 0 to 100 step 10 do write(t:8); - writeln; - write('Analytic:'); - for var t := 0 to 100 step 10 do - write(20.0 + 80.0 * exp(-0.07 * t):8:3); - println(); -end; - -function newtoncooling(temp: real): real := -0.07 * (temp - 20); - -begin -analytic; -foreach var i in |2, 5, 10| do - euler(newtoncooling, 100.0, 0.0, 100.0, i) -end. diff --git a/Task/Euler-method/Pluto/euler-method.pluto b/Task/Euler-method/Pluto/euler-method.pluto deleted file mode 100644 index f0d8207f4e..0000000000 --- a/Task/Euler-method/Pluto/euler-method.pluto +++ /dev/null @@ -1,25 +0,0 @@ -local fmt = require "fmt" - -local function euler(f, y, step, finish) - fmt.write(" Step %2d: ", step) - for t = 0, finish, step do - if t % 10 == 0 then fmt.write(" %7.3f", y) end - y += step * f(y) - end - print() -end - -local function analytic() - io.write(" Time: ") - for t = 0, 100, 10 do fmt.write(" %7d", t) end - io.write("\nAnalytic: ") - for t = 0, 100, 10 do - fmt.write(" %7.3f", 20 + 80 * math.exp(-0.07 * t)) - end - print() -end - -local cooling = |temp| -> -0.07 * (temp - 20) - -analytic() -for {2, 5, 10} as i do euler(cooling, 100, i, 100) end diff --git a/Task/Euler-method/PowerShell/euler-method.ps1 b/Task/Euler-method/PowerShell/euler-method.psh similarity index 100% rename from Task/Euler-method/PowerShell/euler-method.ps1 rename to Task/Euler-method/PowerShell/euler-method.psh diff --git a/Task/Euler-method/Python/euler-method.py b/Task/Euler-method/Python/euler-method.py index ff0bcc8723..1c00e47cfe 100644 --- a/Task/Euler-method/Python/euler-method.py +++ b/Task/Euler-method/Python/euler-method.py @@ -1,11 +1,11 @@ def euler(f,y0,a,b,h): - t,y = a,y0 - while t <= b: - print "%6.3f %6.3f" % (t,y) - t += h - y += h * f(t,y) + t,y = a,y0 + while t <= b: + print "%6.3f %6.3f" % (t,y) + t += h + y += h * f(t,y) def newtoncooling(time, temp): - return -0.07 * (temp - 20) + return -0.07 * (temp - 20) euler(newtoncooling,100,0,100,10) diff --git a/Task/Euler-method/Q/euler-method.q b/Task/Euler-method/Q/euler-method.q deleted file mode 100644 index a788e246d6..0000000000 --- a/Task/Euler-method/Q/euler-method.q +++ /dev/null @@ -1,10 +0,0 @@ -t:0 -time:100 -k:-0.07 -tr:20 -sol:() -steps:10 -h:time%steps -tn:100 -while [t xn - if x//10 = 0 then - call Show x,y - y+=dx*Dy(y); x+=dx -end -say -return - -Show: --- Display a line -procedure expose Memo. -arg xx,yy -yt=True(xx) -say Format(xx,3,0) Format(yy,3,7) Format(yt,3,7), - Left(Std(Abs(yy-yt)),9) Left(Std(Abs(yy/yt-1)),9) -return - -Dy: --- Differential equation -procedure -arg yy -return -0.07*(yy-20) - -True: --- Real solution -procedure expose Memo. -arg xx -return 20+(100-20)*Exp(-0.07*xx) - -include Math +/*REXX pgm solves example of Newton's cooling law via Euler's method (diff. step sizes).*/ +e=2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138 +numeric digits length(e) - length(.) /*use the number of decimal digits in E*/ +parse arg Ti Tr cc tt ss /*obtain optional arguments from the CL*/ +if Ti='' | Ti="," then Ti= 100 /*given? Default: initial temp in ºC.*/ +if Tr='' | Tr="," then Tr= 20 /* " " room " " " */ +if cc='' | cc="," then cc= 0.07 /* " " cooling constant. */ +if tt='' | tt="," then tt= 100 /* " " total time seconds. */ +if ss='' | ss="," then ss= 2 5 10 /* " " the step sizes. */ +@= '═' /*the character used in title separator*/ + do sSize=1 for words(ss); say; say; say center('time in' , 11) + say center('seconds' , 11, @) center('Euler method', 16, @) , + center('analytic', 18, @) center('difference' , 14, @) + $=Ti; inc= word(ss, sSize) /*the 1st value; obtain the increment.*/ + do t=0 to Ti by inc /*step through calculations by the inc.*/ + a= format(Tr + (Ti-Tr)/exp(cc*t),6,10) /*calculate the analytic (exact) value.*/ + say center(t,11) format($,6,3) 'ºC ' a "ºC" format(abs(a-$)/a*100,6,2) '%' + $= $ + inc * cc * (Tr-$) /*calc. next value via Euler's method. */ + end /*t*/ + end /*sSize*/ +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +exp: procedure expose e; arg x; ix= x%1; if abs(x-ix)>.5 then ix=ix+sign(x); x= x-ix; z=1 + _=1; w=1; do j=1; _= _*x/j; z= (z+_)/1; if z==w then leave; w=z + end /*j*/; if z\==0 then z= e**ix * z; return z diff --git a/Task/Euler-method/Rebol/euler-method.rebol b/Task/Euler-method/Rebol/euler-method.rebol deleted file mode 100644 index 3fbd56d1cc..0000000000 --- a/Task/Euler-method/Rebol/euler-method.rebol +++ /dev/null @@ -1,34 +0,0 @@ -Rebol [ - title: "Rosetta code: Euler method" - file: %Euler_method.r3 - url: https://rosettacode.org/wiki/Euler_method -] - -euler: func[ - "Euler's method for Newton's cooling law, with formatted comparison" - step [integer!] "time step in seconds" - precision [decimal!] "rounding granularity for printed numbers" -][ - print ["^/STEP:" step] - print "Time Euler Analytic" - print "-------------------------" - - ;; Initialize: - ;; b: upper time bound (seconds) — here we reuse the initial temperature value 100 - ;; y: the current Euler-approximated temperature; initial condition T(0) = 100 - b: y: 100 - for time 0 b step [ - printf [-3 " | " 9 "| "] reduce [ - time - round/to y precision - round/to (20 + (80 * exp (-0.07 * time))) precision - ] - ;; Euler step update: - ;; This applies the discrete forward Euler update using the ODE's RHS - y: y + (step * (-0.07 * (y - 20))) - ] -] -;; Run three experiments with different step sizes -euler 2 0.0001 -euler 5 0.0001 -euler 10 0.0001 diff --git a/Task/Euler-method/Rust/euler-method.rs b/Task/Euler-method/Rust/euler-method.rust similarity index 100% rename from Task/Euler-method/Rust/euler-method.rs rename to Task/Euler-method/Rust/euler-method.rust diff --git a/Task/Euler-method/SequenceL/euler-method.sequencel b/Task/Euler-method/SequenceL/euler-method.sequencel index c795f7cb74..8c3703f0a3 100644 --- a/Task/Euler-method/SequenceL/euler-method.sequencel +++ b/Task/Euler-method/SequenceL/euler-method.sequencel @@ -6,20 +6,20 @@ TR := 20.0; k := 0.07; main(args(2)) := - let - results[i] := euler(newtonCooling, T0, 100, stringToInt(args[i]), 0, "delta_t = " ++ args[i]); - in - delimit(results, '\n'); + let + results[i] := euler(newtonCooling, T0, 100, stringToInt(args[i]), 0, "delta_t = " ++ args[i]); + in + delimit(results, '\n'); newtonCooling(t) := -k * (t - TR); euler: (float -> float) * float * int * int * int * char(1) -> char(1); euler(f, y, n, h, x, output(1)) := - let - newOutput := output ++ "\n\t" ++ intToString(x) ++ "\t" ++ floatToString(y, 3); - newY := y + h * f(y); - newX := x + h; - in - output when x > n - else - euler(f, newY, n, h, newX, newOutput); + let + newOutput := output ++ "\n\t" ++ intToString(x) ++ "\t" ++ floatToString(y, 3); + newY := y + h * f(y); + newX := x + h; + in + output when x > n + else + euler(f, newY, n, h, newX, newOutput); diff --git a/Task/Euler-method/Smalltalk/euler-method.st b/Task/Euler-method/Smalltalk/euler-method.st index 52f6dd908b..7dd18f966b 100644 --- a/Task/Euler-method/Smalltalk/euler-method.st +++ b/Task/Euler-method/Smalltalk/euler-method.st @@ -1,13 +1,13 @@ ODESolver>>eulerOf: f init: y0 from: a to: b step: h - | t y | - t := a. - y := y0. - [ t < b ] - whileTrue: [ - Transcript - show: t asString, ' ' , (y printShowingDecimalPlaces: 3); - cr. - t := t + h. - y := y + (h * (f value: t value: y)) ] + | t y | + t := a. + y := y0. + [ t < b ] + whileTrue: [ + Transcript + show: t asString, ' ' , (y printShowingDecimalPlaces: 3); + cr. + t := t + h. + y := y + (h * (f value: t value: y)) ] ODESolver new eulerOf: [:time :temp| -0.07 * (temp - 20)] init: 100 from: 0 to: 100 step: 10 diff --git a/Task/Euler-method/Tcl/euler-method-1.tcl b/Task/Euler-method/Tcl/euler-method-1.tcl index a7854e5399..6073ea9839 100644 --- a/Task/Euler-method/Tcl/euler-method-1.tcl +++ b/Task/Euler-method/Tcl/euler-method-1.tcl @@ -2,8 +2,8 @@ proc euler {f y0 a b h} { puts "computing $f over \[$a..$b\], step $h" set y [expr {double($y0)}] for {set t [expr {double($a)}]} {$t < $b} {set t [expr {$t + $h}]} { - puts [format "%.3f\t%.3f" $t $y] - set y [expr {$y + $h * double([$f $t $y])}] + puts [format "%.3f\t%.3f" $t $y] + set y [expr {$y + $h * double([$f $t $y])}] } puts "done" } diff --git a/Task/Euler-method/XBasic/euler-method.basic b/Task/Euler-method/XBasic/euler-method.basic deleted file mode 100644 index ad06196e05..0000000000 --- a/Task/Euler-method/XBasic/euler-method.basic +++ /dev/null @@ -1,43 +0,0 @@ -PROGRAM "Euclidean rhythm" -VERSION "0.0001" -IMPORT "xma" - -DECLARE FUNCTION Entry () -DECLARE FUNCTION Euler (paso) - -FUNCTION Entry () - PRINT "Time "; - tiempo! = 0.0 - DO WHILE tiempo! <= 100.1 - PRINT FORMAT$ ("#######", tiempo!); - tiempo! = tiempo! + 10.0 - LOOP - PRINT - - PRINT "Dif eq "; - tiempo! = 0.0 - DO WHILE tiempo! <= 100.1 - temperatura! = 20.0 + (100.0 - 20.0) * EXP(-0.07 * tiempo!) - PRINT FORMAT$ ("####.##", temperatura!); - tiempo! = tiempo! + 10.0 - LOOP - PRINT - - Euler(2) - Euler(5) - Euler(10) -END FUNCTION - -FUNCTION Euler (paso) - tiempo! = 0 - temperatura! = 100.0 - PRINT FORMAT$ ("Step ## ", paso); - - DO WHILE tiempo! <= 100 - IF (tiempo! MOD 10) = 0 THEN PRINT FORMAT$ ("####.##", temperatura!); - temperatura! = temperatura! + SINGLE(paso) * (-0.07 * (temperatura! - 20.0)) - tiempo! = tiempo! + paso - LOOP - PRINT -END FUNCTION -END PROGRAM diff --git a/Task/Eulers-constant-0.5772.../ALGOL-W/eulers-constant-0.5772....alg b/Task/Eulers-constant-0.5772.../ALGOL-W/eulers-constant-0.5772....alg deleted file mode 100644 index 4b49f4d0c2..0000000000 --- a/Task/Eulers-constant-0.5772.../ALGOL-W/eulers-constant-0.5772....alg +++ /dev/null @@ -1,89 +0,0 @@ -begin % calculate Euler's constant, translated from the XPL0 sample % - % which is translated from the C sample % - - long real A, B, H, N2, R, U, V; - long real array S ( 0 :: 1 ); - long real array B2( 0 :: 9 ); - long real Epsilon; - integer K, K2, M, N; - - Epsilon := 1'-6; - - % set output format % - i_w := 1; s_w := 0; r_w := 18; r_d := 15; r_format := "A"; - - write( "From the definition, error 3e-10" ); - N := 400; H := 1.0; - for K1 := 2 until N do H := H + 1.0 / K1; - comment Faster convergence: Negoi, 1997 ; - A := Ln( N + 0.5 + 1.0/( 24.0 * N ) ); - write( "Hn ", H ); - write( "gamma ", H - A ); write( "K = ", N ); write(); - - write( "Sweeney, 1963, error 3e-10" ); - N := 21; S( 0 ) := 0; S( 1 ) := N; - R := N; K:= 1; - while begin K := K + 1; - R := R * N / K; - S( K rem 2 ) := S( K rem 2 ) + R / K; - R > Epsilon - end - do begin end; - write( "gamma ", S( 1 ) - S( 0 ) - ln( N ) );write( "K = ", K ); write(); - - write( "Bailey, 1988" ); - N := 5; A := 1; H := 1; - N2 := 2 ** N; - R := 1; K := 1; - while begin K := K + 1; - R := R * N2 / K; - H := H + 1 / K; - B := A; A := A + R * H; - abs( B - A ) > Epsilon - end - do begin end; - A := A * N2 / Exp(N2); - write( "gamma ", A - N * Ln( 2 ) ); write( "K = ", K ); write(); - - write( "Brent-McMillan, 1980" ); - N := 13; A := -Ln( N ); - B := 1; U := A; V := B; - N2 := N * N; K2 := 0; K := 0; - while begin K2 := K2 + 2 * K + 1; - K := K + 1; - A := A * N2 / K; - B := B * N2 / K2; - A := ( A + B ) / K; - U := U + A; - V := V + B; - abs( A ) > Epsilon - end - do begin end; - write( "gamma ", U / V ); write( "K = ", K ); write(); - - write( "How Euler did it in 1735" ); - comment Bernoulli numbers with even indices; - - B2( 0 ) := 1; B2( 1 ) := 1 / 6; B2( 2 ) := -1 / 30; - B2( 3 ) := 1 / 42; B2( 4 ) := -1 / 30; B2( 5 ) := 5 / 66; - B2( 6 ) := -691 / 2730; B2( 7 ) := 7 / 6; B2( 8 ) := -3617 / 510; - B2( 9 ) := 43867 / 98; - M := 7; N := 10; - comment Nth harmonic number; - H := 1; - for K1 := 2 until N do H := H + 1 / K1; - write( "Hn ", H ); - H := H - Ln( N ); - write( " -ln ", H ); - comment Expansion C:= -digamma(1); - A := -1 / ( 2 * N ); - N2 := N * N; - R := 1; - for K1 := 1 until M do begin - R := R * N2; - A := A + B2( K1 ) / (2 * K1 * R ) - end for_K1; - write( "err ", A ); write( "gamma ", H + A ); write( "K = ", N + M ); - write(); - write( "C = 0.57721566490153286..." ); write() -end. diff --git a/Task/Eulers-constant-0.5772.../AWK/eulers-constant-0.5772....awk b/Task/Eulers-constant-0.5772.../AWK/eulers-constant-0.5772....awk deleted file mode 100644 index cb7e954b31..0000000000 --- a/Task/Eulers-constant-0.5772.../AWK/eulers-constant-0.5772....awk +++ /dev/null @@ -1,12 +0,0 @@ -# syntax: GAWK -f EULERS_CONSTANT.AWK -# converted from LUA -BEGIN { - Hn = 1 - n = 10^8 - for (i=2; i<=n; i++) { - Hn += (1/i) - } - gamma = Hn - log(n) - printf("%.8f\n",gamma) - exit(0) -} diff --git a/Task/Eulers-constant-0.5772.../Ada/eulers-constant-0.5772....adb b/Task/Eulers-constant-0.5772.../Ada/eulers-constant-0.5772....adb deleted file mode 100644 index b27ada83d7..0000000000 --- a/Task/Eulers-constant-0.5772.../Ada/eulers-constant-0.5772....adb +++ /dev/null @@ -1,47 +0,0 @@ -with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions; -with Ada.Numerics.Long_Elementary_Functions; use Ada.Numerics.Long_Elementary_Functions; -with Ada.Text_IO; use Ada.Text_IO; - -procedure Eulers_Constant is - - function Euler_Vacca (Iterations : Integer) return Long_Float is - Gamma : Long_Float := 1.0; - Term : Long_Float; - Power : Long_Integer; - Sign : Long_Float; - begin - Gamma := 0.5 - (1.0 / 3.0); - for I in 2 .. Iterations loop - Power := 2 ** Natural (I); - Sign := -1.0; - Term := 0.0; - for Domin in Power .. (2 * Power - 1) loop - Sign := - (Sign); - Term := Term + Sign / Long_Float (Domin); - end loop; - Gamma := Gamma + (Long_Float (I) * Term); - end loop; - return Gamma; - end Euler_Vacca; - - -- Ada Float type is IEEE 754 32-bit, giving 9 decimal digits of precision - Euler_Castellanos_Float : constant Float := - (((80.0 ** 3) + 92.0) / - (61.0 ** 4)) ** (1.0 / 6.0); - - -- Ada Long_Float type is IEEE 754 32-bit, giving 14 decimal digits of precision - Euler_Castellanos_Long_Float : constant Long_Float := - (990.0 ** 3 - 55.0 ** 3 - 79.0 ** 2 - 16.0) / - 70.0 ** 5; - - Iters : Integer; -begin - Put_Line ("Its. Vacca"); - Iters := 2; - while Iters <= 32 loop - Put_Line (Iters'Image & " " & Euler_Vacca (Iters)'Image); - Iters := Iters + 2; - end loop; - Put_Line ("Castellanos approximation for standard Float (9 digits): " & Euler_Castellanos_Float'Image); - Put_Line ("Castellanos approximation for Long Float (14 digits): " & Euler_Castellanos_Long_Float'Image); -end Eulers_Constant; diff --git a/Task/Eulers-constant-0.5772.../Delphi/eulers-constant-0.5772....delphi b/Task/Eulers-constant-0.5772.../Delphi/eulers-constant-0.5772....delphi new file mode 100644 index 0000000000..d9e8de7c73 --- /dev/null +++ b/Task/Eulers-constant-0.5772.../Delphi/eulers-constant-0.5772....delphi @@ -0,0 +1,39 @@ +function ComputeEuler(N: int64): double; +{Compute Eurler number with N-number of iterations} +var I: integer; +var A: double; +begin +Result:=0; +for I:=1 to N-1 do + Result:=Result + 1 / I; +A:=Ln(N + 0.5 + 1/(24.0*N)); +Result:=Result-A; +end; + + + +procedure ShowEulersNumber(Memo: TMemo); +{Show Euler numbers at various levels of precision} +var Euler,G,A,Error: double; +var N: integer; +const Correct =0.57721566490153286060651209008240243104215933593992; + + procedure ShowEulerError(N: int64); + {Show Euler number and Error} + begin + Euler:=ComputeEuler(N); + Error:=Correct-Euler; + Memo.Lines.Add('N = '+FloatToStrF(N,ffNumber,18,0)); + Memo.Lines.Add('Euler='+FloatToStrF(Euler,ffFixed,18,18)); + Memo.Lines.Add('Error='+FloatToStrF(Error,ffFixed,18,18)); + Memo.Lines.Add(''); + end; + +begin +{Compute Euler number with iterations ranging 10 to 10^9} +for N:=1 to 9 do + begin + ShowEulerError(Trunc(Power(10,N))); + end; + +end; diff --git a/Task/Eulers-constant-0.5772.../Delphi/eulers-constant-0.5772....pas b/Task/Eulers-constant-0.5772.../Delphi/eulers-constant-0.5772....pas deleted file mode 100644 index 3f1952a8f7..0000000000 --- a/Task/Eulers-constant-0.5772.../Delphi/eulers-constant-0.5772....pas +++ /dev/null @@ -1,39 +0,0 @@ -function ComputeEuler(N: int64): double; -{Compute Eurler number with N-number of iterations} -var I: integer; -var A: double; -begin -Result:=0; -for I:=1 to N-1 do - Result:=Result + 1 / I; -A:=Ln(N + 0.5 + 1/(24.0*N)); -Result:=Result-A; -end; - - - -procedure ShowEulersNumber(Memo: TMemo); -{Show Euler numbers at various levels of precision} -var Euler,G,A,Error: double; -var N: integer; -const Correct =0.57721566490153286060651209008240243104215933593992; - - procedure ShowEulerError(N: int64); - {Show Euler number and Error} - begin - Euler:=ComputeEuler(N); - Error:=Correct-Euler; - Memo.Lines.Add('N = '+FloatToStrF(N,ffNumber,18,0)); - Memo.Lines.Add('Euler='+FloatToStrF(Euler,ffFixed,18,18)); - Memo.Lines.Add('Error='+FloatToStrF(Error,ffFixed,18,18)); - Memo.Lines.Add(''); - end; - -begin -{Compute Euler number with iterations ranging 10 to 10^9} -for N:=1 to 9 do - begin - ShowEulerError(Trunc(Power(10,N))); - end; - -end; diff --git a/Task/Eulers-constant-0.5772.../DuckDB/eulers-constant-0.5772....duckdb b/Task/Eulers-constant-0.5772.../DuckDB/eulers-constant-0.5772....duckdb deleted file mode 100644 index fd6a135180..0000000000 --- a/Task/Eulers-constant-0.5772.../DuckDB/eulers-constant-0.5772....duckdb +++ /dev/null @@ -1,21 +0,0 @@ -# Bailey, 1988 -create or replace function bailey(n, eps) as ( - with recursive n2 as (select pow(2, n) as n2), - cte as ( - select 1 as k, 1.0::DOUBLE as r, 1.0::DOUBLE as h, 0.0::DOUBLE as b, 1.0::DOUBLE as a - union all - select - k + 1 as k, - r * (n2 / (k+1)) as r, - h + (1.0 / (k+1)) as h, - a as b, - a + (r * (n2 / (k+1)) * (h + (1.0 / (k+1)))) as a - from cte, n2 - where @(b - a) > eps - ), - a as (select last(a order by k) as a from cte) - select (a * n2 / exp(n2) ) - (n * ln(2)) - from a, n2 -); - -select bailey(5, 1E-6) as gamma; diff --git a/Task/Eulers-constant-0.5772.../EasyLang/eulers-constant-0.5772....easy b/Task/Eulers-constant-0.5772.../EasyLang/eulers-constant-0.5772....easy index 16bd541d9a..343c268ced 100644 --- a/Task/Eulers-constant-0.5772.../EasyLang/eulers-constant-0.5772....easy +++ b/Task/Eulers-constant-0.5772.../EasyLang/eulers-constant-0.5772....easy @@ -6,6 +6,7 @@ fastfunc gethn n . . return hn . +e = 2.718281828459045235 n = 10e8 -numfmt 0 9 -print gethn n - log n 0 +numfmt 9 0 +print gethn n - log10 n / log10 e diff --git a/Task/Eulers-constant-0.5772.../Fortran/eulers-constant-0.5772....f b/Task/Eulers-constant-0.5772.../Fortran/eulers-constant-0.5772....f deleted file mode 100644 index 868106567d..0000000000 --- a/Task/Eulers-constant-0.5772.../Fortran/eulers-constant-0.5772....f +++ /dev/null @@ -1,131 +0,0 @@ -program euler_constant - implicit none - ! Define constants and variables - real(16), parameter :: EULER_GAMMA = 0.57721566490153286_16 - real(16), parameter :: eps = epsilon(1.0e-6_16) - real(16) :: a, b, h, n2, r, u, v - integer :: k, k2, m, n - real(16) :: s(0:1), B2(0:9) - real(16), parameter :: eps_high = eps !1.0e-12_16 - - ! Method 1: From the definition (Negoi, 1997) - write(*, '(a)') "From the definition, err. 3e-10" - n = 400 - h = 1.0_16 - do k = 2, n - h = h + 1.0_16 / k - end do - a = log(real(n, 16) + 0.5_16 + 1.0_16 / (24.0_16 * n)) - write(*, '(a, f18.16)') "Hn ", h - write(*, '(a, f18.16, /, a, i0, /)') "gamma ", h - a, "k = ", n - write(*, '(a, f18.16, /)') "error ", abs(h - a - EULER_GAMMA) - - ! Method 2: Sweeney, 1963 - write(*, '(a)') "Sweeney, 1963, err. idem" - n = 21 - s = [0.0_16, real(n, 16)] - r = real(n, 16) - k = 1 - do - k = k + 1 - r = r * real(n, 16) / k - s(mod(k, 2)) = s(mod(k, 2)) + r / k - if (r <= eps) exit - end do - write(*, '(a, f18.16, /, a, i0, /)') "gamma ", s(1) - s(0) - log(real(n, 16_16)), "k = ", k - write(*, '(a, f18.16, /)') "error ", abs(s(1) - s(0) - log(real(n, 16)) - EULER_GAMMA) - - ! Method 3: Bailey, 1988 - write(*, '(a)') "Bailey, 1988" - n = 5 - a = 1.0_16 - h = 1.0_16 - n2 = 2.0_16 ** n - r = 1.0_16 - k = 1 - do - k = k + 1 - r = r * n2 / k - h = h + 1.0_16 / k - b = a - a = a + r * h - if (abs(b - a) <= eps) exit - end do - a = a * n2 / exp(n2) - write(*, '(a, f18.16, /, a, i0, /)') "gamma ", a - n * log(2.0_16), "k = ", k - write(*, '(a, f18.16, /)') "error ", abs(a - n * log(2.0_16) - EULER_GAMMA) - - ! Method 4: Brent-McMillan, 1980 (original) - write(*, '(a)') "Brent-McMillan, 1980 (original)" - n = 13 - a = -log(real(n, 16)) - b = 1.0_16 - u = a - v = b - n2 = real(n, 16) * n - k2 = 0 - k = 0 - do - k2 = k2 + 2 * k + 1 - k = k + 1 - a = a * n2 / k - b = b * n2 / k2 - a = (a + b) / k - u = u + a - v = v + b - if (abs(a) <= eps) exit - end do - write(*, '(a, f18.16, /, a, i0, /)') "gamma ", u / v, "k = ", k - write(*, '(a, f18.16, /)') "error ", abs(u / v - EULER_GAMMA) - - ! Method 5: Brent-McMillan, 1980 (enhanced for higher precision) - write(*, '(a)') "Brent-McMillan, 1980 (enhanced)" - n = 50 - a = -log(real(n, 16)) - b = 1.0_16 - u = a - v = b - n2 = real(n, 16) * n - k2 = 0 - k = 0 - do - k2 = k2 + 2 * k + 1 - k = k + 1 - a = a * n2 / k - b = b * n2 / k2 - a = (a + b) / k - u = u + a - v = v + b - if (abs(a) <= eps_high) exit - end do - write(*, '(a, f18.16, /, a, i0, /)') "gamma ", u / v, "k = ", k - write(*, '(a, f18.16, /)') "error ", abs(u / v - EULER_GAMMA) - - ! Method 6: Euler's method, 1735 - write(*, '(a)') "How Euler did it in 1735" - B2 = [1.0_16, 1.0_16/6, -1.0_16/30, 1.0_16/42, -1.0_16/30, & - 5.0_16/66, -691.0_16/2730, 7.0_16/6, -3617.0_16/510, 43867.0_16/798] - m = 7 - if (m > 9) stop - n = 10 - h = 1.0_16 - do k = 2, n - h = h + 1.0_16 / k - end do - write(*, '(a, f18.16)') "Hn ", h - h = h - log(real(n, 16)) - write(*, '(a, f18.16)') " -ln ", h - a = -1.0_16 / (2.0_16 * n) - n2 = real(n, 16) * n - r = 1.0_16 - do k = 1, m - r = r * n2 - a = a + B2(k) / (2.0_16 * k * r) - end do - write(*, '(a, f18.16, /, a, f18.16, /, a, i0)') & - "err ", a, "gamma ", h + a, "k = ", n + m - write(*, '(a, f18.16, /)') "error ", abs(h + a - EULER_GAMMA) - - ! Reference value - write(*, '(a, f18.16, /)') "C = ", EULER_GAMMA -end program euler_constant diff --git a/Task/Eulers-constant-0.5772.../Java/eulers-constant-0.5772....java b/Task/Eulers-constant-0.5772.../Java/eulers-constant-0.5772....java index ab644548fd..dbab8b5182 100644 --- a/Task/Eulers-constant-0.5772.../Java/eulers-constant-0.5772....java +++ b/Task/Eulers-constant-0.5772.../Java/eulers-constant-0.5772....java @@ -5,20 +5,20 @@ */ public class EulerConstant { - public static void main(String[] args) { - System.out.println(gamma(1_000_000)); - } + public static void main(String[] args) { + System.out.println(gamma(1_000_000)); + } private static double gamma(int N) { - double gamma = 0.0; - - for ( int n = 1; n <= N; n++ ) { - gamma += 1.0 / n; - } - - gamma -= Math.log(N) + 1.0 / ( 2 * N ); - - return gamma; - } - + double gamma = 0.0; + + for ( int n = 1; n <= N; n++ ) { + gamma += 1.0 / n; + } + + gamma -= Math.log(N) + 1.0 / ( 2 * N ); + + return gamma; + } + } diff --git a/Task/Eulers-constant-0.5772.../JavaScript/eulers-constant-0.5772....js b/Task/Eulers-constant-0.5772.../JavaScript/eulers-constant-0.5772....js deleted file mode 100644 index 42188fb06e..0000000000 --- a/Task/Eulers-constant-0.5772.../JavaScript/eulers-constant-0.5772....js +++ /dev/null @@ -1,45 +0,0 @@ -function ByVaccaSeries(numTerms) { - // this method is simple but converges slowly - // calculate gamma by: - // 1 * (1/2 - 1/3) + - // 2 * (1/4 - 1/5 + 1/6 - 1/7) + - // 3 * (1/8 - 1/9 + 1/10 - 1/11 + 1/12 - 1/13 + 1/14 - 1/15) + - // 4 * ( . . . ) + - // . . . - let gamma = 0; - let next = 4; - for (let numerator = 1; numerator < numTerms; ++numerator) { - let delta = 0; - for (let denominator = next / 2; denominator < next; denominator += 2) { - // calculate terms two at a time - delta += 1.0 / denominator - 1.0 / (denominator + 1); - } - gamma += numerator * delta; - next *= 2; - } - return gamma; -} -// based on the C entry -function ByEulersMethod() { - //Bernoulli numbers with even indices - const B2 = [1.0, 1.0 / 6, -1.0 / 30, 1.0 / 42, -1.0 / 30, - 5.0 / 66, -691.0 / 2730, 7.0 / 6]; - const n = 10; - //n-th harmonic number - const h = (() => // immediately invoked function expression - { - let sum = 1; - for (let k = 2; k <= n; k++) { sum += 1.0 / k; } - return sum - Math.log(n); - })(); - //expansion C = -digamma(1) - let a = -1.0 / (2 * n); - let r = 1; - for (let k = 1; k < B2.length; k++) { - r *= n * n; - a += B2[k] / (2 * k * r); - } - return h + a; -} -console.log("Vacca series: " + ByVaccaSeries(32).toPrecision(16)); -console.log("Eulers method: " + ByEulersMethod().toPrecision(16)); diff --git a/Task/Eulers-constant-0.5772.../Julia/eulers-constant-0.5772....jl b/Task/Eulers-constant-0.5772.../Julia/eulers-constant-0.5772....julia similarity index 100% rename from Task/Eulers-constant-0.5772.../Julia/eulers-constant-0.5772....jl rename to Task/Eulers-constant-0.5772.../Julia/eulers-constant-0.5772....julia diff --git a/Task/Eulers-constant-0.5772.../PascalABC.NET/eulers-constant-0.5772....pas b/Task/Eulers-constant-0.5772.../PascalABC.NET/eulers-constant-0.5772....pas deleted file mode 100644 index d0df6f507a..0000000000 --- a/Task/Eulers-constant-0.5772.../PascalABC.NET/eulers-constant-0.5772....pas +++ /dev/null @@ -1,9 +0,0 @@ -const - n = 1_000_000; - -begin - var result := 1.0; - for var i := 2 to n do - result += 1 / i; - writeln(result - ln(n)); -end. diff --git a/Task/Eulers-constant-0.5772.../Phix/eulers-constant-0.5772...-1.phix b/Task/Eulers-constant-0.5772.../Phix/eulers-constant-0.5772...-1.phix index 1840979093..72fb81b799 100644 --- a/Task/Eulers-constant-0.5772.../Phix/eulers-constant-0.5772...-1.phix +++ b/Task/Eulers-constant-0.5772.../Phix/eulers-constant-0.5772...-1.phix @@ -1,4 +1,6 @@ --- demo\rosetta\Eulers_constant.exw -with javascript_semantics -constant C = sum(sq_div(1,tagset(1e6)))-log(1e6) -printf(1,"gamma %.12f (max 12d.p. of accuracy)\n",C) +(phixonline)--> + -- demo\rosetta\Eulers_constant.exw + with javascript_semantics + constant C = sum(sq_div(1,tagset(1e6)))-log(1e6) + printf(1,"gamma %.12f (max 12d.p. of accuracy)\n",C) + + without js -- no mpfr_get_d_2exp() in mpfr.js as yet + requires("1.0.2") -- mpfr_get_d_2exp(), mpfr_addmul_si() + include mpfr.e + mpfr u, v, k2; + integer e, e10, e2 + atom f -//log(x/y) with the Taylor series for atanh(x-y/x+y) -procedure ln(mpfr s, integer x, y) - mpfr d = u, q = v; - assert((x-y)==1) - mpfr_set_si(s, x+y) - mpfr_si_div(s, 1, s) // s = 1 / (x + y) - mpfr_mul(k2, s, s) // k2 = s * s - mpfr_set(d, s) - integer k = 1 - while true do - k += 2; - mpfr_mul(d, d, k2) // d *= k2 - mpfr_div_si(q, d, k) // q = d / k - mpfr_add(s, s, q) // s += q - {f,e} = mpfr_get_d_2exp(q) - if abs(e)>=e2 then exit end if - end while - mpfr_mul_si(s, s, 2) //s *= 2 -end procedure + //log(x/y) with the Taylor series for atanh(x-y/x+y) + procedure ln(mpfr s, integer x, y) + mpfr d = u, q = v; + assert((x-y)==1) + mpfr_set_si(s, x+y) + mpfr_si_div(s, 1, s) // s = 1 / (x + y) + mpfr_mul(k2, s, s) // k2 = s * s + mpfr_set(d, s) + integer k = 1 + while true do + k += 2; + mpfr_mul(d, d, k2) // d *= k2 + mpfr_div_si(q, d, k) // q = d / k + mpfr_add(s, s, q) // s += q + {f,e} = mpfr_get_d_2exp(q) + if abs(e)>=e2 then exit end if + end while + mpfr_mul_si(s, s, 2) //s *= 2 + end procedure -mpfr a, b -integer k, - n = 60, -- (required precision in decimal dp *6/10) - n2, - r = 41, - s = 30, - t = 18; + mpfr a, b + integer k, + n = 60, -- (required precision in decimal dp *6/10) + n2, + r = 41, + s = 30, + t = 18; -// n = 2^i * 3^j * 5^k + // n = 2^i * 3^j * 5^k -// log(n) = r * log(16/15) + s * log(25/24) + t * log(81/80) + // log(n) = r * log(16/15) + s * log(25/24) + t * log(81/80) -// solve linear system for r, s, t -// 4 -3 -4| i -// -1 -1 4| j -// -1 2 -1| k + // solve linear system for r, s, t + // 4 -3 -4| i + // -1 -1 4| j + // -1 2 -1| k -//decimal precision -e10 = floor(n/0.6) -//binary precision -e2 = floor((1 + e10) / 0.30103) + //decimal precision + e10 = floor(n/0.6) + //binary precision + e2 = floor((1 + e10) / 0.30103) -mpfr_set_default_precision(e2) -{a, b, u, v, k2} = mpfr_inits(5) + mpfr_set_default_precision(e2) + {a, b, u, v, k2} = mpfr_inits(5) -//Compute log terms -ln(b, 16, 15) mpfr_mul_si(a, b, r) // a = r * b -ln(b, 25, 24) mpfr_addmul_si(a, b, s) // a += s * b -ln(b, 81, 80) mpfr_addmul_si(a, b, t) // a += t * b + //Compute log terms + ln(b, 16, 15) mpfr_mul_si(a, b, r) // a = r * b + ln(b, 25, 24) mpfr_addmul_si(a, b, s) // a += s * b + ln(b, 81, 80) mpfr_addmul_si(a, b, t) // a += t * b -mpfr_neg(a, a) // a = -a -mpfr_set_si(b, 1) // b = 1 -mpfr_set (u, a) -mpfr_set (v, b) + mpfr_neg(a, a) // a = -a + mpfr_set_si(b, 1) // b = 1 + mpfr_set (u, a) + mpfr_set (v, b) -k = 0; -n2 = n * n; -mpfr_set_si(k2, 0) // k2 = k * k (as below) -while true do - mpfr_add_si(k2, k2, k*2+1) // k2 += 2k + 1 - k += 1; + k = 0; + n2 = n * n; + mpfr_set_si(k2, 0) // k2 = k * k (as below) + while true do + mpfr_add_si(k2, k2, k*2+1) // k2 += 2k + 1 + k += 1; - mpfr_div(b, b, k2) - mpfr_mul_si(b, b, n2) // b = b * n2 / k2 + mpfr_div(b, b, k2) + mpfr_mul_si(b, b, n2) // b = b * n2 / k2 - mpfr_div_si(a, a, k) - mpfr_mul_si(a, a, n2) - mpfr_add (a, a, b) - mpfr_div_si(a, a, k) // a = (a * n2 / k + b) / k + mpfr_div_si(a, a, k) + mpfr_mul_si(a, a, n2) + mpfr_add (a, a, b) + mpfr_div_si(a, a, k) // a = (a * n2 / k + b) / k - mpfr_add(u, u, a) // u += a - mpfr_add(v, v, b) // v += b + mpfr_add(u, u, a) // u += a + mpfr_add(v, v, b) // v += b - {f,e} = mpfr_get_d_2exp (a) - if abs(e)>=e2 then exit end if -end while + {f,e} = mpfr_get_d_2exp (a) + if abs(e)>=e2 then exit end if + end while -mpfr_div(u, u, v) -string su = mpfr_get_fixed(u,e10) -printf(1,"gamma %s (maxerr. 1e-%d)\n", {su, e10}) + mpfr_div(u, u, v) + string su = mpfr_get_fixed(u,e10) + printf(1,"gamma %s (maxerr. 1e-%d)\n", {su, e10}) + + without js -- no mpfr_const_euler() in mpfr.js as yet + requires("1.0.1") -- mpfr_const_euler() + include mpfr.e + mpfr gamma = mpfr_init(0,-100) + mpfr_const_euler(gamma) + printf(1,"gamma %s (mpfr_const_euler)\n",{mpfr_get_fixed(gamma,100)}) + + with javascript_semantics + include builtins\complex.e + complex i = complex_new(0,1), + res = complex_add(complex_exp(complex_mul(PI,i)),1) + ?complex_sprint(res,both:=true) + ?complex_sprint(complex_round(res,1e16),true) + ?complex_sprint(complex_round(res,1e15),true) + + with javascript_semantics + procedure reduce(string s) + constant rules = {{"-1+1","0"}, + {"-1+0","-1"}, + {"i*0","0"}, + {"sin(pi)","0"}, + {"cos(pi)","-1"}, + {"exp(i*pi)","cos(pi)+i*sin(pi)"}} + string t = s + sequence seen = {} -- (be safe and avoid infinite loops) + while not find(t,seen) -- "" re-treading + and length(t)<10000 do -- "" ever-growing + seen = append(seen,t) + bool found = false + for i=1 to length(rules) do + string {r,e} = rules[i] + if match(r,t) then + found = true + t = substitute(t,r,e) + end if + end for + if not found then exit end if + printf(1,"%s = %s\n",{s,t}) + s = repeat(' ',length(s)) + end while + end procedure -procedure reduce(string s) - string t = s - sequence seen = {} -- (be safe and avoid infinite loops) - while not find(t,seen) -- "" re-treading - and length(t)<10000 do -- "" ever-growing - seen = append(seen,t) - bool found = false - for i=1 to length(rules) do - string {r,e} = rules[i] - if match(r,t) then - found = true - t = substitute(t,r,e) - end if - end for - if not found then exit end if - printf(1,"%s = %s\n",{s,t}) - s = repeat(' ',length(s)) - end while -end procedure - -reduce("exp(i*pi)+1") + reduce("exp(i*pi)+1") + + with javascript_semantics + constant MAX = 250 -constant p5 = new_dict(), - sum2 = new_dict() + constant p5 = new_dict(), + sum2 = new_dict() -atom t0 = time() -for i=1 to MAX do - atom i5 = power(i,5) - setd(i5,i,p5) - for j=1 to i-1 do - atom j5 = power(j,5) - setd(j5+i5,{i,j},sum2) - end for -end for + atom t0 = time() + for i=1 to MAX do + atom i5 = power(i,5) + setd(i5,i,p5) + for j=1 to i-1 do + atom j5 = power(j,5) + setd(j5+i5,{j,i},sum2) + end for + end for -printf(1,"created %d + %d dictionary entries (%gs)\n", - {dict_size(p5),dict_size(sum2),time()-t0}) + ?time()-t0 -bool found = false -function forsum2(object s, data, p) - if p<=s then return 0 end if - integer k = getd_index(p-s,sum2) - if k!=NULL then - printf(1,"%d^5 + %d^5 + %d^5 +%d^5 = %d^5 (%gs)\n", - getd_by_index(k,sum2)&data&getd(p,p5)&(time()-t0)) - found = true - return 0 -- (show one solution per p) - end if - return 1 -end function + function forsum2(object s, object data, object p) + if p<=s then return 0 end if + integer k = getd_index(p-s,sum2) + if k!=NULL then + ?getd(p,p5)&data&getd_by_index(k,sum2) + return 0 -- (show one solution per p) + end if + return 1 + end function -function forp5(object key, /*data*/, /*user_data*/) - traverse_dict(forsum2,key,sum2) - return not found -end function + function forp5(object key, object /*data*/, object /*user_data*/) + traverse_dict(forsum2,key,sum2) + return 1 + end function -traverse_dict(forp5,0,p5) + traverse_dict(forp5,0,p5) + + ?time()-t0 + + global function choose(integer n, k) + atom res = 1 + for i=1 to k do + res = (res*(n-i+1))/i + end for + return res + end function + + ?choose(5,3) + + with javascript_semantics + include builtins\mpfr.e + sequence tests = {{5,3},{100,50},{60,30},{1200,120}} + mpz r = mpz_init() + for i=1 to length(tests) do + integer {n,k} = tests[i] + mpz_bin_uiui(r,n,k) + ?mpz_get_str(r) + end for + n ) + [ i 1+ / ] ] is binomial ( n n --> ) 5 3 binomial echo diff --git a/Task/Evaluate-binomial-coefficients/Rust/evaluate-binomial-coefficients-1.rs b/Task/Evaluate-binomial-coefficients/Rust/evaluate-binomial-coefficients-1.rust similarity index 100% rename from Task/Evaluate-binomial-coefficients/Rust/evaluate-binomial-coefficients-1.rs rename to Task/Evaluate-binomial-coefficients/Rust/evaluate-binomial-coefficients-1.rust diff --git a/Task/Evaluate-binomial-coefficients/Rust/evaluate-binomial-coefficients-2.rs b/Task/Evaluate-binomial-coefficients/Rust/evaluate-binomial-coefficients-2.rust similarity index 100% rename from Task/Evaluate-binomial-coefficients/Rust/evaluate-binomial-coefficients-2.rs rename to Task/Evaluate-binomial-coefficients/Rust/evaluate-binomial-coefficients-2.rust diff --git a/Task/Evaluate-binomial-coefficients/Scheme/evaluate-binomial-coefficients-1.scm b/Task/Evaluate-binomial-coefficients/Scheme/evaluate-binomial-coefficients-1.ss similarity index 100% rename from Task/Evaluate-binomial-coefficients/Scheme/evaluate-binomial-coefficients-1.scm rename to Task/Evaluate-binomial-coefficients/Scheme/evaluate-binomial-coefficients-1.ss diff --git a/Task/Evaluate-binomial-coefficients/Scheme/evaluate-binomial-coefficients-2.scm b/Task/Evaluate-binomial-coefficients/Scheme/evaluate-binomial-coefficients-2.ss similarity index 100% rename from Task/Evaluate-binomial-coefficients/Scheme/evaluate-binomial-coefficients-2.scm rename to Task/Evaluate-binomial-coefficients/Scheme/evaluate-binomial-coefficients-2.ss diff --git a/Task/Evaluate-binomial-coefficients/True-BASIC/evaluate-binomial-coefficients-1.basic b/Task/Evaluate-binomial-coefficients/True-BASIC/evaluate-binomial-coefficients-1.basic deleted file mode 100644 index 1e8fe03440..0000000000 --- a/Task/Evaluate-binomial-coefficients/True-BASIC/evaluate-binomial-coefficients-1.basic +++ /dev/null @@ -1,35 +0,0 @@ -FUNCTION factorial(n) - IF n < 1 THEN LET factorial = 1 - - LET product = 1 - FOR i = 2 TO n - LET product = product*i - NEXT i - - LET factorial = product -END FUNCTION - -FUNCTION binomial(n, k) - ! Special cases - IF k = 0 OR k = n THEN LET binomial = 1 - IF k < 0 OR k > n THEN LET binomial = 0 - - ! For efficiency, we use the smallest value of k or (n-k) - IF k > n-k THEN LET k = n-k - LET product = 1 - - FOR i = 1 TO k - LET product = product*(n-k+i)/i - NEXT i - - LET binomial = INT(product+0.5) -END FUNCTION - -FOR n = 0 TO 14 - FOR k = 0 TO n - PRINT USING " ####": binomial(n,k); - NEXT k - PRINT -NEXT n - -END diff --git a/Task/Evaluate-binomial-coefficients/True-BASIC/evaluate-binomial-coefficients-2.basic b/Task/Evaluate-binomial-coefficients/True-BASIC/evaluate-binomial-coefficients-2.basic deleted file mode 100644 index f3d149d7c5..0000000000 --- a/Task/Evaluate-binomial-coefficients/True-BASIC/evaluate-binomial-coefficients-2.basic +++ /dev/null @@ -1,25 +0,0 @@ - REM PASCAL'S TRIANGLE - LET N=0 - 10 LET K=0 - 20 GOSUB 30 - PRINT B," " - LET K=K+1 - IF K<=N THEN GOTO 20 - PRINT "" - LET N=N+1 - IF N<=10 THEN GOTO 10 - END - 30 REM BINOMIAL - IF K=0 THEN GOTO 50 - IF K=N THEN GOTO 50 - LET P=1 - LET I=1 - 40 LET T=N-K+I - LET P=P*T/I - LET I=I+1 - IF I<=K THEN GOTO 40 - LET B=P - RETURN - 50 LET B=1 - RETURN - diff --git a/Task/Evaluate-binomial-coefficients/VBScript/evaluate-binomial-coefficients.vbs b/Task/Evaluate-binomial-coefficients/VBScript/evaluate-binomial-coefficients.vb similarity index 100% rename from Task/Evaluate-binomial-coefficients/VBScript/evaluate-binomial-coefficients.vbs rename to Task/Evaluate-binomial-coefficients/VBScript/evaluate-binomial-coefficients.vb diff --git a/Task/Evaluate-binomial-coefficients/Yabasic/evaluate-binomial-coefficients.basic b/Task/Evaluate-binomial-coefficients/Yabasic/evaluate-binomial-coefficients.basic deleted file mode 100644 index b4066edf86..0000000000 --- a/Task/Evaluate-binomial-coefficients/Yabasic/evaluate-binomial-coefficients.basic +++ /dev/null @@ -1,33 +0,0 @@ -for n = 0 to 14 - for k = 0 to n - print binomial(n, k) using "####"; - next k - print -next n -end - -sub factorial(n) - local product, i - - if n < 1 return 1 - - product = 1 - for i = 2 to n - product = product * i - next - - return product -end sub - -sub binomial(n, k) - local product, i - - if n < 0 or k < 0 or n <= k return 1 - - product = 1 - for i = n - k + 1 to n - product = product * i - next - - return int(product / factorial(k)) -end sub diff --git a/Task/Even-or-odd/ALGOL-60/even-or-odd.alg b/Task/Even-or-odd/ALGOL-60/even-or-odd.alg deleted file mode 100644 index 314105fd32..0000000000 --- a/Task/Even-or-odd/ALGOL-60/even-or-odd.alg +++ /dev/null @@ -1,21 +0,0 @@ -begin - -integer i; - -boolean procedure even(n); - value n; integer n; -begin - even := (n = entier(n/2) * 2); -end; - -comment - exercise the function; -for i := 1 step 3 until 12 do - begin - outinteger(1,i); - if even(i) then - outstring(1,"is even\n") - else - outstring(1,"is odd\n"); - end; - -end diff --git a/Task/Even-or-odd/Ada/even-or-odd.adb b/Task/Even-or-odd/Ada/even-or-odd.ada similarity index 100% rename from Task/Even-or-odd/Ada/even-or-odd.adb rename to Task/Even-or-odd/Ada/even-or-odd.ada diff --git a/Task/Even-or-odd/Adina/even-or-odd-1.adina b/Task/Even-or-odd/Adina/even-or-odd-1.adina deleted file mode 100644 index 07565c1f09..0000000000 --- a/Task/Even-or-odd/Adina/even-or-odd-1.adina +++ /dev/null @@ -1,4 +0,0 @@ -чётное число = - число % 2 == 0 -нечётное число = - число % 2 == 1 diff --git a/Task/Even-or-odd/Adina/even-or-odd-2.adina b/Task/Even-or-odd/Adina/even-or-odd-2.adina deleted file mode 100644 index e700193dbc..0000000000 --- a/Task/Even-or-odd/Adina/even-or-odd-2.adina +++ /dev/null @@ -1,4 +0,0 @@ -even x = - x % 2 == 0 -odd x = - x % 2 == 1 diff --git a/Task/Even-or-odd/ArkScript/even-or-odd.ark b/Task/Even-or-odd/ArkScript/even-or-odd.ark deleted file mode 100644 index 76058b09e1..0000000000 --- a/Task/Even-or-odd/ArkScript/even-or-odd.ark +++ /dev/null @@ -1,5 +0,0 @@ -(let is_even (fun (i) - (= 0 (mod i 2)))) - -(let is_odd (fun (i) - (= 1 (mod i 2)))) diff --git a/Task/Even-or-odd/Arturo/even-or-odd.arturo b/Task/Even-or-odd/Arturo/even-or-odd.arturo index eb282edf42..7dfd05748b 100644 --- a/Task/Even-or-odd/Arturo/even-or-odd.arturo +++ b/Task/Even-or-odd/Arturo/even-or-odd.arturo @@ -1,4 +1,4 @@ loop (neg 5)..5 [x][ - switch even? x -> print [pad to :string x 4 ": even"] - -> print [pad to :string x 4 ": odd"] + if? even? x -> print [pad to :string x 4 ": even"] + else -> print [pad to :string x 4 ": odd"] ] diff --git a/Task/Even-or-odd/Ballerina/even-or-odd.ballerina b/Task/Even-or-odd/Ballerina/even-or-odd.ballerina deleted file mode 100644 index 28dfdbd94a..0000000000 --- a/Task/Even-or-odd/Ballerina/even-or-odd.ballerina +++ /dev/null @@ -1,13 +0,0 @@ -import ballerina/io; - -function isEven(int n) returns boolean { - return n % 2 == 0; -} - -public function main() { - int i = -3; - io:println(`isEven(${i}): ${isEven(i)}`); - foreach int t in -2...4 { - io:println(`isEven(${t}): ${isEven(t)}`); - } -} diff --git a/Task/Even-or-odd/Batch-File/even-or-odd.bat b/Task/Even-or-odd/Batch-File/even-or-odd.bat index 4f48361e73..808359977b 100644 --- a/Task/Even-or-odd/Batch-File/even-or-odd.bat +++ b/Task/Even-or-odd/Batch-File/even-or-odd.bat @@ -1,12 +1,14 @@ @echo off -setlocal set /p i=Insert number: ::bitwise and set /a "test1=%i%&1" +::divide last character by 2 +set /a test2=%i:~-1%/2 + ::modulo -set /a test2=%i% %% 2 +set /a test3=%i% %% 2 set test pause>nul diff --git a/Task/Even-or-odd/COBOL/even-or-odd.cob b/Task/Even-or-odd/COBOL/even-or-odd.cobol similarity index 100% rename from Task/Even-or-odd/COBOL/even-or-odd.cob rename to Task/Even-or-odd/COBOL/even-or-odd.cobol diff --git a/Task/Even-or-odd/Crystal/even-or-odd.cr b/Task/Even-or-odd/Crystal/even-or-odd.cr deleted file mode 100644 index fbc489e27d..0000000000 --- a/Task/Even-or-odd/Crystal/even-or-odd.cr +++ /dev/null @@ -1,40 +0,0 @@ -#Using bitwise shift - def isEven_bShift(n) - n == ((n >> 1) << 1) - end - def isOdd_bShift(n) - n != ((n >> 1) << 1) - end -#Using modulo operator - def isEven_mod(n) - (n % 2) == 0 - end - def isOdd_mod(n) - (n % 2) != 0 - end -# Using bitwise "and" - def isEven_bAnd(n) - (n & 1) == 0 - end - def isOdd_bAnd(n) - (n & 1) != 0 - end -# Using integer predicates - def isEven_even(n) - n.even? - end - def isOdd_odd(n) - n.odd? - end - -puts isEven_bShift(7) -puts isOdd_bShift(7) - -puts isEven_mod(12) -puts isOdd_mod(12) - -puts isEven_bAnd(21) -puts isOdd_bAnd(21) - -puts isEven_even(32) -puts isOdd_odd(32) diff --git a/Task/Even-or-odd/Crystal/even-or-odd.crystal b/Task/Even-or-odd/Crystal/even-or-odd.crystal new file mode 100644 index 0000000000..b214424476 --- /dev/null +++ b/Task/Even-or-odd/Crystal/even-or-odd.crystal @@ -0,0 +1,30 @@ +#Using bitwise shift + def isEven_bShift(n) + n == ((n >> 1) << 1) + end + def isOdd_bShift(n) + n != ((n >> 1) << 1) + end +#Using modulo operator + def isEven_mod(n) + (n % 2) == 0 + end + def isOdd_mod(n) + (n % 2) != 0 + end +# Using bitwise "and" + def isEven_bAnd(n) + (n & 1) == 0 + end + def isOdd_bAnd(n) + (n & 1) != 0 + end + +puts isEven_bShift(7) +puts isOdd_bShift(7) + +puts isEven_mod(12) +puts isOdd_mod(12) + +puts isEven_bAnd(21) +puts isOdd_bAnd(21) diff --git a/Task/Even-or-odd/Delphi/even-or-odd.pas b/Task/Even-or-odd/Delphi/even-or-odd.delphi similarity index 100% rename from Task/Even-or-odd/Delphi/even-or-odd.pas rename to Task/Even-or-odd/Delphi/even-or-odd.delphi diff --git a/Task/Even-or-odd/DuckDB/even-or-odd-1.duckdb b/Task/Even-or-odd/DuckDB/even-or-odd-1.duckdb deleted file mode 100644 index fc23a91ef4..0000000000 --- a/Task/Even-or-odd/DuckDB/even-or-odd-1.duckdb +++ /dev/null @@ -1,3 +0,0 @@ -create or replace function evenp(i) as ( - i = trunc(i) and i%2 = 0 -); diff --git a/Task/Even-or-odd/DuckDB/even-or-odd-2.duckdb b/Task/Even-or-odd/DuckDB/even-or-odd-2.duckdb deleted file mode 100644 index f59859511f..0000000000 --- a/Task/Even-or-odd/DuckDB/even-or-odd-2.duckdb +++ /dev/null @@ -1 +0,0 @@ -select i, evenp(i), evenp(i::DOUBLE + 0.1) from range(-1,3) _(i); diff --git a/Task/Even-or-odd/EMal/even-or-odd.emal b/Task/Even-or-odd/EMal/even-or-odd.emal index ee2b7e1cd8..0292abacd4 100644 --- a/Task/Even-or-odd/EMal/even-or-odd.emal +++ b/Task/Even-or-odd/EMal/even-or-odd.emal @@ -1,16 +1,20 @@ -List evenCheckers ← fun[ - int.is_odd - |> bool.to_string - |> io.println - - 2 - |> int.is_even - |> bool.to_string - |> io.println -} diff --git a/Task/Even-or-odd/Julia/even-or-odd.jl b/Task/Even-or-odd/Julia/even-or-odd.julia similarity index 100% rename from Task/Even-or-odd/Julia/even-or-odd.jl rename to Task/Even-or-odd/Julia/even-or-odd.julia diff --git a/Task/Even-or-odd/Kotlin/even-or-odd.kts b/Task/Even-or-odd/Kotlin/even-or-odd.kotlin similarity index 100% rename from Task/Even-or-odd/Kotlin/even-or-odd.kts rename to Task/Even-or-odd/Kotlin/even-or-odd.kotlin diff --git a/Task/Even-or-odd/Nom/even-or-odd.num b/Task/Even-or-odd/Nom/even-or-odd.num deleted file mode 100644 index b67372cd5e..0000000000 --- a/Task/Even-or-odd/Nom/even-or-odd.num +++ /dev/null @@ -1,8 +0,0 @@ -# Least signficant digit method - read; - ![:space:] { - whilenot [:space:]; - [0-9] { E"1",E"3",E"5",E"7",E"9" { add " *ODD!*"; } } - print; clear; - } - [:space:] { while [:space:]; print; clear; } diff --git a/Task/Even-or-odd/Nu/even-or-odd.nu b/Task/Even-or-odd/Nu/even-or-odd.nu deleted file mode 100644 index df29fd8256..0000000000 --- a/Task/Even-or-odd/Nu/even-or-odd.nu +++ /dev/null @@ -1,7 +0,0 @@ -def is-even [x: int] { - ($x bit-and 1) == 0 -} - -def is-odd [x: int] { - ($x bit-and 1) == 1 -} diff --git a/Task/Even-or-odd/OCaml/even-or-odd-1.ml b/Task/Even-or-odd/OCaml/even-or-odd-1.ocaml similarity index 100% rename from Task/Even-or-odd/OCaml/even-or-odd-1.ml rename to Task/Even-or-odd/OCaml/even-or-odd-1.ocaml diff --git a/Task/Even-or-odd/OCaml/even-or-odd-2.ml b/Task/Even-or-odd/OCaml/even-or-odd-2.ocaml similarity index 100% rename from Task/Even-or-odd/OCaml/even-or-odd-2.ml rename to Task/Even-or-odd/OCaml/even-or-odd-2.ocaml diff --git a/Task/Even-or-odd/OCaml/even-or-odd-3.ml b/Task/Even-or-odd/OCaml/even-or-odd-3.ocaml similarity index 100% rename from Task/Even-or-odd/OCaml/even-or-odd-3.ml rename to Task/Even-or-odd/OCaml/even-or-odd-3.ocaml diff --git a/Task/Even-or-odd/Oberon/even-or-odd.oberon b/Task/Even-or-odd/Oberon/even-or-odd.oberon new file mode 100644 index 0000000000..e010e2ed06 --- /dev/null +++ b/Task/Even-or-odd/Oberon/even-or-odd.oberon @@ -0,0 +1,21 @@ +MODULE EvenOrOdd; +IMPORT + S := SYSTEM, + Out; +VAR + x: INTEGER; + s: SET; + +BEGIN + x := 10;Out.Int(x,0); + IF ODD(x) THEN Out.String(" odd") ELSE Out.String(" even") END; + Out.Ln; + + x := 11;s := S.VAL(SET,LONG(x));Out.Int(x,0); + IF 0 IN s THEN Out.String(" odd") ELSE Out.String(" even") END; + Out.Ln; + + x := 12;Out.Int(x,0); + IF x MOD 2 # 0 THEN Out.String(" odd") ELSE Out.String(" even") END; + Out.Ln +END EvenOrOdd. diff --git a/Task/Even-or-odd/PascalABC.NET/even-or-odd.pas b/Task/Even-or-odd/PascalABC.NET/even-or-odd.pas deleted file mode 100644 index d3cc8e5417..0000000000 --- a/Task/Even-or-odd/PascalABC.NET/even-or-odd.pas +++ /dev/null @@ -1,14 +0,0 @@ -function IsOddRemainder(x: integer) := x mod 2 <> 0; - -function IsEvenRemainder(x: integer) := x mod 2 = 0; - -function IsOddBitwise(x: integer) := x and 1 = 1; - -function IsEvenBitwise(x: integer) := x and 1 = 0; - -begin - var x := 3; - Println(x.IsEven,x.IsOdd); // Standard Predicates - Println(IsEvenRemainder(x),IsOddRemainder(x)); - Println(IsEvenBitwise(x),IsOddBitwise(x)); -end. diff --git a/Task/Even-or-odd/Pluto/even-or-odd.pluto b/Task/Even-or-odd/Pluto/even-or-odd.pluto deleted file mode 100644 index 670ade3ec5..0000000000 --- a/Task/Even-or-odd/Pluto/even-or-odd.pluto +++ /dev/null @@ -1,4 +0,0 @@ -local n = 123 -if n % 2 == 0 do - print('even') -else print('odd') end diff --git a/Task/Even-or-odd/PowerShell/even-or-odd-1.ps1 b/Task/Even-or-odd/PowerShell/even-or-odd-1.psh similarity index 100% rename from Task/Even-or-odd/PowerShell/even-or-odd-1.ps1 rename to Task/Even-or-odd/PowerShell/even-or-odd-1.psh diff --git a/Task/Even-or-odd/PowerShell/even-or-odd-2.ps1 b/Task/Even-or-odd/PowerShell/even-or-odd-2.psh similarity index 100% rename from Task/Even-or-odd/PowerShell/even-or-odd-2.ps1 rename to Task/Even-or-odd/PowerShell/even-or-odd-2.psh diff --git a/Task/Even-or-odd/PowerShell/even-or-odd-3.ps1 b/Task/Even-or-odd/PowerShell/even-or-odd-3.psh similarity index 100% rename from Task/Even-or-odd/PowerShell/even-or-odd-3.ps1 rename to Task/Even-or-odd/PowerShell/even-or-odd-3.psh diff --git a/Task/Even-or-odd/ReScript/even-or-odd.res b/Task/Even-or-odd/ReScript/even-or-odd.re similarity index 100% rename from Task/Even-or-odd/ReScript/even-or-odd.res rename to Task/Even-or-odd/ReScript/even-or-odd.re diff --git a/Task/Even-or-odd/Rust/even-or-odd-1.rs b/Task/Even-or-odd/Rust/even-or-odd-1.rust similarity index 100% rename from Task/Even-or-odd/Rust/even-or-odd-1.rs rename to Task/Even-or-odd/Rust/even-or-odd-1.rust diff --git a/Task/Even-or-odd/Rust/even-or-odd-2.rs b/Task/Even-or-odd/Rust/even-or-odd-2.rust similarity index 100% rename from Task/Even-or-odd/Rust/even-or-odd-2.rs rename to Task/Even-or-odd/Rust/even-or-odd-2.rust diff --git a/Task/Even-or-odd/Rye/even-or-odd.rye b/Task/Even-or-odd/Rye/even-or-odd.rye deleted file mode 100644 index c1822096c6..0000000000 --- a/Task/Even-or-odd/Rye/even-or-odd.rye +++ /dev/null @@ -1,2 +0,0 @@ -print is-even 2 -print is-odd 2 diff --git a/Task/Even-or-odd/Scheme/even-or-odd.scm b/Task/Even-or-odd/Scheme/even-or-odd.ss similarity index 100% rename from Task/Even-or-odd/Scheme/even-or-odd.scm rename to Task/Even-or-odd/Scheme/even-or-odd.ss diff --git a/Task/Even-or-odd/VBScript/even-or-odd.vbs b/Task/Even-or-odd/VBScript/even-or-odd.vb similarity index 100% rename from Task/Even-or-odd/VBScript/even-or-odd.vbs rename to Task/Even-or-odd/VBScript/even-or-odd.vb diff --git a/Task/Even-or-odd/YAMLScript/even-or-odd.ys b/Task/Even-or-odd/YAMLScript/even-or-odd.ys deleted file mode 100644 index 36ee519cd2..0000000000 --- a/Task/Even-or-odd/YAMLScript/even-or-odd.ys +++ /dev/null @@ -1,7 +0,0 @@ -!YS-v0 - -defn main(*xs): - each x xs: - if x:even?: - say: "$x is even" - say: "$x is odd" diff --git a/Task/Events/Ada/events-1.adb b/Task/Events/Ada/events-1.ada similarity index 100% rename from Task/Events/Ada/events-1.adb rename to Task/Events/Ada/events-1.ada diff --git a/Task/Events/Ada/events-2.adb b/Task/Events/Ada/events-2.ada similarity index 100% rename from Task/Events/Ada/events-2.adb rename to Task/Events/Ada/events-2.ada diff --git a/Task/Events/Ada/events-3.adb b/Task/Events/Ada/events-3.ada similarity index 100% rename from Task/Events/Ada/events-3.adb rename to Task/Events/Ada/events-3.ada diff --git a/Task/Events/Delphi/events.pas b/Task/Events/Delphi/events.delphi similarity index 100% rename from Task/Events/Delphi/events.pas rename to Task/Events/Delphi/events.delphi diff --git a/Task/Events/EasyLang/events.easy b/Task/Events/EasyLang/events.easy index 18092d262e..0206f41f44 100644 --- a/Task/Events/EasyLang/events.easy +++ b/Task/Events/EasyLang/events.easy @@ -1,8 +1,10 @@ on timer - gcircle randomf * 100 randomf * 100 2 + move randomf * 100 randomf * 100 + circle 2 timer 1 . on mouse_down - gcircle mouse_x mouse_y 2 + move mouse_x mouse_y + circle 2 . timer 0 diff --git a/Task/Events/Elixir/events.ex b/Task/Events/Elixir/events.elixir similarity index 100% rename from Task/Events/Elixir/events.ex rename to Task/Events/Elixir/events.elixir diff --git a/Task/Events/Java/events.java b/Task/Events/Java/events.java deleted file mode 100644 index 67effa5bba..0000000000 --- a/Task/Events/Java/events.java +++ /dev/null @@ -1,18 +0,0 @@ -import java.util.Timer; -import java.util.TimerTask; -import java.util.Date; - -public class Main { - public static void main(String[] args) { - Timer timer = new Timer(); - TimerTask task = new TimerTask() { - @Override - public void run() { - System.out.println(new Date()); - timer.cancel(); - } - }; - System.out.println(new Date()); - timer.schedule(task, 1000); - } -} diff --git a/Task/Events/Julia/events.jl b/Task/Events/Julia/events.julia similarity index 100% rename from Task/Events/Julia/events.jl rename to Task/Events/Julia/events.julia diff --git a/Task/Events/PascalABC.NET/events.pas b/Task/Events/PascalABC.NET/events.pas deleted file mode 100644 index 7f24ba7e63..0000000000 --- a/Task/Events/PascalABC.NET/events.pas +++ /dev/null @@ -1,13 +0,0 @@ -procedure OnElapsed(sender: object; eventArgs: System.Timers.ElapsedEventArgs); -begin - Writeln(eventArgs.SignalTime); - system.Timers.Timer(sender).Stop; -end; - -begin - var timer := System.Timers.Timer.Create(1000); - timer.Elapsed += OnElapsed; - Writeln(DateTime.Now); - timer.Start; - Console.ReadLine; -end. diff --git a/Task/Events/PowerShell/events.ps1 b/Task/Events/PowerShell/events.psh similarity index 100% rename from Task/Events/PowerShell/events.ps1 rename to Task/Events/PowerShell/events.psh diff --git a/Task/Events/Rust/events.rs b/Task/Events/Rust/events.rust similarity index 100% rename from Task/Events/Rust/events.rs rename to Task/Events/Rust/events.rust diff --git a/Task/Evolutionary-algorithm/8080-Assembly/evolutionary-algorithm.8080 b/Task/Evolutionary-algorithm/8080-Assembly/evolutionary-algorithm.8080 index bebda07f74..dafadfb1b4 100644 --- a/Task/Evolutionary-algorithm/8080-Assembly/evolutionary-algorithm.8080 +++ b/Task/Evolutionary-algorithm/8080-Assembly/evolutionary-algorithm.8080 @@ -1,162 +1,162 @@ -MRATE: equ 26 ; Chance of mutation (MRATE/256) -COPIES: equ 100 ; Amount of copies to make -fname1: equ 5Dh ; First filename on command line (used for RNG seed) -fname2: equ 6Dh ; Second filename (also used for RNG seed) - org 100h - ;;; Make random seed from the two CP/M 'filenames' - lxi b,rnddat - lxi h,fname1 - xra a - call seed ; First four bytes from fn1 make X - call seed ; Second four bytes from fn1 make A - mvi l,fname2 - call seed ; First four bytes from fn2 make B - call seed ; Second four bytes from fn2 make C - ;;; Create the first parent (random string) - lxi h,parent - mvi e,tgtsz-1 -genchr: call rndchr ; Get random character - mov m,a ; Store it - inx h - dcr e - jnz genchr - mvi m,'$' ; CP/M string terminator - ;;; Main loop -loop: lxi d,parent - push d - call puts ; Print current parent - pop h ; Calculate fitness - call fitnes - xra a ; If it is 0, all characters match, - ora d - rz ; So we stop. - lxi h,kids ; Otherwise, set HL to start of children, - mvi a,0FFh ; Initialize maximum fitness value - sta maxfit - mvi a,COPIES ; Initialize copy counter - sta copies - ;;; Make copies -copy: push h ; Store the place where the copy will go - call mutcpy ; Make a mutated copy of the parent - pop h ; Get the place where the copy went - push h ; But keep it on the stack - call fitnes ; Calculate the fitness of that copy - pop h ; Get place where copy went - lda maxfit ; Get current best fitness - cmp d ; Compare to fitness of current copy - jc next ; If it wasn't better, next copy - shld maxptr ; If it was better, store pointer - mov a,d - sta maxfit ; And new max fitness -next: lxi b,tgtsz ; Get place for next copy - dad b - xchg ; Keep in DE - lxi h,copies - dcr m ; Any copies left to make? - xchg - jnz copy ; Then make another copy - lhld maxptr ; Otherwise, get location of copy with best fitness - lxi b,parent ; Make that the new parent -pcopy: mov a,m ; Get character from copy - inx h - stax b ; Store into location of parent - inx b - cpi '$' ; Check for string terminator - jnz pcopy ; If it isn't, copy next character - jmp loop ; Otherwise, mutate new parent - ;;; Make a copy of the parent, mutate it, and store it at [HL]. -mutcpy: lxi b,parent -mcloop: ldax b ; Get current character - inx b - mov m,a ; Write it to new location - inx h - cpi '$' ; Was it the string terminator? - rz ; Then stop - call rand ; Otherwise, get random value - cpi MRATE ; Should we mutate this character? - jnc mcloop ; If not, just copy next character - call rndchr ; Otherwise, get a random character - dcx h ; And store it instead of the character we had - mov m,a - inx h - jmp mcloop - ;;; Calculate fitness of candidate under [HL], fitness is - ;;; returned in D. Fitness is "inverted", i.e. a fitness of 0 - ;;; means everything matches. -fitnes: lxi b,target - lxi d,tgtsz ; E=counter, D=fitness -floop: dcr e ; Done yet? - rz ; If so, return. - ldax b ; Get target character - inx b - cmp m ; Compare to current character - inx h - jz floop ; If they match, don't do anything - inr d ; If they don't match, count this - jmp floop - ;;; Generate a random uppercase letter, or a space - ;;; Return in A, other registers preserved -rndchr: call rand ; Get a random value - ani 31 ; from 0 to 31 - cpi 28 ; If 28 or higher, - jnc rndchr ; get another value - adi 'A' ; Make uppercase letter - cpi 'Z'+1 ; If the result is 'Z' or lower, - rc ; then return it, - mvi a,' ' ; otherwise return a space - ret - ;;; Load 4 bytes from [HL] and use them, plus A, as part of seed - ;;; in [BC] -seed: mvi e,4 ; 4 bytes -sloop: xra m - inx h - dcr e - jnz sloop - stax b - inx b - ret - ;;; Random number generator using XABC algorithm -rand: push h - lxi h,rnddat - inr m ; X++ - mov a,m ; X - inx h - xra m ; ^ C - inx h - xra m ; ^ A - mov m,a ; -> A - inx h - add m ; + B - mov m,a ; -> B - rar ; >>1 (ish) - dcx h - xra m ; ^ A - dcx h - add m ; + C - mov m,a ; -> C - pop h - ret - ;;; Print string to console using CP/M, saving all registers -puts: push h - push d - push b - push psw - mvi c,9 ; CP/M print string - call 5 - lxi d,nl ; Print a newline as well - mvi c,9 - call 5 - pop b - pop d - pop h - pop psw - ret -nl: db 13,10,'$' -target: db 'METHINKS IT IS LIKE A WEASEL$' -tgtsz: equ $-target -rnddat: ds 4 ; RNG state -copies: ds 1 ; Copies left to make -maxfit: ds 1 ; Best fitness seen -maxptr: ds 2 ; Pointer to copy with best fitness -parent: equ $ ; Store current parent here -kids: equ $+tgtsz ; Store mutated copies here +MRATE: equ 26 ; Chance of mutation (MRATE/256) +COPIES: equ 100 ; Amount of copies to make +fname1: equ 5Dh ; First filename on command line (used for RNG seed) +fname2: equ 6Dh ; Second filename (also used for RNG seed) + org 100h + ;;; Make random seed from the two CP/M 'filenames' + lxi b,rnddat + lxi h,fname1 + xra a + call seed ; First four bytes from fn1 make X + call seed ; Second four bytes from fn1 make A + mvi l,fname2 + call seed ; First four bytes from fn2 make B + call seed ; Second four bytes from fn2 make C + ;;; Create the first parent (random string) + lxi h,parent + mvi e,tgtsz-1 +genchr: call rndchr ; Get random character + mov m,a ; Store it + inx h + dcr e + jnz genchr + mvi m,'$' ; CP/M string terminator + ;;; Main loop +loop: lxi d,parent + push d + call puts ; Print current parent + pop h ; Calculate fitness + call fitnes + xra a ; If it is 0, all characters match, + ora d + rz ; So we stop. + lxi h,kids ; Otherwise, set HL to start of children, + mvi a,0FFh ; Initialize maximum fitness value + sta maxfit + mvi a,COPIES ; Initialize copy counter + sta copies + ;;; Make copies +copy: push h ; Store the place where the copy will go + call mutcpy ; Make a mutated copy of the parent + pop h ; Get the place where the copy went + push h ; But keep it on the stack + call fitnes ; Calculate the fitness of that copy + pop h ; Get place where copy went + lda maxfit ; Get current best fitness + cmp d ; Compare to fitness of current copy + jc next ; If it wasn't better, next copy + shld maxptr ; If it was better, store pointer + mov a,d + sta maxfit ; And new max fitness +next: lxi b,tgtsz ; Get place for next copy + dad b + xchg ; Keep in DE + lxi h,copies + dcr m ; Any copies left to make? + xchg + jnz copy ; Then make another copy + lhld maxptr ; Otherwise, get location of copy with best fitness + lxi b,parent ; Make that the new parent +pcopy: mov a,m ; Get character from copy + inx h + stax b ; Store into location of parent + inx b + cpi '$' ; Check for string terminator + jnz pcopy ; If it isn't, copy next character + jmp loop ; Otherwise, mutate new parent + ;;; Make a copy of the parent, mutate it, and store it at [HL]. +mutcpy: lxi b,parent +mcloop: ldax b ; Get current character + inx b + mov m,a ; Write it to new location + inx h + cpi '$' ; Was it the string terminator? + rz ; Then stop + call rand ; Otherwise, get random value + cpi MRATE ; Should we mutate this character? + jnc mcloop ; If not, just copy next character + call rndchr ; Otherwise, get a random character + dcx h ; And store it instead of the character we had + mov m,a + inx h + jmp mcloop + ;;; Calculate fitness of candidate under [HL], fitness is + ;;; returned in D. Fitness is "inverted", i.e. a fitness of 0 + ;;; means everything matches. +fitnes: lxi b,target + lxi d,tgtsz ; E=counter, D=fitness +floop: dcr e ; Done yet? + rz ; If so, return. + ldax b ; Get target character + inx b + cmp m ; Compare to current character + inx h + jz floop ; If they match, don't do anything + inr d ; If they don't match, count this + jmp floop + ;;; Generate a random uppercase letter, or a space + ;;; Return in A, other registers preserved +rndchr: call rand ; Get a random value + ani 31 ; from 0 to 31 + cpi 28 ; If 28 or higher, + jnc rndchr ; get another value + adi 'A' ; Make uppercase letter + cpi 'Z'+1 ; If the result is 'Z' or lower, + rc ; then return it, + mvi a,' ' ; otherwise return a space + ret + ;;; Load 4 bytes from [HL] and use them, plus A, as part of seed + ;;; in [BC] +seed: mvi e,4 ; 4 bytes +sloop: xra m + inx h + dcr e + jnz sloop + stax b + inx b + ret + ;;; Random number generator using XABC algorithm +rand: push h + lxi h,rnddat + inr m ; X++ + mov a,m ; X + inx h + xra m ; ^ C + inx h + xra m ; ^ A + mov m,a ; -> A + inx h + add m ; + B + mov m,a ; -> B + rar ; >>1 (ish) + dcx h + xra m ; ^ A + dcx h + add m ; + C + mov m,a ; -> C + pop h + ret + ;;; Print string to console using CP/M, saving all registers +puts: push h + push d + push b + push psw + mvi c,9 ; CP/M print string + call 5 + lxi d,nl ; Print a newline as well + mvi c,9 + call 5 + pop b + pop d + pop h + pop psw + ret +nl: db 13,10,'$' +target: db 'METHINKS IT IS LIKE A WEASEL$' +tgtsz: equ $-target +rnddat: ds 4 ; RNG state +copies: ds 1 ; Copies left to make +maxfit: ds 1 ; Best fitness seen +maxptr: ds 2 ; Pointer to copy with best fitness +parent: equ $ ; Store current parent here +kids: equ $+tgtsz ; Store mutated copies here diff --git a/Task/Evolutionary-algorithm/8086-Assembly/evolutionary-algorithm.8086 b/Task/Evolutionary-algorithm/8086-Assembly/evolutionary-algorithm.8086 index e38567385b..9b3c1c704f 100644 --- a/Task/Evolutionary-algorithm/8086-Assembly/evolutionary-algorithm.8086 +++ b/Task/Evolutionary-algorithm/8086-Assembly/evolutionary-algorithm.8086 @@ -1,123 +1,123 @@ - bits 16 - cpu 8086 -MRATE: equ 26 ; Mutation rate (MRATE/256) -COPIES: equ 100 ; Amount of copies to make -gettim: equ 02Ch ; MS-DOS get time function -pstr: equ 9 ; MS-DOS print string -section .text - org 100h - ;;; Use MS-DOS time to set random seed - mov ah,gettim - int 21h - mov [rnddat],cx - mov [rnddat+2],dx - ;;; Make first parent (random characters) - mov di,parent - mov cx,target.size-1 -getchr: call rndchr ; Get random character - stosb ; Store in parent - loop getchr - mov al,'$' ; Write string terminator - stosb - ;;; Main loop. -loop: mov bx,parent ; Print current parent - mov dx,bx - call puts - call fitnes ; Check fitness - test cl,cl ; If zero, we're done - jnz nxmut ; If not, do another mutation - ret ; Quit to DOS -nxmut: mov dl,0FFh ; DL = best fitness yet - mov di,kids ; Set DI to start of memory for children - mov ch,COPIES ; CH = amount of copies to make - xor bp,bp - ;;; Make copy, mutate, and test fitness -copy: mov bx,di ; Let BX = where next copy will go - call mutcpy ; Make the copy (and adjust DI) - call fitnes ; Check fitness - cmp cl,dl ; Is it better than the previous best one? - ja next ; If not, just do the next one, - mov dl,cl ; Otherwise, this is now the best one - lea bp,[di-target.size] ; Store a pointer to it in BP -next: dec ch ; One copy less - jnz copy ; Make another copy if we need to - mov si,bp ; We're done, the best child becomes - mov di,parent ; the parent for the next generation - mov cx,target.size - rep movsb - jmp loop ; Next generation - ;;; Make copy of parent, mutating as we go, and store at [DI] -mutcpy: mov si,parent -.loop: lodsb ; Get byte from parent - stosb ; Store in copy - cmp al,'$' ; Is it '$'? - je .out ; Then we're done - call rand ; Otherwise, should we mutate? - cmp al,MRATE - ja .loop ; If not, do next character - call rndchr ; But if so, get random character, - mov [di-1],al ; and overwrite the current character. - jmp .loop ; Then do the next character. -.out: ret - ;;; Get fitness of character in [BX] -fitnes: mov si,target - xor cl,cl ; Fitness -.loop: lodsb ; Get target character - cmp al,'$' ; Done? - je .out ; Then stop - cmp al,[bx] ; Equal to character under [BX]? - lahf ; Keep flags - inc bx ; Increment BX - sahf ; Restore flags (was al=[bx]?) - je .loop ; If equal, do next character - inc cx ; Otherwise, count this as a mismatch - jmp .loop -.out: ret - ;;; Generate random character, [A-Z] or space. -rndchr: call rand ; Get random number - and al,31 ; Lower five bits - cmp al,27 ; One of 27 characters? - jae rndchr ; If not, get new random number - add al,'A' ; Make uppercase letter - cmp al,'Z' ; More than 'Z'? - jbe .out ; If not, it's OK - mov al,' ' ; Otherwise, give a space -.out: ret - ;;; Random number generator using XABC algorithm - ;;; Returns random byte in AL -rand: push cx - push dx - mov cx,[rnddat] ; CH=X CL=A - mov dx,[rnddat+2] ; DH=B DL=C - inc ch ; X++ - xor cl,ch ; A ^= X - xor cl,dl ; A ^= C - add dh,cl ; B += A - mov al,dh ; C' = B - shr al,1 ; C' >>= 1 - xor al,cl ; C' ^= A - add al,dl ; C' += C - mov dl,al ; C = C' - mov [rnddat],cx - mov [rnddat+2],dx - pop dx - pop cx - ret - ;;; Print string in DX, plus a newline, saving registers -puts: push ax - push dx - mov ah,pstr - int 21h - mov dx,nl - int 21h - pop dx - pop ax - ret -section .data -nl: db 13,10,'$' -target: db 'METHINKS IT IS LIKE A WEASEL$' -.size: equ $-target -section .bss -rnddat: resb 4 ; RNG state -parent: resb target.size ; Place to store current parent -kids: resb COPIES*target.size ; Place to store children + bits 16 + cpu 8086 +MRATE: equ 26 ; Mutation rate (MRATE/256) +COPIES: equ 100 ; Amount of copies to make +gettim: equ 02Ch ; MS-DOS get time function +pstr: equ 9 ; MS-DOS print string +section .text + org 100h + ;;; Use MS-DOS time to set random seed + mov ah,gettim + int 21h + mov [rnddat],cx + mov [rnddat+2],dx + ;;; Make first parent (random characters) + mov di,parent + mov cx,target.size-1 +getchr: call rndchr ; Get random character + stosb ; Store in parent + loop getchr + mov al,'$' ; Write string terminator + stosb + ;;; Main loop. +loop: mov bx,parent ; Print current parent + mov dx,bx + call puts + call fitnes ; Check fitness + test cl,cl ; If zero, we're done + jnz nxmut ; If not, do another mutation + ret ; Quit to DOS +nxmut: mov dl,0FFh ; DL = best fitness yet + mov di,kids ; Set DI to start of memory for children + mov ch,COPIES ; CH = amount of copies to make + xor bp,bp + ;;; Make copy, mutate, and test fitness +copy: mov bx,di ; Let BX = where next copy will go + call mutcpy ; Make the copy (and adjust DI) + call fitnes ; Check fitness + cmp cl,dl ; Is it better than the previous best one? + ja next ; If not, just do the next one, + mov dl,cl ; Otherwise, this is now the best one + lea bp,[di-target.size] ; Store a pointer to it in BP +next: dec ch ; One copy less + jnz copy ; Make another copy if we need to + mov si,bp ; We're done, the best child becomes + mov di,parent ; the parent for the next generation + mov cx,target.size + rep movsb + jmp loop ; Next generation + ;;; Make copy of parent, mutating as we go, and store at [DI] +mutcpy: mov si,parent +.loop: lodsb ; Get byte from parent + stosb ; Store in copy + cmp al,'$' ; Is it '$'? + je .out ; Then we're done + call rand ; Otherwise, should we mutate? + cmp al,MRATE + ja .loop ; If not, do next character + call rndchr ; But if so, get random character, + mov [di-1],al ; and overwrite the current character. + jmp .loop ; Then do the next character. +.out: ret + ;;; Get fitness of character in [BX] +fitnes: mov si,target + xor cl,cl ; Fitness +.loop: lodsb ; Get target character + cmp al,'$' ; Done? + je .out ; Then stop + cmp al,[bx] ; Equal to character under [BX]? + lahf ; Keep flags + inc bx ; Increment BX + sahf ; Restore flags (was al=[bx]?) + je .loop ; If equal, do next character + inc cx ; Otherwise, count this as a mismatch + jmp .loop +.out: ret + ;;; Generate random character, [A-Z] or space. +rndchr: call rand ; Get random number + and al,31 ; Lower five bits + cmp al,27 ; One of 27 characters? + jae rndchr ; If not, get new random number + add al,'A' ; Make uppercase letter + cmp al,'Z' ; More than 'Z'? + jbe .out ; If not, it's OK + mov al,' ' ; Otherwise, give a space +.out: ret + ;;; Random number generator using XABC algorithm + ;;; Returns random byte in AL +rand: push cx + push dx + mov cx,[rnddat] ; CH=X CL=A + mov dx,[rnddat+2] ; DH=B DL=C + inc ch ; X++ + xor cl,ch ; A ^= X + xor cl,dl ; A ^= C + add dh,cl ; B += A + mov al,dh ; C' = B + shr al,1 ; C' >>= 1 + xor al,cl ; C' ^= A + add al,dl ; C' += C + mov dl,al ; C = C' + mov [rnddat],cx + mov [rnddat+2],dx + pop dx + pop cx + ret + ;;; Print string in DX, plus a newline, saving registers +puts: push ax + push dx + mov ah,pstr + int 21h + mov dx,nl + int 21h + pop dx + pop ax + ret +section .data +nl: db 13,10,'$' +target: db 'METHINKS IT IS LIKE A WEASEL$' +.size: equ $-target +section .bss +rnddat: resb 4 ; RNG state +parent: resb target.size ; Place to store current parent +kids: resb COPIES*target.size ; Place to store children diff --git a/Task/Evolutionary-algorithm/Ada/evolutionary-algorithm.adb b/Task/Evolutionary-algorithm/Ada/evolutionary-algorithm.ada similarity index 100% rename from Task/Evolutionary-algorithm/Ada/evolutionary-algorithm.adb rename to Task/Evolutionary-algorithm/Ada/evolutionary-algorithm.ada diff --git a/Task/Evolutionary-algorithm/Arturo/evolutionary-algorithm.arturo b/Task/Evolutionary-algorithm/Arturo/evolutionary-algorithm.arturo index a816314b35..06f157c7f5 100644 --- a/Task/Evolutionary-algorithm/Arturo/evolutionary-algorithm.arturo +++ b/Task/Evolutionary-algorithm/Arturo/evolutionary-algorithm.arturo @@ -1,5 +1,5 @@ target: "METHINKS IT IS LIKE A WEASEL" -alphabet: [' '] ++ @'A'..'Z' +alphabet: [` `] ++ @`A`..`Z` p: 0.05 c: 100 diff --git a/Task/Evolutionary-algorithm/AutoHotkey/evolutionary-algorithm.ahk b/Task/Evolutionary-algorithm/AutoHotkey/evolutionary-algorithm.ahk index f38f1ef32d..003524e349 100644 --- a/Task/Evolutionary-algorithm/AutoHotkey/evolutionary-algorithm.ahk +++ b/Task/Evolutionary-algorithm/AutoHotkey/evolutionary-algorithm.ahk @@ -2,55 +2,55 @@ output := "" target := "METHINKS IT IS LIKE A WEASEL" targetLen := StrLen(target) Loop, 26 - possibilities_%A_Index% := Chr(A_Index+64) ; A-Z + possibilities_%A_Index% := Chr(A_Index+64) ; A-Z possibilities_27 := " " C := 100 parent := "" Loop, %targetLen% { - Random, randomNum, 1, 27 + Random, randomNum, 1, 27 parent .= possibilities_%randomNum% } Loop, { - If (target = parent) - Break - If (Mod(A_Index,10) = 0) - output .= A_Index ": " parent ", fitness: " fitness(parent, target) "`n" - bestFit := 0 - Loop, %C% - If ((fitness := fitness(spawn := mutate(parent), target)) > bestFit) - bestSpawn := spawn , bestFit := fitness - parent := bestFit > fitness(parent, target) ? bestSpawn : parent - iter := A_Index + If (target = parent) + Break + If (Mod(A_Index,10) = 0) + output .= A_Index ": " parent ", fitness: " fitness(parent, target) "`n" + bestFit := 0 + Loop, %C% + If ((fitness := fitness(spawn := mutate(parent), target)) > bestFit) + bestSpawn := spawn , bestFit := fitness + parent := bestFit > fitness(parent, target) ? bestSpawn : parent + iter := A_Index } output .= parent ", " iter MsgBox, % output ExitApp mutate(parent) { - local output, replaceChar, newChar - output := "" - Loop, %targetLen% - { - Random, replaceChar, 0, 9 - If (replaceChar != 0) - output .= SubStr(parent, A_Index, 1) - else - { - Random, newChar, 1, 27 - output .= possibilities_%newChar% - } - } - Return output + local output, replaceChar, newChar + output := "" + Loop, %targetLen% + { + Random, replaceChar, 0, 9 + If (replaceChar != 0) + output .= SubStr(parent, A_Index, 1) + else + { + Random, newChar, 1, 27 + output .= possibilities_%newChar% + } + } + Return output } fitness(string, target) { - totalFit := 0 - Loop, % StrLen(string) - If (SubStr(string, A_Index, 1) = SubStr(target, A_Index, 1)) - totalFit++ - Return totalFit + totalFit := 0 + Loop, % StrLen(string) + If (SubStr(string, A_Index, 1) = SubStr(target, A_Index, 1)) + totalFit++ + Return totalFit } diff --git a/Task/Evolutionary-algorithm/C/evolutionary-algorithm-1.c b/Task/Evolutionary-algorithm/C/evolutionary-algorithm-1.c index 682c8e6ae6..1cf726bc37 100644 --- a/Task/Evolutionary-algorithm/C/evolutionary-algorithm-1.c +++ b/Task/Evolutionary-algorithm/C/evolutionary-algorithm-1.c @@ -12,56 +12,56 @@ const char tbl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ "; /* returns random integer from 0 to n - 1 */ int irand(int n) { - int r, rand_max = RAND_MAX - (RAND_MAX % n); - while((r = rand()) >= rand_max); - return r / (rand_max / n); + int r, rand_max = RAND_MAX - (RAND_MAX % n); + while((r = rand()) >= rand_max); + return r / (rand_max / n); } /* number of different chars between a and b */ int unfitness(const char *a, const char *b) { - int i, sum = 0; - for (i = 0; a[i]; i++) - sum += (a[i] != b[i]); - return sum; + int i, sum = 0; + for (i = 0; a[i]; i++) + sum += (a[i] != b[i]); + return sum; } /* each char of b has 1/MUTATE chance of differing from a */ void mutate(const char *a, char *b) { - int i; - for (i = 0; a[i]; i++) - b[i] = irand(MUTATE) ? a[i] : tbl[irand(CHOICE)]; + int i; + for (i = 0; a[i]; i++) + b[i] = irand(MUTATE) ? a[i] : tbl[irand(CHOICE)]; - b[i] = '\0'; + b[i] = '\0'; } int main() { - int i, best_i, unfit, best, iters = 0; - char specimen[COPIES][sizeof(target) / sizeof(char)]; + int i, best_i, unfit, best, iters = 0; + char specimen[COPIES][sizeof(target) / sizeof(char)]; - /* init rand string */ - for (i = 0; target[i]; i++) - specimen[0][i] = tbl[irand(CHOICE)]; - specimen[0][i] = 0; + /* init rand string */ + for (i = 0; target[i]; i++) + specimen[0][i] = tbl[irand(CHOICE)]; + specimen[0][i] = 0; - do { - for (i = 1; i < COPIES; i++) - mutate(specimen[0], specimen[i]); + do { + for (i = 1; i < COPIES; i++) + mutate(specimen[0], specimen[i]); - /* find best fitting string */ - for (best_i = i = 0; i < COPIES; i++) { - unfit = unfitness(target, specimen[i]); - if(unfit < best || !i) { - best = unfit; - best_i = i; - } - } + /* find best fitting string */ + for (best_i = i = 0; i < COPIES; i++) { + unfit = unfitness(target, specimen[i]); + if(unfit < best || !i) { + best = unfit; + best_i = i; + } + } - if (best_i) strcpy(specimen[0], specimen[best_i]); - printf("iter %d, score %d: %s\n", iters++, best, specimen[0]); - } while (best); + if (best_i) strcpy(specimen[0], specimen[best_i]); + printf("iter %d, score %d: %s\n", iters++, best, specimen[0]); + } while (best); - return 0; + return 0; } diff --git a/Task/Evolutionary-algorithm/COBOL/evolutionary-algorithm.cob b/Task/Evolutionary-algorithm/COBOL/evolutionary-algorithm.cobol similarity index 100% rename from Task/Evolutionary-algorithm/COBOL/evolutionary-algorithm.cob rename to Task/Evolutionary-algorithm/COBOL/evolutionary-algorithm.cobol diff --git a/Task/Evolutionary-algorithm/Ceylon/evolutionary-algorithm.ceylon b/Task/Evolutionary-algorithm/Ceylon/evolutionary-algorithm.ceylon index 4ff54da5dd..2c501ca07d 100644 --- a/Task/Evolutionary-algorithm/Ceylon/evolutionary-algorithm.ceylon +++ b/Task/Evolutionary-algorithm/Ceylon/evolutionary-algorithm.ceylon @@ -1,49 +1,49 @@ import ceylon.random { - - DefaultRandom + + DefaultRandom } shared void run() { - - value mutationRate = 0.05; - value childrenPerGeneration = 100; - value target = "METHINKS IT IS LIKE A WEASEL"; - value alphabet = {' ', *('A'..'Z')}; - value random = DefaultRandom(); - - value randomLetter => random.nextElement(alphabet); - - function fitness(String a, String b) => - count {for([c1, c2] in zipPairs(a, b)) c1 == c2}; - - function mutate(String string) => - String { - for(letter in string) - if(random.nextFloat() < mutationRate) - then randomLetter - else letter - }; - - function makeCopies(String string) => - {for(i in 1..childrenPerGeneration) mutate(string)}; - - function chooseFittest(String+ children) => - children - .map((String element) => element->fitness(element, target)) - .max(increasingItem) - .key; - - variable value parent = String {for(i in 1..target.size) randomLetter}; - variable value generationCount = 0; - function display() => print("``generationCount``: ``parent``"); - - display(); - while(parent != target) { - parent = chooseFittest(parent, *makeCopies(parent)); - generationCount++; - display(); - } - - print("mutated into target in ``generationCount`` generations!"); - + + value mutationRate = 0.05; + value childrenPerGeneration = 100; + value target = "METHINKS IT IS LIKE A WEASEL"; + value alphabet = {' ', *('A'..'Z')}; + value random = DefaultRandom(); + + value randomLetter => random.nextElement(alphabet); + + function fitness(String a, String b) => + count {for([c1, c2] in zipPairs(a, b)) c1 == c2}; + + function mutate(String string) => + String { + for(letter in string) + if(random.nextFloat() < mutationRate) + then randomLetter + else letter + }; + + function makeCopies(String string) => + {for(i in 1..childrenPerGeneration) mutate(string)}; + + function chooseFittest(String+ children) => + children + .map((String element) => element->fitness(element, target)) + .max(increasingItem) + .key; + + variable value parent = String {for(i in 1..target.size) randomLetter}; + variable value generationCount = 0; + function display() => print("``generationCount``: ``parent``"); + + display(); + while(parent != target) { + parent = chooseFittest(parent, *makeCopies(parent)); + generationCount++; + display(); + } + + print("mutated into target in ``generationCount`` generations!"); + } diff --git a/Task/Evolutionary-algorithm/Common-Lisp/evolutionary-algorithm-2.lisp b/Task/Evolutionary-algorithm/Common-Lisp/evolutionary-algorithm-2.lisp index 838aa4eaa5..0d38dbc62d 100644 --- a/Task/Evolutionary-algorithm/Common-Lisp/evolutionary-algorithm-2.lisp +++ b/Task/Evolutionary-algorithm/Common-Lisp/evolutionary-algorithm-2.lisp @@ -1,23 +1,23 @@ (defun unfit (s1 s2) (loop for a across s1 - for b across s2 count(char/= a b))) + for b across s2 count(char/= a b))) (defun mutate (str alp n) ; n: number of chars to mutate (let ((out (copy-seq str))) (dotimes (i n) (setf (char out (random (length str))) - (char alp (random (length alp))))) + (char alp (random (length alp))))) out)) (defun evolve (changes alpha target) (loop for gen from 1 - with f2 with s2 - with str = (mutate target alpha 100) - with fit = (unfit target str) - while (plusp fit) do - (setf s2 (mutate str alpha changes) - f2 (unfit target s2)) - (when (> fit f2) - (setf str s2 fit f2) - (format t "~5d: ~a (~d)~%" gen str fit)))) + with f2 with s2 + with str = (mutate target alpha 100) + with fit = (unfit target str) + while (plusp fit) do + (setf s2 (mutate str alpha changes) + f2 (unfit target s2)) + (when (> fit f2) + (setf str s2 fit f2) + (format t "~5d: ~a (~d)~%" gen str fit)))) (evolve 1 " ABCDEFGHIJKLMNOPQRSTUVWXYZ" "METHINKS IT IS LIKE A WEASEL") diff --git a/Task/Evolutionary-algorithm/Crystal/evolutionary-algorithm.cr b/Task/Evolutionary-algorithm/Crystal/evolutionary-algorithm.cr deleted file mode 100644 index b38ba00a51..0000000000 --- a/Task/Evolutionary-algorithm/Crystal/evolutionary-algorithm.cr +++ /dev/null @@ -1,33 +0,0 @@ -TARGET = "METHINKS IT IS LIKE A WEASEL".chars -ALPHABET = ('A'..'Z').to_a << ' ' -C = 200 -RATE = 0.05 - -def fitness (current, target) - current.zip(target).count {|a, b| a == b } / current.size -end - -def mutate (current, rate) - current.map {|ch| Random.rand < rate ? ALPHABET.sample : ch } -end - -def next_parent (current, target, c, rate) - candidate = current - candidate_fitness = fitness(current, target) - c.times do - child = mutate(current, rate) - child_fitness = fitness(child, target) - if child_fitness > candidate_fitness - candidate, candidate_fitness = child, child_fitness - end - end - candidate -end - -parent = TARGET.map { ALPHABET.sample } - -(1..).each do |gen| - printf "%4d %s\n", gen, parent.join - break if parent == TARGET - parent = next_parent(parent, TARGET, C, RATE) -end diff --git a/Task/Evolutionary-algorithm/EasyLang/evolutionary-algorithm.easy b/Task/Evolutionary-algorithm/EasyLang/evolutionary-algorithm.easy index c7b8c72d26..1b22da0ea7 100644 --- a/Task/Evolutionary-algorithm/EasyLang/evolutionary-algorithm.easy +++ b/Task/Evolutionary-algorithm/EasyLang/evolutionary-algorithm.easy @@ -11,7 +11,7 @@ func fitness trial$ . func$ mutate parent$ . for c$ in strchars parent$ if randomf < P - res$ &= abc$[random 1 len abc$[]] + res$ &= abc$[randint len abc$[]] else res$ &= c$ . @@ -19,7 +19,7 @@ func$ mutate parent$ . return res$ . for i to len target$ - parent$ &= abc$[random 1 len abc$[]] + parent$ &= abc$[randint len abc$[]] . while fitness parent$ > 0 copies$[] = [ ] diff --git a/Task/Evolutionary-algorithm/EchoLisp/evolutionary-algorithm.l b/Task/Evolutionary-algorithm/EchoLisp/evolutionary-algorithm.l index 5dcec7d3ee..33ebb8503a 100644 --- a/Task/Evolutionary-algorithm/EchoLisp/evolutionary-algorithm.l +++ b/Task/Evolutionary-algorithm/EchoLisp/evolutionary-algorithm.l @@ -3,36 +3,36 @@ (vector-push ALPHABET " ") (define (fitness source target) ;; score >=0, best is 0 - (for/sum [(s source)(t target)] - (if (= s t) 0 1))) - + (for/sum [(s source)(t target)] + (if (= s t) 0 1))) + (define (mutate source rate) - (for/string [(s source)] - (if (< (random) rate) [ALPHABET (random 27)] s))) - + (for/string [(s source)] + (if (< (random) rate) [ALPHABET (random 27)] s))) + (define (select parent target rate copies (copy) (score)) - (define best (fitness parent target)) - (define selected parent) - (for [(i copies)] - (set! copy (mutate parent rate)) - (set! score (fitness copy target)) - (when (< score best) - (set! selected copy) - (set! best score))) - selected ) - + (define best (fitness parent target)) + (define selected parent) + (for [(i copies)] + (set! copy (mutate parent rate)) + (set! score (fitness copy target)) + (when (< score best) + (set! selected copy) + (set! best score))) + selected ) + (define MUTATION_RATE 0.05) ;; 5% chances to change (define COPIES 100) (define TARGET "METHINKS IT IS LIKE A WEASEL") (define (task (rate MUTATION_RATE) (copies COPIES) (target TARGET) (score)) - (define parent ;; random source - (for/string + (define parent ;; random source + (for/string [(i (string-length target))] [ALPHABET (random 27)])) - - (for [(i (in-naturals))] - (set! score (fitness parent target)) - (writeln i parent 'score score) - #:break (zero? score) - (set! parent (select parent target rate copies)) - )) + + (for [(i (in-naturals))] + (set! score (fitness parent target)) + (writeln i parent 'score score) + #:break (zero? score) + (set! parent (select parent target rate copies)) + )) diff --git a/Task/Evolutionary-algorithm/Elena/evolutionary-algorithm.elena b/Task/Evolutionary-algorithm/Elena/evolutionary-algorithm.elena index b26b81a6d0..39a52319eb 100644 --- a/Task/Evolutionary-algorithm/Elena/evolutionary-algorithm.elena +++ b/Task/Evolutionary-algorithm/Elena/evolutionary-algorithm.elena @@ -8,7 +8,7 @@ const string AllowedCharacters = " ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const int C = 100; const real P = 0.05r; -rnd = Random; +rnd = randomGenerator; randomChar = AllowedCharacters[rnd.nextInt(AllowedCharacters.Length)]; @@ -19,17 +19,17 @@ extension evoHelper = 0.repeatTill(self).selectBy::(x => randomChar).summarize(new StringWriter()); fitnessOf(s) - = self.zipBy(s, (a,b => (a==b) ? 1 : 0)).summarize(new Integer()).toInt(); + = self.zipBy(s, (a,b => a==b ? 1 : 0)).summarize(new Integer()).toInt(); mutate(p) - = self.selectBy::(ch => (rnd.nextReal() <= p) ? randomChar : ch).summarize(new StringWriter()); + = self.selectBy::(ch => rnd.nextReal() <= p ? randomChar : ch).summarize(new StringWriter()); } class EvoAlgorithm : Enumerator { - object _target; - object? _current; - object _variantCount; + object _target; + object _current; + object _variantCount; constructor new(s,count) { @@ -62,15 +62,15 @@ class EvoAlgorithm : Enumerator enumerable() => _target; } -public Program() +public program() { var attempt := new Integer(); EvoAlgorithm.new(Target,C).forEach::(current) { - Console + console .printPaddingLeft(10,"#",attempt.append(1)) .printLine(" ",current," fitness: ",current.fitnessOf(Target)) }; - Console.readChar() + console.readChar() } diff --git a/Task/Evolutionary-algorithm/Elixir/evolutionary-algorithm.ex b/Task/Evolutionary-algorithm/Elixir/evolutionary-algorithm.elixir similarity index 100% rename from Task/Evolutionary-algorithm/Elixir/evolutionary-algorithm.ex rename to Task/Evolutionary-algorithm/Elixir/evolutionary-algorithm.elixir diff --git a/Task/Evolutionary-algorithm/Euphoria/evolutionary-algorithm.eu b/Task/Evolutionary-algorithm/Euphoria/evolutionary-algorithm.euphoria similarity index 100% rename from Task/Evolutionary-algorithm/Euphoria/evolutionary-algorithm.eu rename to Task/Evolutionary-algorithm/Euphoria/evolutionary-algorithm.euphoria diff --git a/Task/Evolutionary-algorithm/Fortran/evolutionary-algorithm-1.f b/Task/Evolutionary-algorithm/Fortran/evolutionary-algorithm-1.f index 4cbf77fb0d..e16722f652 100644 --- a/Task/Evolutionary-algorithm/Fortran/evolutionary-algorithm-1.f +++ b/Task/Evolutionary-algorithm/Fortran/evolutionary-algorithm-1.f @@ -1,135 +1,135 @@ !*************************************************************************************************** - module evolve_routines + module evolve_routines !*************************************************************************************************** - implicit none - - !the target string: - character(len=*),parameter :: targ = 'METHINKS IT IS LIKE A WEASEL' - - contains + implicit none + + !the target string: + character(len=*),parameter :: targ = 'METHINKS IT IS LIKE A WEASEL' + + contains !*************************************************************************************************** - + !******************************************************************** - pure elemental function fitness(member) result(n) + pure elemental function fitness(member) result(n) !******************************************************************** ! The fitness function. The lower the value, the better the match. ! It is zero if they are identical. !******************************************************************** - - implicit none - integer :: n - character(len=*),intent(in) :: member - - integer :: i - - n=0 - do i=1,len(targ) - n = n + abs( ichar(targ(i:i)) - ichar(member(i:i)) ) - end do - + + implicit none + integer :: n + character(len=*),intent(in) :: member + + integer :: i + + n=0 + do i=1,len(targ) + n = n + abs( ichar(targ(i:i)) - ichar(member(i:i)) ) + end do + !******************************************************************** - end function fitness + end function fitness !******************************************************************** - + !******************************************************************** - pure elemental subroutine mutate(member,factor) + pure elemental subroutine mutate(member,factor) !******************************************************************** ! mutate a member of the population. !******************************************************************** - - implicit none - character(len=*),intent(inout) :: member !population member - real,intent(in) :: factor !mutation factor - - integer,parameter :: n_chars = 27 !number of characters in set - character(len=n_chars),parameter :: chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ' - - real :: rnd_val - integer :: i,j,n - - n = len(member) - - do i=1,n - rnd_val = rand() - if (rnd_val<=factor) then !mutate this element - rnd_val = rand() - j = int(rnd_val*n_chars)+1 !an integer between 1 and n_chars - member(i:i) = chars(j:j) - end if - end do - + + implicit none + character(len=*),intent(inout) :: member !population member + real,intent(in) :: factor !mutation factor + + integer,parameter :: n_chars = 27 !number of characters in set + character(len=n_chars),parameter :: chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ' + + real :: rnd_val + integer :: i,j,n + + n = len(member) + + do i=1,n + rnd_val = rand() + if (rnd_val<=factor) then !mutate this element + rnd_val = rand() + j = int(rnd_val*n_chars)+1 !an integer between 1 and n_chars + member(i:i) = chars(j:j) + end if + end do + !******************************************************************** - end subroutine mutate + end subroutine mutate !******************************************************************** !*************************************************************************************************** - end module evolve_routines + end module evolve_routines !*************************************************************************************************** !*************************************************************************************************** - program evolve + program evolve !*************************************************************************************************** ! The main program !*************************************************************************************************** - use evolve_routines - - implicit none - - !Tuning parameters: - integer,parameter :: seed = 12345 !random number generator seed - integer,parameter :: max_iter = 10000 !maximum number of iterations - integer,parameter :: population_size = 200 !size of the population - real,parameter :: factor = 0.04 ![0,1] mutation factor - integer,parameter :: iprint = 5 !print every iprint iterations - - !local variables: - integer :: i,iter - integer,dimension(1) :: i_best - character(len=len(targ)),dimension(population_size) :: population - - !initialize random number generator: - call srand(seed) - - !create initial population: - ! [the first element of the population will hold the best member] - population(1) = 'PACQXJB CQPWEYKSVDCIOUPKUOJY' !initial guess - iter=0 - - write(*,'(A10,A30,A10)') 'iter','best','fitness' - write(*,'(I10,A30,I10)') iter,population(1),fitness(population(1)) - - do - - iter = iter + 1 !iteration counter - - !write the iteration: - if (mod(iter,iprint)==0) write(*,'(I10,A30,I10)') iter,population(1),fitness(population(1)) - - !check exit conditions: - if ( iter>max_iter .or. fitness(population(1))==0 ) exit - - !copy best member and mutate: - population = population(1) - do i=2,population_size - call mutate(population(i),factor) - end do - - !select the new best population member: - ! [the best has the lowest value] - i_best = minloc(fitness(population)) - population(1) = population(i_best(1)) - - end do - - !write the last iteration: - if (mod(iter,iprint)/=0) write(*,'(I10,A30,I10)') iter,population(1),fitness(population(1)) - - if (iter>max_iter) then - write(*,*) 'No solution found.' - else - write(*,*) 'Solution found.' - end if - + use evolve_routines + + implicit none + + !Tuning parameters: + integer,parameter :: seed = 12345 !random number generator seed + integer,parameter :: max_iter = 10000 !maximum number of iterations + integer,parameter :: population_size = 200 !size of the population + real,parameter :: factor = 0.04 ![0,1] mutation factor + integer,parameter :: iprint = 5 !print every iprint iterations + + !local variables: + integer :: i,iter + integer,dimension(1) :: i_best + character(len=len(targ)),dimension(population_size) :: population + + !initialize random number generator: + call srand(seed) + + !create initial population: + ! [the first element of the population will hold the best member] + population(1) = 'PACQXJB CQPWEYKSVDCIOUPKUOJY' !initial guess + iter=0 + + write(*,'(A10,A30,A10)') 'iter','best','fitness' + write(*,'(I10,A30,I10)') iter,population(1),fitness(population(1)) + + do + + iter = iter + 1 !iteration counter + + !write the iteration: + if (mod(iter,iprint)==0) write(*,'(I10,A30,I10)') iter,population(1),fitness(population(1)) + + !check exit conditions: + if ( iter>max_iter .or. fitness(population(1))==0 ) exit + + !copy best member and mutate: + population = population(1) + do i=2,population_size + call mutate(population(i),factor) + end do + + !select the new best population member: + ! [the best has the lowest value] + i_best = minloc(fitness(population)) + population(1) = population(i_best(1)) + + end do + + !write the last iteration: + if (mod(iter,iprint)/=0) write(*,'(I10,A30,I10)') iter,population(1),fitness(population(1)) + + if (iter>max_iter) then + write(*,*) 'No solution found.' + else + write(*,*) 'Solution found.' + end if + !*************************************************************************************************** - end program evolve + end program evolve !*************************************************************************************************** diff --git a/Task/Evolutionary-algorithm/FutureBasic/evolutionary-algorithm.basic b/Task/Evolutionary-algorithm/FutureBasic/evolutionary-algorithm.basic deleted file mode 100644 index 36c9824034..0000000000 --- a/Task/Evolutionary-algorithm/FutureBasic/evolutionary-algorithm.basic +++ /dev/null @@ -1,80 +0,0 @@ -include "NSLog.incl" - -begin globals - CFStringRef target - CFStringRef alphabet - NSInteger c - CGFloat p -end globals - -target = @"METHINKS IT IS LIKE A WEASEL" -alphabet = @"ABCDEFGHIJKLMNOPQRSTUVWXYZ " -c = 100 -p = 0.06 - -toolbox fn arc4random_uniform( UInt32 upperbound ) = UInt32 - -local fn Fitness( s as CFStringRef ) as NSInteger - NSInteger score = len(target) - for NSInteger i = 0 to len(target) -1 - if ( ucc(s,i) == ucc(target,i) ) then score-- - next -end fn = score - -local fn Mutate( s as CFStringRef, rate as CGFloat ) as CFStringRef - CFMutableStringRef result = fn MutableStringWithString( @"" ) - for NSInteger i = 0 to len(s) -1 - if ( ( fn arc4random_uniform(100) / 100.0) < rate ) - NSInteger idx = fn arc4random_uniform( (UInt32)len(alphabet) ) - MutableStringAppendFormat( result, @"%C", ucc( alphabet, idx ) ) - else - MutableStringAppendFormat( result, @"%C", ucc( s, i ) ) - end if - next -end fn = result - -local fn RandomString( length as NSInteger ) as CFStringRef - CFMutableStringRef result = fn MutableStringWithString( @"" ) - for NSInteger i = 0 to length -1 - NSInteger idx = fn arc4random_uniform( (UInt32)len(alphabet) ) - MutableStringAppendFormat( result, @"%C", ucc( alphabet, idx ) ) - next -end fn = result - -void local fn PrintStep( stepNum as NSInteger, s as CFStringRef, fit as NSInteger, result as CFMutableStringRef ) - MutableStringAppendFormat( result, @"%3ld: %@ Distance: %ld\n", (long)stepNum, s, (long)fit ) -end fn - -local fn EvolveString as CFStringRef - CFMutableStringRef result = fn MutableStringNew - CFStringRef parent = fn RandomString( len(target) ) - fn PrintStep( 0, parent, fn Fitness(parent), result ) - - NSInteger stepNum = 0 - while ( fn StringIsEqual( parent, target ) == NO ) - NSInteger bestFitness = len(target) + 1 - CFStringRef bestChild = @"" - CFStringRef child - NSInteger fit - - for NSInteger i = 0 to c -1 - child = fn Mutate( parent, p ) - fit = fn Fitness( child ) - if ( fit < bestFitness ) - bestFitness = fit - bestChild = child - end if - next - parent = bestChild - stepNum++ - fn PrintStep( stepNum, parent, bestFitness, result ) - wend -end fn = result - -CFTimeInterval t : t = fn CACurrentMediaTime -CFStringRef result : result = fn EvolveString -NSLog( @"\nCompute time: %.3f ms\n",(fn CACurrentMediaTime-t)*1000 ) -NSLog( @"%@", result ) -NSLogScrollToTop - -HandleEvents diff --git a/Task/Evolutionary-algorithm/Icon/evolutionary-algorithm-1.icon b/Task/Evolutionary-algorithm/Icon/evolutionary-algorithm-1.icon index b601df08e4..039ac0694b 100644 --- a/Task/Evolutionary-algorithm/Icon/evolutionary-algorithm-1.icon +++ b/Task/Evolutionary-algorithm/Icon/evolutionary-algorithm-1.icon @@ -1,51 +1,51 @@ global target, chars, parent, C, M, current_fitness procedure fitness(s) - fit := 0 - #Increment the fitness for every position in the string s that matches the target - every i := 1 to *target & s[i] == target[i] do fit +:= 1 - return fit + fit := 0 + #Increment the fitness for every position in the string s that matches the target + every i := 1 to *target & s[i] == target[i] do fit +:= 1 + return fit end procedure mutate(s) - #If a random number between 0 and 1 is inside the bounds of mutation randomly alter a character in the string - if (?0 <= M) then ?s := ?chars - return s + #If a random number between 0 and 1 is inside the bounds of mutation randomly alter a character in the string + if (?0 <= M) then ?s := ?chars + return s end procedure generation() - population := [ ] - next_parent := "" - next_fitness := -1 + population := [ ] + next_parent := "" + next_fitness := -1 - #Create the next population - every 1 to C do push(population, mutate(parent)) - #Find the member of the population with highest fitness, or use the last one inspected - every x := !population & (xf := fitness(x)) > next_fitness do { - next_parent := x - next_fitness := xf - } - - parent := next_parent - - return next_fitness + #Create the next population + every 1 to C do push(population, mutate(parent)) + #Find the member of the population with highest fitness, or use the last one inspected + every x := !population & (xf := fitness(x)) > next_fitness do { + next_parent := x + next_fitness := xf + } + + parent := next_parent + + return next_fitness end procedure main() - target := "METHINKS IT IS LIKE A WEASEL" #Our target string - chars := &ucase ++ " " #Set of usable characters - parent := "" & every 1 to *target do parent ||:= ?chars #The universal common ancestor! - current_fitness := fitness(parent) #The best fitness we have so far + target := "METHINKS IT IS LIKE A WEASEL" #Our target string + chars := &ucase ++ " " #Set of usable characters + parent := "" & every 1 to *target do parent ||:= ?chars #The universal common ancestor! + current_fitness := fitness(parent) #The best fitness we have so far - C := 50 #Population size in each generation - M := 0.5 #Mutation rate per individual in a generation - - gen := 1 - #Until current fitness reaches a score of perfect match with the target string keep generating new populations - until ((current_fitness := generation()) = *target) do { + C := 50 #Population size in each generation + M := 0.5 #Mutation rate per individual in a generation + + gen := 1 + #Until current fitness reaches a score of perfect match with the target string keep generating new populations + until ((current_fitness := generation()) = *target) do { write(gen || " " || current_fitness || " " || parent) gen +:= 1 - } - write("At generation " || gen || " we found a string with perfect fitness at " || current_fitness || " reading: " || parent) + } + write("At generation " || gen || " we found a string with perfect fitness at " || current_fitness || " reading: " || parent) end diff --git a/Task/Evolutionary-algorithm/Icon/evolutionary-algorithm-2.icon b/Task/Evolutionary-algorithm/Icon/evolutionary-algorithm-2.icon index 543e63dbd6..f80f1d6a42 100644 --- a/Task/Evolutionary-algorithm/Icon/evolutionary-algorithm-2.icon +++ b/Task/Evolutionary-algorithm/Icon/evolutionary-algorithm-2.icon @@ -1,7 +1,7 @@ -(var c 100 ;number of children in each generation - p 0.05) ;mutation probability +(var c 100) ;number of children in each generation +(var p 0.05) ;mutation probability -(var target "METHINKS IT IS LIKE A WEASEL" - tsize (len target)) +(var target "METHINKS IT IS LIKE A WEASEL") +(var tsize (len target)) (var alphabet (to-vec " ABCDEFGHIJLKLMNOPQRSTUVWXYZ")) diff --git a/Task/Evolutionary-algorithm/JavaScript/evolutionary-algorithm-1.js b/Task/Evolutionary-algorithm/JavaScript/evolutionary-algorithm-1.js index 3162d81a5a..42c57caec0 100644 --- a/Task/Evolutionary-algorithm/JavaScript/evolutionary-algorithm-1.js +++ b/Task/Evolutionary-algorithm/JavaScript/evolutionary-algorithm-1.js @@ -68,8 +68,8 @@ if (!Array.prototype.map) { /* ------------------------------------- Generator ------------------------------------- * Generates a fixed length gene sequence via a gene strategy object. * The gene strategy object must have two functions: - * - "create": returns create a new gene - * - "mutate(existingGene)": returns mutation of an existing gene + * - "create": returns create a new gene + * - "mutate(existingGene)": returns mutation of an existing gene */ function Generator(length, mutationRate, geneStrategy) { this.size = length; @@ -119,9 +119,9 @@ Population.prototype.spawn = function (parent) { /* ------------------------------------- Evolver ------------------------------------- * Attempts to converge a population based a fitness strategy object. * The fitness strategy object must have three function - * - "score(individual)": returns a score for an individual. - * - "compare(scoreA, scoreB)": return true if scoreA is better (ie more fit) then scoreB - * - "done( score )": return true if score is acceptable (ie we have successfully converged). + * - "score(individual)": returns a score for an individual. + * - "compare(scoreA, scoreB)": return true if scoreA is better (ie more fit) then scoreB + * - "done( score )": return true if score is acceptable (ie we have successfully converged). */ function Evolver(size, generator, fitness) { this.done = false; diff --git a/Task/Evolutionary-algorithm/Julia/evolutionary-algorithm.jl b/Task/Evolutionary-algorithm/Julia/evolutionary-algorithm.julia similarity index 100% rename from Task/Evolutionary-algorithm/Julia/evolutionary-algorithm.jl rename to Task/Evolutionary-algorithm/Julia/evolutionary-algorithm.julia diff --git a/Task/Evolutionary-algorithm/Kotlin/evolutionary-algorithm.kts b/Task/Evolutionary-algorithm/Kotlin/evolutionary-algorithm.kotlin similarity index 100% rename from Task/Evolutionary-algorithm/Kotlin/evolutionary-algorithm.kts rename to Task/Evolutionary-algorithm/Kotlin/evolutionary-algorithm.kotlin diff --git a/Task/Evolutionary-algorithm/Lua/evolutionary-algorithm.lua b/Task/Evolutionary-algorithm/Lua/evolutionary-algorithm.lua index 7d955f14ff..2d3d272d00 100644 --- a/Task/Evolutionary-algorithm/Lua/evolutionary-algorithm.lua +++ b/Task/Evolutionary-algorithm/Lua/evolutionary-algorithm.lua @@ -3,37 +3,37 @@ local alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ " local c, p = 100, 0.06 local function fitness(s) - local score = #target - for i = 1,#target do - if s:sub(i,i) == target:sub(i,i) then score = score - 1 end - end - return score + local score = #target + for i = 1,#target do + if s:sub(i,i) == target:sub(i,i) then score = score - 1 end + end + return score end local function mutate(s, rate) - local result, idx = "" - for i = 1,#s do - if math.random() < rate then - idx = math.random(#alphabet) - result = result .. alphabet:sub(idx,idx) - else - result = result .. s:sub(i,i) - end - end - return result, fitness(result) + local result, idx = "" + for i = 1,#s do + if math.random() < rate then + idx = math.random(#alphabet) + result = result .. alphabet:sub(idx,idx) + else + result = result .. s:sub(i,i) + end + end + return result, fitness(result) end local function randomString(len) - local result, idx = "" - for i = 1,len do - idx = math.random(#alphabet) - result = result .. alphabet:sub(idx,idx) - end - return result + local result, idx = "" + for i = 1,len do + idx = math.random(#alphabet) + result = result .. alphabet:sub(idx,idx) + end + return result end local function printStep(step, s, fit) - print(string.format("%04d: ", step) .. s .. " [" .. fit .."]") + print(string.format("%04d: ", step) .. s .. " [" .. fit .."]") end math.randomseed(os.time()) @@ -42,11 +42,11 @@ printStep(0, parent, fitness(parent)) local step = 0 while parent ~= target do - local bestFitness, bestChild, child, fitness = #target + 1 - for i = 1,c do - child, fitness = mutate(parent, p) - if fitness < bestFitness then bestFitness, bestChild = fitness, child end - end - parent, step = bestChild, step + 1 - printStep(step, parent, bestFitness) + local bestFitness, bestChild, child, fitness = #target + 1 + for i = 1,c do + child, fitness = mutate(parent, p) + if fitness < bestFitness then bestFitness, bestChild = fitness, child end + end + parent, step = bestChild, step + 1 + printStep(step, parent, bestFitness) end diff --git a/Task/Evolutionary-algorithm/MATLAB/evolutionary-algorithm-4.m b/Task/Evolutionary-algorithm/MATLAB/evolutionary-algorithm-4.m index 4bafdb7261..8fbb9f76e6 100644 --- a/Task/Evolutionary-algorithm/MATLAB/evolutionary-algorithm-4.m +++ b/Task/Evolutionary-algorithm/MATLAB/evolutionary-algorithm-4.m @@ -5,7 +5,7 @@ Gen: 4 | Fitness: 322 | KI8M5LAS�GJ�IS�SP�@)D�V@ JCP Gen: 5 | Fitness: 295 | UAUR08AS�GJ�IS�8HG*�+�=C?UB( Gen: 6 | Fitness: 259 | VCUQH35S�HR4.L�ISJQ%J�OC*T=E -Gen: 7 | Fitness: 226 | LFB8GPET(LODKQ�KQBQGF Gen: 9 | Fitness: 159 | N8R7?SOU�NO$OK O?K?!;�MB?QHG Gen: 10 | Fitness: 146 | TGN@EQR4)PS%IS#TFJQ%A!U>BVLI diff --git a/Task/Evolutionary-algorithm/Nanoquery/evolutionary-algorithm.nanoquery b/Task/Evolutionary-algorithm/Nanoquery/evolutionary-algorithm.nanoquery index d022b35839..d695b42ab6 100644 --- a/Task/Evolutionary-algorithm/Nanoquery/evolutionary-algorithm.nanoquery +++ b/Task/Evolutionary-algorithm/Nanoquery/evolutionary-algorithm.nanoquery @@ -8,77 +8,77 @@ rand = new(Random) // returns a random string of the specified length def rand_string(length) - global tbl - global rand + global tbl + global rand - ret = "" + ret = "" - for i in range(1, length) - ret += tbl[rand.getInt(len(tbl))] - end + for i in range(1, length) + ret += tbl[rand.getInt(len(tbl))] + end - return ret + return ret end // gets the fitness of a given string def fitness(string) - global target - fit = 0 + global target + fit = 0 - for i in range(0, len(string) - 1) - if string[i] != target[i] - fit -= 1 - end - end + for i in range(0, len(string) - 1) + if string[i] != target[i] + fit -= 1 + end + end - return fit + return fit end // mutates the specified string with a chance of 0.09 by default def mutate(string) - global chance - global rand - global tbl - mutated = string + global chance + global rand + global tbl + mutated = string - for i in range(0, len(mutated) - 1) - if rand.getFloat() <= chance - mutated[i] = tbl[rand.getInt(len(tbl))] - end - end + for i in range(0, len(mutated) - 1) + if rand.getFloat() <= chance + mutated[i] = tbl[rand.getInt(len(tbl))] + end + end - return mutated + return mutated end // a function to find the index of the string with the best fitness def most_fit(strlist) - global target + global target + + best_score = -(len(target) + 1) + best_index = 0 + + for j in range(0, len(strlist) - 1) + fit = fitness(strlist[j]) + if fit > best_score + best_index = j + best_score = fit + end + end - best_score = -(len(target) + 1) - best_index = 0 - - for j in range(0, len(strlist) - 1) - fit = fitness(strlist[j]) - if fit > best_score - best_index = j - best_score = fit - end - end - - return {best_index, best_score} + return {best_index, best_score} end parent = rand_string(len(target)); iter = 1 while parent != target - children = {} + children = {} - for i in range(1, 30) - children.append(mutate(parent)) - end + for i in range(1, 30) + children.append(mutate(parent)) + end - fit = most_fit(children) - parent = children[fit[0]] - print format("iter %d, score %d: %s\n", iter, fit[1], parent) + fit = most_fit(children) + parent = children[fit[0]] + print format("iter %d, score %d: %s\n", iter, fit[1], parent) - iter += 1 + iter += 1 end diff --git a/Task/Evolutionary-algorithm/OCaml/evolutionary-algorithm.ml b/Task/Evolutionary-algorithm/OCaml/evolutionary-algorithm.ocaml similarity index 100% rename from Task/Evolutionary-algorithm/OCaml/evolutionary-algorithm.ml rename to Task/Evolutionary-algorithm/OCaml/evolutionary-algorithm.ocaml diff --git a/Task/Evolutionary-algorithm/PARI-GP/evolutionary-algorithm.parigp b/Task/Evolutionary-algorithm/PARI-GP/evolutionary-algorithm.parigp index 8fbb6b82fa..e33c81e794 100644 --- a/Task/Evolutionary-algorithm/PARI-GP/evolutionary-algorithm.parigp +++ b/Task/Evolutionary-algorithm/PARI-GP/evolutionary-algorithm.parigp @@ -4,43 +4,43 @@ dist(u,v)=sum(i=1,min(#u,#v),u[i]!=v[i])+abs(#u-#v); letter()=my(r=random(27)); if(r==26, " ", Strchr(r+65)); insert(v,x=letter())= { - my(r=random(#v+1)); - if(r==0, return(concat([x],v))); - if(r==#v, return(concat(v,[x]))); - concat(concat(v[1..r],[x]),v[r+1..#v]); + my(r=random(#v+1)); + if(r==0, return(concat([x],v))); + if(r==#v, return(concat(v,[x]))); + concat(concat(v[1..r],[x]),v[r+1..#v]); } delete(v)= { - if(#v<2, return([])); - my(r=random(#v)+1); - if(r==1, return(v[2..#v])); - if(r==#v, return(v[1..#v-1])); - concat(v[1..r-1],v[r+1..#v]); + if(#v<2, return([])); + my(r=random(#v)+1); + if(r==1, return(v[2..#v])); + if(r==#v, return(v[1..#v-1])); + concat(v[1..r-1],v[r+1..#v]); } mutate(s,rateM,rateI,rateD)= { - my(v=Vec(s)); - if(random(1.)best, best=t; parent=v[i]) - ); - ct++ - ); - print(parent" "fitness(parent)); - ct; + my(parent=concat(vector(#target,i,letter())),ct=0); + while(parent != target, + print(parent" "fitness(parent)); + my(v=vector(C,i,mutate(parent,rate,0,0)),best,t); + best=fitness(parent=v[1]); + for(i=2,C, + t=fitness(v[i]); + if(t>best, best=t; parent=v[i]) + ); + ct++ + ); + print(parent" "fitness(parent)); + ct; } evolve(35,.05) diff --git a/Task/Evolutionary-algorithm/Pascal/evolutionary-algorithm.pas b/Task/Evolutionary-algorithm/Pascal/evolutionary-algorithm.pas index 821c4a0a6d..97f638a700 100644 --- a/Task/Evolutionary-algorithm/Pascal/evolutionary-algorithm.pas +++ b/Task/Evolutionary-algorithm/Pascal/evolutionary-algorithm.pas @@ -1,108 +1,108 @@ PROGRAM EVOLUTION (OUTPUT); CONST - TARGET = 'METHINKS IT IS LIKE A WEASEL'; - COPIES = 100; (* 100 children in each generation. *) - RATE = 1000; (* About one character in 1000 will be a mutation. *) + TARGET = 'METHINKS IT IS LIKE A WEASEL'; + COPIES = 100; (* 100 children in each generation. *) + RATE = 1000; (* About one character in 1000 will be a mutation. *) TYPE - STRLIST = ARRAY [1..COPIES] OF STRING; + STRLIST = ARRAY [1..COPIES] OF STRING; FUNCTION RANDCHAR : CHAR; (* Generate a random letter or space. *) VAR RANDNUM : INTEGER; BEGIN - RANDNUM := RANDOM(27); - IF RANDNUM = 26 THEN - RANDCHAR := ' ' - ELSE - RANDCHAR := CHR(RANDNUM + ORD('A')) + RANDNUM := RANDOM(27); + IF RANDNUM = 26 THEN + RANDCHAR := ' ' + ELSE + RANDCHAR := CHR(RANDNUM + ORD('A')) END; FUNCTION RANDSTR (SIZE : INTEGER) : STRING; (* Generate a random string. *) VAR - N : INTEGER; - S : STRING; + N : INTEGER; + S : STRING; BEGIN - S := ''; - FOR N := 1 TO SIZE DO - INSERT(RANDCHAR, S, 1); - RANDSTR := S + S := ''; + FOR N := 1 TO SIZE DO + INSERT(RANDCHAR, S, 1); + RANDSTR := S END; FUNCTION FITNESS (CANDIDATE, GOAL : STRING) : INTEGER; (* Count the number of correct letters in the correct places *) VAR N, MATCHES : INTEGER; BEGIN - MATCHES := 0; - FOR N := 1 TO LENGTH(GOAL) DO - IF CANDIDATE[N] = GOAL[N] THEN - MATCHES := MATCHES + 1; - FITNESS := MATCHES + MATCHES := 0; + FOR N := 1 TO LENGTH(GOAL) DO + IF CANDIDATE[N] = GOAL[N] THEN + MATCHES := MATCHES + 1; + FITNESS := MATCHES END; FUNCTION MUTATE (RATE : INTEGER; S : STRING) : STRING; (* Randomly alter a string. Characters change with probability 1/RATE. *) VAR - N : INTEGER; - CHANGE : BOOLEAN; + N : INTEGER; + CHANGE : BOOLEAN; BEGIN - FOR N := 1 TO LENGTH(TARGET) DO - BEGIN - CHANGE := RANDOM(RATE) = 0; - IF CHANGE THEN - S[N] := RANDCHAR - END; - MUTATE := S + FOR N := 1 TO LENGTH(TARGET) DO + BEGIN + CHANGE := RANDOM(RATE) = 0; + IF CHANGE THEN + S[N] := RANDCHAR + END; + MUTATE := S END; PROCEDURE REPRODUCE (RATE : INTEGER; PARENT : STRING; VAR CHILDREN : STRLIST); (* Generate children with random mutations. *) VAR N : INTEGER; BEGIN - FOR N := 1 TO COPIES DO - CHILDREN[N] := MUTATE(RATE, PARENT) + FOR N := 1 TO COPIES DO + CHILDREN[N] := MUTATE(RATE, PARENT) END; FUNCTION FITTEST(CHILDREN : STRLIST; GOAL : STRING) : STRING; (* Measure the fitness of each child and return the fittest. *) (* If multiple children equally match the target, then return the first. *) VAR - MATCHES, MOST_MATCHES, BEST_INDEX, N : INTEGER; + MATCHES, MOST_MATCHES, BEST_INDEX, N : INTEGER; BEGIN - MOST_MATCHES := 0; - BEST_INDEX := 1; - FOR N := 1 TO COPIES DO - BEGIN - MATCHES := FITNESS(CHILDREN[N], GOAL); - IF MATCHES > MOST_MATCHES THEN - BEGIN - MOST_MATCHES := MATCHES; - BEST_INDEX := N - END - END; - FITTEST := CHILDREN[BEST_INDEX] + MOST_MATCHES := 0; + BEST_INDEX := 1; + FOR N := 1 TO COPIES DO + BEGIN + MATCHES := FITNESS(CHILDREN[N], GOAL); + IF MATCHES > MOST_MATCHES THEN + BEGIN + MOST_MATCHES := MATCHES; + BEST_INDEX := N + END + END; + FITTEST := CHILDREN[BEST_INDEX] END; VAR - PARENT, BEST_CHILD : STRING; - CHILDREN : STRLIST; - GENERATIONS : INTEGER; + PARENT, BEST_CHILD : STRING; + CHILDREN : STRLIST; + GENERATIONS : INTEGER; BEGIN - RANDOMIZE; - GENERATIONS := 0; - PARENT := RANDSTR(LENGTH(TARGET)); - WHILE NOT (PARENT = TARGET) DO - BEGIN - IF (GENERATIONS MOD 100) = 0 THEN WRITELN(PARENT); - GENERATIONS := GENERATIONS + 1; - REPRODUCE(RATE, PARENT, CHILDREN); - BEST_CHILD := FITTEST(CHILDREN, TARGET); - IF FITNESS(PARENT, TARGET) < FITNESS(BEST_CHILD, TARGET) THEN - PARENT := BEST_CHILD - END; - WRITE('The string was matched in '); - WRITELN(GENERATIONS, ' generations.') + RANDOMIZE; + GENERATIONS := 0; + PARENT := RANDSTR(LENGTH(TARGET)); + WHILE NOT (PARENT = TARGET) DO + BEGIN + IF (GENERATIONS MOD 100) = 0 THEN WRITELN(PARENT); + GENERATIONS := GENERATIONS + 1; + REPRODUCE(RATE, PARENT, CHILDREN); + BEST_CHILD := FITTEST(CHILDREN, TARGET); + IF FITNESS(PARENT, TARGET) < FITNESS(BEST_CHILD, TARGET) THEN + PARENT := BEST_CHILD + END; + WRITE('The string was matched in '); + WRITELN(GENERATIONS, ' generations.') END. diff --git a/Task/Evolutionary-algorithm/PascalABC.NET/evolutionary-algorithm.pas b/Task/Evolutionary-algorithm/PascalABC.NET/evolutionary-algorithm.pas deleted file mode 100644 index 9b763a6711..0000000000 --- a/Task/Evolutionary-algorithm/PascalABC.NET/evolutionary-algorithm.pas +++ /dev/null @@ -1,24 +0,0 @@ -const - Target = 'METHINKS IT IS LIKE A WEASEL'; - Alphabet = ' ABCDEFGHIJLKLMNOPQRSTUVWXYZ'; - P = 0.05; - C = 100; - -function negFitness(trial: string) := - trial.Zip(Target, (x, y) -> (if x = y then 0 else 1)).Sum; - -function mutate(parent: string) := - parent.Aggregate('', (mut, ch) -> mut + (if Random(1.0) < P then Alphabet.RandomElement else ch)); - -begin - var parent := (1..Target.Length).Aggregate('', (p, x)-> p + Alphabet.RandomElement); - var i := 0; - while parent <> Target do - begin - var copies := ArrGen(C, x -> mutate(parent)); - parent := copies.Aggregate((p, x) -> (if negFitness(x) < negFitness(p) then x else p)); - if i mod 10 = 0 then Println(i, ' ', parent); - i += 1; - end; - Println(i, ' ', parent) -end. diff --git a/Task/Evolutionary-algorithm/Pony/evolutionary-algorithm-1.pony b/Task/Evolutionary-algorithm/Pony/evolutionary-algorithm-1.pony index 5a092513f6..0c7a28f78e 100644 --- a/Task/Evolutionary-algorithm/Pony/evolutionary-algorithm-1.pony +++ b/Task/Evolutionary-algorithm/Pony/evolutionary-algorithm-1.pony @@ -2,10 +2,10 @@ use "random" actor Main let _env: Env - let _rand: MT = MT // Mersenne Twister + let _rand: MT = MT // Mersenne Twister let _target: String = "METHINKS IT IS LIKE A WEASEL" let _possibilities: String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ " - let _c: U16 = 100 // number of spawn per generation + let _c: U16 = 100 // number of spawn per generation let _min_mutate_rate: F64 = 0.09 let _perfect_fitness: USize = _target.size() var _parent: String = "" diff --git a/Task/Evolutionary-algorithm/Prolog/evolutionary-algorithm.pro b/Task/Evolutionary-algorithm/Prolog/evolutionary-algorithm.pro index d3f325a38f..2733079aa6 100644 --- a/Task/Evolutionary-algorithm/Prolog/evolutionary-algorithm.pro +++ b/Task/Evolutionary-algorithm/Prolog/evolutionary-algorithm.pro @@ -1,7 +1,7 @@ target("METHINKS IT IS LIKE A WEASEL"). rndAlpha(64, 32). % Generate a single random character -rndAlpha(P, P). % 32 is a space, and 65->90 are upper case +rndAlpha(P, P). % 32 is a space, and 65->90 are upper case rndAlpha(Ch) :- random(N), P is truncate(64+(N*27)), !, rndAlpha(P, Ch). rndTxt(0, []). % Generate some random text (fixed length) @@ -17,16 +17,16 @@ mutate(P, [H|Txt], [H|Mut]) :- random(R), R < P, !, mutate(P, Txt, Mut). mutate(P, [_|Txt], [M|Mut]) :- rndAlpha(M), !, mutate(P, Txt, Mut). weasel(Tries, _, _, mutation(0, Result)) :- % No differences=success - format('~w~4|:~w~3| - ~s\n', [Tries, 0, Result]). -weasel(Tries, Chance, Target, mutation(S, Value)) :- % output progress - format('~w~4|:~w~3| - ~s\n', [Tries, S, Value]), !, % and call again - weasel(Tries, Chance, Target, Value). + format('~w~4|:~w~3| - ~s\n', [Tries, 0, Result]). +weasel(Tries, Chance, Target, mutation(S, Value)) :- % output progress + format('~w~4|:~w~3| - ~s\n', [Tries, S, Value]), !, % and call again + weasel(Tries, Chance, Target, Value). weasel(Tries, Chance, Target, Start) :- - findall(mutation(S,M), % Generate 30 mutations, select the best. - (between(1, 30, _), mutate(Chance, Start, M), score(M,S,Target)), - Mutations), % List of 30 mutations and their scores - sort(Mutations, [Best|_]), succ(Tries, N), - !, weasel(N, Chance, Target, Best). + findall(mutation(S,M), % Generate 30 mutations, select the best. + (between(1, 30, _), mutate(Chance, Start, M), score(M,S,Target)), + Mutations), % List of 30 mutations and their scores + sort(Mutations, [Best|_]), succ(Tries, N), + !, weasel(N, Chance, Target, Best). weasel :- % Chance->probability for a mutation, T=Target, Start=initial text - target(T), length(T, Len), rndTxt(Len, Start), Chance is 1 - (1/(Len+1)), - !, weasel(0, Chance, T, Start). + target(T), length(T, Len), rndTxt(Len, Start), Chance is 1 - (1/(Len+1)), + !, weasel(0, Chance, T, Start). diff --git a/Task/Evolutionary-algorithm/Rebol/evolutionary-algorithm.rebol b/Task/Evolutionary-algorithm/Rebol/evolutionary-algorithm.rebol deleted file mode 100644 index a2ce3d5ab3..0000000000 --- a/Task/Evolutionary-algorithm/Rebol/evolutionary-algorithm.rebol +++ /dev/null @@ -1,65 +0,0 @@ -Rebol [ - title: "Rosetta code: Evolutionary algorithm" - file: %Evolutionary_algorithm.r3 - url: https://rosettacode.org/wiki/Evolutionary_algorithm - note: "Based on Red language solution" -] - -evolve: function/with [ - target [string!] "target phrase to evolve toward" - childs [integer!] "number of offspring per generation" - rate [number!] "per-character mutation probability (0.0..1.0)" -][ - ;; create initial random parent of same length as target - parent: clear "" - repeat i length? target [ - append parent random/only alphabet - ] - ;; main loop: generate children, select fittest, repeat until exact match - mutations: 0 - while [parent != target] [ - clear children - repeat i childs [ - append children mutate parent rate ;; produce a mutated child from parent - ] - sort/compare children :sort-fitness ;; sort children by fitness (best first) - parent: first children ;; select best child as new parent - ++ mutations - prin #"^M" ;; carriage return to overwrite line - prin parent - ] - prin #"^M" ;; move to line start - print parent ;; final perfect match - mutations -][ - alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ " ;; allowed gene pool (uppercase letters + space) - children: copy [] ;; reusable buffer for a generation's children - - ;; compute closeness of 'string' to 'target' as Hamming distance (lower is better) - fitness: function [string] [ - sum: 0 - repeat i length? string [ - if string/:i <> target/:i [ ++ sum ] ;; count mismatched positions - ] - sum - ] - - ;; return a mutated copy of 'string'; each position mutates with probability 'rate' - mutate: function [string rate] [ - result: copy string - repeat i length? result [ - if rate > random 1.0 [ - result/:i: random/only alphabet ;; replace char with random from alphabet - ] - ] - result - ] - - ;; comparison function for sorting: a < b if fitness(a) < fitness(b) - sort-fitness: function [a b] [lesser? fitness a fitness b] -] - -;; run the evolution demo -random/seed 1 -m: evolve "METHINKS IT IS LIKE A WEASEL" 20 0.05 -print ["Target found using" as-yellow m "mutations."] diff --git a/Task/Evolutionary-algorithm/Rust/evolutionary-algorithm.rs b/Task/Evolutionary-algorithm/Rust/evolutionary-algorithm.rust similarity index 100% rename from Task/Evolutionary-algorithm/Rust/evolutionary-algorithm.rs rename to Task/Evolutionary-algorithm/Rust/evolutionary-algorithm.rust diff --git a/Task/Evolutionary-algorithm/Scheme/evolutionary-algorithm.scm b/Task/Evolutionary-algorithm/Scheme/evolutionary-algorithm.ss similarity index 100% rename from Task/Evolutionary-algorithm/Scheme/evolutionary-algorithm.scm rename to Task/Evolutionary-algorithm/Scheme/evolutionary-algorithm.ss diff --git a/Task/Evolutionary-algorithm/SequenceL/evolutionary-algorithm-1.sequencel b/Task/Evolutionary-algorithm/SequenceL/evolutionary-algorithm-1.sequencel index e1ab201b68..836c3aba77 100644 --- a/Task/Evolutionary-algorithm/SequenceL/evolutionary-algorithm-1.sequencel +++ b/Task/Evolutionary-algorithm/SequenceL/evolutionary-algorithm-1.sequencel @@ -5,19 +5,19 @@ AllowedChars := " ABCDEFGHIJKLMNOPQRSTUVWXYZ"; initializeParent(randChars(1)) := AllowedChars[randChars]; Fitness(target(1), current(1)) := - let - fit[i] := true when target[i] = current[i]; - in - size(fit); - + let + fit[i] := true when target[i] = current[i]; + in + size(fit); + Mutate(letter(0), rate(0), randRate(0), randChar(0)) := - letter when randRate > rate - else - AllowedChars[randChar]; + letter when randRate > rate + else + AllowedChars[randChar]; evolve(target(1), parent(1), C(0), P(0), rateRands(2), charRands(2)) := - let - mutations[i] := Mutate(parent, P, rateRands[i], charRands[i]) foreach i within 1 ... C; - fitnesses := Fitness(target, mutations); - in - mutations[firstIndexOf(fitnesses, vectorMax(fitnesses))]; + let + mutations[i] := Mutate(parent, P, rateRands[i], charRands[i]) foreach i within 1 ... C; + fitnesses := Fitness(target, mutations); + in + mutations[firstIndexOf(fitnesses, vectorMax(fitnesses))]; diff --git a/Task/Evolutionary-algorithm/SequenceL/evolutionary-algorithm-2.sequencel b/Task/Evolutionary-algorithm/SequenceL/evolutionary-algorithm-2.sequencel index 75782dae66..3dc141f523 100644 --- a/Task/Evolutionary-algorithm/SequenceL/evolutionary-algorithm-2.sequencel +++ b/Task/Evolutionary-algorithm/SequenceL/evolutionary-algorithm-2.sequencel @@ -6,45 +6,45 @@ using namespace std; int main(int argc, char** argv) { - int threads = 0; + int threads = 0; - char* targetString = "METHINKS IT IS LIKE A WEASEL"; - if(argc > 1) targetString = argv[1]; - int C = 100; - if(argc > 2) C = atoi(argv[2]); - SL_FLOAT P = 0.05; - if(argc > 3) P = atof(argv[3]); - int seed = time(NULL); - if(argc > 4) seed = atoi(argv[4]); + char* targetString = "METHINKS IT IS LIKE A WEASEL"; + if(argc > 1) targetString = argv[1]; + int C = 100; + if(argc > 2) C = atoi(argv[2]); + SL_FLOAT P = 0.05; + if(argc > 3) P = atof(argv[3]); + int seed = time(NULL); + if(argc > 4) seed = atoi(argv[4]); - int targetDims[] = {strlen(targetString), 0}; - Sequence target((void*)targetString, targetDims); + int targetDims[] = {strlen(targetString), 0}; + Sequence target((void*)targetString, targetDims); - sl_init(threads); + sl_init(threads); - Sequence parent; - Sequence newParent; - Sequence parentRands; - sl_create(seed++, 1, 27, target.size(), threads, parentRands); - sl_initializeParent(parentRands, threads, parent); + Sequence parent; + Sequence newParent; + Sequence parentRands; + sl_create(seed++, 1, 27, target.size(), threads, parentRands); + sl_initializeParent(parentRands, threads, parent); - Sequence< Sequence > charRands; - Sequence< Sequence > rateRands; + Sequence< Sequence > charRands; + Sequence< Sequence > rateRands; - cout << "Start:\t" << parent << endl; - for(int i = 1; !(parent == target); i++) - { - sl_create(seed++, 1, 27, C, target.size(), threads, charRands); - sl_create(seed++, 0.0, 1.0, C, target.size(), threads, rateRands); + cout << "Start:\t" << parent << endl; + for(int i = 1; !(parent == target); i++) + { + sl_create(seed++, 1, 27, C, target.size(), threads, charRands); + sl_create(seed++, 0.0, 1.0, C, target.size(), threads, rateRands); - sl_evolve(target, parent, C, P, rateRands, charRands, threads, newParent); - parent = newParent; + sl_evolve(target, parent, C, P, rateRands, charRands, threads, newParent); + parent = newParent; - cout << "#" << i << ":\t" << parent << endl; - } - cout << "End:\t" << parent << endl; + cout << "#" << i << ":\t" << parent << endl; + } + cout << "End:\t" << parent << endl; - sl_done(); + sl_done(); - return 0; + return 0; } diff --git a/Task/Evolutionary-algorithm/Tcl/evolutionary-algorithm-1.tcl b/Task/Evolutionary-algorithm/Tcl/evolutionary-algorithm-1.tcl index 98e4050b03..30d954617d 100644 --- a/Task/Evolutionary-algorithm/Tcl/evolutionary-algorithm-1.tcl +++ b/Task/Evolutionary-algorithm/Tcl/evolutionary-algorithm-1.tcl @@ -21,7 +21,7 @@ proc fitness s { global target set count 0 foreach c1 $s c2 $target { - if {$c1 eq $c2} {incr count} + if {$c1 eq $c2} {incr count} } return [expr {$count/double([llength $target])}] } @@ -32,14 +32,14 @@ proc mutateRate {parent} { proc mutate {rate} { global charset parent foreach c $parent { - lappend result [expr {rand() <= $rate ? randchar($charset) : $c}] + lappend result [expr {rand() <= $rate ? randchar($charset) : $c}] } return $result } proc que {} { global iterations parent puts [format "#%-4i, fitness %4.1f%%, '%s'" \ - $iterations [expr {[fitness $parent]*100}] [join $parent {}]] + $iterations [expr {[fitness $parent]*100}] [join $parent {}]] } while {$parent ne $target} { @@ -47,7 +47,7 @@ while {$parent ne $target} { if {!([incr iterations] % 100)} que set copies [list [list $parent [fitness $parent]]] for {set i 0} {$i < $C} {incr i} { - lappend copies [list [set copy [mutate $rate]] [fitness $copy]] + lappend copies [list [set copy [mutate $rate]] [fitness $copy]] } set parent [lindex [lsort -real -decreasing -index 1 $copies] 0 0] } diff --git a/Task/Evolutionary-algorithm/Tcl/evolutionary-algorithm-2.tcl b/Task/Evolutionary-algorithm/Tcl/evolutionary-algorithm-2.tcl index c6f4858a44..0a794b47c6 100644 --- a/Task/Evolutionary-algorithm/Tcl/evolutionary-algorithm-2.tcl +++ b/Task/Evolutionary-algorithm/Tcl/evolutionary-algorithm-2.tcl @@ -13,7 +13,7 @@ set C 100 proc fitnessByEquality {target s} { set count 0 foreach c1 $s c2 $target { - if {$c1 eq $c2} {incr count} + if {$c1 eq $c2} {incr count} } return [expr {$count / double([llength $target])}] } @@ -29,7 +29,7 @@ proc mutationRate {individual} { # Mutate a string at a particular rate (per character) proc mutate {parent rate} { foreach c $parent { - lappend child [expr {rand() <= $rate ? randchar() : $c}] + lappend child [expr {rand() <= $rate ? randchar() : $c}] } return $child } @@ -37,7 +37,7 @@ proc mutate {parent rate} { # Pretty printer proc prettyPrint {iterations parent} { puts [format "#%-4i, fitness %5.1f%%, '%s'" $iterations \ - [expr {[fitness $parent]*100}] [join $parent {}]] + [expr {[fitness $parent]*100}] [join $parent {}]] } # The evolutionary algorithm itself @@ -48,18 +48,18 @@ proc evolve {initialString} { set parent [split $initialString {}] for {set iterations 0} {[fitness $parent] < 1} {incr iterations} { - set rate [mutationRate $parent] + set rate [mutationRate $parent] - if {$iterations % 100 == 0} { - prettyPrint $iterations $parent - } + if {$iterations % 100 == 0} { + prettyPrint $iterations $parent + } - set copies [list [list $parent [fitness $parent]]] - for {set i 0} {$i < $C} {incr i} { - lappend copies [list \ - [set copy [mutate $parent $rate]] [fitness $copy]] - } - set parent [lindex [lsort -real -decreasing -index 1 $copies] 0 0] + set copies [list [list $parent [fitness $parent]]] + for {set i 0} {$i < $C} {incr i} { + lappend copies [list \ + [set copy [mutate $parent $rate]] [fitness $copy]] + } + set parent [lindex [lsort -real -decreasing -index 1 $copies] 0 0] } puts "" prettyPrint $iterations $parent diff --git a/Task/Evolutionary-algorithm/VBScript/evolutionary-algorithm.vbs b/Task/Evolutionary-algorithm/VBScript/evolutionary-algorithm.vb similarity index 100% rename from Task/Evolutionary-algorithm/VBScript/evolutionary-algorithm.vbs rename to Task/Evolutionary-algorithm/VBScript/evolutionary-algorithm.vb diff --git a/Task/Evolutionary-algorithm/Zig/evolutionary-algorithm.zig b/Task/Evolutionary-algorithm/Zig/evolutionary-algorithm.zig deleted file mode 100644 index 46c9e63f24..0000000000 --- a/Task/Evolutionary-algorithm/Zig/evolutionary-algorithm.zig +++ /dev/null @@ -1,114 +0,0 @@ -const std = @import("std"); -const math = std.math; -const print = std.debug.print; - -pub fn main() !void { - const target = "METHINKS IT IS LIKE A WEASEL"; - const copies: usize = 100; - const mutation_rate: u32 = 20; // 1/20 = 0.05 = 5% - - var prng = std.Random.DefaultPrng.init(@as(u64, @intCast(std.time.milliTimestamp()))); - const rng = prng.random(); - - // Generate first sentence, mutating each character - const start = try mutate(rng, target, 1, std.heap.page_allocator); // 1/1 = 1 = 100% - - print("{s}\n", .{target}); - print("{s}\n", .{start}); - - _ = try evolve(rng, target, start, copies, mutation_rate, std.heap.page_allocator); -} - -/// Evolution algorithm -/// -/// Evolves `parent` to match `target`. Returns the number of evolutions performed. -fn evolve( - rng: std.Random, - target: []const u8, - parent: []const u8, - copies: usize, - mutation_rate: u32, - allocator: std.mem.Allocator, -) !usize { - var counter: usize = 0; - var parent_fitness: usize = target.len + 1; - var current_parent = try allocator.dupe(u8, parent); - defer allocator.free(current_parent); - - while (true) { - counter += 1; - - var best_fitness: usize = std.math.maxInt(usize); - const best_sentence = try allocator.alloc(u8, target.len); - - for (0..copies) |_| { - // Copy and mutate a new sentence - const sentence = try mutate(rng, current_parent, mutation_rate, allocator); - defer allocator.free(sentence); - - // Find the fitness of the new mutation - const current_fitness = fitness(target, sentence); - - if (current_fitness < best_fitness) { - best_fitness = current_fitness; - @memcpy( best_sentence, sentence); - } - } - - // If the best mutation of this generation is better than `parent` then "the fittest - // survives" and the next parent becomes the best of this generation. - if (best_fitness < parent_fitness) { - allocator.free(current_parent); - current_parent = best_sentence; - parent_fitness = best_fitness; - print("{s} : generation {} with fitness {}\n", .{ current_parent, counter, best_fitness }); - - if (best_fitness == 0) { - return counter; - } - } else { - allocator.free(best_sentence); - } - } -} - -/// Computes the fitness of a sentence against a target string, returning the number of -/// incorrect characters. -fn fitness(target: []const u8, sentence: []const u8) usize { - var count: usize = 0; - for (sentence, 0..) |c, i| { - if (c != target[i]) { - count += 1; - } - } - return count; -} - -/// Mutation algorithm. -/// -/// It mutates each character of a string, according to a `mutation_rate`. -fn mutate( - rng: std.Random, - sentence: []const u8, - mutation_rate: u32, - allocator: std.mem.Allocator, -) ![]u8 { - var result = try allocator.alloc(u8, sentence.len); - - for (sentence, 0..) |c, i| { - if (rng.int(u32) % mutation_rate == 0) { - result[i] = randomChar(rng); - } else { - result[i] = c; - } - } - - return result; -} - -/// Generates a random letter or space. -fn randomChar(rng: std.Random) u8 { - // Returns a value in the range [A, Z] + an extra slot for the space character. - const c = rng.intRangeAtMost(u8, 'A', 'Z' + 1); - return if (c == 'Z' + 1) ' ' else c; -} diff --git a/Task/Evolutionary-algorithm/Zkl/evolutionary-algorithm.zkl b/Task/Evolutionary-algorithm/Zkl/evolutionary-algorithm.zkl index 0b9d38526e..67c2e69115 100644 --- a/Task/Evolutionary-algorithm/Zkl/evolutionary-algorithm.zkl +++ b/Task/Evolutionary-algorithm/Zkl/evolutionary-algorithm.zkl @@ -9,6 +9,6 @@ fcn mutate(s){ s.apply(fcn(c){ if((0.0).random(1) < P) rnd() else c }) } parent := target.len().pump(String,rnd); // random string of "A..Z " gen:=0; do{ // mutate C copies of parent and pick the fittest parent = (0).pump(C,List,T(Void,parent),mutate) - .reduce(fcn(a,b){ if(fitness(a) + constant U0 = 0, + U1 = 1 -integer count = 0 + integer count = 0 -procedure baz() - count += 1 - if count=1 then - throw(U0,{{"any",{{"thing"},"you"}},"like"}) - else - throw(U1) - end if -end procedure + procedure baz() + count += 1 + if count=1 then + throw(U0,{{"any",{{"thing"},"you"}},"like"}) + else + throw(U1) + end if + end procedure -procedure bar() - baz() -end procedure + procedure bar() + baz() + end procedure -procedure foo() - for i=1 to 2 do - try - bar() - catch e - if e[E_CODE]=U0 then - ?e[E_USER] - else - throw(e) -- (terminates) - end if - end try - puts(1,"still running...\n") - end for - puts(1,"not still running...\n") -end procedure + procedure foo() + for i=1 to 2 do + try + bar() + catch e + if e[E_CODE]=U0 then + ?e[E_USER] + else + throw(e) -- (terminates) + end if + end try + puts(1,"still running...\n") + end for + puts(1,"not still running...\n") + end procedure -foo() + foo() + - print obj - print @"no exception" - end try - - catch ( e ) // handle exception - print : print @"" - print e - end catch - - finally // finally is always executed - print : print @"" - - // ... cleanup - - end finally -end fn - -fn DoSomething - -HandleEvents diff --git a/Task/Exceptions/FutureBasic/exceptions-2.basic b/Task/Exceptions/FutureBasic/exceptions-2.basic deleted file mode 100644 index 203d2eb6c3..0000000000 --- a/Task/Exceptions/FutureBasic/exceptions-2.basic +++ /dev/null @@ -1,15 +0,0 @@ -void local fn ThrowException - ExceptionRef e = fn ExceptionWithName( @"Oops!", @"Something went wrong", NULL ) - - try - throw e - end try - - catch (e) - print fn ExceptionName( e ), fn ExceptionReason( e ) - end catch -end fn - -fn ThrowException - -HandleEvents diff --git a/Task/Exceptions/Julia/exceptions.jl b/Task/Exceptions/Julia/exceptions.julia similarity index 100% rename from Task/Exceptions/Julia/exceptions.jl rename to Task/Exceptions/Julia/exceptions.julia diff --git a/Task/Exceptions/Kotlin/exceptions.kts b/Task/Exceptions/Kotlin/exceptions.kotlin similarity index 100% rename from Task/Exceptions/Kotlin/exceptions.kts rename to Task/Exceptions/Kotlin/exceptions.kotlin diff --git a/Task/Exceptions/Langur/exceptions-1.langur b/Task/Exceptions/Langur/exceptions-1.langur index d9858c6b98..a61a70b482 100644 --- a/Task/Exceptions/Langur/exceptions-1.langur +++ b/Task/Exceptions/Langur/exceptions-1.langur @@ -1,7 +1,7 @@ throw "not a math exception" -catch[e] { - if e'cat == "math" { +catch[.e] { + if .e'cat == "math" { # change result... } else { # rethrow the exception diff --git a/Task/Exceptions/Langur/exceptions-3.langur b/Task/Exceptions/Langur/exceptions-3.langur index 6a5d424c46..e3e28e19f6 100644 --- a/Task/Exceptions/Langur/exceptions-3.langur +++ b/Task/Exceptions/Langur/exceptions-3.langur @@ -1,3 +1,3 @@ -val safediv = fn(x number, y number) { x / y ; catch : 0 } -safediv(7, 7) # 1 -safediv(7, 0) # 0 +val .safediv = fn(.x, .y) { .x / .y ; catch : 0 } +.safediv(7, 7) # 1 +.safediv(7, 0) # 0 diff --git a/Task/Exceptions/Lua/exceptions-2.lua b/Task/Exceptions/Lua/exceptions-2.lua index 064945f28b..9590ae5df0 100644 --- a/Task/Exceptions/Lua/exceptions-2.lua +++ b/Task/Exceptions/Lua/exceptions-2.lua @@ -6,8 +6,6 @@ end -- 'status' is false if 'throw_error' threw an error -- otherwise, when everything went well, it will be true. --- 'errmsg' contains the error message, plus filename --- and line number of where the error occurred - -local status, errmsg = pcall(throw_error) +-- 'errmsg' contains the error message, plus filename and line number of where the error occured +status, errmsg = pcall(throw_error) print("errmsg = ", errmsg) diff --git a/Task/Exceptions/Lua/exceptions-3.lua b/Task/Exceptions/Lua/exceptions-3.lua index ed58b6092d..b2db587ba0 100644 --- a/Task/Exceptions/Lua/exceptions-3.lua +++ b/Task/Exceptions/Lua/exceptions-3.lua @@ -1,10 +1,8 @@ -function throw_error_with_arg(arg) - error(string.format("Whoops! argument = %s", arg)) +function throw_error_with_argment(argument) + error(string.format("Whoops! argument = %s", argument)) -- won't ever appear, due to previous error() call return "hello!" end -local status, errmsg = pcall(throw_error_with_arg, "foobar 123") -if (status ~= 0) then - print("errmsg = ", errmsg) -end +status, errmsg = pcall(throw_error_with_argment, "foobar 123") +print("errmsg = ", errmsg) diff --git a/Task/Exceptions/Lua/exceptions-4.lua b/Task/Exceptions/Lua/exceptions-4.lua index fc6c18b0d0..f182968d75 100644 --- a/Task/Exceptions/Lua/exceptions-4.lua +++ b/Task/Exceptions/Lua/exceptions-4.lua @@ -1,10 +1,6 @@ -function throw_error_with_arg(arg) +function throw_error_with_argment(argument) return "hello!" end -local status, result = pcall(throw_error_with_arg, "foobar 123") -if (status ~= 0) - print("function returned ", result, ", but had errors.") -else - print("result = ", result) -end +status, errmsg = pcall(throw_error_with_argment, "foobar 123") +print("errmsg = ", errmsg) diff --git a/Task/Exceptions/OCaml/exceptions-1.ml b/Task/Exceptions/OCaml/exceptions-1.ocaml similarity index 100% rename from Task/Exceptions/OCaml/exceptions-1.ml rename to Task/Exceptions/OCaml/exceptions-1.ocaml diff --git a/Task/Exceptions/OCaml/exceptions-2.ml b/Task/Exceptions/OCaml/exceptions-2.ocaml similarity index 100% rename from Task/Exceptions/OCaml/exceptions-2.ml rename to Task/Exceptions/OCaml/exceptions-2.ocaml diff --git a/Task/Exceptions/OCaml/exceptions-3.ml b/Task/Exceptions/OCaml/exceptions-3.ocaml similarity index 100% rename from Task/Exceptions/OCaml/exceptions-3.ml rename to Task/Exceptions/OCaml/exceptions-3.ocaml diff --git a/Task/Exceptions/PascalABC.NET/exceptions-1.pas b/Task/Exceptions/PascalABC.NET/exceptions-1.pas deleted file mode 100644 index 3234ceef1c..0000000000 --- a/Task/Exceptions/PascalABC.NET/exceptions-1.pas +++ /dev/null @@ -1 +0,0 @@ -type MyException = class(Exception) end; diff --git a/Task/Exceptions/PascalABC.NET/exceptions-2.pas b/Task/Exceptions/PascalABC.NET/exceptions-2.pas deleted file mode 100644 index d48f94c6ed..0000000000 --- a/Task/Exceptions/PascalABC.NET/exceptions-2.pas +++ /dev/null @@ -1 +0,0 @@ -raise new MyException; diff --git a/Task/Exceptions/PascalABC.NET/exceptions-3.pas b/Task/Exceptions/PascalABC.NET/exceptions-3.pas deleted file mode 100644 index 15454868bd..0000000000 --- a/Task/Exceptions/PascalABC.NET/exceptions-3.pas +++ /dev/null @@ -1,6 +0,0 @@ -try - ... -except - on e: MyException do - statement -end; diff --git a/Task/Exceptions/Pluto/exceptions.pluto b/Task/Exceptions/Pluto/exceptions.pluto deleted file mode 100644 index 654a1a1a78..0000000000 --- a/Task/Exceptions/Pluto/exceptions.pluto +++ /dev/null @@ -1,22 +0,0 @@ -local function get_day_no(day) - -- Throws an error if day is invalid. - return switch day:lower() do - case "monday" -> 1 - case "tuesday" -> 2 - case "wednesday" -> 3 - case "thursday" -> 4 - case "friday" -> 5 - case "saturday" -> 6 - case "sunday" -> 7 - default -> error($"'{day}' is not a valid day in English.") - end -end - -for {"thursday", "jeudi"} as day do - local ok, res = pcall(get_day_no, day) - if ok then - print($"'{day}' is day number {res}") - else - print(res) - end -end diff --git a/Task/Exceptions/PowerShell/exceptions-1.ps1 b/Task/Exceptions/PowerShell/exceptions-1.psh similarity index 100% rename from Task/Exceptions/PowerShell/exceptions-1.ps1 rename to Task/Exceptions/PowerShell/exceptions-1.psh diff --git a/Task/Exceptions/PowerShell/exceptions-2.ps1 b/Task/Exceptions/PowerShell/exceptions-2.psh similarity index 100% rename from Task/Exceptions/PowerShell/exceptions-2.ps1 rename to Task/Exceptions/PowerShell/exceptions-2.psh diff --git a/Task/Exceptions/PowerShell/exceptions-3.ps1 b/Task/Exceptions/PowerShell/exceptions-3.psh similarity index 100% rename from Task/Exceptions/PowerShell/exceptions-3.ps1 rename to Task/Exceptions/PowerShell/exceptions-3.psh diff --git a/Task/Exceptions/PowerShell/exceptions-4.ps1 b/Task/Exceptions/PowerShell/exceptions-4.psh similarity index 100% rename from Task/Exceptions/PowerShell/exceptions-4.ps1 rename to Task/Exceptions/PowerShell/exceptions-4.psh diff --git a/Task/Exceptions/REXX/exceptions.rexx b/Task/Exceptions/REXX/exceptions.rexx index 50931581b8..836b4ea7b9 100644 --- a/Task/Exceptions/REXX/exceptions.rexx +++ b/Task/Exceptions/REXX/exceptions.rexx @@ -1,13 +1,13 @@ --- 25 Apr 2026 -include Setting - -say 'EXCEPTIONS' -say version -say -say 'Square root of 10 is' SqRt(10)/1 -say 'Square root of 0 is' SqRt(0) -say 'Square root of -1 is' SqRt(-1) -exit - --- Abend; Sqrt -include Math +/*REXX program demonstrates handling an exception (negative #); catching is via a label.*/ + do j=9 by -5 + say 'the square root of ' j " is " sqrt(j) + end /*j*/ +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +sqrt: procedure; parse arg x; if x=0 then return 0; d=digits(); h=d+6; m.=9 + numeric digits; numeric form; if x<0 then signal .sqrtNeg + parse value format(x, 2, 1, , 0) 'E0' with g 'E' _ .; g=g * .5'e'_ % 2 + do j=0 while h>9; m.j=h; h=h%2 + 1; end /*j*/ + do k=j+5 to 0 by -1; numeric digits m.k; g=(g+x/g) * .5; end /*k*/ + numeric digits d; return g/1 +.sqrtNeg: say 'illegal SQRT argument (argument is negative):' x; exit 13 diff --git a/Task/Exceptions/Rust/exceptions.rs b/Task/Exceptions/Rust/exceptions.rust similarity index 100% rename from Task/Exceptions/Rust/exceptions.rs rename to Task/Exceptions/Rust/exceptions.rust diff --git a/Task/Exceptions/Rye/exceptions.rye b/Task/Exceptions/Rye/exceptions.rye deleted file mode 100644 index 2e2e54c6b4..0000000000 --- a/Task/Exceptions/Rye/exceptions.rye +++ /dev/null @@ -1,4 +0,0 @@ -str: "abc" -num: 5 -try { 123 + str } |is-error .either { "error" } { print str } -try { 123 + num } |is-error .either { "error" } { print num } diff --git a/Task/Exceptions/Scheme/exceptions.scm b/Task/Exceptions/Scheme/exceptions.ss similarity index 100% rename from Task/Exceptions/Scheme/exceptions.scm rename to Task/Exceptions/Scheme/exceptions.ss diff --git a/Task/Exceptions/Tcl/exceptions-2.tcl b/Task/Exceptions/Tcl/exceptions-2.tcl deleted file mode 100644 index 5086244b35..0000000000 --- a/Task/Exceptions/Tcl/exceptions-2.tcl +++ /dev/null @@ -1,26 +0,0 @@ -set f "non-existent-file.txt" - -try { - puts "try begin" - - set fd [open $f "r" ] - - set contents [read $fd] - - puts "try end" - -} on error { results options } { - puts stderr "results: $results" - - foreach {opt val} $options { - puts stderr "options:\t$opt $val" - - } -} -puts "after try block" - -if {[info exists contents] } { - puts "$contents" -} else { - puts stderr "no contents read" -} diff --git a/Task/Exceptions/Tcl/exceptions-1.tcl b/Task/Exceptions/Tcl/exceptions.tcl similarity index 100% rename from Task/Exceptions/Tcl/exceptions-1.tcl rename to Task/Exceptions/Tcl/exceptions.tcl diff --git a/Task/Exceptions/Uiua/exceptions.uiua b/Task/Exceptions/Uiua/exceptions.uiua deleted file mode 100644 index 20d6fd1c37..0000000000 --- a/Task/Exceptions/Uiua/exceptions.uiua +++ /dev/null @@ -1,2 +0,0 @@ -⍣(⋕|0) "123" # parses okay -⍣(⋕|0) "notanumber" # supplies 0 on error diff --git a/Task/Executable-library/Ada/executable-library-1.adb b/Task/Executable-library/Ada/executable-library-1.ada similarity index 100% rename from Task/Executable-library/Ada/executable-library-1.adb rename to Task/Executable-library/Ada/executable-library-1.ada diff --git a/Task/Executable-library/Ada/executable-library-2.adb b/Task/Executable-library/Ada/executable-library-2.ada similarity index 100% rename from Task/Executable-library/Ada/executable-library-2.adb rename to Task/Executable-library/Ada/executable-library-2.ada diff --git a/Task/Executable-library/Ada/executable-library-3.adb b/Task/Executable-library/Ada/executable-library-3.ada similarity index 100% rename from Task/Executable-library/Ada/executable-library-3.adb rename to Task/Executable-library/Ada/executable-library-3.ada diff --git a/Task/Executable-library/Ada/executable-library-4.adb b/Task/Executable-library/Ada/executable-library-4.ada similarity index 100% rename from Task/Executable-library/Ada/executable-library-4.adb rename to Task/Executable-library/Ada/executable-library-4.ada diff --git a/Task/Executable-library/FreeBASIC/executable-library-1.basic b/Task/Executable-library/FreeBASIC/executable-library-1.basic deleted file mode 100644 index 9999f103b4..0000000000 --- a/Task/Executable-library/FreeBASIC/executable-library-1.basic +++ /dev/null @@ -1,37 +0,0 @@ -Function hailstone(number As Uinteger) As Uinteger - Dim As Uinteger count = 1 - - While number <> 1 - If (number And 1) = 1 Then - number += number Shr 1 + 1 - count += 2 - Else - number Shr= 1 - count += 1 - End If - Wend - Return count -End Function - -Sub Main() - Dim As Uinteger seqlen - seqlen = hailstone(27) - Print "Sequence length for 27 is "; seqlen - - Dim maxlen As uInteger = 0 - Dim maxnum As uInteger = 0 - For number As Uinteger = 2 To 100000 - seqlen = hailstone(number) - If seqlen > maxlen Then - maxlen = seqlen - maxnum = number - End If - Next - Print "The number with the longest hailstone sequence is "; maxnum - Print "Its sequence length is "; maxlen - Print -End Sub - -Main() - -Sleep diff --git a/Task/Executable-library/FreeBASIC/executable-library-2.basic b/Task/Executable-library/FreeBASIC/executable-library-2.basic deleted file mode 100644 index 3a5a72c7a9..0000000000 --- a/Task/Executable-library/FreeBASIC/executable-library-2.basic +++ /dev/null @@ -1,23 +0,0 @@ -Declare Function hailstone Alias "hailstone" (Byval arg As Uinteger) As Uinteger - -Dim Shared freq(351) As Uinteger - -For number As Uinteger = 2 To 100000 - Dim seqlen As Uinteger = hailstone(number) - freq(seqlen) += 1 -Next - -Dim max As Uinteger = 0 -Dim mostcommon As Uinteger - -For i As Uinteger = 0 To 351 - If freq(i) > max Then - max = freq(i) - mostcommon = i - End If -Next - -Print "The most common sequence length is "; mostcommon -Print "It occurs "; max; " times" - -Sleep diff --git a/Task/Executable-library/J/executable-library-1.j b/Task/Executable-library/J/executable-library-1.j index d81fc19c6d..715f13ff13 100644 --- a/Task/Executable-library/J/executable-library-1.j +++ b/Task/Executable-library/J/executable-library-1.j @@ -3,10 +3,10 @@ hailseq=: -:`(1 3&p.)@.(2&|) ^:(1 ~: ]) ^:a:"0 9!:29]1 9!:27'main 0' main=:3 :0 - echo 'Hailstone sequence for the number 27' - echo hailseq 27 - echo '' - echo 'Finding number with longest hailstone sequence which is' - echo 'less than 100000 (and finding that sequence length):' - echo (I.@(= >./),>./) #@hailseq i.1e5 + smoutput 'Hailstone sequence for the number 27' + smoutput hailseq 27 + smoutput '' + smoutput 'Finding number with longest hailstone sequence which is' + smoutput 'less than 100000 (and finding that sequence length):' + smoutput (I.@(= >./),>./) #@hailseq i.1e5 ) diff --git a/Task/Executable-library/J/executable-library-3.j b/Task/Executable-library/J/executable-library-3.j index 4f77a3c89e..2bb186622c 100644 --- a/Task/Executable-library/J/executable-library-3.j +++ b/Task/Executable-library/J/executable-library-3.j @@ -2,7 +2,7 @@ require '~temp/hailseq.ijs' 9!:29]1 9!:27'main 0' main=:3 :0 - echo 'Finding most frequent hailstone sequence length for' - echo 'Hailstone sequences for whole numbers less than 100000:' - echo {:{.\:~ (#/.~,.~.) #@hailseq }.i.1e5 + smoutput 'Finding most frequent hailstone sequence length for' + smoutput 'Hailstone sequences for whole numbers less than 100000:' + smoutput {:{.\:~ (#/.~,.~.) #@hailseq }.i.1e5 ) diff --git a/Task/Executable-library/Julia/executable-library.jl b/Task/Executable-library/Julia/executable-library.julia similarity index 100% rename from Task/Executable-library/Julia/executable-library.jl rename to Task/Executable-library/Julia/executable-library.julia diff --git a/Task/Execute-Brain-/ALGOL-68/execute-brain--1.alg b/Task/Execute-Brain-/ALGOL-68/execute-brain--1.alg index 6f36b9cea2..c74c21fd7b 100644 --- a/Task/Execute-Brain-/ALGOL-68/execute-brain--1.alg +++ b/Task/Execute-Brain-/ALGOL-68/execute-brain--1.alg @@ -86,10 +86,11 @@ BEGIN # Brain**** -> Algol 68 transpiler # # get the code to transpile and output it as a comment at the start # # of the code # print( ( "CO BF> " ) ); - STRING bf code; - read( ( bf code, newline ) ); - print( ( newline, bf code, newline, "CO", newline ) ); + STRING code list; + read( ( code list, newline ) ); + print( ( newline, code list, newline, "CO", newline ) ); # transpile the code # - generate( bf code ) + generate( code list ) + END diff --git a/Task/Execute-Brain-/Agena/execute-brain-.agena b/Task/Execute-Brain-/Agena/execute-brain-.agena index 626b19af9e..becfb717b7 100644 --- a/Task/Execute-Brain-/Agena/execute-brain-.agena +++ b/Task/Execute-Brain-/Agena/execute-brain-.agena @@ -1,27 +1,89 @@ -scope # Simple BF interpreter, based on the Lua sample: "Simple meta-implementation using load" - # reads the BF code from stdin, builds an equivalent Agena program and executes it +# Brain**** interpreter - local constant bfOp := [ '>' ~ 'ptr +:= 1; ' - , '<' ~ 'ptr -:= 1; ' - , '+' ~ 'mem[ptr] +:= 1; ' - , '-' ~ 'mem[ptr] -:= 1; ' - , '[' ~ 'while mem[ptr] <> 0 do ' - , ']' ~ 'od; ' - , '.' ~ 'io.write(char(mem[ptr])); ' - , ',' ~ 'mem[ptr] := abs(io.read(io.stdin,1) or "\\0"); ' - ]; +# execute the Brain**** program in the code string +bf := proc( code :: string ) is + local address := 1; # current data address + local pc := 1; # current position in code + local data := []; # data - initially empty + local input := ""; # user input - initially empty + local bfOperations := # table of operations and their implemntations + [ ">" ~ proc() is inc address, 1 end + , "<" ~ proc() is dec address, 1 end + , "+" ~ proc() is inc data[ address ], 1 end + , "-" ~ proc() is dec data[ address ], 1 end + , "." ~ proc() is io.write( char( data[ address ] ) ) end + , "," ~ proc() is + # get next input character, converted to an integer + while input = "" + do + # no input left - get the next line + input := io.read() + od; + data[ address ] := abs( input[ 1 ] ); + # remove the latest character from the input + if size input < 2 + then + input := "" + else + input := input[ 2 to -1 ] + fi + end + , "[" ~ proc() is + if data[ address ] = 0 + then + # skip to the end of the loop + local depth := 0; + do + inc pc, 1; + if code[ pc ] = "[" + then + inc depth, 1 + elif code[ pc ] = "]" + then + dec depth, 1 + fi + until depth < 0 + fi + end + , "]" ~ proc() is + if data[ address ] <> 0 + then + # skip to the start of the loop + local depth := 0; + do + dec pc, 1; + if code[ pc ] = "[" + then + dec depth, 1 + elif code[ pc ] = "]" + then + inc depth, 1 + fi + until depth < 0 + fi + end + ]; + # execute the operations - ignore anything invalid + while pc <= size code + do + if data[ address ] = null + then + data[ address ] := 0 + fi; + if bfOperations[ code[ pc ] ] <> null + then + bfOperations[ code[ pc ] ]() + fi; + inc pc, 1 + od +end; - local bfProgram := "local mem := setmetatable([], [ '__index' ~ proc() return 0 end ]);\n" - & "local ptr := 1;\n" - ; - - for line in io.lines() do - for p to size line do - local snippet := bfOp[ line[ p ] ]; - if snippet then bfProgram &:= snippet & "\n" fi - od - od; - - loadstring( bfProgram, "bfCode" )() - -end +# prompt for Brain**** code and execute it, repeating until an empty code string is entered +scope + local code; + do + io.write( "BF> " ); + code := io.read(); + bf( code ) + until code = "" +epocs; diff --git a/Task/Execute-Brain-/Arturo/execute-brain--1.arturo b/Task/Execute-Brain-/Arturo/execute-brain--1.arturo index b30648cc5a..d84f05f32a 100644 --- a/Task/Execute-Brain-/Arturo/execute-brain--1.arturo +++ b/Task/Execute-Brain-/Arturo/execute-brain--1.arturo @@ -4,21 +4,21 @@ ; Tape: [0] -DataPointer: 0 -InstructionPointer: 0 +DataPointer: new 0 +InstructionPointer: new 0 ; Look for jumps in Code an register them ; in the Jumps table precomputeJumps: function [][ - vstack: [] - jumphash: #[] + vstack: new [] + jumphash: new #[] instrPointer: 0 while [instrPointer 'vstack ++ instrPointer - [ + if? command="[" -> 'vstack ++ instrPointer + else [ if command="]" [ target: last vstack chop 'vstack @@ -47,37 +47,36 @@ StateIsValid: function [][ interpret: function [].export:[DataPointer,InstructionPointer,Tape][ while [StateIsValid][ command: get split Code InstructionPointer - case command [ - "+" -> Tape\[DataPointer]: Tape\[DataPointer]+1 - "-" -> Tape\[DataPointer]: Tape\[DataPointer]-1 - ">" [ + case [command=] + when? ["+"] -> Tape\[DataPointer]: Tape\[DataPointer]+1 + when? ["-"] -> Tape\[DataPointer]: Tape\[DataPointer]-1 + when? [">"] [ inc 'DataPointer if DataPointer = size Tape -> Tape: Tape ++ 0 ] - "<" -> dec 'DataPointer - "." -> prints to :string to :char Tape\[DataPointer] - "," [ + when? ["<"] -> dec 'DataPointer + when? ["."] -> prints to :string to :char Tape\[DataPointer] + when? [","][ inp: to :integer input "" if inp=13 -> inp: 10 if inp=3 -> panic "something went wrong!" set Tape DataPointer inp ] - "[" -> - if 0 = get Tape DataPointer [ InstructionPointer: new Jumps\[InstructionPointer] ] + when? ["["] -> + if 0 = get Tape DataPointer [ InstructionPointer: new get Jumps InstructionPointer ] - "]" -> + when? ["]"] -> if 0 <> get Tape DataPointer [ - InstructionPointer: new Jumps\[InstructionPointer] + InstructionPointer: new get Jumps InstructionPointer ] - ] inc 'InstructionPointer ] ] Code: "" -switch 1>size arg -> Code: "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." - -> Code: read arg\0 +if? 1>size arg -> Code: "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." +else -> Code: read arg\0 CodeLength: size Code Jumps: precomputeJumps diff --git a/Task/Execute-Brain-/AutoIt/execute-brain-.au3 b/Task/Execute-Brain-/AutoIt/execute-brain-.autoit similarity index 100% rename from Task/Execute-Brain-/AutoIt/execute-brain-.au3 rename to Task/Execute-Brain-/AutoIt/execute-brain-.autoit diff --git a/Task/Execute-Brain-/Crystal/execute-brain-.cr b/Task/Execute-Brain-/Crystal/execute-brain-.cr deleted file mode 100644 index 355443e3a0..0000000000 --- a/Task/Execute-Brain-/Crystal/execute-brain-.cr +++ /dev/null @@ -1,33 +0,0 @@ -def bfrun (code) - code = code.chars - data = Hash(Int32, Int32).new(0) - dp = ip = 0 - jump_to_matching = ->(dir : Int32) { - nest = 0 - while 0 <= ip < code.size - case code[ip] - when '[' then nest += dir - when ']' then nest -= dir - end - break if nest == 0 - ip += dir - end - } - while 0 <= ip < code.size - case code[ip] - when '>' then dp += 1 - when '<' then dp -= 1 - when '+' then data[dp] += 1 - when '-' then data[dp] -= 1 - when '.' then print(data[dp].chr) - when ',' then data[dp] = STDIN.read_char.not_nil!.ord - when '[' then jump_to_matching.call(1) if data[dp] == 0 - when ']' then jump_to_matching.call(-1) if data[dp] != 0 - end - ip += 1 - end -end - -hello = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." - -bfrun(hello) diff --git a/Task/Execute-Brain-/Delphi/execute-brain-.pas b/Task/Execute-Brain-/Delphi/execute-brain-.delphi similarity index 100% rename from Task/Execute-Brain-/Delphi/execute-brain-.pas rename to Task/Execute-Brain-/Delphi/execute-brain-.delphi diff --git a/Task/Execute-Brain-/EasyLang/execute-brain-.easy b/Task/Execute-Brain-/EasyLang/execute-brain-.easy index 35eabaabb8..9888328243 100644 --- a/Task/Execute-Brain-/EasyLang/execute-brain-.easy +++ b/Task/Execute-Brain-/EasyLang/execute-brain-.easy @@ -1,4 +1,4 @@ -proc exec code$ . +proc exec code$ . . len mem[] 100 dp = 1 code$[] = strchars code$ @@ -54,7 +54,9 @@ func syntax code$ . elif h$ = "]" br -= 1 . - if br < 0 : return 0 + if br < 0 + return 0 + . . return if br = 0 . diff --git a/Task/Execute-Brain-/Factor/execute-brain-.factor b/Task/Execute-Brain-/Factor/execute-brain-.factor index 2e31e5ce88..513f3d3667 100644 --- a/Task/Execute-Brain-/Factor/execute-brain-.factor +++ b/Task/Execute-Brain-/Factor/execute-brain-.factor @@ -1,3 +1,3 @@ -USE: brainfuck +USE: brainf*** -"++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." run-brainfuck +"++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." run-brainf*** diff --git a/Task/Execute-Brain-/Fennel/execute-brain-.fennel b/Task/Execute-Brain-/Fennel/execute-brain-.fennel deleted file mode 100644 index 570e80ccae..0000000000 --- a/Task/Execute-Brain-/Fennel/execute-brain-.fennel +++ /dev/null @@ -1,34 +0,0 @@ -(do ;;; Simple BF interpreter, based on the Lua sample: "Simple meta-implementation using load" - ;;; reads the BF code from stdin, builds an equivalent Pluto program and executes it - - (local bf-op { ">" "ptr = ptr + 1" - "<" "ptr = ptr - 1" - "+" "mem[ptr] = mem[ptr] + 1" - "-" "mem[ptr] = mem[ptr] - 1" - "[" "while mem[ptr] ~= 0 do" - "]" "end" - "." "io.write(string.char(mem[ptr]))" - "," "mem[ptr] = string.byte(io.read(1) or \"\\0\")" - } - ) - - (var bf-program (.. "local mem = setmetatable({}, { __index = function() return 0 end })\n" - "local ptr = 1\n" - ) - ) - (each [line (io.lines)] - (for [p 1 (length line)] - (local op (. bf-op (line:sub p p))) - (when op - (set bf-program (.. bf-program op "\n")) - ) - ) - ) - (local (bf-code msg) (load bf-program)) - (if bf-code - (bf-code) - ;else - (error msg) - ) - -) diff --git a/Task/Execute-Brain-/Hare/execute-brain-.hare b/Task/Execute-Brain-/Hare/execute-brain-.hare deleted file mode 100644 index 05d315b116..0000000000 --- a/Task/Execute-Brain-/Hare/execute-brain-.hare +++ /dev/null @@ -1,74 +0,0 @@ -use fmt; -use fs; -use io; -use os; - -export fn main() void = { - if (len(os::args) != 2) { - fmt::print("Please provide a parameter pointing to a brain**** file.\n")!; - return; - }; - - let program = slurp(os::args[1])!; - let tape: [30000]u8 = [0...]; - let tp: u16 = 0; - defer free(program); - - let matches_k: []size = []; - let matches_v: []size = []; - defer free(matches_k); - defer free(matches_v); - - for (let pp: size = 0; pp < len(program); pp += 1) { - switch (program[pp]) { - case '>' => tp += 1; - case '<' => tp -= 1; - case '+' => tape[tp] += 1; - case '-' => tape[tp] -= 1; - case '.' => io::write(os::stdout, tape[tp..tp+1])!; - case ',' => io::read(os::stdin, tape[tp..tp+1])!; - case '[' => if (tape[tp] == 0) pp = find_match(pp, program, matches_k, matches_v)!; - case ']' => if (tape[tp] != 0) pp = find_match(pp, program, matches_k, matches_v)!; - case => continue; - }; - }; -}; - -fn find_match(pos: size, program: []u8, matches_k: []size, matches_v: []size) (size | !void) = { - for (let i: u16 = 0; i < len(matches_k); i += 1) - if (pos == matches_k[i]) - return matches_v[i]; - let r = pos; - switch (program[pos]) { - case '[' => { - r += 1; - for (let level = 1; level > 0; r += 1) { - switch (program[r]) { - case '[' => level += 1; - case ']' => level -= 1; - case => continue; - }; - }; - }; - case ']' => { - r -= 1; - for (let level = 1; level > 0; r -= 1) { - switch (program[r]) { - case ']' => level += 1; - case '[' => level -= 1; - case => continue; - }; - }; - }; - case => return; - }; - append(matches_k, pos)!; - append(matches_v, r)!; - return r; -}; - -fn slurp(filename: str) ([]u8 | fs::error | io::error) = { - const file = os::open(filename)?; - defer io::close(file)!; - return io::drain(file)?; -}; diff --git a/Task/Execute-Brain-/Julia/execute-brain-.jl b/Task/Execute-Brain-/Julia/execute-brain-.julia similarity index 100% rename from Task/Execute-Brain-/Julia/execute-brain-.jl rename to Task/Execute-Brain-/Julia/execute-brain-.julia diff --git a/Task/Execute-Brain-/Kotlin/execute-brain-.kts b/Task/Execute-Brain-/Kotlin/execute-brain-.kotlin similarity index 100% rename from Task/Execute-Brain-/Kotlin/execute-brain-.kts rename to Task/Execute-Brain-/Kotlin/execute-brain-.kotlin diff --git a/Task/Execute-Brain-/Lua/execute-brain-.lua b/Task/Execute-Brain-/Lua/execute-brain-.lua index 422ea849d3..8f2aec0651 100644 --- a/Task/Execute-Brain-/Lua/execute-brain-.lua +++ b/Task/Execute-Brain-/Lua/execute-brain-.lua @@ -1,22 +1,24 @@ -local repl = { - ['>'] = 'ptr = ptr + 1', - ['<'] = 'ptr = ptr - 1', - ['+'] = 'mem[ptr] = mem[ptr] + 1', - ['-'] = 'mem[ptr] = mem[ptr] - 1', - ['['] = 'while mem[ptr] ~= 0 do', - [']'] = 'end', - ['.'] = 'io.write(string.char(mem[ptr]))', - [','] = 'mem[ptr] = (io.read(1) or "\\0"):byte()', +local funs = { +['>'] = 'ptr = ptr + 1; ', +['<'] = 'ptr = ptr - 1; ', +['+'] = 'mem[ptr] = mem[ptr] + 1; ', +['-'] = 'mem[ptr] = mem[ptr] - 1; ', +['['] = 'while mem[ptr] ~= 0 do ', +[']'] = 'end; ', +['.'] = 'io.write(string.char(mem[ptr])); ', +[','] = 'mem[ptr] = (io.read(1) or "\\0"):byte(); ', } -local prog = {[[ +local prog = [[ local mem = setmetatable({}, { __index = function() return 0 end}) local ptr = 1 -]]} +]] -local source, i = io.read('*all'), 1 -for char in source:gmatch"[<>+.,%[%]%-]" do - i, prog[i] = i+1, repl[char] +local source = io.read('*all') + +for p = 1, #source do + local snippet = funs[source:sub(p,p)] + if snippet then prog = prog .. snippet end end -load( table.concat(prog, " ") )() +load(prog)() diff --git a/Task/Execute-Brain-/Miranda/execute-brain-.miranda b/Task/Execute-Brain-/Miranda/execute-brain-.miranda deleted file mode 100644 index e1686c7e26..0000000000 --- a/Task/Execute-Brain-/Miranda/execute-brain-.miranda +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/mira -exec -main :: [sys_message] -main = (interpret . read . hd . tl) $* - -interpret :: [char]->[sys_message] -interpret prog = msgs where (tape, inp, msgs) = run empty_tape $- (parse prog) - -instr ::= Left | Right | Inc | Dec | Read | Write | Loop [instr] - -run :: tape->[char]->[instr]->(tape,[char],[sys_message]) -run tape inp [] = (tape, inp, []) -run tape inp (instr:instrs) - = (tape'', inp'', sysmsg ++ sysmsgs) - where (tape', inp', sysmsg) = step tape inp instr - (tape'', inp'', sysmsgs) = run tape' inp' instrs - -step :: tape->[char]->instr->(tape,[char],[sys_message]) -step tape inp Left = (left tape, inp, []) -step tape inp Right = (right tape, inp, []) -step tape inp Inc = (apply (+1) tape, inp, []) -step tape inp Dec = (apply (+-1) tape, inp, []) -step tape inp Read = (setval ch tape, inp', []) - where (ch, inp') = getchar inp -step tape inp Write = (tape, inp, [Stdout (decode (val tape):[])]) -step tape inp (Loop prog) = (tape, inp, []), if val tape = 0 - = (tape'', inp'', sysmsgs ++ sysmsgs'), otherwise - where (tape', inp', sysmsgs) = run tape inp prog - (tape'', inp'', sysmsgs') = step tape' inp' (Loop prog) - -getchar :: [char]->(num,[char]) -getchar [] = (0, []) -getchar (x:xs) = (code x, xs) - -parse :: [char] -> [instr] -parse [] = [] -parse instrs - = Left : rest, if tok="<" - = Right : rest, if tok=">" - = Inc : rest, if tok="+" - = Dec : rest, if tok="-" - = Read : rest, if tok="," - = Write : rest, if tok="." - = Loop loop : rest, if hd tok='[' - = rest, otherwise - where (tok, next) = token instrs - rest = parse next - loop = parse (init (tl tok)) - -token :: [char] -> ([char],[char]) -token [] = ([],[]) -token (']':xs) = error "] without [" -token ('[':xs) = ('[':l, rs) where (l, rs) = getloop xs -token (x:xs) = (x:[], xs) - -getloop :: [char] -> ([char],[char]) -getloop = g 0 - where g 0 (']':xs) = ("]", xs) - g n ('[':xs) = ('[':l,rs) where (l,rs) = g (n+1) xs - g n (']':xs) = (']':l,rs) where (l,rs) = g (n-1) xs - g n (x:xs) = (x:l,rs) where (l,rs) = g n xs - g n [] = error "[ without ]" - -tape ::= Tape [num] num [num] - -empty_tape :: tape -empty_tape = Tape [] 0 [] - -left :: tape->tape -left (Tape ls c []) = Tape (c:ls) 0 [] -left (Tape ls c (r:rs)) = Tape (c:ls) r rs - -right :: tape->tape -right (Tape [] c rs) = Tape [] 0 (c:rs) -right (Tape (l:ls) c rs) = Tape ls l (c:rs) - -apply :: (num->num)->tape->tape -apply fn (Tape ls c rs) = Tape ls (fn c mod 256) rs - -val :: tape->num -val (Tape ls c rs) = c - -setval :: num->tape->tape -setval v (Tape ls c rs) = Tape ls v rs diff --git a/Task/Execute-Brain-/Odin/execute-brain-.odin b/Task/Execute-Brain-/Odin/execute-brain-.odin deleted file mode 100644 index e2898826a1..0000000000 --- a/Task/Execute-Brain-/Odin/execute-brain-.odin +++ /dev/null @@ -1,126 +0,0 @@ -package bf - -import "core:fmt" -import "core:c/libc" -import "core:os" - -cells_size :: 2000 -getinp : i32 -inp : u8 -main :: proc() { - - // comment out to give a file from command line - // data, ok := os.read_entire_file(os.args[1]) - // assert(ok, "Could not open file") - // defer delete(data) - // input := string(data) - - input := ">+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++." - size_input := len(input) - cells : [cells_size]i32 - pointer:=0 - i:=0 - direction := 1 - // moving past non matching [ ] - depth:= 0 - // loop i over input - mainloop: for ; (i <= (size_input - 1) && i >=0); { - inp = input[i] - //fmt.println(i) - switch inp{ - // move pointer right - case '>': - pointer +=1 - if (pointer>cells_size-1){ - pointer=cells_size-1 - } - i += 1 - // move pointer left - case '<': - pointer -=1 - if (pointer<0){ - pointer=0 - } - i += 1 - // increase cells at pointer - case '+': - cells[pointer] = (cells[pointer] + 1) % 256 - i += 1 - // decrease cell at pointer - case '-': - cells[pointer] = (cells[pointer] - 1) % 256 - i += 1 - // output value from cell at pointer - case '.': - res := cells[pointer] - libc.putchar(res) - i += 1 - // input value in cell at pointer - case ',': - getinp= libc.getchar() - fmt.println("input:") - cells[pointer] = getinp - i += 1 - // Jump past the matching ] if the cell at the pointer is 0 - case '[': - // if cell at pointer = 0 - if cells[pointer] == 0 { - // loop until ] - - loop1: for (inp != ']' && depth == 0) { - i +=1 - inp = input[i] - if (i > (size_input-1)){ - // if i > size input [ is unbalanced - fmt.printf("unbalanced loop ") - break mainloop - } - else if (inp == '[') { - depth += 1 - } - else if (inp == ']' && depth != 0) { - depth -= 1 - } - - fmt.println(i) - } - - } // else ignore - else { - i +=1 - } - - case ']': - // Jump back to the matching [ if the cell at the pointer is nonzero - if cells[pointer] != 0 { - - loop2: for (inp!= '[' && depth == 0) { - i -= 1 - inp = input[i] - if (i < 0) - { - fmt.printf("unbalanced loop ") - break mainloop - } - else if (inp == ']') { - depth += 1 - } - else if (inp == '[' && depth != 0) { - depth -= 1 - } - //fmt.println(input[i]) - } - - } - else { - i+=1 - } - // default: move pointer - case : - i +=1 - - } - - } - -} diff --git a/Task/Execute-Brain-/Phix/execute-brain-.phix b/Task/Execute-Brain-/Phix/execute-brain-.phix index a59f95828d..c35807b1ce 100644 --- a/Task/Execute-Brain-/Phix/execute-brain-.phix +++ b/Task/Execute-Brain-/Phix/execute-brain-.phix @@ -1,51 +1,54 @@ -procedure bfi(string pgm) - sequence jumptable = repeat(0,length(pgm)), - loopstack = {}, - data = repeat(0,10) -- size?? - integer skip = 0, ch - -- - -- compile (pack/strip comments and link jumps) - -- - for i=1 to length(pgm) do - ch = pgm[i] - switch ch do - case '[': loopstack = append(loopstack,i-skip); - pgm[i-skip] = ch; - case ']': integer loopstart = loopstack[$]; - loopstack = loopstack[1..-2]; - jumptable[i-skip] = loopstart; - jumptable[loopstart] = i-skip; - fallthrough - case '+','-','<','>',',','.': pgm[i-skip] = ch; - default: skip += 1 - end switch - end for - if length(loopstack) then ?9/0 end if - pgm = pgm[1..-1-skip] +(phixonline)--> + procedure bfi(string pgm) + sequence jumptable = repeat(0,length(pgm)), + loopstack = {}, + data = repeat(0,10) -- size?? + integer skip = 0, ch, loopstart, pc, dp + -- + -- compile (pack/strip comments and link jumps) + -- + for i=1 to length(pgm) do + ch = pgm[i] + switch ch do + case '[': loopstack = append(loopstack,i-skip); + pgm[i-skip] = ch; + case ']': loopstart = loopstack[$]; + loopstack = loopstack[1..-2]; + jumptable[i-skip] = loopstart; + jumptable[loopstart] = i-skip; + fallthrough + case '+','-','<','>',',','.': pgm[i-skip] = ch; + default: skip += 1 + end switch + end for + if length(loopstack) then ?9/0 end if + pgm = pgm[1..-1-skip] - -- - -- main execution loop - -- - integer pc = 1, dp = 1 - while pc<=length(pgm) do - ch = pgm[pc] - switch ch do - case '>': dp += 1 if dp>length(data) then dp = 1 end if - case '<': dp -= 1 if dp<1 then dp = length(data) end if - case '+': data[dp] += 1 - case '-': data[dp] -= 1 - case ',': data[dp] = iff(platform()=JS?'?':getc(0)) - case '.': puts(1,data[dp]) - case '[': if data[dp]=0 then pc = jumptable[pc] end if - case ']': if data[dp]!=0 then pc = jumptable[pc] end if - default: ?9/0 - end switch - pc += 1 - end while -end procedure + -- + -- main execution loop + -- + pc = 1 + dp = 1 + while pc<=length(pgm) do + ch = pgm[pc] + switch ch do + case '>': dp += 1 if dp>length(data) then dp = 1 end if + case '<': dp -= 1 if dp<1 then dp = length(data) end if + case '+': data[dp] += 1 + case '-': data[dp] -= 1 + case ',': data[dp] = iff(platform()=JS?'?':getc(0)) + case '.': puts(1,data[dp]) + case '[': if data[dp]=0 then pc = jumptable[pc] end if + case ']': if data[dp]!=0 then pc = jumptable[pc] end if + default: ?9/0 + end switch + pc += 1 + end while + end procedure -constant bf="++++++++[>++++[>++>++++>+++>+<<<<-]>++>->+>>+[<]<-]>>.>>.+.<.>>.<<<++.>---------.>------.<----.++++++++.>>+.>++.+++." -constant fb="++++++++[>++++[>++>++++>+++>+<<<<-]>++>->+>>+[<]<-]>>.>>.+.<.>>.<<<+++.>---.>------.++++++++.<--.>>+.>++.+++.," + constant bf="++++++++[>++++[>++>++++>+++>+<<<<-]>++>->+>>+[<]<-]>>.>>.+.<.>>.<<<++.>---------.>------.<----.++++++++.>>+.>++.+++." + constant fb="++++++++[>++++[>++>++++>+++>+<<<<-]>++>->+>>+[<]<-]>>.>>.+.<.>>.<<<+++.>---.>------.++++++++.<--.>>+.>++.+++.," -bfi(bf) -bfi(fb) + bfi(bf) + bfi(fb) + + with javascript_semantics + constant NOP = 0b000_00000, -- no operation + LDA = 0b001_00000, -- load accumulator, a := memory [xxxxx] + STA = 0b010_00000, -- store accumulator, memory [xxxxx] := a + ADD = 0b011_00000, -- add, a := a + memory [xxxxx] + SUB = 0b100_00000, -- subtract, a := a – memory [xxxxx] + BRZ = 0b101_00000, -- branch on zero, if a = 0 then goto xxxxx + JMP = 0b110_00000, -- jump, goto xxxxx + STP = 0b111_00000, -- stop + OP = 0b111_00000, -- operator mask + ARG = 0b000_11111 -- memory location (0 based) -procedure execute(string name, sequence program) - sequence memory = deep_copy(program) - integer pc = 1, a = 0 - while true do - integer ppc = memory[pc], - op = and_bitsu(ppc,OP), - arg = and_bits(ppc,ARG)+1 - pc += 1 - switch op do - case NOP: break - case LDA: a = memory[arg] - case STA: memory[arg] = a - case ADD: a = and_bitsu(a+memory[arg],#FF) - case SUB: a = and_bitsu(a-memory[arg],#FF) - case BRZ: if a=0 then pc = arg end if - case JMP: pc = arg - case STP: printf(1,"%12s: %3d\n",{name,a}) - return - end switch - end while -end procedure + procedure execute(string name, sequence program) + sequence memory = deep_copy(program) + integer pc = 1, a = 0 + while true do + integer ppc = memory[pc], + op = and_bitsu(ppc,OP), + arg = and_bits(ppc,ARG)+1 + pc += 1 + switch op do + case NOP: break + case LDA: a = memory[arg] + case STA: memory[arg] = a + case ADD: a = and_bitsu(a+memory[arg],#FF) + case SUB: a = and_bitsu(a-memory[arg],#FF) + case BRZ: if a=0 then pc = arg end if + case JMP: pc = arg + case STP: printf(1,"%12s: %3d\n",{name,a}) + return + end switch + end while + end procedure -execute("2+2",{LDA+3, ADD+4, STP, 2,2}) -execute("7*8",{LDA+12, ADD+10, STA+12, LDA+11, SUB+13, STA+11, BRZ+8, JMP+0, - LDA+12, STP, 8,7,0,1}) -execute("fibonacci",{LDA+14, STA+15, ADD+13, STA+14, LDA+15, STA+13, LDA+16, - SUB+17, BRZ+11, STA+16, JMP+0, LDA+14, STP, 1,1,0,8,1}) -execute("linkedList",{LDA+13, ADD+15, STA+5, ADD+16, STA+7, NOP, STA+14, NOP, - BRZ+11, STA+15, JMP+0, LDA+14, STP, LDA+0, 0,28,1,0,0, - 0,6,0,2,26,5,20,3,30,1,22,4,24}) -execute("prisoner",{NOP, NOP, STP, 0, LDA+3, SUB+29, BRZ+18, LDA+3, STA+29, - BRZ+14, LDA+1, ADD+31, STA+1, JMP+2, LDA+0, ADD+31, STA+0, - JMP+2, LDA+3, STA+29, LDA+1, ADD+30, ADD+3, STA+1, LDA+0, - ADD+30, ADD+3, STA+0, JMP+2, 0, 1, 3}) --- subtractions yielding negative results -execute("0-255",{LDA+3,SUB+4,STP, 0,255}) -execute("0-1",{LDA+3, SUB+4, STP, 0,1}) --- overflow on addition -execute("1+255",{LDA+3, ADD+4, STP, 1, 255}) + execute("2+2",{LDA+3, ADD+4, STP, 2,2}) + execute("7*8",{LDA+12, ADD+10, STA+12, LDA+11, SUB+13, STA+11, BRZ+8, JMP+0, + LDA+12, STP, 8,7,0,1}) + execute("fibonacci",{LDA+14, STA+15, ADD+13, STA+14, LDA+15, STA+13, LDA+16, + SUB+17, BRZ+11, STA+16, JMP+0, LDA+14, STP, 1,1,0,8,1}) + execute("linkedList",{LDA+13, ADD+15, STA+5, ADD+16, STA+7, NOP, STA+14, NOP, + BRZ+11, STA+15, JMP+0, LDA+14, STP, LDA+0, 0,28,1,0,0, + 0,6,0,2,26,5,20,3,30,1,22,4,24}) + execute("prisoner",{NOP, NOP, STP, 0, LDA+3, SUB+29, BRZ+18, LDA+3, STA+29, + BRZ+14, LDA+1, ADD+31, STA+1, JMP+2, LDA+0, ADD+31, STA+0, + JMP+2, LDA+3, STA+29, LDA+1, ADD+30, ADD+3, STA+1, LDA+0, + ADD+30, ADD+3, STA+0, JMP+2, 0, 1, 3}) + -- subtractions yielding negative results + execute("0-255",{LDA+3,SUB+4,STP, 0,255}) + execute("0-1",{LDA+3, SUB+4, STP, 0,1}) + -- overflow on addition + execute("1+255",{LDA+3, ADD+4, STP, 1, 255}) + n ) - [ 1 ] is LDA ( --> n ) - [ 2 ] is STA ( --> n ) - [ 3 ] is ADD ( --> n ) - [ 4 ] is SUB ( --> n ) - [ 5 ] is BRZ ( --> n ) - [ 6 ] is JMP ( --> n ) - [ 7 ] is STP ( --> n ) - - [ 0 ] is DATA ( --> n ) - [ 0 ] is -- ( --> n ) - - [ stack 0 ] is acc ( --> s ) - [ stack 0 ] is ip ( --> s ) - [ stack false ] is flag ( --> n ) - - [ 0 ip replace 0 32 of ] is computer/zero ( --> [ ) - - [ 255 & swap 5 << | - swap ip share poke - 1 ip tally ] is , ( [ --> [ ) - - [ drop ] is nop ( [ n --> [ ) - - [ dip dup peek acc replace ] is lda ( [ n --> [ ) - - [ acc share unrot poke ] is sta ( [ n --> [ ) - - [ dip dup peek - acc take + 255 & acc put ] is add ( [ n --> [ ) - - [ dip dup peek negate - acc take + 255 & acc put ] is sub ( [ n --> [ ) - - [ acc share iff drop done - ip replace ] is brz ( [ n --> [ ) - - [ ip replace ] is jmp ( [ n --> [ ) - - [ drop true flag replace ] is stp ( [ n --> [ ) - - [ false flag replace - 0 acc replace - 0 ip replace - [ dup ip share peek - 1 ip tally - dup 31 & swap 5 >> - [ table - nop lda sta add - sub brz jmp stp ] do - flag share until ] - drop - acc share - say "acc = " dup echo - dup 128 & iff - [ say " or " - 127 ~ | echo ] - else drop cr ] is execute ( [ --> ) - - cr say " 2+2: " - computer/zero - ( 00 ) LDA 03 , - ( 01 ) ADD 04 , - ( 02 ) STP -- , - ( 03 ) DATA 2 , - ( 04 ) DATA 2 , - execute - cr say " 7*8: " - computer/zero - ( 00 ) LDA 12 , - ( 01 ) ADD 10 , - ( 02 ) STA 12 , - ( 03 ) LDA 11 , - ( 04 ) SUB 13 , - ( 05 ) STA 11 , - ( 06 ) BRZ 08 , - ( 07 ) JMP 00 , - ( 08 ) LDA 12 , - ( 09 ) STP -- , - ( 10 ) DATA 8 , - ( 11 ) DATA 7 , - ( 12 ) DATA 0 , - ( 13 ) DATA 1 , - execute - cr say " Fibonacci: " - computer/zero - ( 00 ) LDA 14 , - ( 01 ) STA 15 , - ( 02 ) ADD 13 , - ( 03 ) STA 14 , - ( 04 ) LDA 15 , - ( 05 ) STA 13 , - ( 06 ) LDA 16 , - ( 07 ) SUB 17 , - ( 08 ) BRZ 11 , - ( 09 ) STA 16 , - ( 10 ) JMP 00 , - ( 11 ) LDA 14 , - ( 12 ) STP -- , - ( 13 ) DATA 1 , - ( 14 ) DATA 1 , - ( 15 ) DATA 0 , - ( 16 ) DATA 8 , - ( 17 ) DATA 1 , - execute - cr say "linked list: " - computer/zero - ( 00 ) LDA 13 , - ( 01 ) ADD 15 , - ( 02 ) STA 05 , - ( 03 ) ADD 16 , - ( 04 ) STA 07 , - ( 05 ) NOP -- , - ( 06 ) STA 14 , - ( 07 ) NOP -- , - ( 08 ) BRZ 11 , - ( 09 ) STA 15 , - ( 10 ) JMP 00 , - ( 11 ) LDA 14 , - ( 12 ) STP -- , - ( 13 ) LDA 00 , - ( 14 ) DATA 0 , - ( 15 ) DATA 28 , - ( 16 ) DATA 1 , - ( 17 ) DATA 0 , - ( 18 ) DATA 0 , - ( 19 ) DATA 0 , - ( 20 ) DATA 6 , - ( 21 ) DATA 0 , - ( 22 ) DATA 2 , - ( 23 ) DATA 26 , - ( 24 ) DATA 5 , - ( 25 ) DATA 20 , - ( 26 ) DATA 3 , - ( 27 ) DATA 30 , - ( 28 ) DATA 1 , - ( 29 ) DATA 22 , - ( 30 ) DATA 4 , - ( 31 ) DATA 24 , - execute - cr say " prisoner: " - computer/zero - ( 00 ) NOP -- , - ( 01 ) NOP -- , - ( 02 ) STP -- , - ( 03 ) NOP -- , - ( 04 ) LDA 03 , - ( 05 ) SUB 29 , - ( 06 ) BRZ 18 , - ( 07 ) LDA 03 , - ( 08 ) STA 29 , - ( 09 ) BRZ 14 , - ( 10 ) LDA 01 , - ( 11 ) ADD 31 , - ( 12 ) STA 01 , - ( 13 ) JMP 02 , - ( 14 ) LDA 00 , - ( 15 ) ADD 31 , - ( 16 ) STA 00 , - ( 17 ) JMP 02 , - ( 18 ) LDA 03 , - ( 19 ) STA 29 , - ( 20 ) LDA 01 , - ( 21 ) ADD 30 , - ( 22 ) ADD 03 , - ( 23 ) STA 01 , - ( 24 ) LDA 00 , - ( 25 ) ADD 30 , - ( 26 ) ADD 03 , - ( 27 ) STA 01 , - ( 28 ) JMP 02 , - ( 29 ) DATA 0 , - ( 30 ) DATA 1 , - ( 31 ) DATA 3 , - execute diff --git a/Task/Execute-HQ9+/11l/execute-hq9+.11l b/Task/Execute-HQ9+/11l/execute-hq9+.11l index 61c3364c3b..f78b71196e 100644 --- a/Task/Execute-HQ9+/11l/execute-hq9+.11l +++ b/Task/Execute-HQ9+/11l/execute-hq9+.11l @@ -38,7 +38,7 @@ F incr() :start: src = File(:argv[1]).read() -[Char = (() -> Void)] dispatch +[Char = (() -> N)] dispatch dispatch[Char(‘h’)] = hello dispatch[Char(‘q’)] = quine dispatch[Char(‘9’)] = bottles diff --git a/Task/Execute-HQ9+/Arturo/execute-hq9+.arturo b/Task/Execute-HQ9+/Arturo/execute-hq9+.arturo index ea2365d299..6e897e33d0 100644 --- a/Task/Execute-HQ9+/Arturo/execute-hq9+.arturo +++ b/Task/Execute-HQ9+/Arturo/execute-hq9+.arturo @@ -1,12 +1,13 @@ hq9: function [source][ acc: 0 loop split source 'ch [ - case lower ch [ - "h" -> print "Hello, world!" - "q" -> print source - "9" -> print "99 bottles here ..." - "+" -> acc: acc+1 - ] + case [(lower ch)=] + when? ["h"]-> print "Hello, world!" + when? ["q"]-> print source + when? ["9"]-> print "99 bottles here ..." + when? ["+"]-> acc: acc+1 + else [] + ] return acc ] diff --git a/Task/Execute-HQ9+/COBOL/execute-hq9+.cob b/Task/Execute-HQ9+/COBOL/execute-hq9+.cobol similarity index 100% rename from Task/Execute-HQ9+/COBOL/execute-hq9+.cob rename to Task/Execute-HQ9+/COBOL/execute-hq9+.cobol diff --git a/Task/Execute-HQ9+/Delphi/execute-hq9+.pas b/Task/Execute-HQ9+/Delphi/execute-hq9+.delphi similarity index 100% rename from Task/Execute-HQ9+/Delphi/execute-hq9+.pas rename to Task/Execute-HQ9+/Delphi/execute-hq9+.delphi diff --git a/Task/Execute-HQ9+/EasyLang/execute-hq9+.easy b/Task/Execute-HQ9+/EasyLang/execute-hq9+.easy index 95fb45691e..73ac035a1f 100644 --- a/Task/Execute-HQ9+/EasyLang/execute-hq9+.easy +++ b/Task/Execute-HQ9+/EasyLang/execute-hq9+.easy @@ -1,4 +1,4 @@ -proc run code$ . +proc run code$ . . for c$ in strchars code$ if c$ = "Q" print code$ diff --git a/Task/Execute-HQ9+/Haxe/execute-hq9+.hx b/Task/Execute-HQ9+/Haxe/execute-hq9+.haxe similarity index 100% rename from Task/Execute-HQ9+/Haxe/execute-hq9+.hx rename to Task/Execute-HQ9+/Haxe/execute-hq9+.haxe diff --git a/Task/Execute-HQ9+/Julia/execute-hq9+.jl b/Task/Execute-HQ9+/Julia/execute-hq9+.julia similarity index 100% rename from Task/Execute-HQ9+/Julia/execute-hq9+.jl rename to Task/Execute-HQ9+/Julia/execute-hq9+.julia diff --git a/Task/Execute-HQ9+/Kotlin/execute-hq9+.kts b/Task/Execute-HQ9+/Kotlin/execute-hq9+.kotlin similarity index 100% rename from Task/Execute-HQ9+/Kotlin/execute-hq9+.kts rename to Task/Execute-HQ9+/Kotlin/execute-hq9+.kotlin diff --git a/Task/Execute-HQ9+/OCaml/execute-hq9+.ml b/Task/Execute-HQ9+/OCaml/execute-hq9+.ocaml similarity index 100% rename from Task/Execute-HQ9+/OCaml/execute-hq9+.ml rename to Task/Execute-HQ9+/OCaml/execute-hq9+.ocaml diff --git a/Task/Execute-HQ9+/PowerShell/execute-hq9+.ps1 b/Task/Execute-HQ9+/PowerShell/execute-hq9+.psh similarity index 100% rename from Task/Execute-HQ9+/PowerShell/execute-hq9+.ps1 rename to Task/Execute-HQ9+/PowerShell/execute-hq9+.psh diff --git a/Task/Execute-HQ9+/R/execute-hq9+.r b/Task/Execute-HQ9+/R/execute-hq9+.r deleted file mode 100644 index 10b02e4152..0000000000 --- a/Task/Execute-HQ9+/R/execute-hq9+.r +++ /dev/null @@ -1,25 +0,0 @@ -library(stringr) - -bottles <- function(){ - s <- function(n) ifelse(n==1, "", "s") - z <- function(n) ifelse(n==0, "No more", n) - cat(sapply(99:1, function(n) str_glue("{n} bottle{s(n)} of beer on the wall,\n", - "{n} bottle{s(n)} of beer,\n", - "Take one down, pass it around,\n", - "{z(n-1)} bottle{s(n-1)} of beer on the wall.")), sep="\n") -} - -hq9plus <- function(s){ - accumulator <- 0 - chars <- str_split_1(str_to_upper(s),"") - for(char in chars){ - switch(char, - "H"=cat("Hello World!","\n"), - "Q"=cat(s, "\n"), - "9"=bottles(), - "+"=eval(accumulator <- accumulator+1)) - } - cat("The value of the accumulator is", accumulator) -} - -hq9plus(readline()) diff --git a/Task/Execute-HQ9+/Rust/execute-hq9+.rs b/Task/Execute-HQ9+/Rust/execute-hq9+.rust similarity index 100% rename from Task/Execute-HQ9+/Rust/execute-hq9+.rs rename to Task/Execute-HQ9+/Rust/execute-hq9+.rust diff --git a/Task/Execute-HQ9+/V-(Vlang)/execute-hq9+.v b/Task/Execute-HQ9+/V-(Vlang)/execute-hq9+.v deleted file mode 100644 index eb112af6de..0000000000 --- a/Task/Execute-HQ9+/V-(Vlang)/execute-hq9+.v +++ /dev/null @@ -1,31 +0,0 @@ -fn eval(code string) { - mut accumulator := 0 - for cal in code.trim_space().to_lower() { - match cal { - `h` { println("Hello, world!") } - `q` { println(code) } - `9` { - bottles := fn (ir int) string { - match ir { - 0 { return "No bottles" } - 1 { return "One bottle" } - else { return "$ir bottles" } - } - } - for ir := 99; ir >= 1; ir-- { - println("${bottles(ir)} of beer on the wall,") - println("${bottles(ir)} of beer,") - println("take one down and pass it around,") - println("${bottles(ir - 1)} of beer on the wall!") - println("") - } - } - `+` { accumulator++ } - else { println("syntax error") } - } - } -} - -fn main() { - eval("hq9+") -} diff --git a/Task/Execute-SNUSP/EasyLang/execute-snusp.easy b/Task/Execute-SNUSP/EasyLang/execute-snusp.easy index 05ac014346..dde98b1d48 100644 --- a/Task/Execute-SNUSP/EasyLang/execute-snusp.easy +++ b/Task/Execute-SNUSP/EasyLang/execute-snusp.easy @@ -1,4 +1,4 @@ -proc snusp dlen raw$ . +proc snusp dlen raw$ . . len ds[] dlen is$[] = strsplit raw$ "\n" for s$ in is$[] @@ -6,7 +6,9 @@ proc snusp dlen raw$ . . for ipr to len is$[][] for ipc to len is$[ipr][] - if is$[ipr][ipc] = "$" : break 2 + if is$[ipr][ipc] = "$" + break 2 + . . . dp = 1 @@ -40,7 +42,9 @@ proc snusp dlen raw$ . elif c$ = "!" step elif c$ = "?" - if ds[dp] = 0 : step + if ds[dp] = 0 + step + . . step . diff --git a/Task/Execute-SNUSP/FreeBASIC/execute-snusp.basic b/Task/Execute-SNUSP/FreeBASIC/execute-snusp.basic deleted file mode 100644 index 2a3ce48e9f..0000000000 --- a/Task/Execute-SNUSP/FreeBASIC/execute-snusp.basic +++ /dev/null @@ -1,77 +0,0 @@ -' Rosetta Code problem: https://rosettacode.org/wiki/Execute_SNUSP -' by Jjuanhdez, 05/2024 -' The interpreter below implements Core SNUSP: - -Const HW = "/++++!/===========?\>++.>+.+++++++..+++" & Chr(10) & _ -"\+++\ | /+>+++++++>/ /++++++++++<<.++>./" & Chr(10) & _ -"$+++/ | \+++++++++>\ \+++++.>.+++.-----\" & Chr(10) & _ -" \==-<<<<+>+++/ /=.>.+>.--------.-/" - -Dim Shared As Integer ipf, ipc ' instruction pointers in row and column -Dim Shared As Integer direcc ' direction (0 = right, 1 = down, 2 = left, 3 = up) - -Sub Paso() - If direcc And 1 Then - ipf += 1 - (direcc And 2) - Else - ipc += 1 - (direcc And 2) - End If -End Sub - -Sub SNUSP (dsLen As Integer, SNUSPcode As String) - Dim As Ubyte ad(dsLen - 1) ' data store - Dim As Integer dp ' data pointer - Dim As String cb(dsLen) ' two-way code storage - Dim As String fila, op, linea - Dim As Integer r, i, j - - dp = 0 - i = 1 - j = 1 - ipf = 0 - ipc = 0 - direcc = 0 - - While i <= Len(SNUSPcode) - If Mid(SNUSPcode, i, 1) = Chr(10) Then - cb(j) = linea - linea = "" - j += 1 - Else - linea &= Mid(SNUSPcode, i, 1) - End If - i += 1 - Wend - cb(j) = linea - - For r = 0 To Ubound(cb) - fila = cb(r) - ipc = Instr(fila, "$") - 1 - If ipc >= 0 Then - ipf = r - Exit For - End If - Next r - - While ipf >= 0 And ipf <= Ubound(cb) And ipc >= 0 And ipc < Len(cb(ipf)) - op = Mid(cb(ipf), ipc + 1, 1) - Select Case op - Case ">": dp += 1 ' RIGTH - Case "<": dp -= 1 ' LEFT - Case "+": ad(dp) += 1 ' INCR - Case "-": ad(dp) -= 1 ' DECR - Case ",": Input ad(dp) ' READ - Case ".": Print Chr(ad(dp)); ' WRITE - Case "/": direcc = Not direcc ' RULD - Case "\": direcc Xor= 1 ' LURD - Case "!": Paso ' SKIP - Case "?": If ad(dp) = 0 Then Paso ' SKIPZ - End Select - Paso - Wend - Print Chr(ad(dp)); -End Sub - -SNUSP(5, HW) - -Sleep diff --git a/Task/Execute-SNUSP/Julia/execute-snusp.jl b/Task/Execute-SNUSP/Julia/execute-snusp.julia similarity index 100% rename from Task/Execute-SNUSP/Julia/execute-snusp.jl rename to Task/Execute-SNUSP/Julia/execute-snusp.julia diff --git a/Task/Execute-SNUSP/Kotlin/execute-snusp.kts b/Task/Execute-SNUSP/Kotlin/execute-snusp.kotlin similarity index 100% rename from Task/Execute-SNUSP/Kotlin/execute-snusp.kts rename to Task/Execute-SNUSP/Kotlin/execute-snusp.kotlin diff --git a/Task/Execute-a-Markov-algorithm/11l/execute-a-markov-algorithm.11l b/Task/Execute-a-Markov-algorithm/11l/execute-a-markov-algorithm.11l index 4c3cf6cc78..5c8a789dc8 100644 --- a/Task/Execute-a-Markov-algorithm/11l/execute-a-markov-algorithm.11l +++ b/Task/Execute-a-Markov-algorithm/11l/execute-a-markov-algorithm.11l @@ -1,4 +1,11 @@ -T Rule = (String pattern, String replacement, Bool terminating) +T Rule + String pattern + String replacement + Bool terminating + F (pattern, replacement, terminating) + .pattern = pattern + .replacement = replacement + .terminating = terminating F parse(rules) [Rule] result diff --git a/Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-1.adb b/Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-1.ada similarity index 100% rename from Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-1.adb rename to Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-1.ada diff --git a/Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-2.adb b/Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-2.ada similarity index 100% rename from Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-2.adb rename to Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-2.ada diff --git a/Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-3.adb b/Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-3.ada similarity index 100% rename from Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-3.adb rename to Task/Execute-a-Markov-algorithm/Ada/execute-a-markov-algorithm-3.ada diff --git a/Task/Execute-a-Markov-algorithm/C-sharp/execute-a-markov-algorithm.cs b/Task/Execute-a-Markov-algorithm/C-sharp/execute-a-markov-algorithm.cs deleted file mode 100644 index 6d3499bb58..0000000000 --- a/Task/Execute-a-Markov-algorithm/C-sharp/execute-a-markov-algorithm.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -public class Markov -{ - /// - /// Take a ruleset and return a function which takes a string to which the rules - /// should be applied. - /// - /// String containing the rules - /// A function that takes a string and applies the rules - public static Func CreateMarkovProcessor(string ruleSet) - { - // Convert a ruleset string into a dictionary - Dictionary MakeRuleMap(string ruleset) - { - return ruleset.Split('\n') - .Where(e => !e.StartsWith("#")) - .Select(e => e.Split(new[] { " -> " }, StringSplitOptions.None)) - .ToDictionary(e => e[0], e => e[1]); - } - - // Split a string at an index - Tuple SplitAt(string s, int i) - { - return new Tuple(s.Substring(0, i), s.Substring(i)); - } - - // Strip a leading number of chars from a string. - string StripLeading(string s, string strip) - { - return s.Substring(strip.Length); - } - - // Replace the substring in the string. - string Replace(string s, string find, string rep) - { - string result = s; - if (s.IndexOf(find) >= 0) - { - var a = SplitAt(s, s.IndexOf(find)); - result = a.Item1 + rep + StripLeading(a.Item2, find); - } - return result; - } - - // Recursively apply the ruleset to the string. - string Parse(Dictionary rules, string s) - { - string o = s; - foreach (var rule in rules) - { - string k = rule.Key; - string v = rule.Value; - - if (v.StartsWith(".")) - { - s = Replace(s, k, StripLeading(v, ".")); - break; - } - else - { - s = Replace(s, k, v); - if (s != o) { break; } - } - } - return o == s ? s : Parse(rules, s); - } - - var ruleMap = MakeRuleMap(ruleSet); - return str => Parse(ruleMap, str); - } - - public static void Main() - { - string ruleset1 = @"# This rules file is extracted from Wikipedia: -# http://en.wikipedia.org/wiki/Markov_Algorithm -A -> apple -B -> bag -S -> shop -T -> the -the shop -> my brother -a never used -> .terminating rule"; - - string ruleset2 = @"# Slightly modified from the rules on Wikipedia -A -> apple -B -> bag -S -> .shop -T -> the -the shop -> my brother -a never used -> .terminating rule"; - - string ruleset3 = @"# BNF Syntax testing rules -A -> apple -WWWW -> with -Bgage -> ->.* -B -> bag -->.* -> money -W -> WW -S -> .shop -T -> the -the shop -> my brother -a never used -> .terminating rule"; - - string ruleset4 = @"### Unary Multiplication Engine, for testing Markov Algorithm implementations -### By Donal Fellows. -# Unary addition engine -_+1 -> _1+ -1+1 -> 11+ -# Pass for converting from the splitting of multiplication into ordinary -# addition -1! -> !1 -,! -> !+ -_! -> _ -# Unary multiplication by duplicating left side, right side times -1*1 -> x,@y -1x -> xX -X, -> 1,1 -X1 -> 1X -_x -> _X -,x -> ,X -y1 -> 1y -y_ -> _ -# Next phase of applying -1@1 -> x,@y -1@_ -> @_ -,@_ -> !_ -++ -> + -# Termination cleanup for addition -_1 -> 1 -1+_ -> 1 -_+_ -> "; - - string ruleset5 = @"# Turing machine: three-state busy beaver -# -# state A, symbol 0 => write 1, move right, new state B -A0 -> 1B -# state A, symbol 1 => write 1, move left, new state C -0A1 -> C01 -1A1 -> C11 -# state B, symbol 0 => write 1, move left, new state A -0B0 -> A01 -1B0 -> A11 -# state B, symbol 1 => write 1, move right, new state B -B1 -> 1B -# state C, symbol 0 => write 1, move left, new state B -0C0 -> B01 -1C0 -> B11 -# state C, symbol 1 => write 1, move left, halt -0C1 -> H01 -1C1 -> H11"; - - Console.WriteLine(CreateMarkovProcessor(ruleset1)("I bought a B of As from T S.")); - Console.WriteLine(CreateMarkovProcessor(ruleset2)("I bought a B of As from T S.")); - Console.WriteLine(CreateMarkovProcessor(ruleset3)("I bought a B of As W my Bgage from T S.")); - Console.WriteLine(CreateMarkovProcessor(ruleset4)("_1111*11111_")); - Console.WriteLine(CreateMarkovProcessor(ruleset5)("000000A000000")); - } -} diff --git a/Task/Execute-a-Markov-algorithm/FreeBASIC/execute-a-markov-algorithm.basic b/Task/Execute-a-Markov-algorithm/FreeBASIC/execute-a-markov-algorithm.basic deleted file mode 100644 index 8d0a5ec743..0000000000 --- a/Task/Execute-a-Markov-algorithm/FreeBASIC/execute-a-markov-algorithm.basic +++ /dev/null @@ -1,139 +0,0 @@ -Sub Markov (rules As String, entrada As String, expected As String) - Dim As String subs(), reps(), lines() - Dim As String sub_, rep, li, res - Dim As Integer i, k - Dim As Integer start = 1, finish = 1 - - While finish <= Len(rules) - If Mid(rules, finish, 1) = Chr(10) Then - Redim Preserve lines(Ubound(lines) + 1) - lines(Ubound(lines)) = Mid(rules, start, finish - start) - start = finish + 1 - End If - finish += 1 - Wend - For i = 0 To Ubound(lines) - li = lines(i) - If Len(li) > 0 And Asc(li, 1) <> Asc("#") Then - k = Instr(li, " -> ") - If k > 0 Then - Redim Preserve subs(Ubound(subs) + 1) - subs(Ubound(subs)) = Trim(Mid(li, 1, k - 1)) - Redim Preserve reps(Ubound(reps) + 1) - reps(Ubound(reps)) = Trim(Mid(li, k + 4)) - End If - End If - Next i - - res = entrada - Dim As Boolean term = False, found = False - Do - found = False - For i = 0 To Ubound(subs) - sub_ = subs(i) - k = Instr(res, sub_) - If k > 0 Then - found = True - rep = reps(i) - If Len(rep) > 0 And Asc(rep, 1) = Asc(".") Then - rep = Mid(rep, 2) - term = True - End If - Mid(res, k, Len(sub_)) = rep - Exit For - End If - If Not term Then Exit For - Next i - If Not term Or Not found Then Exit Do - Loop - Print """"; entrada;""""; ", "; """"; expected; """"; ", "; Iif(res = expected, "**ERROR**", "ok") -End Sub - -Dim As String ruleset1 = _ -"# This rules file is extracted from Wikipedia:" & _ -"# http://en.wikipedia.org/wiki/Markov_Algorithm" & _ -"A -> apple" & _ -"B -> bag" & _ -"S -> shop" & _ -"T -> the" & _ -"the shop -> my brother" & _ -"a never used -> .terminating rule" -Markov(ruleset1,"I bought a B of As from T S.","I bought a bag of apples from my brother.") - -Dim As String ruleset2 = _ -"# Slightly modified from the rules on Wikipedia" & _ -"A -> apple" & _ -"B -> bag" & _ -"S -> .shop" & _ -"T -> the" & _ -"the shop -> my brother" & _ -"a never used -> .terminating rule" -Markov(ruleset2,"I bought a B of As from T S.","I bought a bag of apples from T shop.") - -Dim As String ruleset3 = _ -"# BNF Syntax testing rules" & _ -"A -> apple" & _ -"WWWW -> with" & _ -"Bgage -> ->.*" & _ -"B -> bag" & _ -"->.* -> money" & _ -"W -> WW" & _ -"S -> .shop" & _ -"T -> the" & _ -"the shop -> my brother" & _ -"a never used -> .terminating rule""" -Markov(ruleset3,"I bought a B of As W my Bgage from T S.","I bought a bag of apples with my money from T shop.") - -Dim As String ruleset4 = _ -"### Unary Multiplication Engine, for testing Markov Algorithm implementations" & _ -"### By Donal Fellows." & _ -"# Unary addition engine" & _ -"_+1 -> _1+" & _ -"1+1 -> 11+" & _ -"# Pass for converting from the splitting of multiplication into ordinary" & _ -"# addition" & _ -"1! -> !1" & _ -",! -> !+" & _ -"_! -> _" & _ -"# Unary multiplication by duplicating left side, right side times" & _ -"1*1 -> x,@y" & _ -"1x -> xX" & _ -"X, -> 1,1" & _ -"X1 -> 1X" & _ -"_x -> _X" & _ -",x -> ,X" & _ -"y1 -> 1y" & _ -"y_ -> _" & _ -"# Next phase of applying" & _ -"1@1 -> x,@y" & _ -"1@_ -> @_" & _ -",@_ -> !_" & _ -"++ -> +" & _ -"# Termination cleanup for addition" & _ -"_1 -> 1" & _ -"1+_ -> 1" & _ -"_+_ -> " -Markov(ruleset4,"_1111*11111_","11111111111111111111") - -Dim As String ruleset5 = _ -"# Turing machine: three-state busy beaver" & _ -"#" & _ -"# state A, symbol 0 => write 1, move right, new state B" & _ -"A0 -> 1B" & _ -"# state A, symbol 1 => write 1, move left, new state C" & _ -"0A1 -> C01" & _ -"1A1 -> C11" & _ -"# state B, symbol 0 => write 1, move left, new state A" & _ -"0B0 -> A01" & _ -"1B0 -> A11" & _ -"# state B, symbol 1 => write 1, move right, new state B" & _ -"B1 -> 1B" & _ -"# state C, symbol 0 => write 1, move left, new state B" & _ -"0C0 -> B01" & _ -"1C0 -> B11" & _ -"# state C, symbol 1 => write 1, move left, halt" & _ -"0C1 -> H01" & _ -"1C1 -> H11" -Markov(ruleset5,"000000A000000","00011H1111000") - -Sleep diff --git a/Task/Execute-a-Markov-algorithm/Julia/execute-a-markov-algorithm-1.jl b/Task/Execute-a-Markov-algorithm/Julia/execute-a-markov-algorithm-1.julia similarity index 100% rename from Task/Execute-a-Markov-algorithm/Julia/execute-a-markov-algorithm-1.jl rename to Task/Execute-a-Markov-algorithm/Julia/execute-a-markov-algorithm-1.julia diff --git a/Task/Execute-a-Markov-algorithm/Julia/execute-a-markov-algorithm-2.jl b/Task/Execute-a-Markov-algorithm/Julia/execute-a-markov-algorithm-2.julia similarity index 100% rename from Task/Execute-a-Markov-algorithm/Julia/execute-a-markov-algorithm-2.jl rename to Task/Execute-a-Markov-algorithm/Julia/execute-a-markov-algorithm-2.julia diff --git a/Task/Execute-a-Markov-algorithm/Kotlin/execute-a-markov-algorithm.kts b/Task/Execute-a-Markov-algorithm/Kotlin/execute-a-markov-algorithm.kotlin similarity index 100% rename from Task/Execute-a-Markov-algorithm/Kotlin/execute-a-markov-algorithm.kts rename to Task/Execute-a-Markov-algorithm/Kotlin/execute-a-markov-algorithm.kotlin diff --git a/Task/Execute-a-Markov-algorithm/OCaml/execute-a-markov-algorithm.ml b/Task/Execute-a-Markov-algorithm/OCaml/execute-a-markov-algorithm.ocaml similarity index 100% rename from Task/Execute-a-Markov-algorithm/OCaml/execute-a-markov-algorithm.ml rename to Task/Execute-a-Markov-algorithm/OCaml/execute-a-markov-algorithm.ocaml diff --git a/Task/Execute-a-Markov-algorithm/Rust/execute-a-markov-algorithm.rs b/Task/Execute-a-Markov-algorithm/Rust/execute-a-markov-algorithm.rust similarity index 100% rename from Task/Execute-a-Markov-algorithm/Rust/execute-a-markov-algorithm.rs rename to Task/Execute-a-Markov-algorithm/Rust/execute-a-markov-algorithm.rust diff --git a/Task/Execute-a-Markov-algorithm/Scheme/execute-a-markov-algorithm.scm b/Task/Execute-a-Markov-algorithm/Scheme/execute-a-markov-algorithm.ss similarity index 100% rename from Task/Execute-a-Markov-algorithm/Scheme/execute-a-markov-algorithm.scm rename to Task/Execute-a-Markov-algorithm/Scheme/execute-a-markov-algorithm.ss diff --git a/Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-1.vbs b/Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-1.vb similarity index 100% rename from Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-1.vbs rename to Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-1.vb diff --git a/Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-2.vbs b/Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-2.vb similarity index 100% rename from Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-2.vbs rename to Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-2.vb diff --git a/Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-3.vbs b/Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-3.vb similarity index 100% rename from Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-3.vbs rename to Task/Execute-a-Markov-algorithm/VBScript/execute-a-markov-algorithm-3.vb diff --git a/Task/Execute-a-Markov-algorithm/Zig/execute-a-markov-algorithm.zig b/Task/Execute-a-Markov-algorithm/Zig/execute-a-markov-algorithm.zig deleted file mode 100644 index ec8bb8934d..0000000000 --- a/Task/Execute-a-Markov-algorithm/Zig/execute-a-markov-algorithm.zig +++ /dev/null @@ -1,278 +0,0 @@ -const std = @import("std"); -const testing = std.testing; -const mem = std.mem; -const Allocator = std.mem.Allocator; - -// Add a main function for Zig playground to compile -pub fn main() !void { - // Empty main function to satisfy the compiler - std.debug.print("Markov Algorithm library\n", .{}); -} - -pub const Rule = struct { - pat: []const u8, - rep: []const u8, - terminal: bool, - - pub fn init(allocator: Allocator, pat: []const u8, rep: []const u8, terminal: bool) !Rule { - const pat_owned = try allocator.dupe(u8, pat); - const rep_owned = try allocator.dupe(u8, rep); - return Rule{ - .pat = pat_owned, - .rep = rep_owned, - .terminal = terminal, - }; - } - - pub fn deinit(self: *Rule, allocator: Allocator) void { - allocator.free(self.pat); - allocator.free(self.rep); - } - - pub fn clone(self: Rule, allocator: Allocator) !Rule { - return try Rule.init(allocator, self.pat, self.rep, self.terminal); - } - - pub fn applicableRange(self: *const Rule, input: []const u8) ?struct { start: usize, end: usize } { - if (mem.indexOf(u8, input, self.pat)) |start| { - return .{ .start = start, .end = start + self.pat.len }; - } - return null; - } - - pub fn apply(self: *const Rule, s: *std.ArrayList(u8)) !bool { - if (self.applicableRange(s.items)) |range| { - try s.replaceRange(range.start, range.end - range.start, self.rep); - return true; - } - return false; - } - - pub fn fromString(allocator: Allocator, s: []const u8) !Rule { - var parts = mem.splitSequence(u8, s, " -> "); - const pat = parts.first(); - const rep_opt = parts.next(); - if (rep_opt == null) { - return error.InvalidFormat; - } - const rep = rep_opt.?; - - if (rep.len > 0 and rep[0] == '.') { - return Rule.init(allocator, pat, rep[1..], true); - } else { - return Rule.init(allocator, pat, rep, false); - } - } -}; - -pub const Rules = struct { - rules: std.ArrayList(Rule), - allocator: Allocator, - - pub fn init(allocator: Allocator) Rules { - return Rules{ - .rules = std.ArrayList(Rule).init(allocator), - .allocator = allocator, - }; - } - - pub fn deinit(self: *Rules) void { - for (self.rules.items) |*rule| { - rule.deinit(self.allocator); - } - self.rules.deinit(); - } - - pub fn clone(self: Rules) !Rules { - var new_rules = Rules.init(self.allocator); - for (self.rules.items) |rule| { - try new_rules.rules.append(try rule.clone(self.allocator)); - } - return new_rules; - } - - pub fn apply(self: *const Rules, s: *std.ArrayList(u8)) !?*const Rule { - for (self.rules.items) |*rule| { - if (try rule.apply(s)) { - return rule; - } - } - return null; - } - - pub fn execute(self: *const Rules, buffer: []const u8) ![]u8 { - var result = try std.ArrayList(u8).initCapacity(self.allocator, buffer.len); - try result.appendSlice(buffer); - - while (try self.apply(&result)) |rule| { - if (rule.terminal) { - break; - } - } - - return result.toOwnedSlice(); - } - - pub fn fromString(allocator: Allocator, s: []const u8) !Rules { - var result = Rules.init(allocator); - var lines = mem.splitScalar(u8, s, '\n'); - - while (lines.next()) |line| { - const trimmed = mem.trim(u8, line, &std.ascii.whitespace); - if (trimmed.len == 0 or trimmed[0] == '#') { - continue; - } - const rule = try Rule.fromString(allocator, trimmed); - try result.rules.append(rule); - } - - return result; - } -}; - -test "case_01" { - const allocator = std.testing.allocator; - const input = "I bought a B of As from T S."; - const rules_str = - \\# This rules file is extracted from Wikipedia: - \\# http://en.wikipedia.org/wiki/Markov_Algorithm - \\A -> apple - \\B -> bag - \\S -> shop - \\T -> the - \\the shop -> my brother - \\a never used -> .terminating rule - ; - - var rules = try Rules.fromString(allocator, rules_str); - defer rules.deinit(); - - const result = try rules.execute(input); - defer allocator.free(result); - - try testing.expectEqualStrings("I bought a bag of apples from my brother.", result); -} - -test "case_02" { - const allocator = std.testing.allocator; - const input = "I bought a B of As from T S."; - const rules_str = - \\# Slightly modified from the rules on Wikipedia - \\A -> apple - \\B -> bag - \\S -> .shop - \\T -> the - \\the shop -> my brother - \\a never used -> .terminating rule - ; - - var rules = try Rules.fromString(allocator, rules_str); - defer rules.deinit(); - - const result = try rules.execute(input); - defer allocator.free(result); - - try testing.expectEqualStrings("I bought a bag of apples from T shop.", result); -} - -test "case_03" { - const allocator = std.testing.allocator; - const input = "I bought a B of As W my Bgage from T S."; - const rules_str = - \\# BNF Syntax testing rules - \\A -> apple - \\WWWW -> with - \\Bgage -> ->.* - \\B -> bag - \\->.* -> money - \\W -> WW - \\S -> .shop - \\T -> the - \\the shop -> my brother - \\a never used -> .terminating rule - ; - - var rules = try Rules.fromString(allocator, rules_str); - defer rules.deinit(); - - const result = try rules.execute(input); - defer allocator.free(result); - - try testing.expectEqualStrings("I bought a bag of apples with my money from T shop.", result); -} - -test "case_04" { - const allocator = std.testing.allocator; - const input = "_1111*11111_"; - const rules_str = - \\### Unary Multiplication Engine, for testing Markov Algorithm implementations - \\### By Donal Fellows. - \\# Unary addition engine - \\_+1 -> _1+ - \\1+1 -> 11+ - \\# Pass for converting from the splitting of multiplication into ordinary - \\# addition - \\1! -> !1 - \\,! -> !+ - \\_! -> _ - \\# Unary multiplication by duplicating left side, right side times - \\1*1 -> x,@y - \\1x -> xX - \\X, -> 1,1 - \\X1 -> 1X - \\_x -> _X - \\,x -> ,X - \\y1 -> 1y - \\y_ -> _ - \\# Next phase of applying - \\1@1 -> x,@y - \\1@_ -> @_ - \\,@_ -> !_ - \\++ -> + - \\# Termination cleanup for addition - \\_1 -> 1 - \\1+_ -> 1 - \\_+_ -> - ; - - var rules = try Rules.fromString(allocator, rules_str); - defer rules.deinit(); - - const result = try rules.execute(input); - defer allocator.free(result); - - try testing.expectEqualStrings("11111111111111111111", result); -} - -test "case_05" { - const allocator = std.testing.allocator; - const input = "000000A000000"; - const rules_str = - \\# Turing machine: three-state busy beaver - \\# - \\# state A, symbol 0 => write 1, move right, new state B - \\A0 -> 1B - \\# state A, symbol 1 => write 1, move left, new state C - \\0A1 -> C01 - \\1A1 -> C11 - \\# state B, symbol 0 => write 1, move left, new state A - \\0B0 -> A01 - \\1B0 -> A11 - \\# state B, symbol 1 => write 1, move right, new state B - \\B1 -> 1B - \\# state C, symbol 0 => write 1, move left, new state B - \\0C0 -> B01 - \\1C0 -> B11 - \\# state C, symbol 1 => write 1, move left, halt - \\0C1 -> H01 - \\1C1 -> H11 - ; - - var rules = try Rules.fromString(allocator, rules_str); - defer rules.deinit(); - - const result = try rules.execute(input); - defer allocator.free(result); - - try testing.expectEqualStrings("00011H1111000", result); -} diff --git a/Task/Execute-a-system-command/Ada/execute-a-system-command-1.adb b/Task/Execute-a-system-command/Ada/execute-a-system-command-1.ada similarity index 100% rename from Task/Execute-a-system-command/Ada/execute-a-system-command-1.adb rename to Task/Execute-a-system-command/Ada/execute-a-system-command-1.ada diff --git a/Task/Execute-a-system-command/Ada/execute-a-system-command-2.adb b/Task/Execute-a-system-command/Ada/execute-a-system-command-2.ada similarity index 100% rename from Task/Execute-a-system-command/Ada/execute-a-system-command-2.adb rename to Task/Execute-a-system-command/Ada/execute-a-system-command-2.ada diff --git a/Task/Execute-a-system-command/Ada/execute-a-system-command-3.adb b/Task/Execute-a-system-command/Ada/execute-a-system-command-3.ada similarity index 100% rename from Task/Execute-a-system-command/Ada/execute-a-system-command-3.adb rename to Task/Execute-a-system-command/Ada/execute-a-system-command-3.ada diff --git a/Task/Execute-a-system-command/ArkScript/execute-a-system-command.ark b/Task/Execute-a-system-command/ArkScript/execute-a-system-command.ark deleted file mode 100644 index 40b7da0d2d..0000000000 --- a/Task/Execute-a-system-command/ArkScript/execute-a-system-command.ark +++ /dev/null @@ -1,3 +0,0 @@ -(import std.Sys) - -(print (sys:exec "ls")) diff --git a/Task/Execute-a-system-command/AutoIt/execute-a-system-command.au3 b/Task/Execute-a-system-command/AutoIt/execute-a-system-command.autoit similarity index 100% rename from Task/Execute-a-system-command/AutoIt/execute-a-system-command.au3 rename to Task/Execute-a-system-command/AutoIt/execute-a-system-command.autoit diff --git a/Task/Execute-a-system-command/COBOL/execute-a-system-command.cob b/Task/Execute-a-system-command/COBOL/execute-a-system-command.cobol similarity index 100% rename from Task/Execute-a-system-command/COBOL/execute-a-system-command.cob rename to Task/Execute-a-system-command/COBOL/execute-a-system-command.cobol diff --git a/Task/Execute-a-system-command/Delphi/execute-a-system-command.pas b/Task/Execute-a-system-command/Delphi/execute-a-system-command.delphi similarity index 100% rename from Task/Execute-a-system-command/Delphi/execute-a-system-command.pas rename to Task/Execute-a-system-command/Delphi/execute-a-system-command.delphi diff --git a/Task/Execute-a-system-command/Emacs-Lisp/execute-a-system-command-1.el b/Task/Execute-a-system-command/Emacs-Lisp/execute-a-system-command-1.l similarity index 100% rename from Task/Execute-a-system-command/Emacs-Lisp/execute-a-system-command-1.el rename to Task/Execute-a-system-command/Emacs-Lisp/execute-a-system-command-1.l diff --git a/Task/Execute-a-system-command/Emacs-Lisp/execute-a-system-command-2.el b/Task/Execute-a-system-command/Emacs-Lisp/execute-a-system-command-2.l similarity index 100% rename from Task/Execute-a-system-command/Emacs-Lisp/execute-a-system-command-2.el rename to Task/Execute-a-system-command/Emacs-Lisp/execute-a-system-command-2.l diff --git a/Task/Execute-a-system-command/Euphoria/execute-a-system-command.eu b/Task/Execute-a-system-command/Euphoria/execute-a-system-command.euphoria similarity index 100% rename from Task/Execute-a-system-command/Euphoria/execute-a-system-command.eu rename to Task/Execute-a-system-command/Euphoria/execute-a-system-command.euphoria diff --git a/Task/Execute-a-system-command/Julia/execute-a-system-command.jl b/Task/Execute-a-system-command/Julia/execute-a-system-command.julia similarity index 100% rename from Task/Execute-a-system-command/Julia/execute-a-system-command.jl rename to Task/Execute-a-system-command/Julia/execute-a-system-command.julia diff --git a/Task/Execute-a-system-command/Kotlin/execute-a-system-command.kts b/Task/Execute-a-system-command/Kotlin/execute-a-system-command.kotlin similarity index 100% rename from Task/Execute-a-system-command/Kotlin/execute-a-system-command.kts rename to Task/Execute-a-system-command/Kotlin/execute-a-system-command.kotlin diff --git a/Task/Execute-a-system-command/OCaml/execute-a-system-command-1.ml b/Task/Execute-a-system-command/OCaml/execute-a-system-command-1.ocaml similarity index 100% rename from Task/Execute-a-system-command/OCaml/execute-a-system-command-1.ml rename to Task/Execute-a-system-command/OCaml/execute-a-system-command-1.ocaml diff --git a/Task/Execute-a-system-command/OCaml/execute-a-system-command-2.ml b/Task/Execute-a-system-command/OCaml/execute-a-system-command-2.ocaml similarity index 100% rename from Task/Execute-a-system-command/OCaml/execute-a-system-command-2.ml rename to Task/Execute-a-system-command/OCaml/execute-a-system-command-2.ocaml diff --git a/Task/Execute-a-system-command/OCaml/execute-a-system-command-3.ml b/Task/Execute-a-system-command/OCaml/execute-a-system-command-3.ocaml similarity index 100% rename from Task/Execute-a-system-command/OCaml/execute-a-system-command-3.ml rename to Task/Execute-a-system-command/OCaml/execute-a-system-command-3.ocaml diff --git a/Task/Execute-a-system-command/PascalABC.NET/execute-a-system-command.pas b/Task/Execute-a-system-command/PascalABC.NET/execute-a-system-command.pas deleted file mode 100644 index ab758487a0..0000000000 --- a/Task/Execute-a-system-command/PascalABC.NET/execute-a-system-command.pas +++ /dev/null @@ -1,2 +0,0 @@ -## -exec('cmd.exe','/c dir /p'); diff --git a/Task/Execute-a-system-command/Pluto/execute-a-system-command.pluto b/Task/Execute-a-system-command/Pluto/execute-a-system-command.pluto deleted file mode 100644 index 3f325c8c2e..0000000000 --- a/Task/Execute-a-system-command/Pluto/execute-a-system-command.pluto +++ /dev/null @@ -1 +0,0 @@ -os.execute("pause") diff --git a/Task/Execute-a-system-command/PowerShell/execute-a-system-command-1.ps1 b/Task/Execute-a-system-command/PowerShell/execute-a-system-command-1.psh similarity index 100% rename from Task/Execute-a-system-command/PowerShell/execute-a-system-command-1.ps1 rename to Task/Execute-a-system-command/PowerShell/execute-a-system-command-1.psh diff --git a/Task/Execute-a-system-command/PowerShell/execute-a-system-command-2.ps1 b/Task/Execute-a-system-command/PowerShell/execute-a-system-command-2.psh similarity index 100% rename from Task/Execute-a-system-command/PowerShell/execute-a-system-command-2.ps1 rename to Task/Execute-a-system-command/PowerShell/execute-a-system-command-2.psh diff --git a/Task/Execute-a-system-command/Rebol/execute-a-system-command.rebol b/Task/Execute-a-system-command/REBOL/execute-a-system-command.rebol similarity index 100% rename from Task/Execute-a-system-command/Rebol/execute-a-system-command.rebol rename to Task/Execute-a-system-command/REBOL/execute-a-system-command.rebol diff --git a/Task/Execute-a-system-command/Rust/execute-a-system-command.rs b/Task/Execute-a-system-command/Rust/execute-a-system-command.rust similarity index 100% rename from Task/Execute-a-system-command/Rust/execute-a-system-command.rs rename to Task/Execute-a-system-command/Rust/execute-a-system-command.rust diff --git a/Task/Execute-a-system-command/Rye/execute-a-system-command.rye b/Task/Execute-a-system-command/Rye/execute-a-system-command.rye deleted file mode 100644 index 97164e6532..0000000000 --- a/Task/Execute-a-system-command/Rye/execute-a-system-command.rye +++ /dev/null @@ -1,3 +0,0 @@ -cc os -ls -cwd? diff --git a/Task/Execute-a-system-command/Scheme/execute-a-system-command.scm b/Task/Execute-a-system-command/Scheme/execute-a-system-command.ss similarity index 100% rename from Task/Execute-a-system-command/Scheme/execute-a-system-command.scm rename to Task/Execute-a-system-command/Scheme/execute-a-system-command.ss diff --git a/Task/Execute-a-system-command/Seed7/execute-a-system-command.seed7 b/Task/Execute-a-system-command/Seed7/execute-a-system-command.seed7 index 7de9dc25a3..eafaacc2ca 100644 --- a/Task/Execute-a-system-command/Seed7/execute-a-system-command.seed7 +++ b/Task/Execute-a-system-command/Seed7/execute-a-system-command.seed7 @@ -3,5 +3,5 @@ $ include "seed7_05.s7i"; const proc: main is func begin - shellCmd("ls"); + cmd_sh("ls"); end func; diff --git a/Task/Execute-a-system-command/VBScript/execute-a-system-command.vbs b/Task/Execute-a-system-command/VBScript/execute-a-system-command.vb similarity index 100% rename from Task/Execute-a-system-command/VBScript/execute-a-system-command.vbs rename to Task/Execute-a-system-command/VBScript/execute-a-system-command.vb diff --git a/Task/Execute-a-system-command/Wren/execute-a-system-command-1.wren b/Task/Execute-a-system-command/Wren/execute-a-system-command-1.wren new file mode 100644 index 0000000000..c638a0983e --- /dev/null +++ b/Task/Execute-a-system-command/Wren/execute-a-system-command-1.wren @@ -0,0 +1,8 @@ +/* Execute_a_system_command.wren */ +class Command { + foreign static exec(name, param) // the code for this is provided by Go +} + +Command.exec("ls", "-lt") +System.print() +Command.exec("dir", "") diff --git a/Task/Execute-a-system-command/Wren/execute-a-system-command-2.wren b/Task/Execute-a-system-command/Wren/execute-a-system-command-2.wren new file mode 100644 index 0000000000..2e0ffb7e03 --- /dev/null +++ b/Task/Execute-a-system-command/Wren/execute-a-system-command-2.wren @@ -0,0 +1,39 @@ +/* Execute_a_system_command.go*/ +package main + +import ( + wren "github.com/crazyinfin8/WrenGo" + "log" + "os" + "os/exec" +) + +type any = interface{} + +func execCommand(vm *wren.VM, parameters []any) (any, error) { + name := parameters[1].(string) + param := parameters[2].(string) + var cmd *exec.Cmd + if param != "" { + cmd = exec.Command(name, param) + } else { + cmd = exec.Command(name) + } + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + log.Fatal(err) + } + return nil, nil +} + +func main() { + vm := wren.NewVM() + fileName := "Execute_a_system_command.wren" + methodMap := wren.MethodMap{"static exec(_,_)": execCommand} + classMap := wren.ClassMap{"Command": wren.NewClass(nil, nil, methodMap)} + module := wren.NewModule(classMap) + vm.SetModule(fileName, module) + vm.InterpretFile(fileName) + vm.Free() +} diff --git a/Task/Execute-a-system-command/Wren/execute-a-system-command.wren b/Task/Execute-a-system-command/Wren/execute-a-system-command.wren deleted file mode 100644 index 1d97b0a9de..0000000000 --- a/Task/Execute-a-system-command/Wren/execute-a-system-command.wren +++ /dev/null @@ -1,5 +0,0 @@ -import "os" for Process - -Process.exec("ls", ["-lt"]) -System.print() -Process.exec("dir") diff --git a/Task/Exponentiation-operator/Ada/exponentiation-operator-1.adb b/Task/Exponentiation-operator/Ada/exponentiation-operator-1.ada similarity index 100% rename from Task/Exponentiation-operator/Ada/exponentiation-operator-1.adb rename to Task/Exponentiation-operator/Ada/exponentiation-operator-1.ada diff --git a/Task/Exponentiation-operator/Ada/exponentiation-operator-2.adb b/Task/Exponentiation-operator/Ada/exponentiation-operator-2.ada similarity index 100% rename from Task/Exponentiation-operator/Ada/exponentiation-operator-2.adb rename to Task/Exponentiation-operator/Ada/exponentiation-operator-2.ada diff --git a/Task/Exponentiation-operator/Ada/exponentiation-operator-3.adb b/Task/Exponentiation-operator/Ada/exponentiation-operator-3.ada similarity index 100% rename from Task/Exponentiation-operator/Ada/exponentiation-operator-3.adb rename to Task/Exponentiation-operator/Ada/exponentiation-operator-3.ada diff --git a/Task/Exponentiation-operator/Batch-File/exponentiation-operator.bat b/Task/Exponentiation-operator/Batch-File/exponentiation-operator.bat deleted file mode 100644 index f9b95744f4..0000000000 --- a/Task/Exponentiation-operator/Batch-File/exponentiation-operator.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -setlocal enableextensions enabledelayedexpansion -set /p a= -set /p b= -call :pow %a% %b% -echo %_a% -goto :eof -:pow Integer Integer -:: Right-to-left binary exponentiation -set /a "_a=1, s=%1, e=%2" -:looppow -if %e% neq 0 ( -set /a "t=e&1" -if !t! equ 1 (set /a "_a*=s") -set /a "s*=s, e>>=1" -goto looppow -) -goto :eof diff --git a/Task/Exponentiation-operator/Delphi/exponentiation-operator.pas b/Task/Exponentiation-operator/Delphi/exponentiation-operator.delphi similarity index 100% rename from Task/Exponentiation-operator/Delphi/exponentiation-operator.pas rename to Task/Exponentiation-operator/Delphi/exponentiation-operator.delphi diff --git a/Task/Exponentiation-operator/EasyLang/exponentiation-operator.easy b/Task/Exponentiation-operator/EasyLang/exponentiation-operator.easy index 126b429c63..f7a1d893bf 100644 --- a/Task/Exponentiation-operator/EasyLang/exponentiation-operator.easy +++ b/Task/Exponentiation-operator/EasyLang/exponentiation-operator.easy @@ -1,10 +1,12 @@ func mypow n exp . + r = 1 if exp < 0 exp = -exp n = 1 / n . - r = 1 - for i to exp : r *= n + for i to exp + r *= n + . return r . print mypow pi 2 diff --git a/Task/Exponentiation-operator/Elixir/exponentiation-operator.ex b/Task/Exponentiation-operator/Elixir/exponentiation-operator.elixir similarity index 100% rename from Task/Exponentiation-operator/Elixir/exponentiation-operator.ex rename to Task/Exponentiation-operator/Elixir/exponentiation-operator.elixir diff --git a/Task/Exponentiation-operator/Julia/exponentiation-operator.jl b/Task/Exponentiation-operator/Julia/exponentiation-operator.julia similarity index 100% rename from Task/Exponentiation-operator/Julia/exponentiation-operator.jl rename to Task/Exponentiation-operator/Julia/exponentiation-operator.julia diff --git a/Task/Exponentiation-operator/Kotlin/exponentiation-operator.kts b/Task/Exponentiation-operator/Kotlin/exponentiation-operator.kotlin similarity index 100% rename from Task/Exponentiation-operator/Kotlin/exponentiation-operator.kts rename to Task/Exponentiation-operator/Kotlin/exponentiation-operator.kotlin diff --git a/Task/Exponentiation-operator/OCaml/exponentiation-operator.ml b/Task/Exponentiation-operator/OCaml/exponentiation-operator.ocaml similarity index 100% rename from Task/Exponentiation-operator/OCaml/exponentiation-operator.ml rename to Task/Exponentiation-operator/OCaml/exponentiation-operator.ocaml diff --git a/Task/Exponentiation-operator/Phix/exponentiation-operator.phix b/Task/Exponentiation-operator/Phix/exponentiation-operator.phix index 07065b741f..79c10d37a2 100644 --- a/Task/Exponentiation-operator/Phix/exponentiation-operator.phix +++ b/Task/Exponentiation-operator/Phix/exponentiation-operator.phix @@ -1,13 +1,15 @@ -with javascript_semantics -function powir(atom b, integer i) - atom res = 1 - if i<0 then {b,i} = {1/b,abs(i)} end if - while i do - if and_bits(i,1) then res *= b end if - b *= b - i = floor(i/2) - end while - return res -end function -?powir(-3,-5) -?power(-3,-5) +(phixonline)--> + with javascript_semantics + function powir(atom b, integer i) + atom res = 1 + if i<0 then {b,i} = {1/b,abs(i)} end if + while i do + if and_bits(i,1) then res *= b end if + b *= b + i = floor(i/2) + end while + return res + end function + ?powir(-3,-5) + ?power(-3,-5) + + ?power(power(5,3),2) + ?power(5,power(3,2)) + + for x=-5 to 5 by 10 do + for p=2 to 3 do + printf(1,"x = %2d, p = %d, power(-x,p) = %4d, -power(x,p) = %4d\n",{x,p,power(-x,p),-power(x,p)}) + end for + end for + + switch {condition1,condition2} do + case {true,true}: + case {true,false}: + case {false,true}: + case {false,false}: + end switch + + function if2(bool c1, bool c2) + return c1*10+c2 + end function -switch if2(condition1,condition2) do - case 11: - case 10: - case 01: - case 00: -end switch + switch if2(condition1,condition2) do + case 11: + case 10: + case 01: + case 00: + end switch + + enum BOTH = 0b11, FIRST = 0b10, SECOND = 0b01, NEITHER = 0b00 -function if2(bool c1, bool c2) - return c1*2+c2 -end function + function if2(bool c1, bool c2) + return c1*2+c2 + end function -integer r = if2(condition1,condition2) -if r=BOTH then -elsif r=FIRST then -elsif r=SECOND then -elsif r=NEITHER then -end if + integer r = if2(condition1,condition2) + if r=BOTH then + elsif r=FIRST then + elsif r=SECOND then + elsif r=NEITHER then + end if + + global constant T_if2 = 5200 tt_stringF("if2",T_if2) + global constant T_else1 = 5200 tt_stringF("else1",T_else1) + global constant T_else2 = 5200 tt_stringF("else2",T_else2) + + --constant T_endelseelsif = {T_end,T_else,T_elsif,T_case,T_default,T_fallthru,T_fallthrough} + constant T_endelseelsif = {T_end,T_else,T_else1,T_else2,T_elsif,T_case,T_default,T_fallthru,T_fallthrough} + + elsif ttidx=T_if2 then DoIf2() + + for N=10 to 20 do + printf(1,"%d is ",N) + if2 mod(N,2)=0, mod(N,3)=0 then + puts(1,"divisible by both two and three.\n") + else1 + puts(1,"divisible by two, but not by three.\n") + else2 + puts(1,"divisible by three, but not by two.\n") + else + puts(1,"neither divisible by two, nor by three.\n") + end if2 + end for + + with javascript_semantics + if platform()!=JS then free_console() end if + sequence primes = {2,3,5,7} + atom sieved = 10 -procedure add_block() - integer N = min((sieved-1)*sieved,400000) - sequence sieve = repeat(1,N) -- sieve[i] is really i+sieved - for i=2 to length(primes) do -- (evens filtered on output) - atom p = primes[i], p2 = p*p - if p2>sieved+N then exit end if - if p2procedure add_block() + integer N = min((sieved-1)*sieved,400000) + sequence sieve = repeat(1,N) -- sieve[i] is really i+sieved + for i=2 to length(primes) do -- (evens filtered on output) + atom p = primes[i], p2 = p*p + if p2>sieved+N then exit end if + if p2<sieved+1 then + p2 += ceil((sieved+1-p2)/p)*p + end if + p2 -= sieved + if and_bits(p2,1)=0 then p2 += p end if + -- if sieve[p2] then -- dang! + for k=p2 to N by p*2 do + sieve[k] = 0 + end for + -- end if + end for + for i=1 to N by 2 do + if sieve[i] then + primes &= i+sieved + end if + end for + sieved += N + end procedure -atom t0 = time() -while sieved<8000 do add_block() end while -printf(1,"The first 20 primes are: %v\n",{primes[1..20]}) -integer lo = abs(binary_search(100,primes)), - hi = abs(binary_search(150,primes))-1 -printf(1,"The primes between 100 and 150 are: %v\n",{primes[lo..hi]}) -lo = abs(binary_search(7700,primes)) -hi = abs(binary_search(8000,primes)) -printf(1,"There are %d primes between 7700 and 8000.\n",hi-lo) -for i=1 to iff(platform()=JS?7:8) do - integer k = power(10,i) - while length(primes)function is_prime2(integer n) + while sieved<n do + add_block() + end while + return binary_search(n,primes)>0 + end function + + atom t0 = time() + while length(primes)<20 do add_block() end while + printf(1,"The first 20 primes are: ") ?primes[1..20] + while sieved<150 do add_block() end while + sequence s = {} + for k=abs(binary_search(100,primes)) to length(primes) do + integer p = primes[k] + if p>150 then exit end if + s &= p + end for + printf(1,"The primes between 100 and 150 are: ") ?s + s = {} + for i=7700 to 8000 do + if is_prime2(i) then s&=i end if + end for + printf(1,"There are %d primes between 7700 and 8000.\n",length(s)) + for i=1 to iff(platform()=JS?7:8) do + integer k = power(10,i) + while length(primes)<k do + add_block() + end while + printf(1,"The %,dth prime is : %d\n",{k,primes[k]}) + end for + ?time()-t0 + if platform()!=JS then {} = wait_key() end if + + with javascript_semantics + atom t0 = time() + printf(1,"The first 20 primes are: %v\n",{get_primes(-20)}) + sequence s = get_primes_le(150)[length(get_primes_le(100))+1..$] + printf(1,"The primes between 100 and 150 are: %v\n",{s}) + integer n7700to8000 = length(get_primes_le(8000))-length(get_primes_le(7700)) + printf(1,"There are %d primes between 7700 and 8000.\n",n7700to8000) + for i=1 to iff(platform()=JS?7:8) do + integer k = power(10,i) + printf(1,"The %,dth prime is : %d\n",{k,get_prime(k)}) + end for + ?time()-t0 + if platform()!=JS then {} = wait_key() end if + + with javascript_semantics + constant inf = 1e300*1e300, -- (works on both 32 and 64 bit) + ninf = -inf, + nan = -(inf/inf), + nzero = -1/inf -- (not supported) -printf(1," inf: %f\n",{inf}) -printf(1," ninf: %f\n",{ninf}) -printf(1," nan: %f\n",{nan}) -printf(1,"*nzero: %f\n",{nzero}) -printf(1," inf+2: %f\n",{inf+2}) -printf(1," inf+ninf: %f\n",{inf+ninf}) -printf(1," 0*inf: %f\n",{0*inf}) -printf(1," nan+1: %f\n",{nan+1}) -printf(1," nan+nan: %f\n",{nan+nan}) -printf(1," inf>1e300: %d\n",{inf>1e300}) -printf(1," ninf<1e300: %d\n",{ninf<-1e300}) -printf(1,"*nan=nan: %d\n",{nan=nan}) -printf(1," nan=42: %d\n",{nan=42}) -printf(1,"*nan<0: %d\n",{nan<0}) -printf(1," nan>0: %d\n",{nan>0}) + printf(1," inf: %f\n",{inf}) + printf(1," ninf: %f\n",{ninf}) + printf(1," nan: %f\n",{nan}) + printf(1,"*nzero: %f\n",{nzero}) + printf(1," inf+2: %f\n",{inf+2}) + printf(1," inf+ninf: %f\n",{inf+ninf}) + printf(1," 0*inf: %f\n",{0*inf}) + printf(1," nan+1: %f\n",{nan+1}) + printf(1," nan+nan: %f\n",{nan+nan}) + printf(1," inf>1e300: %d\n",{inf>1e300}) + printf(1," ninf<1e300: %d\n",{ninf<-1e300}) + printf(1,"*nan=nan: %d\n",{nan=nan}) + printf(1," nan=42: %d\n",{nan=42}) + printf(1,"*nan<0: %d\n",{nan<0}) + printf(1," nan>0: %d\n",{nan>0}) + " + to_string(rotated, " ") << std::endl; - increment(factoradic); - } - std::cout << std::endl; - - // Part 2 - std::cout << "Generating the permutations of 11 digits:" << std::endl; - const uint32_t limit = factorial(11); - elements = convert_to_vector_of_integer("0.1.2.3.4.5.6.7.8.9.10"); - factoradic = convert_to_vector_of_integer("0.0.0.0.0.0.0.0.0.0"); - for ( uint32_t i = 0; i < limit; ++i ) { - std::vector rotated = permutation(elements, factoradic); - if ( i < 3 || i > limit - 4 ) { - std::cout << to_string(factoradic, ".") + " --> " + to_string(rotated, " ") - << std::endl; - } else if ( i == 3 ) { - std::cout << " [ ... ] " << std::endl; - } - increment(factoradic); - } - std::cout << "Number of permutations is 11! = " << limit << std::endl << std::endl; - - // Part 3 - std::vector codes = { "39.49.7.47.29.30.2.12.10.3.29.37.33.17.12.31.29.34.17.25.2.4.25.4.1.14.20.6.21.18.1.1.1.4.0.5.15.12.4.3.10.10.9.1.6.5.5.3.0.0.0", -"51.48.16.22.3.0.19.34.29.1.36.30.12.32.12.29.30.26.14.21.8.12.1.3.10.4.7.17.6.21.8.12.15.15.13.15.7.3.12.11.9.5.5.6.6.3.4.0.3.2.1" }; - - std::vector cards = { "A♠", "K♠", "Q♠", "J♠", "10♠", "9♠", "8♠", "7♠", "6♠", "5♠", "4♠", "3♠", "2♠", - "A♥", "K♥", "Q♥", "J♥", "10♥", "9♥", "8♥", "7♥", "6♥", "5♥", "4♥", "3♥", "2♥", - "A♦", "K♦", "Q♦", "J♦", "10♦", "9♦", "8♦", "7♦", "6♦", "5♦", "4♦", "3♦", "2♦", - "A♣", "K♣", "Q♣", "J♣", "10♣", "9♣", "8♣", "7♣", "6♣", "5♣", "4♣", "3♣", "2♣" - }; - - std::cout << "Original deck of cards:" << std::endl; - std::cout << to_string(cards, " ") << std::endl << std::endl; - std::cout << "Task shuffles:" << std::endl; - for ( const std::string& code : codes ) { - std::cout << code + " --> " << std::endl; - factoradic = convert_to_vector_of_integer(code); - std::cout << to_string(permutation(cards, factoradic), " ") - << std::endl << std::endl; - } - - std::cout << "Random shuffle:" << std::endl;; - std::random_device random; - std::mt19937 generator(random()); - - factoradic.clear(); - for ( uint32_t i = 0; i < cards.size() - 1; ++i ) { - std::uniform_int_distribution distribution(0, cards.size() - i - 1); - factoradic.emplace_back(distribution(generator)); - } - - std::cout << to_string(factoradic, ".") + " --> " << std::endl; - std::cout << to_string(permutation(cards, factoradic), " ") << std::endl; -} diff --git a/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/FreeBASIC/factorial-base-numbers-indexing-permutations-of-a-collection.basic b/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/FreeBASIC/factorial-base-numbers-indexing-permutations-of-a-collection.basic deleted file mode 100644 index abd85c0b29..0000000000 --- a/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/FreeBASIC/factorial-base-numbers-indexing-permutations-of-a-collection.basic +++ /dev/null @@ -1,167 +0,0 @@ -Type Sequence - longi As Integer - dato(1000) As Integer -End Type - -Sub printSequence(s As Sequence) - Print " "; - For i As Integer = 1 To s.longi - Print Chr(8) & s.dato(i); - If i < s.longi Then Print "."; - Next i - Print -End Sub - -Function factorial(n As Integer) As Longint - If n <= 1 Then Return 1 - Return n * factorial(n - 1) -End Function - -Function tagset(n As Integer) As Sequence - Dim As Sequence result - result.longi = n - For i As Integer = 1 To n - result.dato(i) = i - Next i - Return result -End Function - -Sub showCards(s As Sequence) - Const cards = "AKQJT98765432" - Const suits = "SHDC" - - For i As Integer = 1 To s.longi - Dim As Integer c = s.dato(i) - 1 - Dim As String card = Mid(cards, (c Mod 13) + 1, 1) + Mid(suits, (c \ 13) + 1, 1) - Print card; Iif(((i Mod 13) = 0 Or i = s.longi), Chr(10), " "); - Next i - Print -End Sub - -Function fperm(fbn As Sequence, omega As Sequence) As Sequence - Dim As Integer i, g, tmp, j, m = 0 - Dim As Sequence result = omega - - For i = 1 To fbn.longi - g = fbn.dato(i) - If g > 0 Then - tmp = result.dato(m + g + 1) - For j = m + g + 1 To m + 2 Step -1 - result.dato(j) = result.dato(j - 1) - Next j - result.dato(m + 1) = tmp - End If - m += 1 - Next i - - result.longi = omega.longi - Return result -End Function - -Function factorialBaseNumbers(size As Integer, cntOnly As Integer) As Sequence - Dim As Sequence results - Dim As Integer res(1000) - Dim As Integer cnt, n, radix, k, i - - results.longi = 0 - cnt = 0 - n = 0 - Do - radix = 2 - k = n - For i = 1 To size - res(i) = 0 - Next i - - While k > 0 - If cntOnly = 0 Andalso radix <= size + 1 Then - res(size - radix + 2) = k Mod radix - End If - k \= radix - radix += 1 - Wend - - If radix > size + 2 Then Exit Do - - cnt += 1 - If cntOnly = 0 Then - results.longi += 1 - For i = 1 To size - results.dato((results.longi - 1) * size + i) = res(i) - Next i - End If - n += 1 - Loop - - If cntOnly Then - results.longi = 1 - results.dato(1) = cnt - End If - - Return results -End Function - -' Generate random factorial base number sequence -Function randFBN51() As Sequence - Dim As Sequence fbn51 - fbn51.longi = 51 - For i As Integer = 1 To 51 - fbn51.dato(i) = Int(Rnd * (52 - i)) + 1 - Next i - Return fbn51 -End Function - -' Main program -Randomize Timer -Dim As Integer i, j - -Dim As Sequence fbns = factorialBaseNumbers(3, 0) -Dim As Sequence omega -omega.longi = 4 -For i = 0 To 3 - omega.dato(i + 1) = i -Next i - -For i = 1 To fbns.longi - For j = 1 To 3 - Print fbns.dato((i-1)*3 + j) & "."; - Next j - Print Chr(8) & " ->"; - - Dim As Sequence tmp - tmp.longi = 3 - For j = 1 To 3 - tmp.dato(j) = fbns.dato((i-1)*3 + j) - Next j - - Dim As Sequence result = fperm(tmp, omega) - printSequence(result) -Next i - -Print -Dim As Sequence cnt = factorialBaseNumbers(10, 1) -Print "Permutations generated ="; cnt.dato(1) -Print " compared to 11! which ="; factorial(11) - -Print -Dim As Sequence fbn51s(3) - -' First predefined sequence -fbn51s(1).longi = 51 -Data 39,49,7,47,29,30,2,12,10,3,29,37,33,17,12,31,29,34,17,25,2,4,25,4,1,14,20,6,21,18,1,1,1,4,0,5,15,12,4,3,10,10,9,1,6,5,5,3,0,0,0 -For i = 1 To 51: Read fbn51s(1).dato(i): Next - -' Second predefined sequence -fbn51s(2).longi = 51 -Data 51,48,16,22,3,0,19,34,29,1,36,30,12,32,12,29,30,26,14,21,8,12,1,3,10,4,7,17,6,21,8,12,15,15,13,15,7,3,12,11,9,5,5,6,6,3,4,0,3,2,1 -For i = 1 To 51: Read fbn51s(2).dato(i): Next - -' Third random sequence -fbn51s(3) = randFBN51() - -' Show all card arrangements -For i = 1 To 3 - showCards(fperm(fbn51s(i), tagset(52))) -Next i - -Sleep diff --git a/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/Java/factorial-base-numbers-indexing-permutations-of-a-collection.java b/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/Java/factorial-base-numbers-indexing-permutations-of-a-collection.java index 3f126f2202..9e7609637e 100644 --- a/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/Java/factorial-base-numbers-indexing-permutations-of-a-collection.java +++ b/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/Java/factorial-base-numbers-indexing-permutations-of-a-collection.java @@ -58,7 +58,7 @@ public final class FactorialBaseNumbersIndexingPermutations { System.out.println("Random shuffle:"); ThreadLocalRandom random = ThreadLocalRandom.current(); factoradic.clear(); - for ( int i = 0; i < cards.size() - 1; i++ ) { + for ( int i = 0; i < 52; i++ ) { factoradic.add(random.nextInt(cards.size() - i)); } System.out.println(toString(factoradic, ".") + " --> "); diff --git a/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/JavaScript/factorial-base-numbers-indexing-permutations-of-a-collection.js b/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/JavaScript/factorial-base-numbers-indexing-permutations-of-a-collection.js deleted file mode 100644 index 2b4f52172f..0000000000 --- a/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/JavaScript/factorial-base-numbers-indexing-permutations-of-a-collection.js +++ /dev/null @@ -1,170 +0,0 @@ -// Helper function to convert values to strings -function stringify(text) { - return text; -} - -function stringifyNumber(number) { - return String(number); -} - -// Join array elements with delimiter -function toStringArray(factoradic, delimiter) { - let result = ""; - for (let i = 0; i < factoradic.length - 1; i++) { - result += stringifyNumber(factoradic[i]) + delimiter; - } - result += stringifyNumber(factoradic[factoradic.length - 1]); - return result; -} - -// Calculate factorial -function factorial(n) { - let result = 1; - for (let i = 2; i <= n; i++) { - result *= i; - } - return result; -} - -// Increment factoradic number -function increment(factoradic) { - let index = factoradic.length - 1; - while (index >= 0 && factoradic[index] === factoradic.length - index) { - factoradic[index] = 0; - index -= 1; - } - if (index >= 0) { - factoradic[index] += 1; - } -} - -// Split string by delimiter -function splitString(text, delimiter) { - const lines = []; - let start = 0; - let end = text.indexOf(delimiter); - - while (end !== -1) { - const line = text.substring(start, end); - if (line !== "") { - lines.push(line); - } - start = end + 1; - end = text.indexOf(delimiter, start); - } - - const lastLine = text.substring(start); - if (lastLine !== "") { - lines.push(lastLine); - } - - return lines; -} - -// Convert "a.b.c" format to array of integers -function convertToVectorOfInteger(text) { - const result = []; - const numbers = splitString(text, '.'); - for (const number of numbers) { - result.push(parseInt(number, 10)); - } - return result; -} - -// Generate permutation from elements and factoradic representation -function permutation(elements, factoradic) { - const result = [...elements]; - let m = 0; - - for (const g of factoradic) { - const element = result[m + g]; - result.splice(m + g, 1); - result.splice(m, 0, element); - m += 1; - } - - return result; -} - -// Main execution -function main() { - // Part 1 - console.log("Part 1: Permutations of 4 elements"); - console.log("=".repeat(50)); - - let elements = convertToVectorOfInteger("0.1.2.3"); - let factoradic = convertToVectorOfInteger("0.0.0"); - - for (let i = 0; i < factorial(4); i++) { - const rotated = permutation(elements, factoradic); - console.log(toStringArray(factoradic, '.') + " --> " + rotated.join(' ')); - increment(factoradic); - } - console.log(); - - // Part 2 - console.log("Part 2: Permutations of 11 digits"); - console.log("=".repeat(50)); - - const limit = factorial(11); - elements = convertToVectorOfInteger("0.1.2.3.4.5.6.7.8.9.10"); - factoradic = convertToVectorOfInteger("0.0.0.0.0.0.0.0.0.0"); - - for (let i = 0; i < limit; i++) { - const rotated = permutation(elements, factoradic); - if (i < 3 || i > limit - 4) { - console.log(toStringArray(factoradic, '.') + " --> " + rotated.join(' ')); - } else if (i === 3) { - console.log(" [ ... ] "); - } - increment(factoradic); - } - console.log("Number of permutations is 11! = " + limit); - console.log(); - - // Part 3 - console.log("Part 3: Card shuffling with factoradic representation"); - console.log("=".repeat(50)); - - const codes = [ - "39.49.7.47.29.30.2.12.10.3.29.37.33.17.12.31.29.34.17.25.2.4.25.4.1.14.20.6.21.18.1.1.1.4.0.5.15.12.4.3.10.10.9.1.6.5.5.3.0.0.0", - "51.48.16.22.3.0.19.34.29.1.36.30.12.32.12.29.30.26.14.21.8.12.1.3.10.4.7.17.6.21.8.12.15.15.13.15.7.3.12.11.9.5.5.6.6.3.4.0.3.2.1" - ]; - - const suits = ['♠', '♥', '♦', '♣']; - const ranks = ['A', 'K', 'Q', 'J', '10', '9', '8', '7', '6', '5', '4', '3', '2']; - - const cards = []; - for (const suit of suits) { - for (const rank of ranks) { - cards.push(rank + suit); - } - } - - console.log("Original deck of cards:"); - console.log(cards.join(' ')); - console.log(); - - console.log("Task shuffles:"); - for (const code of codes) { - console.log(code + " --> "); - factoradic = convertToVectorOfInteger(code); - const shuffled = permutation(cards, factoradic); - console.log(shuffled.join(' ')); - console.log(); - } - - console.log("Random shuffle:"); - factoradic = []; - for (let i = 0; i < cards.length - 1; i++) { - const randomIndex = Math.floor(Math.random() * (cards.length - i)); - factoradic.push(randomIndex); - } - - console.log(toStringArray(factoradic, '.') + " --> "); - const randomShuffled = permutation(cards, factoradic); - console.log(randomShuffled.join(' ')); -} - -// Run the program -main(); diff --git a/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/Julia/factorial-base-numbers-indexing-permutations-of-a-collection.jl b/Task/Factorial-base-numbers-indexing-permutations-of-a-collection/Julia/factorial-base-numbers-indexing-permutations-of-a-collection.julia similarity index 100% rename from Task/Factorial-base-numbers-indexing-permutations-of-a-collection/Julia/factorial-base-numbers-indexing-permutations-of-a-collection.jl rename to Task/Factorial-base-numbers-indexing-permutations-of-a-collection/Julia/factorial-base-numbers-indexing-permutations-of-a-collection.julia diff --git a/Task/Factorial-primes/ALGOL-W/factorial-primes.alg b/Task/Factorial-primes/ALGOL-W/factorial-primes.alg deleted file mode 100644 index d8a6380cc6..0000000000 --- a/Task/Factorial-primes/ALGOL-W/factorial-primes.alg +++ /dev/null @@ -1,75 +0,0 @@ -begin % find some factorial primes - primes that are f - 1 or f + 1 % - % for some factorial f % - - % returns true if p is prime, false otherwise % - logical procedure isPrime ( integer value p ) ; - if p <= 1 or p rem 2 = 0 then p = 2 - else begin - logical prime; - integer rootP, i; - prime := true; - i := 3; - rootP := entier( sqrt( p ) ); - while i <= rootP and prime do begin - prime := p rem i not = 0; - i := i + 2 - end; - prime - end isPrime ; - - % returns true if p is prime, false otherwise % - logical procedure isPrimeLongReal ( long real value p ) ; - if p <= MAXINTEGER then begin - % p is small enough to test using integer arithmetic % - isPrime( entier( p ) ) - end - else begin - % p is too large for integer primality testing % - logical prime; - integer rootP, i; - prime := true; - i := 2; - rootP := entier( longsqrt( p ) ); - while i <= rootP and prime do begin - long real pOverI; - pOverI := p / i; - prime := roundToReal( pOverI ) not = pOverI; - i := if i < 3 then 3 else i + 2 - end; - prime - end isPrime ; - - begin - long real f; - integer fpCount, n; - fpCount := 0; - n := 0; - f := 1; - while fpCount < 10 do begin - long real fp; - string(1) fpOp; - n := n + 1; - f := f * n; - fpOp := "-"; - for offset := -1 step 2 until 1 do begin - fp := f + offset; - if fp < MAXINTEGER then begin - if isPrime( entier( fp ) ) then begin - fpCount := fpCount + 1; - write( s_w := 0, i_w := 2, fpCount, ":" ); - writeon( s_w := 0, i_w := 4, n, "! ", fpOp, " 1 = " ); - writeon( s_w := 0, i_w := 1, entier( fp ) ) - end if_isPrime__entier__fp - end - else if isPrimeLongReal( fp ) then begin - fpCount := fpCount + 1; - write( s_w := 0, i_w := 2, fpCount, ":" ); - writeon( s_w := 0, i_w := 4, n, "! ", fpOp, " 1 = " ); - writeon( r_format := "A", r_w := 1, r_d := 0, fp ) - end if_isPrime__fp__isPrimeLongReal__fp ; - fpOp := "+" - end for_fp - end while_fpCount_lt_10 - end - -end. diff --git a/Task/Factorial-primes/AWK/factorial-primes.awk b/Task/Factorial-primes/AWK/factorial-primes.awk deleted file mode 100644 index b2cb4bb04a..0000000000 --- a/Task/Factorial-primes/AWK/factorial-primes.awk +++ /dev/null @@ -1,15 +0,0 @@ -function isprime(n, i) { - if(n==2)return 1 - if(n<2||n%2==0)return 0 - for(i=3;i*i<=n;i+=2) - if(n%i==0)return 0 - return 1 -} - -BEGIN { - for(x=i=1;z<10;i++){ - x*=i - if(isprime(x-1)){z++;print i"! - 1 = "x-1} - if(isprime(x+1)){z++;print i"! + 1 = "x+1} - } -} diff --git a/Task/Factorial-primes/Ada/factorial-primes.adb b/Task/Factorial-primes/Ada/factorial-primes.adb deleted file mode 100644 index f264eb9d50..0000000000 --- a/Task/Factorial-primes/Ada/factorial-primes.adb +++ /dev/null @@ -1,95 +0,0 @@ --- Rosetta Code Task written in Ada --- Factorial primes --- https://rosettacode.org/wiki/Factorial_primes --- August 2024, R. B. E. --- Using GNAT Big Integers, GNAT version 14.1, MacOS 14.6.1, M1 chip - -pragma Ada_2022; -with Ada.Text_IO; use Ada.Text_IO; -with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; -with Ada.Numerics.Big_Numbers.Big_Integers; use Ada.Numerics.Big_Numbers.Big_Integers; - -procedure Factorial_Primes is - - function Is_Prime (N : in Big_Integer) return Boolean is - Big_0 : Big_Natural := To_Big_Integer (0); - Big_2 : Big_Natural := To_Big_Integer (2); - Big_3 : Big_Natural := To_Big_Integer (3); - Big_Temp : Big_Natural := To_Big_Integer (5); - begin - if N < Big_2 then - return False; - end if; - if N mod Big_2 = Big_0 then - return N = Big_2; - end if; - if N mod Big_3 = Big_0 then - return N = Big_3; - end if; - while Big_Temp * Big_Temp <= N loop - if N mod Big_Temp = Big_0 then - return False; - end if; - Big_Temp := Big_Temp + Big_2; - if N mod Big_Temp = Big_0 then - return False; - end if; - Big_Temp := Big_Temp + 4; - end loop; - return True; - end Is_Prime; - - function Factorial (N : Positive) return Big_Integer is - type Factorial_Array is array (1..12) of Big_Integer; - First12_Facts : Factorial_Array; - Result : Big_Integer; - begin - First12_Facts (1) := To_Big_Integer (1); - for I in 2..12 loop - First12_Facts (I) := First12_Facts (I-1) * To_Big_Integer (I); - end loop; - if (N <= 12) then - return First12_Facts (N); - else - Result := First12_Facts (12); - for I in 13..N loop - Result := Result * To_Big_Integer (I); - end loop; - end if; - return Result; - end Factorial; - - Fact : Big_Integer; - Fact_Plus_One : Big_Integer; - Fact_Minus_One : Big_Integer; - Big_One : constant Big_Integer := To_Big_Integer (1); - I, Count : Natural := 0; - Limit : constant Positive := 10; - -begin - loop - I := I + 1; - Fact := Factorial (I); - if (is_Prime (Fact - Big_One)) then - Count := Count + 1; - Put (Count, 3); - Put (": "); - Put (I, 5); - Put ("! - 1 "); - Fact_Minus_One := Fact - Big_One; - Put (To_String (Arg => Fact_Minus_One, Width => 40)); - New_Line; - end if; - if (is_Prime (Fact + Big_One)) then - Count := Count + 1; - Put (Count, 3); - Put (": "); - Put (I, 5); - Put ("! + 1 "); - Fact_Plus_One := Fact + Big_One; - Put (To_String (Arg => Fact_Plus_One, Width => 40)); - New_Line; - end if; - exit when Count >= Limit; - end loop; -end Factorial_Primes; diff --git a/Task/Factorial-primes/Agena/factorial-primes.agena b/Task/Factorial-primes/Agena/factorial-primes.agena deleted file mode 100644 index 0a76370d5e..0000000000 --- a/Task/Factorial-primes/Agena/factorial-primes.agena +++ /dev/null @@ -1,17 +0,0 @@ -scope # find some factorial primes - primes that are f - 1 or f + 1 for some factorial f - - local f, fpCount, n := 1, 0, 1 - for n while fpCount < 10 do - f *:= n; - local fpOp := "-"; - for fp from f - 1 to f + 1 by 2 do - if numtheory.isprime( fp ) then - fpCount +:= 1; - # printing fp with %s as %d has trouble with 14! - 1 - printf( "%2d:%4d! %s 1 = %s\n", fpCount, n, fpOp, fp ) - fi; - fpOp := "+" - od - od - -end diff --git a/Task/Factorial-primes/Common-Lisp/factorial-primes.lisp b/Task/Factorial-primes/Common-Lisp/factorial-primes.lisp deleted file mode 100644 index 0e28867922..0000000000 --- a/Task/Factorial-primes/Common-Lisp/factorial-primes.lisp +++ /dev/null @@ -1,27 +0,0 @@ -(defun factorial (x) - (if (= x 1) - x - (* x (factorial (- x 1))))) - -(defun is-factor (x y) - (zerop (mod x y))) - -(defun is-prime (n) - (cond ((< n 4) (or (= n 2) (= n 3))) - ((or (zerop (mod n 2)) (zerop (mod n 3))) nil) - (t (loop for i from 5 to (floor (sqrt n)) by 6 - never (or (is-factor n i) - (is-factor n (+ i 2))))))) - -(defun main (&optional (limit 10)) - (let ((n 0) - (f 0)) - (loop while (< n limit) - for i from 1 - do (setf f (factorial i)) - (when (is-prime (+ f 1)) - (incf n) - (format t "~2d: ~2d! + 1 = ~12d~%" n i (+ f 1))) - (when (is-prime (- f 1)) - (incf n) - (format t "~2d: ~2d! - 1 = ~12d~%" n i (- f 1)))))) diff --git a/Task/Factorial-primes/Delphi/factorial-primes.pas b/Task/Factorial-primes/Delphi/factorial-primes.delphi similarity index 100% rename from Task/Factorial-primes/Delphi/factorial-primes.pas rename to Task/Factorial-primes/Delphi/factorial-primes.delphi diff --git a/Task/Factorial-primes/EasyLang/factorial-primes.easy b/Task/Factorial-primes/EasyLang/factorial-primes.easy index fd62915528..b12ef97ac5 100644 --- a/Task/Factorial-primes/EasyLang/factorial-primes.easy +++ b/Task/Factorial-primes/EasyLang/factorial-primes.easy @@ -1,8 +1,12 @@ func isprim num . - if num < 2 : return 0 + if num < 2 + return 0 + . i = 2 while i <= sqrt num - if num mod i = 0 : return 0 + if num mod i = 0 + return 0 + . i += 1 . return 1 @@ -12,7 +16,7 @@ while count < 10 n += 1 f *= n op$ = "-" - for fp in [ f - 1, f + 1 ] + for fp in [ f - 1 f + 1 ] if isprim fp = 1 count += 1 print n & "! " & op$ & " 1 = " & fp diff --git a/Task/Factorial-primes/Fennel/factorial-primes.fennel b/Task/Factorial-primes/Fennel/factorial-primes.fennel deleted file mode 100644 index 8151c241fb..0000000000 --- a/Task/Factorial-primes/Fennel/factorial-primes.fennel +++ /dev/null @@ -1,30 +0,0 @@ -(do ;;; find some factorial primes - primes that are f - 1 or f + 1 for some factorial f - - (fn is-prime [p] - (if (or (<= p 1) (= 0 (% p 2))) - (= p 2) - ;else - (do (var (prime i root-p) (values true 3 (math.floor (math.sqrt p)))) - (while (and (<= i root-p) prime) - (set (prime i) (values (not= 0 (% p i)) (+ i 1))) - ) - prime - ) - ) - ) - - (var (f fp-count n) (values 1 0 1)) - (while (< fp-count 10) - (set f (* f n)) - (var fp-op "-") - (for [fp (- f 1) (+ f 1) 2] - (when (is-prime fp) - (set fp-count (+ fp-count 1)) - (io.write (string.format "%2d:%4d! %s 1 = %d\n" fp-count n fp-op fp)) - ) - (set fp-op "+") - ) - (set n (+ n 1)) - ) - -) diff --git a/Task/Factorial-primes/Frink/factorial-primes.frink b/Task/Factorial-primes/Frink/factorial-primes.frink deleted file mode 100644 index e8941229fe..0000000000 --- a/Task/Factorial-primes/Frink/factorial-primes.frink +++ /dev/null @@ -1,36 +0,0 @@ -isFactorialPrime[x] := -{ - if isPrime[x!+1] - return +1 - if x>=2 and isPrime[x!-1] - return -1 - return 0 -} - -count = 0 -n = 1 -res = new array -do -{ - f = isFactorialPrime[n] - if f != 0 - { - count = count + 1 - line = ["$count:", "$n!", f<0 ? "-" : "+", 1, "="] - line.pushAll[formatFac[n!+f]] - res.push[line] - } - n = n + 1 -} until count == 30 - -println[formatTable[res, "right"]] - -formatFac[n] := -{ - s = toString[n] - len = length[s] - if len > 40 - return [left[s,20] + "..." + right[s,20], " ($len digits)"] - else - return [s] -} diff --git a/Task/Factorial-primes/Go/factorial-primes.go b/Task/Factorial-primes/Go/factorial-primes.go deleted file mode 100644 index a808dfb619..0000000000 --- a/Task/Factorial-primes/Go/factorial-primes.go +++ /dev/null @@ -1,59 +0,0 @@ -package main - -import ( - "fmt" - "math/big" -) - -func main() { - n, count := 0, 0 - - for count < 10 { - n++ - f := factorial(n) - - if isPrime(f.Sub(f, big.NewInt(1))) { - count++ - fmt.Printf("%2d: %2d! - 1 = %s\n", count, n, f.String()) - } - - if isPrime(f.Add(f, big.NewInt(2))) { - count++ - fmt.Printf("%2d: %2d! + 1 = %s\n", count, n, f.String()) - } - } -} - -func factorial(n int) *big.Int { - result := big.NewInt(1) - - for i := 2; i <= n; i++ { - result.Mul(result, big.NewInt(int64(i))) - } - - return result -} - -func isPrime(num *big.Int) bool { - if num.Cmp(big.NewInt(2)) < 0 { - return false - } - - if num.Cmp(big.NewInt(2)) == 0 { - return true - } - - if new(big.Int).Mod(num, big.NewInt(2)).Cmp(big.NewInt(0)) == 0 { - return false - } - - sqrt := new(big.Int).Sqrt(num) - - for i := big.NewInt(3); i.Cmp(sqrt) <= 0; i.Add(i, big.NewInt(2)) { - if new(big.Int).Mod(num, i).Cmp(big.NewInt(0)) == 0 { - return false - } - } - - return true -} diff --git a/Task/Factorial-primes/Haskell/factorial-primes.hs b/Task/Factorial-primes/Haskell/factorial-primes.hs deleted file mode 100644 index 9d2d00ea68..0000000000 --- a/Task/Factorial-primes/Haskell/factorial-primes.hs +++ /dev/null @@ -1,26 +0,0 @@ -isPrime :: Integer -> Bool -isPrime n - | n < 2 = False - | n == 2 = True - | otherwise = 0 == length [i | i <- [2..floor(sqrt (fromIntegral n))], n `mod` i == 0] - -data Op = SubtractOne | AddOne - deriving (Show) - -data Prime = Prime - { fact :: Integer, - prime :: Integer, - op :: Op -} deriving (Show) - -getFactorialPrimes :: Integer -> [Prime] -getFactorialPrimes n - | isPrime (f - 2) = Prime {fact = n, prime = f - 2, op = SubtractOne} : - (if isPrime f then [Prime {fact = n, prime = f, op = AddOne}] else []) - | otherwise = (if isPrime f then [Prime {fact = n, prime = f, op = AddOne}] else []) - where - factorial n = product[1..n] - f = factorial n + 1 - -factorialPrimes = concat $ map getFactorialPrimes [1..] -main = mapM_ print $ take 10 factorialPrimes diff --git a/Task/Factorial-primes/Julia/factorial-primes.jl b/Task/Factorial-primes/Julia/factorial-primes.julia similarity index 100% rename from Task/Factorial-primes/Julia/factorial-primes.jl rename to Task/Factorial-primes/Julia/factorial-primes.julia diff --git a/Task/Factorial-primes/Kotlin/factorial-primes.kts b/Task/Factorial-primes/Kotlin/factorial-primes.kts deleted file mode 100644 index 22db036df6..0000000000 --- a/Task/Factorial-primes/Kotlin/factorial-primes.kts +++ /dev/null @@ -1,43 +0,0 @@ -import java.math.BigInteger -import java.math.BigInteger.ONE - -enum class Difference(private val displayText: String) { - MINUS_ONE("- 1"), PLUS_ONE("+ 1"); - - override fun toString(): String { - return displayText - } -} - -fun main() { - var currentFactorial = ONE - var highestFactor = 1L - var found = 0 - - while(found < 30) { - if ((currentFactorial - ONE).isProbablePrime(25)) { - printlnFactorialPrime(currentFactorial - ONE, highestFactor, Difference.MINUS_ONE) - found++ - } - if ((currentFactorial + ONE).isProbablePrime(25)) { - printlnFactorialPrime(currentFactorial + ONE, highestFactor, Difference.PLUS_ONE) - found++ - } - - highestFactor++ - currentFactorial *= BigInteger.valueOf(highestFactor) - } -} - -fun printlnFactorialPrime(factorialPrime: BigInteger, base: Long, difference: Difference) = - println("${base}! $difference = ${factorialPrime.shortenIfNecessary()}") - -fun BigInteger.shortenIfNecessary(): String { - val digits = toString() - val length = digits.length - return if (length <= 40) { - digits - } else { - "${digits.take(20)}...${digits.takeLast(20)} ($length digits)" - } -} diff --git a/Task/Factorial-primes/Lua/factorial-primes.lua b/Task/Factorial-primes/Lua/factorial-primes.lua index 55c20a12e9..8c17ccd8e5 100644 --- a/Task/Factorial-primes/Lua/factorial-primes.lua +++ b/Task/Factorial-primes/Lua/factorial-primes.lua @@ -1,29 +1,39 @@ -do -- find some factorial primes - primes that are f - 1 or f + 1 for some factorial f +do -- find some factorial primes - primes that are f - 1 or f + 1 + -- for some factorial f - local function isPrime( p ) + function isPrime( p ) if p <= 1 or p % 2 == 0 then return p == 2 else - local prime, i, rootP = true, 3, math.floor( math.sqrt( p ) ) + local prime = true + local i = 3 + local rootP = math.floor( math.sqrt( p ) ) while i <= rootP and prime do - prime, i = p % i ~= 0, i + 1 + prime = p % i ~= 0 + i = i + 2 end return prime end end - local f, fpCount, n = 1, 0, 1 + local f = 1 + local fpCount = 0 + local n = 0 + local fpOp = "" while fpCount < 10 do - f = f * n - local fpOp = "-" + n = n + 1 + f = f * n + fpOp = "-" for fp = f - 1, f + 1, 2 do if isPrime( fp ) then fpCount = fpCount + 1 - io.write( string.format( "%2d:%4d! %s 1 = %d\n", fpCount, n, fpOp, fp ) ) + io.write( string.format( "%2d", fpCount ), ":" + , string.format( "%4d", n ), "! " + , fpOp, " 1 = ", fp, "\n" + ) end fpOp = "+" end - n = n + 1 end end diff --git a/Task/Factorial-primes/OCaml/factorial-primes.ml b/Task/Factorial-primes/OCaml/factorial-primes.ocaml similarity index 100% rename from Task/Factorial-primes/OCaml/factorial-primes.ml rename to Task/Factorial-primes/OCaml/factorial-primes.ocaml diff --git a/Task/Factorial-primes/PascalABC.NET/factorial-primes.pas b/Task/Factorial-primes/PascalABC.NET/factorial-primes.pas deleted file mode 100644 index 817ecf3506..0000000000 --- a/Task/Factorial-primes/PascalABC.NET/factorial-primes.pas +++ /dev/null @@ -1,42 +0,0 @@ -function IsPrime(n: int64): boolean; -begin - if (n = 2) or (n = 3) then Result := true - else if (n <= 1) or ((n mod 2) = 0) or ((n mod 3) = 0) then Result := false - else - begin - var i := 5; - Result := False; - while i <= trunc(sqrt(n)) do - begin - if ((n mod i) = 0) or ((n mod (i + 2)) = 0) then exit; - i += 6; - end; - Result := True; - end; -end; - -function Factorial(n: integer): int64; -begin - Result := 1; - for var i := 2 to n do Result *= i; -end; - -begin - var found := 0; - var i := 1; - while found < 10 do - begin - var fact := Factorial(i); - if IsPrime(fact - 1) then - begin - writeln(i:2, '! - 1 = ', fact - 1); - found += 1; - end; - if IsPrime(fact + 1) then - begin - writeln(i:2, '! + 1 = ', fact + 1); - found += 1; - end; - i += 1; - end; -end. diff --git a/Task/Factorial-primes/Pluto/factorial-primes.pluto b/Task/Factorial-primes/Pluto/factorial-primes.pluto deleted file mode 100644 index 4e6b707c4e..0000000000 --- a/Task/Factorial-primes/Pluto/factorial-primes.pluto +++ /dev/null @@ -1,20 +0,0 @@ -do -- find some factorial primes - primes that are f - 1 or f + 1 for some factorial f - - local fmt = require( "fmt" ) -- RC Pluto formatting library - local int = require( "int" ) -- RC Pluto integer library, inc. prime utilities - - local f, fpCount, n = 1, 0, 0 - while fpCount < 10 do - n += 1 - f *= n - local fpOp = "-" - for fp = f - 1, f + 1, 2 do - if int.isprime( fp ) then - fpCount += 1 - fmt.write( "%2d:%4d! %s 1 = %d\n", fpCount, n, fpOp, fp ) - end - fpOp = "+" - end - end - -end diff --git a/Task/Factorial-primes/R/factorial-primes.r b/Task/Factorial-primes/R/factorial-primes.r deleted file mode 100644 index 583498b194..0000000000 --- a/Task/Factorial-primes/R/factorial-primes.r +++ /dev/null @@ -1,29 +0,0 @@ -library(gmp) - -print_20digits <- function(z){ - s <- as.character(z) - if(nchar(s)>40){ - paste0(substring(s, 1, 20), "...", substring(s, nchar(s)-19, nchar(s))) - } - else return(s) -} - -count <- 0 -n <- 1 -while(count<33){ - plus <- factorialZ(n)+1 - minus <- factorialZ(n)-1 - if(isprime(plus)!=0){ - cat(n, "!+1 = ", print_20digits(plus), - " (", nchar(as.character(plus)), " digits)", - "\n", sep="") - count <- count+1 - } - if(isprime(minus)!=0){ - cat(n, "!-1 = ", print_20digits(minus), - " (", nchar(as.character(minus)), " digits)", - "\n", sep="") - count <- count+1 - } - n <- n+1 -} diff --git a/Task/Factorial-primes/Unicon/factorial-primes.unicon b/Task/Factorial-primes/Unicon/factorial-primes.unicon deleted file mode 100644 index 4de95546a3..0000000000 --- a/Task/Factorial-primes/Unicon/factorial-primes.unicon +++ /dev/null @@ -1,11 +0,0 @@ -link fastprime - -procedure main(A) - limit := \A[1] | 10 - every f := gfactorial(n := seq()) do { - if (x := (is_prime(y := f-1),n||"!-1")) then - (write(" (",x,",",y,")"), if 0 = (limit -:= 1) then break) - if (x := (is_prime(y := f+1),n||"!+1")) then - (write(" (",x,",",y,")"), if 0 = (limit -:= 1) then break) - } -end diff --git a/Task/Factorial/8th/factorial.8th b/Task/Factorial/8th/factorial.8th deleted file mode 100644 index d385be5c27..0000000000 --- a/Task/Factorial/8th/factorial.8th +++ /dev/null @@ -1,2 +0,0 @@ -: factorial \ n -- n! - 1 swap ' n:* 1 rot loop ; diff --git a/Task/Factorial/ALGOL-60/factorial.alg b/Task/Factorial/ALGOL-60/factorial.alg new file mode 100644 index 0000000000..6b44ce94eb --- /dev/null +++ b/Task/Factorial/ALGOL-60/factorial.alg @@ -0,0 +1,14 @@ +begin + comment factorial - algol 60; + integer procedure factorial(n); integer n; + begin + integer i,fact; + fact:=1; + for i:=2 step 1 until n do + fact:=fact*i; + factorial:=fact + end; + integer i; + for i:=1 step 1 until 10 do outinteger(1,factorial(i)); + outstring(1,"\n") +end diff --git a/Task/Factorial/ALGOL-68/factorial-1.alg b/Task/Factorial/ALGOL-68/factorial-1.alg new file mode 100644 index 0000000000..170a8c2633 --- /dev/null +++ b/Task/Factorial/ALGOL-68/factorial-1.alg @@ -0,0 +1,5 @@ +PROC factorial = (INT upb n)LONG LONG INT:( + LONG LONG INT z := 1; + FOR n TO upb n DO z *:= n OD; + z +); ~ diff --git a/Task/Factorial/ALGOL-68/factorial-2.alg b/Task/Factorial/ALGOL-68/factorial-2.alg new file mode 100644 index 0000000000..191fe07cfb --- /dev/null +++ b/Task/Factorial/ALGOL-68/factorial-2.alg @@ -0,0 +1,30 @@ +INT g = 7; +[]REAL p = []REAL(0.99999999999980993, 676.5203681218851, -1259.1392167224028, + 771.32342877765313, -176.61502916214059, 12.507343278686905, + -0.13857109526572012, 9.9843695780195716e-6, 1.5056327351493116e-7)[@0]; + +PROC complex gamma = (COMPL in z)COMPL: ( + # Reflection formula # + COMPL z := in z; + IF re OF z < 0.5 THEN + pi / (complex sin(pi*z)*complex gamma(1-z)) + ELSE + z -:= 1; + COMPL x := p[0]; + FOR i TO g+1 DO x +:= p[i]/(z+i) OD; + COMPL t := z + g + 0.5; + complex sqrt(2*pi) * t**(z+0.5) * complex exp(-t) * x + FI +); + +OP ** = (COMPL z, p)COMPL: ( z=0|0|complex exp(complex ln(z)*p) ); +PROC factorial = (COMPL n)COMPL: complex gamma(n+1); + +FORMAT compl fmt = $g(-16, 8)"⊥"g(-10, 8)$; + +test:( + printf(($q"factorial(-0.5)**2="f(compl fmt)l$, factorial(-0.5)**2)); + FOR i TO 9 DO + printf(($q"factorial("d")="f(compl fmt)l$, i, factorial(i))) + OD +) diff --git a/Task/Factorial/ALGOL-68/factorial-3.alg b/Task/Factorial/ALGOL-68/factorial-3.alg new file mode 100644 index 0000000000..c9c3e54dd2 --- /dev/null +++ b/Task/Factorial/ALGOL-68/factorial-3.alg @@ -0,0 +1,7 @@ +PROC factorial = (INT n)LONG LONG INT: + CASE n+1 IN + 1,1,2,6,24,120,720 # a brief lookup # + OUT + n*factorial(n-1) + ESAC +; ~ diff --git a/Task/Factorial/ALGOL-W/factorial.alg b/Task/Factorial/ALGOL-W/factorial.alg new file mode 100644 index 0000000000..d52282365a --- /dev/null +++ b/Task/Factorial/ALGOL-W/factorial.alg @@ -0,0 +1,15 @@ +begin + % computes factorial n iteratively % + integer procedure factorial( integer value n ) ; + if n < 2 + then 1 + else begin + integer f; + f := 2; + for i := 3 until n do f := f * i; + f + end factorial ; + + for t := 0 until 10 do write( "factorial: ", t, factorial( t ) ); + +end. diff --git a/Task/Factorial/Ada/factorial-1.adb b/Task/Factorial/Ada/factorial-1.ada similarity index 100% rename from Task/Factorial/Ada/factorial-1.adb rename to Task/Factorial/Ada/factorial-1.ada diff --git a/Task/Factorial/Ada/factorial-2.adb b/Task/Factorial/Ada/factorial-2.ada similarity index 100% rename from Task/Factorial/Ada/factorial-2.adb rename to Task/Factorial/Ada/factorial-2.ada diff --git a/Task/Factorial/Ada/factorial-3.adb b/Task/Factorial/Ada/factorial-3.ada similarity index 100% rename from Task/Factorial/Ada/factorial-3.adb rename to Task/Factorial/Ada/factorial-3.ada diff --git a/Task/Factorial/Agena/factorial.agena b/Task/Factorial/Agena/factorial.agena deleted file mode 100644 index 8b050fee0e..0000000000 --- a/Task/Factorial/Agena/factorial.agena +++ /dev/null @@ -1,25 +0,0 @@ -scope # factorials using the arbitrary precision mapm library - - import mapm; # explicit import needed for: Linux, Mac OS X, Windows and Solaris - - mapm.xdigits( 100 ); # need to set the precision - 100 is enough for 60! - - # computes factorial n iteratively, using mapm - local constant factorial := proc( n :: number ) :: xnumber - if n < 2 then return mapm.xnumber( 1 ) - else - local f := mapm.xnumber( 2 ); - for i from 3 to n do f := f * i od; - return f - fi - end; - # returns a string representation of the integer portion of an xnumber - local constant asstring := proc( n :: xnumber ) :: string - local constant str := mapm.xtostring( n ); - local constant point := "." in str; - return if point <> null then str[ 1 to point - 1 ] else str fi; - end; - - for t from 0 to 9 do printf( "%2d! is %d\n", t, mapm.xtonumber( factorial( t ) ) ) od; - for t from 10 to 60 by 10 do printf( "%2d! is %s\n", t, asstring( factorial( t ) ) ) od; -end diff --git a/Task/Factorial/Apple/factorial-1.apple b/Task/Factorial/Apple/factorial-1.apple deleted file mode 100644 index a882f89b83..0000000000 --- a/Task/Factorial/Apple/factorial-1.apple +++ /dev/null @@ -1,2 +0,0 @@ - > [(*)/ₒ 1 (⍳ 1 x 1)] 7 -5040 diff --git a/Task/Factorial/Apple/factorial-2.apple b/Task/Factorial/Apple/factorial-2.apple deleted file mode 100644 index bf4bf79fa7..0000000000 --- a/Task/Factorial/Apple/factorial-2.apple +++ /dev/null @@ -1,16 +0,0 @@ - > :asm [(*)/ₒ 1 (⍳ 1 x 1)] - - mov x6, x0 - mov x0, #0x1 - mov x2, #0x1 - eor x1, x1, x1 - cmp x1, x6 - b.GE apple_1 -apple_0: - mul x0, x0, x2 - add x2, x2, #0x1 - add x1, x1, #0x1 - cmp x1, x6 - b.LT apple_0 -apple_1: - ret diff --git a/Task/Factorial/ArkScript/factorial.ark b/Task/Factorial/ArkScript/factorial.ark deleted file mode 100644 index 41607c70ad..0000000000 --- a/Task/Factorial/ArkScript/factorial.ark +++ /dev/null @@ -1,13 +0,0 @@ -(let factorial (fun (n) { - (mut result 1) - (mut i 2) - (while (< i n) { - (set result (* result i)) - (set i (+ 1 i)) }) - result })) - -(import std.List) - -(list:forEach - (list:iota 0 8) - (fun (n) (print n "\t" (factorial n)))) diff --git a/Task/Factorial/Arturo/factorial-1.arturo b/Task/Factorial/Arturo/factorial-1.arturo index 5adbf912c3..e61492a8b4 100644 --- a/Task/Factorial/Arturo/factorial-1.arturo +++ b/Task/Factorial/Arturo/factorial-1.arturo @@ -1,7 +1,4 @@ -factorial: function [n][ - switch n > 0 -> n * factorial n-1 - -> 1 +factorial: $[n][ + if? n>0 [n * factorial n-1] + else [1] ] - -loop 1..19 [x]-> - print ["Factorial of" x "=" factorial x] diff --git a/Task/Factorial/Arturo/factorial-2.arturo b/Task/Factorial/Arturo/factorial-2.arturo index 79b191bdb4..6e6d40e330 100644 --- a/Task/Factorial/Arturo/factorial-2.arturo +++ b/Task/Factorial/Arturo/factorial-2.arturo @@ -1,7 +1,3 @@ factorial: $[n][ fold.seed:1 1..n [a,b][a*b] ] - -loop 1..19 [x][ - print ["Factorial of" x "=" factorial x] -] diff --git a/Task/Factorial/AutoIt/factorial-1.au3 b/Task/Factorial/AutoIt/factorial-1.autoit similarity index 100% rename from Task/Factorial/AutoIt/factorial-1.au3 rename to Task/Factorial/AutoIt/factorial-1.autoit diff --git a/Task/Factorial/AutoIt/factorial-2.au3 b/Task/Factorial/AutoIt/factorial-2.autoit similarity index 100% rename from Task/Factorial/AutoIt/factorial-2.au3 rename to Task/Factorial/AutoIt/factorial-2.autoit diff --git a/Task/Factorial/CBASIC/factorial.basic b/Task/Factorial/CBASIC/factorial.basic deleted file mode 100644 index 3ca40654ad..0000000000 --- a/Task/Factorial/CBASIC/factorial.basic +++ /dev/null @@ -1,19 +0,0 @@ -rem - return n! -def fn.factorial(n) - f = 1 - for i = 1 to n - f = f * i - next i - fn.factorial = f - return -fend - -print "Factorial Calculator" -print -print " n n!" -print "-------------------" -for k = 1 to 14 - print using "## ###,###,###,###"; k; fn.factorial(k) -next k - -end diff --git a/Task/Factorial/COBOL/factorial-1.cob b/Task/Factorial/COBOL/factorial-1.cobol similarity index 100% rename from Task/Factorial/COBOL/factorial-1.cob rename to Task/Factorial/COBOL/factorial-1.cobol diff --git a/Task/Factorial/COBOL/factorial-2.cob b/Task/Factorial/COBOL/factorial-2.cobol similarity index 100% rename from Task/Factorial/COBOL/factorial-2.cob rename to Task/Factorial/COBOL/factorial-2.cobol diff --git a/Task/Factorial/COBOL/factorial-3.cob b/Task/Factorial/COBOL/factorial-3.cobol similarity index 100% rename from Task/Factorial/COBOL/factorial-3.cob rename to Task/Factorial/COBOL/factorial-3.cobol diff --git a/Task/Factorial/COBOL/factorial-4.cob b/Task/Factorial/COBOL/factorial-4.cobol similarity index 100% rename from Task/Factorial/COBOL/factorial-4.cob rename to Task/Factorial/COBOL/factorial-4.cobol diff --git a/Task/Factorial/Chapel/factorial.chpl b/Task/Factorial/Chapel/factorial.chapel similarity index 100% rename from Task/Factorial/Chapel/factorial.chpl rename to Task/Factorial/Chapel/factorial.chapel diff --git a/Task/Factorial/Rocq/factorial.rocq b/Task/Factorial/Coq/factorial.coq similarity index 100% rename from Task/Factorial/Rocq/factorial.rocq rename to Task/Factorial/Coq/factorial.coq diff --git a/Task/Factorial/Crystal/factorial-1.cr b/Task/Factorial/Crystal/factorial-1.crystal similarity index 100% rename from Task/Factorial/Crystal/factorial-1.cr rename to Task/Factorial/Crystal/factorial-1.crystal diff --git a/Task/Factorial/Crystal/factorial-2.cr b/Task/Factorial/Crystal/factorial-2.crystal similarity index 100% rename from Task/Factorial/Crystal/factorial-2.cr rename to Task/Factorial/Crystal/factorial-2.crystal diff --git a/Task/Factorial/Delphi/factorial-1.pas b/Task/Factorial/Delphi/factorial-1.delphi similarity index 100% rename from Task/Factorial/Delphi/factorial-1.pas rename to Task/Factorial/Delphi/factorial-1.delphi diff --git a/Task/Factorial/Delphi/factorial-2.pas b/Task/Factorial/Delphi/factorial-2.delphi similarity index 100% rename from Task/Factorial/Delphi/factorial-2.pas rename to Task/Factorial/Delphi/factorial-2.delphi diff --git a/Task/Factorial/Delphi/factorial-3.pas b/Task/Factorial/Delphi/factorial-3.delphi similarity index 100% rename from Task/Factorial/Delphi/factorial-3.pas rename to Task/Factorial/Delphi/factorial-3.delphi diff --git a/Task/Factorial/DuckDB/factorial-1.duckdb b/Task/Factorial/DuckDB/factorial-1.duckdb deleted file mode 100644 index e4f4ecf769..0000000000 --- a/Task/Factorial/DuckDB/factorial-1.duckdb +++ /dev/null @@ -1,3 +0,0 @@ -create or replace function factorial(n) as ( - list_reduce( list_transform(range(1,n+1), x -> x::HUGEINT), (prod,n) -> prod * n) -); diff --git a/Task/Factorial/DuckDB/factorial-2.duckdb b/Task/Factorial/DuckDB/factorial-2.duckdb deleted file mode 100644 index 0ba68192de..0000000000 --- a/Task/Factorial/DuckDB/factorial-2.duckdb +++ /dev/null @@ -1,3 +0,0 @@ -create or replace function double_precision_factorial(n) as ( - list_product( range(1, n+1) ) -); diff --git a/Task/Factorial/DuckDB/factorial-3.duckdb b/Task/Factorial/DuckDB/factorial-3.duckdb deleted file mode 100644 index d3a13b50ff..0000000000 --- a/Task/Factorial/DuckDB/factorial-3.duckdb +++ /dev/null @@ -1,2 +0,0 @@ -select n, n!, factorial(n), double_precision_factorial(n) -from values (4), (30), (33) t(n); diff --git a/Task/Factorial/EasyLang/factorial.easy b/Task/Factorial/EasyLang/factorial.easy index 697c8807fd..1ad66bdb70 100644 --- a/Task/Factorial/EasyLang/factorial.easy +++ b/Task/Factorial/EasyLang/factorial.easy @@ -1,6 +1,8 @@ func factorial n . r = 1 - for i = 2 to n : r *= i + for i = 2 to n + r *= i + . return r . print factorial 7 diff --git a/Task/Factorial/Elixir/factorial.ex b/Task/Factorial/Elixir/factorial.elixir similarity index 100% rename from Task/Factorial/Elixir/factorial.ex rename to Task/Factorial/Elixir/factorial.elixir diff --git a/Task/Factorial/Emacs-Lisp/factorial-1.el b/Task/Factorial/Emacs-Lisp/factorial-1.l similarity index 100% rename from Task/Factorial/Emacs-Lisp/factorial-1.el rename to Task/Factorial/Emacs-Lisp/factorial-1.l diff --git a/Task/Factorial/Emacs-Lisp/factorial-2.el b/Task/Factorial/Emacs-Lisp/factorial-2.l similarity index 100% rename from Task/Factorial/Emacs-Lisp/factorial-2.el rename to Task/Factorial/Emacs-Lisp/factorial-2.l diff --git a/Task/Factorial/Emacs-Lisp/factorial-3.el b/Task/Factorial/Emacs-Lisp/factorial-3.l similarity index 100% rename from Task/Factorial/Emacs-Lisp/factorial-3.el rename to Task/Factorial/Emacs-Lisp/factorial-3.l diff --git a/Task/Factorial/Euphoria/factorial-1.eu b/Task/Factorial/Euphoria/factorial-1.euphoria similarity index 100% rename from Task/Factorial/Euphoria/factorial-1.eu rename to Task/Factorial/Euphoria/factorial-1.euphoria diff --git a/Task/Factorial/Euphoria/factorial-2.eu b/Task/Factorial/Euphoria/factorial-2.euphoria similarity index 100% rename from Task/Factorial/Euphoria/factorial-2.eu rename to Task/Factorial/Euphoria/factorial-2.euphoria diff --git a/Task/Factorial/Euphoria/factorial-3.eu b/Task/Factorial/Euphoria/factorial-3.euphoria similarity index 100% rename from Task/Factorial/Euphoria/factorial-3.eu rename to Task/Factorial/Euphoria/factorial-3.euphoria diff --git a/Task/Factorial/Euphoria/factorial-4.eu b/Task/Factorial/Euphoria/factorial-4.euphoria similarity index 100% rename from Task/Factorial/Euphoria/factorial-4.eu rename to Task/Factorial/Euphoria/factorial-4.euphoria diff --git a/Task/Factorial/Fennel/factorial.fennel b/Task/Factorial/Fennel/factorial.fennel deleted file mode 100644 index c9024229d5..0000000000 --- a/Task/Factorial/Fennel/factorial.fennel +++ /dev/null @@ -1,18 +0,0 @@ -(do - (fn factorial [n] ;;; iterative factorial - (if (< n 2) - 1 - ;else - (do (var f 2) - (for [i 3 n] - (set f (* f i)) - ) - f - ) - ) - ) - - (for [n 0 10] - (io.write (string.format "%2d! = %s\n" n (factorial n))) - ) -) diff --git a/Task/Factorial/Gleam/factorial-1.gleam b/Task/Factorial/Gleam/factorial-1.gleam deleted file mode 100644 index 6521eeb481..0000000000 --- a/Task/Factorial/Gleam/factorial-1.gleam +++ /dev/null @@ -1 +0,0 @@ -list.fold(int.range(1, n + 1, [], list.prepend), 1, int.multiply) diff --git a/Task/Factorial/Gleam/factorial-2.gleam b/Task/Factorial/Gleam/factorial-2.gleam deleted file mode 100644 index dbab0f45f6..0000000000 --- a/Task/Factorial/Gleam/factorial-2.gleam +++ /dev/null @@ -1,6 +0,0 @@ -pub fn fac(n: Int) -> Int { - case n { - 1 -> 1 - n -> n * fac(n - 1) - } -} diff --git a/Task/Factorial/Gleam/factorial-3.gleam b/Task/Factorial/Gleam/factorial-3.gleam deleted file mode 100644 index dbc03d5750..0000000000 --- a/Task/Factorial/Gleam/factorial-3.gleam +++ /dev/null @@ -1,10 +0,0 @@ -pub fn fac(n: Int) -> Int { - fac_helper(n, n - 1) -} - -fn fac_helper(n: Int, acc: Int) -> Int { - case n, acc { - n, 1 -> n - n, i -> fac_helper(n * i, i - 1) - } -} diff --git a/Task/Factorial/Haskell/factorial-10.hs b/Task/Factorial/Haskell/factorial-10.hs deleted file mode 100644 index d7507d16b3..0000000000 --- a/Task/Factorial/Haskell/factorial-10.hs +++ /dev/null @@ -1,8 +0,0 @@ --- product of [a,a+1..b] -productFromTo a b = - if a>b then 1 - else if a == b then a - else productFromTo a c * productFromTo (c+1) b - where c = (a+b) `div` 2 - -factorial = productFromTo 1 diff --git a/Task/Factorial/Haskell/factorial-5.hs b/Task/Factorial/Haskell/factorial-5.hs index f036c73a77..6b76b69b6e 100644 --- a/Task/Factorial/Haskell/factorial-5.hs +++ b/Task/Factorial/Haskell/factorial-5.hs @@ -1 +1,3 @@ -factorials = 1 : zipWith (*) factorials [1..] +factorial :: Integral -> Integral +factorial 0 = 1 +factorial n = n * factorial (n-1) diff --git a/Task/Factorial/Haskell/factorial-6.hs b/Task/Factorial/Haskell/factorial-6.hs index 655c366a44..baef906bf8 100644 --- a/Task/Factorial/Haskell/factorial-6.hs +++ b/Task/Factorial/Haskell/factorial-6.hs @@ -1,2 +1,5 @@ -factorials = go 1 1 where - go n fac = f : go (n+1) (n*fac) +fac n + | n >= 0 = go 1 n + | otherwise = error "Negative factorial!" + where go acc 0 = acc + go acc n = go (acc * n) (n - 1) diff --git a/Task/Factorial/Haskell/factorial-7.hs b/Task/Factorial/Haskell/factorial-7.hs index 6b76b69b6e..77d34e9b2e 100644 --- a/Task/Factorial/Haskell/factorial-7.hs +++ b/Task/Factorial/Haskell/factorial-7.hs @@ -1,3 +1,10 @@ -factorial :: Integral -> Integral -factorial 0 = 1 -factorial n = n * factorial (n-1) +{-# LANGUAGE PostfixOperators #-} + +(!) :: Integer -> Integer +(!) 0 = 1 +(!) n = n * (pred n !) + +main :: IO () +main = do + print (5 !) + print ((4 !) !) diff --git a/Task/Factorial/Haskell/factorial-8.hs b/Task/Factorial/Haskell/factorial-8.hs index baef906bf8..d7507d16b3 100644 --- a/Task/Factorial/Haskell/factorial-8.hs +++ b/Task/Factorial/Haskell/factorial-8.hs @@ -1,5 +1,8 @@ -fac n - | n >= 0 = go 1 n - | otherwise = error "Negative factorial!" - where go acc 0 = acc - go acc n = go (acc * n) (n - 1) +-- product of [a,a+1..b] +productFromTo a b = + if a>b then 1 + else if a == b then a + else productFromTo a c * productFromTo (c+1) b + where c = (a+b) `div` 2 + +factorial = productFromTo 1 diff --git a/Task/Factorial/Haskell/factorial-9.hs b/Task/Factorial/Haskell/factorial-9.hs deleted file mode 100644 index 77d34e9b2e..0000000000 --- a/Task/Factorial/Haskell/factorial-9.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE PostfixOperators #-} - -(!) :: Integer -> Integer -(!) 0 = 1 -(!) n = n * (pred n !) - -main :: IO () -main = do - print (5 !) - print ((4 !) !) diff --git a/Task/Factorial/Haxe/factorial-1.hx b/Task/Factorial/Haxe/factorial-1.haxe similarity index 100% rename from Task/Factorial/Haxe/factorial-1.hx rename to Task/Factorial/Haxe/factorial-1.haxe diff --git a/Task/Factorial/Haxe/factorial-2.hx b/Task/Factorial/Haxe/factorial-2.haxe similarity index 100% rename from Task/Factorial/Haxe/factorial-2.hx rename to Task/Factorial/Haxe/factorial-2.haxe diff --git a/Task/Factorial/Haxe/factorial-3.hx b/Task/Factorial/Haxe/factorial-3.haxe similarity index 100% rename from Task/Factorial/Haxe/factorial-3.hx rename to Task/Factorial/Haxe/factorial-3.haxe diff --git a/Task/Factorial/Haxe/factorial-4.hx b/Task/Factorial/Haxe/factorial-4.haxe similarity index 100% rename from Task/Factorial/Haxe/factorial-4.hx rename to Task/Factorial/Haxe/factorial-4.haxe diff --git a/Task/Factorial/Haxe/factorial-5.hx b/Task/Factorial/Haxe/factorial-5.haxe similarity index 100% rename from Task/Factorial/Haxe/factorial-5.hx rename to Task/Factorial/Haxe/factorial-5.haxe diff --git a/Task/Factorial/Java/factorial-4.java b/Task/Factorial/Java/factorial-4.java deleted file mode 100644 index 7194a10356..0000000000 --- a/Task/Factorial/Java/factorial-4.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.math.BigInteger; -import java.util.function.Function; -import java.util.stream.LongStream; -import java.util.stream.Stream; - -public final class Factorial { - - public static void main(String[] args) { - // Valid only for integer arguments 1, 2, ... , 20 - Function factorialPositive = n -> LongStream.rangeClosed(2, n).reduce(1, (a, b) -> a * b); - - // Valid for integer arguments <= 20 - Function factorial = n -> { - if ( n < 0 || n > 20 ) { - throw new AssertionError("Argument is out of range: " + n); - } - - return factorialPositive.apply(n); - }; - - // Return a BigInteger value - Function factorialBig = n -> Stream.iterate(BigInteger.ONE, i -> i.add(BigInteger.ONE)) - .limit(n) - .reduce(BigInteger.ONE, BigInteger::multiply); - } - -} diff --git a/Task/Factorial/Julia/factorial-1.jl b/Task/Factorial/Julia/factorial-1.julia similarity index 100% rename from Task/Factorial/Julia/factorial-1.jl rename to Task/Factorial/Julia/factorial-1.julia diff --git a/Task/Factorial/Julia/factorial-2.jl b/Task/Factorial/Julia/factorial-2.julia similarity index 100% rename from Task/Factorial/Julia/factorial-2.jl rename to Task/Factorial/Julia/factorial-2.julia diff --git a/Task/Factorial/Kotlin/factorial.kts b/Task/Factorial/Kotlin/factorial.kotlin similarity index 100% rename from Task/Factorial/Kotlin/factorial.kts rename to Task/Factorial/Kotlin/factorial.kotlin diff --git a/Task/Factorial/Langur/factorial-1.langur b/Task/Factorial/Langur/factorial-1.langur index 3149d6b778..8d8674f4b4 100644 --- a/Task/Factorial/Langur/factorial-1.langur +++ b/Task/Factorial/Langur/factorial-1.langur @@ -1,2 +1,2 @@ -val factorial = fn(n number) { fold(2 .. n, by=fn{*}) } -writeln factorial(7) +val .factorial = fn(.n) fold(fn{*}, 2 .. .n) +writeln .factorial(7) diff --git a/Task/Factorial/Langur/factorial-2.langur b/Task/Factorial/Langur/factorial-2.langur index 93fe1fe8d3..a40e149332 100644 --- a/Task/Factorial/Langur/factorial-2.langur +++ b/Task/Factorial/Langur/factorial-2.langur @@ -1,2 +1,2 @@ -val factorial = fn(x number) { if(x < 2: 1; x * fn((x - 1))) } -writeln factorial(7) +val .factorial = fn(.x) if(.x < 2: 1; .x * self(.x - 1)) +writeln .factorial(7) diff --git a/Task/Factorial/Langur/factorial-3.langur b/Task/Factorial/Langur/factorial-3.langur index 934e4f08bd..a630ad30d4 100644 --- a/Task/Factorial/Langur/factorial-3.langur +++ b/Task/Factorial/Langur/factorial-3.langur @@ -1,9 +1,9 @@ -val factorial = fn(i number) { - var answer = 1 - for x in 2 .. i { - answer *= x +val .factorial = fn(.i) { + var .answer = 1 + for .x in 2 .. .i { + .answer *= .x } - answer + .answer } -writeln factorial(7) +writeln .factorial(7) diff --git a/Task/Factorial/Langur/factorial-4.langur b/Task/Factorial/Langur/factorial-4.langur index a13962013b..482796f7ea 100644 --- a/Task/Factorial/Langur/factorial-4.langur +++ b/Task/Factorial/Langur/factorial-4.langur @@ -1,2 +1,2 @@ -val factorial = fn(n number) { for[=1] x in n { _for *= x } } -writeln factorial(7) +val .factorial = fn(.n) for[=1] .x in .n { _for *= .x } +writeln .factorial(7) diff --git a/Task/Factorial/M2000-Interpreter/factorial-2.m2000 b/Task/Factorial/M2000-Interpreter/factorial-2.m2000 deleted file mode 100644 index 43a5d9ca37..0000000000 --- a/Task/Factorial/M2000-Interpreter/factorial-2.m2000 +++ /dev/null @@ -1,24 +0,0 @@ -Cls , 0 ' 0 for non split display, eg 3 means we preserve the 3 top lines from scrolling/cla -Report { - Factorial Task - Definitions - • The factorial of 0 (zero) is defined as being 1 (unity). - • The Factorial Function of a positive integer, n, is defined as the product of the sequence: - n, n-1, n-2, ... 1 - -} -Cls, row ' now we preserve some lines (as row number return here) -Module CheckIt { - m=1u ' 1u is biginteger - k=width-tab - For i=1 to 1000 - if pos>tab then print - m*=i - Print @(0), format$("{0::-4} :", i); - Report str$(m), k - ' Report accumulate lines and stop at 3/4 of the screen (but not on printer) - ' so we can break this using this line: - while inkey$<>"": wait 1:end while: keyboard " " - Next i -} -Checkit diff --git a/Task/Factorial/M2000-Interpreter/factorial-1.m2000 b/Task/Factorial/M2000-Interpreter/factorial.m2000 similarity index 100% rename from Task/Factorial/M2000-Interpreter/factorial-1.m2000 rename to Task/Factorial/M2000-Interpreter/factorial.m2000 diff --git a/Task/Factorial/Mn/factorial.mn b/Task/Factorial/Mn/factorial.mn deleted file mode 100644 index 834200986a..0000000000 --- a/Task/Factorial/Mn/factorial.mn +++ /dev/null @@ -1,12 +0,0 @@ -( - (n) let - 1 (product) let - (n 1 >=) - ( - product n * (product) bind - n 1 - (n) bind - ) while - product -) (factorial) lambda - -5 factorial puts pop diff --git a/Task/Factorial/OCaml/factorial-1.ml b/Task/Factorial/OCaml/factorial-1.ocaml similarity index 100% rename from Task/Factorial/OCaml/factorial-1.ml rename to Task/Factorial/OCaml/factorial-1.ocaml diff --git a/Task/Factorial/OCaml/factorial-2.ml b/Task/Factorial/OCaml/factorial-2.ocaml similarity index 100% rename from Task/Factorial/OCaml/factorial-2.ml rename to Task/Factorial/OCaml/factorial-2.ocaml diff --git a/Task/Factorial/OCaml/factorial-3.ml b/Task/Factorial/OCaml/factorial-3.ocaml similarity index 100% rename from Task/Factorial/OCaml/factorial-3.ml rename to Task/Factorial/OCaml/factorial-3.ocaml diff --git a/Task/Factorial/OCaml/factorial-4.ml b/Task/Factorial/OCaml/factorial-4.ocaml similarity index 100% rename from Task/Factorial/OCaml/factorial-4.ml rename to Task/Factorial/OCaml/factorial-4.ocaml diff --git a/Task/Factorial/Oberon-07/factorial.oberon b/Task/Factorial/Oberon-07/factorial.oberon deleted file mode 100644 index 8c8e1d89ca..0000000000 --- a/Task/Factorial/Oberon-07/factorial.oberon +++ /dev/null @@ -1,40 +0,0 @@ -MODULE Factorial; -IMPORT - Out; - -VAR - i: INTEGER; - - PROCEDURE Iterative(n: INTEGER): INTEGER; - VAR - i, r: INTEGER; - BEGIN - ASSERT(n >= 0); - r := 1; - FOR i := n TO 2 BY -1 DO - r := r * i - END; - RETURN r - END Iterative; - - PROCEDURE Recursive(n: INTEGER): INTEGER; - VAR - r: INTEGER; - BEGIN - ASSERT(n >= 0); - r := 1; - IF n > 1 THEN - r := n * Recursive(n - 1) - END; - RETURN r - END Recursive; - -BEGIN - FOR i := 0 TO 9 DO - Out.String("Iterative ");Out.Int(i,0);Out.String("! =");Out.Int(Iterative(i),8);Out.Ln; - END; - Out.Ln; - FOR i := 0 TO 9 DO - Out.String("Recursive ");Out.Int(i,0);Out.String("! =");Out.Int(Recursive(i),8);Out.Ln; - END -END Factorial. diff --git a/Task/Factorial/Pascal/factorial-2.pas b/Task/Factorial/Pascal/factorial-2.pas index 6b44f23124..991914c559 100644 --- a/Task/Factorial/Pascal/factorial-2.pas +++ b/Task/Factorial/Pascal/factorial-2.pas @@ -1,45 +1,32 @@ {$mode objFPC}{R+} -FUNCTION Fact(n: qword): qword; +FUNCTION Factorial ( n : qword ) : qword; -VAR - F: qword; + (*) + Update for version 3.2.0 + Factorial works until 20! , which is good enough for me for now + replace qword with dword and rax,rcx with eax, ecx for 32-bit + for Factorial until 12! + (*) -BEGIN - if n > 20 then - begin - WriteLn('This function is only accurate up to 20!'); - exit(0); - end; + VAR + + F: qword; + + BEGIN - asm - (*) Initialize result = 1 (0! = 1 case handled automatically) (*) + asm + + mov $1, %rax + mov n, %rcx + + .Lloop1: + imul %rcx, %rax + loopnz .Lloop1 + + mov %rax, F - mov $1, %rax (*) RAX = 1 (initial result) (*) - mov n, %rcx (*) RCX = input number (counter) (*) + end; - test %rcx, %rcx (*) Check if n=0 (*) - jz .Lstore_result (*) Skip loop if n=0 (*) - - .Lloop1: - imul %rcx, %rax (*) RAX = RAX * RCX (signed mul) (*) - dec %rcx (*) Decrement RCX (*) - jnz .Lloop1 (*) Loop while RCX != 0 (*) - - .Lstore_result: - mov %rax, F (*) Store result in F (*) - end ['rax', 'rcx']; (*) Tell compiler register change (*) - - Result := F; - -END; - - -var - N : integer = 20 ; - -begin - - writeln; - writeln( BasicFact(N)); - -end. (*) Function Fact (*) + Result := F ; + + END; diff --git a/Task/Factorial/Pascal/factorial-3.pas b/Task/Factorial/Pascal/factorial-3.pas index 137d0f6b28..64c4eabff6 100644 --- a/Task/Factorial/Pascal/factorial-3.pas +++ b/Task/Factorial/Pascal/factorial-3.pas @@ -1,33 +1,92 @@ -program GMPfact; +PROGRAM EXBigFac ; -{$mode objfpc} +{$IFDEF FPC} + {$mode objfpc}{$H+}{$J-}{R+} +{$ELSE} + {$APPTYPE CONSOLE} +{$ENDIF} -uses +(*) - gmp - ; + Free Pascal Compiler version 3.2.0 [2020/06/14] for x86_64 + The free and readable alternative at C/C++ speeds + compiles natively to almost any platform, including raspberry PI * + Can run independently from DELPHI / Lazarus - function Factorial(n: qword): string; - var - ResultMPZ: mpz_t; - i: qword; - begin - mpz_init_set_ui(ResultMPZ, 1); - for i := 2 to n do - mpz_mul_ui(ResultMPZ, ResultMPZ, i); - Result := mpz_get_str(nil, 10, ResultMPZ); - mpz_clear(ResultMPZ); - end; + For debian Linux: apt -y install fpc + It contains a text IDE called fp -var - N : integer = 101 ; - Fact : string ; + https://www.freepascal.org/advantage.var -begin - Fact := Factorial(101); - writeln( N ,'! = ', Fact); -end. (*) GMPfact (*) +(*) +USES + + gmp; + + FUNCTION WriteBigNum ( c: pchar ) : ansistring ; + + CONST + + CrLf = #13 + #10 ; + + VAR + i: longint; + len: longint; + preview: integer; + ret: ansistring = ''; + threshold: integer; + + BEGIN + + len := length ( c ) ; + WriteLn ( 'Digits: ', len ) ; + threshold := 12 ; + preview := len div threshold ; + + IF ( len < 91 ) THEN + BEGIN + FOR i := 0 TO len DO + ret:= ret + c [ i ] ; + END + ELSE + BEGIN + FOR i := 0 TO preview DO + ret:= ret + c [ i ] ; + ret:= ret + '...' ; + FOR i := len - preview -1 TO len DO + ret:= ret + c [ i ] ; + END; + ret:= ret + CrLf ; + WriteBigNum := ret; + END; + + FUNCTION BigFactorial ( n : qword ) : ansistring ; + + (*) + See https://gmplib.org/#DOC + (*) + + VAR + S: mpz_t; + c: pchar; + + BEGIN + + mpz_init_set_ui ( S, 1 ) ; + mpz_fac_ui ( S, n ) ; + c := mpz_get_str ( NIL, 10, S ) ; + BigFactorial := WriteBigNum ( c ) ; + + END; + +BEGIN + + WriteLn ( BigFactorial ( 99 ) ) ; + +END. + Output: -101! = 9425947759838359420851623124482936749562312794702543768327889353416977599316221476503087861591808346911623490003549599583369706302603264000000000000000000000000 +Digits: 156 +93326215443944...00000000000000 diff --git a/Task/Factorial/PascalABC.NET/factorial.pas b/Task/Factorial/PascalABC.NET/factorial.pas deleted file mode 100644 index 87563d6ab2..0000000000 --- a/Task/Factorial/PascalABC.NET/factorial.pas +++ /dev/null @@ -1,19 +0,0 @@ -function FactIter(n: integer): BigInteger; -begin - Result := 1; - for var i:=2 to n do - Result *= i; -end; - -function FactRec(n: integer): BigInteger; -begin - if n = 0 then - Result := 1 - else Result := n * FactRec(n - 1); -end; - - -begin - for var i:=1 to 20 do - Println(i,FactRec(i),FactIter(i)); -end. diff --git a/Task/Factorial/Pluto/factorial.pluto b/Task/Factorial/Pluto/factorial.pluto deleted file mode 100644 index 3ed73ecb0e..0000000000 --- a/Task/Factorial/Pluto/factorial.pluto +++ /dev/null @@ -1,30 +0,0 @@ -local bigint = require "pluto:bigint" - -class Factorial - static function iterative(n) - local fact = bigint.new(1) - if n < 2 then return fact end - for i = 2, n do fact *= bigint.new(i) end - return fact - end - - static function recursive(n) - if n < 2 then return bigint.new(1) end - return bigint.new(n) * Factorial.recursive(n - 1) - end -end - -local function commatize(n) - local s = n:tostring() - local zero = bigint.new(0) - if n < zero then s = s:sub(2) end - for i = #s - 3, 1, -3 do - s = s:sub(1, i) .. "," .. s:sub(i + 1) - end - if n >= zero then return s end - return "-" .. s -end - -local n = 24 -print($"Factorial({n}) iterative -> {commatize(Factorial.iterative(n))}") -print($"Factorial({n}) recursive -> {commatize(Factorial.recursive(n))}") diff --git a/Task/Factorial/PowerShell/factorial-1.ps1 b/Task/Factorial/PowerShell/factorial-1.psh similarity index 100% rename from Task/Factorial/PowerShell/factorial-1.ps1 rename to Task/Factorial/PowerShell/factorial-1.psh diff --git a/Task/Factorial/PowerShell/factorial-2.ps1 b/Task/Factorial/PowerShell/factorial-2.psh similarity index 100% rename from Task/Factorial/PowerShell/factorial-2.ps1 rename to Task/Factorial/PowerShell/factorial-2.psh diff --git a/Task/Factorial/PowerShell/factorial-3.ps1 b/Task/Factorial/PowerShell/factorial-3.psh similarity index 100% rename from Task/Factorial/PowerShell/factorial-3.ps1 rename to Task/Factorial/PowerShell/factorial-3.psh diff --git a/Task/Factorial/R/factorial-4.r b/Task/Factorial/R/factorial-4.r deleted file mode 100644 index 3c651ae864..0000000000 --- a/Task/Factorial/R/factorial-4.r +++ /dev/null @@ -1 +0,0 @@ - fact_fp <- function(n) ifelse(!n, 1, Reduce(`*`, seq_len(n))) diff --git a/Task/Factorial/REBOL/factorial.rebol b/Task/Factorial/REBOL/factorial.rebol new file mode 100644 index 0000000000..b3ff15a290 --- /dev/null +++ b/Task/Factorial/REBOL/factorial.rebol @@ -0,0 +1,55 @@ +REBOL [ + Title: "Factorial" + URL: http://rosettacode.org/wiki/Factorial_function +] + +; Standard recursive implementation. + +factorial: func [n][ + either n > 1 [n * factorial n - 1] [1] +] + +; Iteration. + +ifactorial: func [n][ + f: 1 + for i 2 n 1 [f: f * i] + f +] + +; Automatic memoization. +; I'm just going to say up front that this is a stunt. However, you've +; got to admit it's pretty nifty. Note that the 'memo' function +; works with an unlimited number of arguments (although the expected +; gains decrease as the argument count increases). + +memo: func [ + "Defines memoizing function -- keeps arguments/results for later use." + args [block!] "Function arguments. Just specify variable names." + body [block!] "The body block of the function." + /local m-args m-r +][ + do compose/deep [ + func [ + (args) + /dump "Dump memory." + ][ + m-args: [] + if dump [return m-args] + + if m-r: select/only m-args reduce [(args)] [return m-r] + + m-r: do [(body)] + append m-args reduce [reduce [(args)] m-r] + m-r + ] + ] +] + +mfactorial: memo [n][ + either n > 1 [n * mfactorial n - 1] [1] +] + +; Test them on numbers zero to ten. + +for i 0 10 1 [print [i ":" factorial i ifactorial i mfactorial i]] diff --git a/Task/Factorial/REXX/factorial-1.rexx b/Task/Factorial/REXX/factorial-1.rexx index 4ab115dc32..b02528c706 100644 --- a/Task/Factorial/REXX/factorial-1.rexx +++ b/Task/Factorial/REXX/factorial-1.rexx @@ -1,4 +1,18 @@ -call time('r') -numeric digits 999999999 -a = 10/3 -say length(a) time('e') +/*REXX pgm computes & shows the factorial of a non─negative integer, and also its length*/ +numeric digits 100000 /*100k digits: handles N up to 25k.*/ +parse arg n /*obtain optional argument from the CL.*/ +if n='' then call er 'no argument specified.' +if arg()>1 | words(n)>1 then call er 'too many arguments specified.' +if \datatype(n,'N') then call er "argument isn't numeric: " n +if \datatype(n,'W') then call er "argument isn't a whole number: " n +if n<0 then call er "argument can't be negative: " n +!= 1 /*define the factorial product (so far)*/ + do j=2 to n; !=!*j /*compute the factorial the hard way. */ + end /*j*/ /* [↑] where da rubber meets da road. */ + +say n'! is ['length(!) "digits]:" /*display number of digits in factorial*/ +say /*add some whitespace to the output. */ +say ! /*display the factorial product──►term.*/ +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +er: say; say '***error***'; say; say arg(1); say; exit 13 diff --git a/Task/Factorial/REXX/factorial-2.rexx b/Task/Factorial/REXX/factorial-2.rexx index 82133ca665..0ce1aa0e4d 100644 --- a/Task/Factorial/REXX/factorial-2.rexx +++ b/Task/Factorial/REXX/factorial-2.rexx @@ -1,68 +1,22 @@ --- 10 Mar 2026 -include Setting - -say 'Factorial' -say version -say -call First20 -call Imperative 10, '1 13 71 450 3249 25206 205022 1723508 14842907 130202808' -if pos('Regina',version) > 0 then - call Recursive 10, '1 13 71 450 3249 25206 205022' -else - call Recursive 10, '1 13 71 450 3249' -call Imperative 100000,'1 13 71 450 3249 25206' -call Timer -exit - -First20: -say 'First 20 FactorialS...' -numeric digits 30 -do n = 1 to 20 - say n'! =' Fact(n) -end -say -return - -Imperative: -Memo.='' -call Time('R') -arg d,p -numeric digits d -say 'Imperative in' d 'digits precision...' -do i = 1 to Words(p) - call Time('r'); f = Word(p,i); h = Fact(f) - parse var h 'E' e - if e = '' then - say Right(f'!',10) 'has exact' Right(Length(h),9) 'digits' '('Format(Time('e'),,3)'s)' - else - say Right(f'!',10) 'has about' Right(e+1,9) 'digits' '('Format(Time('e'),,3)'s)' -end -say -return - -Recursive: -Memo.='' -call Time('R') -arg d,p -numeric digits d -say 'Recursive in' d 'digits precision...' -do i = 1 to Words(p) - call Time('r'); f = Word(p,i); h = Recurs(f) - parse var h 'E' e - if e = '' then - say Right(f'!',10) 'has exact' Right(Length(h),9) 'digits' '('Format(Time('e'),,3)'s)' - else - say Right(f'!',10) 'has about' Right(e+1,9) 'digits' '('Format(Time('e'),,3)'s)' -end -say -return - -Recurs: -procedure -arg xx -if xx = 0 then - return 1 -else - return xx*Recurs(xx-1) - -include Math +/*REXX program computes the factorial of a non─negative integer, and it automatically */ +/*────────────────────── adjusts the number of decimal digits to accommodate the answer.*/ +numeric digits 99 /*99 digits initially, then expanded. */ +parse arg n /*obtain optional argument from the CL.*/ +if n='' then call er 'no argument specified' +if arg()>1 | words(n)>1 then call er 'too many arguments specified.' +if \datatype(n,'N') then call er "argument isn't numeric: " n +if \datatype(n,'W') then call er "argument isn't a whole number: " n +if n<0 then call er "argument can't be negative: " n +!= 1 /*define the factorial product (so far)*/ + do j=2 to n; !=!*j /*compute the factorial the hard way. */ + if pos(.,!)==0 then iterate /*is the ! in exponential notation? */ + parse var ! 'E' digs /*extract exponent of the factorial, */ + numeric digits digs + digs % 10 /* ··· and increase it by ten percent.*/ + end /*j*/ /* [↑] where da rubber meets da road. */ +!= !/1 /*normalize the factorial product. */ +say n'! is ['length(!) "digits]:" /*display number of digits in factorial*/ +say /*add some whitespace to the output. */ +say ! /*display the factorial product ──►term*/ +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +er: say; say '***error!***'; say; say arg(1); say; exit 13 diff --git a/Task/Factorial/REXX/factorial-3.rexx b/Task/Factorial/REXX/factorial-3.rexx new file mode 100644 index 0000000000..f9f6da4455 --- /dev/null +++ b/Task/Factorial/REXX/factorial-3.rexx @@ -0,0 +1,27 @@ +/*REXX program computes & shows the factorial of an integer, striping trailing zeroes. */ +numeric digits 200 /*start with two hundred digits. */ +parse arg N . /*obtain an optional argument from CL. */ +if N=='' | N=="," then N= 0 /*Not specified? Then use the default.*/ +!= 1 /*define the factorial product so far. */ + do j=2 to N /*compute factorial the hard way. */ + old!= ! /*save old product in case of overflow.*/ + != ! * j /*multiple the old factorial with J. */ + if pos(.,!) \==0 then do /*is the ! in exponential notation?*/ + d= digits() /*D temporarily stores number digits.*/ + numeric digits d+d%10 /*add 10% to the decimal digits. */ + != old! * j /*re─calculate for the "lost" digits.*/ + end /*IFF ≡ if and only if. [↓] */ + parse var ! '' -1 _ /*obtain the right-most digit of ! */ + if _==0 then != strip(!, , 0) /*strip trailing zeroes IFF the ... */ + end /*j*/ /* [↑] ... right-most digit is zero. */ +z= 0 /*the number of trailing zeroes in ! */ + do v=5 by 0 while v<=N /*calculate number of trailing zeroes. */ + z= z + N % v /*bump Z if multiple power of five.*/ + v= v * 5 /*calculate the next power of five. */ + end /*v*/ /* [↑] we only advance V by ourself.*/ + /*stick a fork in it, we're all done. */ +!= ! || copies(0, z) /*add water to rehydrate the product. */ +if z==0 then z= 'no' /*use gooder English for the message. */ +say N'! is ['length(!) " digits with " z ' trailing zeroes]:' +say /*display blank line (for whitespace).*/ +say ! /*display the factorial product. */ diff --git a/Task/Factorial/RISC-V-Assembly/factorial.asm b/Task/Factorial/RISC-V-Assembly/factorial.asm deleted file mode 100644 index f3139a188e..0000000000 --- a/Task/Factorial/RISC-V-Assembly/factorial.asm +++ /dev/null @@ -1,131 +0,0 @@ -# riscv assembly raspberry pico2 rp2350 -# program factorial.s -# connexion putty com3 -/*********************************************/ -/* CONSTANTES */ -/********************************************/ -/* for this file see risc-v task include a file */ -.include "../../constantesRiscv.inc" - -/****************************************************/ -/* MACROS */ -/****************************************************/ -#.include "../ficmacrosriscv.inc" # for debugging only - -/*******************************************/ -/* INITIALED DATAS */ -/*******************************************/ -.data -szMessStart: .asciz "Program riscv start.\r\n" -szMessEnd: .asciz "\nProgram end OK.\r\n" -szCariageReturn: .asciz "\r\n" - -szMessLargeNumber: .asciz "Number N to large. \n" -szMessNegNumber: .asciz "Number N is negative. \n" - -szMessResult: .ascii "Resultat = " # message result - -.align 2 - - -/*******************************************/ -/* UNINITIALED DATA */ -/*******************************************/ -.bss -.align 2 -sConvArea: .skip 24 - -/********************************...-..--*****/ -/* SECTION CODE */ -/**********************************************/ -.text -.global main - -main: - call stdio_init_all # général init -1: # start loop connexion - li a0,0 # raz argument register - call tud_cdc_n_connected # waiting for USB connection - beqz a0,1b # return code = zero ? - - la a0,szMessStart # message address - call writeString # display message - - li a0,-10 - call factorial # - li a0,0 - call factorial # - li a0,10 - call factorial # - - la a0,szMessEnd - call writeString - call getchar -100: # final loop - j 100b -/**********************************************/ -/* compute factorial */ -/**********************************************/ -/* a0 value */ -factorial: # INFO: factorial - addi sp, sp, -4 # reserve stack - sw ra, 0(sp) - bltz a0,99f # is negative ? - li t0,1 - ble a0,t0,1f # is 0 or 1 - call computeFactorial - li t0,-1 # error overflow ? - beq a0,t0,98f -1: # display result - la a1,sConvArea - call conversion10 - la a0,szMessResult - call writeString - la a0,sConvArea - call writeString - la a0,szCariageReturn - call writeString - j 100f -98: - la a0,szMessLargeNumber - call writeString - j 100f -99: - la a0,szMessNegNumber - call writeString - j 100f -100: - lw ra, 0(sp) - addi sp, sp, 4 - ret -/**********************************************/ -/* compute factorial */ -/**********************************************/ -/* a0 value */ -computeFactorial: # INFO:computeFactorial - addi sp,sp, -8 # reserve stack - sw ra,0(sp) - sw s0,4(sp) - li t0,1 - beq a0,t0,100f # if n = 1 return - mv s0,a0 - addi a0,a0,-1 - call computeFactorial - li t0,-1 # error overflow ? - beq a0,t0,100f - mulh t0,a0,s0 # compute half high 32 bits - beqz t0,1f # is ok if result is zero - li a0,-1 # error overflow - j 100f -1: - mul a0,a0,s0 # multiplication -100: - lw ra,0(sp) - lw s0,4(sp) - addi sp,sp, 8 - ret -/************************************/ -/* file include Fonctions */ -/***********************************/ -/* for this file see risc-v task include a file */ -.include "../../includeFunctions.s" diff --git a/Task/Factorial/Rebol/factorial.rebol b/Task/Factorial/Rebol/factorial.rebol deleted file mode 100644 index feb9d5d6c4..0000000000 --- a/Task/Factorial/Rebol/factorial.rebol +++ /dev/null @@ -1,56 +0,0 @@ -Rebol [ - Title: "Factorial" - URL: http://rosettacode.org/wiki/Factorial_function -] - -;; Standard recursive implementation. -factorial: func [n][ - either n > 1 [n * factorial n - 1] [1] -] - -;; Iteration. -ifactorial: func [n][ - f: 1 - for i 2 n 1 [f: f * i] - f -] - -either system/version < 3.0.0 [ - ; Automatic memoization. - ; I'm just going to say up front that this is a stunt. However, you've - ; got to admit it's pretty nifty. Note that the 'memo' function - ; works with an unlimited number of arguments (although the expected - ; gains decrease as the argument count increases). - memo: func [ - "Defines memoizing function -- keeps arguments/results for later use." - args [block!] "Function arguments. Just specify variable names." - body [block!] "The body block of the function." - /local m-args m-r - ][ - do compose/deep [ - func [ - (args) - /dump "Dump memory." - ][ - m-args: [] - if dump [return m-args] - - if m-r: select/only m-args reduce [(args)] [return m-r] - - m-r: do [(body)] - append m-args reduce [reduce [(args)] m-r] - m-r - ] - ] - ] - - mfactorial: memo [n][ - either n > 1 [n * mfactorial n - 1] [1] - ] -][ - ;; Above hack is not supported in Rebol3 - mfactorial: func[i][none] -] - -;; Test them on numbers zero to ten. -for i 0 10 1 [print [i ":" factorial i ifactorial i mfactorial i]] diff --git a/Task/Factorial/Retro/factorial.retro b/Task/Factorial/Retro/factorial.retro index 11cf76e297..fb56673ef4 100644 --- a/Task/Factorial/Retro/factorial.retro +++ b/Task/Factorial/Retro/factorial.retro @@ -1,8 +1,2 @@ -: - dup #1 -eq? 0; drop - dup n:dec * ; - -:factorial - dup n:zero? - [ n:inc ] - [ ] choose ; +: dup 1 = if; dup 1- * ; +: factorial dup 0 = [ 1+ ] [ ] if ; diff --git a/Task/Factorial/Rhombus/factorial-1.rhombus b/Task/Factorial/Rhombus/factorial-1.rhombus deleted file mode 100644 index 5042a49103..0000000000 --- a/Task/Factorial/Rhombus/factorial-1.rhombus +++ /dev/null @@ -1,5 +0,0 @@ -#lang rhombus/static - -fun factorial: -| factorial(0): 1 -| factorial(n): n * factorial(n - 1) diff --git a/Task/Factorial/Rhombus/factorial-2.rhombus b/Task/Factorial/Rhombus/factorial-2.rhombus deleted file mode 100644 index 95c17bc122..0000000000 --- a/Task/Factorial/Rhombus/factorial-2.rhombus +++ /dev/null @@ -1,7 +0,0 @@ -#lang rhombus/static - -fun factorial(n): - for values(a=1) (n in 1..=n): - a * n - -factorial(6) // output: 720 diff --git a/Task/Factorial/Rust/factorial.rs b/Task/Factorial/Rust/factorial.rust similarity index 100% rename from Task/Factorial/Rust/factorial.rs rename to Task/Factorial/Rust/factorial.rust diff --git a/Task/Factorial/S-BASIC/factorial-1.basic b/Task/Factorial/S-BASIC/factorial-1.basic deleted file mode 100644 index 3899ac1bd1..0000000000 --- a/Task/Factorial/S-BASIC/factorial-1.basic +++ /dev/null @@ -1,13 +0,0 @@ -function factorial(n=real.double)=real.double - if n = 0 then n = 1 else n = n * factorial(n-1) -end = n - -var i=integer -print "Factorial Calculator" -print " n n!" -print "----------------------" -for i=1 to 15 - print using "## #,###,###,###,###";i;factorial(i) -next i - -end diff --git a/Task/Factorial/S-BASIC/factorial-2.basic b/Task/Factorial/S-BASIC/factorial-2.basic deleted file mode 100644 index 91fbb1fce5..0000000000 --- a/Task/Factorial/S-BASIC/factorial-2.basic +++ /dev/null @@ -1,7 +0,0 @@ -function factorial(n=real.double)=real.double - var i, f = real.double - f = 1 - for i = 1 to n - f = f * i - next i -end = f diff --git a/Task/Factorial/SQL/factorial.sql b/Task/Factorial/SQL/factorial.sql deleted file mode 100644 index c0b412e4a3..0000000000 --- a/Task/Factorial/SQL/factorial.sql +++ /dev/null @@ -1,6 +0,0 @@ -WITH RECURSIVE f(a, b) AS ( - VALUES(1, 1) - UNION ALL - SELECT a * b, b + 1 FROM f WHERE b <= 9 -) -SELECT MAX(a) FROM f diff --git a/Task/Factorial/Scheme/factorial-1.scm b/Task/Factorial/Scheme/factorial-1.ss similarity index 100% rename from Task/Factorial/Scheme/factorial-1.scm rename to Task/Factorial/Scheme/factorial-1.ss diff --git a/Task/Factorial/Scheme/factorial-2.scm b/Task/Factorial/Scheme/factorial-2.ss similarity index 100% rename from Task/Factorial/Scheme/factorial-2.scm rename to Task/Factorial/Scheme/factorial-2.ss diff --git a/Task/Factorial/Scheme/factorial-3.scm b/Task/Factorial/Scheme/factorial-3.ss similarity index 100% rename from Task/Factorial/Scheme/factorial-3.scm rename to Task/Factorial/Scheme/factorial-3.ss diff --git a/Task/Factorial/Scheme/factorial-4.scm b/Task/Factorial/Scheme/factorial-4.scm deleted file mode 100644 index 1d26a067d8..0000000000 --- a/Task/Factorial/Scheme/factorial-4.scm +++ /dev/null @@ -1,24 +0,0 @@ -;Using a generator and a function that apply generated values to a function taking two arguments - -;A generator knows commands 'next? and 'next -(define (range a b) -(let ((k a)) -(lambda (msg) -(cond - ((eq? msg 'next?) (<= k b)) - ((eq? msg 'next) - (cond - ((<= k b) (set! k (+ k 1)) (- k 1)) - (else 'nothing-left))))))) - -;Similar to List.fold_left in OCaml, but uses a generator -(define (fold fun a gen) -(let aux ((a a)) - (if (gen 'next?) (aux (fun a (gen 'next))) a))) - -;Now the factorial function -(define (factorial n) (fold * 1 (range 1 n))) - -(factorial 8) - -;40320 diff --git a/Task/Factorial/Scheme/factorial-4.ss b/Task/Factorial/Scheme/factorial-4.ss new file mode 100644 index 0000000000..3e179ef9e9 --- /dev/null +++ b/Task/Factorial/Scheme/factorial-4.ss @@ -0,0 +1,23 @@ +;Using a generator and a function that apply generated values to a function taking two arguments + +;A generator knows commands 'next? and 'next +(define (range a b) +(let ((k a)) +(lambda (msg) +(cond + ((eq? msg 'next?) (<= k b)) + ((eq? msg 'next) + (cond + ((<= k b) (set! k (+ k 1)) (- k 1)) + (else 'nothing-left))))))) + +;Similar to List.fold_left in OCaml, but uses a generator +(define (fold fun a gen) +(let aux ((a a)) + (if (gen 'next?) (aux (fun a (gen 'next))) a))) + +;Now the factorial function +(define (factorial n) (fold * 1 (range 1 n))) + +(factorial 8) +;40320 diff --git a/Task/Factorial/Scheme/factorial-5.scm b/Task/Factorial/Scheme/factorial-5.scm deleted file mode 100644 index 513325a124..0000000000 --- a/Task/Factorial/Scheme/factorial-5.scm +++ /dev/null @@ -1,9 +0,0 @@ -(define (range n) - (let ((lst '())) - (do ((i 1 (+ i 1))) - ((= i (+ n 1))) - (set! lst (cons i lst))) - (reverse lst))) - -(define (fact n) - (apply * (range n))) diff --git a/Task/Factorial/TAV/factorial.tav b/Task/Factorial/TAV/factorial.tav deleted file mode 100644 index ce55505a2d..0000000000 --- a/Task/Factorial/TAV/factorial.tav +++ /dev/null @@ -1,14 +0,0 @@ -factorial (n) iterative: - p =: 1 - ?# i =: from 2 upto n \ does nothing if n < 2 - p =* i - :> p -factorial (n) recursive: - ? n <= 1 - :> 1 - :> n * factorial recursive n-1 - \ test code - main(parms):+ - arg =: string parms[1] as integer else 100 - print factorial arg iterative - print factorial arg recursive diff --git a/Task/Factorial/Tailspin/factorial-2.tailspin b/Task/Factorial/Tailspin/factorial-2.tailspin index 09af3015fd..023c4b4738 100644 --- a/Task/Factorial/Tailspin/factorial-2.tailspin +++ b/Task/Factorial/Tailspin/factorial-2.tailspin @@ -1,6 +1,4 @@ -factorial templates - when <|0..> do - @ set 1; - 1..$ -> @ set $@ * $; - $@ ! +templates factorial + when <=0> do 1 ! + when <0..> $ * ($ - 1 -> factorial) ! end factorial diff --git a/Task/Factorial/Tailspin/factorial-3.tailspin b/Task/Factorial/Tailspin/factorial-3.tailspin deleted file mode 100644 index 023c4b4738..0000000000 --- a/Task/Factorial/Tailspin/factorial-3.tailspin +++ /dev/null @@ -1,4 +0,0 @@ -templates factorial - when <=0> do 1 ! - when <0..> $ * ($ - 1 -> factorial) ! -end factorial diff --git a/Task/Factorial/Tailspin/factorial-4.tailspin b/Task/Factorial/Tailspin/factorial-4.tailspin deleted file mode 100644 index 968ff78c33..0000000000 --- a/Task/Factorial/Tailspin/factorial-4.tailspin +++ /dev/null @@ -1,4 +0,0 @@ -factorial templates - when <|=0> do 1 ! - when <|0..> do $ * ($ - 1 -> #) ! -end factorial diff --git a/Task/Factorial/Tcl/factorial-1.tcl b/Task/Factorial/Tcl/factorial-1.tcl index a204184466..8220088fdf 100644 --- a/Task/Factorial/Tcl/factorial-1.tcl +++ b/Task/Factorial/Tcl/factorial-1.tcl @@ -1,12 +1,6 @@ -# tailcall optimization is standard in tcl8.6 -proc fact { n { result 1. } } { - if { $n <= 1 } { - return $result - } else { - tailcall fact [expr {$n-1}] [expr {$n*$result}] +proc ifact n { + for {set i $n; set sum 1} {$i >= 2} {incr i -1} { + set sum [expr {$sum * $i}] } + return $sum } - -set f [fact 10] - -puts $f diff --git a/Task/Factorial/Tcl/factorial-2.tcl b/Task/Factorial/Tcl/factorial-2.tcl index 8220088fdf..40cc360692 100644 --- a/Task/Factorial/Tcl/factorial-2.tcl +++ b/Task/Factorial/Tcl/factorial-2.tcl @@ -1,6 +1,3 @@ -proc ifact n { - for {set i $n; set sum 1} {$i >= 2} {incr i -1} { - set sum [expr {$sum * $i}] - } - return $sum +proc rfact n { + expr {$n < 2 ? 1 : $n * [rfact [incr n -1]]} } diff --git a/Task/Factorial/Tcl/factorial-3.tcl b/Task/Factorial/Tcl/factorial-3.tcl index 40cc360692..e25b3f18c7 100644 --- a/Task/Factorial/Tcl/factorial-3.tcl +++ b/Task/Factorial/Tcl/factorial-3.tcl @@ -1,3 +1 @@ -proc rfact n { - expr {$n < 2 ? 1 : $n * [rfact [incr n -1]]} -} +proc tcl::mathfunc::fact n {expr {$n < 2? 1: $n*fact($n-1)}} diff --git a/Task/Factorial/Tcl/factorial-4.tcl b/Task/Factorial/Tcl/factorial-4.tcl index e25b3f18c7..9a9a02de85 100644 --- a/Task/Factorial/Tcl/factorial-4.tcl +++ b/Task/Factorial/Tcl/factorial-4.tcl @@ -1 +1,17 @@ -proc tcl::mathfunc::fact n {expr {$n < 2? 1: $n*fact($n-1)}} +proc ifact_caching n { + global fact_cache + if { ! [info exists fact_cache]} { + set fact_cache {1 1} + } + if {$n < [llength $fact_cache]} { + return [lindex $fact_cache $n] + } + set i [expr {[llength $fact_cache] - 1}] + set sum [lindex $fact_cache $i] + while {$i < $n} { + incr i + set sum [expr {$sum * $i}] + lappend fact_cache $sum + } + return $sum +} diff --git a/Task/Factorial/Tcl/factorial-5.tcl b/Task/Factorial/Tcl/factorial-5.tcl index c8cb0123e7..ecdfbe5752 100644 --- a/Task/Factorial/Tcl/factorial-5.tcl +++ b/Task/Factorial/Tcl/factorial-5.tcl @@ -1,18 +1,11 @@ -proc ifact_caching n { - global fact_cache - tailcall fact [expr {$n-1}] [expr {$n*$result}] - if { ! [info exists fact_cache]} { - set fact_cache {1 1} - } - if {$n < [llength $fact_cache]} { - return [lindex $fact_cache $n] - } - set i [expr {[llength $fact_cache] - 1}] - set sum [lindex $fact_cache $i] - while {$i < $n} { - incr i - set sum [expr {$sum * $i}] - lappend fact_cache $sum - } - return $sum -} +puts [ifact 30] +puts [rfact 30] +puts [ifact_caching 30] + +set n 400 +set iterations 10000 +puts "calculate $n factorial $iterations times" +puts "ifact: [time {ifact $n} $iterations]" +puts "rfact: [time {rfact $n} $iterations]" +# for the caching proc, reset the cache between each iteration so as not to skew the results +puts "ifact_caching: [time {ifact_caching $n; unset -nocomplain fact_cache} $iterations]" diff --git a/Task/Factorial/Tcl/factorial-6.tcl b/Task/Factorial/Tcl/factorial-6.tcl index 9a3cf79548..46e5e0fcab 100644 --- a/Task/Factorial/Tcl/factorial-6.tcl +++ b/Task/Factorial/Tcl/factorial-6.tcl @@ -1,52 +1,5 @@ -# calls cmd with args -# retpeatedly in scope above -proc trampoline {cmd args} { +package require math::special - # thunk is {cmd {arg1 arg2 arg3 ...} } - set result [uplevel 1 [concat $cmd $args]] - - # split into vars - lassign $result type thunk - - # loop - while {$type eq "next"} { - set result [uplevel 1 $thunk] - lassign $result type thunk - } - - set final_value $thunk - - return $final_value +proc gfact n { + expr {round([::math::special::Gamma [expr {$n+1}]])} } - -# return { value final_value } -# or { next {cmd arg1 arg2} } -proc factorial_step {n result} { - - if {$n <= 1} { - set ret_value [list "value" $result] - } else { - - # n-1 - set next_n [expr {$n-1}] - - # (n-1) * fact(n) - set next_result [expr {$n * $result}] - - # {func arg1 arg2} - set next_thunk [list factorial_step $next_n $next_result] - - # Return the next step as a list - set ret_value [list "next" $next_thunk] - } - - return $ret_value -} - - -# The execution is wrapped by the trampoline -proc factorial {n} { - return [trampoline factorial_step $n 1] -} - -set f [factorial 100] diff --git a/Task/Factorial/Tcl/factorial-7.tcl b/Task/Factorial/Tcl/factorial-7.tcl deleted file mode 100644 index ecdfbe5752..0000000000 --- a/Task/Factorial/Tcl/factorial-7.tcl +++ /dev/null @@ -1,11 +0,0 @@ -puts [ifact 30] -puts [rfact 30] -puts [ifact_caching 30] - -set n 400 -set iterations 10000 -puts "calculate $n factorial $iterations times" -puts "ifact: [time {ifact $n} $iterations]" -puts "rfact: [time {rfact $n} $iterations]" -# for the caching proc, reset the cache between each iteration so as not to skew the results -puts "ifact_caching: [time {ifact_caching $n; unset -nocomplain fact_cache} $iterations]" diff --git a/Task/Factorial/Tcl/factorial-8.tcl b/Task/Factorial/Tcl/factorial-8.tcl deleted file mode 100644 index 46e5e0fcab..0000000000 --- a/Task/Factorial/Tcl/factorial-8.tcl +++ /dev/null @@ -1,5 +0,0 @@ -package require math::special - -proc gfact n { - expr {round([::math::special::Gamma [expr {$n+1}]])} -} diff --git a/Task/Factorial/Uiua/factorial.uiua b/Task/Factorial/Uiua/factorial.uiua deleted file mode 100644 index 7b2a3e07ea..0000000000 --- a/Task/Factorial/Uiua/factorial.uiua +++ /dev/null @@ -1 +0,0 @@ -Factorial = /×+1⇡ diff --git a/Task/Factorial/Uxntal/factorial.uxnatl b/Task/Factorial/Uxntal/factorial.uxnatl index f936013ac4..6ce1360a76 100644 --- a/Task/Factorial/Uxntal/factorial.uxnatl +++ b/Task/Factorial/Uxntal/factorial.uxnatl @@ -1,28 +1,4 @@ -%newline { [ LIT2 0a -Console/write ] DEO } - -|18 @Console/write - -|100 - -#0900 -&loop - DUP #00 SWP factorial print/dec newline - INC GTHk ?&loop -POP2 - -BRK - -@factorial ( n* -- n!* ) +@factorial ( n* -: fact* ) ORAk ?{ POP2 #0001 JMP2r } DUP2 #0001 SUB2 factorial MUL2 - JMP2r - -@print/dec ( short* -- ) - #000a SWP2 [ LITr ff ] - &get ( -- ) - SWP2k DIV2k MUL2 SUB2 STH - POP OVR2 DIV2 ORAk ?&get - POP2 POP2 - &put ( -- ) - STHr INCk ?{ POP JMP2r } - [ LIT "0 ] ADD .Console/write DEO !&put +JMP2r diff --git a/Task/Factorial/VBScript/factorial.vbs b/Task/Factorial/VBScript/factorial.vb similarity index 100% rename from Task/Factorial/VBScript/factorial.vbs rename to Task/Factorial/VBScript/factorial.vb diff --git a/Task/Factorial/VHDL/factorial.vhd b/Task/Factorial/VHDL/factorial.vhdl similarity index 100% rename from Task/Factorial/VHDL/factorial.vhd rename to Task/Factorial/VHDL/factorial.vhdl diff --git a/Task/Factorial/Vyxal/factorial-1.vyxal b/Task/Factorial/Vyxal/factorial-1.vyxal deleted file mode 100644 index 25e660494e..0000000000 --- a/Task/Factorial/Vyxal/factorial-1.vyxal +++ /dev/null @@ -1 +0,0 @@ -¡ diff --git a/Task/Factorial/Vyxal/factorial-2.vyxal b/Task/Factorial/Vyxal/factorial-2.vyxal deleted file mode 100644 index 954fe1858c..0000000000 --- a/Task/Factorial/Vyxal/factorial-2.vyxal +++ /dev/null @@ -1 +0,0 @@ -ɾƒ* diff --git a/Task/Factorial/Vyxal/factorial-3.vyxal b/Task/Factorial/Vyxal/factorial-3.vyxal deleted file mode 100644 index 601abd91b0..0000000000 --- a/Task/Factorial/Vyxal/factorial-3.vyxal +++ /dev/null @@ -1 +0,0 @@ -λ0=[1|‹x*]; diff --git a/Task/Factorial/YAMLScript/factorial.ys b/Task/Factorial/YAMLScript/factorial.ys index 29d50ba6fa..8cd4d4397a 100644 --- a/Task/Factorial/YAMLScript/factorial.ys +++ b/Task/Factorial/YAMLScript/factorial.ys @@ -1,10 +1,7 @@ -!YS-v0 +#!/usr/bin/env ys-0 -defn main(*ns): - each n ns: - say: "$n! -> $factorial(n)" +defn main(n): + say: "$n! = $factorial(n)" defn factorial(x): - if x <= 2: - (x ||| 1) - (2 .. x).mul(*) + apply *: 2 .. x diff --git a/Task/Factorions/ALGOL-68/factorions.alg b/Task/Factorions/ALGOL-68/factorions.alg index bf43b1ebde..70b2f250e7 100644 --- a/Task/Factorions/ALGOL-68/factorions.alg +++ b/Task/Factorions/ALGOL-68/factorions.alg @@ -1,9 +1,9 @@ BEGIN # cache factorials from 0 to 11 # - [ 0 : 11 ]INT bfact; - bfact[0] := 1; + [ 0 : 11 ]INT fact; + fact[0] := 1; FOR n TO 11 DO - bfact[n] := bfact[n-1] * n + fact[n] := fact[n-1] * n OD; FOR b FROM 9 TO 12 DO print( ( "The factorions for base ", whole( b, 0 ), " are:", newline ) ); @@ -11,7 +11,7 @@ BEGIN INT sum := 0; INT j := i; WHILE j > 0 DO - sum +:= bfact[ j MOD b ]; + sum +:= fact[ j MOD b ]; j OVERAB b OD; IF sum = i THEN print( ( whole( i, 0 ), " " ) ) FI diff --git a/Task/Factorions/Ada/factorions.adb b/Task/Factorions/Ada/factorions.adb deleted file mode 100644 index a8d21fb554..0000000000 --- a/Task/Factorions/Ada/factorions.adb +++ /dev/null @@ -1,64 +0,0 @@ -with Ada.Text_IO; - -procedure Factorions is - subtype Factorial_Domain is Natural range 0 .. 11; - subtype Log_Base is Positive range 2 .. Positive'Last; - type Result_Table is array (Factorial_Domain) of Positive; - - Factorial : Result_Table; - Search_Limit : Positive := 1_500_000; - - procedure Precompute_Factorials is - begin - Factorial (0) := 1; - - for I in 1 .. Factorial'Last loop - Factorial (I) := I * Factorial (I - 1); - end loop; - end Precompute_Factorials; - - function Floor_Log (Number : Positive; Base : Log_Base) return Natural is - Remaining : Natural := Number; - Floor_Log : Natural := 0; - begin - while Remaining > Base loop - Remaining := Remaining / Base; - Floor_Log := Floor_Log + 1; - end loop; - - return Floor_Log; - end Floor_Log; - - function Digit (Number, Index : Natural; Base : Log_Base) return Natural is - begin - return (Number / (Base ** Index)) mod Base; - end Digit; - - function Is_Factorion (Number : Positive; Base : Log_Base) return Boolean is - Digit_Sum : Natural := 0; - begin - for I in 0 .. Floor_Log (Number, Base) loop - Digit_Sum := Digit_Sum + Factorial (Digit (Number, I, Base)); - end loop; - - return Digit_Sum = Number; - end Is_Factorion; - - procedure Show_Factorions (Base : Log_Base) is - begin - Ada.Text_IO.Put_Line ("Search Base " & Base'Image); - for I in 1 .. Search_Limit loop - if Is_Factorion (I, Base) then - Ada.Text_IO.Put_Line (I'Image); - end if; - end loop; - Ada.Text_IO.Put_Line ("Done Base " & Base'Image); - end Show_Factorions; - -begin - Precompute_Factorials; - Show_Factorions (9); - Show_Factorions (10); - Show_Factorions (11); - Show_Factorions (12); -end Factorions; diff --git a/Task/Factorions/Arturo/factorions.arturo b/Task/Factorions/Arturo/factorions.arturo index e31b208049..700ea04d67 100644 --- a/Task/Factorions/Arturo/factorions.arturo +++ b/Task/Factorions/Arturo/factorions.arturo @@ -1,9 +1,10 @@ factorials: [1 1 2 6 24 120 720 5040 40320 362880 3628800 39916800] factorion?: function [n, base][ - if throws? [ + try? [ n = sum map digits.base:base n 'x -> factorials\[x] - ][ + ] + else [ print ["n:" n "base:" base] false ] @@ -11,3 +12,4 @@ factorion?: function [n, base][ loop 9..12 'base -> print ["Base" base "factorions:" select 1..45000 'z -> factorion? z base] +] diff --git a/Task/Factorions/Delphi/factorions.pas b/Task/Factorions/Delphi/factorions.delphi similarity index 100% rename from Task/Factorions/Delphi/factorions.pas rename to Task/Factorions/Delphi/factorions.delphi diff --git a/Task/Factorions/EasyLang/factorions.easy b/Task/Factorions/EasyLang/factorions.easy deleted file mode 100644 index 014c445c4c..0000000000 --- a/Task/Factorions/EasyLang/factorions.easy +++ /dev/null @@ -1,20 +0,0 @@ -len fact[] 12 -# -fact[0] = 1 -for n = 1 to 11 - fact[n] = fact[n - 1] * n -. -for b = 9 to 12 - write "base " & b & " factorions:" - for i = 1 to 1500000 - 1 - sum = 0 - j = i - while j > 0 - d = j mod b - sum += fact[d] - j = j div b - . - if sum = i : write " " & i - . - print "" -. diff --git a/Task/Factorions/Fortran/factorions.f b/Task/Factorions/Fortran/factorions.f deleted file mode 100644 index a142cc2e4a..0000000000 --- a/Task/Factorions/Fortran/factorions.f +++ /dev/null @@ -1,52 +0,0 @@ -! Factorions -! tested with Intel ifx (IFX) 2025.2.1 20250806 on Kubuntu 25.10 -! GNU gfortran (Ubuntu 15.2.0-4ubuntu4) 15.2.0 on Kubuntu 25.10 -! VSI Fortran x86-64 V8.7-001 on OpenVMS V9.2-3 -program Factorions -integer, parameter :: minBase=9, maxBase = 12 ! minumum and maximum base used in this little program -integer, parameter :: factLim=1499999 ! Maximum factorial Number for all bases that are used here -integer, dimension(0:maxBase-1) :: fact ! Stored factorials for numbers 0...12 - -integer :: ii, jj, base - -! Prepare cached factorial function -fact = 1 -do ii=1, maxBase-1 - do jj= 2, ii - fact(ii) = fact(ii) * jj - enddo -end do - -! -! Brute force: for all bases, for all numbers 1...max tes each number and print if its a factorion. -! -do base=minBase, maxBase - write (*, '("The factorions in base ", i0, " are:")') base - do ii=1, factLim - if (isFactorion (ii, base)) write (*, '(1x,i0)', advance='no') ii - enddo - write (*,'(/)') -end do - -contains - -! -! Separate digits d of number n in base b, sum up d!, and compare result with n. -! -function isFactorion (n,b) result (YN) -integer, intent (in) :: n, b -logical :: YN -integer :: dig, nn, facts_sum - -nn = N -facts_sum = 0 -do while (nn .ne. 0) - dig = mod (nn, b) - nn = nn / b - - facts_sum = facts_sum + fact(dig) -enddo -yn = facts_sum .eq. n - -end function isFactorion -end program Factorions diff --git a/Task/Factorions/JavaScript/factorions.js b/Task/Factorions/JavaScript/factorions.js deleted file mode 100644 index a9a3f2c3ae..0000000000 --- a/Task/Factorions/JavaScript/factorions.js +++ /dev/null @@ -1,25 +0,0 @@ -function factorial(n) { - if (n <= 1) { - return 1; - } - let a = [...Array(n + 1).keys()]; - a.shift(); - return a.reduce((x, y) => x * y); -} - -function fact_digsum(n, b) { - if (n > b - 1) { - return factorial(n % b) + fact_digsum(Math.floor(n / b), b); - } - return factorial(n); -} - -for (let i = 9; i <= 12; i++) { - console.log(`Factorions in base ${i}:`); - for (let j = 1; j < 1499999; j++) { - if (j == fact_digsum(j, i)) { - console.log(j); - } - } - console.log(); -} diff --git a/Task/Factorions/Jq/factorions.jq b/Task/Factorions/Jq/factorions.jq index 012ec312ee..84891c0781 100644 --- a/Task/Factorions/Jq/factorions.jq +++ b/Task/Factorions/Jq/factorions.jq @@ -29,7 +29,7 @@ def sufficient: .digits += 1 | .value *= $base ) ; -# Show the factorions for all bases from 2 through 12: +# Show the factorions for all based from 2 through 12: (range(2;10) | . as $base | sufficient.value as $max diff --git a/Task/Factorions/Julia/factorions.jl b/Task/Factorions/Julia/factorions.julia similarity index 100% rename from Task/Factorions/Julia/factorions.jl rename to Task/Factorions/Julia/factorions.julia diff --git a/Task/Factorions/OCaml/factorions.ml b/Task/Factorions/OCaml/factorions.ocaml similarity index 100% rename from Task/Factorions/OCaml/factorions.ml rename to Task/Factorions/OCaml/factorions.ocaml diff --git a/Task/Factorions/PascalABC.NET/factorions.pas b/Task/Factorions/PascalABC.NET/factorions.pas deleted file mode 100644 index ac69d82c56..0000000000 --- a/Task/Factorions/PascalABC.NET/factorions.pas +++ /dev/null @@ -1,22 +0,0 @@ -## -var fact := |1| * 12; -for var i := 1 to 11 do fact[i] := i * fact[i - 1]; - -for var b := 9 to 12 do -begin - write('The factorions for base ', b:2, ' are: '); - for var i := 1 to 1_500_000 do - begin - var fact_sum := 0; - var j := i; - while j > 0 do - begin - var d := j mod b; - fact_sum += fact[d]; - j := j div b; - end; - if fact_sum = i then - print(i) - end; - println; -end; diff --git a/Task/Factorions/Pluto/factorions.pluto b/Task/Factorions/Pluto/factorions.pluto deleted file mode 100644 index f95a296746..0000000000 --- a/Task/Factorions/Pluto/factorions.pluto +++ /dev/null @@ -1,18 +0,0 @@ --- Cache factorials from 0 to 11. -local fact = {[0] = 1} -for n = 1, 11 do fact[n] = fact[n - 1] * n end - -for b = 9, 12 do - print($"The factorions for base {b} are:") - for i = 1, 1_499_999 do - local sum = 0 - local j = i - while j > 0 do - local d = j % b - sum += fact[d] - j //= b - end - if sum == i then io.write($"{i} ") end - end - print("\n") -end diff --git a/Task/Factorions/R/factorions.r b/Task/Factorions/R/factorions.r deleted file mode 100644 index 9f1c569b7e..0000000000 --- a/Task/Factorions/R/factorions.r +++ /dev/null @@ -1,12 +0,0 @@ -fact_digsum <- function(n, b) { - if(n > b-1) { - factorial(n%%b)+fact_digsum(n%/%b, b) - } else factorial(n) -} - -for(i in 9:12) { - cat("\nFactorions in base ", i, ":\n", sep="") - for(j in 1:1499999) { - if(j == fact_digsum(j, i)) cat(j, "") - } -} diff --git a/Task/Factorions/VBScript/factorions.vbs b/Task/Factorions/VBScript/factorions.vb similarity index 100% rename from Task/Factorions/VBScript/factorions.vbs rename to Task/Factorions/VBScript/factorions.vb diff --git a/Task/Factorions/Vyxal/factorions.vyxal b/Task/Factorions/Vyxal/factorions.vyxal deleted file mode 100644 index bf2fb337c6..0000000000 --- a/Task/Factorions/Vyxal/factorions.vyxal +++ /dev/null @@ -1,7 +0,0 @@ -λ2|→B:←Bτƛ¡}∑$_-¬}£ # check whether factorion -⟨9|10|11|12⟩(`Base `₴n:₴\:,→b - 1500000 ( - n 1000 ≠[ - ←b n¥†[n,]] - ) -) diff --git a/Task/Factors-of-a-Mersenne-number/Ada/factors-of-a-mersenne-number.adb b/Task/Factors-of-a-Mersenne-number/Ada/factors-of-a-mersenne-number.ada similarity index 100% rename from Task/Factors-of-a-Mersenne-number/Ada/factors-of-a-mersenne-number.adb rename to Task/Factors-of-a-Mersenne-number/Ada/factors-of-a-mersenne-number.ada diff --git a/Task/Factors-of-a-Mersenne-number/Arturo/factors-of-a-mersenne-number.arturo b/Task/Factors-of-a-Mersenne-number/Arturo/factors-of-a-mersenne-number.arturo index ec0ce3744d..6542a31a61 100644 --- a/Task/Factors-of-a-Mersenne-number/Arturo/factors-of-a-mersenne-number.arturo +++ b/Task/Factors-of-a-Mersenne-number/Arturo/factors-of-a-mersenne-number.arturo @@ -5,16 +5,16 @@ mersenneFactors: function [q][ -> shl 'r 1 d: new 1 + 2 * q while [true][ - i: 1 + i: new 1 p: new r while [p <> 0][ - i: (i * i) % d + i: new (i * i) % d if p < 0 -> 'i * 2 if i > d -> 'i - d shl 'p 1 ] - switch i <> 1 -> 'd + 2 * q - -> break + if? i <> 1 -> 'd + 2 * q + else -> break ] print ["2 ^" q "- 1 = 0 ( mod" d ")"] ] diff --git a/Task/Factors-of-a-Mersenne-number/Crystal/factors-of-a-mersenne-number.cr b/Task/Factors-of-a-Mersenne-number/Crystal/factors-of-a-mersenne-number.crystal similarity index 100% rename from Task/Factors-of-a-Mersenne-number/Crystal/factors-of-a-mersenne-number.cr rename to Task/Factors-of-a-Mersenne-number/Crystal/factors-of-a-mersenne-number.crystal diff --git a/Task/Factors-of-a-Mersenne-number/EasyLang/factors-of-a-mersenne-number.easy b/Task/Factors-of-a-Mersenne-number/EasyLang/factors-of-a-mersenne-number.easy index 60690b52c1..e251a85135 100644 --- a/Task/Factors-of-a-Mersenne-number/EasyLang/factors-of-a-mersenne-number.easy +++ b/Task/Factors-of-a-Mersenne-number/EasyLang/factors-of-a-mersenne-number.easy @@ -1,32 +1,40 @@ fastfunc isprim num . i = 2 while i <= sqrt num - if num mod i = 0 : return 0 + if num mod i = 0 + return 0 + . i += 1 . return 1 . -func modpow p n . +func bit_count n . + while n > 0 + n = bitshift n -1 + cnt += 1 + . + return cnt +. +func mod_pow p n . square = 1 - p2 = pow 2 floor log n 2 - while p2 >= 1 + bits = bit_count p + while bits > 0 square *= square - if p >= p2 - p -= p2 - square *= 2 + bits -= 1 + if bitand p bitshift 1 bits > 0 + square = bitshift square 1 . - p2 /= 2 square = square mod n . return square . func mersenne_factor p . - repeat + while 1 = 1 k += 1 q = 2 * k * p + 1 - m = q mod 8 - until (m = 1 or m = 7) and modpow p q = 1 and isprim q = 1 + if (q mod 8 = 1 or q mod 8 = 7) and mod_pow p q = 1 and isprim q = 1 + return q + . . - return q . print mersenne_factor 929 diff --git a/Task/Factors-of-a-Mersenne-number/Elixir/factors-of-a-mersenne-number.ex b/Task/Factors-of-a-Mersenne-number/Elixir/factors-of-a-mersenne-number.elixir similarity index 100% rename from Task/Factors-of-a-Mersenne-number/Elixir/factors-of-a-mersenne-number.ex rename to Task/Factors-of-a-Mersenne-number/Elixir/factors-of-a-mersenne-number.elixir diff --git a/Task/Factors-of-a-Mersenne-number/FutureBasic/factors-of-a-mersenne-number.basic b/Task/Factors-of-a-Mersenne-number/FutureBasic/factors-of-a-mersenne-number.basic deleted file mode 100644 index 2552a45c70..0000000000 --- a/Task/Factors-of-a-Mersenne-number/FutureBasic/factors-of-a-mersenne-number.basic +++ /dev/null @@ -1,108 +0,0 @@ -// -// Factors of Mersenne number -// -// Using FutureBasic 7.0.36 -// October 2025, R.W. - -include "gmp.incl" - -_scanMax = 2000000 // max k scan set at 2 million - -// ------------------------------------------------------------ -// Exponent primality using GMP (mpz_probab_prime_p) -// Returns _true if p is (probably) prime; _false otherwise. - -local fn IsPrimeP_mpz( p as UInt32 ) as BOOL - mpz_t z - int res - if p < 2 then return _false - mpz_init( z ) - mpz_set_ui( z, p ) - // Miller–Rabin reps = 18 is sufficient - // res 0 = composite, 1 = probable, 2 = definite - res = fn mpz_probab_prime_p( z, 18 ) - mpz_clear( z ) - if res == 0 then return _false - // res 1 or 2 → treat as prime for gating -end fn = _True - -// ------------------------------------------------------------ -// Find first prime factor q of M_p = 2^p - 1 -// Scans q = 2 * k * p + 1 for k = 1..maxK. Returns 0 if none found. -// Precondition: caller ensures p is (probably) prime and p ≥ 2. -// -local fn FindMersenneFactor( p as UInt32, maxK as UInt64 ) as UInt64 - mpz_t qz, rz - UInt64 k, qCandidate - int isPrime - // Eliminate the obvious - if p < 2 then return 0 - if p == 2 then return 0 // M2 = 3 is prime - - mpz_init( qz ) - mpz_init( rz ) - k = 1 - while k <= maxK - // q = 2 * k * p + 1 (candidates with q ≡ 1 (mod 2p)) - qCandidate = (UInt64)2 * (UInt64)p * k + 1ULL - // primality screen for q - mpz_set_ui( qz, qCandidate ) - // Miller–Rabin reps = 18 is sufficient - isPrime = fn mpz_probab_prime_p( qz, 18 ) - if isPrime > 0 - // Test 2^p ≡ 1 (mod q) - mpz_set_ui( rz, 2 ) - mpz_powm_ui( rz, rz, p, qz ) - if fn mpz_cmp_ui( rz, 1 ) == 0 - mpz_clear( rz ) - mpz_clear( qz ) - return qCandidate - end if - end if - k = k + 1 - wend - mpz_clear( rz ) - mpz_clear( qz ) -end fn = 0 - -// ------------------------------------------------------------ -// M_p gating/message -// -local fn ReportMersenne( p as UInt32, maxK as UInt64 ) - UInt64 q - // Gate on exponent primality first - if fn IsPrimeP_mpz( p ) == _false - print @"M"; p; @" = 2^"; p; @" - 1 exponent is not prime" - exit fn - end if - // p is (probably) prime: try to find a factor of M_p - q = fn FindMersenneFactor( p, maxK ) - if q == 0 - // No factor found in scan range → either prime or factor > search bound - print @"M"; p; @" = 2^"; p; @" - 1 is prime (no factor found in range)" - else - print @"M"; p; @" = 2^"; p; @" - 1 is composite with factor "; q - end if -end fn - - -// Main - -window 1 - -UInt32 p -p = 929 // Rosetta Task requirement - -// start the clock -CFTimeInterval t -t = fn CACurrentMediaTime - -// note, if you need a range, just do a loop -// like: -// for p = 900 to 930 -fn ReportMersenne( p, _scanMax ) // 2 million k scans -// next p - -printf @"\nElapsed time: %.3f ms", (fn CACurrentMediaTime-t)*1000 - -HandleEvents diff --git a/Task/Factors-of-a-Mersenne-number/Jq/factors-of-a-mersenne-number.jq b/Task/Factors-of-a-Mersenne-number/Jq/factors-of-a-mersenne-number.jq deleted file mode 100644 index 2846586599..0000000000 --- a/Task/Factors-of-a-Mersenne-number/Jq/factors-of-a-mersenne-number.jq +++ /dev/null @@ -1,61 +0,0 @@ -# Generic filters: - -# Integer division (for gojq and jaq) -# If $j is 0, then an error condition is raised; -# otherwise, assuming infinite-precision integer arithmetic, -# if the input and $j are integers, then the result will be an integer. -def idivide($j): - (. % $j) as $mod - | (. - $mod) / $j | round; - -# Convert the input integer to a stream of 0s and 1s, least significant bit first -def bitwise: - recurse( if . >= 2 then idivide(2) else empty end) | . % 2; - -def is_prime: - . as $n - | if ($n < 2) then false - elif ($n % 2 == 0) then $n == 2 - elif ($n % 3 == 0) then $n == 3 - elif ($n % 5 == 0) then $n == 5 - elif ($n % 7 == 0) then $n == 7 - elif ($n % 11 == 0) then $n == 11 - elif ($n % 13 == 0) then $n == 13 - elif ($n % 17 == 0) then $n == 17 - elif ($n % 19 == 0) then $n == 19 - else sqrt as $s - | 23 - | until( . > $s or ($n % . == 0); . + 2) - | . > $s - end; - -### Factors of Mersene numbers - -def trialFactor($base; $exp; $mod): - [$exp | bitwise] as $bits - | ($bits|length) as $length - | reduce range( 0; $length) as $i (1; - (. * . * (if $bits[$length-$i-1] == 1 then $base else 1 end)) % $mod ) - | . == 1 ; - -def mersenneFactor($p): - ((pow(2;$p) - 1) | sqrt | floor) as $limit - | {k: 1} - | until ((2*.k*$p - 1) >= $limit or .emit; - (2*.k*$p + 1 ) as $q - | if ($q%8 == 1 or $q%8 == 7) and trialFactor(2; $p; $q) and ($q | is_prime) - then .emit = $q # q is a factor of 2^p - 1 - else .k += 1 - end) - | if .emit then .emit else null end; - -### Examples: - -def m: [3, 5, 11, 17, 23, 29, 31, 37, 41, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 929]; - -m[] -| mersenneFactor(.) as $f -| "2^\(.) - 1 is " + - if $f then "composite (factor \($f))" - else "prime" - end diff --git a/Task/Factors-of-a-Mersenne-number/Julia/factors-of-a-mersenne-number.jl b/Task/Factors-of-a-Mersenne-number/Julia/factors-of-a-mersenne-number.julia similarity index 100% rename from Task/Factors-of-a-Mersenne-number/Julia/factors-of-a-mersenne-number.jl rename to Task/Factors-of-a-Mersenne-number/Julia/factors-of-a-mersenne-number.julia diff --git a/Task/Factors-of-a-Mersenne-number/Kotlin/factors-of-a-mersenne-number.kts b/Task/Factors-of-a-Mersenne-number/Kotlin/factors-of-a-mersenne-number.kotlin similarity index 100% rename from Task/Factors-of-a-Mersenne-number/Kotlin/factors-of-a-mersenne-number.kts rename to Task/Factors-of-a-Mersenne-number/Kotlin/factors-of-a-mersenne-number.kotlin diff --git a/Task/Factors-of-a-Mersenne-number/M2000-Interpreter/factors-of-a-mersenne-number.m2000 b/Task/Factors-of-a-Mersenne-number/M2000-Interpreter/factors-of-a-mersenne-number.m2000 deleted file mode 100644 index 9387607154..0000000000 --- a/Task/Factors-of-a-Mersenne-number/M2000-Interpreter/factors-of-a-mersenne-number.m2000 +++ /dev/null @@ -1,39 +0,0 @@ -// 67 need a lot of time 45 minutes (2758716msec) where 71 need 3.1 second (3131msec) -Module Factors_of_a_Mersenne_number{ - Dim q() - // 67 need a lot of time 51 minutes (3082671msec) where 71 need 3.5 second (3505msec) - q()= (11, 23, 29, 37, 41, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 929) - profiler - long long j=0x8000_0000 - long long r, p, i - long d, dd - For k = 0 To len(q())-1 - If @isPrime(q(k)) Then - r=q(k):dd =2*r:d=dd+1 - while rd Then i-=d - Until p=0:If i=1 Then Exit Else d+=dd:i=1:p=r - Always - Print "2^"; q(k); @(6); " - 1 = 0 (mod "; d; ")" - Else - Print q(k); " is not prime" - End If - Print ceil(timecount):profiler - Next - - Function isPrime(n As long) - If n Mod 2 = 0 Then = n=2 : Exit Function - If n Mod 3 = 0 Then = n=3 : Exit Function - Local d As long = 5 - While d * d <= n - If n Mod d = 0 Then =False: exit function - d += 2 - If n Mod d = 0 Then = False: exit function - d += 4 - End While - =True - End Function -} -Factors_of_a_Mersenne_number diff --git a/Task/Factors-of-a-Mersenne-number/PARI-GP/factors-of-a-mersenne-number.parigp b/Task/Factors-of-a-Mersenne-number/PARI-GP/factors-of-a-mersenne-number-1.parigp similarity index 100% rename from Task/Factors-of-a-Mersenne-number/PARI-GP/factors-of-a-mersenne-number.parigp rename to Task/Factors-of-a-Mersenne-number/PARI-GP/factors-of-a-mersenne-number-1.parigp diff --git a/Task/Factors-of-a-Mersenne-number/PARI-GP/factors-of-a-mersenne-number-2.parigp b/Task/Factors-of-a-Mersenne-number/PARI-GP/factors-of-a-mersenne-number-2.parigp new file mode 100644 index 0000000000..a43166ed17 --- /dev/null +++ b/Task/Factors-of-a-Mersenne-number/PARI-GP/factors-of-a-mersenne-number-2.parigp @@ -0,0 +1,20 @@ +TM(p) = local(status=1, i=1, len=0, S=0);{ +printp("Test TM \t..."); +S=2*p+1; +len = length(binary(p)); +B = Vecsmall(binary(p)); +q = B[i]*B[i]; +while( i<=len & status ==1, + if( B[i] != 0, + q = q*2; + ); + r = q%S; + q = r*r; + if( i == len & r == 1, + status = 0; + printp("Not Prime!"); + ); + i++; +); +return(status); +} diff --git a/Task/Factors-of-a-Mersenne-number/PascalABC.NET/factors-of-a-mersenne-number.pas b/Task/Factors-of-a-Mersenne-number/PascalABC.NET/factors-of-a-mersenne-number.pas deleted file mode 100644 index 32d45238dc..0000000000 --- a/Task/Factors-of-a-Mersenne-number/PascalABC.NET/factors-of-a-mersenne-number.pas +++ /dev/null @@ -1,36 +0,0 @@ -const - q = 929; - -function isPrime(a: integer): boolean; -begin - if a = 2 then - begin result := true; exit end; - if (a < 2) or (a mod 2 = 0) then - begin result := false; exit end; - for var i := 3 to sqrt(a).Floor step 2 do - if a mod i = 0 then - begin result := false; exit end; - result := true; -end; - -begin - if not isPrime(q) then exit; - var r := q; - while r > 0 do r := r shl 1; - var d := 2 * q + 1; - while true do - begin - var i := 1; - var p := r; - while p <> 0 do - begin - i := (i * i) mod d; - if p < 0 then i *= 2; - if i > d then i -= d; - p := p shl 1; - end; - if i <> 1 then d += 2 * q - else break - end; - write('2^', q, ' - 1 = 0 (mod ', d, ')'); -end. diff --git a/Task/Factors-of-a-Mersenne-number/Phix/factors-of-a-mersenne-number.phix b/Task/Factors-of-a-Mersenne-number/Phix/factors-of-a-mersenne-number.phix index 8185372101..641c6a8d2f 100644 --- a/Task/Factors-of-a-Mersenne-number/Phix/factors-of-a-mersenne-number.phix +++ b/Task/Factors-of-a-Mersenne-number/Phix/factors-of-a-mersenne-number.phix @@ -1,40 +1,39 @@ -with javascript_semantics -function modpow(atom x, n, m) - atom {i,y,z} = {n,1,x} - while i do - if odd(i) then - y = mod(y*z,m) - end if - z = mod(z*z,m) - i = floor(i/2) - end while - return y -end function +(phixonline)--> + with javascript_semantics + function modpow(atom x, atom n, atom m) + atom i = n, + y = 1, + z = x + while i do + if and_bits(i,1) then + y = mod(y*z,m) + end if + z = mod(z*z,m) + i = floor(i/2) + end while + return y + end function -function mersenne_factor(integer p) - if not is_prime(p) then return -1 end if - atom limit = sqrt(power(2,p))-1 - integer k = 1 - while 1 do - atom q = 2*p*k + 1 - if q>=limit then exit end if - if find(mod(q,8),{1,7}) - and is_prime(q,true) - and modpow(2,p,q)=1 then - return q - end if - k += 1 - end while - return 0 -end function + function mersenne_factor(integer p) + if not is_prime(p) then return -1 end if + atom limit = sqrt(power(2,p))-1 + integer k = 1 + while 1 do + atom q = 2*p*k + 1 + if q>=limit then exit end if + if find(mod(q,8),{1,7}) + and is_prime(q) + and modpow(2,p,q)=1 then + return q + end if + k += 1 + end while + return 0 + end function -constant tests = {2,3,4,5,7,11,13,17,19,23,29,31,37,41,43,47, - 53,59,67,71,73,79,83,929,937,941,953,967} -for t in tests do - integer r = mersenne_factor(t) - switch r - case 0: printf(1,"M%d is prime\n",{t}) - case -1: printf(1,"M%d is not prime\n",{t}) - else printf(1,"A factor of M%d is %d\n",{t,r}) - end switch -end for + sequence tests = {11, 23, 29, 37, 41, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 929, 937} + for i=1 to length(tests) do + integer ti = tests[i] + printf(1,"A factor of M%d is %d\n",{ti,mersenne_factor(ti)}) + end for + + function fairshare(integer n, base) + sequence res = repeat(0,n) + for i=1 to n do + integer j = i-1, + t = 0 + while j>0 do + t += remainder(j,base) + j = floor(j/base) + end while + res[i] = remainder(t,base) + end for + return {base,res} + end function -for t in {2,3,5,11} do - printf(1,"%2d : %v\n",fairshare(25,t)) -end for - -function turns(integer base) - sequence c = repeat(0,base) - for u in fairshare(50000,base)[2] do - c[u+1] += 1 - end for - if find(0,c) then return sprintf("only %d have a turn",sum(c)) end if - return join(unique(c)," or ",fmt:="%d") -end function - -printf(1,"\nHow many times does each get a turn in 50,000 iterations?\n") -for base in {191, 1377, 49999, 50000, 50001} do - printf(1," With %5d people: %s\n",{base,turns(base)}) -end for + constant tests = {2,3,5,11} + for i=1 to length(tests) do + printf(1,"%2d : %v\n", fairshare(25, tests[i])) + end for + + with javascript_semantics + -- demo\rosetta\Fermat.exw + include mpfr.e -procedure fermat(mpz res, integer n) - integer pn = power(2,n) - mpz_ui_pow_ui(res,2,pn) - mpz_add_si(res,res,1) -end procedure + procedure fermat(mpz res, integer n) + integer pn = power(2,n) + mpz_ui_pow_ui(res,2,pn) + mpz_add_si(res,res,1) + end procedure -mpz fn = mpz_init() -constant lim = iff(platform()=JS?18:29), -- (see note) - print_lim = iff(platform()=JS?16:20) -atom t -for i=0 to lim do - t = time() - fermat(fn,i) - string ts = elapsed(t,0.2," [%s]") - if i<=print_lim then - printf(1,"F%d = %s%s\n",{i,shorten(mpz_get_str(fn)),ts}) - else -- (since printing it takes too long...) - printf(1,"F%d has %,d digits%s\n",{i,mpz_sizeinbase(fn,10),ts}) - end if -end for + mpz fn = mpz_init() + constant lim = iff(platform()=JS?18:29), -- (see note) + print_lim = iff(platform()=JS?16:20) + for i=0 to lim do + fermat(fn,i) + if i<=print_lim then + printf(1,"F%d = %s\n",{i,shorten(mpz_get_str(fn))}) + else -- (since printing it takes too long...) + printf(1,"F%d has %,d digits\n",{i,mpz_sizeinbase(fn,10)}) + end if + end for -printf(1,"\n") -constant flimit = iff(platform()=JS?11:13) -for i=0 to flimit do - t = time() - fermat(fn,i) - sequence f = mpz_prime_factors(fn, 200000) - t = time()-t - string fs = "", - ts = elapsed(t,0.2," [%s]") - if length(f[$])=1 then -- (as per docs) - mpz_set_str(fn,f[$][1]) - if not mpz_prime(fn) then - if length(f)=1 then - fs = " (not prime)" - else - fs = " (last factor is not prime)" - end if - end if - f = deep_copy(f) - f[$][1] = shorten(f[$][1],ml:=15) - elsif length(f)=1 - and mpz_prime(fn) then - fs = " (prime)" - end if - fs = mpz_factorstring(f)&fs - printf(1,"Factors of F%d: %s%s\n",{i,fs,ts}) -end for + printf(1,"\n") + constant flimit = iff(platform()=JS?11:13) + for i=0 to flimit do + atom t = time() + fermat(fn,i) + sequence f = mpz_prime_factors(fn, 200000) + t = time()-t + string fs = "", + ts = elapsed(t) + if length(f[$])=1 then -- (as per docs) + mpz_set_str(fn,f[$][1]) + if not mpz_prime(fn) then + if length(f)=1 then + fs = " (not prime)" + else + fs = " (last factor is not prime)" + end if + end if + f = deep_copy(f) + f[$][1] = shorten(f[$][1]) + elsif length(f)=1 + and mpz_prime(fn) then + fs = " (prime)" + end if + fs = mpz_factorstring(f)&fs + printf(1,"Factors of F%d: %s [%s]\n",{i,fs,ts}) + end for + + with javascript_semantics + function nacci_noo(integer n, s, l) + if n<2 then return n+n*l end if + if n=2 then return 1 end if + atom res = nacci_noo(n-1,s,l) + for i=2 to min(s,n-1) do + res += nacci_noo(n-i,s,l) + end for + return res + end function -constant names = "lucas fibo tribo tetra penta hexa hepta octo nona deca" -sequence f = repeat(0,20) -for i,name in split(names) do - for j=1 to 20 do - f[j] = nacci_noo(j,i+(i=1),i=1) - end for - if name[$]!='s' then name&=`nacci` end if - printf(1,"%s: %s\n",{name,join(f,fmt:="%d")}) -end for + constant names = split("lucas fibo tribo tetra penta hexa hepta octo nona deca") + sequence f = repeat(0,10) + for i=1 to 4 do + for j=1 to 10 do + f[j] = nacci_noo(j,i+(i=1),i=1) + end for + printf(1,"%snacci: %v\n",{names[i],f}) + end for + + with javascript_semantics + constant extensions = lower({"zip","rar","7z","gz","archive","A##","tar.bz2"}) -global function get_known_extension(string filename) - for i,c in filename do - if c='.' then - string extension = lower(filename[i+1..$]) - if find(extension,extensions) then - return extension - end if - end if - end for - return "" -end function + global function get_known_extension(string filename) + for i=1 to length(filename) do + if filename[i]='.' then + string extension = lower(filename[i+1..$]) + if find(extension,extensions) then + return extension + end if + end if + end for + return "" + end function -constant tests = {"MyData.a##", - "MyData.tar.Gz", - "MyData.gzip", - "MyData.7z.backup", - "MyData...", - "MyData", - "MyData_v1.0.tar.bz2", - "MyData_v1.0.bz2"} + constant tests = {"MyData.a##", + "MyData.tar.Gz", + "MyData.gzip", + "MyData.7z.backup", + "MyData...", + "MyData", + "MyData_v1.0.tar.bz2", + "MyData_v1.0.bz2"} -for i,ti in tests do - string ext = get_known_extension(ti) - printf(1,"%-20s %-10s %t\n",{ti,ext,find(ext,extensions)!=0}) -end for + for i=1 to length(tests) do + string ti = tests[i], + ext = get_known_extension(ti) + printf(1,"%-20s %-10s %s\n",{ti,ext,{"true","false"}[2-(find(ext,extensions)!=0)]}) + end for + + with javascript_semantics + constant p0 = {0,0}, + p1 = {0,1}, + p2 = {3,1}, + triangle = {{3/2, 12/5}, {51/10, -31/10}, {-19/5, 1/2}} + function inside(sequence p) + return sort(convex_hull({p}&triangle))==sort(deep_copy(triangle)) + end function + printf(1,"Point %v is with triangle %v?:%t\n",{p0,triangle,inside(p0)}) + printf(1,"Point %v is with triangle %v?:%t\n",{p1,triangle,inside(p1)}) + printf(1,"Point %v is with triangle %v?:%t\n",{p2,triangle,inside(p2)}) + + with javascript_semantics + constant p0 = {0,0}, + p1 = {0,1}, + p2 = {3,1}, + triangle = {{3/2, 12/5}, {51/10, -31/10}, {-19/5, 1/2}} -function side(sequence p1, p2, p3) - -- which side of plane cut by line (p2, p3) is p1 on? - atom {x1, y1} = p1, - {x2, y2} = p2, - {x3, y3} = p3 - return (x1 - x3) * (y2 - y3) - (x2 - x3) * (y1 - y3) -end function + function side(sequence p1, p2, p3) + -- which side of plane cut by line (p2, p3) is p1 on? + atom {x1, y1} = p1, + {x2, y2} = p2, + {x3, y3} = p3 + return (x1 - x3) * (y2 - y3) - (x2 - x3) * (y1 - y3) + end function -function iswithin(sequence point, triangle) --- --- Determine if point is within triangle. --- If so, the point will be on the same side of each of the half planes --- defined by vectors p1p2, p2p3, and p3p1. side is positive if outside, --- negative if inside such a plane. All should be non-negative or all --- non-positive if the point is within the triangle. --- - sequence {pt1, pt2, pt3} = triangle - atom side12 = side(point, pt1, pt2), - side23 = side(point, pt2, pt3), - side31 = side(point, pt3, pt1) - bool all_non_neg = side12 >= 0 and side23 >= 0 and side31 >= 0, - all_non_pos = side12 <= 0 and side23 <= 0 and side31 <= 0 - return all_non_neg or all_non_pos -end function + function iswithin(sequence point, triangle) + -- + -- Determine if point is within triangle. + -- If so, the point will be on the same side of each of the half planes + -- defined by vectors p1p2, p2p3, and p3p1. side is positive if outside, + -- negative if inside such a plane. All should be non-negative or all + -- non-positive if the point is within the triangle. + -- + sequence {pt1, pt2, pt3} = triangle + atom side12 = side(point, pt1, pt2), + side23 = side(point, pt2, pt3), + side31 = side(point, pt3, pt1) + bool all_non_neg = side12 >= 0 and side23 >= 0 and side31 >= 0, + all_non_pos = side12 <= 0 and side23 <= 0 and side31 <= 0 + return all_non_neg or all_non_pos + end function -printf(1,"point %v is with triangle %v?:%t\n",{p0,triangle,iswithin(p0,triangle)}) -printf(1,"point %v is with triangle %v?:%t\n",{p1,triangle,iswithin(p1,triangle)}) -printf(1,"point %v is with triangle %v?:%t\n",{p2,triangle,iswithin(p2,triangle)}) + printf(1,"point %v is with triangle %v?:%t\n",{p0,triangle,iswithin(p0,triangle)}) + printf(1,"point %v is with triangle %v?:%t\n",{p1,triangle,iswithin(p1,triangle)}) + printf(1,"point %v is with triangle %v?:%t\n",{p2,triangle,iswithin(p2,triangle)}) + + atom t1 = time()+1 -integer depth = 0 + integer depth = 0 -procedure recurse() - if time()>t1 then - ?depth - t1 = time()+1 - end if - depth += 1 - -- only 1 of these will ever get called, of course... - recurse() - recurse() - recurse() -end procedure + procedure recurse() + if time()>t1 then + ?depth + t1 = time()+1 + end if + depth += 1 + -- only 1 of these will ever get called, of course... + recurse() + recurse() + recurse() + end procedure -recurse() + recurse() + + atom t1 = time()+1 -integer depth = 0, depth_blown = false, - limit = iff(platform()=JS?8e3:2e7) -string btd = "building" + integer depth = 0, depth_blown = false + string btd = "building" -procedure recurse() - if time()>t1 or depth>limit then - printf(1,"depth: %d (%s)\n",{depth,btd}) - if depth>limit then - depth_blown = true - btd = "tearing down" - end if - t1 = time()+1 - end if - if depth_blown then - depth -= 1 - else - depth += 1 - recurse() -- (build, aka +1 with progress) - recurse() -- (tear down, -1 with progress) - end if -end procedure + procedure recurse() + if time()>t1 then + printf(1,"depth: %d (%s)\n",{depth,btd}) + if depth>20_000_000 then + depth_blown = true + btd = "tearing down" + end if + t1 = time()+1 + end if + if depth_blown then + depth -= 1 + else + depth += 1 + recurse() -- (build, aka +1 with progress) + recurse() -- (tear down, -1 with progress) + end if + end procedure -recurse() + recurse() + + include timedate.e + + constant SUNDAY=7 + + procedure showlast(integer dow, integer doy, timedate td) + td = adjust_timedate(td,timedelta(days:=doy-1)) + integer {year,month,day} = td + while day_of_week(year,month,day)!=dow do day-=1 end while + printf(1,"%4d-%02d-%02d\n",{year,month,day}) + end procedure + + procedure last_day_of_month(integer year, integer dow) + integer doy + timedate first = {year,1,1,0,0,0,0,0} + -- start by finding the 1st of the next month, less 1 + for i=1 to 11 do + doy = day_of_year(year,i+1,1)-1 + showlast(dow,doy,first) + end for + -- do December separately, as 1st would be next year + doy = day_of_year(year,12,31) + showlast(dow,doy,first) + end procedure + last_day_of_month(2013,SUNDAY) + + with javascript_semantics + sequence mtable = {} -function multiplier(atom n1, atom n2) - mtable = append(mtable,{n1,n2}) - return length(mtable) -end function + function multiplier(atom n1, atom n2) + mtable = append(mtable,{n1,n2}) + return length(mtable) + end function -function call_multiplier(integer f, atom m) - atom {n1,n2} = mtable[f] - return n1*n2*m -end function + function call_multiplier(integer f, atom m) + atom {n1,n2} = mtable[f] + return n1*n2*m + end function -constant x = 2, - xi = 0.5, - y = 4, - yi = 0.25, - z = x + y, - zi = 1 / ( x + y ) + constant x = 2, + xi = 0.5, + y = 4, + yi = 0.25, + z = x + y, + zi = 1 / ( x + y ) -?call_multiplier(multiplier(x,xi),0.5) -?call_multiplier(multiplier(y,yi),0.5) -?call_multiplier(multiplier(z,zi),0.5) + ?call_multiplier(multiplier(x,xi),0.5) + ?call_multiplier(multiplier(y,yi),0.5) + ?call_multiplier(multiplier(z,zi),0.5) + + with javascript_semantics + sequence ctable = {} -function compose(integer f, g) - ctable = append(ctable,{f,g}) - integer cdx = length(ctable) - return cdx -end function + function compose(integer f, g) + ctable = append(ctable,{f,g}) + integer cdx = length(ctable) + return cdx + end function -function call_composite(integer cdx, atom x) - integer {f,g} = ctable[cdx] - return f(g(x)) -end function + function call_composite(integer cdx, atom x) + integer {f,g} = ctable[cdx] + return f(g(x)) + end function -function plus1(atom x) - return x+1 -end function + function plus1(atom x) + return x+1 + end function -function halve(atom x) - return x/2 -end function + function halve(atom x) + return x/2 + end function -constant m = compose(halve,plus1) + constant m = compose(halve,plus1) -?call_composite(m,1) -- displays 1 -?call_composite(m,4) -- displays 2.5 + ?call_composite(m,1) -- displays 1 + ?call_composite(m,4) -- displays 2.5 + n/d ) - [ 1 2 ] is xi ( --> n/d ) - [ 4 1 ] is y ( --> n/d ) - [ 1 4 ] is yi ( --> n/d ) - [ x y v+ ] is z ( n/d n/d --> n/d ) - [ x y v+ 1/v ] is zi ( n/d n/d --> n/d ) - - [ ' [ v* v* ] join join ] is multiplier ( x n/d --> [ ) - -' xi ' [ 1 2 ] multiplier dup echo x rot do say " applied to x gives: " vulgar$ echo$ cr -' yi ' [ 1 2 ] multiplier dup echo y rot do say " applied to y gives: " vulgar$ echo$ cr -' zi ' [ 1 2 ] multiplier dup echo z rot do say " applied to z gives: " vulgar$ echo$ cr diff --git a/Task/First-class-functions-Use-numbers-analogously/Rebol/first-class-functions-use-numbers-analogously.rebol b/Task/First-class-functions-Use-numbers-analogously/Rebol/first-class-functions-use-numbers-analogously.rebol deleted file mode 100644 index 717692aabd..0000000000 --- a/Task/First-class-functions-Use-numbers-analogously/Rebol/first-class-functions-use-numbers-analogously.rebol +++ /dev/null @@ -1,30 +0,0 @@ -Rebol [ - title: "Rosetta code: First-class functions/Use numbers analogously" - file: %First-class_functions-Use_numbers_analogously.r3 - url: https://rosettacode.org/wiki/First-class_functions/Use_numbers_analogously -] - -;; Numeric values and their inverses -x: 2.0 xi: 0.5 -y: 4.0 yi: 0.25 -z: x + y zi: 1 / (x + y) - -;; Returns a function that multiplies its argument a by n and m, -;; printing the expression before returning the result. -;; closure (vs func) ensures n and m are captured by value in the returned func. -multiplier: closure [n m] [ - func [a] [ - prin [a "*" n "*" m "= "] - a * n * m - ] -] -;; Parallel lists: each number paired with its inverse by position -num-list: reduce [x y z] ; [2.0 4.0 6.0] -num-list-inv: reduce [xi yi zi] ; [0.5 0.25 0.1666...] - -repeat key length? num-list [ - n: num-list/:key - ni: num-list-inv/:key - fun: multiplier ni n ;; build closure: a * ni * n = a * 1.0 (always) - print as-green fun 0.5 ;; call closure with 0.5; result should always be 0.5 -] diff --git a/Task/First-class-functions-Use-numbers-analogously/Rust/first-class-functions-use-numbers-analogously.rs b/Task/First-class-functions-Use-numbers-analogously/Rust/first-class-functions-use-numbers-analogously.rust similarity index 100% rename from Task/First-class-functions-Use-numbers-analogously/Rust/first-class-functions-use-numbers-analogously.rs rename to Task/First-class-functions-Use-numbers-analogously/Rust/first-class-functions-use-numbers-analogously.rust diff --git a/Task/First-class-functions-Use-numbers-analogously/Scheme/first-class-functions-use-numbers-analogously.scm b/Task/First-class-functions-Use-numbers-analogously/Scheme/first-class-functions-use-numbers-analogously.ss similarity index 100% rename from Task/First-class-functions-Use-numbers-analogously/Scheme/first-class-functions-use-numbers-analogously.scm rename to Task/First-class-functions-Use-numbers-analogously/Scheme/first-class-functions-use-numbers-analogously.ss diff --git a/Task/First-class-functions/Ada/first-class-functions.adb b/Task/First-class-functions/Ada/first-class-functions.ada similarity index 100% rename from Task/First-class-functions/Ada/first-class-functions.adb rename to Task/First-class-functions/Ada/first-class-functions.ada diff --git a/Task/First-class-functions/Crystal/first-class-functions-1.cr b/Task/First-class-functions/Crystal/first-class-functions-1.cr deleted file mode 100644 index 7d6593bb69..0000000000 --- a/Task/First-class-functions/Crystal/first-class-functions-1.cr +++ /dev/null @@ -1 +0,0 @@ -->Math.sin(Float64) diff --git a/Task/First-class-functions/Crystal/first-class-functions-2.cr b/Task/First-class-functions/Crystal/first-class-functions-2.cr deleted file mode 100644 index 3b82e7a930..0000000000 --- a/Task/First-class-functions/Crystal/first-class-functions-2.cr +++ /dev/null @@ -1 +0,0 @@ -->(n : Float64) { Math.sin(n) } diff --git a/Task/First-class-functions/Crystal/first-class-functions-3.cr b/Task/First-class-functions/Crystal/first-class-functions-3.cr deleted file mode 100644 index 8d6dfeceb0..0000000000 --- a/Task/First-class-functions/Crystal/first-class-functions-3.cr +++ /dev/null @@ -1,20 +0,0 @@ -def cube (n) - n*n*n -end - -add1 = ->(n : Float64) { n + 1 } -sub1 = ->(n : Float64) { n - 1 } - -a = [ ->Math.sin(Float64), ->Math.cos(Float64), ->cube(Float64), add1 ] -b = [ ->Math.asin(Float64), ->Math.acos(Float64), ->Math.cbrt(Float64), sub1 ] -s = [ "sin o asin", "cos o acos", "cube o cbrt", "add1 o sub1"] - -def compose (f, g) - ->(n : Float64) { f[ g[n] ] } -end - -composed = a.zip(b).map {|(f, g)| compose(f, g) } - -composed.each_with_index do |f, i| - puts "(#{s[i]})(0.5) = #{ f[0.5] }" -end diff --git a/Task/First-class-functions/Delphi/first-class-functions.pas b/Task/First-class-functions/Delphi/first-class-functions.delphi similarity index 100% rename from Task/First-class-functions/Delphi/first-class-functions.pas rename to Task/First-class-functions/Delphi/first-class-functions.delphi diff --git a/Task/First-class-functions/Elena/first-class-functions.elena b/Task/First-class-functions/Elena/first-class-functions.elena index 67f287ebe2..baa145697e 100644 --- a/Task/First-class-functions/Elena/first-class-functions.elena +++ b/Task/First-class-functions/Elena/first-class-functions.elena @@ -9,11 +9,11 @@ extension op = f(g(self)); } -public Program() +public program() { var fs := new object[]{ mssgconst sin[1], mssgconst cos[1], (x => power(x, 3.0r)) }; var gs := new object[]{ mssgconst arcsin[1], mssgconst arccos[1], (x => power(x, 1.0r / 3)) }; fs.zipBy(gs, (f,g => 0.5r.compose(f,g))) - .forEach(PrintingLn) + .forEach(printingLn) } diff --git a/Task/First-class-functions/Elixir/first-class-functions.ex b/Task/First-class-functions/Elixir/first-class-functions.elixir similarity index 100% rename from Task/First-class-functions/Elixir/first-class-functions.ex rename to Task/First-class-functions/Elixir/first-class-functions.elixir diff --git a/Task/First-class-functions/Julia/first-class-functions.jl b/Task/First-class-functions/Julia/first-class-functions.julia similarity index 100% rename from Task/First-class-functions/Julia/first-class-functions.jl rename to Task/First-class-functions/Julia/first-class-functions.julia diff --git a/Task/First-class-functions/Kotlin/first-class-functions.kts b/Task/First-class-functions/Kotlin/first-class-functions.kotlin similarity index 100% rename from Task/First-class-functions/Kotlin/first-class-functions.kts rename to Task/First-class-functions/Kotlin/first-class-functions.kotlin diff --git a/Task/First-class-functions/Maxima/first-class-functions.maxima b/Task/First-class-functions/Maxima/first-class-functions.maxima index 5b2d1ff458..0f3b0ee18b 100644 --- a/Task/First-class-functions/Maxima/first-class-functions.maxima +++ b/Task/First-class-functions/Maxima/first-class-functions.maxima @@ -2,3 +2,4 @@ a: [sin, cos, lambda([x], x^3)]$ b: [asin, acos, lambda([x], x^(1/3))]$ compose(f, g) := buildq([f, g], lambda([x], f(g(x))))$ map(lambda([fun], fun(x)), map(compose, a, b)); +[x, x, x] diff --git a/Task/First-class-functions/OCaml/first-class-functions.ml b/Task/First-class-functions/OCaml/first-class-functions.ocaml similarity index 100% rename from Task/First-class-functions/OCaml/first-class-functions.ml rename to Task/First-class-functions/OCaml/first-class-functions.ocaml diff --git a/Task/First-class-functions/PascalABC.NET/first-class-functions.pas b/Task/First-class-functions/PascalABC.NET/first-class-functions.pas deleted file mode 100644 index 091decbbb2..0000000000 --- a/Task/First-class-functions/PascalABC.NET/first-class-functions.pas +++ /dev/null @@ -1,15 +0,0 @@ -function Cube(x: real) := x**3; -function CubeRoot(x: real) := x**(1/3); - -function Composition(f1,f2: T -> T): T -> T := x -> f1(f2(x)); - -begin - var A := Arr(Sin,Cos,Cube); - var B := Arr(ArcSin,ArcCos,CubeRoot); - for var i:=0 to A.Length-1 do - Println(Composition(A[i],B[i])(0.5)); - - // Build-in composition f1 * f2 - foreach var (f1,f2) in A.Zip(B) do - Println((f1 * f2)(0.5)); -end. diff --git a/Task/First-class-functions/Phix/first-class-functions.phix b/Task/First-class-functions/Phix/first-class-functions.phix index b422dc259e..6fe2a63ae3 100644 --- a/Task/First-class-functions/Phix/first-class-functions.phix +++ b/Task/First-class-functions/Phix/first-class-functions.phix @@ -1,25 +1,27 @@ -sequence ctable = {} +(phixonline)--> + sequence ctable = {} -function compose(integer f, g) - ctable = append(ctable,{f,g}) - integer cdx = length(ctable) - return cdx -end function + function compose(integer f, g) + ctable = append(ctable,{f,g}) + integer cdx = length(ctable) + return cdx + end function -function call_composite(integer cdx, atom x) - integer {f,g} = ctable[cdx] - return f(g(x)) -end function + function call_composite(integer cdx, atom x) + integer {f,g} = ctable[cdx] + return f(g(x)) + end function -function plus1(atom x) - return x+1 -end function + function plus1(atom x) + return x+1 + end function -function halve(atom x) - return x/2 -end function + function halve(atom x) + return x/2 + end function -constant m = compose(halve,plus1) + constant m = compose(halve,plus1) -?call_composite(m,1) -- displays 1 -?call_composite(m,4) -- displays 2.5 + ?call_composite(m,1) -- displays 1 + ?call_composite(m,4) -- displays 2.5 + + with javascript_semantics + function p(integer L, n) + atom logof2 = log10(2) + integer places = trunc(log10(L)), + nfound = 0, i = 1 + while true do + atom a = i * logof2, + b = trunc(power(10,a-trunc(a)+places)) + if L == b then + nfound += 1 + if nfound == n then exit end if + end if + i += 1 + end while + return i + end function -constant tests = {{12, 1}, {12, 2}, {123, 45}, {123, 12345}, {123, 678910}} -include ordinal.e -include mpfr.e -mpz z = mpz_init() -atom t0 = time() -for i=1 to length(tests)-(2*(platform()=JS)) do - integer {L,n} = tests[i], pln = p(L,n) - mpz_ui_pow_ui(z,2,pln) - integer digits = mpz_sizeinbase(z,10) - string st = iff(digits>2e6?sprintf("%,d digits",digits): - shorten(mpz_get_str(z),"digits",5)) - printf(1,"The %d%s power of 2 that starts with %d is %d [i.e. %s]\n",{n,ord(n),L,pln,st}) -end for -?elapsed(time()-t0) + constant tests = {{12, 1}, {12, 2}, {123, 45}, {123, 12345}, {123, 678910}} + include ordinal.e + include mpfr.e + mpz z = mpz_init() + atom t0 = time() + for i=1 to length(tests)-(2*(platform()=JS)) do + integer {L,n} = tests[i], pln = p(L,n) + mpz_ui_pow_ui(z,2,pln) + integer digits = mpz_sizeinbase(z,10) + string st = iff(digits>2e6?sprintf("%,d digits",digits): + shorten(mpz_get_str(z),"digits",5)) + printf(1,"The %d%s power of 2 that starts with %d is %d [i.e. %s]\n",{n,ord(n),L,pln,st}) + end for + ?elapsed(time()-t0) + + with javascript_semantics + sequence m31 = {"January",0,"March",0,"May",0,"July","August",0,"October",0,"December"} + integer y,m, + nmonths = 0 + string months + sequence res = {}, + none = {} -for y=1900 to 2100 do - months = "" - for m=1 to 12 do - if string(m31[m]) - and day_of_week(y,m,1,true)="Friday" then - if length(months)!=0 then months &= ", " end if - months &= m31[m] - nmonths += 1 - end if - end for - if length(months)=0 then - none = append(none,y) - else - res = append(res,sprintf("%d : %s\n",{y,months})) - end if -end for + for y=1900 to 2100 do + months = "" + for m=1 to 12 do + if string(m31[m]) + and day_of_week(y,m,1,true)="Friday" then + if length(months)!=0 then months &= ", " end if + months &= m31[m] + nmonths += 1 + end if + end for + if length(months)=0 then + none = append(none,y) + else + res = append(res,sprintf("%d : %s\n",{y,months})) + end if + end for -printf(1,"Found %d months with five full weekends\n",nmonths) -res[6..-6] = {" ...\n"} -puts(1,join(res,"")) -printf(1,"Found %d years with no month having 5 weekends:\n",{length(none)}) -none[6..-6] = {".."} -?none + printf(1,"Found %d months with five full weekends\n",nmonths) + res[6..-6] = {" ...\n"} + puts(1,join(res,"")) + printf(1,"Found %d years with no month having 5 weekends:\n",{length(none)}) + none[6..-6] = {".."} + ?none + - ?flatten({{1},2,{{3,4},5},{{{}}},{{{6}}},7,8,{}}) - [ ) - - [ [] swap witheach [ not join ] ] is invert ( [ --> [ ) - - [ 2dup peek invert unrot poke ] is fliprow ( [ n --> [ ) - - [ dip transpose fliprow transpose ] is flipcolumn ( [ n --> [ ) - - [ dup - [ dup size dup * times - [ dup size random - 2 random iff - fliprow - else flipcolumn ] - 2dup != until ] - nip ] is mix ( [ --> [ ) - - [ say " " - dup size times - [ sp i^ char a + emit ] - witheach - [ cr sp i^ echo say ":" - witheach - [ sp echo ] ] ] is display ( [ --> ) - - [ cr $ "a..., or 0...: " - input $ "." join - trim 0 peek lower - 2dup char a rot over + - within iff - [ nip char a - - ' flipcolumn ] - done - 2dup char 0 rot over + - within iff - [ nip char 0 - - ' fliprow ] - done - drop again ] is getmove ( n --> n x ) - - [ 0 temp put - makeboard - dup mix - [ say "Moves: " - temp share echo cr - 1 temp tally - 2dup swap - say "Target" cr - display cr cr - say "Current" cr - display cr - dup size getmove do cr - 2dup = until ] - 2drop - temp take - say "Moves taken: " echo ] is flipbits ( n --> ) diff --git a/Task/Flipping-bits-game/R/flipping-bits-game.r b/Task/Flipping-bits-game/R/flipping-bits-game.r deleted file mode 100644 index bedaae8f59..0000000000 --- a/Task/Flipping-bits-game/R/flipping-bits-game.r +++ /dev/null @@ -1,59 +0,0 @@ -gen_board <- function(n) matrix(data=sample(c(0,1), n^2, replace=TRUE), - nrow=n, - ncol=n, - dimnames=list(1:n, letters[1:n])) - -fliprow <- function(mat, n){ - mat[n,] <- !mat[n,] - return(mat) -} - -flipcol <- function(mat, n){ - mat[,n] <- !mat[,n] - return(mat) -} - -bits_game <- function(){ - n <- as.numeric(readline(prompt="Input board size: ")) - board_final <- gen_board(n) - repeat{ - #Generate a list of between 10 and 15 random moves - num_moves <- sample(10:15, 1) - flip_args <- sample(1:n, num_moves, replace=TRUE) - flip_fns <- sample(list(fliprow, flipcol), num_moves, replace=TRUE) - gen_move <- function(k){ - function(mat) flip_fns[[k]](mat, flip_args[k]) - } - rand_moves <- sapply(1:num_moves, gen_move) - #Now apply them to the final board to generate the initial position - board_initial <- Reduce(function(x, f) f(x), rand_moves, init=board_final) - #Make sure initial and final positions aren't the same - if(!identical(board_initial, board_final)) break - } - #Time to start the game! - cat("\nYour starting position is:\n") - print(board_initial) - cat("\nYour target position is:\n") - print(board_final) - turns <- 1 - while(!identical(board_initial,board_final)){ - cat("\nTurn ", turns, ":\n", sep="") - move <- readline(prompt="Enter a row or column name to flip it: ") - if(move %in% 1:n){ - board_initial <- fliprow(board_initial, move) - cat("\nThe position is now:\n") - print(board_initial) - turns <- turns+1 - } - else if(move %in% letters[1:n]){ - board_initial <- flipcol(board_initial, which(letters==move)) - cat("\nThe position is now:\n") - print(board_initial) - turns <- turns+1 - } - else cat("\nThat's not a valid move. Try again!\n") - } - cat("\nWell done! You finished in", turns-1, "move(s).\n") -} - -bits_game() diff --git a/Task/Flipping-bits-game/Rust/flipping-bits-game.rs b/Task/Flipping-bits-game/Rust/flipping-bits-game.rust similarity index 100% rename from Task/Flipping-bits-game/Rust/flipping-bits-game.rs rename to Task/Flipping-bits-game/Rust/flipping-bits-game.rust diff --git a/Task/Flipping-bits-game/Uiua/flipping-bits-game.uiua b/Task/Flipping-bits-game/Uiua/flipping-bits-game.uiua deleted file mode 100644 index 4b550f5dcb..0000000000 --- a/Task/Flipping-bits-game/Uiua/flipping-bits-game.uiua +++ /dev/null @@ -1,18 +0,0 @@ -# Could use `path`, but this is easily solved without it. -# ⊢path(⊂⊃(≡Fr|≡Fc)⇡Size¤|=0Dist|÷Size Dist) Shuffle T - -Size ← 8 -T ← ↯Size_Size 0 # Simple target setup. -Fr ← ⍜⊡¬⊙ # Flip a row. -Fc ← ⍜⊙⍉Fr # Flip a col. -Shuffle ← ⍥(⨬(Fr|Fc)<0.5⚂ ⌊×⚂Size)××2.Size # Apply random changes. -Dist ← /+/+⌵-T # Number of wrong cells. -⟜[∘]Shuffle T # Shuffle and start a copy for the output. -◌⍢( - ⊂⊃(≡Fr|≡Fc)⇡Size¤ # All neighbours. - ⊚=/↧.≡Dist. # Find min dist, get indices that give that. - ⊡⊢ # Pick first one. - ⊙⊂. # Save a copy of the new state. -| ≠0Dist # Repeat until found target. -) -⟜($"_ steps."⧻)⇌ diff --git a/Task/Flipping-bits-game/V-(Vlang)/flipping-bits-game.v b/Task/Flipping-bits-game/V-(Vlang)/flipping-bits-game.v deleted file mode 100644 index 5f31955f5d..0000000000 --- a/Task/Flipping-bits-game/V-(Vlang)/flipping-bits-game.v +++ /dev/null @@ -1,110 +0,0 @@ -import rand -import os - -const size = 3 - -struct Board { - mut: - target [][]int - board [][]int -} - -fn new_board() Board { - mut brd := Board{ - target: [][]int{len: size, init: []int{len: size}}, - board: [][]int{len: size, init: []int{len: size}}, - } - for ial in 0 .. size { - for jal in 0 .. size { - brd.target[ial][jal] = rand.intn(2) or {panic("No Random!")} - } - } - return brd -} - -fn (mut brd Board) flip_row(rir int) { - for cal in 0 .. size { - brd.board[rir][cal] = if brd.board[rir][cal] == 0 { 1 } else { 0 } - } -} - -fn (mut brd Board) flip_col(cir int) { - for ral in 0 .. size { - brd.board[ral][cir] = if brd.board[ral][cir] == 0 { 1 } else { 0 } - } -} - -fn (mut brd Board) init_board() { - for ial in 0 .. size { - for jal in 0 .. size { - brd.board[ial][jal] = brd.target[ial][jal] - } - } - for _ in 0 .. 9 { - rc := rand.intn(2) or {panic("No Random!")} - if rc == 0 { brd.flip_row(rand.intn(size) or {panic("No Random!")}) } - else { brd.flip_col(rand.intn(size) or {panic("No Random!")}) } - } -} - -fn print_board(label string, a [][]int) { - println("$label:") - println(" | a b c") - println("---------") - for ral in 0 .. size { - print("${ral + 1} |") - for cal in 0 .. size { - print(" ${a[ral][cal]}") - } - println("") - } - println("") -} - -fn (brd Board) game_over() bool { - for ral in 0 .. size { - for cal in 0 .. size { - if brd.board[ral][cal] != brd.target[ral][cal] { return false } - } - } - return true -} - -fn main() { - mut brd := new_board() - mut flips, mut nir := 0, -1 - mut is_row := true - // initialize board and ensure it differs from target - for { - brd.init_board() - if !brd.game_over() { break } - } - print_board("TARGET", brd.target) - print_board("OPENING BOARD", brd.board) - for { - is_row = true - nir = -1 - for nir == -1 { - input := os.input("Enter row number or column letter to be flipped: ").str() - if input.len == 0 { continue } - ch := input[0].ascii_str().to_lower() - if ch !in ["1", "2", "3", "a", "brd", "c"] { - println("Must be 1, 2, 3, a, brd or c") - continue - } - if ch in ["1", "2", "3"] { nir = int(ch[0]) - int(`1`) } - else { - is_row = false - nir = int(ch[0]) - int(`a`) - } - } - flips++ - if is_row { brd.flip_row(nir) } - else { brd.flip_col(nir) } - plural := if flips == 1 { "" } else { "S" } - print_board("\nBOARD AFTER $flips FLIP$plural", brd.board) - if brd.game_over() { break } - } - plural := if flips == 1 { "" } else { "s" } - println("You\'ve succeeded in $flips flip$plural") -} diff --git a/Task/Flow-control-structures/Ada/flow-control-structures-1.adb b/Task/Flow-control-structures/Ada/flow-control-structures-1.ada similarity index 100% rename from Task/Flow-control-structures/Ada/flow-control-structures-1.adb rename to Task/Flow-control-structures/Ada/flow-control-structures-1.ada diff --git a/Task/Flow-control-structures/Ada/flow-control-structures-2.ada b/Task/Flow-control-structures/Ada/flow-control-structures-2.ada new file mode 100644 index 0000000000..158400ca3d --- /dev/null +++ b/Task/Flow-control-structures/Ada/flow-control-structures-2.ada @@ -0,0 +1,8 @@ +Outer: +loop + -- do something + loop + -- do something else + exit Outer; -- exits both the inner and outer loops + end loop; +end loop Outer; diff --git a/Task/Flow-control-structures/Ada/flow-control-structures-2.adb b/Task/Flow-control-structures/Ada/flow-control-structures-2.adb deleted file mode 100644 index b793ba8f93..0000000000 --- a/Task/Flow-control-structures/Ada/flow-control-structures-2.adb +++ /dev/null @@ -1,10 +0,0 @@ -Outer: -loop - -- do something - loop - if Finished then - exit Outer; -- exits both the inner and outer loops - end if; - -- do something else - end loop; -end loop Outer; diff --git a/Task/Flow-control-structures/Ada/flow-control-structures-5.adb b/Task/Flow-control-structures/Ada/flow-control-structures-3.ada similarity index 100% rename from Task/Flow-control-structures/Ada/flow-control-structures-5.adb rename to Task/Flow-control-structures/Ada/flow-control-structures-3.ada diff --git a/Task/Flow-control-structures/Ada/flow-control-structures-3.adb b/Task/Flow-control-structures/Ada/flow-control-structures-3.adb deleted file mode 100644 index ed66f3714c..0000000000 --- a/Task/Flow-control-structures/Ada/flow-control-structures-3.adb +++ /dev/null @@ -1,8 +0,0 @@ -Outer: -loop - -- do something - loop - exit Outer when Finished; - -- do something else - end loop; -end loop Outer; diff --git a/Task/Flow-control-structures/Ada/flow-control-structures-4.adb b/Task/Flow-control-structures/Ada/flow-control-structures-4.adb deleted file mode 100644 index ef06de0b59..0000000000 --- a/Task/Flow-control-structures/Ada/flow-control-structures-4.adb +++ /dev/null @@ -1,8 +0,0 @@ -procedure Foo is -begin - -- do something - if Nothing_More_To_Do then - return; - end if; - -- do more -end Foo; diff --git a/Task/Flow-control-structures/COBOL/flow-control-structures-1.cob b/Task/Flow-control-structures/COBOL/flow-control-structures-1.cobol similarity index 100% rename from Task/Flow-control-structures/COBOL/flow-control-structures-1.cob rename to Task/Flow-control-structures/COBOL/flow-control-structures-1.cobol diff --git a/Task/Flow-control-structures/COBOL/flow-control-structures-2.cob b/Task/Flow-control-structures/COBOL/flow-control-structures-2.cobol similarity index 100% rename from Task/Flow-control-structures/COBOL/flow-control-structures-2.cob rename to Task/Flow-control-structures/COBOL/flow-control-structures-2.cobol diff --git a/Task/Flow-control-structures/COBOL/flow-control-structures-3.cob b/Task/Flow-control-structures/COBOL/flow-control-structures-3.cobol similarity index 100% rename from Task/Flow-control-structures/COBOL/flow-control-structures-3.cob rename to Task/Flow-control-structures/COBOL/flow-control-structures-3.cobol diff --git a/Task/Flow-control-structures/COBOL/flow-control-structures-4.cob b/Task/Flow-control-structures/COBOL/flow-control-structures-4.cobol similarity index 100% rename from Task/Flow-control-structures/COBOL/flow-control-structures-4.cob rename to Task/Flow-control-structures/COBOL/flow-control-structures-4.cobol diff --git a/Task/Flow-control-structures/COBOL/flow-control-structures-5.cob b/Task/Flow-control-structures/COBOL/flow-control-structures-5.cobol similarity index 100% rename from Task/Flow-control-structures/COBOL/flow-control-structures-5.cob rename to Task/Flow-control-structures/COBOL/flow-control-structures-5.cobol diff --git a/Task/Flow-control-structures/FutureBasic/flow-control-structures.basic b/Task/Flow-control-structures/FutureBasic/flow-control-structures.basic deleted file mode 100644 index e1bdbc5e11..0000000000 --- a/Task/Flow-control-structures/FutureBasic/flow-control-structures.basic +++ /dev/null @@ -1,21 +0,0 @@ -override _allowSubroutines = _true -#build Optimization _buildOptimizationNone - -print "First line." -gosub "sub1" -print "Fifth line." - -HandleEvents - -"sub1" -print "Second line." -gosub "sub2" -print "Fourth line." -goto "skip" -print "we don't get here" -"skip" -return - -"sub2" -print "Third line." -return diff --git a/Task/Flow-control-structures/Julia/flow-control-structures.jl b/Task/Flow-control-structures/Julia/flow-control-structures.julia similarity index 100% rename from Task/Flow-control-structures/Julia/flow-control-structures.jl rename to Task/Flow-control-structures/Julia/flow-control-structures.julia diff --git a/Task/Flow-control-structures/Kotlin/flow-control-structures.kts b/Task/Flow-control-structures/Kotlin/flow-control-structures.kotlin similarity index 100% rename from Task/Flow-control-structures/Kotlin/flow-control-structures.kts rename to Task/Flow-control-structures/Kotlin/flow-control-structures.kotlin diff --git a/Task/Flow-control-structures/OCaml/flow-control-structures.ml b/Task/Flow-control-structures/OCaml/flow-control-structures.ocaml similarity index 100% rename from Task/Flow-control-structures/OCaml/flow-control-structures.ml rename to Task/Flow-control-structures/OCaml/flow-control-structures.ocaml diff --git a/Task/Flow-control-structures/Rebol/flow-control-structures.rebol b/Task/Flow-control-structures/REBOL/flow-control-structures.rebol similarity index 99% rename from Task/Flow-control-structures/Rebol/flow-control-structures.rebol rename to Task/Flow-control-structures/REBOL/flow-control-structures.rebol index 2530b2f609..27a2bbcf83 100644 --- a/Task/Flow-control-structures/Rebol/flow-control-structures.rebol +++ b/Task/Flow-control-structures/REBOL/flow-control-structures.rebol @@ -1,4 +1,4 @@ -Rebol [ +REBOL [ Title: "Flow Control" URL: http://rosettacode.org/wiki/Flow_Control_Structures ] diff --git a/Task/Flow-control-structures/Uxntal/flow-control-structures.uxnatl b/Task/Flow-control-structures/Uxntal/flow-control-structures.uxnatl deleted file mode 100644 index 7b135f37f9..0000000000 --- a/Task/Flow-control-structures/Uxntal/flow-control-structures.uxnatl +++ /dev/null @@ -1,24 +0,0 @@ -|18 @Console/write - -|100 - -example - -BRK - -@example ( x y -- ) - ;start print/str - !&world ( goto &world ) - ;never print/str - &world ( label &world ) - ;end !print/str - -@print/str ( str* -- ) - LDAk .Console/write DEO - INC2 LDAk ?&str - POP2 - JMP2r - -@start "Hello, 2000 -@never "Never 20 "printed. 0a00 -@end "World! 0a00 diff --git a/Task/Floyd-Warshall-algorithm/ALGOL-68/floyd-warshall-algorithm.alg b/Task/Floyd-Warshall-algorithm/ALGOL-68/floyd-warshall-algorithm.alg index 68ed0e7149..1b23cfac2f 100644 --- a/Task/Floyd-Warshall-algorithm/ALGOL-68/floyd-warshall-algorithm.alg +++ b/Task/Floyd-Warshall-algorithm/ALGOL-68/floyd-warshall-algorithm.alg @@ -22,7 +22,7 @@ BEGIN # Floyd-Warshall algorithm - translated from the Lua sample # ) ); WHILE u := nxt[ u - 1, v - 1 ]; - print( ( " -> " + whole( u, 0 ) ) ); + print( ( " -> " +whole( u, 0 ) ) ); u /= v DO SKIP OD; print( ( newline ) ) @@ -34,12 +34,12 @@ BEGIN # Floyd-Warshall algorithm - translated from the Lua sample # PROC floyd warshall = ( [,]INT weights, INT num vertices )VOID: BEGIN - REAL infinite = max real; + REAL infinity = max real; [ 0 : num vertices - 1, 0 : num vertices - 1 ]REAL dist; FOR i FROM LWB dist TO 1 UPB dist DO FOR j FROM 2 LWB dist TO 2 UPB dist DO - dist[ i, j ] := infinite + dist[ i, j ] := infinity OD OD; @@ -59,7 +59,7 @@ BEGIN # Floyd-Warshall algorithm - translated from the Lua sample # FOR k FROM 2 LWB dist TO 2 UPB dist DO FOR i FROM 1 LWB dist TO 1 UPB dist DO FOR j FROM 2 LWB dist TO 2 UPB dist DO - IF dist[ i, k ] /= infinite AND dist[ k, j ] /= infinite THEN + IF dist[ i, k ] /= infinity AND dist[ k, j ] /= infinity THEN IF dist[ i, k ] + dist[ k, j ] < dist[ i, j ] THEN dist[ i, j ] := dist[ i, k ] + dist[ k, j ]; nxt[ i, j ] := nxt[ i, k ] @@ -71,14 +71,14 @@ BEGIN # Floyd-Warshall algorithm - translated from the Lua sample # print result( dist, nxt ) END # floyd warshall # ; - BEGIN - [,]INT weights = ( ( 1, 3, -2 ) - , ( 2, 1, 4 ) - , ( 2, 3, 3 ) - , ( 3, 4, 2 ) - , ( 4, 2, -1 ) - ); - INT num vertices = 4; - floyd warshall( weights, num vertices ) - END + + [,]INT weights = ( ( 1, 3, -2 ) + , ( 2, 1, 4 ) + , ( 2, 3, 3 ) + , ( 3, 4, 2 ) + , ( 4, 2, -1 ) + ); + INT num vertices = 4; + floyd warshall( weights, num vertices ) + END diff --git a/Task/Floyd-Warshall-algorithm/Ada/floyd-warshall-algorithm.adb b/Task/Floyd-Warshall-algorithm/Ada/floyd-warshall-algorithm.ada similarity index 100% rename from Task/Floyd-Warshall-algorithm/Ada/floyd-warshall-algorithm.adb rename to Task/Floyd-Warshall-algorithm/Ada/floyd-warshall-algorithm.ada diff --git a/Task/Floyd-Warshall-algorithm/COBOL/floyd-warshall-algorithm.cob b/Task/Floyd-Warshall-algorithm/COBOL/floyd-warshall-algorithm.cob deleted file mode 100644 index 47f4420154..0000000000 --- a/Task/Floyd-Warshall-algorithm/COBOL/floyd-warshall-algorithm.cob +++ /dev/null @@ -1,183 +0,0 @@ -IDENTIFICATION DIVISION. - PROGRAM-ID. FLOYD-WARSHALL. - - DATA DIVISION. - WORKING-STORAGE SECTION. - - 01 WS-NUM-VERTICES PIC 9 VALUE 4. - 01 WS-NUM-WEIGHTS PIC 9 VALUE 5. - 01 WS-INFINITY PIC 9(7)V9(2) VALUE 9999999.99. - - 01 WS-WEIGHTS. - 05 WS-W OCCURS 5 TIMES. - 10 WS-FROM PIC 9. - 10 WS-TO PIC 9. - 10 WS-COST PIC S9(3) SIGN LEADING SEPARATE. - - 01 WS-DIST. - 05 WS-D OCCURS 4 TIMES. - 10 WS-D-COL OCCURS 4 TIMES. - 15 WS-DIST-VAL PIC S9(7)V9(2). - - 01 WS-NEXT. - 05 WS-N OCCURS 4 TIMES. - 10 WS-N-COL OCCURS 4 TIMES. - 15 WS-NEXT-VAL PIC 9. - - 01 WS-I PIC 9. - 01 WS-J PIC 9. - 01 WS-K PIC 9. - 01 WS-U PIC 9. - 01 WS-V PIC 9. - 01 WS-IDX PIC 9. - 01 WS-TEMP-SUM PIC S9(7)V9(2). - 01 WS-DIST-IJ PIC S9(7)V9(2). - 01 WS-DIST-IK PIC S9(7)V9(2). - 01 WS-DIST-KJ PIC S9(7)V9(2). - - *> Path and display working fields - 01 WS-PATH PIC X(200). - 01 WS-PATH-TEMP PIC X(200). - 01 WS-DIST-INT PIC S9(5). - 01 WS-DIST-EDIT PIC -(4)9. - 01 WS-DIST-TRIM PIC X(6). - 01 WS-OUTPUT-LINE PIC X(80). - 01 WS-NODE-CHAR PIC 9. - - PROCEDURE DIVISION. - MAIN-PARA. - MOVE 1 TO WS-FROM(1) - MOVE 3 TO WS-TO(1) - MOVE -2 TO WS-COST(1) - - MOVE 2 TO WS-FROM(2) - MOVE 1 TO WS-TO(2) - MOVE 4 TO WS-COST(2) - - MOVE 2 TO WS-FROM(3) - MOVE 3 TO WS-TO(3) - MOVE 3 TO WS-COST(3) - - MOVE 3 TO WS-FROM(4) - MOVE 4 TO WS-TO(4) - MOVE 2 TO WS-COST(4) - - MOVE 4 TO WS-FROM(5) - MOVE 2 TO WS-TO(5) - MOVE -1 TO WS-COST(5) - - PERFORM INIT-DIST - PERFORM INIT-NEXT - PERFORM FLOYD-WARSHALL - PERFORM PRINT-RESULT - STOP RUN. - - INIT-DIST. - PERFORM VARYING WS-I FROM 1 BY 1 - UNTIL WS-I > WS-NUM-VERTICES - PERFORM VARYING WS-J FROM 1 BY 1 - UNTIL WS-J > WS-NUM-VERTICES - MOVE WS-INFINITY TO WS-DIST-VAL(WS-I, WS-J) - END-PERFORM - END-PERFORM - PERFORM VARYING WS-IDX FROM 1 BY 1 - UNTIL WS-IDX > WS-NUM-WEIGHTS - MOVE WS-FROM(WS-IDX) TO WS-I - MOVE WS-TO(WS-IDX) TO WS-J - MOVE WS-COST(WS-IDX) TO WS-DIST-VAL(WS-I, WS-J) - END-PERFORM. - - INIT-NEXT. - PERFORM VARYING WS-I FROM 1 BY 1 - UNTIL WS-I > WS-NUM-VERTICES - PERFORM VARYING WS-J FROM 1 BY 1 - UNTIL WS-J > WS-NUM-VERTICES - IF WS-I NOT EQUAL WS-J - MOVE WS-J TO WS-NEXT-VAL(WS-I, WS-J) - ELSE - MOVE 0 TO WS-NEXT-VAL(WS-I, WS-J) - END-IF - END-PERFORM - END-PERFORM. - - FLOYD-WARSHALL. - PERFORM VARYING WS-K FROM 1 BY 1 - UNTIL WS-K > WS-NUM-VERTICES - PERFORM VARYING WS-I FROM 1 BY 1 - UNTIL WS-I > WS-NUM-VERTICES - PERFORM VARYING WS-J FROM 1 BY 1 - UNTIL WS-J > WS-NUM-VERTICES - MOVE WS-DIST-VAL(WS-I, WS-K) TO WS-DIST-IK - MOVE WS-DIST-VAL(WS-K, WS-J) TO WS-DIST-KJ - MOVE WS-DIST-VAL(WS-I, WS-J) TO WS-DIST-IJ - IF WS-DIST-IK < WS-INFINITY AND - WS-DIST-KJ < WS-INFINITY - COMPUTE WS-TEMP-SUM = - WS-DIST-IK + WS-DIST-KJ - IF WS-TEMP-SUM < WS-DIST-IJ - MOVE WS-TEMP-SUM - TO WS-DIST-VAL(WS-I, WS-J) - MOVE WS-NEXT-VAL(WS-I, WS-K) - TO WS-NEXT-VAL(WS-I, WS-J) - END-IF - END-IF - END-PERFORM - END-PERFORM - END-PERFORM. - - PRINT-RESULT. - DISPLAY "pair dist path" - PERFORM VARYING WS-I FROM 1 BY 1 - UNTIL WS-I > WS-NUM-VERTICES - PERFORM VARYING WS-J FROM 1 BY 1 - UNTIL WS-J > WS-NUM-VERTICES - IF WS-I NOT EQUAL WS-J - - *> Set up source and destination - MOVE WS-I TO WS-U - MOVE WS-J TO WS-V - - *> Seed path with just the source node - MOVE SPACES TO WS-PATH - MOVE WS-I TO WS-NODE-CHAR - MOVE WS-NODE-CHAR TO WS-PATH(1:1) - - *> Walk next-hop until we reach destination - PERFORM UNTIL WS-U = WS-V - MOVE WS-NEXT-VAL(WS-U, WS-V) TO WS-U - MOVE WS-U TO WS-NODE-CHAR - MOVE SPACES TO WS-PATH-TEMP - STRING - FUNCTION TRIM(WS-PATH TRAILING) - DELIMITED SIZE - " -> " DELIMITED SIZE - WS-NODE-CHAR DELIMITED SIZE - INTO WS-PATH-TEMP - MOVE WS-PATH-TEMP TO WS-PATH - END-PERFORM - - *> Format distance: move to integer then edit picture - *> to get clean signed number without leading zeros - COMPUTE WS-DIST-INT = - WS-DIST-VAL(WS-I, WS-J) - MOVE WS-DIST-INT TO WS-DIST-EDIT - MOVE FUNCTION TRIM(WS-DIST-EDIT LEADING) - TO WS-DIST-TRIM - - *> Assemble and print output line - MOVE SPACES TO WS-OUTPUT-LINE - STRING - WS-I DELIMITED SIZE - " -> " DELIMITED SIZE - WS-J DELIMITED SIZE - " " DELIMITED SIZE - FUNCTION TRIM(WS-DIST-TRIM LEADING) - DELIMITED SIZE - " " DELIMITED SIZE - FUNCTION TRIM(WS-PATH TRAILING) - DELIMITED SIZE - INTO WS-OUTPUT-LINE - DISPLAY FUNCTION TRIM(WS-OUTPUT-LINE TRAILING) - END-IF - END-PERFORM - END-PERFORM. diff --git a/Task/Floyd-Warshall-algorithm/Dart/floyd-warshall-algorithm.dart b/Task/Floyd-Warshall-algorithm/Dart/floyd-warshall-algorithm.dart deleted file mode 100644 index 287b9a495f..0000000000 --- a/Task/Floyd-Warshall-algorithm/Dart/floyd-warshall-algorithm.dart +++ /dev/null @@ -1,54 +0,0 @@ -void main() { - List> weights = [ - [1, 3, -2], - [2, 1, 4], - [2, 3, 3], - [3, 4, 2], - [4, 2, -1] - ]; - int numVertices = 4; - floydWarshall(weights, numVertices); -} - -void floydWarshall(List> weights, int numVertices) { - List> dist = List.generate( - numVertices, (_) => List.filled(numVertices, double.infinity)); - - for (var w in weights) { - dist[w[0] - 1][w[1] - 1] = w[2].toDouble(); - } - - List> next = List.generate( - numVertices, (i) => List.generate(numVertices, (j) => j != i ? j + 1 : 0)); - - for (int k = 0; k < numVertices; k++) { - for (int i = 0; i < numVertices; i++) { - for (int j = 0; j < numVertices; j++) { - if (dist[i][k] + dist[k][j] < dist[i][j]) { - dist[i][j] = dist[i][k] + dist[k][j]; - next[i][j] = next[i][k]; - } - } - } - } - - printResult(dist, next); -} - -void printResult(List> dist, List> next) { - print("pair dist path"); - for (int i = 0; i < next.length; i++) { - for (int j = 0; j < next.length; j++) { - if (i != j) { - int u = i + 1; - int v = j + 1; - String path = "$u -> $v ${dist[i][j].toInt()} $u"; - do { - u = next[u - 1][v - 1]; - path += " -> $u"; - } while (u != v); - print(path); - } - } - } -} diff --git a/Task/Floyd-Warshall-algorithm/EasyLang/floyd-warshall-algorithm.easy b/Task/Floyd-Warshall-algorithm/EasyLang/floyd-warshall-algorithm.easy deleted file mode 100644 index 4d4159674a..0000000000 --- a/Task/Floyd-Warshall-algorithm/EasyLang/floyd-warshall-algorithm.easy +++ /dev/null @@ -1,24 +0,0 @@ -proc floydwarshall w[][] n . - for i to n - con[][] &= [ ] - for j to n : con[i][] &= 1 / 0 - . - for i to len w[][] - con[w[i][1]][w[i][2]] = w[i][3] - . - for k to n - for i to n - for j to n - con[i][j] = lower con[i][j] (con[i][k] + con[k][j]) - . - . - . - for i to n - for j to n - if i <> j - print i & " -> " & j & " : " & con[i][j] - . - . - . -. -floydwarshall [ [ 1 3 -2 ] [ 2 1 4 ] [ 2 3 3 ] [ 3 4 2 ] [ 4 2 -1 ] ] 4 diff --git a/Task/Floyd-Warshall-algorithm/Elixir/floyd-warshall-algorithm.ex b/Task/Floyd-Warshall-algorithm/Elixir/floyd-warshall-algorithm.elixir similarity index 100% rename from Task/Floyd-Warshall-algorithm/Elixir/floyd-warshall-algorithm.ex rename to Task/Floyd-Warshall-algorithm/Elixir/floyd-warshall-algorithm.elixir diff --git a/Task/Floyd-Warshall-algorithm/Erlang/floyd-warshall-algorithm.erl b/Task/Floyd-Warshall-algorithm/Erlang/floyd-warshall-algorithm.erl deleted file mode 100644 index 9ff0e024e4..0000000000 --- a/Task/Floyd-Warshall-algorithm/Erlang/floyd-warshall-algorithm.erl +++ /dev/null @@ -1,54 +0,0 @@ --module(floyd_warshall). --export([main/2]). - - -main(N, Edge) -> - {Dist, Next} = setup(N, Edge), - {Dist2, Next2} = shortest_path(N, Dist, Next), - print(N, Dist2, Next2). - -setup(N, Edge) -> - Big = 1.0e300, - Dist = maps:from_list([{{I,J}, case I == J of true -> 0; false -> Big end} - || I <- lists:seq(1, N), J <- lists:seq(1, N)]), - Next = maps:from_list([{{I,J}, nil} - || I <- lists:seq(1, N), J <- lists:seq(1, N)]), - lists:foldl(fun({U, V, W}, {Dst, Nxt}) -> - {maps:put({U, V}, W, Dst), maps:put({U, V}, V, Nxt)} - end, {Dist, Next}, Edge). - -shortest_path(N, Dist, Next) -> - Combinations = [{K, I, J} || K <- lists:seq(1, N), - I <- lists:seq(1, N), - J <- lists:seq(1, N)], - lists:foldl(fun({K, I, J}, {Dst, Nxt}) -> - IJ_Dist = maps:get({I, J}, Dst), - IK_Dist = maps:get({I, K}, Dst), - KJ_Dist = maps:get({K, J}, Dst), - case IJ_Dist > IK_Dist + KJ_Dist of - true -> - NewDist = maps:put({I, J}, IK_Dist + KJ_Dist, Dst), - NewNext = maps:put({I, J}, maps:get({I, K}, Nxt), Nxt), - {NewDist, NewNext}; - false -> - {Dst, Nxt} - end - end, {Dist, Next}, Combinations). - -print(N, Dist, Next) -> - io:format("pair dist path~n"), - [io:format("~w -> ~w ~4w ~s~n", [I, J, maps:get({I, J}, Dist), path(Next, I, J)]) - || I <- lists:seq(1, N), J <- lists:seq(1, N), I =/= J]. - -path(Next, I, J) -> - PathList = path(Next, I, J, [I]), - string:join([integer_to_list(X) || X <- PathList], " -> "). - -path(_Next, I, I, List) -> - lists:reverse(List); -path(Next, I, J, List) -> - U = maps:get({I, J}, Next), - path(Next, U, J, [U | List]). - -% Usage example: -main(_) -> main(4, [{1, 3, -2}, {2, 1, 4}, {2, 3, 3}, {3, 4, 2}, {4, 2, -1}]). diff --git a/Task/Floyd-Warshall-algorithm/Julia/floyd-warshall-algorithm.jl b/Task/Floyd-Warshall-algorithm/Julia/floyd-warshall-algorithm.julia similarity index 100% rename from Task/Floyd-Warshall-algorithm/Julia/floyd-warshall-algorithm.jl rename to Task/Floyd-Warshall-algorithm/Julia/floyd-warshall-algorithm.julia diff --git a/Task/Floyd-Warshall-algorithm/Kotlin/floyd-warshall-algorithm.kts b/Task/Floyd-Warshall-algorithm/Kotlin/floyd-warshall-algorithm.kotlin similarity index 100% rename from Task/Floyd-Warshall-algorithm/Kotlin/floyd-warshall-algorithm.kts rename to Task/Floyd-Warshall-algorithm/Kotlin/floyd-warshall-algorithm.kotlin diff --git a/Task/Floyd-Warshall-algorithm/OCaml/floyd-warshall-algorithm.ml b/Task/Floyd-Warshall-algorithm/OCaml/floyd-warshall-algorithm.ocaml similarity index 100% rename from Task/Floyd-Warshall-algorithm/OCaml/floyd-warshall-algorithm.ml rename to Task/Floyd-Warshall-algorithm/OCaml/floyd-warshall-algorithm.ocaml diff --git a/Task/Floyd-Warshall-algorithm/Pluto/floyd-warshall-algorithm.pluto b/Task/Floyd-Warshall-algorithm/Pluto/floyd-warshall-algorithm.pluto deleted file mode 100644 index 8f3b213cd2..0000000000 --- a/Task/Floyd-Warshall-algorithm/Pluto/floyd-warshall-algorithm.pluto +++ /dev/null @@ -1,50 +0,0 @@ -require "table2" - -class floydWarshall - static function do_calcs(weights, nvertices) - local dist = {} - local next = {} - for i = 1, nvertices do - dist[i] = table.rep(nvertices, 1/0) - next[i] = table.rep(nvertices, 1) - for j = 1, nvertices do - if i != j then next[i][j] = j end - end - end - for weights as w do dist[w[1]][w[2]] = w[3] end - for k = 1, nvertices do - for i = 1, nvertices do - for j = 1, nvertices do - if (dist[i][k] + dist[k][j] < dist[i][j]) then - dist[i][j] = dist[i][k] + dist[k][j] - next[i][j] = next[i][k] - end - end - end - end - floydWarshall.print_result(dist, next) - end - - static function print_result(dist, next) - print("pair dist path") - for i = 1, #next do - for j = 1, #next do - if i != j then - local u = i - local v = j - local path = string.format("%d -> %d %2d %s", u, v, math.trunc(dist[i][j]), u) - while true do - u = next[u][v] - path ..= " -> " .. u - if u == v then break end - end - print(path) - end - end - end - end -end - -local weights = { {1, 3, -2}, {2, 1, 4}, {2, 3, 3}, {3, 4, 2}, {4, 2, -1} } -local nvertices = 4 -floydWarshall.do_calcs(weights, nvertices) diff --git a/Task/Floyd-Warshall-algorithm/R/floyd-warshall-algorithm.r b/Task/Floyd-Warshall-algorithm/R/floyd-warshall-algorithm.r deleted file mode 100644 index e65a241e61..0000000000 --- a/Task/Floyd-Warshall-algorithm/R/floyd-warshall-algorithm.r +++ /dev/null @@ -1,67 +0,0 @@ -floydWarshall <- function(weights, numVertices) { - # Initialize distance matrix with infinity - dist <- matrix(Inf, nrow = numVertices, ncol = numVertices) - - # Set diagonal elements to zero - diag(dist) <- 0 - - # Fill the distance matrix with the given weights - for (i in 1:nrow(weights)) { - dist[weights[i, 1], weights[i, 2]] <- weights[i, 3] - } - - # Initialize nextNode matrix - nextNode <- matrix(0, nrow = numVertices, ncol = numVertices) - for (i in 1:numVertices) { - for (j in 1:numVertices) { - if (i != j) { - nextNode[i, j] <- j - } - } - } - - # Floyd-Warshall algorithm - for (k in 1:numVertices) { - for (i in 1:numVertices) { - for (j in 1:numVertices) { - if (dist[i, k] + dist[k, j] < dist[i, j]) { - dist[i, j] <- dist[i, k] + dist[k, j] - nextNode[i, j] <- nextNode[i, k] - } - } - } - } - - printResult(dist, nextNode) -} - -printResult <- function(dist, nextNode) { - cat("pair dist path\n") - for (i in 1:nrow(nextNode)) { - for (j in 1:ncol(nextNode)) { - if (i != j) { - u <- i - v <- j - path <- sprintf("%d -> %d %2d %s", i, j, dist[i, j], i) - repeat { - u <- nextNode[u, v] - path <- paste(path, "->", u) - if (u == v) break - } - cat(path, "\n") - } - } - } -} - -# Example usage -weights <- matrix(c( - 1, 3, -2, - 2, 1, 4, - 2, 3, 3, - 3, 4, 2, - 4, 2, -1 -), ncol = 3, byrow = TRUE) - -numVertices <- 4 -floydWarshall(weights, numVertices) diff --git a/Task/Floyd-Warshall-algorithm/Rust/floyd-warshall-algorithm.rs b/Task/Floyd-Warshall-algorithm/Rust/floyd-warshall-algorithm.rust similarity index 100% rename from Task/Floyd-Warshall-algorithm/Rust/floyd-warshall-algorithm.rs rename to Task/Floyd-Warshall-algorithm/Rust/floyd-warshall-algorithm.rust diff --git a/Task/Floyd-Warshall-algorithm/Scheme/floyd-warshall-algorithm.scm b/Task/Floyd-Warshall-algorithm/Scheme/floyd-warshall-algorithm.ss similarity index 100% rename from Task/Floyd-Warshall-algorithm/Scheme/floyd-warshall-algorithm.scm rename to Task/Floyd-Warshall-algorithm/Scheme/floyd-warshall-algorithm.ss diff --git a/Task/Floyd-Warshall-algorithm/Swift/floyd-warshall-algorithm.swift b/Task/Floyd-Warshall-algorithm/Swift/floyd-warshall-algorithm.swift deleted file mode 100644 index f6f9661f35..0000000000 --- a/Task/Floyd-Warshall-algorithm/Swift/floyd-warshall-algorithm.swift +++ /dev/null @@ -1,51 +0,0 @@ -func floydWarshall(_ weights: [[Int]], _ numVertices: Int) { - var dist = Array(repeating: Array(repeating: Double.infinity, count: numVertices), count: numVertices) - var next = Array(repeating: Array(repeating: 0, count: numVertices), count: numVertices) - - for weight in weights { - dist[weight[0] - 1][weight[1] - 1] = Double(weight[2]) - } - - for i in 0.. %d %2d %d", U, V, Dist(I,J), U); - repeat U:= Next(U-1, V-1); - Print(" -> %d", U); - until U = V; - Print("\n"); - ]; - ]; - -[Dist:= Reserve(Verts*IntSize); -for I:= 0 to Verts-1 do - [Dist(I):= Reserve(Verts*IntSize); - for J:= 0 to Verts-1 do - Dist(I,J):= \Inf\10000; - ]; -for W:= 0 to Len-1 do - Dist(Weights(W,0)-1, Weights(W,1)-1):= Weights(W,2); -Next:= Reserve(Verts*IntSize); -for I:= 0 to Verts-1 do - [Next(I):= Reserve(Verts*IntSize); - for J:= 0 to Verts-1 do - Next(I,J):= if I=J then 0 else J+1; - ]; -for K:= 0 to Verts-1 do - for I:= 0 to Verts-1 do - for J:= 0 to Verts-1 do - if Dist(I,J) > Dist(I,K) + Dist(K,J) then - [Dist(I,J):= Dist(I,K) + Dist(K,J); - Next(I,J):= Next(I,K); - ]; -PrintResult; -]; - -int Weights; -[Weights:= [ [1, 3, -2], [2, 1, 4], [2, 3, 3], [3, 4, 2], [4, 2, -1] ]; -FloydWarshall(Weights, 5, 4); -] diff --git a/Task/Floyd-Warshall-algorithm/Zig/floyd-warshall-algorithm.zig b/Task/Floyd-Warshall-algorithm/Zig/floyd-warshall-algorithm.zig deleted file mode 100644 index fe8d6dd20d..0000000000 --- a/Task/Floyd-Warshall-algorithm/Zig/floyd-warshall-algorithm.zig +++ /dev/null @@ -1,99 +0,0 @@ -// floyd_warshall.zig -const std = @import("std"); - -const F64_INF = std.math.inf(f64); - -fn idx(i: usize, j: usize, n: usize) usize { - return i * n + j; -} - -fn printResult(dist: []const f64, next: []const usize, n: usize) void { - std.debug.print("(pair, dist, path)\n", .{}); - for (0..n) |i| { - for (0..n) |j| { - if (i == j) continue; - - const @"u0" = i + 1; - const v0 = j + 1; - - std.debug.print("({d} -> {d}, {d}, ", .{ - @"u0", v0, dist[idx(i, j, n)], - }); - - var u = @"u0"; - std.debug.print("{d}", .{u}); - while (u != v0) { - u = next[idx(u - 1, v0 - 1, n)]; - std.debug.print(" -> {d}", .{u}); - } - std.debug.print(")\n", .{}); - } - } -} - -fn solve( - allocator: std.mem.Allocator, - edges: []const [3]i64, // (u,v,w) 1‑based - n: usize, -) !void { - // Allocate matrices - var dist = try allocator.alloc(f64, n * n); - defer allocator.free(dist); - - var next_v = try allocator.alloc(usize, n * n); - defer allocator.free(next_v); - - // Initialise - for (dist)|*d| d.* = F64_INF; - for (next_v)|*x| x.* = 0; - - // Edge weights - for (edges) |e| { - const u = @as(usize, @intCast(e[0] - 1)); - const v = @as(usize, @intCast(e[1] - 1)); - dist[idx(u, v, n)] = @as(f64, @floatFromInt(e[2])); - } - - // Successor matrix - for (0..n) |i| { - for (0..n) |j| { - if (i != j) next_v[idx(i, j, n)] = j + 1; // 1‑based - } - } - - // Floyd–Warshall - for (0..n) |k| { - for (0..n) |i| { - for (0..n) |j| { - const dik = dist[idx(i, k, n)]; - const dkj = dist[idx(k, j, n)]; - if (std.math.isFinite(dik) and std.math.isFinite(dkj)) { - const alt = dik + dkj; - const pos = idx(i, j, n); - if (alt < dist[pos]) { - dist[pos] = alt; - next_v[pos] = next_v[idx(i, k, n)]; - } - } - } - } - } - - printResult(dist, next_v, n); -} - -pub fn main() !void { - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - defer _ = gpa.deinit(); - const alloc = gpa.allocator(); - - const edges = [_][3]i64{ - .{ 1, 3, -2 }, - .{ 2, 1, 4 }, - .{ 2, 3, 3 }, - .{ 3, 4, 2 }, - .{ 4, 2, -1 }, - }; - - try solve(alloc, edges[0..], 4); -} diff --git a/Task/Floyds-triangle/ALGOL-68/floyds-triangle.alg b/Task/Floyds-triangle/ALGOL-68/floyds-triangle.alg index c3bd144573..3e06ecbe63 100644 --- a/Task/Floyds-triangle/ALGOL-68/floyds-triangle.alg +++ b/Task/Floyds-triangle/ALGOL-68/floyds-triangle.alg @@ -1,11 +1,7 @@ -# procedure to print a Floyd's Triangle with n lines # +# procedure to print a Floyd's Triangle with n lines # PROC floyds triangle = ( INT n )VOID: BEGIN - # the triangle should be left aligned with the individual numbers # - # right-aligned with only one space before the number in the final # - # row # - # calculate the number of the highest number that will be printed # # ( the sum of the integers 1, 2, ... n ) # INT max number = ( n * ( n + 1 ) ) OVER 2; @@ -28,6 +24,10 @@ BEGIN END; # floyds triangle # -floyds triangle( 5 ); -print( ( newline ) ); -floyds triangle( 14 ) +main: ( + + floyds triangle( 5 ); + print( ( newline ) ); + floyds triangle( 14 ) + +) diff --git a/Task/Floyds-triangle/Ada/floyds-triangle.adb b/Task/Floyds-triangle/Ada/floyds-triangle.ada similarity index 100% rename from Task/Floyds-triangle/Ada/floyds-triangle.adb rename to Task/Floyds-triangle/Ada/floyds-triangle.ada diff --git a/Task/Floyds-triangle/Ballerina/floyds-triangle.ballerina b/Task/Floyds-triangle/Ballerina/floyds-triangle.ballerina deleted file mode 100644 index 0a4976e6f9..0000000000 --- a/Task/Floyds-triangle/Ballerina/floyds-triangle.ballerina +++ /dev/null @@ -1,20 +0,0 @@ -import ballerina/io; - -function floyd(int n) { - int k = 1; - foreach int i in 1...n { - foreach int j in 1...i { - int p = j < 9 ? 3 : 4; - io:print(k.toString().padStart(p)); - k += 1; - } - io:println(); - } -} - -public function main() { - io:println("Floyd(5):"); - floyd(5); - io:println("\nFloyd(14):"); - floyd(14); -} diff --git a/Task/Floyds-triangle/COBOL/floyds-triangle.cob b/Task/Floyds-triangle/COBOL/floyds-triangle.cobol similarity index 100% rename from Task/Floyds-triangle/COBOL/floyds-triangle.cob rename to Task/Floyds-triangle/COBOL/floyds-triangle.cobol diff --git a/Task/Floyds-triangle/Delphi/floyds-triangle.pas b/Task/Floyds-triangle/Delphi/floyds-triangle.delphi similarity index 100% rename from Task/Floyds-triangle/Delphi/floyds-triangle.pas rename to Task/Floyds-triangle/Delphi/floyds-triangle.delphi diff --git a/Task/Floyds-triangle/EasyLang/floyds-triangle.easy b/Task/Floyds-triangle/EasyLang/floyds-triangle.easy index d575e1535b..3e5e057b64 100644 --- a/Task/Floyds-triangle/EasyLang/floyds-triangle.easy +++ b/Task/Floyds-triangle/EasyLang/floyds-triangle.easy @@ -1,15 +1,17 @@ func ceil h . f = floor h - if h <> f : f += 1 + if h <> f + f += 1 + . return f . -proc triangle n . +proc triangle n . . print n & " rows:" row = 1 while row <= n printme += 1 - cols = ceil log (n * (n - 1) / 2 + nprinted + 2) 10 - numfmt cols 0 + cols = ceil log10 (n * (n - 1) / 2 + nprinted + 2) + numfmt 0 cols write printme & " " nprinted += 1 if nprinted = row diff --git a/Task/Floyds-triangle/Elixir/floyds-triangle.ex b/Task/Floyds-triangle/Elixir/floyds-triangle.elixir similarity index 100% rename from Task/Floyds-triangle/Elixir/floyds-triangle.ex rename to Task/Floyds-triangle/Elixir/floyds-triangle.elixir diff --git a/Task/Floyds-triangle/Frink/floyds-triangle.frink b/Task/Floyds-triangle/Frink/floyds-triangle.frink deleted file mode 100644 index d404e4fbdc..0000000000 --- a/Task/Floyds-triangle/Frink/floyds-triangle.frink +++ /dev/null @@ -1,16 +0,0 @@ -FloydsTriangle[rows] := -{ - result = new array - n = 1 - for r = 1 to rows - { - result.push[array[n to n+r-1]] - n = n + r - } - - return result -} - -println[formatTable[FloydsTriangle[5], "right"]] -println[] -println[formatTable[FloydsTriangle[14], "right"]] diff --git a/Task/Floyds-triangle/FutureBasic/floyds-triangle.basic b/Task/Floyds-triangle/FutureBasic/floyds-triangle.basic deleted file mode 100644 index cd7e9cb937..0000000000 --- a/Task/Floyds-triangle/FutureBasic/floyds-triangle.basic +++ /dev/null @@ -1,18 +0,0 @@ -void local fn FloydsTriangle( rows as int ) - int col, row, num = 1 - - printf @"%d rows:", rows - for row = 1 to rows - for col = 1 to row - printf @"%4d\b", num - num++ - next - print - next - print -end fn - -fn FloydsTriangle( 5 ) -fn FloydsTriangle( 14 ) - -HandleEvents diff --git a/Task/Floyds-triangle/Julia/floyds-triangle.jl b/Task/Floyds-triangle/Julia/floyds-triangle.julia similarity index 100% rename from Task/Floyds-triangle/Julia/floyds-triangle.jl rename to Task/Floyds-triangle/Julia/floyds-triangle.julia diff --git a/Task/Floyds-triangle/Kotlin/floyds-triangle.kts b/Task/Floyds-triangle/Kotlin/floyds-triangle.kotlin similarity index 100% rename from Task/Floyds-triangle/Kotlin/floyds-triangle.kts rename to Task/Floyds-triangle/Kotlin/floyds-triangle.kotlin diff --git a/Task/Floyds-triangle/OCaml/floyds-triangle.ml b/Task/Floyds-triangle/OCaml/floyds-triangle.ocaml similarity index 100% rename from Task/Floyds-triangle/OCaml/floyds-triangle.ml rename to Task/Floyds-triangle/OCaml/floyds-triangle.ocaml diff --git a/Task/Floyds-triangle/Objeck/floyds-triangle.objeck b/Task/Floyds-triangle/Objeck/floyds-triangle.objeck deleted file mode 100644 index 567e784e01..0000000000 --- a/Task/Floyds-triangle/Objeck/floyds-triangle.objeck +++ /dev/null @@ -1,20 +0,0 @@ -class Floyds { - function : Main(args : String[]) ~ Nil { - PrintTriangle(5); - PrintTriangle(14); - } - - function : PrintTriangle(n : Int) ~ Nil { - "{$n} rows:"->PrintLine(); - - rowNum := 1; printMe := 1; numsPrinted := 0; - for(; rowNum <= n; printMe++;){ - "{$printMe}\t"->Print(); - - if(++numsPrinted = rowNum){ - ""->PrintLine(); - rowNum++; numsPrinted := 0; - } - } - } -} diff --git a/Task/Floyds-triangle/PascalABC.NET/floyds-triangle.pas b/Task/Floyds-triangle/PascalABC.NET/floyds-triangle.pas deleted file mode 100644 index 4bdce7f681..0000000000 --- a/Task/Floyds-triangle/PascalABC.NET/floyds-triangle.pas +++ /dev/null @@ -1,19 +0,0 @@ -procedure FloydTriangle(rows: integer); -begin - var r := 1; - for var i:=1 to rows do - begin - for var j:=1 to i do - begin - Write(r: (j>8 ? 4 : 3)); - r += 1; - end; - Writeln - end; -end; - -begin - FloydTriangle(5); - Writeln; - FloydTriangle(14); -end. diff --git a/Task/Floyds-triangle/Phix/floyds-triangle.phix b/Task/Floyds-triangle/Phix/floyds-triangle.phix index 114ef290dc..590838b99c 100644 --- a/Task/Floyds-triangle/Phix/floyds-triangle.phix +++ b/Task/Floyds-triangle/Phix/floyds-triangle.phix @@ -1,18 +1,20 @@ -with javascript_semantics -procedure Floyds_triangle(integer n) - sequence widths = repeat(0,n) - integer k = (n * (n-1))/2 - for i=1 to n do - widths[i] = sprintf("%%%dd",length(sprintf("%d",i+k))+1) - end for - k = 1 - for i=1 to n do - for j=1 to i do - printf(1,widths[j],k) - k += 1 - end for - printf(1,"\n") - end for -end procedure -Floyds_triangle(5) -Floyds_triangle(14) +(phixonline)--> + with javascript_semantics + procedure Floyds_triangle(integer n) + sequence widths = repeat(0,n) + integer k = (n * (n-1))/2 + for i=1 to n do + widths[i] = sprintf("%%%dd",length(sprintf("%d",i+k))+1) + end for + k = 1 + for i=1 to n do + for j=1 to i do + printf(1,widths[j],k) + k += 1 + end for + printf(1,"\n") + end for + end procedure + Floyds_triangle(5) + Floyds_triangle(14) + + printf(1,"%09.3f\n",7.125) + + with javascript_semantics + include mpfr.e + mpz primorial = mpz_init(1), + pj = mpz_init() + sequence fortunates = {} + for p=1 to 75 do + mpz_mul_si(primorial,primorial,get_prime(p)) + integer j = 3 + mpz_add_si(pj,primorial,3) + while not mpz_prime(pj) do + mpz_add_si(pj,pj,2) + j = j + 2 + end while + fortunates &= j + end for + fortunates = unique(deep_copy(fortunates))[1..50] + fortunates = join_by(apply(true,sprintf,{{"%3d"},fortunates}),1,10) + printf(1,"The first 50 distinct fortunate numbers are:\n%s\n",{fortunates}) + + with javascript_semantics + function fwd_diff_n(sequence s, integer order) + assert(order<length(s)) + s = deep_copy(s) + for i=1 to order do + for j=1 to length(s)-1 do + s[j] = s[j+1]-s[j] + end for + s = s[1..-2] + end for + return s + end function -constant s = {90, 47, 58, 29, 22, 32, 55, 5, 55, 73} -for i=1 to 9 do - ?fwd_diff_n(s,i) -end for + constant s = {90, 47, 58, 29, 22, 32, 55, 5, 55, 73} + for i=1 to 9 do + ?fwd_diff_n(s,i) + end for + + with javascript_semantics + function xor_gate(bool a, bool b) + return (a and not b) or (not a and b) + end function -printf(1," inf: %f\n",{inf}) -printf(1," ninf: %f\n",{ninf}) -printf(1," nan: %f\n",{nan}) -printf(1,"*nzero: %f\n",{nzero}) -printf(1," inf+2: %f\n",{inf+2}) -printf(1," inf+ninf: %f\n",{inf+ninf}) -printf(1," 0*inf: %f\n",{0*inf}) -printf(1," nan+1: %f\n",{nan+1}) -printf(1," nan+nan: %f\n",{nan+nan}) -printf(1," inf>1e300: %d\n",{inf>1e300}) -printf(1," ninf<1e300: %d\n",{ninf<-1e300}) -printf(1,"*nan=nan: %d\n",{nan=nan}) -printf(1," nan=42: %d\n",{nan=42}) -printf(1,"*nan<0: %d\n",{nan<0}) -printf(1," nan>0: %d\n",{nan>0}) + function half_adder(bool a, bool b) + bool s = xor_gate(a,b), + c = a and b + return {s,c} + end function + + function full_adder(bool a, bool b, bool c) + bool {s1,c1} = half_adder(c,a), + {s2,c2} = half_adder(s1,b) + c = c1 or c2 + return {s2,c} + end function + + function four_bit_adder(bool a0, a1, a2, a3, b0, b1, b2, b3) + bool s0,s1,s2,s3,c + {s0,c} = full_adder(a0,b0,0) + {s1,c} = full_adder(a1,b1,c) + {s2,c} = full_adder(a2,b2,c) + {s3,c} = full_adder(a3,b3,c) + return {s3,s2,s1,s0,c} + end function + + procedure test(integer a, integer b) + bool {a0,a1,a2,a3} = int_to_bits(a,4), + {b0,b1,b2,b3} = int_to_bits(b,4), + {r3,r2,r1,r0,c} = four_bit_adder(a0,a1,a2,a3,b0,b1,b2,b3) + integer r = bits_to_int({r0,r1,r2,r3}) + string s = iff(c?sprintf(" [=%d+16]",r):"") + printf(1,"%04b + %04b = %04b %b (%d+%d=%d%s)\n",{a,b,r,c,a,b,c*16+r,s}) + end procedure + + test(0,0) + test(0,1) + test(0b1111,0b1111) + test(3,7) + test(11,8) + test(0b1100,0b1100) + test(0b1100,0b1101) + test(0b1100,0b1110) + test(0b1100,0b1111) + test(0b1101,0b0000) + test(0b1101,0b0001) + test(0b1101,0b0010) + test(0b1101,0b0011) + + with javascript_semantics + --<adapted from demo\rosetta\number_names.exw, which alas outputs ",", "and", uses "minus" instead of "negative", etc...> + constant twenties = {"zero","one","two","three","four","five","six","seven","eight","nine","ten", + "eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"}, + decades = {"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"} -function hundred(integer n) - if n<20 then - return twenties[mod(n,20)+1] - elsif mod(n,10)=0 then - return decades[mod(floor(n/10),10)-1] - end if - return decades[mod(floor(n/10),10)-1] & '-' & twenties[mod(n,10)+1] -end function + function hundred(integer n) + if n<20 then + return twenties[mod(n,20)+1] + elsif mod(n,10)=0 then + return decades[mod(floor(n/10),10)-1] + end if + return decades[mod(floor(n/10),10)-1] & '-' & twenties[mod(n,10)+1] + end function -function thousand(integer n) - if n<100 then - return hundred(n) - elsif mod(n,100)=0 then - return twenties[mod(floor(n/100),20)+1]&" hundred" - end if - return twenties[mod(floor(n/100),20)+1] & " hundred " & hundred(mod(n,100)) -end function + function thousand(integer n) + if n<100 then + return hundred(n) + elsif mod(n,100)=0 then + return twenties[mod(floor(n/100),20)+1]&" hundred" + end if + return twenties[mod(floor(n/100),20)+1] & " hundred " & hundred(mod(n,100)) + end function -constant orders = {{power(10,12),"trillion"}, - {power(10,9),"billion"}, - {power(10,6),"million"}, - {power(10,3),"thousand"}} + constant orders = {{power(10,12),"trillion"}, + {power(10,9),"billion"}, + {power(10,6),"million"}, + {power(10,3),"thousand"}} -function triplet(integer n) - string res = "" - for i=1 to length(orders) do - {atom order, string name} = orders[i] - atom high = floor(n/order), - low = mod(n,order) - if high!=0 then - res &= thousand(high)&' '&name - end if - n = low - if low=0 then exit end if - if length(res) and high!=0 then - res &= " " - end if - end for - if n!=0 or res="" then - res &= thousand(floor(n)) - end if - return res -end function + function triplet(integer n) + string res = "" + for i=1 to length(orders) do + {atom order, string name} = orders[i] + atom high = floor(n/order), + low = mod(n,order) + if high!=0 then + res &= thousand(high)&' '&name + end if + n = low + if low=0 then exit end if + if length(res) and high!=0 then + res &= " " + end if + end for + if n!=0 or res="" then + res &= thousand(floor(n)) + end if + return res + end function -function spell(integer n) - string res = "" - if n<0 then - res = "negative " - n = -n - end if - res &= triplet(n) - return res -end function --- + function spell(integer n) + string res = "" + if n<0 then + res = "negative " + n = -n + end if + res &= triplet(n) + return res + end function + --</adapted from number_names.exw> -function fourIsMagic(atom n) - string s = spell(n) - s[1] = upper(s[1]) - string t = s - while n!=4 do - n = length(s) - s = spell(n) - t &= " is " & s & ", " & s - end while - t &= " is magic.\n" - return t -end function + function fourIsMagic(atom n) + string s = spell(n) + s[1] = upper(s[1]) + string t = s + while n!=4 do + n = length(s) + s = spell(n) + t &= " is " & s & ", " & s + end while + t &= " is magic.\n" + return t + end function -constant tests = {-7, -1, 0, 1, 2, 3, 4, 23, 1e9, 20140, 100, 130, 151, 999999} -for i=1 to length(tests) do - puts(1,fourIsMagic(tests[i])) -end for + constant tests = {-7, -1, 0, 1, 2, 3, 4, 23, 1e9, 20140, 100, 130, 151, 999999} + for i=1 to length(tests) do + puts(1,fourIsMagic(tests[i])) + end for + %d/%d (removed %d)".fmt(xn,xd,yn,yd,k+1)); - } - } + foreach k in ([0..8]){ + yn,yd := rn[k],rd[k]; + if(yn!=0 and yd!=0 and + xn.toFloat()/xd.toFloat() == yn.toFloat()/yd.toFloat()){ + count+=1; + omitted[k]+=1; + if(count<=12) + println("%d/%d --> %d/%d (removed %d)".fmt(xn,xd,yn,yd,k+1)); + } + } } } println("%d-digit fractions found: %d, omitted %s\n" diff --git a/Task/Fractran/ALGOL-68/fractran.alg b/Task/Fractran/ALGOL-68/fractran.alg index 2908205a60..c1d894374e 100644 --- a/Task/Fractran/ALGOL-68/fractran.alg +++ b/Task/Fractran/ALGOL-68/fractran.alg @@ -1,6 +1,6 @@ # as the numbers required for finding the first 20 primes are quite large, # -# we use Algol 68G's LONG LONG INT with a precision of 200 digits # -PR precision 200 PR +# we use Algol 68G's LONG LONG INT with a precision of 100 digits # +PR precision 100 PR # mode to hold fractions # MODE FRACTION = STRUCT( INT numerator, INT denominator ); @@ -9,16 +9,16 @@ MODE FRACTION = STRUCT( INT numerator, INT denominator ); OP / = ( INT a, b )FRACTION: ( a, b ); # mode to define a FRACTRAN progam # -MODE FRACTRAN = STRUCT( [0]FRACTION data +MODE FRACTRAN = STRUCT( FLEX[0]FRACTION data , LONG LONG INT n , BOOL halted ); # prepares a FRACTRAN program for use - sets the initial value of n and halted to FALSE # PRIO STARTAT = 1; -OP STARTAT = ( REF FRACTRAN f, INT start p )REF FRACTRAN: +OP STARTAT = ( REF FRACTRAN f, INT start )REF FRACTRAN: BEGIN halted OF f := FALSE; - n OF f := start p; + n OF f := start; f END; @@ -39,39 +39,36 @@ OP NEXT = ( REF FRACTRAN f )LONG LONG INT: FI ; # generate and print the sequence of numbers from a FRACTRAN pogram # -PROC print fractran sequence = ( REF FRACTRAN f, INT start p, INT limit )VOID: +PROC print fractran sequence = ( REF FRACTRAN f, INT start, INT limit )VOID: BEGIN - VOID( f STARTAT start p ); - print( ( "0: ", whole( start p, 0 ) ) ); + VOID( f STARTAT start ); + print( ( "0: ", whole( start, 0 ) ) ); FOR i TO limit WHILE VOID( NEXT f ); NOT halted OF f DO - print( ( " ", whole( i, 0 ), ":", whole( n OF f, 0 ) ) ) + print( ( " " + whole( i, 0 ) + ": " + whole( n OF f, 0 ) ) ) OD; print( ( newline ) ) END ; # print the first 16 elements from the primes FRACTRAN program # -FRACTRAN pf := ( ( 17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13 - , 13/11, 15/14, 15/2, 55/1 ), 0, FALSE ); +FRACTRAN pf := ( ( 17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1 ), 0, FALSE ); print fractran sequence( pf, 2, 15 ); # find some primes using the pf FRACTRAN progam - n is prime for the members in the sequence that are 2^n # -BEGIN - INT primes found := 0; - VOID( pf STARTAT 2 ); - INT pos := 0; - print( ( "seq position prime sequence value", newline ) ); - WHILE primes found < 20 AND NOT halted OF pf DO - LONG LONG INT value := NEXT pf; - INT power of 2 := 0; - pos +:= 1; - WHILE value MOD 2 = 0 AND value > 0 DO power of 2 PLUSAB 1; value OVERAB 2 OD; - IF value = 1 THEN - primes found +:= 1; - print( ( whole( pos, -12 ), " ", whole( power of 2, -6 ) ) ); - print( ( " (" + whole( n OF pf, 0 ), ")", newline ) ) - FI - OD -END +INT primes found := 0; +VOID( pf STARTAT 2 ); +INT pos := 0; +print( ( "seq position prime sequence value", newline ) ); +WHILE primes found < 20 AND NOT halted OF pf DO + LONG LONG INT value := NEXT pf; + INT power of 2 := 0; + pos +:= 1; + WHILE value MOD 2 = 0 AND value > 0 DO power of 2 PLUSAB 1; value OVERAB 2 OD; + IF value = 1 THEN + # found a prime # + primes found +:= 1; + print( ( whole( pos, -12 ) + " " + whole( power of 2, -6 ) + " (" + whole( n OF pf, 0 ) + ")", newline ) ) + FI +OD diff --git a/Task/Fractran/Ada/fractran.ada b/Task/Fractran/Ada/fractran.ada new file mode 100644 index 0000000000..90f1a8e4db --- /dev/null +++ b/Task/Fractran/Ada/fractran.ada @@ -0,0 +1,43 @@ +with Ada.Text_IO; + +procedure Fractan is + + type Fraction is record Nom: Natural; Denom: Positive; end record; + type Frac_Arr is array(Positive range <>) of Fraction; + + function "/" (N: Natural; D: Positive) return Fraction is + Frac: Fraction := (Nom => N, Denom => D); + begin + return Frac; + end "/"; + + procedure F(List: Frac_Arr; Start: Positive; Max_Steps: Natural) is + N: Positive := Start; + J: Positive; + begin + Ada.Text_IO.Put(" 0:" & Integer'Image(N) & " "); + for I in 1 .. Max_Steps loop + J := List'First; + loop + if N mod List(J).Denom = 0 then + N := (N/List(J).Denom) * List(J).Nom; + exit; -- found fraction + elsif J >= List'Last then + return; -- did try out all fractions + else + J := J + 1; -- try the next fraction + end if; + end loop; + Ada.Text_IO.Put(Integer'Image(I) & ":" & Integer'Image(N) & " "); + end loop; + end F; + +begin + -- F((2/3, 7/2, 1/5, 1/7, 1/9, 1/4, 1/8), 2, 100); + -- output would be "0: 2 1: 7 2: 1" and then terminate + + F((17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, + 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1), + 2, 15); + -- output is "0: 2 1: 15 2: 825 3: 725 ... 14: 132 15: 116" +end Fractan; diff --git a/Task/Fractran/Ada/fractran.adb b/Task/Fractran/Ada/fractran.adb deleted file mode 100644 index b80338cfca..0000000000 --- a/Task/Fractran/Ada/fractran.adb +++ /dev/null @@ -1,43 +0,0 @@ -with Ada.Text_IO; - -procedure Fractan is - - type Fraction is record Nom: Natural; Denom: Positive; end record; - type Frac_Arr is array(Positive range <>) of Fraction; - - function "/" (N: Natural; D: Positive) return Fraction is - Frac: Fraction := (Nom => N, Denom => D); - begin - return Frac; - end "/"; - - procedure F(List: Frac_Arr; Start: Positive; Max_Steps: Natural) is - N: Positive := Start; - J: Positive; - begin - Ada.Text_IO.Put(" 0:" & Integer'Image(N) & " "); - for I in 1 .. Max_Steps loop - J := List'First; - loop - if N mod List(J).Denom = 0 then - N := (N/List(J).Denom) * List(J).Nom; - exit; -- found fraction - elsif J >= List'Last then - return; -- did try out all fractions - else - J := J + 1; -- try the next fraction - end if; - end loop; - Ada.Text_IO.Put(Integer'Image(I) & ":" & Integer'Image(N) & " "); - end loop; - end F; - -begin - -- F((2/3, 7/2, 1/5, 1/7, 1/9, 1/4, 1/8), 2, 100); - -- output would be "0: 2 1: 7 2: 1" and then terminate - - F((17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, - 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1), - 2, 15); - -- output is "0: 2 1: 15 2: 825 3: 725 ... 14: 132 15: 116" -end Fractan; diff --git a/Task/Fractran/Batch-File/fractran.bat b/Task/Fractran/Batch-File/fractran.bat index 75fe098b0a..956eee44cc 100644 --- a/Task/Fractran/Batch-File/fractran.bat +++ b/Task/Fractran/Batch-File/fractran.bat @@ -1,41 +1,41 @@ @echo off setlocal enabledelayedexpansion - ::Set the inputs + ::Set the inputs set "code=17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1" set "n=2" - ::Basic validation of code + ::Basic validation of code for %%. in (!code!) do ( - echo.%%.|findstr /r /c:"^[0-9][0-9]*/[1-9][0-9]*$">nul||goto error_code + echo.%%.|findstr /r /c:"^[0-9][0-9]*/[1-9][0-9]*$">nul||goto error_code ) - ::Validate the input + ::Validate the input set /a "tst=1*!n!" 2>nul if !tst! lss 0 goto error_input if !tst! equ 0 (if not "!n!"=="0" (goto error_input)) - ::Set the limit outputs - set limit=20 + ::Set the limit outputs + set limit=20 - ::Execute the code + ::Execute the code echo.Input: -echo. !n! +echo. !n! echo.Output: for /l %%? in (1,1,!limit!) do ( - set shouldwehalt=1 - for %%A in (!code!) do ( - for /f "tokens=1,2 delims=/" %%B in ("%%A") do ( - set /a "tst=!n! %% %%C" - if !tst! equ 0 ( - if !shouldwehalt! equ 1 ( - set shouldwehalt=0 - set /a "n=n*%%B/%%C" - echo. !n! - ) - ) - ) - ) - if !shouldwehalt! equ 1 goto halt + set shouldwehalt=1 + for %%A in (!code!) do ( + for /f "tokens=1,2 delims=/" %%B in ("%%A") do ( + set /a "tst=!n! %% %%C" + if !tst! equ 0 ( + if !shouldwehalt! equ 1 ( + set shouldwehalt=0 + set /a "n=n*%%B/%%C" + echo. !n! + ) + ) + ) + ) + if !shouldwehalt! equ 1 goto halt ) :halt diff --git a/Task/Fractran/C++/fractran.cpp b/Task/Fractran/C++/fractran.cpp index a3d5f34195..0f68fa192b 100644 --- a/Task/Fractran/C++/fractran.cpp +++ b/Task/Fractran/C++/fractran.cpp @@ -16,44 +16,44 @@ public: copy( istream_iterator( iss ), istream_iterator(), back_inserter >( tmp ) ); string item; vector< pair > v; - pair a; - for( vector::iterator i = tmp.begin(); i != tmp.end(); i++ ) - { - string::size_type pos = ( *i ).find( '/', 0 ); - if( pos != std::string::npos ) - { - a = make_pair( atof( ( ( *i ).substr( 0, pos ) ).c_str() ), atof( ( ( *i ).substr( pos + 1 ) ).c_str() ) ); - v.push_back( a ); - } - } - - exec( &v ); + pair a; + for( vector::iterator i = tmp.begin(); i != tmp.end(); i++ ) + { + string::size_type pos = ( *i ).find( '/', 0 ); + if( pos != std::string::npos ) + { + a = make_pair( atof( ( ( *i ).substr( 0, pos ) ).c_str() ), atof( ( ( *i ).substr( pos + 1 ) ).c_str() ) ); + v.push_back( a ); + } + } + + exec( &v ); } private: void exec( vector< pair >* v ) { - int cnt = 0; - while( cnt < limit ) - { - cout << cnt << " : " << start << "\n"; - cnt++; - vector< pair >::iterator it = v->begin(); - bool found = false; float r; - while( it != v->end() ) - { - r = start * ( ( *it ).first / ( *it ).second ); - if( r == floor( r ) ) - { - found = true; - break; - } - ++it; - } + int cnt = 0; + while( cnt < limit ) + { + cout << cnt << " : " << start << "\n"; + cnt++; + vector< pair >::iterator it = v->begin(); + bool found = false; float r; + while( it != v->end() ) + { + r = start * ( ( *it ).first / ( *it ).second ); + if( r == floor( r ) ) + { + found = true; + break; + } + ++it; + } - if( found ) start = ( int )r; - else break; - } + if( found ) start = ( int )r; + else break; + } } int start, limit; }; diff --git a/Task/Fractran/C/fractran.c b/Task/Fractran/C/fractran.c index 1119b05a77..6931d47852 100644 --- a/Task/Fractran/C/fractran.c +++ b/Task/Fractran/C/fractran.c @@ -4,62 +4,62 @@ typedef struct frac_s *frac; struct frac_s { - int n, d; - frac next; + int n, d; + frac next; }; frac parse(char *s) { - int offset = 0; - struct frac_s h = {0}, *p = &h; + int offset = 0; + struct frac_s h = {0}, *p = &h; - while (2 == sscanf(s, "%d/%d%n", &h.n, &h.d, &offset)) { - s += offset; - p = p->next = malloc(sizeof *p); - *p = h; - p->next = 0; - } + while (2 == sscanf(s, "%d/%d%n", &h.n, &h.d, &offset)) { + s += offset; + p = p->next = malloc(sizeof *p); + *p = h; + p->next = 0; + } - return h.next; + return h.next; } int run(int v, char *s) { - frac n, p = parse(s); - mpz_t val; - mpz_init_set_ui(val, v); + frac n, p = parse(s); + mpz_t val; + mpz_init_set_ui(val, v); -loop: n = p; - if (mpz_popcount(val) == 1) - gmp_printf("\n[2^%d = %Zd]", mpz_scan1(val, 0), val); - else - gmp_printf(" %Zd", val); +loop: n = p; + if (mpz_popcount(val) == 1) + gmp_printf("\n[2^%d = %Zd]", mpz_scan1(val, 0), val); + else + gmp_printf(" %Zd", val); - for (n = p; n; n = n->next) { - // assuming the fractions are not reducible - if (!mpz_divisible_ui_p(val, n->d)) continue; + for (n = p; n; n = n->next) { + // assuming the fractions are not reducible + if (!mpz_divisible_ui_p(val, n->d)) continue; - mpz_divexact_ui(val, val, n->d); - mpz_mul_ui(val, val, n->n); - goto loop; - } + mpz_divexact_ui(val, val, n->d); + mpz_mul_ui(val, val, n->n); + goto loop; + } - gmp_printf("\nhalt: %Zd has no divisors\n", val); + gmp_printf("\nhalt: %Zd has no divisors\n", val); - mpz_clear(val); - while (p) { - n = p->next; - free(p); - p = n; - } + mpz_clear(val); + while (p) { + n = p->next; + free(p); + p = n; + } - return 0; + return 0; } int main(void) { - run(2, "17/91 78/85 19/51 23/38 29/33 77/29 95/23 " - "77/19 1/17 11/13 13/11 15/14 15/2 55/1"); + run(2, "17/91 78/85 19/51 23/38 29/33 77/29 95/23 " + "77/19 1/17 11/13 13/11 15/14 15/2 55/1"); - return 0; + return 0; } diff --git a/Task/Fractran/Delphi/fractran.pas b/Task/Fractran/Delphi/fractran.delphi similarity index 100% rename from Task/Fractran/Delphi/fractran.pas rename to Task/Fractran/Delphi/fractran.delphi diff --git a/Task/Fractran/EasyLang/fractran.easy b/Task/Fractran/EasyLang/fractran.easy deleted file mode 100644 index 1fed677ff9..0000000000 --- a/Task/Fractran/EasyLang/fractran.easy +++ /dev/null @@ -1,38 +0,0 @@ -func[] fractran prog$ val limit . - for s$ in strsplit prog$ " " : n[][] &= number strsplit s$ "/" - for n to limit - r[] &= val - for i to len n[][] - if val mod n[i][2] = 0 : break 1 - . - if i > len n[][] : break 1 - val = val / n[i][2] * n[i][1] - . - return r[] -. -p$ = "17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1" -print fractran p$ 2 15 -# -proc sort &d[] . - for i = 1 to len d[] - 1 - for j = i + 1 to len d[] - if d[j] < d[i] : swap d[j] d[i] - . - . -. -r[] = fractran p$ 2 1000 -sort r[] -i = 1 -prim = 2 -po = 4 -repeat - repeat - if i > len r[] : break 2 - until i > len r[] or r[i] >= po - i += 1 - . - until i > len r[] - if r[i] = po : write prim & " " - prim += 1 - po *= 2 -. diff --git a/Task/Fractran/Elixir/fractran.ex b/Task/Fractran/Elixir/fractran.elixir similarity index 100% rename from Task/Fractran/Elixir/fractran.ex rename to Task/Fractran/Elixir/fractran.elixir diff --git a/Task/Fractran/Fortran/fractran-2.f b/Task/Fractran/Fortran/fractran-2.f index 0422be02be..6a079ed26a 100644 --- a/Task/Fractran/Fortran/fractran-2.f +++ b/Task/Fractran/Fortran/fractran-2.f @@ -1,49 +1,49 @@ - INTEGER FUNCTION FRACTRAN(N,P,Q,M) !Notion devised by J. H. Conway. + INTEGER FUNCTION FRACTRAN(N,P,Q,M) !Notion devised by J. H. Conway. Careful: the rule is N*P/Q being integer. N*6/3 is integer always because this is N*2/1, but 3 may not divide N. Could check GCD(P,Q), dividing out the common denominator so MOD(N,Q) works. - INTEGER*8 N !The work variable. Modified! - INTEGER M !The number of fractions supplied. + INTEGER*8 N !The work variable. Modified! + INTEGER M !The number of fractions supplied. INTEGER P(M),Q(M)!The terms of the fractions. - INTEGER I !A stepper. - DO I = 1,M !Search the supplied fractions, P(i)/Q(i). - IF (MOD(N,Q(I)).EQ.0) THEN !Does the denominator divide N? - N = N/Q(I)*P(I) !Yes, compute N*P/Q but trying to dodge overflow. - FRACTRAN = I !Report the hit. - RETURN !Done! - END IF !Otherwise, - END DO !Try the next fraction in the order supplied. - FRACTRAN = 0 !No hit. - END FUNCTION FRACTRAN !That's it! Even so, "Turing complete"... + INTEGER I !A stepper. + DO I = 1,M !Search the supplied fractions, P(i)/Q(i). + IF (MOD(N,Q(I)).EQ.0) THEN !Does the denominator divide N? + N = N/Q(I)*P(I) !Yes, compute N*P/Q but trying to dodge overflow. + FRACTRAN = I !Report the hit. + RETURN !Done! + END IF !Otherwise, + END DO !Try the next fraction in the order supplied. + FRACTRAN = 0 !No hit. + END FUNCTION FRACTRAN !That's it! Even so, "Turing complete"... PROGRAM POKE - INTEGER FRACTRAN !Not the default type of function. - INTEGER P(66),Q(66) !Holds the fractions as P(i)/Q(i). - INTEGER*8 N !The working number. - INTEGER I,IT,L,M !Assistants. + INTEGER FRACTRAN !Not the default type of function. + INTEGER P(66),Q(66) !Holds the fractions as P(i)/Q(i). + INTEGER*8 N !The working number. + INTEGER I,IT,L,M !Assistants. - WRITE (6,1) !Announce. + WRITE (6,1) !Announce. 1 FORMAT ("Interpreter for J.H. Conway's FRACTRAN language.") Chew into an example programme. - OPEN (10,FILE = "Fractran.txt",STATUS="OLD",ACTION="READ") !Rather than compiled-in stuff. - READ (10,*) L !I need to know this without having to scan the input. - WRITE (6,2) L !Reveal in case of trouble. - 2 FORMAT (I0," fractions, as follow:") !Should the input evoke problems. - READ (10,*) (P(I),Q(I),I = 1,L) !Ask for the specified number of P,Q pairs. - WRITE (6,3) (P(I),Q(I),I = 1,L) !Show what turned up. - 3 FORMAT (24(I0,"/",I0:", ")) !As P(i)/Q(i) pairs. The colon means that there will be no trailing comma. - READ (10,*) N,M !The start value, and the step limit. - CLOSE (10) !Finished with input. - WRITE (6,4) N,M !Hopefully, all went well. + OPEN (10,FILE = "Fractran.txt",STATUS="OLD",ACTION="READ") !Rather than compiled-in stuff. + READ (10,*) L !I need to know this without having to scan the input. + WRITE (6,2) L !Reveal in case of trouble. + 2 FORMAT (I0," fractions, as follow:") !Should the input evoke problems. + READ (10,*) (P(I),Q(I),I = 1,L) !Ask for the specified number of P,Q pairs. + WRITE (6,3) (P(I),Q(I),I = 1,L) !Show what turned up. + 3 FORMAT (24(I0,"/",I0:", ")) !As P(i)/Q(i) pairs. The colon means that there will be no trailing comma. + READ (10,*) N,M !The start value, and the step limit. + CLOSE (10) !Finished with input. + WRITE (6,4) N,M !Hopefully, all went well. 4 FORMAT ("Start with N = ",I0,", step limit ",I0) Commence. - WRITE (6,10) 0,N !Splat a heading. - 10 FORMAT (/," Step #F: N",/,I6,4X,": ",I0) !Matched FORMAT 11. - DO I = 1,M !Here we go! - IT = FRACTRAN(N,P,Q,L) !Do it! - WRITE (6,11) I,IT,N !Show it! - 11 FORMAT (I6,I4,": ",I0) !N last, as it may be big. - IF (IT.LE.0) EXIT !No hit, so quit. - END DO !The next step. - END !Whee! + WRITE (6,10) 0,N !Splat a heading. + 10 FORMAT (/," Step #F: N",/,I6,4X,": ",I0) !Matched FORMAT 11. + DO I = 1,M !Here we go! + IT = FRACTRAN(N,P,Q,L) !Do it! + WRITE (6,11) I,IT,N !Show it! + 11 FORMAT (I6,I4,": ",I0) !N last, as it may be big. + IF (IT.LE.0) EXIT !No hit, so quit. + END DO !The next step. + END !Whee! diff --git a/Task/Fractran/Fortran/fractran-3.f b/Task/Fractran/Fortran/fractran-3.f index 8fdab8dd61..1a409a7c11 100644 --- a/Task/Fractran/Fortran/fractran-3.f +++ b/Task/Fractran/Fortran/fractran-3.f @@ -1,11 +1,11 @@ - DO I = 1,M !Here we go! - IT = FRACTRAN(N,P,Q,L) !Do it! - IF (POPCNT(N).EQ.1) WRITE (6,11) I,IT,N !Show it! - 11 FORMAT (I6,I4,": ",I0) !N last, as it may be big. - IF (IT.LE.0) EXIT !No hit, so quit. - IF (N.LE.0) THEN !Otherwise, worry about overflow. - WRITE (6,*) "Integer overflow!" !Justified. The test is not certain. - WRITE (6,11) I,IT,N !Alas, the step failed. - EXIT !Give in. - END IF !So much for overflow. - END DO !The next step. + DO I = 1,M !Here we go! + IT = FRACTRAN(N,P,Q,L) !Do it! + IF (POPCNT(N).EQ.1) WRITE (6,11) I,IT,N !Show it! + 11 FORMAT (I6,I4,": ",I0) !N last, as it may be big. + IF (IT.LE.0) EXIT !No hit, so quit. + IF (N.LE.0) THEN !Otherwise, worry about overflow. + WRITE (6,*) "Integer overflow!" !Justified. The test is not certain. + WRITE (6,11) I,IT,N !Alas, the step failed. + EXIT !Give in. + END IF !So much for overflow. + END DO !The next step. diff --git a/Task/Fractran/Fortran/fractran-4.f b/Task/Fractran/Fortran/fractran-4.f index 7e4093fbcd..367c6d7833 100644 --- a/Task/Fractran/Fortran/fractran-4.f +++ b/Task/Fractran/Fortran/fractran-4.f @@ -1,187 +1,187 @@ - MODULE CONWAYSIDEA !Notion devised by J. H. Conway. - USE PRIMEBAG !This is a common need. - INTEGER LASTP,ENUFF !Some size allowances. - PARAMETER (LASTP = 66, ENUFF = 66) !Should suffice for the example in mind. - INTEGER NPPOW(1:LASTP) !Represent N as a collection of powers of prime numbers. - TYPE FACTORED !But represent P and Q of freaction = P/Q - INTEGER PNUM(0:LASTP) !As a list of prime number indices with PNUM(0) the count. - INTEGER PPOW(LASTP) !And the powers. for the fingered primes. - END TYPE FACTORED !Rather than as a simple number multiplied out. - TYPE(FACTORED) FP(ENUFF),FQ(ENUFF) !Thus represent a factored fraction, P(i)/Q(i). - INTEGER PLIVE(ENUFF),NL !Helps subroutine SHOWN display NPPOW. - CONTAINS !Now for the details. - SUBROUTINE SHOWFACTORS(N) !First, to show an internal data structure. - TYPE(FACTORED) N !It is supplied as a list of prime factors. - INTEGER I !A stepper. - DO I = 1,N.PNUM(0) !Step along the list. - IF (I.GT.1) WRITE (MSG,"('x',$)") !Append a glyph for "multiply". - WRITE (MSG,"(I0,$)") PRIME(N.PNUM(I)) !The prime fingered in the list. - IF (N.PPOW(I).GT.1) WRITE (MSG,"('^',I0,$)") N.PPOW(I) !With an interesting power? - END DO !On to the next element in the list. - WRITE (MSG,1) N.PNUM(0) !End the line - 1 FORMAT (": Factor count ",I0) !With a count of prime factors. - END SUBROUTINE SHOWFACTORS !Hopefully, this will not be needed often. + MODULE CONWAYSIDEA !Notion devised by J. H. Conway. + USE PRIMEBAG !This is a common need. + INTEGER LASTP,ENUFF !Some size allowances. + PARAMETER (LASTP = 66, ENUFF = 66) !Should suffice for the example in mind. + INTEGER NPPOW(1:LASTP) !Represent N as a collection of powers of prime numbers. + TYPE FACTORED !But represent P and Q of freaction = P/Q + INTEGER PNUM(0:LASTP) !As a list of prime number indices with PNUM(0) the count. + INTEGER PPOW(LASTP) !And the powers. for the fingered primes. + END TYPE FACTORED !Rather than as a simple number multiplied out. + TYPE(FACTORED) FP(ENUFF),FQ(ENUFF) !Thus represent a factored fraction, P(i)/Q(i). + INTEGER PLIVE(ENUFF),NL !Helps subroutine SHOWN display NPPOW. + CONTAINS !Now for the details. + SUBROUTINE SHOWFACTORS(N) !First, to show an internal data structure. + TYPE(FACTORED) N !It is supplied as a list of prime factors. + INTEGER I !A stepper. + DO I = 1,N.PNUM(0) !Step along the list. + IF (I.GT.1) WRITE (MSG,"('x',$)") !Append a glyph for "multiply". + WRITE (MSG,"(I0,$)") PRIME(N.PNUM(I)) !The prime fingered in the list. + IF (N.PPOW(I).GT.1) WRITE (MSG,"('^',I0,$)") N.PPOW(I) !With an interesting power? + END DO !On to the next element in the list. + WRITE (MSG,1) N.PNUM(0) !End the line + 1 FORMAT (": Factor count ",I0) !With a count of prime factors. + END SUBROUTINE SHOWFACTORS !Hopefully, this will not be needed often. - TYPE(FACTORED) FUNCTION FACTOR(IT) !Into a list of primes and their powers. - INTEGER IT,N !The number and a copy to damage. - INTEGER P,POW !A stepper and a power. - INTEGER F,NF !A factor and a counter. - IF (IT.LE.0) STOP "Factor only positive numbers!" !Or else... - N = IT !A copy I can damage. - NF = 0 !No factors found. - P = 0 !Because no primes have been tried. - PP:DO WHILE (N.GT.1) !Step through the possibilities. - P = P + 1 !Another prime impends. - F = PRIME(P) !Grab a possible factor. - POW = 0 !It has no power yet. - FP:DO WHILE(MOD(N,F).EQ.0) !Well? - POW = POW + 1 !Count a factor.. - N = N/F !Reduce the number. - END DO FP !The P'th prime's power's produced. - IF (POW.GT.0) THEN !So, was it a factor? - IF (NF.GE.LASTP) THEN !Yes. Have I room in the list? - WRITE (MSG,1) IT,LASTP !Alas. + TYPE(FACTORED) FUNCTION FACTOR(IT) !Into a list of primes and their powers. + INTEGER IT,N !The number and a copy to damage. + INTEGER P,POW !A stepper and a power. + INTEGER F,NF !A factor and a counter. + IF (IT.LE.0) STOP "Factor only positive numbers!" !Or else... + N = IT !A copy I can damage. + NF = 0 !No factors found. + P = 0 !Because no primes have been tried. + PP:DO WHILE (N.GT.1) !Step through the possibilities. + P = P + 1 !Another prime impends. + F = PRIME(P) !Grab a possible factor. + POW = 0 !It has no power yet. + FP:DO WHILE(MOD(N,F).EQ.0) !Well? + POW = POW + 1 !Count a factor.. + N = N/F !Reduce the number. + END DO FP !The P'th prime's power's produced. + IF (POW.GT.0) THEN !So, was it a factor? + IF (NF.GE.LASTP) THEN !Yes. Have I room in the list? + WRITE (MSG,1) IT,LASTP !Alas. 1 FORMAT ("Factoring ",I0," but with provision for only ", 1 I0," prime factors!") - FACTOR.PNUM(0) = NF !Place the count so far, + FACTOR.PNUM(0) = NF !Place the count so far, CALL SHOWFACTORS(FACTOR)!So this can be invoked. - STOP "Not enough storage!" !Quite. - END IF !But normally, - NF = NF + 1 !Admit another factor. - FACTOR.PNUM(NF) = P !Identify the prime. NOT the prime itself. - FACTOR.PPOW(NF) = POW !Place its power. - END IF !So much for that factor. - END DO PP !Try another prime, if N > 1 still. - FACTOR.PNUM(0) = NF !Place the count. - END FUNCTION FACTOR !Thus, a list of primes and their powers. + STOP "Not enough storage!" !Quite. + END IF !But normally, + NF = NF + 1 !Admit another factor. + FACTOR.PNUM(NF) = P !Identify the prime. NOT the prime itself. + FACTOR.PPOW(NF) = POW !Place its power. + END IF !So much for that factor. + END DO PP !Try another prime, if N > 1 still. + FACTOR.PNUM(0) = NF !Place the count. + END FUNCTION FACTOR !Thus, a list of primes and their powers. - INTEGER FUNCTION GCD(I,J) !Greatest common divisor. - INTEGER I,J !Of these two integers. - INTEGER N,M,R !Workers. - N = MAX(I,J) !Since I don't want to damage I or J, - M = MIN(I,J) !These copies might as well be the right way around. - 1 R = MOD(N,M) !Divide N by M to get the remainder R. - IF (R.GT.0) THEN !Remainder zero? - N = M !No. Descend a level. - M = R !M-multiplicity has been removed from N. - IF (R .GT. 1) GO TO 1 !No point dividing by one. - END IF !If R = 0, M divides N. - GCD = M !There we are. - END FUNCTION GCD !Euclid lives on! + INTEGER FUNCTION GCD(I,J) !Greatest common divisor. + INTEGER I,J !Of these two integers. + INTEGER N,M,R !Workers. + N = MAX(I,J) !Since I don't want to damage I or J, + M = MIN(I,J) !These copies might as well be the right way around. + 1 R = MOD(N,M) !Divide N by M to get the remainder R. + IF (R.GT.0) THEN !Remainder zero? + N = M !No. Descend a level. + M = R !M-multiplicity has been removed from N. + IF (R .GT. 1) GO TO 1 !No point dividing by one. + END IF !If R = 0, M divides N. + GCD = M !There we are. + END FUNCTION GCD !Euclid lives on! - INTEGER FUNCTION FRACTRAN(L) !Applies Conway's idea to a list of fractions. + INTEGER FUNCTION FRACTRAN(L) !Applies Conway's idea to a list of fractions. Could abandon all parameters since global variables have the details... - INTEGER L !The last fraction to consider. - INTEGER I,NF !Assistants. - DO I = 1,L !Step through the fractions in the order they were given. - NF = FQ(I).PNUM(0) !How many factors are listed in FQ(I)? - IF (ALL(NPPOW(FQ(I).PNUM(1:NF)) !Can N (as NPPOW) be divided by Q (as FQ)? - 1 .GE. FQ(I).PPOW(1:NF))) THEN !By comparing the supplies of prime factors. - FRACTRAN = I !Yes! - NPPOW(FQ(I).PNUM(1:NF)) = NPPOW(FQ(I).PNUM(1:NF)) !Remove prime powers from N - 1 - FQ(I).PPOW(1:NF) !Corresponding to Q. - NF = FP(I).PNUM(0) !Add powers to N - NPPOW(FP(I).PNUM(1:NF)) = NPPOW(FP(I).PNUM(1:NF)) !Corresponding to P. - 1 + FP(I).PPOW(1:NF) !Thus, N = N/Q*P. - RETURN !That's all it takes! No multiplies nor divides! - END IF !So much for that fraction. - END DO !This relies on ALL(zero tests) yielding true, as when Q = 1. - FRACTRAN = 0 !No hit. - END FUNCTION FRACTRAN !No massive multi-precision arithmetic! + INTEGER L !The last fraction to consider. + INTEGER I,NF !Assistants. + DO I = 1,L !Step through the fractions in the order they were given. + NF = FQ(I).PNUM(0) !How many factors are listed in FQ(I)? + IF (ALL(NPPOW(FQ(I).PNUM(1:NF)) !Can N (as NPPOW) be divided by Q (as FQ)? + 1 .GE. FQ(I).PPOW(1:NF))) THEN !By comparing the supplies of prime factors. + FRACTRAN = I !Yes! + NPPOW(FQ(I).PNUM(1:NF)) = NPPOW(FQ(I).PNUM(1:NF)) !Remove prime powers from N + 1 - FQ(I).PPOW(1:NF) !Corresponding to Q. + NF = FP(I).PNUM(0) !Add powers to N + NPPOW(FP(I).PNUM(1:NF)) = NPPOW(FP(I).PNUM(1:NF)) !Corresponding to P. + 1 + FP(I).PPOW(1:NF) !Thus, N = N/Q*P. + RETURN !That's all it takes! No multiplies nor divides! + END IF !So much for that fraction. + END DO !This relies on ALL(zero tests) yielding true, as when Q = 1. + FRACTRAN = 0 !No hit. + END FUNCTION FRACTRAN !No massive multi-precision arithmetic! - SUBROUTINE SHOWN(S,F) !Service routine to show the state after a step is calculated. + SUBROUTINE SHOWN(S,F) !Service routine to show the state after a step is calculated. Could imaging a function I6FMT(23) that returns " 23" and " " for non-positive numbers. Can't do it, as if this were invoked via a WRITE statement, re-entrant use of WRITE usually fails. - INTEGER S,F !Step number, Fraction number. - INTEGER I !A stepper. - CHARACTER*(9+4+1 + NL*6) ALINE !A scratchpad matching FORMAT 103. - WRITE (ALINE,103) S,F,NPPOW(PLIVE(1:NL)) !Show it! - 103 FORMAT (I9,I4,":",I6) !As a sequence of powers of primes. - IF (F.LE.0) ALINE(10:13) = "" !Scrub when no fraction is fingered. - DO I = 1,NL !Step along the live primes. - IF (NPPOW(PLIVE(I)).GT.0) CYCLE !Ignoring the empowered ones. - ALINE(15 + (I - 1)*6:14 + I*6) = "" !Blank out zero powers. - END DO !On to the next. - WRITE (MSG,"(A)") ALINE !Reveal at last. - END SUBROUTINE SHOWN !A struggle. - END MODULE CONWAYSIDEA !Simple... + INTEGER S,F !Step number, Fraction number. + INTEGER I !A stepper. + CHARACTER*(9+4+1 + NL*6) ALINE !A scratchpad matching FORMAT 103. + WRITE (ALINE,103) S,F,NPPOW(PLIVE(1:NL)) !Show it! + 103 FORMAT (I9,I4,":",I6) !As a sequence of powers of primes. + IF (F.LE.0) ALINE(10:13) = "" !Scrub when no fraction is fingered. + DO I = 1,NL !Step along the live primes. + IF (NPPOW(PLIVE(I)).GT.0) CYCLE !Ignoring the empowered ones. + ALINE(15 + (I - 1)*6:14 + I*6) = "" !Blank out zero powers. + END DO !On to the next. + WRITE (MSG,"(A)") ALINE !Reveal at last. + END SUBROUTINE SHOWN !A struggle. + END MODULE CONWAYSIDEA !Simple... PROGRAM POKE - USE CONWAYSIDEA !But, where does he get his ideas from? - INTEGER P(ENUFF),Q(ENUFF) !Holds the fractions as P(i)/Q(i). - INTEGER N !The working number. - INTEGER LF !Last fraction given. - INTEGER LP !Last prime needed. - INTEGER MS !Maximum number of steps. - INTEGER I,IT !Assistants. - LOGICAL*1 PUSED(ENUFF) !Track the usage of prime numbers, + USE CONWAYSIDEA !But, where does he get his ideas from? + INTEGER P(ENUFF),Q(ENUFF) !Holds the fractions as P(i)/Q(i). + INTEGER N !The working number. + INTEGER LF !Last fraction given. + INTEGER LP !Last prime needed. + INTEGER MS !Maximum number of steps. + INTEGER I,IT !Assistants. + LOGICAL*1 PUSED(ENUFF) !Track the usage of prime numbers, - MSG = 6 !Standard output. - WRITE (6,1) !Announce. + MSG = 6 !Standard output. + WRITE (6,1) !Announce. 1 FORMAT ("Interpreter for J. H. Conway's FRACTRAN language.") Chew into an example programme. - 10 OPEN (10,FILE = "Fractran.txt",STATUS="OLD",ACTION="READ") !Rather than compiled-in stuff. - READ (10,*) LF !I need to know this without having to scan the input. - WRITE (MSG,11) LF !Reveal in case of trouble. - 11 FORMAT (I0," fractions, as follow:") !Should the input evoke problems. - READ (10,*) (P(I),Q(I),I = 1,LF) !Ask for the specified number of P,Q pairs. - WRITE (MSG,12) (P(I),Q(I),I = 1,LF) !Show what turned up. - 12 FORMAT (24(I0,"/",I0:", ")) !As P(i)/Q(i) pairs. The colon means that there will be no trailing comma. - READ (10,*) N,MS !The start value, and the step limit. - CLOSE (10) !Finished with input. - WRITE (MSG,13) N,MS !Hopefully, all went well. + 10 OPEN (10,FILE = "Fractran.txt",STATUS="OLD",ACTION="READ") !Rather than compiled-in stuff. + READ (10,*) LF !I need to know this without having to scan the input. + WRITE (MSG,11) LF !Reveal in case of trouble. + 11 FORMAT (I0," fractions, as follow:") !Should the input evoke problems. + READ (10,*) (P(I),Q(I),I = 1,LF) !Ask for the specified number of P,Q pairs. + WRITE (MSG,12) (P(I),Q(I),I = 1,LF) !Show what turned up. + 12 FORMAT (24(I0,"/",I0:", ")) !As P(i)/Q(i) pairs. The colon means that there will be no trailing comma. + READ (10,*) N,MS !The start value, and the step limit. + CLOSE (10) !Finished with input. + WRITE (MSG,13) N,MS !Hopefully, all went well. 13 FORMAT ("Start with N = ",I0,", step limit ",I0) - IF (.NOT.GRASPPRIMEBAG(66)) STOP "Gan't grab my file of primes!" !Attempt in hope. + IF (.NOT.GRASPPRIMEBAG(66)) STOP "Gan't grab my file of primes!" !Attempt in hope. Convert the starting number to a more convenient form, an array of powers of successive prime numbers. - 20 FP(1) = FACTOR(N) !Borrow one of the factor list variables. - NPPOW = 0 !Clear all prime factor counts. - DO I = 1,FP(1).PNUM(0) !Now find what they are. - NPPOW(FP(1).PNUM(I)) = FP(1).PPOW(I) !Convert from a variable-length list - END DO !To a fixed-length random-access array. - PUSED = NPPOW.GT.0 !Note which primes have been used. - LP = FP(1).PNUM(FP(1).PNUM(0)) !Recall the last prime required. More later. + 20 FP(1) = FACTOR(N) !Borrow one of the factor list variables. + NPPOW = 0 !Clear all prime factor counts. + DO I = 1,FP(1).PNUM(0) !Now find what they are. + NPPOW(FP(1).PNUM(I)) = FP(1).PPOW(I) !Convert from a variable-length list + END DO !To a fixed-length random-access array. + PUSED = NPPOW.GT.0 !Note which primes have been used. + LP = FP(1).PNUM(FP(1).PNUM(0)) !Recall the last prime required. More later. Convert the supplied P(i)/Q(i) fractions to lists of prime number factors and powers in FP(i) and FQ(i). - DO I = 1,LF !Step through the fractions. - IT = GCD(P(I),Q(I)) !Suspicion. - IF (IT.GT.1) THEN !Justified? - WRITE (MSG,21) I,P(I),Q(I),IT !Alas. Complain. The rule is N*(P/Q) being integer. + DO I = 1,LF !Step through the fractions. + IT = GCD(P(I),Q(I)) !Suspicion. + IF (IT.GT.1) THEN !Justified? + WRITE (MSG,21) I,P(I),Q(I),IT !Alas. Complain. The rule is N*(P/Q) being integer. 21 FORMAT ("Fraction ",I3,", ",I0,"/",I0,!N*6/3 is integer always because this is N*2/1, but 3 may not divide N. - 1 " has common factor ",I0,"!") !By removing IT, - P(I) = P(I)/IT !The test need merely check if N is divisible by Q. - Q(I) = Q(I)/IT !And, as N is factorised in NPPOW - END IF !And Q in FQ, subtractions of powers only is needed. - FP(I) = FACTOR(P(I)) !Righto, form the factor list for P. - PUSED(FP(I).PNUM(1:FP(I).PNUM(0))) = .TRUE. !Mark which primes it fingers. - LP = MAX(LP,FP(I).PNUM(FP(I).PNUM(0))) !One has no prime factors: PNUM(0) = 0. - FQ(I) = FACTOR(Q(I)) !And likewise for Q. - PUSED(FQ(I).PNUM(1:FQ(I).PNUM(0))) = .TRUE. !Some primes may be omitted. - LP = MAX(LP,FQ(I).PNUM(FQ(I).PNUM(0))) !If no prime factors, PNUM(0) fingers element zero, which is zero. - END DO !All this messing about saves on multiplication and division. + 1 " has common factor ",I0,"!") !By removing IT, + P(I) = P(I)/IT !The test need merely check if N is divisible by Q. + Q(I) = Q(I)/IT !And, as N is factorised in NPPOW + END IF !And Q in FQ, subtractions of powers only is needed. + FP(I) = FACTOR(P(I)) !Righto, form the factor list for P. + PUSED(FP(I).PNUM(1:FP(I).PNUM(0))) = .TRUE. !Mark which primes it fingers. + LP = MAX(LP,FP(I).PNUM(FP(I).PNUM(0))) !One has no prime factors: PNUM(0) = 0. + FQ(I) = FACTOR(Q(I)) !And likewise for Q. + PUSED(FQ(I).PNUM(1:FQ(I).PNUM(0))) = .TRUE. !Some primes may be omitted. + LP = MAX(LP,FQ(I).PNUM(FQ(I).PNUM(0))) !If no prime factors, PNUM(0) fingers element zero, which is zero. + END DO !All this messing about saves on multiplication and division. Check which primes are in use, preparing an index of live primes.. - NL = 0 !No live primes. - DO I = 1,LP !Check up to the last prime. - IF (PUSED(I)) THEN !This one used? - NL = NL + 1 !Yes. Another. - PLIVE(NL) = I !Fingered. - END IF !So much for that prime. - END DO !On to the next. - WRITE (MSG,22) NL,LP,PRIME(LP) !Remark on usage. - 22 FORMAT ("Require ",I0," primes only, up to Prime(",I0,") = ",I0) !Presume always more than one prime. + NL = 0 !No live primes. + DO I = 1,LP !Check up to the last prime. + IF (PUSED(I)) THEN !This one used? + NL = NL + 1 !Yes. Another. + PLIVE(NL) = I !Fingered. + END IF !So much for that prime. + END DO !On to the next. + WRITE (MSG,22) NL,LP,PRIME(LP) !Remark on usage. + 22 FORMAT ("Require ",I0," primes only, up to Prime(",I0,") = ",I0) !Presume always more than one prime. IF (LP.GT.LASTP) STOP "But, that's too many for array NPPOW!" Cast forth a heading. - 100 WRITE (MSG,101) (PRIME(PLIVE(I)), I = 1,NL) !Splat a heading. - 101 FORMAT (/,14X,"N as powers of prime factors",/, !The prime heading, - 1 5X,"Step F#:",I6) !With primes beneath. - CALL SHOWN(0,0) !Initial state of N as NPPOW. Step zero, no fraction. + 100 WRITE (MSG,101) (PRIME(PLIVE(I)), I = 1,NL) !Splat a heading. + 101 FORMAT (/,14X,"N as powers of prime factors",/, !The prime heading, + 1 5X,"Step F#:",I6) !With primes beneath. + CALL SHOWN(0,0) !Initial state of N as NPPOW. Step zero, no fraction. Commence! - DO I = 1,MS !Here we go! - IT = FRACTRAN(LF) !Do it! - CALL SHOWN(I,IT) !Show it! - IF (IT.LE.0) EXIT !Quit it? - END DO !The next step. + DO I = 1,MS !Here we go! + IT = FRACTRAN(LF) !Do it! + CALL SHOWN(I,IT) !Show it! + IF (IT.LE.0) EXIT !Quit it? + END DO !The next step. Complete! - END !Whee! + END !Whee! diff --git a/Task/Fractran/Fortran/fractran-5.f b/Task/Fractran/Fortran/fractran-5.f index 8bf75352db..65e4304ded 100644 --- a/Task/Fractran/Fortran/fractran-5.f +++ b/Task/Fractran/Fortran/fractran-5.f @@ -1,5 +1,5 @@ - DO I = 1,MS !Here we go! - IT = FRACTRAN(LF) !Do it! - IF (ALL(NPPOW(2:LP).EQ.0)) CALL SHOWN(I,IT) !Show it! - IF (IT.LE.0) EXIT !Quit it? - END DO !The next step. + DO I = 1,MS !Here we go! + IT = FRACTRAN(LF) !Do it! + IF (ALL(NPPOW(2:LP).EQ.0)) CALL SHOWN(I,IT) !Show it! + IF (IT.LE.0) EXIT !Quit it? + END DO !The next step. diff --git a/Task/Fractran/Julia/fractran.jl b/Task/Fractran/Julia/fractran.jl deleted file mode 100644 index 87f70c2989..0000000000 --- a/Task/Fractran/Julia/fractran.jl +++ /dev/null @@ -1,70 +0,0 @@ -using .Iterators, BenchmarkTools -using Primes: Factorization, factor - -# type alias for abbreviation -Factors = Factorization{Int} - -# iterable stuct with parametric type polymorphism -struct Fractran{T} - program::Vector{@NamedTuple{num::T, den::T}} - input::Int - - # inner constructor - function Fractran{T}(program::Vector{Rational{Int}}, input::Int) where T - c = Dict(BigInt => identity, Factors => factor)[T] - new{T}([(num = c(f.num), den = c(f.den)) for f ∈ program], input) - end -end - -# methods for Fractran with n::BigInt -Base.iterate(ft::Fractran{BigInt}, n = big(ft.input)) = - for f ∈ ft.program - if iszero(n % f.den) - n = n ÷ f.den * f.num - return n, n - end - end - -iters(ft::Fractran{BigInt}) = ft - -output(ft::Fractran{BigInt}) = (trailing_zeros(n) for n ∈ ft if ispow2(n)) - -# methods for Fractran with n::Factorization{Int} -Base.iterate(ft::Fractran{Factors}, n = factor(ft.input)) = - for f ∈ ft.program - if all(n[p] ≥ e for (p, e) ∈ f.den) - for (p, e) ∈ f.den n[p] -= e end - for (p, e) ∈ f.num n[p] += e end - return n, n - end - end - -iters(ft::Fractran{Factors}) = (prod(n) for n ∈ ft) - -output(ft::Fractran{Factors}) = (n[2] for n ∈ ft if - all((iszero(e) || (p == 2)) for (p, e) ∈ n)) - -# convenient Fractran scripting -macro ft_str(s::String) - eval(Meta.parse(replace("[$s]", "/" => "//"))) -end - -# instantiation of Fractran example generating prime numbers -primes(T) = Fractran{T}(ft"17/91, 78/85, 19/51, 23/38, 29/33, 77/29, - 95/23, 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1", 2) - -# Output including Benchmark -ilim = 20; plim = 45 - -function printout(T) - println("\n$ilim iterations and output of $plim prime numbers using ", T) - println(join(take(iters(primes(T)), ilim), ", "), "…") - join(stdout, take(output(primes(T)), plim), ", ") - print("…\nBenchmark: $plim primes in") -end - -printout(BigInt) -@btime collect(take(output(primes(BigInt)), plim)) - -printout(Factors) -@btime collect(take(output(primes(Factors)), plim)); diff --git a/Task/Fractran/Julia/fractran.julia b/Task/Fractran/Julia/fractran.julia new file mode 100644 index 0000000000..a590a05890 --- /dev/null +++ b/Task/Fractran/Julia/fractran.julia @@ -0,0 +1,41 @@ +# FRACTRAN interpreter implemented as an iterable struct + +using .Iterators: filter, map, take + +struct Fractran + rs::Vector{Rational{BigInt}} + i₀::BigInt + limit::Int +end + +Base.iterate(f::Fractran, i = f.i₀) = + for r in f.rs + if iszero(i % r.den) + i = i ÷ r.den * r.num + return i, i + end + end + +interpret(f::Fractran) = + take( + map(trailing_zeros, + filter(ispow2, f)) + f.limit) + +Base.show(io::IO, f::Fractran) = + join(io, interpret(f), ' ') + +macro code_str(s) + [eval(Meta.parse(replace(t, "/" => "//"))) for t ∈ split(s)] +end + +primes = Fractran(code"17/91 78/85 19/51 23/38 29/33 77/29 95/23 + 77/19 1/17 11/13 13/11 15/14 15/2 55/1", 2, 30) + +# Output +println("First 25 iterations of FRACTRAN program 'primes':\n2 ", + join(take(primes, 25), ' ')) + +println("\nWatch the first 30 primes dropping out within seconds:") + +primes diff --git a/Task/Fractran/Kotlin/fractran.kts b/Task/Fractran/Kotlin/fractran.kotlin similarity index 100% rename from Task/Fractran/Kotlin/fractran.kts rename to Task/Fractran/Kotlin/fractran.kotlin diff --git a/Task/Fractran/Miranda/fractran.miranda b/Task/Fractran/Miranda/fractran.miranda deleted file mode 100644 index c1f844d524..0000000000 --- a/Task/Fractran/Miranda/fractran.miranda +++ /dev/null @@ -1,80 +0,0 @@ -main :: [sys_message] -main = [Stdout (lay [show (take 15 (run 2 primeprog)), - show (take 20 fracprimes)])] - -primeprog :: [(num,num)] -primeprog = fromjust (prog ("17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 " - ++ "1/17 11/13 13/11 15/14 15/2 55/1")) - -fracprimes :: [num] -fracprimes = [fromjust k | k<-map fracprime (run 2 primeprog); isjust k] - -fracprime :: num->maybe num -fracprime = f 0 - where f 1 1 = Nothing - f n 1 = Just n - f n x = Nothing, if x mod 2 ~= 0 - f n x = f (n+1) (x div 2), otherwise - -run :: num->[(num,num)]->[num] -run n prog = [n], if ~isjust n' - = n : run (fromjust n') prog, otherwise - where n' = step n prog - -step :: num->[(num,num)]->maybe num -step x [] = Nothing -step x ((n,d):xs) = Just (x*n div d), if x*n mod d = 0 - = step x xs, otherwise - -maybe * ::= Nothing | Just * - -isjust :: maybe *->bool -isjust (Just x) = True -isjust Nothing = False - -fromjust :: maybe *->* -fromjust (Just x) = x - -prog :: [char]->maybe [(num, num)] -prog xs = Just [], if trim xs = [] - = Nothing, if ~isjust fp \/ ~isjust rp - = Just (fr : fromjust rp), otherwise - where fp = frac xs - Just (fr, xs') = fp - rp = prog xs' - -frac :: [char]->maybe ((num,num), [char]) -frac xs = Nothing, if ~isjust np \/ ~isjust sl \/ ~isjust dp - = Just ((n, d), xs'''), otherwise - where np = numb xs - Just (n, xs') = np - sl = match '/' (trim xs') - Just xs'' = sl - dp = numb xs'' - Just (d, xs''') = dp - -numb :: [char]->maybe (num, [char]) -numb xs = Nothing, if n=[] - = Just (numval n, r), otherwise - where (n, r) = span "0123456789" (trim xs) - -match :: *->[*]->maybe [*] -match m [] = Nothing -match m (m:xs) = Just xs -match m (x:xs) = Nothing - -span :: [*]->[*]->([*],[*]) -span match [] = ([], []) -span match (x:xs) = ([], x:xs), if ~(x $in match) - = (x:r, xs'), otherwise - where (r, xs') = span match xs - -in :: *->[*]->bool -in x [] = False -in x (x:xs) = True -in x (y:xs) = x $in xs - -trim :: [char]->[char] -trim [] = [] -trim (c:xs) = trim xs, if c='\t' \/ c='\n' \/ c=' ' -trim (c:xs) = c:xs diff --git a/Task/Fractran/OCaml/fractran.ml b/Task/Fractran/OCaml/fractran.ocaml similarity index 100% rename from Task/Fractran/OCaml/fractran.ml rename to Task/Fractran/OCaml/fractran.ocaml diff --git a/Task/Fractran/Odin/fractran.odin b/Task/Fractran/Odin/fractran.odin deleted file mode 100644 index 118e1b4333..0000000000 --- a/Task/Fractran/Odin/fractran.odin +++ /dev/null @@ -1,77 +0,0 @@ -package main - -import "core:fmt" -import "core:os" -import "core:strconv" -import "core:strings" -import "core:text/match" -import "core:math" - - -main :: proc() { - // fmt.println(os.args) - - n:int - number:int - number_conv:bool - fracts:[dynamic]int - defer delete(fracts) - - n,number_conv = strconv.parse_int(os.args[1]) - assert(number_conv, "Number must be given in first place!") - assert(len(os.args)>1,"no command line arguments given") - - data:="17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1" - - ss := strings.split(string(data), " ") - defer delete(ss) - - - a: [dynamic]string - dummy:[]string - defer delete(a) - defer delete(dummy) - - for i in ss{ - dummy =strings.split(i,"/") - for j in dummy{ - // fmt.println(j) - - append_elem(&a,j) - } - } - - for k in a{ - // fmt.println(k) - number,number_conv = strconv.parse_int(k) - assert(number_conv, "Number must be given in program") - append_elem(&fracts,number) - } - - - // fmt.println(len(fracts)) - cond:int - buf: [256]byte - bb:int - end:=0 - fmt.println(n) - frac: for j:=0;jnew($_), qw{ $|=1; MAIN: for( 1 .. 5000 ) { - print " " if $_ > 1; - my ($pow, $rest) = (0, $n->copy); - until( $rest->is_odd ) { - ++$pow; - $rest->bdiv(2); - } - if( $rest->is_one ) { - print "2**$pow"; - } else { - #print $n; - } - for my $f_i (@P) { - my $nf_i = $n * $f_i; - next unless $nf_i->is_int; - $n = $nf_i; - next MAIN; - } - last; + print " " if $_ > 1; + my ($pow, $rest) = (0, $n->copy); + until( $rest->is_odd ) { + ++$pow; + $rest->bdiv(2); + } + if( $rest->is_one ) { + print "2**$pow"; + } else { + #print $n; + } + for my $f_i (@P) { + my $nf_i = $n * $f_i; + next unless $nf_i->is_int; + $n = $nf_i; + next MAIN; + } + last; } print "\n"; diff --git a/Task/Fractran/R/fractran.r b/Task/Fractran/R/fractran.r deleted file mode 100644 index af0f56b3bf..0000000000 --- a/Task/Fractran/R/fractran.r +++ /dev/null @@ -1,25 +0,0 @@ -library(gmp) -library(stringr) - -fractran <- function(s, n, lim){ - P <- str_split_1(s, " ") |> str_split("/") - read_frac <- function(index) as.bigq(n=P[[index]][1], d=P[[index]][2]) - fracs <- sapply(seq_along(P), read_frac) - first_integer <- function(bigv, n){ - for(q in bigv){ - if(denominator(n*q)==1) return(q) - } - return(NA) - } - iters <- 0 - while(!is.na(first_integer(fracs, n))){ - n <- n*first_integer(fracs, n) - print(n, initLine=FALSE) - iters <- iters+1 - if(iters>=lim) break - } -} - -#Test input -fractran_primes <- "17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1" -fractran(fractran_primes, 2, 15) diff --git a/Task/Fractran/REXX/fractran-1.rexx b/Task/Fractran/REXX/fractran-1.rexx new file mode 100644 index 0000000000..8572c8bd0b --- /dev/null +++ b/Task/Fractran/REXX/fractran-1.rexx @@ -0,0 +1,28 @@ +/*REXX program runs FRACTRAN for a given set of fractions and from a specified N. */ +numeric digits 2000 /*be able to handle larger numbers. */ +parse arg N terms fracs /*obtain optional arguments from the CL*/ +if N=='' | N=="," then N= 2 /*Not specified? Then use the default.*/ +if terms=='' | terms=="," then terms= 100 /* " " " " " " */ +if fracs='' then fracs= "17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23,", + '77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1' + /* [↑] The default for the fractions. */ +f= space(fracs, 0) /*remove all blanks from the FRACS list*/ + do #=1 while f\==''; parse var f n.# "/" d.# ',' f + end /*#*/ /* [↑] parse all the fractions in list*/ +#= # - 1 /*the number of fractions just found. */ +say # 'fractions:' fracs /*display number and actual fractions. */ +say 'N is starting at ' N /*display the starting number N. */ +say terms ' terms are being shown:' /*display a kind of header/title. */ + + do j=1 for terms /*perform the DO loop for each term. */ + do k=1 for # /* " " " " " " fraction*/ + if N // d.k \== 0 then iterate /*Not an integer? Then ignore it. */ + cN= commas(N); L= length(cN) /*maybe insert commas into N; get len.*/ + say right('term' commas(j), 44) "──► " right(cN, max(15, L)) /*show Nth term & N*/ + N= N % d.k * n.k /*calculate next term (use %≡integer ÷)*/ + leave /*go start calculating the next term. */ + end /*k*/ /* [↑] if an integer, we found a new N*/ + end /*j*/ +exit 0 /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +commas: parse arg ?; do jc=length(?)-3 to 1 by -3; ?=insert(',', ?, jc); end; return ? diff --git a/Task/Fractran/REXX/fractran-2.rexx b/Task/Fractran/REXX/fractran-2.rexx new file mode 100644 index 0000000000..a201c8471b --- /dev/null +++ b/Task/Fractran/REXX/fractran-2.rexx @@ -0,0 +1,39 @@ +/*REXX program runs FRACTRAN for a given set of fractions and from a specified N. */ +numeric digits 999; d= digits(); w= length(d) /*be able to handle gihugeic numbers. */ +parse arg N terms fracs /*obtain optional arguments from the CL*/ +if N=='' | N=="," then N= 2 /*Not specified? Then use the default.*/ +if terms=='' | terms=="," then terms= 100 /* " " " " " " */ +if fracs='' then fracs= "17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23,", + '77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1' + /* [↑] The default for the fractions. */ +f= space(fracs, 0) /*remove all blanks from the FRACS list*/ + do #=1 while f\==''; parse var f n.# "/" d.# ',' f + end /*#*/ /* [↑] parse all the fractions in list*/ +#= # - 1 /*adjust the number of fractions found.*/ +tell= terms>0 /*flag: show number or a power of 2.*/ +!.= 0; _= 1 /*the default value for powers of 2. */ +if \tell then do p=1 until length(_)>d; _= _ + _; !._= 1 + if p==1 then @._= left('', w + 9) "2**"left(p, w) ' ' + else @._= '(prime' right(p, w)") 2**"left(p, w) ' ' + end /*p*/ /* [↑] build powers of 2 tables. */ +L= length(N) /*length in decimal digits of integer N*/ +say # 'fractions:' fracs /*display number and actual fractions. */ +say 'N is starting at ' N /*display the starting number N. */ +if tell then say terms ' terms are being shown:' /*display header.*/ + else say 'only powers of two are being shown:' /* " " */ +@a= '(max digits used:' /*a literal used in the SAY below. */ + + do j=1 for abs(terms) /*perform DO loop once for each term. */ + do k=1 for # /* " " " " " " fraction*/ + if N // d.k \== 0 then iterate /*Not an integer? Then ignore it. */ + cN= commas(N); cj=commas(j) /*maybe insert commas into N. */ + if tell then say right('term' cj, 44) "──► " cN /*display Nth term and N.*/ + else if !.N then say right('term' cj,15) "──►" @.N @a right(L,w)") " cN + N= N % d.k * n.k /*calculate next term (use %≡integer ÷)*/ + L= max(L, length(N) ) /*the maximum number of decimal digits.*/ + leave /*go start calculating the next term. */ + end /*k*/ /* [↑] if an integer, we found a new N*/ + end /*j*/ +exit 0 /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +commas: parse arg ?; do jc=length(?)-3 to 1 by -3; ?=insert(',', ?, jc); end; return ? diff --git a/Task/Fractran/REXX/fractran.rexx b/Task/Fractran/REXX/fractran.rexx deleted file mode 100644 index 1dd1d0179e..0000000000 --- a/Task/Fractran/REXX/fractran.rexx +++ /dev/null @@ -1,76 +0,0 @@ --- 23 Aug 2025 -include Setting - -say 'FRACTRAN' -say version -say -parse arg n','t -if n = '' then - n = 2 -if t = '' then - t = 100 -numeric digits 200 -call Fractions -call Task -call Powers -call Extra -exit - -Fractions: -call Time('r') -say 'Save fractions...' -l = '17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1' -n. = 0; d. = 0; w = Words(l) -do i = 1 to w - a = Word(l,i); parse var a n.i'/'d.i -end -say Format(Time('e'),,3) 'seconds'; say -return - -Task: -call Time('r') -say 'First' t 'terms of the sequence:' -do i = 2 to t - do j = 1 to w - if \ Integer(n/d.j) then - iterate - call CharOut ,Right(n,9) - if i//10 = 0 then - say - n = n%d.j*n.j - leave j - end -end -say Format(Time('e'),,3) 'seconds'; say -return - -Powers: -call Time('r') -say 'Flag powers of 2...' -p. = 0; e. = 0 -do i = 2 to 100 - a = 2**i; p.a = 1; e.a = i -end -say Format(Time('e'),,3) 'seconds'; say -return - -Extra: -call Time('r') -say 'Prime numbers:' -n = 2; p = 0 -do i = 2 to 1300000 - do j = 1 to w - if \ Integer(n/d.j) then - iterate j - if p.n then do - p = p+1 - say Right(p,2) ' Term' Right(i,7) Left('= 2^'e.n,7) 'Prime' Right(e.n,2) 'found' - end - n = n%d.j*n.j - leave j - end -end -say Format(Time('e'),,3) 'seconds'; say -return - -include Math diff --git a/Task/Fractran/Rebol/fractran.rebol b/Task/Fractran/Rebol/fractran.rebol deleted file mode 100644 index 33b17b69b8..0000000000 --- a/Task/Fractran/Rebol/fractran.rebol +++ /dev/null @@ -1,41 +0,0 @@ -Rebol [ - title: "Rosetta code: Fractran" - file: %Fractran.r3 - url: https://rosettacode.org/wiki/Fractran -] - -fractran: function/with [ - input [string! file! url!] - start [integer!] - terms [integer!] -][ - unless string? input [ input: read/string input ] - ;; --- parse fractions into [numerator denominator] pairs --- - fractions: parse input [collect [fraction some [separator fraction]]] - ;; --- interpreter loop --- - out: append copy [] n: start - while [terms > length? out] [ - forall fractions [ - frac: fractions/1 - if zero? mod n frac/y [ ;; fraction applies: n is divisible - n: n / frac/y * frac/x ;; advance: multiply n by fraction - append out to integer! n ;; keep the result - fractions: head fractions ;; restart from first fraction - break - ] - if tail? fractions [return out] ;; no fraction applied: halt - ] - ] - out -][ - digit: charset "0123456789" - fraction: [copy p [some digit] #"/" copy q [some digit] keep (as-pair to integer! p to integer! q)] - separator: [some #" "] -] - -print "First 100 terms of the sequence:" -out: fractran "17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1" 2 100 -forall out [ - prin pad out/1 9 - if zero? mod index? out 10 [print ""] -] diff --git a/Task/Fractran/Red/fractran.red b/Task/Fractran/Red/fractran.red index 44fb51eabe..a61ef88f55 100644 --- a/Task/Fractran/Red/fractran.red +++ b/Task/Fractran/Red/fractran.red @@ -5,20 +5,20 @@ if exists? inpf: to-file inp [inp: read inpf] digit: charset "0123456789" frac: [copy p [some digit] #"/" copy q [some digit] - keep (as-pair to-integer p to-integer q)] + keep (as-pair to-integer p to-integer q)] code: parse inp [collect [frac some [[some " "] frac]]] n: to-integer ask "please enter starting number n: " x: to-integer ask "please enter the number of terms, hit return for no limit: " l: length? code loop x [ - forall code [ - c: code/1 - if n % c/y = 0 [ - print n: n / c/y * c/x - code: head code - break - ] - if l = index? code [halt] - ] + forall code [ + c: code/1 + if n % c/y = 0 [ + print n: n / c/y * c/x + code: head code + break + ] + if l = index? code [halt] + ] ] diff --git a/Task/Fractran/Refal/fractran.refal b/Task/Fractran/Refal/fractran.refal deleted file mode 100644 index e66c789961..0000000000 --- a/Task/Fractran/Refal/fractran.refal +++ /dev/null @@ -1,78 +0,0 @@ -$ENTRY Go { - , >: e.Prog - = > - >; -}; - -PrimeProgram { - = '17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 ' - '1/17 11/13 13/11 15/14 15/2 55/1'; -}; - -FracPrimes { - 0 e.X = ; - s.I (e.N) e.P, - : Next e.N2, - : { - T s.N = s.N (e.N2) e.P>; - F = ; - }; -}; - -FracPrime { - (1) 1 = F; - (s.N) 1 = T s.N; - (s.N) e.X, : { - (e.X2) 0 = ) e.X2>; - e.Z = F; - }; - e.X = ; -}; - -FracRun { - 0 e.X = ; - s.I (e.N) e.P, : { - Halt = e.N; - Next e.N2 = e.N (e.N2) e.P>; - }; -}; - -FracStep { - (e.N) = Halt; - (e.N) ((e.Num) e.Denom) e.P, - ) e.Denom>: { - (e.N2) 0 = Next e.N2; - e.X = ; - }; -}; - -Prog { - e.X, : T (e.F) e.R = (e.F) ; - e.X = ; -}; - -Frac { - e.X, : T (e.N) e.X2, - : '/' e.X3, - : T (e.D) e.X4 = - T ((e.N) e.D) e.X4; - e.X = F e.X; -}; - -Num { - e.X, >: { - () e.R = F e.R; - (e.N) e.R = T () e.R; - }; -}; - -Span { - (e.M) (e.S) s.C e.X, e.S: e.1 s.C e.2 = ; - (e.M) (e.S) e.X = (e.M) e.X; - (e.S) e.X = ; -}; - -SkipWs { - s.C e.X, ' \n\t': e.1 s.C e.2 = ; - e.X = e.X; -}; diff --git a/Task/Fractran/Rust/fractran.rs b/Task/Fractran/Rust/fractran.rs deleted file mode 100644 index e73a574558..0000000000 --- a/Task/Fractran/Rust/fractran.rs +++ /dev/null @@ -1,75 +0,0 @@ -use std::io; - -struct Fractran { - start: i32, - limit: i32, -} - -impl Fractran { - fn new() -> Self { - Fractran { - start: 0, - limit: 0, - } - } - - fn run(&mut self, program: &str, start: i32, limit: i32) { - self.start = start; - self.limit = limit; - - // Parse the program string into fraction pairs - let fractions: Vec<(f64, f64)> = program - .split_whitespace() - .filter_map(|fraction_str| { - if let Some(pos) = fraction_str.find('/') { - let numerator = fraction_str[..pos].parse::().ok()?; - let denominator = fraction_str[pos + 1..].parse::().ok()?; - Some((numerator, denominator)) - } else { - None - } - }) - .collect(); - - self.exec(&fractions); - } - - fn exec(&mut self, fractions: &[(f64, f64)]) { - let mut count = 0; - - while count < self.limit { - println!("{} : {}", count, self.start); - count += 1; - - let mut found = false; - - for &(numerator, denominator) in fractions { - let result = self.start as f64 * (numerator / denominator); - - // Check if result is a whole number - if (result - result.floor()).abs() < f64::EPSILON { - self.start = result as i32; - found = true; - break; - } - } - - if !found { - break; - } - } - } -} - -fn main() { - let mut fractran = Fractran::new(); - fractran.run( - "17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 1/17 11/13 13/11 15/14 15/2 55/1", - 2, - 15 - ); - - // Wait for user input (equivalent to cin.get()) - let mut input = String::new(); - io::stdin().read_line(&mut input).expect("Failed to read line"); -} diff --git a/Task/Fractran/SETL/fractran.setl b/Task/Fractran/SETL/fractran.setl deleted file mode 100644 index 05f2b18236..0000000000 --- a/Task/Fractran/SETL/fractran.setl +++ /dev/null @@ -1,52 +0,0 @@ -program fractran; - p := parse_fractran( - "17/91 78/85 19/51 23/38 29/33 77/29 95/23 77/19 " + - "1/17 11/13 13/11 15/14 15/2 55/1" - ); - - print(frac_run_steps(p, 2, 15)); - print(frac_primes(p, 2, 20)); - - proc frac_primes(p, n, nprimes); - primes := []; - loop for i in [1..nprimes] do - loop until n bit_and (n-1) = 0 do - n := frac_step(p, n); - end loop; - primes with:= log n/log 2; - end loop; - return primes; - end proc; - - proc frac_run_steps(p, n, steps); - return [n] + [n := frac_step(p, n) : i in [2..steps]]; - end proc; - - proc frac_step(p, n); - if exists [num, denom] in p | n * num mod denom = 0 then - return n * num div denom; - end if; - return om; - end proc; - - proc rdws(rw s); - span(s, " \t\n"); - end proc; - - proc rdnum(rw s); - rdws(s); - return val span(s, "0123456789"); - end proc; - - proc rdfrac(rw s); - if (num := rdnum(s)) = om then return om; end if; - rdws(s); - if match(s, "/") = "" then return om; end if; - if (denom := rdnum(s)) = om then return om; end if; - return [num, denom]; - end proc; - - proc parse_fractran(s); - return [f := rdfrac(s) : until f=om]; - end proc; -end program; diff --git a/Task/Fractran/Scheme/fractran.scm b/Task/Fractran/Scheme/fractran.ss similarity index 100% rename from Task/Fractran/Scheme/fractran.scm rename to Task/Fractran/Scheme/fractran.ss diff --git a/Task/Fractran/TI-83-BASIC/fractran.basic b/Task/Fractran/TI-83-BASIC/fractran.basic index c501d5df6a..3c39e388a9 100644 --- a/Task/Fractran/TI-83-BASIC/fractran.basic +++ b/Task/Fractran/TI-83-BASIC/fractran.basic @@ -5,15 +5,15 @@ Dim(LA)->U T->Dim(LC) For(I,1,T) - 1->J: 1->F - While J<=U and F=1 - If remainder(N,LB(J))=0 - Then - Disp N - N->LC(I) - iPart(N/LB(J))*LA(J)->N - 0->F - End - J+1->J - End + 1->J: 1->F + While J<=U and F=1 + If remainder(N,LB(J))=0 + Then + Disp N + N->LC(I) + iPart(N/LB(J))*LA(J)->N + 0->F + End + J+1->J + End End diff --git a/Task/Fractran/Tcl/fractran-1.tcl b/Task/Fractran/Tcl/fractran-1.tcl index 6a0acc52ec..50932aaba5 100644 --- a/Task/Fractran/Tcl/fractran-1.tcl +++ b/Task/Fractran/Tcl/fractran-1.tcl @@ -3,42 +3,42 @@ package require Tcl 8.6 oo::class create Fractran { variable fracs nco constructor {fractions} { - set fracs {} - foreach frac $fractions { - if {[regexp {^(\d+)/(\d+),?$} $frac -> num denom]} { - lappend fracs $num $denom - } else { - return -code error "$frac is not a supported fraction" - } - } - if {![llength $fracs]} { - return -code error "need at least one fraction" - } + set fracs {} + foreach frac $fractions { + if {[regexp {^(\d+)/(\d+),?$} $frac -> num denom]} { + lappend fracs $num $denom + } else { + return -code error "$frac is not a supported fraction" + } + } + if {![llength $fracs]} { + return -code error "need at least one fraction" + } } method execute {n {steps 15}} { - set co [coroutine [incr nco] my Generate $n] - for {set i 0} {$i < $steps} {incr i} { - lappend result [$co] - } - catch {rename $co ""} - return $result + set co [coroutine [incr nco] my Generate $n] + for {set i 0} {$i < $steps} {incr i} { + lappend result [$co] + } + catch {rename $co ""} + return $result } method Step {n} { - foreach {num den} $fracs { - if {$n % $den} continue - return [expr {$n * $num / $den}] - } - return -code break + foreach {num den} $fracs { + if {$n % $den} continue + return [expr {$n * $num / $den}] + } + return -code break } method Generate {n} { - yield [info coroutine] - while 1 { - yield $n - set n [my Step $n] - } - return -code break + yield [info coroutine] + while 1 { + yield $n + set n [my Step $n] + } + return -code break } } diff --git a/Task/Fractran/Tcl/fractran-2.tcl b/Task/Fractran/Tcl/fractran-2.tcl index 21da1ffe97..a61af1865b 100644 --- a/Task/Fractran/Tcl/fractran-2.tcl +++ b/Task/Fractran/Tcl/fractran-2.tcl @@ -2,10 +2,10 @@ oo::objdefine $ft method pow2 {n} { set co [coroutine [incr nco] my Generate 2] set pows {} while {[llength $pows] < $n} { - set item [$co] - if {($item & ($item-1)) == 0} { - lappend pows $item - } + set item [$co] + if {($item & ($item-1)) == 0} { + lappend pows $item + } } return $pows } diff --git a/Task/Fractran/UNIX-Shell/fractran.sh b/Task/Fractran/UNIX-Shell/fractran.sh index bf28e57eb8..916bfce39b 100644 --- a/Task/Fractran/UNIX-Shell/fractran.sh +++ b/Task/Fractran/UNIX-Shell/fractran.sh @@ -10,10 +10,10 @@ t=0 n=72 echo "steps of computation" > steps.csv while [ $t -le 6 ]; do - if [ $(($n*${ns[$t]}%${ds[$t]})) -eq 0 ]; then - let "n=$(($n*${ns[$t]}/${ds[$t]}))" - let "t=0" - factor $n >> steps.csv - fi - let "t=$t+1" + if [ $(($n*${ns[$t]}%${ds[$t]})) -eq 0 ]; then + let "n=$(($n*${ns[$t]}/${ds[$t]}))" + let "t=0" + factor $n >> steps.csv + fi + let "t=$t+1" done diff --git a/Task/Fractran/Zkl/fractran-1.zkl b/Task/Fractran/Zkl/fractran-1.zkl index ca49aa5d7d..ab1e3d8182 100644 --- a/Task/Fractran/Zkl/fractran-1.zkl +++ b/Task/Fractran/Zkl/fractran-1.zkl @@ -2,14 +2,14 @@ var fracs="17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17," "11/13, 13/11, 15/14, 15/2, 55/1"; fcn fractranW(n,fracsAsOneBigString){ //-->Walker (iterator) fracs:=(fracsAsOneBigString-" ").split(",").apply( - fcn(frac){ frac.split("/").apply("toInt") }); //( (n,d), (n,d), ...) + fcn(frac){ frac.split("/").apply("toInt") }); //( (n,d), (n,d), ...) Walker(fcn(rn,fracs){ n:=rn.value; foreach a,b in (fracs){ - if(n*a%b == 0){ - rn.set(n*a/b); - return(n); - } + if(n*a%b == 0){ + rn.set(n*a/b); + return(n); + } } }.fp(Ref(n),fracs)) } diff --git a/Task/Fractran/Zkl/fractran-3.zkl b/Task/Fractran/Zkl/fractran-3.zkl index 718365473b..00de8a061b 100644 --- a/Task/Fractran/Zkl/fractran-3.zkl +++ b/Task/Fractran/Zkl/fractran-3.zkl @@ -2,9 +2,9 @@ var [const] BN=Import("zklBigNum"); // libGMP fcn fractranPrimes{ foreach n,fr in ([1..].zip(fractranW(BN(2),fracs))){ if(fr.num1s==1){ - p:=(fr.toString(2) - "1").len(); // count zeros - if(p>1) - println("Prime %3d from the nth Fractran(%8d): %d".fmt(p,n,fr)); + p:=(fr.toString(2) - "1").len(); // count zeros + if(p>1) + println("Prime %3d from the nth Fractran(%8d): %d".fmt(p,n,fr)); } } } diff --git a/Task/French-Republican-calendar/C++/french-republican-calendar.cpp b/Task/French-Republican-calendar/C++/french-republican-calendar.cpp deleted file mode 100644 index ec13592d10..0000000000 --- a/Task/French-Republican-calendar/C++/french-republican-calendar.cpp +++ /dev/null @@ -1,138 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -const std::vector MONTHS = { - "Vendemiaire", "Brumaire", "Frimaire", "Nivose", "Pluviose", "Ventose", "Germinal", - "Floreal", "Prairial", "Messidor", "Thermidor", "Fructidor", "Sansculottide" }; - -const std::vector SANSCULOTTIDES = { - "Fete de la vertu", "Fete du genie", "Fete du travail", - "Fete de l'opinion", "Fete des recompenses", "Fete de la Revolution" }; - -const std::vector GREGORIAN_MONTHS = { - "January", "February", "March", "April", "May", "June", "July", "August", - "September", "October", "November", "December" }; - -const std::chrono::year_month_day INTRODUCTION_DATE = - { std::chrono::year{1792}, std::chrono::month{9}, std::chrono::day{22} }; - -const std::chrono::year_month_day TERMINATION_DATE = - { std::chrono::year{1805}, std::chrono::month{12}, std::chrono::day{31} }; - -struct French_RC_Date { - uint32_t year, month, day; -}; - -std::vector split_string(const std::string& text, const char& delimiter) { - std::vector words; - std::istringstream stream(text); - std::string word; - while ( std::getline(stream, word, delimiter) ) { - words.emplace_back(word); - } - return words; -} - -uint32_t index_of(const std::vector& vec, const std::string& element) { - auto iter = std::find(vec.begin(), vec.end(), element); - return std::distance(vec.begin(), iter); -} - -uint32_t additional_days_for_year(const uint32_t& year) { - return ( year > 11 ) ? 3 : ( year > 7 ) ? 2 : ( year > 3 ) ? 1 : 0; -} - -std::string to_french_rc_date_string(French_RC_Date french_rc_date) { - if ( french_rc_date.month < 13 ) { - return std::to_string(french_rc_date.day) + " " + MONTHS[french_rc_date.month - 1] - + " " + std::to_string(french_rc_date.year); - } - return SANSCULOTTIDES[french_rc_date.day - 1] + " " + std::to_string(french_rc_date.year); -} - -std::string to_gregorian_date_string(std::chrono::year_month_day gregorian_date) { - const uint32_t year = static_cast(gregorian_date.year()); - const uint32_t month = static_cast(gregorian_date.month()); - const uint32_t day = static_cast(gregorian_date.day()); - const std::string month_string = GREGORIAN_MONTHS[month - 1]; - return std::to_string(day) + " " + month_string + " " + std::to_string(year); -} - -std::chrono::year_month_day parse_gregorian_date(const std::string& gregorian_string) { - std::vector splits = split_string(gregorian_string, ' '); - const uint32_t month = index_of(GREGORIAN_MONTHS, splits[1]) + 1; - return std::chrono::year_month_day{std::chrono::year{std::stoi(splits[2])}, - std::chrono::month{month}, std::chrono::day{static_cast(std::stoi(splits[0]))}}; -} - -French_RC_Date parse_french_rc_date(const std::string& french_rc_date) { - std::vector splits = split_string(french_rc_date, ' '); - if ( splits.size() == 3 ) { - const uint32_t year = std::stoi(splits[2]); - const uint32_t month = index_of(MONTHS, splits[1]) + 1; - const uint32_t day = std::stoi(splits[0]); - return French_RC_Date(year, month, day); - } - - std::string year_string = splits[splits.size() - 1]; - const uint32_t year = std::stoi(year_string); - std::string sansculottides_day = french_rc_date.substr(0, french_rc_date.size() - year_string.size() - 1); - const uint32_t day = index_of(SANSCULOTTIDES, sansculottides_day) + 1; - return French_RC_Date(year, 13, day); -} - -French_RC_Date to_french_rc_date(const std::chrono::year_month_day& gregorian_date) { - const int32_t days_before = - ( std::chrono::sys_days(TERMINATION_DATE) - std::chrono::sys_days(gregorian_date) ).count(); - const int32_t days_after = - ( std::chrono::sys_days(gregorian_date) - std::chrono::sys_days(INTRODUCTION_DATE) ).count(); - if ( days_after < 0 || days_before < 0 ) { - throw std::invalid_argument("French Republican Calendar date out of range."); - } - - uint32_t year = ( days_after + 366 ) / 365; - uint32_t days = ( days_after + 366 ) % 365 - additional_days_for_year(year); - if ( days == 0 ) { - year -= 1; - days += 366; - } - - if ( days < 361 ) { - return French_RC_Date(year, days / 30 + 1, days % 30); - } - return French_RC_Date(year, 13, days - 360); -} - -std::chrono::year_month_day to_gregorian_date(French_RC_Date french_rc_date) { - const uint32_t days = ( french_rc_date.year - 1 ) * 365 + additional_days_for_year(french_rc_date.year) - + ( french_rc_date.month - 1 ) * 30 + french_rc_date.day - 1; - return std::chrono::sys_days(INTRODUCTION_DATE) + std::chrono::days(days); -} - -int main() { - std::vector gregorian_strings = { - "22 September 1792", "20 May 1795", "15 July 1799", "23 September 1803", "31 December 1805" }; - - std::vector french_rc_strings = { }; - for ( const std::string& gregorian_string : gregorian_strings ) { - std::chrono::year_month_day gregorian_date = parse_gregorian_date(gregorian_string); - French_RC_Date french_rc_date = to_french_rc_date(gregorian_date); - const std::string french_rc_date_string = to_french_rc_date_string(french_rc_date); - french_rc_strings.emplace_back(french_rc_date_string); - std::cout << gregorian_string << " => " << french_rc_date_string << "\n"; - } - std::cout << "\n"; - - for ( const std::string& french_rc_string : french_rc_strings ) { - French_RC_Date french_rc_date = parse_french_rc_date(french_rc_string); - std::chrono::year_month_day gregorian_date = to_gregorian_date(french_rc_date); - const std::string gregorian_date_string = to_gregorian_date_string(gregorian_date); - std::cout << french_rc_string << " => " << gregorian_date_string << "\n"; - } -} diff --git a/Task/French-Republican-calendar/EasyLang/french-republican-calendar.easy b/Task/French-Republican-calendar/EasyLang/french-republican-calendar.easy deleted file mode 100644 index cd5d943873..0000000000 --- a/Task/French-Republican-calendar/EasyLang/french-republican-calendar.easy +++ /dev/null @@ -1,99 +0,0 @@ -func repLeap y . - return if (y + 1) mod 4 = 0 and ((y + 1) mod 100 <> 0 or (y + 1) mod 400 = 0) -. -func greLeap y . - return if y mod 4 = 0 and y mod 100 <> 0 or y mod 400 = 0 -. -gregmd[] = [ 31 28 31 30 31 30 31 31 30 31 30 31 ] -greg$[] = [ "January" "February" "March" "April" "May" "June" "July" "August" "September", "October" "November" "December" ] -repu$[] = [ "Vendémiaire" "Brumaire" "Frimaire" "Nivôse" "Pluviôse" "Ventôse" "Germinal" "Floréal" "Prairial" "Messidor" "Thermidor" "Fructidor" "Sansculottide" ] -sanscu$[] = [ "Fête de la vertu" "Fête du génie" "Fête du travail" "Fête de l'opinion" "Fête des récompenses" "Fête de la Révolution" ] -proc split s$ &d &m &y . - if substr s$ 1 4 = "Fête" - m = 13 - for d to len sanscu$[] - sc$ = sanscu$[d] - if substr s$ 1 len sc$ = sc$ - y = number substr s$ (len sc$ + 1) 99 - break 1 - . - . - else - h = strpos s$ " " - d = number substr s$ 1 h - my$ = substr s$ (h + 1) 99 - h = strpos my$ " " - m$ = substr my$ 1 (h - 1) - y = number substr my$ (h + 1) 99 - months$[] = greg$[] - if y < 1792 : months$[] = repu$[] - for m to 12 : if months$[m] = m$ : break 1 - . -. -func greToDay d m y . - if m < 3 - y -= 1 - m += 12 - . - return y * 36525 div 100 - y div 100 + y div 400 + 306 * (m + 1) div 10 + d - 654842 -. -func repToDay d m y . - if m = 13 - m -= 1 - d += 30 - . - d -= repLeap y - return 365 * y + (y + 1) div 4 - (y + 1) div 100 + (y + 1) div 400 + 30 * m + d - 395 -. -proc dayToGre day &d &m &y . - y = day * 100 div 36525 - d = day - y * 36525 div 100 + 21 - y += 1792 - d += y div 100 - y div 400 - 13 - m = 9 - while d > gregmd[m] - d -= gregmd[m] - m += 1 - if m = 13 - m = 1 - y += 1 - gregmd[2] = 28 + greLeap y - . - . -. -proc dayToRep day &d &m &y . - y = (day - 1) * 100 div 36525 - if repLeap y = 1 : y -= 1 - y += 1 - d = day - y * 36525 div 100 + 365 + y div 100 - y div 400 - m = 1 - sanscul = 5 + repLeap y - while d > 30 - d -= 30 - m += 1 - if m = 13 - if d > sanscul - d -= sanscul - m = 1 - y += 1 - sanscul = 5 + repLeap y - . - . - . -. -test$[] = [ "1 Vendémiaire 1" "1 Prairial 3" "27 Messidor 7" "Fête de la Révolution 11" "10 Nivôse 14" "22 September 1792" "20 May 1795" "15 July 1799" "23 September 1803" "31 December 1805" ] -for s$ in test$[] - write s$ & " => " - split s$ day, month, year - if year < 1792 - dayToGre (repToDay day month year) day month year - print day & " " & greg$[month] & " " & year - else - dayToRep (greToDay day month year) day month year - if month = 13 - print sanscu$[day] & " " & year - else - print day & " " & repu$[month] & " " & year - . - . -. diff --git a/Task/French-Republican-calendar/Fortran/french-republican-calendar.f b/Task/French-Republican-calendar/Fortran/french-republican-calendar.f deleted file mode 100644 index b5705acc4f..0000000000 --- a/Task/French-Republican-calendar/Fortran/french-republican-calendar.f +++ /dev/null @@ -1,338 +0,0 @@ -program calendar_converter - implicit none - - character(len=40) :: input_date,tstring - integer :: year, month, day, jd, i - logical :: is_gregorian -! - ! Test date arrays - character(len=*), parameter :: rep_dates(5) = [ & - '1 Vendemiaire 1 ', & - '1 Prairial 3 ', & - '27 Messidor 7 ', & - 'Fete de la Revolution 11 ', & - '10 Nivose 14 ' ] - - character(len=*), parameter :: greg_dates(5) = [ & - '22 September 1792 ', & - '20 May 1795 ', & - '15 July 1799 ', & - '23 September 1803 ', & - '31 December 1805 ' ] - do - print *, "Enter date (format examples):" - print *, "Gregorian: '20 May 1795' or Republican: '1 Prairial 3'" - print *, "Press Enter to exit" - read (*, '(a)') input_date - input_date = to_lower(input_date) - - if (len_trim(input_date) == 0) exit - - ! Try parsing as Gregorian first - if (parse_gregorian(input_date, year, month, day)) then - is_gregorian = .true. - else if (parse_republican(input_date, year, month, day)) then - is_gregorian = .false. - else - print *, "Invalid date format" - cycle - end if - - if (is_gregorian) then - jd = gregorian_to_jd(year, month, day) - call jd_to_republican(jd, year, month, day) - print *, "Republican date: ", republican_date_string(year, month, day) - else - jd = republican_to_jd(year, month, day) - call jd_to_gregorian(jd, year, month, day) - print *, "Gregorian date: ", gregorian_date_string(year, month, day) - end if - end do - - - ! Automatic conversions when exiting - print *, 'Converting predefined Republican dates:' - do i = 1, size(rep_dates) - tstring = to_lower(rep_dates(i)) - if (parse_republican(trim(tstring), year, month, day)) then - jd = republican_to_jd(year, month, day) - call jd_to_gregorian(jd, year, month, day) - print *, rep_dates(i), ' => ', gregorian_date_string(year, month, day) - end if - end do - - print '(/,a)','Converting predefined Gregorian dates:' - do i = 1, size(greg_dates) - tstring = to_lower(greg_dates(i)) - if (parse_gregorian(trim(tstring), year, month, day)) then - jd = gregorian_to_jd(year, month, day) - call jd_to_republican(jd, year, month, day) - print *, greg_dates(i), ' => ', republican_date_string(year, month, day) - end if - end do - -contains - - function parse_gregorian(str, y, m, d) result(success) - character(*), intent(in) :: str - integer, intent(out) :: y, m, d - logical :: success - character(len=3) :: mon - integer :: ios - - read(str, *, iostat=ios) d, mon, y - if (ios == 0) then - m = month_number(mon) - success = (m > 0) - else - success = .false. - end if - end function parse_gregorian - - function parse_republican(str, y, m, d) result(success) - character(*), intent(in) :: str - integer, intent(out) :: y, m, d - logical :: success - character(len=35) :: tokens(10) - integer :: num_tokens, i, ios - character(len=100) :: festival_name - - success = .false. - tokens = ' ' - call tokenize(str, tokens, num_tokens) - - if (num_tokens < 2) return - - if (.not. is_numeric(tokens(num_tokens))) return - read(tokens(num_tokens), *, iostat=ios) y - if (ios /= 0) return - - if (num_tokens == 3) then - if (.not. is_numeric(tokens(1))) return - read(tokens(1), *, iostat=ios) d - if (ios /= 0) return - - do m = 1, 12 - if (trim(tokens(2)) == republican_months(m)) then - success = .true. - return - end if - end do - else if (num_tokens >= 4) then - if (tokens(1) /= 'fete') return - - festival_name = tokens(1) - do i = 2, num_tokens-1 - festival_name = festival_name(1:len_trim(festival_name)) // ' ' // tokens(i) - end do - do i = 1, 6 - if (festival_name == sansculottides(i)) then - m = 13 - d = i - success = .true. - return - end if - end do - end if - end function parse_republican - - function to_lower(str) result(lower_str) - character(*), intent(in) :: str - character(len(str)) :: lower_str - integer :: i, c - lower_str = str - do i = 1, len(str) - c = iachar(str(i:i)) - if (c >= 65 .and. c <= 90) lower_str(i:i) = achar(c + 32) - end do - end function to_lower - - subroutine tokenize(input_string, tokens, num_tokens) - character(*), intent(in) :: input_string - character(*), intent(out) :: tokens(:) - integer, intent(out) :: num_tokens - integer :: i, start_idx, end_idx, str_len - character(len=len(input_string)) :: temp_str - - num_tokens = 0 - temp_str = adjustl(input_string) - str_len = len_trim(temp_str) - if (str_len == 0) return - - start_idx = 1 - do i = 1, str_len - if (scan(temp_str(i:i), " -/,.") > 0) then - end_idx = i - 1 - if (end_idx >= start_idx) then - num_tokens = num_tokens + 1 - if (num_tokens > size(tokens)) exit - tokens(num_tokens) = temp_str(start_idx:end_idx) - end if - start_idx = i + 1 - end if - end do - - if (start_idx <= str_len) then - num_tokens = num_tokens + 1 - if (num_tokens <= size(tokens)) then - tokens(num_tokens) = temp_str(start_idx:) - end if - end if - end subroutine tokenize - - function is_numeric(str) result(res) - character(*), intent(in) :: str - logical :: res - integer :: ios - integer :: dummy - read(str, *, iostat=ios) dummy - res = (ios == 0) - end function is_numeric - - function republican_months(m) result(namer) - integer, intent(in) :: m - character(len=12) :: namer - character(len=12), parameter :: names(13) = [character(len=12):: & - 'vendemiaire ', 'brumaire ', 'frimaire ', 'nivose ', & - 'pluviose ', 'ventose ', 'germinal ', 'floreal ', & - 'prairial ', 'messidor ', 'thermidor ', 'fructidor ', & - 'sansculott' ] - namer = names(m) - end function republican_months - - function sansculottides(d) result(name) - integer, intent(in) :: d - character(len=21) :: name - character(len=21), parameter :: names(6) = [ character(len=21)::& - 'fete de la vertu ', 'fete du genie ', & - 'fete du travail ', 'fete de l''opinion ', & - 'fete des recompenses', 'fete de la revolution' ] - name = names(d) - end function sansculottides - - function gregorian_date_string(y, m, d) result(str) - integer, intent(in) :: y, m, d - character(len=21) :: str - write(str, '(i0, 1x, a, 1x, i0)') d, trim(gregorian_months(m)), y - end function gregorian_date_string - - function republican_date_string(y, m, d) result(str) - integer, intent(in) :: y, m, d - character(len=30) :: str - character(len=30) :: holder - if (m == 13) then - holder = uppercasefirst(trim(sansculottides(d))) - write(str, '(a, 1x, i0)') trim(holder), y - else - holder = uppercasefirst(trim(republican_months(m))) - write(str, '(i0, 1x, a, 1x, i0)') d, trim(holder), y - end if - end function republican_date_string - - function month_number(mon) result(m) - character(*), intent(in) :: mon - integer :: m - character(len=3) :: months(12) = ['jan','feb','mar','apr','may','jun', & - 'jul','aug','sep','oct','nov','dec'] - do m = 1, 12 - if (months(m) == mon) return - end do - m = 0 - end function month_number - - function gregorian_months(m) result(name) - integer, intent(in) :: m - character(len=3) :: name - character(len=3) :: names(12) = ['Jan','Feb','Mar','Apr','May','Jun', & - 'Jul','Aug','Sep','Oct','Nov','Dec'] - name = names(m) - end function gregorian_months - - function republican_to_jd(year, month, day) result(jd) - integer, intent(in) :: year, month, day - integer :: jd - integer, parameter :: epoch_jd = 2375840 - integer :: total_days, leap_years, y - - if (month < 1 .or. month > 13) error stop "Invalid Republican month" - if (day < 1 .or. (month < 13 .and. day > 30)) error stop "Invalid Republican day" - if (month == 13 .and. day > 6) error stop "Invalid Sansculottides day" - - total_days = (year - 1) * 365 + (month - 1) * 30 + (day - 1) - leap_years = count([(is_republican_leap(y), y = 1, year-1)]) - total_days = total_days + leap_years - jd = epoch_jd + total_days - end function republican_to_jd - - integer function gregorian_to_jd(year, month, day) - integer, intent(in) :: year, month, day - integer :: a, y, m - a = (14 - month) / 12 - y = year + 4800 - a - m = month + 12*a - 3 - gregorian_to_jd = day + ((153*m + 2)/5) + 365*y + y/4 - y/100 + y/400 - 32045 - end function gregorian_to_jd - - pure logical function is_republican_leap(y) - integer, intent(in) :: y - integer, parameter :: historical_leaps(*) = [3, 7, 11, 15, 20] - is_republican_leap = any(historical_leaps == y) - end function is_republican_leap - - subroutine jd_to_gregorian(jd, year, month, day) - integer, intent(in) :: jd - integer, intent(out) :: year, month, day - integer :: a, b, c, d, e, m - a = jd + 32044 - b = (4*a + 3)/146097 - c = a - (146097*b)/4 - d = (4*c + 3)/1461 - e = c - (1461*d)/4 - m = (5*e + 2)/153 - day = int(e - (153*m + 2)/5 + 1) - month = int(m + 3 - 12*(m/10)) - year = int(100*b + d - 4800 + (m/10)) - end subroutine jd_to_gregorian - - subroutine jd_to_republican(jd, year, month, day) - integer, intent(out) :: year, month, day - integer, intent(in) :: jd - integer, parameter :: epoch_jd = 2375840 - integer :: days_since_epoch, y, leap_days, d - - days_since_epoch = jd - epoch_jd - if (days_since_epoch < 0) error stop "Date before Republican epoch" - - year = 1 + days_since_epoch / 365 - leap_days = count([(is_republican_leap(y), y = 1, year-1)]) - - d = days_since_epoch - (year-1)*365 - leap_days - if (d < 0) then - year = year - 1 - leap_days = count([(is_republican_leap(y), y = 1, year-1)]) - d = days_since_epoch - (year-1)*365 - leap_days - end if - - if (d < 360) then - month = d/30 + 1 - day = mod(d,30) + 1 - else - month = 13 - day = d - 359 - end if - end subroutine jd_to_republican - - function uppercasefirst(str) result(result_str) - character(len=*), intent(in) :: str - character(len=len(str)) :: result_str - integer :: c - result_str = str - if (len_trim(str) > 0) then - c = iachar(str(1:1)) - if (c >= iachar('a') .and. c <= iachar('z')) then - result_str(1:1) = achar(c - 32) - end if - end if - end function uppercasefirst - -end program calendar_converter diff --git a/Task/French-Republican-calendar/Java/french-republican-calendar.java b/Task/French-Republican-calendar/Java/french-republican-calendar.java deleted file mode 100644 index 64d0ca9aa4..0000000000 --- a/Task/French-Republican-calendar/Java/french-republican-calendar.java +++ /dev/null @@ -1,106 +0,0 @@ -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; - -public final class FrenchRepublicanCalendar { - - public static void main(String[] args) { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("d MMMM yyyy"); - - List gregorianStrings = List.of( - "22 September 1792", "20 May 1795", "15 July 1799", "23 September 1803", "31 December 1805" ); - - List frenchRCStrings = new ArrayList(); - for ( String gregorianString : gregorianStrings ) { - LocalDate gregorianDate = LocalDate.parse(gregorianString, formatter); - FrenchRCDate frenchRCDate = FrenchRCDate.toFrenchRCDate(gregorianDate); - frenchRCStrings.addLast(frenchRCDate.toString()); - System.out.println(gregorianString + " => " + frenchRCDate); - } - System.out.println(); - - for ( String frenchRCString : frenchRCStrings ) { - FrenchRCDate frenchRCDate = FrenchRCDate.parse(frenchRCString); - String gregorianDate = formatter.format(frenchRCDate.toGregorianDate()); - System.out.println(frenchRCString + " => " + gregorianDate); - } - } - -} - -final class FrenchRCDate { - - public FrenchRCDate(int aYear, int aMonth, int aDay) { - year = aYear; month = aMonth; day = aDay; - } - - public LocalDate toGregorianDate() { - final int days = ( year - 1 ) * 365 + additionalDaysForYear(year) + ( month - 1 ) * 30 + day - 1; - return INTRODUCTION_DATE.plusDays(days); - } - - public String toString() { - if ( month < 13 ) { - return day + " " + MONTHS.get(month - 1) + " " + year; - } - return SANSCULOTTIDES.get(day - 1) + " " + year; - } - - public static FrenchRCDate toFrenchRCDate(LocalDate gregorianDate) { - final int daysBefore = (int) ChronoUnit.DAYS.between(gregorianDate, TERMINATION_DATE); - final int daysAfter = (int) ChronoUnit.DAYS.between(INTRODUCTION_DATE, gregorianDate); - if ( daysAfter < 0 || daysBefore < 0 ) { - throw new IllegalArgumentException("French Republican Calendar date out of range."); - } - - int year = ( daysAfter + 366 ) / 365; - int days = ( daysAfter + 366 ) % 365 - additionalDaysForYear(year); - if ( days < 1 ) { - year -= 1; - days += 366; - } - - if ( days < 361 ) { - return new FrenchRCDate(year, days / 30 + 1, days % 30); - } - return new FrenchRCDate(year, 13, days - 360); - } - - public static FrenchRCDate parse(String frenchRCDate) { - String[] splits = frenchRCDate.split(" "); - if ( splits.length == 3 ) { - final int year = Integer.valueOf(splits[2]); - final int month = MONTHS.indexOf(splits[1]) + 1; - final int day = Integer.valueOf(splits[0]); - return new FrenchRCDate(year, month, day); - } - - String yearString = splits[splits.length - 1]; - final int year = Integer.valueOf(yearString); - String sansculottidesDay = frenchRCDate.substring(0, frenchRCDate.lastIndexOf(" ")); - final int day = SANSCULOTTIDES.indexOf(sansculottidesDay) + 1; - return new FrenchRCDate(year, 13, day); - } - - public static int additionalDaysForYear(int year) { - return ( year > 11 ) ? 3 : ( year > 7 ) ? 2 : ( year > 3 ) ? 1 : 0; - } - - public static final LocalDate INTRODUCTION_DATE = LocalDate.of(1792, 9, 22); - public static final LocalDate TERMINATION_DATE = LocalDate.of(1805, 12, 31); - - private int year, month, day; - - private static final List MONTHS = List.of( - "Vendémiaire", "Brumaire", "Frimaire", "Nivôse", "Pluviôse", "Ventôse", "Germinal", - "Floréal", "Prairial", "Messidor", "Thermidor", "Fructidor", "Sansculottide" - ); - - private static final List SANSCULOTTIDES = List.of( - "Fête de la vertu", "Fête du génie", "Fête du travail", - "Fête de l'opinion", "Fête des récompenses", "Fête de la Révolution" - ); - -} diff --git a/Task/French-Republican-calendar/JavaScript/french-republican-calendar.js b/Task/French-Republican-calendar/JavaScript/french-republican-calendar.js deleted file mode 100644 index 5abfc4a5ff..0000000000 --- a/Task/French-Republican-calendar/JavaScript/french-republican-calendar.js +++ /dev/null @@ -1,130 +0,0 @@ -class FrenchRCDate { - constructor(year, month, day) { - this.year = year; - this.month = month; - this.day = day; - } - - static INTRODUCTION_DATE = new Date(Date.UTC(1792, 8, 22)); // Months are zero-indexed in JS - static TERMINATION_DATE = new Date(Date.UTC(1805, 11, 31)); - - static MONTHS = [ - "Vendémiaire", "Brumaire", "Frimaire", "Nivôse", "Pluviôse", "Ventôse", - "Germinal", "Floréal", "Prairial", "Messidor", "Thermidor", "Fructidor" - ]; - - static SANSCULOTTIDES = [ - "Fête de la vertu", "Fête du génie", "Fête du travail", - "Fête de l'opinion", "Fête des récompenses", "Fête de la Révolution" - ]; - - toGregorianDate() { - const days = (this.year - 1) * 365 + FrenchRCDate.additionalDaysForYear(this.year) + - (this.month - 1) * 30 + this.day - 1; - - const gregorian = new Date(FrenchRCDate.INTRODUCTION_DATE); - gregorian.setUTCDate(gregorian.getUTCDate() + days); - return gregorian; - } - - toString() { - if (this.month < 13) { - return `${this.day} ${FrenchRCDate.MONTHS[this.month - 1]} ${this.year}`; - } else { - return `${FrenchRCDate.SANSCULOTTIDES[this.day - 1]} ${this.year}`; - } - } - - static additionalDaysForYear(year) { - return year > 11 ? 3 : year > 7 ? 2 : year > 3 ? 1 : 0; - } - - static toFrenchRCDate(gregorianDate) { - const daysAfter = Math.floor((gregorianDate - FrenchRCDate.INTRODUCTION_DATE) / (1000 * 60 * 60 * 24)); - const daysBefore = Math.floor((FrenchRCDate.TERMINATION_DATE - gregorianDate) / (1000 * 60 * 60 * 24)); - - if (daysAfter < 0 || daysBefore < 0) { - throw new Error("French Republican Calendar date out of range."); - } - - let year = Math.floor((daysAfter + 366) / 365); - let days = (daysAfter + 366) % 365 - FrenchRCDate.additionalDaysForYear(year); - - if (days < 1) { - year -= 1; - days += 366; - } - - if (days < 361) { - const month = Math.floor(days / 30) + 1; - const day = days % 30 || 30; - return new FrenchRCDate(year, month, day); - } else { - const day = days - 360; - return new FrenchRCDate(year, 13, day); - } - } - - static parse(frenchRCDateString) { - const parts = frenchRCDateString.trim().split(/\s+/); - if (parts.length === 3) { - const [dayStr, monthStr, yearStr] = parts; - const year = parseInt(yearStr, 10); - const month = FrenchRCDate.MONTHS.indexOf(monthStr) + 1; - const day = parseInt(dayStr, 10); - return new FrenchRCDate(year, month, day); - } else { - const yearStr = parts[parts.length - 1]; - const year = parseInt(yearStr, 10); - const sansculottideName = parts.slice(0, -1).join(" "); - const day = FrenchRCDate.SANSCULOTTIDES.indexOf(sansculottideName) + 1; - return new FrenchRCDate(year, 13, day); - } - } -} - -// Helper to format dates like "d MMMM yyyy" -function formatDate(date) { - const months = [ - "January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" - ]; - const day = date.getUTCDate(); - const month = months[date.getUTCMonth()]; - const year = date.getUTCFullYear(); - return `${day} ${month} ${year}`; -} - -// Main logic -const gregorianStrings = [ - "22 September 1792", - "20 May 1795", - "15 July 1799", - "23 September 1803", - "31 December 1805" -]; - -const frenchRCStrings = []; - -for (const gregorianString of gregorianStrings) { - // Parse into JS Date object - const [day, month, year] = gregorianString.split(" "); - const monthIndex = [ - "January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December" - ].indexOf(month); - const gregorianDate = new Date(Date.UTC(parseInt(year), monthIndex, parseInt(day))); - - const frenchRCDate = FrenchRCDate.toFrenchRCDate(gregorianDate); - const frenchRCString = frenchRCDate.toString(); - frenchRCStrings.push(frenchRCString); - console.log(`${gregorianString} => ${frenchRCString}`); -} - -console.log(); - -for (const frenchRCString of frenchRCStrings) { - const frenchRCDate = FrenchRCDate.parse(frenchRCString); - const gregorianDate = frenchRCDate.toGregorianDate(); - console.log(`${frenchRCString} => ${formatDate(gregorianDate)}`); -} diff --git a/Task/French-Republican-calendar/Jq/french-republican-calendar.jq b/Task/French-Republican-calendar/Jq/french-republican-calendar.jq deleted file mode 100644 index dde45845bc..0000000000 --- a/Task/French-Republican-calendar/Jq/french-republican-calendar.jq +++ /dev/null @@ -1,149 +0,0 @@ -include "Date" {search: "."}; - -### Generic functions - -def assertEq($p;$q): - if $p == $q - then . - else debug("assertion violation: \($p) != \($q)") as $debug | . - end; - -def lpad($len): tostring | ($len - length) as $l | (" " * $l) + .; - -def trim: sub("^ *";"") | sub(" *$";""); - -# Input: string such as "12 Mar 2012" -# Output: Date -def parseDayMonthYear: - def months: - {Jan:1, Feb:2, Mar:3, Apr: 4, May: 5, Jun: 6, - Jul:7, Aug:8, Sep:9, Oct:10, Nov:11, Dec:12}; - capture("(?[0-9]+) *(?[A-Za-z]+) *(?[0-9]+)") - | .month |= months[ .[:3] ] - | map_values(tonumber) - | {year, month, day}; - -### French Republican Calendar (FRC) - -def introductionDate: Date(1792; 9; 22); - -# Use the 'continuous method' for years after 1805 -def isLeapYearFRC: - (. + 1) - | (. % 4 == 0) and ((. % 100 != 0) or (. % 400 == 0)); - -# If the numbers $year, $month, and $day specify a valid date -# in the French Republican Calendar, then emit {$year, $month, $day}; -# otherwise generate an informative error message. -def FrenchRCDate($year; $month; $day): - def err(msg): "Invalid date (\(msg)): FrenchRCDate(\($year); \($month); \($day))" | error; - if ($year <= 0 or $month < 1 or $month > 13) then err(if $year <= 0 then "year" else "month" end) end - | if $month < 13 - then if $day < 1 or $day > 30 then err("day") end - else ($year | isLeapYearFRC) as $leap - | if $leap and ($day < 1 or $day > 6) then err("invalid day in leap year") end - | if ($leap|not) and ($day < 1 or $day > 5) then err("invalid day in non-leap year") end - end - | {$year, $month, $day}; - -# for convenience we treat 'Sansculottide' as an extra month with 5 or 6 days -def months: - ["Vendémiaire", "Brumaire", "Frimaire", "Nivôse", "Pluviôse", "Ventôse", "Germinal", - "Floréal", "Prairial", "Messidor", "Thermidor", "Fructidor", "Sansculottide"] ; - -def intercal: - ["Fête de la vertu", "Fête du génie", "Fête du travail", - "Fête de l'opinion", "Fête des récompenses", "Fête de la Révolution"]; - -# Input: a string specifying a FRC date -def parse: - . as $frcDate - | (trim|split(" ")) as $splits - | if $splits|length == 3 - then (months | index($splits[1]) + 1) as $month - | if $month < 1 or $month > 13 then "Invalid month." | error end - | ($splits[2]|tonumber) as $year - | if $year < 1 then "Invalid year." | error end - | (if ($month < 13) then 30 elif $year|isLeapYearFRC then 6 else 5 end) as $monthLength - | ($splits[0] | tonumber) as $day - | if $day < 1 or $day > $monthLength then "Invalid day." | error end - | FrenchRCDate($year; $month; $day) - - elif ($splits|length | IN(4,5)) - then $splits[-1] as $yearStr - | ($yearStr|tonumber) as $year - | if $year < 1 then "Invalid year." | error end - | ($frcDate | trim[0: -($yearStr|length + 1)] ) as $scDay - | (intercal | index($scDay) + 1) as $day - | (if $year | isLeapYearFRC then 6 else 5 end) as $maxDay - | if $day < 1 or $day > $maxDay then "Invalid day." | error end - | FrenchRCDate($year; 13; $day) - else "Invalid French Republican date." | error - end -; - -# Input: Date (Gregorian) -# Output: -def fromLocalDate: - # $start and $finish should be two Date objects - def daysFrom($start; $finish): - ($finish|daysBeforeDate) - ($start|daysBeforeDate); - - (daysFrom(introductionDate; .) + 1) as $daysDiff - | if ($daysDiff <= 0) then "Date can't be before 22 September 1792." | error end - | {year: 1, startDay: 1} - | until(.done; - (.startDay + (if .year|isLeapYearFRC then 365 else 364 end)) as $endDay - | if ($daysDiff >= .startDay and $daysDiff <= $endDay) then .done = true - else .year += 1 - | .startDay = $endDay + 1 - end ) - | ($daysDiff - .startDay) as $remDays - | (($remDays / 30)|floor) as $month - | ($remDays - $month * 30) as $day - | FrenchRCDate(.year; $month + 1; $day + 1) -; - -# Input: an FRC Date -def toString: - if .month < 13 then "\(.day) \(months[.month - 1]) \(.year)" - else "\(intercal[.day - 1]) \(.year)" - end; - -# Input: an FRC Date -def toLocalDate: - (reduce range(1; .year) as $i (0; . + (if $i|isLeapYearFRC then 366 else 365 end))) as $sumDays - | ((.month - 1) * 30 + .day - 1) as $dayInYear - | introductionDate | addDays($sumDays + $dayInYear) ; - - -### Examples - -def dates: [ - "22 September 1792", "20 May 1795", "15 July 1799", "23 September 1803", - "31 December 1805", "18 March 1871", "25 August 1944", "19 September 2016", - "22 September 2017", "28 September 2017" -]; - -def task: - def format: - "\(.day) \(monthNames[.month]) \(.year)"; - - dates as $dates - | reduce range(0; $dates|length) as $i ({}; - .date = $dates[$i] - | .thisDate = (.date|parseDayMonthYear) - | .frcd = (.thisDate|fromLocalDate) - | .frcDates[$i] = (.frcd|toString) - | .emit += "\(.date|lpad(26)) => \(.frcDates[$i])\n") - | .emit, - - # now process the other way around - range(0; $dates|length) as $i - | .frcDates[$i] as $frcDate - | ($frcDate|parse|toLocalDate|format) as $lds - | assertEq($dates[$i]; $lds) - | "\($frcDate|lpad(26)) => \($lds)" -; - -task diff --git a/Task/French-Republican-calendar/Julia/french-republican-calendar.jl b/Task/French-Republican-calendar/Julia/french-republican-calendar.julia similarity index 100% rename from Task/French-Republican-calendar/Julia/french-republican-calendar.jl rename to Task/French-Republican-calendar/Julia/french-republican-calendar.julia diff --git a/Task/French-Republican-calendar/Kotlin/french-republican-calendar.kts b/Task/French-Republican-calendar/Kotlin/french-republican-calendar.kotlin similarity index 100% rename from Task/French-Republican-calendar/Kotlin/french-republican-calendar.kts rename to Task/French-Republican-calendar/Kotlin/french-republican-calendar.kotlin diff --git a/Task/French-Republican-calendar/Rust/french-republican-calendar.rs b/Task/French-Republican-calendar/Rust/french-republican-calendar.rs deleted file mode 100644 index 873b6c090d..0000000000 --- a/Task/French-Republican-calendar/Rust/french-republican-calendar.rs +++ /dev/null @@ -1,177 +0,0 @@ -use chrono::{Datelike, Duration, NaiveDate}; - -const MONTHS: [&str; 13] = [ - "Vendemiaire", "Brumaire", "Frimaire", "Nivose", "Pluviose", "Ventose", "Germinal", - "Floreal", "Prairial", "Messidor", "Thermidor", "Fructidor", "Sansculottide", -]; - -const SANSCULOTTIDES: [&str; 6] = [ - "Fete de la vertu", "Fete du genie", "Fete du travail", - "Fete de l'opinion", "Fete des recompenses", "Fete de la Revolution", -]; - -const GREGORIAN_MONTHS: [&str; 12] = [ - "January", "February", "March", "April", "May", "June", "July", "August", - "September", "October", "November", "December", -]; - -const INTRODUCTION_DATE: NaiveDate = match NaiveDate::from_ymd_opt(1792, 9, 22) { - Some(date) => date, - None => panic!("Invalid introduction date"), -}; - -const TERMINATION_DATE: NaiveDate = match NaiveDate::from_ymd_opt(1805, 12, 31) { - Some(date) => date, - None => panic!("Invalid termination date"), -}; - -#[derive(Debug, Clone, Copy)] -struct FrenchRcDate { - year: u32, - month: u32, - day: u32, -} - -fn split_string(text: &str, delimiter: char) -> Vec<&str> { - text.split(delimiter).collect() -} - -fn index_of(vec: &[&str], element: &str) -> u32 { - vec.iter() - .position(|&x| x == element) - .map(|i| i as u32) - .unwrap_or_else(|| panic!("Element not found: {}", element)) -} - -fn additional_days_for_year(year: u32) -> u32 { - if year > 11 { - 3 - } else if year > 7 { - 2 - } else if year > 3 { - 1 - } else { - 0 - } -} - -fn to_french_rc_date_string(french_rc_date: FrenchRcDate) -> String { - if french_rc_date.month < 13 { - format!( - "{} {} {}", - french_rc_date.day, MONTHS[(french_rc_date.month - 1) as usize], french_rc_date.year - ) - } else { - format!( - "{} {}", - SANSCULOTTIDES[(french_rc_date.day - 1) as usize], french_rc_date.year - ) - } -} - -fn to_gregorian_date_string(gregorian_date: NaiveDate) -> String { - let year = gregorian_date.year(); - let month = gregorian_date.month() as usize; - let day = gregorian_date.day(); - let month_string = GREGORIAN_MONTHS[month - 1]; - format!("{} {} {}", day, month_string, year) -} - -fn parse_gregorian_date(gregorian_string: &str) -> NaiveDate { - let splits: Vec<&str> = split_string(gregorian_string, ' '); - let day: u32 = splits[0].parse().expect("Invalid day"); - let month = index_of(&GREGORIAN_MONTHS, splits[1]) + 1; - let year: i32 = splits[2].parse().expect("Invalid year"); - - NaiveDate::from_ymd_opt(year, month, day) - .unwrap_or_else(|| panic!("Invalid Gregorian date: {}", gregorian_string)) -} - -fn parse_french_rc_date(french_rc_date: &str) -> FrenchRcDate { - let splits: Vec<&str> = split_string(french_rc_date, ' '); - if splits.len() == 3 { - let day: u32 = splits[0].parse().expect("Invalid day"); - let month = index_of(&MONTHS, splits[1]) + 1; - let year: u32 = splits[2].parse().expect("Invalid year"); - FrenchRcDate { year, month, day } - } else { - let year_string = splits[splits.len() - 1]; - let year: u32 = year_string.parse().expect("Invalid year"); - let sansculottides_day = &french_rc_date[..french_rc_date.len() - year_string.len() - 1]; - let day = index_of(&SANSCULOTTIDES, sansculottides_day) + 1; - FrenchRcDate { - year, - month: 13, - day, - } - } -} - -fn to_french_rc_date(gregorian_date: NaiveDate) -> FrenchRcDate { - let days_after = (gregorian_date - INTRODUCTION_DATE).num_days(); - let days_before = (TERMINATION_DATE - gregorian_date).num_days(); - - if days_after < 0 || days_before < 0 { - panic!("French Republican Calendar date out of range."); - } - - let mut year = (days_after + 366) / 365; - let mut days = (days_after + 366) % 365 - additional_days_for_year(year as u32) as i64; - - if days == 0 { - year -= 1; - days += 366; - } - - if days < 361 { - FrenchRcDate { - year: year as u32, - month: (days / 30 + 1) as u32, - day: (days % 30) as u32, - } - } else { - FrenchRcDate { - year: year as u32, - month: 13, - day: (days - 360) as u32, - } - } -} - -fn to_gregorian_date(french_rc_date: FrenchRcDate) -> NaiveDate { - let days = (french_rc_date.year - 1) * 365 - + additional_days_for_year(french_rc_date.year) - + (french_rc_date.month - 1) * 30 - + french_rc_date.day - - 1; - INTRODUCTION_DATE + Duration::days(days as i64) -} - -fn main() { - let gregorian_strings = vec![ - "22 September 1792", - "20 May 1795", - "15 July 1799", - "23 September 1803", - "31 December 1805", - ]; - - let mut french_rc_strings = Vec::new(); - - for gregorian_string in &gregorian_strings { - let gregorian_date = parse_gregorian_date(gregorian_string); - let french_rc_date = to_french_rc_date(gregorian_date); - let french_rc_date_string = to_french_rc_date_string(french_rc_date); - french_rc_strings.push(french_rc_date_string.clone()); - println!("{} => {}", gregorian_string, french_rc_date_string); - } - - println!(); - - for french_rc_string in &french_rc_strings { - let french_rc_date = parse_french_rc_date(french_rc_string); - let gregorian_date = to_gregorian_date(french_rc_date); - let gregorian_date_string = to_gregorian_date_string(gregorian_date); - println!("{} => {}", french_rc_string, gregorian_date_string); - } -} diff --git a/Task/French-Republican-calendar/Scheme/french-republican-calendar.scm b/Task/French-Republican-calendar/Scheme/french-republican-calendar.scm deleted file mode 100644 index a60062f8fd..0000000000 --- a/Task/French-Republican-calendar/Scheme/french-republican-calendar.scm +++ /dev/null @@ -1,234 +0,0 @@ -; version 1 (11 Frimaire 234) -; inspired by BBC Basic -; see https://rosettacode.org/wiki/French_Republican_calendar - -(import (scheme base) (scheme char)) - -; ex: (date->jour-mois-annee '(2025 12 1)) -> 1 12 2025 -(define (date->jour-mois-annee date) - (values (list-ref date 2) (list-ref date 1) (list-ref date 0))) - -; ex: (jours-bissextiles 1900) -> 460 -(define (jours-bissextiles annee) - (- (+ (quotient annee 4) (quotient annee 400)) (quotient annee 100))) - -; ex: (bissextile? 1900) -> #f -(define (bissextile? annee) - (and (zero? (remainder annee 4)) - (or (zero? (remainder annee 400)) (positive? (remainder annee 100))))) - -; ex: (jour-bissextile 1900) -> 0 -(define (jour-bissextile annee) - (if (bissextile? annee) 1 0)) - -; ex: (gregorien->jours '(1792 9 22)) -> 1 -; ex: (gregorien->jours '(2025 12 1)) -> 85172 -(define (gregorien->jours date) - (let*-values (((jour mois annee) (date->jour-mois-annee date)) - ((mois annee) (if (< mois 3) - (values (+ mois 12) (- annee 1)) - (values mois annee)))) - (- (+ (* annee 365) - (jours-bissextiles annee) - (exact (floor (* 30.6 (+ mois 1)))) - jour) - 654842))) - -; ex: (republicain->jours '(1 1 1)) -> 1 -; ex: (republicain->jours '(2025 12 1)) -> 85172 -(define (republicain->jours date) - (let*-values (((jour mois annee) (date->jour-mois-annee date)) - ((mois jour) (if (= mois 13) - (values 12 (+ jour 30)) - (values mois jour)))) - (- (+ (* annee 365) - (* 30 mois) - (jours-bissextiles (+ annee 1)) - jour) - (jour-bissextile (+ annee 1)) - 395))) - -; ex: (jours->gregorien 1) -> (1792 9 22) -; ex: (jours->gregorien 85172) -> (2025 12 1) -(define (jours->gregorien jours) - (let* ((annee (exact (floor (/ jours 365.25)))) - (jour (+ (- jours (exact (floor (* annee 365.25)))) 21)) - (annee (+ annee 1792)) - (jour (- (+ jour (exact (quotient annee 100))) (exact (quotient annee 400)) 13))) - (let boucle ((jour jour)(mois 8)(annee annee)) - (let* ((duree-mois (vector-ref #(31 28 31 30 31 30 31 31 30 31 30 31) mois)) - (duree-mois (+ duree-mois (if (and (= mois 1) (bissextile? annee)) 1 0)))) - (if (<= jour duree-mois) - (list annee (+ mois 1) jour) - (let ((jour (- jour duree-mois)) - (mois (+ mois 1))) - (if (= mois 12) - (boucle jour 0 (+ annee 1)) - (boucle jour mois annee)))))))) - -; ex: (jours->republicain 1) -> (1 1 1) -; ex: (jours->republicain 85172) -> (234 3 11) -(define (jours->republicain jours) - (let* ((annee (exact (floor (/ jours 365.25)))) - (annee (- annee (jour-bissextile (+ annee 1)))) - (jour (- jours (exact (floor (* annee 365.25))))) - (annee (+ annee 1)) - (jour (- (+ jour (exact (quotient annee 100))) (exact (quotient annee 400))))) - (let boucle ((jour jour)(mois 1)(annee annee)) - (let ((duree-mois (if (< mois 13) 30 (+ 5 (jour-bissextile (+ annee 1)))))) - (if (<= jour duree-mois) - (list annee mois jour) - (let ((jour (- jour duree-mois)) - (mois (+ mois 1))) - (if (= mois 14) - (boucle jour 1 (+ annee 1)) - (boucle jour mois annee)))))))) - -; ex: (normalise-caractere #\E) -> #\e -; ex: (normalise-caractere #\ê) -> #\e -(define (normalise-caractere caractere) - (let* ((caractere (char-downcase caractere)) - (autre (assoc caractere '((#\é . #\e) (#\ê . #\e) (#\ô . #\o))))) - (if autre - (cdr autre) - caractere))) - -; ex: (normalise-texte "Ventôse") -> "ventose" -(define (normalise-texte texte) - (string-map normalise-caractere texte)) - -; ex: (normalise-texte '("Ventôse" "Germinal")) -> ("ventose" "germinal") -(define (normalise-liste liste) - (map normalise-texte liste)) - -(define mois-republicains '( - "Vendémiaire" "Brumaire" "Frimaire" "Nivôse" "Pluviôse" "Ventôse" - "Germinal" "Floréal" "Prairial" "Messidor" "Thermidor" "Fructidor" - "Sansculottide")) - -(define sansculottides '( - "Fête de la vertu" "Fête du génie" "Fête du travail" - "Fête de l'opinion" "Fête des récompenses" "Fête de la Révolution" )) - -(define mois-gregoriens '( - "January" "February" "March" "April" "May" "June" - "July" "August" "September" "October" "November" "December" )) - -(define mois-republicains-normal (normalise-liste mois-republicains)) - -(define sansculottides-normal (normalise-liste sansculottides)) - -(define mois-gregoriens-normal (normalise-liste mois-gregoriens)) - -; ex: (gregorien->texte '(2025 12 1)) -> "1 December 2025)" -(define (gregorien->texte date) - (string-append - (number->string (list-ref date 2)) - " " - (list-ref mois-gregoriens (- (list-ref date 1) 1)) - " " - (number->string (list-ref date 0)))) - -; ex: (republicain->texte '(2025 12 1)) -> "1 Fructidor 2025)" -; ex: (republicain->texte '(2025 13 1)) -> "Fête de la vertu 2025)" -(define (republicain->texte date) - (if (= (list-ref date 1) 13) - (string-append - (list-ref sansculottides (- (list-ref date 2) 1)) - " " - (number->string (list-ref date 0))) - (string-append - (number->string (list-ref date 2)) - " " - (list-ref mois-republicains (- (list-ref date 1) 1)) - " " - (number->string (list-ref date 0))))) - -; ex: (decompose "34 toto 78 zorro louarn 9") -> (9 "zorro louarn" 78 "toto" 34) -; ex: (decompose "10 Vendémiaire 1") -> (1 "Vendémiaire" 10) -(define (decompose texte) - (let ((texte (normalise-texte texte))) - (let boucle ((index 0)(resultat '())) - (if (>= index (string-length texte)) - resultat - (let ((caractere (string-ref texte index)) - (index (+ index 1))) - (cond - ((char-whitespace? caractere) - (boucle index resultat)) - ((char-numeric? caractere) - (let lit-nombre ((index index)(valeur (digit-value caractere))) - (let ((caractere (if (>= index (string-length texte)) - #\space - (string-ref texte index)))) - (if (char-numeric? caractere) - (lit-nombre (+ index 1) (+ (* 10 valeur) (digit-value caractere))) - (boucle index (cons valeur resultat)))))) - (else - (let lit-texte ((index index)(valeur (list caractere))) - (let ((caractere (if (>= index (string-length texte)) - #\0 - (string-ref texte index)))) - (if (char-numeric? caractere) - (let retire-espace ((valeur valeur)) - (if (char-whitespace? (car valeur)) - (retire-espace (cdr valeur)) - (boucle index (cons (list->string (reverse valeur)) resultat)))) - (lit-texte (+ index 1) (cons caractere valeur)))))))))))) - -; ex: (index-texte '("a" "b" "c") "b") -> 2 -; ex: (index-texte '("a" "b" "c") "x") -> #f -(define (index-texte liste texte) - (let ((tete (member texte liste))) - (and tete (+ 1 (- (length liste) (length tete)))))) - -; ex: (decode-date "22 September 1792") -> (gregorien 1792 9 22) -; ex: (decode-date "Fête de la Révolution 11") -> (republicain 11 13 6) -(define (decode-date texte) - (let ((decomposition (decompose texte))) - (case (length decomposition) - ((2) - (let* ((annee (list-ref decomposition 0)) - (fete (list-ref decomposition 1)) - (jour (index-texte sansculottides-normal fete))) - (and jour (number? annee) (list 'republicain annee 13 jour)))) - ((3) - (let* ((annee (list-ref decomposition 0)) - (mois (list-ref decomposition 1)) - (jour (list-ref decomposition 2)) - (mois-gregorien (index-texte mois-gregoriens-normal mois)) - (mois-republicain (index-texte mois-republicains-normal mois))) - (and (number? annee) (number? jour) - (or (and mois-gregorien (list 'gregorien annee mois-gregorien jour)) - (and mois-republicain (list 'republicain annee mois-republicain jour)))))) - (else - #f)))) - -; ex: (decode-date "22 September 1792") -> "1 Vendémiaire 1" -; ex: (decode-date "Fête de la Révolution 11") -> "23 September 1803" -(define (converti-date texte) - (let ((decodage (decode-date texte))) - (and decodage - (case (car decodage) - ((gregorien) - (republicain->texte (jours->republicain (gregorien->jours (cdr decodage))))) - ((republicain) - (gregorien->texte (jours->gregorien (republicain->jours (cdr decodage))))) - (else - #f))))) - -; validation -(for-each - (lambda (texte) - (display texte) - (display " = ") - (display (converti-date texte)) - (newline)) - '( - "1 Vendémiaire 1" "22 September 1792" - "1 Prairial 3" "20 May 1795" - "27 Messidor 7" "15 July 1799" - "Fête de la Révolution 11" "23 September 1803" - "10 Nivôse 14" "31 December 1805" - "11 Frimaire 234" "1 December 2025" - )) diff --git a/Task/Function-composition/00-META.yaml b/Task/Function-composition/00-META.yaml index 483655d1d4..bd45864d57 100644 --- a/Task/Function-composition/00-META.yaml +++ b/Task/Function-composition/00-META.yaml @@ -1,2 +1,3 @@ --- from: http://rosettacode.org/wiki/Function_composition +note: Higher-order functions diff --git a/Task/Function-composition/00-TASK.txt b/Task/Function-composition/00-TASK.txt index 8b13789179..44f6ada3f0 100644 --- a/Task/Function-composition/00-TASK.txt +++ b/Task/Function-composition/00-TASK.txt @@ -1 +1,16 @@ +;Task: +Create a function, compose,   whose two arguments   ''f''   and   ''g'',   are both functions with one argument. + + +The result of compose is to be a function of one argument, (lets call the argument   ''x''),   which works like applying function   ''f''   to the result of applying function   ''g''   to   ''x''. + + +;Example: + compose(''f'', ''g'') (''x'') = ''f''(''g''(''x'')) + + +Reference: [[wp:Function composition (computer science)|Function composition]] + +Hint: In some languages, implementing compose correctly requires creating a [[wp:Closure (computer science)|closure]]. +

    diff --git a/Task/Function-composition/Ada/function-composition-1.adb b/Task/Function-composition/Ada/function-composition-1.ada similarity index 100% rename from Task/Function-composition/Ada/function-composition-1.adb rename to Task/Function-composition/Ada/function-composition-1.ada diff --git a/Task/Function-composition/Ada/function-composition-2.adb b/Task/Function-composition/Ada/function-composition-2.ada similarity index 100% rename from Task/Function-composition/Ada/function-composition-2.adb rename to Task/Function-composition/Ada/function-composition-2.ada diff --git a/Task/Function-composition/Ada/function-composition-3.adb b/Task/Function-composition/Ada/function-composition-3.ada similarity index 100% rename from Task/Function-composition/Ada/function-composition-3.adb rename to Task/Function-composition/Ada/function-composition-3.ada diff --git a/Task/Function-composition/Crystal/function-composition.cr b/Task/Function-composition/Crystal/function-composition.crystal similarity index 100% rename from Task/Function-composition/Crystal/function-composition.cr rename to Task/Function-composition/Crystal/function-composition.crystal diff --git a/Task/Function-composition/Delphi/function-composition.pas b/Task/Function-composition/Delphi/function-composition.delphi similarity index 100% rename from Task/Function-composition/Delphi/function-composition.pas rename to Task/Function-composition/Delphi/function-composition.delphi diff --git a/Task/Function-composition/Elena/function-composition.elena b/Task/Function-composition/Elena/function-composition.elena index e2bfe40d6c..2361868faf 100644 --- a/Task/Function-composition/Elena/function-composition.elena +++ b/Task/Function-composition/Elena/function-composition.elena @@ -6,9 +6,9 @@ extension op : Func1 = (x => self(f(x))); } -public Program() +public program() { var fg := (x => x + 1).compose::(x => x * x); - Console.printLine(fg(3)) + console.printLine(fg(3)) } diff --git a/Task/Function-composition/Elixir/function-composition.ex b/Task/Function-composition/Elixir/function-composition.elixir similarity index 100% rename from Task/Function-composition/Elixir/function-composition.ex rename to Task/Function-composition/Elixir/function-composition.elixir diff --git a/Task/Function-composition/Emacs-Lisp/function-composition-1.el b/Task/Function-composition/Emacs-Lisp/function-composition-1.l similarity index 100% rename from Task/Function-composition/Emacs-Lisp/function-composition-1.el rename to Task/Function-composition/Emacs-Lisp/function-composition-1.l diff --git a/Task/Function-composition/Emacs-Lisp/function-composition-2.el b/Task/Function-composition/Emacs-Lisp/function-composition-2.l similarity index 100% rename from Task/Function-composition/Emacs-Lisp/function-composition-2.el rename to Task/Function-composition/Emacs-Lisp/function-composition-2.l diff --git a/Task/Function-composition/Emacs-Lisp/function-composition-3.el b/Task/Function-composition/Emacs-Lisp/function-composition-3.l similarity index 100% rename from Task/Function-composition/Emacs-Lisp/function-composition-3.el rename to Task/Function-composition/Emacs-Lisp/function-composition-3.l diff --git a/Task/Function-composition/FutureBasic/function-composition.basic b/Task/Function-composition/FutureBasic/function-composition.basic deleted file mode 100644 index 8df8fe887d..0000000000 --- a/Task/Function-composition/FutureBasic/function-composition.basic +++ /dev/null @@ -1,14 +0,0 @@ -double local fn FunctionF( x as double ) -end fn = x + 1.5 - -double local fn FunctionG( x as double ) -end fn = x * x - -double local fn Compose( f as ptr, g as ptr ) - double def fn ff(x1 as double) using f - double def fn fg(x2 as double) using g -end fn = fn ff(fn fg(2.5)) - -print fn Compose( @fn FunctionF, @fn FunctionG ) - -HandleEvents diff --git a/Task/Function-composition/Julia/function-composition-1.jl b/Task/Function-composition/Julia/function-composition-1.julia similarity index 100% rename from Task/Function-composition/Julia/function-composition-1.jl rename to Task/Function-composition/Julia/function-composition-1.julia diff --git a/Task/Function-composition/Julia/function-composition-2.jl b/Task/Function-composition/Julia/function-composition-2.julia similarity index 100% rename from Task/Function-composition/Julia/function-composition-2.jl rename to Task/Function-composition/Julia/function-composition-2.julia diff --git a/Task/Function-composition/Kotlin/function-composition.kts b/Task/Function-composition/Kotlin/function-composition.kotlin similarity index 100% rename from Task/Function-composition/Kotlin/function-composition.kts rename to Task/Function-composition/Kotlin/function-composition.kotlin diff --git a/Task/Function-composition/OCaml/function-composition-1.ml b/Task/Function-composition/OCaml/function-composition-1.ocaml similarity index 100% rename from Task/Function-composition/OCaml/function-composition-1.ml rename to Task/Function-composition/OCaml/function-composition-1.ocaml diff --git a/Task/Function-composition/OCaml/function-composition-2.ml b/Task/Function-composition/OCaml/function-composition-2.ocaml similarity index 100% rename from Task/Function-composition/OCaml/function-composition-2.ml rename to Task/Function-composition/OCaml/function-composition-2.ocaml diff --git a/Task/Function-composition/Odin/function-composition.odin b/Task/Function-composition/Odin/function-composition.odin deleted file mode 100644 index bda638fa4b..0000000000 --- a/Task/Function-composition/Odin/function-composition.odin +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import "core:fmt" -import "core:math" - -Compositor :: struct($ARG, $INTER, $RET: typeid) { - func1: #type proc "contextless" (_: ARG) -> INTER, - func2: #type proc "contextless" (_: INTER) -> RET, -} - -compose :: proc( - f: #type proc "contextless" (_: $INTER) -> $RET, - g: #type proc "contextless" (_: $ARG) -> INTER, -) -> Compositor(ARG, RET, INTER) { - return {g, f} -} - -call :: proc(c: Compositor($ARG, $INTER, $RET), arg: ARG) -> RET { - return c.func1(c.func2(arg)) -} - -main :: proc() { - comp := compose(math.sin_f64, math.asin_f64) // have to use specific functions. Odin's polymorphism doesn't play nice with procedure groups - fmt.println(call(comp, 0.5)) // prints 0.5 -} diff --git a/Task/Function-composition/PascalABC.NET/function-composition.pas b/Task/Function-composition/PascalABC.NET/function-composition.pas deleted file mode 100644 index 7072b96e99..0000000000 --- a/Task/Function-composition/PascalABC.NET/function-composition.pas +++ /dev/null @@ -1,5 +0,0 @@ -function Compose(f: T1 -> T2; g: T -> T1): T -> T2 := x -> f(g(x)); - -begin - Compose(Sin,ArcSin)(1.0).Print -end. diff --git a/Task/Function-composition/Pluto/function-composition.pluto b/Task/Function-composition/Pluto/function-composition.pluto deleted file mode 100644 index 6bbdea1daa..0000000000 --- a/Task/Function-composition/Pluto/function-composition.pluto +++ /dev/null @@ -1,7 +0,0 @@ -local function compose(f, g) return |x| -> f(g(x)) end - -local function double(x) return 2 * x end - -local function add_one(x) return x + 1 end - -print(compose(double, add_one)(3)) diff --git a/Task/Function-composition/PowerShell/function-composition-1.ps1 b/Task/Function-composition/PowerShell/function-composition-1.psh similarity index 100% rename from Task/Function-composition/PowerShell/function-composition-1.ps1 rename to Task/Function-composition/PowerShell/function-composition-1.psh diff --git a/Task/Function-composition/PowerShell/function-composition-2.ps1 b/Task/Function-composition/PowerShell/function-composition-2.psh similarity index 100% rename from Task/Function-composition/PowerShell/function-composition-2.ps1 rename to Task/Function-composition/PowerShell/function-composition-2.psh diff --git a/Task/Function-composition/Rebol/function-composition-1.rebol b/Task/Function-composition/REBOL/function-composition-1.rebol similarity index 78% rename from Task/Function-composition/Rebol/function-composition-1.rebol rename to Task/Function-composition/REBOL/function-composition-1.rebol index ef233a55ac..8f31baeb19 100644 --- a/Task/Function-composition/Rebol/function-composition-1.rebol +++ b/Task/Function-composition/REBOL/function-composition-1.rebol @@ -1,9 +1,9 @@ -Rebol [ +REBOL [ Title: "Functional Composition" URL: http://rosettacode.org/wiki/Functional_Composition ] -; "compose" means something else in Rebol, therefore I use a 'compose-functions name. +; "compose" means something else in REBOL, therefore I use a 'compose-functions name. compose-functions: func [ {compose the given functions F and G} diff --git a/Task/Function-composition/Rebol/function-composition-2.rebol b/Task/Function-composition/REBOL/function-composition-2.rebol similarity index 100% rename from Task/Function-composition/Rebol/function-composition-2.rebol rename to Task/Function-composition/REBOL/function-composition-2.rebol diff --git a/Task/Function-composition/REXX/function-composition.rexx b/Task/Function-composition/REXX/function-composition.rexx index ab3603d56d..5036f78de6 100644 --- a/Task/Function-composition/REXX/function-composition.rexx +++ b/Task/Function-composition/REXX/function-composition.rexx @@ -1,21 +1,3 @@ --- 12 Sep 2025 -include Setting +compose: procedure; parse arg f,g,x; interpret 'return' f"(" g'(' x "))" -say 'FUNCTION COMPOSITION' -say version -say -parse value 'Sin' 'ArcSin' 0.5 with ff gg xx -say 'Compose('ff','gg','xx')' '=' Compose(ff,gg,xx) ',' ff'('gg'('xx'))' '=' Sin(ArcSin(xx)) -parse value 'ArcSin' 'Sin' 0.5 with ff gg xx -say 'Compose('ff','gg','xx')' '=' Compose(ff,gg,xx) ',' ff'('gg'('xx'))' '=' ArcSin(Sin(xx)) -parse value 'Zeta' 'Gamma' 0.5 with ff gg xx -say 'Compose('ff','gg','xx')' '=' Compose(ff,gg,xx) ',' ff'('gg'('xx'))' '=' Zeta(Gamma(xx)) -exit - -Compose: -procedure expose Memo. -arg ff,gg,xx -interpret 'rr='ff'('gg'('xx'))' -return rr - -include Math +exit /*control should never gets here, but this was added just in case.*/ diff --git a/Task/Function-composition/Red/function-composition.red b/Task/Function-composition/Red/function-composition.red deleted file mode 100644 index 0f4331df21..0000000000 --- a/Task/Function-composition/Red/function-composition.red +++ /dev/null @@ -1,18 +0,0 @@ -Red [ "Compose Two or Any Number of Functions - Hinjolicious" ] - -; to show the codes -demo: function [s b] [print ["^/==" s "==^/"] print mold/only b do b] - -demo "Compose two functions" [ -comp-func: function ['f 'g] [function [x] compose [(get f) (get g) x]] -sin-cos: comp-func sin cos -print sin-cos 0.5 -] - -demo "Compose any number of functions" [ -comp-funcs: function [ff] [ - function [x] compose append collect [foreach e ff [keep (get e)]] 'x -] -log-sin-cos: comp-funcs [log-e sin cos] -print log-sin-cos 0.5 -] diff --git a/Task/Function-composition/Rust/function-composition-1.rs b/Task/Function-composition/Rust/function-composition-1.rust similarity index 100% rename from Task/Function-composition/Rust/function-composition-1.rs rename to Task/Function-composition/Rust/function-composition-1.rust diff --git a/Task/Function-composition/Rust/function-composition-2.rs b/Task/Function-composition/Rust/function-composition-2.rust similarity index 100% rename from Task/Function-composition/Rust/function-composition-2.rs rename to Task/Function-composition/Rust/function-composition-2.rust diff --git a/Task/Function-composition/Scheme/function-composition-1.scm b/Task/Function-composition/Scheme/function-composition-1.ss similarity index 100% rename from Task/Function-composition/Scheme/function-composition-1.scm rename to Task/Function-composition/Scheme/function-composition-1.ss diff --git a/Task/Function-composition/Scheme/function-composition-2.scm b/Task/Function-composition/Scheme/function-composition-2.ss similarity index 100% rename from Task/Function-composition/Scheme/function-composition-2.scm rename to Task/Function-composition/Scheme/function-composition-2.ss diff --git a/Task/Function-composition/Scheme/function-composition-3.scm b/Task/Function-composition/Scheme/function-composition-3.ss similarity index 100% rename from Task/Function-composition/Scheme/function-composition-3.scm rename to Task/Function-composition/Scheme/function-composition-3.ss diff --git a/Task/Function-composition/VBScript/function-composition-1.vbs b/Task/Function-composition/VBScript/function-composition-1.vb similarity index 100% rename from Task/Function-composition/VBScript/function-composition-1.vbs rename to Task/Function-composition/VBScript/function-composition-1.vb diff --git a/Task/Function-composition/VBScript/function-composition-2.vbs b/Task/Function-composition/VBScript/function-composition-2.vb similarity index 100% rename from Task/Function-composition/VBScript/function-composition-2.vbs rename to Task/Function-composition/VBScript/function-composition-2.vb diff --git a/Task/Function-definition/ANSI-BASIC/function-definition.basic b/Task/Function-definition/ANSI-BASIC/function-definition.basic deleted file mode 100644 index 9caf26d3c9..0000000000 --- a/Task/Function-definition/ANSI-BASIC/function-definition.basic +++ /dev/null @@ -1,13 +0,0 @@ -100 DEF Multiply(A, B) = A * B -110 DECLARE FUNCTION MultiplyI -120 DECLARE EXTERNAL FUNCTION MultiplyE -130 PRINT Multiply(3, 1.23456) -140 PRINT MultiplyI(3, 1.23456) -150 PRINT MultiplyE(3, 1.23456) -160 FUNCTION MultiplyI(X, Y) -170 LET MultiplyI = X * Y -180 END FUNCTION -190 END -200 EXTERNAL FUNCTION MultiplyE(A, B) -210 LET MultiplyE = A * B -220 END FUNCTION diff --git a/Task/Function-definition/Ada/function-definition-1.adb b/Task/Function-definition/Ada/function-definition-1.ada similarity index 100% rename from Task/Function-definition/Ada/function-definition-1.adb rename to Task/Function-definition/Ada/function-definition-1.ada diff --git a/Task/Function-definition/Ada/function-definition-2.adb b/Task/Function-definition/Ada/function-definition-2.ada similarity index 100% rename from Task/Function-definition/Ada/function-definition-2.adb rename to Task/Function-definition/Ada/function-definition-2.ada diff --git a/Task/Function-definition/Ada/function-definition-3.adb b/Task/Function-definition/Ada/function-definition-3.ada similarity index 100% rename from Task/Function-definition/Ada/function-definition-3.adb rename to Task/Function-definition/Ada/function-definition-3.ada diff --git a/Task/Function-definition/Ada/function-definition-4.adb b/Task/Function-definition/Ada/function-definition-4.ada similarity index 100% rename from Task/Function-definition/Ada/function-definition-4.adb rename to Task/Function-definition/Ada/function-definition-4.ada diff --git a/Task/Function-definition/Ada/function-definition-5.adb b/Task/Function-definition/Ada/function-definition-5.ada similarity index 100% rename from Task/Function-definition/Ada/function-definition-5.adb rename to Task/Function-definition/Ada/function-definition-5.ada diff --git a/Task/Function-definition/Ada/function-definition-6.adb b/Task/Function-definition/Ada/function-definition-6.ada similarity index 100% rename from Task/Function-definition/Ada/function-definition-6.adb rename to Task/Function-definition/Ada/function-definition-6.ada diff --git a/Task/Function-definition/ArkScript/function-definition.ark b/Task/Function-definition/ArkScript/function-definition.ark deleted file mode 100644 index 2c796ab336..0000000000 --- a/Task/Function-definition/ArkScript/function-definition.ark +++ /dev/null @@ -1,2 +0,0 @@ -(let multiply (fun (a b) - (* a b))) diff --git a/Task/Function-definition/AutoIt/function-definition.au3 b/Task/Function-definition/AutoIt/function-definition.autoit similarity index 100% rename from Task/Function-definition/AutoIt/function-definition.au3 rename to Task/Function-definition/AutoIt/function-definition.autoit diff --git a/Task/Function-definition/QuickBASIC/function-definition.basic b/Task/Function-definition/BASIC/function-definition.basic similarity index 100% rename from Task/Function-definition/QuickBASIC/function-definition.basic rename to Task/Function-definition/BASIC/function-definition.basic diff --git a/Task/Function-definition/Ballerina/function-definition.ballerina b/Task/Function-definition/Ballerina/function-definition.ballerina deleted file mode 100644 index a3c79abc73..0000000000 --- a/Task/Function-definition/Ballerina/function-definition.ballerina +++ /dev/null @@ -1,9 +0,0 @@ -import ballerina/io; - -function multiply(int a, int b) returns int { - return a * b; -} - -public function main() { - io:println(multiply(4, 5)); -} diff --git a/Task/Function-definition/COBOL/function-definition-1.cob b/Task/Function-definition/COBOL/function-definition-1.cobol similarity index 100% rename from Task/Function-definition/COBOL/function-definition-1.cob rename to Task/Function-definition/COBOL/function-definition-1.cobol diff --git a/Task/Function-definition/COBOL/function-definition-2.cob b/Task/Function-definition/COBOL/function-definition-2.cobol similarity index 100% rename from Task/Function-definition/COBOL/function-definition-2.cob rename to Task/Function-definition/COBOL/function-definition-2.cobol diff --git a/Task/Function-definition/Chapel/function-definition-1.chpl b/Task/Function-definition/Chapel/function-definition-1.chpl deleted file mode 100644 index dce621a59f..0000000000 --- a/Task/Function-definition/Chapel/function-definition-1.chpl +++ /dev/null @@ -1,4 +0,0 @@ -proc multiply(a, b) -{ - return a * b; -} diff --git a/Task/Function-definition/Chapel/function-definition-2.chpl b/Task/Function-definition/Chapel/function-definition-2.chpl deleted file mode 100644 index cd4150861a..0000000000 --- a/Task/Function-definition/Chapel/function-definition-2.chpl +++ /dev/null @@ -1,4 +0,0 @@ -proc multiply(a : ?t ... 2) -{ - return a(0) * a(1) -} diff --git a/Task/Function-definition/Crystal/function-definition.cr b/Task/Function-definition/Crystal/function-definition.cr deleted file mode 100644 index 9a6b44e375..0000000000 --- a/Task/Function-definition/Crystal/function-definition.cr +++ /dev/null @@ -1,16 +0,0 @@ -def multiply (a, b) - a * b -end - -# with type restrictions: -def multiply (a : Int32, b : Int32) - print "(typed overload) " - a * b -end - -# proc (anonymous function) -m = ->(a : Int32, b : Int32) { a * b } - -p! multiply(2, 3), - multiply(2.0, 3.0), - m.call(2, 3) diff --git a/Task/Function-definition/Delphi/function-definition.pas b/Task/Function-definition/Delphi/function-definition.delphi similarity index 100% rename from Task/Function-definition/Delphi/function-definition.pas rename to Task/Function-definition/Delphi/function-definition.delphi diff --git a/Task/Function-definition/DuckDB/function-definition-1.duckdb b/Task/Function-definition/DuckDB/function-definition-1.duckdb deleted file mode 100644 index ce21102e19..0000000000 --- a/Task/Function-definition/DuckDB/function-definition-1.duckdb +++ /dev/null @@ -1 +0,0 @@ -create or replace function multiply(x,y) as x*y; diff --git a/Task/Function-definition/DuckDB/function-definition-2.duckdb b/Task/Function-definition/DuckDB/function-definition-2.duckdb deleted file mode 100644 index 3053825ed4..0000000000 --- a/Task/Function-definition/DuckDB/function-definition-2.duckdb +++ /dev/null @@ -1,10 +0,0 @@ -create or replace function power2(n) as ( - with recursive cte as ( - select 0 as i, 1::UHUGEINT as p - union all - select i+1 as i, p*2 as p - from cte - where i < n ) - select last(p order by i) - from cte -); diff --git a/Task/Function-definition/Elixir/function-definition.ex b/Task/Function-definition/Elixir/function-definition.elixir similarity index 100% rename from Task/Function-definition/Elixir/function-definition.ex rename to Task/Function-definition/Elixir/function-definition.elixir diff --git a/Task/Function-definition/Emacs-Lisp/function-definition-1.el b/Task/Function-definition/Emacs-Lisp/function-definition-1.l similarity index 100% rename from Task/Function-definition/Emacs-Lisp/function-definition-1.el rename to Task/Function-definition/Emacs-Lisp/function-definition-1.l diff --git a/Task/Function-definition/Emacs-Lisp/function-definition-2.el b/Task/Function-definition/Emacs-Lisp/function-definition-2.l similarity index 100% rename from Task/Function-definition/Emacs-Lisp/function-definition-2.el rename to Task/Function-definition/Emacs-Lisp/function-definition-2.l diff --git a/Task/Function-definition/Euphoria/function-definition-1.eu b/Task/Function-definition/Euphoria/function-definition-1.euphoria similarity index 100% rename from Task/Function-definition/Euphoria/function-definition-1.eu rename to Task/Function-definition/Euphoria/function-definition-1.euphoria diff --git a/Task/Function-definition/Euphoria/function-definition-2.eu b/Task/Function-definition/Euphoria/function-definition-2.euphoria similarity index 100% rename from Task/Function-definition/Euphoria/function-definition-2.eu rename to Task/Function-definition/Euphoria/function-definition-2.euphoria diff --git a/Task/Function-definition/Excel/function-definition.excel b/Task/Function-definition/Excel/function-definition.excel deleted file mode 100644 index 1b33fa780a..0000000000 --- a/Task/Function-definition/Excel/function-definition.excel +++ /dev/null @@ -1,4 +0,0 @@ -=LET( - MULTIPLY, LAMBDA(a, b, a * b), - ... - ) diff --git a/Task/Function-definition/FutureBasic/function-definition-2.basic b/Task/Function-definition/FutureBasic/function-definition-2.basic deleted file mode 100644 index c6c813c61b..0000000000 --- a/Task/Function-definition/FutureBasic/function-definition-2.basic +++ /dev/null @@ -1,8 +0,0 @@ -window 1 - -long local fn multiply( a as long, b as long ) -end fn = a * b - -print fn multiply( 3, 9 ) - -HandleEvents diff --git a/Task/Function-definition/FutureBasic/function-definition-1.basic b/Task/Function-definition/FutureBasic/function-definition.basic similarity index 100% rename from Task/Function-definition/FutureBasic/function-definition-1.basic rename to Task/Function-definition/FutureBasic/function-definition.basic diff --git a/Task/Function-definition/Gleam/function-definition.gleam b/Task/Function-definition/Gleam/function-definition.gleam deleted file mode 100644 index 45be9f932e..0000000000 --- a/Task/Function-definition/Gleam/function-definition.gleam +++ /dev/null @@ -1,3 +0,0 @@ -fn multiply(x: Int, y: Int) -> Int { - x * y -} diff --git a/Task/Function-definition/Haxe/function-definition.hx b/Task/Function-definition/Haxe/function-definition.haxe similarity index 100% rename from Task/Function-definition/Haxe/function-definition.hx rename to Task/Function-definition/Haxe/function-definition.haxe diff --git a/Task/Function-definition/Java/function-definition-2.java b/Task/Function-definition/Java/function-definition-2.java deleted file mode 100644 index fb127fb080..0000000000 --- a/Task/Function-definition/Java/function-definition-2.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.util.function.BiFunction; -import java.util.function.DoubleUnaryOperator; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.function.UnaryOperator; - -public final class FunctionDefinition { - - public static void main(String[] args) { - System.out.println(size.apply("Rosetta")); - System.out.println(greeting.apply("Joe")); - System.out.println(half.applyAsDouble(7)); - System.out.println(lessThanTen.test(15)); - System.out.println(add.apply(2, 3)); - } - - private static Function size = s -> s.length(); - - private static UnaryOperator greeting = s -> "Hello " + s; - - private static DoubleUnaryOperator half = a -> a / 2; - - private static Predicate lessThanTen = a -> a < 10; - - private static BiFunction add = (a, b) -> a + b; - -} diff --git a/Task/Function-definition/Java/function-definition-1.java b/Task/Function-definition/Java/function-definition.java similarity index 100% rename from Task/Function-definition/Java/function-definition-1.java rename to Task/Function-definition/Java/function-definition.java diff --git a/Task/Function-definition/JavaScript/function-definition-6.js b/Task/Function-definition/JavaScript/function-definition-6.js index b32d13d81a..60d2fdb755 100644 --- a/Task/Function-definition/JavaScript/function-definition-6.js +++ b/Task/Function-definition/JavaScript/function-definition-6.js @@ -1,8 +1,2 @@ var multiply = (a, b) => a * b; var multiply = (a, b) => { return a * b }; - -// Or, `var` being long deprecated, and currying convenient, -// (particularly in use with the higher-order Array methods) - -const multiply = a => - b => a * b; diff --git a/Task/Function-definition/Julia/function-definition-1.jl b/Task/Function-definition/Julia/function-definition-1.julia similarity index 100% rename from Task/Function-definition/Julia/function-definition-1.jl rename to Task/Function-definition/Julia/function-definition-1.julia diff --git a/Task/Function-definition/Julia/function-definition-2.jl b/Task/Function-definition/Julia/function-definition-2.julia similarity index 100% rename from Task/Function-definition/Julia/function-definition-2.jl rename to Task/Function-definition/Julia/function-definition-2.julia diff --git a/Task/Function-definition/Julia/function-definition-3.jl b/Task/Function-definition/Julia/function-definition-3.julia similarity index 100% rename from Task/Function-definition/Julia/function-definition-3.jl rename to Task/Function-definition/Julia/function-definition-3.julia diff --git a/Task/Function-definition/Komodo/function-definition.komodo b/Task/Function-definition/Komodo/function-definition.komodo deleted file mode 100644 index 63404d357c..0000000000 --- a/Task/Function-definition/Komodo/function-definition.komodo +++ /dev/null @@ -1,5 +0,0 @@ -let prod(a, b) := a*b -let prodAnon := (a, b) -> a*b - -assert(prodAnon(2, 2) = ((a, b) -> a*b)(2, 2)) -assert(prod(2, 2) = prodAnon(2, 2)) diff --git a/Task/Function-definition/Kotlin/function-definition.kts b/Task/Function-definition/Kotlin/function-definition.kotlin similarity index 100% rename from Task/Function-definition/Kotlin/function-definition.kts rename to Task/Function-definition/Kotlin/function-definition.kotlin diff --git a/Task/Function-definition/LOLCODE/function-definition.lol b/Task/Function-definition/LOLCODE/function-definition.lol deleted file mode 100644 index 8d50259103..0000000000 --- a/Task/Function-definition/LOLCODE/function-definition.lol +++ /dev/null @@ -1,9 +0,0 @@ -HAI 1.3 - -HOW IZ I MULTIPLY YR X AN YR Y - FOUND YR PRODUKT OF X AN Y -IF U SAY SO - -VISIBLE I IZ MULTIPLY YR 2 AND YR 3 MKAY - -KTHXBYE diff --git a/Task/Function-definition/Langur/function-definition-1.langur b/Task/Function-definition/Langur/function-definition-1.langur index 0445f67e8d..5f5be48e73 100644 --- a/Task/Function-definition/Langur/function-definition-1.langur +++ b/Task/Function-definition/Langur/function-definition-1.langur @@ -1 +1,2 @@ -val multiply = fn(a, b) { a * b } +val .multiply = fn(.x, .y) { .x * .y } +.multiply(3, 4) diff --git a/Task/Function-definition/Langur/function-definition-2.langur b/Task/Function-definition/Langur/function-definition-2.langur index 5878a47bf8..acbe918263 100644 --- a/Task/Function-definition/Langur/function-definition-2.langur +++ b/Task/Function-definition/Langur/function-definition-2.langur @@ -1 +1,2 @@ -val multiply = fn{*} +val .multiply = fn(.x, .y) .x * .y +.multiply(3, 4) diff --git a/Task/Function-definition/Langur/function-definition-3.langur b/Task/Function-definition/Langur/function-definition-3.langur index e8a58c5239..d66762792a 100644 --- a/Task/Function-definition/Langur/function-definition-3.langur +++ b/Task/Function-definition/Langur/function-definition-3.langur @@ -1 +1,2 @@ -val timestwo = fn{*2} +val .multiply = fn{*} +.multiply(3, 4) diff --git a/Task/Function-definition/Langur/function-definition-4.langur b/Task/Function-definition/Langur/function-definition-4.langur index 64c16021ee..69bbd2fc56 100644 --- a/Task/Function-definition/Langur/function-definition-4.langur +++ b/Task/Function-definition/Langur/function-definition-4.langur @@ -1 +1,2 @@ -val factorial = fn(x) { if(x < 2: 1; x * fn((x - 1))) } +val .times3 = fn{* 3} +map .times3, [1, 2, 3] diff --git a/Task/Function-definition/Langur/function-definition-5.langur b/Task/Function-definition/Langur/function-definition-5.langur new file mode 100644 index 0000000000..3f55f3d068 --- /dev/null +++ b/Task/Function-definition/Langur/function-definition-5.langur @@ -0,0 +1 @@ +val .writeit = impure fn(.x) { writeln .x } diff --git a/Task/Function-definition/OCaml/function-definition.ml b/Task/Function-definition/OCaml/function-definition.ocaml similarity index 100% rename from Task/Function-definition/OCaml/function-definition.ml rename to Task/Function-definition/OCaml/function-definition.ocaml diff --git a/Task/Function-definition/PascalABC.NET/function-definition.pas b/Task/Function-definition/PascalABC.NET/function-definition.pas deleted file mode 100644 index 5cdaeef57d..0000000000 --- a/Task/Function-definition/PascalABC.NET/function-definition.pas +++ /dev/null @@ -1 +0,0 @@ -function multiply(a,b: real): real := a + b; diff --git a/Task/Function-definition/Pluto/function-definition.pluto b/Task/Function-definition/Pluto/function-definition.pluto deleted file mode 100644 index 442e6b756c..0000000000 --- a/Task/Function-definition/Pluto/function-definition.pluto +++ /dev/null @@ -1,5 +0,0 @@ -function multiply(a,b) - return a*b -end - -print(multiply(3,4)) diff --git a/Task/Function-definition/PowerShell/function-definition-1.ps1 b/Task/Function-definition/PowerShell/function-definition-1.psh similarity index 100% rename from Task/Function-definition/PowerShell/function-definition-1.ps1 rename to Task/Function-definition/PowerShell/function-definition-1.psh diff --git a/Task/Function-definition/PowerShell/function-definition-2.ps1 b/Task/Function-definition/PowerShell/function-definition-2.psh similarity index 100% rename from Task/Function-definition/PowerShell/function-definition-2.ps1 rename to Task/Function-definition/PowerShell/function-definition-2.psh diff --git a/Task/Function-definition/PowerShell/function-definition-3.ps1 b/Task/Function-definition/PowerShell/function-definition-3.psh similarity index 100% rename from Task/Function-definition/PowerShell/function-definition-3.ps1 rename to Task/Function-definition/PowerShell/function-definition-3.psh diff --git a/Task/Function-definition/PowerShell/function-definition-4.ps1 b/Task/Function-definition/PowerShell/function-definition-4.psh similarity index 100% rename from Task/Function-definition/PowerShell/function-definition-4.ps1 rename to Task/Function-definition/PowerShell/function-definition-4.psh diff --git a/Task/Function-definition/PowerShell/function-definition-5.ps1 b/Task/Function-definition/PowerShell/function-definition-5.psh similarity index 100% rename from Task/Function-definition/PowerShell/function-definition-5.ps1 rename to Task/Function-definition/PowerShell/function-definition-5.psh diff --git a/Task/Function-definition/Rebol/function-definition.rebol b/Task/Function-definition/REBOL/function-definition.rebol similarity index 100% rename from Task/Function-definition/Rebol/function-definition.rebol rename to Task/Function-definition/REBOL/function-definition.rebol diff --git a/Task/Function-definition/REXX/function-definition-1.rexx b/Task/Function-definition/REXX/function-definition-1.rexx new file mode 100644 index 0000000000..a476639d66 --- /dev/null +++ b/Task/Function-definition/REXX/function-definition-1.rexx @@ -0,0 +1 @@ +multiply: return arg(1) * arg(2) /*return the product of the two arguments.*/ diff --git a/Task/Function-definition/REXX/function-definition-2.rexx b/Task/Function-definition/REXX/function-definition-2.rexx new file mode 100644 index 0000000000..569b050f96 --- /dev/null +++ b/Task/Function-definition/REXX/function-definition-2.rexx @@ -0,0 +1 @@ +multiply: return arg(1) * arg(2) / 1 /*return with a normalized product of 2 args. */ diff --git a/Task/Function-definition/REXX/function-definition.rexx b/Task/Function-definition/REXX/function-definition.rexx deleted file mode 100644 index 1d6fc424e5..0000000000 --- a/Task/Function-definition/REXX/function-definition.rexx +++ /dev/null @@ -1,34 +0,0 @@ --- 11 Sep 2025 -include Setting - -say 'FUNCTION DEFINITION' -say version -say -xx=0; yy=0; rr=0 -say 'xx =' xx 'yy =' yy 'rr =' rr -say 'Multiply1(2,3)' '=' Multiply1(2,3) -say 'xx =' xx 'yy =' yy 'rr =' rr -say 'Multiply2(3,5)' '=' Multiply2(3,5) -say 'xx =' xx 'yy =' yy 'rr =' rr -xx=5; yy=7 -say 'xx =' xx 'yy =' yy 'rr =' rr -say 'Multiply3(5,7)' '=' Multiply3() -say 'xx =' xx 'yy =' yy 'rr =' rr -exit - -Multiply1: -procedure -arg xx,yy -rr=xx*yy -return rr - -Multiply2: -arg xx,yy -rr=xx*yy -return rr - -Multiply3: -rr=xx*yy -return rr - -include Math diff --git a/Task/Function-definition/Rust/function-definition.rs b/Task/Function-definition/Rust/function-definition.rust similarity index 100% rename from Task/Function-definition/Rust/function-definition.rs rename to Task/Function-definition/Rust/function-definition.rust diff --git a/Task/Function-definition/Rye/function-definition-1.rye b/Task/Function-definition/Rye/function-definition-1.rye deleted file mode 100644 index 944dd8c78b..0000000000 --- a/Task/Function-definition/Rye/function-definition-1.rye +++ /dev/null @@ -1 +0,0 @@ -multiply: fn { a b } { a * b } diff --git a/Task/Function-definition/Rye/function-definition-2.rye b/Task/Function-definition/Rye/function-definition-2.rye deleted file mode 100644 index 2f2cc5ea24..0000000000 --- a/Task/Function-definition/Rye/function-definition-2.rye +++ /dev/null @@ -1 +0,0 @@ -multiply: fn { a b } { * b } diff --git a/Task/Function-definition/Rye/function-definition-3.rye b/Task/Function-definition/Rye/function-definition-3.rye deleted file mode 100644 index ca8885cbcf..0000000000 --- a/Task/Function-definition/Rye/function-definition-3.rye +++ /dev/null @@ -1 +0,0 @@ -multiply: pfn { a b } { a * b } diff --git a/Task/Function-definition/SIL/function-definition.sil b/Task/Function-definition/SIL/function-definition.sil deleted file mode 100644 index 21bfbe3c19..0000000000 --- a/Task/Function-definition/SIL/function-definition.sil +++ /dev/null @@ -1,3 +0,0 @@ -funcmultiply -r = x * y -return diff --git a/Task/Function-definition/Scheme/function-definition-1.scm b/Task/Function-definition/Scheme/function-definition-1.ss similarity index 100% rename from Task/Function-definition/Scheme/function-definition-1.scm rename to Task/Function-definition/Scheme/function-definition-1.ss diff --git a/Task/Function-definition/Scheme/function-definition-2.scm b/Task/Function-definition/Scheme/function-definition-2.ss similarity index 100% rename from Task/Function-definition/Scheme/function-definition-2.scm rename to Task/Function-definition/Scheme/function-definition-2.ss diff --git a/Task/Function-definition/Tcl/function-definition-3.tcl b/Task/Function-definition/Tcl/function-definition-3.tcl deleted file mode 100644 index e2a1260e67..0000000000 --- a/Task/Function-definition/Tcl/function-definition-3.tcl +++ /dev/null @@ -1,13 +0,0 @@ -proc multiply { a b args } { - - set product 1 - - foreach m [list $a $b {*}$args] { - - set product [expr {$product * $m}] - } - - return $product -} - -puts stdout [multiply 3 4 7 9 -2 -5 ] diff --git a/Task/Function-definition/VBScript/function-definition-1.vbs b/Task/Function-definition/VBScript/function-definition-1.vb similarity index 100% rename from Task/Function-definition/VBScript/function-definition-1.vbs rename to Task/Function-definition/VBScript/function-definition-1.vb diff --git a/Task/Function-definition/VBScript/function-definition-2.vbs b/Task/Function-definition/VBScript/function-definition-2.vb similarity index 100% rename from Task/Function-definition/VBScript/function-definition-2.vbs rename to Task/Function-definition/VBScript/function-definition-2.vb diff --git a/Task/Function-definition/YAMLScript/function-definition.ys b/Task/Function-definition/YAMLScript/function-definition.ys deleted file mode 100644 index 7bab26ba31..0000000000 --- a/Task/Function-definition/YAMLScript/function-definition.ys +++ /dev/null @@ -1,15 +0,0 @@ -!YS-v0 - -# Main function definition with variable arguments: -defn main(*args): - say: "multiply($(args.join(', '))) - -> $multiply(args*)" - -# A multi-arity function definition: -defn multiply: - (): 1 - (x): x - (x y): x * y - (x y *more): - reduce multiply: - multiply(x y) more diff --git a/Task/Function-definition/Zig/function-definition.zig b/Task/Function-definition/Zig/function-definition.zig index 38dab3141a..f67148e5cd 100644 --- a/Task/Function-definition/Zig/function-definition.zig +++ b/Task/Function-definition/Zig/function-definition.zig @@ -1,4 +1,4 @@ -fn multiply(x: i64, y: i64) i64 { +fun multiply(x: i64, y: i64) i64 { return x * y; } diff --git a/Task/Function-frequency/Arturo/function-frequency.arturo b/Task/Function-frequency/Arturo/function-frequency.arturo index 651ef9d353..ba1c035514 100644 --- a/Task/Function-frequency/Arturo/function-frequency.arturo +++ b/Task/Function-frequency/Arturo/function-frequency.arturo @@ -3,21 +3,23 @@ frequencies: #[] inspectBlock: function [blk][ loop blk 'item [ - when [ - word? item [ + case [] + when? [word? item][ sItem: to :string item if set? sItem -> if function? var sItem [ - switch key? frequencies sItem - -> set frequencies sItem (get frequencies sItem)+1 - -> set frequencies sItem 1 + if? key? frequencies sItem -> + set frequencies sItem (get frequencies sItem)+1 + else -> + set frequencies sItem 1 ] ] - or? block? item - inline? item -> + when? [or? block? item + inline? item] -> inspectBlock item - ] + + else [] ] ] diff --git a/Task/Function-frequency/Julia/function-frequency.jl b/Task/Function-frequency/Julia/function-frequency.julia similarity index 100% rename from Task/Function-frequency/Julia/function-frequency.jl rename to Task/Function-frequency/Julia/function-frequency.julia diff --git a/Task/Function-frequency/REXX/function-frequency-3.rexx b/Task/Function-frequency/REXX/function-frequency-3.rexx deleted file mode 100644 index 05ffecf5c2..0000000000 --- a/Task/Function-frequency/REXX/function-frequency-3.rexx +++ /dev/null @@ -1,138 +0,0 @@ --- 21 Feb 2026 -include Setting -parse arg program - -say 'FUNCTION FREQUENCY' -say version -call ReadSource -call CleanSource -call CollectInvokes -call SortSt 'invo.' -call ReportInvokes -call Timer -exit - -ReadSource: --- Read all lines in a stem -if program='' then - program='FuncFreq.rex' -else - program=program'.rex' -say 'Invoke frequencies for program' program -say -call Stream program,'c','open read' -srce.=0; n=0 -do while Lines(program) - record=LineIn(program) - n=n+1; srce.n=record -end -srce.0=n -call Stream program,'c','close' -return - -CleanSource: --- Erase all characters that are (in this order): --- within a '' literal or a "" literal --- within a /*...*/ comment block --- after -- ... comment --- not allowed in names -cleanc=0 -p1=0; q1=0 -do i = 1 to srce.0 - cleanl=0 - s=srce.i; k=Length(s) - do j = 1 to k --- Substring for literals - p1=SubStr(s,j,1) --- Erase literal - if p1 = "'" | p1 = '"' then do - if cleanl then do - s=Overlay(' ',s,j) - if p1 = q1 then - cleanl=0 - end - else do - q1=p1; cleanl=1 - end - end - if cleanl then - s=Overlay(' ',s,j) - end j --- Substring for comments - p2=SubStr(s,j,2) --- Erase block /*...*/ comment - if p2 = '/*' then - cleanc=1 - else do - if p2 = '*/' then do - s=Overlay(' ',s,j,2) - cleanc=0 - end - end - if cleanc then do - s=Overlay(' ',s,j) - iterate j - end --- Erase -- ... comment - if p2 = '--' then do - s=Overlay(' ',s,j,k) - leave j - end --- Erase all characters not allowed in names - s=Translate(s,' ','+-*|<>,;=/\%)') - srce.i=s -end i -return - -CollectInvokes: --- Collect invocations 'Name()' or 'call Name' -invo.=0; v=0 -do i = 1 to srce.0 - s=srce.i --- Parse words - wrds.=0; n=0 - do until s = '' - n=n+1; parse var s wrds.n s - end --- Find invocations - wrds.0=n - do j = 1 to wrds.0 - w=wrds.j --- Call Name - if Upper(w) = 'CALL' then do - k=j+1; v=v+1; invo.v=wrds.k - end --- Name() - else do - p1=1; p2=Pos('(',w) - do while p2 > 0 - a=SubStr(w,p1,p2-p1) - if a <> '' then do - v=v+1; invo.v=SubStr(w,p1,p2-p1) - end - p1=p2+1; p2=Pos('(',w,p1) - end - end - end j -end i -invo.0=v -return - -ReportInvokes: --- Aggregate and report -p=invo.1; n=1 -do i = 2 to invo.0 - v = invo.i - if v = p then - n=n+1 - else do - say Right(n,3) p - p=v; n=1 - end -end i -say Right(n,3) p -say -return - --- SortSt; Timer -include Math diff --git a/Task/Function-prototype/Ada/function-prototype-1.adb b/Task/Function-prototype/Ada/function-prototype-1.ada similarity index 100% rename from Task/Function-prototype/Ada/function-prototype-1.adb rename to Task/Function-prototype/Ada/function-prototype-1.ada diff --git a/Task/Function-prototype/Ada/function-prototype-2.adb b/Task/Function-prototype/Ada/function-prototype-2.ada similarity index 100% rename from Task/Function-prototype/Ada/function-prototype-2.adb rename to Task/Function-prototype/Ada/function-prototype-2.ada diff --git a/Task/Function-prototype/Ada/function-prototype-3.adb b/Task/Function-prototype/Ada/function-prototype-3.ada similarity index 100% rename from Task/Function-prototype/Ada/function-prototype-3.adb rename to Task/Function-prototype/Ada/function-prototype-3.ada diff --git a/Task/Function-prototype/Ada/function-prototype-4.adb b/Task/Function-prototype/Ada/function-prototype-4.ada similarity index 100% rename from Task/Function-prototype/Ada/function-prototype-4.adb rename to Task/Function-prototype/Ada/function-prototype-4.ada diff --git a/Task/Function-prototype/Ada/function-prototype-5.adb b/Task/Function-prototype/Ada/function-prototype-5.ada similarity index 100% rename from Task/Function-prototype/Ada/function-prototype-5.adb rename to Task/Function-prototype/Ada/function-prototype-5.ada diff --git a/Task/Function-prototype/COBOL/function-prototype.cob b/Task/Function-prototype/COBOL/function-prototype.cobol similarity index 100% rename from Task/Function-prototype/COBOL/function-prototype.cob rename to Task/Function-prototype/COBOL/function-prototype.cobol diff --git a/Task/Function-prototype/Delphi/function-prototype-1.pas b/Task/Function-prototype/Delphi/function-prototype-1.delphi similarity index 100% rename from Task/Function-prototype/Delphi/function-prototype-1.pas rename to Task/Function-prototype/Delphi/function-prototype-1.delphi diff --git a/Task/Function-prototype/Delphi/function-prototype-2.pas b/Task/Function-prototype/Delphi/function-prototype-2.delphi similarity index 100% rename from Task/Function-prototype/Delphi/function-prototype-2.pas rename to Task/Function-prototype/Delphi/function-prototype-2.delphi diff --git a/Task/Function-prototype/EasyLang/function-prototype.easy b/Task/Function-prototype/EasyLang/function-prototype.easy deleted file mode 100644 index d3292735cc..0000000000 --- a/Task/Function-prototype/EasyLang/function-prototype.easy +++ /dev/null @@ -1,31 +0,0 @@ -# No arguments -funcdecl f0 . -# -# Two arguments -procdecl f1 a s$ . -# -# Varargs are not available -# -# Two arguments (integer and string), pass by reference -procdecl f4 &a &s$ . -# -# Function returning an array -funcdecl[] f7 . -# -print f0 -# -# Each declared function must also be implemented -# -func f0 . - return 3 -. -proc f1 a s$ . - print s$ & a -. -proc f4 &a &s$ . - a = 7 - s$ = "hello" -. -func[] f7 . - return [ 1 2 3 ] -. diff --git a/Task/Function-prototype/FutureBasic/function-prototype.basic b/Task/Function-prototype/FutureBasic/function-prototype.basic deleted file mode 100644 index 9a96932ecb..0000000000 --- a/Task/Function-prototype/FutureBasic/function-prototype.basic +++ /dev/null @@ -1,4 +0,0 @@ -def fn NoArgs -def fn TwoArgs( a as long, b as long ) -def fn VarArgs( n as long, ... ) -long def fn Multiply( a as long, b as long ) // function returns a value diff --git a/Task/Function-prototype/Julia/function-prototype-1.jl b/Task/Function-prototype/Julia/function-prototype-1.julia similarity index 100% rename from Task/Function-prototype/Julia/function-prototype-1.jl rename to Task/Function-prototype/Julia/function-prototype-1.julia diff --git a/Task/Function-prototype/Julia/function-prototype-2.jl b/Task/Function-prototype/Julia/function-prototype-2.julia similarity index 100% rename from Task/Function-prototype/Julia/function-prototype-2.jl rename to Task/Function-prototype/Julia/function-prototype-2.julia diff --git a/Task/Function-prototype/Kotlin/function-prototype.kts b/Task/Function-prototype/Kotlin/function-prototype.kotlin similarity index 100% rename from Task/Function-prototype/Kotlin/function-prototype.kts rename to Task/Function-prototype/Kotlin/function-prototype.kotlin diff --git a/Task/Function-prototype/OCaml/function-prototype.ml b/Task/Function-prototype/OCaml/function-prototype.ocaml similarity index 100% rename from Task/Function-prototype/OCaml/function-prototype.ml rename to Task/Function-prototype/OCaml/function-prototype.ocaml diff --git a/Task/Functional-coverage-tree/C++/functional-coverage-tree.cpp b/Task/Functional-coverage-tree/C++/functional-coverage-tree.cpp deleted file mode 100644 index 9397979952..0000000000 --- a/Task/Functional-coverage-tree/C++/functional-coverage-tree.cpp +++ /dev/null @@ -1,170 +0,0 @@ -#include -#include -#include -#include -#include -#include - -class FCNode { -public: - FCNode(const std::string& name, const uint32_t& weight, const double& coverage) - : name(name), weight(weight), coverage(coverage), parent(NULL) {} - - void add_children(const std::vector>& nodes) { - for ( const std::shared_ptr& node : nodes ) { - node->parent = this; - children.emplace_back(node); - update_coverage(); - } - } - - double get_coverage() { - return coverage; - } - - void set_coverage(const double& aCoverage) { - if ( coverage != aCoverage ) { - coverage = aCoverage; - if ( parent ) { - parent->update_coverage(); - } - } - } - - void display() { - display(0); - } - -private: - void update_coverage() { - double sum_weighted_coverage = 0.0; - uint32_t sum_weight = 0; - for ( const std::shared_ptr& node : children ) { - sum_weighted_coverage += node->weight * node->coverage; - sum_weight += node->weight; - } - - set_coverage(sum_weighted_coverage / sum_weight); - } - - void display(uint32_t level) { - const std::string initial = std::string(4 * level, ' ') + name; - const std::string padding = std::string(NAME_FIELD_WIDTH - initial.length(), ' '); - std::cout << initial + padding + "|"; - std::cout << " " << std::setw(3) << weight << " |"; - std::cout << " " << std::fixed << std::setprecision(6) << coverage << " |" << std::endl; - - for ( const std::shared_ptr& child : children ) { - child->display(level + 1); - } - } - - std::string name; - uint32_t weight; - double coverage; - FCNode* parent; - std::vector> children{ }; - - static constexpr uint32_t NAME_FIELD_WIDTH = 32; -}; - -int main() { - FCNode cleaning("Cleaning", 1, 0.0); - - std::vector> houses = { - std::make_shared("House_1", 40, 0.0), - std::make_shared("House_2", 60, 0.0) - }; - cleaning.add_children(houses); - - std::vector> house_1 = { - std::make_shared("Bedrooms", 1, 0.25), - std::make_shared("Bathrooms", 1, 0.0), - std::make_shared("Attic", 1, 0.75), - std::make_shared("Kitchen", 1, 0.1), - std::make_shared("Living_rooms", 1, 0.0), - std::make_shared("Basement", 1, 0.0), - std::make_shared("Garage", 1, 0.0), - std::make_shared("Garden",1, 0.8) - }; - houses[0]->add_children(house_1); - - std::vector> bathrooms_house_1 = { - std::make_shared("Bathroom_1", 1, 0.5), - std::make_shared("Bathroom_2", 1, 0.0), - std::make_shared("Outside_lavatory", 1, 1.0) - }; - house_1[1]->add_children(bathrooms_house_1); - - std::vector> living_rooms_house_1 = { - std::make_shared("lounge", 1, 0.0), - std::make_shared("Dining_room", 1, 0.0), - std::make_shared("Conservatory", 1, 0.0), - std::make_shared("Playroom", 1, 1.0) - }; - house_1[4]->add_children(living_rooms_house_1); - - std::vector> house_2 = { - std::make_shared("Upstairs", 1, 0.15), - std::make_shared("Ground_floor", 1, 0.316667), - std::make_shared("Basement", 1, 0.916667) - }; - houses[1]->add_children(house_2); - - std::vector> upstairs = { - std::make_shared("Bedrooms", 1, 0.0), - std::make_shared("Bathroom", 1, 0.0), - std::make_shared("Toilet", 1, 0.0), - std::make_shared("Attics", 1, 0.6) - }; - house_2[0]->add_children(upstairs); - - std::vector> ground_floor = { - std::make_shared("Kitchen", 1, 0.0), - std::make_shared("Living_rooms", 1, 0.0), - std::make_shared("Wet_room_&_toilet", 1, 0.0), - std::make_shared("Garage", 1, 0.0), - std::make_shared("Garden", 1, 0.9), - std::make_shared("Hot_tub_suite", 1, 1.0) - }; - house_2[1]->add_children(ground_floor); - - std::vector> basement = { - std::make_shared("Cellars", 1, 1.0), - std::make_shared("Wine_cellar", 1, 1.0), - std::make_shared("Cinema", 1, 0.75) - }; - house_2[2]->add_children(basement); - - std::vector> bedrooms = { - std::make_shared("Suite_1", 1, 0.0), - std::make_shared("Suite_2", 1, 0.0), - std::make_shared("Bedroom_3",1, 0.0), - std::make_shared("Bedroom_4",1, 0.0) - }; - upstairs[0]->add_children(bedrooms); - - std::vector> living_rooms_house_2 = { - std::make_shared("lounge", 1, 0.0), - std::make_shared("Dining_room", 1, 0.0), - std::make_shared("Conservatory", 1, 0.0), - std::make_shared("Playroom", 1, 0.0) - }; - ground_floor[1]->add_children(living_rooms_house_2); - - const double overall_coverage = cleaning.get_coverage(); - std::cout << "OVERALL COVERAGE = " << std::fixed << std::setprecision(6) - << overall_coverage << std::endl << std::endl; - std::cout << "NAME HIERARCHY | WEIGHT | COVERAGE |" << std::endl; - std::cout << "--------------------------------|--------|----------|" << std::endl; - cleaning.display(); - std::cout << std::endl; - - basement[2]->set_coverage(1.0); // Change House_2 Cinema node coverage to 1.0 - const double updated_coverage = cleaning.get_coverage(); - const double difference = updated_coverage - overall_coverage; - std::cout << "If the coverage of the House_2 Cinema node were increased " << std::endl; - std::cout << "from 0.75 to 1.0 the overall coverage would increase by "; - std::cout << std::fixed << std::setprecision(6) << difference << " to " << updated_coverage << std::endl; - basement[2]->set_coverage(0.75); // Restore to House_2 Cinema node coverage to its original value -} diff --git a/Task/Functional-coverage-tree/FreeBASIC/functional-coverage-tree.basic b/Task/Functional-coverage-tree/FreeBASIC/functional-coverage-tree.basic deleted file mode 100644 index 55d06e8f9a..0000000000 --- a/Task/Functional-coverage-tree/FreeBASIC/functional-coverage-tree.basic +++ /dev/null @@ -1,154 +0,0 @@ -Type FCNode - As String nombre - As Integer weight - As Double coverage - As FCNode Ptr children(Any) - As FCNode Ptr parent - Declare Constructor(nombre As String, weight As Integer, coverage As Double) - Declare Sub addChildren(nodes() As FCNode Ptr) - Declare Sub setCoverage(value As Double) - Declare Sub updateCoverage() - Declare Sub show(level As Integer) -End Type - -Constructor FCNode(nombre As String, weight As Integer, coverage As Double) - this.nombre = nombre - this.weight = weight - this.coverage = coverage - this.parent = 0 -End Constructor - -Sub FCNode.addChildren(nodes() As FCNode Ptr) - For i As Integer = 0 To Ubound(nodes) - nodes(i)->parent = @This - Redim Preserve this.children(Ubound(this.children) + 1) - this.children(Ubound(this.children)) = nodes(i) - Next - this.updateCoverage() -End Sub - -Sub FCNode.setCoverage(value As Double) - If this.coverage <> value Then - this.coverage = value - If this.parent <> 0 Then this.parent->updateCoverage() - End If -End Sub - -Sub FCNode.updateCoverage() - Dim As Double v1 = 0 - Dim As Integer v2 = 0 - For i As Integer = 0 To Ubound(this.children) - v1 += this.children(i)->weight * this.children(i)->coverage - v2 += this.children(i)->weight - Next - If v2 <> 0 Then this.setCoverage(v1 / v2) -End Sub - -Sub FCNode.show(level As Integer) - Dim As Integer indent, nl, i - - indent = level * 4 - nl = Len(this.nombre) + indent - Print Space(indent); this.nombre; Space(32 - nl); "|"; Using "#####"; this.weight; - Print Using " | #.###### |"; this.coverage - If Ubound(this.children) = -1 Then Return - For i = 0 To Ubound(this.children) - this.children(i)->show(level + 1) - Next -End Sub - -Function newFCN(nombre As String, weight As Integer, coverage As Double) As FCNode Ptr - Return New FCNode(nombre, weight, coverage) -End Function - -Dim houses(1) As FCNode Ptr -houses(0) = newFCN("house1", 40, 0) -houses(1) = newFCN("house2", 60, 0) - -Dim house1(7) As FCNode Ptr -house1(0) = newFCN("bedrooms", 1, 0.25) -house1(1) = newFCN("bathrooms", 1, 0) -house1(2) = newFCN("attic", 1, 0.75) -house1(3) = newFCN("kitchen", 1, 0.1) -house1(4) = newFCN("living_rooms", 1, 0) -house1(5) = newFCN("basement", 1, 0) -house1(6) = newFCN("garage", 1, 0) -house1(7) = newFCN("garden", 1, 0.8) - -Dim house2(2) As FCNode Ptr -house2(0) = newFCN("upstairs", 1, 0) -house2(1) = newFCN("groundfloor", 1, 0) -house2(2) = newFCN("basement", 1, 0) - -Dim h1Bathrooms(2) As FCNode Ptr -h1Bathrooms(0) = newFCN("bathroom1", 1, 0.5) -h1Bathrooms(1) = newFCN("bathroom2", 1, 0) -h1Bathrooms(2) = newFCN("outside_lavatory", 1, 1) - -Dim h1LivingRooms(3) As FCNode Ptr -h1LivingRooms(0) = newFCN("lounge", 1, 0) -h1LivingRooms(1) = newFCN("dining_room", 1, 0) -h1LivingRooms(2) = newFCN("conservatory", 1, 0) -h1LivingRooms(3) = newFCN("playroom", 1, 1) - -Dim h2Upstairs(3) As FCNode Ptr -h2Upstairs(0) = newFCN("bedrooms", 1, 0) -h2Upstairs(1) = newFCN("bathroom", 1, 0) -h2Upstairs(2) = newFCN("toilet", 1, 0) -h2Upstairs(3) = newFCN("attics", 1, 0.6) - -Dim h2Groundfloor(5) As FCNode Ptr -h2Groundfloor(0) = newFCN("kitchen", 1, 0) -h2Groundfloor(1) = newFCN("living_rooms", 1, 0) -h2Groundfloor(2) = newFCN("wet_room_&_toilet", 1, 0) -h2Groundfloor(3) = newFCN("garage", 1, 0) -h2Groundfloor(4) = newFCN("garden", 1, 0.9) -h2Groundfloor(5) = newFCN("hot_tub_suite", 1, 1) - -Dim h2Basement(2) As FCNode Ptr -h2Basement(0) = newFCN("cellars", 1, 1) -h2Basement(1) = newFCN("wine_cellar", 1, 1) -h2Basement(2) = newFCN("cinema", 1, 0.75) - -Dim h2UpstairsBedrooms(3) As FCNode Ptr -h2UpstairsBedrooms(0) = newFCN("suite_1", 1, 0) -h2UpstairsBedrooms(1) = newFCN("suite_2", 1, 0) -h2UpstairsBedrooms(2) = newFCN("bedroom_3", 1, 0) -h2UpstairsBedrooms(3) = newFCN("bedroom_4", 1, 0) - -Dim h2GroundfloorLivingRooms(3) As FCNode Ptr -h2GroundfloorLivingRooms(0) = newFCN("lounge", 1, 0) -h2GroundfloorLivingRooms(1) = newFCN("dining_room", 1, 0) -h2GroundfloorLivingRooms(2) = newFCN("conservatory", 1, 0) -h2GroundfloorLivingRooms(3) = newFCN("playroom", 1, 0) - -Dim cleaning As FCNode Ptr = newFCN("cleaning", 1, 0) - -house1(1)->addChildren(h1Bathrooms()) -house1(4)->addChildren(h1LivingRooms()) -houses(0)->addChildren(house1()) - -h2Upstairs(0)->addChildren(h2UpstairsBedrooms()) -house2(0)->addChildren(h2Upstairs()) -h2Groundfloor(1)->addChildren(h2GroundfloorLivingRooms()) -house2(1)->addChildren(h2Groundfloor()) -house2(2)->addChildren(h2Basement()) -houses(1)->addChildren(house2()) - -cleaning->addChildren(houses()) -Dim As Double topCoverage = cleaning->coverage -Print "TOP COVERAGE = "; -Print Using "########.######"; topCoverage -Print -Print "NAME HIERARCHY | WEIGHT | COVERAGE |" -cleaning->show(0) - -h2Basement(2)->setCoverage(1) ' change Cinema node coverage to 1 -Dim As Double diff = cleaning->coverage - topCoverage -Print -Print "If the coverage of the Cinema node were increased from 0.75 to 1" -Print "the top level coverage would increase by "; -Print Using "##.###### to ##.######"; diff; (topCoverage + diff) -h2Basement(2)->setCoverage(0.75) ' restore to original value if required - -Sleep diff --git a/Task/Functional-coverage-tree/Java/functional-coverage-tree.java b/Task/Functional-coverage-tree/Java/functional-coverage-tree.java index 703ad2b3f5..8fd0797f54 100644 --- a/Task/Functional-coverage-tree/Java/functional-coverage-tree.java +++ b/Task/Functional-coverage-tree/Java/functional-coverage-tree.java @@ -78,8 +78,7 @@ public final class FunctionalCoverageTree { ground_floor.get(1).addChildren(living_rooms_house_2); final double overallCoverage = cleaning.getCoverage(); - System.out.println("OVERALL COVERAGE = " + String.format("%.6f", overallCoverage)); - System.out.println(); + System.out.println("OVERALL COVERAGE = " + String.format("%.6f", overallCoverage) + System.lineSeparator()); System.out.println("NAME HIERARCHY | WEIGHT | COVERAGE |" ); System.out.println("--------------------------------|--------|----------|"); cleaning.display(); @@ -130,14 +129,14 @@ final class FCNode { } private void updateCoverage() { - double sumWeightedCoverage = 0.0; - int sumWeight = 0; + double value1 = 0.0; + int value2 = 0; for ( FCNode node : children ) { - sumWeightedCoverage += node.weight * node.coverage; - sumWeight += node.weight; + value1 += node.weight * node.coverage; + value2 += node.weight; } - setCoverage(sumWeightedCoverage / sumWeight); + setCoverage(value1 / value2); } private void display(int aLevel) { diff --git a/Task/Functional-coverage-tree/Julia/functional-coverage-tree.jl b/Task/Functional-coverage-tree/Julia/functional-coverage-tree.julia similarity index 100% rename from Task/Functional-coverage-tree/Julia/functional-coverage-tree.jl rename to Task/Functional-coverage-tree/Julia/functional-coverage-tree.julia diff --git a/Task/Functional-coverage-tree/Kotlin/functional-coverage-tree.kts b/Task/Functional-coverage-tree/Kotlin/functional-coverage-tree.kotlin similarity index 100% rename from Task/Functional-coverage-tree/Kotlin/functional-coverage-tree.kts rename to Task/Functional-coverage-tree/Kotlin/functional-coverage-tree.kotlin diff --git a/Task/Functional-coverage-tree/Phix/functional-coverage-tree.phix b/Task/Functional-coverage-tree/Phix/functional-coverage-tree.phix index da5f44351a..7f57dc15f2 100644 --- a/Task/Functional-coverage-tree/Phix/functional-coverage-tree.phix +++ b/Task/Functional-coverage-tree/Phix/functional-coverage-tree.phix @@ -1,108 +1,113 @@ --- demo\rosetta\Functional_coverage_tree.exw -with javascript_semantics -constant data = """ -NAME_HIERARCHY | WEIGHT | COVERAGE | -cleaning | | | - house1 |40 | | - bedrooms | |0.25 | - bathrooms | | | - bathroom1 | |0.5 | - bathroom2 | | | - outside_lavatory | |1 | - attic | |0.75 | - kitchen | |0.1 | - living_rooms | | | - lounge | | | - dining_room | | | - conservatory | | | - playroom | |1 | - basement | | | - garage | | | - garden | |0.8 | - house2 |60 | | - upstairs | | | - bedrooms | | | - suite_1 | | | - suite_2 | | | - bedroom_3 | | | - bedroom_4 | | | - bathroom | | | - toilet | | | - attics | |0.6 | - groundfloor | | | - kitchen | | | - living_rooms | | | - lounge | | | - dining_room | | | - conservatory | | | - playroom | | | - wet_room_&_toilet | | | - garage | | | - garden | |0.9 | - hot_tub_suite | |1 | - basement | | | - cellars | |1 | - wine_cellar | |1 | - cinema | |0.75 | -""" -sequence lines = split(data,"\n"), - pi = {}, -- indents (to locate parents) - pdx = {}, -- indexes for "" - children -string desc, weights, covers -integer parent, child -atom weight, coverage, childw = 0 -enum DESC, WEIGHT, COVERAGE, PARENT, CHILDREN, CHILDW -lines[DESC] &= " SHARE OF RESIDUE" -for i=2 to length(lines) do - -- decode text to useable data, link up parents & children - {desc,weights,covers} = split(lines[i],"|") - -- (nb this assumes /totally/ consistent indenting) - integer indent = length(desc)-length(trim_head(desc)), - k = find(indent,pi) - if k=0 then - pi = append(pi,indent) - pdx = append(pdx,0) - k = length(pi) - end if - pdx[k] = i - parent = 0 - if k>1 then - parent = pdx[k-1] --- lines[parent][CHILDREN] &= i - lines[parent][CHILDREN] = deep_copy(lines[parent][CHILDREN]) & i - end if - children = {} - weight = to_number(trim(weights),1) - coverage = to_number(trim(covers),0) - lines[i] = {desc, weight, coverage, parent, children, childw} -end for -for i=length(lines) to 2 by -1 do - -- calculate the parent coverages, and save child weight sums - children = lines[i][CHILDREN] - if length(children) then - coverage = 0 - childw = 0 - for c=1 to length(children) do - child = children[c] - atom w = lines[child][WEIGHT] - coverage += lines[child][COVERAGE]*w - childw += w - end for - lines[i][COVERAGE] = coverage/childw - lines[i][CHILDW] = childw -- (save for next loop) - end if -end for -for i=length(lines) to 2 by -1 do - -- calculate the share of residue, and format lines - child = i - {desc, weight, coverage, parent} = lines[i] - atom residue = 1-coverage - while parent do - residue *= lines[child][WEIGHT]/lines[parent][CHILDW] - {child, parent} = {parent, lines[parent][PARENT]} - end while - lines[i] = sprintf("%-32s| %6d | %-8g | %g",{desc,weight,coverage,residue}) -end for -puts(1,join(lines,"\n")&"\n") -{} = wait_key() +(phixonline)--> + -- + -- demo\rosetta\Functional_coverage_tree.exw + -- ========================================= + -- + with javascript_semantics + constant data = """ + NAME_HIERARCHY | WEIGHT | COVERAGE | + cleaning | | | + house1 |40 | | + bedrooms | |0.25 | + bathrooms | | | + bathroom1 | |0.5 | + bathroom2 | | | + outside_lavatory | |1 | + attic | |0.75 | + kitchen | |0.1 | + living_rooms | | | + lounge | | | + dining_room | | | + conservatory | | | + playroom | |1 | + basement | | | + garage | | | + garden | |0.8 | + house2 |60 | | + upstairs | | | + bedrooms | | | + suite_1 | | | + suite_2 | | | + bedroom_3 | | | + bedroom_4 | | | + bathroom | | | + toilet | | | + attics | |0.6 | + groundfloor | | | + kitchen | | | + living_rooms | | | + lounge | | | + dining_room | | | + conservatory | | | + playroom | | | + wet_room_&_toilet | | | + garage | | | + garden | |0.9 | + hot_tub_suite | |1 | + basement | | | + cellars | |1 | + wine_cellar | |1 | + cinema | |0.75 | + """ + sequence lines = split(data,"\n"), + pi = {}, -- indents (to locate parents) + pdx = {}, -- indexes for "" + children + string desc, weights, covers + integer parent, child + atom weight, coverage, childw = 0 + enum DESC, WEIGHT, COVERAGE, PARENT, CHILDREN, CHILDW + lines[1] &= " SHARE OF RESIDUE" + for i=2 to length(lines) do + -- decode text to useable data, link up parents & children + {desc,weights,covers} = split(lines[i],"|") + -- (nb this assumes /totally/ consistent indenting) + integer indent = length(desc)-length(trim_head(desc)), + k = find(indent,pi) + if k=0 then + pi = append(pi,indent) + pdx = append(pdx,0) + k = length(pi) + end if + pdx[k] = i + parent = 0 + if k>1 then + parent = pdx[k-1] + -- lines[parent][CHILDREN] &= i + lines[parent][CHILDREN] = deep_copy(lines[parent][CHILDREN]) & i + end if + children = {} + weight = to_number(trim(weights),1) + coverage = to_number(trim(covers),0) + lines[i] = {desc, weight, coverage, parent, children, childw} + end for + for i=length(lines) to 2 by -1 do + -- calculate the parent coverages, and save child weight sums + children = lines[i][CHILDREN] + if length(children) then + coverage = 0 + childw = 0 + for c=1 to length(children) do + child = children[c] + atom w = lines[child][WEIGHT] + coverage += lines[child][COVERAGE]*w + childw += w + end for + lines[i][COVERAGE] = coverage/childw + lines[i][CHILDW] = childw -- (save for next loop) + end if + end for + for i=length(lines) to 2 by -1 do + -- calculate the share of residue, and format lines + child = i + {desc, weight, coverage, parent} = lines[i] + atom residue = 1-coverage + while parent do + residue *= lines[child][WEIGHT]/lines[parent][CHILDW] + {child, parent} = {parent, lines[parent][PARENT]} + end while + lines[i] = sprintf("%-32s| %6d | %-8g | %g",{desc,weight,coverage,residue}) + end for + puts(1,join(lines,"\n")&"\n") + {} = wait_key() + + with javascript_semantics + sequence c = repeat(0,12) + function spouge_gamma(atom z) + atom accm = c[1] + if accm=0 then + accm = sqrt(2*PI) + c[1] = accm + atom k1_factrl = 1 -- (k - 1)!*(-1)^k with 0!==1 + for k=2 to 12 do + c[k] = exp(13-k)*power(13-k,k-1.5)/k1_factrl + k1_factrl *= -(k-1) + end for + end if + for k=2 to 12 do + accm += c[k]/(z+k-1) + end for + accm *= exp(-(z+12))*power(z+12,z+0.5) -- Gamma(z+1) + return accm/z + end function -function taylor_gamma(atom x) --- (good for values between 0 and 1, apparently) - constant t = { 1.00000_00000_00000_00000, - 0.57721_56649_01532_86061, - -0.65587_80715_20253_88108, - -0.04200_26350_34095_23553, - 0.16653_86113_82291_48950, - -0.04219_77345_55544_33675, - -0.00962_19715_27876_97356, - 0.00721_89432_46663_09954, - -0.00116_51675_91859_06511, - -0.00021_52416_74114_95097, - 0.00012_80502_82388_11619, - -0.00002_01348_54780_78824, - -0.00000_12504_93482_14267, - 0.00000_11330_27231_98170, - -0.00000_02056_33841_69776, - 0.00000_00061_16095_10448, - 0.00000_00050_02007_64447, - -0.00000_00011_81274_57049, - 0.00000_00001_04342_67117, - 0.00000_00000_07782_26344, - -0.00000_00000_03696_80562, - 0.00000_00000_00510_03703, - -0.00000_00000_00020_58326, - -0.00000_00000_00005_34812, - 0.00000_00000_00001_22678, - -0.00000_00000_00000_11813, - 0.00000_00000_00000_00119, - 0.00000_00000_00000_00141, - -0.00000_00000_00000_00023, - 0.00000_00000_00000_00002 } - atom y = x-1, - s = t[$] - for n=length(t)-1 to 1 by -1 do - s = s*y + t[n] - end for - return 1/s -end function + function taylor_gamma(atom x) + -- (good for values between 0 and 1, apparently) + constant t = { 1.00000_00000_00000_00000, + 0.57721_56649_01532_86061, + -0.65587_80715_20253_88108, + -0.04200_26350_34095_23553, + 0.16653_86113_82291_48950, + -0.04219_77345_55544_33675, + -0.00962_19715_27876_97356, + 0.00721_89432_46663_09954, + -0.00116_51675_91859_06511, + -0.00021_52416_74114_95097, + 0.00012_80502_82388_11619, + -0.00002_01348_54780_78824, + -0.00000_12504_93482_14267, + 0.00000_11330_27231_98170, + -0.00000_02056_33841_69776, + 0.00000_00061_16095_10448, + 0.00000_00050_02007_64447, + -0.00000_00011_81274_57049, + 0.00000_00001_04342_67117, + 0.00000_00000_07782_26344, + -0.00000_00000_03696_80562, + 0.00000_00000_00510_03703, + -0.00000_00000_00020_58326, + -0.00000_00000_00005_34812, + 0.00000_00000_00001_22678, + -0.00000_00000_00000_11813, + 0.00000_00000_00000_00119, + 0.00000_00000_00000_00141, + -0.00000_00000_00000_00023, + 0.00000_00000_00000_00002 } + atom y = x-1, + s = t[$] + for n=length(t)-1 to 1 by -1 do + s = s*y + t[n] + end for + return 1/s + end function -function lanczos_gamma(atom z) - if z<0.5 then - return PI / (sin(PI*z)*lanczos_gamma(1-z)) - end if - -- use a lanczos approximation: - atom x = 0.99999999999980993, - t = z + 6.5; - sequence p = { 676.5203681218851, - -1259.1392167224028, - 771.32342877765313, - -176.61502916214059, - 12.507343278686905, - -0.13857109526572012, - 9.9843695780195716e-6, - 1.5056327351493116e-7 } - z -= 1 - for i=1 to length(p) do - x += p[i] / (z + i) - end for - return sqrt(2*PI) * power(t,z+0.5) * exp(-t) * x -end function + function lanczos_gamma(atom z) + if z<0.5 then + return PI / (sin(PI*z)*lanczos_gamma(1-z)) + end if + -- use a lanczos approximation: + atom x = 0.99999999999980993, + t = z + 6.5; + sequence p = { 676.5203681218851, + -1259.1392167224028, + 771.32342877765313, + -176.61502916214059, + 12.507343278686905, + -0.13857109526572012, + 9.9843695780195716e-6, + 1.5056327351493116e-7 } + z -= 1 + for i=1 to length(p) do + x += p[i] / (z + i) + end for + return sqrt(2*PI) * power(t,z+0.5) * exp(-t) * x + end function -constant sqPI = sqrt(PI) + constant sqPI = sqrt(PI) -procedure sq(sequence zm, string fmt="%19.16f") - atom {z, mul} = zm - atom e = sqPI/mul - sequence s = {spouge_gamma(z), - taylor_gamma(z), - lanczos_gamma(z)}, - error = sq_abs(sq_sub(s,e)) - string t = join(s,", ",fmt:=fmt)&", " - integer bdx = smallest(error,return_index:=true) - atom best = s[bdx], - p = s[bdx]*mul - for i=1 to length(s) do -- (potentially mark >1) - if s[i]=best then - t[i*22-2..i*22-1] = "*," - end if - end for - string es = sprintf(fmt,e) - printf(1,"%5g: %s %s, %19.16f\n",{z,t,es,p*p}) -end procedure + procedure sq(sequence zm, string fmt="%19.16f") + atom {z, mul} = zm + atom e = sqPI/mul + sequence s = {spouge_gamma(z), + taylor_gamma(z), + lanczos_gamma(z)}, + error = sq_abs(sq_sub(s,e)) + string t = join(s,", ",fmt:=fmt)&", " + integer bdx = smallest(error,return_index:=true) + atom best = s[bdx], + p = s[bdx]*mul + for i=1 to length(s) do -- (potentially mark >1) + if s[i]=best then + t[i*22-2..i*22-1] = "*," + end if + end for + string es = sprintf(fmt,e) + printf(1,"%5g: %s %s, %19.16f\n",{z,t,es,p*p}) + end procedure -printf(1," z ------ spouge ----- ----- taylor ------ ----- lanczos ----- ---- expected ----- %19.16f\n",PI) -papply({{-3/2,3/4},{-1/2,-1/2},{1/2,1},{1,sqPI},{3/2,2},{2,sqPI},{5/2,4/3},{3,sqPI/2},{7/2,8/15},{4,sqPI/6}},sq) -sq({0.001,sqPI/999.4237725},"%19.15f") -sq({0.01,sqPI/99.43258512},"%19.16f") -sq({0.1,sqPI/9.513507699},"%19.16f") -sq({10,sqPI/362880},"%19.12f") -sq({100,sqPI/9.332621544e155},"%19.13g") -if machine_bits()=64 then - sq({150,sqPI/3.808922638e260},"%19.13g") -- (fatal power overflow error on 32 bits) -end if + printf(1," z ------ spouge ----- ----- taylor ------ ----- lanczos ----- ---- expected ----- %19.16f\n",PI) + papply({{-3/2,3/4},{-1/2,-1/2},{1/2,1},{1,sqPI},{3/2,2},{2,sqPI},{5/2,4/3},{3,sqPI/2},{7/2,8/15},{4,sqPI/6}},sq) + sq({0.001,sqPI/999.4237725},"%19.15f") + sq({0.01,sqPI/99.43258512},"%19.16f") + sq({0.1,sqPI/9.513507699},"%19.16f") + sq({10,sqPI/362880},"%19.12f") + sq({100,sqPI/9.332621544e155},"%19.13g") + if machine_bits()=64 then + sq({150,sqPI/3.808922638e260},"%19.13g") -- (fatal power overflow error on 32 bits) + end if + + without javascript_semantics -- (no mpfr_exp(), mpfr_gamma() in pwa/p2js) + constant dp = 30 + string fmt = "%5s: %33s, %33s, %32s\n" + requires("1.0.2") -- (mpfr_get_fixed(maxlen), mpfr_gamma) + include mpfr.e + mpfr_set_default_precision(-87) -- 87 decimal places. + sequence mc = mpfr_inits(40) -function mpfr_spouge_gamma(mpfr z) - mpfr accm = mc[1] - if mpfr_cmp_si(accm,0)=0 then - -- mc[1] := sqrt(2*PI) - mpfr_const_pi(accm) - mpfr_mul_si(accm,accm,2) - mpfr_sqrt(accm,accm) - -- k1_factrl = (k - 1)!*(-1)^k with 0!==1 - mpfr k1_factrl = mpfr_init(1), - tmk = mpfr_init(), - p = mpfr_init() - for k=2 to length(mc) do - -- mc[k] = exp(13-k)*power(13-k,k-1.5)/k1_factrl - mpfr_set_si(tmk,length(mc)+1-k) - mpfr_exp(mc[k],tmk) - mpfr_set_d(p,k-1.5) - mpfr_pow(p,tmk,p) - mpfr_div(p,p,k1_factrl) - mpfr_mul(mc[k],mc[k],p) - -- k1_factrl *= -(k-1) - mpfr_mul_si(k1_factrl,k1_factrl,-(k-1)) - end for - end if - accm = mpfr_init_set(accm) - for k=2 to length(mc) do - -- accm += mc[k]/(z+k-1) - mpfr ck = mpfr_init_set(mc[k]), - zk = mpfr_init_set(z) - mpfr_add_si(zk,zk,k-1) - mpfr_div(ck,ck,zk) - mpfr_add(accm,accm,ck) - end for - -- atom zc = z+length(mc) - -- accm *= exp(-zc)*power(zc,z+0.5) -- Gamma(z+1) - mpfr p = mpfr_init_set(z), - ez = mpfr_init(), - zh = mpfr_init(0.5) - mpfr_add_si(p,p,length(mc)) - mpfr_neg(ez,p) - mpfr_exp(ez,ez) - mpfr_add(zh,zh,z) - mpfr_pow(p,p,zh) - mpfr_mul(accm,accm,ez) - mpfr_mul(accm,accm,p) - -- return accm/z - mpfr_div(accm,accm,z) - return accm -end function + function mpfr_spouge_gamma(mpfr z) + mpfr accm = mc[1] + if mpfr_cmp_si(accm,0)=0 then + -- mc[1] := sqrt(2*PI) + mpfr_const_pi(accm) + mpfr_mul_si(accm,accm,2) + mpfr_sqrt(accm,accm) + -- k1_factrl = (k - 1)!*(-1)^k with 0!==1 + mpfr k1_factrl = mpfr_init(1), + tmk = mpfr_init(), + p = mpfr_init() + for k=2 to length(mc) do + -- mc[k] = exp(13-k)*power(13-k,k-1.5)/k1_factrl + mpfr_set_si(tmk,length(mc)+1-k) + mpfr_exp(mc[k],tmk) + mpfr_set_d(p,k-1.5) + mpfr_pow(p,tmk,p) + mpfr_div(p,p,k1_factrl) + mpfr_mul(mc[k],mc[k],p) + -- k1_factrl *= -(k-1) + mpfr_mul_si(k1_factrl,k1_factrl,-(k-1)) + end for + end if + accm = mpfr_init_set(accm) + for k=2 to length(mc) do + -- accm += mc[k]/(z+k-1) + mpfr ck = mpfr_init_set(mc[k]), + zk = mpfr_init_set(z) + mpfr_add_si(zk,zk,k-1) + mpfr_div(ck,ck,zk) + mpfr_add(accm,accm,ck) + end for + -- atom zc = z+length(mc) + -- accm *= exp(-zc)*power(zc,z+0.5) -- Gamma(z+1) + mpfr p = mpfr_init_set(z), + ez = mpfr_init(), + zh = mpfr_init(0.5) + mpfr_add_si(p,p,length(mc)) + mpfr_neg(ez,p) + mpfr_exp(ez,ez) + mpfr_add(zh,zh,z) + mpfr_pow(p,p,zh) + mpfr_mul(accm,accm,ez) + mpfr_mul(accm,accm,p) + -- return accm/z + mpfr_div(accm,accm,z) + return accm + end function -constant mPI = mpfr_init(), - mqPI = mpfr_init() -mpfr_const_pi(mPI) -string pistr = mpfr_get_fixed(mPI,dp) -mpfr_sqrt(mqPI,mPI) + constant mPI = mpfr_init(), + mqPI = mpfr_init() + mpfr_const_pi(mPI) + string pistr = mpfr_get_fixed(mPI,dp) + mpfr_sqrt(mqPI,mPI) -function makempfr(object x) - mpfr res - if string(x) then - x = split(x,'/') - res = mpfr_init(x[1]) - mpfr_div_si(res,res,to_integer(x[2])) - elsif sequence(x) then - {mpfr x1, object x2} = x - res = mpfr_init_set(x1) - if string(x2) then - mpfr d = mpfr_init(x2) - mpfr_div(res,res,d) - else - mpfr_div_d(res,res,x2) - end if - else - res = mpfr_init(x) - end if - return res -end function + function makempfr(object x) + mpfr res + if string(x) then + x = split(x,'/') + res = mpfr_init(x[1]) + mpfr_div_si(res,res,to_integer(x[2])) + elsif sequence(x) then + {mpfr x1, object x2} = x + res = mpfr_init_set(x1) + if string(x2) then + mpfr d = mpfr_init(x2) + mpfr_div(res,res,d) + else + mpfr_div_d(res,res,x2) + end if + else + res = mpfr_init(x) + end if + return res + end function -procedure mq(sequence zm, integer d=dp) - mpfr {z, mul} = apply(zm,makempfr) - mpfr s = mpfr_spouge_gamma(z) - string t = mpfr_get_fixed(s,d,10,maxlen:=dp+2) - mpfr e = mpfr_init() - mpfr_gamma(e,z) - mpfr p = mpfr_init_set(s) - mpfr_mul(p,p,mul) - mpfr_mul(p,p,p) - string zs = mpfr_get_fixed(z,3), - es = mpfr_get_fixed(e,d,10,maxlen:=dp+2), - ps = mpfr_get_fixed(p,dp,10) - printf(1,fmt,{zs,t,es,ps}) -end procedure + procedure mq(sequence zm, integer d=dp) + mpfr {z, mul} = apply(zm,makempfr) + mpfr s = mpfr_spouge_gamma(z) + string t = mpfr_get_fixed(s,d,10,maxlen:=dp+2) + mpfr e = mpfr_init() + mpfr_gamma(e,z) + mpfr p = mpfr_init_set(s) + mpfr_mul(p,p,mul) + mpfr_mul(p,p,p) + string zs = mpfr_get_fixed(z,3), + es = mpfr_get_fixed(e,d,10,maxlen:=dp+2), + ps = mpfr_get_fixed(p,dp,10) + printf(1,fmt,{zs,t,es,ps}) + end procedure -printf(1," z %s %s %s\n",{pad(" spouge ",dp+2,"BOTH",'-'),pad(" expected ",dp+2,"BOTH",'-'),pistr}) -papply({{-1.5,0.75},{-0.5,-0.5},{0.5,1},{1,{mqPI,1}},{1.5,2},{2,{mqPI,1}},{2.5,"4/3"},{3,{mqPI,2}},{3.5,"8/15"},{4,{mqPI,6}}},mq) -mq({"1/1000",{mqPI,"999.4237724845954661149822012996"}},28) -mq({"1/100",{mqPI,"99.43258511915060371353298887051"}},29) -mq({"1/10",{mqPI,"9.513507698668731836292487177265"}},30) -mq({10,{mqPI,362880}},25) -mq({100,{mqPI,"9.332621544394415268169923885627e155"}},0) -mq({150,{mqPI,"3.80892263763056972698595524350735e260"}},0) + printf(1," z %s %s %s\n",{pad(" spouge ",dp+2,"BOTH",'-'),pad(" expected ",dp+2,"BOTH",'-'),pistr}) + papply({{-1.5,0.75},{-0.5,-0.5},{0.5,1},{1,{mqPI,1}},{1.5,2},{2,{mqPI,1}},{2.5,"4/3"},{3,{mqPI,2}},{3.5,"8/15"},{4,{mqPI,6}}},mq) + mq({"1/1000",{mqPI,"999.4237724845954661149822012996"}},28) + mq({"1/100",{mqPI,"99.43258511915060371353298887051"}},29) + mq({"1/10",{mqPI,"9.513507698668731836292487177265"}},30) + mq({10,{mqPI,362880}},25) + mq({100,{mqPI,"9.332621544394415268169923885627e155"}},0) + mq({150,{mqPI,"3.80892263763056972698595524350735e260"}},0) + + constant starts = {1e2, 1e6, 1e7, 1e9, 7123}, + counts = {30, 15, 15, 10, 25} + for i=1 to length(starts) do + integer count = counts[i], + j = starts[i], + pow = 100 + while j>=pow*10 do pow *= 10 end while + printf(1,"First %d gapful numbers starting at %,d: ", {count, j}) + while count do + integer fl = floor(j/pow)*10 + remainder(j,10) + if remainder(j,fl)==0 then + printf(1,"%d ", j) + count -= 1 + end if + j += 1 + if j>=10*pow then + pow *= 10 + end if + end while + printf(1,"\n") + end for + iterator +fcn gapfulW(start){ //--> iterator [start..].tweak( fcn(n){ if(n % (10*n.toString()[0] + n%10)) Void.Skip else n }) } diff --git a/Task/Gauss-Jordan-matrix-inversion/ALGOL-68/gauss-jordan-matrix-inversion.alg b/Task/Gauss-Jordan-matrix-inversion/ALGOL-68/gauss-jordan-matrix-inversion.alg index 14b3603189..2b79d01805 100644 --- a/Task/Gauss-Jordan-matrix-inversion/ALGOL-68/gauss-jordan-matrix-inversion.alg +++ b/Task/Gauss-Jordan-matrix-inversion/ALGOL-68/gauss-jordan-matrix-inversion.alg @@ -43,17 +43,16 @@ BEGIN # Gauss-Jordan matrix inversion # OD END # show #; - BEGIN # test # - [ 1 : 4, 1 : 4 ]REAL a, b, c; - a := [,]REAL( ( 2, 1, 1, 4 ) - , ( 0, -1, 0, -1 ) - , ( 1, 0, -2, 4 ) - , ( 4, 1, 2, 2 ) - ); - show( "a", a ); - b := inverse( a ); - show( "b", b ); - c := inverse( b ); - show( "c", c ) - END + INT n = 4; + [ 1 : n, 1 : n ]REAL a, b, c; + a := [,]REAL( ( 2, 1, 1, 4 ) + , ( 0, -1, 0, -1 ) + , ( 1, 0, -2, 4 ) + , ( 4, 1, 2, 2 ) + ); + show( "a", a ); + b := inverse( a ); + show( "b", b ); + c := inverse( b ); + show( "c", c ) END diff --git a/Task/Gauss-Jordan-matrix-inversion/Agena/gauss-jordan-matrix-inversion.agena b/Task/Gauss-Jordan-matrix-inversion/Agena/gauss-jordan-matrix-inversion.agena deleted file mode 100644 index 34361a3d27..0000000000 --- a/Task/Gauss-Jordan-matrix-inversion/Agena/gauss-jordan-matrix-inversion.agena +++ /dev/null @@ -1,81 +0,0 @@ -scope # Gauss Jordan Matrix inversion - translation of the EasyLang sample - - local proc rref( m :: sequence ) - local nrow, ncol, lead := size m, size m[1], 1; - for r to nrow do - if lead > ncol then return fi; - local i := r; - while m[i][lead] = 0 do - i +:= 1; - if i > nrow then - i, lead := r, lead + 1 - if lead > ncol then return fi - fi - od; - m[i], m[r] := m[r], m[i]; - scope - local constant mrl := m[r][lead] - for k to ncol do m[r][k] /:= mrl od - end - for i to nrow do - if i <> r then - local constant mil := m[i][lead]; - for k to ncol do - m[i][k] -:= ( mil * m[r][k] ) - od - fi - od; - lead +:= 1 - od - end - local proc inverse( mat :: sequence ) :: sequence - local inv, mln, aug := seq(), size mat, seq(); - for i to mln do - if size mat[i] <> mln then - error( "not a square matrix" ) - fi; - aug[ size aug + 1 ] := seq(); - for j to mln do aug[i][j] := mat[i][j] od; - for j from mln + 1 to 2 * mln do aug[i][j] := 0 od; - aug[i][mln + i] := 1 - od; - rref( aug ); - for i to mln do - inv[ size inv + 1 ] := seq(); - for j from mln + 1 to 2 * mln do - inv[i][ size inv[i] + 1 ] := aug[i][j] - od - od; - return inv - end - local proc integerMatrix( m :: sequence ) :: boolean - for i to size m do - for j to size m[ i ] do - if entier m[ i ][ j ] <> m[ i ][ j ] then return false fi - od - od; - return true - end - local proc printMatrix( m :: sequence ) - local allInteger := integerMatrix( m ) - for i to size m do - printf( if i = 1 then "[ [" else " [" fi ); - for j to size m[ i ] do - printf( if allInteger then " %9d" else " %9.6f" fi, m[ i ][ j ] ) - od; - printf( " ]\n" ) - od; - printf( "]\n" ) - end - local proc testInverse( m :: sequence ) - printf( "Matrix:\n" ); - printMatrix( m ); - printf( "Inverse:\n" ); - printMatrix( inverse( m ) ); - printf( "\n" ) - end - - testInverse( seq( (/ 1, 2, 3 \), (/ 4, 1, 6 \), (/ 7, 8, 9 \) ) ); - testInverse( seq( (/ 2, -1, 0 \), (/ -1, 2, -1 \), (/ 0, -1, 2 \) ) ); - testInverse( seq( (/ -1, -2, 3, 2 \), (/ -4, -1, 6, 2 \), (/ 7, -8, 9, 1 \), (/ 1, -2, 1, 3 \) ) ) -end diff --git a/Task/Gauss-Jordan-matrix-inversion/EasyLang/gauss-jordan-matrix-inversion.easy b/Task/Gauss-Jordan-matrix-inversion/EasyLang/gauss-jordan-matrix-inversion.easy index 3027f65812..dac0cbf67d 100644 --- a/Task/Gauss-Jordan-matrix-inversion/EasyLang/gauss-jordan-matrix-inversion.easy +++ b/Task/Gauss-Jordan-matrix-inversion/EasyLang/gauss-jordan-matrix-inversion.easy @@ -1,31 +1,39 @@ -proc rref &m[][] . +proc rref . m[][] . nrow = len m[][] ncol = len m[1][] lead = 1 for r to nrow - if lead > ncol : return + if lead > ncol + return + . i = r while m[i][lead] = 0 i += 1 if i > nrow i = r lead += 1 - if lead > ncol : return + if lead > ncol + return + . . . swap m[i][] m[r][] m = m[r][lead] - for k to ncol : m[r][k] /= m + for k to ncol + m[r][k] /= m + . for i to nrow if i <> r m = m[i][lead] - for k to ncol : m[i][k] -= m * m[r][k] + for k to ncol + m[i][k] -= m * m[r][k] + . . . lead += 1 . . -proc inverse &mat[][] &inv[][] . +proc inverse . mat[][] inv[][] . inv[][] = [ ] ln = len mat[][] for i to ln @@ -35,7 +43,9 @@ proc inverse &mat[][] &inv[][] . . aug[][] &= [ ] len aug[i][] 2 * ln - for j to ln : aug[i][j] = mat[i][j] + for j to ln + aug[i][j] = mat[i][j] + . aug[i][ln + i] = 1 . rref aug[][] diff --git a/Task/Gauss-Jordan-matrix-inversion/JavaScript/gauss-jordan-matrix-inversion.js b/Task/Gauss-Jordan-matrix-inversion/JavaScript/gauss-jordan-matrix-inversion.js deleted file mode 100644 index 854bc332e7..0000000000 --- a/Task/Gauss-Jordan-matrix-inversion/JavaScript/gauss-jordan-matrix-inversion.js +++ /dev/null @@ -1,99 +0,0 @@ -// Vector and matrix types -// In JavaScript, we'll use arrays directly - -function printMatrix(matrix, title) { - console.log(title); - for (const row of matrix) { - console.log(row.map(x => x.toString().padStart(10)).join('')); - } -} - -function createIdentityMatrix(n) { - const result = Array(n).fill().map(() => Array(n).fill(0)); - for (let i = 0; i < n; i++) { - result[i][i] = 1; - } - return result; -} - -function inverse(matrix) { - const n = matrix.length; - - // Check if it's a square matrix - for (const row of matrix) { - if (row.length !== n) { - throw new Error("Not a square matrix"); - } - } - - // Create identity matrix for the result - const b = createIdentityMatrix(n); - - // Create a copy of the input matrix - const a = matrix.map(row => [...row]); - - for (let k = 0; k < n; k++) { - let iMax = 0; - let max = -1; - - for (let i = k; i < n; i++) { - const row = a[i]; - - // Compute scale factor s = max abs in row - let s = -1; - for (let j = k; j < n; j++) { - const x = Math.abs(row[j]); - if (x > s) { - s = x; - } - } - - if (s === 0) { - throw new Error("Irregular matrix"); - } - - // Scale the abs used to pick the pivot - const abs = Math.abs(row[k]) / s; - if (abs > max) { - iMax = i; - max = abs; - } - } - - // Swap rows if needed - if (k !== iMax) { - [a[k], a[iMax]] = [a[iMax], a[k]]; - [b[k], b[iMax]] = [b[iMax], b[k]]; - } - - const akk = a[k][k]; - - for (let j = 0; j < n; j++) { - a[k][j] /= akk; - b[k][j] /= akk; - } - - for (let i = 0; i < n; i++) { - if (i !== k) { - const aik = a[i][k]; - for (let j = 0; j < n; j++) { - a[i][j] -= a[k][j] * aik; - b[i][j] -= b[k][j] * aik; - } - } - } - } - - return b; -} - -function main() { - const a = [[1, 2, 3], [4, 1, 6], [7, 8, 9]]; - printMatrix(inverse(a), "Inverse of A is:\n"); - - const b = [[2, -1, 0], [-1, 2, -1], [0, -1, 2]]; - printMatrix(inverse(b), "Inverse of B is:\n"); -} - -// Run the main function -main(); diff --git a/Task/Gauss-Jordan-matrix-inversion/Julia/gauss-jordan-matrix-inversion-1.jl b/Task/Gauss-Jordan-matrix-inversion/Julia/gauss-jordan-matrix-inversion-1.julia similarity index 100% rename from Task/Gauss-Jordan-matrix-inversion/Julia/gauss-jordan-matrix-inversion-1.jl rename to Task/Gauss-Jordan-matrix-inversion/Julia/gauss-jordan-matrix-inversion-1.julia diff --git a/Task/Gauss-Jordan-matrix-inversion/Julia/gauss-jordan-matrix-inversion-2.jl b/Task/Gauss-Jordan-matrix-inversion/Julia/gauss-jordan-matrix-inversion-2.julia similarity index 100% rename from Task/Gauss-Jordan-matrix-inversion/Julia/gauss-jordan-matrix-inversion-2.jl rename to Task/Gauss-Jordan-matrix-inversion/Julia/gauss-jordan-matrix-inversion-2.julia diff --git a/Task/Gauss-Jordan-matrix-inversion/Kotlin/gauss-jordan-matrix-inversion.kts b/Task/Gauss-Jordan-matrix-inversion/Kotlin/gauss-jordan-matrix-inversion.kotlin similarity index 100% rename from Task/Gauss-Jordan-matrix-inversion/Kotlin/gauss-jordan-matrix-inversion.kts rename to Task/Gauss-Jordan-matrix-inversion/Kotlin/gauss-jordan-matrix-inversion.kotlin diff --git a/Task/Gauss-Jordan-matrix-inversion/Lua/gauss-jordan-matrix-inversion.lua b/Task/Gauss-Jordan-matrix-inversion/Lua/gauss-jordan-matrix-inversion.lua deleted file mode 100644 index 6eb7628293..0000000000 --- a/Task/Gauss-Jordan-matrix-inversion/Lua/gauss-jordan-matrix-inversion.lua +++ /dev/null @@ -1,81 +0,0 @@ -do -- Gauss Jordan Matrix inversion - translation of the EasyLang sample - - local function rref( m ) - local nrow, ncol, lead = # m, # m[1], 1 - for r = 1, nrow do - if lead > ncol then return end - local i = r - while m[i][lead] == 0 do - i = i + 1 - if i > nrow then - i, lead = r, lead + 1 - if lead > ncol then return end - end - end - m[i], m[r] = m[r], m[i] - do - local mrl = m[r][lead] - for k = 1, ncol do m[r][k] = m[r][k] / mrl end - end - for i = 1, nrow do - if i ~= r then - local mil = m[i][lead] - for k = 1, ncol do - m[i][k] = m[i][k] - ( mil * m[r][k] ) - end - end - end - lead = lead + 1 - end - end - local function inverse( mat ) - local inv, ln, aug = {}, # mat, {} - for i = 1, ln do - if # mat[i] ~= ln then - error( "not a square matrix" ) - end - aug[ # aug + 1 ] = {} - for j = 1, ln do aug[i][j] = mat[i][j] end - for j = ln + 1, 2 * ln do aug[i][j] = 0 end - aug[i][ln + i] = 1 - end - rref( aug ) - for i = 1, ln do - inv[ # inv + 1 ] = {} - for j = ln + 1, 2 * ln do - inv[i][ # inv[i] + 1 ] = aug[i][j] - end - end - return inv - end - local function integerMatrix( m ) - for i = 1, # m do - for j = 1, # m[ i ] do - if math.type( m[ i ][ j ] ) ~= "integer" then return false end - end - end - return true - end - local function printMatrix( m ) - local allInteger = integerMatrix( m ) - for i = 1, # m do - io.write( i == 1 and "[ [" or " [" ) - for j = 1, # m[ i ] do - io.write( string.format( ( allInteger and " %9d" or " %9.6f" ), m[ i ][ j ] ) ) - end - io.write( " ]\n" ) - end - io.write( "]\n" ) - end - local function testInverse( m ) - io.write( "Matrix:\n" ) - printMatrix( m ) - io.write( "Inverse:\n" ) - printMatrix( inverse( m ) ) - io.write( "\n" ) - end - - testInverse { { 1, 2, 3 }, { 4, 1, 6 }, { 7, 8, 9 } } - testInverse { { 2, -1, 0 }, {-1, 2, -1 }, { 0, -1, 2 } } - testInverse { { -1, -2, 3, 2 }, { -4, -1, 6, 2 }, { 7, -8, 9, 1 }, { 1, -2, 1, 3 } } -end diff --git a/Task/Gauss-Jordan-matrix-inversion/PascalABC.NET/gauss-jordan-matrix-inversion.pas b/Task/Gauss-Jordan-matrix-inversion/PascalABC.NET/gauss-jordan-matrix-inversion.pas deleted file mode 100644 index 3c25363004..0000000000 --- a/Task/Gauss-Jordan-matrix-inversion/PascalABC.NET/gauss-jordan-matrix-inversion.pas +++ /dev/null @@ -1,9 +0,0 @@ -uses NumLibABC; - -begin - var A := new Matrix(3,3,1,2,3,4,1,6,7,8,9); - 'Original:'.Println; - A.Println(10,5); - 'Inverse:'.Println; - A.Inv.Println(10,5); -end. diff --git a/Task/Gauss-Jordan-matrix-inversion/Perl/gauss-jordan-matrix-inversion.pl b/Task/Gauss-Jordan-matrix-inversion/Perl/gauss-jordan-matrix-inversion.pl index 2102119749..5fa185e871 100644 --- a/Task/Gauss-Jordan-matrix-inversion/Perl/gauss-jordan-matrix-inversion.pl +++ b/Task/Gauss-Jordan-matrix-inversion/Perl/gauss-jordan-matrix-inversion.pl @@ -61,5 +61,5 @@ for my $matrix (@tests) { my @gj = gauss_jordan_invert( @$matrix ); print "Gauss-Jordan Inverted Matrix:\n" . display(\@gj) . "\n"; my @rt = gauss_jordan_invert( @gj ); - print "After round-trip:\n" . display(\@rt) . "\n"; + print "After round-trip:\n" . display(\@rt) . "\n";} . "\n" } diff --git a/Task/Gauss-Jordan-matrix-inversion/Pluto/gauss-jordan-matrix-inversion.pluto b/Task/Gauss-Jordan-matrix-inversion/Pluto/gauss-jordan-matrix-inversion.pluto deleted file mode 100644 index 103fcf3988..0000000000 --- a/Task/Gauss-Jordan-matrix-inversion/Pluto/gauss-jordan-matrix-inversion.pluto +++ /dev/null @@ -1,25 +0,0 @@ -require "matrix" - -local arrays = { - { { 1, 2, 3 }, - { 4, 1, 6 }, - { 7, 8, 9 } }, - - { { 2, -1, 0 }, - {-1, 2, -1 }, - { 0, -1, 2 } }, - - { { -1, -2, 3, 2 }, - { -4, -1, 6, 2 }, - { 7, -8, 9, 1 }, - { 1, -2, 1, 3 } } -} - -for arrays as array do - print("Original:\n") - local m = matrix.from(array) - print(m) - print("\nInverse:\n") - print(m:inverse():format("%9.6f")) - print() -end diff --git a/Task/Gauss-Jordan-matrix-inversion/PowerShell/gauss-jordan-matrix-inversion.ps1 b/Task/Gauss-Jordan-matrix-inversion/PowerShell/gauss-jordan-matrix-inversion.psh similarity index 100% rename from Task/Gauss-Jordan-matrix-inversion/PowerShell/gauss-jordan-matrix-inversion.ps1 rename to Task/Gauss-Jordan-matrix-inversion/PowerShell/gauss-jordan-matrix-inversion.psh diff --git a/Task/Gauss-Jordan-matrix-inversion/R/gauss-jordan-matrix-inversion.r b/Task/Gauss-Jordan-matrix-inversion/R/gauss-jordan-matrix-inversion.r deleted file mode 100644 index 6f636d34ed..0000000000 --- a/Task/Gauss-Jordan-matrix-inversion/R/gauss-jordan-matrix-inversion.r +++ /dev/null @@ -1,91 +0,0 @@ -gaussjordan <- function(A) { - # Check if matrix is square - if (nrow(A) != ncol(A)) { - stop("A must be a square matrix") - } - - n <- nrow(A) - - # Create augmented matrix [A | I] - M <- cbind(matrix(as.numeric(A), nrow = n, ncol = n), diag(n)) - - tmp <- numeric(2 * n) - i <- 1 - - # Forward elimination - while (i <= n) { - # Check if pivot is approximately zero - if (abs(M[i, i]) < 1e-10) { - j <- i + 1 - # Find non-zero pivot - while (j <= n && abs(M[j, i]) < 1e-10) { - j <- j + 1 - } - if (j <= n) { - # Swap rows - tmp <- M[i, ] - M[i, ] <- M[j, ] - M[j, ] <- tmp - } else { - stop("Matrix is singular, cannot compute the inverse") - } - } - - # Eliminate below pivot - if (i < n) { - for (j in (i + 1):n) { - M[j, ] <- M[j, ] - (M[j, i] / M[i, i]) * M[i, ] - } - } - i <- i + 1 - } - - i <- n - - # Backward elimination - while (i >= 1) { - # Check if pivot is approximately zero - if (abs(M[i, i]) < 1e-10) { - j <- i - 1 - # Find non-zero pivot - while (j >= 1 && abs(M[j, i]) < 1e-10) { - j <- j - 1 - } - if (j >= 1) { - # Swap rows - tmp <- M[i, ] - M[i, ] <- M[j, ] - M[j, ] <- tmp - } else { - stop("Matrix is singular, cannot compute the inverse") - } - } - - # Eliminate above pivot - if (i > 1) { - for (j in (i - 1):1) { - M[j, ] <- M[j, ] - (M[j, i] / M[i, i]) * M[i, ] - } - } - i <- i - 1 - } - - # Normalize by diagonal elements - M <- M / diag(M) - - # Return the inverse (right half of augmented matrix) - return(M[, (n + 1):(2 * n)]) -} - -# Test examples -# Example 1: Create a test matrix -A <- matrix(c(4, 3, 2, 1), nrow = 2, ncol = 2) -print(gaussjordan(A)) -print(solve(A)) # R's built-in inverse function - -# Example 2: Random matrix test -set.seed(123) -A <- matrix(runif(100), nrow = 10, ncol = 10) -result <- gaussjordan(A) -expected <- solve(A) -print(all.equal(result, expected)) # Should return TRUE diff --git a/Task/Gauss-Jordan-matrix-inversion/REXX/gauss-jordan-matrix-inversion-2.rexx b/Task/Gauss-Jordan-matrix-inversion/REXX/gauss-jordan-matrix-inversion-2.rexx index 475332d230..f2202efef4 100644 --- a/Task/Gauss-Jordan-matrix-inversion/REXX/gauss-jordan-matrix-inversion-2.rexx +++ b/Task/Gauss-Jordan-matrix-inversion/REXX/gauss-jordan-matrix-inversion-2.rexx @@ -1,64 +1,35 @@ -/*REXX program performs a (square) matrix inversion using the Gauss-Jordan method. */ -data=8 3 7 5 9 12 10 11 6 2 4 13 14 15 16 17 /*the matrix element values. */ -Call build 4 /*assign data elements to the matrix. */ -Call show 'M','The matrix of order' n 'is:' /*display the (square) matrix. */ -Call aux /*define the auxiliary (identity) array*/ -Call invert /*invert the matrix, store result in X.*/ -Call show 'X','The inverted matrix is:' /*display inverted matrix. */ -Exit /*stick a fork in it, we're all done. */ -/*----------------------------------------------------------------------------------*/ -aux: - x.=0 - Do i=1 To n - x.i.i=1 - End - Return -/*----------------------------------------------------------------------------------*/ -build: /*set m.r.c from data */ - Arg n - k=0 - w=0 /*W: max width of a number*/ - Do r=1 To n /*loop over rows */ - Do c=1 To n /*loop over columns */ - k=k+1 - m.r.c=word(data,k) - w=max(w,length(m.r.c)) - End /*c*/ - End /*r*/ - Return -/*----------------------------------------------------------------------------------*/ -invert: - Do k=1 To n - t=m.k.k /*divide each matrix row by T */ - Do c=1 To n - m.k.c=m.k.c/t /*process row of original matrix.*/ - x.k.c=x.k.c/t /* ' ' ' auxiliary ' */ - End /*c*/ - Do r=1 To n - If r<>k Then Do /*skip if R is the same row as K.*/ - t=m.r.k - Do c=1 To n - m.r.c=m.r.c-t*m.k.c /*process row of original matrix.*/ - x.r.c=x.r.c-t*x.k.c /* ' ' ' auxiliary ' */ - End /*c*/ - End - End /*r*/ - End /*k*/ - Return -/*-----------------------------------------------------------------------------------*/ -show: - Parse Arg which,title - Say - Say title - f=4 /*F: fractional digits precision.*/ - Do r=1 To n - line='' - Do c=1 To n - If which=='M' Then - line=line right(m.r.c,w) - Else - line=line right(format(x.r.c,w,f),w+f+1) - End /*c*/ - Say line - End /*r*/ - Return +/*REXX program performs a (square) matrix inversion using the Gauss─Jordan method. */ +data= 8 3 7 5 9 12 10 11 6 2 4 13 14 15 16 17 /*the matrix element values. */ +call build 4 /*assign data elements to the matrix. */ +call show '@', 'The matrix of order ' n " is:" /*display the (square) matrix. */ +call aux /*define the auxiliary (identity) array*/ +call invert /*invert the matrix, store result in X.*/ +call show 'X', "The inverted matrix is:" /*display (inverted) auxiliary matrix. */ +exit 0 /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +aux: x.= 0; do i=1 for n; x.i.i= 1; end; return +/*──────────────────────────────────────────────────────────────────────────────────────*/ +build: arg n; #=0; w=0; do r=1 for n /*read a row of the matrix.*/ + do c=1 for n; #= # + 1 /* " " col " " " */ + @.r.c= word(data, #); w= max(w, length(@.r.c) ) + end /*c*/ /*W: max width of a number*/ + end /*r*/; return +/*──────────────────────────────────────────────────────────────────────────────────────*/ +invert: do k=1 for n; t= @.k.k /*divide each matrix row by T. */ + do c=1 for n; @.k.c= @.k.c / t /*process row of original matrix.*/ + x.k.c= x.k.c / t /* " " " auxiliary " */ + end /*c*/ + do r=1 for n; if r==k then iterate /*skip if R is the same row as K.*/ + t= @.r.k + do c=1 for n; @.r.c= @.r.c - t*@.k.c /*process row of original matrix.*/ + x.r.c= x.r.c - t*x.k.c /* " " " auxiliary " */ + end /*c*/ + end /*r*/ + end /*k*/; return +/*──────────────────────────────────────────────────────────────────────────────────────*/ +show: parse arg ?, title; say; say title; f= 4 /*F: fractional digits precision.*/ + do r=1 for n; _= + do c=1 for n; if ?=='@' then _= _ right( @.r.c, w) + else _= _ right(format(x.r.c, w, f), w + f + length(.)) + end /*c*/; say _ + end /*r*/; return diff --git a/Task/Gauss-Jordan-matrix-inversion/Rust/gauss-jordan-matrix-inversion.rs b/Task/Gauss-Jordan-matrix-inversion/Rust/gauss-jordan-matrix-inversion.rust similarity index 100% rename from Task/Gauss-Jordan-matrix-inversion/Rust/gauss-jordan-matrix-inversion.rs rename to Task/Gauss-Jordan-matrix-inversion/Rust/gauss-jordan-matrix-inversion.rust diff --git a/Task/Gauss-Jordan-matrix-inversion/VBScript/gauss-jordan-matrix-inversion.vbs b/Task/Gauss-Jordan-matrix-inversion/VBScript/gauss-jordan-matrix-inversion.vb similarity index 100% rename from Task/Gauss-Jordan-matrix-inversion/VBScript/gauss-jordan-matrix-inversion.vbs rename to Task/Gauss-Jordan-matrix-inversion/VBScript/gauss-jordan-matrix-inversion.vb diff --git a/Task/Gaussian-elimination/Ada/gaussian-elimination.adb b/Task/Gaussian-elimination/Ada/gaussian-elimination.ada similarity index 100% rename from Task/Gaussian-elimination/Ada/gaussian-elimination.adb rename to Task/Gaussian-elimination/Ada/gaussian-elimination.ada diff --git a/Task/Gaussian-elimination/Delphi/gaussian-elimination.pas b/Task/Gaussian-elimination/Delphi/gaussian-elimination.delphi similarity index 100% rename from Task/Gaussian-elimination/Delphi/gaussian-elimination.pas rename to Task/Gaussian-elimination/Delphi/gaussian-elimination.delphi diff --git a/Task/Gaussian-elimination/EasyLang/gaussian-elimination.easy b/Task/Gaussian-elimination/EasyLang/gaussian-elimination.easy index 84676232a4..12bd0ba26f 100644 --- a/Task/Gaussian-elimination/EasyLang/gaussian-elimination.easy +++ b/Task/Gaussian-elimination/EasyLang/gaussian-elimination.easy @@ -1,4 +1,4 @@ -func[] gauss_elim a[][] b[] . +proc gauss_elim . a[][] b[] x[] . n = len a[][] for i to n maxr = i @@ -14,14 +14,14 @@ func[] gauss_elim a[][] b[] . swap b[maxr] b[i] . for j = i + 1 to n - fn = a[j][i] - fd = a[i][i] + f = a[j][i] / a[i][i] for k = i to n - a[j][k] -= a[i][k] * fn / fd + a[j][k] -= f * a[i][k] . - b[j] -= b[i] * fn / fd + b[j] -= f * b[i] . . + x[] = [ ] len x[] n for i = n downto 1 rhs = b[i] @@ -30,16 +30,8 @@ func[] gauss_elim a[][] b[] . . x[i] = rhs / a[i][i] . - return x[] . -# --------------------- # -# 2x + 3y − z = 5 # -# x + y + z = 6 # -# -3x - 4y + 3z = -5 # -# # -# x = 5, y = -1, z = 2 # -# --------------------- # -# -a[][] = [ [ 2 3 -1 ] [ 1 1 1 ] [ -3 -4 3 ] ] -b[] = [ 5 6 -5 ] -print gauss_elim a[][] b[] +a[][] = [ [ 1.00 0.00 0.00 0.00 0.00 0.00 ] [ 1.00 0.63 0.39 0.25 0.16 0.10 ] [ 1.00 1.26 1.58 1.98 2.49 3.13 ] [ 1.00 1.88 3.55 6.70 12.62 23.80 ] [ 1.00 2.51 6.32 15.88 39.90 100.28 ] [ 1.00 3.14 9.87 31.01 97.41 306.02 ] ] +b[] = [ -0.01 0.61 0.91 0.99 0.60 0.02 ] +gauss_elim a[][] b[] x[] +print x[] diff --git a/Task/Gaussian-elimination/FutureBasic/gaussian-elimination.basic b/Task/Gaussian-elimination/FutureBasic/gaussian-elimination.basic deleted file mode 100644 index 10ac8ba5c8..0000000000 --- a/Task/Gaussian-elimination/FutureBasic/gaussian-elimination.basic +++ /dev/null @@ -1,106 +0,0 @@ -// -// Gaussian Elimination Estimate -// -// FutureBasic 7.0.34 August 2025 R.W -// -//-------------------------------------------------- -// -// Test data array. I wanted it to be base 1 and not zero -// hence the 99 which is just filler for the zeroeth element -// -double a(6,6) = ¬ -{99, 99, 99, 99, 99, 99, 99,¬ -99, 1.00, 0.00, 0.00, 0.00, 0.00, 0.00,¬ -99, 1.00, 0.63, 0.39, 0.25, 0.16, 0.10,¬ -99, 1.00, 1.26, 1.58, 1.98, 2.49, 3.13,¬ -99, 1.00, 1.88, 3.55, 6.70, 12.62, 23.80,¬ -99, 1.00, 2.51, 6.32, 15.88, 39.90, 100.28,¬ -99, 1.00, 3.14, 9.87, 31.01, 97.41, 306.02 } - -double b(6) = ¬ -{99,-0.01, 0.61, 0.91, 0.99, 0.60, 0.02 } - -double x(6) -double ab(6) -double ans(6),r(6),bb(6,6), f -int c, d, g, p1, p2, z -// - -int row, col -int j, k, n = 6 -// -// Pivot n times -local fn pivot(num as int) - For p1 = num to n - 1 - For p2 = p1 + 1 To n - If abs(bb(p1,num)) < abs(bb(p2,num)) - Swap r(p1),r(p2) - For g = 1 To n - Swap bb(p1,g),bb(p2,g) - Next g - End If - Next p2 - Next p1 -end fn - -// The 'Gaussian' function takes two matrices, -// 'a' and 'b', with 'a' square, and it returns -// the determinant of 'a' and a matrix 'x' -// such that a * x = b. -// If 'b' is the identity, then 'x' = inverse of 'a' - -local fn Gaussian(matrix(6,6) as double, rhs(6) as double) - - // copy matrix - for c = 1 to n - r(c) = rhs(c) - for d = 1 to n - bb(c,d) = matrix(c,d) - next d - next c - - // pivot it (hey that's what the task requires - // don't ask me why. It doesn't - // improve accuracy with these numbers) - for k = 1 to n-1 - fn pivot(k) - for row = k to n-1 - if bb(row + 1, k) == 0 then exit for - f = bb(k, k) / bb(row+1, k) - r(row + 1) = r(row + 1) * f - r(k) - For g = 1 To n - bb((row + 1), g) = bb((row + 1), g) * f - bb(k,g) - Next g - Next row - Next k - - //back substitute - For z = n to 1 step -1 - ans(z) = r(z) / bb(z,z) - For j = n to z + 1 step -1 - ans(z) = ans(z) - (bb(z,j) * ans(j) / bb(z,z)) - Next j - Next z -end fn - -window 1,@"Gaussian Elimination" - -print "TEST DATA USED" -print " ax = transpose b" -print "[1.00 |0.00 |0.00 | 0.0000 | 0.00 | 0.00] [??] [-0.01]" -print "[1.00 |0.63 |0.39 | 0.2500 | 0.16 | 0.10] [??] [ 0.61]" -print "[1.00 |1.26 |1.58 | 1.9800 | 2.49 | 3.13] x [??] = [ 0.91]" -print "[1.00 |1.88 |3.55 | 6.7000 |12.62 | 23.80] [??] [ 0.99]" -print "[1.00 |2.51 |6.32 |15.8800 |39.90 |100.28] [??] [ 0.60]" -print "[1.00 |3.14 |9.87 |31.0100 |97.41 |306.02] [??] [ 0.02]" -print - -fn Gaussian(a(0,0),b(0)) - -print "Solution:" -print "---------" -for j = 1 to 6 - print using "###.################";ans(j) -next j - -HandleEvents diff --git a/Task/Gaussian-elimination/Julia/gaussian-elimination.jl b/Task/Gaussian-elimination/Julia/gaussian-elimination.julia similarity index 100% rename from Task/Gaussian-elimination/Julia/gaussian-elimination.jl rename to Task/Gaussian-elimination/Julia/gaussian-elimination.julia diff --git a/Task/Gaussian-elimination/Kotlin/gaussian-elimination.kts b/Task/Gaussian-elimination/Kotlin/gaussian-elimination.kotlin similarity index 100% rename from Task/Gaussian-elimination/Kotlin/gaussian-elimination.kts rename to Task/Gaussian-elimination/Kotlin/gaussian-elimination.kotlin diff --git a/Task/Gaussian-elimination/OCaml/gaussian-elimination-1.ml b/Task/Gaussian-elimination/OCaml/gaussian-elimination-1.ocaml similarity index 100% rename from Task/Gaussian-elimination/OCaml/gaussian-elimination-1.ml rename to Task/Gaussian-elimination/OCaml/gaussian-elimination-1.ocaml diff --git a/Task/Gaussian-elimination/OCaml/gaussian-elimination-2.ml b/Task/Gaussian-elimination/OCaml/gaussian-elimination-2.ocaml similarity index 100% rename from Task/Gaussian-elimination/OCaml/gaussian-elimination-2.ml rename to Task/Gaussian-elimination/OCaml/gaussian-elimination-2.ocaml diff --git a/Task/Gaussian-elimination/OCaml/gaussian-elimination-3.ml b/Task/Gaussian-elimination/OCaml/gaussian-elimination-3.ocaml similarity index 100% rename from Task/Gaussian-elimination/OCaml/gaussian-elimination-3.ml rename to Task/Gaussian-elimination/OCaml/gaussian-elimination-3.ocaml diff --git a/Task/Gaussian-elimination/OCaml/gaussian-elimination-4.ml b/Task/Gaussian-elimination/OCaml/gaussian-elimination-4.ocaml similarity index 100% rename from Task/Gaussian-elimination/OCaml/gaussian-elimination-4.ml rename to Task/Gaussian-elimination/OCaml/gaussian-elimination-4.ocaml diff --git a/Task/Gaussian-elimination/OCaml/gaussian-elimination-5.ml b/Task/Gaussian-elimination/OCaml/gaussian-elimination-5.ocaml similarity index 100% rename from Task/Gaussian-elimination/OCaml/gaussian-elimination-5.ml rename to Task/Gaussian-elimination/OCaml/gaussian-elimination-5.ocaml diff --git a/Task/Gaussian-elimination/OCaml/gaussian-elimination-6.ml b/Task/Gaussian-elimination/OCaml/gaussian-elimination-6.ocaml similarity index 100% rename from Task/Gaussian-elimination/OCaml/gaussian-elimination-6.ml rename to Task/Gaussian-elimination/OCaml/gaussian-elimination-6.ocaml diff --git a/Task/Gaussian-elimination/PascalABC.NET/gaussian-elimination.pas b/Task/Gaussian-elimination/PascalABC.NET/gaussian-elimination.pas deleted file mode 100644 index e6f257930e..0000000000 --- a/Task/Gaussian-elimination/PascalABC.NET/gaussian-elimination.pas +++ /dev/null @@ -1,16 +0,0 @@ -uses NumLibABC; - -begin - var A := new real[6, 6] ((1.00, 0.00, 0.00, 0.00, 0.00, 0.00), - (1.00, 0.63, 0.39, 0.25, 0.16, 0.10), - (1.00, 1.26, 1.58, 1.98, 2.49, 3.13), - (1.00, 1.88, 3.55, 6.70, 12.62, 23.80), - (1.00, 2.51, 6.32, 15.88, 39.90, 100.28), - (1.00, 3.14, 9.87, 31.01, 97.41, 306.02)); - - var b := new real[6] (-0.01, 0.61, 0.91, 0.99, 0.60, 0.02); - - var oL := new Decomp(A); - oL.Solve(b); - b.Println; -end. diff --git a/Task/Gaussian-elimination/PowerShell/gaussian-elimination-1.ps1 b/Task/Gaussian-elimination/PowerShell/gaussian-elimination-1.psh similarity index 100% rename from Task/Gaussian-elimination/PowerShell/gaussian-elimination-1.ps1 rename to Task/Gaussian-elimination/PowerShell/gaussian-elimination-1.psh diff --git a/Task/Gaussian-elimination/PowerShell/gaussian-elimination-2.ps1 b/Task/Gaussian-elimination/PowerShell/gaussian-elimination-2.psh similarity index 100% rename from Task/Gaussian-elimination/PowerShell/gaussian-elimination-2.ps1 rename to Task/Gaussian-elimination/PowerShell/gaussian-elimination-2.psh diff --git a/Task/Gaussian-elimination/Rust/gaussian-elimination.rs b/Task/Gaussian-elimination/Rust/gaussian-elimination.rust similarity index 100% rename from Task/Gaussian-elimination/Rust/gaussian-elimination.rs rename to Task/Gaussian-elimination/Rust/gaussian-elimination.rust diff --git a/Task/Gaussian-elimination/VBScript/gaussian-elimination.vbs b/Task/Gaussian-elimination/VBScript/gaussian-elimination.vb similarity index 100% rename from Task/Gaussian-elimination/VBScript/gaussian-elimination.vbs rename to Task/Gaussian-elimination/VBScript/gaussian-elimination.vb diff --git a/Task/Gaussian-elimination/XPL0/gaussian-elimination.xpl0 b/Task/Gaussian-elimination/XPL0/gaussian-elimination.xpl0 deleted file mode 100644 index d3f43119aa..0000000000 --- a/Task/Gaussian-elimination/XPL0/gaussian-elimination.xpl0 +++ /dev/null @@ -1,43 +0,0 @@ -proc Gauss(A, B, X, N); \Gaussian elimination returns [X] for [A]*[X] = [B] -real A, B, X; int N; \matrix, vector, output vector, number of rows -int Diag, MaxRow, Row, Col, I; -real Max, Temp; -[for Diag:= 0 to N-1 do \partial pivoting uses largest magnitude coefficient - [MaxRow:= Diag; \ to improve numerical stability - Max:= A(Diag, Diag); - for Row:= Diag+1 to N-1 do - [Temp:= abs(A(Row, Diag)); - if Temp > Max then - [MaxRow:= Row; Max:= Temp]; - ]; - Temp:= A(Diag); A(Diag):= A(MaxRow); A(MaxRow):= Temp; \swap rows - Temp:= B(Diag); B(Diag):= B(MaxRow); B(MaxRow):= Temp; - for Row:= Diag+1 to N-1 do - [Temp:= A(Row, Diag) / A(Diag, Diag); \divide by pivot element - for Col:= Diag+1 to N-1 do - A(Row, Col):= A(Row, Col) - Temp*A(Diag, Col); - A(Row, Diag):= 0.; - B(Row):= B(Row) - Temp*B(Diag); - ]; - ]; \reduced row echelon form -for Row:= N-1 downto 0 do \back substitution makes [X] - [Temp:= B(Row); - for I:= N-1 downto Row+1 do - Temp:= Temp - X(I)*A(Row, I); - X(Row):= Temp / A(Row, Row); - ]; -]; - -real A, B, X(6); -int I; -[A:= [ [1.00, 0.00, 0.00, 0.00, 0.00, 0.00], - [1.00, 0.63, 0.39, 0.25, 0.16, 0.10], - [1.00, 1.26, 1.58, 1.98, 2.49, 3.13], - [1.00, 1.88, 3.55, 6.70, 12.62, 23.80], - [1.00, 2.51, 6.32, 15.88, 39.90, 100.28], - [1.00, 3.14, 9.87, 31.01, 97.41, 306.02] ]; -B:= [-0.01, 0.61, 0.91, 0.99, 0.60, 0.02]; -Gauss(A, B, X, 6); -for I:= 0 to 6-1 do - [RlOut(0, X(I)); CrLf(0)]; -] diff --git a/Task/General-FizzBuzz/ALGOL-68/general-fizzbuzz.alg b/Task/General-FizzBuzz/ALGOL-68/general-fizzbuzz.alg index 046fa5220b..301d6ba2ca 100644 --- a/Task/General-FizzBuzz/ALGOL-68/general-fizzbuzz.alg +++ b/Task/General-FizzBuzz/ALGOL-68/general-fizzbuzz.alg @@ -1,25 +1,25 @@ BEGIN # generalised FizzBuzz # # prompts for an integer, reads it and returns it # - PROC read an integer = ( STRING prompt )INT: + PROC read integer = ( STRING prompt )INT: BEGIN print( ( prompt ) ); INT result; read( ( result, newline ) ); result - END; # read an integer # + END; # read integer # # prompts for a string, reads it and returns it # - PROC read a string = ( STRING prompt )STRING: + PROC read string = ( STRING prompt )STRING: BEGIN print( ( prompt ) ); STRING result; read( ( result, newline ) ); result - END; # read a string # + END; # read string # # mode to hold a factor and associated text # MODE FBFACTOR = STRUCT( INT factor, STRING text ); #===============================================================# - # quicksort routine for the factors # - # - from the Algol 68 task sample # + # quicksort routine for the factors, from the Algol 68 uicksort # + # task sample # #---------------------------------------------------------------# #--- Swap function ---# PROC swap = (REF[]FBFACTOR array, INT first, INT second) VOID: @@ -51,14 +51,14 @@ BEGIN # generalised FizzBuzz # OP > = ( FBFACTOR a, b )BOOL: factor OF a > factor OF b; #===============================================================# # get the maximum number to consider # - INT max number = read an integer( "Numbers required: " ); - # number of factors required # + INT max number = read integer( "Numbers reuired: " ); + # number of factors reuired # INT max factor = 3; # get the factors and associated words # [ max factor ]FBFACTOR factors; FOR i TO max factor DO - factor OF factors[ i ] := read an integer( "Factor " + whole( i, 0 ) + ": " ); - text OF factors [ i ] := read a string( "Text for " + whole( factor OF factors[ i ], 0 ) + ": " ) + factor OF factors[ i ] := read integer( "Factor " + whole( i, 0 ) + ": " ); + text OF factors [ i ] := read string( "Text for " + whole( factor OF factors[ i ], 0 ) + ": " ) OD; # sort the factors into order # quick( factors, 1, UPB factors ); diff --git a/Task/General-FizzBuzz/Ada/general-fizzbuzz.adb b/Task/General-FizzBuzz/Ada/general-fizzbuzz.ada similarity index 100% rename from Task/General-FizzBuzz/Ada/general-fizzbuzz.adb rename to Task/General-FizzBuzz/Ada/general-fizzbuzz.ada diff --git a/Task/General-FizzBuzz/Crystal/general-fizzbuzz.cr b/Task/General-FizzBuzz/Crystal/general-fizzbuzz.cr deleted file mode 100644 index 1af7cfbec8..0000000000 --- a/Task/General-FizzBuzz/Crystal/general-fizzbuzz.cr +++ /dev/null @@ -1,12 +0,0 @@ -def fizz_buzz_plus (factorwords, limit) - factorwords = factorwords.sort_by { |f, w| f } - (1..limit).each do |n| - shout = "" - factorwords.each do |factor, word| - shout += word if n % factor == 0 - end - puts (shout == "" ? n : shout) - end -end - -fizz_buzz_plus [{3, "Fizz"}, {5, "Buzz"}, {7, "Baxx"}], 20 diff --git a/Task/General-FizzBuzz/Crystal/general-fizzbuzz.crystal b/Task/General-FizzBuzz/Crystal/general-fizzbuzz.crystal new file mode 100644 index 0000000000..e74a7afc6f --- /dev/null +++ b/Task/General-FizzBuzz/Crystal/general-fizzbuzz.crystal @@ -0,0 +1,50 @@ +counter = 0 + +puts "Enter a maximum number:" +limit = gets + +puts "Enter the first integer for factoring:" +first_int = gets +puts "Enter the name of the first integer:" +first_int_name = gets + +puts "Enter the second integer for factoring:" +second_int = gets +puts "Enter the name of the second integer:" +second_int_name = gets + +puts "Enter the third integer for factoring:" +third_int = gets +puts "Enter the name of the third integer:" +third_int_name = gets + +if (limit && + first_int && + second_int && + third_int && + first_int_name && + second_int_name && + third_int_name) + limit = limit.chomp.to_i + first_int = first_int.chomp.to_i + second_int = second_int.chomp.to_i + third_int = third_int.chomp.to_i + while limit > counter + counter += 1 + if (counter % first_int) == 0 && (counter % second_int) == 0 && (counter % third_int) == 0 + puts first_int_name + second_int_name + third_int_name + elsif (counter % first_int) == 0 && (counter % second_int) == 0 + puts first_int_name + second_int_name + elsif (counter % first_int) == 0 + puts first_int_name + elsif (counter % second_int) == 0 + puts second_int_name + elsif (counter % third_int) == 0 + puts third_int_name + else + puts counter + end + end +else + exit +end diff --git a/Task/General-FizzBuzz/Elixir/general-fizzbuzz.ex b/Task/General-FizzBuzz/Elixir/general-fizzbuzz.elixir similarity index 100% rename from Task/General-FizzBuzz/Elixir/general-fizzbuzz.ex rename to Task/General-FizzBuzz/Elixir/general-fizzbuzz.elixir diff --git a/Task/General-FizzBuzz/Icon/general-fizzbuzz.icon b/Task/General-FizzBuzz/Icon/general-fizzbuzz.icon deleted file mode 100644 index 8122a68d0c..0000000000 --- a/Task/General-FizzBuzz/Icon/general-fizzbuzz.icon +++ /dev/null @@ -1,16 +0,0 @@ -link factors - -procedure main(A) - /A := [20,3,"Fizz",5,"Buzz",7,"Baxx"] - mtable := table() - limit := get(A) - while *A > 0 do mtable[integer(get(A))] := get(A) - mlist := sort([: key(mtable) :]) - - every i := 1 to limit do write((""~== fizzbuzz(i,mlist,mtable))|i) -end - -procedure fizzbuzz(n,a,t) - every (s := "", n%(f := !a) = 0) do s ||:= t[f] - return s -end diff --git a/Task/General-FizzBuzz/Julia/general-fizzbuzz.jl b/Task/General-FizzBuzz/Julia/general-fizzbuzz.julia similarity index 100% rename from Task/General-FizzBuzz/Julia/general-fizzbuzz.jl rename to Task/General-FizzBuzz/Julia/general-fizzbuzz.julia diff --git a/Task/General-FizzBuzz/Kotlin/general-fizzbuzz.kts b/Task/General-FizzBuzz/Kotlin/general-fizzbuzz.kotlin similarity index 100% rename from Task/General-FizzBuzz/Kotlin/general-fizzbuzz.kts rename to Task/General-FizzBuzz/Kotlin/general-fizzbuzz.kotlin diff --git a/Task/General-FizzBuzz/Maxima/general-fizzbuzz.maxima b/Task/General-FizzBuzz/Maxima/general-fizzbuzz.maxima deleted file mode 100644 index 061ce84551..0000000000 --- a/Task/General-FizzBuzz/Maxima/general-fizzbuzz.maxima +++ /dev/null @@ -1,18 +0,0 @@ -srep(n, s) := block( - l: charlist(s), - lrep: map(lambda([c], smake(n, c)), l), - apply(sconcat, lrep) -)$ - -srep_zip(nums, strings) := block( - len: min(length(nums), length(strings)), - makelist(srep(nums[i], strings[i]), i, 1, len) -)$ - -genfizzbuzz(factors, words, n1, n2) := for i from n1 thru n2 do( - flags: map(lambda([k], charfun(mod(i, k)=0)), factors), - if member(1, flags) then sprint(apply(sconcat, srep_zip(flags, words))) else sprint(i), - if mod(i-n1+1, 10)=0 then newline() -)$ - -genfizzbuzz([3, 5, 7], ["Fizz", "Buzz", "Baxx"], 1, 105); diff --git a/Task/General-FizzBuzz/OCaml/general-fizzbuzz.ml b/Task/General-FizzBuzz/OCaml/general-fizzbuzz.ocaml similarity index 100% rename from Task/General-FizzBuzz/OCaml/general-fizzbuzz.ml rename to Task/General-FizzBuzz/OCaml/general-fizzbuzz.ocaml diff --git a/Task/General-FizzBuzz/PascalABC.NET/general-fizzbuzz.pas b/Task/General-FizzBuzz/PascalABC.NET/general-fizzbuzz.pas deleted file mode 100644 index dc3d777a26..0000000000 --- a/Task/General-FizzBuzz/PascalABC.NET/general-fizzbuzz.pas +++ /dev/null @@ -1,14 +0,0 @@ -## -for var i:=1 to 20 do -begin - var s := ''; - if i mod 3 = 0 then - s += 'Fizz'; - if i mod 5 = 0 then - s += 'Buzz'; - if i mod 7 = 0 then - s += 'Baxx'; - if s = '' then - Println(i) - else Println(s); -end diff --git a/Task/General-FizzBuzz/Phix/general-fizzbuzz.phix b/Task/General-FizzBuzz/Phix/general-fizzbuzz.phix index 5eb2ca375f..5ac2a4ea5e 100644 --- a/Task/General-FizzBuzz/Phix/general-fizzbuzz.phix +++ b/Task/General-FizzBuzz/Phix/general-fizzbuzz.phix @@ -1,17 +1,17 @@ -with javascript_semantics - -procedure general_fizz_buzz(integer lim, sequence words, facts) - for i=1 to lim do - string word = "" - for j, f in facts do - if remainder(i,f)=0 then - word &= words[j] - end if - end for - if length(word)=0 then - word = sprintf("%d",i) - end if - printf(1,"%s\n",{word}) - end for -end procedure -general_fizz_buzz(20, {"Fizz","Buzz","Baxx"}, {3,5,7}) +--> + procedure general_fizz_buzz(integer lim, sequence words, facts) + for i=1 to lim do + string word = "" + for j=1 to length(facts) do + if remainder(i,facts[j])=0 then + word &= words[j] + end if + end for + if length(word)=0 then + word = sprintf("%d",i) + end if + printf(1,"%s\n",{word}) + end for + end procedure + general_fizz_buzz(20, {"Fizz","Buzz","Baxx"}, {3,5,7}) + + -- + -- demo\rosetta\Generator_Exponential.exw + -- ====================================== + -- + without js -- tasks + bool terminate = false -atom res -bool terminate = false + atom res -procedure powers(integer p) - integer i = 0 - while not terminate do - res = power(i,p) - task_suspend(task_self()) - task_yield() - i += 1 - end while -end procedure + procedure powers(integer p) + integer i=0 + while not terminate do + res = power(i,p) + task_suspend(task_self()) + task_yield() + i += 1 + end while + end procedure -constant squares = task_create(powers,{2}), - cubes = task_create(powers,{3}) + constant squares = task_create(powers,{2}), + cubes = task_create(powers,{3}) -atom square, cube -task_schedule(cubes,1) -task_yield() -cube = res -sequence snq = {} -for i=1 to 30 do - do - task_schedule(squares,1) - task_yield() - square = res - while cube20 then snq &= square end if -end for -?snq -terminate = 1 -wait_key() + atom square, cube + task_schedule(cubes,1) + task_yield() + cube = res + for i=1 to 30 do + while 1 do + task_schedule(squares,1) + task_yield() + square = res + while cube<square do + task_schedule(cubes,1) + task_yield() + cube = res + end while + if square!=cube then exit end if + end while + if i>20 then + ?square + end if + end for + + terminate = 1 + {} = wait_key() + Get the size of the Main Screen. <--- - CGRect mainScreenFrame = fn ScreenMainFrame - float msh = mainScreenFrame.size.height - CGRect r = fn CGRectMake( 0, 0, 600, int(msh) - 110) - - window 1, @"Go Fish", r - windowcenter(1) - WindowSetBackgroundColor(1,fn ColorBlack) - -end fn - -//--- Start --- - -fn BuildWindow - -fn Intro - -fn InitCards - -str255 AddTheS -bool RequestCard = _false -short v = 0 -short po = 0 -boolean ShowHand = _false -str255 WantsCard - -"Main" - -ShowHand = _false - -str255 RequestedCard - -While ShowHand = _false - text ,,fn colorGreen - Print Chr$(10) + "Points >> "; - text ,,fn colorYellow - print YourName + ": "; - text ,,fn colorGreen - print Points(0); - text ,,fn colorOrange - print " CPU: "; - text ,,fn colorGreen - print Points(1) - text ,,fn colorWhite - Print Chr$(10) + " " + str$(RemainingCards) + " remaining cards" - text ,,fn colorWhite - - - /* - // Uncomment this to see the CPUs cards For testing - Print Chr$(10) + "CPU Cards: "; - For i = 1 To 13 - if Computer(i) <> 0 - For j = 1 To Computer(i) - if Mid$(cards,i,1) = "0" - Print @"10"; " "; - else - Print Mid$(cards,i,1); " "; - end if - Next j - End If - Next i - Print - fn PrintViewScrollToBottom( fn WindowPrintView(1)) - */ - - - Print Chr$(10) + "Your Cards: "; - For i = 1 To 13 - if play(i) <> 0 - For j = 1 To play(i) - if Mid$(cards,i,1) = "0" - Print @"10"; " "; - else - Print Mid$(cards,i,1); " "; - end if - Next j - End If - Next i - Print - fn PrintViewScrollToBottom( fn WindowPrintView(1)) - - RequestCard = _false - - While RequestCard = _false - if fn CheckForEndGame = _True then cls:fn InitCards:goto "Loop" - - Someone = YourName - - CFStringRef UserInput = 0 - "InputCard" - UserInput = input % (20, fn WhatCardInputHeight),@"What card do you want? " - if ( UserInput == NULL ) then "InputCard" // Rich added this 5/1/24 - fn CFStringGetPascalString (UserInput, @RequestedCard, 256, _kCFStringEncodingMacRoman) - if RequestedCard = "10" then RequestedCard = "0"// card zero is a 10 - text ,,fn ColorYellow - Print - - WantsCard = RequestedCard - - if WantsCard = "j" || WantsCard = "J" then WantsCard = "Jack" - if WantsCard = "q" || WantsCard = "Q" then WantsCard = "Queen" - if WantsCard = "k" || WantsCard = "K" then WantsCard = "King" - if WantsCard = "a" || WantsCard = "A" then WantsCard = "Ace" - if WantsCard = "0" then WantsCard = "10" - - print "-------------------------------------" - print - str255 AorAn - AorAn = "a" - if WantsCard = "Ace" then AorAn = "an" - print YourName + " asked For " + AorAn + " " + WantsCard - print - text ,,fn ColorWhite - - fn PrintViewScrollToBottom( fn WindowPrintView(1)) - - if RequestedCard = "X" || RequestedCard = "x" then fn QuitOrResumeAlert(@"EXIT") - - If RequestedCard <> "" Then CardNumber = Instr$(1,cards, Ucase$(RequestedCard)): RequestCard = _true - - If CardNumber = 0 - text,,fn ColorRed - Print "Sorry, that is not a valid card.": RequestCard = _false - print - fn PrintViewScrollToBottom( fn WindowPrintView(1)) - Else if play(CardNumber) = 0 Then text ,,fn colorRed: Print "You don//t have that card!": text ,,fn colorRed: RequestCard = _false - fn PrintViewScrollToBottom( fn WindowPrintView(1)) - text,,fn ColorWhite - - End If - - Wend - - guess(CardNumber) = 1 - - If Computer(CardNumber) = 0 - Print Someone + ","; - text ,,fn colorRed - Print " Go fish!" - text ,,fn colorWhite - Print Someone + " got a";: fn youGoFishing - print - fn CheckForCompletedBook - ShowHand = _true - Else - v = Computer(CardNumber) - Computer(CardNumber) = 0 - play(CardNumber) += v - if v > 1 then AddTheS = "s" else AddTheS = "" - Print Someone + " got" + str$(v) + " card" + AddTheS - fn CheckForCompletedBook - fn PrintViewScrollToBottom( fn WindowPrintView(1)) - ShowHand = _false - End If - -Wend - - - -Someone = "CPU" -For i = 1 To 13 - asked(i) = 0 -Next i - -bool CPUsTurn = _false - -While CPUsTurn = _false - if fn CheckForEndGame = _True then cls:fn InitCards:goto "Loop" - - po = 0 - For i = 1 To 13 - If (Computer(i) > 0) && (guess(i) > 0) Then poss(i) = 1: po += 1 - Next i - - short whilecounter - WhileCounter = 0 - - - If po = 0 - // this k is the go fish card. - - k = rnd(12) +1 - while Computer(k) = 0 || asked(k) - whilecounter ++ - k = rnd(12) +1 - if WhileCounter > 100 then k = 0: exit while //5/5/24 Rich added this to prevent hangs - wend - - Else - - k = rnd(12) + 1 - while poss(k) = 0 - k = rnd(12) + 1 - if WhileCounter > 100 then k = 0: exit while //5/5/24 Rich added this to prevent hangs - wend - - guess(k) = 0 - asked(k) = 1 - - end if - - - if k = 0 then "Loop" //5/5/24 Rich added this to prevent hangs - - WantsCard = fn CheckForFaceCard(k) - - if WantsCard = "j" || WantsCard = "J" then WantsCard = "Jack" - if WantsCard = "q" || WantsCard = "Q" then WantsCard = "Queen" - if WantsCard = "k" || WantsCard = "K" then WantsCard = "King" - if WantsCard = "a" || WantsCard = "A" then WantsCard = "Ace" - if WantsCard = "0" then WantsCard = "10" - - text ,,fn ColorOrange - - print "-------------------------------------" - - - - Print:Print Someone + " wants your " + wantsCard + "'s." - print - - text ,,fn ColorWhite - - asked(k) = 1 - - - If play(k) = 0 - Print Someone + ", "; - text ,,fn colorRed: Print "go fish!" - text ,,fn colorWhite:Print Someone + " got";: fn cpuGoFishing - - fn CheckCPUForCompletedBook - CPUsTurn = _true - - Else - - v = play(k) - play(k) = 0 - Computer(k) += v - if v > 1 then AddTheS = "s" else AddTheS = "" - Print Someone + " got" + str$(v) + " card" + AddTheS - fn CheckCPUForCompletedBook - CPUsTurn = _false - End If - - -Wend - -"Loop" -goto "Main" - -handleevents diff --git a/Task/Go-Fish/Rebol/go-fish.rebol b/Task/Go-Fish/Rebol/go-fish.rebol deleted file mode 100644 index c310b23444..0000000000 --- a/Task/Go-Fish/Rebol/go-fish.rebol +++ /dev/null @@ -1,217 +0,0 @@ -Rebol [ - title: "Rosetta code: Go Fish" - file: %Go_fish.r3 - url: https://rosettacode.org/wiki/Go_Fish -] - -go-fish-game: function/with [ - "Play a game of Go Fish" -][ - deck: fisher-yates-shuffle copy ordered-deck - clear ai-hand clear ai-book-list clear ai-guess - clear my-hand clear my-book-list - ai-books: my-books: 0 - deal-cards/ai 9 ai-hand - deal-cards 9 my-hand - message: clear "" - draw-screen - while [ai-books + my-books < 13][ - computer-turn - if ai-books + my-books < 13 [player-turn] - ] - clear-screen - draw-screen - print "" - print as-yellow "GAME OVER" - print ["^/Computer books:" as-red pad ai-books -3 - "^/Player books:" as-green pad my-books -3] -][ - ;; Build deck - ordered-deck: [] - foreach r ranks: "A23456789TJQK" [ - foreach s "♣♦♥♠" [ - append ordered-deck ajoin [r s] - ] - ] - ;; Charsets used to filter key inputs - player-card-keys: charset join ranks "x" - player-yes-no: charset "ynx" - - ;; Game states - ai-hand: [] ai-book-list: [] ai-guess: [] - my-hand: [] my-book-list: [] - deck: [] - ai-books: my-books: 0 - - - message: "" - - ;; Shuffle function - fisher-yates-shuffle: func [list [block!] /local len j] [ - len: length? list - repeat i len [ - j: i + random (len - i) - swap at list i at list j - ] - list - ] - ;; Cards sorting - rank-modifiers: #[ - #"A" 130 #"K" 120 #"Q" 110 #"J" 100 #"T" 90 - #"9" 80 #"8" 70 #"7" 60 #"6" 50 #"5" 40 - #"4" 30 #"3" 20 #"2" 10 - ] - card-rank: func [card] [rank-modifiers/(card/1)] - sort-hand: func [hand] [ - sort/compare hand func [a b] [ - (card-rank a) < (card-rank b) - ] - ] - ;; Screen output - clear-screen: does [prin "^[[2J^[[H"] - draw-screen: does [ - clear-screen - ;; title bar - print as-yellow "==================================" - print as-yellow " G O F I S H " - print as-yellow "==================================" - print "" - ;; deck count - print ajoin [as-cyan " Deck: " length? deck " cards remaining"] - print "" - ;; books lines - print ajoin [as-red " Computer books: " pad ai-books -2 " [ " ai-book-list " ]"] - print ajoin [as-green " Your books: " pad my-books -2 " [ " my-book-list " ]"] - print as-yellow "----------------------------------" - print "" - ;; my hand - print [as-cyan "Your hand:" as-yellow sort-hand my-hand] - print "" - ;; last message - unless empty? message [ print message ] - print as-yellow "----------------------------------" - ] - status: func[txt][ - if block? txt [txt: ajoin txt] - append append message txt LF - ] - ;; Game functions - deal-cards: function [num hand /ai] [ - new: take/part deck num - unless ai [ - status ["You draw new card" if num > 1 ["s"] ": " new] - ] - append hand new - ] - find-in: func [hand kind [char!]] [ - forall hand [ - if hand/1/1 = kind [return kind] - ] - none - ] - guess-from: function [hand guessed] [ - kind: first random/only exclude hand guessed - append guessed kind - kind - ] - check-for-books: func [hand /ai /local kind n count] [ - if empty? hand [exit] - sort hand - kind: hand/1/1 n: count: 0 - while [not tail? hand][ - either kind = hand/1/1 [ - n: n + 1 - if n = 4 [ - remove/part next hand -4 - ++ count - append either ai [ai-book-list][my-book-list] kind - if tail? hand [break] - kind: hand/1/1 n: 0 - continue - ] - ][ - kind: hand/1/1 - n: 1 - ] - ++ hand - ] - either ai [ - ai-books: ai-books + count - ][ my-books: my-books + count] - if count > 0 [ - status ["New " as-green count " book" if count > 1 "s" " collected!"] - ] - count - ] - transfer-cards: func [ - ;; Move all cards of a given rank from src to trg - src [block!] trg [block!] kind [char!] - ][ - while [not tail? src] [ - either kind = src/1/1 [append trg take src][++ src] - ] - ] - computer-turn: func [/local kind a] [ - forever [ - if empty? ai-hand [ - if empty? deck [exit] - deal-cards/ai 3 ai-hand - ] - ai-guess: unique ai-guess - kind: guess-from ai-hand ai-guess - draw-screen - print as-red { -------------------^/ - COMPUTER TURN -^/ -------------------} - clear message - prin ajoin [" Do you have any " as-green kind "s? "] - a: wait-for-key/only player-yes-no - if any [none? a a = #"x"][ halt ] - either a = #"y" [ - transfer-cards my-hand ai-hand kind - status ["Computer took your " as-green kind "s!"] - check-for-books/ai ai-hand - draw-screen - ][ - status ["Go Fish! Computer draws a card."] - deal-cards/ai 1 ai-hand - check-for-books/ai ai-hand - draw-screen - exit - ] - ] - ] - - player-turn: func [/local kind n] [ - forever [ - if empty? my-hand [ - if empty? deck [exit] - deal-cards 3 my-hand - ] - draw-screen - print as-green { -------------------^/ - PLAYER TURN -^/ -------------------} - clear message - prin " Your guess: " - kind: wait-for-key/only player-card-keys - if any [none? kind kind = #"x"][ halt ] - kind: uppercase kind - unless find-in my-hand kind [ - status as-red "You must hold that rank to ask for it!" - draw-screen - exit - ] - either find-in ai-hand kind [ - transfer-cards ai-hand my-hand kind - status ["You took the computer's " as-green kind "s!"] - check-for-books my-hand - draw-screen - ][ - status ["Computer don't have any " as-green kind "s!"] - deal-cards 1 my-hand - check-for-books my-hand - draw-screen - exit - ] - ] - ] -] -;--- Main --- -go-fish-game diff --git a/Task/Goldbachs-comet/Agena/goldbachs-comet.agena b/Task/Goldbachs-comet/Agena/goldbachs-comet.agena deleted file mode 100644 index 5e498f40b6..0000000000 --- a/Task/Goldbachs-comet/Agena/goldbachs-comet.agena +++ /dev/null @@ -1,22 +0,0 @@ -scope # Goldbach's comet, translation of Pluto - - local proc goldbach( n :: number ) :: number - local count := 0; - for i to n \ 2 do - if numtheory.isprime( i ) and numtheory.isprime( n - i ) then - count +:= 1 - fi - od - return count - end; - - print( "The first 100 G numbers:" ) - print( join( foreach( 1, 100, << n -> strings.format( "%2d" & if n mod 10 = 0 then "\n" else " " fi - , goldbach( 2 + n * 2 ) - ) - >> - ) - ) - ); - printf( "G(1000000) = %.0f\n", goldbach( 1_000_000 ) ) -end diff --git a/Task/Goldbachs-comet/Arturo/goldbachs-comet.arturo b/Task/Goldbachs-comet/Arturo/goldbachs-comet.arturo index e7bfa7ec91..5930a6e9da 100644 --- a/Task/Goldbachs-comet/Arturo/goldbachs-comet.arturo +++ b/Task/Goldbachs-comet/Arturo/goldbachs-comet.arturo @@ -13,4 +13,6 @@ print ["\nG(1000000) =" G 1000000] csv: join.with:",\n" map select 4..2000 => even? 'x -> ~"|x|, |G x|" -csv >> "comet.csv" +; write the CSV data to a file which we can then visualize +; via our preferred spreadsheet app +write "comet.csv" csv diff --git a/Task/Goldbachs-comet/Delphi/goldbachs-comet.pas b/Task/Goldbachs-comet/Delphi/goldbachs-comet.delphi similarity index 100% rename from Task/Goldbachs-comet/Delphi/goldbachs-comet.pas rename to Task/Goldbachs-comet/Delphi/goldbachs-comet.delphi diff --git a/Task/Goldbachs-comet/EasyLang/goldbachs-comet.easy b/Task/Goldbachs-comet/EasyLang/goldbachs-comet.easy index 1a4a2b23d6..666e90ef38 100644 --- a/Task/Goldbachs-comet/EasyLang/goldbachs-comet.easy +++ b/Task/Goldbachs-comet/EasyLang/goldbachs-comet.easy @@ -1,22 +1,30 @@ func isprim n . - if n mod 2 = 0 and n > 2 : return 0 + if n mod 2 = 0 and n > 2 + return 0 + . i = 3 sq = sqrt n while i <= sq - if n mod i = 0 : return 0 + if n mod i = 0 + return 0 + . i += 2 . return 1 . func goldbach n . for i = 2 to n div 2 - if isprim i = 1 : cnt += isprim (n - i) + if isprim i = 1 + cnt += isprim (n - i) + . . return cnt . -numfmt 3 0 +numfmt 0 3 for n = 4 step 2 to 202 write goldbach n - if n mod 20 = 2 : print "" + if n mod 20 = 2 + print "" + . . print goldbach 1000000 diff --git a/Task/Goldbachs-comet/Fennel/goldbachs-comet.fennel b/Task/Goldbachs-comet/Fennel/goldbachs-comet.fennel deleted file mode 100644 index 0fbbb9715e..0000000000 --- a/Task/Goldbachs-comet/Fennel/goldbachs-comet.fennel +++ /dev/null @@ -1,49 +0,0 @@ -(do ;;; Goldbach's comet - translated from the Lua sample - - (fn range [from to] ; generate a table containing the integers [from .. to] - (local t {}) - (for [i from to] - (tset t i i) - ) - t - ) - - (fn is-prime [p] - (if (or (<= p 1) (= 0 (% p 2))) - (= p 2) - ;else - (do (var (prime i root-p) (values true 3 (math.floor (math.sqrt p)))) - (while (and (<= i root-p) prime) - (set (prime i) (values (not= 0 (% p i)) (+ i 1))) - ) - prime - ) - ) - ) - - (fn goldbach [n] - (var count 0) - (for [i 1 (math.floor (/ n 2))] - (when (and (is-prime i) (is-prime (- n i))) - (set count (+ count 1)) - ) - ) - count - ) - - (print "The first 100 G numbers:") - (print (table.concat (icollect [_ v (ipairs (range 1 100))] - (string.format (.. "%2d" (if (= 0 (% v 10)) - "\n" - ;else - " " - ) - ) - (goldbach (+ 2 (* v 2))) - ) - ) - "" - ) - ) - (print (.. "G(1000000) = " (goldbach 1_000_000))) -) diff --git a/Task/Goldbachs-comet/Gambas/goldbachs-comet-2.gambas b/Task/Goldbachs-comet/Gambas/goldbachs-comet-2.gambas index 827e0b16a0..6a74789be6 100644 --- a/Task/Goldbachs-comet/Gambas/goldbachs-comet-2.gambas +++ b/Task/Goldbachs-comet/Gambas/goldbachs-comet-2.gambas @@ -19,10 +19,10 @@ FOR I = 1 TO MAX_G G[I] = 0: NEXT G[4] = 1 ' 4 is the only sum of 2 even primes FOR I = 3 TO HALF_MAX_G STEP 2 IF P[I] THEN - INC G[I + I] - FOR J = I + 2 TO MAX_G - I + INC G[I + 1] + FOR J = I + 2 TO MAX_G - 1 IF P[J] THEN - INC G[I + J] + INC G[I + 1] ENDIF NEXT ENDIF @@ -41,7 +41,7 @@ FOR I = 3 TO MAX_P DIV 2 STEP 2 NEXT PRINT FORMAT$("G(%D): ", MAX_P); GM FOR I = 2 TO MAX_G - 10 STEP 10 - FOR J = I TO I + 8 STEP 2 + FOR J = 1 TO I + 8 STEP 2 GPSET I DIV 10, 240-G[J],RGB(255,255,255) NEXT NEXT diff --git a/Task/Goldbachs-comet/Go/goldbachs-comet.go b/Task/Goldbachs-comet/Go/goldbachs-comet.go deleted file mode 100644 index 4c8b45dc6c..0000000000 --- a/Task/Goldbachs-comet/Go/goldbachs-comet.go +++ /dev/null @@ -1,63 +0,0 @@ -package main - -import ( - "fmt" - "math" -) - -var primes []bool - -func initialisePrimes(limit int) { - primes = make([]bool, limit) - for i := 2; i < limit; i++ { - primes[i] = true - } - - sqrtLimit := int(math.Sqrt(float64(limit))) - for n := 2; n < sqrtLimit; n++ { - if primes[n] { - for k := n * n; k < limit; k += n { - primes[k] = false - } - } - } -} - -func goldbachFunction(number int) (int, error) { - if number <= 2 || number%2 == 1 { - return 0, fmt.Errorf("argument must be even and greater than 2: %d", number) - } - - result := 0 - for i := 1; i <= number/2; i++ { - if primes[i] && primes[number-i] { - result++ - } - } - return result, nil -} - -func main() { - initialisePrimes(2000000) - - fmt.Println("The first 100 Goldbach numbers:") - for n := 2; n < 102; n++ { - value, err := goldbachFunction(2 * n) - if err != nil { - fmt.Printf("Error: %v\n", err) - continue - } - fmt.Printf("%3d", value) - if n%10 == 1 { - fmt.Println() - } - } - - fmt.Println("\nThe 1,000,000th Goldbach number =", func() string { - value, err := goldbachFunction(1000000) - if err != nil { - return fmt.Sprintf("Error: %v", err) - } - return fmt.Sprintf("%d", value) - }()) -} diff --git a/Task/Goldbachs-comet/Julia/goldbachs-comet.jl b/Task/Goldbachs-comet/Julia/goldbachs-comet.julia similarity index 100% rename from Task/Goldbachs-comet/Julia/goldbachs-comet.jl rename to Task/Goldbachs-comet/Julia/goldbachs-comet.julia diff --git a/Task/Goldbachs-comet/Lua/goldbachs-comet.lua b/Task/Goldbachs-comet/Lua/goldbachs-comet.lua index 41e61a815e..85a60e5015 100644 --- a/Task/Goldbachs-comet/Lua/goldbachs-comet.lua +++ b/Task/Goldbachs-comet/Lua/goldbachs-comet.lua @@ -1,6 +1,7 @@ function T(t) return setmetatable(t, {__index=table}) end table.range = function(t,n) local s=T{} for i=1,n do s[i]=i end return s end table.map = function(t,f) local s=T{} for i=1,#t do s[i]=f(t[i]) end return s end +table.batch = function(t,n,f) for i=1,#t,n do local s=T{} for j=1,n do s[j]=t[i+j-1] end f(s) end return t end function isprime(n) if n < 2 then return false end @@ -23,7 +24,6 @@ function goldbach(n) end print("The first 100 G numbers:") -print(T{}:range(100) - :map(function(n) return string.format("%2d"..(n % 10 == 0 and "\n" or " "),goldbach(2+n*2)) end) - :concat("")) +g = T{}:range(100):map(function(n) return goldbach(2+n*2) end) +g:map(function(n) return string.format("%2d ",n) end):batch(10,function(t) print(t:concat()) end) print("G(1000000) = "..goldbach(1000000)) diff --git a/Task/Goldbachs-comet/PascalABC.NET/goldbachs-comet.pas b/Task/Goldbachs-comet/PascalABC.NET/goldbachs-comet.pas deleted file mode 100644 index 234717b9bc..0000000000 --- a/Task/Goldbachs-comet/PascalABC.NET/goldbachs-comet.pas +++ /dev/null @@ -1,36 +0,0 @@ -uses GraphWPF; - -const colpick = (Colors.Red, Colors.Green, Colors.Blue); - -function IsPrime(x: longword): boolean; -begin - var i := 2; - while (i * i <= x) and (x mod i <> 0) do - i += 1; - Result := i * i > x; -end; - -function g(n: integer): integer; -begin - assert((n > 2) and (n mod 2 = 0), '“n” must be even and greater than 2.'); - for var i := 2 to (n div 2) do - if isPrime(i) and isPrime(n - i) then - result += 1; -end; - -begin - println('First 100 G numbers:'); - foreach var n in (2..101) index i do - begin - write(g( 2 * n):3); - if (i + 1) mod 10 = 0 then writeln; - end; - println; - println('G(1_000_000) =', g(1_000_000)); - - setMathematicCoords(0, 4000, 0, false); - foreach var x in range(4, 4002, 2) do - begin - fillcircle(x, g(x)*15, 10, colpick[(x div 2) mod 3]); - end; -end. diff --git a/Task/Goldbachs-comet/Pluto/goldbachs-comet-1.pluto b/Task/Goldbachs-comet/Pluto/goldbachs-comet-1.pluto deleted file mode 100644 index 8d53f40164..0000000000 --- a/Task/Goldbachs-comet/Pluto/goldbachs-comet-1.pluto +++ /dev/null @@ -1,23 +0,0 @@ -do -- Goldbach's comet, translation of Lua - - local int = require( "int" ) -- RC Pluto integer library, inc. prime utilities - - local function goldbach( n : number ) : number - local count = 0 - for i = 1, n // 2 do - if int.isprime( i ) and int.isprime( n - i ) then - ++ count - end - end - return count - end - - print( "The first 100 G numbers:" ) - print( range( 100 ):map( | n | -> string.format( "%2d"..if n % 10 == 0 then "\n" else " " end - , goldbach( 2 + n * 2 ) - ) - ) - :concat( "" ) - ) - print( $"G(1000000) = { goldbach( 1_000_000 ) }" ) -end diff --git a/Task/Goldbachs-comet/Pluto/goldbachs-comet-2.pluto b/Task/Goldbachs-comet/Pluto/goldbachs-comet-2.pluto deleted file mode 100644 index 8f93744a60..0000000000 --- a/Task/Goldbachs-comet/Pluto/goldbachs-comet-2.pluto +++ /dev/null @@ -1,69 +0,0 @@ -do -- create a bitmap of Goldbach's Comet - - local int = require( "int" ) -- RC Pluto integer library, inc. prime utilities - require( "bitmap" ) -- RC bitmap library - - local bmp = bitmap.of( 400, 240, color.black, "Goldbachs_comet_Pluto" ) - - local maxG , maxP = 4000, 1_000_000 - local rootMaxP , halfMaxG = math.floor( math.sqrt( maxP ) ), maxG // 2 - - local prime = int.arecomps( maxP ):map( | v | -> not v ) -- sieve the primes to maxP - - local G = {} -- construct a table of G numbers - for i = 1, maxG do G[ i ] = 0 end - G[ 4 ] = 1 -- 4 is the only sum of 2 even primes - for i = 3, halfMaxG, 2 do - if prime[ i ] then - G[ i + i ] += 1 - for j = i + 2, maxG - i do - if prime[ j ] then - G[ i + j ] += 1 - end - end - end - end - -- print the first few G numbers to the bitmap - 8x8 charaxters - local c, tx, ty = 0, 2, 2 - for i = 4, 202, 2 do - c += 1 - bmp:text( string.format( "%3d", G[ i ] ), tx, ty, color.white, 1 ) - if c % 10 != 0 then - tx += 24 - else - tx, ty = 2, ty + 10 - end - end - local Gm = 0 - for i = 3, maxP // 2, 2 do - if prime[ i ] then - if prime[ maxP - i ] then Gm += 1 end - end - end - -- print G(1_000_000) to the bitmap - bmp:text( string.format( "G(%d): %d", maxP, Gm ), 2, ty + 10, color.white, 1 ) - for i = 2, maxG - 10, 10 do - local maxY = 0 - local x = i // 10 - for j = i, i + 8, 2 do - if G[ j ] > 0 then - local y = 240 - G[ j ] - bmp:set( x, y, switch bmp:get( x, y ) do - case color.black -> color.orange - case color.orange -> color.yellow - default -> color.white - end - ) - if y > maxY then maxY = y end - end - end - -- we're going to save it as a png, so convert from BGR to RGb - for j = 1, maxY do - local bgr = bmp:get( x, j ) - if bgr != color.black then - bmp:set( x, j, bmp.flipColor( bgr ) ) - end - end - end - bmp:view( true ) -end diff --git a/Task/Goldbachs-comet/REXX/goldbachs-comet.rexx b/Task/Goldbachs-comet/REXX/goldbachs-comet.rexx deleted file mode 100644 index 4d7666fda3..0000000000 --- a/Task/Goldbachs-comet/REXX/goldbachs-comet.rexx +++ /dev/null @@ -1,58 +0,0 @@ --- 23 Aug 2025 -include Setting - -say 'GOLDBACH''S COMET' -say version -say -numeric digits 7 -call GetPrimes -call ShowFirst100 -call ShowMillion -exit - -GetPrimes: -procedure expose prim. flag. -call Time('r') -say 'Collect Primes up to 1000000...' -call Primes(1e6) -say Time('e')/1 'seconds' -say -return - -ShowFirst100: -procedure expose prim. flag. -call Time('r') -say 'First 100 values...' -do i = 4 by 2 to 202 - call Charout ,Right(Goldbach(i),3) - if i//20 = 2 then - say -end -say Time('e')/1 'seconds' -say -return - -ShowMillion: -procedure expose prim. flag. -call Time('r') -say 'g(1000000)...' -say Goldbach(1e6) -say Time('e')/1 'seconds' -say -return - -Goldbach: -procedure expose prim. flag. -arg x -y = 0 -do i = 2 to x%2 - if flag.i then do - j = x-i - if flag.j then do - y = y+1 - end - end -end -return y/1 - -include Math diff --git a/Task/Goldbachs-comet/Rust/goldbachs-comet.rs b/Task/Goldbachs-comet/Rust/goldbachs-comet.rust similarity index 100% rename from Task/Goldbachs-comet/Rust/goldbachs-comet.rs rename to Task/Goldbachs-comet/Rust/goldbachs-comet.rust diff --git a/Task/Golden-ratio-Convergence/Ada/golden-ratio-convergence.adb b/Task/Golden-ratio-Convergence/Ada/golden-ratio-convergence.ada similarity index 100% rename from Task/Golden-ratio-Convergence/Ada/golden-ratio-convergence.adb rename to Task/Golden-ratio-Convergence/Ada/golden-ratio-convergence.ada diff --git a/Task/Golden-ratio-Convergence/COBOL/golden-ratio-convergence.cob b/Task/Golden-ratio-Convergence/COBOL/golden-ratio-convergence.cobol similarity index 100% rename from Task/Golden-ratio-Convergence/COBOL/golden-ratio-convergence.cob rename to Task/Golden-ratio-Convergence/COBOL/golden-ratio-convergence.cobol diff --git a/Task/Golden-ratio-Convergence/DuckDB/golden-ratio-convergence.duckdb b/Task/Golden-ratio-Convergence/DuckDB/golden-ratio-convergence.duckdb deleted file mode 100644 index 0e9e393bfe..0000000000 --- a/Task/Golden-ratio-Convergence/DuckDB/golden-ratio-convergence.duckdb +++ /dev/null @@ -1,24 +0,0 @@ -set variable phi = (1 + sqrt(5)) / 2; - -# Output: one row (iterations, phi) -# This should work even with epsilon = 0 -create or replace function compute_phi(epsilon) as table ( - with recursive cte as ( - select 2.0::DOUBLE as oldPhi, 1::DOUBLE as phi, 0 as iterations - union all - select phi as oldPhi, - 1 + (1 / phi) as phi, - iterations + 1 as iterations - from cte - where @(phi - oldPhi) > epsilon - ) - select last(iterations order by iterations) as iterations, - last(phi order by iterations) as phi - from cte -); - -select epsilon, - iterations, - phi as "final value", - @(phi - getvariable('phi')) as "approximate absolute error" - from (select unnest([1e-5, 0]) as epsilon), compute_phi(epsilon); diff --git a/Task/Golden-ratio-Convergence/EasyLang/golden-ratio-convergence.easy b/Task/Golden-ratio-Convergence/EasyLang/golden-ratio-convergence.easy index c5d55953a8..66bf65792e 100644 --- a/Task/Golden-ratio-Convergence/EasyLang/golden-ratio-convergence.easy +++ b/Task/Golden-ratio-Convergence/EasyLang/golden-ratio-convergence.easy @@ -5,7 +5,7 @@ repeat phi0 = phi iter += 1 . -numfmt 0 10 +numfmt 10 0 print "Iterations: " & iter print "Result: " & phi print "Error: " & phi - (1 + sqrt 5) / 2 diff --git a/Task/Golden-ratio-Convergence/FutureBasic/golden-ratio-convergence.basic b/Task/Golden-ratio-Convergence/FutureBasic/golden-ratio-convergence.basic deleted file mode 100644 index 250ef6e2b2..0000000000 --- a/Task/Golden-ratio-Convergence/FutureBasic/golden-ratio-convergence.basic +++ /dev/null @@ -1,21 +0,0 @@ -include "NSLog.incl" - -void local fn Iterate - double oldPhi = 1.0, phi = 1.0, limit = 1e-5 - int iters = 0 - while (YES) - phi = 1.0 + 1.0 / oldPhi - iters++ - if ( abs( phi - oldPhi ) <= limit ) then break - oldPhi = phi - wend - NSLog( @"Final value of phi: %16.14f", phi ) - double actualPhi = ( 1.0 + fn sqrt(5.0) ) / 2.0 - NSLog( @"Actual value of phi: %16.14f", actualPhi ) - NSLog( @"Error (approx): %16.14f", phi - actualPhi ) - NSLog( @"Number of iterations: %d", iters ) -end fn - -fn Iterate - -HandleEvents diff --git a/Task/Golden-ratio-Convergence/Julia/golden-ratio-convergence.jl b/Task/Golden-ratio-Convergence/Julia/golden-ratio-convergence.julia similarity index 100% rename from Task/Golden-ratio-Convergence/Julia/golden-ratio-convergence.jl rename to Task/Golden-ratio-Convergence/Julia/golden-ratio-convergence.julia diff --git a/Task/Golden-ratio-Convergence/Oberon/golden-ratio-convergence.oberon b/Task/Golden-ratio-Convergence/Oberon/golden-ratio-convergence.oberon deleted file mode 100644 index 041dac37f4..0000000000 --- a/Task/Golden-ratio-Convergence/Oberon/golden-ratio-convergence.oberon +++ /dev/null @@ -1,24 +0,0 @@ -MODULE GoldenRatioCnv; (* calculate the Golden Ratio and show the number of iterations required *) - IMPORT Math, Out; - - VAR count : INTEGER; - phi0, phi1, diff : REAL; - -BEGIN - - count := 0; - phi0 := 1.0; - diff := 1.0E20; - - WHILE 1.0E-5 < diff DO - phi1 := 1.0 + ( 1.0 / phi0 ); - diff := ABS( phi1 - phi0 ); - phi0 := phi1; - INC( count ) - END; - - Out.String( "Result:" );Out.Real( phi0, 10 ); - Out.String( " after " );Out.Int( count, 0 );Out.String( " iterations" );Out.Ln; - Out.String( "The error is approximately " );Out.Real( phi0 - ( 0.5 * ( 1.0 + Math.sqrt( 5.0 ) ) ), 10 );Out.Ln - -END GoldenRatioCnv. diff --git a/Task/Golden-ratio-Convergence/PascalABC.NET/golden-ratio-convergence.pas b/Task/Golden-ratio-Convergence/PascalABC.NET/golden-ratio-convergence.pas deleted file mode 100644 index ab76ee0240..0000000000 --- a/Task/Golden-ratio-Convergence/PascalABC.NET/golden-ratio-convergence.pas +++ /dev/null @@ -1,17 +0,0 @@ -begin - var phi := 1.0; - var phiprev := 0.0; - var n := 0; - var err := 0.0; - while True do - begin - n += 1; - phi := 1 + 1/phi; - err := Abs(phi - phiprev); - if err <= 1e-5 then - break; - phiprev := phi; - end; - Println($'Result = {phi} after {n} iterations'); - Println($'The error is approximately = {phi - (1+sqrt(5)) / 2}'); -end. diff --git a/Task/Golden-ratio-Convergence/Phix/golden-ratio-convergence.phix b/Task/Golden-ratio-Convergence/Phix/golden-ratio-convergence.phix index 4ec55e1c3f..48bad6392b 100644 --- a/Task/Golden-ratio-Convergence/Phix/golden-ratio-convergence.phix +++ b/Task/Golden-ratio-Convergence/Phix/golden-ratio-convergence.phix @@ -1,9 +1,11 @@ -with javascript_semantics -atom Phi = 1, iter = 0 -do - atom Pi = Phi - Phi = 1+1/Phi - iter += 1 -until abs(Phi-Pi)<1e-5 -printf(1,"Result: %.14f after %d iterations\n",{Phi,iter}) -printf(1,"Error: %.14f\n",{Phi-(1+sqrt(5))/2}) +(phixonline)--> + with javascript_semantics + atom Phi = 1, iter = 0 + do + atom Pi = Phi + Phi = 1+1/Phi + iter += 1 + until abs(Phi-Pi)<1e-5 + printf(1,"Result: %.14f after %d iterations\n",{Phi,iter}) + printf(1,"Error: %.14f\n",{Phi-(1+sqrt(5))/2}) + "; i; print Bin(i,5); " --> "; diff --git a/Task/Gray-code/Frink/gray-code.frink b/Task/Gray-code/Frink/gray-code.frink index 2d456adfa7..a145daca00 100644 --- a/Task/Gray-code/Frink/gray-code.frink +++ b/Task/Gray-code/Frink/gray-code.frink @@ -2,7 +2,5 @@ for i=0 to 31 { gray = binaryToGray[i] back = grayToBinary[gray] - println[pad[i->binary] + "\t" + pad[gray->binary] + "\t" + pad[back->binary]] + println[(i->binary) + "\t" + (gray->binary) + "\t" + (back->binary)] } - -pad[x] := padLeft[x,5,"0"] diff --git a/Task/Gray-code/FutureBasic/gray-code.basic b/Task/Gray-code/FutureBasic/gray-code.basic deleted file mode 100644 index 9bb50c362a..0000000000 --- a/Task/Gray-code/FutureBasic/gray-code.basic +++ /dev/null @@ -1,31 +0,0 @@ -// Gray Code -//https://rosettacode.org/wiki/Gray_code - -local fn gray2bin(g As uint32) As uint32 - uint32 b = g - While g - g = g >> 1 - b = b Xor g - Wend - Return b -End fn = b - -local fn bin2gray(b As uint32) As uint32 -End fn = b Xor (b >> 1) - -// ------=< MAIN >=------ - -uint32 i -Print " DEC Binary Gray GrayToBinary" - -For i = 0 To 31 - print str$(i) + " "; - if i < 10 then print " "; - print " " + right$(bin$(i),5); - print " -->"; - print " " + right$(bin$(fn bin2gray(i)),5); - print " -->"; - print " " + right$(bin$(fn gray2bin(fn bin2gray(i))),5) -Next - -handleevents diff --git a/Task/Gray-code/Julia/gray-code.jl b/Task/Gray-code/Julia/gray-code.julia similarity index 100% rename from Task/Gray-code/Julia/gray-code.jl rename to Task/Gray-code/Julia/gray-code.julia diff --git a/Task/Gray-code/Kotlin/gray-code.kts b/Task/Gray-code/Kotlin/gray-code.kotlin similarity index 100% rename from Task/Gray-code/Kotlin/gray-code.kts rename to Task/Gray-code/Kotlin/gray-code.kotlin diff --git a/Task/Gray-code/Liberty-BASIC/gray-code.basic b/Task/Gray-code/Liberty-BASIC/gray-code.basic index 44f2129ea9..14888831e6 100644 --- a/Task/Gray-code/Liberty-BASIC/gray-code.basic +++ b/Task/Gray-code/Liberty-BASIC/gray-code.basic @@ -7,6 +7,7 @@ B$ =Gray2Bin$( G$) print B$; " in pure binary." next r + end function Bin2Gray$( bin$) ' Given a binary number as a string, returns Gray code as a string. diff --git a/Task/Gray-code/Modula-2/gray-code.mod2 b/Task/Gray-code/Modula-2/gray-code.mod2 deleted file mode 100644 index 135aaa93e7..0000000000 --- a/Task/Gray-code/Modula-2/gray-code.mod2 +++ /dev/null @@ -1,57 +0,0 @@ -MODULE GrayCode; - -FROM STextIO IMPORT - WriteString, WriteLn; -FROM SWholeIO IMPORT - WriteInt; -FROM Conversions IMPORT - LongBaseToStr; -FROM FormatString IMPORT - FormatString; (* for justifying *) - -VAR - I, G, D: CARDINAL; - Ok: BOOLEAN; - BinS, OutBinS: ARRAY[0 .. 5] OF CHAR; - -PROCEDURE Encode(V: CARDINAL): CARDINAL; -BEGIN - RETURN V BXOR (V SHR 1) -END Encode; - -PROCEDURE Decode(V: CARDINAL): CARDINAL; -VAR - Result: CARDINAL; -BEGIN - Result := 0; - WHILE V > 0 DO - Result := Result BXOR V; - V := V SHR 1 - END; - RETURN Result -END Decode; - -BEGIN - WriteString("decimal binary gray decoded"); - WriteLn; - FOR I := 0 TO 31 DO - G := Encode(I); - D := Decode(G); - WriteInt(I, 4); - WriteString(" "); - Ok := LongBaseToStr(I, 2, BinS); - Ok := FormatString("%'05s", OutBinS, BinS); - (* Padded with 0; width: 5; type: string *) - WriteString(OutBinS); - WriteString(" "); - Ok := LongBaseToStr(G, 2, BinS); - Ok := FormatString("%'05s", OutBinS, BinS); - WriteString(OutBinS); - WriteString(" "); - Ok := LongBaseToStr(D, 2, BinS); - Ok := FormatString("%'05s", OutBinS, BinS); - WriteString(OutBinS); - WriteInt(D, 4); - WriteLn; - END -END GrayCode. diff --git a/Task/Gray-code/OCaml/gray-code.ml b/Task/Gray-code/OCaml/gray-code.ocaml similarity index 100% rename from Task/Gray-code/OCaml/gray-code.ml rename to Task/Gray-code/OCaml/gray-code.ocaml diff --git a/Task/Gray-code/PascalABC.NET/gray-code.pas b/Task/Gray-code/PascalABC.NET/gray-code.pas deleted file mode 100644 index e7f7d37b51..0000000000 --- a/Task/Gray-code/PascalABC.NET/gray-code.pas +++ /dev/null @@ -1,18 +0,0 @@ -uses School; - -function GrayEncode(n: longword): longword := n xor (n shr 1); - -function GrayDecode(n: longword): longword; -begin - Result := 0; - while n > 0 do - begin - Result := Result xor n; - n := n shr 1; - end; -end; - -begin - for var i := 0 to 31 do - Writeln($'{i,-7} {Bin(i),-7} {Bin(grayEncode(i)),-7} {grayDecode(grayEncode(i)),-7}'); -end. diff --git a/Task/Gray-code/Pluto/gray-code.pluto b/Task/Gray-code/Pluto/gray-code.pluto deleted file mode 100644 index cf0cab4ce4..0000000000 --- a/Task/Gray-code/Pluto/gray-code.pluto +++ /dev/null @@ -1,19 +0,0 @@ -local fmt = require "fmt" - -local function to_gray(n) return n ~ (n >> 1) end - -local function from_gray(g) - local b = 0 - while g != 0 do - b ~= g - g >>= 1 - end - return b -end - -print("decimal binary gray decoded") -for b = 0, 31 do - fmt.write(" %2d %05d", b, fmt.bin(b)) - local g = to_gray(b) - fmt.print(" %05d %05d", fmt.bin(g), fmt.bin(from_gray(g))) -end diff --git a/Task/Gray-code/PowerShell/gray-code.ps1 b/Task/Gray-code/PowerShell/gray-code.ps1 deleted file mode 100644 index 0becbcb13c..0000000000 --- a/Task/Gray-code/PowerShell/gray-code.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -# Gray code - -function Encode { - [OutputType([uint32])] - param([uint32]$V) - - return $V -bxor ($V -shr 1) -} - -function Decode { - [OutputType([uint32])] - param([uint32]$V) - - [uint32]$result = 0 - while ($V -gt 0) { - $result = $result -bxor $V - $V = $V -shr 1 - } - return $result -} - -Write-Output "decimal binary gray decoded" -foreach ($i in 0..31) { - [uint32]$g = Encode($i) - [uint32]$d = Decode($g) - [string]$out = @() - $out += "{0, 4} " -f $i - $binS = ([convert]::ToString($i, 2)).PadLeft(5, "0") - $out += "$binS " - $binS = ([convert]::ToString($g, 2)).PadLeft(5, "0") - $out += "$binS " - $binS = ([convert]::ToString($d, 2)).PadLeft(5, "0") - $out += "$binS{0, 4}" -f $d - Write-Output $out -} diff --git a/Task/Gray-code/Rust/gray-code.rs b/Task/Gray-code/Rust/gray-code.rust similarity index 100% rename from Task/Gray-code/Rust/gray-code.rs rename to Task/Gray-code/Rust/gray-code.rust diff --git a/Task/Gray-code/SETL/gray-code.setl b/Task/Gray-code/SETL/gray-code.setl deleted file mode 100644 index e5d368056b..0000000000 --- a/Task/Gray-code/SETL/gray-code.setl +++ /dev/null @@ -1,29 +0,0 @@ -program gray_code; - loop for n in [0..31] do - print( - lpad(str n, 2) + ": " + - lpad(bits n, 5) + " => " + - lpad(bits(g := gray_encode(n)), 5) + " => " + - lpad(bits(d := gray_decode(g)), 5) + ": " + - lpad(str d, 2) - ); - end loop; - - proc gray_encode(n); - return n bit_xor (n div 2); - end proc; - - proc gray_decode(n); - loop - init r := 0; - step n div:= 2; - until n=0 do r bit_xor:= n; - end loop; - return r; - end proc; - - op bits(n); - b := '' +/ [[str (n mod 2), n div:=2](1) : until n=0]; - return reverse(b); - end op; -end program; diff --git a/Task/Gray-code/VBScript/gray-code.vbs b/Task/Gray-code/VBScript/gray-code.vb similarity index 100% rename from Task/Gray-code/VBScript/gray-code.vbs rename to Task/Gray-code/VBScript/gray-code.vb diff --git a/Task/Gray-code/VHDL/gray-code-1.vhd b/Task/Gray-code/VHDL/gray-code-1.vhdl similarity index 100% rename from Task/Gray-code/VHDL/gray-code-1.vhd rename to Task/Gray-code/VHDL/gray-code-1.vhdl diff --git a/Task/Gray-code/VHDL/gray-code-2.vhd b/Task/Gray-code/VHDL/gray-code-2.vhdl similarity index 100% rename from Task/Gray-code/VHDL/gray-code-2.vhd rename to Task/Gray-code/VHDL/gray-code-2.vhdl diff --git a/Task/Gray-code/Zig/gray-code.zig b/Task/Gray-code/Zig/gray-code.zig deleted file mode 100644 index 93a671caa5..0000000000 --- a/Task/Gray-code/Zig/gray-code.zig +++ /dev/null @@ -1,64 +0,0 @@ -const std = @import("std"); - -fn grayEncode(b: u32) u32 { - return b ^ (b >> 1); -} - -fn grayDecode(g: u32) u32 { - var result = g; - var bit: u32 = 1 << 31; - while (bit > 1) { - if (result & bit != 0) result ^= bit >> 1; - bit >>= 1; - } - return result; -} - -fn toBinary(value: u32, buffer: []u8) []const u8 { - if (value == 0) return "0"; - - var temp = value; - var highest_bit: u5 = 0; - // Find the highest bit set - while (temp != 0) : (temp >>= 1) { - highest_bit += 1; - } - - // Fill buffer from right to left - var i: usize = highest_bit; - temp = value; - while (i > 0) { - i -= 1; - buffer[i] = if (temp & 1 == 1) '1' else '0'; - temp >>= 1; - } - - // Find first '1' - for (buffer[0..highest_bit], 0..) |c, index| { - if (c == '1') { - return buffer[index..highest_bit]; - } - } - - return "0"; // Fallback -} - -pub fn main() !void { - const stdout = std.io.getStdOut().writer(); - try stdout.print("Number\tBinary\tGray\tDecoded\n", .{}); - - // Pre-allocate a buffer big enough for 32-bit numbers - var binary_buffer: [32]u8 = undefined; - var gray_buffer: [32]u8 = undefined; - - for (0..32) |n| { - const n_u32: u32 = @intCast(n); - const g = grayEncode(n_u32); - std.debug.assert(grayDecode(g) == n_u32); - - const binary = toBinary(n_u32, &binary_buffer); - const grayBinary = toBinary(g, &gray_buffer); - - try stdout.print("{d}\t{s}\t{s}\t{d}\n", .{ n, binary, grayBinary, g }); - } -} diff --git a/Task/Grayscale-image/11l/grayscale-image.11l b/Task/Grayscale-image/11l/grayscale-image.11l index 3f4f195f10..2d3c981e9e 100644 --- a/Task/Grayscale-image/11l/grayscale-image.11l +++ b/Task/Grayscale-image/11l/grayscale-image.11l @@ -1,4 +1,13 @@ -T Colour = BVec3 +T Colour + Byte r, g, b + + F (r, g, b) + .r = r + .g = g + .b = b + + F ==(other) + R .r == other.r & .g == other.g & .b == other.b V black = Colour(0, 0, 0) V white = Colour(255, 255, 255) diff --git a/Task/Grayscale-image/Ada/grayscale-image-1.adb b/Task/Grayscale-image/Ada/grayscale-image-1.ada similarity index 100% rename from Task/Grayscale-image/Ada/grayscale-image-1.adb rename to Task/Grayscale-image/Ada/grayscale-image-1.ada diff --git a/Task/Grayscale-image/Ada/grayscale-image-2.adb b/Task/Grayscale-image/Ada/grayscale-image-2.ada similarity index 100% rename from Task/Grayscale-image/Ada/grayscale-image-2.adb rename to Task/Grayscale-image/Ada/grayscale-image-2.ada diff --git a/Task/Grayscale-image/Ada/grayscale-image-3.adb b/Task/Grayscale-image/Ada/grayscale-image-3.ada similarity index 100% rename from Task/Grayscale-image/Ada/grayscale-image-3.adb rename to Task/Grayscale-image/Ada/grayscale-image-3.ada diff --git a/Task/Grayscale-image/Crystal/grayscale-image.cr b/Task/Grayscale-image/Crystal/grayscale-image.crystal similarity index 100% rename from Task/Grayscale-image/Crystal/grayscale-image.cr rename to Task/Grayscale-image/Crystal/grayscale-image.crystal diff --git a/Task/Grayscale-image/Euphoria/grayscale-image.eu b/Task/Grayscale-image/Euphoria/grayscale-image.euphoria similarity index 100% rename from Task/Grayscale-image/Euphoria/grayscale-image.eu rename to Task/Grayscale-image/Euphoria/grayscale-image.euphoria diff --git a/Task/Grayscale-image/Julia/grayscale-image-1.jl b/Task/Grayscale-image/Julia/grayscale-image-1.julia similarity index 100% rename from Task/Grayscale-image/Julia/grayscale-image-1.jl rename to Task/Grayscale-image/Julia/grayscale-image-1.julia diff --git a/Task/Grayscale-image/Julia/grayscale-image-2.jl b/Task/Grayscale-image/Julia/grayscale-image-2.julia similarity index 100% rename from Task/Grayscale-image/Julia/grayscale-image-2.jl rename to Task/Grayscale-image/Julia/grayscale-image-2.julia diff --git a/Task/Grayscale-image/Kotlin/grayscale-image.kts b/Task/Grayscale-image/Kotlin/grayscale-image.kotlin similarity index 100% rename from Task/Grayscale-image/Kotlin/grayscale-image.kts rename to Task/Grayscale-image/Kotlin/grayscale-image.kotlin diff --git a/Task/Grayscale-image/M2000-Interpreter/grayscale-image.m2000 b/Task/Grayscale-image/M2000-Interpreter/grayscale-image.m2000 index ed33411db2..229762871a 100644 --- a/Task/Grayscale-image/M2000-Interpreter/grayscale-image.m2000 +++ b/Task/Grayscale-image/M2000-Interpreter/grayscale-image.m2000 @@ -1,202 +1,201 @@ Module P6P5 { - Class Bitmap { - { // from version 14 - Var x As long, y As long, Import As boolean, P5 As boolean - If match("NN") Then - Read x, y - Else.if Match("N") Then - Read f As long - buffer whitespace As Byte - if not Eof(f) Then - get #f, whitespace :P6$=eval$(whitespace) - get #f, whitespace : P6$+=eval$(whitespace) - boolean getW=true, getH=true, getV=true - long v - P5=p6$=str$("P5") - If p6$=str$("P6") or P5 Then - do - get #f, whitespace - if Eval$(whitespace)=str$("#") Then - do - get #f, whitespace - until eval(whitespace)=10 - Else - select case eval(whitespace) - case 32, 9, 13, 10 - { - if getW and x<>0 Then - getW=false - Else.if getH and y<>0 Then - getH=false - Else.if getV and v<>0 Then - getV=false - End If - } - case 48 To 57 - { - if getW Then - x*=10 - x+=eval(whitespace, 0)-48 - Else.if getH Then - y*=10 - y+=eval(whitespace, 0)-48 - Else.if getV Then - v*=10 - v+=eval(whitespace, 0)-48 - End If - } - End Select - End If - iF eof(f) Then Error "Not a ppm file" - until getV=false - Else - Error "Not a P6 ppm or P5 ppm file" - End If - Import=True - End if - Else - Error "No proper arguments" - End If - if x<1 or y<1 Then Error "Wrong dimensions" - Buffer Clear Pad1 As Byte*3 - structure rgb { - red As Byte - green As Byte - blue As Byte - } - m=len(rgb)*x mod 4 - if m>0 Then m=4-m ' add some bytes To raster line - m+=len(rgb) *x - Structure rasterline { - { - pad As Byte*m - } - hline As rgb*x - } - Structure Raster { - magic As integer*4 - w As integer*4 - h As integer*4 - { - linesB As Byte*len(rasterline)*y - } - lines As rasterline*y - } - Buffer Clear Image1 As Raster - Return Image1, 0!magic:="cDIB", 0!w:=Hex$(x,2), 0!h:=Hex$(y, 2) - if not Import Then Return Image1, 0!lines:=Str$(String$(chrcode$(255), Len(rasterline)*y)) - Buffer Clear Pad As Byte*4 - aLines=Len(Raster)-Len(Rasterline)-Raster("linesB") - blines=-Len(Rasterline) - if Import Then - x0=x-1 : where=0 - Buffer Pad1 As Byte*3 - Buffer Pad2 As Byte - local rasterline=x*3 - m=rasterline mod 4 : if m<>0 Then rasterline+=4-m - For y1=y-1 To 0 - where=rasterline*y1 - For x1=0 To x0 - if p5 Then - Get #f, Pad2: m=eval(Pad2,0) : Return pad1, 0:=m, 1:=m, 2:=m - Else - Get #f, Pad1 : Push Eval(pad1, 2) : Return pad1, 2:=Eval(pad1, 0), 0:=Number - End if - Image1|linesB[where]=Pad1[0, 3] : where+=3 - Next - Next - End if - } - SetPixel=Lambda Image1, Pad, aLines, blines (x, y, c) ->{ - if c>0 Then c=color(c) - c-! - Return Pad, 0:=c As long - Push pad[2] : pad[2]=pad[0]: pad[0]=Number - Image1|linesB[alines+3*x+blines*y]=Pad[0, 3] - } - GetPixel=Lambda Image1,aLines, blines, Pad1 (x,y) ->{ - Pad1[0]=Image1|linesB[alines+3*x+blines*y, 3] - =color(Pad1[2], Pad1[1],Pad1[0]) - } - GetPixelGray=Lambda Image1,aLines, blines, Pad1 (x,y) ->{ - Pad1[0]=Image1|linesB[alines+3*x+blines*y, 3] - grayval=round(0.2126*Pad1[2] + 0.7152*Pad1[1] + 0.0722*Pad1[0], 0) - =color(grayval,grayval,grayval) - } - Image$=Lambda$ Image1, Raster ->Eval$(Image1, 0, Len(Raster)) - Copy=Lambda Image1 (image$) -> { - if left$(image$,12)=Image1[0, 24] Then - Return Image1, 0:=Image$ - Else - Error "Can't Copy Image" - End if - } - ToFile=Lambda Image1, x, y (f) -> { - Print #f, "P6";chr$(10);"# Created using M2000 Interpreter";chr$(10); - Print #f, x;" ";y;" 255";chr$(10); - x2=x-1 : where=0 : rasterline=x*3 - m=rasterline mod 4 : if m<>0 Then rasterline+=4-m - Buffer pad As Byte*3 - For y1=y-1 To 0 - where=rasterline*y1 - For x1=0 To x2 - pad[0]=image1|linesB[where, 3] - Push pad[2] : pad[2]=pad[0]: pad[0]=Number - Put #f, pad : where+=3 - Next - Next - } - ToFileGray=Lambda Image1, x, y (f) -> { - Print #f, "P5";chr$(10);"# Created using M2000 Interpreter";chr$(10); - Print #f, x;" ";y;" 255";chr$(10); - x2=x-1 : where=0 : rasterline=x*3 - m=rasterline mod 4 : if m<>0 Then rasterline+=4-m - Buffer pad As Byte*3 - Buffer bytepad As Byte - const R=0.2126, G=0.7152, B=0.0722 - For y1=y-1 To 0 - where=rasterline*y1 - For x1=0 To x2 - Return pad, 0:=eval$(image1, 0!linesB!where, 3) - Return bytepad, 0:=round(R*Eval(pad, 2) + G*Eval(pad, 1) + B*Eval(pad, 0), 0) - Put #f, bytepad : where+=3 - Next - Next - } - } - Cls 5,0 - A=Bitmap(15,10) - B=Bitmap(15,10) - c1=color(100, 200, 255) - c2=color(180, 250, 128) - For i=0 To 8 - Call A.SetPixel(i, i, c1) - Call A.SetPixel(9, i,c2) - Next - Call A.SetPixel(i,i,c1) - // make a new one GrayScale (but 24bit) As B - For i=0 To 14 { For J=0 To 9 {Call B.SetPixel(i, j, A.GetPixelGray(i,j))}} - // place image A at 200 pixel from left margin, 100 pixel from top margin - Copy 200*twipsX, 100*twipsY use A.Image$(), 0, 800 ' zoom 800%, angle 0 - // place image B at 400 pixel from left margin, 100 pixel from top margin - Copy 400*twipsX, 100*twipsY use B.Image$(), 0, 800 ' zoom 800% - Try { - Open "P6example.ppm" For Output As #f - Call A.Tofile(f) - Close #f - Open "P5example.ppm" For Output As #f - Call A.TofileGray(f) - Close #f - Open "P5example.ppm" For Input As #f - C=Bitmap(f) - close #f - Copy 600*twipsX, 100*twipsY use C.Image$(), 0, 800 ' zoom 800% - Open "P6example.ppm" For Input As #f - C=Bitmap(f) - close #f - // use of Top clause To make the border color transparent at rotation - Copy 800*twipsX, 100*twipsY top C.Image$(), 30, 800 ' zoom 800%, angle 30 degree - } - Print "Done" + Function Bitmap { + def x as long, y as long, Import as boolean, P5 as boolean + If match("NN") then { + Read x, y + } else.if Match("N") Then { + \\ is a file? + Read f as long + buffer whitespace as byte + if not Eof(f) then { + get #f, whitespace :P6$=eval$(whitespace) + get #f, whitespace : P6$+=eval$(whitespace) + def boolean getW=true, getH=true, getV=true + def long v + \\ str$("P6") has 2 bytes. "P6" has 4 bytes + P5=p6$=str$("P5") + If p6$=str$("P6") or P5 Then { + do { + get #f, whitespace + if Eval$(whitespace)=str$("#") then { + do {get #f, whitespace} until eval(whitespace)=10 + } else { + select case eval(whitespace) + case 32, 9, 13, 10 + { if getW and x<>0 then { + getW=false + } else.if getH and y<>0 then { + getH=false + } else.if getV and v<>0 then { + getV=false + } + } + case 48 to 57 + {if getW then { + x*=10 + x+=eval(whitespace, 0)-48 + } else.if getH then { + y*=10 + y+=eval(whitespace, 0)-48 + } else.if getV then { + v*=10 + v+=eval(whitespace, 0)-48 + } + } + End Select + } + iF eof(f) then Error "Not a ppm file" + } until getV=false + } else Error "Not a P6 ppm or P5 ppm file" + Import=True + } + } else Error "No proper arguments" + if x<1 or y<1 then Error "Wrong dimensions" + structure rgb { + red as byte + green as byte + blue as byte + } + m=len(rgb)*x mod 4 + if m>0 then m=4-m ' add some bytes to raster line + m+=len(rgb) *x + Structure rasterline { + { + pad as byte*m + } + hline as rgb*x + } + Structure Raster { + magic as integer*4 + w as integer*4 + h as integer*4 + { + linesB as byte*len(rasterline)*y + } + lines as rasterline*y + } + Buffer Clear Image1 as Raster + Return Image1, 0!magic:="cDIB", 0!w:=Hex$(x,2), 0!h:=Hex$(y, 2) + if not Import then Return Image1, 0!lines:=Str$(String$(chrcode$(255), Len(rasterline)*y)) + Buffer Clear Pad as Byte*4 + SetPixel=Lambda Image1, Pad,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x, y, c) ->{ + where=alines+3*x+blines*y + if c>0 then c=color(c) + c-! + Return Pad, 0:=c as long + Return Image1, 0!where:=Eval(Pad, 2) as byte, 0!where+1:=Eval(Pad, 1) as byte, 0!where+2:=Eval(Pad, 0) as byte + } + GetPixel=Lambda Image1,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x,y) ->{ + where=alines+3*x+blines*y + =color(Eval(image1, where+2 as byte), Eval(image1, where+1 as byte), Eval(image1, where as byte)) + } + GetPixelGray=Lambda Image1,aLines=Len(Raster)-Len(Rasterline), blines=-Len(Rasterline) (x,y) ->{ + where=alines+3*x+blines*y + grayval=round(0.2126*Eval(image1, where+2 as byte) + 0.7152*Eval(image1, where+1 as byte) + 0.0722*Eval(image1, where as byte), 0) + =color(grayval,grayval,grayval) + } + StrDib$=Lambda$ Image1, Raster -> { + =Eval$(Image1, 0, Len(Raster)) + } + CopyImage=Lambda Image1 (image$) -> { + if left$(image$,12)=Eval$(Image1, 0, 24 ) Then { + Return Image1, 0:=Image$ + } Else Error "Can't Copy Image" + } + Export2File=Lambda Image1, x, y (f) -> { + Print #f, "P6";chr$(10);"# Created using M2000 Interpreter";chr$(10); + Print #f, x;" ";y;" 255";chr$(10); + x2=x-1 : where=0 : rasterline=x*3 + m=rasterline mod 4 : if m<>0 then rasterline+=4-m + Buffer pad as byte*3 + For y1=y-1 to 0 { + where=rasterline*y1 + For x1=0 to x2 { + Return pad, 0:=eval$(image1, 0!linesB!where, 3) + Push Eval(pad, 2) : Return pad, 2:=Eval(pad, 0), 0:=Number + Put #f, pad : where+=3 + } + } + } + Export2FileGray=Lambda Image1, x, y (f) -> { + Print #f, "P5";chr$(10);"# Created using M2000 Interpreter";chr$(10); + Print #f, x;" ";y;" 255";chr$(10); + x2=x-1 : where=0 : rasterline=x*3 + m=rasterline mod 4 : if m<>0 then rasterline+=4-m + Buffer pad as byte*3 + Buffer bytepad as byte + const R=0.2126, G=0.7152, B=0.0722 + For y1=y-1 to 0 { + where=rasterline*y1 + For x1=0 to x2 { + Return pad, 0:=eval$(image1, 0!linesB!where, 3) + Return bytepad, 0:=round(R*Eval(pad, 2) + G*Eval(pad, 1) + B*Eval(pad, 0), 0) + Put #f, bytepad : where+=3 + } + } + } + if Import then { + x0=x-1 : where=0 + Buffer Pad1 as byte*3 + Buffer Pad2 as byte + local rasterline=x*3 + m=rasterline mod 4 : if m<>0 then rasterline+=4-m + For y1=y-1 to 0 { + where=rasterline*y1 + For x1=0 to x0 { + if p5 then + Get #f, Pad2: m=eval(Pad2,0) : Return pad1, 0:=m, 1:=m, 2:=m + else + Get #f, Pad1 : Push Eval(pad1, 2) : Return pad1, 2:=Eval(pad1, 0), 0:=Number + End if + Return Image1, 0!linesB!where:=Eval$(Pad1) : where+=3 + } + } + } + Group Bitmap { + SetPixel=SetPixel + GetPixel=GetPixel + Image$=StrDib$ + Copy=CopyImage + ToFile=Export2File + ToFileGray=Export2FileGray + GetPixelGray=GetPixelGray + } + =Bitmap + } + Cls 5,0 + A=Bitmap(15,10) + B=Bitmap(15,10) + c1=color(100, 200, 255) + c2=color(180, 250, 128) + For i=0 to 8 + Call A.SetPixel(i, i, c1) + Call A.SetPixel(9, i,c2) + Next + Call A.SetPixel(i,i,c1) + // make a new one GrayScale (but 24bit) as B + For i=0 to 14 { For J=0 to 9 {Call B.SetPixel(i, j, A.GetPixelGray(i,j))}} + // place image A at 200 pixel from left margin, 100 pixel from top margin + Copy 200*twipsX, 100*twipsY use A.Image$(), 0, 400 ' zoom 400%, angle 0 + // place image B at 400 pixel from left margin, 100 pixel from top margin + Copy 400*twipsX, 100*twipsY use B.Image$(), 0, 400 ' zoom 400% + Try { + Open "P6example.ppm" For Output as #f + Call A.Tofile(f) + Close #f + Open "P5example.ppm" For Output as #f + Call A.TofileGray(f) + Close #f + Open "P5example.ppm" For Input as #f + C=Bitmap(f) + close #f + Copy 600*twipsX, 100*twipsY use C.Image$(), 0, 400 ' zoom 400% + Open "P6example.ppm" For Input as #f + C=Bitmap(f) + close #f + // use of Top clause to make the border color transparent at rotation + Copy 800*twipsX, 100*twipsY top C.Image$(), 30, 400 ' zoom 400%, angle 30 degree + } + Print "Done" } P6P5 diff --git a/Task/Grayscale-image/OCaml/grayscale-image-1.ml b/Task/Grayscale-image/OCaml/grayscale-image-1.ocaml similarity index 100% rename from Task/Grayscale-image/OCaml/grayscale-image-1.ml rename to Task/Grayscale-image/OCaml/grayscale-image-1.ocaml diff --git a/Task/Grayscale-image/OCaml/grayscale-image-2.ml b/Task/Grayscale-image/OCaml/grayscale-image-2.ocaml similarity index 100% rename from Task/Grayscale-image/OCaml/grayscale-image-2.ml rename to Task/Grayscale-image/OCaml/grayscale-image-2.ocaml diff --git a/Task/Grayscale-image/OCaml/grayscale-image-3.ml b/Task/Grayscale-image/OCaml/grayscale-image-3.ocaml similarity index 100% rename from Task/Grayscale-image/OCaml/grayscale-image-3.ml rename to Task/Grayscale-image/OCaml/grayscale-image-3.ocaml diff --git a/Task/Greatest-common-divisor/ALGOL-68/greatest-common-divisor.alg b/Task/Greatest-common-divisor/ALGOL-68/greatest-common-divisor.alg index 1f11565746..2e357e0524 100644 --- a/Task/Greatest-common-divisor/ALGOL-68/greatest-common-divisor.alg +++ b/Task/Greatest-common-divisor/ALGOL-68/greatest-common-divisor.alg @@ -1,24 +1,17 @@ -BEGIN - PROC gcd = (INT m, n) INT: ( - IF INT a = ABS m, b = ABS n; - a = 0 - THEN - b - ELIF b = 0 THEN - a - ELIF a > b THEN - gcd(b, a MOD b) - ELSE - gcd(a, b MOD a) - FI - ); - test:( - FOR a FROM 33 BY -33 TO -33 DO - FOR b FROM 77 BY -77 TO -77 DO - print(("The gcd of ", whole(a,-6)," and ", whole(b,-6)," is ", whole(gcd(a,b),-6),newline)) - OD - OD; - INT c = 49865, d = 69811; - print(("The gcd of ", whole(c,-6)," and ", whole(d,-6)," is ", whole(gcd(c,d),-6),newline)) - ) -END +PROC gcd = (INT a, b) INT: ( + IF a = 0 THEN + b + ELIF b = 0 THEN + a + ELIF a > b THEN + gcd(b, a MOD b) + ELSE + gcd(a, b MOD a) + FI +); +test:( + INT a = 33, b = 77; + printf(($x"The gcd of"g" and "g" is "gl$,a,b,gcd(a,b))); + INT c = 49865, d = 69811; + printf(($x"The gcd of"g" and "g" is "gl$,c,d,gcd(c,d))) +) diff --git a/Task/Greatest-common-divisor/Ada/greatest-common-divisor.adb b/Task/Greatest-common-divisor/Ada/greatest-common-divisor.ada similarity index 100% rename from Task/Greatest-common-divisor/Ada/greatest-common-divisor.adb rename to Task/Greatest-common-divisor/Ada/greatest-common-divisor.ada diff --git a/Task/Greatest-common-divisor/AutoIt/greatest-common-divisor.au3 b/Task/Greatest-common-divisor/AutoIt/greatest-common-divisor.autoit similarity index 100% rename from Task/Greatest-common-divisor/AutoIt/greatest-common-divisor.au3 rename to Task/Greatest-common-divisor/AutoIt/greatest-common-divisor.autoit diff --git a/Task/Greatest-common-divisor/Ballerina/greatest-common-divisor.ballerina b/Task/Greatest-common-divisor/Ballerina/greatest-common-divisor.ballerina deleted file mode 100644 index e203dc5ef4..0000000000 --- a/Task/Greatest-common-divisor/Ballerina/greatest-common-divisor.ballerina +++ /dev/null @@ -1,21 +0,0 @@ -import ballerina/io; - -function gcd(int u, int v) returns int { - int _u = u; - int _v = v; - while _v != 0 { - [_u, _v] = [_v, _u % _v]; - } - return _u.abs(); -} - -public function main() { - io:println(gcd(0, 0)); - io:println(gcd(0, 10)); - io:println(gcd(0, -10)); - io:println(gcd(9, 6)); - io:println(gcd(6, 9)); - io:println(gcd(-6, 9)); - io:println(gcd(8, 45)); - io:println(gcd(40902, 24140)); -} diff --git a/Task/Greatest-common-divisor/COBOL/greatest-common-divisor.cob b/Task/Greatest-common-divisor/COBOL/greatest-common-divisor.cobol similarity index 100% rename from Task/Greatest-common-divisor/COBOL/greatest-common-divisor.cob rename to Task/Greatest-common-divisor/COBOL/greatest-common-divisor.cobol diff --git a/Task/Greatest-common-divisor/Crystal/greatest-common-divisor.cr b/Task/Greatest-common-divisor/Crystal/greatest-common-divisor.cr deleted file mode 100644 index f4717cf74a..0000000000 --- a/Task/Greatest-common-divisor/Crystal/greatest-common-divisor.cr +++ /dev/null @@ -1 +0,0 @@ -2345.gcd 5432 #=> 7 diff --git a/Task/Greatest-common-divisor/DuckDB/greatest-common-divisor.duckdb b/Task/Greatest-common-divisor/DuckDB/greatest-common-divisor.duckdb deleted file mode 100644 index 9114ccd611..0000000000 --- a/Task/Greatest-common-divisor/DuckDB/greatest-common-divisor.duckdb +++ /dev/null @@ -1,12 +0,0 @@ -create or replace function mygcd(a0, b0) as ( - with recursive cte as ( - select a0 as a, b0 as b - union all - select b as a, mod(a,b) as b - from cte - where b != 0 - ) - select last(a) - from cte - where b=0 -); diff --git a/Task/Greatest-common-divisor/EMal/greatest-common-divisor.emal b/Task/Greatest-common-divisor/EMal/greatest-common-divisor.emal deleted file mode 100644 index bbb6e1a9ab..0000000000 --- a/Task/Greatest-common-divisor/EMal/greatest-common-divisor.emal +++ /dev/null @@ -1,14 +0,0 @@ -fun gcd ← int by int a, int b - while b ≠ 0 - int t ← b - b ← a % b - a ← t - end - return abs(a) -end -writeLine(gcd(0, 0)) -writeLine(gcd(0, -10)) -writeLine(gcd(-6, 9)) -writeLine(gcd(40902, 24140)) -writeLine(gcd(9360, 12240)) -writeLine(gcd(123456789, 987654321)) diff --git a/Task/Greatest-common-divisor/Elena/greatest-common-divisor.elena b/Task/Greatest-common-divisor/Elena/greatest-common-divisor.elena index 07bf136003..8d3b778db8 100644 --- a/Task/Greatest-common-divisor/Elena/greatest-common-divisor.elena +++ b/Task/Greatest-common-divisor/Elena/greatest-common-divisor.elena @@ -17,10 +17,10 @@ gcd(a,b) printGCD(a,b) { - Console.printLineFormatted("GCD of {0} and {1} is {2}", a, b, gcd(a,b)) + console.printLineFormatted("GCD of {0} and {1} is {2}", a, b, gcd(a,b)) } -public Program() +public program() { printGCD(1,1); printGCD(1,10); diff --git a/Task/Greatest-common-divisor/Elixir/greatest-common-divisor.ex b/Task/Greatest-common-divisor/Elixir/greatest-common-divisor.elixir similarity index 100% rename from Task/Greatest-common-divisor/Elixir/greatest-common-divisor.ex rename to Task/Greatest-common-divisor/Elixir/greatest-common-divisor.elixir diff --git a/Task/Greatest-common-divisor/Emacs-Lisp/greatest-common-divisor.el b/Task/Greatest-common-divisor/Emacs-Lisp/greatest-common-divisor.l similarity index 100% rename from Task/Greatest-common-divisor/Emacs-Lisp/greatest-common-divisor.el rename to Task/Greatest-common-divisor/Emacs-Lisp/greatest-common-divisor.l diff --git a/Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-1.eu b/Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-1.euphoria similarity index 100% rename from Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-1.eu rename to Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-1.euphoria diff --git a/Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-2.eu b/Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-2.euphoria similarity index 100% rename from Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-2.eu rename to Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-2.euphoria diff --git a/Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-3.eu b/Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-3.euphoria similarity index 100% rename from Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-3.eu rename to Task/Greatest-common-divisor/Euphoria/greatest-common-divisor-3.euphoria diff --git a/Task/Greatest-common-divisor/F-Sharp/greatest-common-divisor-2.fs b/Task/Greatest-common-divisor/F-Sharp/greatest-common-divisor-2.fs deleted file mode 100644 index 121ed1a89b..0000000000 --- a/Task/Greatest-common-divisor/F-Sharp/greatest-common-divisor-2.fs +++ /dev/null @@ -1,5 +0,0 @@ -// GCD method attributed to Dijkstra. Nigel Galloway: February 7th., 2026. -let rec gcd n=function g when n=g->n - |g when ngcd (g-n) n - |g->gcd g (n-g) -printfn "%d, %d, %d" (gcd 23 13) (gcd 600 400) (gcd 0 0) diff --git a/Task/Greatest-common-divisor/F-Sharp/greatest-common-divisor-1.fs b/Task/Greatest-common-divisor/F-Sharp/greatest-common-divisor.fs similarity index 100% rename from Task/Greatest-common-divisor/F-Sharp/greatest-common-divisor-1.fs rename to Task/Greatest-common-divisor/F-Sharp/greatest-common-divisor.fs diff --git a/Task/Greatest-common-divisor/Gleam/greatest-common-divisor.gleam b/Task/Greatest-common-divisor/Gleam/greatest-common-divisor.gleam deleted file mode 100644 index f5187521b9..0000000000 --- a/Task/Greatest-common-divisor/Gleam/greatest-common-divisor.gleam +++ /dev/null @@ -1,19 +0,0 @@ -import gleam/int -import gleam/io - -pub fn main() { - gcd(40_902, 24_140) - |> int.to_string - |> io.println -} - -pub fn gcd(a, b) { - gcd_loop(int.absolute_value(a), int.absolute_value(b)) -} - -fn gcd_loop(a, b) { - case b { - 0 -> a - _ -> gcd_loop(b, a % b) - } -} diff --git a/Task/Greatest-common-divisor/J/greatest-common-divisor-3.j b/Task/Greatest-common-divisor/J/greatest-common-divisor-3.j index f34b6cd4f7..a4531536ed 100644 --- a/Task/Greatest-common-divisor/J/greatest-common-divisor-3.j +++ b/Task/Greatest-common-divisor/J/greatest-common-divisor-3.j @@ -1 +1 @@ -gcd=: (| $: [)^:(0<[)&| +gcd=: (| gcd [)^:(0<[)&| diff --git a/Task/Greatest-common-divisor/Julia/greatest-common-divisor.jl b/Task/Greatest-common-divisor/Julia/greatest-common-divisor.julia similarity index 100% rename from Task/Greatest-common-divisor/Julia/greatest-common-divisor.jl rename to Task/Greatest-common-divisor/Julia/greatest-common-divisor.julia diff --git a/Task/Greatest-common-divisor/Kotlin/greatest-common-divisor.kts b/Task/Greatest-common-divisor/Kotlin/greatest-common-divisor.kotlin similarity index 100% rename from Task/Greatest-common-divisor/Kotlin/greatest-common-divisor.kts rename to Task/Greatest-common-divisor/Kotlin/greatest-common-divisor.kotlin diff --git a/Task/Greatest-common-divisor/LOLCODE/greatest-common-divisor.lol b/Task/Greatest-common-divisor/LOLCODE/greatest-common-divisor.lol index b261e752da..655b749ee7 100644 --- a/Task/Greatest-common-divisor/LOLCODE/greatest-common-divisor.lol +++ b/Task/Greatest-common-divisor/LOLCODE/greatest-common-divisor.lol @@ -1,32 +1,36 @@ HAI 1.3 -HOW IZ I gcd YR a AN YR b BTW ITERATIF GCD - a R BIGGR OF a AN PRODUKT OF a AN -1 BTW absolute value of a - b R BIGGR OF b AN PRODUKT OF b AN -1 BTW absolute value of b - BOTH SAEM a AN b, O RLY? - YA RLY - FOUND YR a - MEBBE BOTH SAEM a AN 0, - FOUND YR b - MEBBE BOTH SAEM b AN 0, - FOUND YR a - NO WAI - BOTH SAEM b AN BIGGR OF a AN b, O RLY? BTW make sure a is the larger of (a, b) - YA RLY - I HAS A temp ITZ a - a R b - b R temp - OIC - IM IN YR loop - I HAS A temp ITZ b - b R MOD OF a AN b - a R temp - BOTH SAEM b AN 0, O RLY? - YA RLY - FOUND YR a - OIC - IM OUTTA YR loop - OIC +HOW IZ I gcd YR a AN YR b + a R BIGGR OF a AN PRODUKT OF a AN -1 BTW absolute value of a + b R BIGGR OF b AN PRODUKT OF b AN -1 BTW absolute value of b + BOTH SAEM a AN b, O RLY? + YA RLY + FOUND YR a + OIC + BOTH SAEM a AN 0, O RLY? + YA RLY + FOUND YR b + OIC + BOTH SAEM b AN 0, O RLY? + YA RLY + FOUND YR a + OIC + BOTH SAEM b AN BIGGR OF a AN b, O RLY? BTW make sure a is the larger of (a, b) + YA RLY + I HAS A temp ITZ a + a R b + b R temp + OIC + + IM IN YR loop + I HAS A temp ITZ b + b R MOD OF a AN b + a R temp + BOTH SAEM b AN 0, O RLY? + YA RLY + FOUND YR a + OIC + IM OUTTA YR loop IF U SAY SO VISIBLE I IZ gcd YR 40902 AN YR 24140 MKAY diff --git a/Task/Greatest-common-divisor/Nu/greatest-common-divisor.nu b/Task/Greatest-common-divisor/Nu/greatest-common-divisor.nu deleted file mode 100644 index d2e0ca06ca..0000000000 --- a/Task/Greatest-common-divisor/Nu/greatest-common-divisor.nu +++ /dev/null @@ -1,8 +0,0 @@ -def 'math gcd' [] { - reduce {|x gcd| - generate { match $in { [$a 0] => {out: $a} [$a $b] => {next: [$b ($a mod $b)]} } } [$x $gcd] - | first - } -} - -[63 18 45] | math gcd diff --git a/Task/Greatest-common-divisor/OCaml/greatest-common-divisor-1.ml b/Task/Greatest-common-divisor/OCaml/greatest-common-divisor-1.ocaml similarity index 100% rename from Task/Greatest-common-divisor/OCaml/greatest-common-divisor-1.ml rename to Task/Greatest-common-divisor/OCaml/greatest-common-divisor-1.ocaml diff --git a/Task/Greatest-common-divisor/OCaml/greatest-common-divisor-2.ml b/Task/Greatest-common-divisor/OCaml/greatest-common-divisor-2.ocaml similarity index 100% rename from Task/Greatest-common-divisor/OCaml/greatest-common-divisor-2.ml rename to Task/Greatest-common-divisor/OCaml/greatest-common-divisor-2.ocaml diff --git a/Task/Greatest-common-divisor/Oberon/greatest-common-divisor.oberon b/Task/Greatest-common-divisor/Oberon/greatest-common-divisor.oberon new file mode 100644 index 0000000000..e81af17de6 --- /dev/null +++ b/Task/Greatest-common-divisor/Oberon/greatest-common-divisor.oberon @@ -0,0 +1,22 @@ +MODULE GCD; +(* Greatest Common Divisor *) +IMPORT + Out; + + PROCEDURE Gcd(a,b: LONGINT):LONGINT; + VAR + r: LONGINT; + BEGIN + LOOP + r := a MOD b; + IF r = 0 THEN RETURN b END; + a := b;b := r + END + END Gcd; +BEGIN + Out.String("GCD of 12 and 8 : ");Out.LongInt(Gcd(12,8),4);Out.Ln; + Out.String("GCD of 100 and 5 : ");Out.LongInt(Gcd(100,5),4);Out.Ln; + Out.String("GCD of 7 and 23 : ");Out.LongInt(Gcd(7,23),4);Out.Ln; + Out.String("GCD of 24 and -112 : ");Out.LongInt(Gcd(12,8),4);Out.Ln; + Out.String("GCD of 40902 and 24140 : ");Out.LongInt(Gcd(40902,24140),4);Out.Ln +END GCD. diff --git a/Task/Greatest-common-divisor/Pascal/greatest-common-divisor.pas b/Task/Greatest-common-divisor/Pascal/greatest-common-divisor.pas deleted file mode 100644 index 3766737710..0000000000 --- a/Task/Greatest-common-divisor/Pascal/greatest-common-divisor.pas +++ /dev/null @@ -1,17 +0,0 @@ -program GCF (INPUT, OUTPUT); - var - a,b,c:integer; - begin - writeln('Enter 1st number'); - read(a); - writeln('Enter 2nd number'); - read(b); - while (a*b<>0) - do - begin - c:=a; - a:=b mod a; - b:=c; - end; - writeln('GCF :=', a+b ); - end. diff --git a/Task/Greatest-common-divisor/PascalABC.NET/greatest-common-divisor.pas b/Task/Greatest-common-divisor/PascalABC.NET/greatest-common-divisor.pas deleted file mode 100644 index 7457c48563..0000000000 --- a/Task/Greatest-common-divisor/PascalABC.NET/greatest-common-divisor.pas +++ /dev/null @@ -1,18 +0,0 @@ -function GCD(a,b: integer): integer; -begin - while b > 0 do - (a,b) := (b,a mod b); - Result := a; -end; - -function GCDRec(a,b: integer): integer; -begin - if b = 0 then - Result := a - else Result := GCDRec(b, a mod b); -end; - -begin - Println(GCD(72,30),GCDRec(72,30)); - Println(GCD(49865, 69811),GCDRec(49865, 69811)); -end. diff --git a/Task/Greatest-common-divisor/Pluto/greatest-common-divisor.pluto b/Task/Greatest-common-divisor/Pluto/greatest-common-divisor.pluto deleted file mode 100644 index 9ead7fee31..0000000000 --- a/Task/Greatest-common-divisor/Pluto/greatest-common-divisor.pluto +++ /dev/null @@ -1,8 +0,0 @@ -function gcd(a,b) - while b~=0 do - a,b=b,a%b - end - return a -end - -print(gcd(56,98)) diff --git a/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-1.ps1 b/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-1.psh similarity index 100% rename from Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-1.ps1 rename to Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-1.psh diff --git a/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-2.ps1 b/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-2.psh similarity index 100% rename from Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-2.ps1 rename to Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-2.psh diff --git a/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-3.ps1 b/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-3.psh similarity index 100% rename from Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-3.ps1 rename to Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-3.psh diff --git a/Task/Greatest-common-divisor/Rebol/greatest-common-divisor.rebol b/Task/Greatest-common-divisor/REBOL/greatest-common-divisor.rebol similarity index 100% rename from Task/Greatest-common-divisor/Rebol/greatest-common-divisor.rebol rename to Task/Greatest-common-divisor/REBOL/greatest-common-divisor.rebol diff --git a/Task/Greatest-common-divisor/Rust/greatest-common-divisor-1.rs b/Task/Greatest-common-divisor/Rust/greatest-common-divisor-1.rust similarity index 100% rename from Task/Greatest-common-divisor/Rust/greatest-common-divisor-1.rs rename to Task/Greatest-common-divisor/Rust/greatest-common-divisor-1.rust diff --git a/Task/Greatest-common-divisor/Rust/greatest-common-divisor-2.rs b/Task/Greatest-common-divisor/Rust/greatest-common-divisor-2.rust similarity index 100% rename from Task/Greatest-common-divisor/Rust/greatest-common-divisor-2.rs rename to Task/Greatest-common-divisor/Rust/greatest-common-divisor-2.rust diff --git a/Task/Greatest-common-divisor/Rust/greatest-common-divisor-3.rs b/Task/Greatest-common-divisor/Rust/greatest-common-divisor-3.rust similarity index 100% rename from Task/Greatest-common-divisor/Rust/greatest-common-divisor-3.rs rename to Task/Greatest-common-divisor/Rust/greatest-common-divisor-3.rust diff --git a/Task/Greatest-common-divisor/Rust/greatest-common-divisor-4.rs b/Task/Greatest-common-divisor/Rust/greatest-common-divisor-4.rust similarity index 100% rename from Task/Greatest-common-divisor/Rust/greatest-common-divisor-4.rs rename to Task/Greatest-common-divisor/Rust/greatest-common-divisor-4.rust diff --git a/Task/Greatest-common-divisor/Rust/greatest-common-divisor-5.rs b/Task/Greatest-common-divisor/Rust/greatest-common-divisor-5.rust similarity index 100% rename from Task/Greatest-common-divisor/Rust/greatest-common-divisor-5.rs rename to Task/Greatest-common-divisor/Rust/greatest-common-divisor-5.rust diff --git a/Task/Greatest-common-divisor/Scheme/greatest-common-divisor-1.scm b/Task/Greatest-common-divisor/Scheme/greatest-common-divisor-1.ss similarity index 100% rename from Task/Greatest-common-divisor/Scheme/greatest-common-divisor-1.scm rename to Task/Greatest-common-divisor/Scheme/greatest-common-divisor-1.ss diff --git a/Task/Greatest-common-divisor/Scheme/greatest-common-divisor-2.scm b/Task/Greatest-common-divisor/Scheme/greatest-common-divisor-2.ss similarity index 100% rename from Task/Greatest-common-divisor/Scheme/greatest-common-divisor-2.scm rename to Task/Greatest-common-divisor/Scheme/greatest-common-divisor-2.ss diff --git a/Task/Greatest-common-divisor/TypeScript/greatest-common-divisor-3.ts b/Task/Greatest-common-divisor/TypeScript/greatest-common-divisor-3.ts new file mode 100644 index 0000000000..5069a3e212 --- /dev/null +++ b/Task/Greatest-common-divisor/TypeScript/greatest-common-divisor-3.ts @@ -0,0 +1 @@ +⊙◌⍢(⊃∘◿:)(±,) diff --git a/Task/Greatest-common-divisor/Uiua/greatest-common-divisor.uiua b/Task/Greatest-common-divisor/Uiua/greatest-common-divisor.uiua deleted file mode 100644 index cffa04c401..0000000000 --- a/Task/Greatest-common-divisor/Uiua/greatest-common-divisor.uiua +++ /dev/null @@ -1 +0,0 @@ -⊙◌⍢(⤙˜◿|◡⋅>₀) diff --git a/Task/Greatest-common-divisor/VBScript/greatest-common-divisor.vbs b/Task/Greatest-common-divisor/VBScript/greatest-common-divisor.vb similarity index 100% rename from Task/Greatest-common-divisor/VBScript/greatest-common-divisor.vbs rename to Task/Greatest-common-divisor/VBScript/greatest-common-divisor.vb diff --git a/Task/Greatest-common-divisor/YAMLScript/greatest-common-divisor.ys b/Task/Greatest-common-divisor/YAMLScript/greatest-common-divisor.ys deleted file mode 100644 index b77cb8bd55..0000000000 --- a/Task/Greatest-common-divisor/YAMLScript/greatest-common-divisor.ys +++ /dev/null @@ -1,9 +0,0 @@ -!YS-v0 - -defn main(a=42 b=63): - say: "gcd($a $b) -> $gcd(a b)" - -defn gcd(a b): - if b > 0: - recur b: a % b - else: a diff --git a/Task/Greatest-element-of-a-list/ALGOL-68/greatest-element-of-a-list.alg b/Task/Greatest-element-of-a-list/ALGOL-68/greatest-element-of-a-list.alg index fa4c980bbe..15570e56dd 100644 --- a/Task/Greatest-element-of-a-list/ALGOL-68/greatest-element-of-a-list.alg +++ b/Task/Greatest-element-of-a-list/ALGOL-68/greatest-element-of-a-list.alg @@ -1,7 +1,12 @@ -BEGIN -MODE FLT = REAL; # substitute any array type with ">" defined # +# substitute any array type with a scalar element # +MODE FLT = REAL; -PROC max = ([]FLT item, PROC VOID raise empty array)FLT: +# create an exception for the case of an empty array # +PROC raise empty array = VOID:( + GO TO except empty array +); + +PROC max = ([]FLT item)FLT: BEGIN IF LWB item > UPB item THEN raise empty array; SKIP @@ -17,11 +22,9 @@ BEGIN FI END # max #; -#test#( +test:( []FLT buf = (-275.0, -111.19, 0.0, -1234568.0, pi, -pi); - # handle an exception for the case of an empty array # - PROC have empty array = VOID:print(("empty array", newline)); - - print((max(buf,have empty array),new line)) + print((max(buf),new line)) EXIT + except empty array: + SKIP ) -END diff --git a/Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-1.adb b/Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-1.ada similarity index 100% rename from Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-1.adb rename to Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-1.ada diff --git a/Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-2.adb b/Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-2.ada similarity index 100% rename from Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-2.adb rename to Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-2.ada diff --git a/Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-3.adb b/Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-3.ada similarity index 100% rename from Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-3.adb rename to Task/Greatest-element-of-a-list/Ada/greatest-element-of-a-list-3.ada diff --git a/Task/Greatest-element-of-a-list/ArkScript/greatest-element-of-a-list.ark b/Task/Greatest-element-of-a-list/ArkScript/greatest-element-of-a-list.ark deleted file mode 100644 index 9a3429517e..0000000000 --- a/Task/Greatest-element-of-a-list/ArkScript/greatest-element-of-a-list.ark +++ /dev/null @@ -1,11 +0,0 @@ -(let max (fun (L) { - (mut index 0) - (mut output nil) - - (while (< index (len L)) { - (if (or (nil? output) (> (@ L index) output)) - (set output (@ L index))) - (set index (+ 1 index)) }) - output })) - -(print (max [1 2 3 0 -5 42 0 1])) diff --git a/Task/Greatest-element-of-a-list/Ballerina/greatest-element-of-a-list.ballerina b/Task/Greatest-element-of-a-list/Ballerina/greatest-element-of-a-list.ballerina deleted file mode 100644 index bdfeabbf46..0000000000 --- a/Task/Greatest-element-of-a-list/Ballerina/greatest-element-of-a-list.ballerina +++ /dev/null @@ -1,11 +0,0 @@ -import ballerina/io; - -function max(float[] a) returns float { - return float:max(...a); -} - -public function main() { - float[] a = [1.0, 2.3, 1.1, 5.0, - 3.0, 2.8, 2.01, 3.14159]; - io:println(max(a)); -} diff --git a/Task/Greatest-element-of-a-list/COBOL/greatest-element-of-a-list-1.cob b/Task/Greatest-element-of-a-list/COBOL/greatest-element-of-a-list-1.cobol similarity index 100% rename from Task/Greatest-element-of-a-list/COBOL/greatest-element-of-a-list-1.cob rename to Task/Greatest-element-of-a-list/COBOL/greatest-element-of-a-list-1.cobol diff --git a/Task/Greatest-element-of-a-list/COBOL/greatest-element-of-a-list-2.cob b/Task/Greatest-element-of-a-list/COBOL/greatest-element-of-a-list-2.cobol similarity index 100% rename from Task/Greatest-element-of-a-list/COBOL/greatest-element-of-a-list-2.cob rename to Task/Greatest-element-of-a-list/COBOL/greatest-element-of-a-list-2.cobol diff --git a/Task/Greatest-element-of-a-list/Crystal/greatest-element-of-a-list.cr b/Task/Greatest-element-of-a-list/Crystal/greatest-element-of-a-list.crystal similarity index 100% rename from Task/Greatest-element-of-a-list/Crystal/greatest-element-of-a-list.cr rename to Task/Greatest-element-of-a-list/Crystal/greatest-element-of-a-list.crystal diff --git a/Task/Greatest-element-of-a-list/Delphi/greatest-element-of-a-list.pas b/Task/Greatest-element-of-a-list/Delphi/greatest-element-of-a-list.delphi similarity index 100% rename from Task/Greatest-element-of-a-list/Delphi/greatest-element-of-a-list.pas rename to Task/Greatest-element-of-a-list/Delphi/greatest-element-of-a-list.delphi diff --git a/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-1.duckdb b/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-1.duckdb deleted file mode 100644 index 4128a2435f..0000000000 --- a/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-1.duckdb +++ /dev/null @@ -1 +0,0 @@ -select list_max( [1.0, 2.0, 3.14] ) as max; diff --git a/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-2.duckdb b/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-2.duckdb deleted file mode 100644 index cef71412c4..0000000000 --- a/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-2.duckdb +++ /dev/null @@ -1 +0,0 @@ -select list_max( [ ['a']::JSON, [{'a':0}]::JSON ] ) as max; diff --git a/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-3.duckdb b/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-3.duckdb deleted file mode 100644 index d018f76d12..0000000000 --- a/Task/Greatest-element-of-a-list/DuckDB/greatest-element-of-a-list-3.duckdb +++ /dev/null @@ -1,4 +0,0 @@ -create or replace function max_list(l) as ( - list_reduce(l, (acc, x) -> greatest(acc,x)) -); -select max_list( [ ['b']::JSON, ['a']::JSON ]); diff --git a/Task/Greatest-element-of-a-list/EasyLang/greatest-element-of-a-list.easy b/Task/Greatest-element-of-a-list/EasyLang/greatest-element-of-a-list.easy index 3f347d9e3d..d65b41b634 100644 --- a/Task/Greatest-element-of-a-list/EasyLang/greatest-element-of-a-list.easy +++ b/Task/Greatest-element-of-a-list/EasyLang/greatest-element-of-a-list.easy @@ -1,3 +1,5 @@ a[] = [ 2 9 4 3 8 5 ] -for e in a[] : max = higher e max +for e in a[] + max = higher e max +. print max diff --git a/Task/Greatest-element-of-a-list/Elena/greatest-element-of-a-list.elena b/Task/Greatest-element-of-a-list/Elena/greatest-element-of-a-list.elena index 2572fdf43b..7bc11c96f6 100644 --- a/Task/Greatest-element-of-a-list/Elena/greatest-element-of-a-list.elena +++ b/Task/Greatest-element-of-a-list/Elena/greatest-element-of-a-list.elena @@ -24,7 +24,7 @@ extension op } } -public Program() +public program() { console.printLine(new int[]{1,2,3,4,20,10,9,8}.Maximal) } diff --git a/Task/Greatest-element-of-a-list/Elixir/greatest-element-of-a-list.ex b/Task/Greatest-element-of-a-list/Elixir/greatest-element-of-a-list.elixir similarity index 100% rename from Task/Greatest-element-of-a-list/Elixir/greatest-element-of-a-list.ex rename to Task/Greatest-element-of-a-list/Elixir/greatest-element-of-a-list.elixir diff --git a/Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-1.el b/Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-1.l similarity index 100% rename from Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-1.el rename to Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-1.l diff --git a/Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-2.el b/Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-2.l similarity index 100% rename from Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-2.el rename to Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-2.l diff --git a/Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-3.el b/Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-3.l similarity index 100% rename from Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-3.el rename to Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-3.l diff --git a/Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-4.el b/Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-4.l similarity index 100% rename from Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-4.el rename to Task/Greatest-element-of-a-list/Emacs-Lisp/greatest-element-of-a-list-4.l diff --git a/Task/Greatest-element-of-a-list/Euphoria/greatest-element-of-a-list-1.eu b/Task/Greatest-element-of-a-list/Euphoria/greatest-element-of-a-list-1.euphoria similarity index 100% rename from Task/Greatest-element-of-a-list/Euphoria/greatest-element-of-a-list-1.eu rename to Task/Greatest-element-of-a-list/Euphoria/greatest-element-of-a-list-1.euphoria diff --git a/Task/Greatest-element-of-a-list/Euphoria/greatest-element-of-a-list-2.eu b/Task/Greatest-element-of-a-list/Euphoria/greatest-element-of-a-list-2.euphoria similarity index 100% rename from Task/Greatest-element-of-a-list/Euphoria/greatest-element-of-a-list-2.eu rename to Task/Greatest-element-of-a-list/Euphoria/greatest-element-of-a-list-2.euphoria diff --git a/Task/Greatest-element-of-a-list/Gleam/greatest-element-of-a-list-1.gleam b/Task/Greatest-element-of-a-list/Gleam/greatest-element-of-a-list-1.gleam deleted file mode 100644 index 26e97484fa..0000000000 --- a/Task/Greatest-element-of-a-list/Gleam/greatest-element-of-a-list-1.gleam +++ /dev/null @@ -1,8 +0,0 @@ -import gleam/int -import gleam/list - -pub fn main() { - [1, 99, 136, 4, 3, 22, 111] - |> list.max(int.compare) - |> echo -} diff --git a/Task/Greatest-element-of-a-list/Gleam/greatest-element-of-a-list-2.gleam b/Task/Greatest-element-of-a-list/Gleam/greatest-element-of-a-list-2.gleam deleted file mode 100644 index 24bda4cd6a..0000000000 --- a/Task/Greatest-element-of-a-list/Gleam/greatest-element-of-a-list-2.gleam +++ /dev/null @@ -1,20 +0,0 @@ -pub fn max( - over list: List(a), - with compare: fn(a, a) -> Order, -) -> Result(a, Nil) { - case list { - [] -> Error(Nil) - [first, ..rest] -> Ok(max_loop(rest, compare, first)) - } -} - -fn max_loop(list, compare, max) { - case list { - [] -> max - [first, ..rest] -> - case compare(first, max) { - order.Gt -> max_loop(rest, compare, first) - order.Lt | order.Eq -> max_loop(rest, compare, max) - } - } -} diff --git a/Task/Greatest-element-of-a-list/Julia/greatest-element-of-a-list.jl b/Task/Greatest-element-of-a-list/Julia/greatest-element-of-a-list.julia similarity index 100% rename from Task/Greatest-element-of-a-list/Julia/greatest-element-of-a-list.jl rename to Task/Greatest-element-of-a-list/Julia/greatest-element-of-a-list.julia diff --git a/Task/Greatest-element-of-a-list/Komodo/greatest-element-of-a-list.komodo b/Task/Greatest-element-of-a-list/Komodo/greatest-element-of-a-list.komodo deleted file mode 100644 index 8ecd71f500..0000000000 --- a/Task/Greatest-element-of-a-list/Komodo/greatest-element-of-a-list.komodo +++ /dev/null @@ -1,8 +0,0 @@ -let max([first|tail]) := max(first, tail) -let max(curMax, []) := curMax -let max(curMax, [first|tail]) := max( - if curMax > first then curMax else first, - tail, -) - -assert(max([3, 5, 7, 2, 4, 8, -1]) = 8) diff --git a/Task/Greatest-element-of-a-list/Kotlin/greatest-element-of-a-list.kts b/Task/Greatest-element-of-a-list/Kotlin/greatest-element-of-a-list.kotlin similarity index 100% rename from Task/Greatest-element-of-a-list/Kotlin/greatest-element-of-a-list.kts rename to Task/Greatest-element-of-a-list/Kotlin/greatest-element-of-a-list.kotlin diff --git a/Task/Greatest-element-of-a-list/Nu/greatest-element-of-a-list.nu b/Task/Greatest-element-of-a-list/Nu/greatest-element-of-a-list.nu deleted file mode 100644 index 82d037d42d..0000000000 --- a/Task/Greatest-element-of-a-list/Nu/greatest-element-of-a-list.nu +++ /dev/null @@ -1 +0,0 @@ -[1 5 3 11 7] | math max diff --git a/Task/Greatest-element-of-a-list/OCaml/greatest-element-of-a-list.ml b/Task/Greatest-element-of-a-list/OCaml/greatest-element-of-a-list.ocaml similarity index 100% rename from Task/Greatest-element-of-a-list/OCaml/greatest-element-of-a-list.ml rename to Task/Greatest-element-of-a-list/OCaml/greatest-element-of-a-list.ocaml diff --git a/Task/Greatest-element-of-a-list/PascalABC.NET/greatest-element-of-a-list.pas b/Task/Greatest-element-of-a-list/PascalABC.NET/greatest-element-of-a-list.pas deleted file mode 100644 index c2ed38704b..0000000000 --- a/Task/Greatest-element-of-a-list/PascalABC.NET/greatest-element-of-a-list.pas +++ /dev/null @@ -1,3 +0,0 @@ -## -var values := Lst(1,7,4,6,3,5,2,6); -values.Max.Print; diff --git a/Task/Greatest-element-of-a-list/Pluto/greatest-element-of-a-list.pluto b/Task/Greatest-element-of-a-list/Pluto/greatest-element-of-a-list.pluto deleted file mode 100644 index 794b3bbaf6..0000000000 --- a/Task/Greatest-element-of-a-list/Pluto/greatest-element-of-a-list.pluto +++ /dev/null @@ -1,2 +0,0 @@ -local list = {42, 7, -5, 11.7, 58, 22.31, 59, -18} -print(list:max()) diff --git a/Task/Greatest-element-of-a-list/PowerShell/greatest-element-of-a-list.ps1 b/Task/Greatest-element-of-a-list/PowerShell/greatest-element-of-a-list.psh similarity index 100% rename from Task/Greatest-element-of-a-list/PowerShell/greatest-element-of-a-list.ps1 rename to Task/Greatest-element-of-a-list/PowerShell/greatest-element-of-a-list.psh diff --git a/Task/Greatest-element-of-a-list/REBOL/greatest-element-of-a-list.rebol b/Task/Greatest-element-of-a-list/REBOL/greatest-element-of-a-list.rebol new file mode 100644 index 0000000000..952008c20e --- /dev/null +++ b/Task/Greatest-element-of-a-list/REBOL/greatest-element-of-a-list.rebol @@ -0,0 +1,14 @@ +REBOL [ + Title: "Maximum Value" + URL: http://rosettacode.org/wiki/Maximum_Value +] + +max: func [ + "Find maximum value in a list." + values [series!] "List of values." +] [ + first maximum-of values +] + +print ["Max of" mold d: [5 4 3 2 1] "is" max d] +print ["Max of" mold d: [-5 -4 -3 -2 -1] "is" max d] diff --git a/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-1.rebol b/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-1.rebol deleted file mode 100644 index 8adb252ada..0000000000 --- a/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-1.rebol +++ /dev/null @@ -1,14 +0,0 @@ -Rebol [ - Title: "Maximum Value" - URL: http://rosettacode.org/wiki/Maximum_Value -] - -max: func [ - "Find maximum value in a list." - values [series!] "List of values." -] [ - first maximum-of values -] - -print ["Max of" mold d: [5 4 3 2 1] "is" max d] -print ["Max of" mold d: [-5 -4 -3 -2 -1] "is" max d] diff --git a/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-2.rebol b/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-2.rebol deleted file mode 100644 index 1fc5e0cfa9..0000000000 --- a/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-2.rebol +++ /dev/null @@ -1,2 +0,0 @@ -print last sort [1 2 3 5 4] -;== 5 diff --git a/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-3.rebol b/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-3.rebol deleted file mode 100644 index 3fcee66127..0000000000 --- a/Task/Greatest-element-of-a-list/Rebol/greatest-element-of-a-list-3.rebol +++ /dev/null @@ -1,9 +0,0 @@ -vect: #(i16! [1 2 9 2 4]) -vect/maximum -;== 9 -query vect 'max -;== 9 -query vect [maximum minimum] -;== [maximum: 9 minimum: 1] -query vect [:maximum :minimum] -;== [9 1] diff --git a/Task/Greatest-element-of-a-list/Rust/greatest-element-of-a-list.rs b/Task/Greatest-element-of-a-list/Rust/greatest-element-of-a-list.rust similarity index 100% rename from Task/Greatest-element-of-a-list/Rust/greatest-element-of-a-list.rs rename to Task/Greatest-element-of-a-list/Rust/greatest-element-of-a-list.rust diff --git a/Task/Greatest-element-of-a-list/Rye/greatest-element-of-a-list.rye b/Task/Greatest-element-of-a-list/Rye/greatest-element-of-a-list.rye deleted file mode 100644 index aa0ce27a2a..0000000000 --- a/Task/Greatest-element-of-a-list/Rye/greatest-element-of-a-list.rye +++ /dev/null @@ -1 +0,0 @@ -print max { 3 22 4 9 10 } diff --git a/Task/Greatest-element-of-a-list/Scheme/greatest-element-of-a-list.scm b/Task/Greatest-element-of-a-list/Scheme/greatest-element-of-a-list.ss similarity index 100% rename from Task/Greatest-element-of-a-list/Scheme/greatest-element-of-a-list.scm rename to Task/Greatest-element-of-a-list/Scheme/greatest-element-of-a-list.ss diff --git a/Task/Greatest-element-of-a-list/TAV/greatest-element-of-a-list.tav b/Task/Greatest-element-of-a-list/TAV/greatest-element-of-a-list.tav deleted file mode 100644 index dedbbf5933..0000000000 --- a/Task/Greatest-element-of-a-list/TAV/greatest-element-of-a-list.tav +++ /dev/null @@ -1,4 +0,0 @@ -main (parms):+ - ? parms.Count < 2 - parms =: 5, 2, 7, 11, 4, 99, 33 - print maximum of parms diff --git a/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-3.tailspin b/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-3.tailspin index c1cd1001c7..e62dae2ed6 100644 --- a/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-3.tailspin +++ b/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-3.tailspin @@ -1,7 +1,2 @@ -[1, 5, 20, 3, 9, 7] -> \(@: $(1); - $(2..last)... -> # - $@ ! - - when <$@..> do @: $; -\) -> !OUT::write +[1, 5, 20, 3, 9, 7] -> \(@: $(1); $(2..last)... -> # $@ ! when <$@..> do @: $;\) -> !OUT::write // outputs 20 diff --git a/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-4.tailspin b/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-4.tailspin index 92a2a4b411..a330ba807a 100644 --- a/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-4.tailspin +++ b/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-4.tailspin @@ -1,8 +1,8 @@ -[1, 5, 20, 3, 9, 7] -> templates - @ set $(1); - $(2..)... -> !# - $@ ! +templates max + @: $(1); + $(2..last)... -> \(<$@max..> @max: $;\) -> !VOID + $@! +end max - when <|$@..> do @ set $; -end ! --- outputs 20 +[1, 5, 20, 3, 9, 7] -> max -> !OUT::write +// outputs 20 diff --git a/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-5.tailspin b/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-5.tailspin deleted file mode 100644 index a330ba807a..0000000000 --- a/Task/Greatest-element-of-a-list/Tailspin/greatest-element-of-a-list-5.tailspin +++ /dev/null @@ -1,8 +0,0 @@ -templates max - @: $(1); - $(2..last)... -> \(<$@max..> @max: $;\) -> !VOID - $@! -end max - -[1, 5, 20, 3, 9, 7] -> max -> !OUT::write -// outputs 20 diff --git a/Task/Greatest-element-of-a-list/True-BASIC/greatest-element-of-a-list.basic b/Task/Greatest-element-of-a-list/True-BASIC/greatest-element-of-a-list.basic deleted file mode 100644 index cf549f2611..0000000000 --- a/Task/Greatest-element-of-a-list/True-BASIC/greatest-element-of-a-list.basic +++ /dev/null @@ -1,16 +0,0 @@ -OPTION BASE 0 - -DIM vals(4) -LET vals(1) = 70.5 -LET vals(2) = 23.67 -LET vals(3) = 150.2 -LET vals(4) = 145 - -FUNCTION findmax - FOR x = 1 TO UBOUND(vals) - IF vals(x) > vals(x-1) THEN LET findmax = vals(x) - NEXT x -END FUNCTION - -PRINT findmax -END diff --git a/Task/Greatest-element-of-a-list/VBScript/greatest-element-of-a-list.vbs b/Task/Greatest-element-of-a-list/VBScript/greatest-element-of-a-list.vb similarity index 100% rename from Task/Greatest-element-of-a-list/VBScript/greatest-element-of-a-list.vbs rename to Task/Greatest-element-of-a-list/VBScript/greatest-element-of-a-list.vb diff --git a/Task/Greatest-subsequential-sum/ALGOL-68/greatest-subsequential-sum.alg b/Task/Greatest-subsequential-sum/ALGOL-68/greatest-subsequential-sum.alg index e720ed2065..71d6e84d21 100644 --- a/Task/Greatest-subsequential-sum/ALGOL-68/greatest-subsequential-sum.alg +++ b/Task/Greatest-subsequential-sum/ALGOL-68/greatest-subsequential-sum.alg @@ -1,3 +1,4 @@ +main: ( []INT a = (-1 , -2 , 3 , 5 , 6 , -2 , -1 , 4 , -4 , 2 , -1); @@ -22,7 +23,7 @@ OD; FOR i FROM begin max TO end max DO - print((" ",whole(a[i],0))) + print(a[i]) OD ) diff --git a/Task/Greatest-subsequential-sum/Ada/greatest-subsequential-sum.adb b/Task/Greatest-subsequential-sum/Ada/greatest-subsequential-sum.ada similarity index 100% rename from Task/Greatest-subsequential-sum/Ada/greatest-subsequential-sum.adb rename to Task/Greatest-subsequential-sum/Ada/greatest-subsequential-sum.ada diff --git a/Task/Greatest-subsequential-sum/Arturo/greatest-subsequential-sum.arturo b/Task/Greatest-subsequential-sum/Arturo/greatest-subsequential-sum.arturo index 59676b248e..a1470d3426 100644 --- a/Task/Greatest-subsequential-sum/Arturo/greatest-subsequential-sum.arturo +++ b/Task/Greatest-subsequential-sum/Arturo/greatest-subsequential-sum.arturo @@ -17,8 +17,8 @@ subarraySum: function [arr][ lst: i ] ] - switch lst > fst -> return @[mx, slice arr fst lst] - -> return [0, []] + if? lst > fst -> return @[mx, slice arr fst lst] + else -> return [0, []] ] sequences: @[ diff --git a/Task/Greatest-subsequential-sum/AutoIt/greatest-subsequential-sum.au3 b/Task/Greatest-subsequential-sum/AutoIt/greatest-subsequential-sum.autoit similarity index 100% rename from Task/Greatest-subsequential-sum/AutoIt/greatest-subsequential-sum.au3 rename to Task/Greatest-subsequential-sum/AutoIt/greatest-subsequential-sum.autoit diff --git a/Task/Greatest-subsequential-sum/Ballerina/greatest-subsequential-sum.ballerina b/Task/Greatest-subsequential-sum/Ballerina/greatest-subsequential-sum.ballerina deleted file mode 100644 index 3ee409c7ea..0000000000 --- a/Task/Greatest-subsequential-sum/Ballerina/greatest-subsequential-sum.ballerina +++ /dev/null @@ -1,42 +0,0 @@ -import ballerina/io; - -function gss(int[] s) returns [int[], int] { - int best = 0; - int strt = 0; - int end = 0; - int sum = 0; - int sumStart = 0; - foreach var [i, x] in s.enumerate() { - sum += x; - if sum > best { - best = sum; - strt = sumStart; - end = i + 1; - } else if sum < 0 { - sum = 0; - sumStart = i + 1; - } - } - return [s.slice(strt, end), best]; -} - -function A(any[] a) returns string { - return re `,`.replaceAll(a.toString(), ", "); -} - -public function main() { - var tests = [ - [-1, -2, 3, 5, 6, -2, -1, 4, -4, 2, -1], - [-1, 1, 2, -5, -6], - [], - [-1, -2, -1] - ]; - foreach var test in tests { - io:println("Input: ", A(test)); - var res = gss(test); - var subSeq = res[0]; - int sum = res[1]; - io:println("Sub seq: ", A(subSeq)); - io:println("Sum: ", sum, "\n"); - } -} diff --git a/Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-1.cr b/Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-1.crystal similarity index 100% rename from Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-1.cr rename to Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-1.crystal diff --git a/Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-2.cr b/Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-2.crystal similarity index 100% rename from Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-2.cr rename to Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-2.crystal diff --git a/Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-3.cr b/Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-3.crystal similarity index 100% rename from Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-3.cr rename to Task/Greatest-subsequential-sum/Crystal/greatest-subsequential-sum-3.crystal diff --git a/Task/Greatest-subsequential-sum/DuckDB/greatest-subsequential-sum.duckdb b/Task/Greatest-subsequential-sum/DuckDB/greatest-subsequential-sum.duckdb deleted file mode 100644 index b989bd5e2b..0000000000 --- a/Task/Greatest-subsequential-sum/DuckDB/greatest-subsequential-sum.duckdb +++ /dev/null @@ -1,32 +0,0 @@ -create or replace function list_find_last_nonnegative(lst) as ( - select first(i) - from range(length(lst), 0, -1) t(i) - where lst[i] > 0 -); - -# Return the tuple (start, end, subtotal) for the subsequence lst[start:end] -# having a maximal subtotal for the given value of `start`. -# Initial negative numbers are ignored. -# It is assumed that the caller has taken care of trailing negative numbers. -create or replace function max_initial_subsequential_sum(lst, start) as ( - select max_by( (start,i,total), total) - from ( SELECT i, list_sum(lst[start:i]) as total - FROM range(start, length(lst)+1) t(i) - WHERE lst[start] >= 0 ) -); - -# If the list is empty or if the items are all negative, return [] -create or replace function subsequence_with_maximal_sum(lst) as ( - with cte as (select list_find_last_nonnegative(lst) as len) - select coalesce(max_by( lst[ mis[1]: mis[2]], mis[3] ), []) - from ( SELECT max_initial_subsequential_sum(lst,start) as mis - FROM (select unnest(range(1, 1 + len)) as start from cte) ) -); - -# Examples -select s, subsequence_with_maximal_sum(s) as subseq -from values - ([1,2,3,-1, 10]), - ([-1,2,3,-1, 10]), - ([-1,-2]), - ([]) as t(s); diff --git a/Task/Greatest-subsequential-sum/EasyLang/greatest-subsequential-sum.easy b/Task/Greatest-subsequential-sum/EasyLang/greatest-subsequential-sum.easy deleted file mode 100644 index 90385e92e1..0000000000 --- a/Task/Greatest-subsequential-sum/EasyLang/greatest-subsequential-sum.easy +++ /dev/null @@ -1,21 +0,0 @@ -proc max_subseq &seq[] &start &stop &maxsum . - maxsum = 0 - i = 1 - start = 1 - stop = 0 - for j to len seq[] - sum += seq[j] - if sum < 0 - i = j + 1 - sum = 0 - elif sum > maxsum - start = i - stop = j - maxsum = sum - . - . -. -a[] = [ -1 -2 3 5 6 -2 -1 4 -4 2 -1 ] -max_subseq a[] a b sum -print "Max sum = " & sum -for i = a to b : write a[i] & " " diff --git a/Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-1.ex b/Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-1.elixir similarity index 100% rename from Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-1.ex rename to Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-1.elixir diff --git a/Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-2.ex b/Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-2.elixir similarity index 100% rename from Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-2.ex rename to Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-2.elixir diff --git a/Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-3.ex b/Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-3.elixir similarity index 100% rename from Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-3.ex rename to Task/Greatest-subsequential-sum/Elixir/greatest-subsequential-sum-3.elixir diff --git a/Task/Greatest-subsequential-sum/Euphoria/greatest-subsequential-sum.eu b/Task/Greatest-subsequential-sum/Euphoria/greatest-subsequential-sum.euphoria similarity index 100% rename from Task/Greatest-subsequential-sum/Euphoria/greatest-subsequential-sum.eu rename to Task/Greatest-subsequential-sum/Euphoria/greatest-subsequential-sum.euphoria diff --git a/Task/Greatest-subsequential-sum/FutureBasic/greatest-subsequential-sum.basic b/Task/Greatest-subsequential-sum/FutureBasic/greatest-subsequential-sum.basic deleted file mode 100644 index 836a0f87a4..0000000000 --- a/Task/Greatest-subsequential-sum/FutureBasic/greatest-subsequential-sum.basic +++ /dev/null @@ -1,64 +0,0 @@ -_rndlen = 01 //BOOL: is sequence length random or fixed -_maxlen = 14 //Length of each/longest sequence -_maxVal = 20 //Largest number (pos or neg) in sequence -_repeat = 25 //Number of sequences to evaluate - -void local fn maxSubSequence - int i, j, seq(_maxlen), ndx(_maxlen + 1),sum(_maxlen) - int grp, maxSum, maxNdx, maxEnd, tot, iterations = _repeat - - while iterations - iterations-- - - // Create random sequence - int count = (_rndlen) ? rnd(_maxlen) : _maxlen - for i = 1 to count - seq(i) = rnd(_maxVal * 2 + 1) - _maxVal - 1 - next - - // Determine maximum sub-sequence - bool isNeg = yes : grp = 0 : sum(0) = 0 : ndx(0) = 0 - maxSum = 0 : maxNdx = 0 : maxEnd = 0 - - for i = 1 to count // Merge array into groups of like signs - if (seq(i) < 0) <> isNeg // If change of sign... - grp ++ // Start new group - isNeg = yes - isNeg - ndx(grp) = i - sum(grp) = 0 - end if - sum(grp) += seq(i) - next - ndx(grp + 1) = 0 - - for i = 1 to grp step 2 // Determine max sub-sequence - j = i : tot = sum(j) - do - if tot > maxSum - maxSum = tot - maxNdx = ndx(i) - maxEnd = ndx(j + 1) - end if - j += 2 : tot += sum(j - 1) + sum(j) // add next neg & pos groups - until j > grp - next - - // Print result - print @" Sum = "; maxSum, " {"; - for i = 1 to count - if i == maxNdx then text ,,, _zCyan - if i == maxEnd then text ,,, fn ColorClear - print " "; seq(i); " "; - next - text ,,, fn ColorClear - print "}" - - wend -end fn - -window 1, @"Maximum subsequence" -CFTimeInterval t : t = fn CACurrentMediaTime -fn maxSubSequence -printf @"\n %d random sequences created, solved, and printed in %.3f sec.",_repeat,1*(fn CACurrentMediaTime - t) - -handleevents diff --git a/Task/Greatest-subsequential-sum/Julia/greatest-subsequential-sum.jl b/Task/Greatest-subsequential-sum/Julia/greatest-subsequential-sum.julia similarity index 100% rename from Task/Greatest-subsequential-sum/Julia/greatest-subsequential-sum.jl rename to Task/Greatest-subsequential-sum/Julia/greatest-subsequential-sum.julia diff --git a/Task/Greatest-subsequential-sum/Kotlin/greatest-subsequential-sum.kts b/Task/Greatest-subsequential-sum/Kotlin/greatest-subsequential-sum.kotlin similarity index 100% rename from Task/Greatest-subsequential-sum/Kotlin/greatest-subsequential-sum.kts rename to Task/Greatest-subsequential-sum/Kotlin/greatest-subsequential-sum.kotlin diff --git a/Task/Greatest-subsequential-sum/Lua/greatest-subsequential-sum.lua b/Task/Greatest-subsequential-sum/Lua/greatest-subsequential-sum.lua index cbf5481d51..23551e0e51 100644 --- a/Task/Greatest-subsequential-sum/Lua/greatest-subsequential-sum.lua +++ b/Task/Greatest-subsequential-sum/Lua/greatest-subsequential-sum.lua @@ -8,25 +8,7 @@ function maxsub(ary, idx) end local v = maxsub(ary, idx + 1) if maxsum < sumt(v, 1, #v) then return v end - local ret, allNegative = {}, true - for i = idx, last do - ret[#ret+1] = ary[i] - if ret[#ret] >= 0 then allNegative = false end - end - return allNegative and {} or ret + local ret = {} + for i = idx, last do ret[#ret+1] = ary[i] end + return ret end - -local function test(s) - local msub = maxsub(s) - print("["..table.concat(s, " ").."] -> ["..table.concat(msub, " ").."] sum: "..sumt(msub, 1, #msub)) -end - --- test cases from 11l -test {-1, 2, -1} -test {-1, 2, -1, 3, -1} -test {-1, 1, 2, -5, -6} -test {-1, -2, 3, 5, 6, -2, -1, 4, -4, 2, -1} - --- additional test cases -test {-1, -2, -1} -test {} diff --git a/Task/Greatest-subsequential-sum/M2000-Interpreter/greatest-subsequential-sum-1.m2000 b/Task/Greatest-subsequential-sum/M2000-Interpreter/greatest-subsequential-sum-1.m2000 deleted file mode 100644 index 1eb7221eed..0000000000 --- a/Task/Greatest-subsequential-sum/M2000-Interpreter/greatest-subsequential-sum-1.m2000 +++ /dev/null @@ -1,26 +0,0 @@ -module Greatest_subsequential_sum { - showGSS=lambda (a)->{ - function Greatest_subsequential_sum(a as array){ - s=a#sum() - =a - p=len(a)-1 - if p<0 then exit - for i=0 to p - for j=i to p - k= a#slice(i, j) - m=k#sum() - if m>s then =k: s=m - next - next - } - = "("+a#str$(",")+") -> ("+ Greatest_subsequential_sum(a)#str$(",")+")" - } - open "out.txt" for output as#f - print #f, showGSS((-1 , 2 , -1)) - print #f, showGSS((-1, 2, -1, 3, -1)) - print #f, showGSS((-1, 1, 2, -5, -6)) - print #f, showGSS((-1 , -2 , 3 , 5 , 6 , -2 , -1 , 4 , -4 , 2 , -1)) - close #f - win notepad, dir$+"out.txt" -} -Greatest_subsequential_sum diff --git a/Task/Greatest-subsequential-sum/M2000-Interpreter/greatest-subsequential-sum-2.m2000 b/Task/Greatest-subsequential-sum/M2000-Interpreter/greatest-subsequential-sum-2.m2000 deleted file mode 100644 index a16c08d534..0000000000 --- a/Task/Greatest-subsequential-sum/M2000-Interpreter/greatest-subsequential-sum-2.m2000 +++ /dev/null @@ -1,36 +0,0 @@ -module Greatest_subsequential_sum (filename) { - showGSS=lambda (a)->{ - function Greatest_subsequential_sum(a as array){ - var best = 0 - var start = 0 - var end = 0 - var sum = 0 - var sumStart = 0 - var i = 0 - s=each(a) - while s { - sum +=array(s) - if (sum > best) then { - best = sum - start = sumStart - end = i + 1 - } else.if (sum < 0) then { - sum = 0 - sumStart = i + 1 - } - i++ - } - =a#slice(start, end-1) - } - = "("+a#str$(",")+") -> ("+ Greatest_subsequential_sum(a)#str$(",")+")" - } - open filename for output as#f - print #f, showGSS((-1 , 2 , -1)) - print #f, showGSS((-1, 2, -1, 3, -1)) - print #f, showGSS((-1, 1, 2, -5, -6)) - print #f, showGSS((-1 , -2 , 3 , 5 , 6 , -2 , -1 , 4 , -4 , 2 , -1)) - close #f - if filename<>"" then win notepad, dir$+filename -} -Greatest_subsequential_sum "" ' to screen -Greatest_subsequential_sum "out.txt" diff --git a/Task/Greatest-subsequential-sum/OCaml/greatest-subsequential-sum.ml b/Task/Greatest-subsequential-sum/OCaml/greatest-subsequential-sum.ocaml similarity index 100% rename from Task/Greatest-subsequential-sum/OCaml/greatest-subsequential-sum.ml rename to Task/Greatest-subsequential-sum/OCaml/greatest-subsequential-sum.ocaml diff --git a/Task/Greatest-subsequential-sum/PascalABC.NET/greatest-subsequential-sum.pas b/Task/Greatest-subsequential-sum/PascalABC.NET/greatest-subsequential-sum.pas deleted file mode 100644 index 0f5860e32e..0000000000 --- a/Task/Greatest-subsequential-sum/PascalABC.NET/greatest-subsequential-sum.pas +++ /dev/null @@ -1,28 +0,0 @@ -function MaxSumSeq(a: array of integer): (integer,integer,integer); -begin - var (maxSum,thisSum) := (0,0); - var (f,t) := (0,-1); - var k := 0; - for var j:=0 to a.Length-1 do - begin - thisSum += a[j]; - if thisSum < 0 then - begin - k := j + 1; - thisSum := 0; - end - else if thisSum > maxSum then - begin - maxSum := thisSum; - f := k; - t := j - end; - end; - Result := (f,t,maxSum); -end; - -begin - var a := Arr(-1 , -2 , 3 , 5 , 6 , -2 , -1 , 4 , -4 , 2 , -1); - var (f,t,max) := MaxSumSeq(a); - Print('Subsequence with max sum:', a[f:t+1], 'It''s sum:', max); -end. diff --git a/Task/Greatest-subsequential-sum/Phix/greatest-subsequential-sum.phix b/Task/Greatest-subsequential-sum/Phix/greatest-subsequential-sum.phix index 8229d70663..98711bab7a 100644 --- a/Task/Greatest-subsequential-sum/Phix/greatest-subsequential-sum.phix +++ b/Task/Greatest-subsequential-sum/Phix/greatest-subsequential-sum.phix @@ -1,17 +1,19 @@ -with javascript_semantics -function maxSubseq(sequence s) - integer maxsum = 0, first = 1, last = 0 - for i=1 to length(s) do - integer sumsij = 0 - for j=i to length(s) do - sumsij += s[j] - if sumsij>maxsum then - {maxsum,first,last} = {sumsij,i,j} - end if - end for - end for - return s[first..last] -end function -? maxSubseq({-1, -2, 3, 5, 6, -2, -1, 4, -4, 2, -1}) -? maxSubseq({}) -? maxSubseq({-1, -5, -3}) +(phixonline)--> + with javascript_semantics + function maxSubseq(sequence s) + integer maxsum = 0, first = 1, last = 0 + for i=1 to length(s) do + integer sumsij = 0 + for j=i to length(s) do + sumsij += s[j] + if sumsij>maxsum then + {maxsum,first,last} = {sumsij,i,j} + end if + end for + end for + return s[first..last] + end function + ? maxSubseq({-1, -2, 3, 5, 6, -2, -1, 4, -4, 2, -1}) + ? maxSubseq({}) + ? maxSubseq({-1, -5, -3}) + + with javascript_semantics + include mpfr.e + function egyptian(integer num, denom) + mpz n = mpz_init(num), + d = mpz_init(denom), + t = mpz_init() + sequence result = {} + while mpz_cmp_si(n,0)!=0 do + mpz_cdiv_q(t, d, n) + result = append(result,"1/"&mpz_get_str(t)) + mpz_neg(d,d) + mpz_mod(n,d,n) + mpz_neg(d,d) + mpz_mul(d,d,t) + end while + {n,d} = mpz_free({n,d}) + return result + end function -procedure efrac(integer num, denom) - string fraction = sprintf("%d/%d",{num,denom}), - prefix = "" - if num>=denom then - integer whole = floor(num/denom) - num -= whole*denom - prefix = sprintf("[%d] + ",whole) - end if - string e = join(egyptian(num, denom)," + ") - printf(1,"%s -> %s%s\n",{fraction,prefix,e}) -end procedure + procedure efrac(integer num, denom) + string fraction = sprintf("%d/%d",{num,denom}), + prefix = "" + if num>=denom then + integer whole = floor(num/denom) + num -= whole*denom + prefix = sprintf("[%d] + ",whole) + end if + string e = join(egyptian(num, denom)," + ") + printf(1,"%s -> %s%s\n",{fraction,prefix,e}) + end procedure -efrac(43,48) -efrac(5,121) -efrac(2014,59) + efrac(43,48) + efrac(5,121) + efrac(2014,59) -integer maxt = 0, - maxd = 0 -string maxts = "", - maxds = "", - maxda = "" + integer maxt = 0, + maxd = 0 + string maxts = "", + maxds = "", + maxda = "" -for r=98 to 998 by 900 do -- (iterates just twice!) - sequence sieve = repeat(repeat(false,r+1),r) -- to eliminate duplicates - for n=1 to r do - for d=n+1 to r+1 do - if sieve[n][d]=false then - string term = sprintf("%d/%d",{n,d}) - sequence terms = egyptian(n,d) - integer nterms = length(terms) - if nterms>maxt then - maxt = nterms - maxts = term - elsif nterms=maxt then - maxts &= ", " & term - end if - integer mlen = length(terms[$])-2 - if mlen>maxd then - maxd = mlen - maxds = term - maxda = terms[$] - elsif mlen=maxd then - maxds &= ", " & term - end if - if n r+1 then exit end if - sieve[n*k][d*k] = true - end for - end if - end if - end for - end for - printf(1,"\nfor proper fractions with 1 to %d digits\n",{length(sprint(r))}) - printf(1,"Largest number of terms is %d for %s\n",{maxt,maxts}) - maxda = maxda[3..$] -- (strip the "1/") - maxda[6..-6]="..." -- (show only first/last 5 digits) - printf(1,"Largest size for denominator is %d digits (%s) for %s\n",{maxd,maxda,maxds}) -end for + for r=98 to 998 by 900 do -- (iterates just twice!) + sequence sieve = repeat(repeat(false,r+1),r) -- to eliminate duplicates + for n=1 to r do + for d=n+1 to r+1 do + if sieve[n][d]=false then + string term = sprintf("%d/%d",{n,d}) + sequence terms = egyptian(n,d) + integer nterms = length(terms) + if nterms>maxt then + maxt = nterms + maxts = term + elsif nterms=maxt then + maxts &= ", " & term + end if + integer mlen = length(terms[$])-2 + if mlen>maxd then + maxd = mlen + maxds = term + maxda = terms[$] + elsif mlen=maxd then + maxds &= ", " & term + end if + if n<r/2 then + for k=2 to 9999 do + if d*k > r+1 then exit end if + sieve[n*k][d*k] = true + end for + end if + end if + end for + end for + printf(1,"\nfor proper fractions with 1 to %d digits\n",{length(sprint(r))}) + printf(1,"Largest number of terms is %d for %s\n",{maxt,maxts}) + maxda = maxda[3..$] -- (strip the "1/") + maxda[6..-6]="..." -- (show only first/last 5 digits) + printf(1,"Largest size for denominator is %d digits (%s) for %s\n",{maxd,maxda,maxds}) + end for + OpenSSL Stuffs <-- -extern BIO_new_ssl_connect -extern BIO_ctrl -extern BIO_write -extern BIO_read -extern BIO_free_all -extern TLS_client_method -extern SSL_CTX_new -extern SSL_CTX_free -extern SSL_CTX_set_verify -extern SSL_CTX_set_default_verify_paths -extern SSL_ctrl - -%define BIO_C_SET_CONNECT 100 -%define BIO_C_DO_STATE 101 -%define BIO_C_GET_SSL 110 -%define SSL_CTRL_SET_TLSHOST 55 -%define SSL_VERIFY_PEER 1 - -section .text - global xrequest - xrequest: - prolog 6*8 - %define _req_host rbp-1*8 - %define _req_pack rbp-2*8 - %define _req_buff rbp-3*8 - %define _req_ssl rbp-4*8 - %define _req_ctx rbp-5*8 - %define _req_bio rbp-6*8 - - mov rax, rdi - mov qword [_req_host], rax - mov rax, rsi - mov qword [_req_pack], rax - mov rax, rdx - mov qword [_req_buff], rax - xcall TLS_client_method - mov rdi, rax - xcall SSL_CTX_new - test rax, rax - jz __req_err_ctx - mov qword [_req_ctx], rax - mov rdi, qword [_req_ctx] - xcall SSL_CTX_set_default_verify_paths - test eax, eax - jz __req_err_verify - mov rdx, 0 - mov rsi, SSL_VERIFY_PEER - mov rdi, qword [_req_ctx] - xcall SSL_CTX_set_verify - ;;-->> Create Bio chain - mov rdi, qword [_req_ctx] - xcall BIO_new_ssl_connect - test rax, rax - jz __req_err_bio - mov qword [_req_bio], rax - ;;-->> Get SSL object - lea rcx, [_req_ssl] - mov rdx, 0 - mov rsi, BIO_C_GET_SSL - mov rdi, qword [_req_bio] - xcall BIO_ctrl - - ;; -->> Set the SNI hostname. - mov rdi, qword [_req_host] - xcall strdup - mov rdx, rax ; rdx now holds the copy - push rdx ; Push pointer to stack - mov rdi, rdx - mov rsi, ':' - xcall strchr - test rax, rax - jz __req_sni_set - mov byte [rax], 0 ; Null-terminate at colon - __req_sni_set: - mov rdi, qword [_req_ssl] - mov rsi, SSL_CTRL_SET_TLSHOST - mov rdx, 0 - mov rcx, [rsp] - xcall SSL_ctrl - pop rdi - xcall free - ;; -->>Set Hostname (BIO expects "host:port") - mov rdi, qword [_req_bio] - mov rsi, BIO_C_SET_CONNECT - mov rdx, 0 - mov rcx, qword [_req_host] - xcall BIO_ctrl - mov rdi, qword [_req_bio] - mov rsi, BIO_C_DO_STATE - mov rdx, 0 - mov rcx, 0 - xcall BIO_ctrl - cmp rax, 1 - jl __req_err_conn - - ;; -->> Send Request - mov rdi, qword [_req_pack] - xcall strlen - mov rdx, rax - mov rdi, qword [_req_bio] - mov rsi, qword [_req_pack] - xcall BIO_write - - ; -->> Read Response Loop - __req_read_loop: - mov rdi, qword [_req_bio] - mov rsi, qword [_req_buff] - mov rdx, 1024 - xcall BIO_read - test eax, eax - jle __req_exit - add qword [_req_buff], rax - jmp __req_read_loop - - - __req_err_bio: - mov r13, -1 - jmp __req_exit - __req_err_verify: - mov r13, -2 - jmp __req_exit - __req_err_ctx: - ;;-->> CTX Error - mov r13, -3 - jmp __req_exit - __req_err_conn: - mov r13, -4 - ;; fall through.. - __req_exit: - mov r13, rax - mov rdi, qword [_req_bio] - xcall BIO_free_all - mov rdi, qword [_req_ctx] - xcall SSL_CTX_free - mov rax, r13 - epilog 6*8 - ret - - global main - main: - prolog 4*8 - - ; request(hostname, request_str, buffer) - xlea rdi, hostname - xlea rsi, request_str - xlea rdx, buffer - call xrequest - mov rsi, rax - xlea rdi, fmt_ret - xcall printf - - ; Print the response buffer - xlea rdi, fmt_str - xlea rsi, buffer - xor rax, rax - xcall printf - xor rdi, rdi - xcall exit - prolog 4*8 ;;Never gets here but w/e. - ret - -section .data - hostname db "google.com:443", 0 - request_str db "GET / HTTP/1.1", 13, 10 - db "Host: google.com", 13, 10 - db "Connection: close", 13, 10 - db "User-Agent: TLS-TEST/0.5", 13, 10 - db 13, 10, 0 - - fmt_str db "%s", 0 - fmt_ret db "%i",10,0 - -section .bss - buffer resb 16384 diff --git a/Task/Hailstone-sequence/Ada/hailstone-sequence-1.adb b/Task/Hailstone-sequence/Ada/hailstone-sequence-1.ada similarity index 100% rename from Task/Hailstone-sequence/Ada/hailstone-sequence-1.adb rename to Task/Hailstone-sequence/Ada/hailstone-sequence-1.ada diff --git a/Task/Hailstone-sequence/Ada/hailstone-sequence-2.adb b/Task/Hailstone-sequence/Ada/hailstone-sequence-2.ada similarity index 100% rename from Task/Hailstone-sequence/Ada/hailstone-sequence-2.adb rename to Task/Hailstone-sequence/Ada/hailstone-sequence-2.ada diff --git a/Task/Hailstone-sequence/Ada/hailstone-sequence-3.adb b/Task/Hailstone-sequence/Ada/hailstone-sequence-3.ada similarity index 100% rename from Task/Hailstone-sequence/Ada/hailstone-sequence-3.adb rename to Task/Hailstone-sequence/Ada/hailstone-sequence-3.ada diff --git a/Task/Hailstone-sequence/Ada/hailstone-sequence-4.adb b/Task/Hailstone-sequence/Ada/hailstone-sequence-4.ada similarity index 100% rename from Task/Hailstone-sequence/Ada/hailstone-sequence-4.adb rename to Task/Hailstone-sequence/Ada/hailstone-sequence-4.ada diff --git a/Task/Hailstone-sequence/Arturo/hailstone-sequence.arturo b/Task/Hailstone-sequence/Arturo/hailstone-sequence.arturo index 1050130f7d..a8510e757c 100644 --- a/Task/Hailstone-sequence/Arturo/hailstone-sequence.arturo +++ b/Task/Hailstone-sequence/Arturo/hailstone-sequence.arturo @@ -1,10 +1,10 @@ hailstone: function [n][ ret: @[n] while [n>1][ - switch 1 = and n 1 -> n: 1+3*n - -> n: n/2 + if? 1 = and n 1 -> n: 1+3*n + else -> n: n/2 - append 'ret n + 'ret ++ n ] ret ] diff --git a/Task/Hailstone-sequence/AutoIt/hailstone-sequence.au3 b/Task/Hailstone-sequence/AutoIt/hailstone-sequence.autoit similarity index 100% rename from Task/Hailstone-sequence/AutoIt/hailstone-sequence.au3 rename to Task/Hailstone-sequence/AutoIt/hailstone-sequence.autoit diff --git a/Task/Hailstone-sequence/Ballerina/hailstone-sequence.ballerina b/Task/Hailstone-sequence/Ballerina/hailstone-sequence.ballerina deleted file mode 100644 index 775dc1646d..0000000000 --- a/Task/Hailstone-sequence/Ballerina/hailstone-sequence.ballerina +++ /dev/null @@ -1,34 +0,0 @@ -import ballerina/io; - -function hailstone(int m) returns int[] { - int n = m; - int[] h = [n]; - while n != 1 { - n = n % 2 == 0 ? n / 2 : 3 * n + 1; - h.push(n); - } - return h; -} - -public function main() { - int[] h = hailstone(27); - int len = h.length(); - io:println("For the Hailstone sequence starting with n = 27:"); - io:println(" Number of elements = ", len); - io:println(" First four elements = ", h.slice(0, 4)); - io:println(" Final four elements = ", h.slice(len - 4)); - - io:println("\nThe Hailstone sequence for n < 100,000 with the longest length is:"); - int longest = 0; - int longlen = 0; - foreach int n in 1...99999 { - h = hailstone(n); - len = h.length(); - if len > longlen { - longest = n; - longlen = len; - } - } - io:println(` Longest = ${longest}`); - io:println(` Length = ${longlen}`); -} diff --git a/Task/Hailstone-sequence/Binary-Lambda-Calculus/hailstone-sequence.blc b/Task/Hailstone-sequence/Binary-Lambda-Calculus/hailstone-sequence.blc deleted file mode 100644 index 85e3c77b13..0000000000 --- a/Task/Hailstone-sequence/Binary-Lambda-Calculus/hailstone-sequence.blc +++ /dev/null @@ -1,40 +0,0 @@ -(let ((div2 (lambda (n) - (n (lambda (x) - (x (lambda (so-far odd?) - (odd? - ;; lambda (p) here and after is inlined cons - (lambda (p) - (p - ;; Inlined successor - (lambda (f x) - (f (so-far f x))) - nil)) - ;; cons so-far t - (lambda (p) (p so-far t)))))) - (lambda (p) (p 0 nil))))) - (fixpoint-combinator - #+nil - (lambda (g) - (let ((inner (lambda (x) (g (x x))))) - (inner inner))) - (lambda (f) - (let ((inner (lambda (x) - (f (lambda (y) - (x x y)))))) - (inner inner)))) - (hailstone (fixpoint-combinator - (lambda (recur n) - ((div2 n) - (lambda (half n-odd?) - (half - (lambda (x) - ;; lambda (p) is inlined cons - (lambda (p) - (p n (recur (n-odd? - (lambda (f x) - ;; (succ (mult 3 n)) - (f (3 (n f) x))) - half))))) - ;; lambda (p) is inlined cons - (lambda (p) (p 1 nil))))))))) - hailstone) diff --git a/Task/Hailstone-sequence/COBOL/hailstone-sequence.cob b/Task/Hailstone-sequence/COBOL/hailstone-sequence.cobol similarity index 100% rename from Task/Hailstone-sequence/COBOL/hailstone-sequence.cob rename to Task/Hailstone-sequence/COBOL/hailstone-sequence.cobol diff --git a/Task/Hailstone-sequence/Common-Lisp/hailstone-sequence.lisp b/Task/Hailstone-sequence/Common-Lisp/hailstone-sequence.lisp index c113be9365..88bd0f3f1f 100644 --- a/Task/Hailstone-sequence/Common-Lisp/hailstone-sequence.lisp +++ b/Task/Hailstone-sequence/Common-Lisp/hailstone-sequence.lisp @@ -3,7 +3,7 @@ ((evenp n) (cons n (hailstone (/ n 2)))) (t (cons n (hailstone (+ (* 3 n) 1)))))) -(defun longest-hailstone (n) +(defun longest (n) (let ((k 0) (l 0)) (loop for i from 1 below n do (let ((len (length (hailstone i)))) diff --git a/Task/Hailstone-sequence/Crystal/hailstone-sequence.cr b/Task/Hailstone-sequence/Crystal/hailstone-sequence.crystal similarity index 100% rename from Task/Hailstone-sequence/Crystal/hailstone-sequence.cr rename to Task/Hailstone-sequence/Crystal/hailstone-sequence.crystal diff --git a/Task/Hailstone-sequence/Delphi/hailstone-sequence-1.pas b/Task/Hailstone-sequence/Delphi/hailstone-sequence-1.delphi similarity index 100% rename from Task/Hailstone-sequence/Delphi/hailstone-sequence-1.pas rename to Task/Hailstone-sequence/Delphi/hailstone-sequence-1.delphi diff --git a/Task/Hailstone-sequence/Delphi/hailstone-sequence-2.pas b/Task/Hailstone-sequence/Delphi/hailstone-sequence-2.delphi similarity index 100% rename from Task/Hailstone-sequence/Delphi/hailstone-sequence-2.pas rename to Task/Hailstone-sequence/Delphi/hailstone-sequence-2.delphi diff --git a/Task/Hailstone-sequence/DuckDB/hailstone-sequence.duckdb b/Task/Hailstone-sequence/DuckDB/hailstone-sequence.duckdb deleted file mode 100644 index d1d48d9211..0000000000 --- a/Task/Hailstone-sequence/DuckDB/hailstone-sequence.duckdb +++ /dev/null @@ -1,27 +0,0 @@ -# Generate the hailstone sequence without an index -create or replace function hailstone(start) as table ( - with recursive cte as ( - select start as n - union all - select if( n % 2 = 0, n // 2, 3 * n + 1) as n - from cte - where n != 1 - ) from cte -); - -# The length of the hailstone sequence of nn using count() -create or replace function hailstone_length(nn) as ( - select count() as n from hailstone(nn) -); - -# Return a tuple giving the seed and the hailstone sequence length -create or replace function hailstone_max_of_lengths(mx) as ( - select max_by( (n,hailstone_length(n)), hailstone_length(n)) - from range(1,mx+1) _(n) -); - -# Table of lengths (e.g. for use with histogram()) -create or replace function hailstone_lengths(mx) as table ( - select hailstone_length(n) as length - from range(1,mx+1) _(n) -); diff --git a/Task/Hailstone-sequence/EMal/hailstone-sequence.emal b/Task/Hailstone-sequence/EMal/hailstone-sequence.emal index 88e9413884..535c4f65df 100644 --- a/Task/Hailstone-sequence/EMal/hailstone-sequence.emal +++ b/Task/Hailstone-sequence/EMal/hailstone-sequence.emal @@ -1,26 +1,26 @@ -fun hailstone ← List by int n - List h ← int[n] - while n ≠ 1 - n ← when((n % 2 æ 0), n / 2, 3 * n + 1) +fun hailstone = List by int n + List h = int[n] + while n != 1 + n = when((n % 2 == 0), n / 2, 3 * n + 1) h.append(n) end return h end -int NUMBER ← 27 -int LESS_THAN ← 100000 -List sequence ← hailstone(NUMBER) +int NUMBER = 27 +int LESS_THAN = 100000 +List sequence = hailstone(NUMBER) writeLine("The hailstone sequence for the number " + NUMBER + " has " + sequence.length + " elements") writeLine("starting with " + sequence.extractStart(4).join(", ") + " and ending with " + sequence.extractEnd(4).join(", ") + ".") -int number ← 0 -sequence ← int[] -for int i ← 1; i < LESS_THAN; ++i - List current ← hailstone(i) +int number = 0 +sequence = int[] +for int i = 1; i < LESS_THAN; ++i + List current = hailstone(i) if current.length > sequence.length - sequence ← current - number ← i + sequence = current + number = i end end writeLine("The number less than 100000 with longest hailstone sequence is " + diff --git a/Task/Hailstone-sequence/EasyLang/hailstone-sequence.easy b/Task/Hailstone-sequence/EasyLang/hailstone-sequence.easy index ff201550a8..a5606e817c 100644 --- a/Task/Hailstone-sequence/EasyLang/hailstone-sequence.easy +++ b/Task/Hailstone-sequence/EasyLang/hailstone-sequence.easy @@ -1,4 +1,4 @@ -proc hailstone n &list[] . +proc hailstone n . list[] . list[] = [ ] while n <> 1 list[] &= n @@ -12,15 +12,19 @@ proc hailstone n &list[] . . hailstone 27 l[] write "27 has length " & len l[] & " with " -for i to 4 : write l[i] & " " +for i to 4 + write l[i] & " " +. write "... " -for i = len l[] - 3 to len l[] : write l[i] & " " +for i = len l[] - 3 to len l[] + write l[i] & " " +. print "" for i = 1 to 100000 hailstone i l[] if len l[] >= max_iter max_i = i max_iter = len l[] - . -. + end +end print max_i & " has length " & max_iter diff --git a/Task/Hailstone-sequence/Elena/hailstone-sequence.elena b/Task/Hailstone-sequence/Elena/hailstone-sequence.elena index 6933f48a7b..65dd556d5d 100644 --- a/Task/Hailstone-sequence/Elena/hailstone-sequence.elena +++ b/Task/Hailstone-sequence/Elena/hailstone-sequence.elena @@ -30,7 +30,7 @@ Hailstone(int n,Map lengths) } } -public Program() +public program() { int longestChain := 0; int longestNumber := 0; diff --git a/Task/Hailstone-sequence/Elixir/hailstone-sequence.ex b/Task/Hailstone-sequence/Elixir/hailstone-sequence.elixir similarity index 100% rename from Task/Hailstone-sequence/Elixir/hailstone-sequence.ex rename to Task/Hailstone-sequence/Elixir/hailstone-sequence.elixir diff --git a/Task/Hailstone-sequence/Euphoria/hailstone-sequence.eu b/Task/Hailstone-sequence/Euphoria/hailstone-sequence.euphoria similarity index 100% rename from Task/Hailstone-sequence/Euphoria/hailstone-sequence.eu rename to Task/Hailstone-sequence/Euphoria/hailstone-sequence.euphoria diff --git a/Task/Hailstone-sequence/Jq/hailstone-sequence-2.jq b/Task/Hailstone-sequence/Jq/hailstone-sequence-2.jq index 06fd8b01e9..c6b0fe55d9 100644 --- a/Task/Hailstone-sequence/Jq/hailstone-sequence-2.jq +++ b/Task/Hailstone-sequence/Jq/hailstone-sequence-2.jq @@ -3,5 +3,5 @@ "The first four numbers: \($h[0:4])", "The last four numbers: \($h|.[length-4:length])", "", - (max_hailstone(100000) as $m - | "Maximum length for n|hailstone for n in 1..100000 is \($m[1]) (n == \($m[0]))") + max_hailstone(100000) as $m + | "Maximum length for n|hailstone for n in 1..100000 is \($m[1]) (n == \($m[0]))" diff --git a/Task/Hailstone-sequence/Julia/hailstone-sequence-1.jl b/Task/Hailstone-sequence/Julia/hailstone-sequence-1.julia similarity index 100% rename from Task/Hailstone-sequence/Julia/hailstone-sequence-1.jl rename to Task/Hailstone-sequence/Julia/hailstone-sequence-1.julia diff --git a/Task/Hailstone-sequence/Julia/hailstone-sequence-2.jl b/Task/Hailstone-sequence/Julia/hailstone-sequence-2.julia similarity index 100% rename from Task/Hailstone-sequence/Julia/hailstone-sequence-2.jl rename to Task/Hailstone-sequence/Julia/hailstone-sequence-2.julia diff --git a/Task/Hailstone-sequence/Julia/hailstone-sequence-3.jl b/Task/Hailstone-sequence/Julia/hailstone-sequence-3.julia similarity index 100% rename from Task/Hailstone-sequence/Julia/hailstone-sequence-3.jl rename to Task/Hailstone-sequence/Julia/hailstone-sequence-3.julia diff --git a/Task/Hailstone-sequence/Kotlin/hailstone-sequence-1.kts b/Task/Hailstone-sequence/Kotlin/hailstone-sequence-1.kotlin similarity index 100% rename from Task/Hailstone-sequence/Kotlin/hailstone-sequence-1.kts rename to Task/Hailstone-sequence/Kotlin/hailstone-sequence-1.kotlin diff --git a/Task/Hailstone-sequence/Kotlin/hailstone-sequence-2.kts b/Task/Hailstone-sequence/Kotlin/hailstone-sequence-2.kotlin similarity index 100% rename from Task/Hailstone-sequence/Kotlin/hailstone-sequence-2.kts rename to Task/Hailstone-sequence/Kotlin/hailstone-sequence-2.kotlin diff --git a/Task/Hailstone-sequence/M2000-Interpreter/hailstone-sequence.m2000 b/Task/Hailstone-sequence/M2000-Interpreter/hailstone-sequence.m2000 index 6cdcbfba59..36d886dcb9 100644 --- a/Task/Hailstone-sequence/M2000-Interpreter/hailstone-sequence.m2000 +++ b/Task/Hailstone-sequence/M2000-Interpreter/hailstone-sequence.m2000 @@ -7,7 +7,7 @@ Module hailstone.Task { n*=3 : n++: val=n } } - count=Lambda (n as long) ->{ + Count=Lambda (n) ->{ m=lambda n ->{ if n=1 then =false: exit =true :if n mod 2=0 then n/=2 :exit diff --git a/Task/Hailstone-sequence/Miranda/hailstone-sequence.miranda b/Task/Hailstone-sequence/Miranda/hailstone-sequence.miranda deleted file mode 100644 index 9b7381cd1c..0000000000 --- a/Task/Hailstone-sequence/Miranda/hailstone-sequence.miranda +++ /dev/null @@ -1,22 +0,0 @@ -main :: [sys_message] -main = [Stdout h27m, Stdout biggestm] - where h27 = hailstone 27 - h27n = #h27 - h27f = take 4 h27 - h27l = drop (h27n - 4) h27 - h27m = "The hailstone sequence for 27 has " ++ - show h27n ++ " elements starting with " ++ - show h27f ++ " and ending with " ++ - show h27l ++ "\n" - - range = [1..100000] - biggest = max [#hailstone n | n<-range] - nbiggest = hd [n | n<-range; #hailstone n = biggest] - biggestm = "The number with the longest Hailstone " ++ - "sequence < 100.000 is " ++ show nbiggest ++ - " with length " ++ show biggest ++ "\n" - -hailstone :: num->[num] -hailstone = (++[1]) . takewhile (>1) . iterate step - where step n = (3 * n) + 1, if n mod 2 = 1 - = n div 2, otherwise diff --git a/Task/Hailstone-sequence/OCaml/hailstone-sequence.ml b/Task/Hailstone-sequence/OCaml/hailstone-sequence.ocaml similarity index 100% rename from Task/Hailstone-sequence/OCaml/hailstone-sequence.ml rename to Task/Hailstone-sequence/OCaml/hailstone-sequence.ocaml diff --git a/Task/Hailstone-sequence/Odin/hailstone-sequence.odin b/Task/Hailstone-sequence/Odin/hailstone-sequence.odin deleted file mode 100644 index dbe6f83782..0000000000 --- a/Task/Hailstone-sequence/Odin/hailstone-sequence.odin +++ /dev/null @@ -1,65 +0,0 @@ -package main - -import "core:fmt" - -collatz :: proc(array:^[dynamic]int,n:int){ - i:=1 - n:=n - for n!=1{ - - if (n%2==0){ - n=n/2 - append(&array^,n) - } - else{ - n=3*n+1 - append(&array^,n) - } - - } -} - -main :: proc() { - n:=27 - - max:=0 - max_length:=0 - - dummy:[dynamic]int - defer delete(dummy) - append(&dummy,n) - collatz(&dummy,n) - - - fmt.println("the first four of sequence for 27: ") - for jj:=0;jj<4;jj+=1{ - fmt.println(dummy[jj]) - } - fmt.println("the last four of sequence for 27: ") - for jj:=0;jj<4;jj+=1{ - fmt.println(dummy[len(dummy)-4+jj]) - } - fmt.println("length of sequence for 27") - fmt.println(len(dummy)) - - - for (len(dummy)>0){ - pop(&dummy) - } - - for ii:=1;ii<100000;ii+=1{ - append(&dummy,ii) - collatz(&dummy,ii) - if(len(dummy)>max_length){ - max = ii - max_length=len(dummy) - } - for (len(dummy)>0){ - pop(&dummy) - } - } - fmt.println("Max number: ") - fmt.println(max) - fmt.println("Max length: ") - fmt.println(max_length) -} diff --git a/Task/Hailstone-sequence/PascalABC.NET/hailstone-sequence.pas b/Task/Hailstone-sequence/PascalABC.NET/hailstone-sequence.pas deleted file mode 100644 index d19f3dd6db..0000000000 --- a/Task/Hailstone-sequence/PascalABC.NET/hailstone-sequence.pas +++ /dev/null @@ -1,23 +0,0 @@ -function hailstone(n: Integer): sequence of integer; -begin - result := seq(n); - while n > 1 do - begin - n := n.IsEven ? n div 2 : 3 * n + 1; - result := result + seq(n); - end; -end; - -begin - var a := hailstone(27); - println(a.Count, a.Take(4), a.TakeLast(4)); - var max := 0; - var maxi := 0; - for var i := 1 to 100_000 do - if hailstone(i).Count > max then - begin - max := hailstone(i).Count; - maxi := i; - end; - println(maxi, max); -end. diff --git a/Task/Hailstone-sequence/Pluto/hailstone-sequence.pluto b/Task/Hailstone-sequence/Pluto/hailstone-sequence.pluto deleted file mode 100644 index 0e55f4d7b9..0000000000 --- a/Task/Hailstone-sequence/Pluto/hailstone-sequence.pluto +++ /dev/null @@ -1,26 +0,0 @@ -function hailstone(n, p=true) - local len = 1 - - while n > 1 do - ++len - if p do io.write(n,'\t') end - n = (n%2==0)?n//2:3*n+1 - end - - if p do print(1) end - return len -end - -hailstone(27) -print("------") - -local max = 1 -local len = 1 -for i = 2,99999 do - local t = hailstone(i,false) - if t > len then - max = i - len = t - end -end -print(max, len) diff --git a/Task/Hailstone-sequence/PowerShell/hailstone-sequence.ps1 b/Task/Hailstone-sequence/PowerShell/hailstone-sequence.psh similarity index 100% rename from Task/Hailstone-sequence/PowerShell/hailstone-sequence.ps1 rename to Task/Hailstone-sequence/PowerShell/hailstone-sequence.psh diff --git a/Task/Hailstone-sequence/Rebol/hailstone-sequence.rebol b/Task/Hailstone-sequence/REBOL/hailstone-sequence.rebol similarity index 100% rename from Task/Hailstone-sequence/Rebol/hailstone-sequence.rebol rename to Task/Hailstone-sequence/REBOL/hailstone-sequence.rebol diff --git a/Task/Hailstone-sequence/Rust/hailstone-sequence.rs b/Task/Hailstone-sequence/Rust/hailstone-sequence.rust similarity index 100% rename from Task/Hailstone-sequence/Rust/hailstone-sequence.rs rename to Task/Hailstone-sequence/Rust/hailstone-sequence.rust diff --git a/Task/Hailstone-sequence/Scheme/hailstone-sequence.scm b/Task/Hailstone-sequence/Scheme/hailstone-sequence.scm deleted file mode 100644 index 5219a0c4e9..0000000000 --- a/Task/Hailstone-sequence/Scheme/hailstone-sequence.scm +++ /dev/null @@ -1,36 +0,0 @@ -(define (collatz n) - (if (= n 1) - (list 1) - (cons n - (collatz (if (even? n) (/ n 2) (+ 1 (* 3 n))))))) - -(define (collatz-length n) - (let aux ((n n) (r 1)) - (if (= n 1) - r - (aux (if (even? n) (/ n 2) (+ 1 (* 3 n))) - (+ r 1))))) - -(define (collatz-max a b) - (let aux ((i a) (j 0) (k 0)) - (if (> i b) - (list j k) - (let ((h (collatz-length i))) - (if (> h k) - (aux (+ i 1) i h) - (aux (+ i 1) j k)))))) - -(collatz 27) -; (27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 -; 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 -; 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 -; 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 -; 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 -; 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 -; 106 53 160 80 40 20 10 5 16 8 4 2 1) - -(collatz-length 27) -; 112 - -(collatz-max 1 100000) -; (77031 351) diff --git a/Task/Hailstone-sequence/Scheme/hailstone-sequence.ss b/Task/Hailstone-sequence/Scheme/hailstone-sequence.ss new file mode 100644 index 0000000000..b0311a38ee --- /dev/null +++ b/Task/Hailstone-sequence/Scheme/hailstone-sequence.ss @@ -0,0 +1,28 @@ +(define (collatz n) +(if (= n 1) '(1) +(cons n (collatz (if (even? n) (/ n 2) (+ 1 (* 3 n))))))) + +(define (collatz-length n) +(let aux ((n n) (r 1)) (if (= n 1) r +(aux (if (even? n) (/ n 2) (+ 1 (* 3 n))) (+ r 1))))) + +(define (collatz-max a b) +(let aux ((i a) (j 0) (k 0)) +(if (> i b) (list j k) +(let ((h (collatz-length i))) +(if (> h k) (aux (+ i 1) i h) (aux (+ i 1) j k)))))) + +(collatz 27) +; (27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 +; 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 +; 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 +; 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 +; 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 +; 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 +; 106 53 160 80 40 20 10 5 16 8 4 2 1) + +(collatz-length 27) +; 112 + +(collatz-max 1 100000) +; (77031 351) diff --git a/Task/Hailstone-sequence/Uiua/hailstone-sequence.uiua b/Task/Hailstone-sequence/Uiua/hailstone-sequence.uiua deleted file mode 100644 index 81cdf542a0..0000000000 --- a/Task/Hailstone-sequence/Uiua/hailstone-sequence.uiua +++ /dev/null @@ -1,7 +0,0 @@ -Next ← ⨬(÷2|+1×3)⊸◿2 -Sequence ← ˜⊂1⊢[⍢⊸Next≠₁] - -⊃(↙4|↙¯4) Sequence 27 -# Calculate and cache lengths (export UIUA_RECURSION_LIMIT=3000 first) -Length ← |1 memo(⨬(+1Length Next|∘)⊸=₁) -⊸Length⊢⊏⍖⊸⍚Length+1⇡99999 diff --git a/Task/Hailstone-sequence/Ursalang/hailstone-sequence.ursa b/Task/Hailstone-sequence/Ursalang/hailstone-sequence.ursa deleted file mode 100644 index ecc665c418..0000000000 --- a/Task/Hailstone-sequence/Ursalang/hailstone-sequence.ursa +++ /dev/null @@ -1,33 +0,0 @@ -let hailstone = fn(n_) { - var n = n_ - let steps = [n] - loop { - if n < 2 { break steps } - n := (if n % 2 == 0 { n / 2 } else { n * 3 + 1 }) - steps.push(n) - } -} - -let twentySeven = hailstone(27) -print("The Hailstone sequence for 27 starts with:") -print(twentySeven.slice(0, 4)) -print("and ends with:") -print(twentySeven.slice(-4)) -print("and its length is:") -print(twentySeven.len()) - -print("Checking sequences up to 100,000") -var longest = 0 -var longestLen = 0 -for i in range(100000) { - let len = hailstone(i).len() - if len > longestLen { - longest := i - longestLen := len - } - if i % 10000 == 0 {print(i)} -} -print("The longest sequence under 100,000 is for:") -print(longest) -print("and has length:") -print(longestLen) diff --git a/Task/Hailstone-sequence/V-(Vlang)/hailstone-sequence.v b/Task/Hailstone-sequence/V-(Vlang)/hailstone-sequence.v index 2f1d091903..665f9dc8b1 100644 --- a/Task/Hailstone-sequence/V-(Vlang)/hailstone-sequence.v +++ b/Task/Hailstone-sequence/V-(Vlang)/hailstone-sequence.v @@ -2,7 +2,7 @@ // 2nd arg is a slice to recycle, to reduce garbage. fn hs(nn int, recycle []int) []int { mut n := nn - mut s := recycle[..0].clone() + mut s := recycle[..0] s << n for n > 1 { if n&1 == 0 { diff --git a/Task/Hailstone-sequence/VBScript/hailstone-sequence.vbs b/Task/Hailstone-sequence/VBScript/hailstone-sequence.vb similarity index 100% rename from Task/Hailstone-sequence/VBScript/hailstone-sequence.vbs rename to Task/Hailstone-sequence/VBScript/hailstone-sequence.vb diff --git a/Task/Halt-and-catch-fire/8086-Assembly/halt-and-catch-fire-2.8086 b/Task/Halt-and-catch-fire/8086-Assembly/halt-and-catch-fire-2.8086 deleted file mode 100644 index fe4a93e86e..0000000000 --- a/Task/Halt-and-catch-fire/8086-Assembly/halt-and-catch-fire-2.8086 +++ /dev/null @@ -1 +0,0 @@ -jmp $ diff --git a/Task/Halt-and-catch-fire/8086-Assembly/halt-and-catch-fire-1.8086 b/Task/Halt-and-catch-fire/8086-Assembly/halt-and-catch-fire.8086 similarity index 100% rename from Task/Halt-and-catch-fire/8086-Assembly/halt-and-catch-fire-1.8086 rename to Task/Halt-and-catch-fire/8086-Assembly/halt-and-catch-fire.8086 diff --git a/Task/Halt-and-catch-fire/AArch64-Assembly/halt-and-catch-fire.aarch64 b/Task/Halt-and-catch-fire/AArch64-Assembly/halt-and-catch-fire.aarch64 deleted file mode 100644 index b35e4e4e7f..0000000000 --- a/Task/Halt-and-catch-fire/AArch64-Assembly/halt-and-catch-fire.aarch64 +++ /dev/null @@ -1,50 +0,0 @@ -/* ARM assembly AARCH64 Raspberry PI 3B */ -/* program craharm64.s */ - -/*******************************************/ -/* Constantes */ -/*******************************************/ -/* for this file see task include a file in language AArch64 assembly*/ -.include "../includeConstantesARM64.inc" - -/*******************************************/ -/* Macros */ -/*******************************************/ -//.include "../../ficmacros64.inc" // for developer debugging - -/*********************************/ -/* Initialized data */ -/*********************************/ -.data -szMessDebutPgm: .asciz "Program 64 bits start. \n" -szMessFinOK: .asciz "Program normal end. \n" - -/*********************************/ -/* UnInitialized data */ -/*********************************/ -.bss -/*********************************/ -/* code section */ -/*********************************/ -.text -.global main -main: - ldr x0,qAdrszMessDebutPgm - bl affichageMess // start message - mov x0,#0 - ldr x1,[x0] // load value at address zero - - - ldr x0,qAdrszMessFinOK - bl affichageMess - - mov x8,EXIT - svc #0 // system call -qAdrszMessDebutPgm: .quad szMessDebutPgm -qAdrszMessFinOK: .quad szMessFinOK - -/***************************************************/ -/* ROUTINES INCLUDE */ -/***************************************************/ -/* for this file see task include a file in language AArch64 assembly*/ -.include "../includeARM64.inc" diff --git a/Task/Halt-and-catch-fire/ARM-Assembly/halt-and-catch-fire.arm b/Task/Halt-and-catch-fire/ARM-Assembly/halt-and-catch-fire.arm deleted file mode 100644 index b2d0b3b307..0000000000 --- a/Task/Halt-and-catch-fire/ARM-Assembly/halt-and-catch-fire.arm +++ /dev/null @@ -1,55 +0,0 @@ -/* ARM assembly Raspberry PI */ -/* program craharm.s */ - -/* REMARK 1 : this program use routines in a include file - see task Include a file language arm assembly - for the routine affichageMess conversion10 - see at end of this program the instruction include */ - -/*******************************************/ -/* Constantes */ -/*******************************************/ -.include "../constantes.inc" - -/*******************************************/ -/* Macros */ -/*******************************************/ -//.include "../../ficmacros32.inc" @ for developer debugging - -/*********************************/ -/* Initialized data */ -/*********************************/ -.data -szMessDebutPgm: .asciz "Program 32 bits start. \n" -szMessFinOK: .asciz "Program normal end. \n" - - -/*********************************/ -/* UnInitialized data */ -/*********************************/ -.bss -/*********************************/ -/* code section */ -/*********************************/ -.text -.global main -main: - ldr r0,iAdrszMessDebutPgm - bl affichageMess @ start message - mov r0,#0 - ldr r1,[r0] @ load value at address zero - - - ldr r0,iAdrszMessFinOK - bl affichageMess - - mov r7,#EXIT @ program end - svc #0 @ system call -iAdrszMessDebutPgm: .int szMessDebutPgm -iAdrszMessFinOK: .int szMessFinOK - - -/***************************************************/ -/* ROUTINES INCLUDE */ -/***************************************************/ -.include "../affichage.inc" diff --git a/Task/Halt-and-catch-fire/Ada/halt-and-catch-fire.adb b/Task/Halt-and-catch-fire/Ada/halt-and-catch-fire.ada similarity index 100% rename from Task/Halt-and-catch-fire/Ada/halt-and-catch-fire.adb rename to Task/Halt-and-catch-fire/Ada/halt-and-catch-fire.ada diff --git a/Task/Halt-and-catch-fire/Crystal/halt-and-catch-fire.cr b/Task/Halt-and-catch-fire/Crystal/halt-and-catch-fire.crystal similarity index 100% rename from Task/Halt-and-catch-fire/Crystal/halt-and-catch-fire.cr rename to Task/Halt-and-catch-fire/Crystal/halt-and-catch-fire.crystal diff --git a/Task/Halt-and-catch-fire/Delphi/halt-and-catch-fire.pas b/Task/Halt-and-catch-fire/Delphi/halt-and-catch-fire.delphi similarity index 100% rename from Task/Halt-and-catch-fire/Delphi/halt-and-catch-fire.pas rename to Task/Halt-and-catch-fire/Delphi/halt-and-catch-fire.delphi diff --git a/Task/Halt-and-catch-fire/EMal/halt-and-catch-fire.emal b/Task/Halt-and-catch-fire/EMal/halt-and-catch-fire.emal deleted file mode 100644 index 681461a281..0000000000 --- a/Task/Halt-and-catch-fire/EMal/halt-and-catch-fire.emal +++ /dev/null @@ -1 +0,0 @@ -error(256, "Internal Corruption") diff --git a/Task/Halt-and-catch-fire/EasyLang/halt-and-catch-fire.easy b/Task/Halt-and-catch-fire/EasyLang/halt-and-catch-fire.easy deleted file mode 100644 index cb387a3101..0000000000 --- a/Task/Halt-and-catch-fire/EasyLang/halt-and-catch-fire.easy +++ /dev/null @@ -1,2 +0,0 @@ -a[] = [ ] -print a[1] diff --git a/Task/Halt-and-catch-fire/FutureBasic/halt-and-catch-fire.basic b/Task/Halt-and-catch-fire/FutureBasic/halt-and-catch-fire.basic deleted file mode 100644 index 858825d80b..0000000000 --- a/Task/Halt-and-catch-fire/FutureBasic/halt-and-catch-fire.basic +++ /dev/null @@ -1 +0,0 @@ -~ 0,0 diff --git a/Task/Halt-and-catch-fire/Icon/halt-and-catch-fire.icon b/Task/Halt-and-catch-fire/Icon/halt-and-catch-fire.icon deleted file mode 100644 index a90590d6f8..0000000000 --- a/Task/Halt-and-catch-fire/Icon/halt-and-catch-fire.icon +++ /dev/null @@ -1,3 +0,0 @@ -procedure main() - 5/0 -end diff --git a/Task/Halt-and-catch-fire/Java/halt-and-catch-fire.java b/Task/Halt-and-catch-fire/Java/halt-and-catch-fire.java index 436cffff07..c0b69d67b3 100644 --- a/Task/Halt-and-catch-fire/Java/halt-and-catch-fire.java +++ b/Task/Halt-and-catch-fire/Java/halt-and-catch-fire.java @@ -1,11 +1,11 @@ public final class HaltAndCatchFire { - public static void main(String[] aArgs) { - // Any one of the lines below, when uncommented, will cause a program halt. - -// throw new AssertionError("Stop now!"); -// System.out.println(0/0); -// Runtime.getRuntime().exit(1); - } + public static void main(String[] aArgs) { + // Any one of the lines below, when uncommented, will cause a program halt. + +// throw new AssertionError("Stop now!"); +// System.out.println(0/0); +// Runtime.getRuntime().exit(1); + } } diff --git a/Task/Halt-and-catch-fire/JavaScript/halt-and-catch-fire.js b/Task/Halt-and-catch-fire/JavaScript/halt-and-catch-fire.js deleted file mode 100644 index c3ab4d8f76..0000000000 --- a/Task/Halt-and-catch-fire/JavaScript/halt-and-catch-fire.js +++ /dev/null @@ -1,3 +0,0 @@ -f=()=>f();f(); -/* This also does the same thing, but is harder to read */ -(f=()=>f())(); diff --git a/Task/Halt-and-catch-fire/Julia/halt-and-catch-fire-1.jl b/Task/Halt-and-catch-fire/Julia/halt-and-catch-fire-1.julia similarity index 100% rename from Task/Halt-and-catch-fire/Julia/halt-and-catch-fire-1.jl rename to Task/Halt-and-catch-fire/Julia/halt-and-catch-fire-1.julia diff --git a/Task/Halt-and-catch-fire/Julia/halt-and-catch-fire-2.jl b/Task/Halt-and-catch-fire/Julia/halt-and-catch-fire-2.julia similarity index 100% rename from Task/Halt-and-catch-fire/Julia/halt-and-catch-fire-2.jl rename to Task/Halt-and-catch-fire/Julia/halt-and-catch-fire-2.julia diff --git a/Task/Halt-and-catch-fire/Microsoft-Small-Basic/halt-and-catch-fire.basic b/Task/Halt-and-catch-fire/Microsoft-Small-Basic/halt-and-catch-fire.basic deleted file mode 100644 index 22d7fa590a..0000000000 --- a/Task/Halt-and-catch-fire/Microsoft-Small-Basic/halt-and-catch-fire.basic +++ /dev/null @@ -1 +0,0 @@ -a = 0 / 0 diff --git a/Task/Halt-and-catch-fire/PascalABC.NET/halt-and-catch-fire.pas b/Task/Halt-and-catch-fire/PascalABC.NET/halt-and-catch-fire.pas deleted file mode 100644 index ac79a4cfa2..0000000000 --- a/Task/Halt-and-catch-fire/PascalABC.NET/halt-and-catch-fire.pas +++ /dev/null @@ -1 +0,0 @@ -## raise new Exception(''); diff --git a/Task/Halt-and-catch-fire/Pluto/halt-and-catch-fire.pluto b/Task/Halt-and-catch-fire/Pluto/halt-and-catch-fire.pluto deleted file mode 100644 index 13a2c75adb..0000000000 --- a/Task/Halt-and-catch-fire/Pluto/halt-and-catch-fire.pluto +++ /dev/null @@ -1 +0,0 @@ -print(0 // 0) diff --git a/Task/Halt-and-catch-fire/R/halt-and-catch-fire-1.r b/Task/Halt-and-catch-fire/R/halt-and-catch-fire-1.r deleted file mode 100644 index 39a97b302c..0000000000 --- a/Task/Halt-and-catch-fire/R/halt-and-catch-fire-1.r +++ /dev/null @@ -1 +0,0 @@ -stop() diff --git a/Task/Halt-and-catch-fire/R/halt-and-catch-fire-2.r b/Task/Halt-and-catch-fire/R/halt-and-catch-fire-2.r deleted file mode 100644 index 1e5b3ea0c8..0000000000 --- a/Task/Halt-and-catch-fire/R/halt-and-catch-fire-2.r +++ /dev/null @@ -1 +0,0 @@ -array()[,] diff --git a/Task/Halt-and-catch-fire/Rebol/halt-and-catch-fire.rebol b/Task/Halt-and-catch-fire/Rebol/halt-and-catch-fire.rebol deleted file mode 100644 index 2350d4fe2a..0000000000 --- a/Task/Halt-and-catch-fire/Rebol/halt-and-catch-fire.rebol +++ /dev/null @@ -1,5 +0,0 @@ -halt ;; Stops evaluation and returns to the input prompt. - ;; or -quit ;; Stops evaluation and exits the interpreter. - ;; or -quit/return 1 ;; with some status code diff --git a/Task/Halt-and-catch-fire/Rust/halt-and-catch-fire.rs b/Task/Halt-and-catch-fire/Rust/halt-and-catch-fire.rust similarity index 100% rename from Task/Halt-and-catch-fire/Rust/halt-and-catch-fire.rs rename to Task/Halt-and-catch-fire/Rust/halt-and-catch-fire.rust diff --git a/Task/Halt-and-catch-fire/TAV/halt-and-catch-fire.tav b/Task/Halt-and-catch-fire/TAV/halt-and-catch-fire.tav deleted file mode 100644 index beb3a1a07a..0000000000 --- a/Task/Halt-and-catch-fire/TAV/halt-and-catch-fire.tav +++ /dev/null @@ -1 +0,0 @@ -! ?- diff --git a/Task/Halt-and-catch-fire/Uiua/halt-and-catch-fire.uiua b/Task/Halt-and-catch-fire/Uiua/halt-and-catch-fire.uiua deleted file mode 100644 index 414ff2f8ec..0000000000 --- a/Task/Halt-and-catch-fire/Uiua/halt-and-catch-fire.uiua +++ /dev/null @@ -1 +0,0 @@ -⍤@a 0 diff --git a/Task/Halt-and-catch-fire/Zig/halt-and-catch-fire.zig b/Task/Halt-and-catch-fire/Zig/halt-and-catch-fire.zig deleted file mode 100644 index d8b5049869..0000000000 --- a/Task/Halt-and-catch-fire/Zig/halt-and-catch-fire.zig +++ /dev/null @@ -1,3 +0,0 @@ -pub fn main() void { - unreachable; -} diff --git a/Task/Hamming-numbers/Ada/hamming-numbers.adb b/Task/Hamming-numbers/Ada/hamming-numbers.ada similarity index 100% rename from Task/Hamming-numbers/Ada/hamming-numbers.adb rename to Task/Hamming-numbers/Ada/hamming-numbers.ada diff --git a/Task/Hamming-numbers/Chapel/hamming-numbers-1.chpl b/Task/Hamming-numbers/Chapel/hamming-numbers-1.chapel similarity index 100% rename from Task/Hamming-numbers/Chapel/hamming-numbers-1.chpl rename to Task/Hamming-numbers/Chapel/hamming-numbers-1.chapel diff --git a/Task/Hamming-numbers/Chapel/hamming-numbers-2.chpl b/Task/Hamming-numbers/Chapel/hamming-numbers-2.chapel similarity index 100% rename from Task/Hamming-numbers/Chapel/hamming-numbers-2.chpl rename to Task/Hamming-numbers/Chapel/hamming-numbers-2.chapel diff --git a/Task/Hamming-numbers/Chapel/hamming-numbers-3.chpl b/Task/Hamming-numbers/Chapel/hamming-numbers-3.chapel similarity index 100% rename from Task/Hamming-numbers/Chapel/hamming-numbers-3.chpl rename to Task/Hamming-numbers/Chapel/hamming-numbers-3.chapel diff --git a/Task/Hamming-numbers/Chapel/hamming-numbers-4.chpl b/Task/Hamming-numbers/Chapel/hamming-numbers-4.chapel similarity index 100% rename from Task/Hamming-numbers/Chapel/hamming-numbers-4.chpl rename to Task/Hamming-numbers/Chapel/hamming-numbers-4.chapel diff --git a/Task/Hamming-numbers/Chapel/hamming-numbers-5.chpl b/Task/Hamming-numbers/Chapel/hamming-numbers-5.chapel similarity index 100% rename from Task/Hamming-numbers/Chapel/hamming-numbers-5.chpl rename to Task/Hamming-numbers/Chapel/hamming-numbers-5.chapel diff --git a/Task/Hamming-numbers/Crystal/hamming-numbers-1.cr b/Task/Hamming-numbers/Crystal/hamming-numbers-1.crystal similarity index 100% rename from Task/Hamming-numbers/Crystal/hamming-numbers-1.cr rename to Task/Hamming-numbers/Crystal/hamming-numbers-1.crystal diff --git a/Task/Hamming-numbers/Crystal/hamming-numbers-2.cr b/Task/Hamming-numbers/Crystal/hamming-numbers-2.crystal similarity index 100% rename from Task/Hamming-numbers/Crystal/hamming-numbers-2.cr rename to Task/Hamming-numbers/Crystal/hamming-numbers-2.crystal diff --git a/Task/Hamming-numbers/Crystal/hamming-numbers-3.cr b/Task/Hamming-numbers/Crystal/hamming-numbers-3.crystal similarity index 100% rename from Task/Hamming-numbers/Crystal/hamming-numbers-3.cr rename to Task/Hamming-numbers/Crystal/hamming-numbers-3.crystal diff --git a/Task/Hamming-numbers/Crystal/hamming-numbers-4.cr b/Task/Hamming-numbers/Crystal/hamming-numbers-4.crystal similarity index 100% rename from Task/Hamming-numbers/Crystal/hamming-numbers-4.cr rename to Task/Hamming-numbers/Crystal/hamming-numbers-4.crystal diff --git a/Task/Hamming-numbers/EasyLang/hamming-numbers.easy b/Task/Hamming-numbers/EasyLang/hamming-numbers.easy deleted file mode 100644 index 5f54b97603..0000000000 --- a/Task/Hamming-numbers/EasyLang/hamming-numbers.easy +++ /dev/null @@ -1,27 +0,0 @@ -func hamming lim . - len h[] lim - h[1] = 1 - x2 = 2 ; x3 = 3 ; x5 = 5 - i = 1 ; j = 1 ; k = 1 - for n = 2 to lim - h[n] = lower x2 lower x3 x5 - if x2 = h[n] - i += 1 - x2 = 2 * h[i] - . - if x3 = h[n] - j += 1 - x3 = 3 * h[j] - . - if x5 = h[n] - k += 1 - x5 = 5 * h[k] - . - . - return h[lim] -. -for nr = 1 to 20 - write hamming nr & " " -. -print "" -print hamming 1691 diff --git a/Task/Hamming-numbers/Elixir/hamming-numbers.ex b/Task/Hamming-numbers/Elixir/hamming-numbers.elixir similarity index 100% rename from Task/Hamming-numbers/Elixir/hamming-numbers.ex rename to Task/Hamming-numbers/Elixir/hamming-numbers.elixir diff --git a/Task/Hamming-numbers/FutureBasic/hamming-numbers.basic b/Task/Hamming-numbers/FutureBasic/hamming-numbers.basic deleted file mode 100644 index 96bab3ac63..0000000000 --- a/Task/Hamming-numbers/FutureBasic/hamming-numbers.basic +++ /dev/null @@ -1,42 +0,0 @@ -include "NSLog.incl" - -NSUInteger local fn Minimum( a as NSUInteger, b as NSUInteger ) - return (a < b) ? a : b -end fn = 0 - -UInt64 local fn HammingNumberAtPosition( position as NSUInteger ) - if (position == 0) then return 0 - CFMutableArrayRef hammingNumbers = fn MutableArrayWithCapacity( position ) - MutableArrayAddObject( hammingNumbers, @1 ) - - NSUInteger i2 = 0, i3 = 0, i5 = 0 - for NSUInteger i = 1 to position - 1 - NSUInteger nxt2 = fn NumberUnsignedLongLongValue( hammingNumbers[i2] ) * 2 - NSUInteger nxt3 = fn NumberUnsignedLongLongValue( hammingNumbers[i3] ) * 3 - NSUInteger nxt5 = fn NumberUnsignedLongLongValue( hammingNumbers[i5] ) * 5 - NSUInteger nxt = fn Minimum( nxt2, fn Minimum( nxt3, nxt5 ) ) - - NSUInteger nextHamming = fn Minimum( nxt2, fn Minimum( nxt3, nxt5 ) ) - MutableArrayAddObject( hammingNumbers, @(nextHamming) ) - - if (nxt == nxt2) then i2++ - if (nxt == nxt3) then i3++ - if (nxt == nxt5) then i5++ - next - - return fn NumberUnsignedLongLongValue( hammingNumbers[position - 1] ) -end fn = 0 - -local fn RunHammingNumberTests - CFMutableArrayRef mutArr = fn MutableArrayNew - - for NSUInteger i = 1 to 20 - MutableArrayAddObject( mutArr, @(fn HammingNumberAtPosition(i)) ) - next - NSLog( @"First 20 Hamming Numbers: %@", fn ArrayComponentsJoinedByString( mutArr, @" " ) ) - NSLog( @" 1691st Hamming Number: %llu", fn HammingNumberAtPosition( 1691 ) ) -end fn - -fn RunHammingNumberTests - -HandleEvents diff --git a/Task/Hamming-numbers/Julia/hamming-numbers-1.jl b/Task/Hamming-numbers/Julia/hamming-numbers-1.julia similarity index 100% rename from Task/Hamming-numbers/Julia/hamming-numbers-1.jl rename to Task/Hamming-numbers/Julia/hamming-numbers-1.julia diff --git a/Task/Hamming-numbers/Julia/hamming-numbers-2.jl b/Task/Hamming-numbers/Julia/hamming-numbers-2.julia similarity index 100% rename from Task/Hamming-numbers/Julia/hamming-numbers-2.jl rename to Task/Hamming-numbers/Julia/hamming-numbers-2.julia diff --git a/Task/Hamming-numbers/Julia/hamming-numbers-3.jl b/Task/Hamming-numbers/Julia/hamming-numbers-3.julia similarity index 100% rename from Task/Hamming-numbers/Julia/hamming-numbers-3.jl rename to Task/Hamming-numbers/Julia/hamming-numbers-3.julia diff --git a/Task/Hamming-numbers/Julia/hamming-numbers-4.jl b/Task/Hamming-numbers/Julia/hamming-numbers-4.julia similarity index 100% rename from Task/Hamming-numbers/Julia/hamming-numbers-4.jl rename to Task/Hamming-numbers/Julia/hamming-numbers-4.julia diff --git a/Task/Hamming-numbers/Julia/hamming-numbers-5.jl b/Task/Hamming-numbers/Julia/hamming-numbers-5.julia similarity index 100% rename from Task/Hamming-numbers/Julia/hamming-numbers-5.jl rename to Task/Hamming-numbers/Julia/hamming-numbers-5.julia diff --git a/Task/Hamming-numbers/Kotlin/hamming-numbers-1.kts b/Task/Hamming-numbers/Kotlin/hamming-numbers-1.kotlin similarity index 100% rename from Task/Hamming-numbers/Kotlin/hamming-numbers-1.kts rename to Task/Hamming-numbers/Kotlin/hamming-numbers-1.kotlin diff --git a/Task/Hamming-numbers/Kotlin/hamming-numbers-2.kts b/Task/Hamming-numbers/Kotlin/hamming-numbers-2.kotlin similarity index 100% rename from Task/Hamming-numbers/Kotlin/hamming-numbers-2.kts rename to Task/Hamming-numbers/Kotlin/hamming-numbers-2.kotlin diff --git a/Task/Hamming-numbers/Kotlin/hamming-numbers-3.kts b/Task/Hamming-numbers/Kotlin/hamming-numbers-3.kotlin similarity index 100% rename from Task/Hamming-numbers/Kotlin/hamming-numbers-3.kts rename to Task/Hamming-numbers/Kotlin/hamming-numbers-3.kotlin diff --git a/Task/Hamming-numbers/Kotlin/hamming-numbers-4.kts b/Task/Hamming-numbers/Kotlin/hamming-numbers-4.kotlin similarity index 100% rename from Task/Hamming-numbers/Kotlin/hamming-numbers-4.kts rename to Task/Hamming-numbers/Kotlin/hamming-numbers-4.kotlin diff --git a/Task/Hamming-numbers/Mojo/hamming-numbers.mojo b/Task/Hamming-numbers/Mojo/hamming-numbers.mojo index 1d093d1922..6defc7b7e9 100644 --- a/Task/Hamming-numbers/Mojo/hamming-numbers.mojo +++ b/Task/Hamming-numbers/Mojo/hamming-numbers.mojo @@ -1,61 +1,61 @@ -# HammingsLogImp.mojo - uses queue instead of frequent draining... -# compile with: mojo build --march=native Hammings.mojo - -# import bigints, std/math # no big ints -from math import (log2, trunc) -from memory import (memset_zero) #, memcpy) -from time import (monotonic) +from collections.vector import (DynamicVector, CollectionElement) +from math import (log2, trunc, pow) +from memory import memset_zero #, memcpy) +from time import now alias cCOUNT: Int = 1_000_000 -struct BigNat(Movable, ImplicitlyCopyable, Stringable): # enough just to support conversion and printing +struct BigNat(Stringable): # enough just to support conversion and printing ''' Enough "infinite" precision to support as required here - multiply and divide by 10 conversion to string... ''' - var contents: List[UInt32] - fn __init__(out self): - self.contents = List[UInt32]() - fn __init__(out self, val: UInt32): - self.contents = List[UInt32](length=1, fill=val) - fn __copyinit__(out self, existing: Self): - self.contents = List[UInt32](existing.contents) + var contents: DynamicVector[UInt32] + fn __init__(inout self): + self.contents = DynamicVector[UInt32]() + fn __init__(inout self, val: UInt32): + self.contents = DynamicVector[UInt32](4) + self.contents.resize(1, val) + fn __copyinit__(inout self, existing: Self): + self.contents = existing.contents + fn __moveinit__(inout self, owned existing: Self): + self.contents = existing.contents^ fn __str__(self) -> String: var rslt: String = "" - var v = List[UInt32](self.contents) + var v = self.contents while len(v) > 0: var t: UInt64 = 0 for i in range(len(v) - 1, -1, -1): - t = (t << 32) + Int(v[i]) - v[i] = Int(t // 10); t -= Int(v[i]) * 10 + t = ((t << 32) + v[i].to_int()) + v[i] = (t // 10).to_int(); t -= v[i].to_int() * 10 var sz = len(v) - 1 while sz >= 0 and v[sz] == 0: sz -= 1 v.resize(sz + 1, 0) - rslt = String(t) + rslt + rslt = str(t) + rslt return rslt - fn __imul__(mut self, rhs: Self): - var lenl = len(self.contents); var lenr = len(rhs.contents) - var rslt = List[UInt32](length = lenl + lenr, fill = 0) - for i in range(lenr): + fn mult(inout self, mltplr: Self): + var rslt = DynamicVector[UInt32]() + rslt.resize(len(self.contents) + len(mltplr.contents), 0) + for i in range(len(mltplr.contents)): var t: UInt64 = 0 - for j in range(lenl): - t += Int(self.contents[j]) * Int(rhs.contents[i]) + Int(rslt[i + j]) - rslt[i + j] = Int(t & 0xFFFFFFFF); t >>= 32 - rslt[i + lenl] += Int(t) + for j in range(len(self.contents)): + t += self.contents[j].to_int() * mltplr.contents[i].to_int() + rslt[i + j].to_int() + rslt[i + j] = (t & 0xFFFFFFFF).to_int(); t >>= 32 + rslt[i + len(self.contents)] += t.to_int() var sz = len(rslt) - 1 while sz >= 0 and rslt[sz] == 0: sz -= 1 - rslt.resize(sz + 1, 0); self.contents = rslt^ + rslt.resize(sz + 1, 0); self.contents = rslt alias lb2: Float64 = 1.0 -alias lb3: Float64 = log2(Float64(3.0)) -alias lb5: Float64 = log2(Float64(5.0)) +alias lb3: Float64 = log2[DType.float64, 1](3.0) +alias lb5: Float64 = log2[DType.float64, 1](5.0) -@fieldwise_init -struct LogRep(ImplicitlyCopyable, Movable, Stringable): +@value +struct LogRep(CollectionElement, Stringable): var logrep: Float64 var x2: UInt32 var x3: UInt32 var x5: UInt32 - fn __del__(deinit self): return + fn __del__(owned self): return @always_inline fn mul2(self) -> Self: return LogRep(self.logrep + lb2, self.x2 + 1, self.x3, self.x5) @@ -66,122 +66,91 @@ struct LogRep(ImplicitlyCopyable, Movable, Stringable): fn mul5(self) -> Self: return LogRep(self.logrep + lb5, self.x2, self.x3, self.x5 + 1) fn __str__(self) -> String: -# return "( " + String(self.x2) + ", " + String(self.x3) + ", " + String(self.x5) + " )" var rslt = BigNat(1) - fn expnd(mut rslt: BigNat, bs: UInt32, n: UInt32): + fn expnd(inout rslt: BigNat, bs: UInt32, n: UInt32): var bsm = BigNat(bs); var nm = n while nm > 0: - if (nm & 1) != 0: rslt *= bsm - tmp = bsm; bsm *= tmp; nm >>= 1 + if (nm & 1) != 0: rslt.mult(bsm) + bsm.mult(bsm); nm >>= 1 expnd(rslt, 2, self.x2); expnd(rslt, 3, self.x3); expnd(rslt, 5, self.x5) - return String(rslt) + return str(rslt) alias oneLR: LogRep = LogRep(0.0, 0, 0, 0) alias LogRepThunk = fn() escaping -> LogRep -# Since an escaping closure doesn't currently move even for last used captures, and -# List's can't be copied into closures, we could write a minimal List to do the job, or -# probably easier is to just use a Mojo Iterator struct.... -struct _HammingsLogImpIter(ImplicitlyCopyable, Movable, Iterator): - alias __copyinit__is_trivial = False - alias __moveinit__is_trivial = False - alias __del__is_trivial = False - alias Element = LogRep - var s2: List[LogRep]; var s3: List[LogRep]; var s5: LogRep; var mrg: LogRep -# var s2p: UnsafePointer[LogRep]; var s3p: UnsafePointer[LogRep] - var s2hdi: Int; var s2tli: Int; var s3hdi: Int; var s3tli: Int - fn __init__(out self: Self): - self.s2 = List[LogRep](length=512, fill=oneLR); self.s2[0] = oneLR.mul2() - self.s3 = List[LogRep](length=1, fill=oneLR); self.s3[0] = oneLR.mul3() - self.s5 = oneLR.mul5(); self.mrg = oneLR -# self.s2p = self.s2.steal_data(); self.s3p = self.s3.steal_data() - self.s2hdi = 0; self.s2tli = -1; self.s3hdi = 0; self.s3tli = -1 - fn __copyinit__(out self: Self, existing: Self, /): - self.s2 = existing.s2.copy(); self.s3 = existing.s3.copy() - self.s5 = existing.s5; self.mrg = existing.mrg -# self.s2p = existing.s2p; self.s3p = existing.s3p - self.s2hdi = existing.s2hdi; self.s2tli = existing.s2tli - self.s3hdi = existing.s3hdi; self.s3tli = existing.s3tli -# fn __moveinit__(out self: Self, var existing: Self, /): -# self = existing^ - fn __has_next__(self: Self) -> Bool: - return True # "infinite" series! - fn __next__(mut self: Self) -> Self.Element: - var rslt = self.s2.unsafe_get(self.s2hdi) - var s2len = len(self.s2) - self.s2tli += 1; - if self.s2tli >= s2len: - self.s2tli = 0 - if self.s2hdi == self.s2tli: +fn hammingsLogImp() -> LogRepThunk: + var s2 = DynamicVector[LogRep](); var s3 = DynamicVector[LogRep](); var s5 = oneLR; var mrg = oneLR + s2.resize(512, oneLR); s2[0] = oneLR.mul2(); s3.resize(1, oneLR); s3[0] = oneLR.mul3() +# var s2p = s2.steal_data(); var s3p = s3.steal_data() + var s2hdi = 0; var s2tli = -1; var s3hdi = 0; var s3tli = -1 + @always_inline + fn next() escaping -> LogRep: + var rslt = s2[s2hdi] + var s2len = len(s2) + s2tli += 1; + if s2tli >= s2len: + s2tli = 0 + if s2hdi == s2tli: if s2len < 1024: - self.s2.resize(1024, oneLR) # ; self.s2p = self.s2.steal_data() + s2.resize(1024, oneLR) else: - self.s2.resize(s2len + s2len, oneLR) # ; self.s2p = self.s2.steal_data() - for i in range(self.s2hdi): - self.s2.unsafe_set(s2len + i, self.s2.unsafe_get(i)) + s2.resize(s2len + s2len, oneLR) # ; s2p = s2.steal_data() + for i in range(s2hdi): + s2[s2len + i] = s2[i] # memcpy[UInt8, 0](s2p + s2len, s2p, sizeof[LogRep]() * s2hdi) - self.s2tli += s2len; s2len += s2len - if rslt.logrep < self.mrg.logrep: - self.s2hdi += 1 - if self.s2hdi >= s2len: - self.s2hdi = 0 + s2tli += s2len; s2len += s2len + if rslt.logrep < mrg.logrep: + s2hdi += 1 + if s2hdi >= s2len: + s2hdi = 0 else: - rslt = self.mrg - var s3len = len(self.s3) - self.s3tli += 1; - if self.s3tli >= s3len: - self.s3tli = 0 - if self.s3hdi == self.s3tli: + rslt = mrg + var s3len = len(s3) + s3tli += 1; + if s3tli >= s3len: + s3tli = 0 + if s3hdi == s3tli: if s3len < 1024: - self.s3.resize(1024, oneLR) # ; self.s3p = self.s3.steal_data() + s3.resize(1024, oneLR) else: - self.s3.resize(s3len + s3len, oneLR) # ; self.s3p = self.s3.steal_data() - for i in range(self.s3hdi): - self.s3.unsafe_set(s3len + i, self.s3.unsafe_get(i)) + s3.resize(s3len + s3len, oneLR) # ; s3p = s3.steal_data() + for i in range(s3hdi): + s3[s3len + i] = s3[i] # memcpy[UInt8, 0](s3p + s3len, s3p, sizeof[LogRep]() * s3hdi) - self.s3tli += s3len; s3len += s3len - if self.mrg.logrep < self.s5.logrep: - self.s3hdi += 1 - if self.s3hdi >= s3len: - self.s3hdi = 0 + s3tli += s3len; s3len += s3len + if mrg.logrep < s5.logrep: + s3hdi += 1 + if s3hdi >= s3len: + s3hdi = 0 else: - self.s5 = self.s5.mul5() - self.s3[self.s3tli] = rslt.mul3(); var t = self.s3[self.s3hdi]; - self.mrg = t if t.logrep < self.s5.logrep else self.s5 - self.s2.unsafe_set(self.s2tli, rslt.mul2()); return rslt - -@fieldwise_init -struct HammingsLogImp(ImplicitlyCopyable, Movable, Iterable): - alias __del__is_trivial = True - alias IteratorType[ - iterable_mut: Bool, //, iterable_origin: Origin[iterable_mut] - ]: Iterator = _HammingsLogImpIter - fn __iter__(ref self: Self) -> _HammingsLogImpIter: - return _HammingsLogImpIter() + s5 = s5.mul5() + s3[s3tli] = rslt.mul3(); let t = s3[s3hdi]; + mrg = t if t.logrep < s5.logrep else s5 + s2[s2tli] = rslt.mul2(); return rslt + return next fn main(): print("The first 20 Hamming numbers are:") - for i, h in enumerate(HammingsLogImp()): - print(String(h) + " ", end='') - if i >= 19: break + var f = hammingsLogImp(); + for i in range(20): print_no_newline(f(), " ") print() - for i, h in enumerate(HammingsLogImp()): - if i >= 1691 - 1: print("The 1691st Hamming number is " + String(h)); break - var strt: Int = monotonic() - var ham = oneLR - for i, h in enumerate(HammingsLogImp()): - if i >= cCOUNT - 1: ham = h; break - var elpsd = (monotonic() - strt) / 1000 + f = hammingsLogImp(); var h: LogRep = oneLR + for i in range(1691): h = f() + print("The 1691st Hamming number is", h) + let strt: Int = now() + f = hammingsLogImp() + for i in range(cCOUNT): h = f() + let elpsd = (now() - strt) / 1000 - print("The " + String(cCOUNT) + "th Hamming number is:") - print("2**" + String(ham.x2) + " * 3**" + String(ham.x3) + " * 5**" + String(ham.x5)) - var lg2 = lb2 * Float64(Int(ham.x2)) + lb3 * Float64(Int(ham.x3)) + lb5 * Float64(Int(ham.x5)) - var lg10 = lg2 / log2(Float64(10)) - var expnt = trunc(lg10); var num = Float64(10.0)**(lg10 - expnt) - var apprxstr = String(num) + "E+" + String(Int(expnt)) + print("The " + str(cCOUNT) + "th Hamming number is:") + print("2**" + str(h.x2) + " * 3**" + str(h.x3) + " * 5**" + str(h.x5)) + let lg2 = lb2 * Float64(h.x2.to_int()) + lb3 * Float64(h.x3.to_int()) + lb5 * Float64(h.x5.to_int()) + let lg10 = lg2 / log2(Float64(10)) + let expnt = trunc(lg10); let num = pow(Float64(10.0), lg10 - expnt) + let apprxstr = str(num) + "E+" + str(expnt.to_int()) print("Approximately: ", apprxstr) - var answrstr = String(ham) + let answrstr = str(h) print("The result has", len(answrstr), "digits.") print(answrstr) - print("This took " + String(elpsd) + " microseconds.") + print("This took " + str(elpsd) + " microseconds.") diff --git a/Task/Hamming-numbers/OCaml/hamming-numbers-1.ml b/Task/Hamming-numbers/OCaml/hamming-numbers-1.ocaml similarity index 100% rename from Task/Hamming-numbers/OCaml/hamming-numbers-1.ml rename to Task/Hamming-numbers/OCaml/hamming-numbers-1.ocaml diff --git a/Task/Hamming-numbers/OCaml/hamming-numbers-2.ml b/Task/Hamming-numbers/OCaml/hamming-numbers-2.ocaml similarity index 100% rename from Task/Hamming-numbers/OCaml/hamming-numbers-2.ml rename to Task/Hamming-numbers/OCaml/hamming-numbers-2.ocaml diff --git a/Task/Hamming-numbers/PascalABC.NET/hamming-numbers.pas b/Task/Hamming-numbers/PascalABC.NET/hamming-numbers.pas deleted file mode 100644 index 2f3354df97..0000000000 --- a/Task/Hamming-numbers/PascalABC.NET/hamming-numbers.pas +++ /dev/null @@ -1,34 +0,0 @@ -function Hamming(n: integer): BigInteger; -begin - var (two,three,five) := (2bi, 3bi, 5bi); - var h := new BigInteger[n]; - h[0] := 1; - var (x2,x3,x5) := (2bi, 3bi, 5bi); - var (i,j,k) := (0, 0, 0); - for var ind := 1 to n-1 do - begin - h[ind] := Min(x2, x3, x5); - if h[ind] = x2 then - begin - i += 1; - x2 := two * h[i]; - end; - if h[ind] = x3 then - begin - j += 1; - x3 := three * h[j]; - end; - if h[ind] = x5 then - begin - k += 1; - x5 := five * h[k]; - end; - end; - Result := h[n-1]; -end; - -begin - (1..20).Select(x -> Hamming(x)).Println; - Hamming(1691).Println; - Hamming(1000000).Println; -end. diff --git a/Task/Hamming-numbers/REXX/hamming-numbers-1.rexx b/Task/Hamming-numbers/REXX/hamming-numbers-1.rexx new file mode 100644 index 0000000000..cc53b7ad15 --- /dev/null +++ b/Task/Hamming-numbers/REXX/hamming-numbers-1.rexx @@ -0,0 +1,20 @@ +/*REXX program computes Hamming numbers: 1 ──► 20, # 1691, and the one millionth. */ +numeric digits 100 /*ensure enough decimal digits. */ +call hamming 1, 20 /*show the 1st ──► twentieth Hamming #s*/ +call hamming 1691 /*show the 1,691st Hamming number. */ +call hamming 1000000 /*show the 1 millionth Hamming number.*/ +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +hamming: procedure; parse arg x,y; if y=='' then y= x; w= length(y) + #2= 1; #3= 1; #5= 1; @.= 0; @.1= 1 + do n=2 for y-1 + @.n= min(2*@.#2, 3*@.#3, 5*@.#5) /*pick the minimum of 3 Hamming numbers*/ + if 2*@.#2 == @.n then #2= #2 + 1 /*number already defined? Use next #. */ + if 3*@.#3 == @.n then #3= #3 + 1 /* " " " " " " */ + if 5*@.#5 == @.n then #5= #5 + 1 /* " " " " " " */ + end /*n*/ /* [↑] maybe assign next 3 Hamming#s. */ + do j=x to y; say 'Hamming('right(j, w)") =" @.j + end /*j*/ + + say right( 'length of last Hamming number =' length(@.y), 70); say + return diff --git a/Task/Hamming-numbers/REXX/hamming-numbers-2.rexx b/Task/Hamming-numbers/REXX/hamming-numbers-2.rexx new file mode 100644 index 0000000000..bccf09bbe0 --- /dev/null +++ b/Task/Hamming-numbers/REXX/hamming-numbers-2.rexx @@ -0,0 +1,26 @@ +/*REXX program computes Hamming numbers: 1 ──► 20, # 1691, and the one millionth.*/ +call hamming 1, 20 /*show the 1st ──► twentieth Hamming #s*/ +call hamming 1691 /*show the 1,691st Hamming number. */ +call hamming 1000000 /*show the 1 millionth Hamming number.*/ +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +hamming: procedure; arg x,y; if y=='' then y= x; w= length(y); L= length(y-1); p= 2**L + numeric digits max(9, p + p%4 + p%16) /*ensure enough decimal digits. */ + #2= 1; #3= 1; #5= 1; @.= 0; @.1= 1 + do n=2 for y-1 + _2= @.#2 + @.#2 /*this is faster than: @.#2 * 2 */ + _3= @.#3 + @.#3 + @.#3 /* " " " " @,#3 * 3 */ + _5= @.#5 * 5 + m= _2 /*assume a minimum (of the 3 Hammings).*/ + if _3 < m then m= _3 /*is this number less than the minimum?*/ + if _5 < m then m= _5 /* " " " " " " " */ + @.n= m /*now, assign the next Hamming number.*/ + if _2 == m then #2= #2 + 1 /*number already defined? Use next #.*/ + if _3 == m then #3= #3 + 1 /* " " " " " " */ + if _5 == m then #5= #5 + 1 /* " " " " " " */ + end /*n*/ /* [↑] maybe assign next Hamming #'s. */ + do j=x to y; say 'Hamming('right(j, w)") =" @.j + end /*j*/ + + say right( 'length of last Hamming number =' length(@.y), 70); say + return diff --git a/Task/Hamming-numbers/REXX/hamming-numbers-3.rexx b/Task/Hamming-numbers/REXX/hamming-numbers-3.rexx new file mode 100644 index 0000000000..ed4dfa5cbb --- /dev/null +++ b/Task/Hamming-numbers/REXX/hamming-numbers-3.rexx @@ -0,0 +1,26 @@ +/*REXX program computes Hamming numbers: 1 ──► 20, # 1691, and the one millionth.*/ +call hamming 1, 20 /*show the 1st ──► twentieth Hamming #s*/ +call hamming 1691 /*show the 1,691st Hamming number. */ +call hamming 1000000 /*show the 1 millionth Hamming number.*/ +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +hamming: procedure; arg x,y; if y=='' then y= x; w= length(y); L= length(y-1); p= 2**L + numeric digits max(9, p + p%4 + p%16) /*ensure enough decimal digits. */ + #2= 1; #3= 1; #5= 1; @.= 0; @.1= 1 + do n=2 for y-1 + _2= @.#2 + @.#2 /*this is faster than: @.#2 * 2 */ + _3= @.#3 + @.#3 + @.#3 /* " " " " @,#3 * 3 */ + _5= @.#5 * 5 + m= _2 /*assume a minimum (of the 3 Hammings).*/ + if _3 < m then m= _3 /*is this number less than the minimum?*/ + if _5 < m then m= _5 /* " " " " " " " */ + @.n= format(m,,,,0) /*now, assign the next Hamming number.*/ + if _2 == m then #2= #2 + 1 /*number already defined? Use next #.*/ + if _3 == m then #3= #3 + 1 /* " " " " " " */ + if _5 == m then #5= #5 + 1 /* " " " " " " */ + end /*n*/ /* [↑] maybe assign next Hamming #'s. */ + do j=x to y; say 'Hamming('right(j, w)") =" @.j / 1 + end /*j*/ + + say right( 'length of last Hamming number =' length(@.y / 1), 70); say + return diff --git a/Task/Hamming-numbers/REXX/hamming-numbers.rexx b/Task/Hamming-numbers/REXX/hamming-numbers.rexx deleted file mode 100644 index 7ab126e8ff..0000000000 --- a/Task/Hamming-numbers/REXX/hamming-numbers.rexx +++ /dev/null @@ -1,38 +0,0 @@ --- 23 Aug 2025 -include Setting - -say 'HAMMING NUMBERS' -say version -say -call Hammings 1000000 -call ShowFirstN 20 -call ShowNth 1691 -call ShowNth 1000000 -call Hammings 10000000 -call ShowNth 10000000 -say Time('e')/1 'seconds' -exit - -ShowFirstN: -procedure expose Hamm. -arg xx -xx = xx/1 -say 'First' xx 'Hamming numbers are' -do i = 1 to xx - call Charout ,Right(Hamm.i,5) - if i//10 = 0 then - say -end -say -return - -ShowNth: -procedure expose Hamm. -arg xx -xx = xx/1 -say xx'th Hamming number is' -say Hamm.xx '('Length(Hamm.xx) 'digits)' -say -return - -include Math diff --git a/Task/Hamming-numbers/Rust/hamming-numbers-1.rs b/Task/Hamming-numbers/Rust/hamming-numbers-1.rust similarity index 100% rename from Task/Hamming-numbers/Rust/hamming-numbers-1.rs rename to Task/Hamming-numbers/Rust/hamming-numbers-1.rust diff --git a/Task/Hamming-numbers/Rust/hamming-numbers-2.rs b/Task/Hamming-numbers/Rust/hamming-numbers-2.rust similarity index 100% rename from Task/Hamming-numbers/Rust/hamming-numbers-2.rs rename to Task/Hamming-numbers/Rust/hamming-numbers-2.rust diff --git a/Task/Hamming-numbers/Rust/hamming-numbers-3.rs b/Task/Hamming-numbers/Rust/hamming-numbers-3.rust similarity index 100% rename from Task/Hamming-numbers/Rust/hamming-numbers-3.rs rename to Task/Hamming-numbers/Rust/hamming-numbers-3.rust diff --git a/Task/Hamming-numbers/Rust/hamming-numbers-4.rs b/Task/Hamming-numbers/Rust/hamming-numbers-4.rust similarity index 100% rename from Task/Hamming-numbers/Rust/hamming-numbers-4.rs rename to Task/Hamming-numbers/Rust/hamming-numbers-4.rust diff --git a/Task/Hamming-numbers/Rust/hamming-numbers-5.rs b/Task/Hamming-numbers/Rust/hamming-numbers-5.rust similarity index 100% rename from Task/Hamming-numbers/Rust/hamming-numbers-5.rs rename to Task/Hamming-numbers/Rust/hamming-numbers-5.rust diff --git a/Task/Hamming-numbers/Rust/hamming-numbers-6.rs b/Task/Hamming-numbers/Rust/hamming-numbers-6.rust similarity index 100% rename from Task/Hamming-numbers/Rust/hamming-numbers-6.rs rename to Task/Hamming-numbers/Rust/hamming-numbers-6.rust diff --git a/Task/Hamming-numbers/Rust/hamming-numbers-7.rs b/Task/Hamming-numbers/Rust/hamming-numbers-7.rust similarity index 100% rename from Task/Hamming-numbers/Rust/hamming-numbers-7.rs rename to Task/Hamming-numbers/Rust/hamming-numbers-7.rust diff --git a/Task/Hamming-numbers/Rust/hamming-numbers-8.rs b/Task/Hamming-numbers/Rust/hamming-numbers-8.rust similarity index 100% rename from Task/Hamming-numbers/Rust/hamming-numbers-8.rs rename to Task/Hamming-numbers/Rust/hamming-numbers-8.rust diff --git a/Task/Hamming-numbers/Scheme/hamming-numbers-1.scm b/Task/Hamming-numbers/Scheme/hamming-numbers-1.ss similarity index 100% rename from Task/Hamming-numbers/Scheme/hamming-numbers-1.scm rename to Task/Hamming-numbers/Scheme/hamming-numbers-1.ss diff --git a/Task/Hamming-numbers/Scheme/hamming-numbers-2.scm b/Task/Hamming-numbers/Scheme/hamming-numbers-2.ss similarity index 100% rename from Task/Hamming-numbers/Scheme/hamming-numbers-2.scm rename to Task/Hamming-numbers/Scheme/hamming-numbers-2.ss diff --git a/Task/Hamming-numbers/V-(Vlang)/hamming-numbers-1.v b/Task/Hamming-numbers/V-(Vlang)/hamming-numbers-1.v index bd63012c8d..509ec16025 100644 --- a/Task/Hamming-numbers/V-(Vlang)/hamming-numbers-1.v +++ b/Task/Hamming-numbers/V-(Vlang)/hamming-numbers-1.v @@ -1,7 +1,9 @@ import math.big fn min(a big.Integer, b big.Integer) big.Integer { - if a < b {return a} + if a < b { + return a + } return b } diff --git a/Task/Hamming-numbers/V-(Vlang)/hamming-numbers-2.v b/Task/Hamming-numbers/V-(Vlang)/hamming-numbers-2.v index 4fa74da146..3f7755a80b 100644 --- a/Task/Hamming-numbers/V-(Vlang)/hamming-numbers-2.v +++ b/Task/Hamming-numbers/V-(Vlang)/hamming-numbers-2.v @@ -63,7 +63,7 @@ fn (lr LogRep) str() string { } struct HammingsLog { - mut: + mut: // automatically initialized with LogRep = one (defult)... s2 []LogRep = []LogRep { len: 1024, cap: 1024 } s3 []LogRep = []LogRep { len: 1024, cap: 1024 } diff --git a/Task/Hamming-numbers/VBScript/hamming-numbers.vbs b/Task/Hamming-numbers/VBScript/hamming-numbers.vb similarity index 100% rename from Task/Hamming-numbers/VBScript/hamming-numbers.vbs rename to Task/Hamming-numbers/VBScript/hamming-numbers.vb diff --git a/Task/Handle-a-signal/Ada/handle-a-signal-1.adb b/Task/Handle-a-signal/Ada/handle-a-signal-1.ada similarity index 100% rename from Task/Handle-a-signal/Ada/handle-a-signal-1.adb rename to Task/Handle-a-signal/Ada/handle-a-signal-1.ada diff --git a/Task/Handle-a-signal/Ada/handle-a-signal-2.adb b/Task/Handle-a-signal/Ada/handle-a-signal-2.ada similarity index 100% rename from Task/Handle-a-signal/Ada/handle-a-signal-2.adb rename to Task/Handle-a-signal/Ada/handle-a-signal-2.ada diff --git a/Task/Handle-a-signal/Ada/handle-a-signal-3.adb b/Task/Handle-a-signal/Ada/handle-a-signal-3.ada similarity index 100% rename from Task/Handle-a-signal/Ada/handle-a-signal-3.adb rename to Task/Handle-a-signal/Ada/handle-a-signal-3.ada diff --git a/Task/Handle-a-signal/Batch-File/handle-a-signal.bat b/Task/Handle-a-signal/Batch-File/handle-a-signal.bat deleted file mode 100644 index 6c25ba9c5d..0000000000 --- a/Task/Handle-a-signal/Batch-File/handle-a-signal.bat +++ /dev/null @@ -1,31 +0,0 @@ -@echo off -setlocal enableextensions enabledelayedexpansion -if defined sigintEnd goto timerCalc -if defined sigintMain goto main -set timer=for /f "tokens=1-4 delims=:.," %%a in ("^!time^!"^) do set start_h=%%a^&set /a start_m=100%%b %% 100^&set /a start_s=100%%c %% 100^&set /a start_ms=100%%d %% 100 -( -%timer% -set sigintMain=1 -%= "echo y" to skip a prompt and proceed to time reporting =% -echo y| cmd /d /c "%~f0" -cmd /d /c set sigintEnd=1^&"%~f0" -goto :eof -) -:main -set i=1 -:loop -echo %i% -:: sleep for 1 second -ping 0.0.0.0 -n 2 >nul -set /a i+=1 -goto loop -:timerCalc -%timer:start=end% -for %%i in (h m s ms) do set /a %%i=end_%%i-start_%%i -if %ms% lss 0 set /a s-=1 & set /a ms=100%ms% -if %s% lss 0 set /a m-=1 & set /a s=60%s% -if %m% lss 0 set /a h-=1 & set /a m=60%m% -if %h% lss 0 set /a h=24%h% -if 1%ms% lss 100 set ms=0%ms% -set /a totalsecs=h*3600 + m*60 +s -echo Execution time: %totalsecs%.%ms%s diff --git a/Task/Handle-a-signal/COBOL/handle-a-signal.cob b/Task/Handle-a-signal/COBOL/handle-a-signal.cobol similarity index 100% rename from Task/Handle-a-signal/COBOL/handle-a-signal.cob rename to Task/Handle-a-signal/COBOL/handle-a-signal.cobol diff --git a/Task/Handle-a-signal/Crystal/handle-a-signal.cr b/Task/Handle-a-signal/Crystal/handle-a-signal.crystal similarity index 100% rename from Task/Handle-a-signal/Crystal/handle-a-signal.cr rename to Task/Handle-a-signal/Crystal/handle-a-signal.crystal diff --git a/Task/Handle-a-signal/Julia/handle-a-signal.jl b/Task/Handle-a-signal/Julia/handle-a-signal.julia similarity index 100% rename from Task/Handle-a-signal/Julia/handle-a-signal.jl rename to Task/Handle-a-signal/Julia/handle-a-signal.julia diff --git a/Task/Handle-a-signal/Kotlin/handle-a-signal.kts b/Task/Handle-a-signal/Kotlin/handle-a-signal.kotlin similarity index 100% rename from Task/Handle-a-signal/Kotlin/handle-a-signal.kts rename to Task/Handle-a-signal/Kotlin/handle-a-signal.kotlin diff --git a/Task/Handle-a-signal/OCaml/handle-a-signal.ml b/Task/Handle-a-signal/OCaml/handle-a-signal.ocaml similarity index 100% rename from Task/Handle-a-signal/OCaml/handle-a-signal.ml rename to Task/Handle-a-signal/OCaml/handle-a-signal.ocaml diff --git a/Task/Handle-a-signal/PascalABC.NET/handle-a-signal.pas b/Task/Handle-a-signal/PascalABC.NET/handle-a-signal.pas deleted file mode 100644 index 751e61da9f..0000000000 --- a/Task/Handle-a-signal/PascalABC.NET/handle-a-signal.pas +++ /dev/null @@ -1,13 +0,0 @@ -begin - var counter := 0; - while True do - begin - Print(counter); - counter += 1; - Sleep(500); - end; - Console.CancelKeyPress += (o,e) -> begin - Println(Milliseconds); - halt - end; -end. diff --git a/Task/Handle-a-signal/PowerShell/handle-a-signal.ps1 b/Task/Handle-a-signal/PowerShell/handle-a-signal.psh similarity index 100% rename from Task/Handle-a-signal/PowerShell/handle-a-signal.ps1 rename to Task/Handle-a-signal/PowerShell/handle-a-signal.psh diff --git a/Task/Handle-a-signal/Rebol/handle-a-signal.rebol b/Task/Handle-a-signal/Rebol/handle-a-signal.rebol deleted file mode 100644 index 89e69e09f1..0000000000 --- a/Task/Handle-a-signal/Rebol/handle-a-signal.rebol +++ /dev/null @@ -1 +0,0 @@ -catch/quit/with [i: 0 t: stats/timer forever [print ++ i wait 0.5]][print ["Done!" stats/timer - t]] diff --git a/Task/Handle-a-signal/Rust/handle-a-signal.rs b/Task/Handle-a-signal/Rust/handle-a-signal.rust similarity index 100% rename from Task/Handle-a-signal/Rust/handle-a-signal.rs rename to Task/Handle-a-signal/Rust/handle-a-signal.rust diff --git a/Task/Happy-numbers/00-META.yaml b/Task/Happy-numbers/00-META.yaml index 6e331dac93..2fb428f9fa 100644 --- a/Task/Happy-numbers/00-META.yaml +++ b/Task/Happy-numbers/00-META.yaml @@ -1,3 +1,3 @@ --- from: http://rosettacode.org/wiki/Happy_numbers -note: Numbers +note: Arithmetic operations diff --git a/Task/Happy-numbers/Ada/happy-numbers.adb b/Task/Happy-numbers/Ada/happy-numbers.ada similarity index 100% rename from Task/Happy-numbers/Ada/happy-numbers.adb rename to Task/Happy-numbers/Ada/happy-numbers.ada diff --git a/Task/Happy-numbers/Arturo/happy-numbers.arturo b/Task/Happy-numbers/Arturo/happy-numbers.arturo index 388d4db91b..bc1ccc3bbb 100644 --- a/Task/Happy-numbers/Arturo/happy-numbers.arturo +++ b/Task/Happy-numbers/Arturo/happy-numbers.arturo @@ -1,7 +1,7 @@ -ord0: to :integer '0' +ord0: to :integer `0` happy?: function [x][ n: x - past: [] + past: new [] while [n <> 1][ s: to :string n diff --git a/Task/Happy-numbers/AutoIt/happy-numbers-1.au3 b/Task/Happy-numbers/AutoIt/happy-numbers-1.autoit similarity index 100% rename from Task/Happy-numbers/AutoIt/happy-numbers-1.au3 rename to Task/Happy-numbers/AutoIt/happy-numbers-1.autoit diff --git a/Task/Happy-numbers/AutoIt/happy-numbers-2.au3 b/Task/Happy-numbers/AutoIt/happy-numbers-2.autoit similarity index 100% rename from Task/Happy-numbers/AutoIt/happy-numbers-2.au3 rename to Task/Happy-numbers/AutoIt/happy-numbers-2.autoit diff --git a/Task/Happy-numbers/COBOL/happy-numbers.cob b/Task/Happy-numbers/COBOL/happy-numbers.cobol similarity index 100% rename from Task/Happy-numbers/COBOL/happy-numbers.cob rename to Task/Happy-numbers/COBOL/happy-numbers.cobol diff --git a/Task/Happy-numbers/Crystal/happy-numbers.cr b/Task/Happy-numbers/Crystal/happy-numbers.crystal similarity index 100% rename from Task/Happy-numbers/Crystal/happy-numbers.cr rename to Task/Happy-numbers/Crystal/happy-numbers.crystal diff --git a/Task/Happy-numbers/Delphi/happy-numbers.pas b/Task/Happy-numbers/Delphi/happy-numbers.delphi similarity index 100% rename from Task/Happy-numbers/Delphi/happy-numbers.pas rename to Task/Happy-numbers/Delphi/happy-numbers.delphi diff --git a/Task/Happy-numbers/Elena/happy-numbers.elena b/Task/Happy-numbers/Elena/happy-numbers.elena index 0b49f2db3e..5b4b0322fa 100644 --- a/Task/Happy-numbers/Elena/happy-numbers.elena +++ b/Task/Happy-numbers/Elena/happy-numbers.elena @@ -27,7 +27,7 @@ isHappy(int n) ^ true } -public Program() +public program() { auto happynums := new List(8); int num := 1; diff --git a/Task/Happy-numbers/Elixir/happy-numbers.ex b/Task/Happy-numbers/Elixir/happy-numbers.elixir similarity index 100% rename from Task/Happy-numbers/Elixir/happy-numbers.ex rename to Task/Happy-numbers/Elixir/happy-numbers.elixir diff --git a/Task/Happy-numbers/Euphoria/happy-numbers.eu b/Task/Happy-numbers/Euphoria/happy-numbers.euphoria similarity index 100% rename from Task/Happy-numbers/Euphoria/happy-numbers.eu rename to Task/Happy-numbers/Euphoria/happy-numbers.euphoria diff --git a/Task/Happy-numbers/Frink/happy-numbers.frink b/Task/Happy-numbers/Frink/happy-numbers.frink deleted file mode 100644 index ce9c4e404d..0000000000 --- a/Task/Happy-numbers/Frink/happy-numbers.frink +++ /dev/null @@ -1,19 +0,0 @@ -isHappy = {|n| - sqf = {|x| x^2} - seen = new set[n] - - while true - { - n = sum[map[sqf, integerDigits[n]]] - if n == 1 - return true - - if seen.contains[n] - return false - else - seen.put[n] - } -} - - -println[first[select[count[1], isHappy], 8]] diff --git a/Task/Happy-numbers/Haskell/happy-numbers-3.hs b/Task/Happy-numbers/Haskell/happy-numbers-3.hs deleted file mode 100644 index 04713b0ba9..0000000000 --- a/Task/Happy-numbers/Haskell/happy-numbers-3.hs +++ /dev/null @@ -1,14 +0,0 @@ -happy x = sum (map (\x -> x * x) (digits x)) - where - digits 0 = [0] - digits x = (x `mod` 10):(digits (x `div` 10)) -- could function digits be more concise? - -ishappy x = floyd (happy x) (happy (happy x)) - where - floyd :: Int -> Int -> Bool - floyd 1 _ = True - floyd _ 1 = True - floyd a b | a == b = False - floyd x y = floyd (happy x) (happy (happy y)) - -main = (print $ take 8 $ filter ishappy [1..]) >> (print $ sum $ take 10000 $ filter ishappy [1..] diff --git a/Task/Happy-numbers/Julia/happy-numbers-1.jl b/Task/Happy-numbers/Julia/happy-numbers-1.julia similarity index 100% rename from Task/Happy-numbers/Julia/happy-numbers-1.jl rename to Task/Happy-numbers/Julia/happy-numbers-1.julia diff --git a/Task/Happy-numbers/Julia/happy-numbers-2.jl b/Task/Happy-numbers/Julia/happy-numbers-2.julia similarity index 100% rename from Task/Happy-numbers/Julia/happy-numbers-2.jl rename to Task/Happy-numbers/Julia/happy-numbers-2.julia diff --git a/Task/Happy-numbers/Julia/happy-numbers-3.jl b/Task/Happy-numbers/Julia/happy-numbers-3.julia similarity index 100% rename from Task/Happy-numbers/Julia/happy-numbers-3.jl rename to Task/Happy-numbers/Julia/happy-numbers-3.julia diff --git a/Task/Happy-numbers/Kotlin/happy-numbers.kts b/Task/Happy-numbers/Kotlin/happy-numbers.kotlin similarity index 100% rename from Task/Happy-numbers/Kotlin/happy-numbers.kts rename to Task/Happy-numbers/Kotlin/happy-numbers.kotlin diff --git a/Task/Happy-numbers/OCaml/happy-numbers.ml b/Task/Happy-numbers/OCaml/happy-numbers.ocaml similarity index 100% rename from Task/Happy-numbers/OCaml/happy-numbers.ml rename to Task/Happy-numbers/OCaml/happy-numbers.ocaml diff --git a/Task/Happy-numbers/PascalABC.NET/happy-numbers.pas b/Task/Happy-numbers/PascalABC.NET/happy-numbers.pas deleted file mode 100644 index 15d02a6478..0000000000 --- a/Task/Happy-numbers/PascalABC.NET/happy-numbers.pas +++ /dev/null @@ -1,27 +0,0 @@ -uses School; - -function IsHappy(n: integer): boolean; -begin - Result := False; - var cache := new HashSet; - while n <> 1 do - begin - if n in cache then - exit; - cache.Add(n); - n := n.Digits.Sum(d -> d*d); - end; - Result := True; -end; - -begin - var n := 1; - var happyNums := new List; - while happyNums.Count < 8 do - begin - if IsHappy(n) then - happyNums.Add(n); - n += 1; - end; - happyNums.Print -end. diff --git a/Task/Happy-numbers/Pluto/happy-numbers.pluto b/Task/Happy-numbers/Pluto/happy-numbers.pluto deleted file mode 100644 index 80a7ecb196..0000000000 --- a/Task/Happy-numbers/Pluto/happy-numbers.pluto +++ /dev/null @@ -1,26 +0,0 @@ -local function happy(n) - local m = {} - while n > 1 do - m[n] = true - local x = n - n = 0 - while x > 0 do - local d = x % 10 - n += d * d - x //= 10 - end - if m[n] then return false end -- m[n] will be nil if 'n' is not a key - end - return true -end - -local found = 0 -local n = 1 -while found < 8 do - if happy(n) then - io.write($"{n} ") - found += 1 - end - n += 1 -end -print() diff --git a/Task/Happy-numbers/PowerShell/happy-numbers-1.ps1 b/Task/Happy-numbers/PowerShell/happy-numbers-1.psh similarity index 100% rename from Task/Happy-numbers/PowerShell/happy-numbers-1.ps1 rename to Task/Happy-numbers/PowerShell/happy-numbers-1.psh diff --git a/Task/Happy-numbers/PowerShell/happy-numbers-2.ps1 b/Task/Happy-numbers/PowerShell/happy-numbers-2.psh similarity index 100% rename from Task/Happy-numbers/PowerShell/happy-numbers-2.ps1 rename to Task/Happy-numbers/PowerShell/happy-numbers-2.psh diff --git a/Task/Happy-numbers/REXX/happy-numbers-2.rexx b/Task/Happy-numbers/REXX/happy-numbers-2.rexx deleted file mode 100644 index 11cc8094fd..0000000000 --- a/Task/Happy-numbers/REXX/happy-numbers-2.rexx +++ /dev/null @@ -1,106 +0,0 @@ --- 23 Aug 2025 -include Setting - -say 'HAPPY NUMBERS' -say version -say -say 'Process first 8...' -call HappyS 8 -call ShowFirst8 -say -say 'Process first 10 million...' -call HappyS 1e7 -call ShowNth 1e1 -call ShowNth 1e2 -call ShowNth 1e3 -call ShowNth 1e4 -call ShowNth 1e5 -call ShowNth 1e6 -call ShowNth 1e7 -say -call Timer 'R' -exit - -HappyS: -procedure expose Happ. Flag. -arg xx --- Preset squares for digital sum -do i = 0 to 9 - Pow2.i=i*i -end --- Collect happy numbers <= 1000 -Flag.=0; Happ.=0; n=0 -do i = 1 while n < xx - h=i; ll='' - do forever --- Squared digital sum - ss=0 - do Length(h) - parse var h d +1 h; ss=ss+Pow2.d - end - select --- Unhappy? Flag sad sums, next number - when Flag.ss then do - do while ll <> '' - parse var ll s ll; Flag.s=1 - end - iterate i - end --- Repeating? Flag sad sums, next number - when WordPos(ss,ll) > 0 then do - do while ll <> '' - parse var ll s ll; Flag.s=1 - end - iterate i - end --- Happy? Bump, next number - when ss = 1 then do - n=n+1; Happ.n=i - iterate i - end --- Next sum - otherwise do - ll=ll ss; h=ss - end - end - end -end i --- Flag happy numbers <= 1000 -Flag.=0 -do i = 1 to n - h=Happ.i; Flag.h=1 -end --- Collect happy numbers > 1000 using flagged numbers -do i = 1001 while n < xx - h=i --- Squared digital sum - ss=0 - do Length(h) - parse var h d +1 h; ss=ss+Pow2.d - end --- Happy? Bump - if Flag.ss then do - n=n+1; Happ.n=i - end -end i --- Count -Happ.0=n -return n - -ShowFirst8: -procedure expose Happ. -say 'First 8 Happy numbers are' -do i = 1 to 8 - call Charout ,Right(Happ.i,3) -end -say -return - -ShowNth: -procedure expose Happ. -arg xx -xx = xx/1 -say xx'th Happy number is' Happ.xx -return - -include Math diff --git a/Task/Happy-numbers/REXX/happy-numbers-1.rexx b/Task/Happy-numbers/REXX/happy-numbers.rexx similarity index 100% rename from Task/Happy-numbers/REXX/happy-numbers-1.rexx rename to Task/Happy-numbers/REXX/happy-numbers.rexx diff --git a/Task/Happy-numbers/Rust/happy-numbers.rs b/Task/Happy-numbers/Rust/happy-numbers.rs deleted file mode 100644 index a0097862a0..0000000000 --- a/Task/Happy-numbers/Rust/happy-numbers.rs +++ /dev/null @@ -1,37 +0,0 @@ -fn sumsqd(mut n: i32) -> i32 { - let mut sq = 0; - while n > 0 { - let d = n % 10; - sq += d * d; - n /= 10; - } - sq -} - -fn cycle(a: T, f: F) -> T -where - T: Copy + PartialEq, - F: Fn(T) -> T, -{ - let mut t = a; - let mut h = f(a); - - while t != h { - t = f(t); - h = f(f(h)); - } - t -} - -fn ishappy(n: i32) -> bool { - cycle(n, sumsqd) == 1 -} - -fn main() { - let happy: Vec = (1..) - .filter(|&n| ishappy(n)) - .take(8) - .collect(); - - println!("{:?}", happy); -} diff --git a/Task/Happy-numbers/Rust/happy-numbers.rust b/Task/Happy-numbers/Rust/happy-numbers.rust new file mode 100644 index 0000000000..9b6647bd6e --- /dev/null +++ b/Task/Happy-numbers/Rust/happy-numbers.rust @@ -0,0 +1,36 @@ +#![feature(core)] + +fn sumsqd(mut n: i32) -> i32 { + let mut sq = 0; + while n > 0 { + let d = n % 10; + sq += d*d; + n /= 10 + } + sq +} + +use std::num::Int; +fn cycle(a: T, f: fn(T) -> T) -> T { + let mut t = a; + let mut h = f(a); + + while t != h { + t = f(t); + h = f(f(h)) + } + t +} + +fn ishappy(n: i32) -> bool { + cycle(n, sumsqd) == 1 +} + +fn main() { + let happy = std::iter::count(1, 1) + .filter(|&n| ishappy(n)) + .take(8) + .collect::>(); + + println!("{:?}", happy) +} diff --git a/Task/Happy-numbers/Scheme/happy-numbers.scm b/Task/Happy-numbers/Scheme/happy-numbers.ss similarity index 100% rename from Task/Happy-numbers/Scheme/happy-numbers.scm rename to Task/Happy-numbers/Scheme/happy-numbers.ss diff --git a/Task/Happy-numbers/Uiua/happy-numbers.uiua b/Task/Happy-numbers/Uiua/happy-numbers.uiua index a7189fe111..f282f61166 100644 --- a/Task/Happy-numbers/Uiua/happy-numbers.uiua +++ b/Task/Happy-numbers/Uiua/happy-numbers.uiua @@ -1,3 +1,10 @@ -HC ← /+ⁿ2⊥₁₀ # Happiness = sum of squares of digits. -Happy ← memo(=1⊢⍢(⊂HC⊸⊢|¬˜∊°⊂)[∘]) # Apply HC until it repeats or = 1. -↙8▽⊸≡Happy⇡40 +HC ← /+ⁿ2≡⋕°⋕ # Happiness calc = sum of squares of digits +IH ← |2 memo⟨IH ⊙⊂.|=1⟩∊,, HC # Apply HC until seen value recurs +Happy ← ⟨0◌|∘⟩IH : [1] . # Pre-load `seen` with 1. Return start number or 0 + +# Brute force approach isn't too bad with memoisation even for high bounds. +↙8⊚>0≡Happy⇡10000 + +# But iterative approach is still much faster +NH ← |1 ⟨NH|∘⟩≠0Happy.+1 # Find next Happy number +⇌[⍥(NH.) 7 1] diff --git a/Task/Happy-numbers/V-(Vlang)/happy-numbers.v b/Task/Happy-numbers/V-(Vlang)/happy-numbers.v index 93b56b1751..4e492e47a7 100644 --- a/Task/Happy-numbers/V-(Vlang)/happy-numbers.v +++ b/Task/Happy-numbers/V-(Vlang)/happy-numbers.v @@ -1,14 +1,16 @@ fn happy(h int) bool { mut m := map[int]bool{} - mut n, mut x := h, 0 + mut n := h for n > 1 { m[n] = true - x = 0 + mut x := 0 for x, n = n, 0; x > 0; x /= 10 { d := x % 10 n += d * d } - if m[n] { return false } + if m[n] { + return false + } } return true } @@ -20,5 +22,5 @@ fn main() { found++ } } - println("") + println('') } diff --git a/Task/Happy-numbers/VBScript/happy-numbers.vbs b/Task/Happy-numbers/VBScript/happy-numbers.vb similarity index 100% rename from Task/Happy-numbers/VBScript/happy-numbers.vbs rename to Task/Happy-numbers/VBScript/happy-numbers.vb diff --git a/Task/Harmonic-series/ALGOL-60/harmonic-series.alg b/Task/Harmonic-series/ALGOL-60/harmonic-series.alg deleted file mode 100644 index 7b5f62d6ba..0000000000 --- a/Task/Harmonic-series/ALGOL-60/harmonic-series.alg +++ /dev/null @@ -1,32 +0,0 @@ -begin - -real i, h, n, limit; - -limit := 20; -h := 0; -outstring(1,"First"); -outreal(1,limit); -outstring(1,"numbers in the harmonic series\n"); -for i := 1, i + 1 while i <= limit do - begin - h := h + 1 / i; - outreal(1,i); - outreal(1,h); - outstring(1,"\n"); - end; - -for i := 1, i + 1 while i <= 5 do - begin - h := 1; - for n := 2, n + 1 while h <= i do - begin - h := h + 1 / n; - end; - outstring(1,"First harmonic number >"); - outreal(1,i); - outstring(1,"is at position"); - outreal(1,n-1); - outstring(1,"\n"); - end; - -end diff --git a/Task/Harmonic-series/ALGOL-68/harmonic-series.alg b/Task/Harmonic-series/ALGOL-68/harmonic-series.alg index a050da661d..b9fee50a9e 100644 --- a/Task/Harmonic-series/ALGOL-68/harmonic-series.alg +++ b/Task/Harmonic-series/ALGOL-68/harmonic-series.alg @@ -1,13 +1,13 @@ -BEGIN # find some harmonic numbers, Hn is the sum of the reciprocals of 1..n # +BEGIN # find some harmonic numbers, Hn is the sum if the reciprocals of 1..n # # returns the first n Harmonic numbers # OP HARMONIC = ( INT n )[]REAL: BEGIN - [ 1 : n ]REAL hs; - hs[ 1 ] := 1; + [ 1 : n ]REAL h; + h[ 1 ] := 1; FOR i FROM 2 TO n DO - hs[ i ] := hs[ i - 1 ] + ( 1 / i ) + h[ i ] := h[ i - 1 ] + ( 1 / i ) OD; - hs + h END # HARMONIC # ; # find the first 20 000 harmonic numbers # []REAL h = HARMONIC 20 000; @@ -21,8 +21,7 @@ BEGIN # find some harmonic numbers, Hn is the sum of the reciprocals of 1..n # FOR i TO UPB h DO IF h[ i ] > rqd real THEN # found the first harmonic number greater than rqd real # - print( ( "Position of the first harmonic number > ", whole( rqd int, -2 ) ) ); - print( ( ": ", whole( i, 0 ), newline ) ); + print( ( "Position of the first harmonic number > ", whole( rqd int, -2 ), ": ", whole( i, 0 ), newline ) ); rqd int +:= 1; rqd real +:= 1 FI diff --git a/Task/Harmonic-series/Ada/harmonic-series.adb b/Task/Harmonic-series/Ada/harmonic-series.adb deleted file mode 100644 index 4e1c360707..0000000000 --- a/Task/Harmonic-series/Ada/harmonic-series.adb +++ /dev/null @@ -1,41 +0,0 @@ -with Ada.Text_IO; - -procedure Harmonic_Numbers is - type Harmonic_State is record - N : Positive := 1; - Hn : Float := 1.0; - end record; - - procedure Iterate_Harmonics (Hs : in out Harmonic_State; Max_Steps : Positive := 1; Stop : Float := Float'Last) is - begin - for I in 1 .. Max_Steps loop - exit when Hs.Hn > Stop; - Hs.N := Hs.N + 1; - Hs.Hn := Hs.Hn + 1.0 / Float (Hs.N); - end loop; - end Iterate_Harmonics; - - procedure Show_First_Harmonics (N : Positive) is - Hs : Harmonic_State; - begin - for I in 1 .. N loop - Ada.Text_IO.Put_Line (Hs.N'Image & " => " & Hs.Hn'Image); - Iterate_Harmonics (Hs); - end loop; - end Show_First_Harmonics; - - -- Assume Floats is in order - type Floats is array (Positive range <>) of Float; - procedure Show_Harmonics_Greater (Ns : Floats) is - Hs : Harmonic_State; - begin - for I of Ns loop - Iterate_Harmonics (Hs, Positive'Last, I); - Ada.Text_IO.Put_Line (">" & I'Image & ":" & Hs.N'Image & " => " & Hs.Hn'Image); - end loop; - end Show_Harmonics_Greater; - -begin - Show_First_Harmonics (20); - Show_Harmonics_Greater ((1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0)); -end Harmonic_Numbers; diff --git a/Task/Harmonic-series/BQN/harmonic-series.bqn b/Task/Harmonic-series/BQN/harmonic-series.bqn deleted file mode 100644 index 2d5eb490b2..0000000000 --- a/Task/Harmonic-series/BQN/harmonic-series.bqn +++ /dev/null @@ -1,6 +0,0 @@ -Harmonic ← +`1÷∘+↕ - -⟨ - > 8↑⟜•Fmt¨ 5e¯7+ Harmonic 20 - 1+⍉(⊣≍(⌈ Harmonic 12400)⊐2+⊢)↕10 -⟩ diff --git a/Task/Harmonic-series/Bruijn/harmonic-series.bruijn b/Task/Harmonic-series/Bruijn/harmonic-series.bruijn deleted file mode 100644 index 747d370e68..0000000000 --- a/Task/Harmonic-series/Bruijn/harmonic-series.bruijn +++ /dev/null @@ -1,16 +0,0 @@ -:import std/List . -:import std/Combinator . -:import std/Math/Rational Q -:import std/Number N - -# fun Church iteration hack -harmonic [0 &[[(Q.add 1 op) : N.++0]] start [[1]]] ⧗ Unary → Rational - op (+1) : N.--0 - start (+0.0f) : (+1) - -custom-gt? &[[[N.gt? 2 (N.mul 0 N.++1)]]] ⧗ Rational → Νumber → Boolean - -main [φ cons first-20 first-10-above (harmonic <$> (iterate [[[1 (2 1 0)]]] (+0u)))] - first-20 take (+20) - first-10-above [take (+10) first-above] - first-above [find-index [custom-gt? 0 1] 1] <$> (iterate N.inc (+0)) diff --git a/Task/Harmonic-series/C/harmonic-series.c b/Task/Harmonic-series/C/harmonic-series.c deleted file mode 100644 index db4f01b2d4..0000000000 --- a/Task/Harmonic-series/C/harmonic-series.c +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include - -/* return nth harmonic number */ -double harmonic(int n) { - double h, i; - h = 0; - for (i = 1; i <= (double) n; i += 1.0) - h += 1 / i; - return h; -} - -int main(void) { - int i, n; - printf("First 20 harmonic numbers:\n"); - for (i = 1; i <= 20; i++) - printf("%2d %8.6lf\n", i, harmonic(i)); - for (i = 1; i <= 5; i++) { - int n = 2; - while (harmonic(n) <= (double) i) n++; - printf("First term > %d is at position %d\n", i, n); - } - return EXIT_SUCCESS; -} diff --git a/Task/Harmonic-series/CBASIC/harmonic-series.basic b/Task/Harmonic-series/CBASIC/harmonic-series.basic deleted file mode 100644 index 35bb0c4f57..0000000000 --- a/Task/Harmonic-series/CBASIC/harmonic-series.basic +++ /dev/null @@ -1,19 +0,0 @@ -limit = 20 -h = 0 -print "First";limit;"numbers in the harmonic series" -for i = 1 to limit - h = h + 1 / i - print using "## #.#####"; i; h -next i - -for i = 1 to 5 - h = 1 - n = 2 - while h <= i - h = h + 1 / n - n = n + 1 - wend - print "Position of first harmonic number >"; i; "is at"; n-1 -next i - -end diff --git a/Task/Harmonic-series/COBOL/harmonic-series.cob b/Task/Harmonic-series/COBOL/harmonic-series.cobol similarity index 100% rename from Task/Harmonic-series/COBOL/harmonic-series.cob rename to Task/Harmonic-series/COBOL/harmonic-series.cobol diff --git a/Task/Harmonic-series/Delphi/harmonic-series.pas b/Task/Harmonic-series/Delphi/harmonic-series.delphi similarity index 100% rename from Task/Harmonic-series/Delphi/harmonic-series.pas rename to Task/Harmonic-series/Delphi/harmonic-series.delphi diff --git a/Task/Harmonic-series/DuckDB/harmonic-series.duckdb b/Task/Harmonic-series/DuckDB/harmonic-series.duckdb deleted file mode 100644 index c0297fcc3c..0000000000 --- a/Task/Harmonic-series/DuckDB/harmonic-series.duckdb +++ /dev/null @@ -1,21 +0,0 @@ -# If mx > 0, then return a table of the first mx harmonic numbers, -# otherwise return a table with h up to: floor(h) < - mx -create or replace function harmonic_table(mx) as table ( - with recursive cte(ix,h) as ( - select 1 as ix, 1::DOUBLE as h - union all - select ix+1, h + 1/(ix+1) - from cte - where if (mx>0, ix < mx, floor(h) < - mx) - ) - from cte -); - -# First 20: -from harmonic_table(20); - -# Milestones: -from ( - select ix, lag(h) over () as hlag, h - from harmonic_table(-10) ) -where ceil(hlag) = trunc(h); diff --git a/Task/Harmonic-series/EasyLang/harmonic-series.easy b/Task/Harmonic-series/EasyLang/harmonic-series.easy index fbf03db1cf..75a56234c7 100644 --- a/Task/Harmonic-series/EasyLang/harmonic-series.easy +++ b/Task/Harmonic-series/EasyLang/harmonic-series.easy @@ -1,4 +1,4 @@ -numfmt 2 5 +numfmt 5 2 print "The first twenty harmonic numbers are:" for n = 1 to 20 h += 1 / n diff --git a/Task/Harmonic-series/Fortran/harmonic-series.f b/Task/Harmonic-series/Fortran/harmonic-series.f deleted file mode 100644 index 2ab5783463..0000000000 --- a/Task/Harmonic-series/Fortran/harmonic-series.f +++ /dev/null @@ -1,83 +0,0 @@ -program harmonic_numbers - use :: iso_fortran_env, only: int64, output_unit - implicit none - integer, parameter :: real64 = selected_real_kind(15, 307) - - type :: fraction - integer(int64) :: numerator - integer(int64) :: denominator - end type fraction - - integer :: i, target_int - type(fraction) :: h_exact - real(real64) :: sum_h, h_decimal - character(len=200) :: fmt_str - - ! Print first 20 harmonic numbers as fractions - write(output_unit, '(a)') "## First 20 Harmonic Numbers" - write(output_unit, '(a)') "**Fractional Form**" - h_exact = fraction(0_int64, 1_int64) - do i = 1, 20 - h_exact = add_reciprocal(h_exact, i) - write(output_unit, '(i2, ": ", i0, "/", i0)') i, h_exact%numerator, h_exact%denominator - end do - - ! Print decimal approximations - write(output_unit, '(/, a)') "**Decimal Approximations**" - h_exact = fraction(0_int64, 1_int64) - do i = 1, 20 - h_exact = add_reciprocal(h_exact, i) - h_decimal = real(h_exact%numerator, real64) / real(h_exact%denominator, real64) - write(output_unit, '(i2, ": ", f0.12)') i, h_decimal - end do - - ! Find positions where harmonic numbers exceed integers 1-10 - write(output_unit, '(/, a)') "## Positions Where H? First Exceeds Integers" - write(output_unit, '(a)') "| Target | Position (n) | Decimal Approximation |" - write(output_unit, '(a)') "|--------|--------------|------------------------|" - write(fmt_str, '(a)') '(a, i2, a, T10, A, i0,T25, a, f0.6, T50,a)' - - do target_int = 1, 10 - sum_h = 0._real64 - i = 0 - do - i = i + 1 - sum_h = sum_h + 1.0_real64 / real(i, real64) - if (sum_h > real(target_int, real64)) then - if (target_int <= 5 .or. target_int >= 6) then - write(output_unit, FMT_STR) "| **", target_int, "**","| ", i, & - "| ", real(sum_h, real64), "|" - end if - exit - end if - end do - end do - -contains - - function add_reciprocal(h, n) result(new_h) - type(fraction), intent(in) :: h - integer, intent(in) :: n - type(fraction) :: new_h - integer(int64) :: common_denominator, new_numerator, divisor - - common_denominator = h%denominator * int(n, int64) - new_numerator = h%numerator * int(n, int64) + h%denominator - divisor = gcd(new_numerator, common_denominator) - - new_h%numerator = new_numerator / divisor - new_h%denominator = common_denominator / divisor - end function add_reciprocal - - recursive function gcd(a, b) result(greatest_common_divisor) - integer(int64), intent(in) :: a, b - integer(int64) :: greatest_common_divisor - - if (b == 0) then - greatest_common_divisor = a - else - greatest_common_divisor = gcd(b, mod(a, b)) - end if - end function gcd - -end program harmonic_numbers diff --git a/Task/Harmonic-series/Julia/harmonic-series-1.jl b/Task/Harmonic-series/Julia/harmonic-series-1.julia similarity index 100% rename from Task/Harmonic-series/Julia/harmonic-series-1.jl rename to Task/Harmonic-series/Julia/harmonic-series-1.julia diff --git a/Task/Harmonic-series/Julia/harmonic-series-2.jl b/Task/Harmonic-series/Julia/harmonic-series-2.julia similarity index 100% rename from Task/Harmonic-series/Julia/harmonic-series-2.jl rename to Task/Harmonic-series/Julia/harmonic-series-2.julia diff --git a/Task/Harmonic-series/OCaml/harmonic-series-1.ml b/Task/Harmonic-series/OCaml/harmonic-series-1.ml deleted file mode 100644 index 0ace1720f1..0000000000 --- a/Task/Harmonic-series/OCaml/harmonic-series-1.ml +++ /dev/null @@ -1,9 +0,0 @@ -let series = - Seq.scan (fun sum i -> Q.(sum + inv ~$i)) Q.one (Seq.ints 2) - -let positions = - Seq.unfold - (fun (n, s) -> - Seq.uncons (Seq.drop_while (fun iq -> Q.(n >= snd iq)) s) - |> Option.map (fun (iq, s) -> fst iq, Q.(n + one, s))) - (Q.one, Seq.zip (Seq.ints 1) series) diff --git a/Task/Harmonic-series/OCaml/harmonic-series-2.ml b/Task/Harmonic-series/OCaml/harmonic-series-2.ml deleted file mode 100644 index 8350a4ae7d..0000000000 --- a/Task/Harmonic-series/OCaml/harmonic-series-2.ml +++ /dev/null @@ -1,4 +0,0 @@ -let _ = - let print fmt = Format.printf (fmt ^^ "\n") in - Seq.iteri (fun i h -> print "H(%d) =\t%a" (i + 1) Q.pp_print h) (Seq.take 20 series); - Seq.iteri (fun i n -> print "nth harmonic > %d:\t%d" (i + 1) n) (Seq.take 10 positions) diff --git a/Task/Harmonic-series/OCaml/harmonic-series-3.ml b/Task/Harmonic-series/OCaml/harmonic-series-3.ml deleted file mode 100644 index 3e25736172..0000000000 --- a/Task/Harmonic-series/OCaml/harmonic-series-3.ml +++ /dev/null @@ -1,7 +0,0 @@ -module Q = struct - include Stdlib.Float - let (~$) = of_int - let (+) = add - let inv = div 1. - let pp_print = Stdlib.Format.pp_print_float -end diff --git a/Task/Harmonic-series/Oberon-07/harmonic-series.oberon b/Task/Harmonic-series/Oberon-07/harmonic-series.oberon deleted file mode 100644 index c0fb7af5d8..0000000000 --- a/Task/Harmonic-series/Oberon-07/harmonic-series.oberon +++ /dev/null @@ -1,37 +0,0 @@ -MODULE HarmonicSeries; (* find some harmonic numbers, Hn is the sum of the reciprocals of 1..n *) - IMPORT Out; - - VAR h : ARRAY 20001 OF REAL; - rqdInt, i : INTEGER; - rqdReal : REAL; - - PROCEDURE harmonic( VAR hs : ARRAY OF REAL ); (* sets hs to the first LEN(hs) - 1 Harmonic numbers *) - VAR i : INTEGER; (* hs[0] is unused *) - BEGIN - hs[ 1 ] := 1.0; - FOR i := 2 TO LEN( hs ) - 1 DO - hs[ i ] := hs[ i - 1 ] + ( 1.0 / FLT( i ) ) - END - END harmonic ; - -BEGIN - - harmonic( h ); (* find the first 20 000 harmonic numbers *) - - FOR i := 1 TO 20 DO (* show the first 20 harmonic numbers *) - Out.Int( i, 2 );Out.String( ":" );Out.Real( h[ i ], 14 );Out.Ln - END; - - (* find the positions of the first harmonic number > n where n in 1... *) - rqdInt := 1; - rqdReal := 1.0; - FOR i := 1 TO LEN( h ) - 1 DO - IF h[ i ] > rqdReal THEN - (* found the first harmonic number greater than rqdReal *) - Out.String( "Position of the first harmonic number > " );Out.Int( rqdInt, 2 ); - Out.String( ": " );Out.Int( i, 0 );Out.Ln; - INC( rqdInt ); - rqdReal := FLT( rqdInt ) - END - END -END HarmonicSeries. diff --git a/Task/Harmonic-series/PascalABC.NET/harmonic-series.pas b/Task/Harmonic-series/PascalABC.NET/harmonic-series.pas deleted file mode 100644 index e767fc50cc..0000000000 --- a/Task/Harmonic-series/PascalABC.NET/harmonic-series.pas +++ /dev/null @@ -1,17 +0,0 @@ -function H(n: integer): real := (1..n).Sum(i -> 1/i); - -begin - for var i:=1 to 20 do - Println($'{i,2}: {H(i),10:f8}'); - var i := 1; - var num := 1; - while num < 11 do - begin - if H(i) > num then - begin - Println('Position of the first harmonic number >',num,':',i); - num += 1; - end; - i += 1; - end; -end. diff --git a/Task/Harmonic-series/Phix/harmonic-series-1.phix b/Task/Harmonic-series/Phix/harmonic-series-1.phix index 458bbff449..757038f636 100644 --- a/Task/Harmonic-series/Phix/harmonic-series-1.phix +++ b/Task/Harmonic-series/Phix/harmonic-series-1.phix @@ -1,24 +1,26 @@ -with javascript_semantics -include mpfr.e -integer n = 1, gn = 1, lim = iff(platform()=JS?9:10) -mpq hn = mpq_init_set_si(1) -sequence gt = {} -puts(1,"First twenty harmonic numbers as rationals:\n") -while gn<=lim do - if n<=20 then - printf(1,"%18s%n",{mpq_get_str(hn),rmdr(n,5)=0}) - end if - if n=100 then - printf(1,"\nOne Hundredth:\n%s\n\n",{mpq_get_str(hn)}) - end if - if mpq_cmp_si(hn,gn)>0 then - gt &= n - gn += 1 - end if - n += 1 - mpq_add_si(hn,hn,1,n) -end while -printf(1,"(one based) Index of first value:\n") -for i,g in gt do - printf(1," greater than %2d: %,6d (%s term)\n",{i,g,ordinal(g)}) -end for +(phixonline)--> + requires("0.8.4") + include mpfr.e + integer n = 1, gn = 1, lim = iff(platform()=JS?8:10) + mpq hn = mpq_init_set_si(1) + sequence gt = {} + puts(1,"First twenty harmonic numbers as rationals:\n") + while gn<=lim do + if n<=20 then + printf(1,"%18s%s",{mpq_get_str(hn),iff(mod(n,5)?" ","\n")}) + end if + if n=100 then + printf(1,"\nOne Hundredth:\n%s\n\n",{mpq_get_str(hn)}) + end if + if mpq_cmp_si(hn,gn)>0 then + gt &= n + gn += 1 + end if + n += 1 + mpq_add_si(hn,hn,1,n) + end while + printf(1,"(one based) Index of first value:\n") + for i=1 to length(gt) do + printf(1," greater than %2d: %,6d (%s term)\n",{i,gt[i],ordinal(gt[i])}) + end for + + integer n = 1, gn = 1 + atom hn = 1 + sequence gt = {} + puts(1,"First twenty harmonic numbers as fractions:\n") + while gn<=10 do + if n<=20 then + printf(1,"%18.15f%s",{hn,iff(mod(n,5)?" ","\n")}) + end if + if n=100 then + printf(1,"\nOne Hundredth: %18.15f\n\n",{hn}) + end if + if hn>gn then + gt &= n + gn += 1 + end if + n += 1 + hn += 1/n + end while + printf(1,"(one based) Index of first value:\n") + for i=1 to length(gt) do + printf(1," greater than %2d: %,6d (%s term)\n",{i,gt[i],ordinal(gt[i])}) + end for + {} = wait_key() + + with javascript_semantics + constant A = {{27,"Jonah"}, + {18,"Alan"}, + {28,"Glory"}, + {18,"Popeye"}, + {28,"Alan"}}, + B = {{"Jonah","Whales"}, + {"Jonah","Spiders"}, + {"Alan", "Ghosts"}, + {"Alan", "Zombies"}, + {"Glory","Buffy"}}, + jA = 2, + jB = 1, + MB = new_dict() + sequence C = {} + for i=1 to length(B) do + object key = B[i][jB] + object data = getd(key,MB) + if data=0 then + data = {B[i]} + else + data = append(data,B[i]) + end if + putd(key,data,MB) + end for + for i=1 to length(A) do + object data = getd(A[i][jA],MB) + if sequence(data) then + for j=1 to length(data) do + C = append(C,{A[i],data[j]}) + end for + end if + end for + destroy_dict(MB) + pp(C,{pp_Nest,1}) +( (age,age...), (nemesis,...) ) if (r:=d.find(name)){ diff --git a/Task/Haversine-formula/ALGOL-W/haversine-formula.alg b/Task/Haversine-formula/ALGOL-W/haversine-formula.alg index 8e58f6c95f..9fc4fa5d35 100644 --- a/Task/Haversine-formula/ALGOL-W/haversine-formula.alg +++ b/Task/Haversine-formula/ALGOL-W/haversine-formula.alg @@ -16,8 +16,8 @@ begin % compute the distance between places using the Haversine formula % real d; integer mi, km; d := distance( 36.12, -86.67, 33.94, -118.4 ); - km := round( d ); - mi := round( d / 1.609344 ); - writeon( i_w := 4, s_w := 0, "distance: ", km, " km (", mi, " mi.)" ) + mi := round( d ); + km := round( d / 1.609344 ); + writeon( i_w := 4, s_w := 0, "distance: ", mi, " km (", km, " mi.)" ) end end. diff --git a/Task/Haversine-formula/Ada/haversine-formula.adb b/Task/Haversine-formula/Ada/haversine-formula.ada similarity index 100% rename from Task/Haversine-formula/Ada/haversine-formula.adb rename to Task/Haversine-formula/Ada/haversine-formula.ada diff --git a/Task/Haversine-formula/Agena/haversine-formula.agena b/Task/Haversine-formula/Agena/haversine-formula.agena deleted file mode 100644 index cb1dad8071..0000000000 --- a/Task/Haversine-formula/Agena/haversine-formula.agena +++ /dev/null @@ -1,18 +0,0 @@ -scope # compute the distance between places using the Haversine formula - - local proc distance( th1Deg :: number, ph1Deg :: number, th2Deg :: number, ph2Deg :: number ) :: number - local constant ph1 := ( ph1Deg - ph2Deg ) * radians; - local constant th1 := th1Deg * radians; - local constant th2 := th2Deg * radians; - local constant dz := sin( th1 ) - sin( th2 ); - local constant dx := cos( ph1 ) * cos( th1 ) - cos( th2 ); - local constant dy := sin( ph1 ) * cos( th1 ); - return arcsin( sqrt( dx * dx + dy * dy + dz * dz ) / 2 ) * 2 * 6371 - end; - - scope - local constant d := distance( 36.12, -86.67, 33.94, -118.4 ); - local constant km, constant mi := round( d ), round( d / 1.609344 ); - printf( "distance: %4d km (%4d mi.)", km, mi ) - epocs -epocs diff --git a/Task/Haversine-formula/Bc/haversine-formula.bc b/Task/Haversine-formula/Bc/haversine-formula.bc index eaeea4816d..3aad71d5b6 100644 --- a/Task/Haversine-formula/Bc/haversine-formula.bc +++ b/Task/Haversine-formula/Bc/haversine-formula.bc @@ -1,11 +1,8 @@ #!/bin/sh #- -# © 2021 mirabilos Ⓕ CC0 or MirBSD +# © 2021 mirabilos Ⓕ CC0; implementation of Haversine GCD from public sources # -# implementation of Haversine GCD from public sources -# output is in metres (rounded to millimetres), error < ¼% -# -# now developed online: (user/pass public) +# now developed online: # https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=useful-scripts/mirkarte.git;a=blob;f=geo.sh;hb=HEAD if test "$#" -ne 4; then @@ -26,8 +23,8 @@ export BC_ENV_ARGS # h: haversine intermediate # i,j: (lat,lon) point 1 # x,y: (lat,lon) point 2 -# k: delta lat/ΔΦ -# l: delta lon/Δλ +# k: delta lat +# l: delta lon # m: sin(k/2) (square root of hav(k)) # n: sin(l/2) ( partial haversine ) # n(x): arcsin(x) @@ -35,7 +32,7 @@ export BC_ENV_ARGS # v(x): sign (Vorzeichen) # w(x): min(1, sqrt(x)) (Wurzel) -exec bc -l <<-EOF +bc -l <<-EOF scale=64 define n(x) { if (x == -1) return (-2 * a(1)) @@ -62,8 +59,7 @@ define w(x) { return (sqrt(x)) } /* WGS84 reference ellipsoid: große Halbachse (metres), Abplattung */ -/* (6378137 in WGS84); this radius from Astronomical Almanac 2021 */ -i = 6378136.600 +i = 6378137.000 x = 1/298.257223563 /* other axis */ j = i * (1 - x) @@ -84,3 +80,5 @@ h = ((m * m) + (c(i) * c(x) * n * n)) d = 2 * r * n(w(h)) r(d, 3) EOF + +# output is in metres, rounded to millimetres, error < ¼% in WGS84 diff --git a/Task/Haversine-formula/Crystal/haversine-formula.cr b/Task/Haversine-formula/Crystal/haversine-formula.crystal similarity index 100% rename from Task/Haversine-formula/Crystal/haversine-formula.cr rename to Task/Haversine-formula/Crystal/haversine-formula.crystal diff --git a/Task/Haversine-formula/Delphi/haversine-formula.pas b/Task/Haversine-formula/Delphi/haversine-formula.delphi similarity index 100% rename from Task/Haversine-formula/Delphi/haversine-formula.pas rename to Task/Haversine-formula/Delphi/haversine-formula.delphi diff --git a/Task/Haversine-formula/DuckDB/haversine-formula.duckdb b/Task/Haversine-formula/DuckDB/haversine-formula.duckdb deleted file mode 100644 index f301d80fe5..0000000000 --- a/Task/Haversine-formula/DuckDB/haversine-formula.duckdb +++ /dev/null @@ -1,7 +0,0 @@ -# install spatial; -- if required -load spatial; - -select [lat1, lon1], [lat2, lon2], - ST_Distance_sphere( ST_Point(lat1, lon1), ST_Point(lat2,lon2)) as "Haversine (m)", - ST_Distance_spheroid(ST_Point(lat1, lon1), ST_Point(lat2,lon2)) as "ellipsoid (m)" -from (select 36.12 as lat1, -86.67 as lon1, 33.94 at lat2, -118.40 as lon2); diff --git a/Task/Haversine-formula/EDSAC-order-code/haversine-formula.edsac b/Task/Haversine-formula/EDSAC-order-code/haversine-formula.edsac deleted file mode 100644 index e6a18551aa..0000000000 --- a/Task/Haversine-formula/EDSAC-order-code/haversine-formula.edsac +++ /dev/null @@ -1,181 +0,0 @@ -[Haversine formula, for Rosetta Code.] -[EDSAC, initial orders 2.] - [Arrange the storage] - T49K P56F [L, 35 locations: library s/r R4 to read integer.] - [Can overwrite R9 once R9 is no longer needed.] - T46K P92F [N, 35 locations: library s/r P7 (print integer)] - T52K P128F [A, 33 locations: library subroutine T4 (arccos)] - T53K P162F [B, 44 locations: 1ibrary subroutine T1 (cos)] - T54K P206F [C, 10 locations: wrapper for library subroutine T1] - T51K P216F [G, 24 locations: inverse haversine function] - T45K P240F [H, 36 locations: haversine function] - T55K P276F [V, 11 locations: constants] - T47K P288F [M, 92 locations: main routine] -[----------------------------------------------------------------------------] -[Library subroutine R9 to read integers from tape at load time.] -[Must be placed at location 56; occupies 15 locations.] - T56K -GKT20FVDL8FA40DUDTFI40FA40FS39FG@S2FG23FA5@T5@E4@ -[----------------------------------------------------------------------------] -[Library subroutine M3. Prints header at load time and is then overwritten.] -[In this program, also sets teleprinter to figures.] -PFGKIFAFRDLFUFOFE@A6FG@E8FEZPF - *DISTANCES!IN!METRES@&WITH!RADIUS# - .. PK [after header, blank tape and PK (WWG, 1951, page 91)] -[----------------------------------------------------------------------------] -[Constants. Load at even address.] - E25K TV GK - E69K [at load time, call library s/r R9 to read 35-bit contants] - T#V [tell R9 where to store constants] - [0] 1800000000F [180 degrees, in units of 10^-7 degree] - [2] 900000000F [90 ditto] - [4] 16097821018F [for changing angle unit to radians] - [6] 13493037750F [pi/4 as EDSAC integer, i.e. times 2^34] - [8] 6371100# [Earth radius in metres, from MK-61/52 solution] - T10Z [resume normal loading] - [10] RF [17-bit 1/4] -[----------------------------------------------------------------------------] -[Main routine. Load at even address.] - E25K TM GK -[35-bit variables, general workspace] - [0] [2] [4] [6] [8] -[17-bit variables] - [10] [number of examples] - [11] [example number] - T12Z [variablss are not initialized; skip over them at load time] -[17-bit constants] - [12] PD [1] - [13] CF [ teleprinter colon (in figures mode)] - [14] @F [15] &F [16] K4096F [CR, LF, null] - [Enter with acc = 0] - [17] A8#V TD [pass Earth's radius to printer routine] - A19@ GN [finish header: print radius followed by CR, LF] - O14@ O15@ - A23@ GL [call library s/r R4, 0D := number of examples] - AF T10@ [store (assume < 2^16)] - [Here acc = example number just done (0 first time)] - [27] S10@ E98@ [if all done, jump to exit] - A10@ A12@ T11@ [inc and store example number] - TD A11@ TF [0D := example number, extended to 35 bits] - A35@ GN O13@ [print example number followed by colon] - [Use library subroutine R4 to read data from tape to 0D.] - [Coordinates are lat1, lon1, lat2, lon2.] - A38@ GL AD U#@ T4D [lat1 to work{0} and 4D] - A43@ GC A4D T2#@ [0.5*cos(lat1) to work{1}] - A47@ GL AD T8#@ [lon1 to work{4}] - A51@ GL AD U4#@ T4D [lat2 to work{2} and 4D] - A56@ GC A4D T6#@ [0.5*cos(lat2) to work{3}] - A60@ GL AD S8#@ T4D [lon2 - lon1 to 4D] - A65@ GH [0.5*hav(lon2 - lon1) to 4D] - H2#@ V4D LD YF T4D [times cos(lat1) to 4D] - H6#@ V4D LD YF T8#@ [times cos(lat2) to work{4}] - A#@ S4#@ T4D [lat1 - lat2 to 4D] - A80@ GH A4D [0.5*hav(lat1 - lat2) to acc] - A8#@ T4D [add product from above, sum to 4D] - A85@ GG H4D [mult reg := angle/4 in radians] - V8#V L1F YF TD [times radius*4, to 0D for printing] - A92@ GN O14@ O15@ [print distance followed by CR, LF] - A11@ E27@ [acc := example numbr; loop back] - [Exit] - [98] O16@ [print null to flush teleprinter buffer] - ZF [stop] -[----------------------------------------------------------------------------] -[Haversine function, for Rosetta Code.] -[Input: 4D = angle x in range -360..360 deg,] - [expressed as integer multiple of 10^-7 deg.] -[Output: 4D = hav(x)/2 = (1 - cos(x))/4] -[Load at even address. Requires library subroutines R9 and T1.] - E25K TH GK - A3F T35@ [plant return link as usual] - [2] A4D E6@ [acc := x; jump if x >= 0] - T4D - [5] S4D [else x := -x] - [Here with acc = abs(x). Use symmetry about 180 deg.] - [6] S#V G10@ [jump if x < 180] - TD SD [else acc := 180 - x] - [10] A2#V [combine next 2 orders, which are shown as comments] - [A #V] [add 180: either restore x, or set x := 360 - x] - [Here 0 <= x <= 180. Use antisymmetry about 90 deg.] - [S 2 #V] [subtract 90] - E17@ [jump if x >= 90 degrees] - TD A5@ T30@ [save acc, plant S4D below] - AD G21@ [acc := x - 90, join common code] - [17] TD A2@ T30@ [save acc, plant A4D below] - SD [acc := 90 - x] - [21] A2#V [either restore x, or set x := 180 - x] - TD H4#V VD L4F YF [apply angle conversion factor] - [Here acc = x/2, now in radians. Pass it to cosine function] - T4D - A28@ GB [call cosine function; returns 4D := cos(x)/2] - [30] XF [(planted) either A4D or S4D] - RD YF A10V [divide by 2, round, add 1/4] - T4D [return haversine/2 in 4D] - [35] ZF [(planted) jump back to caller] -[----------------------------------------------------------------------------] -[Inverse haversine function.] -[Input: 4D = hav(x)/2] -[Output: 4D = x/4 in radians, where 0 <= x <= pi] - E25K TG GK - A3F T23@ [plant return link as usual] - A10V S4D LD YF [acc := 1/2 - hav(x) = cos(x)/2] - G13@ [jumo if cos(x) < 0] - T4D [pass cos(x)/2 to library subroutine T4 (arccis)] - A8@ GA AD RD [call T4, 0D ;= x/2; then acc := x/4] - E21@ [join common code] - [13] TD SD T4D [here if cos(x) < 0; set 4D := -cos(x)/2] - A16@ GA [call T4 (arccos); 0D := (pi - x)/2] - SD RD A6#V [acc := -(pi - x)/4 + pi/4 = x/4] - [21] YF T4D [round redult and return it in 4D] - [23] ZF [(planted) jump back to caller] -[----------------------------------------------------------------------------] -[Wrapper for library subroutine T1 (cosine).] -[Input: 4D = angle x as integer multiple of 10^-7 degree.] -[Output: 4D = cos(x)/2] - E25K TC GK - A3F T9@ [plant return link as usual] - H4#V V4D L4F YF T4D [4D := x/2 in radians] - A7@ GB [call T1, puts cos(x)/2 into 4D] - [9] ZF [jump back to caller] -[----------------------------------------------------------------------------] -[Library subroutine T1: calculates cos(x), where abs(x) <= pi/2] -[Input: 4D = x/2] -[Output: 4D = cos(x)/2] -[Requires library subroutine R9.] - E25K TB -GKT20FVDL8FA40DUDTFI40FA40FS39FG@S2FG23FA5@T5@E4@E13ZT32#@ -1614F73454F243967F54539267F763549741F5726623061# -TZA3FT30@H4DV4DYFT4DH4DN32#@A34#@TDNDA36#@TDNDA38#@ -TDNDA40#@TDNDA42#@TDNDYFTDNDS4DA31@YFT4DEFIFT44Z -[----------------------------------------------------------------------------] -[Library subroutine T4: calculates arccos] -[Input: 4D = cos(x)/2, assumed >= 0] -[Output: 0D = x/2 where 0 <= x <= pi/2] - E25K TA -GKA3FT28@TDA32@T6DH4DV4DL1FS29@YFE16@T4DSDA6DTDS4DT4DA6DRD -YFG4@HDN30#@YFE27@T4DS4DTDEFIFT30#ZD888FT30ZO699DT32ZK4096F -[----------------------------------------------------------------------------] -[Library subroutine P7. Prints 35-bit positive integer in 0D.] -[Up to 10 digits, right-justified, padded on left with spaces.] - E25K TN -GKA3FT26@H28#@NDYFLDT4DS27@TFH8@S8@T1FV4DAFG31@SFLDUFOFFFSF -L4FT4DA1FA27@G11@T28#ZPFT27ZP1024FP610D@524D!FO30@SFL8FE22@ -[----------------------------------------------------------------------------] -[Library subroutine R4. Reads signed integer from tape at run time.] -[Input : None] -[Output : 0D = 35-bit signed integer.] - E25K TL -GKA3FT21@T4DH6@E11@P5DJFT6FVDL4FA4DTDI4FA4FS5@G7@S5@G20@SDTDT6FEF -[----------------------------------------------------------------------------] - E25K TM GK [M parameter again] - E17Z [define entry point] - PF [acc = 0 on entry] -[----------------------------------------------------------------------------] -[Latitude and longitude of each airport, in units of 10^-7 degree.] -[Read from tape by library subroutine R4. Note that sign comes after value.] -3+ [number of examples] -361200000+866700000- [Nashville] -339400000+1184000000- [Los Angeles] -547166667+205000000+ [Kaliningrad] -431166667+1319000000+ [Vladivostok] -499133333+62916667- [St Mary's, Scilly Isles] -601919444+12436111- [Tingwall, Shetland Isles] diff --git a/Task/Haversine-formula/Elena/haversine-formula.elena b/Task/Haversine-formula/Elena/haversine-formula.elena index 49527462a5..a88153e368 100644 --- a/Task/Haversine-formula/Elena/haversine-formula.elena +++ b/Task/Haversine-formula/Elena/haversine-formula.elena @@ -15,7 +15,7 @@ Haversine(lat1,lon1,lat2,lon2) ^ R * 2 * a.sqrt().arcsin() } -public Program() +public program() { console.printLineFormatted("The distance between coordinates {0},{1} and {2},{3} is: {4}", 36.12r, -86.67r, 33.94r, -118.40r, Haversine(36.12r, -86.67r, 33.94r, -118.40r)) diff --git a/Task/Haversine-formula/Elixir/haversine-formula.ex b/Task/Haversine-formula/Elixir/haversine-formula.elixir similarity index 100% rename from Task/Haversine-formula/Elixir/haversine-formula.ex rename to Task/Haversine-formula/Elixir/haversine-formula.elixir diff --git a/Task/Haversine-formula/Fennel/haversine-formula.fennel b/Task/Haversine-formula/Fennel/haversine-formula.fennel deleted file mode 100644 index d4b0b8029b..0000000000 --- a/Task/Haversine-formula/Fennel/haversine-formula.fennel +++ /dev/null @@ -1,18 +0,0 @@ -(do ;;; compute the distance between places using the Haversine formula - (fn distance [th1Deg ph1Deg th2Deg ph2Deg] - (local ph1 (math.rad (- ph1Deg ph2Deg))) - (local th1 (math.rad th1Deg)) - (local th2 (math.rad th2Deg)) - (local dz (- (math.sin th1) (math.sin th2))) - (local dx (- (* (math.cos ph1) (math.cos th1)) (math.cos th2))) - (local dy (* (math.sin ph1) (math.cos th1))) - (* (math.asin (/ (math.sqrt (+ (* dx dx) (* dy dy) (* dz dz))) 2)) 2 6371) - ) - (do - (fn round [n] (math.floor (+ n 0.49999999999))) - - (local d (distance 36.12 -86.67 33.94 -118.4)) - (local (km mi) (values (round d) (round (/ d 1.609344)))) - (print (.. "distance: " km " km (" mi " mi.)")) - ) -) diff --git a/Task/Haversine-formula/Julia/haversine-formula.jl b/Task/Haversine-formula/Julia/haversine-formula.julia similarity index 100% rename from Task/Haversine-formula/Julia/haversine-formula.jl rename to Task/Haversine-formula/Julia/haversine-formula.julia diff --git a/Task/Haversine-formula/Kotlin/haversine-formula.kts b/Task/Haversine-formula/Kotlin/haversine-formula.kotlin similarity index 100% rename from Task/Haversine-formula/Kotlin/haversine-formula.kts rename to Task/Haversine-formula/Kotlin/haversine-formula.kotlin diff --git a/Task/Haversine-formula/MiniScript/haversine-formula.mini b/Task/Haversine-formula/MiniScript/haversine-formula.mini deleted file mode 100644 index 6e4952c0d7..0000000000 --- a/Task/Haversine-formula/MiniScript/haversine-formula.mini +++ /dev/null @@ -1,17 +0,0 @@ -// compute the distance between places using the Haversine formula - -distance = function( th1Deg, ph1Deg, th2Deg, ph2Deg ) - toRadians = pi / 180 - ph1 = toRadians * ( ph1Deg - ph2Deg ) - th1 = toRadians * th1Deg - th2 = toRadians * th2Deg - dz = sin( th1 ) - sin( th2 ) - dx = cos( ph1 ) * cos( th1 ) - cos( th2 ) - dy = sin( ph1 ) * cos( th1 ) - return asin( sqrt( dx * dx + dy * dy + dz * dz ) / 2 ) * 2 * 6371 -end function - -d = distance( 36.12, -86.67, 33.94, -118.4 ) -km = round( d ) -mi = round( d / 1.609344 ) -print( "distance: " + km + " km (" + mi + " mi.)" ) diff --git a/Task/Haversine-formula/NetRexx/haversine-formula.netrexx b/Task/Haversine-formula/NetRexx/haversine-formula.netrexx deleted file mode 100644 index ded11a6a34..0000000000 --- a/Task/Haversine-formula/NetRexx/haversine-formula.netrexx +++ /dev/null @@ -1,40 +0,0 @@ -/*REXX pgm calculates distance between Nashville & Los Angles airports. */ -say " Nashville: north 36° 7.2', west 86° 40.2' = 36.12°, -86.67°" -say "Los Angles: north 33° 56.4', west 118° 24.0' = 33.94°, -118.40°" -say -dist=surfaceDistance(36.12, -86.67, 33.94, -118.4) -say dist - -bef = Length(dist/1) -kdist=format(dist/1,bef,2) -mdist=format(dist/1.609344,bef,2) -ndist=format(mdist*5280/6076.1,bef,2) -say ' distance between= ' kdist " kilometers," -say ' or ' mdist " statute miles," -say ' or ' ndist " nautical or air miles." -exit /*stick a fork in it, we're done.*/ -/*----------------------------------SURFACEDISTANCE subroutine----------*/ - -method radians(x) static - return x * Math.PI / 180 - -method surfaceDistance(lat1,lon1,lat2,lon2) public static /*use haversine formula for dist.*/ - radius = 6372.8 /*earth's mean radius in km */ - dLat = radians(lat2 - lat1) - dLon = radians(lon2 - lon1) - lat1 = radians(lat1) - lat2 = radians(lat2) - - a = sin(dLat / 2)**2 + cos(lat1) * cos(lat2) * sin(dLon / 2) ** 2 - c = 2 * asin(sqrt(a)) - - return radius * c - -method cos(x) static - return Rexx Math.cos(x) -method sin(x) static - return Rexx Math.sin(x) -method asin(x) static - return Rexx Math.asin(x) -method sqrt(x) static - return Rexx Math.sqrt(x) diff --git a/Task/Haversine-formula/OCaml/haversine-formula.ml b/Task/Haversine-formula/OCaml/haversine-formula.ocaml similarity index 100% rename from Task/Haversine-formula/OCaml/haversine-formula.ml rename to Task/Haversine-formula/OCaml/haversine-formula.ocaml diff --git a/Task/Haversine-formula/PascalABC.NET/haversine-formula.pas b/Task/Haversine-formula/PascalABC.NET/haversine-formula.pas deleted file mode 100644 index 8eafc78a1a..0000000000 --- a/Task/Haversine-formula/PascalABC.NET/haversine-formula.pas +++ /dev/null @@ -1,19 +0,0 @@ -const - r = 6372.8; - -function haversine(lat1, lon1, lat2, lon2: real): real; -begin - var dLat := degToRad(lat2 - lat1); - var dLon := degToRad(lon2 - lon1); - lat1 := degToRad(lat1); - lat2 := degToRad(lat2); - - var a := sin(dLat / 2) * sin(dLat / 2) + cos(lat1) * cos(lat2) * sin(dLon / 2) * sin(dLon / 2); - var c := 2 * arcsin(sqrt(a)); - - result := r * c; -end; - -begin - haversine(36.12, -86.67, 33.94, -118.40).Println; -end. diff --git a/Task/Haversine-formula/Phix/haversine-formula.phix b/Task/Haversine-formula/Phix/haversine-formula.phix index 921a3dcd5e..a5c8ad31c1 100644 --- a/Task/Haversine-formula/Phix/haversine-formula.phix +++ b/Task/Haversine-formula/Phix/haversine-formula.phix @@ -1,15 +1,14 @@ -with javascript_semantics -constant MER = 6371, -- mean earth radius, authalic(km) ---constant MER = 6372.8, -- mean earth radius, average(km) - DEG_TO_RAD = PI/180 +(phixonline)--> + function haversine(atom lat1, long1, lat2, long2) + constant MER = 6371, -- mean earth radius(km) + DEG_TO_RAD = PI/180 + lat1 *= DEG_TO_RAD + lat2 *= DEG_TO_RAD + long1 *= DEG_TO_RAD + long2 *= DEG_TO_RAD + return MER*arccos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(long2-long1)) + end function -function haversine(atom lat1, long1, lat2, long2) - lat1 *= DEG_TO_RAD - lat2 *= DEG_TO_RAD - long1 *= DEG_TO_RAD - long2 *= DEG_TO_RAD - return MER*arccos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(long2-long1)) -end function - -atom d = haversine(36.12,-86.67,33.94,-118.4) -printf(1,"Distance is %.10f km (%.10f miles)\n",{d,d/1.609344}) + atom d = haversine(36.12,-86.67,33.94,-118.4) + printf(1,"Distance is %f km (%f miles)\n",{d,d/1.609344}) + + puts(1,"Hello world!") + + puts(1,"Hello world!") + + puts(1,"Hello world!") + + -- + -- pwa\phix\hello_world.exw + -- ======================== + -- + with javascript_semantics + include pGUI.e + + IupOpen() + Ihandle lbl = IupFlatLabel("World!","EXPAND=YES, ALIGNMENT=ACENTER") + Ihandln dlg = IupDialog(lbl,"TITLE=Hello, RASTERSIZE=215x85") + IupShow(dlg) + if platform()!=JS then + IupMainLoop() + dlg = IupDestroy(dlg) + IupClose() + end if + + with javascript_semantics + function af(string s) return max(s)<='f' and min(s)>='a' end function + function digital_root(integer n) + assert(n>=0) + while n>9 do + integer tot = 0 + while n>0 do + tot += remainder(n,10) + n = floor(n/10) + end while + n = tot + end while + return n + end function + sequence words = filter(unix_dict(4),af), + decml = apply(true,to_integer,{words,0,16}), + roots = apply(decml,digital_root), + tags = custom_sort(roots,tagset(length(roots))) -function caejasp() -- columnize/apply/extract/join/apply/sprint(...) - sequence s = columnize(apply(true,extract,{{words,decml,roots},{tags}})) - return join(apply(true,sprintf,{{"%6s -> %8d -> %d\n"},s})) -end function -printf(1," %s\n %d hex words with 4 or more letters found,\n",{caejasp(),length(tags)}) -function ge4(integer t) return length(unique(words[t]))>=4 end function -tags = filter(tags,ge4) -tags = extract(tags,reverse(custom_sort(extract(decml,tags),tagset(length(tags))))) -printf(1," %d with 4 or more distinct characters:\n\n %s\n",{length(tags),caejasp()}) + function caejasp() -- columnize/apply/extract/join/apply/sprint(...) + sequence s = columnize(apply(true,extract,{{words,decml,roots},{tags}})) + return join(apply(true,sprintf,{{"%6s -> %8d -> %d\n"},s})) + end function + printf(1," %s\n %d hex words with 4 or more letters found,\n",{caejasp(),length(tags)}) + function ge4(integer t) return length(unique(words[t]))>=4 end function + tags = filter(tags,ge4) + tags = extract(tags,reverse(custom_sort(extract(decml,tags),tagset(length(tags))))) + printf(1," %d with 4 or more distinct characters:\n\n %s\n",{length(tags),caejasp()}) + + without javascript_semantics -- (no mpfr_log() for pwa/p2js) + requires("1.0.0") -- (mpfr_set_default_prec[ision] renamed) + include mpfr.e + mpfr_set_default_precision(-23) -- (found by trial/error) + mpfr ln2 = mpfr_init(2), + hn = mpfr_init(0.5) + mpfr_log(ln2,ln2) + mpfr_div(hn,hn,ln2) + for n=1 to 17 do + mpfr_mul_si(hn,hn,n) + mpfr_div(hn,hn,ln2) + string n10 = mpfr_sprintf("%24.4Rf ",hn) + n10 &= iff(find(n10[21],"09")?"Y":"N") + printf(1,"%2d:%s\n",{n,n10}) + end for +} 'assign + +records: function [historyVar][ + historyVar\record +] + +retrieve: function [historyVar][ + result: last historyVar\record + historyVar\record: chop historyVar\record + return result +] + +current: function [historyVar][ + return last historyVar\record +] + +do [ + h: to :history [] -do :: print "Assigning three values: 1, 2, 3..." - h\assign 1 - h\assign 2 - h\assign 3 + h --> 1 + h --> 2 + h --> 3 print "\nHistory (oldest values first):" - print [">" h\records] + print [">" records h] - print ["\nCurrent value is:" h\current] + print ["\nCurrent value is:" current h] print "\nRecalling the three values..." loop 1..3 'x -> - print ["- Recalled:" h\retrieve] + print ["- Recalled:" retrieve h] print "\nHistory:" - print [">" h\records] + print [">" records h] +] diff --git a/Task/History-variables/C/history-variables.c b/Task/History-variables/C/history-variables.c deleted file mode 100644 index 8b26474871..0000000000 --- a/Task/History-variables/C/history-variables.c +++ /dev/null @@ -1,126 +0,0 @@ -#include -#include -#include - -// -// high address________ -// |________| length -// T *p ---> |___ ____| most recent value -// |____ ___| -// | -// |___ ____ -// |_____ __| -// |________| oldest value -// low address -// - -static size_t hv__align(void const *p, size_t z) { - return z + ((sizeof(z) - (((size_t)p + z) % sizeof(z))) % sizeof(z)); -} - -static size_t hvlen(void const *p, size_t z) { - return *(size_t *)((char *)p + hv__align(p, z)); -} - -static void *hv__malloc(size_t z) { - size_t const m = z + (2 * sizeof(z)); - void *const p = malloc(m); - if(p) { - *(size_t *)((char *)p + hv__align(p, z)) = 1; - return p; - } - perror(""); - abort(); -} - -static void *hv__realloc(void *p, size_t z, size_t n) { - size_t const u = hvlen(p, z); - size_t const o = (n > 1) ? n * z : z; - size_t const g = (u > 1) ? u * z : z; - size_t const m = o + (2 * sizeof(z)); - void *const b = (char *)p - (g - z); - p = realloc(b, m); - if(p) { - p = (char *)p + (o - z); - *(size_t *)((char *)p + hv__align(p, z)) = n; - return p; - } - perror(""); - abort(); -} - -static void *hvfree(void const *p, size_t z) { - if(p) { - size_t u = hvlen(p, z); - size_t const o = (u > 1) ? u * z : z; - free((char *)p - (o - z)); - } - return NULL; -} - -static void *hv(void const *p, size_t z) { - return p ? hv__realloc((void *)p, z, hvlen(p, z) + 1) : hv__malloc(z); -} -#define HV__TYPE(T,V) \ - T: *(T *)(V = (hv)((V), sizeof(*(V)))) -#define hv(V) _Generic(*(V), \ - HV__TYPE( char , (V)), \ - HV__TYPE( short , (V)), \ - HV__TYPE( int , (V)), \ - HV__TYPE( long , (V)), \ - HV__TYPE( long long, (V)), \ - HV__TYPE(unsigned char , (V)), \ - HV__TYPE(unsigned short , (V)), \ - HV__TYPE(unsigned int , (V)), \ - HV__TYPE(unsigned long , (V)), \ - HV__TYPE(unsigned long long, (V)), \ - HV__TYPE(float , (V)), \ - HV__TYPE(double , (V)), \ - HV__TYPE(long double , (V)) \ -) - -static void const *hvundo(void const *p, size_t z) { - return p ? hv__realloc((void *)p, z, hvlen(p, z) - 1) : p; -} -#define hvundo(V) (V = (hvundo)((V), sizeof(*(V)))) - -#define hvfree(V) (hvfree)((V), sizeof(*(V))) -#define hvlen(V) (hvlen)((V), sizeof(*(V))) - -int main(int argc, char **argv) { - char const *c = NULL; - unsigned const *u = NULL; - double const *d = NULL; - hv(c) = '1'; - hv(c) = '2'; - hv(c) = '3'; - hv(u) = 1; - hv(u) = 21; - hvundo(u); - hv(u) = 12; - hv(u) = 123; - hv(d) = 1.23; - hv(d) = 2.31; - hv(d) = 3.12; - printf("current values : '%c', %u, %g", *c, *u, *d); - putchar('\n'); - printf("char value history :"); - for(size_t n = hvlen(c), i = 0; i < n; i++) { - printf(" [%zu] '%c',", i, c[-i]); - } - putchar('\n'); - printf("unsigned value history:"); - for(size_t n = hvlen(u), i = 0; i < n; i++) { - printf(" [%zu] %4u,", i, u[-i]); - } - putchar('\n'); - printf("double value history :"); - for(size_t n = hvlen(d), i = 0; i < n; i++) { - printf(" [%zu] %4g,", i, d[-i]); - } - putchar('\n'); - hvfree(c); - hvfree(u); - hvfree(d); - return 0; -} diff --git a/Task/History-variables/Delphi/history-variables.pas b/Task/History-variables/Delphi/history-variables.delphi similarity index 100% rename from Task/History-variables/Delphi/history-variables.pas rename to Task/History-variables/Delphi/history-variables.delphi diff --git a/Task/History-variables/Elena/history-variables.elena b/Task/History-variables/Elena/history-variables.elena index f726d15563..437f6ba705 100644 --- a/Task/History-variables/Elena/history-variables.elena +++ b/Task/History-variables/Elena/history-variables.elena @@ -25,7 +25,7 @@ class HistoryVariable undo() { - if:not (previous.isEmpty()) + ifnot (previous.isEmpty()) { value := previous.pop() } @@ -40,7 +40,7 @@ class HistoryVariable string toPrintable() => this value; } -public Program() +public program() { var o := new HistoryVariable(); o.Value := 5; diff --git a/Task/History-variables/FreeBASIC/history-variables.basic b/Task/History-variables/FreeBASIC/history-variables.basic deleted file mode 100644 index 2c61e3f4d2..0000000000 --- a/Task/History-variables/FreeBASIC/history-variables.basic +++ /dev/null @@ -1,60 +0,0 @@ -REM integer history variable - -Type HistoryInt - As Integer Ptr values - As Integer cnt - As Integer capacity -End Type - -Function InitHistory() As HistoryInt Ptr - Dim As HistoryInt Ptr hist = Allocate(Sizeof(HistoryInt)) - hist->capacity = 10 - hist->values = Allocate(hist->capacity * Sizeof(Integer)) - hist->cnt = 0 - Return hist -End Function - -Sub SetInt(hist As HistoryInt Ptr, value As Integer) - If hist->cnt >= hist->capacity Then - hist->capacity *= 2 - hist->values = Reallocate(hist->values, hist->capacity * Sizeof(Integer)) - End If - - If hist->cnt = 0 Then - hist->values[hist->cnt] = 0 - hist->cnt += 1 - End If - - hist->values[hist->cnt] = value - hist->cnt += 1 -End Sub - -Sub ShowHistory(hist As HistoryInt Ptr) - For i As Integer = 0 To hist->cnt - 1 - Print hist->values[i] - Next -End Sub - -Function UndoInt(hist As HistoryInt Ptr) As Integer - If hist->cnt <= 1 Then Return hist->values[0] - hist->cnt -= 1 - Return hist->values[hist->cnt - 1] -End Function - -' Main program -Randomize Timer -Dim As HistoryInt Ptr x = InitHistory() - -For i As Integer = 0 To 3 - SetInt(x, Int(Rnd * 50) + 100) -Next - -Print "x history:" -ShowHistory(x) -Print - -For i As Integer = 0 To 3 - Print "undo, x ="; UndoInt(x) -Next - -Sleep diff --git a/Task/History-variables/Icon/history-variables.icon b/Task/History-variables/Icon/history-variables.icon deleted file mode 100644 index d19277f3a6..0000000000 --- a/Task/History-variables/Icon/history-variables.icon +++ /dev/null @@ -1,22 +0,0 @@ -procedure main(A) - \A := ["cat","hat",7] - x := history() - every x.set(!A) - write("x current value is: ",x.val()) - write("Number of saved values is: ",x.size()) - writes("3 most recent x values from newest to oldest: ") - every writes(" ",x.gen()\3) - write() - while write("x value was: ",\x.get()) - write("Number of saved values is now: ",x.size()) -end - -class history(x) - method size(); return *x; end - method val(); return x[-1]; end - method set(v); put(x,v); end - method get(); return pull(x); end - method gen(); suspend x[*x to 1 by -1]; end -initially - x := [] -end diff --git a/Task/History-variables/Julia/history-variables.jl b/Task/History-variables/Julia/history-variables.julia similarity index 100% rename from Task/History-variables/Julia/history-variables.jl rename to Task/History-variables/Julia/history-variables.julia diff --git a/Task/History-variables/Kotlin/history-variables.kts b/Task/History-variables/Kotlin/history-variables.kotlin similarity index 100% rename from Task/History-variables/Kotlin/history-variables.kts rename to Task/History-variables/Kotlin/history-variables.kotlin diff --git a/Task/History-variables/OCaml/history-variables.ml b/Task/History-variables/OCaml/history-variables.ocaml similarity index 100% rename from Task/History-variables/OCaml/history-variables.ml rename to Task/History-variables/OCaml/history-variables.ocaml diff --git a/Task/History-variables/Phix/history-variables-1.phix b/Task/History-variables/Phix/history-variables-1.phix index 8270fe1bbe..0d84745f09 100644 --- a/Task/History-variables/Phix/history-variables-1.phix +++ b/Task/History-variables/Phix/history-variables-1.phix @@ -1,13 +1,15 @@ -without js -- (desktop/Phix only) -sequence history = {} +--> + without js -- (desktop/Phix only) + sequence history = {} -type hv(object o) - history = append(history,o) - return true -end type + type hvt(object o) + history = append(history,o) + return true + end type -hv test = 1 -test = 2 -test = 3 -?{"current",test} -?{"history",history} + hvt test = 1 + test = 2 + test = 3 + ?{"current",test} + ?{"history",history} + + -- history.e + sequence histories = {} -global function new_history_id(object v) - histories = append(histories,{v}) - return length(histories) -end function + global function new_history_id(object v) + histories = append(histories,{v}) + return length(histories) + end function -global procedure set_hv(integer hv, object v) - histories[hv] = append(histories[hv],v) -end procedure + global procedure set_hv(integer hv, object v) + histories[hv] = append(histories[hv],v) + end procedure -global function get_hv(integer hv) - return histories[hv][$] -end function + global function get_hv(integer hv) + return histories[hv][$] + end function -global function get_hv_full_history(integer hv) - return histories[hv] -end function + global function get_hv_full_history(integer hv) + return histories[hv] + end function + + include history.e -constant test2 = new_history_id(1) -set_hv(test2, 2) -set_hv(test2, 3) -?{"current",get_hv(test2)} -?{"history",get_hv_full_history(test2)} + constant test2 = new_history_id(1) + set_hv(test2, 2) + set_hv(test2, 3) + ?{"current",get_hv(test2)} + ?{"history",get_hv_full_history(test2)} + + with javascript_semantics + requires("1.0.0") + include mpfr.e -procedure test(integer n) - string s = sprintf("%d",n), lastp = "" - sequence res = {s} - atom t0 = time() - while true do - s = substitute(s,"_","") - sequence rr = mpz_pollard_rho(s,true) - if length(rr)=1 then exit end if - s = join(rr,"_") - res = append(res,s) - end while - atom t = time()-t0 - integer niter = length(res)-1 - string iter = iff(niter>1?sprintf("(%d)",niter):""), - e = iff(t>0.1?" ["&elapsed(t)&"]":"") - s = sprintf("HP%d%s = ",{n,iter}) - if niter=0 then - printf(1,"%s%d %s\n",{s,n,e}) - else - for i=2 to niter do - niter -= 1 - printf(1,"%sHP%s(%d)\n",{s,res[i],niter}) - if i=2 then - s = repeat(' ',length(s)) - s[-2] = '=' - end if - end for - printf(1,"%s%s %s\n",{s,res[$],e}) - end if -end procedure -papply(tagset(20,2)&65,test) + procedure test(integer n) + string s = sprintf("%d",n), lastp = "" + sequence res = {s} + atom t0 = time() + while true do + s = substitute(s,"_","") + sequence rr = mpz_pollard_rho(s,true) + if length(rr)=1 then exit end if + s = join(rr,"_") + res = append(res,s) + end while + atom t = time()-t0 + integer niter = length(res)-1 + string iter = iff(niter>1?sprintf("(%d)",niter):""), + e = iff(t>0.1?" ["&elapsed(t)&"]":"") + s = sprintf("HP%d%s = ",{n,iter}) + if niter=0 then + printf(1,"%s%d %s\n",{s,n,e}) + else + for i=2 to niter do + niter -= 1 + printf(1,"%sHP%s(%d)\n",{s,res[i],niter}) + if i=2 then + s = repeat(' ',length(s)) + s[-2] = '=' + end if + end for + printf(1,"%s%s %s\n",{s,res[$],e}) + end if + end procedure + papply(tagset(20,2)&65,test) + + without js -- (system_exec, file i/o) + constant tmp = "hostname.txt", + cmd = iff(platform()=WINDOWS?"hostname":"uname -n") + {} = system_exec(sprintf("%s > %s",{cmd,tmp}),4) + string host = trim(get_text(tmp)) + {} = delete_file("hostname.txt") + ?host +(encode dictionary, decode dictionary) // build the tree, which is a list of lists of ... tree:=ft.pump(List,fcn([(c,cnt)]){ //-->L( (cnt, ((sym,code))), ...) L(cnt, L(L(c,""))) - }).copy(); // make it writable + }).copy(); // make it writable while(tree.len()>1){ // fake up a [lame] priorty queue tree=tree.sort(fcn(a,b){ a[0]>b[0] }); //prioritize high to low - a,b:=tree.pop(-2,2); //remove 2 least frequent symbols - mc:=fcn(n,c){ n[1] = c + n[1]; }; //(sym,code),"0"|"1" + a,b:=tree.pop(-2,2); //remove 2 least frequent symbols + mc:=fcn(n,c){ n[1] = c + n[1]; }; //(sym,code),"0"|"1" a[1].apply2(mc,"0"); b[1].apply2(mc,"1"); // mc(a[1],"0") tree.append( L(a[0]+b[0],a[1].extend(b[1])) ); //(a,b)-->new node }//-->L(L(39, L( L(" ","000"),L("e","0010"),L("a","0011") ... tree=tree[0][1].pump(List,fcn(i){ // flatten rather than traverse - if(T.isType(i))return(Void.Recurse,i,self.fcn); i }); + if(T.isType(i))return(Void.Recurse,i,self.fcn); i }); encodeTable:=tree.toDictionary(); // symbol:Huffman code decodeTable:=encodeTable.pump(Dictionary(),"reverse"); // code:symbol return(encodeTable,decodeTable); diff --git a/Task/Humble-numbers/ALGOL-68/humble-numbers.alg b/Task/Humble-numbers/ALGOL-68/humble-numbers.alg index b0a103ca81..09ce86b2ae 100644 --- a/Task/Humble-numbers/ALGOL-68/humble-numbers.alg +++ b/Task/Humble-numbers/ALGOL-68/humble-numbers.alg @@ -17,10 +17,10 @@ BEGIN # find some Humble numbers - numbers with no prime factors above 7 # INT m = min( min( min( p2, p3 ), p5 ), p7 ); h[ n ] := m; IF n <= max shown humble THEN print( ( " ", whole( m, 0 ) ) ) FI; - IF m = p2 THEN p2 := 2 * h[ last2 +:= 1 ] FI; - IF m = p3 THEN p3 := 3 * h[ last3 +:= 1 ] FI; - IF m = p5 THEN p5 := 5 * h[ last5 +:= 1 ] FI; - IF m = p7 THEN p7 := 7 * h[ last7 +:= 1 ] FI; + IF m = p2 THEN p2 := 2 * h[ last2 := last2 + 1 ] FI; + IF m = p3 THEN p3 := 3 * h[ last3 := last3 + 1 ] FI; + IF m = p5 THEN p5 := 5 * h[ last5 := last5 + 1 ] FI; + IF m = p7 THEN p7 := 7 * h[ last7 := last7 + 1 ] FI; h count[ IF m < 10 THEN 1 ELIF m < 100 THEN 2 ELIF m < 1 000 THEN 3 diff --git a/Task/Humble-numbers/Ada/humble-numbers.adb b/Task/Humble-numbers/Ada/humble-numbers.ada similarity index 100% rename from Task/Humble-numbers/Ada/humble-numbers.adb rename to Task/Humble-numbers/Ada/humble-numbers.ada diff --git a/Task/Humble-numbers/Agena/humble-numbers.agena b/Task/Humble-numbers/Agena/humble-numbers.agena deleted file mode 100644 index cddec65d4a..0000000000 --- a/Task/Humble-numbers/Agena/humble-numbers.agena +++ /dev/null @@ -1,32 +0,0 @@ -scope # find some Humble numbers - numbers with no prime factors above 7 - local constant maxHumble, constant maxShownHumble := 2048, 50; - local h, hCount := seq(), [ 0, 0, 0, 0, 0, 0 ]; hCount[ 0 ] := 0; - local p2, p3, p5, p7 := 2, 3, 5, 7; - local last2, last3, last5, last7 := 1, 1, 1, 1; - # 1 is the first humble number ( 2^0 * 3^0 * 5^0 * 7^0 ) and has 1 digit - h[ 1 ], hCount[ 1 ] := 1, 1; - io.write( "1" ); - for n from 2 to maxHumble do - # the next humble number is the lowest of the next multiples of 2, 3, 5, 7 - local constant m := math.min( p2, p3, p5, p7 ); - h[ n ] := m; - if n <= maxShownHumble then io.write( " ", m ) fi; - if m = p2 then last2 +:= 1; p2 := 2 * h[ last2 ] fi; - if m = p3 then last3 +:= 1; p3 := 3 * h[ last3 ] fi; - if m = p5 then last5 +:= 1; p5 := 5 * h[ last5 ] fi; - if m = p7 then last7 +:= 1; p7 := 7 * h[ last7 ] fi; - hCount[ if m < 10 then 1 - elif m < 100 then 2 - elif m < 1_000 then 3 - elif m < 10_000 then 4 - elif m < 100_000 then 5 - elif m < 1_000_000 then 6 - else 0 - fi - ] +:= 1 - od; - print(); - for i to 6 do - printf( "There are %4d Humble numbers with %d digits\n", hCount[ i ], i ) - od -end diff --git a/Task/Humble-numbers/Crystal/humble-numbers-1.cr b/Task/Humble-numbers/Crystal/humble-numbers-1.crystal similarity index 100% rename from Task/Humble-numbers/Crystal/humble-numbers-1.cr rename to Task/Humble-numbers/Crystal/humble-numbers-1.crystal diff --git a/Task/Humble-numbers/Crystal/humble-numbers-2.cr b/Task/Humble-numbers/Crystal/humble-numbers-2.crystal similarity index 100% rename from Task/Humble-numbers/Crystal/humble-numbers-2.cr rename to Task/Humble-numbers/Crystal/humble-numbers-2.crystal diff --git a/Task/Humble-numbers/EasyLang/humble-numbers.easy b/Task/Humble-numbers/EasyLang/humble-numbers.easy index adc26578a1..294a66c460 100644 --- a/Task/Humble-numbers/EasyLang/humble-numbers.easy +++ b/Task/Humble-numbers/EasyLang/humble-numbers.easy @@ -1,9 +1,19 @@ fastfunc humble i . - if i <= 1 : return 1 - if i mod 2 = 0 : return humble (i / 2) - if i mod 3 = 0 : return humble (i / 3) - if i mod 5 = 0 : return humble (i / 5) - if i mod 7 = 0 : return humble (i / 7) + if i <= 1 + return 1 + . + if i mod 2 = 0 + return humble (i / 2) + . + if i mod 3 = 0 + return humble (i / 3) + . + if i mod 5 = 0 + return humble (i / 5) + . + if i mod 7 = 0 + return humble (i / 7) + . return 0 . fastfunc next_humble n . @@ -16,11 +26,14 @@ fastfunc next_humble n . len arr[] 9 while cnt < 5193 n = next_humble n - idx = floor (log n 10 + 1) - arr[idx] += 1 + arr[log10 n + 1] += 1 cnt += 1 - if cnt <= 50 : write n & " " + if cnt <= 50 + write n & " " + . . print "" print "" -for i to 9 : print arr[i] & " with " & i & " digits" +for i to 9 + print arr[i] & " with " & i & " digits" +. diff --git a/Task/Humble-numbers/Fortran/humble-numbers.f b/Task/Humble-numbers/Fortran/humble-numbers.f deleted file mode 100644 index 84ed5074c5..0000000000 --- a/Task/Humble-numbers/Fortran/humble-numbers.f +++ /dev/null @@ -1,81 +0,0 @@ -! Humble Numbers -! tested with GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 on Kubuntu 25.04 -! -! Note that both intel ifx and VSI Fortran do not compile this code because they cannot -! deal with 16-byte-integers. -! -! U.B., July 2025 -! - - -program humbleNumbers - -implicit none - -integer, parameter :: int_kind = 16 ! Fortran compilers other than gfortran can't handle this -integer, parameter :: printLimit = 50 ! need to print first 50 humble numbers - -integer :: max_digits = 38 ! (signed) Integer(kind=16) can carry 38 digits -integer, parameter :: maxhSize=1160000 ! array size for all stored humble numbers -integer (kind=int_kind) :: humble ( maxhSize ) ! the humble numbers -integer :: usedH = 1 ! highest index into humble -integer (kind=int_kind) :: powersOf2=2, powersOf3=3,powersOf5=5,powersOf7=7,currentHumble=2, lim=10 -integer :: i=1, j=1,k=1,m=1,lastCount=0,d=1 - -humble (1) = 1 - -do while (.true.) - - usedH = usedH + 1 - if (usedH .le. maxhSize) then ! B sure we dont crash. - humble (usedH) = currentHumble - else - exit ! otherwise terminate. - endif - - ! construct next humble number as 2^i* 3^j * 5^k * 7^m - ! - ! What comes next? - if (currentHumble .eq. powersOf2) then - i = i + 1 - powersOf2 = humble (i) * 2 - endif - if (currentHumble .eq. powersOf3) then - j = j + 1 - powersOf3 = humble (j) * 3 - endif - if (currentHumble .eq. powersOf5) then - k = k + 1 - powersOf5 = humble (k) * 5 - endif - if (currentHumble .eq. powersOf7) then - m = m + 1 - powersOf7 = humble (m) * 7 - endif - currentHumble = powersOf2 - - ! Select next larger humble number - if (powersOf3=lim) then ! another digit ? - write (6, '(I0, " digits: ", i0)') d, usedH -lastCount - lastCount = usedH - d = d + 1 - - if (d .gt. max_digits) then ! Maximum number of digits reached, terminate. - exit - endif - lim = lim * 10 ! to detect next larger number of digits - endif -enddo - -write (6, '(/"total = ", I0 )') usedH -write (6,'(/"The first " ,I0, " humble numbers are:" )') printLimit -do i=1,printLimit - write (6,'(X, I0)', advance='no') humble (i) -enddo -write (6,*) ! terminate last output line. - -end program humbleNumbers diff --git a/Task/Humble-numbers/Icon/humble-numbers.icon b/Task/Humble-numbers/Icon/humble-numbers.icon deleted file mode 100644 index 9788c9eba9..0000000000 --- a/Task/Humble-numbers/Icon/humble-numbers.icon +++ /dev/null @@ -1,40 +0,0 @@ -global count - -procedure main(A) - limit1 := \A[1] | 50 - limit2 := \A[2] | 1000 - showcounts(humbles(limit1, limit2)) -end - -procedure humbles(limit1,limit2) - scounts := table(0) - every (count := 0, n := genhumbles()\limit2, count +:= 1, x := *n) do { - if 0 < (limit1 -:= 1) then writes(" ",n) - else if 0 = limit1 then write(" ",n) - scounts[x] +:= 1 - } - return scounts -end - -procedure genhumbles() - suspend 1 - p := [2,3,5,7] - l := [0,0,0,0] - ch := [] - every n := seq() do { - suspend m := min(p[1],p[2],p[3],p[4]) - put(ch, m) - if m = p[1] then p[1] := 2*ch[l[1] +:= 1] - if m = p[2] then p[2] := 3*ch[l[2] +:= 1] - if m = p[3] then p[3] := 5*ch[l[3] +:= 1] - if m = p[4] then p[4] := 7*ch[l[4] +:= 1] - } -end - -procedure showcounts(counts) - write("\nOut of the first ",count," humble numbers:\n") - write(" length ",center("count",16)) - write(" ",repl("-",5)," ",repl("-",16)) - every p := !sort(counts) do - write(right(p[1],7)," ",right(p[2],16)) -end diff --git a/Task/Humble-numbers/Julia/humble-numbers.jl b/Task/Humble-numbers/Julia/humble-numbers.julia similarity index 100% rename from Task/Humble-numbers/Julia/humble-numbers.jl rename to Task/Humble-numbers/Julia/humble-numbers.julia diff --git a/Task/Humble-numbers/Kotlin/humble-numbers.kts b/Task/Humble-numbers/Kotlin/humble-numbers.kotlin similarity index 100% rename from Task/Humble-numbers/Kotlin/humble-numbers.kts rename to Task/Humble-numbers/Kotlin/humble-numbers.kotlin diff --git a/Task/Humble-numbers/Maxima/humble-numbers.maxima b/Task/Humble-numbers/Maxima/humble-numbers.maxima deleted file mode 100644 index a9f5e2d00a..0000000000 --- a/Task/Humble-numbers/Maxima/humble-numbers.maxima +++ /dev/null @@ -1,13 +0,0 @@ -factors_only: true$ -is_humble(n) := length(sublist(ifactors(n), lambda([x], x>7)))=0$ - -block(count: 0, n: 1, while(count<50) do( - if is_humble(n) then block( - sprint(n), - count: count+1, - if mod(count, 10)=0 then newline() - ), - n: n+1))$ - -humble_digits(n) := length(sublist(makelist(i, i, 10^(n-1), (10^n)-1), is_humble))$ -map(humble_digits, makelist(i, i, 1, 6)); diff --git a/Task/Humble-numbers/PascalABC.NET/humble-numbers.pas b/Task/Humble-numbers/PascalABC.NET/humble-numbers.pas deleted file mode 100644 index 4ea1f2542b..0000000000 --- a/Task/Humble-numbers/PascalABC.NET/humble-numbers.pas +++ /dev/null @@ -1,25 +0,0 @@ -## -function humbles: sequence of uint64; -begin - var s := hset(uint64(1)); - while True do - begin - var m := s.min; - yield m; - s -= m; - foreach var k in |2, 3, 5, 7| do s += k * m; - end; -end; - -println('The first 50 humble numbers are:'); -foreach var n in humbles.Take(50) index i do - write(n:4, if i mod 10 = 9 then #10 else ''); - -println; -println('Digits Count'); -for var dig := 1 to 18 do -begin - var count := humbles.SkipWhile(x -> x < 10 ** (dig - 1)) - .TakeWhile(x -> x < 10 ** dig).Count; - writeln(dig:2, count:10); -end; diff --git a/Task/Humble-numbers/Pluto/humble-numbers.pluto b/Task/Humble-numbers/Pluto/humble-numbers.pluto deleted file mode 100644 index faca83857a..0000000000 --- a/Task/Humble-numbers/Pluto/humble-numbers.pluto +++ /dev/null @@ -1,31 +0,0 @@ -do -- find some Humble numbers - numbers with no prime factors above 7 - local maxHumble , maxShownHumble = 2048, 50 - local h, hCount = {}, { [0] = 0, 0, 0, 0, 0, 0, 0 } - local p2, p3, p5, p7 = 2, 3, 5, 7 - local last2, last3, last5, last7 = 1, 1, 1, 1 - -- 1 is the first humble number ( 2^0 * 3^0 * 5^0 * 7^0 ) and has 1 digit - h[ 1 ], hCount[ 1 ] = 1, 1 - io.write( "1" ) - for n = 2, maxHumble do - -- the next humble number is the lowest of the next multiples of 2, 3, 5, 7 - local m = math.min( p2, p3, p5, p7 ) - h[ n ] = m - if n <= maxShownHumble then io.write( " ", m ) end - if m == p2 then last2 += 1 p2 = 2 * h[ last2 ] end - if m == p3 then last3 += 1 p3 = 3 * h[ last3 ] end - if m == p5 then last5 += 1 p5 = 5 * h[ last5 ] end - if m == p7 then last7 += 1 p7 = 7 * h[ last7 ] end - hCount[ ( m < 10 ) ? 1 - : ( m < 100 ) ? 2 - : ( m < 1_000 ) ? 3 - : ( m < 10_000 ) ? 4 - : ( m < 100_000 ) ? 5 - : ( m < 1_000_000 ) ? 6 - : 0 - ] += 1 - end - io.write( "\n" ) - for i = 1, 6 do - io.write( string.format( "There are %4d Humble numbers with %d digits\n", hCount[ i ], i ) ) - end -end diff --git a/Task/Humble-numbers/R/humble-numbers.r b/Task/Humble-numbers/R/humble-numbers.r deleted file mode 100644 index 328aa77434..0000000000 --- a/Task/Humble-numbers/R/humble-numbers.r +++ /dev/null @@ -1,16 +0,0 @@ -next_humble <- function(n) nextn(n, c(2,3,5,7)) -humblenums <- function(n) Reduce(function(x, f) 1+f(x), - rep(list(next_humble),n-1), - init=2, - accumulate=TRUE)-1 - -humblenums(50) - -humble_digits <- function(n){ - digcounts <- rle(floor(log10(humblenums(n))))$lengths - for(i in seq_along(digcounts[-1])){ - cat("There are", digcounts[i], "humble numbers with", i, "digit(s)", "\n") - } -} - -humble_digits(5000) diff --git a/Task/Humble-numbers/REXX/humble-numbers.rexx b/Task/Humble-numbers/REXX/humble-numbers.rexx index 3a4ca3c7dd..c4f9c240cd 100644 --- a/Task/Humble-numbers/REXX/humble-numbers.rexx +++ b/Task/Humble-numbers/REXX/humble-numbers.rexx @@ -1,46 +1,44 @@ --- 23 Aug 2025 -include Setting +/*REXX program computes and displays humble numbers, also will display counts of sizes.*/ +parse arg n m . /*obtain optional arguments from the CL*/ +if n=='' | n=="," then n= 50 /*Not specified? Then use the default.*/ +if m=='' | m=="," then m= 60 /* " " " " " " */ +numeric digits 1 + max(20, m) /*be able to handle some big numbers. */ +$.= 0 /*a count array for X digit humble #s*/ +call humble n; list= /*call HUMBLE sub; initialize the list.*/ + do j=1 for n; list= list @.j /*append a humble number to the list.*/ + end /*j*/ -say 'HUMBLE NUMBERS' -say version +if list\='' then do; say "A list of the first " n ' humble numbers are:' + say strip(list) /*elide the leading blank in the list. */ + end say -call Humbles 50 -call ShowFirstN 50 -call Humbles 10000000 -call ShowDistribution -say Time('e')/1 'seconds' -exit - -ShowFirstN: -procedure expose humb. -arg xx -xx = xx/1 -say 'First' xx 'humble numbers are' -do i = 1 to xx - call Charout ,Right(humb.i,4) - if i//10 = 0 then - say -end -say -return - -ShowDistribution: -procedure expose humb. -say 'Digit distribution for the first' humb.0 'humble numbers' -d. = 0 -do i = 1 to humb.0 - l = Length(humb.i); d.l = d.l + 1; d.0 = Max(l,d.0) -end -l = Copies('-',17) -say l -say 'Dg Count Cum' -say l -c = 0 -do i = 1 to d.0-1 - c = c + d.i - say Right(i,2) Right(d.i,6) Right(c,7) -end -say l -return - -include Math +call humble -m /*invoke subroutine for counting nums. */ +if $.1==0 then exit /*if no counts, then we're all finished*/ +total= 0 /*initialize count of humble numbers. */ +$.1= $.1 + 1 /*adjust count for absent 1st humble #.*/ +say ' The digit counts of humble numbers:' +say ' ═════════════════════════════════════════' + do c=1 while $.c>0; s= left('s', length($.c)>1) /*count needs pluralization?*/ + say right( commas($.c), 30) ' have ' right(c, 2) " digit"s + total= total + $.c /* ◄─────────────────────────────────┐ */ + end /*k*/ /*bump humble number count (so far)──┘ */ +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +commas: procedure; arg _; do i=length(_)-3 to 1 by -3; _=insert(',', _, i); end; return _ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +humble: procedure expose @. $.; parse arg x; if x==0 then return + y= abs(x); a= y; noCount= x>0; if x<0 then y= 999999999 + #2= 1; #3= 1; #5= 1; #7= 1 /*define the initial humble constants. */ + $.= 0; @.= 0; @.1= 1 /*initialize counts and humble numbers.*/ + do h=2 for y-1 + @.h= min(2*@.#2,3*@.#3,5*@.#5,7*@.#7) /*pick the minimum of 4 humble numbers.*/ + m= @.h /*M: " " " " " " */ + if 2*@.#2 == m then #2 = #2 + 1 /*Is number already defined? Use next #*/ + if 3*@.#3 == m then #3 = #3 + 1 /* " " " " " " "*/ + if 5*@.#5 == m then #5 = #5 + 1 /* " " " " " " "*/ + if 7*@.#7 == m then #7 = #7 + 1 /* " " " " " " "*/ + if noCount then iterate /*Not counting digits? Then iterate. */ + L= length(m); if L>a then leave /*Are we done with counting? Then quit*/ + $.L= $.L + 1 /*bump the digit count for this number.*/ + end /*h*/ /*the humble numbers are in the @ array*/ + return /* " count results " " " $ " */ diff --git a/Task/Humble-numbers/Rust/humble-numbers.rs b/Task/Humble-numbers/Rust/humble-numbers.rs deleted file mode 100644 index 839c434188..0000000000 --- a/Task/Humble-numbers/Rust/humble-numbers.rs +++ /dev/null @@ -1,51 +0,0 @@ -fn num_length( number : u32 ) -> usize { - let numberstring : String = number.to_string( ) ; - let numstr = numberstring.as_str( ) ; - numstr.chars( ).count( ) -} - -fn is_humble( number : u32 ) -> bool { - let result : bool = match number { - num if num <= 1 => true , - num if num % 2 == 0 => is_humble( number / 2 ) , - num if num % 3 == 0 => is_humble( number / 3 ) , - num if num % 4 == 0 => is_humble( number / 4 ) , - num if num % 5 == 0 => is_humble( number / 5 ) , - num if num % 6 == 0 => is_humble( number / 6 ) , - num if num % 7 == 0 => is_humble( number / 7 ) , - _ => false - } ; - result -} - -fn main() { - let mut first_fifty : Vec = Vec::new( ) ; - let mut pairs : Vec<(usize , usize)> = Vec::new( ) ; - let mut oldlength : usize = 0 ; - let mut currentnum : u32 = 1 ; - let mut length : usize = 1 ; - let mut lengthsum : usize = 0 ; - while length < 10 { - if is_humble( currentnum ) { - if first_fifty.len( ) < 50 { - first_fifty.push( currentnum ) ; - } - if length == oldlength { - lengthsum += 1 ; - } - else { - let temp_len : usize = length - 1 ; - pairs.push( (temp_len , lengthsum ) ) ; - lengthsum = 1 ; - oldlength = length ; - } - } - currentnum += 1 ; - length = num_length( currentnum ) ; - } - pairs.push((length - 1 , lengthsum )) ; - println!("{:?}" , first_fifty ) ; - for p in pairs { - println!("length {} with {} humble numbers!" , p.0 , p.1 ) ; - } -} diff --git a/Task/Humble-numbers/V-(Vlang)/humble-numbers.v b/Task/Humble-numbers/V-(Vlang)/humble-numbers.v deleted file mode 100644 index 42182166d6..0000000000 --- a/Task/Humble-numbers/V-(Vlang)/humble-numbers.v +++ /dev/null @@ -1,38 +0,0 @@ -fn is_humble(i int) bool { - if i <= 1 {return true} - if i % 2 == 0 {return is_humble(i / 2)} - if i % 3 == 0 {return is_humble(i / 3)} - if i % 5 == 0 {return is_humble(i / 5)} - if i % 7 == 0 {return is_humble(i / 7)} - return false -} - -fn main() { - limit := max_i16 - mut humble := map[int]int{} - mut count, mut len, mut total, mut num := 0, 0, 0, 1 - mut str :="" - - for count < limit { - if is_humble(num) == true { - str = num.str() - len = str.len - humble[len]++ - if count < 50 {print("${num} ")} - count++ - } - num++ - } - println("\n") - - println("Of the first ${count} humble numbers:") - num = 1 - for num < humble.len - 1 { - if num in humble { - total = humble[num] - println("${total:5} have ${num:2} digits") - num++ - } - else {break} - } -} diff --git a/Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-1.adb b/Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-1.ada similarity index 100% rename from Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-1.adb rename to Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-1.ada diff --git a/Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-2.adb b/Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-2.ada similarity index 100% rename from Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-2.adb rename to Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-2.ada diff --git a/Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-3.adb b/Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-3.ada similarity index 100% rename from Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-3.adb rename to Task/Hunt-the-Wumpus/Ada/hunt-the-wumpus-3.ada diff --git a/Task/Hunt-the-Wumpus/C/hunt-the-wumpus.c b/Task/Hunt-the-Wumpus/C/hunt-the-wumpus.c deleted file mode 100644 index 79b70d3cf7..0000000000 --- a/Task/Hunt-the-Wumpus/C/hunt-the-wumpus.c +++ /dev/null @@ -1,129 +0,0 @@ -#include -#include -#include - -#define NUM_ROOMS 20 -#define ARROWS 5 - -typedef enum { false, true } bool; - -typedef struct { - int connected[3]; - bool has_wumpus; - bool has_bat; - bool has_pit; -} Room; - -Room cave[NUM_ROOMS + 1]; // Cave rooms are numbered from 1 to 20 - -void initialize_cave() { - int i, j; - // Initialize cave rooms - for (i = 1; i <= NUM_ROOMS; i++) { - for (j = 0; j < 3; j++) { - cave[i].connected[j] = (i + j) % NUM_ROOMS + 1; // Circular connections - } - cave[i].has_wumpus = false; - cave[i].has_bat = false; - cave[i].has_pit = false; - } - // Randomly place wumpus, bats, and pits - cave[rand() % NUM_ROOMS + 1].has_wumpus = true; - for (i = 0; i < 2; i++) { - cave[rand() % NUM_ROOMS + 1].has_bat = true; - cave[rand() % NUM_ROOMS + 1].has_pit = true; - } -} - -void sense(int room) { - printf("You are in room %d.\n", room); - int i, adjacent_room; - for (i = 0; i < 3; i++) { - adjacent_room = cave[room].connected[i]; - if (cave[adjacent_room].has_wumpus) - printf("You smell something terrible nearby.\n"); - if (cave[adjacent_room].has_bat) - printf("You hear a rustling.\n"); - if (cave[adjacent_room].has_pit) - printf("You feel a cold wind blowing from a nearby cavern.\n"); - } -} - -void move(int *room) { - int choice; - printf("Choose an adjacent room to move into: "); - scanf("%d", &choice); - if (choice < 1 || choice > 3) { - printf("Invalid choice. Please choose a number between 1 and 3.\n"); - move(room); - return; - } - *room = cave[*room].connected[choice - 1]; -} - -void shoot(int room, int *arrows, bool *game_over) { - int choice, adjacent_room; - printf("Choose an adjacent room to shoot into: "); - scanf("%d", &choice); - if (choice < 1 || choice > 3) { - printf("Invalid choice. Please choose a number between 1 and 3.\n"); - shoot(room, arrows, game_over); - return; - } - adjacent_room = cave[room].connected[choice - 1]; - if (cave[adjacent_room].has_wumpus) { - printf("Congratulations! You've killed the Wumpus!\n"); - *game_over = true; - return; - } - else { - if (rand() % 4 != 0) { // 75% chance of waking up the wumpus - if (cave[adjacent_room].has_wumpus) { - printf("The Wumpus has woken up and eaten you!\n"); - *game_over = true; - return; - } - } - printf("You missed! The Wumpus is still asleep.\n"); - } - (*arrows)--; -} - -int main() { - srand(time(NULL)); - initialize_cave(); - int current_room = 1; - int arrows = ARROWS; - bool game_over = false; - - printf("Welcome to Hunt the Wumpus!\n"); - - while (!game_over) { - sense(current_room); - printf("Choose your action:\n"); - printf("1. Move to an adjacent room\n"); - printf("2. Shoot into an adjacent room\n"); - - int choice; - printf("Enter your choice (1 or 2): "); - scanf("%d", &choice); - - switch(choice) { - case 1: - move(¤t_room); - break; - case 2: - if (arrows > 0) { - shoot(current_room, &arrows, &game_over); - } else { - printf("You're out of arrows! You lost the game.\n"); - game_over = true; - } - break; - default: - printf("Invalid choice. Please choose 1 or 2.\n"); - } - } - - return 0; -} diff --git a/Task/Hunt-the-Wumpus/EasyLang/hunt-the-wumpus.easy b/Task/Hunt-the-Wumpus/EasyLang/hunt-the-wumpus.easy deleted file mode 100644 index 9fbc981fa3..0000000000 --- a/Task/Hunt-the-Wumpus/EasyLang/hunt-the-wumpus.easy +++ /dev/null @@ -1,92 +0,0 @@ -exits[][] = [ [ 2 5 8 ] [ 1 3 10 ] [ 2 4 12 ] [ 3 5 14 ] [ 1 4 6 ] [ 5 7 15 ] [ 6 8 17 ] [ 1 7 9 ] [ 8 10 18 ] [ 2 9 11 ] [ 10 12 19 ] [ 2 11 13 ] [ 12 14 20 ] [ 4 13 15 ] [ 6 14 16 ] [ 15 17 20 ] [ 7 16 18 ] [ 9 17 19 ] [ 11 18 20 ] [ 13 16 19 ] ] -len hazard$[] 20 -func emptyRoom . - repeat - room = random 1 20 - until hazard$[room] = "" - . - return room -. -for i to 2 - hazard$[emptyRoom] = "bat" - hazard$[emptyRoom] = "pit" -. -hazard$[emptyRoom] = "wumpus" -# -print "*** HUNT THE WUMPUS ***" -print "-----------------------" -curRoom = emptyRoom -arrows = 5 -func checkWumpus . - if hazard$[curRoom] = "wumpus" - print "You find yourself face to face with the wumpus." - print "It eats you whole." - print "GAME OVER" - return 1 - . -. -repeat - print "You are in room " & curRoom & "." - until checkWumpus = 1 - for r in exits[curRoom][] - if hazard$[r] = "wumpus" : print "You smell something terrible nearby." - if hazard$[r] = "bat" : print "You hear a rustling." - if hazard$[r] = "pit" : print "You feel a cold wind blowing from a nearby cavern." - . - print "Tunnels lead to: " & strjoin exits[curRoom][] ", " - print "You have " & arrows & " arrows." - print "" - repeat - repeat - write "M)ove, S)hoot, or Q)uit? " - in$ = input - print in$ - m$ = substr in$ 1 1 - until m$ = "m" or m$ = "s" or m$ = "q" - . - if m$ = "q" : break 2 - target = number substr in$ 2 99 - if target = 0 - write "Which room? " - target = number input - print target - . - for i to 3 - if exits[curRoom][i] = target : break 1 - . - until i <= 3 - print "Cannot get there from here." - . - if m$ = "m" - curRoom = target - if hazard$[curRoom] = "bat" - print "You have entered the lair of a giant bat." - curRoom = emptyRoom - print "It picks you up and drops you in room " & curRoom & "." - elif hazard$[curRoom] = "pit" - print "The ground gives way beneath your feet." - print "You fall into a deep abyss." - print "GAME OVER" - break 1 - . - else - arrows -= 1 - if hazard$[target] = "wumpus" - print "Congratulations! You shot the wumpus!" - break 1 - . - print "You missed." - if randomf < 0.75 - print "The wumpus wakes from his slumber." - for i to 20 : if hazard$[i] = "wumpus" : hazard$[i] = "" - hazard$[emptyRoom] = "wumpus" - if checkWumpus = 1 : break 1 - . - if arrows = 0 - print "As you grasp at your empty quiver, " - print "you hear a large beast approaching..." - hazard$[curRoom] = "wumpus" - if checkWumpus = 1 : break 1 - . - . -. diff --git a/Task/Hunt-the-Wumpus/FOCAL/hunt-the-wumpus.focal b/Task/Hunt-the-Wumpus/FOCAL/hunt-the-wumpus.focal deleted file mode 100644 index 3308bdd6d1..0000000000 --- a/Task/Hunt-the-Wumpus/FOCAL/hunt-the-wumpus.focal +++ /dev/null @@ -1,213 +0,0 @@ -1.10 S FOUT(12); C HUNT THE WUMPUS - BY GREGORY YOB, 1973. -1.11 C FOCAL-65 VERSION CONVERTED FROM BASIC SOURCE IN -1.12 C 'CREATIVE COMPUTING' MAGAZINE, SEPT/OCT 1975 -1.20 T %2,!"INSTRUCTIONS (Y-N)? "; S I=FCHR(); T ! -1.30 I (I-78),1.45; -1.40 G 90.1 -1.45 S FRAN(-1); T "SETTING UP CAVE..."! -1.46 C SET UP CAVE (DODECAHEDRAL NODE LIST) -1.47 C FOCAL-65 DOESN'T HAVE DATA/READ STMTS, SO DATA PACKED IN A $ -1.48 C OTHER VERSIONS MAY NEED TO ASSIGN EACH ELEMENT OF S TO S(X) -1.50 S FISL(120,S$); C 60 2-DIG DATA ELEMENTS -1.52 S FODV(S$); C PREPARES S$ FOR INPUT FROM CURRENT OUTPUT DEVICE -1.53 T "020508010310020412030514010406" -1.54 T "050715060817010709081018020911" -1.55 T "101219031113121420041315061416" -1.56 T "151720071618091719111820131619" -1.58 R O; S FIDV(S$),; C RESET OUTPUT DEV., SET S$ AS INPUT DEVICE -1.60 F I=1,60; D 1.8 -1.70 R I; G 2.1 -1.80 S X=FCHR(), X=X-48, S(I)=X*10, X=FCHR(), X=X-48, S(I)=S(I)+X -1.90 R - -2.10 C LOCATE L ARRAY ITEMS: 1-YOU,2-WUMPUS,3&4-PITS,5&6-BATS -2.20 F J=1,6; S L(J)=FINT(FRAN(0)*20)+1, M(J)=L(J) -2.22 C CHECK FOR CROSSOVERS (IE L(1)=L(2), ETC) -2.25 S J=1 -2.27 S K=1 -2.30 I (J-K),2.5; -2.40 I (L(J)-L(K)),2.2; C IF L(J)=L(K), RESET -2.50 S K=K+1; I (K-6)2.52,2.52,2.56 -2.52 G 2.3 -2.56 S J=J+1; I (J-6)2.27,2.27; - -2.60 C SET ARROWS, RUN GAME -2.70 S A=5, L=L(1) - -3.10 T "HUNT THE WUMPUS"! -3.20 C HAZARD WARNINGS & LOCATION -3.30 G 20.1 - -4.05 C MOVE OR SHOOT -4.10 D 25 -4.20 I (I),4.3,4.8 -4.30 G 30.1; C SHOOT -4.50 I (G)5.1,3.3,5.5 -4.80 G 40.1; C MOVE -4.90 I (G),3.3,5.5 - -5.09 C LOSE -5.10 T "HA HA HA - YOU LOSE!"!; G 5.6 -5.40 C WIN -5.50 T "HEE HEE HEE - THE WUMPUS'LL GETCHA NEXT TIME!!"! -5.60 F J=1,6; S L(J)=M(J) -5.70 T "PLAY AGAIN (Y-N)? ";S I=FCHR(); T ! -5.80 I (I-89)7.1,5.9,7.1 -5.90 T "SAME SETUP (Y-N)? ";S I=FCHR(); T !"STAND BY..."! -6.10 I (I-89)2.2,2.7,2,2 - -7.10 Q - -20.05 C - PRINT LOCATION & HAZARD WARNING -20.10 S J=2 -20.12 I (J-7),21.3; -20.20 S K=1 -20.30 S T=(L(1)-1)*3+K -20.40 I (S(T)-L(J))20.9,20.5,20.9 -20.50 I (J-2),20.6; -20.52 I (J-3),20.7; -20.53 I (J-4),20.7; -20.54 I (J-5),20.8; -20.55 I (J-6),20.8; -20.60 T "I SMELL A WUMPUS!"!; G 20.9 -20.70 T "I FEEL A DRAFT."!; G 20.9 -20.80 T "BATS NEARBY!"! -20.90 S K=K+1; I (K-3)20.3,20.3; -20.92 S J=J+1; G 20.12 - -21.30 T "YOU ARE IN ROOM ",L(1),!; S T=(L(1)-1)*3 -21.40 T "TUNNELS LEAD TO ",S(T+1)," ",S(T+2)," ",S(T+3) -21.50 T !! -21.60 G 4.1 - -25.05 C - CHOOSE OPTION *** -25.10 T "SHOOT OR MOVE (S-M)? " -25.20 S I=FCHR(); T !; I (I-77),25.4; -25.30 I (I-83)25.1,25.5,25.1 -25.40 S I=1; R -25.50 S I=0; R - -30.01 C - ARROW ROUTINE -30.10 S G=0 -30.20 C - PATH OF ARROW -30.30 S L=L(1) -30.40 T "NO. OF ROOMS (1-5)? "; A J7 -30.50 I (J7-1)30.4; -30.60 I (J7-5),,30.4 -30.70 S K=1 -30.80 T "ROOM #? "; A P(K) -30.90 I (K-2)31.15,31.15; -31.05 I (P(K)-P(K-2))31.15,,31.15 -31.10 T ""ARROWS AREN'T THAT CROOKED - TRY ANOTHER ROOM."!; G 30.8 -31.15 S K=K+1; I (K-J7)30.8,30.8; - -31.20 C - SHOOT ARROW -31.30 C S L=L(1) <- NOT IN 'MORE BASIC COMP GMS' -31.40 S K=1 -31.50 S K1=1 -31.60 S T=((L-1)*3)+K1; I (S(T)-P(K)),32.95; -31.70 S K1=K1+1; I (K1-3)31.6,31.6; -31.80 C - NO TUNNEL FOR ARROW -31.90 S T=FINT(FRAN(0)*3)+1, L=S(((L-1)*3)+T) -32.01 G 33.1 -32.10 S K=K+1; I (K-J7)31.5,31.5; -32.20 T "MISSED."!; S L=L(1) -32.30 C - MOVE WUMPUS -32.40 S B=-1; G 33.7; C D 33.7 -32.50 C - AMMO CHECK -32.60 S A=A-1; I (A),,32.8 -32.70 S G=-1 -32.80 G 4.5 - -32.90 C - SEE IF ARROW IS AT L(1) OR AT L(2) -32.95 S L=P(K) -33.10 I (L-L(2))33.4,,33.4 -33.15 T "AHA! YOU GOT THE WUMPUS!"! -33.20 S G=1; G 4.5 -33.40 I (L-L(1))32.1,,32.1 -33.50 T "OUCH! ARROW GOT YOU!"!; G 32.7 - -33.70 C - MOVE WUMPUS ROUTINE -33.72 S K=FINT(FRAN(0)*4)+1 -33.74 I (K-4),33.78 -33.76 S T=((L(2)-1)*3)+K, L(2)=S(T) -33.78 I (L(2)-L)33.9,,33.9 -33.80 T "TSK TSK TSK - WUMPUS GOT YOU!"! -33.85 S G=-1 -33.90 I (B)32.6,41.9; - -40.01 C - MOVE ROUTINE -40.10 S G=0 -40.20 T "WHERE TO? "; A L -40.30 I (L-1)40.2; -40.40 I (L-20),,40.2 -40.50 C - CHECK IF LEGAL MOVE -40.60 S K=1 -40.70 S T=L(1)-1, T=T*3+K -40.75 I (S(T)-L),41.3; -40.80 S K=K+1; I (K-3)40.7,40.7; -40.90 I (L-L(1)),41.3; -41.10 T "NOT POSSIBLE - " -41.15 G 40.2 -41.20 C - CHECK FOR HAZARDS -41.30 S L(1)=L -41.40 C - WUMPUS *** -41.50 I (L-L(2))42.15,,42.15 -41.60 T "... OOPS! BUMPED A WUMPUS!"! -41.70 C - MOVE WUMPUS -41.80 S B=0; G 33.7; C D 33.7 -41.90 I (G),42.2; -42.10 C - PIT -42.15 I (L-L(3))42.2,42.3,42.2 -42.20 I (L-L(4))42.7,42.3,42.7 -42.30 T "YYYYIIIIEEEE . . . FELL IN PIT!"! -42.40 S G=-1; G 4.9 -42.60 C - BATS -42.70 I (L-L(5))42.75,42.8,42.75 -42.75 I (L-L(6))43.1,42.8,43.1 -42.80 T "ZAP--SUPER BAT SNATCH! ELSEWHEREVILLE FOR YOU!"! -42.90 S L=FINT(FRAN(0)*20)+1 -43.05 G 41.3 -43.10 G 4.9 - -50.10 Q - -90.05 C - INSTRUCTIONS -90.10 T "WELCOME TO 'HUNT THE WUMPUS'"! -90.20 T " THE WUMPUS LIVES IN A CAVE OF 20 ROOMS. EACH ROOM"! -90.30 T "HAS 3 TUNNELS LEADING TO OTHER ROOMS. (LOOK AT A"! -90.40 T "DODECAHEDRON TO SEE HOW THIS WORKS-IF YOU DON'T KNOW"! -90.50 T "WHAT A DODECAHEDRON IS, ASK SOMEONE)"!! -90.70 T " HAZARDS:"! -90.80 T " BOTTOMLESS PITS - TWO ROOMS HAVE BOTTOMLESS PITS IN THEM."! -90.90 T " IF YOU GO THERE, YOU FALL INTO THE PIT (& LOSE!)."! -90.95 T " SUPER BATS - TWO OTHER ROOMS HAVE SUPER BATS. IF YOU"! -91.10 T " GO THERE, A BAT GRABS YOU AND TAKES YOU TO SOME OTHER"! -91.20 T " ROOM AT RANDOM (WHICH MAY BE TROUBLESOME)."!! -91.40 T " WUMPUS:"! -91.50 T " THE WUMPUS IS NOT BOTHERED BY HAZARDS (HE HAS SUCKER"! -91.60 T " FEET AND IS TOO BIG FOR A BAT TO LIFT). USUALLY"! -91.70 T " HE IS ASLEEP. TWO THINGS WAKE HIM UP: YOU ENTERING HIS"! -91.80 T " ROOM OR YOU SHOOTING AN ARROW."! -91.90 T " IF THE WUMPUS WAKES, HE MOVES (P=.75) ONE ROOM"! -92.10 T " OR STAYS STILL (P=.25). AFTER THAT, IF HE IS WHERE YOU"! -92.20 T " ARE, HE EATS YOU UP AND YOU LOSE!"!! -92.25 T "(PRESS ANY KEY TO CONTINUE)"; S Z=FCHR(); T !! -92.30 T " YOU:"! -92.40 T " EACH TURN YOU MAY MOVE OR SHOOT A CROOKED ARROW."! -92.50 T " MOVING: YOU CAN MOVE ONE ROOM (THRU ONE TUNNEL)."! -92.60 T " ARROWS: YOU HAVE 5 ARROWS. YOU LOSE WHEN YOU RUN OUT."! -92.70 T " EACH ARROW CAN GO FROM 1 TO 5 ROOMS. YOU AIM BY TELLING"! -92.80 T " THE COMPUTER THE ROOM #S YOU WANT THE ARROW TO GO TO."! -92.90 T " IF THE ARROW CAN'T GO THAT WAY (IF NO TUNNEL) IT MOVES"! -93.10 T " AT RANDOM TO THE NEXT ROOM."! -93.20 T " IF THE ARROW HITS THE WUMPUS, YOU WIN."! -93.30 T " IF THE ARROW HITS YOU, YOU LOSE."!! -93.40 T " WARNINGS:"! -93.50 T " WHEN YOU ARE ONE ROOM AWAY FROM A WUMPUS OR HAZARD,"! -93.60 T " THE COMPUTER SAYS:"! -93.70 T " WUMPUS: 'I SMELL A WUMPUS'"! -93.80 T " BAT : 'BATS NEARBY'"! -93.90 T " PIT : 'I FEEL A DRAFT'"!! -94.05 T "(PRESS ANY KEY TO BEGIN)"; S Z=FCHR(); T !! -94.10 G 1.45 diff --git a/Task/Hunt-the-Wumpus/Forth/hunt-the-wumpus.fth b/Task/Hunt-the-Wumpus/Forth/hunt-the-wumpus.fth deleted file mode 100644 index 77842adb0d..0000000000 --- a/Task/Hunt-the-Wumpus/Forth/hunt-the-wumpus.fth +++ /dev/null @@ -1,733 +0,0 @@ -\ Hunt the Wumpus - FORTH - v 1.00 - -: wumpus-version ( -- ) - ." Version 1.00 - FORTH " - ; - -[DEFINED] UTIME [IF] ( -- Dusec ) - : MS@ UTIME DROP ; \ gforth -[ELSE] -[DEFINED] counter [IF] - : MS@ counter ; \ SwiftForth -[THEN] [THEN] - -include random.fs \ defines random ( n -- 0..n-1 ) - -\ Initialize random seed from a -\ value that changes with time -MS@ SEED ! - -\ -\ The cave: 20 rooms, each connected to 3 others, -\ as a dodecahedron -\ -20 CONSTANT COUNT-ROOMS - 3 CONSTANT COUNT-NEIGHBORS -CREATE CAVE \ adjacency list - 5 C, 8 C, 2 C, \ ROOM 1 - 1 C, 10 C, 3 C, \ ROOM 2 - 2 C, 12 C, 4 C, \ ROOM 3 - 3 C, 14 C, 5 C, \ ROOM 4 - 4 C, 6 C, 1 C, \ ROOM 5 - 15 C, 5 C, 7 C, \ ROOM 6 - 6 C, 17 C, 8 C, \ ROOM 7 - 7 C, 1 C, 9 C, \ ROOM 8 - 8 C, 18 C, 10 C, \ ROOM 9 - 9 C, 2 C, 11 C, \ ROOM 10 - 10 C, 19 C, 12 C, \ ROOM 11 - 11 C, 3 C, 13 C, \ ROOM 12 - 12 C, 20 C, 14 C, \ ROOM 13 - 13 C, 4 C, 15 C, \ ROOM 14 - 14 C, 16 C, 6 C, \ ROOM 15 - 20 C, 15 C, 17 C, \ ROOM 16 - 16 C, 7 C, 18 C, \ ROOM 17 - 17 C, 9 C, 19 C, \ ROOM 18 - 18 C, 11 C, 20 C, \ ROOM 19 - 19 C, 13 C, 16 C, \ ROOM 20 - -\ Game state -CREATE HUNTER 1 CHARS ALLOT \ Player location -CREATE WUMPUS 1 CHARS ALLOT \ Wumpus location -CREATE PITS 2 CHARS ALLOT \ Rooms with pits -CREATE BATS 2 CHARS ALLOT \ Rooms with bats - -CREATE ARROWS 1 CHARS ALLOT \ Crooked arrows left -CREATE PLAYER 1 CHARS ALLOT \ IN-PLAY, WON, LOST - -\ Keep track of whether bats snatched the Hunter -\ TRUE if bats moved player -CREATE BATS-MOVED-HUNTER 1 CELLS ALLOT - -\ Arrow path -CREATE ARROW-PATH-LENGTH 1 CHARS ALLOT -CREATE ARROW-PATH-ROOMS 5 CHARS ALLOT - -\ Initial room assignments in order: -\ Hunter, Wumpus, pits, bats -CREATE INITIAL-ROOMS 6 CHARS ALLOT - -\ Scratch area for generating a random shuffle -\ of the 20 room numbers -CREATE ROOM-NUMBERS COUNT-ROOMS CHARS ALLOT - -\ Player states -0 CONSTANT IN-PLAY -1 CONSTANT WON -2 CONSTANT LOST - -\ Quit, or play again with new or same initial state -0 CONSTANT QUIT-GAME -1 CONSTANT SAME-ROOMS -2 CONSTANT NEW-ROOMS - -\ A pointer to a prompt string -CREATE PROMPT-STRING 2 CELLS ALLOT - -\ An 8-character buffer for prompt answers -8 CONSTANT MAX-ANSWER-LENGTH -CREATE PROMPT-ANSWER MAX-ANSWER-LENGTH CHARS ALLOT - -\ Responses to a yes-no question -CHAR y CONSTANT YES -CHAR n CONSTANT NO - -\ Responses to a command prompt -CHAR w CONSTANT WHERE-AM-I? -CHAR m CONSTANT MOVE-ME -CHAR s CONSTANT SHOOT -\ - undocumented - -CHAR g CONSTANT GAME-STATE \ show the game state -CHAR c CONSTANT CAVE-ROOMS \ show all the cave rooms - -ALIGN \ Align to next slot boundary - -\ -\ The Cave -\ room-number in 1..20 -\ WARNING: These cave referencing words -\ don't validate room numbers!!! -\ - -\ Determine if a room number is in the cave -: ?cave-room-number-valid ( room-number -- flag ) - DUP 0 < SWAP COUNT-ROOMS > OR INVERT - ; - -\ Get a pointer to a room -: cave-room-address ( room-number -- room-address ) - 1- COUNT-NEIGHBORS * CHARS CAVE + - ; - -\ Get the room number of a neighbor -: cave-room-neighbor ( index room-number -- room-number ) - cave-room-address SWAP CHARS + C@ - ; - -\ Get a list of a room's neighbors -: cave-room-neighbors ( room-number -- n_1 n_2 n_3 ) - DUP cave-room-address C@ SWAP - DUP cave-room-address CHAR+ C@ SWAP - cave-room-address 2 CHARS + C@ - ; - -\ Determine if a room is a neighbor -: ?cave-room-reachable ( to from -- flag ) - cave-room-neighbors FALSE - 4 PICK 4 PICK = OR - 4 PICK 3 PICK = OR - 4 PICK 2 PICK = OR - SWAP DROP SWAP DROP SWAP DROP SWAP DROP - ; - -\ Does this room have the Hunter in it? -: ?cave-room-has-hunter ( room-number -- flag ) - HUNTER C@ = - ; - -\ Does this room have the Wumpus in it? -: ?cave-room-has-wumpus ( room-number -- flag ) - WUMPUS C@ = - ; - -\ Does this room have a bottomless pit in it? -: ?cave-room-has-pit ( room-number -- flag ) - DUP PITS C@ = SWAP PITS CHAR+ C@ = OR - ; - -\ Does this room have super bats in it? -: ?cave-room-has-bats ( room-number -- flag ) - DUP BATS C@ = SWAP BATS CHAR+ C@ = OR - ; - -\ -\ Room number selection - for initial room assignments -\ -\ This is a variant of the -\ Fisher-Yates shuffle (a.k.a. the Knuth shuffle), -\ starting from the beginning of the rooms list, -\ and selecting only as many rooms as needed. -\ - -\ Fill room numbers with the sequence 1..20 -: reset-room-numbers ( -- ) - COUNT-ROOMS 0 DO I CHARS ROOM-NUMBERS + I 1+ SWAP C! LOOP - ; - -\ Display the room numbers -: show-room-numbers ( -- ) - COUNT-ROOMS 0 DO I CHARS ROOM-NUMBERS + C@ . LOOP - ; - -\ Choose a room in i..19 (yes, it could be i) -: choose-room-in-tail ( i -- r ) - DUP COUNT-ROOMS 1- SWAP - \ max-index-within-tail - 1+ random + \ r - ; - -\ Swap ith (i in 0..19) room with a room in i..19 -: swap-random-in-tail ( i -- ) - DUP ROOM-NUMBERS CHARS + C@ SWAP \ -- Ni i - DUP choose-room-in-tail TUCK \ -- Ni r i r - ROOM-NUMBERS CHARS + C@ SWAP \ -- Ni r Nr i - ROOM-NUMBERS CHARS + C! \ -- Ni r - ROOM-NUMBERS CHARS + C! - ; - -\ Select n <= 20 rooms at random -: select-random-rooms ( n -- random-rooms ) - DUP COUNT-ROOMS > IF - CR . ABORT" Can't select more than 20 rooms " - THEN - reset-room-numbers - 0 DO - I swap-random-in-tail - \ CR I . ." : " show-room-numbers - LOOP - ; - -\ Create and save a new room configuration -: create-new-room-assignments ( -- ) - 6 select-random-rooms - ROOM-NUMBERS INITIAL-ROOMS 6 CMOVE - ; - -\ -\ Player dialogue -\ - -\ Show the game state -: show-game-state ( -- ) - CR ." HUNTER: " HUNTER C@ . - CR ." WUMPUS: " WUMPUS C@ . - CR ." PITS: " PITS C@ . PITS CHAR+ C@ . - CR ." BATS: " BATS C@ . BATS CHAR+ C@ . - CR ." ARROWS: " ARROWS C@ . - CR ." PLAYER: " PLAYER C@ - CASE - LOST OF ." LOST " ENDOF - IN-PLAY OF ." IN-PLAY " ENDOF - WON OF ." WON " ENDOF - DUP CR . ." unexpected PLAYER state " - ENDCASE - ; - -\ List the neighboring rooms -: list-neighbors ( room-number -- ) - cave-room-neighbors - . . . - ; - -\ Show a list of all the cave's rooms -: show-cave-rooms ( -- ) - COUNT-ROOMS 0 DO - I 1+ DUP CR . ." : " list-neighbors - LOOP - ; - -\ Accept an answer from the player -: input-answer ( max-length -- length ; chars in PROMPT-ANSWER ) - MAX-ANSWER-LENGTH MIN \ Limit input to buffer length - BEGIN - CR ." > " - DUP PROMPT-ANSWER SWAP ACCEPT - DUP 0 > DUP INVERT IF - CR ." Huh? " - SWAP DROP \ Forget zero length - THEN - UNTIL \ Try again if no characters entered - SWAP DROP \ Forget max input length - ; - -\ Input one lowercase ASCII character from the player -: input-ascii-lowercase ( -- answer ) - 1 input-answer DROP \ Forget length - \ Convert ASCII alpha to lowercase; others don't care - PROMPT-ANSWER C@ 32 OR PROMPT-ANSWER C! - PROMPT-ANSWER C@ - ; - -\ Accept a numeric answer from the player -: input-number ( -- number ) - BEGIN - 2 input-answer PROMPT-ANSWER SWAP \ -- answer-address length - \ try to convert the answer into a number - 0 0 2SWAP >NUMBER \ -- n 0 remnant-address remnant-length - 0= DUP INVERT IF \ -- n 0 remnant-address flag - CR ." That is not a number. " - 2SWAP 2DROP \ Forget invalid answer - SWAP DROP \ Forget remnant-address, leaving FALSE - ELSE \ Entire answer was converted to a number - SWAP DROP \ Forget remnant-address - SWAP DROP \ Forget high-order zero of number in 0..99 - THEN - UNTIL \ Try again if answer was invalid - ; - -\ Ask a yes-no question, don't accept anything else -: prompt-yes-no ( question -- YES | NO ) - PROMPT-STRING 2! - BEGIN - CR PROMPT-STRING 2@ TYPE ." (y|n)? " - input-ascii-lowercase - DUP YES = OVER NO = OR - DUP INVERT IF - CR ." Huh? " - SWAP DROP \ Forget invalid answer - THEN - UNTIL \ Try again if answer was invalid - ; - -\ Show the stored crooked arrow path -: show-arrow-path ( -- ) - CR ." ARROW PATH - " - ARROW-PATH-LENGTH C@ DUP . ." : " 0 DO - ARROW-PATH-ROOMS I CHARS + C@ . - LOOP - ; - -\ Prompt for path length when shooting a crooked arrow -: prompt-arrow-path-length ( -- 1..5 ) - BEGIN - CR ." How many rooms should the arrow traverse (1..5)? " - input-number - DUP 1 < OVER 5 > OR - DUP IF - CR ." Huh? " - SWAP DROP \ Forget invalid answer - THEN - INVERT - UNTIL \ Try again if room count was invalid - ; - -\ Get room number arrow can't go back to -: arrow-path-backtrack-room ( index -- invalid-room ) - \ The arrow is not so crooked that it - \ can go out the tunnel it came in through. - DUP 1 > IF - \ Path has more than one room already; - \ the arrow can't go back to the room - \ before the last one entered. - 2 - CHARS ARROW-PATH-ROOMS + C@ - ELSE - 1 = IF - \ Path has exactly one room so far; the arrow - \ can't go back to the room the Hunter is in. - HUNTER C@ - ELSE - \ This is to be the first room in the path; - \ the arrow can be sent anywhere, - \ including the room the Hunter is in. - 0 \ Zero won't match any room. - THEN - THEN - ; - -\ Prompt for the next room in the arrow's path -: prompt-arrow-path-room ( index -- room ) - BEGIN - CR ." Enter room " DUP 1+ . - input-number \ -- index room - OVER arrow-path-backtrack-room \ -- index room invalid-room - OVER = DUP IF \ -- index room flag - CR ." Huh, arrows aren't that crooked! " - SWAP DROP \ Forget chosen room - ELSE - ROT DROP \ Forget the index - THEN \ -- index TRUE | room FALSE - INVERT - UNTIL \ Try again if room was invalid - ; - -\ Prompt for the arrow's path when shooting a crooked arrow -: prompt-arrow-path ( -- ; sets arrow path length and rooms ) - prompt-arrow-path-length - DUP ARROW-PATH-LENGTH C! 0 DO - I prompt-arrow-path-room - ARROW-PATH-ROOMS I CHARS + C! - LOOP - ; - -\ Prompt for a command -: prompt-command ( -- MOVE-ME | SHOOT | WHERE-AM-I? ) - BEGIN - CR ." What do you want to do " - ." (m=move, s=shoot, w=where am I?)? " - input-ascii-lowercase - DUP MOVE-ME = OVER SHOOT = OR - OVER WHERE-AM-I? = OR - \ - undocumented - - OVER GAME-STATE = OR - OVER CAVE-ROOMS = OR - DUP INVERT IF - CR ." Huh? " - SWAP DROP \ Forget invalid answer - THEN - UNTIL \ Try again if command was invalid - ; - -\ Prompt to play again, with same or new room assignments -: prompt-play-again ( -- QUIT-GAME | SAME-ROOMS | NEW-ROOMS ) - s" Play again " prompt-yes-no - YES = IF - CR ." OK, play again ... " - s" Same rooms " prompt-yes-no - YES = IF - CR ." OK, you, the Wumpus, pits, and bats in the same rooms. " - SAME-ROOMS - ELSE - CR ." OK, you, the Wumpus, pits, and bats in new rooms (probably). " - NEW-ROOMS - THEN - ELSE - CR ." Bye " - QUIT-GAME - THEN - ; - -\ Display congratulations or condolences -: show-result ( WON | LOST -- ) - DUP WON = IF - CR ." Congratulations! You got the Wumpus! But next time, hee, hee, hee!" - DROP - ELSE - DUP LOST = IF - CR ." Condolences, maybe better luck next time." - DROP - ELSE - CR . ." unknown game result." - THEN - THEN - ; - -\ Get a new room for the player -: prompt-new-hunter-room ( -- room ) - BEGIN - CR ." Where do you want to go? " - input-number - DUP ?cave-room-has-hunter IF - CR ." You are already in room " . ." ... " - DROP \ Forget room Hunter already in - FALSE \ answer not valid, try again - ELSE - DUP HUNTER C@ ?cave-room-reachable - DUP INVERT IF - CR ." Can't get there from here. " - SWAP DROP \ Forget unreachable room - THEN - THEN - UNTIL \ Try again if room was invalid - ; - -\ Display instructions -: show-instructions ( -- ) - CR ." ---- INSTRUCTIONS ---- " - CR - CR ." Welcome to Hunt the Wumpus! You are a hunter, looking to bag a Wumpus. " - CR - CR ." The Wumpus lives in a cave of twenty rooms, each connected by " - CR ." tunnels to three other rooms, as in a dodecahedron. " - CR - CR ." There are HAZARDS!! " - CR - CR ." The Wumpus - One room has the Wumpus in it. If the Wumpus " - CR ." finds you in the room with it, it will eat you and you lose. " - CR - CR ." Bottomless Pits - Two rooms have bottomless pits in them. " - CR ." If you go there, you fall into the pit and lose. " - CR - CR ." Super Bats - Two other rooms have super bats in them. " - CR ." If you go there, a bat grabs you and takes you to another " - CR ." room, at random. This might be troublesome. " - CR - CR ." As you are hunting, you will be able to sense something of " - CR ." the hazards, when you are in a room adjacent to one. " - CR - CR ." - You can smell the Wumpus, when it is nearby. " - CR ." - You can feel a breeze, when there is a pit nearby " - CR ." - You can hear a rustling sound, when there are bats nearby. " - CR - CR ." The Wumpus is not bothered by the hazards. It has sucker " - CR ." feet, so can cling to the walls of a pit, and is too heavy " - CR ." for the super bats to lift. Usually, it is asleep. " - CR - CR ." Two things wake up the Wumpus: you entering its room, or " - CR ." you shooting an arrow (anywhere in the cave!). When it " - CR ." wakes, it moves into an adjacent room (P=3/4) or stays " - CR ." where it is (P=1/4). After that, if it is where you are " - CR ." it eats you and you lose. " - CR - CR ." The computer starts you in a randomly chosen room. " - CR ." Each turn you can move to an adjacent room or shoot an arrow. " - CR - CR ." You are furnished with 5 crooked arrows, which you can program " - CR ." to go into 1 to 5 rooms. Starting from the room you are in, " - CR ." the arrow will go from room to room provided there is a tunnel " - CR ." from where it is to the next room on its list. If there is no " - CR ." tunnel, the arrow bounces on the walls of the cave and moves into " - CR ." an adjacent room at random, possibly the one you are in. " - CR - CR ." - If the arrow hits the Wumpus, you win. " - CR ." - If the arrow hits you, you lose. " - CR ." - If you run out of arrows, you lose. " - CR - CR ." When the game is over, you can start a new game. " - CR ." You can choose to start over with the same configuration " - CR ." as the game you just finished, that is: with you, the Wumpus, " - CR ." the pits, and the bats where they started in the game you " - CR ." just finished; or you can start fresh, with everything in " - CR ." new places (well, probably). In any case, you get a fresh " - CR ." supply of five arrows. " - CR - CR ." Good luck! " - ; - -\ Display instructions if wanted -: show-instructions-if-wanted ( -- ) - s" Show instructions " prompt-yes-no - YES = IF - show-instructions - THEN - ; - -\ Display a greeting -: show-greeting ( -- ) - CR ." ---- ---- Hunt the Wumpus ---- ---- " - CR ." - " wumpus-version - CR ." ---- ---- --------------- ---- ---- " - ; - -\ -\ Game play -\ - -\ List any hazards in a room -: hazards-in-room ( room-number -- ) - DUP ?cave-room-has-wumpus IF - CR ." I smell a Wumpus!" - THEN - DUP ?cave-room-has-pit IF - CR ." I feel a draft!" - THEN - DUP ?cave-room-has-bats IF - CR ." I hear a rustling sound!" - THEN - DROP \ Forget room number - ; - -\ Warn of any hazards in the neighboring rooms -: warn-of-hazards ( room-number -- ) - cave-room-neighbors - hazards-in-room - hazards-in-room - hazards-in-room - ; - -\ Describe the Hunter's location -: describe-hunter-location ( -- ) - HUNTER C@ - CR ." You are in room " DUP . - CR ." Tunnels lead to rooms " DUP list-neighbors - warn-of-hazards - ; - -\ The Wumpus eats the Hunter if in the same room -: wumpus-ate-hunter? ( -- ; may set player state to LOST ) - HUNTER C@ ?cave-room-has-wumpus IF - CR ." Aaaaggghhh! The Wumpus got you! You lose! " - LOST PLAYER C! - ELSE - CR ." Phew! The Wumpus didn't get you. " - THEN - ; - -\ Move the Wumpus - did it get the Hunter? -: move-wumpus ( -- ; may set player state to LOST ) - CR ." Uh oh! You disturbed the Wumpus! " - 4 random DUP 3 < IF - WUMPUS C@ cave-room-neighbor WUMPUS C! - ELSE - DROP \ Forget index indicating Wumpus didn't move - THEN - wumpus-ate-hunter? \ may set player state to LOST - ; - -\ Did the crooked arrow hit the Wumpus? -: arrow-hit-wumpus? ( room -- flag ; may set player state to WON ) - ?cave-room-has-wumpus DUP IF - CR ." Aha! You got the Wumpus! " - WON PLAYER C! - THEN - ; - -\ Did the crooked arrow hit the Hunter? -: arrow-hit-hunter? ( room -- flag ; may set player state to LOST ) - ?cave-room-has-hunter DUP IF - CR ." Ouch! Arrow got you! You lose!" - LOST PLAYER C! - THEN - ; - -\ Did the Hunter run out of crooked arrows? -: arrows-all-gone? ( -- ; may set player state to LOST ) - ARROWS C@ 1- DUP ARROWS C! 0 = IF - CR ." You're out of arrows, you lose! " - LOST PLAYER C! - THEN - ; - -\ Fly a crooked arrow -: fly-arrow ( -- ; may set player state to WON or LOST ) - HUNTER C@ \ arrow starts where player is - DUP CR . - ARROW-PATH-LENGTH C@ 0 DO - ." --> " - ARROW-PATH-ROOMS I CHARS + C@ \ Rf -- Rf Rt - 2DUP SWAP ?cave-room-reachable IF - SWAP DROP \ Rf Rt -- Rt ; Arrow now in next room in path - ELSE - DROP \ Rf Rt -- Rf ; Forget the unreachable room - CR ." Uh oh! You hit the cave wall, arrow gone astray! " - \ Arrow enters one of the adjoining rooms - cave-room-address 3 random CHARS + C@ \ Rf -- Rt - THEN - DUP . - \ OK, what happens when the arrow reaches this room? - DUP arrow-hit-hunter? OVER arrow-hit-wumpus? OR IF - LEAVE \ That's the end of the arrow's flight - THEN - LOOP - DROP \ Forget the last room the arrow went into - ; - -\ Shoot a crooked arrow -: shoot-arrow ( -- ) - prompt-arrow-path - show-arrow-path - fly-arrow \ may set player state to WON or LOST - PLAYER C@ IN-PLAY = IF - \ The arrow didn't hit anything - CR ." You missed! " - \ Shooting an arrow always disturbs the Wumpus - move-wumpus \ may set player state to LOST - arrows-all-gone? \ may set player state to LOST - THEN - ; - -\ Hunter went into a room with super bats? -: entered-room-with-bats? ( -- flag ) - HUNTER C@ ?cave-room-has-bats DUP IF - CR ." Oh oh oh! A bat's got you! Oh ohhh ... " - COUNT-ROOMS random 1+ DUP HUNTER C! - CR ." You are now in room " . - THEN - \ Return TRUE if a super bat moved the Hunter - ; - -\ Hunter went into a room with a bottomless pit? -: entered-room-with-pit? ( -- ; may set player state to LOST ) - HUNTER C@ ?cave-room-has-pit IF - CR ." Aaaaggghhh! You fell in a pit! You lose! " - LOST PLAYER C! - THEN - ; - -\ Hunter went into a room with the Wumpus? -: entered-room-with-wumpus? ( -- ; may set player state to LOST ) - HUNTER C@ ?cave-room-has-wumpus IF - move-wumpus \ may set player state to LOST - THEN - ; - -\ Move the Hunter to a new room -: move-hunter ( -- ; may set player state to LOST ) - prompt-new-hunter-room HUNTER C! - BEGIN - FALSE BATS-MOVED-HUNTER ! - entered-room-with-wumpus? \ may set player state to LOST - PLAYER C@ IN-PLAY = IF - entered-room-with-pit? \ may set player state to LOST - PLAYER C@ IN-PLAY = IF - entered-room-with-bats? BATS-MOVED-HUNTER ! - THEN - THEN - BATS-MOVED-HUNTER @ INVERT - UNTIL \ repeat if the bats moved the Hunter - PLAYER C@ IN-PLAY = IF - \ Nothing too bad happened, let's take a moment - \ to take in our surroundings - describe-hunter-location - THEN - ; - -\ Play the game until won or lost -: play ( -- WON | LOST ) - BEGIN PLAYER C@ IN-PLAY = WHILE - prompt-command \ -- MOVE-ME | SHOOT | WHERE-AM-I? - CASE - MOVE-ME OF move-hunter ENDOF - SHOOT OF shoot-arrow ENDOF - WHERE-AM-I? OF describe-hunter-location ENDOF - \ - undocumented - - GAME-STATE OF show-game-state ENDOF - CAVE-ROOMS OF show-cave-rooms ENDOF - CR . ." unexpected command." - ENDCASE - REPEAT - PLAYER C@ - ; - -\ Set the room configuration to the saved one -: set-rooms-to-initial-assignments ( -- ) - INITIAL-ROOMS C@ HUNTER C! - INITIAL-ROOMS CHAR+ C@ WUMPUS C! - INITIAL-ROOMS 2 CHARS + C@ PITS C! - INITIAL-ROOMS 3 CHARS + C@ PITS CHAR+ C! - INITIAL-ROOMS 4 CHARS + C@ BATS C! - INITIAL-ROOMS 5 CHARS + C@ BATS CHAR+ C! - ; - -\ Reset the state for a new game -: new-game ( SAME-ROOMS | NEW-ROOMS -- ) - NEW-ROOMS = IF - create-new-room-assignments - THEN - set-rooms-to-initial-assignments - 5 ARROWS C! - IN-PLAY PLAYER C! - ; - -\ Greet the player, play, then prompt for a new game -: Hunt-the-Wumpus ( -- ) - show-greeting - show-instructions-if-wanted - NEW-ROOMS - BEGIN - new-game \ SAME-ROOMS | NEW-ROOMS -- - describe-hunter-location \ -- - play \ -- WON | LOST - show-result \ WON | LOST -- - prompt-play-again \ -- QUIT-GAME | SAME-ROOMS | NEW-ROOMS - DUP QUIT-GAME = - UNTIL - DROP \ Forget the QUIT-GAME indicator - ; diff --git a/Task/Hunt-the-Wumpus/FutureBasic/hunt-the-wumpus.basic b/Task/Hunt-the-Wumpus/FutureBasic/hunt-the-wumpus.basic deleted file mode 100644 index 714df4ab49..0000000000 --- a/Task/Hunt-the-Wumpus/FutureBasic/hunt-the-wumpus.basic +++ /dev/null @@ -1,229 +0,0 @@ -// Hunt the Wumpus -// https://rosettacode.org/wiki/Hunt_the_Wumpus# - - -_w = 640 // window size width and height -_h = 400 -_window = 1 - -local fn BuildWindow - - CGRect r = fn cgrectmake(0,0,_w,_h) - window _Window, @"Hunt the Wumpus", r, NSWindowStyleMaskTitled + NSWindowStyleMaskMiniaturizable - windowcenter(_Window) - WindowSetBackgroundColor(_Window,fn ColorBlack) - WindowPrintViewSetTextInset( _window, 20) - - text ,14,fn colorWhite - -end fn - - -fn BuildWindow - - -//////////// Main Program ////////////// - -"Start" - -cls:restore - -data 7,13,19,12,18,20,16,17,19,11,14,18,13,15,18,9,14,16,1,15,17,10,16,20,6,11,19,8,12,17 -data 4,9,13,2,10,15,1,5,11,4,6,20,5,7,12,3,6,8,3,7,10,2,4,5,1,3,9,2,8,14 -data 1,2,3,1,3,2,2,1,3,2,3,1,3,1,2,3,2,1 - -uint32 i, j,tunnel(21,4),lost(7,4),targ,wump,player,bat1, bat2, pit1, pit2, d6, epi -player = int(rnd(20)) -uint32 arrows = 5 -CFStringRef choice - -for i = 1 to 20 //set up rooms - for j = 1 to 3 - read tunnel(i,j) - next j -next i - -for i = 1 to 6 //set up list of permuatations of 1-2-3 - for j = 1 to 3 - read lost(i,j) - next j -next i - - -//place wumpus, bats, and pits -do - wump = int(rnd(20)) -until wump <> player -do - pit1 = int(rnd(20)) -until pit1 <> player -do - pit2 = int(rnd(20)) -until pit2 <> player && pit2 <> pit1 -do - bat1 = int(rnd(20)) -until bat1 <> player && bat1 <> pit1 && bat1 <> pit2 -do - bat2 = int(rnd(20)) -until bat2 <> player && bat2 <> pit1 && bat2 <> pit2 && bat2 <> bat1 - -do - if player = wump - text ,,fn colorRed - print "You have been eaten by the Wumpus!" - Print: WindowPrintViewScrollToBottom( _window ) - goto "defeat" - end if - if player = pit1 || player = pit2 - text ,,fn colorRed - print "Aaaaaaaaaaa! You have fallen into a bottomless pit." - Print: WindowPrintViewScrollToBottom( _window ) - goto "defeat" - end if - if player = bat1 || player = bat2 - text ,,fn colorOrange - print "A bat has carried you into another empty room." - text ,,fn colorWhite - Print: WindowPrintViewScrollToBottom( _window ) - do - player = (rnd(20)) - until player <> wump && player <> pit1 && player <> pit2 && player <> bat1 && player <> bat2 - end if - - print - text ,,fn colorGreen - print "You are in room number" + str$(player) + ". There are tunnels to rooms"¬ - + str$(tunnel(player,1)) + "," str$(tunnel(player,2)) + " and" +str$(tunnel(player,3)) - if (tunnel(player,1)) + (tunnel(player,2)) + (tunnel(player,3)) = 0 then arrows = 5 : goto "Start" - text ,,fn colorYellow - print "You have" + str$(arrows) + " arrows left." - text ,,fn colorWhite - Print: WindowPrintViewScrollToBottom( _window ) - - d6 = int(rnd(6)) - for i = 1 to 3 - epi = tunnel(player,lost(d6,i)) - if epi = wump - text ,,fn colorRed - print "You smell something terrible nearby." - text ,,fn colorWhite - Print: WindowPrintViewScrollToBottom( _window ) - end if - if epi = bat1 || epi = bat2 - text ,,fn colorRed - print "You hear a rustling." - text ,,fn colorWhite - Print: WindowPrintViewScrollToBottom( _window ) - end if - if epi = pit1 || epi = pit2 - print "You feel a cold wind blowing from a nearby cavern." - Print: WindowPrintViewScrollToBottom( _window ) - end if - next i - "choices" - print - print "What would you like to do?" - Print: WindowPrintViewScrollToBottom( _window ) - - choice = input %(_w/2 - 260 , _h + 20),@"Type A to shoot an arrow, or a number to move to another room. ( or Q to quit )" - - select case left(choice,1) - - case @"q", @"Q" , @"x" , @"X" - end - - case @"a", @"A" - - CFStringRef targString - targString = input %(_w/2 - 140 , _h + 20), @"Which room would you like to shoot into? " - targ = fn StringIntegerValue(targString) - - print "You shot an arrow into room " + str$(targ) - - if targ = player - text ,,fn colorRed - print "You shot yourself. Why would you want to do such a thing?" - Print: WindowPrintViewScrollToBottom( _window ) - goto "defeat" - end if - - text ,,fn colorGreen - if targ = wump then goto "victory" - - if targ = tunnel(player,1) || targ = tunnel(player,2) || targ = tunnel(player,3) - text ,,fn colorYellow - print "The Wumpus awakes!" - text ,,fn colorWhite - Print: WindowPrintViewScrollToBottom( _window ) - if rnd(100) <= 75 - print "He moves to a nearby cavern." - Print: WindowPrintViewScrollToBottom( _window ) - short wumpRnd - wumpRnd = Int(Rnd(3)) - wump = Tunnel(wump,wumpRnd) - else - print "He goes back to sleep." - Print: WindowPrintViewScrollToBottom( _window ) - end if - else - text ,,fn colorRed - print "You can't shoot that room from here." - text ,,fn colorWhite - Print: WindowPrintViewScrollToBottom( _window ) - goto "choices" - end if - arrows -= 1 - - case @"0", @"1" ,@"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9" - - targ = fn StringIntegerValue(choice) - if targ = player then print "You are already there." - - if targ = tunnel(player,1) || targ = tunnel(player,2) || targ = tunnel(player,3) - print using "You walk to room ##"; targ - player = targ - else - text ,,fn colorOrange - print "You can't get there from here." - text ,,fn colorWhite - Print: WindowPrintViewScrollToBottom( _window ) - end if - case else - text ,,fn colorRed - print "You are making no sense." - text ,,fn colorWhite - Print: WindowPrintViewScrollToBottom( _window ) - end select -until arrows = 0 -text ,,fn colorRed -print "You have run out of arrows!" -Print: WindowPrintViewScrollToBottom( _window ) -"defeat" -text ,,fn colorRed -print "You lose! Better luck next time." -Print: WindowPrintViewScrollToBottom( _window ) - -goto "End" - -"victory" -text ,20,fn colorGreen -print "You have slain the Wumpus!" -print "You won!" -Print: WindowPrintViewScrollToBottom( _window ) - -"End" - -text ,14,fn colorWhite -choice = input %(_w/2 -140 , _h + 20),@"Hit Return for another. ( or Q to quit )" - -select case left(choice,1) - - case @"q", @"Q" , @"x" , @"X" - end - - case else arrows = 5: goto "Start" - -end select - - -handleevents diff --git a/Task/Hunt-the-Wumpus/Julia/hunt-the-wumpus.jl b/Task/Hunt-the-Wumpus/Julia/hunt-the-wumpus.julia similarity index 100% rename from Task/Hunt-the-Wumpus/Julia/hunt-the-wumpus.jl rename to Task/Hunt-the-Wumpus/Julia/hunt-the-wumpus.julia diff --git a/Task/Hunt-the-Wumpus/Liberty-BASIC/hunt-the-wumpus.basic b/Task/Hunt-the-Wumpus/Liberty-BASIC/hunt-the-wumpus.basic deleted file mode 100644 index cd667ebfab..0000000000 --- a/Task/Hunt-the-Wumpus/Liberty-BASIC/hunt-the-wumpus.basic +++ /dev/null @@ -1,272 +0,0 @@ -' ============================================ -' HUNT THE WUMPUS - Liberty BASIC (Text Version) -' Text-only game played in Mainwin -' ============================================ - -' --- Global Variables --- -dim rooms(20, 3) ' Adjacency map -dim hazard(20) ' 0=nothing, 1=Wumpus, 2=Bat, 3=Pit - -global playerRoom, arrowsLeft, gameOver, wRoom - -playerRoom = 0 -arrowsLeft = 5 -gameOver = 0 - -call setupMap -call placeHazards - -print "WELCOME TO HUNT THE WUMPUS!" -print "===========================" -print "You can enter commands like M10 to move to room 10" -print " or S18 to shoot into room 18. Of couse commands" -print " like M, S and Q are permitted as well. Good luck" -print "" -call mainLoop -end - -' ---------------------------- -sub setupMap - ' Each room has 3 connections - ' Standard dodecahedron layout - - data 2,5,8 - data 1,3,10 - data 2,4,12 - data 3,5,14 - data 1,4,6 - data 5,7,15 - data 6,8,17 - data 1,7,9 - data 8,10,18 - data 2,9,11 - data 10,12,19 - data 3,11,13 - data 12,14,20 - data 4,13,15 - data 6,14,16 - data 15,17,20 - data 7,16,18 - data 9,17,19 - data 11,18,20 - data 13,16,19 - - for i = 1 to 20 - for j = 1 to 3 - read a - rooms(i,j) = a - next - next -end sub - -' ---------------------------- -sub placeHazards - for i = 1 to 20 - hazard(i) = 0 - next - - wRoom = getEmptyRoom(0) - hazard(wRoom) = 1 - - for i = 1 to 2 - bRoom = getEmptyRoom(0) - hazard(bRoom) = 2 - next - - for i = 1 to 2 - pRoom = getEmptyRoom(0) - hazard(pRoom) = 3 - next - - playerRoom = getEmptyRoom(0) -end sub - -' ---------------------------- -function getEmptyRoom(avoid) - do - room = int(rnd(0)*20) + 1 - loop until hazard(room)=0 and room <> avoid - getEmptyRoom = room -end function - -' ---------------------------- -sub mainLoop - while gameOver = 0 - call describeHazards - print "You are in room "; playerRoom - print "Tunnels lead to "; rooms(playerRoom,1); ", "; rooms(playerRoom,2); ", "; rooms(playerRoom,3) - print "Arrows left: "; arrowsLeft - - input "Shoot, Move or Quit (S/M/Q)? "; a$ - a$ = upper$(trim$(a$)) - - if len(a$) > 1 then - 'assume characters 2 and 3 are part of a number - num = val(mid$(a$,2)) - if num > 20 then num = 0 - a$ = left$(a$,1) - end if - - select case a$ - case "S" - call shoot num - case "M" - call move num - case "Q" - Print "You have decided to quit." - gameOver = 1 - case else - print "Invalid choice." - end select - wend - - input "Press Enter to quit the game"; dummy$ -end sub - -' ---------------------------- -sub describeHazards - for i = 1 to 3 - adj = rooms(playerRoom,i) - select case hazard(adj) - case 1 - print "You smell something terrible nearby." - case 2 - print "You hear a rustling." - case 3 - print "You feel a cold wind blowing from a nearby cavern." - end select - next -end sub - -' ---------------------------- -sub move num - - if num = 0 then - input "Which room do you want to enter? "; n - if n < 1 or n > 20 then - print "That's not a valid room!" - exit sub - end if - else - n = num - end if - - adjacent = 0 - for i = 1 to 3 - if rooms(playerRoom,i) = n then adjacent = 1 - next - - if adjacent = 0 then - print "You can't go there directly!" - exit sub - end if - - playerRoom = n - select case hazard(playerRoom) - case 1 - print "You walked into the Wumpus room!" - print "The Wumpus eats you. GAME OVER!" - gameOver = 1 - case 2 - print "A giant bat grabs you!" - playerRoom = getEmptyRoom(0) - print "The bat drops you into room "; playerRoom - call checkNewRoom - case 3 - print "You fall into a bottomless pit!" - print "GAME OVER!" - gameOver = 1 - case else - ' safe - end select -end sub - -' ---------------------------- -sub checkNewRoom - select case hazard(playerRoom) - case 1 - print "The bat dropped you into the Wumpus room!" - print "The Wumpus eats you. GAME OVER!" - gameOver = 1 - case 3 - print "The bat dropped you into a pit!" - print "GAME OVER!" - gameOver = 1 - case 2 - print "Another bat grabs you!" - playerRoom = getEmptyRoom(0) - print "The bat drops you into room "; playerRoom - call checkNewRoom - case else - ' safe - end select -end sub - -' ---------------------------- -sub shoot num - - if num = 0 then - input "Shoot into which room? "; t - if t < 1 or t > 20 then - print "That's not a valid room!" - exit sub - end if - else - t = num - end if - - adjacent = 0 - for i = 1 to 3 - if rooms(playerRoom,i) = t then adjacent = 1 - next - - if adjacent = 0 then - print "You can't shoot there directly!" - exit sub - end if - - arrowsLeft = arrowsLeft - 1 - - if hazard(t) = 1 then - print "Your arrow flies true... and you hear a terrible scream!" - print "You have slain the Wumpus! YOU WIN!" - gameOver = 1 - exit sub - else - print "You missed." - wWake = int(rnd(0)*100) + 1 - if wWake <= 75 then - call moveWumpus - end if - if playerRoom = wRoom then - print "The Wumpus has moved into your room!" - print "It eats you. GAME OVER!" - gameOver = 1 - end if - end if - - 'check to see if you are out of arrows - if arrowsLeft <= 0 then - print "You're out of arrows!" - print "GAME OVER - You have lost." - gameOver = 1 - exit sub - end if - -end sub - -' ---------------------------- -sub moveWumpus - oldRoom = wRoom - found = 0 - for tries = 1 to 10 - adj = rooms(oldRoom, int(rnd(0)*3)+1) - if hazard(adj) = 0 and adj <> playerRoom then - hazard(oldRoom) = 0 - hazard(adj) = 1 - wRoom = adj - found = 1 - exit for - end if - next -end sub diff --git a/Task/Hunt-the-Wumpus/Mojo/hunt-the-wumpus.mojo b/Task/Hunt-the-Wumpus/Mojo/hunt-the-wumpus.mojo deleted file mode 100644 index 2c67a185ae..0000000000 --- a/Task/Hunt-the-Wumpus/Mojo/hunt-the-wumpus.mojo +++ /dev/null @@ -1,203 +0,0 @@ -from random import shuffle, seed, random_ui64 - -alias adjacent_rooms: List[List[Int]] = [ - [], - [2, 5, 8], [1, 3, 10], [2, 4, 12], [3, 5, 14], [1, 4, 6], - [5, 7, 15], [6, 8, 17], [1, 7, 9], [8, 10, 18], [2, 9, 11], - [10, 12, 19],[2, 11, 13],[12, 14, 20], [4, 13, 15], [6, 14, 16], - [15, 17, 20],[7, 16, 18], [9, 17, 19], [11, 18, 20], [13, 16, 19] -] - -struct Game_State: - var winloss_state: Int - var player_location: Int - var wumpus_location: Int - var pit_locations: Tuple[Int, Int] - var bat_locations: Tuple[Int, Int] - var arrows_remaining: Int - - fn __init__(out self): - var all_locations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] - shuffle(all_locations) - - self.winloss_state = 0 - self.player_location = all_locations[0] - self.wumpus_location = all_locations[1] - self.pit_locations = (all_locations[2], all_locations[3]) - self.bat_locations = (all_locations[4], all_locations[5]) - self.arrows_remaining = 5 - - fn __copyinit__(out self, other: Self): - self.winloss_state = other.winloss_state - self.player_location = other.player_location - self.wumpus_location = other.wumpus_location - self.pit_locations = other.pit_locations - self.bat_locations = other.bat_locations - self.arrows_remaining = other.arrows_remaining - -fn print_instructions() -> None: - print("WELCOME TO 'HUNT THE WUMPUS'") - print(" THE WUMPUS LIVES IN A CAVE OF 20 ROOMS. EACH ROOM") - print("HAS 3 TUNNELS LEADING TO OTHER ROOMS. (LOOK AT A") - print("DODECAHEDRON TO SEE HOW THIS WORKS-IF YOU DON'T KNOW") - print("WHAT A DODECAHEDRON IS, ASK SOMEONE)\n") - print(" HAZARDS:") - print(" BOTTOMLESS PITS - TWO ROOMS HAVE BOTTOMLESS PITS IN THEM") - print(" IF YOU GO THERE, YOU FALL INTO THE PIT (& LOSE!)") - print(" SUPER BATS - TWO OTHER ROOMS HAVE SUPER BATS. IF YOU") - print(" GO THERE, A BAT GRABS YOU AND TAKES YOU TO SOME OTHER") - print(" ROOM AT RANDOM. (WHICH MIGHT BE TROUBLESOME)\n") - print(" WUMPUS:") - print(" THE WUMPUS IS NOT BOTHERED BY THE HAZARDS (HE HAS SUCKER") - print(" FEET AND IS TOO BIG FOR A BAT TO LIFT). USUALLY") - print(" HE IS ASLEEP. TWO THINGS WAKE HIM UP: YOUR ENTERING") - print(" HIS ROOM OR YOUR SHOOTING AN ARROW.") - print(" IF THE WUMPUS WAKES, HE MOVES (P=.75) ONE ROOM") - print(" OR STAYS STILL (P=.25). AFTER THAT, IF HE IS WHERE YOU") - print(" ARE, HE EATS YOU UP (& YOU LOSE!)\n") - print(" YOU:") - print(" EACH TURN YOU MAY MOVE OR SHOOT A CROOKED ARROW") - print(" MOVING: YOU CAN GO ONE ROOM (THRU ONE TUNNEL)") - print(" ARROWS: YOU HAVE 5 ARROWS. YOU LOSE WHEN YOU RUN OUT.") - print(" EACH ARROW CAN GO FROM 1 TO 5 ROOMS. YOU AIM BY TELLING") - print(" THE COMPUTER THE ROOM#S YOU WANT THE ARROW TO GO TO.") - print(" IF THE ARROW CAN'T GO THAT WAY (IE NO TUNNEL) IT MOVES") - print(" AT RAMDOM TO THE NEXT ROOM.") - print(" IF THE ARROW HITS THE WUMPUS, YOU WIN.") - print(" IF THE ARROW HITS YOU, YOU LOSE.\n") - print(" WARNINGS:") - print(" WHEN YOU ARE ONE ROOM AWAY FROM WUMPUS OR HAZARD,") - print(" THE COMPUTER SAYS:") - print(" WUMPUS- 'I SMELL A WUMPUS'") - print(" BAT - 'BATS NEARBY'") - print(" PIT - 'I FEEL A DRAFT'\n") - return None - -fn print_location(game_state: Game_State) -> None: - if game_state.wumpus_location in adjacent_rooms[game_state.player_location]: - print("I SMELL A WUMPUS!") - if game_state.pit_locations[0] in adjacent_rooms[game_state.player_location] or game_state.pit_locations[1] in adjacent_rooms[game_state.player_location]: - print("I FEEL A DRAFT") - if game_state.bat_locations[0] in adjacent_rooms[game_state.player_location] or game_state.bat_locations[1] in adjacent_rooms[game_state.player_location]: - print("BATS NEARBY!") - print("YOU ARE IN ROOM", game_state.player_location) - print("TUNNELS LEAD TO", adjacent_rooms[game_state.player_location][0], adjacent_rooms[game_state.player_location][1], adjacent_rooms[game_state.player_location][2]) - return None - -fn move_wumpus(mut game_state: Game_State) -> Bool: - if random_ui64(0,3) != 3: - game_state.wumpus_location = adjacent_rooms[game_state.wumpus_location][random_ui64(0,2)] - if game_state.wumpus_location == game_state.player_location: - print("TSK TSK TSK- WUMPUS GOT YOU!") - game_state.winloss_state = -1 - return True - return False - -def shoot_action(mut game_state: Game_State) -> None: - while True: - distance = Int(input("NO. OF ROOMS(1-5)")) - if distance >= 1 and distance <= 5: - break - path: List[Int] = [] - for i in range(distance): - while True: - fork = Int(input("ROOM #")) - if i <= 1: - break - elif fork != path[-2]: - break - else: - print("ARROWS AREN'T THAT CROOKED - TRY ANOTHER ROOM") - pass - path.append(fork) - arrow_location = game_state.player_location - for i in range(distance): - if path[i] in adjacent_rooms[arrow_location]: - arrow_location = path[i] - else: - arrow_location = adjacent_rooms[arrow_location][random_ui64(0, 2)] - if arrow_location == game_state.wumpus_location: - print("AHA! YOU GOT THE WUMPUS!") - game_state.winloss_state = 1 - return - elif arrow_location == game_state.player_location: - print("OUCH! ARROW GOT YOU!") - game_state.winloss_state = -1 - return - print("MISSED") - if move_wumpus(game_state): - return - game_state.arrows_remaining -= 1 - if game_state.arrows_remaining == 0: - game_state.winloss_state = -1 - return - -def move_action(mut game_state: Game_State) -> None: - while True: - next_room = Int(input("WHERE TO")) - if next_room < 1 or next_room > 20: - pass - if next_room in adjacent_rooms[game_state.player_location]: - game_state.player_location = next_room - break - if next_room == game_state.player_location: - break - print("NOT POSSIBLE -") - if game_state.player_location == game_state.wumpus_location: - print("...OOPS! BUMPED A WUMPUS!") - if move_wumpus(game_state): - return - if game_state.player_location == game_state.pit_locations[0] or game_state.player_location == game_state.pit_locations[1]: - print("YYYIIIIEEEE . . . FELL IN PIT") - game_state.winloss_state = -1 - return - if game_state.player_location == game_state.bat_locations[0] or game_state.player_location == game_state.bat_locations[1]: - print("ZAP--SUPER BAT SNATCH! ELSEWHEREVILLE FOR YOU!") - move_action(game_state, Int(random_ui64(1, 20))) - return - -fn move_action(mut game_state: Game_State, room_number: Int) -> None: - game_state.player_location = room_number - if game_state.player_location == game_state.wumpus_location: - print("...OOPS! BUMPED A WUMPUS!") - if move_wumpus(game_state): - return - if game_state.player_location == game_state.pit_locations[0] or game_state.player_location == game_state.pit_locations[1]: - print("YYYIIIIEEEE . . . FELL IN PIT") - game_state.winloss_state = -1 - return - if game_state.player_location == game_state.bat_locations[0] or game_state.player_location == game_state.bat_locations[1]: - print("ZAP--SUPER BAT SNATCH! ELSEWHEREVILLE FOR YOU!") - move_action(game_state, Int(random_ui64(1, 20))) - return - -def main(): - seed() - instruct_cond = input("INSTRUCTIONS (Y-N)") - if instruct_cond != 'N': - print_instructions() - - game_state = Game_State() - saved_state = game_state - - game_is_running = True - while game_is_running: - print("HUNT THE WUMPUS\n") - print_location(game_state) - action = input("SHOOT OR MOVE (S-M)") - - if action == 'S': - shoot_action(game_state) - elif action == 'M': - move_action(game_state) - if game_state.winloss_state == -1: - print("HA HA HA - YOU LOSE!") - elif game_state.winloss_state == 1: - print("HEE HEE HEE - THE WUMPUS'LL GETCHA NEXT TIME!!") - if game_state.winloss_state != 0: - state_update = input("SAME SET-UP (Y-N)") - if state_update == 'Y': - game_state = saved_state - else: - game_state = Game_State() - saved_state = game_state diff --git a/Task/I-before-E-except-after-C/00-TASK.txt b/Task/I-before-E-except-after-C/00-TASK.txt index 74e62f2023..b342d03475 100644 --- a/Task/I-before-E-except-after-C/00-TASK.txt +++ b/Task/I-before-E-except-after-C/00-TASK.txt @@ -3,7 +3,7 @@ widely known mnemonic which is supposed to help when spelling English words. ;Task: -Using the word list from   [https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt], +Using the word list from   [http://wiki.puzzlers.org/pub/wordlists/unixdict.txt http://wiki.puzzlers.org/pub/wordlists/unixdict.txt],
    check if the two sub-clauses of the phrase are plausible individually: :::#   ''"I before E when not preceded by C"'' :::#   ''"E before I when preceded by C"'' diff --git a/Task/I-before-E-except-after-C/8080-Assembly/i-before-e-except-after-c.8080 b/Task/I-before-E-except-after-C/8080-Assembly/i-before-e-except-after-c.8080 index 75a59a9a6a..1b4b015117 100644 --- a/Task/I-before-E-except-after-C/8080-Assembly/i-before-e-except-after-c.8080 +++ b/Task/I-before-E-except-after-C/8080-Assembly/i-before-e-except-after-c.8080 @@ -1,207 +1,207 @@ - ;;; I before E, except after C -fcb1: equ 5Ch ; FCB 1 (populated by file on command line) -dma: equ 80h ; Standard DMA location -bdos: equ 5 ; CP/M entry point -puts: equ 9 ; CP/M call to write a string to the console -fopen: equ 0Fh ; CP/M call to open a file -fread: equ 14h ; CP/M call to read from a file -CR: equ 13 -LF: equ 10 -EOF: equ 26 - org 100h - ;;; Open the file given on the command line - lxi d,fcb1 - mvi c,fopen - call bdos - inr a ; FF = error - jz die - ;;; We can only read one 128-byte block at a time, and the file - ;;; will not fit in memory (max 64 k). So there are two things - ;;; going on here: we copy from the block into a word buffer - ;;; until we see the end of a line, at which point we process - ;;; the word. In the meantime, if while copying we reach the end - ;;; of the block, we read the next block. - lxi b,curwrd ; Word pointer -block: push b ; Keep word pointer while reading - lxi d,fcb1 ; Read a block from the file - mvi c,fread - call bdos - pop b ; Restore word pointer - dcr a ; 1 = EOF - jz done - inr a ; otherwise, <>0 = error - jnz die - lxi h,dma ; Start reading at DMA -char: mov a,m ; Get character - cpi EOF ; If it's an EOF character, we're done - jz done - stax b ; Store character in current word - inx b - cpi LF ; If it's LF, then we've got a full word - cz word ; Process the word - inr l ; Go to next character - jz block ; If we're done with this block, get next one - jmp char - ;;; When done, report the statistics -done: lxi d,scie ; CIE - call sout - lhld cie - call puthl - lxi d,sxie ; xIE - call sout - lhld xie - call puthl - lxi d,scei ; CEI - call sout - lhld cei - call puthl - lxi d,sxei ; xEI - call sout - lhld xei - call puthl - ;;; Then say what is and isn't plausible - lxi d,s_ienc ; I before E when not preceded by C - call sout ; plausible if 2*xIE>CIE - lhld cie - xchg - lhld xie - call pplaus - lxi d,s_eic ; E before I when preceded by C - call sout ; plausible if 2*CEI>xEI - lhld xei - xchg - lhld cei - ;;; If HL = amount of words with feature, and - ;;; DE = amount of words with opposit feature, then print - ;;; '(not) plausible', as appropriate. -pplaus: dad h ; 2 * feature - mov a,d ; Compare high byte - cmp h - jc plaus ; If 2*H>D then plausible - mov a,e ; Otherwise, compare low byte - cmp l - jc plaus ; If 2*L>E then plausible - lxi d,snop ; Otherwise, not plausible - jmp sout -plaus: lxi d,splau - jmp sout - ;;; Process a word -word: push h ; Save file read address - xra a ; Zero out end of word - stax b - dcx b - lxi h,curwrd ; Scan word -start: mov a,m ; Get current character - inx h ; Move pointer ahead - ana a ; If zero, - jz w_end ; we're done - cpi 'c' ; Did we find a 'c'? - jz findc - cpi 'e' ; Otherwise, did we find 'e'? - jz finde - cpi 'i' ; Otherwise, did we find 'i'? - jz findi - jmp start ; Otherwise, keep going - ;;; We found an 'e' -finde: mov a,m ; Get following character - cpi 'i' ; Is it 'i'? - jnz start ; If not, keep going - inx h ; Otherwise, move past it, - xchg ; keep pointer in DE, - lhld xie ; We found ie without c - inx h - shld xie - xchg - jmp start - ;;; We found an 'i' -findi: mov a,m ; Get following character - cpi 'e' ; Is it 'e'? - jnz start ; If not, keep going - inx h ; Otherwise, move past it, - xchg ; keep pointer in DE, - lhld xei ; We found ei without c - inx h - shld xei - xchg - jmp start - ;;; We found a 'c' -findc: mov a,m ; Get following character - cpi 'e' ; Is it 'e'? - jz findce ; Then we have 'ce' - cpi 'i' ; Is it 'i'? - jz findci ; Then we have 'ci' - jmp start ; Otherwise, just keep going -findce: mov d,h ; set DE = start of 'e?' - mov e,l - inx d ; Get next character - ldax d - cpi 'i' ; Is it 'i'? - jnz start ; If not, do nothing - lhld cei ; But if so, we found 'cei' - inx h ; Increment the counter - shld cei - xchg ; Keep scanning _after_ the 'cei' - inx h - jmp start -findci: mov d,h ; set DE = start of 'i?' - mov e,l - inx d ; Get next character - ldax d - cpi 'e' ; Is it 'e'? - jnz start ; If not, do nothing - lhld cie ; But if so, we found 'cie' - inx h ; Increment the counter - shld cie - xchg ; Keep scanning _after_ the 'cie' - inx h - jmp start -w_end: lxi b,curwrd ; Set word pointer to beginning - pop h ; Restore file read address - ret - ;;; Print error message and stop the program -die: lxi d,errmsg - mvi c,puts - call bdos - rst 0 - ;;; Print string -sout: mvi c,puts - jmp bdos - ;;; Print HL to the console as a decimal number -puthl: push h - lxi h,num - xthl - lxi b,-10 -dgt: lxi d,-1 -clcdgt: inx d - dad b - jc clcdgt - mov a,l - adi 10+'0' - xthl - dcx h - mov m,a - xthl - xchg - mov a,h - ora l - jnz dgt - pop d - mvi c,puts - jmp bdos -errmsg: db 'Error$' ; Good enough -s_ienc: db 'I before E when not preceded by C:$' -s_eic: db 'E before I when preceded by C:$' -snop: db ' not' -splau: db ' plausible',CR,LF,'$' -scie: db 'CIE: $' ; Report strings -sxie: db 'xIE: $' -scei: db 'CEI: $' -sxei: db 'xEI: $' - db '00000' -num: db CR,LF,'$' ; Space for number - ;;; Counters -xie: dw 0 ; I before E when not preceded by C -cie: dw 0 ; I before E when preceded by C -cei: dw 0 ; E before I when preceded by C -xei: dw 0 ; E before I when not preceded by C -curwrd: equ $ ; Current word stored here + ;;; I before E, except after C +fcb1: equ 5Ch ; FCB 1 (populated by file on command line) +dma: equ 80h ; Standard DMA location +bdos: equ 5 ; CP/M entry point +puts: equ 9 ; CP/M call to write a string to the console +fopen: equ 0Fh ; CP/M call to open a file +fread: equ 14h ; CP/M call to read from a file +CR: equ 13 +LF: equ 10 +EOF: equ 26 + org 100h + ;;; Open the file given on the command line + lxi d,fcb1 + mvi c,fopen + call bdos + inr a ; FF = error + jz die + ;;; We can only read one 128-byte block at a time, and the file + ;;; will not fit in memory (max 64 k). So there are two things + ;;; going on here: we copy from the block into a word buffer + ;;; until we see the end of a line, at which point we process + ;;; the word. In the meantime, if while copying we reach the end + ;;; of the block, we read the next block. + lxi b,curwrd ; Word pointer +block: push b ; Keep word pointer while reading + lxi d,fcb1 ; Read a block from the file + mvi c,fread + call bdos + pop b ; Restore word pointer + dcr a ; 1 = EOF + jz done + inr a ; otherwise, <>0 = error + jnz die + lxi h,dma ; Start reading at DMA +char: mov a,m ; Get character + cpi EOF ; If it's an EOF character, we're done + jz done + stax b ; Store character in current word + inx b + cpi LF ; If it's LF, then we've got a full word + cz word ; Process the word + inr l ; Go to next character + jz block ; If we're done with this block, get next one + jmp char + ;;; When done, report the statistics +done: lxi d,scie ; CIE + call sout + lhld cie + call puthl + lxi d,sxie ; xIE + call sout + lhld xie + call puthl + lxi d,scei ; CEI + call sout + lhld cei + call puthl + lxi d,sxei ; xEI + call sout + lhld xei + call puthl + ;;; Then say what is and isn't plausible + lxi d,s_ienc ; I before E when not preceded by C + call sout ; plausible if 2*xIE>CIE + lhld cie + xchg + lhld xie + call pplaus + lxi d,s_eic ; E before I when preceded by C + call sout ; plausible if 2*CEI>xEI + lhld xei + xchg + lhld cei + ;;; If HL = amount of words with feature, and + ;;; DE = amount of words with opposit feature, then print + ;;; '(not) plausible', as appropriate. +pplaus: dad h ; 2 * feature + mov a,d ; Compare high byte + cmp h + jc plaus ; If 2*H>D then plausible + mov a,e ; Otherwise, compare low byte + cmp l + jc plaus ; If 2*L>E then plausible + lxi d,snop ; Otherwise, not plausible + jmp sout +plaus: lxi d,splau + jmp sout + ;;; Process a word +word: push h ; Save file read address + xra a ; Zero out end of word + stax b + dcx b + lxi h,curwrd ; Scan word +start: mov a,m ; Get current character + inx h ; Move pointer ahead + ana a ; If zero, + jz w_end ; we're done + cpi 'c' ; Did we find a 'c'? + jz findc + cpi 'e' ; Otherwise, did we find 'e'? + jz finde + cpi 'i' ; Otherwise, did we find 'i'? + jz findi + jmp start ; Otherwise, keep going + ;;; We found an 'e' +finde: mov a,m ; Get following character + cpi 'i' ; Is it 'i'? + jnz start ; If not, keep going + inx h ; Otherwise, move past it, + xchg ; keep pointer in DE, + lhld xie ; We found ie without c + inx h + shld xie + xchg + jmp start + ;;; We found an 'i' +findi: mov a,m ; Get following character + cpi 'e' ; Is it 'e'? + jnz start ; If not, keep going + inx h ; Otherwise, move past it, + xchg ; keep pointer in DE, + lhld xei ; We found ei without c + inx h + shld xei + xchg + jmp start + ;;; We found a 'c' +findc: mov a,m ; Get following character + cpi 'e' ; Is it 'e'? + jz findce ; Then we have 'ce' + cpi 'i' ; Is it 'i'? + jz findci ; Then we have 'ci' + jmp start ; Otherwise, just keep going +findce: mov d,h ; set DE = start of 'e?' + mov e,l + inx d ; Get next character + ldax d + cpi 'i' ; Is it 'i'? + jnz start ; If not, do nothing + lhld cei ; But if so, we found 'cei' + inx h ; Increment the counter + shld cei + xchg ; Keep scanning _after_ the 'cei' + inx h + jmp start +findci: mov d,h ; set DE = start of 'i?' + mov e,l + inx d ; Get next character + ldax d + cpi 'e' ; Is it 'e'? + jnz start ; If not, do nothing + lhld cie ; But if so, we found 'cie' + inx h ; Increment the counter + shld cie + xchg ; Keep scanning _after_ the 'cie' + inx h + jmp start +w_end: lxi b,curwrd ; Set word pointer to beginning + pop h ; Restore file read address + ret + ;;; Print error message and stop the program +die: lxi d,errmsg + mvi c,puts + call bdos + rst 0 + ;;; Print string +sout: mvi c,puts + jmp bdos + ;;; Print HL to the console as a decimal number +puthl: push h + lxi h,num + xthl + lxi b,-10 +dgt: lxi d,-1 +clcdgt: inx d + dad b + jc clcdgt + mov a,l + adi 10+'0' + xthl + dcx h + mov m,a + xthl + xchg + mov a,h + ora l + jnz dgt + pop d + mvi c,puts + jmp bdos +errmsg: db 'Error$' ; Good enough +s_ienc: db 'I before E when not preceded by C:$' +s_eic: db 'E before I when preceded by C:$' +snop: db ' not' +splau: db ' plausible',CR,LF,'$' +scie: db 'CIE: $' ; Report strings +sxie: db 'xIE: $' +scei: db 'CEI: $' +sxei: db 'xEI: $' + db '00000' +num: db CR,LF,'$' ; Space for number + ;;; Counters +xie: dw 0 ; I before E when not preceded by C +cie: dw 0 ; I before E when preceded by C +cei: dw 0 ; E before I when preceded by C +xei: dw 0 ; E before I when not preceded by C +curwrd: equ $ ; Current word stored here diff --git a/Task/I-before-E-except-after-C/ALGOL-68/i-before-e-except-after-c.alg b/Task/I-before-E-except-after-C/ALGOL-68/i-before-e-except-after-c.alg index e67eb3f84b..3193288160 100644 --- a/Task/I-before-E-except-after-C/ALGOL-68/i-before-e-except-after-c.alg +++ b/Task/I-before-E-except-after-C/ALGOL-68/i-before-e-except-after-c.alg @@ -1,67 +1,80 @@ -BEGIN # use unixdict.txt to test the plausibility of # - # "i before e except after c" # +# tests the plausibility of "i before e except after c" using unixdict.txt # - PR read "files.incl.a68" PR # include file utilities # +# implements the plausibility test specified by the task # +# returns TRUE if with > 2 * without # +PROC plausible = ( INT with, without )BOOL: with > 2 * without; - # implements the plausibility test specified by the task # - # returns TRUE if with > 2 * without # - PROC plausible = ( INT with, without )BOOL: with > 2 * without; - - # shows the plausibility of with and without # - PROC show plausibility = ( STRING legend, INT with, without )VOID: - print( ( legend, " is ", IF plausible( with, without ) THEN "" ELSE "not " FI - , "plausible", newline - ) - ); +# shows the plausibility of with and without # +PROC show plausibility = ( STRING legend, INT with, without )VOID: + print( ( legend, IF plausible( with, without ) THEN " is plausible" ELSE " is not plausible" FI, newline ) ); +IF FILE input file; + STRING file name = "unixdict.txt"; + open( input file, file name, stand in channel ) /= 0 +THEN + # failed to open the file # + print( ( "Unable to open """ + file name + """", newline ) ) +ELSE + # file opened OK # + BOOL at eof := FALSE; + # set the EOF handler for the file # + on logical file end( input file, ( REF FILE f )BOOL: + BEGIN + # note that we reached EOF on the # + # latest read # + at eof := TRUE; + # return TRUE so processing can continue # + TRUE + END + ); INT cei := 0; INT xei := 0; INT cie := 0; INT xie := 0; - - # examines word for cie, xie (x /= c), cei and xei (x /= c) # - PROC test i before e = ( STRING word )VOID: - IF word = "ie" THEN + WHILE STRING word; + get( input file, ( word, newline ) ); + NOT at eof + DO + # examine the word for cie, xie (x /= c), cei and xei (x /= c) # + FOR pos FROM LWB word TO UPB word DO word[ pos ] := to lower( word[ pos ] ) OD; + IF word = "ie" THEN xie +:= 1 - ELIF word = "ei" THEN + ELIF word = "ei" THEN xei +:= 1 - ELSE + ELSE INT length = ( UPB word - LWB word ) + 1; IF length > 1 THEN IF word[ LWB word ] = "i" AND word[ LWB word + 1 ] = "e" THEN - # word starts ie # + # word starts ie # xie +:= 1 ELIF word[ LWB word ] = "e" AND word[ LWB word + 1 ] = "i" THEN - # word starts ei # + # word starts ei # xei +:= 1 FI; FOR pos FROM LWB word + 1 TO UPB word - 1 DO IF word[ pos ] = "i" AND word[ pos + 1 ] = "e" THEN - # have i before e, check the preceeding character # + # have i before e, check the preceeding character # IF word[ pos - 1 ] = "c" THEN cie ELSE xie FI +:= 1 ELIF word[ pos ] = "e" AND word[ pos + 1 ] = "i" THEN - # have e before i, check the preceeding character # + # have e before i, check the preceeding character # IF word[ pos - 1 ] = "c" THEN cei ELSE xei FI +:= 1 FI OD FI - FI # test i before e # ; + FI + OD; + # close the file # + close( input file ); # test the hypothesis # - - IF "unixdict.txt" EACHLINE test i before e < 0 THEN - print( ( "Unable to open unixdict.txt", newline ) ) - ELSE - print( ( "cie occurances: ", whole( cie, 0 ), newline ) ); - print( ( "xie occurances: ", whole( xie, 0 ), newline ) ); - print( ( "cei occurances: ", whole( cei, 0 ), newline ) ); - print( ( "xei occurances: ", whole( xei, 0 ), newline ) ); - show plausibility( "i before e except after c", xie, cie ); - show plausibility( "e before i except after c", xei, cei ); - show plausibility( "i before e when after c", cie, xie ); - show plausibility( "e before i when after c", cei, xei ); - show plausibility( "i before e in general", xie + cie, xei + cei ); - show plausibility( "e before i in general", xei + cei, xie + cie ) - FI - -END + print( ( "cie occurances: ", whole( cie, 0 ), newline ) ); + print( ( "xie occurances: ", whole( xie, 0 ), newline ) ); + print( ( "cei occurances: ", whole( cei, 0 ), newline ) ); + print( ( "xei occurances: ", whole( xei, 0 ), newline ) ); + show plausibility( "i before e except after c", xie, cie ); + show plausibility( "e before i except after c", xei, cei ); + show plausibility( "i before e when after c", cie, xie ); + show plausibility( "e before i when after c", cei, xei ); + show plausibility( "i before e in general", xie + cie, xei + cei ); + show plausibility( "e before i in general", xei + cei, xie + cie ) +FI diff --git a/Task/I-before-E-except-after-C/AWK/i-before-e-except-after-c.awk b/Task/I-before-E-except-after-C/AWK/i-before-e-except-after-c.awk index 0d1c85ae20..a9ab9fde37 100644 --- a/Task/I-before-E-except-after-C/AWK/i-before-e-except-after-c.awk +++ b/Task/I-before-E-except-after-C/AWK/i-before-e-except-after-c.awk @@ -7,20 +7,20 @@ /cie/ {cie+=cnt($3)} function cnt(c) { - if (c<1) return 1; - return c; + if (c<1) return 1; + return c; } END { - printf("cie: %i\nnie: %i\ncei: %i\nnei: %i\n",cie,nie-cie,cei,nei-cei); - v = v2 = ""; - if (nie < 3 * cie) { - v =" not"; - } - print "I before E when not preceded by C: is"v" plausible"; - if (nei > 3 * cei) { - v = v2 =" not"; - } - print "E before I when preceded by C: is"v2" plausible"; + printf("cie: %i\nnie: %i\ncei: %i\nnei: %i\n",cie,nie-cie,cei,nei-cei); + v = v2 = ""; + if (nie < 3 * cie) { + v =" not"; + } + print "I before E when not preceded by C: is"v" plausible"; + if (nei > 3 * cei) { + v = v2 =" not"; + } + print "E before I when preceded by C: is"v2" plausible"; print "Overall rule is"v" plausible"; } diff --git a/Task/I-before-E-except-after-C/AutoHotkey/i-before-e-except-after-c.ahk b/Task/I-before-E-except-after-C/AutoHotkey/i-before-e-except-after-c.ahk index a0ee96da0f..a9fc81bf1f 100644 --- a/Task/I-before-E-except-after-C/AutoHotkey/i-before-e-except-after-c.ahk +++ b/Task/I-before-E-except-after-C/AutoHotkey/i-before-e-except-after-c.ahk @@ -1,4 +1,4 @@ -WordList := URL_ToVar("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt") +WordList := URL_ToVar("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt") WordList := RegExReplace(WordList, "i)cie", "", cieN) WordList := RegExReplace(WordList, "i)cei", "", ceiN) RegExReplace(WordList, "i)ie", "", ieN) diff --git a/Task/I-before-E-except-after-C/BASIC256/i-before-e-except-after-c.basic b/Task/I-before-E-except-after-C/BASIC256/i-before-e-except-after-c.basic index 0a47a1548e..c2e1212f95 100644 --- a/Task/I-before-E-except-after-C/BASIC256/i-before-e-except-after-c.basic +++ b/Task/I-before-E-except-after-C/BASIC256/i-before-e-except-after-c.basic @@ -2,13 +2,13 @@ CI = 0 : XI = 0 : CE = 0 : XE = 0 open 1, "unixdict.txt" do - pal$ = readline (1) - if instr(pal$, "ie") then - if instr(pal$, "cie") then CI += 1 else XI += 1 - endif - if instr(pal$, "ei") then - if instr(pal$, "cei") then CE += 1 else XE += 1 - endif + pal$ = readline (1) + if instr(pal$, "ie") then + if instr(pal$, "cie") then CI += 1 else XI += 1 + endif + if instr(pal$, "ei") then + if instr(pal$, "cei") then CE += 1 else XE += 1 + endif until eof(1) close 1 diff --git a/Task/I-before-E-except-after-C/BQN/i-before-e-except-after-c.bqn b/Task/I-before-E-except-after-C/BQN/i-before-e-except-after-c.bqn deleted file mode 100644 index dbbec600b8..0000000000 --- a/Task/I-before-E-except-after-C/BQN/i-before-e-except-after-c.bqn +++ /dev/null @@ -1,15 +0,0 @@ -Func ← { - Filter ← {+´(∨´∘(𝕨⊸⍷))¨𝕩} - nei ← "ei" Filter 𝕩 - cei ← "cei" Filter 𝕩 - nie ← "ie" Filter 𝕩 - cie ← "cie" Filter 𝕩 - •Show (nie < 2×cie)◶⟨ - "I before E when not preceded by C is plausible" - "I before E when not preceded by C is not plausible" - ⟩@ - (nei > 2×cei)◶⟨ - "E before I when preceded by C is plausible" - "E before I when preceded by C is not plausible" - ⟩@ -} diff --git a/Task/I-before-E-except-after-C/Batch-File/i-before-e-except-after-c-1.bat b/Task/I-before-E-except-after-C/Batch-File/i-before-e-except-after-c-1.bat index 6a0a353d2b..1962c47d0e 100644 --- a/Task/I-before-E-except-after-C/Batch-File/i-before-e-except-after-c-1.bat +++ b/Task/I-before-E-except-after-C/Batch-File/i-before-e-except-after-c-1.bat @@ -3,7 +3,7 @@ @echo off setlocal enabledelayedexpansion - ::Initialization + ::Initialization set ie=0 set ei=0 set cie=0 @@ -13,13 +13,13 @@ set propos1=FALSE set propos2=FALSE set propos3=FALSE - ::Do the matching + ::Do the matching for /f %%X in (unixdict.txt) do ( - set word=%%X - if not "!word:ie=!"=="!word!" if "!word:cie=!"=="!word!" (set /a ie+=1) - if not "!word:ei=!"=="!word!" if "!word:cei=!"=="!word!" (set /a ei+=1) - if not "!word:cei=!"=="!word!" (set /a cei+=1) - if not "!word:cie=!"=="!word!" (set /a cie+=1) + set word=%%X + if not "!word:ie=!"=="!word!" if "!word:cie=!"=="!word!" (set /a ie+=1) + if not "!word:ei=!"=="!word!" if "!word:cei=!"=="!word!" (set /a ei+=1) + if not "!word:cei=!"=="!word!" (set /a cei+=1) + if not "!word:cie=!"=="!word!" (set /a cie+=1) ) set /a "counter1=!ei!*2,counter2=!cie!*2" diff --git a/Task/I-before-E-except-after-C/Clojure/i-before-e-except-after-c.clj b/Task/I-before-E-except-after-C/Clojure/i-before-e-except-after-c.clj index 9d895b2b68..73fef20309 100644 --- a/Task/I-before-E-except-after-C/Clojure/i-before-e-except-after-c.clj +++ b/Task/I-before-E-except-after-C/Clojure/i-before-e-except-after-c.clj @@ -47,7 +47,7 @@ format-line))) (defn -main [] - (with-open [rdr (clojure.java.io/reader "https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt")] + (with-open [rdr (clojure.java.io/reader "http://wiki.puzzlers.org/pub/wordlists/unixdict.txt")] (i-before-e-except-after-c-plausible? "Check unixdist list" (apply-freq-1 (line-seq rdr)))) (with-open [rdr (clojure.java.io/reader "http://ucrel.lancs.ac.uk/bncfreq/lists/1_2_all_freq.txt")] (i-before-e-except-after-c-plausible? "Word frequencies (stretch goal)" (map format-freq-line (drop 1 (line-seq rdr)))))) diff --git a/Task/I-before-E-except-after-C/Delphi/i-before-e-except-after-c.pas b/Task/I-before-E-except-after-C/Delphi/i-before-e-except-after-c.delphi similarity index 100% rename from Task/I-before-E-except-after-C/Delphi/i-before-e-except-after-c.pas rename to Task/I-before-E-except-after-C/Delphi/i-before-e-except-after-c.delphi diff --git a/Task/I-before-E-except-after-C/Ed/i-before-e-except-after-c-1.ed b/Task/I-before-E-except-after-C/Ed/i-before-e-except-after-c-1.ed deleted file mode 100644 index b8a34ecd14..0000000000 --- a/Task/I-before-E-except-after-C/Ed/i-before-e-except-after-c-1.ed +++ /dev/null @@ -1,32 +0,0 @@ -# i-before-e.ed -H -# Remove all the non-rule-related words -v/(ie|ei)/d -# Replace the occurences with one-letter markers -g/ei/s/.*/e/ -g/ie/s/.*/i/ -,j -# Remove 1 occurence of e (alternative) per two i (null) -s/eii//g -s/iie//g -s/eii//g -s/iie//g -s/eii//g -s/iie//g -s/eii//g -s/iie//g -s/eii//g -s/iie//g -s/eii//g -s/iie//g -s/eii//g -s/iie//g -s/eii//g -s/iie//g -s/eii//g -s/iie//g -s/eii//g -s/iie//g -# Check whether there are more i's in the output (null hypothesis true) or not -,p -Q diff --git a/Task/I-before-E-except-after-C/Ed/i-before-e-except-after-c-2.ed b/Task/I-before-E-except-after-C/Ed/i-before-e-except-after-c-2.ed deleted file mode 100644 index 44cdaeb3a9..0000000000 --- a/Task/I-before-E-except-after-C/Ed/i-before-e-except-after-c-2.ed +++ /dev/null @@ -1,35 +0,0 @@ -# e-before-i-with-c.ed -H -# Remove all the non-rule-related words -v/(cie|cei)/d -# Replace the occurences with one-letter markers -g/ei/s/.*/e/ -g/ie/s/.*/i/ -,j -# Remove 1 occurence of i (alternative) per two e (null) -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -s/eei// -s/iee// -# Check whether there are more e's in the output (null hypothesis true) or not -,p -Q diff --git a/Task/I-before-E-except-after-C/Elixir/i-before-e-except-after-c.ex b/Task/I-before-E-except-after-C/Elixir/i-before-e-except-after-c.elixir similarity index 100% rename from Task/I-before-E-except-after-C/Elixir/i-before-e-except-after-c.ex rename to Task/I-before-E-except-after-C/Elixir/i-before-e-except-after-c.elixir diff --git a/Task/I-before-E-except-after-C/F-Sharp/i-before-e-except-after-c.fs b/Task/I-before-E-except-after-C/F-Sharp/i-before-e-except-after-c.fs deleted file mode 100644 index 501506f0fb..0000000000 --- a/Task/I-before-E-except-after-C/F-Sharp/i-before-e-except-after-c.fs +++ /dev/null @@ -1,9 +0,0 @@ -// I before E except after C. Nigel Galloway: September 30th., 2024 -type plausibility=Plausible|Implausible -let fN n g=System.Text.RegularExpressions.Regex.Matches(n,g).Count -let fG n g=g|>Array.map2(fun n g->n+g)[|n("ie");n("ei");n("cie");n("cei")|] -let n=System.IO.File.ReadLines("unixdict.txt")|>Seq.fold(fun n g->fG (fN g) n)[|0;0;0;0|] -printfn($"I before E except after C is {if n[0]-n[2]>2*n[2] then Plausible else Implausible}") -printfn($"E before I except after C is {if n[1]-n[3]>2*n[3] then Plausible else Implausible}") -printfn($"I before E when after C is {if n[2]>2*n[3] then Plausible else Implausible}") -printfn($"E before I when after C is {if n[3]>2*n[2] then Plausible else Implausible}") diff --git a/Task/I-before-E-except-after-C/FutureBasic/i-before-e-except-after-c.basic b/Task/I-before-E-except-after-C/FutureBasic/i-before-e-except-after-c.basic index 86599ccbef..8e02afd17b 100644 --- a/Task/I-before-E-except-after-C/FutureBasic/i-before-e-except-after-c.basic +++ b/Task/I-before-E-except-after-C/FutureBasic/i-before-e-except-after-c.basic @@ -22,7 +22,7 @@ void local fn CheckWord( wrd as CFStringRef, txt as CFStringRef, c as ^long, x a end fn void local fn Doit - CFURLRef url = fn URLWithString( @"https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" ) + CFURLRef url = fn URLWithString( @"http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" ) CFStringRef string = fn StringWithContentsOfURL( url, NSUTF8StringEncoding, NULL ) CFArrayRef words = fn StringComponentsSeparatedByCharactersInSet( string, fn CharacterSetNewlineSet ) long cei = 0, cie = 0, xei = 0, xie = 0 diff --git a/Task/I-before-E-except-after-C/Go/i-before-e-except-after-c.go b/Task/I-before-E-except-after-C/Go/i-before-e-except-after-c.go index 90b5c6c681..69374b52c6 100644 --- a/Task/I-before-E-except-after-C/Go/i-before-e-except-after-c.go +++ b/Task/I-before-E-except-after-C/Go/i-before-e-except-after-c.go @@ -1,68 +1,68 @@ package main import ( - "bufio" - "fmt" - "log" - "os" - "regexp" - "strings" + "bufio" + "fmt" + "log" + "os" + "regexp" + "strings" ) func main() { - f, err := os.Open("unixdict.txt") - if err != nil { - log.Fatalln(err) - } - defer f.Close() + f, err := os.Open("unixdict.txt") + if err != nil { + log.Fatalln(err) + } + defer f.Close() - s := bufio.NewScanner(f) - rie := regexp.MustCompile("^ie|[^c]ie") - rei := regexp.MustCompile("^ei|[^c]ei") - var cie, ie int - var cei, ei int - for s.Scan() { - line := s.Text() - if strings.Contains(line, "cie") { - cie++ - } - if strings.Contains(line, "cei") { - cei++ - } - if rie.MatchString(line) { - ie++ - } - if rei.MatchString(line) { - ei++ - } - } - err = s.Err() - if err != nil { - log.Fatalln(err) - } + s := bufio.NewScanner(f) + rie := regexp.MustCompile("^ie|[^c]ie") + rei := regexp.MustCompile("^ei|[^c]ei") + var cie, ie int + var cei, ei int + for s.Scan() { + line := s.Text() + if strings.Contains(line, "cie") { + cie++ + } + if strings.Contains(line, "cei") { + cei++ + } + if rie.MatchString(line) { + ie++ + } + if rei.MatchString(line) { + ei++ + } + } + err = s.Err() + if err != nil { + log.Fatalln(err) + } - if check(ie, ei, "I before E when not preceded by C") && - check(cei, cie, "E before I when preceded by C") { - fmt.Println("Both plausable.") - fmt.Println(`"I before E, except after C" is plausable.`) - } else { - fmt.Println("One or both implausable.") - fmt.Println(`"I before E, except after C" is implausable.`) - } + if check(ie, ei, "I before E when not preceded by C") && + check(cei, cie, "E before I when preceded by C") { + fmt.Println("Both plausable.") + fmt.Println(`"I before E, except after C" is plausable.`) + } else { + fmt.Println("One or both implausable.") + fmt.Println(`"I before E, except after C" is implausable.`) + } } // check checks if a statement is plausible. Something is plausible if a is more // than two times b. func check(a, b int, s string) bool { - switch { - case a > b*2: - fmt.Printf("%q is plausible (%d vs %d).\n", s, a, b) - return true - case a >= b: - fmt.Printf("%q is implausible (%d vs %d).\n", s, a, b) - default: - fmt.Printf("%q is implausible and contra-indicated (%d vs %d).\n", - s, a, b) - } - return false + switch { + case a > b*2: + fmt.Printf("%q is plausible (%d vs %d).\n", s, a, b) + return true + case a >= b: + fmt.Printf("%q is implausible (%d vs %d).\n", s, a, b) + default: + fmt.Printf("%q is implausible and contra-indicated (%d vs %d).\n", + s, a, b) + } + return false } diff --git a/Task/I-before-E-except-after-C/Haskell/i-before-e-except-after-c.hs b/Task/I-before-E-except-after-C/Haskell/i-before-e-except-after-c.hs index 120acd246d..a39c070d5a 100644 --- a/Task/I-before-E-except-after-C/Haskell/i-before-e-except-after-c.hs +++ b/Task/I-before-E-except-after-C/Haskell/i-before-e-except-after-c.hs @@ -6,7 +6,7 @@ getWordList :: IO String getWordList = do response <- simpleHTTP.getRequest$ url getResponseBody response - where url = "https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" + where url = "http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" main = do words <- getWordList diff --git a/Task/I-before-E-except-after-C/Icon/i-before-e-except-after-c-1.icon b/Task/I-before-E-except-after-C/Icon/i-before-e-except-after-c-1.icon index d7c5f7c825..088d2b2af3 100644 --- a/Task/I-before-E-except-after-C/Icon/i-before-e-except-after-c-1.icon +++ b/Task/I-before-E-except-after-C/Icon/i-before-e-except-after-c-1.icon @@ -1,4 +1,4 @@ -import Utils # To get the FindFirst class +import Utils # To get the FindFirst class procedure main(a) showCounts := "--showcounts" == !a diff --git a/Task/I-before-E-except-after-C/Icon/i-before-e-except-after-c-2.icon b/Task/I-before-E-except-after-C/Icon/i-before-e-except-after-c-2.icon index c3df84f390..2f669b47d1 100644 --- a/Task/I-before-E-except-after-C/Icon/i-before-e-except-after-c-2.icon +++ b/Task/I-before-E-except-after-C/Icon/i-before-e-except-after-c-2.icon @@ -1,4 +1,4 @@ -import Utils # To get the FindFirst class +import Utils # To get the FindFirst class procedure main(a) WS := " \t" diff --git a/Task/I-before-E-except-after-C/Java/i-before-e-except-after-c-2.java b/Task/I-before-E-except-after-C/Java/i-before-e-except-after-c-2.java index 5ccca284f7..83eba7931c 100644 --- a/Task/I-before-E-except-after-C/Java/i-before-e-except-after-c-2.java +++ b/Task/I-before-E-except-after-C/Java/i-before-e-except-after-c-2.java @@ -12,7 +12,7 @@ static int cei = 0; static int cie = 0; static void count() throws URISyntaxException, IOException { - URL url = new URI("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").toURL(); + URL url = new URI("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").toURL(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()))) { String line; while ((line = reader.readLine()) != null) { diff --git a/Task/I-before-E-except-after-C/Java/i-before-e-except-after-c-3.java b/Task/I-before-E-except-after-C/Java/i-before-e-except-after-c-3.java index 2af84999ac..f53d8476aa 100644 --- a/Task/I-before-E-except-after-C/Java/i-before-e-except-after-c-3.java +++ b/Task/I-before-E-except-after-C/Java/i-before-e-except-after-c-3.java @@ -3,56 +3,56 @@ import java.io.FileReader; public class IbeforeE { - public static void main(String[] args) - { - IbeforeE now=new IbeforeE(); - String wordlist="unixdict.txt"; - if(now.isPlausibleRule(wordlist)) - System.out.println("Rule is plausible."); - else - System.out.println("Rule is not plausible."); - } - boolean isPlausibleRule(String filename) - { - int truecount=0,falsecount=0; - try - { - BufferedReader br=new BufferedReader(new FileReader(filename)); - String word; - while((word=br.readLine())!=null) - { - if(isPlausibleWord(word)) - truecount++; - else if(isOppPlausibleWord(word)) - falsecount++; - } - br.close(); - } - catch(Exception e) - { - System.out.println("Something went horribly wrong: "+e.getMessage()); - } - - System.out.println("Plausible count: "+truecount); - System.out.println("Implausible count: "+falsecount); - if(truecount>2*falsecount) - return true; - return false; - } - boolean isPlausibleWord(String word) - { - if(!word.contains("c")&&word.contains("ie")) - return true; - else if(word.contains("cei")) - return true; - return false; - } - boolean isOppPlausibleWord(String word) - { - if(!word.contains("c")&&word.contains("ei")) - return true; - else if(word.contains("cie")) - return true; - return false; - } + public static void main(String[] args) + { + IbeforeE now=new IbeforeE(); + String wordlist="unixdict.txt"; + if(now.isPlausibleRule(wordlist)) + System.out.println("Rule is plausible."); + else + System.out.println("Rule is not plausible."); + } + boolean isPlausibleRule(String filename) + { + int truecount=0,falsecount=0; + try + { + BufferedReader br=new BufferedReader(new FileReader(filename)); + String word; + while((word=br.readLine())!=null) + { + if(isPlausibleWord(word)) + truecount++; + else if(isOppPlausibleWord(word)) + falsecount++; + } + br.close(); + } + catch(Exception e) + { + System.out.println("Something went horribly wrong: "+e.getMessage()); + } + + System.out.println("Plausible count: "+truecount); + System.out.println("Implausible count: "+falsecount); + if(truecount>2*falsecount) + return true; + return false; + } + boolean isPlausibleWord(String word) + { + if(!word.contains("c")&&word.contains("ie")) + return true; + else if(word.contains("cei")) + return true; + return false; + } + boolean isOppPlausibleWord(String word) + { + if(!word.contains("c")&&word.contains("ei")) + return true; + else if(word.contains("cie")) + return true; + return false; + } } diff --git a/Task/I-before-E-except-after-C/Julia/i-before-e-except-after-c.jl b/Task/I-before-E-except-after-C/Julia/i-before-e-except-after-c.julia similarity index 100% rename from Task/I-before-E-except-after-C/Julia/i-before-e-except-after-c.jl rename to Task/I-before-E-except-after-C/Julia/i-before-e-except-after-c.julia diff --git a/Task/I-before-E-except-after-C/Kotlin/i-before-e-except-after-c.kotlin b/Task/I-before-E-except-after-C/Kotlin/i-before-e-except-after-c.kotlin new file mode 100644 index 0000000000..b1cc1898fb --- /dev/null +++ b/Task/I-before-E-except-after-C/Kotlin/i-before-e-except-after-c.kotlin @@ -0,0 +1,61 @@ +// version 1.0.6 + +import java.net.URL +import java.io.InputStreamReader +import java.io.BufferedReader + +fun isPlausible(n1: Int, n2: Int) = n1 > 2 * n2 + +fun printResults(source: String, counts: IntArray) { + println("Results for $source") + println(" i before e except after c") + println(" for ${counts[0]}") + println(" against ${counts[1]}") + val plausible1 = isPlausible(counts[0], counts[1]) + println(" sub-rule is${if (plausible1) "" else " not"} plausible\n") + println(" e before i when preceded by c") + println(" for ${counts[2]}") + println(" against ${counts[3]}") + val plausible2 = isPlausible(counts[2], counts[3]) + println(" sub-rule is${if (plausible2) "" else " not"} plausible\n") + val plausible = plausible1 && plausible2 + println(" rule is${if (plausible) "" else " not"} plausible") +} + +fun main(args: Array) { + val url = URL("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt") + val isr = InputStreamReader(url.openStream()) + val reader = BufferedReader(isr) + val regexes = arrayOf( + Regex("(^|[^c])ie"), // i before e when not preceded by c (includes words starting with ie) + Regex("(^|[^c])ei"), // e before i when not preceded by c (includes words starting with ei) + Regex("cei"), // e before i when preceded by c + Regex("cie") // i before e when preceded by c + ) + val counts = IntArray(4) // corresponding counts of occurrences + var word = reader.readLine() + while (word != null) { + for (i in 0..3) counts[i] += regexes[i].findAll(word).toList().size + word = reader.readLine() + } + reader.close() + printResults("unixdict.txt", counts) + + val url2 = URL("http://ucrel.lancs.ac.uk/bncfreq/lists/1_2_all_freq.txt") + val isr2 = InputStreamReader(url2.openStream()) + val reader2 = BufferedReader(isr2) + val counts2 = IntArray(4) + reader2.readLine() // read header line + var line = reader2.readLine() // read first line and store it + var words: List + val splitter = Regex("""(\t+|\s+)""") + while (line != null) { + words = line.split(splitter) + if (words.size == 4) // first element is empty + for (i in 0..3) counts2[i] += regexes[i].findAll(words[1]).toList().size * words[3].toInt() + line = reader2.readLine() + } + reader2.close() + println() + printResults("British National Corpus", counts2) +} diff --git a/Task/I-before-E-except-after-C/Kotlin/i-before-e-except-after-c.kts b/Task/I-before-E-except-after-C/Kotlin/i-before-e-except-after-c.kts deleted file mode 100644 index 038c8a089d..0000000000 --- a/Task/I-before-E-except-after-C/Kotlin/i-before-e-except-after-c.kts +++ /dev/null @@ -1,61 +0,0 @@ -// version 1.0.6 - -import java.net.URL -import java.io.InputStreamReader -import java.io.BufferedReader - -fun isPlausible(n1: Int, n2: Int) = n1 > 2 * n2 - -fun printResults(source: String, counts: IntArray) { - println("Results for $source") - println(" i before e except after c") - println(" for ${counts[0]}") - println(" against ${counts[1]}") - val plausible1 = isPlausible(counts[0], counts[1]) - println(" sub-rule is${if (plausible1) "" else " not"} plausible\n") - println(" e before i when preceded by c") - println(" for ${counts[2]}") - println(" against ${counts[3]}") - val plausible2 = isPlausible(counts[2], counts[3]) - println(" sub-rule is${if (plausible2) "" else " not"} plausible\n") - val plausible = plausible1 && plausible2 - println(" rule is${if (plausible) "" else " not"} plausible") -} - -fun main(args: Array) { - val url = URL("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt") - val isr = InputStreamReader(url.openStream()) - val reader = BufferedReader(isr) - val regexes = arrayOf( - Regex("(^|[^c])ie"), // i before e when not preceded by c (includes words starting with ie) - Regex("(^|[^c])ei"), // e before i when not preceded by c (includes words starting with ei) - Regex("cei"), // e before i when preceded by c - Regex("cie") // i before e when preceded by c - ) - val counts = IntArray(4) // corresponding counts of occurrences - var word = reader.readLine() - while (word != null) { - for (i in 0..3) counts[i] += regexes[i].findAll(word).toList().size - word = reader.readLine() - } - reader.close() - printResults("unixdict.txt", counts) - - val url2 = URL("http://ucrel.lancs.ac.uk/bncfreq/lists/1_2_all_freq.txt") - val isr2 = InputStreamReader(url2.openStream()) - val reader2 = BufferedReader(isr2) - val counts2 = IntArray(4) - reader2.readLine() // read header line - var line = reader2.readLine() // read first line and store it - var words: List - val splitter = Regex("""(\t+|\s+)""") - while (line != null) { - words = line.split(splitter) - if (words.size == 4) // first element is empty - for (i in 0..3) counts2[i] += regexes[i].findAll(words[1]).toList().size * words[3].toInt() - line = reader2.readLine() - } - reader2.close() - println() - printResults("British National Corpus", counts2) -} diff --git a/Task/I-before-E-except-after-C/Langur/i-before-e-except-after-c.langur b/Task/I-before-E-except-after-C/Langur/i-before-e-except-after-c.langur deleted file mode 100644 index 77ef21052e..0000000000 --- a/Task/I-before-E-except-after-C/Langur/i-before-e-except-after-c.langur +++ /dev/null @@ -1,24 +0,0 @@ -val words = less(split(readfile("./data/unixdict.txt"), delim="\n"), of=1) - -val print = fn*(support number, against number) { - val ratio = support / against - writeln "{{support}} / {{against}} = {{ratio : r2}}:", (ratio < 2) * " NOT", " PLAUSIBLE" - return if(ratio >= 2: 1; 0) -} - -val ks = fw/ei cei ie cie/ -var cnt = {:} - -for w in words { - for k in ks { - cnt[k; 0] += if(k in w: 1; 0) - } -} - -val support = cnt'ie - cnt'cie -val against = cnt'ei - cnt'cei - -var result = print(support, against) -result += print(cnt'cei, cnt'cie) - -writeln "Overall:", (result < 2) * " NOT", " PLAUSIBLE\n" diff --git a/Task/I-before-E-except-after-C/Lasso/i-before-e-except-after-c.lasso b/Task/I-before-E-except-after-C/Lasso/i-before-e-except-after-c.lasso index 12f0b1464b..abf4c7e67f 100644 --- a/Task/I-before-E-except-after-C/Lasso/i-before-e-except-after-c.lasso +++ b/Task/I-before-E-except-after-C/Lasso/i-before-e-except-after-c.lasso @@ -3,7 +3,7 @@ local(cie,cei,ie,ei) = (:0,0,0,0) local(match_ie) = regExp(`[^c]ie`) local(match_ei) = regExp(`[^c]ei`) -with word in include_url(`https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt`)->asString->split("\n") +with word in include_url(`http://wiki.puzzlers.org/pub/wordlists/unixdict.txt`)->asString->split("\n") where #word >> `ie` or #word >> `ei` do { #word >> `cie` diff --git a/Task/I-before-E-except-after-C/Lua/i-before-e-except-after-c.lua b/Task/I-before-E-except-after-C/Lua/i-before-e-except-after-c.lua index 7c37aaeb8a..50509a26fa 100644 --- a/Task/I-before-E-except-after-C/Lua/i-before-e-except-after-c.lua +++ b/Task/I-before-E-except-after-C/Lua/i-before-e-except-after-c.lua @@ -22,7 +22,7 @@ function plaus (case, opposite, words) end -- Main procedure -local page = http.request("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt") +local page = http.request("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt") io.write("I before E when not preceded by C: ") local sub1 = plaus("[^c]ie", "cie", page) io.write("E before I when preceded by C: ") diff --git a/Task/I-before-E-except-after-C/MATLAB/i-before-e-except-after-c.m b/Task/I-before-E-except-after-C/MATLAB/i-before-e-except-after-c.m index 14c84de23a..e1d2657819 100644 --- a/Task/I-before-E-except-after-C/MATLAB/i-before-e-except-after-c.m +++ b/Task/I-before-E-except-after-C/MATLAB/i-before-e-except-after-c.m @@ -1,5 +1,5 @@ function iBeforeE() -check('https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt'); +check('http://wiki.puzzlers.org/pub/wordlists/unixdict.txt'); fprintf('\n'); check('http://ucrel.lancs.ac.uk/bncfreq/lists/1_2_all_freq.txt'); end diff --git a/Task/I-before-E-except-after-C/Maple/i-before-e-except-after-c.maple b/Task/I-before-E-except-after-C/Maple/i-before-e-except-after-c.maple index 12d72b4118..8bf9b10be0 100644 --- a/Task/I-before-E-except-after-C/Maple/i-before-e-except-after-c.maple +++ b/Task/I-before-E-except-after-C/Maple/i-before-e-except-after-c.maple @@ -1,22 +1,22 @@ -words:= HTTP:-Get("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt"): +words:= HTTP:-Get("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt"): lst := StringTools:-Split(words[2],"\n"): xie, cie, cei, xei := 0, 0, 0, 0: for item in lst do - if searchtext("ie", item) <> 0 then - if searchtext("cie", item) <> 0 then - cie := cie + 1: - else - xie := xie + 1: - fi: - fi: - if searchtext("ei", item) <> 0 then - if searchtext("cei", item) <> 0 then - cei := cei + 1: - else - xei := xei + 1: - fi: - fi: -od: + if searchtext("ie", item) <> 0 then + if searchtext("cie", item) <> 0 then + cie := cie + 1: + else + xie := xie + 1: + fi: + fi: + if searchtext("ei", item) <> 0 then + if searchtext("cei", item) <> 0 then + cei := cei + 1: + else + xei := xei + 1: + fi: + fi: +od: p1, p2 := evalb(xie > 2*xei),evalb(cei > 2*cie); printf("The first phrase is %s with supporting features %d, anti features %d\n", piecewise(p1, "plausible", "not plausible"), xie, xei); printf("The seond phrase is %s with supporting features %d, anti features %d\n", piecewise(p2, "plausible", "not plausible"), cei, cie); diff --git a/Task/I-before-E-except-after-C/Mathematica/i-before-e-except-after-c-1.math b/Task/I-before-E-except-after-C/Mathematica/i-before-e-except-after-c-1.math index 38e8577727..62109c191c 100644 --- a/Task/I-before-E-except-after-C/Mathematica/i-before-e-except-after-c-1.math +++ b/Task/I-before-E-except-after-C/Mathematica/i-before-e-except-after-c-1.math @@ -1,5 +1,5 @@ wordlist = - Import["https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt", + Import["http://wiki.puzzlers.org/pub/wordlists/unixdict.txt", "Words"]; Print["The number of words in unixdict.txt = " <> ToString[Length[wordlist]]] diff --git a/Task/I-before-E-except-after-C/Microsoft-Small-Basic/i-before-e-except-after-c.basic b/Task/I-before-E-except-after-C/Microsoft-Small-Basic/i-before-e-except-after-c.basic deleted file mode 100644 index b7b18e8361..0000000000 --- a/Task/I-before-E-except-after-C/Microsoft-Small-Basic/i-before-e-except-after-c.basic +++ /dev/null @@ -1,25 +0,0 @@ -For i = 1 To 25104 - ' Assumes that unixdict.txt is in C:\ - word = File.ReadLine("C:\unixdict.txt", i) - If Text.IsSubText(word, "cie") Then - cie = cie + 1 - ElseIf Text.IsSubText(word, "ie") Then - ie = ie + 1 - EndIf - If Text.IsSubText(word, "cei") Then - cei = cei + 1 - ElseIf Text.IsSubText(word, "ei") Then - ei = ei + 1 - EndIf -EndFor - -If ie / ei > 2 Then - TextWindow.WriteLine("I before E when not preceded by C is plausible") -Else - TextWindow.WriteLine("I before E when not preceded by C is not plausible") -EndIf -If cei / cie > 2 Then - TextWindow.WriteLine("E before I when preceded by C is plausible") -Else - TextWindow.WriteLine("E before I when preceded by C is not plausible") -EndIf diff --git a/Task/I-before-E-except-after-C/Nim/i-before-e-except-after-c.nim b/Task/I-before-E-except-after-C/Nim/i-before-e-except-after-c.nim index 41a8ff75bf..2a549064b1 100644 --- a/Task/I-before-E-except-after-C/Nim/i-before-e-except-after-c.nim +++ b/Task/I-before-E-except-after-C/Nim/i-before-e-except-after-c.nim @@ -17,7 +17,7 @@ proc plausibility(rule: string; count1, count2: int): bool = let client = newHttpClient() var nie, cie, nei, cei = 0 -for word in client.getContent("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").split(): +for word in client.getContent("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").split(): if word.contains("ie"): if word.contains("cie"): inc cie diff --git a/Task/I-before-E-except-after-C/Nu/i-before-e-except-after-c-1.nu b/Task/I-before-E-except-after-C/Nu/i-before-e-except-after-c-1.nu deleted file mode 100644 index 2c9926743c..0000000000 --- a/Task/I-before-E-except-after-C/Nu/i-before-e-except-after-c-1.nu +++ /dev/null @@ -1,32 +0,0 @@ -# Fetch and process the word list -let words = open unixdict.txt | lines | where { ($in | str length) > 3 } - -# Function to count matches for a pattern -def count-pattern [pattern: string] { - $words | where $it =~ $pattern | length -} - -# Count occurrences for "I before E" rule -let ie_not_c = (count-pattern "(^|[^c])ie") # ie not preceded by c -let ei_not_c = (count-pattern "(^|[^c])ei") # ei not preceded by c - -# Count occurrences for "E before I" rule -let cei = (count-pattern "cei") # ei preceded by c -let cie = (count-pattern "cie") # ie preceded by c - -# Check plausibility (more than 2x occurrences of opposite) -let rule1_plausible = ($ie_not_c > ($ei_not_c * 2)) -let rule2_plausible = ($cei > ($cie * 2)) - -# Output results -print [ - $"Analyzing 'I before E when not preceded by C':" - $" correct for : ($ie_not_c)" - $" not correct for : ($ei_not_c)" - $" Plausible: ($rule1_plausible)" - $"" - $"Analyzing 'E before I when preceded by C':" - $" correct for : ($cei)" - $" not correct for : ($cie)" - $" Plausible: ($rule2_plausible)" - ] diff --git a/Task/I-before-E-except-after-C/Nu/i-before-e-except-after-c-2.nu b/Task/I-before-E-except-after-C/Nu/i-before-e-except-after-c-2.nu deleted file mode 100644 index 4519c2d750..0000000000 --- a/Task/I-before-E-except-after-C/Nu/i-before-e-except-after-c-2.nu +++ /dev/null @@ -1,48 +0,0 @@ -# Fetch and filter words -let words = open unixdict.txt | lines | where { $in | str length | $in > 3 } - -# Define patterns and their processing in a functional way -let patterns = [ - { name: "ie_not_c", pattern: "(^|[^c])ie", desc: "I before E when not preceded by C" } - { name: "ei_not_c", pattern: "(^|[^c])ei", desc: null } - { name: "cei", pattern: "cei", desc: "E before I when preceded by C" } - { name: "cie", pattern: "cie", desc: null } -] - -# Count matches for each pattern functionally -let counts = $patterns | - each { |p| - $p | upsert count ($words | where $it =~ $p.pattern | length) - } - -# Calculate plausibility using match -let results = $counts | - each { |row| - match $row.name { - "ie_not_c" => { - let opposite = ($counts | where name == "ei_not_c" | get count.0) - $row | upsert plausible ($row.count > ($opposite * 2)) - } - "cei" => { - let opposite = ($counts | where name == "cie" | get count.0) - $row | upsert plausible ($row.count > ($opposite * 2)) - } - _ => $row - } - } - -# Format and print results functionally -$results | - where desc != null | - each { |rule| - let opposite = ($results | where name == (if $rule.name == "ie_not_c" { "ei_not_c" } else { "cie" }) | get 0) - [ - $"Analyzing '($rule.desc)':" - $" correct for : ($rule.count)" - $" not correct for : ($opposite.count)" - $" Plausible: ($rule.plausible)" - "" - ] - } | - flatten | - print $in diff --git a/Task/I-before-E-except-after-C/Objeck/i-before-e-except-after-c.objeck b/Task/I-before-E-except-after-C/Objeck/i-before-e-except-after-c.objeck index eb0643dc33..637dc3013a 100644 --- a/Task/I-before-E-except-after-C/Objeck/i-before-e-except-after-c.objeck +++ b/Task/I-before-E-except-after-C/Objeck/i-before-e-except-after-c.objeck @@ -3,7 +3,7 @@ use Collection; class HttpTest { function : Main(args : String[]) ~ Nil { - IsPlausibleRule("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt"); + IsPlausibleRule("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt"); } function : PlausibilityCheck(comment : String, x : Int, y : Int) ~ Bool { diff --git a/Task/I-before-E-except-after-C/Octave/i-before-e-except-after-c.octave b/Task/I-before-E-except-after-C/Octave/i-before-e-except-after-c.octave index 3eb8bf3576..adc2b9f124 100644 --- a/Task/I-before-E-except-after-C/Octave/i-before-e-except-after-c.octave +++ b/Task/I-before-E-except-after-C/Octave/i-before-e-except-after-c.octave @@ -6,27 +6,27 @@ cei = 0; nie = 0; cie = 0; while ~feof(fid) - c = strsplit(strtrim(fgetl(fid)),char([9,32])); - if length(c) > 2, - n = str2num(c{3}); - else - n = 1; - end; - if strfind(c{1},'ei')>1, nei=nei+n; end; - if strfind(c{1},'cei'), cei=cei+n; end; - if strfind(c{1},'ie')>1, nie=nie+n; end; - if strfind(c{1},'cie'), cie=cie+n; end; + c = strsplit(strtrim(fgetl(fid)),char([9,32])); + if length(c) > 2, + n = str2num(c{3}); + else + n = 1; + end; + if strfind(c{1},'ei')>1, nei=nei+n; end; + if strfind(c{1},'cei'), cei=cei+n; end; + if strfind(c{1},'ie')>1, nie=nie+n; end; + if strfind(c{1},'cie'), cie=cie+n; end; end; fclose(fid); printf('cie: %i\nnie: %i\ncei: %i\nnei: %i\n',cie,nie-cie,cei,nei-cei); v = ''; if (nie < 3 * cie) - v=' not'; + v=' not'; end printf('I before E when not preceded by C: is%s plausible\n',v); v = ''; if (nei > 3 * cei) - v=' not'; + v=' not'; end printf('E before I when preceded by C: is%s plausible\n',v); diff --git a/Task/I-before-E-except-after-C/PascalABC.NET/i-before-e-except-after-c.pas b/Task/I-before-E-except-after-C/PascalABC.NET/i-before-e-except-after-c.pas deleted file mode 100644 index 4a3d98472f..0000000000 --- a/Task/I-before-E-except-after-C/PascalABC.NET/i-before-e-except-after-c.pas +++ /dev/null @@ -1,11 +0,0 @@ -// I before E except after C. Nigel Galloway: September 30th., 2024 -type plausibility=(plausible,implausible); -var fN:string->string->integer:=n->g->System.Text.RegularExpressions.Regex.Matches(n,g).count; -var fG:Func->(array of integer)->array of integer:=n->g->g.Zip(|n('ie'),n('ei'),n('cie'),n('cei')|,(n,g)->n+g).ToArray; -begin - var n:=System.IO.File.ReadLines('unixdict.txt').Aggregate(|0,0,0,0|,(n,g)->fG(fN(g))(n)); - println($'I before E except after C is {if n[0]-n[2]>2*n[2] then plausible else implausible}'); - println($'E before I except after C is {if n[1]-n[3]>2*n[3] then plausible else implausible}'); - println($'I before E when after C is {if n[2]>2*n[3] then plausible else implausible}'); - println($'E before I when after C is {if n[3]>2*n[2] then plausible else implausible}'); -end. diff --git a/Task/I-before-E-except-after-C/PowerShell/i-before-e-except-after-c.ps1 b/Task/I-before-E-except-after-C/PowerShell/i-before-e-except-after-c.ps1 deleted file mode 100644 index c3e30c0516..0000000000 --- a/Task/I-before-E-except-after-C/PowerShell/i-before-e-except-after-c.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -$Web = New-Object -TypeName Net.Webclient -$Words = $web.DownloadString('https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt') - -$IE = $EI = $CIE = $CEI = @() - -$Clause1 = $Clause2 = $MainClause = $false - -foreach ($Word in $Words.split()) -{ - switch ($Word) - { - {($_ -like '*ie*') -and ($_ -notlike '*cie*')} {$IE += $Word} - {($_ -like '*ei*') -and ($_ -notlike '*cei*')} {$EI += $Word} - {$_ -like '*cei*'} {$CEI += $Word} - {$_ -like '*cie*'} {$CIE += $Word} - } -} - -if ($IE.count -gt $EI.count * 2) -{$Clause1 = $true} -"The plausibility of 'I before E when not preceded by C' is $Clause1" - -if ($CEI.count -gt $CIE.count * 2) -{$Clause2 = $true} -"The plausibility of 'E before I when preceded by C' is $Clause2" - -if ($Clause1 -and $Clause2) -{$MainClause = $True} -"The plausibility of the phrase 'I before E except after C' is $MainClause" diff --git a/Task/I-before-E-except-after-C/PowerShell/i-before-e-except-after-c.psh b/Task/I-before-E-except-after-C/PowerShell/i-before-e-except-after-c.psh new file mode 100644 index 0000000000..c1c8f167b4 --- /dev/null +++ b/Task/I-before-E-except-after-C/PowerShell/i-before-e-except-after-c.psh @@ -0,0 +1,29 @@ +$Web = New-Object -TypeName Net.Webclient +$Words = $web.DownloadString('http://wiki.puzzlers.org/pub/wordlists/unixdict.txt') + +$IE = $EI = $CIE = $CEI = @() + +$Clause1 = $Clause2 = $MainClause = $false + +foreach ($Word in $Words.split()) +{ + switch ($Word) + { + {($_ -like '*ie*') -and ($_ -notlike '*cie*')} {$IE += $Word} + {($_ -like '*ei*') -and ($_ -notlike '*cei*')} {$EI += $Word} + {$_ -like '*cei*'} {$CEI += $Word} + {$_ -like '*cie*'} {$CIE += $Word} + } +} + +if ($IE.count -gt $EI.count * 2) +{$Clause1 = $true} +"The plausibility of 'I before E when not preceded by C' is $Clause1" + +if ($CEI.count -gt $CIE.count * 2) +{$Clause2 = $true} +"The plausibility of 'E before I when preceded by C' is $Clause2" + +if ($Clause1 -and $Clause2) +{$MainClause = $True} +"The plausibility of the phrase 'I before E except after C' is $MainClause" diff --git a/Task/I-before-E-except-after-C/Python/i-before-e-except-after-c-1.py b/Task/I-before-E-except-after-C/Python/i-before-e-except-after-c-1.py index 081cfb99da..4d00caa257 100644 --- a/Task/I-before-E-except-after-C/Python/i-before-e-except-after-c-1.py +++ b/Task/I-before-E-except-after-C/Python/i-before-e-except-after-c-1.py @@ -17,7 +17,7 @@ def plausibility_check(comment, x, y): % (x, y, x / y)) return x > PLAUSIBILITY_RATIO * y -def simple_stats(url='https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt'): +def simple_stats(url='http://wiki.puzzlers.org/pub/wordlists/unixdict.txt'): words = urllib.request.urlopen(url).read().decode().lower().split() cie = len({word for word in words if 'cie' in word}) cei = len({word for word in words if 'cei' in word}) diff --git a/Task/I-before-E-except-after-C/R/i-before-e-except-after-c.r b/Task/I-before-E-except-after-C/R/i-before-e-except-after-c.r index 8756b79215..aa3ad856c5 100644 --- a/Task/I-before-E-except-after-C/R/i-before-e-except-after-c.r +++ b/Task/I-before-E-except-after-C/R/i-before-e-except-after-c.r @@ -1,4 +1,4 @@ -words = tolower(readLines("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt")) +words = tolower(readLines("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt")) ie.npc = sum(grepl("(?2) )'plausible.' +p2=#.ie.c / max(1, #.ei.c); phrase= '"E before I when preceded by C"' +say mantra phrase ' is ' word("im", 1 + (p2>2) )'plausible.' +po=(p1>2 & p2>2); say 'Overall, it is' word("im", 1 + po)'plausible.' +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +find: arg x; s=1; do forever; _=pos(x, u, s); if _==0 then return + if substr(u, _ - 1 + (_==1)*999, 1)=='C' then #.x.c=#.x.c + 1 + else #.x.z=#.x.z + 1 + s=_ + 1 /*handle the cases of multiple finds. */ + end /*forever*/ diff --git a/Task/I-before-E-except-after-C/REXX/i-before-e-except-after-c-2.rexx b/Task/I-before-E-except-after-C/REXX/i-before-e-except-after-c-2.rexx new file mode 100644 index 0000000000..59c7da9267 --- /dev/null +++ b/Task/I-before-E-except-after-C/REXX/i-before-e-except-after-c-2.rexx @@ -0,0 +1,61 @@ +/*REXX program shows plausibility of "I before E" when not preceded by C, and */ +/*───────────────────────────────────── "E before I" when preceded by C, using a */ +/*───────────────────────────────────── weighted frequency for each word. */ +parse arg iFID wFID . /*obtain optional arguments from the CL*/ +if iFID=='' | iFID=="," then iFID='UNIXDICT.TXT' /*Not specified? Then use the default.*/ +if wFID=='' | wFID=="," then wFID='WORDFREQ.TXT' /* " " " " " " */ +cntl=xrange(, ' ') /*get all manner of tabs, control chars*/ +#.=0 /*zero out the various word counters. */ +f.=1 /*default word frequency multiplier. */ + do recs=0 while lines(wFID)\==0 /*read a record from the file 'til done*/ + u=translate( linein(wFID), , cntl); upper u /*translate various tabs and cntl chars*/ + u=translate(u, '*', "~") /*translate tildes (~) to an asterisk.*/ + if u=='' then iterate /*Is this a blank line? Then ignore it.*/ + freq=word(u, words(u) ) /*obtain the last token on the line. */ + if \datatype(freq, 'W') then iterate /*FREQ not an integer? Then ignore it.*/ + parse var u w.1 '/' w.2 . /*handle case of: ααα/ßßß ··· */ + + do j=1 for 2; w.j=word(w.j, 1) /*strip leading and/or trailing blanks.*/ + _=w.j; if _=='' then iterate /*if not present, then ignore it. */ + if j==2 then if w.2==w.1 then iterate /*second word ≡ first word? Then skip.*/ + #.freqs=#.freqs + 1 /*bump word counter in the FREQ list.*/ + f._=f._ + freq /*add to a word's frequency count. */ + end /*ws*/ + end /*recs*/ /*at exit of DO loop, RECS = # of recs.*/ + +if recs\==0 then say 'lines in the ' wFID " list: " recs +if #.freqs\==0 then say 'words in the ' wFID " list: " #.freqs +if #.freqs ==0 then weighted= + else weighted= ' (weighted)' +say + do r=0 while lines(iFID)\==0 /*keep reading the dictionary 'til done*/ + u=space( linein(iFID), 0); upper u /*elide superfluous blanks and tabs. */ + if u=='' then iterate /*Is it a blank line? Then ignore it.*/ + #.words=#.words + 1 /*keep running count of number of words*/ + one=f.u + if pos('EI', u)\==0 & pos('IE', u)\==0 then #.both=#.both + one /*the word has both*/ + call find 'ie' /*look for ie */ + call find 'ei' /* " " ei */ + end /*r*/ /*at exit of DO loop, R = # of lines.*/ + +L=length(#.words) /*use this to align the output numbers.*/ +say 'lines in the ' iFID ' dictionary: ' r +say 'words in the ' iFID ' dictionary: ' #.words +say +say 'words with "IE" and "EI" (in same word): ' right(#.both, L) weighted +say 'words with "IE" and preceded by "C": ' right(#.ie.c ,L) weighted +say 'words with "IE" and not preceded by "C": ' right(#.ie.z ,L) weighted +say 'words with "EI" and preceded by "C": ' right(#.ei.c ,L) weighted +say 'words with "EI" and not preceded by "C": ' right(#.ei.z ,L) weighted +say; mantra= 'The spelling mantra ' +p1=#.ie.z / max(1, #.ei.z); phrase= '"I before E when not preceded by C"' +say mantra phrase ' is ' word("im", 1 + (p1>2) )'plausible.' +p2=#.ie.c / max(1, #.ei.c); phrase= '"E before I when preceded by C"' +say mantra phrase ' is ' word("im", 1 + (p2>2) )'plausible.' +po=(p1>2 & p2>2); say 'Overall, it is' word("im",1 + po)'plausible.' +exit /*stick a fork in it, we're all done. */ +/*──────────────────────────────────────────────────────────────────────────────────────*/ +find: arg x; s=1; do forever; _=pos(x, u, s); if _==0 then return + if substr(u, _ - 1 + (_==1)*999, 1)=='C' then #.x.c=#.x.c + one + else #.x.z=#.x.z + one + s=_ + 1 /*handle the cases of multiple finds. */ diff --git a/Task/I-before-E-except-after-C/REXX/i-before-e-except-after-c.rexx b/Task/I-before-E-except-after-C/REXX/i-before-e-except-after-c.rexx deleted file mode 100644 index febe0ab972..0000000000 --- a/Task/I-before-E-except-after-C/REXX/i-before-e-except-after-c.rexx +++ /dev/null @@ -1,59 +0,0 @@ --- 10 Nov 2025 -include Setting - -say 'I BEFORE E AFTER C' -say version -say -call UnixDict -call Show -exit - -UnixDict: -file='UnixDict.txt' -say 'Process' file'...' -n=0; cie=0; cei=0; xie=0; xei=0 -do while Lines(file) > 0 - line=Lower(Linein(file)); n+=1 - a=Pos('ie',line) - if a>0 then do - a+=99*(a<2) - if Substr(line,a-1,1)='c' then - cie+=1 - else - xie+=1 - end - a=Pos('ei',line) - if a>0 then do - a+=99*(a<2) - if Substr(line,a-1,1)='c' then - cei+=1 - else - xei+=1 - end -end -say n 'Lines processed' -say -return - -Show: -say 'IE preceded by C occurs' cie 'times' -say 'EI preceded by C occurs' cei 'times' -say 'IE not preceded by C occurs' xie 'times' -say 'EI not preceded by C occurs' xei 'times' -say -ie=(2*xie<=cie); ei=(2*cei<=xei) -call Charout ,'I before E when not preceded by C is ' -if ie then - call Charout ,'not ' -say 'plausible' -call Charout ,'E before I when preceded by C is ' -if ei then - call Charout ,'not ' -say 'plausible' -call Charout ,'I before E except after C is ' -if ie | ei then - call Charout ,'not ' -say 'plausible' -return - -include Abend diff --git a/Task/I-before-E-except-after-C/Rebol/i-before-e-except-after-c.rebol b/Task/I-before-E-except-after-C/Rebol/i-before-e-except-after-c.rebol deleted file mode 100644 index 53e916ca1b..0000000000 --- a/Task/I-before-E-except-after-C/Rebol/i-before-e-except-after-c.rebol +++ /dev/null @@ -1,50 +0,0 @@ -Rebol [ - title: "Rosetta code: I before E except after C" - file: %I_before_E_except_after_C.r3 - url: https://rosettacode.org/wiki/I_before_E_except_after_C - note: "Based on Red language solution" - needs: 3.15.0 ;; or something like that -] - -testlist: function [wordlist /wfreq] [ - ;; Initialize counters for each pattern - cie: cei: ie: ei: 0 - - ;; Select iteration mode: if /wfreq, expect [word freq] pairs; else assume word-only - words: either wfreq [[word freq]][freq: 1 [word]] - - ;; Loop through each word or [word freq] pair in the list - foreach :words wordlist [ - ;; Use PARSE to search for each pattern within the word string - parse word [ some [ - "cie" (cie: cie + freq) | ;; Count "cie" and increment by frequency - "cei" (cei: cei + freq) | ;; Count "cei" and increment by frequency - "ie" ( ie: ie + freq) | ;; Count standalone "ie" not preceded by c - "ei" ( ei: ei + freq) | ;; Count standalone "ei" not preceded by c - skip - ]] - ] - ;; Print results, comparing "i before e except after c" rule against pattern frequencies - print rejoin [ - "i is before e " ie " times, and also " cie " times following c.^/" - "i is after e " ei " times, and also " cei " times following c.^/" - "Hence ^"i before e^" is " either a: 2 * ei < ie [""] ["not "] "plausible,^/" - "while ^"except after c^" is " either b: 2 * cie < cei [""] ["not "] "plausible.^/" - "Overall the rule is " either a and b [""] ["not "] "plausible." - ] -] - -print "Results for unixdict.txt:" -testlist read/lines %unixdict.txt - -print "^/Results for British National Corpus:" -bnc: next read/lines %1_2_all_freq.txt -spaces: charset "^- " -bnclist: collect [ - foreach w bnc [ - if 3 = length? seq: split trim w spaces [ - keep seq/1 keep to-integer seq/3 - ] - ] -] -testlist/wfreq bnclist diff --git a/Task/I-before-E-except-after-C/Red/i-before-e-except-after-c.red b/Task/I-before-E-except-after-C/Red/i-before-e-except-after-c.red index 4589f32f1b..b7e21dc1e8 100644 --- a/Task/I-before-E-except-after-C/Red/i-before-e-except-after-c.red +++ b/Task/I-before-E-except-after-C/Red/i-before-e-except-after-c.red @@ -1,33 +1,33 @@ Red ["i before e except after c"] testlist: function [wordlist /wfreq] [ - cie: cei: ie: ei: 0 - if not wfreq [forall wordlist [insert wordlist: next wordlist 1]] - foreach [word freq] wordlist [ - parse word [ some [ - "cie" (cie: cie + freq) | - "cei" (cei: cei + freq) | - "ie" (ie: ie + freq) | - "ei" (ei: ei + freq) | - skip - ]] - ] - print rejoin [ - "i is before e " ie " times, and also " cie " times following c.^/" - "i is after e " ei " times, and also " cei " times following c.^/" - "Hence ^"i before e^" is " either a: 2 * ei < ie [""] ["not "] "plausible,^/" - "while ^"except after c^" is " either b: 2 * cie < cei [""] ["not "] "plausible.^/" - "Overall the rule is " either a and b [""] ["not "] "plausible."] + cie: cei: ie: ei: 0 + if not wfreq [forall wordlist [insert wordlist: next wordlist 1]] + foreach [word freq] wordlist [ + parse word [ some [ + "cie" (cie: cie + freq) | + "cei" (cei: cei + freq) | + "ie" (ie: ie + freq) | + "ei" (ei: ei + freq) | + skip + ]] + ] + print rejoin [ + "i is before e " ie " times, and also " cie " times following c.^/" + "i is after e " ei " times, and also " cei " times following c.^/" + "Hence ^"i before e^" is " either a: 2 * ei < ie [""] ["not "] "plausible,^/" + "while ^"except after c^" is " either b: 2 * cie < cei [""] ["not "] "plausible.^/" + "Overall the rule is " either a and b [""] ["not "] "plausible."] ] print "Results for unixdict.txt:" -testlist read/lines https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt +testlist read/lines http://wiki.puzzlers.org/pub/wordlists/unixdict.txt print "^/Results for British National Corpus:" bnc: next read/lines %1_2_all_freq.txt spaces: charset "^- " -bnclist: collect [ foreach w bnc [ - if 3 = length? seq: split trim w spaces [ - keep seq/1 keep to-integer seq/3 +bnclist: collect [ foreach w bnc [ + if 3 = length? seq: split trim w spaces [ + keep seq/1 keep to-integer seq/3 ]]] testlist/wfreq bnclist diff --git a/Task/I-before-E-except-after-C/Ruby/i-before-e-except-after-c.rb b/Task/I-before-E-except-after-C/Ruby/i-before-e-except-after-c.rb index 8c07c86b90..566bf86072 100644 --- a/Task/I-before-E-except-after-C/Ruby/i-before-e-except-after-c.rb +++ b/Task/I-before-E-except-after-C/Ruby/i-before-e-except-after-c.rb @@ -2,7 +2,7 @@ require 'open-uri' plausibility_ratio = 2 counter = Hash.new(0) -path = 'https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt' +path = 'http://wiki.puzzlers.org/pub/wordlists/unixdict.txt' rules = [['I before E when not preceded by C:', 'ie', 'ei'], ['E before I when preceded by C:', 'cei', 'cie']] diff --git a/Task/I-before-E-except-after-C/Rust/i-before-e-except-after-c.rs b/Task/I-before-E-except-after-C/Rust/i-before-e-except-after-c.rs deleted file mode 100644 index f1f0733b63..0000000000 --- a/Task/I-before-E-except-after-C/Rust/i-before-e-except-after-c.rs +++ /dev/null @@ -1,79 +0,0 @@ -use std::default::Default; -use std::ops::AddAssign; - -use itertools::Itertools; -use reqwest::get; - -#[derive(Default, Debug)] -struct Feature { - pub cie: T, - pub xie: T, - pub cei: T, - pub xei: T, -} - -impl AddAssign> for Feature { - fn add_assign(&mut self, rhs: Feature) { - self.cei += rhs.cei as u64; - self.xei += rhs.xei as u64; - self.cie += rhs.cie as u64; - self.xie += rhs.xie as u64; - } -} - -fn check_feature(word: &str) -> Feature { - let mut feature: Feature = Default::default(); - - for window in word.chars().tuple_windows::<(char, char, char)>() { - match window { - ('c', 'e', 'i') => { feature.cei = true } - ('c', 'i', 'e') => { feature.cie = true } - (not_c, 'e', 'i') if not_c != 'c' => (feature.xei = true), - (not_c, 'i', 'e') if not_c != 'c' => (feature.xie = true), - _ => {} - } - } - - feature -} - - -fn maybe_is_feature_plausible(feature_count: u64, opposing_count: u64) -> Option { - if feature_count > 2 * opposing_count { Some(true) } else if opposing_count > 2 * feature_count { Some(false) } else { None } -} - -fn print_feature_plausibility(feature_plausibility: Option, feature_name: &str) { - let plausible_msg = - match feature_plausibility { - None => " is implausible", - Some(true) => "is plausible", - Some(false) => "is definitely implausible", - }; - - println!("{} {}", feature_name, plausible_msg) -} - -fn main() { - let mut res = get(" https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").unwrap(); - let texts = res.text().unwrap(); - - let mut feature_count: Feature = Default::default(); - for word in texts.lines() { - let feature = check_feature(word); - feature_count += feature; - } - - println!("Counting {:#?}", feature_count); - - let xie_plausibility = - maybe_is_feature_plausible(feature_count.xie, feature_count.cie); - let cei_plausibility = - maybe_is_feature_plausible(feature_count.cei, feature_count.xei); - - print_feature_plausibility(xie_plausibility, "I before E when not preceded by C"); - print_feature_plausibility(cei_plausibility, "E before I when preceded by C"); - println!("The rule in general is {}", - if xie_plausibility.unwrap_or(false) && cei_plausibility.unwrap_or(false) - { "Plausible" } else { "Implausible" } - ); -} diff --git a/Task/I-before-E-except-after-C/Rust/i-before-e-except-after-c.rust b/Task/I-before-E-except-after-C/Rust/i-before-e-except-after-c.rust new file mode 100644 index 0000000000..8682f51edb --- /dev/null +++ b/Task/I-before-E-except-after-C/Rust/i-before-e-except-after-c.rust @@ -0,0 +1,79 @@ +use std::default::Default; +use std::ops::AddAssign; + +use itertools::Itertools; +use reqwest::get; + +#[derive(Default, Debug)] +struct Feature { + pub cie: T, + pub xie: T, + pub cei: T, + pub xei: T, +} + +impl AddAssign> for Feature { + fn add_assign(&mut self, rhs: Feature) { + self.cei += rhs.cei as u64; + self.xei += rhs.xei as u64; + self.cie += rhs.cie as u64; + self.xie += rhs.xie as u64; + } +} + +fn check_feature(word: &str) -> Feature { + let mut feature: Feature = Default::default(); + + for window in word.chars().tuple_windows::<(char, char, char)>() { + match window { + ('c', 'e', 'i') => { feature.cei = true } + ('c', 'i', 'e') => { feature.cie = true } + (not_c, 'e', 'i') if not_c != 'c' => (feature.xei = true), + (not_c, 'i', 'e') if not_c != 'c' => (feature.xie = true), + _ => {} + } + } + + feature +} + + +fn maybe_is_feature_plausible(feature_count: u64, opposing_count: u64) -> Option { + if feature_count > 2 * opposing_count { Some(true) } else if opposing_count > 2 * feature_count { Some(false) } else { None } +} + +fn print_feature_plausibility(feature_plausibility: Option, feature_name: &str) { + let plausible_msg = + match feature_plausibility { + None => " is implausible", + Some(true) => "is plausible", + Some(false) => "is definitely implausible", + }; + + println!("{} {}", feature_name, plausible_msg) +} + +fn main() { + let mut res = get(" http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").unwrap(); + let texts = res.text().unwrap(); + + let mut feature_count: Feature = Default::default(); + for word in texts.lines() { + let feature = check_feature(word); + feature_count += feature; + } + + println!("Counting {:#?}", feature_count); + + let xie_plausibility = + maybe_is_feature_plausible(feature_count.xie, feature_count.cie); + let cei_plausibility = + maybe_is_feature_plausible(feature_count.cei, feature_count.xei); + + print_feature_plausibility(xie_plausibility, "I before E when not preceded by C"); + print_feature_plausibility(cei_plausibility, "E before I when preceded by C"); + println!("The rule in general is {}", + if xie_plausibility.unwrap_or(false) && cei_plausibility.unwrap_or(false) + { "Plausible" } else { "Implausible" } + ); +} diff --git a/Task/I-before-E-except-after-C/Scala/i-before-e-except-after-c.scala b/Task/I-before-E-except-after-C/Scala/i-before-e-except-after-c.scala index 2a27cab5c3..f1455bf125 100644 --- a/Task/I-before-E-except-after-C/Scala/i-before-e-except-after-c.scala +++ b/Task/I-before-E-except-after-C/Scala/i-before-e-except-after-c.scala @@ -7,7 +7,7 @@ object I_before_E_except_after_C extends App { val testCEI2 = "(^|[^c])ei".r // e before i when not preceded by c var countsCEI = (0,0) - scala.io.Source.fromURL("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").getLines.map(_.toLowerCase).foreach{word => + scala.io.Source.fromURL("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt").getLines.map(_.toLowerCase).foreach{word => if (testIE1.findFirstIn(word).isDefined) countsIE = (countsIE._1 + 1, countsIE._2) if (testIE2.findFirstIn(word).isDefined) countsIE = (countsIE._1, countsIE._2 + 1) if (testCEI1.findFirstIn(word).isDefined) countsCEI = (countsCEI._1 + 1, countsCEI._2) diff --git a/Task/I-before-E-except-after-C/Swift/i-before-e-except-after-c.swift b/Task/I-before-E-except-after-C/Swift/i-before-e-except-after-c.swift index 14028c69b2..ed3120606c 100644 --- a/Task/I-before-E-except-after-C/Swift/i-before-e-except-after-c.swift +++ b/Task/I-before-E-except-after-C/Swift/i-before-e-except-after-c.swift @@ -1,6 +1,6 @@ import Foundation -let request = NSURLRequest(URL: NSURL(string: "https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt")!) +let request = NSURLRequest(URL: NSURL(string: "http://wiki.puzzlers.org/pub/wordlists/unixdict.txt")!) NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue()) {res, data, err in if (data != nil) { diff --git a/Task/I-before-E-except-after-C/TUSCRIPT/i-before-e-except-after-c.tu b/Task/I-before-E-except-after-C/TUSCRIPT/i-before-e-except-after-c.tu index e0b0fd9e71..736ae22160 100644 --- a/Task/I-before-E-except-after-C/TUSCRIPT/i-before-e-except-after-c.tu +++ b/Task/I-before-E-except-after-C/TUSCRIPT/i-before-e-except-after-c.tu @@ -1,5 +1,5 @@ $$ MODE TUSCRIPT,{} -words=REQUEST("https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt") +words=REQUEST("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt") size=SIZE(words) ieei=cie=xie=cei=xei=0 diff --git a/Task/I-before-E-except-after-C/Tcl/i-before-e-except-after-c.tcl b/Task/I-before-E-except-after-C/Tcl/i-before-e-except-after-c.tcl index a3199937e3..e0a7b5692f 100644 --- a/Task/I-before-E-except-after-C/Tcl/i-before-e-except-after-c.tcl +++ b/Task/I-before-E-except-after-C/Tcl/i-before-e-except-after-c.tcl @@ -5,24 +5,24 @@ proc plausible {description x y} { variable PLAUSIBILITY_RATIO puts " Checking plausibility of: $description" if {$x > $PLAUSIBILITY_RATIO * $y} { - set conclusion "PLAUSIBLE" - set fmt "As we have counts of %i vs %i words, a ratio of %.1f times" - set result true + set conclusion "PLAUSIBLE" + set fmt "As we have counts of %i vs %i words, a ratio of %.1f times" + set result true } elseif {$x > $y} { - set conclusion "IMPLAUSIBLE" - set fmt "As although we have counts of %i vs %i words," - append fmt " a ratio of %.1f times does not make it plausible" - set result false + set conclusion "IMPLAUSIBLE" + set fmt "As although we have counts of %i vs %i words," + append fmt " a ratio of %.1f times does not make it plausible" + set result false } else { - set conclusion "IMPLAUSIBLE, probably contra-indicated" - set fmt "As we have counts of %i vs %i words, a ratio of %.1f times" - set result false + set conclusion "IMPLAUSIBLE, probably contra-indicated" + set fmt "As we have counts of %i vs %i words, a ratio of %.1f times" + set result false } puts [format " %s.\n $fmt" $conclusion $x $y [expr {double($x)/$y}]] return $result } -set t [http::geturl https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt] +set t [http::geturl http://wiki.puzzlers.org/pub/wordlists/unixdict.txt] set words [split [http::data $t] "\n"] http::cleanup $t foreach {name pattern} {ie (?:^|[^c])ie ei (?:^|[^c])ei cie cie cei cei} { @@ -39,4 +39,4 @@ if { puts "\nOVERALL IT IS IMPLAUSIBLE!" } puts "\n(To be plausible, one word count must exceed another by\ - $PLAUSIBILITY_RATIO times)" + $PLAUSIBILITY_RATIO times)" diff --git a/Task/I-before-E-except-after-C/V-(Vlang)/i-before-e-except-after-c.v b/Task/I-before-E-except-after-C/V-(Vlang)/i-before-e-except-after-c.v index 1f88bdbb7a..e677b3c2fa 100644 --- a/Task/I-before-E-except-after-C/V-(Vlang)/i-before-e-except-after-c.v +++ b/Task/I-before-E-except-after-C/V-(Vlang)/i-before-e-except-after-c.v @@ -2,26 +2,26 @@ import os import strconv fn main() { - mut cei, mut cie, mut ie, mut ei := f32(0), f32(0), f32(0), f32(0) + mut cei, mut cie, mut ie, mut ei := f32(0), f32(0), f32(0), f32(0) unixdict := os.read_file('./unixdict.txt') or {println('Error: file not found') exit(1)} - words := unixdict.split_into_lines() - println("The number of words in unixdict: ${words.len}") - for word in words { - cei += word.count('cei') - cie += word.count('cie') - ei += word.count('ei') - ie += word.count('ie') - } - print("Rule: 'e' before 'i' when preceded by 'c' at the ratio of ") - print("${strconv.f64_to_str_lnd1((cei / cie), 2)} is ") - if cei > cie {println("plausible.")} else {println("implausible.")} - println("$cei cases for and $cie cases against.") + words := unixdict.split_into_lines() + println("The number of words in unixdict: ${words.len}") + for word in words { + cei += word.count('cei') + cie += word.count('cie') + ei += word.count('ei') + ie += word.count('ie') + } + print("Rule: 'e' before 'i' when preceded by 'c' at the ratio of ") + print("${strconv.f64_to_str_lnd1((cei / cie), 2)} is ") + if cei > cie {println("plausible.")} else {println("implausible.")} + println("$cei cases for and $cie cases against.") - print("Rule: 'i' before 'e' except after 'c' at the ratio of ") - print("${strconv.f64_to_str_lnd1(((ie - cie) / (ei - cei)), 2)} is ") - if ie > ei {println("plausible.")} else {println("implausible.")} - println("${(ie - cie)} cases for and ${(ei - cei)} cases against.") + print("Rule: 'i' before 'e' except after 'c' at the ratio of ") + print("${strconv.f64_to_str_lnd1(((ie - cie) / (ei - cei)), 2)} is ") + if ie > ei {println("plausible.")} else {println("implausible.")} + println("${(ie - cie)} cases for and ${(ei - cei)} cases against.") - print("Overall the rules are ") - if cei > cie && ie > ei {println("plausible.")} else {println("implausible.")} + print("Overall the rules are ") + if cei > cie && ie > ei {println("plausible.")} else {println("implausible.")} } diff --git a/Task/I-before-E-except-after-C/VBScript/i-before-e-except-after-c.vb b/Task/I-before-E-except-after-C/VBScript/i-before-e-except-after-c.vb new file mode 100644 index 0000000000..41f01c4eba --- /dev/null +++ b/Task/I-before-E-except-after-C/VBScript/i-before-e-except-after-c.vb @@ -0,0 +1,48 @@ +Set objFSO = CreateObject("Scripting.FileSystemObject") +Set srcFile = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) &_ + "\unixdict.txt",1,False,0) + +cei = 0 : cie = 0 : ei = 0 : ie = 0 + +Do Until srcFile.AtEndOfStream + word = srcFile.ReadLine + If InStr(word,"cei") Then + cei = cei + 1 + ElseIf InStr(word,"cie") Then + cie = cie + 1 + ElseIf InStr(word,"ei") Then + ei = ei + 1 + ElseIf InStr(word,"ie") Then + ie = ie + 1 + End If +Loop + +FirstClause = False +SecondClause = False +Overall = False + +'testing the first clause +If ie > ei*2 Then + WScript.StdOut.WriteLine "I before E when not preceded by C is plausible." + FirstClause = True +Else + WScript.StdOut.WriteLine "I before E when not preceded by C is NOT plausible." +End If + +'testing the second clause +If cei > cie*2 Then + WScript.StdOut.WriteLine "E before I when not preceded by C is plausible." + SecondClause = True +Else + WScript.StdOut.WriteLine "E before I when not preceded by C is NOT plausible." +End If + +'overall clause +If FirstClause And SecondClause Then + WScript.StdOut.WriteLine "Overall it is plausible." +Else + WScript.StdOut.WriteLine "Overall it is NOT plausible." +End If + +srcFile.Close +Set objFSO = Nothing diff --git a/Task/I-before-E-except-after-C/VBScript/i-before-e-except-after-c.vbs b/Task/I-before-E-except-after-C/VBScript/i-before-e-except-after-c.vbs deleted file mode 100644 index 411c9183c1..0000000000 --- a/Task/I-before-E-except-after-C/VBScript/i-before-e-except-after-c.vbs +++ /dev/null @@ -1,48 +0,0 @@ -Set objFSO = CreateObject("Scripting.FileSystemObject") -Set srcFile = objFSO.OpenTextFile(objFSO.GetParentFolderName(WScript.ScriptFullName) &_ - "\unixdict.txt",1,False,0) - -cei = 0 : cie = 0 : ei = 0 : ie = 0 - -Do Until srcFile.AtEndOfStream - word = srcFile.ReadLine - If InStr(word,"cei") Then - cei = cei + 1 - ElseIf InStr(word,"cie") Then - cie = cie + 1 - ElseIf InStr(word,"ei") Then - ei = ei + 1 - ElseIf InStr(word,"ie") Then - ie = ie + 1 - End If -Loop - -FirstClause = False -SecondClause = False -Overall = False - -'testing the first clause -If ie > ei*2 Then - WScript.StdOut.WriteLine "I before E when not preceded by C is plausible." - FirstClause = True -Else - WScript.StdOut.WriteLine "I before E when not preceded by C is NOT plausible." -End If - -'testing the second clause -If cei > cie*2 Then - WScript.StdOut.WriteLine "E before I when not preceded by C is plausible." - SecondClause = True -Else - WScript.StdOut.WriteLine "E before I when not preceded by C is NOT plausible." -End If - -'overall clause -If FirstClause And SecondClause Then - WScript.StdOut.WriteLine "Overall it is plausible." -Else - WScript.StdOut.WriteLine "Overall it is NOT plausible." -End If - -srcFile.Close -Set objFSO = Nothing diff --git a/Task/I-before-E-except-after-C/Visual-Basic-.NET/i-before-e-except-after-c.vb b/Task/I-before-E-except-after-C/Visual-Basic-.NET/i-before-e-except-after-c.vb index 60ee3a0d15..2b5d1a8478 100644 --- a/Task/I-before-E-except-after-C/Visual-Basic-.NET/i-before-e-except-after-c.vb +++ b/Task/I-before-E-except-after-C/Visual-Basic-.NET/i-before-e-except-after-c.vb @@ -9,7 +9,7 @@ Imports System.Text.RegularExpressions Module Program ' Supports both local and remote files - Const WORDLIST_URI = "https://web.archive.org/web/20240920144647if_/http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" + Const WORDLIST_URI = "http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" ' The support factor of a word for EI or IE is the number of occurrences that support the rule minus the number that oppose it. diff --git a/Task/I-before-E-except-after-C/XPL0/i-before-e-except-after-c.xpl0 b/Task/I-before-E-except-after-C/XPL0/i-before-e-except-after-c.xpl0 deleted file mode 100644 index 4c9870b998..0000000000 --- a/Task/I-before-E-except-after-C/XPL0/i-before-e-except-after-c.xpl0 +++ /dev/null @@ -1,32 +0,0 @@ -include xpllib; \for StrFind and Print -int I, Ch, CI, XI, CE, XE; -char Word(100); \(longest word in unixdict.txt is 22 chars) -[FSet(FOpen("unixdict.txt", 0), ^I); \open dictionary and set it to device 3 -OpenI(3); -repeat I:= 0; - loop [Ch:= ChIn(3); - if Ch=LF or Ch=EOF then quit; - Word(I):= Ch; - I:= I+1; - ]; - Word(I):= 0; \terminate string - - if StrFind(Word, "ie") then - if StrFind(Word, "cie") then CI:= CI+1 else XI:= XI+1; - if StrFind(Word, "ei") then - if StrFind(Word, "cei") then CE:= CE+1 else XE:= XE+1; -until Ch = EOF; - -Print("CIE: %d\n", CI); -Print("xIE: %d\n", XI); -Print("CEI: %d\n", CE); -Print("xEI: %d\n\n", XE); - -Print("I before E when not preceded by C: "); -if 2*XI < CI then Print("not "); -Print("plausible.\n"); - -Print("E before I when preceded by C: "); -if 2*CI < XE then Print("not "); -Print("plausible.\n"); -] diff --git a/Task/I-before-E-except-after-C/Yabasic/i-before-e-except-after-c.basic b/Task/I-before-E-except-after-C/Yabasic/i-before-e-except-after-c.basic index fde65240f8..65f3fa6df9 100644 --- a/Task/I-before-E-except-after-C/Yabasic/i-before-e-except-after-c.basic +++ b/Task/I-before-E-except-after-C/Yabasic/i-before-e-except-after-c.basic @@ -3,11 +3,11 @@ open "unixdict.txt" for reading as #1 repeat line input #1 pal$ if instr(pal$, "ie") then - if instr(pal$, "cie") then CI = CI + 1 else XI = XI + 1 : fi - endif + if instr(pal$, "cie") then CI = CI + 1 else XI = XI + 1 : fi + endif if instr(pal$, "ei") then - if instr(pal$, "cei") then CE = CE + 1 else XE = XE + 1 : fi - endif + if instr(pal$, "cei") then CE = CE + 1 else XE = XE + 1 : fi + endif until eof(1) close #1 diff --git a/Task/IBAN/ALGOL-68/iban.alg b/Task/IBAN/ALGOL-68/iban.alg deleted file mode 100644 index 93dc56bbc2..0000000000 --- a/Task/IBAN/ALGOL-68/iban.alg +++ /dev/null @@ -1,104 +0,0 @@ -BEGIN # validate IBAN numbers # - - # country code and expected bank account length for IBAN codes # - MODE IBANCOUNTRY = STRUCT( [ 1 : 2 ]CHAR code, INT length ); - - []IBANCOUNTRY country info = - ( ("AL",28), ("AD",24), ("AT",20), ("AZ",28), ("BE",16), ("BH",22), ("BA",20), ("BR",29) - , ("BG",22), ("CR",21), ("HR",21), ("CY",28), ("CZ",24), ("DK",18), ("DO",28), ("EE",20) - , ("FO",18), ("FI",18), ("FR",27), ("GE",22), ("DE",22), ("GI",23), ("GR",27), ("GL",18) - , ("GT",28), ("HU",28), ("IS",26), ("IE",22), ("IL",23), ("IT",27), ("KZ",20), ("KW",30) - , ("LV",21), ("LB",28), ("LI",21), ("LT",20), ("LU",20), ("MK",19), ("MT",31), ("MR",27) - , ("MU",30), ("MC",27), ("MD",24), ("ME",22), ("NL",18), ("NO",15), ("PK",24), ("PS",29) - , ("PL",28), ("PT",25), ("RO",24), ("SM",27), ("SA",24), ("RS",22), ("SK",24), ("SI",19) - , ("ES",24), ("SE",24), ("CH",21), ("TN",24), ("TR",26), ("AE",23), ("GB",22), ("VG",24) - ); - - # returns "" if s could be a valid IBAN, an error message otherwise # - OP POSSIBLEIBAN = ( STRING s )STRING: - BEGIN - BOOL is valid := TRUE; - STRING result := ""; - # remove spaces and check we only have digits and spaces # - STRING iban := ""; - FOR s pos FROM LWB s TO UPB s WHILE is valid DO - CHAR c = s[ s pos ]; - IF c /= " " THEN - IF NOT ( is valid := ( c >= "A" AND c <= "Z" ) OR ( c >= "0" AND c <= "9" ) ) - THEN result := "Invalid character: " + c - FI; - iban +:= c - FI - OD; - IF is valid THEN - # OK so far - check the length matches the country code # - INT supplied length = ( UPB iban - LWB iban ) + 1; - is valid := FALSE; - IF supplied length <= 4 - THEN result := "Code is too short" - ELSE # enough characters for a country code and a check sum # - INT expected length := -1; - STRING supplied country = iban[ LWB iban : LWB iban + 1 ]; - FOR c pos FROM LWB country info TO UPB country info WHILE NOT is valid DO - IF is valid := code OF country info[ c pos ] = supplied country THEN - expected length := length OF country info[ c pos ] - FI - OD; - IF NOT is valid - THEN result := "Not a known IBAN country: " + supplied country - ELIF NOT ( is valid := expected length = supplied length ) - THEN result := "Expected code length: " + whole( expected length, 0 ) - + " but actual length is: " + whole( supplied length, 0 ) - ELSE # OK so far - check the checksum # - STRING rearranged iban = iban[ LWB iban + 4 : ] + iban[ LWB iban : LWB iban + 3 ]; - LONG LONG INT numeric iban := 0; - FOR c pos FROM LWB rearranged iban TO UPB rearranged iban DO - CHAR c = rearranged iban[ c pos ]; - IF c >= "0" AND c <= "9" THEN - numeric iban *:= 10 +:= ( ABS c - ABS "0" ) - ELSE - numeric iban *:= 100 +:= ( ABS c - ABS "A" ) + 10 - FI - OD; - IF NOT ( is valid := numeric iban MOD 97 = 1 ) - THEN result := "Incorrect checksum" - FI - FI - FI - FI; - IF is valid THEN "" ELIF result = "" THEN "Unknown error" ELSE result FI - END # POSSIBLEIBAN # ; - - BEGIN # tests # - []STRING valid codes = ( "GB82 WEST 1234 5698 7654 32", "GB82WEST12345698765432" - , "GR16 0110 1250 0000 0001 2300 695", "GB29 NWBK 6016 1331 9268 19" - , "SA03 8000 0000 6080 1016 7519", "CH93 0076 2011 6238 5295 7" - , "IL62 0108 0000 0009 9999 999" - ); - []STRING invalid codes = ( "gb82 west 1234 5698 7654 32" # invalid characters # - , "GB82 TEST 1234 5698 7654 32" # invalid check digits # - , "IL62-0108-0000-0009-9999-999" # invalid characters # - , "US12 3456 7890 0987 6543 210" # invalid country code # - , "GR16 0110 1250 0000 0001 2300 695X" # invalid code length # - , "" # code is too short # - , "G2" # code is too short # - , "GB271" # invalid code length # - ); - FOR t pos FROM LWB valid codes TO UPB valid codes DO - STRING code = valid codes[ t pos ]; - STRING message = POSSIBLEIBAN code; - IF message = "" - THEN print( ( "Possible IBAN: ", code, newline ) ) - ELSE print( ( "INVALID IBAN: ", code, ": UNEXPECTED ERROR: ", message, newline ) ) - FI - OD; - FOR t pos FROM LWB invalid codes TO UPB invalid codes DO - STRING code = invalid codes[ t pos ]; - STRING message = POSSIBLEIBAN code; - IF message = "" - THEN print( ( "POSSIBLE IBAN: ", code, " BUT EXPECTED AN ERROR MESSAGE", newline ) ) - ELSE print( ( "Invalid IBAN: ", code, ": ", message, newline ) ) - FI - OD - END -END diff --git a/Task/IBAN/Ada/iban-1.adb b/Task/IBAN/Ada/iban-1.ada similarity index 100% rename from Task/IBAN/Ada/iban-1.adb rename to Task/IBAN/Ada/iban-1.ada diff --git a/Task/IBAN/Ada/iban-2.adb b/Task/IBAN/Ada/iban-2.ada similarity index 100% rename from Task/IBAN/Ada/iban-2.adb rename to Task/IBAN/Ada/iban-2.ada diff --git a/Task/IBAN/Ada/iban-3.adb b/Task/IBAN/Ada/iban-3.ada similarity index 100% rename from Task/IBAN/Ada/iban-3.adb rename to Task/IBAN/Ada/iban-3.ada diff --git a/Task/IBAN/BQN/iban.bqn b/Task/IBAN/BQN/iban.bqn deleted file mode 100644 index b2f46623bc..0000000000 --- a/Task/IBAN/BQN/iban.bqn +++ /dev/null @@ -1,4 +0,0 @@ -sym ← ∾"0A"+⟜↕¨10‿26 -CheckIBAN ← 1=·(97|⊣+(10⋆1+>⟜9)⊸×)´∘⌽4⌽36(>/⊢)sym⊸⊐ - -CheckIBAN "GB82 WEST 1234 5698 7654 32" diff --git a/Task/IBAN/COBOL/iban.cob b/Task/IBAN/COBOL/iban.cobol similarity index 100% rename from Task/IBAN/COBOL/iban.cob rename to Task/IBAN/COBOL/iban.cobol diff --git a/Task/IBAN/EasyLang/iban.easy b/Task/IBAN/EasyLang/iban.easy deleted file mode 100644 index 161c31d836..0000000000 --- a/Task/IBAN/EasyLang/iban.easy +++ /dev/null @@ -1,63 +0,0 @@ -cc$[] = [ "AD" "AE" "AL" "AO" "AT" "AZ" "BA" "BE" "BF" "BG" "BH" "BI" "BJ" "BR" "CG" "CH" "CI" "CM" "CR" "CV" "CY" "CZ" "DE" "DK" "DO" "DZ" "EE" "EG" "ES" "FI" "FO" "FR" "GA" "GB" "GE" "GI" "GL" "GR" "GT" "HR" "HU" "IE" "IL" "IR" "IS" "IT" "JO" "KW" "KZ" "LB" "LI" "LT" "LU" "LV" "MC" "MD" "ME" "MG" "MK" "ML" "MR" "MT" "MU" "MZ" "NL" "NO" "PK" "PL" "PS" "PT" "QA" "RO" "RS" "SA" "SE" "SI" "SK" "SM" "SN" "TN" "TR" "UA" "VG" ] -ln[] = [ 24 23 28 25 20 28 20 16 27 22 22 16 28 29 27 21 28 27 21 25 28 24 22 18 28 24 20 27 24 18 18 27 27 22 22 23 18 27 28 21 28 22 23 26 26 27 30 30 20 28 21 20 20 21 27 24 22 27 19 28 27 31 30 25 18 15 24 28 29 25 29 24 22 24 24 19 24 27 28 24 26 29 24 ] -# -func validcc iban$ . - c$ = substr iban$ 1 2 - for i to len cc$[] - if c$ = cc$[i] - return if len iban$ = ln[i] - . - . - return 0 -. -func mod97 s$ . - while s$ <> "" - h$ = r div 10 - h$ &= r mod 10 - h$ &= substr s$ 1 13 - s$ = substr s$ 14 9999 - r = number h$ mod 97 - . - return r -. -func isvalid hiban$ . - for c$ in strchars hiban$ - c = strcode c$ - if c > 32 - if c >= 97 and c < 122 - c -= 32 - c$ = strchar c - elif c < 48 or c > 57 and c < 65 or c > 90 - return 0 - . - miban$ &= c$ - . - . - if validcc miban$ = 0 - return 0 - . - for c$ in strchars substr miban$ 5 999 & substr miban$ 1 4 - c = strcode c$ - if c >= 65 and c <= 90 - t$ &= (c - 55) div 10 - t$ &= (c - 55) mod 10 - else - t$ &= c$ - . - . - return if mod97 t$ = 1 -. -proc check s$ . - write s$ & " is " - if isvalid s$ = 1 - print "valid" - else - print "not valid" - . -. -check "GB82 WEST 1234 5698 7654 32" -check "GB82WEST12345698765432" -check "gb82 west 1234 5698 7654 32" -check "GB82 TEST 1234 5698 7654 32" -check "GB82 WEST 1243 5698 7654 32" -check "GB82 west 1243 5698 7654 32" diff --git a/Task/IBAN/Elixir/iban.ex b/Task/IBAN/Elixir/iban.elixir similarity index 100% rename from Task/IBAN/Elixir/iban.ex rename to Task/IBAN/Elixir/iban.elixir diff --git a/Task/IBAN/Julia/iban.jl b/Task/IBAN/Julia/iban.julia similarity index 100% rename from Task/IBAN/Julia/iban.jl rename to Task/IBAN/Julia/iban.julia diff --git a/Task/IBAN/Kotlin/iban-1.kts b/Task/IBAN/Kotlin/iban-1.kotlin similarity index 100% rename from Task/IBAN/Kotlin/iban-1.kts rename to Task/IBAN/Kotlin/iban-1.kotlin diff --git a/Task/IBAN/Kotlin/iban-2.kts b/Task/IBAN/Kotlin/iban-2.kotlin similarity index 100% rename from Task/IBAN/Kotlin/iban-2.kts rename to Task/IBAN/Kotlin/iban-2.kotlin diff --git a/Task/IBAN/OCaml/iban.ml b/Task/IBAN/OCaml/iban.ocaml similarity index 100% rename from Task/IBAN/OCaml/iban.ml rename to Task/IBAN/OCaml/iban.ocaml diff --git a/Task/IBAN/PascalABC.NET/iban.pas b/Task/IBAN/PascalABC.NET/iban.pas deleted file mode 100644 index ad59a4e740..0000000000 --- a/Task/IBAN/PascalABC.NET/iban.pas +++ /dev/null @@ -1,33 +0,0 @@ -var - countryLen := Dict( - ('AL', 28), ('AD', 24), ('AT', 20), ('AZ', 28), ('BE', 16), ('BH', 22), ('BA', 20), ('BR', 29), - ('BG', 22), ('CR', 21), ('HR', 21), ('CY', 28), ('CZ', 24), ('DK', 18), ('DO', 28), ('EE', 20), - ('FO', 18), ('FI', 18), ('FR', 27), ('GE', 22), ('DE', 22), ('GI', 23), ('GR', 27), ('GL', 18), - ('GT', 28), ('HU', 28), ('IS', 26), ('IE', 22), ('IL', 23), ('IT', 27), ('KZ', 20), ('KW', 30), - ('LV', 21), ('LB', 28), ('LI', 21), ('LT', 20), ('LU', 20), ('MK', 19), ('MT', 31), ('MR', 27), - ('MU', 30), ('MC', 27), ('MD', 24), ('ME', 22), ('NL', 18), ('NO', 15), ('PK', 24), ('PS', 29), - ('PL', 28), ('PT', 25), ('RO', 24), ('SM', 27), ('SA', 24), ('RS', 22), ('SK', 24), ('SI', 19), - ('ES', 24), ('SE', 24), ('CH', 21), ('TN', 24), ('TR', 26), ('AE', 23), ('GB', 22), ('VG', 24)); - -function validIban(iban: string): boolean; -begin - result := False; - iban := iban.Replace(' ', '').Replace(#9, ''); - if not iban.All(c -> c.isupper or c.isdigit) then exit; - - if iban.Length <> countryLen.Get(iban[1:3]) then exit; - - iban := iban[5:iban.Length + 1] + iban[1:5]; - var digits: string := ''; - foreach var ch in iban do - case ch of - '0'..'9': digits += ch; - 'A'..'Z': digits += (Ord(ch) - Ord('A') + 10).ToString; - end; - result := digits.ToBigInteger mod 97 = 1; -end; - -begin - foreach var account in |'GB82 WEST 1234 5698 7654 32', 'GB82 TEST 1234 5698 7654 32'| do - Println(account, 'validation is:', validIban(account)); -end. diff --git a/Task/IBAN/Phix/iban.phix b/Task/IBAN/Phix/iban.phix index 0d609477cd..63cedf18ed 100644 --- a/Task/IBAN/Phix/iban.phix +++ b/Task/IBAN/Phix/iban.phix @@ -1,56 +1,61 @@ --- demo\rosetta\IBAN.exw -constant nations = {{"AD",24}, -- Andorra - -- (full list in distro) - {"CH",21}, -- Switzerland - {"GB",22}, -- United Kingdom - {"SA",24}, -- Saudi Arabia - {"XK",20}} -- Kosovo +(phixonline)--> + -- + -- demo\rosetta\IBAN.exw + -- ===================== + -- + constant nations = {{"AD",24}, -- Andorra + -- (full list in distro) + {"CH",21}, -- Switzerland + {"GB",22}, -- United Kingdom + {"SA",24}, -- Saudi Arabia + {"XK",20}} -- Kosovo -constant {countries,lengths} = columnize(nations) + constant {countries,lengths} = columnize(nations) -function iban(string code) --- This routine does and should reject codes containing spaces etc. --- Use iban_s() below for otherwise. - integer country = find(code[1..2],countries) - if country!=0 - and length(code)=lengths[country] then - code = code[5..$]&code[1..4] - integer c = 0 - for i=1 to length(code) do - integer ch=code[i] - if ch>='0' and ch<='9' then - c = c*10+ch-'0' - elsif ch>='A' and ch<='Z' then - c = c*100+ch-55 - else - return false - end if - c = mod(c,97) - end for - return c=1 - end if - return false -end function + function iban(string code) + -- This routine does and should reject codes containing spaces etc. + -- Use iban_s() below for otherwise. + integer country = find(code[1..2],countries) + if country!=0 + and length(code)=lengths[country] then + code = code[5..$]&code[1..4] + integer c = 0 + for i=1 to length(code) do + integer ch=code[i] + if ch>='0' and ch<='9' then + c = c*10+ch-'0' + elsif ch>='A' and ch<='Z' then + c = c*100+ch-55 + else + return false + end if + c = mod(c,97) + end for + return c=1 + end if + return false + end function -function iban_s(string code) --- strips any embedded spaces and hyphens before validating. - code = substitute_all(code,{" ","-"},{"",""}) - return iban(code) -end function + function iban_s(string code) + -- strips any embedded spaces and hyphens before validating. + code = substitute_all(code,{" ","-"},{"",""}) + return iban(code) + end function -procedure test(string code, bool expected) - bool valid = iban_s(code) - string state - if valid=expected then - state = iff(valid?"ok":"invalid (as expected)") - else - state = iff(valid?"OK!!":"INVALID!!")&" (NOT AS EXPECTED)" - end if - printf(1,"%-34s :%s\n",{code,state}) -end procedure + procedure test(string code, bool expected) + bool valid = iban_s(code) + string state + if valid=expected then + state = iff(valid?"ok":"invalid (as expected)") + else + state = iff(valid?"OK!!":"INVALID!!")&" (NOT AS EXPECTED)" + end if + printf(1,"%-34s :%s\n",{code,state}) + end procedure -test("GB82 WEST 1234 5698 7654 32",true) -test("GB82 TEST 1234 5698 7654 32",false) -test("GB81 WEST 1234 5698 7654 32",false) -test("SA03 8000 0000 6080 1016 7519",true) -test("CH93 0076 2011 6238 5295 7",true) + test("GB82 WEST 1234 5698 7654 32",true) + test("GB82 TEST 1234 5698 7654 32",false) + test("GB81 WEST 1234 5698 7654 32",false) + test("SA03 8000 0000 6080 1016 7519",true) + test("CH93 0076 2011 6238 5295 7",true) + + with javascript_semantics + procedure check_isbn13(string isbn) + integer digits = 0, checksum = 0, w = 1 + for i=1 to length(isbn) do + integer ch = isbn[i] + if ch!=' ' and ch!='-' then + ch -= '0' + if ch<0 or ch>9 then checksum = 9 exit end if + checksum += ch*w + digits += 1 + w = 4-w + end if + end for + checksum = remainder(checksum,10) + string gb = iff(digits=13 and checksum=0 ? "good" : "bad") + printf(1,"%s: %s\n",{isbn,gb}) + end procedure -constant isbns = {"978-0596528126", "978-0596528120", "978-1788399081", "978-1788399083", - "978-2-74839-908-0","978-2-74839-908-5","978 1 86197 876 9"} -for isbn in isbns do check_isbn13(isbn) end for + constant isbns = {"978-0596528126", "978-0596528120", "978-1788399081", "978-1788399083", + "978-2-74839-908-0","978-2-74839-908-5","978 1 86197 876 9"} + for i=1 to length(isbns) do check_isbn13(isbns[i]) end for + { Number in 0..9, Number #= Number0 - 48 }, digit(Number0). - -isbn13 --> - sequence(base10_digit, [D1, D2, D3]), "-", - sequence(base10_digit, [D4, D5, D6, D7, D8, D9, D10, D11, D12, D13]), - { ( D1 + 3 * D2 + D3 + 3 * D4 + - D5 + 3 * D6 + D7 + 3 * D8 + - D9 + 3 * D10 + D11 + 3 * D12 + D13 ) mod 10 #= 0 }. diff --git a/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-2.pro b/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-2.pro deleted file mode 100644 index 7f3a3f0e20..0000000000 --- a/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-2.pro +++ /dev/null @@ -1,11 +0,0 @@ -?- phrase(isbn13, "978-0596528126"). -true. - -?- phrase(isbn13, "978-0596528120"). -false. - -?- phrase(isbn13, "978-1788399081"). -true. - -?- phrase(isbn13, "978-1788399083"). -false. diff --git a/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-3.pro b/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-3.pro deleted file mode 100644 index 7225eeca85..0000000000 --- a/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-3.pro +++ /dev/null @@ -1,12 +0,0 @@ -?- ISBN = [0'9, 0'7, 0'8, 0'-, 0'0, 0'3, 0'0, 0'6, 0'4, 0'0, _, _, 0'5, 0'7], phrase(isbn13, ISBN). -ISBN = "978-0306400957" ; -ISBN = "978-0306401657" ; -ISBN = "978-0306402357" ; -ISBN = "978-0306403057" ; -ISBN = "978-0306404757" ; -ISBN = "978-0306405457" ; -ISBN = "978-0306406157" ; -ISBN = "978-0306407857" ; -ISBN = "978-0306408557" ; -ISBN = "978-0306409257" ; -false. diff --git a/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-4.pro b/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-4.pro deleted file mode 100644 index 0b5d9cc7dc..0000000000 --- a/Task/ISBN13-check-digit/Prolog/isbn13-check-digit-4.pro +++ /dev/null @@ -1,12 +0,0 @@ -?- phrase(isbn13, ISBN). -ISBN = "000-0000000000" ; -ISBN = "000-0000000017" ; -ISBN = "000-0000000024" ; -ISBN = "000-0000000031" ; -ISBN = "000-0000000048" ; -ISBN = "000-0000000055" ; -ISBN = "000-0000000062" ; -ISBN = "000-0000000079" ; -ISBN = "000-0000000086" ; -ISBN = "000-0000000093" ; -ISBN = "000-0000000109" . % etc... diff --git a/Task/ISBN13-check-digit/R/isbn13-check-digit.r b/Task/ISBN13-check-digit/R/isbn13-check-digit.r deleted file mode 100644 index 971ee0438e..0000000000 --- a/Task/ISBN13-check-digit/R/isbn13-check-digit.r +++ /dev/null @@ -1,28 +0,0 @@ -isbncheck <- function(str) { - # Remove non-digit characters - digits <- gsub("\\D", "", str) - - # Split into individual characters and convert to numeric - digit_vec <- as.numeric(strsplit(digits, "")[[1]]) - - # Calculate weighted sum - weighted_sum <- sum(sapply(seq_along(digit_vec), function(i) { - if (i %% 2 == 0) { - 3 * digit_vec[i] - } else { - digit_vec[i] - } - })) - - # Check if divisible by 10 - return(weighted_sum %% 10 == 0) -} - -# Test codes -testing_codes <- c("978-0596528126", "978-0596528120", - "978-1788399081", "978-1788399083") - -for (code in testing_codes) { - result <- ifelse(isbncheck(code), "good", "bad") - cat(code, ": ", result, "\n", sep = "") -} diff --git a/Task/ISBN13-check-digit/Rebol/isbn13-check-digit.rebol b/Task/ISBN13-check-digit/Rebol/isbn13-check-digit.rebol deleted file mode 100644 index 568cd2a141..0000000000 --- a/Task/ISBN13-check-digit/Rebol/isbn13-check-digit.rebol +++ /dev/null @@ -1,27 +0,0 @@ -Rebol [ - title: "Rosetta code: ISBN13 check digit" - file: %ISBN13_check_digit.r3 - url: https://rosettacode.org/wiki/ISBN13_check_digit - needs: 3.15.0 ;; or something like that -] -valid-isbn13?: function/with [ - "Validate the check digit of an ISBN-13 code" - value [any-string!] -][ - sum: 0 - parse value [ - 6 [ - to numeric set n: skip (sum: sum + n - #"0") ;; Add digit at odd index (weight 1) - to numeric set n: skip (sum: sum + (3 * (n - #"0"))) ;; Add digit at even index (weight 3) - ] - to numeric set n: skip (sum: sum + n - #"0") ;; Add the 13th digit (weight 1) - opt [to numeric (return false)] ;; If not exactly 13 digits, abort as invalid - ] - zero? (sum % 10) ;; Valid if weighted sum is divisible by 10 -] system/catalog/bitsets ;; Supply numeric bitset for parse (matches digits) - - -;; Check given examples -foreach [str] ["978-0596528126" "978-0596528120" "978-1788399081" "978-1788399083" "978-2-74839-908-0"] [ - print [pad str 18 "-" valid-isbn13? str] -] diff --git a/Task/ISBN13-check-digit/Rust/isbn13-check-digit.rs b/Task/ISBN13-check-digit/Rust/isbn13-check-digit.rust similarity index 100% rename from Task/ISBN13-check-digit/Rust/isbn13-check-digit.rs rename to Task/ISBN13-check-digit/Rust/isbn13-check-digit.rust diff --git a/Task/ISBN13-check-digit/Scala/isbn13-check-digit.scala b/Task/ISBN13-check-digit/Scala/isbn13-check-digit.scala deleted file mode 100644 index 910add1d43..0000000000 --- a/Task/ISBN13-check-digit/Scala/isbn13-check-digit.scala +++ /dev/null @@ -1,26 +0,0 @@ -object ISBNValidator: - private def checkChecksum(isbn: String): Boolean = - val digits = isbn.map(_.asDigit) - val checksum = digits.zipWithIndex.map { - case (digit, idx) => - if idx % 2 == 0 then digit - else digit * 3 - }.sum - checksum % 10 == 0 - - def isValidISBN13(isbn: String): Boolean = - val cleaned = isbn.filter(_.isDigit) - cleaned.length == 13 && checkChecksum(cleaned) - -@main def main(): Unit = - def test(isbn: String): Unit = - val result = ISBNValidator.isValidISBN13(isbn) - println(s"$isbn: $result") - - List( - "978-0596528126", - "978-0596528120", - "978-1788399081", - "978-1788399083" - ) - .foreach(test) diff --git a/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit-1.ml b/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit-1.ml deleted file mode 100644 index 55acb3f3db..0000000000 --- a/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit-1.ml +++ /dev/null @@ -1,22 +0,0 @@ -(* these type decorations are optional, you could just as well put: - fun isValidISBN s = -*) -fun isValidISBN (s : string) : bool = - let - val digits = List.filter Char.isDigit (explode s) - val nums = map (fn x => ord x - ord #"0") digits - val len = length nums - fun sumISBN [] = raise Domain - | sumISBN [x] = x - | sumISBN (x1::x2::xs) = x1 + 3*x2 + sumISBN xs - in - len = 13 andalso sumISBN nums mod 10 = 0 - end - -val test = ["978-1734314502", "978-1734314509", - "978-1788399081", "978-1788399083"] - -fun printTest (s : string) : unit = - (print s; print (if isValidISBN s then ": good\n" else ": bad\n")) - -fun main () = app printTest test diff --git a/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit-2.ml b/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit-2.ml deleted file mode 100644 index c81cfd25c5..0000000000 --- a/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit-2.ml +++ /dev/null @@ -1,15 +0,0 @@ -let - fun check (c, p as (m, n)) = - if Char.isDigit c then - (not m, (if m then 3 * (ord c - 48) else ord c - 48) + n) - else - p -in - fun checkISBN s = - Int.rem (#2 (CharVector.foldl check (false, 0) s), 10) = 0 -end - -val test = ["978-0596528126", "978-0596528120", "978-1788399081", "978-1788399083"] -val () = (print - o concat - o map (fn s => s ^ (if checkISBN s then ": good\n" else ": bad\n"))) test diff --git a/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit.ml b/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit.ml new file mode 100644 index 0000000000..14abd4e5fc --- /dev/null +++ b/Task/ISBN13-check-digit/Standard-ML/isbn13-check-digit.ml @@ -0,0 +1,15 @@ +local + fun check (c, p as (m, n)) = + if Char.isDigit c then + (not m, (if m then 3 * (ord c - 48) else ord c - 48) + n) + else + p +in + fun checkISBN s = + Int.rem (#2 (CharVector.foldl check (false, 0) s), 10) = 0 +end + +val test = ["978-0596528126", "978-0596528120", "978-1788399081", "978-1788399083"] +val () = (print + o concat + o map (fn s => s ^ (if checkISBN s then ": good\n" else ": bad\n"))) test diff --git a/Task/Identity-matrix/Ada/identity-matrix-1.adb b/Task/Identity-matrix/Ada/identity-matrix-1.ada similarity index 100% rename from Task/Identity-matrix/Ada/identity-matrix-1.adb rename to Task/Identity-matrix/Ada/identity-matrix-1.ada diff --git a/Task/Identity-matrix/Ada/identity-matrix-2.adb b/Task/Identity-matrix/Ada/identity-matrix-2.ada similarity index 100% rename from Task/Identity-matrix/Ada/identity-matrix-2.adb rename to Task/Identity-matrix/Ada/identity-matrix-2.ada diff --git a/Task/Identity-matrix/Beads/identity-matrix.beads b/Task/Identity-matrix/Beads/identity-matrix.beads index 095255f228..5a440d7c66 100644 --- a/Task/Identity-matrix/Beads/identity-matrix.beads +++ b/Task/Identity-matrix/Beads/identity-matrix.beads @@ -1,10 +1,10 @@ beads 1 program 'Identity matrix' var - id : array^2 of num - n = 5 - + id : array^2 of num + n = 5 + calc main_init - loop from:1 to:n index:i - loop from:1 to:n index:j - id[i,j] = 1 if i == j else 0 + loop from:1 to:n index:i + loop from:1 to:n index:j + id[i,j] = 1 if i == j else 0 diff --git a/Task/Identity-matrix/Component-Pascal/identity-matrix.pas b/Task/Identity-matrix/Component-Pascal/identity-matrix.pas index 80e25dbec2..297f88e2d6 100644 --- a/Task/Identity-matrix/Component-Pascal/identity-matrix.pas +++ b/Task/Identity-matrix/Component-Pascal/identity-matrix.pas @@ -2,34 +2,34 @@ MODULE Algebras; IMPORT StdLog,Strings; TYPE - Matrix = POINTER TO ARRAY OF ARRAY OF INTEGER; - + Matrix = POINTER TO ARRAY OF ARRAY OF INTEGER; + PROCEDURE NewIdentityMatrix(n: INTEGER): Matrix; VAR - m: Matrix; - i: INTEGER; + m: Matrix; + i: INTEGER; BEGIN - NEW(m,n,n); - FOR i := 0 TO n - 1 DO - m[i,i] := 1; - END; - RETURN m; + NEW(m,n,n); + FOR i := 0 TO n - 1 DO + m[i,i] := 1; + END; + RETURN m; END NewIdentityMatrix; PROCEDURE Show(m: Matrix); VAR - i,j: INTEGER; + i,j: INTEGER; BEGIN - FOR i := 0 TO LEN(m,0) - 1 DO - FOR j := 0 TO LEN(m,1) - 1 DO - StdLog.Int(m[i,j]); - END; - StdLog.Ln - END + FOR i := 0 TO LEN(m,0) - 1 DO + FOR j := 0 TO LEN(m,1) - 1 DO + StdLog.Int(m[i,j]); + END; + StdLog.Ln + END END Show; PROCEDURE Do*; BEGIN - Show(NewIdentityMatrix(5)); + Show(NewIdentityMatrix(5)); END Do; END Algebras. diff --git a/Task/Identity-matrix/Delphi/identity-matrix.pas b/Task/Identity-matrix/Delphi/identity-matrix.delphi similarity index 100% rename from Task/Identity-matrix/Delphi/identity-matrix.pas rename to Task/Identity-matrix/Delphi/identity-matrix.delphi diff --git a/Task/Identity-matrix/DuckDB/identity-matrix.duckdb b/Task/Identity-matrix/DuckDB/identity-matrix.duckdb deleted file mode 100644 index 26cbc7a159..0000000000 --- a/Task/Identity-matrix/DuckDB/identity-matrix.duckdb +++ /dev/null @@ -1,20 +0,0 @@ -# Produce an (i,j,value) table representing the matrix I(m,n) -# which is the identity matrix if m = n -create or replace function I(m,n,zero) as table ( - with recursive cte(i,j,ij,value) as ( - select 1, 1, (null,null), zero - union all - select if(j=n, i+1, i) as i, - if(j=n, 1, j+1) as j, - (i, j) as ij, - zero + if(i=j, 1, 0) as value - from cte - where i <= m - ) - select ij[1] as i, ij[2] as j, value - from cte - offset 1 -); - -# Generate a 3x3 matrix with DOUBLE(3,2) values: -from I(3, 3, 0.000); diff --git a/Task/Identity-matrix/EasyLang/identity-matrix.easy b/Task/Identity-matrix/EasyLang/identity-matrix.easy index b85b3166c1..d1552ef970 100644 --- a/Task/Identity-matrix/EasyLang/identity-matrix.easy +++ b/Task/Identity-matrix/EasyLang/identity-matrix.easy @@ -1,4 +1,4 @@ -proc idmat lng &mat[][] . +proc idmat lng . mat[][] . len mat[][] lng for i to lng len mat[i][] lng diff --git a/Task/Identity-matrix/Eiffel/identity-matrix.e b/Task/Identity-matrix/Eiffel/identity-matrix.e index 084a34437f..ffeeb3ee35 100644 --- a/Task/Identity-matrix/Eiffel/identity-matrix.e +++ b/Task/Identity-matrix/Eiffel/identity-matrix.e @@ -1,61 +1,61 @@ class - APPLICATION + APPLICATION inherit - ARGUMENTS + ARGUMENTS create - make + make feature {NONE} -- Initialization - make - -- Run application. - local - dim : INTEGER -- Dimension of the identity matrix - do - from dim := 1 until dim > 10 loop - print_matrix( identity_matrix(dim) ) - dim := dim + 1 - io.new_line - end + make + -- Run application. + local + dim : INTEGER -- Dimension of the identity matrix + do + from dim := 1 until dim > 10 loop + print_matrix( identity_matrix(dim) ) + dim := dim + 1 + io.new_line + end - end + end feature -- Access - identity_matrix(dim : INTEGER) : ARRAY2[REAL_64] + identity_matrix(dim : INTEGER) : ARRAY2[REAL_64] - require - dim > 0 - local - matrix : ARRAY2[REAL_64] - i : INTEGER - do + require + dim > 0 + local + matrix : ARRAY2[REAL_64] + i : INTEGER + do - create matrix.make_filled (0.0, dim, dim) - from i := 1 until i > dim loop - matrix.put(1.0, i, i) - i := i + 1 - end + create matrix.make_filled (0.0, dim, dim) + from i := 1 until i > dim loop + matrix.put(1.0, i, i) + i := i + 1 + end - Result := matrix - end + Result := matrix + end - print_matrix(matrix : ARRAY2[REAL_64]) - local - i, j : INTEGER - do - from i := 1 until i > matrix.height loop - print("[ ") - from j := 1 until j > matrix.width loop - print(matrix.item (i, j)) - print(" ") - j := j + 1 - end - print("]%N") - i := i + 1 - end - end + print_matrix(matrix : ARRAY2[REAL_64]) + local + i, j : INTEGER + do + from i := 1 until i > matrix.height loop + print("[ ") + from j := 1 until j > matrix.width loop + print(matrix.item (i, j)) + print(" ") + j := j + 1 + end + print("]%N") + i := i + 1 + end + end end diff --git a/Task/Identity-matrix/Elena/identity-matrix.elena b/Task/Identity-matrix/Elena/identity-matrix.elena index e02c88a428..079b48e360 100644 --- a/Task/Identity-matrix/Elena/identity-matrix.elena +++ b/Task/Identity-matrix/Elena/identity-matrix.elena @@ -2,7 +2,7 @@ import extensions; import system'routines; import system'collections; -public Program() +public program() { var n := console.write("Enter the matrix size:").readLine().toInt(); diff --git a/Task/Identity-matrix/Elixir/identity-matrix.ex b/Task/Identity-matrix/Elixir/identity-matrix.elixir similarity index 100% rename from Task/Identity-matrix/Elixir/identity-matrix.ex rename to Task/Identity-matrix/Elixir/identity-matrix.elixir diff --git a/Task/Identity-matrix/Excel/identity-matrix-2.excel b/Task/Identity-matrix/Excel/identity-matrix-2.excel deleted file mode 100644 index f72b963773..0000000000 --- a/Task/Identity-matrix/Excel/identity-matrix-2.excel +++ /dev/null @@ -1 +0,0 @@ -=MUNIT(A2) diff --git a/Task/Identity-matrix/Excel/identity-matrix-1.excel b/Task/Identity-matrix/Excel/identity-matrix.excel similarity index 100% rename from Task/Identity-matrix/Excel/identity-matrix-1.excel rename to Task/Identity-matrix/Excel/identity-matrix.excel diff --git a/Task/Identity-matrix/J/identity-matrix.j b/Task/Identity-matrix/J/identity-matrix.j index a87aa8e298..a209ace2c5 100644 --- a/Task/Identity-matrix/J/identity-matrix.j +++ b/Task/Identity-matrix/J/identity-matrix.j @@ -1,10 +1,10 @@ - =i.4 NB. create an Identity matrix of size 4 + = i. 4 NB. create an Identity matrix of size 4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 - Id=: =@i. NB. define as a verb with a user-defined name - Id 5 NB. create an Identity matrix of size 5 + makeI=: =@i. NB. define as a verb with a user-defined name + makeI 5 NB. create an Identity matrix of size 5 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 diff --git a/Task/Identity-matrix/Julia/identity-matrix-1.jl b/Task/Identity-matrix/Julia/identity-matrix-1.julia similarity index 100% rename from Task/Identity-matrix/Julia/identity-matrix-1.jl rename to Task/Identity-matrix/Julia/identity-matrix-1.julia diff --git a/Task/Identity-matrix/Julia/identity-matrix-2.jl b/Task/Identity-matrix/Julia/identity-matrix-2.julia similarity index 100% rename from Task/Identity-matrix/Julia/identity-matrix-2.jl rename to Task/Identity-matrix/Julia/identity-matrix-2.julia diff --git a/Task/Identity-matrix/Julia/identity-matrix-3.jl b/Task/Identity-matrix/Julia/identity-matrix-3.julia similarity index 100% rename from Task/Identity-matrix/Julia/identity-matrix-3.jl rename to Task/Identity-matrix/Julia/identity-matrix-3.julia diff --git a/Task/Identity-matrix/Kotlin/identity-matrix.kotlin b/Task/Identity-matrix/Kotlin/identity-matrix.kotlin new file mode 100644 index 0000000000..8e873fc892 --- /dev/null +++ b/Task/Identity-matrix/Kotlin/identity-matrix.kotlin @@ -0,0 +1,17 @@ +// version 1.0.6 + +fun main(args: Array) { + print("Enter size of matrix : ") + val n = readLine()!!.toInt() + println() + val identity = Array(n) { IntArray(n) } // create n x n matrix of integers + + // enter 1s in diagonal elements + for(i in 0 until n) identity[i][i] = 1 + + // print identity matrix if n <= 40 + if (n <= 40) + for (i in 0 until n) println(identity[i].joinToString(" ")) + else + println("Matrix is too big to display on 80 column console") +} diff --git a/Task/Identity-matrix/Kotlin/identity-matrix.kts b/Task/Identity-matrix/Kotlin/identity-matrix.kts deleted file mode 100644 index 4b0278fd6e..0000000000 --- a/Task/Identity-matrix/Kotlin/identity-matrix.kts +++ /dev/null @@ -1,16 +0,0 @@ -fun main() { - print("Enter size of matrix : ") - val n = readln().toInt() - println() - val identity = Array(n) { i -> - IntArray(n) { j -> - if (i == j) 1 else 0 - } - } - - // print identity matrix if n <= 40 - if (n <= 40) - for (row in identity) println(row.joinToString(" ")) - else - println("Matrix is too big to display on 80 column console") -} diff --git a/Task/Identity-matrix/LSL/identity-matrix.lsl b/Task/Identity-matrix/LSL/identity-matrix.lsl index 92a0644c63..feec4fb3cc 100644 --- a/Task/Identity-matrix/LSL/identity-matrix.lsl +++ b/Task/Identity-matrix/LSL/identity-matrix.lsl @@ -1,19 +1,19 @@ default { - state_entry() { - llListen(PUBLIC_CHANNEL, "", llGetOwner(), ""); - llOwnerSay("Please Enter a Dimension for an Identity Matrix."); - } - listen(integer iChannel, string sName, key kId, string sMessage) { - llOwnerSay("You entered "+sMessage+"."); - list lMatrix = []; - integer x = 0; - integer n = (integer)sMessage; - for(x=0 ; x i = j ? 1 : 0); - matrix.Println -end. diff --git a/Task/Identity-matrix/Pluto/identity-matrix.pluto b/Task/Identity-matrix/Pluto/identity-matrix.pluto deleted file mode 100644 index 46f405c2cb..0000000000 --- a/Task/Identity-matrix/Pluto/identity-matrix.pluto +++ /dev/null @@ -1,4 +0,0 @@ -require "matrix" - -local num_rows = 10 -- say -print(matrix.identity(num_rows)) diff --git a/Task/Identity-matrix/PowerShell/identity-matrix-1.ps1 b/Task/Identity-matrix/PowerShell/identity-matrix-1.psh similarity index 100% rename from Task/Identity-matrix/PowerShell/identity-matrix-1.ps1 rename to Task/Identity-matrix/PowerShell/identity-matrix-1.psh diff --git a/Task/Identity-matrix/PowerShell/identity-matrix-2.ps1 b/Task/Identity-matrix/PowerShell/identity-matrix-2.psh similarity index 100% rename from Task/Identity-matrix/PowerShell/identity-matrix-2.ps1 rename to Task/Identity-matrix/PowerShell/identity-matrix-2.psh diff --git a/Task/Identity-matrix/Prolog/identity-matrix.pro b/Task/Identity-matrix/Prolog/identity-matrix.pro index 6397d9d7d0..94044cad1f 100644 --- a/Task/Identity-matrix/Prolog/identity-matrix.pro +++ b/Task/Identity-matrix/Prolog/identity-matrix.pro @@ -1,29 +1,29 @@ %rotates one list clockwise by one integer rotate(Int,List,Rotated) :- - integer(Int), - length(Suff,Int), - append(Pre,Suff,List), - append(Suff,Pre,Rotated). + integer(Int), + length(Suff,Int), + append(Pre,Suff,List), + append(Suff,Pre,Rotated). %rotates a list of lists by a list of integers rotate(LoInts,LoLists,Rotated) :- - is_list(LoInts), - maplist(rotate,LoInts,LoLists,Rotated). + is_list(LoInts), + maplist(rotate,LoInts,LoLists,Rotated). %helper function append_(Suff,Pre,List) :- - append([Pre],Suff,List). + append([Pre],Suff,List). idmatrix(N,IdMatrix):- - %make an N length list of 1s and append with N-1 0s - length(Ones,N), - maplist(=(1),Ones), - succ(N0,N), - length(Zeros,N0), - maplist(=(0),Zeros), - maplist(append_(Zeros),Ones,M), - %create the offsets at rotate each row - numlist(0,N0,Offsets), - rotate(Offsets,M,IdMatrix). + %make an N length list of 1s and append with N-1 0s + length(Ones,N), + maplist(=(1),Ones), + succ(N0,N), + length(Zeros,N0), + maplist(=(0),Zeros), + maplist(append_(Zeros),Ones,M), + %create the offsets at rotate each row + numlist(0,N0,Offsets), + rotate(Offsets,M,IdMatrix). main :- - idmatrix(5,I), - maplist(writeln,I). + idmatrix(5,I), + maplist(writeln,I). diff --git a/Task/Identity-matrix/Rebol/identity-matrix-1.rebol b/Task/Identity-matrix/Rebol/identity-matrix-1.rebol deleted file mode 100644 index 5260ef0941..0000000000 --- a/Task/Identity-matrix/Rebol/identity-matrix-1.rebol +++ /dev/null @@ -1,7 +0,0 @@ -identity-matrix: function[size [integer!]][ - matrix: array/initial reduce [size size] 0 - repeat i size [matrix/:i/:i: 1] - new-line/all matrix true - matrix -] -probe identity-matrix 5 diff --git a/Task/Identity-matrix/Rebol/identity-matrix-2.rebol b/Task/Identity-matrix/Rebol/identity-matrix-2.rebol deleted file mode 100644 index 02d78116c0..0000000000 --- a/Task/Identity-matrix/Rebol/identity-matrix-2.rebol +++ /dev/null @@ -1,9 +0,0 @@ -identity-matrix: function [size [integer!]][ - matrix: array/initial size * size 0 ;; Create a flat array with size^2 elements, all zeros - repeat i size [ - matrix/((i - 1) * size + i): 1 ;; Set 1 on the diagonal: row-major position - ] - new-line/skip matrix true size - matrix -] -probe identity-matrix 5 diff --git a/Task/Identity-matrix/Ring/identity-matrix-2.ring b/Task/Identity-matrix/Ring/identity-matrix-2.ring index 7c8f780d4a..4c2d938b39 100644 --- a/Task/Identity-matrix/Ring/identity-matrix-2.ring +++ b/Task/Identity-matrix/Ring/identity-matrix-2.ring @@ -18,30 +18,30 @@ LayoutButtonRow = list(size) app = new qApp { win = new qWidget() { - setWindowTitle('Identity Matrix') - move(500,100) - reSize(600,600) - winheight = win.height() - fontSize = 18 + (winheight / 100) + setWindowTitle('Identity Matrix') + move(500,100) + reSize(600,600) + winheight = win.height() + fontSize = 18 + (winheight / 100) - LayoutButtonMain = new QVBoxLayout() - LayoutButtonMain.setSpacing(C_Spacing) - LayoutButtonMain.setContentsmargins(0,0,0,0) + LayoutButtonMain = new QVBoxLayout() + LayoutButtonMain.setSpacing(C_Spacing) + LayoutButtonMain.setContentsmargins(0,0,0,0) - for Row = 1 to size - LayoutButtonRow[Row] = new QHBoxLayout() { - setSpacing(C_Spacing) - setContentsmargins(0,0,0,0) - } - for Col = 1 to size - Button[Row][Col] = new QPushButton(win) { + for Row = 1 to size + LayoutButtonRow[Row] = new QHBoxLayout() { + setSpacing(C_Spacing) + setContentsmargins(0,0,0,0) + } + for Col = 1 to size + Button[Row][Col] = new QPushButton(win) { setSizePolicy(1,1) - } - - LayoutButtonRow[Row].AddWidget(Button[Row][Col]) - next - LayoutButtonMain.AddLayout(LayoutButtonRow[Row]) - next + } + + LayoutButtonRow[Row].AddWidget(Button[Row][Col]) + next + LayoutButtonMain.AddLayout(LayoutButtonRow[Row]) + next LayoutDataRow1 = new QHBoxLayout() { setSpacing(C_Spacing) setContentsMargins(0,0,0,0) } LayoutButtonMain.AddLayout(LayoutDataRow1) setLayout(LayoutButtonMain) @@ -61,6 +61,6 @@ func pBegin() Button[Row][Col].setStyleSheet(C_ButtonBlueStyle) Button[Row][Col].settext("0") ok - next + next next score = 0 diff --git a/Task/Identity-matrix/Rust/identity-matrix.rs b/Task/Identity-matrix/Rust/identity-matrix.rust similarity index 100% rename from Task/Identity-matrix/Rust/identity-matrix.rs rename to Task/Identity-matrix/Rust/identity-matrix.rust diff --git a/Task/Identity-matrix/Scheme/identity-matrix-1.scm b/Task/Identity-matrix/Scheme/identity-matrix-1.scm deleted file mode 100644 index 7ed20ab33c..0000000000 --- a/Task/Identity-matrix/Scheme/identity-matrix-1.scm +++ /dev/null @@ -1,15 +0,0 @@ -(define (identity n) - (letrec - ((uvec - (lambda (m i acc) - (if (= i n) - acc - (uvec m (+ i 1) - (cons (if (= i m) 1 0) acc))))) - (idgen - (lambda (i acc) - (if (= i n) - acc - (idgen (+ i 1) - (cons (uvec i 0 '()) acc)))))) - (idgen 0 '()))) diff --git a/Task/Identity-matrix/Scheme/identity-matrix-1.ss b/Task/Identity-matrix/Scheme/identity-matrix-1.ss new file mode 100644 index 0000000000..fcd8fd0dcc --- /dev/null +++ b/Task/Identity-matrix/Scheme/identity-matrix-1.ss @@ -0,0 +1,15 @@ +(define (identity n) + (letrec + ((uvec + (lambda (m i acc) + (if (= i n) + acc + (uvec m (+ i 1) + (cons (if (= i m) 1 0) acc))))) + (idgen + (lambda (i acc) + (if (= i n) + acc + (idgen (+ i 1) + (cons (uvec i 0 '()) acc)))))) + (idgen 0 '()))) diff --git a/Task/Identity-matrix/Scheme/identity-matrix-2.scm b/Task/Identity-matrix/Scheme/identity-matrix-2.ss similarity index 100% rename from Task/Identity-matrix/Scheme/identity-matrix-2.scm rename to Task/Identity-matrix/Scheme/identity-matrix-2.ss diff --git a/Task/Identity-matrix/SenseTalk/identity-matrix.sensetalk b/Task/Identity-matrix/SenseTalk/identity-matrix.sensetalk index ece24bf611..5b8c568f1e 100644 --- a/Task/Identity-matrix/SenseTalk/identity-matrix.sensetalk +++ b/Task/Identity-matrix/SenseTalk/identity-matrix.sensetalk @@ -1,28 +1,28 @@ set matrix to buildIdentityMatrix(3) repeat for each item in matrix - put it + put it end repeat set matrix to buildIdentityMatrix(17) repeat for each item in matrix - put it + put it end repeat function buildIdentityMatrix matrixSize - set matrixList to () - repeat matrixSize times - set rowMatrixIndex to the counter - set rowMatrix to () - repeat matrixSize times - if the counter equals rowMatrixIndex - insert 1 after rowMatrix - else - insert 0 after rowMatrix - end if - end repeat - insert rowMatrix nested after matrixList - end repeat - return matrixList + set matrixList to () + repeat matrixSize times + set rowMatrixIndex to the counter + set rowMatrix to () + repeat matrixSize times + if the counter equals rowMatrixIndex + insert 1 after rowMatrix + else + insert 0 after rowMatrix + end if + end repeat + insert rowMatrix nested after matrixList + end repeat + return matrixList end buildIdentityMatrix diff --git a/Task/Identity-matrix/Sparkling/identity-matrix.sparkling b/Task/Identity-matrix/Sparkling/identity-matrix.sparkling index 7db205e1c4..ea0381bc1b 100644 --- a/Task/Identity-matrix/Sparkling/identity-matrix.sparkling +++ b/Task/Identity-matrix/Sparkling/identity-matrix.sparkling @@ -1,7 +1,7 @@ function unitMatrix(n) { - return map(range(n), function(k1, v1) { - return map(range(n), function(k2, v2) { - return v2 == v1 ? 1 : 0; - }); - }); + return map(range(n), function(k1, v1) { + return map(range(n), function(k2, v2) { + return v2 == v1 ? 1 : 0; + }); + }); } diff --git a/Task/Identity-matrix/Tailspin/identity-matrix-2.tailspin b/Task/Identity-matrix/Tailspin/identity-matrix-2.tailspin deleted file mode 100644 index 301d97f5fd..0000000000 --- a/Task/Identity-matrix/Tailspin/identity-matrix-2.tailspin +++ /dev/null @@ -1,8 +0,0 @@ -identityMatrix templates - n is $; - [1..$n -> [1..~$ -> 0, 1, $~..$n -> 0]] ! -end identityMatrix - -identity is 5 -> identityMatrix; -$identity... -> '|$(1);$(2..)... -> ', $;';| -' ! diff --git a/Task/Identity-matrix/Tailspin/identity-matrix-1.tailspin b/Task/Identity-matrix/Tailspin/identity-matrix.tailspin similarity index 100% rename from Task/Identity-matrix/Tailspin/identity-matrix-1.tailspin rename to Task/Identity-matrix/Tailspin/identity-matrix.tailspin diff --git a/Task/Identity-matrix/Tcl/identity-matrix-1.tcl b/Task/Identity-matrix/Tcl/identity-matrix-1.tcl index 652bacb01b..17692fce2d 100644 --- a/Task/Identity-matrix/Tcl/identity-matrix-1.tcl +++ b/Task/Identity-matrix/Tcl/identity-matrix-1.tcl @@ -1,7 +1,7 @@ proc I {rank {zero 0.0} {one 1.0}} { set m [lrepeat $rank [lrepeat $rank $zero]] for {set i 0} {$i < $rank} {incr i} { - lset m $i $i $one + lset m $i $i $one } return $m } diff --git a/Task/Identity-matrix/Tcl/identity-matrix-2.tcl b/Task/Identity-matrix/Tcl/identity-matrix-2.tcl index c2560fe41a..2342fdd286 100644 --- a/Task/Identity-matrix/Tcl/identity-matrix-2.tcl +++ b/Task/Identity-matrix/Tcl/identity-matrix-2.tcl @@ -5,9 +5,9 @@ proc I {rank {zero 0.0} {one 1.0}} { $m add columns $rank $m add rows $rank for {set i 0} {$i < $rank} {incr i} { - for {set j 0} {$j < $rank} {incr j} { - $m set cell $i $j [expr {$i==$j ? $one : $zero}] - } + for {set j 0} {$j < $rank} {incr j} { + $m set cell $i $j [expr {$i==$j ? $one : $zero}] + } } return $m } diff --git a/Task/Identity-matrix/Uiua/identity-matrix.uiua b/Task/Identity-matrix/Uiua/identity-matrix.uiua deleted file mode 100644 index 2c76013a8d..0000000000 --- a/Task/Identity-matrix/Uiua/identity-matrix.uiua +++ /dev/null @@ -1,2 +0,0 @@ -IdMatrix ← ⊞=.⇡ -IdMatrix 7 diff --git a/Task/Identity-matrix/VBScript/identity-matrix-1.vb b/Task/Identity-matrix/VBScript/identity-matrix-1.vb new file mode 100644 index 0000000000..5c7a77dd67 --- /dev/null +++ b/Task/Identity-matrix/VBScript/identity-matrix-1.vb @@ -0,0 +1,29 @@ +build_matrix(7) + +Sub build_matrix(n) + Dim matrix() + ReDim matrix(n-1,n-1) + i = 0 + 'populate the matrix + For row = 0 To n-1 + For col = 0 To n-1 + If col = i Then + matrix(row,col) = 1 + Else + matrix(row,col) = 0 + End If + Next + i = i + 1 + Next + 'display the matrix + For row = 0 To n-1 + For col = 0 To n-1 + If col < n-1 Then + WScript.StdOut.Write matrix(row,col) & " " + Else + WScript.StdOut.Write matrix(row,col) + End If + Next + WScript.StdOut.WriteLine + Next +End Sub diff --git a/Task/Identity-matrix/VBScript/identity-matrix-1.vbs b/Task/Identity-matrix/VBScript/identity-matrix-1.vbs deleted file mode 100644 index a9e51579b8..0000000000 --- a/Task/Identity-matrix/VBScript/identity-matrix-1.vbs +++ /dev/null @@ -1,29 +0,0 @@ -build_matrix(7) - -Sub build_matrix(n) - Dim matrix() - ReDim matrix(n-1,n-1) - i = 0 - 'populate the matrix - For row = 0 To n-1 - For col = 0 To n-1 - If col = i Then - matrix(row,col) = 1 - Else - matrix(row,col) = 0 - End If - Next - i = i + 1 - Next - 'display the matrix - For row = 0 To n-1 - For col = 0 To n-1 - If col < n-1 Then - WScript.StdOut.Write matrix(row,col) & " " - Else - WScript.StdOut.Write matrix(row,col) - End If - Next - WScript.StdOut.WriteLine - Next -End Sub diff --git a/Task/Identity-matrix/VBScript/identity-matrix-2.vbs b/Task/Identity-matrix/VBScript/identity-matrix-2.vb similarity index 100% rename from Task/Identity-matrix/VBScript/identity-matrix-2.vbs rename to Task/Identity-matrix/VBScript/identity-matrix-2.vb diff --git a/Task/Identity-matrix/Vala/identity-matrix.vala b/Task/Identity-matrix/Vala/identity-matrix.vala index 6365ad13d8..a061d4d56b 100644 --- a/Task/Identity-matrix/Vala/identity-matrix.vala +++ b/Task/Identity-matrix/Vala/identity-matrix.vala @@ -1,25 +1,25 @@ int main (string[] args) { - if (args.length < 2) { - print ("Please, input an integer > 0.\n"); - return 0; - } - var n = int.parse (args[1]); - if (n <= 0) { - print ("Please, input an integer > 0.\n"); - return 0; - } - int[,] array = new int[n, n]; - for (var i = 0; i < n; i ++) { - for (var j = 0; j < n; j ++) { - if (i == j) array[i,j] = 1; - else array[i,j] = 0; - } - } - for (var i = 0; i < n; i ++) { - for (var j = 0; j < n; j ++) { - print ("%d ", array[i,j]); - } - print ("\b\n"); - } - return 0; + if (args.length < 2) { + print ("Please, input an integer > 0.\n"); + return 0; + } + var n = int.parse (args[1]); + if (n <= 0) { + print ("Please, input an integer > 0.\n"); + return 0; + } + int[,] array = new int[n, n]; + for (var i = 0; i < n; i ++) { + for (var j = 0; j < n; j ++) { + if (i == j) array[i,j] = 1; + else array[i,j] = 0; + } + } + for (var i = 0; i < n; i ++) { + for (var j = 0; j < n; j ++) { + print ("%d ", array[i,j]); + } + print ("\b\n"); + } + return 0; } diff --git a/Task/Identity-matrix/XBasic/identity-matrix.basic b/Task/Identity-matrix/XBasic/identity-matrix.basic index 8af9483abb..eede4569ac 100644 --- a/Task/Identity-matrix/XBasic/identity-matrix.basic +++ b/Task/Identity-matrix/XBasic/identity-matrix.basic @@ -1,5 +1,5 @@ PROGRAM "Identity matrix" -VERSION "0.0000" +VERSION "0.0000" DECLARE FUNCTION Entry () diff --git a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Ada/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.adb b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Ada/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.adb deleted file mode 100644 index d2d6842033..0000000000 --- a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Ada/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.adb +++ /dev/null @@ -1,12 +0,0 @@ -with Ada.Strings.Maps; use Ada.Strings.Maps; -with Ada.Text_IO; - -procedure Show_Valid_Identifiers is - Valid_First_Character : constant Character_Set := To_Set (Ranges => (1 => ('a', 'z'), 2 => ('A', 'Z'))); - Valid_Last_Character : constant Character_Set := Valid_First_Character or To_Set (Ranges => (1 => ('0', '9'))); - Valid_Middle_Character : constant Character_Set := Valid_Last_Character or To_Set ('_'); -begin - Ada.Text_IO.Put_Line ("Valid for the first character: " & String (To_Sequence (Valid_First_Character))); - Ada.Text_IO.Put_Line ("Valid for any middle character: " & String (To_Sequence (Valid_Middle_Character))); - Ada.Text_IO.Put_Line ("Valid for the last character: " & String (To_Sequence (Valid_Last_Character))); -end Show_Valid_Identifiers; diff --git a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Delphi/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.pas b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Delphi/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.delphi similarity index 100% rename from Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Delphi/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.pas rename to Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Delphi/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.delphi diff --git a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/DuckDB/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.duckdb b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/DuckDB/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.duckdb deleted file mode 100644 index 44a338df57..0000000000 --- a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/DuckDB/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.duckdb +++ /dev/null @@ -1,27 +0,0 @@ -# Generate a string of all the codepoints in the range [m,n) -# corresponding to the given Unicode character class, where `class` -# could be '[a-z]' or '\p{Ll}', etc. -# -# Note: codepoints 55296 to 57343 (xD800–xDFFF) are reserved for the -# surrogates mechanism and are excluded as they are regarded as "illegal" -# as characters. -# -create or replace function generate(class, m, n) as ( - select string_agg(s, '') - from (select - case when 55296 <=i and i <= 57343 then null - else regexp_extract( chr(i::INTEGER), class) - end as s - from range(m, n) t(i)) -); - -# ident_start minus NBSP -select generate( '[A-Za-z\200-\237\241-\377_]',0, 1024); - -.mode list - -with ident_start as ( - select generate( '[A-Za-z\200-\237\241-\377_]',0,1024 ) as s - ) - select unnest(regexp_extract_all(s, '.{1,26}')) - from ident_start; diff --git a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/EasyLang/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.easy b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/EasyLang/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.easy deleted file mode 100644 index 700c376ff1..0000000000 --- a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/EasyLang/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.easy +++ /dev/null @@ -1,13 +0,0 @@ -print "First character:" -write "_" -for i = strcode "A" to strcode "Z" - write strchar i -. -for i = strcode "a" to strcode "z" - write strchar i -. -print "" -print "Not as the first character additionally:" -for i = strcode "0" to strcode "9" - write strchar i -. diff --git a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Julia/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.jl b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Julia/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.julia similarity index 100% rename from Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Julia/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.jl rename to Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Julia/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.julia diff --git a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Kotlin/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.kts b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Kotlin/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.kotlin similarity index 100% rename from Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Kotlin/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.kts rename to Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Kotlin/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.kotlin diff --git a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/M2000-Interpreter/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.m2000 b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/M2000-Interpreter/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.m2000 deleted file mode 100644 index 1ab74f5f29..0000000000 --- a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/M2000-Interpreter/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.m2000 +++ /dev/null @@ -1,12 +0,0 @@ -for=100 -print for=100 -for for=1 to 10:Print for: Next for -Print for=11 -to=100 -print to=100 -for to=1 to 10:Print to: Next to -Print to=11 -Print=100 -print Print=100 -for Print=1 to 10:Print Print: Next Print -Print Print=11 diff --git a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Wren/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.wren b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Wren/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.wren index 8e2277f929..381544e810 100644 --- a/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Wren/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.wren +++ b/Task/Idiomatically-determine-all-the-characters-that-can-be-used-for-symbols/Wren/idiomatically-determine-all-the-characters-that-can-be-used-for-symbols.wren @@ -1,4 +1,3 @@ for (i in 97..122) System.write(String.fromByte(i)) for (i in 65..90) System.write(String.fromByte(i)) -for (i in 48..57) System.write(String.fromByte(i)) System.print("_") diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Ada/idiomatically-determine-all-the-lowercase-and-uppercase-letters.adb b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Ada/idiomatically-determine-all-the-lowercase-and-uppercase-letters.ada similarity index 100% rename from Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Ada/idiomatically-determine-all-the-lowercase-and-uppercase-letters.adb rename to Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Ada/idiomatically-determine-all-the-lowercase-and-uppercase-letters.ada diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Arturo/idiomatically-determine-all-the-lowercase-and-uppercase-letters.arturo b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Arturo/idiomatically-determine-all-the-lowercase-and-uppercase-letters.arturo index 7c6cd7e44d..05b8a27f68 100644 --- a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Arturo/idiomatically-determine-all-the-lowercase-and-uppercase-letters.arturo +++ b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Arturo/idiomatically-determine-all-the-lowercase-and-uppercase-letters.arturo @@ -1,2 +1,2 @@ -print ["lowercase letters:" @'a'..'z'] -print ["uppercase letters:" @'A'..'Z'] +print ["lowercase letters:" `a`..`z`] +print ["uppercase letters:" `A`..`Z`] diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/COBOL/idiomatically-determine-all-the-lowercase-and-uppercase-letters.cob b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/COBOL/idiomatically-determine-all-the-lowercase-and-uppercase-letters.cobol similarity index 100% rename from Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/COBOL/idiomatically-determine-all-the-lowercase-and-uppercase-letters.cob rename to Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/COBOL/idiomatically-determine-all-the-lowercase-and-uppercase-letters.cobol diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Crystal/idiomatically-determine-all-the-lowercase-and-uppercase-letters.cr b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Crystal/idiomatically-determine-all-the-lowercase-and-uppercase-letters.cr deleted file mode 100644 index 5c334faa07..0000000000 --- a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Crystal/idiomatically-determine-all-the-lowercase-and-uppercase-letters.cr +++ /dev/null @@ -1,10 +0,0 @@ -letters = ((0.chr)..Char::MAX).group_by { |ch| - case ch - when .lowercase? then :lower - when .uppercase? then :upper - else :neither - end -} - -puts "Lowercase: #{letters[:lower].join(" ")}" -puts "Uppercase: #{letters[:upper].join(" ")}" diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Delphi/idiomatically-determine-all-the-lowercase-and-uppercase-letters.pas b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Delphi/idiomatically-determine-all-the-lowercase-and-uppercase-letters.delphi similarity index 100% rename from Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Delphi/idiomatically-determine-all-the-lowercase-and-uppercase-letters.pas rename to Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Delphi/idiomatically-determine-all-the-lowercase-and-uppercase-letters.delphi diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/DuckDB/idiomatically-determine-all-the-lowercase-and-uppercase-letters.duckdb b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/DuckDB/idiomatically-determine-all-the-lowercase-and-uppercase-letters.duckdb deleted file mode 100644 index 825cc013b9..0000000000 --- a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/DuckDB/idiomatically-determine-all-the-lowercase-and-uppercase-letters.duckdb +++ /dev/null @@ -1,19 +0,0 @@ -# The number of Unicode codepoints -set variable maxu = 1114112; - -# Generate a string of all the codepoints in the range [m,n) -# corresponding to the given Unicode character class, where `class` -# could be '[a-z]' or '\p{Ll}', etc. -# -# Note: codepoints 55296 to 57343 (xD800–xDFFF) are reserved for the -# surrogates mechanism and are excluded as they are regarded "illegal" -# as characters. -# -create or replace function generate(class, m, n) as ( - select string_agg(s, '') - from (select - case when 55296 <=i and i <= 57343 then null - else regexp_extract( chr(i::INTEGER), class) - end as s - from range(m, n) t(i)) -); diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/EasyLang/idiomatically-determine-all-the-lowercase-and-uppercase-letters.easy b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/EasyLang/idiomatically-determine-all-the-lowercase-and-uppercase-letters.easy index a8bb064adb..aca86fb76f 100644 --- a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/EasyLang/idiomatically-determine-all-the-lowercase-and-uppercase-letters.easy +++ b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/EasyLang/idiomatically-determine-all-the-lowercase-and-uppercase-letters.easy @@ -1,6 +1,7 @@ -proc out a b . - for i = a to b : write strchar i - print "" +for i = strcode "a" to strcode "z" + write strchar i +. +print "" +for i = strcode "A" to strcode "Z" + write strchar i . -out 97 122 -out 65 90 diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Haskell/idiomatically-determine-all-the-lowercase-and-uppercase-letters-3.hs b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Haskell/idiomatically-determine-all-the-lowercase-and-uppercase-letters-3.hs index f3f86f5e34..164ce4f353 100644 --- a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Haskell/idiomatically-determine-all-the-lowercase-and-uppercase-letters-3.hs +++ b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Haskell/idiomatically-determine-all-the-lowercase-and-uppercase-letters-3.hs @@ -1,4 +1,4 @@ (let chars-between (comp range (map char-code) (... str))) -"Upper-case: {chars-between 65 91} -Lower-case: {chars-between 97 123}" +(str "Upper-case: " (chars-between 65 91) " +Lower-case: " (chars-between 97 123)) diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Julia/idiomatically-determine-all-the-lowercase-and-uppercase-letters.jl b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Julia/idiomatically-determine-all-the-lowercase-and-uppercase-letters.jl deleted file mode 100644 index 19a26a3ffa..0000000000 --- a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Julia/idiomatically-determine-all-the-lowercase-and-uppercase-letters.jl +++ /dev/null @@ -1,24 +0,0 @@ -function countunicode() - count = 0 - az = "" - AZ = "" - for i in 0:0xffffff - if isvalid(Char, i) - c = Char(i) - count += 1 - if i < 128 && isletter(c) - if islowercase(c) - az *= "$c" - elseif isuppercase(c) - AZ *= "$c" - end - end - end - end - count, az, AZ -end - -unicodecount, lcletters, ucletters = countunicode() - -println("There are $unicodecount valid Chars and the ASCII English ones are:") -println("lowercase: $lcletters and uppercase: $ucletters .") diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Julia/idiomatically-determine-all-the-lowercase-and-uppercase-letters.julia b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Julia/idiomatically-determine-all-the-lowercase-and-uppercase-letters.julia new file mode 100644 index 0000000000..9a83077168 --- /dev/null +++ b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Julia/idiomatically-determine-all-the-lowercase-and-uppercase-letters.julia @@ -0,0 +1,25 @@ +function countunicode() + englishlettercodes = [Int(c) for c in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"] + count = 0 + az = "" + AZ = "" + for i in 0:0xffffff + if is_assigned_char(i) + count += 1 + end + if i in englishlettercodes + c = Char(i) + if islower(c) + az *= "$c" + else + AZ *= "$c" + end + end + end + count, az, AZ +end + +unicodecount, lcletters, ucletters = countunicode() + +print("There are $unicodecount valid Chars and the English ones are ") +println("lowercase: $lcletters and uppercase: $ucletters.") diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Kotlin/idiomatically-determine-all-the-lowercase-and-uppercase-letters.kts b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Kotlin/idiomatically-determine-all-the-lowercase-and-uppercase-letters.kotlin similarity index 100% rename from Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Kotlin/idiomatically-determine-all-the-lowercase-and-uppercase-letters.kts rename to Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Kotlin/idiomatically-determine-all-the-lowercase-and-uppercase-letters.kotlin diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters-1.phix b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters-1.phix deleted file mode 100644 index b307e0490a..0000000000 --- a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters-1.phix +++ /dev/null @@ -1,10 +0,0 @@ -with javascript_semantics -sequence lc = {}, uc = {} -for ch=1 to 255 do - if islower(ch) then lc &= ch end if - if isupper(ch) then uc &= ch end if -end for -lc = utf32_to_utf8(lc)&"\n" -uc = utf32_to_utf8(uc)&"\n" -puts(1,lc) -puts(1,uc) diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters-2.phix b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters-2.phix deleted file mode 100644 index a2d8ee8e1d..0000000000 --- a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters-2.phix +++ /dev/null @@ -1,4 +0,0 @@ -?tagset('z','a') -?tagstart('a',26) -?tagset('Z','A') -?tagstart('A',26) diff --git a/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters.phix b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters.phix new file mode 100644 index 0000000000..be7c73650e --- /dev/null +++ b/Task/Idiomatically-determine-all-the-lowercase-and-uppercase-letters/Phix/idiomatically-determine-all-the-lowercase-and-uppercase-letters.phix @@ -0,0 +1,11 @@ +(phixonline)--> + sequence lc = {}, uc = {} + for ch=1 to 255 do + if islower(ch) then lc &= ch end if + if isupper(ch) then uc &= ch end if + end for + lc = utf32_to_utf8(lc)&"\n" + uc = utf32_to_utf8(uc)&"\n" + puts(1,lc) + puts(1,uc) + loop next position - j 1b - -2: - li t0,'-' # first byte is - ? - bne t5,t0,21f - li t1,1 # negative sign - j 4f # next position -21: - li t0,'+' # first byte is + ? - beq t5,t0,4f # yes -> next position -3: # debut de boucle de traitement des chiffres - li t0,'0' - blt t5,t0,4f # byte is not numeric - li t0,'9' - bgt t5,t0,4f # byte is not numeric - addi t5,t5,-48 - li t0,NUMMAXI - bgt a0,t0,99f # number maxi ? - - mul a0,t2,a0 # multiply by factor 10 - add a0,a0,t5 # and add new byte - -4: - addi t3,t3,1 # next position - add t0,t4,t3 - lbu t5,(t0) # load byte - beq t5,x0,5f # string end -> end - li t0,0x0A - beq t5,t0,5f # string end -> end - j 3b # or loop -5: - beqz t1,100f # positive sign ? - neg a0,a0 # no - j 100f -99: # overflow error - la a0,szMessErrDep - call writeString - li a0,0 # on error return zero -100: - lw ra, 0(sp) - addi sp, sp, 4 - ret - -/************************************/ -/* file include Fonctions */ -/***********************************/ -/* for this file see risc-v task include a file */ -.include "../../includeFunctions.s" diff --git a/Task/Integer-comparison/ReScript/integer-comparison.res b/Task/Integer-comparison/ReScript/integer-comparison.re similarity index 100% rename from Task/Integer-comparison/ReScript/integer-comparison.res rename to Task/Integer-comparison/ReScript/integer-comparison.re diff --git a/Task/Integer-comparison/Rust/integer-comparison.rs b/Task/Integer-comparison/Rust/integer-comparison.rust similarity index 100% rename from Task/Integer-comparison/Rust/integer-comparison.rs rename to Task/Integer-comparison/Rust/integer-comparison.rust diff --git a/Task/Integer-comparison/Rye/integer-comparison.rye b/Task/Integer-comparison/Rye/integer-comparison.rye deleted file mode 100644 index 961dc50523..0000000000 --- a/Task/Integer-comparison/Rye/integer-comparison.rye +++ /dev/null @@ -1,4 +0,0 @@ -a: integer input "Enter value of a" -b: integer input "Enter value of b" - -cases a { { a < b } { print "Less than" } { a = b } { print "Equal to" } { a > b } { print "Greater than" } } diff --git a/Task/Integer-comparison/Scheme/integer-comparison.scm b/Task/Integer-comparison/Scheme/integer-comparison.ss similarity index 100% rename from Task/Integer-comparison/Scheme/integer-comparison.scm rename to Task/Integer-comparison/Scheme/integer-comparison.ss diff --git a/Task/Integer-comparison/V-(Vlang)/integer-comparison.v b/Task/Integer-comparison/V-(Vlang)/integer-comparison.v deleted file mode 100644 index cf27fc8509..0000000000 --- a/Task/Integer-comparison/V-(Vlang)/integer-comparison.v +++ /dev/null @@ -1,17 +0,0 @@ -import os - -fn main(){ - mut enter := "" - mut a, mut b := 0, 0 - enter = os.input("Enter number for a: ") - if enter.is_int() {a = enter.int()} else {println("Invalid input!") exit(1)} - enter = os.input("Enter number for b: ") - if enter.is_int() {b = enter.int()} else {println("Invalid input!") exit(1)} - match true { - a < b {println("${a} less than ${b}")} - a == b {println("${a} equal to ${b}")} - a > b {println("${a} greater than ${b}")} - else{} - } - exit(0) -} diff --git a/Task/Integer-comparison/VBScript/integer-comparison.vbs b/Task/Integer-comparison/VBScript/integer-comparison.vb similarity index 100% rename from Task/Integer-comparison/VBScript/integer-comparison.vbs rename to Task/Integer-comparison/VBScript/integer-comparison.vb diff --git a/Task/Integer-comparison/YAMLScript/integer-comparison.ys b/Task/Integer-comparison/YAMLScript/integer-comparison.ys deleted file mode 100644 index 59b265bd8e..0000000000 --- a/Task/Integer-comparison/YAMLScript/integer-comparison.ys +++ /dev/null @@ -1,8 +0,0 @@ -!YS-v0 - -defn main(x y): - say: - cond: - x < y: "$x is less than $y" - x > y: "$x is greater than $y" - else : "$x is equal to $y" diff --git a/Task/Integer-overflow/ALGOL-M/integer-overflow.alg b/Task/Integer-overflow/ALGOL-M/integer-overflow.alg deleted file mode 100644 index c285f7d9f2..0000000000 --- a/Task/Integer-overflow/ALGOL-M/integer-overflow.alg +++ /dev/null @@ -1,6 +0,0 @@ -begin -integer n; -n := 16383; % maximum integer value % -write(n+2); -write(n*2); -end diff --git a/Task/Integer-overflow/Ada/integer-overflow.ada b/Task/Integer-overflow/Ada/integer-overflow.ada new file mode 100644 index 0000000000..1deb7a7c8b --- /dev/null +++ b/Task/Integer-overflow/Ada/integer-overflow.ada @@ -0,0 +1,51 @@ +with Ada.Text_IO; use Ada.Text_IO; + +procedure Overflow is + + generic + type T is Range <>; + Name_Of_T: String; + procedure Print_Bounds; -- first instantiate this with T, Name + -- then call the instantiation + procedure Print_Bounds is + begin + Put_Line(" " & Name_Of_T & " " & T'Image(T'First) + & " .." & T'Image(T'Last)); + end Print_Bounds; + + procedure P_Int is new Print_Bounds(Integer, "Integer "); + procedure P_Nat is new Print_Bounds(Natural, "Natural "); + procedure P_Pos is new Print_Bounds(Positive, "Positive"); + procedure P_Long is new Print_Bounds(Long_Integer, "Long "); + + type Unsigned_Byte is range 0 .. 255; + type Signed_Byte is range -128 .. 127; + type Unsigned_Word is range 0 .. 2**32-1; + type Thousand is range 0 .. 999; + type Signed_Double is range - 2**63 .. 2**63-1; + type Crazy is range -11 .. -3; + + procedure P_UB is new Print_Bounds(Unsigned_Byte, "U 8 "); + procedure P_SB is new Print_Bounds(Signed_Byte, "S 8 "); + procedure P_UW is new Print_Bounds(Unsigned_Word, "U 32 "); + procedure P_Th is new Print_Bounds(Thousand, "Thous"); + procedure P_SD is new Print_Bounds(Signed_Double, "S 64 "); + procedure P_Cr is new Print_Bounds(Crazy, "Crazy"); + + A: Crazy := Crazy'First; + +begin + Put_Line("Predefined Types:"); + P_Int; P_Nat; P_Pos; P_Long; + New_Line; + + Put_Line("Types defined by the user:"); + P_UB; P_SB; P_UW; P_Th; P_SD; P_Cr; + New_Line; + + Put_Line("Forcing a variable of type Crazy to overflow:"); + loop -- endless loop + Put(" " & Crazy'Image(A) & "+1"); + A := A + 1; -- line 49 -- this will later raise a CONSTRAINT_ERROR + end loop; +end Overflow; diff --git a/Task/Integer-overflow/Ada/integer-overflow.adb b/Task/Integer-overflow/Ada/integer-overflow.adb deleted file mode 100644 index da4fe71c7b..0000000000 --- a/Task/Integer-overflow/Ada/integer-overflow.adb +++ /dev/null @@ -1,51 +0,0 @@ -with Ada.Text_IO; use Ada.Text_IO; - -procedure Overflow is - - generic - type T is Range <>; - Name_Of_T: String; - procedure Print_Bounds; -- first instantiate this with T, Name - -- then call the instantiation - procedure Print_Bounds is - begin - Put_Line(" " & Name_Of_T & " " & T'Image(T'First) - & " .." & T'Image(T'Last)); - end Print_Bounds; - - procedure P_Int is new Print_Bounds(Integer, "Integer "); - procedure P_Nat is new Print_Bounds(Natural, "Natural "); - procedure P_Pos is new Print_Bounds(Positive, "Positive"); - procedure P_Long is new Print_Bounds(Long_Integer, "Long "); - - type Unsigned_Byte is range 0 .. 255; - type Signed_Byte is range -128 .. 127; - type Unsigned_Word is range 0 .. 2**32-1; - type Thousand is range 0 .. 999; - type Signed_Double is range - 2**63 .. 2**63-1; - type Crazy is range -11 .. -3; - - procedure P_UB is new Print_Bounds(Unsigned_Byte, "U 8 "); - procedure P_SB is new Print_Bounds(Signed_Byte, "S 8 "); - procedure P_UW is new Print_Bounds(Unsigned_Word, "U 32 "); - procedure P_Th is new Print_Bounds(Thousand, "Thous"); - procedure P_SD is new Print_Bounds(Signed_Double, "S 64 "); - procedure P_Cr is new Print_Bounds(Crazy, "Crazy"); - - A: Crazy := Crazy'First; - -begin - Put_Line("Predefined Types:"); - P_Int; P_Nat; P_Pos; P_Long; - New_Line; - - Put_Line("Types defined by the user:"); - P_UB; P_SB; P_UW; P_Th; P_SD; P_Cr; - New_Line; - - Put_Line("Forcing a variable of type Crazy to overflow:"); - loop -- endless loop - Put(" " & Crazy'Image(A) & "+1"); - A := A + 1; -- line 49 -- this will later raise a CONSTRAINT_ERROR - end loop; -end Overflow; diff --git a/Task/Integer-overflow/Applesoft-BASIC/integer-overflow-5.basic b/Task/Integer-overflow/Applesoft-BASIC/integer-overflow-5.basic index 342b708226..af3e54154a 100644 --- a/Task/Integer-overflow/Applesoft-BASIC/integer-overflow-5.basic +++ b/Task/Integer-overflow/Applesoft-BASIC/integer-overflow-5.basic @@ -1 +1 @@ -A% = -32767 : POKE PEEK(131) + PEEK(132) * 256 + 1, 0 : ? A% +A% = -32767 : POKE PEEK(131) + PEEK(132) * 256, 0 : ? A% diff --git a/Task/Integer-overflow/COBOL/integer-overflow-1.cob b/Task/Integer-overflow/COBOL/integer-overflow-1.cobol similarity index 100% rename from Task/Integer-overflow/COBOL/integer-overflow-1.cob rename to Task/Integer-overflow/COBOL/integer-overflow-1.cobol diff --git a/Task/Integer-overflow/COBOL/integer-overflow-2.cob b/Task/Integer-overflow/COBOL/integer-overflow-2.cobol similarity index 100% rename from Task/Integer-overflow/COBOL/integer-overflow-2.cob rename to Task/Integer-overflow/COBOL/integer-overflow-2.cobol diff --git a/Task/Integer-overflow/Crystal/integer-overflow.cr b/Task/Integer-overflow/Crystal/integer-overflow.cr deleted file mode 100644 index 2a14023b37..0000000000 --- a/Task/Integer-overflow/Crystal/integer-overflow.cr +++ /dev/null @@ -1,38 +0,0 @@ -macro try (expr) - printf "%-*s # => ", padding, {{expr.stringify}} - begin - puts {{expr}} - rescue ex - puts "Exception: #{ex.message}" - end -end - -padding = 25 -puts "Result does not fit into a 32-bit signed integer:" -try -(-2147483647-1) -try 2000000000 + 2000000000 -try -2147483647 - 2147483647 -try 46341 * 46341 -try (-2147483647-1) // -1 - -padding = 52 -puts "\nResult does not fit into a 64-bit signed integer:" -try -(-9223372036854775807 - 1) -try 5000000000000000000 + 5000000000000000000 -try -9223372036854775807 - 9223372036854775807 -try 3037000500 * 3037000500 -try (-9223372036854775807 - 1) // -1 - -padding = 32 -puts "\nResult does not fit into a 32-bit unsigned integer:" -try -4294967295.to_u32 -try 3000000000_u32 + 3000000000_u32 -try 2147483647_u32 - 4294967295_u32 -try 65537_u32 * 65537_u32 - -padding = 52 -puts "\nResult that does not fit into a 64-bit unsigned integer:" -try -18446744073709551615_i128.to_u64 -try 10000000000000000000_u64 + 10000000000000000000_u64 -try 9223372036854775807_u64 - 18446744073709551615_u64 -try 4294967296_u64 * 4294967296_64 diff --git a/Task/Integer-overflow/Delphi/integer-overflow.delphi b/Task/Integer-overflow/Delphi/integer-overflow.delphi new file mode 100644 index 0000000000..05327d8aee --- /dev/null +++ b/Task/Integer-overflow/Delphi/integer-overflow.delphi @@ -0,0 +1,123 @@ +var IS32: integer; {Signed 32-bit integer} +var IS64: Int64; {Signed 64-bit integer} +var IU32: cardinal; {Unsigned 32-bit integer} + +{============ Signed 32 bit tests ===================================} + +procedure TestSigned32_1; +begin +IS32:=-(-2147483647-1); +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + +procedure TestSigned32_2; +begin +IS32:=2000000000 + 2000000000; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + + +procedure TestSigned32_3; +begin +IS32:=-2147483647 - 2147483647; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + +procedure TestSigned32_4; +begin +IS32:=46341 * 46341; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + + +procedure TestSigned32_5; +begin +IS32:=(-2147483647-1) div -1; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + +{============ Signed 64 bit tests ===================================} + +procedure TestSigned64_1; +begin +IS64:=-(-9223372036854775807-1); +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +procedure TestSigned64_2; +begin +IS64:=5000000000000000000+5000000000000000000; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +procedure TestSigned64_3; +begin +IS64:=-9223372036854775807 - 9223372036854775807; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +procedure TestSigned64_4; +begin +IS64:=3037000500 * 3037000500; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +procedure TestSigned64_5; +begin +IS64:=(-9223372036854775807-1) div -1; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +{============ UnSigned 32 bit tests ===================================} + +procedure TestUnSigned32_1; +begin +IU32:=-4294967295; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +procedure TestUnSigned32_2; +begin +IU32:=3000000000 + 3000000000; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +procedure TestUnSigned32_3; +begin +IU32:=2147483647 - 4294967295; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +procedure TestUnSigned32_4; +begin +IU32:=65537 * 65537; +end; + +// Compiler: "Overflow in conversion or arithmetic operation" + + +//Delphi-6 does not have 64-bit unsigned integers. +//Later version have 64-bit unsigned integers. diff --git a/Task/Integer-overflow/Delphi/integer-overflow.pas b/Task/Integer-overflow/Delphi/integer-overflow.pas deleted file mode 100644 index 865888a299..0000000000 --- a/Task/Integer-overflow/Delphi/integer-overflow.pas +++ /dev/null @@ -1,123 +0,0 @@ -var IS32: integer; {Signed 32-bit integer} -var IS64: Int64; {Signed 64-bit integer} -var IU32: cardinal; {Unsigned 32-bit integer} - -{============ Signed 32 bit tests ===================================} - -procedure TestSigned32_1; -begin -IS32:=-(-2147483647-1); -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - -procedure TestSigned32_2; -begin -IS32:=2000000000 + 2000000000; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - - -procedure TestSigned32_3; -begin -IS32:=-2147483647 - 2147483647; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - -procedure TestSigned32_4; -begin -IS32:=46341 * 46341; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - - -procedure TestSigned32_5; -begin -IS32:=(-2147483647-1) div -1; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - -{============ Signed 64 bit tests ===================================} - -procedure TestSigned64_1; -begin -IS64:=-(-9223372036854775807-1); -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -procedure TestSigned64_2; -begin -IS64:=5000000000000000000+5000000000000000000; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -procedure TestSigned64_3; -begin -IS64:=-9223372036854775807 - 9223372036854775807; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -procedure TestSigned64_4; -begin -IS64:=3037000500 * 3037000500; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -procedure TestSigned64_5; -begin -IS64:=(-9223372036854775807-1) div -1; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -{============ UnSigned 32 bit tests ===================================} - -procedure TestUnSigned32_1; -begin -IU32:=-4294967295; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -procedure TestUnSigned32_2; -begin -IU32:=3000000000 + 3000000000; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -procedure TestUnSigned32_3; -begin -IU32:=2147483647 - 4294967295; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -procedure TestUnSigned32_4; -begin -IU32:=65537 * 65537; -end; - -// Compiler: "Overflow in conversion or arithmetic operation" - - -//Delphi-6 does not have 64-bit unsigned integers. -//Later version have 64-bit unsigned integers. diff --git a/Task/Integer-overflow/FutureBasic/integer-overflow.basic b/Task/Integer-overflow/FutureBasic/integer-overflow.basic deleted file mode 100644 index 722195a19e..0000000000 --- a/Task/Integer-overflow/FutureBasic/integer-overflow.basic +++ /dev/null @@ -1,17 +0,0 @@ -include "NSLog.incl" - -NSLog( @"FB Integer ranges:\n" ) - -NSLog( @"UInt64: 0 to %llu", ULLONG_MAX ) -NSLog( @"SInt64: %lld to %lld\n", LLONG_MIN, LLONG_MAX ) - -NSLog( @"UInt32: 0 to %u", UINT_MAX ) -NSLog( @"SInt32: %ld to %ld\n", INT_MIN, INT_MAX ) - -NSLog( @"UInt16: 0 to %hu", USHRT_MAX ) -NSLog( @"SInt16: %hd to %hd\n", SHRT_MIN, SHRT_MAX ) - -NSLog( @"UInt8: 0 to %u", UCHAR_MAX ) -NSLog( @"SInt8: %d to %d", CHAR_MIN, CHAR_MAX ) - -HandleEvents diff --git a/Task/Integer-overflow/Go/integer-overflow.go b/Task/Integer-overflow/Go/integer-overflow.go index 755a63b7f1..0beb5da9a1 100644 --- a/Task/Integer-overflow/Go/integer-overflow.go +++ b/Task/Integer-overflow/Go/integer-overflow.go @@ -3,106 +3,106 @@ package main import "fmt" func main() { - // Go's builtin integer types are: - // int, int8, int16, int32, int64 - // uint, uint8, uint16, uint32, uint64 - // byte, rune, uintptr - // - // int is either 32 or 64 bit, depending on the system - // uintptr is large enough to hold the bit pattern of any pointer - // byte is 8 bits like int8 - // rune is 32 bits like int32 - // - // Overflow and underflow is silent. The math package defines a number - // of constants that can be helpfull, e.g.: - // math.MaxInt64 = 1<<63 - 1 - // math.MinInt64 = -1 << 63 - // math.MaxUint64 = 1<<64 - 1 - // - // The math/big package implements multi-precision - // arithmetic (big numbers). - // - // In all cases assignment from one type to another requires - // an explicit cast, even if the types are otherwise identical - // (e.g. rune and int32 or int and either int32 or int64). - // Casts silently truncate if required. - // - // Invalid: - // var i int = int32(0) - // var r rune = int32(0) - // var b byte = int8(0) - // - // Valid: - var i64 int64 = 42 - var i32 int32 = int32(i64) - var i16 int16 = int16(i64) - var i8 int8 = int8(i16) - var i int = int(i8) - var r rune = rune(i) - var b byte = byte(r) - var u64 uint64 = uint64(b) - var u32 uint32 + // Go's builtin integer types are: + // int, int8, int16, int32, int64 + // uint, uint8, uint16, uint32, uint64 + // byte, rune, uintptr + // + // int is either 32 or 64 bit, depending on the system + // uintptr is large enough to hold the bit pattern of any pointer + // byte is 8 bits like int8 + // rune is 32 bits like int32 + // + // Overflow and underflow is silent. The math package defines a number + // of constants that can be helpfull, e.g.: + // math.MaxInt64 = 1<<63 - 1 + // math.MinInt64 = -1 << 63 + // math.MaxUint64 = 1<<64 - 1 + // + // The math/big package implements multi-precision + // arithmetic (big numbers). + // + // In all cases assignment from one type to another requires + // an explicit cast, even if the types are otherwise identical + // (e.g. rune and int32 or int and either int32 or int64). + // Casts silently truncate if required. + // + // Invalid: + // var i int = int32(0) + // var r rune = int32(0) + // var b byte = int8(0) + // + // Valid: + var i64 int64 = 42 + var i32 int32 = int32(i64) + var i16 int16 = int16(i64) + var i8 int8 = int8(i16) + var i int = int(i8) + var r rune = rune(i) + var b byte = byte(r) + var u64 uint64 = uint64(b) + var u32 uint32 - //const c int = -(-2147483647 - 1) // Compiler error on 32 bit systems, ok on 64 bit - const c = -(-2147483647 - 1) // Allowed even on 32 bit systems, c is untyped - i64 = c - //i32 = c // Compiler error - //i32 = -(-2147483647 - 1) // Compiler error - i32 = -2147483647 - i32 = -(-i32 - 1) - fmt.Println("32 bit signed integers") - fmt.Printf(" -(-2147483647 - 1) = %d, got %d\n", i64, i32) + //const c int = -(-2147483647 - 1) // Compiler error on 32 bit systems, ok on 64 bit + const c = -(-2147483647 - 1) // Allowed even on 32 bit systems, c is untyped + i64 = c + //i32 = c // Compiler error + //i32 = -(-2147483647 - 1) // Compiler error + i32 = -2147483647 + i32 = -(-i32 - 1) + fmt.Println("32 bit signed integers") + fmt.Printf(" -(-2147483647 - 1) = %d, got %d\n", i64, i32) - i64 = 2000000000 + 2000000000 - //i32 = 2000000000 + 2000000000 // Compiler error - i32 = 2000000000 - i32 = i32 + i32 - fmt.Printf(" 2000000000 + 2000000000 = %d, got %d\n", i64, i32) - i64 = -2147483647 - 2147483647 - i32 = 2147483647 - i32 = -i32 - i32 - fmt.Printf(" -2147483647 - 2147483647 = %d, got %d\n", i64, i32) - i64 = 46341 * 46341 - i32 = 46341 - i32 = i32 * i32 - fmt.Printf(" 46341 * 46341 = %d, got %d\n", i64, i32) - i64 = (-2147483647 - 1) / -1 - i32 = -2147483647 - i32 = (i32 - 1) / -1 - fmt.Printf(" (-2147483647-1) / -1 = %d, got %d\n", i64, i32) + i64 = 2000000000 + 2000000000 + //i32 = 2000000000 + 2000000000 // Compiler error + i32 = 2000000000 + i32 = i32 + i32 + fmt.Printf(" 2000000000 + 2000000000 = %d, got %d\n", i64, i32) + i64 = -2147483647 - 2147483647 + i32 = 2147483647 + i32 = -i32 - i32 + fmt.Printf(" -2147483647 - 2147483647 = %d, got %d\n", i64, i32) + i64 = 46341 * 46341 + i32 = 46341 + i32 = i32 * i32 + fmt.Printf(" 46341 * 46341 = %d, got %d\n", i64, i32) + i64 = (-2147483647 - 1) / -1 + i32 = -2147483647 + i32 = (i32 - 1) / -1 + fmt.Printf(" (-2147483647-1) / -1 = %d, got %d\n", i64, i32) - fmt.Println("\n64 bit signed integers") - i64 = -9223372036854775807 - fmt.Printf(" -(%d - 1): %d\n", i64, -(i64 - 1)) - i64 = 5000000000000000000 - fmt.Printf(" %d + %d: %d\n", i64, i64, i64+i64) - i64 = 9223372036854775807 - fmt.Printf(" -%d - %d: %d\n", i64, i64, -i64-i64) - i64 = 3037000500 - fmt.Printf(" %d * %d: %d\n", i64, i64, i64*i64) - i64 = -9223372036854775807 - fmt.Printf(" (%d - 1) / -1: %d\n", i64, (i64-1)/-1) + fmt.Println("\n64 bit signed integers") + i64 = -9223372036854775807 + fmt.Printf(" -(%d - 1): %d\n", i64, -(i64 - 1)) + i64 = 5000000000000000000 + fmt.Printf(" %d + %d: %d\n", i64, i64, i64+i64) + i64 = 9223372036854775807 + fmt.Printf(" -%d - %d: %d\n", i64, i64, -i64-i64) + i64 = 3037000500 + fmt.Printf(" %d * %d: %d\n", i64, i64, i64*i64) + i64 = -9223372036854775807 + fmt.Printf(" (%d - 1) / -1: %d\n", i64, (i64-1)/-1) - fmt.Println("\n32 bit unsigned integers:") - //u32 = -4294967295 // Compiler error - u32 = 4294967295 - fmt.Printf(" -%d: %d\n", u32, -u32) - u32 = 3000000000 - fmt.Printf(" %d + %d: %d\n", u32, u32, u32+u32) - a := uint32(2147483647) - u32 = 4294967295 - fmt.Printf(" %d - %d: %d\n", a, u32, a-u32) - u32 = 65537 - fmt.Printf(" %d * %d: %d\n", u32, u32, u32*u32) + fmt.Println("\n32 bit unsigned integers:") + //u32 = -4294967295 // Compiler error + u32 = 4294967295 + fmt.Printf(" -%d: %d\n", u32, -u32) + u32 = 3000000000 + fmt.Printf(" %d + %d: %d\n", u32, u32, u32+u32) + a := uint32(2147483647) + u32 = 4294967295 + fmt.Printf(" %d - %d: %d\n", a, u32, a-u32) + u32 = 65537 + fmt.Printf(" %d * %d: %d\n", u32, u32, u32*u32) - fmt.Println("\n64 bit unsigned integers:") - u64 = 18446744073709551615 - fmt.Printf(" -%d: %d\n", u64, -u64) - u64 = 10000000000000000000 - fmt.Printf(" %d + %d: %d\n", u64, u64, u64+u64) - aa := uint64(9223372036854775807) - u64 = 18446744073709551615 - fmt.Printf(" %d - %d: %d\n", aa, u64, aa-u64) - u64 = 4294967296 - fmt.Printf(" %d * %d: %d\n", u64, u64, u64*u64) + fmt.Println("\n64 bit unsigned integers:") + u64 = 18446744073709551615 + fmt.Printf(" -%d: %d\n", u64, -u64) + u64 = 10000000000000000000 + fmt.Printf(" %d + %d: %d\n", u64, u64, u64+u64) + aa := uint64(9223372036854775807) + u64 = 18446744073709551615 + fmt.Printf(" %d - %d: %d\n", aa, u64, aa-u64) + u64 = 4294967296 + fmt.Printf(" %d * %d: %d\n", u64, u64, u64*u64) } diff --git a/Task/Integer-overflow/Java/integer-overflow-2.java b/Task/Integer-overflow/Java/integer-overflow-2.java index f67ad7136d..adc00033b5 100644 --- a/Task/Integer-overflow/Java/integer-overflow-2.java +++ b/Task/Integer-overflow/Java/integer-overflow-2.java @@ -1,16 +1,16 @@ public final class IntegerOverflow { - public static void main(String[] args) { - // The following examples show that Java allows integer overflow without warning - // and calculates an incorrect result. - - // From version 8, Java introduced methods which throw an ArithmeticException when overflow occurs, + public static void main(String[] args) { + // The following examples show that Java allows integer overflow without warning + // and calculates an incorrect result. + + // From version 8, Java introduced methods which throw an ArithmeticException when overflow occurs, // which prevents the calculation of an incorrect result. It also allows the programmer to replace an "int" // with a "long" and to replace a "long" with a BigInteger. - - // Uncomment the lines below to see the use of the new methods: - // addExact(), subtractExact(), multiplyExact() and negateExact(). - System.out.println("Signed 32-bit:"); + + // Uncomment the lines below to see the use of the new methods: + // addExact(), subtractExact(), multiplyExact() and negateExact(). + System.out.println("Signed 32-bit:"); System.out.println(-(-2_147_483_647 - 1)); // System.out.println(Math.negateExact(-2_147_483_647 - 1)); @@ -42,6 +42,6 @@ public final class IntegerOverflow { System.out.println((-9_223_372_036_854_775_807L - 1) / -1); // System.out.println(Math.negateExact(Math.subtractExact(-9_223_372_036_854_775_807L, 1) / 1)); - } + } } diff --git a/Task/Integer-overflow/Jq/integer-overflow.jq b/Task/Integer-overflow/Jq/integer-overflow.jq index b61ca08e1f..b74f2de480 100644 --- a/Task/Integer-overflow/Jq/integer-overflow.jq +++ b/Task/Integer-overflow/Jq/integer-overflow.jq @@ -10,16 +10,16 @@ def compare: [ -(-2147483647-1),"2147483648"], [2000000000 + 2000000000, "4000000000"], -[-2147483647 - 2147483647, "-4294967294"], -[46341 * 46341, "2147488281"], -[(-2147483647-1) / -1, "2147483648"], +[-2147483647 - 2147483647, "-4294967294"], +[46341 * 46341, "2147488281"], +[(-2147483647-1) / -1, "2147483648"], "For 64-bit signed integers:", -[-(-9223372036854775807-1), "9223372036854775808"], -[5000000000000000000+5000000000000000000, "10000000000000000000"], -[-9223372036854775807 - 9223372036854775807, "-18446744073709551614"], -[3037000500 * 3037000500, "9223372037000250000"], +[-(-9223372036854775807-1), "9223372036854775808"], +[5000000000000000000+5000000000000000000, "10000000000000000000"], +[-9223372036854775807 - 9223372036854775807, "-18446744073709551614"], +[3037000500 * 3037000500, "9223372037000250000"], [(-9223372036854775807-1) / -1, "9223372036854775808"], "For 32-bit unsigned integers:", diff --git a/Task/Integer-overflow/Julia/integer-overflow-1.jl b/Task/Integer-overflow/Julia/integer-overflow-1.julia similarity index 100% rename from Task/Integer-overflow/Julia/integer-overflow-1.jl rename to Task/Integer-overflow/Julia/integer-overflow-1.julia diff --git a/Task/Integer-overflow/Julia/integer-overflow-2.jl b/Task/Integer-overflow/Julia/integer-overflow-2.julia similarity index 100% rename from Task/Integer-overflow/Julia/integer-overflow-2.jl rename to Task/Integer-overflow/Julia/integer-overflow-2.julia diff --git a/Task/Integer-overflow/Kotlin/integer-overflow.kts b/Task/Integer-overflow/Kotlin/integer-overflow.kotlin similarity index 100% rename from Task/Integer-overflow/Kotlin/integer-overflow.kts rename to Task/Integer-overflow/Kotlin/integer-overflow.kotlin diff --git a/Task/Integer-overflow/Ksh/integer-overflow.ksh b/Task/Integer-overflow/Ksh/integer-overflow.ksh index a88605d4e4..94d4d6dedf 100644 --- a/Task/Integer-overflow/Ksh/integer-overflow.ksh +++ b/Task/Integer-overflow/Ksh/integer-overflow.ksh @@ -2,7 +2,7 @@ # Integer overflow -# # Variables: +# # Variables: # typeset -si SHORT_INT typeset -i INTEGER diff --git a/Task/Integer-overflow/PL-I-80/integer-overflow.pli b/Task/Integer-overflow/PL-I-80/integer-overflow.pli deleted file mode 100644 index 1e873986b5..0000000000 --- a/Task/Integer-overflow/PL-I-80/integer-overflow.pli +++ /dev/null @@ -1,6 +0,0 @@ -overflow_demo: proc options (main); - dcl n fixed bin; - n = 32767; - put skip list (n+2); - put skip list (n*2); -end overflow_demo; diff --git a/Task/Integer-overflow/Pluto/integer-overflow.pluto b/Task/Integer-overflow/Pluto/integer-overflow.pluto deleted file mode 100644 index a8af75f375..0000000000 --- a/Task/Integer-overflow/Pluto/integer-overflow.pluto +++ /dev/null @@ -1,7 +0,0 @@ -local expressions = { - -(-9223372036854775807 - 1), - 5000000000000000000 + 5000000000000000000, - -9223372036854775807 - 9223372036854775807 -} - -for expressions as expr do print(expr) end diff --git a/Task/Integer-overflow/PowerShell/integer-overflow.ps1 b/Task/Integer-overflow/PowerShell/integer-overflow.ps1 deleted file mode 100644 index 86bbd55c7f..0000000000 --- a/Task/Integer-overflow/PowerShell/integer-overflow.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -try { - # All of these raise an exception, which is caught below. - # The try block is aborted after the first exception, - # so the subsequent lines are never executed. - - [int32] (-(-2147483647-1)) - [int32] (2000000000 + 2000000000) - [int32] (-2147483647 - 2147483647) - [int32] (46341 * 46341) - [int32] ((-2147483647-1) / -1) - - [int64] (-(-9223372036854775807-1)) - [int64] (5000000000000000000+5000000000000000000) - [int64] (-9223372036854775807 - 9223372036854775807) - [int64] (3037000500 * 3037000500) - [int64] ((-9223372036854775807-1) / -1) - - [uint32] (-4294967295) - [uint32] (3000000000 + 3000000000) - [uint32] (2147483647 - 4294967295) - [uint32] (65537 * 65537) - - [uint64] (-18446744073709551615) - [uint64] (10000000000000000000 + 10000000000000000000) - [uint64] (9223372036854775807 - 18446744073709551615) - [uint64] (4294967296 * 4294967296) -} -catch { - $Error.Exception -} diff --git a/Task/Integer-overflow/PowerShell/integer-overflow.psh b/Task/Integer-overflow/PowerShell/integer-overflow.psh new file mode 100644 index 0000000000..48524e2b56 --- /dev/null +++ b/Task/Integer-overflow/PowerShell/integer-overflow.psh @@ -0,0 +1,30 @@ +try { + # All of these raise an exception, which is caught below. + # The try block is aborted after the first exception, + # so the subsequent lines are never executed. + + [int32] (-(-2147483647-1)) + [int32] (2000000000 + 2000000000) + [int32] (-2147483647 - 2147483647) + [int32] (46341 * 46341) + [int32] ((-2147483647-1) / -1) + + [int64] (-(-9223372036854775807-1)) + [int64] (5000000000000000000+5000000000000000000) + [int64] (-9223372036854775807 - 9223372036854775807) + [int64] (3037000500 * 3037000500) + [int64] ((-9223372036854775807-1) / -1) + + [uint32] (-4294967295) + [uint32] (3000000000 + 3000000000) + [uint32] (2147483647 - 4294967295) + [uint32] (65537 * 65537) + + [uint64] (-18446744073709551615) + [uint64] (10000000000000000000 + 10000000000000000000) + [uint64] (9223372036854775807 - 18446744073709551615) + [uint64] (4294967296 * 4294967296) +} +catch { + $Error.Exception +} diff --git a/Task/Integer-overflow/Python/integer-overflow-1.py b/Task/Integer-overflow/Python/integer-overflow-1.py index 0627deacc4..b31607a136 100644 --- a/Task/Integer-overflow/Python/integer-overflow-1.py +++ b/Task/Integer-overflow/Python/integer-overflow-1.py @@ -5,11 +5,11 @@ Type "copyright", "credits" or "license()" for more information. -2147483647 - 2147483647 46341 * 46341 (-2147483647-1) / -1'''.split('\n'): - ans = eval(calc) - print('Expression: %r evaluates to %s of type %s' - % (calc.strip(), ans, type(ans))) - + ans = eval(calc) + print('Expression: %r evaluates to %s of type %s' + % (calc.strip(), ans, type(ans))) + Expression: '-(-2147483647-1)' evaluates to 2147483648 of type Expression: '2000000000 + 2000000000' evaluates to 4000000000 of type Expression: '-2147483647 - 2147483647' evaluates to -4294967294 of type diff --git a/Task/Integer-overflow/Python/integer-overflow-2.py b/Task/Integer-overflow/Python/integer-overflow-2.py index 1da7b38e6f..ce1671d160 100644 --- a/Task/Integer-overflow/Python/integer-overflow-2.py +++ b/Task/Integer-overflow/Python/integer-overflow-2.py @@ -5,11 +5,11 @@ Type "copyright", "credits" or "license()" for more information. -2147483647 - 2147483647 46341 * 46341 (-2147483647-1) / -1'''.split('\n'): - ans = eval(calc) - print('Expression: %r evaluates to %s of type %s' - % (calc.strip(), ans, type(ans))) - + ans = eval(calc) + print('Expression: %r evaluates to %s of type %s' + % (calc.strip(), ans, type(ans))) + Expression: '-(-2147483647-1)' evaluates to 2147483648 of type Expression: '2000000000 + 2000000000' evaluates to 4000000000 of type Expression: '-2147483647 - 2147483647' evaluates to -4294967294 of type diff --git a/Task/Integer-overflow/R/integer-overflow.r b/Task/Integer-overflow/R/integer-overflow.r deleted file mode 100644 index ff8070a2d2..0000000000 --- a/Task/Integer-overflow/R/integer-overflow.r +++ /dev/null @@ -1,2 +0,0 @@ -46341*46341L -46341L*46341L diff --git a/Task/Integer-overflow/Rebol/integer-overflow.rebol b/Task/Integer-overflow/Rebol/integer-overflow.rebol deleted file mode 100644 index ec032950ee..0000000000 --- a/Task/Integer-overflow/Rebol/integer-overflow.rebol +++ /dev/null @@ -1,33 +0,0 @@ -Rebol [ - title: "Rosetta code: Integer overflow" - file: %Integer_overflow.r3 - url: https://rosettacode.org/wiki/Integer_overflow -] - -foreach expr [ - ;; For 32-bit signed integers: - [negate (-2147483647 - 1) ] - [2000000000 + 2000000000 ] - [-2147483647 - 2147483647 ] - [46341 * 46341 ] - [(-2147483647 - 1) / -1 ] - ;; For 64-bit signed integers: - [negate (-9223372036854775807 - 1) ] - [5000000000000000000 + 5000000000000000000 ] - [-9223372036854775807 - 9223372036854775807] - [3037000500 * 3037000500 ] - [(-9223372036854775807 - 1) / -1 ] - ;; For 32-bit unsigned integers: - [-4294967295 ] - [3000000000 + 3000000000 ] - [2147483647 - 4294967295 ] - [65537 * 65537 ] - ;; For 64-bit unsigned integers: - [transcode "-18446744073709551615" ] - [transcode " 10000000000000000000" ] - [transcode " 18446744073709551615" ] - [4294967296 * 4294967296 ] -][ - prin [pad mold/only expr 44 ";== "] - print either error? res: try expr [as-red reform [res/type res/id]][res] -] diff --git a/Task/Integer-overflow/Rust/integer-overflow-1.rs b/Task/Integer-overflow/Rust/integer-overflow-1.rust similarity index 100% rename from Task/Integer-overflow/Rust/integer-overflow-1.rs rename to Task/Integer-overflow/Rust/integer-overflow-1.rust diff --git a/Task/Integer-overflow/Rust/integer-overflow-2.rs b/Task/Integer-overflow/Rust/integer-overflow-2.rust similarity index 100% rename from Task/Integer-overflow/Rust/integer-overflow-2.rs rename to Task/Integer-overflow/Rust/integer-overflow-2.rust diff --git a/Task/Integer-overflow/S-BASIC/integer-overflow.basic b/Task/Integer-overflow/S-BASIC/integer-overflow.basic deleted file mode 100644 index 2bd1b5aa2c..0000000000 --- a/Task/Integer-overflow/S-BASIC/integer-overflow.basic +++ /dev/null @@ -1,5 +0,0 @@ -var n = integer -n = 32767 rem - maximum integer value -print n+2 -print n*2 -end diff --git a/Task/Integer-overflow/VBScript/integer-overflow.vb b/Task/Integer-overflow/VBScript/integer-overflow.vb new file mode 100644 index 0000000000..fc10958150 --- /dev/null +++ b/Task/Integer-overflow/VBScript/integer-overflow.vb @@ -0,0 +1,14 @@ +'Binary Integer overflow - vbs +i=(-2147483647-1)/-1 +wscript.echo i +i0=32767 '=32767 Integer (Fixed) type=2 +i1=2147483647 '=2147483647 Long (Fixed) type=3 +i2=-(-2147483647-1) '=2147483648 Double (Float) type=5 +wscript.echo Cstr(i0) & " : " & typename(i0) & " , " & vartype(i0) & vbcrlf _ + & Cstr(i1) & " : " & typename(i1) & " , " & vartype(i1) & vbcrlf _ + & Cstr(i2) & " : " & typename(i2) & " , " & vartype(i2) +ii=2147483648-2147483647 +if vartype(ii)<>3 or vartype(ii)<>2 then wscript.echo "Integer overflow type=" & typename(ii) +i1=1000000000000000-1 '1E+15-1 +i2=i1+1 '1E+15 +wscript.echo Cstr(i1) & " , " & Cstr(i2) diff --git a/Task/Integer-overflow/VBScript/integer-overflow.vbs b/Task/Integer-overflow/VBScript/integer-overflow.vbs deleted file mode 100644 index 2aef204024..0000000000 --- a/Task/Integer-overflow/VBScript/integer-overflow.vbs +++ /dev/null @@ -1,14 +0,0 @@ -'Binary Integer overflow - vbs -i=(-2147483647-1)/-1 -wscript.echo i -i0=32767 '=32767 Integer (Fixed) type=2 -i1=2147483647 '=2147483647 Long (Fixed) type=3 -i2=-(-2147483647-1) '=2147483648 Double (Float) type=5 -wscript.echo Cstr(i0) & " : " & typename(i0) & " , " & vartype(i0) & vbcrlf _ - & Cstr(i1) & " : " & typename(i1) & " , " & vartype(i1) & vbcrlf _ - & Cstr(i2) & " : " & typename(i2) & " , " & vartype(i2) -ii=2147483648-2147483647 -if vartype(ii)<>3 or vartype(ii)<>2 then wscript.echo "Integer overflow type=" & typename(ii) -i1=1000000000000000-1 '1E+15-1 -i2=i1+1 '1E+15 -wscript.echo Cstr(i1) & " , " & Cstr(i2) diff --git a/Task/Integer-overflow/YAMLScript/integer-overflow.ys b/Task/Integer-overflow/YAMLScript/integer-overflow.ys deleted file mode 100644 index d7618a29d2..0000000000 --- a/Task/Integer-overflow/YAMLScript/integer-overflow.ys +++ /dev/null @@ -1,14 +0,0 @@ -!YS-v0 - -tests =: | - -9223372036854775807.-- * -1 - 5000000000000000000 + 5000000000000000000 - -9223372036854775807 - 9223372036854775807 - 3037000500 * 3037000500 - -each test tests:lines: - say: test - try: - eval: test - catch e: - say: "$e\n" diff --git a/Task/Integer-sequence/Ada/integer-sequence-1.adb b/Task/Integer-sequence/Ada/integer-sequence-1.ada similarity index 100% rename from Task/Integer-sequence/Ada/integer-sequence-1.adb rename to Task/Integer-sequence/Ada/integer-sequence-1.ada diff --git a/Task/Integer-sequence/Ada/integer-sequence-2.adb b/Task/Integer-sequence/Ada/integer-sequence-2.ada similarity index 100% rename from Task/Integer-sequence/Ada/integer-sequence-2.adb rename to Task/Integer-sequence/Ada/integer-sequence-2.ada diff --git a/Task/Integer-sequence/ArkScript/integer-sequence-1.ark b/Task/Integer-sequence/ArkScript/integer-sequence-1.ark deleted file mode 100644 index 3292a2f31d..0000000000 --- a/Task/Integer-sequence/ArkScript/integer-sequence-1.ark +++ /dev/null @@ -1,4 +0,0 @@ -(mut i 0) -(while true { - (print i) - (set i (+ 1 i)) }) diff --git a/Task/Integer-sequence/ArkScript/integer-sequence-2.ark b/Task/Integer-sequence/ArkScript/integer-sequence-2.ark deleted file mode 100644 index 99a3156c43..0000000000 --- a/Task/Integer-sequence/ArkScript/integer-sequence-2.ark +++ /dev/null @@ -1,5 +0,0 @@ -(let loop (fun (i) { - (print i) - (loop (+ i 1)) })) - -(loop 0) diff --git a/Task/Integer-sequence/Ballerina/integer-sequence.ballerina b/Task/Integer-sequence/Ballerina/integer-sequence.ballerina deleted file mode 100644 index ac60f4738e..0000000000 --- a/Task/Integer-sequence/Ballerina/integer-sequence.ballerina +++ /dev/null @@ -1,9 +0,0 @@ -import ballerina/io; - -public function main() { - int a = 1; - while true { - io:println(a); - a += 1; - } -} diff --git a/Task/Integer-sequence/COBOL/integer-sequence.cob b/Task/Integer-sequence/COBOL/integer-sequence.cobol similarity index 100% rename from Task/Integer-sequence/COBOL/integer-sequence.cob rename to Task/Integer-sequence/COBOL/integer-sequence.cobol diff --git a/Task/Integer-sequence/Crystal/integer-sequence.cr b/Task/Integer-sequence/Crystal/integer-sequence.crystal similarity index 100% rename from Task/Integer-sequence/Crystal/integer-sequence.cr rename to Task/Integer-sequence/Crystal/integer-sequence.crystal diff --git a/Task/Integer-sequence/Delphi/integer-sequence.pas b/Task/Integer-sequence/Delphi/integer-sequence.delphi similarity index 100% rename from Task/Integer-sequence/Delphi/integer-sequence.pas rename to Task/Integer-sequence/Delphi/integer-sequence.delphi diff --git a/Task/Integer-sequence/EasyLang/integer-sequence.easy b/Task/Integer-sequence/EasyLang/integer-sequence.easy index 8891f16bc4..ff87b9eebc 100644 --- a/Task/Integer-sequence/EasyLang/integer-sequence.easy +++ b/Task/Integer-sequence/EasyLang/integer-sequence.easy @@ -1,10 +1,10 @@ max = pow 2 53 repeat print i - if i = 5 + if i = 10 print "." print "." - i = max - 6 + i = max - 10 . until i = max i += 1 diff --git a/Task/Integer-sequence/Elena/integer-sequence.elena b/Task/Integer-sequence/Elena/integer-sequence.elena index 6e18d53cf6..2294d76879 100644 --- a/Task/Integer-sequence/Elena/integer-sequence.elena +++ b/Task/Integer-sequence/Elena/integer-sequence.elena @@ -1,11 +1,11 @@ import extensions; -public Program() +public program() { var i := 0u; while (true) { - Console.printLine(i); + console.printLine(i); i += 1u } diff --git a/Task/Integer-sequence/Elixir/integer-sequence.ex b/Task/Integer-sequence/Elixir/integer-sequence.elixir similarity index 100% rename from Task/Integer-sequence/Elixir/integer-sequence.ex rename to Task/Integer-sequence/Elixir/integer-sequence.elixir diff --git a/Task/Integer-sequence/Emacs-Lisp/integer-sequence.el b/Task/Integer-sequence/Emacs-Lisp/integer-sequence.l similarity index 100% rename from Task/Integer-sequence/Emacs-Lisp/integer-sequence.el rename to Task/Integer-sequence/Emacs-Lisp/integer-sequence.l diff --git a/Task/Integer-sequence/Euphoria/integer-sequence.eu b/Task/Integer-sequence/Euphoria/integer-sequence.euphoria similarity index 100% rename from Task/Integer-sequence/Euphoria/integer-sequence.eu rename to Task/Integer-sequence/Euphoria/integer-sequence.euphoria diff --git a/Task/Integer-sequence/Gleam/integer-sequence.gleam b/Task/Integer-sequence/Gleam/integer-sequence.gleam deleted file mode 100644 index 36185b1127..0000000000 --- a/Task/Integer-sequence/Gleam/integer-sequence.gleam +++ /dev/null @@ -1,11 +0,0 @@ -import gleam/int -import gleam/io - -pub fn main() { - count_forever(from: 1) -} - -pub fn count_forever(from n: Int) -> Nil { - n |> int.to_string |> io.println - count_forever(n + 1) -} diff --git a/Task/Integer-sequence/Julia/integer-sequence.jl b/Task/Integer-sequence/Julia/integer-sequence.julia similarity index 100% rename from Task/Integer-sequence/Julia/integer-sequence.jl rename to Task/Integer-sequence/Julia/integer-sequence.julia diff --git a/Task/Integer-sequence/Kotlin/integer-sequence.kotlin b/Task/Integer-sequence/Kotlin/integer-sequence.kotlin new file mode 100644 index 0000000000..72fec53d9d --- /dev/null +++ b/Task/Integer-sequence/Kotlin/integer-sequence.kotlin @@ -0,0 +1,15 @@ +import java.math.BigInteger + +// version 1.0.5-2 + +fun main(args: Array) { + // print until 2147483647 + (0..Int.MAX_VALUE).forEach { println(it) } + + // print forever + var n = BigInteger.ZERO + while (true) { + println(n) + n += BigInteger.ONE + } +} diff --git a/Task/Integer-sequence/Kotlin/integer-sequence.kts b/Task/Integer-sequence/Kotlin/integer-sequence.kts deleted file mode 100644 index b9260df8b4..0000000000 --- a/Task/Integer-sequence/Kotlin/integer-sequence.kts +++ /dev/null @@ -1,10 +0,0 @@ -import java.math.BigInteger - -fun main() { - // Using a 64-bit unsigned type, print until 18446744073709551615 - (1uL..ULong.MAX_VALUE).forEach { println(it) } - - // Using unlimited-size integers, print forever - var n = BigInteger.ONE - while (true) println(n++) -} diff --git a/Task/Integer-sequence/Nu/integer-sequence.nu b/Task/Integer-sequence/Nu/integer-sequence.nu deleted file mode 100644 index 230e385c07..0000000000 --- a/Task/Integer-sequence/Nu/integer-sequence.nu +++ /dev/null @@ -1 +0,0 @@ -for n in 1.. { print $n } diff --git a/Task/Integer-sequence/OCaml/integer-sequence-1.ml b/Task/Integer-sequence/OCaml/integer-sequence-1.ocaml similarity index 100% rename from Task/Integer-sequence/OCaml/integer-sequence-1.ml rename to Task/Integer-sequence/OCaml/integer-sequence-1.ocaml diff --git a/Task/Integer-sequence/OCaml/integer-sequence-2.ml b/Task/Integer-sequence/OCaml/integer-sequence-2.ocaml similarity index 100% rename from Task/Integer-sequence/OCaml/integer-sequence-2.ml rename to Task/Integer-sequence/OCaml/integer-sequence-2.ocaml diff --git a/Task/Integer-sequence/PascalABC.NET/integer-sequence-2.pas b/Task/Integer-sequence/PascalABC.NET/integer-sequence-2.pas deleted file mode 100644 index 7b206716fb..0000000000 --- a/Task/Integer-sequence/PascalABC.NET/integer-sequence-2.pas +++ /dev/null @@ -1 +0,0 @@ -## 1.Step.Print diff --git a/Task/Integer-sequence/PascalABC.NET/integer-sequence-1.pas b/Task/Integer-sequence/PascalABC.NET/integer-sequence.pas similarity index 100% rename from Task/Integer-sequence/PascalABC.NET/integer-sequence-1.pas rename to Task/Integer-sequence/PascalABC.NET/integer-sequence.pas diff --git a/Task/Integer-sequence/PowerShell/integer-sequence.ps1 b/Task/Integer-sequence/PowerShell/integer-sequence.psh similarity index 100% rename from Task/Integer-sequence/PowerShell/integer-sequence.ps1 rename to Task/Integer-sequence/PowerShell/integer-sequence.psh diff --git a/Task/Integer-sequence/Rust/integer-sequence-1.rs b/Task/Integer-sequence/Rust/integer-sequence-1.rust similarity index 100% rename from Task/Integer-sequence/Rust/integer-sequence-1.rs rename to Task/Integer-sequence/Rust/integer-sequence-1.rust diff --git a/Task/Integer-sequence/Rust/integer-sequence-2.rs b/Task/Integer-sequence/Rust/integer-sequence-2.rust similarity index 100% rename from Task/Integer-sequence/Rust/integer-sequence-2.rs rename to Task/Integer-sequence/Rust/integer-sequence-2.rust diff --git a/Task/Integer-sequence/Scheme/integer-sequence.scm b/Task/Integer-sequence/Scheme/integer-sequence.ss similarity index 100% rename from Task/Integer-sequence/Scheme/integer-sequence.scm rename to Task/Integer-sequence/Scheme/integer-sequence.ss diff --git a/Task/Integer-sequence/Uiua/integer-sequence.uiua b/Task/Integer-sequence/Uiua/integer-sequence.uiua deleted file mode 100644 index 008b417081..0000000000 --- a/Task/Integer-sequence/Uiua/integer-sequence.uiua +++ /dev/null @@ -1 +0,0 @@ -⍢(&p.+1)1 1 diff --git a/Task/Integer-sequence/Uxntal/integer-sequence.uxnatl b/Task/Integer-sequence/Uxntal/integer-sequence.uxnatl deleted file mode 100644 index fdc8e1419c..0000000000 --- a/Task/Integer-sequence/Uxntal/integer-sequence.uxnatl +++ /dev/null @@ -1,23 +0,0 @@ -%comma { [ LIT2 ", -Console/write ] DEO } -%space { [ LIT2 20 -Console/write ] DEO } - -|18 @Console/write - -|100 - -#0001 -&loop - DUP2 print/dec comma space - INC2 !&loop - -BRK - -@print/dec ( short* -- ) - #000a SWP2 [ LITr ff ] - &get - SWP2k DIV2k MUL2 SUB2 STH - POP OVR2 DIV2 ORAk ?&get - POP2 POP2 - &put - STHr INCk ?{ POP JMP2r } - [ LIT "0 ] ADD .Console/write DEO !&put diff --git a/Task/Integer-sequence/Zig/integer-sequence.zig b/Task/Integer-sequence/Zig/integer-sequence.zig deleted file mode 100644 index b3e6c9abd9..0000000000 --- a/Task/Integer-sequence/Zig/integer-sequence.zig +++ /dev/null @@ -1,9 +0,0 @@ -const stdout = @import("std").io.getStdOut().writer(); - -pub fn main() !void { - var i: u128 = 1; - - while (true) : (i += 1) { - try stdout.print("{}, ", .{i}); - } -} diff --git a/Task/Interactive-programming-repl-/AWK/interactive-programming-repl-.awk b/Task/Interactive-programming-repl-/AWK/interactive-programming-repl-.awk deleted file mode 100644 index af020ed818..0000000000 --- a/Task/Interactive-programming-repl-/AWK/interactive-programming-repl-.awk +++ /dev/null @@ -1,4 +0,0 @@ -GAWK -f CON -BEGIN { print(f("Rosetta","Code",":")) } -function f(s1,s2,s3) { return(s1 s3 s3 s2) } -^Z <-- CTRL-Z diff --git a/Task/Interactive-programming-repl-/Crystal/interactive-programming-repl-.cr b/Task/Interactive-programming-repl-/Crystal/interactive-programming-repl-.cr deleted file mode 100644 index 17ba1deb2d..0000000000 --- a/Task/Interactive-programming-repl-/Crystal/interactive-programming-repl-.cr +++ /dev/null @@ -1,11 +0,0 @@ -> crystal i -Crystal interpreter 1.15.1 [89944bf] (2025-02-04). -EXPERIMENTAL SOFTWARE: if you find a bug, please consider opening an issue in -https://github.com/crystal-lang/crystal/issues/new/ -icr:1> def f(s1, s2, sep) -icr:2> s1 + sep + sep + s2 -icr:3> end - => nil -icr:4> f "Rosetta", "Code", ":" - => "Rosetta::Code" -icr:5> diff --git a/Task/Interactive-programming-repl-/Elena/interactive-programming-repl-.elena b/Task/Interactive-programming-repl-/Elena/interactive-programming-repl-.elena index 473d529309..a63c7afea7 100644 --- a/Task/Interactive-programming-repl-/Elena/interactive-programming-repl-.elena +++ b/Task/Interactive-programming-repl-/Elena/interactive-programming-repl-.elena @@ -1,29 +1,17 @@ c:\Alex\ELENA\bin>elt-cli -ELENA command line VM terminal 6.9.6 (C)2021-25 by Aleksey Rakov -Loading repl template -Loading multiline template -Loading get_var template -Loading set_var template -ELENA VM 6.9.14 (32-bit) (C)2022-2025 by Aleksey Rakov, ELENA-LANG Org +ELENA command line VM terminal 6.0.7 (C)2021-23 by Aleksey Rakov +ELENA VM 6.0.25 (C)2022-2023 by Aleksey Rakov Initializing... -@help - help -@quit - quit -@multiline - switching to a multi-line mode - - evaluate the expression and print the result -$ := ; - assign a global variable -.. $ .. - get a global variable value -@base - set the base path for scripts -@load - execute a script from file -@import - load the script into multi-line script -@use