RawParser
programming-2022
RawParser | programming-2022 | |
---|---|---|
3 | 3 | |
8 | 11 | |
- | - | |
0.0 | 0.0 | |
almost 2 years ago | about 2 years ago | |
C | HTML | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
RawParser
-
Literate programming is much more than just commenting code
I have started working on a program that can parse Markdown files with fragments of C code and weave those fragments into a C program that can be compiled. For an example input, see https://github.com/FransFaase/RawParser#documentation
- Show HN: JWEB (a modern implementation of the CWEB Literate Programming system)
-
Show HN: Carburetta – C/C++ Fused Scanner and Parser Generator
The distinction between a scanner and a parser is somewhat arbitrary. One could use one and the same formalism for it. The scanner usually deals with things that are considered 'atomic' elements in the language, while grammar is used for 'compound' elements consisting of one or more other elements. If there are seen as one and the same, than it naturally flows that the scanner is called from the parser, and not how it is traditionally done, that the scanner acts as a first pass. This seems a logical approach, but in practices, when scanning is context sensitive, requires the implementation of all kinds of hacks. Also, the treatment of keywords (where it is possible that they are case insensitive) it is better to have a grammar for parsing a keyword 'identifier' and a check whether the result matches the keyword. For pure performance this would not be the best solution, but I understand that Carburetta is not design for that. I have been developing a parser that makes no distinction between scanning and parsing in C, which I called RawParser: https://github.com/FransFaase/RawParser . It also offers more powerful grammar constructs and gives examples on how to implement memory management in a uniform way.
programming-2022
-
Math notation library for CojureScript
The latest thing the system can do is run interactive 3d mathematical visualizations. Here are some physics examples: https://twitter.com/sritchie/status/1503220063264026629, with code living here: https://github.com/sritchie/programming-2022
-
Literate programming is much more than just commenting code
- multiple stories about the same piece of code, but all with the ability to IMPORT the story as a library
I've been writing sicmutils[0] as a "literate library"; see the automatic differentiation implementation as an example[1].
A talk I gave yesterday at ELS demos a much more powerful host that uses Nextjournal's Clerk to power physics animations, TeX rendering etc, but all derived from a piece of Clojure source that you can pull in as a library, ignoring all of these presentation effects.
Code should perform itself, and it would be great if when people thought "LP" they imagined the full range of media through which that performance could happen.
[0] sicmutils: https://github.com/sicmutils/sicmutils
[1] autodiff namespace: https://github.com/sicmutils/sicmutils/blob/main/src/sicmuti...
[2] Talk code: https://github.com/sritchie/programming-2022
[3] Clerk: https://github.com/nextjournal/clerk
-
Physics in Clojure: Elliptical Paths
Yes, for these examples SICMUtils is handling the state updates and gives new coordinates to Mathbox to render.
The library works in both JS and the JVM, so I was able to generate an unevaluated code form for the equations of motion (simplified, optimized!), which clerk sends over the wire for the JS build of sicmutils to run.
Here is the code for that demo: https://github.com/sritchie/programming-2022/blob/main/src/p...
The api is settling, of course this is all quite playful! I will add instructions on how to get this building when I’m back at the keyboard.
Another way this will all get more powerful is via the in-progress https://github.com/ChristopherChudzicki/mathbox-react project. When that’s settled we can send a data structure representing a full scene across the wire, and build stuff like www.math3d.org , but with the full power of Clojure augmenting the UI equation editor. Dreamy stuff!
What are some alternatives?
clerk - ⚡️ Moldable Live Programming for Clojure
sicmutils - Computer Algebra, Physics and Differential Geometry in Clojure.
mexdown - A lightweight integrating markup language
srcweave - A literate programming system for any language.
cannon-es-debugger - Wireframe debugger for use with cannon-es https://github.com/react-spring/cannon-es
usql - Universal command-line interface for SQL databases
pytudes - Python programs, usually short, of considerable difficulty, to perfect particular skills.