News for hackers. Stuff that matters.
Re:Show HN: FSQL – Search through your file system with SQL-... by emmelaich on Monday May 15, 2017 @06:32PM (#14345753)
Yeah, I like the idea of using sql but it is painful to write.

It would be nice to omit the select and the quoting; my suggestion would be that

    fsql "select * from ..."
could be written as

    select all from ...
and all could be assumed if ommitted; so you could write

    select from
or just

    from ...
But unfortunately `select` is a sh(1) reserved word and `from` is an existing command! (shows who who your mail is from)

So maybe select and from could be shortened to sel and frm.

Re:Show HN: FSQL – Search through your file system with SQL-... by stephenr on Tuesday May 16, 2017 @04:21AM (#14348140)
> or just > from ...

Or just ... Why even bother naming fields. Just make <space> enter return everything from anywhere from all time for all people on all platforms.

How many times are we going to have this ridiculous suggestion that less characters/words is automatically better.

This is 'short/arrow functions' (pick your language) all over again, and invariably ends up with the situation where the new syntax is just fucking impossible to read at first glance, because it has so many variances.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Parens are optional. Unless you have no arguments, then they're required. Curly braces are optional, unless you want more than a simple expression, or no return or to return an object literal, then they're required.

I grow weary enough of this bullshit notion that code must 'look pretty', but when you're using "less characters is always best" as the definition for 'pretty' it just becomes unbearable.

Re:Show HN: FSQL – Search through your file system with SQL-... by emmelaich on Tuesday May 16, 2017 @06:26PM (#14353870)
> this ridiculous suggestion that less characters/words is automatically better.

Not what I suggested; yes they are shorter but that's not the point. Can you find a longer name than for `select` that is more appropriate?

I sympathise but for interactive shells the ergonomics are different than for most languages.

Even then I don't mind long names but I do mind hitting the shift key. Which means avoiding most punctuation.

Re:Show HN: FSQL – Search through your file system with SQL-... by mpfundstein on Tuesday May 16, 2017 @05:28AM (#14348376)
still arrow functions are the single one ES6 addition to js that made the language finally nice enough for me to enjoy ;-)

as a fp geek

Re:Show HN: FSQL – Search through your file system with SQL-... by lorenzhs on Tuesday May 16, 2017 @04:19AM (#14348139)
You can do "alias select=command select", it works in bash and zsh (and maybe others).

In zsh you could also "alias select=noglob command select" and it wouldn't do wildcard matching. Then you could use

    select * from ...
and it would pass the asterisk to your select binary :)
Re:Show HN: FSQL – Search through your file system with SQL-... by kshvmdn on Monday May 15, 2017 @08:02PM (#14346301)
I like this! I've started work on this [0], feel free to add to the issue if you'd like.

[0] https://github.com/kshvmdn/fsql/issues/10