
Show HN: I made a command-line Slack chat client - bkanber
https://github.com/TidalLabs/Slacker
======
LukeHoersten
Slack has an IRC backend and IRC has CLI and Curses interfaces you can use
(even Emacs interfaces).

~~~
bkanber
That's true! But there are two reasons I didn't go that route:

1) I wanted to build this ;)

2) Slack's IRC integration does not mark messages as read until you exit the
IRC client. (Granted, mine doesn't mark them as read at all, but -- it _can_!)

~~~
jwise0
I upvoted this comment because I really like the idea of "I built this because
I wanted to". I like the idea of Show HNs as an "I made this thing for me, and
not for any other reason". Thanks for posting your project!

~~~
PhasmaFelis
Reminds me of this comic, which I've always thought had something positive to
say to engineers: [http://wondermark.com/666/](http://wondermark.com/666/)

~~~
stephenr
I love that thank you

------
imothee
I was building something similar in Go for the exact same reason so looks like
there is validation for the product at least! Great work on shipping,
incredibly well commented and clean.

~~~
bkanber
Thanks, appreciate it! I considered Go for this too, but wanted to use PHP
because you don't see too many curses PHP apps around, and I wanted to observe
one for myself ;)

------
xasos
How did you like working with PHP for the project? Pros/cons?

~~~
bkanber
Honestly PHP was a breeze!

There's only a couple of things that stood out to me as suboptimal:

\- PHP ncurses is not well documented beyond just function signatures. Of
course, curses itself is well documented, and ncurses functions map one to one
with the PHP extension, so that wasn't really that bad.

\- I should have separated my classes and built a PHAR (PHP archive), but I
got lazy.

\- There's the portability comment I've made a few times already

But other than all that, PHP did its job perfectly. Easy to write, read, and
organize.

~~~
joshfriend
Did you know that Slack itself is also written in PHP?

[https://twitter.com/SlackHQ/status/426469205005705217](https://twitter.com/SlackHQ/status/426469205005705217)

~~~
svisser
Note that this tweet clarifies that P stands for PHP and not Python or Perl:
[https://twitter.com/SlackHQ/status/499432194398756864](https://twitter.com/SlackHQ/status/499432194398756864)

------
masukomi
i was all interested until i saw PHP. That's not a dis on PHP. It's just that
PHP is _so_ not the right tool for the job for a command line client. Sure, it
appears you can coerce it to do that but... it's designed for embedding in web
pages. that's what it's good at. if you want to write command line tools,
write them in a language that's actually designed with stuff like that in
mind.

~~~
bkanber
I actually intended to write a comment in the README about my choice of
language, but as things go, I forgot.

This was, first and foremost, an educational pet project for me. I /like/
building things in the wrong language. Hell, I run a blog called "Machine
Learning in JavaScript", and I can't tell you the amount of criticism I've
gotten over the years along the lines of "wrong tool for the job!".

I was actually surprised how well this worked in PHP. The only issue is that
the ncurses PHP extension, not being compiled by default in most package
managers' PHP distribution, does force you, the user, to take an extra step in
installing it. That is unfortunate.

That would be a grave issue if I saw this as a product, but since it's a pet
project, I see that as totally acceptable :) I actually never even intended to
release this publicly!

~~~
aikah
> I /like/ building things in the wrong language.

That's not the issue here. You could have written that in shell script it
wouldn't matter. Just that PHP(+ all the extensions required) makes it more
difficult to deploy for someone who just want to try out your project.

~~~
bkanber
I disagree. When I build a project for fun, or for education, as in this case,
the last thing I want to be thinking about is you!

