Live data from Hacker News

FuncShell – A Haskell-based alternative to awk

github.com

31–40 of 42 posts

Re: FuncShell – A Haskell-based alternative to awk

#31

Do any of you know how they got such a beautiful looking shell [0]? I'd love to know if there's a clean way to achieve such a nice result. [0] https://github.com/iostreamer-X/FuncShell/raw/master/fsh.gif EDIT As an aside, FuncShell looks like a beautiful demonstration of how powerful Haskell can be. The source code is terse and clean. The only oddity I noticed isthe rather large 68MB binary file committed into master…

>The only oddity I noticed isthe rather large 68MB binary file committed into master in the repository. Thanks for bringing it to notice. I did this and later realized I can opt for the github release option[0]. I will fix this and the installation url asap. [0] https://github.com/iostreamer-X/FuncShell/releases

Unfortunately, unless you rewrite history, it'll stay in there and bloat the download for anyone who wants to clone the repo.

I don't know if I want to recommend rewriting history or not. But for what it's worth, I'm currently on a cellular connection and couldn't download something this size if I wanted.

Re: FuncShell – A Haskell-based alternative to awk

#32
Nice! How do I bring new function into scope though? This looks very similar to hawk, which has documentation on how to add your custom code [1].

Also, there are some nice CLI tools for JSON [2] or CSV [3] specific data.

  [1] https://github.com/gelisam/hawk
  [2] https://stedolan.github.io/jq/manual/
  [3] https://github.com/BurntSushi/xsv/blob/master/README.md

Re: FuncShell – A Haskell-based alternative to awk

#33
post #22

Earlier quoted context omitted.

A good theme and sharelatex.com can go a long way to get someone to use it. I usually only get Math Majors to invest in it. I did almost all my Master Theology papers in it. Just difficult to use different languages. I usually have to use one or all of these Greek, Hebrew, Aramaic, Latin, Danish or German in my papers. Latex didn't make that easy. Actually nothing does.

I used sharelatex. the notation full of \, {, }, etc. is just too confusing for people.

What isn't too confusing then? Markdown and HTML are just riffs, it's all based around the idea of opening/closing tokens and special tag names that do different things. I think if there is in fact a technical barrier, then it's the underlying fact that your representation of a document has a separation of content and design/layout. If people can't deal with that, then they can only use WYSIWYG (and not the hacks of rendering to the side while you still type in TeX), and there's no point in trying to update LaTeX's notation to fit people who never will get that underlying separation.

Re: FuncShell – A Haskell-based alternative to awk

#34
post #25
post #17

Earlier quoted context omitted.

That's a pretty standard zsh with oh-my-zsh prompt: https://github.com/robbyrussell/oh-my-zsh Scroll down a bit and you'll see it. Though I personally prefer zsh with prezto, because oh-my-zsh feels too bloated and heavy: https://github.com/sorin-ionescu/prezto

Prezto is abandoned. If you absolutely need a framework go for Zim, although I like the simplicity of Zplug and adding plugins or themes as I need them.

[deleted]

Re: FuncShell – A Haskell-based alternative to awk

#35

Do any of you know how they got such a beautiful looking shell [0]? I'd love to know if there's a clean way to achieve such a nice result. [0] https://github.com/iostreamer-X/FuncShell/raw/master/fsh.gif EDIT As an aside, FuncShell looks like a beautiful demonstration of how powerful Haskell can be. The source code is terse and clean. The only oddity I noticed isthe rather large 68MB binary file committed into master…

>The only oddity I noticed isthe rather large 68MB binary file committed into master in the repository. Thanks for bringing it to notice. I did this and later realized I can opt for the github release option[0]. I will fix this and the installation url asap. [0] https://github.com/iostreamer-X/FuncShell/releases

You probably want to compress it as well - that can easily reduce the file size by an order of magnitude.

Re: FuncShell – A Haskell-based alternative to awk

#36
post #33

Earlier quoted context omitted.

I used sharelatex. the notation full of \, {, }, etc. is just too confusing for people.

What isn't too confusing then? Markdown and HTML are just riffs, it's all based around the idea of opening/closing tokens and special tag names that do different things. I think if there is in fact a technical barrier, then it's the underlying fact that your representation of a document has a separation of content and design/layout. If people can't deal with that, then they can only use WYSIWYG (and not the hacks of…

Markdown has fewer ways to inexplicably (from the point of view of a naive user) munge text.

If you type plain text, it mostly comes out as plain text.

I've paid John $4.50 for a sandwich.

Renders fine in Markdown. Renders like crap in LaTeX.

Re: FuncShell – A Haskell-based alternative to awk

#37
post #2

Similar idea, but uses sqlite to make an awk like utility with sql syntax: https://github.com/dbohdan/sqawk

There's also q, which I've happily used for all sorts of data munging tasks:

https://harelba.github.io/q/

One example from that page:

   ps -ef | q -H "SELECT UID,COUNT(*) cnt FROM - GROUP BY UID ORDER BY cnt DESC LIMIT 3"

Re: FuncShell – A Haskell-based alternative to awk

#38

Earlier quoted context omitted.

>The only oddity I noticed isthe rather large 68MB binary file committed into master in the repository. Thanks for bringing it to notice. I did this and later realized I can opt for the github release option[0]. I will fix this and the installation url asap. [0] https://github.com/iostreamer-X/FuncShell/releases

Unfortunately, unless you rewrite history, it'll stay in there and bloat the download for anyone who wants to clone the repo. I don't know if I want to recommend rewriting history or not. But for what it's worth, I'm currently on a cellular connection and couldn't download something this size if I wanted.

git clone --depth 1 if you don't need the history?

Re: FuncShell – A Haskell-based alternative to awk

#39
post #33

Earlier quoted context omitted.

What isn't too confusing then? Markdown and HTML are just riffs, it's all based around the idea of opening/closing tokens and special tag names that do different things. I think if there is in fact a technical barrier, then it's the underlying fact that your representation of a document has a separation of content and design/layout. If people can't deal with that, then they can only use WYSIWYG (and not the hacks of…

Markdown has fewer ways to inexplicably (from the point of view of a naive user) munge text. If you type plain text, it mostly comes out as plain text. I've paid John $4.50 for a sandwich. Renders fine in Markdown. Renders like crap in LaTeX.

Markdown has its own magic incantations that can infuriate if you don't get them just right. GP is right: most people can't handle markup languages, period. Or, they can, but vastly prefer WYSIWYG text formatting.

For me, if I'm writing something for a web page, I use HTML in a decent editor (emacs). Markdown, reST, or anything else is not easier, just different.

If I need a really nice-looking document, I'll probably use LaTeX. But for a simple document or one that I'll work on with other people, I'll normally just use google docs.

Re: FuncShell – A Haskell-based alternative to awk

#40
post #33

Earlier quoted context omitted.

What isn't too confusing then? Markdown and HTML are just riffs, it's all based around the idea of opening/closing tokens and special tag names that do different things. I think if there is in fact a technical barrier, then it's the underlying fact that your representation of a document has a separation of content and design/layout. If people can't deal with that, then they can only use WYSIWYG (and not the hacks of…

Markdown has fewer ways to inexplicably (from the point of view of a naive user) munge text. If you type plain text, it mostly comes out as plain text. I've paid John $4.50 for a sandwich. Renders fine in Markdown. Renders like crap in LaTeX.

34 renders fine in LaTeX, in Markdown when you then do 28 it's oh-no. (See this and many other HN comments.)
Post reply on HN