Live data from Hacker News

Q – Execute SQL on text. Supports joins across files, RPM available

github.com

11–20 of 46 posts

Re: Q – Execute SQL on text. Supports joins across files, RPM available

#11

What I really wished for when I read the title was for something that could make me write regexes but verbosely.

In what way would you write regexes verbosely? I'm actually quite interested in the idea because regexes can be confusing to write at times, and it's difficult to remember which form to use where, if you use them in many languages/interfaces.

There are tools like Regexper[1] that let you visualize the regex as an automata graph, and there are tools like text2re[2] which will allow you to put in text and visually generate a regex to match it.

I feel like better regex tools should exist on the command line, and it's potentially a great place for such tools to be rapidly developed and adopted. There are GUI tools for this like poirot[3], but the command line still exists because of its accessibility, uniformity, and extensibility.

links:

[1] http://www.regexper.com/

[2] http://txt2re.com/index.php3?s=24%3AFeb%3A2014+%22This+is+an...

[3] http://www.espgraphics.com/poirot/

Re: Q – Execute SQL on text. Supports joins across files, RPM available

#13

This seems like a cool project, but Q is already a well-used JS promise library so there's a bit of a name conflict there even if the libs are aimed at very different tasks...

And the JS promise library in turn collided with the name of Q, the array-processing language, which itself collided with the name of another programming language named Q (http://q-lang.sourceforge.net). If you're naming a tech-related thing after about 1980, the single-letter names are all taken...

Re: Q – Execute SQL on text. Supports joins across files, RPM available

#14
post #11

What I really wished for when I read the title was for something that could make me write regexes but verbosely.

In what way would you write regexes verbosely? I'm actually quite interested in the idea because regexes can be confusing to write at times, and it's difficult to remember which form to use where, if you use them in many languages/interfaces. There are tools like Regexper[1] that let you visualize the regex as an automata graph, and there are tools like text2re[2] which will allow you to put in text and visually gene…

I'm probably heavily biased, but to me Perl is the best command-line regex tool. Perl was invented to gather data and report on it, and its regex engine is incredibly fast and powerful. As an added bonus it supports some Python and PCRE-specific extensions. But this Q app is useful for people who either don't know Perl or can get what they need done faster with SQL than with scripting.

In terms of 'verbosity' you can embed comments inside a regular expression, or build a regular expression over multiple lines, or make a set of regex objects and interpolate them into larger regex's. Perl has copious amounts of documentation to help you understand the many ways to use regexs in Perl.

http://perldoc.perl.org/perlrequick.html http://perldoc.perl.org/perlretut.html http://perldoc.perl.org/perlfaq6.html#How-can-I-hope-to-use-...

Re: Q – Execute SQL on text. Supports joins across files, RPM available

#15

I have ended up with MySQL and PostgreSQL on nearly every linux I've installed. It is baffling to me that someone would decline these tools in favor of text file drivers or SQLite, with the exception of using SQLite as an embedded config database or something.

Yeah I also do the same, import the csv (it doesn't have to be comma separated) file into PostgreSQL and analyze it using SQL. Alternatively, I will load it into IPython/pandas and work with it like that.

This is however useful for one off, throwaway query that offers familiar SQL syntax, if you don't want to use awk that is.

Re: Q – Execute SQL on text. Supports joins across files, RPM available

#16

This seems like a cool project, but Q is already a well-used JS promise library so there's a bit of a name conflict there even if the libs are aimed at very different tasks...

It's also the name of a well known Python debugging tool[1]. Name conflicts will happen when you pick a name for shortness, not clarity.

[1] https://pypi.python.org/pypi/q

Re: Q – Execute SQL on text. Supports joins across files, RPM available

#18
post #11

What I really wished for when I read the title was for something that could make me write regexes but verbosely.

In what way would you write regexes verbosely? I'm actually quite interested in the idea because regexes can be confusing to write at times, and it's difficult to remember which form to use where, if you use them in many languages/interfaces. There are tools like Regexper[1] that let you visualize the regex as an automata graph, and there are tools like text2re[2] which will allow you to put in text and visually gene…

> In what way would you write regexes verbosely?

Something like SQL would be fine.

It's not a really thought out theory, but I think I'd like to manipulate text via a programming language like VI gods manipulate text with shortcuts.

Thanks for the link I will have a look at them.

Re: Q – Execute SQL on text. Supports joins across files, RPM available

#19

This seems like a cool project, but Q is already a well-used JS promise library so there's a bit of a name conflict there even if the libs are aimed at very different tasks...

It's also the name of a well known Python debugging tool[1]. Name conflicts will happen when you pick a name for shortness, not clarity. [1] https://pypi.python.org/pypi/q

Or a APL family Programming language, marketed for writing queries. This could lead to some trouble.

http://en.wikipedia.org/wiki/Q_%28programming_language_from_...

Re: Q – Execute SQL on text. Supports joins across files, RPM available

#20
post #13

This seems like a cool project, but Q is already a well-used JS promise library so there's a bit of a name conflict there even if the libs are aimed at very different tasks...

And the JS promise library in turn collided with the name of Q, the array-processing language, which itself collided with the name of another programming language named Q ( http://q-lang.sourceforge.net ). If you're naming a tech-related thing after about 1980, the single-letter names are all taken...

Haha, well fair enough - even more reason to have checked I suppose. Maybe textQ would be more appropriate given this project's use case?
Post reply on HN