datefinder
Crafting Interpreters
datefinder | Crafting Interpreters | |
---|---|---|
3 | 45 | |
625 | 8,192 | |
- | - | |
0.0 | 0.0 | |
about 1 year ago | about 1 month ago | |
HTML | HTML | |
MIT License | GNU General Public License v3.0 or later |
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.
datefinder
-
Sneller Regex vs Ripgrep
That's with DFA minimization. Also, '\w' has 311 states while '(?-u)\w' has 5 states.
I don't have a precise definition of enormous or impractical. Does it matter? I suppose one obvious one is when DFA construction time starts having a significant impact on total search times.
> Additionally, the results are not the same: the number of matches is not equal to 7882. How could I make `\w` conform to other regex implementations in ripgrep?
By following UTS#18: https://unicode.org/reports/tr18/#word
Most regex engines make \w be ASCII-only by default. But most also have a way to opt into Unicode-aware mode. RE2, Go's regexp and ECMAScript are popular regex engines that have no way to change the interpretation of \w.
> Fair question how regex compilers handle nefarious regexes. Go does not handle NFA with more than 1000 states, and, as you observed, we added some more restrictions when processing the NFA. It can be an interesting academic exercise to find monstrous regexes, but we haven't encountered useful regexes that hit these limits. But I guess you know some...
It's definitely not academic. People use regexes for lexers. People use big regexes to recognize certain things like email addresses and dates. Here's a real regex used in real software to identify dates in unstructured text for example: https://github.com/akoumjian/datefinder/blob/5376ece0a522c44...
Otherwise, as I hinted at above, the thing that can make regexes very large very quickly is when you mix Unicode classes with counted repetitions. It doesn't take a lot to make them "big."
- Is there a Python library for reading human-written times?
-
Tuesday Daily Thread: Advanced questions
Looking at this issue it seems a recent pull request should fix the strict mode problem. That said, the pull request is still open due to a failing test so you can either build from source with the pull request or looking at the comments in the issue, look at dateparser as is mentioned. It might suit your needs.
Crafting Interpreters
- Crafting Interpreters
-
The Top 10 GitHub Repositories Making Waves 🌊📊
Build an Interpreter (Chapter 14 on is written in C)
-
Writing a Debugger from Scratch: Breakpoints
I’m guessing you’ll have to work with the scopes in the resolver:
https://github.com/munificent/craftinginterpreters/blob/mast...
-
loxcraft: a compiler, language server, and online playground for the Lox programming language
Better open an issue/request wiki edit at https://github.com/munificent/craftinginterpreters/wiki/Lox-implementations
- Gigachad Ken Thomson.
-
Show HN: Yaksha Programming Language
I'm late to the party, but I want to say thank you for sharing this. It's inspiring to look at how much you've built and (hopefully) enjoyed the process of building! I'm loving everything -- your site, your language design, your docs, your builtin libraries, your dev tools. Beyond impressive. People like you are the ones who make HN one of my best places on the internet.
For context on where I'm coming from, about two weeks ago I picked up Crafting Interpreters [1] for fun. I'm finding your clear-yet-concise Compiler internals [2] to be particularly compelling reading, and jumping back and forth between those "how this all works" docs and the live example of this language you actually built do a WASM-compiled tree-blowing-in-the-wind animation is just... just wow. So freaking cool!
I also enjoyed reading the comment thread that inspired you to start on Yaksha and seeing how this project has a wholesome start as inspiration-by-programming-hero. I hope you recognize that a few years later you've now ascended from inspiree to inspirer. I also hope you're still having tons of fun building out Yaksha!
[1] https://www.craftinginterpreters.com/
[2] https://yakshalang.github.io/documentation.html#compiler-int...
- Keeping track of returned and break-ed values between code blocks
-
How do you start your own programming language?
There are books which will talk you through the process. Crafting Interpreters is highly spoken of; I used Writing an Interpreter in Go, because I like Go. Then there's Compilers: Principles, Techniques, and Tools (the "Dragon Book"). This is considered heavy, but a classic, it's been around since '86.
-
Designing a new language
I cannot recommend Crafting Interpreters by Robert Nystrom enough, it covers a lot of the stuff you need to know, completely for free.
-
A roadmap to design programming languages
Crafting Interpreters is a fun primer on language design. It has a complete roadmap to build a fairly simple language, twice. There are some topics it won't touch on, like static type systems, but it provides a great introduction so that you can start tinkering and learn by doing.
What are some alternatives?
dateparser - python parser for human readable dates
git-internals-pdf - PDF on Git Internals
timefhuman - Convert natural language date-like strings--dates, date ranges, and lists of dates--to Python objects
You-Dont-Know-JS - A book series on JavaScript. @YDKJS on twitter.
Giveme5W1H - Extraction of the journalistic five W and one H questions (5W1H) from news articles: who did what, when, where, why, and how?
tinyrenderer - A brief computer graphics / rendering course
Sherlock - Natural-language event parser for Javascript
paip-lisp - Lisp code for the textbook "Paradigms of Artificial Intelligence Programming"
pyate - PYthon Automated Term Extraction
CppCoreGuidelines - The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++
sneller - World's fastest log analysis: λ + SQL + JSON + S3
30-days-of-elixir - A walk through the Elixir language in 30 exercises.