HNHacker News
TopNewBestAskShowJobs

iogf

296 karma · joined May 8, 2017

submissionscomments
iogf··on Show HN: (crocs) Python2Regex and Yacc-like. Parsing with no steroids in Python
Free hugs.
iogf··on Ask HN: Looking for accounters who know bosnian accounting to improve platform
You can email me at last.src@gmail.com
iogf··on Show HN: Open source kanban/scrum project management
Interesting django project. I was curious about comments regarding https://arcamens.com/ in comparison to taiga.

Arcamens is also a django project.

iogf··on Show HN: (Arcamens) A project management platform on top of Python/Django
We'll consider adding more screenshots in the future, maybe a video presentation would be ideal.
iogf··on Show HN: (gle) a tiny but completely functional Google searcher lib in python
Yes. I developed that in order to implement a stackoverflow plugin for vy.
iogf··on Show HN: A minimalist event driven framework for python.
Planning to get it with py3 soon.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
It seems a good thing to do, indeed. i'll consider that.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
untwisted is pure python. it uses either select/epoll for scaling sockets.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
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.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
It is py2 now, however, i'm gonna port it to py3 soon. I'm planning to write some better docs for it tomorrow.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
The throtting can be set directly from untwisted reactor(planning to implement soon once i get untwisted on py3). I think the support for caching is really good too, i plan to implement it this week.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
I would like to see that in scrapy. I think you may have a point about the generators, yea.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
These ones are slower in most cases, it seems for some situations the ones that dont execute js would better do the job.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
Try to imagine how to solve the second example of the sukhoi README.md using scrapy, you'll notice you'll end up with some kind of obscure logic to achieve that json structure thats outputed by the second example in sukhoi's README.md.
iogf··on Show HN: Sukhoi – A flexible and extensible Webcrawler in Python
The way of how you construct your json structures in scrapy it is different, scrapy has a longer learning curve too. It seems sukhoi has got better results in performance too.
iogf··on Show HN: Using functions to construct Regex in Python
I'm working on a nice tutorial with crocs for that, it remains implementing backtracking when generating valid input.
iogf··on Show HN: Using functions to construct Regex in Python
This one doesnt look to support lookahead/lookbehind nor it outputs valid inputs for the matches though. However, it is interesting the way of how you chain the VerEx to build the patterns.
iogf··on Show HN: Using functions to construct Regex in Python
I have been adding more docs to:

https://github.com/iogf/crocs/wiki

It would be interesting to hear comments :)

iogf··on Show HN: Using functions to construct Regex in Python
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.

iogf··on Show HN: Using functions to construct Regex in Python
I think so i would ask you to open issues in crocs at github, so i can better keep track of suggestions and implement them.
iogf··on Show HN: Using functions to construct Regex in Python
hmm, I think it is good, maybe p0 = X('a', 'z').

I like it.

iogf··on Show HN: Using functions to construct Regex in Python
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.

iogf··on Show HN: Using functions to construct Regex in Python
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.

iogf··on Show HN: Using functions to construct Regex in Python
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.
iogf··on Show HN: Using functions to construct Regex in Python
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.
iogf··on Show HN: Using functions to construct Regex in Python
Yes, there are interesting benefits about type safety consequently it improves debugging as well.
iogf··on Show HN: Using functions to construct Regex in Python
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.
iogf··on Show HN: Using functions to construct Regex in Python
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.

iogf··on Show HN: Using functions to construct Regex in Python
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.

iogf··on Show HN: Using functions to construct Regex in Python
Interesting suggestion.
Page 1 of 2Next →