{"id":13779773,"url":"https://github.com/droyo/APL","last_synced_at":"2025-05-11T13:31:07.872Z","repository":{"id":66909543,"uuid":"1503453","full_name":"droyo/APL","owner":"droyo","description":"UTF8 APL interpreter","archived":false,"fork":false,"pushed_at":"2017-03-12T20:57:23.000Z","size":204,"stargazers_count":25,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-03T18:14:21.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/droyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-03-20T15:55:32.000Z","updated_at":"2024-03-03T18:26:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"87f0e202-2d8a-472d-abde-69654a8fc4c6","html_url":"https://github.com/droyo/APL","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2FAPL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2FAPL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2FAPL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droyo%2FAPL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droyo","download_url":"https://codeload.github.com/droyo/APL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225056731,"owners_count":17414192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:01:09.101Z","updated_at":"2024-11-17T15:30:42.694Z","avatar_url":"https://github.com/droyo.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Build dependencies\n- awk\n- make (GNU or BSD)\n- C compiler (tcc and gcc are used for development)\n- [libbio,libfmt,libutf](http://swtch.com/plan9port/unix/)\n\n# Build instructions\n\n\tcd src\n\tmake\n\nYou may need to tweak the CC,LD,CFLAGS and LDFLAGS\nvariables in the Makefile. Also, if your C compiler\ndoes not support flexible array members like the example\n\n\tstruct foo { int x; char m[] };\n\nYou'll need to tweak the declaration for array and ASIZE\nin apl.h. The source is developed using gcc and tcc, on\nboth x86 and x86_64 platforms.\n\n# An open-source, unicode APL interpreter\n\nThis project is my endeavour to create an open-source APL\ninterpreter that is useful for every-day use.  I want this\ninterpreter to be used much in the same way as 'awk' is used\nin the Unix environment; for one-off scripts, to poke and\nprod at data.  To this end, I have the following design\ngoals in mind:\n\n### Tiny, simple core. \n\nMore informative of this interpreter is the list of features it\nWON'T have: no object system.  No foreign function interface.\nNo graphical interface.  No networking functionality.\n\nThe one feature it will have is the ability to spawn\nprocesses and write to their stdin/stdout.  With this\nfeature, most other functionality can be implemented using\nhelper programs.\n\n### Unicode all the way down.\n\nAPL caught a lot of flak for its use of non-ascii characters\nthat required a special encoding.  Many APL systems used their\nown private encoding, making it difficult for users of different\nAPL systems to share programs.\n\nThese days Unicode is pretty wide-spread, and the encoding\nproblem is no longer a problem anymore.  This interpreter\nuses unicode for everything.  Identifiers, primitives,\nbox-drawing characters, everything.  So\n\n\tnước ← 'USA'⊃'日本'⊃'Việt Nam'⊃'Россия' \n\t右 ← ⊢ \n\t左 ← ⊣\n\nAre all examples of valid code.  There is no special IDE or\nterminal that is required to input the characters; most\nmodern operating systems provide methods to input unicode\ncharacters.  Documentation and keymaps will be provided with\nthe distribution for inputting the common APL characters,\nand a dedicated terminal for each OS may (or may not) be\nwritten.  I tend to do just fine just using rxvt-unicode or\n9term on linux, but for windows a dedicated ide may be in\norder.\n\n### Pipes\n\nAs mentioned before, this interpreter has the ability to\nspawn os commands and manipulate their stdin/stdout.  Using\nthis we can implement many features that are usually baked\ninto the core of the language or loaded as libraries, like:\n\n- Matrix visualization \n- Function plotting \n- Networking (via `netcat` or similar)\n\n### Compliance with 'A Dictionary of APL'\n\n['A dictionary of APL'][1] was written by the creator of APL\nhimself and is a good formal standard to follow.  This\ninterpreter will conform to this standard where possible.\nNotably, bracketed array indexing/assignment(a[n;]) will *not*\nbe in the language in favor of the 'from' ({) function and\n'merge' (}) operator.  All functions will have the notion of\nfunction rank as well.\n\nI may diverge from this standard in a few areas.  For example\nI'm still undecided on function definition; the Dictionary uses\nthe function ∇ with string arguments for the monadic and dyadic\ncases.  I find this clumsy.  I like Dyalog's Dfns, but the '{}'\nsymbols they use for delimiters are already in use as\nfunctions/operators.\n\n## State of the project\n\nWork in progress - rudimentary lexer and parser are complete.\nUnified array data structure is implemented.  Basic memory\nmanagement based on ref-counting implemented.  Handy\nerror-reporting system is in place. Function definition syntax\nusing bracket delimiters is recognized.  Multi-dimensional\narrays are printed correctly, as are arbitrarily nested boxed\narrays using unicode box-drawing characters.\n\nMost of the boring stuff is out of the way.  I am still planning\nout the core execution loop and function dispatch/definition.\nOne-by-one standard functions will be added.  The project is not\ncurrently at a state where outside help would be beneficial, or\na fork useful.  The lexer, while trivial, may be of interest as\nit accepts utf-8 input. An earlier version of the lexer also\noutput tokens in a fairly portable streaming format.\n\n[1]:(http://www.jsoftware.com/papers/APLDictionary.htm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroyo%2FAPL","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroyo%2FAPL","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroyo%2FAPL/lists"}