HN user

iogf

296 karma
Posts113
Comments42
View on HN
github.com 4y ago

Show HN: Eacc - A new manner to write lexers/parsers in Python

iogf
7pts0
github.com 5y ago

Show HN: Asynchronous HTTP/HTTPS requests for non typists

iogf
1pts0
github.com 5y ago

Show HN: Untwisted – SuperSockets to build non-blocking networking applications

iogf
1pts0
github.com 5y ago

Show HN: Untwisted A non-blocking Event Driven Framework for Python

iogf
2pts0
github.com 5y ago

Show HN: Sukhoi A minimalist and flexible Web Crawler in Python

iogf
1pts0
github.com 5y ago

Show HN: Websnake An elegant HTTP/HTTPS non blocking requests in Python

iogf
1pts0
github.com 5y ago

Show HN: Yregex when you can write Python

iogf
2pts0
github.com 5y ago

Show HN: (Eacc) PLY Lex-Yacc alternative in Python

iogf
5pts0
github.com 6y ago

Show HN: Click, Read and Consider the Usefulness

iogf
1pts0
github.com 6y ago

Show HN: Python to Regex, Regex to Python. (Crocs)

iogf
8pts0
github.com 6y ago

Show HN:(eacc) Lexer/Parser in Python using variable pattern types

iogf
2pts0
github.com 6y ago

Show HN: (Yregex) Let's Pythonize the World. Python to Regex, Regex to Python

iogf
6pts0
github.com 6y ago

Show HN: An open source Py/Django Ticket system to improve people charity.

iogf
2pts0
github.com 6y ago

Show HN: (Shiva) Py/Django platform to help poor people in quarantine times

iogf
1pts1
github.com 6y ago

Show HN: (Crocs) Master Regex in Python easily

iogf
2pts0
github.com 6y ago

Show HN: (Eacc) Minimalist and Flexible Lexer/Parser Tool in Python

iogf
2pts0
github.com 6y ago

Show HN: Regex for Super Humans in Python

iogf
1pts1
github.com 6y ago

Show HN: (Eacc) Write your own lexer and parser. Parsing for humans

iogf
2pts0
github.com 6y ago

Show HN: Regex Matches Generator in Python

iogf
1pts0
github.com 6y ago

Show HN: (Crocs) Regex parser, tester, debugger. Serialize Python to Regex

iogf
2pts0
github.com 6y ago

Ask HN: (Eacc) Exhaustive abstraction of patterns. A new parsing approach?

iogf
3pts0
github.com 6y ago

Show HN: (Lax) Python2Latex

iogf
2pts0
github.com 6y ago

Show HN: (Yacc) Yeah another compiler compiler in Python

iogf
2pts0
github.com 6y ago

Show HN: (crocs) Python2Regex and Yacc-like. Parsing with no steroids in Python

iogf
4pts2
github.com 6y ago

Show HN: (Crocs) Regex and Backus-Naur on Python classes. A parsing tool

iogf
2pts0
github.com 6y ago

Show HN: Vy – a powerful but retro and minimalist IDE

iogf
143pts45
github.com 6y ago

Show HN: Arcamens) Kanban Boards, Super Backlogs with Cut&Paste on Django

iogf
1pts0
medium.com 6y ago

The beauty as your north star. math chess coding engineering

iogf
2pts0
medium.com 6y ago

Show HN: The weak one. Python startup life philosophy

iogf
1pts0
github.com 6y ago

Show HN: Websnake) Asynchronous HTTP/HTTPS Requests in Python Easily

iogf
1pts0

Untwised is meant to solve all problems twisted solves but it does it in quite a different way. They are two different tools that would solve the same problems using different approaches. Untwisted doesnt share code nor architecture with twisted. In untwisted, sockets are abstracted as event machines, they are sort of "super sockets" that can dispatch events. You map handles to Spin instances, these handles are mapped upon events, when these events occurs then your handles get called. The handles can spawn events inside the Spin instances, in this way you can better abstract all kind of internet protocols consequently achieving a better level of modularity and extensibility. That is one of the reasons that sukhoi's code is sort of short, it is due to the underlying framework in which it was written on.

When i thought of Include and Exclude i had in mind it as a shorthand for IncludeFromTo and ExcludeFromTo.

About the Repeating/Repeat it could be just an idiomatic way of writing Include which stands for just one char thats fetched from a given sequence.

Seq stands for a-z or 0-9 which can be used only in Include and Exclude. When you write Include(Seq('a', 'm')) it means you are including a character from that sequence in a given position of your pattern. So if you have

Pattern(Include(Seq('a', 'm')), 'c')

That is sort of building the following set of strings.

ac bc cc . . .

When you use Exclude, it would be like you are picking a char that is not belonging to the sequence, like in:

Pattern(Exclude(Seq('0, 9')), c)

then you would end up with a set like:

ac bc cc . . .

It means, a set whose first character of the elements arent digits.

I may add synonyms for those classes, so, it is just a matter of adding:

Repeat = Times

etc.

you wouldnt use these structures in python code, you use them to build your regex then compile it and use the regex in your programs. It is possible to add some type safety and messages to help debugging which would be better than with natural regex syntax.

It can be ported to py3 with no difficult though it is meant to be used as a tool to construct regex, it shouldnt be put in your programs for a matter of performance at all(mainly those that are critical). About some examples being long, i believe verbosity pays off in understanding complex systems, so yea, in some situations it wouldnt benefit using crocs unless you dont know regex and you dont want to spend some hours to get proficient in it.

The main benefit about crocs it is purely epistemological in the sense it eases learning and consequently improves reasoning when implementing filters for content instead of using regex approach one would use crocs approach and get benefits from it permiting you to better reason. You can solve a lot of problems using euclidian geometry that you could solve using cartesian/analytic geometry it doesnt mean that you should use just one of them at all. The two permit you to abstract systems and predict behaviors.

The example is longer than the regex itself however it is simpler to explain to a beginner what crocs's example does than explaning the regex itself. Based on that assumption using crocs's syntax should favour reasoning somehow since it is simpler to understand than obscure regex's syntax.

This is the official regex to check for mail validity.

\A(?:[a-z0-9!#$%&'+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'+/=?^_`{|}~-]+)* | "(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f] | \\[\x01-\x09\x0b\x0c\x0e-\x7f])") @ (?:(?:[a-z0-9](?:[a-z0-9-][a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-][a-z0-9])? | \[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3} (?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-][a-z0-9]: (?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f] | \\[\x01-\x09\x0b\x0c\x0e-\x7f])+) \])\z

according to http://www.regular-expressions.info/email.html

I honestly think that one would be more readable and comprehensive in crocs's syntax. It is not about being only readable it is about a way of reasoning to come up with your regex, crocs permit you to better reason than using regex's syntax. When one uses regex's syntax to reason it is sort of using a low level programming lang to reason, when things get complex it doesnt really pay off the shortness of regex's.

The idea is having a set of entities on which one could reason better to implement more complex filters(regex) as well as debugging them. It is sort of a way of reasoning on filtering results it merely uses regex as an underlying tool.

One could write the filter using crocs format, compile it to regex then use in their programs. Using crocs you sort of define your data type then apply functions on those data types to fetch your required output.

The crocs framework is a way to give more power to your imagination and readability to others about what your imagination produces.