First Class Contexts – Rye Language
Rye Language introduces first-class contexts for scoping Rye words, creating parent-child relationships. Context paths access values, restricting direct changes for control. Evaluation and isolation mechanisms enhance structured code organization.
Read original articleRye Language introduces the concept of first-class contexts, which act as scopes for Rye words and are treated as dictionary structures. Contexts can be created using functions like context and extends, allowing for the creation of specific parent-child relationships. Context paths are used to access values within a context, and direct changes to values inside a context are restricted in Rye to maintain control over modifications. Evaluation in a context can be done using functions like do and do\in, enabling code execution within a specified context. Rye also provides mechanisms like private and isolate functions to manage context isolation and execution. Builtin contexts like math are available for math operations, and functions can be defined within specific contexts using fn\in. The Rye Console allows for navigation and interaction with contexts similar to navigating directories on a computer. Overall, Rye's context-oriented approach allows for structured code organization and controlled access to functions and variables within different contexts.
Related
F (2006)
F is a functional concatenative language with K3 list operations and Joy's dip combinator. It enforces one-time assignment, supports floating-point and symbolic datatypes, and emphasizes function-valence and -charge theories. The language is purely functional, prohibiting side-effects and reassignment, with various primitives for arithmetic, logic, and list operations. F also provides interactive commands for debugging and manipulation, focusing on simplicity, efficiency, and functional programming paradigms.
Binrw
The tool binrw simplifies binary parsing and serialization with a declarative approach, offering readability and maintainability. It supports common tasks, generics, custom parsers, predefined types, and is safe for various environments.
As you learn Forth, it learns from you (1981)
The Forth programming language is highlighted for its unique features like extensibility, speed, and efficiency. Contrasted with Basic, Forth's threaded code system and data handling methods make it versatile.
Cognate: Readable and concise concatenative programming
Cognate is a concise, readable concatenative programming language emphasizing simplicity and flexibility. It supports operators as functions, stack evaluation, control flow statements, list manipulation, recursion, and mutable variables through boxes.
Continuations by Example
Continuations are powerful in control-flow constructs, enabling exceptions, search, threads, generators, and coroutines. They capture remaining computation steps, aiding in non-deterministic choices and efficient iteration over data structures.
it feels like there're all features for ergonomic dependency injection, but maybe that's a lot of programming
One of my favorite compositional patterns! I wish we saw this .ore, not just in contexts but everywhere.
It's something I saw Ansible inventories do that I absolutely loved. Point at an inventory, and Ansible will run it & use the output as inventory, or will otherwise use the contents.
I wish more languages had stuff like this. I just skeeted today that JS should have an optional function invocation syntax. myVar.??(). Run myVar if it's a function else use its value.
Related
F (2006)
F is a functional concatenative language with K3 list operations and Joy's dip combinator. It enforces one-time assignment, supports floating-point and symbolic datatypes, and emphasizes function-valence and -charge theories. The language is purely functional, prohibiting side-effects and reassignment, with various primitives for arithmetic, logic, and list operations. F also provides interactive commands for debugging and manipulation, focusing on simplicity, efficiency, and functional programming paradigms.
Binrw
The tool binrw simplifies binary parsing and serialization with a declarative approach, offering readability and maintainability. It supports common tasks, generics, custom parsers, predefined types, and is safe for various environments.
As you learn Forth, it learns from you (1981)
The Forth programming language is highlighted for its unique features like extensibility, speed, and efficiency. Contrasted with Basic, Forth's threaded code system and data handling methods make it versatile.
Cognate: Readable and concise concatenative programming
Cognate is a concise, readable concatenative programming language emphasizing simplicity and flexibility. It supports operators as functions, stack evaluation, control flow statements, list manipulation, recursion, and mutable variables through boxes.
Continuations by Example
Continuations are powerful in control-flow constructs, enabling exceptions, search, threads, generators, and coroutines. They capture remaining computation steps, aiding in non-deterministic choices and efficient iteration over data structures.