These are chat archives for phparsenal/phparsenal

10th
Jun 2015
Hipp04
@Hipp04
Jun 10 2015 21:07
My vote goes toward the PHP command line tool (https://trello.com/c/XG9DUIPY) -- but Samayo brought up that we ought to keep it simple as a first project to get to know each other and work out initial kinks.
I agree. But I also don't think a command line tool isn't inherently complicated. It is, however, exclusionary to people who aren't accustomed to the command line.
samayo
@removed~samayo
Jun 10 2015 21:12
I'm ok with this idea. You have my vote.
I am guessing since we are 4, we should have 3/4 majority to decide.
Hipp04
@Hipp04
Jun 10 2015 21:15
There are others who have joined up on Trello. But since there doesn't seem to be much interest in the other ideas, this one would make sense.
We'll also need to work out the best way to handle the code base. I think git-flow was mentioned on the reddit thread.
samayo
@removed~samayo
Jun 10 2015 21:20
Yeah, I'm not git savvy but, I'll try to keep up.
Hipp04
@Hipp04
Jun 10 2015 21:21
This seems like a good place to read up on how things should be done: https://www.atlassian.com/git/tutorials/
samayo
@removed~samayo
Jun 10 2015 21:21
I think we should wait until the 2 other active members cast their vote, before we can get into the details.
Hipp04
@Hipp04
Jun 10 2015 21:21
Yeah. I'm just raising points of discussion.
Marcel Voigt
@nochso
Jun 10 2015 21:24
CLI already has my vote on Trello
<-- porkbonk btw
samayo
@removed~samayo
Jun 10 2015 21:27
Yeah, I'm with you. Also, I was thinking that in-order to avoid everyone commiting or merging things arbitrary, or even worse asking to get an approval of every member to do so .. I propose that, if any user wants to fix a typo, or something similar .. they can do so anytime. If they want to create bigger, then atleast that person should come here or to go the the IRC channel and get an approval of at-least one other member. This way, we can assure that whatever goes into the code, is, at the very least .. something positive, or agreed upon.
Also, no one will push something and feel back if it is rolled back, .. or push something then worry if someone will go crazy over it ..
John O'Grady
@natedrake
Jun 10 2015 21:27
I vote for CLI
samayo
@removed~samayo
Jun 10 2015 21:28
  • feel bad
Marcel Voigt
@nochso
Jun 10 2015 21:30
testing from irc.gitter.im
Hipp04
@Hipp04
Jun 10 2015 21:32
Hopefully we can keep drama to a minimum. Everything seems open for discussion.
samayo
@removed~samayo
Jun 10 2015 21:33
Ok, with that.
Marcel Voigt
@nochso
Jun 10 2015 21:33
Yeah, we're all here to learn
Hipp04
@Hipp04
Jun 10 2015 21:34
That should be the slogan :P
"We're all here to learn"
samayo
@removed~samayo
Jun 10 2015 21:35
@Hipp04 Do you have any experiences with creating CLI applications ?
Hipp04
@Hipp04
Jun 10 2015 21:37
Only a little. Once I realized PHP had a CLI I spent a while reading up on tools and playing around. It's a deep culture to fall into.
Seems like a good base to work off of: https://github.com/symfony/console
I haven't used it. I haven't used any Symfony components yet actually.
Marcel Voigt
@nochso
Jun 10 2015 21:40
we can look for libaries later, maybe we should define more of what we want?
Hipp04
@Hipp04
Jun 10 2015 21:41
"A command line utility to remember and do things"
The addons make it interesting.
Marcel Voigt
@nochso
Jun 10 2015 21:43
is it a good idea to start with collecting the most common use cases or commands?
Hipp04
@Hipp04
Jun 10 2015 21:44
Looks like the next step would just be to brainstorm. Use cases seem like a good way to get that rolling.
Marcel Voigt
@nochso
Jun 10 2015 21:44
like the absolute minimum to make it useful, the base that addons will be using
Hipp04
@Hipp04
Jun 10 2015 21:44
Any reason you used ff in the example?
Marcel Voigt
@nochso
Jun 10 2015 21:45
I was trying a few things on a ubuntu shell and it wasn't taken or suggested an install
Favorite Folder or Fast Forward :)
Hipp04
@Hipp04
Jun 10 2015 21:46
Works for me. Pretty sure it'd be whatever the name of the phar is anyway.
f is prime real estate too.
Marcel Voigt
@nochso
Jun 10 2015 21:48
I think there's a programming language, I hope their tooling doesn't clash
samayo
@removed~samayo
Jun 10 2015 21:49
@nochso Are there any similar projects made (doesn't matter good or not) ... That I can take a look and understand better how this could be made?
Marcel Voigt
@nochso
Jun 10 2015 21:51
not for the CLI. There are things like Launchy for GUIs that achieve similar things
Hipp04
@Hipp04
Jun 10 2015 21:53
Do you just mean command line tools?
I haven't looked at artisan much but I know Laravel uses it as the CLI a lot.
samayo
@removed~samayo
Jun 10 2015 21:55
Ah, artisan .. yes. I guess the same goes for the php built-in server ..
Marcel Voigt
@nochso
Jun 10 2015 21:55
https://www.getwox.com/ I only just found this but looks like a good example
Hipp04
@Hipp04
Jun 10 2015 21:56
I was under the assumption we'd do it in bash.
Marcel Voigt
@nochso
Jun 10 2015 21:57
yes, it's just the only examples I have are GUIs
Hipp04
@Hipp04
Jun 10 2015 21:57
I have almost zero Windows CLI knowledge though.
samayo
@removed~samayo
Jun 10 2015 21:57
"We're all here to learn" :)
Hipp04
@Hipp04
Jun 10 2015 21:58
Haha. Yes. Someone with at least a little expertise would be helpful though. :P
Marcel Voigt
@nochso
Jun 10 2015 21:58
not sure if you need any
samayo
@removed~samayo
Jun 10 2015 21:59
I have -100 Windows CLI knowledge so, you are better than I am @Hipp04
Marcel Voigt
@nochso
Jun 10 2015 21:59
well, I'm using the windows CLI and a cygwin shell daily
Hipp04
@Hipp04
Jun 10 2015 21:59
What environment are you guys running? Just so we know what we're packing. I develop on Windows with Cygwin but am soon migrating to a Linux machine to free myself from the limitations of emulation.
Marcel Voigt
@nochso
Jun 10 2015 22:00
Hipp04, I have win32 binaries of the common tools like grep, cat etc. in my global path on windows 7
samayo
@removed~samayo
Jun 10 2015 22:00
I am using Windows 7, but working on CentOs7 though a Vbox.
Marcel Voigt
@nochso
Jun 10 2015 22:00
it makes the windows cli much more bearable if you don't need cygwin
Hipp04
@Hipp04
Jun 10 2015 22:01
Cool. Now we just need a mac user and a few different flavors of Linux.
How about unit testing experience?
Marcel Voigt
@nochso
Jun 10 2015 22:02
otherwise I ssh to my ubuntu vps, that's most of the linux cli for me
Hipp04
@Hipp04
Jun 10 2015 22:02
I have zero. Unfortunately...
samayo
@removed~samayo
Jun 10 2015 22:02
< minus 100
Hipp04
@Hipp04
Jun 10 2015 22:02
I've learned why it's important the hard way :P
Marcel Voigt
@nochso
Jun 10 2015 22:02
I've written unit tests for my ORM and have a travis badge on the repo
but I'm pretty sure the tests themselves are not good examples :)
samayo
@removed~samayo
Jun 10 2015 22:03
I'm confused .. is this project 100% bash only?
Marcel Voigt
@nochso
Jun 10 2015 22:04
I was thinking a PHP script called from any OS command line?
which is pretty much a PHAR I guess
Hipp04
@Hipp04
Jun 10 2015 22:05
That's where things will get tricky I think. But there are a lot of similarities.
samayo
@removed~samayo
Jun 10 2015 22:06
Ok, so it's a one phar file installable just like composer.phar that will contain php scripts to accept http://php.net/manual/en/reserved.variables.argv.php argv and execute shell scripts??
Hipp04
@Hipp04
Jun 10 2015 22:07
With the addons, not just shell scripts. But yes. That's what I've gathered.
There isn't much reason we shouldn't treat this a something we can use to improve our own workflows.
We'll probably get a lot of inspiration from the things we wish we could do.
I imagine that's how the idea originated.
Marcel Voigt
@nochso
Jun 10 2015 22:10
samayo, yes shell scripts or plugins written in PHP
samayo
@removed~samayo
Jun 10 2015 22:11
It would be nice if someone created a repo with the name for this project, so we can all create our own branches and start fiddling ..
Marcel Voigt
@nochso
Jun 10 2015 22:11
I actually started on this before the reddit post
samayo
@removed~samayo
Jun 10 2015 22:12
@nochso you already have one started?
that would be nice to share ..
Hipp04
@Hipp04
Jun 10 2015 22:12
How about naming it Fast-Forward
Marcel Voigt
@nochso
Jun 10 2015 22:12
yes, let me check if it's in any condition
Hipp04
@Hipp04
Jun 10 2015 22:13
I made the repo.
If you have code it'd be a good place to start.
Marcel Voigt
@nochso
Jun 10 2015 22:14
mine is a mercurial repo, so we might lose the short history
Hipp04
@Hipp04
Jun 10 2015 22:14
I also don't know the differences between licenses either. Probably good to know.
But I have a date so I'm headed out for now. I look forward to see things unfold.
Marcel Voigt
@nochso
Jun 10 2015 22:15
I'll push my code in a second
MIT is the most permissive and short
Marcel Voigt
@nochso
Jun 10 2015 22:21
just pushed my stuff
samayo
@removed~samayo
Jun 10 2015 22:21
good.
Marcel Voigt
@nochso
Jun 10 2015 22:23
DBA::connect() in cli-launch will create a SQLite db if it's not existing yet. Model is in assets/model.sql however it's not automatically run yet
samayo
@removed~samayo
Jun 10 2015 22:26
I'll take a look.
I'm still trying to push to my branch a dummy content
Marcel Voigt
@nochso
Jun 10 2015 22:28
I wrote a little explanation in the read me, just the state of it
this is the moment to refactor if anything ;)
I didn't want to commit an empty src/Command/Add.php but that would have been my next step
samayo
@removed~samayo
Jun 10 2015 22:35
So, this is for windows only right?
Marcel Voigt
@nochso
Jun 10 2015 22:36
at the moment, yes
how would you do that on linux? let php run a command on the shell after the script exits?
samayo
@removed~samayo
Jun 10 2015 22:39
I guess. It would be much easier in linux. I haven't used the windows terminal in ages. I'm trying to remember how to add path variables :/
Marcel Voigt
@nochso
Jun 10 2015 22:40
samayo, causing a change of directory after the script exits didn't work for me. I'm aware of chdir()
windows key + pause/break > advanced system settings > environment variables
piping phps output to get executed on the shell is probably a one liner, but I couldn't find a equivalent for windows. A hack but it works
Marcel Voigt
@nochso
Jun 10 2015 22:49
getting late for me. Feel free to start over and see you tomorrow :)
samayo
@removed~samayo
Jun 10 2015 22:49
Ok, I'm trying it. Tomorrow :)
samayo
@removed~samayo
Jun 10 2015 23:15
Message for tomorrow:
It did not work for me:
  • The autoloader is not present, I don't know the reason behind this.
  • cli-launch.php #2 has non-existent class: nochso\clilaunch\Model
\nochso\ORM\DBA\DBA::connect() class does not exist at n cli-launch.php @ line #13
new \cli\table\Ascii();, \cli\Streams::out(), new \cli\Table(); do not exist also ...
I am sure I am missing something .. someone enlighten me.