#dev 2017-10-19

2017-10-19 UTC
eli_oat, snarfed, [miklb], John__, leg, renem, wagle, tbbrown, KartikPrabhu, EmreSokullu and gRegorLove joined the channel
tbbrown, snarfed, EmreSoku_, [miklb], [jeremycherfas] and sebsel joined the channel
#
snarfed
!tell mblaney,[miklb] hi again! re testing bridgy fed against mastodon, it's working now against the newest mastodon code running on https://mastodon.social/ . you should be able to respond to mastodon post URLs of the form https://mastodon.social/@USERNAME/POST_ID
#
Loqi
Ok, I'll tell them that when I see them next
#
snarfed
!tell mblaney,[miklb] (post URLs of the form https://mastodon.social/users/USERNAME/updates/POST_ID seem to use a different code path that still doesn't fully handle ActivityPub ?)
#
Loqi
Ok, I'll tell them that when I see them next
cweiske, EmreSoku_, KevinMarks, KevinMarks__, chrisaldrich, [chrisaldrich], KartikPrabhu and [heydon] joined the channel
#
[heydon]
Don’t know if anyone would be interested in this, but I’ve created an experimental router system. It lets you create single-page applications without depending on monolithic and opinionated frameworks like Angular, so independent++ ? It just enhances standard browser behavior RE hash fragments and provides hooks via the `hashchange` event. It’s called Xiao (because it’s just 1.4KB minified). Here’s a demo: https://heydon.github.io/
#
Loqi
[Heydon] xiao: A tiny, accessible, browser-driven single-page routing system.
#
cweiske
no thanks, I'm not interested
#
KartikPrabhu
[heydon]: the demo link does not work
#
@uxmumble
Using Facepiles in Comments for WordPress with Webmentions and Semantic Linkbacks - http://klou.tt/10jmiq98uwg40
(twitter.com/_/status/920918726811074560)
#
[heydon]
Weird. It works for me. I posted in Slack, though…
#
[heydon]
I’ll try again: https://heydon.github.io/xiao
#
KartikPrabhu
[heydon]: yes that does work, the "xiao" route didn't make it to IRC
#
[heydon]
Ah, okay thanks. Tell me if I’m spamming BTW. I’m not sure of the scope of this channel at this stage.
jeremycherfas and KevinMarks joined the channel
#
Zegnat
It looks like you are discovering some IRC-gateway bugs, [heydon]. So all writing is useful ;)
#
Zegnat
[heydon] is there a reason to use hashchange instead of popstate?
#
@peeke__
So I've published this a few days ago: https://peeke.nl/writing-flat-code Reposting here so I have a syndication link for it (http://peeke.nl/implementing-webmentions)
(twitter.com/_/status/920930799121203200)
#
[heydon]
@zegnat Good question. It doesn’t use the history API at all, though. It just behaves like a web page with same-page links.
#
Zegnat
Yeah, I understand that. Just wondering why. It seems to me like the same thing should have been possible without the #. But I guess that would have broken the URLs for non-JS UAs.
KevinMarks_ and j4y_funabashi joined the channel
#
[heydon]
Yeah, that was the thinking.
EmreSoku_ joined the channel
#
[heydon]
It also means you can have a CSS `:target` based fallback to show/hide static routes or routes where JS has failed.
tantek, jeremycherfas, jeremych_ and John__ joined the channel
#
aaronpk
[heydon] do you use that framework on your personal site?
#
aaronpk
(That essentially answers the question about what is in scope of the channel and what looks spammy)
EmreSoku_, j4y_funabashi, eli_oat, jeremycherfas, calumryan and snarfed joined the channel
#
jeremycherfas
Using the default PHP on OSX, what is the magic to get ssh2 functions to work? Is it not part of PHP by default?
#
cweiske
no, it's a module in pecl
#
cweiske
normally they are installed via "pecl install ssh2"
#
cweiske
if you have compiler and things
#
jeremycherfas
Maybe homebrew?
#
cweiske
dunno if you have a package repository that provides a lib
#
jeremycherfas
I'll try it and see. Thanks
#
jeremycherfas
Looks like I might have to update php too
#
jeremycherfas
Maybe not. I have PHP 7 in MAMP, so maybe I can use that instead of the default version, before I upgrade to High Sierra.
#
Zegnat
!tell jeremycherfas if you have ssh tools accessible on the commandline, can’t you use exec() and related functions within PHP to call it that way?
#
Loqi
Ok, I'll tell them that when I see them next
[kevinmarks] joined the channel
#
[kevinmarks]
I do like Heydon's technique to do a static js-free tabs/pagination - building that technique into reveal.js would be neat
[jeremycherfas] joined the channel
#
[jeremycherfas]
Too late now Zegnat. I’m upgrading to High Sierra right now. If it breaks, it breaks.
#
Loqi
[jeremycherfas]: Zegnat left you a message 59 minutes ago: if you have ssh tools accessible on the commandline, can’t you use exec() and related functions within PHP to call it that way?
tbbrown joined the channel
#
Zegnat
I do like installing PHP from homebrew, jeremycherfas, and keep an updated version of it around on the command-line
#
[jeremycherfas]
I get confused about where I need to be to use which version of php. MAMP has them all but I don’t really understand how to force the use of one of them. Even with MAMP running, php -v shows the default one almost always.
snarfed1 and snarfed2 joined the channel
#
petermolnar
php -v is command line
#
petermolnar
there are many differences between calling php in the command line vs calling it through a webserver
#
petermolnar
the webserver either integrates an interpreter (apache with mod_php) or connects to a php-as-a-service over fastcgi protocol, running daemon
#
petermolnar
if you want to know what version you're running in the webserver, create an info.php with <?php phpinfo(); ?> contents
#
petermolnar
and visit it in the webserver
#
petermolnar
that will show you the details
#
aaronpk
if you want to run a specific version of php from the command line you have to find where it's installed. just typing "php" will use whichever one is in your default path, but if you have more than one installed you'd have to type the full path to it, like /usr/local/php-5.6/bin/php or whatever
#
aaronpk
dreamhost does something clever and names all the different versions things like "php-5.6" so you can just type that on the command line to run that version
#
petermolnar
you can make an alias in bash for that, or a symlink in /usr/local/bin to the relevant binary with the version name, so it gets picked up
snarfed joined the channel
#
petermolnar
(is there sudo in mac?)
[eddie] joined the channel
#
[eddie]
yep, there is sudo in mac
#
[eddie]
oh wait
#
[eddie]
or is that when I'm ssh'd in somewhere from a mac ?
#
[eddie]
nope sudo is good
#
[eddie]
:thumbsup:
#
KartikPrabhu
mac os is unix based so it should have sudo
#
petermolnar
sudo is a binary which is or is not installed on a box, eg. basic debian server, out of the box doesn't have it
#
petermolnar
instead it has a root user with password
#
[jeremycherfas]
It’s that difference between running it on the command line and running it in a browser that gets me confused. My mindset is that if I don’t need to display the results, I don’t need a browser.
#
petermolnar
I remember that confusion myself from a long time ago
#
petermolnar
image it as: the webserver, when the webserver starts, grabs a version of php, the one you told it to use. when the webserver gets a request, it takes this php out of it's pocket, pushed the request through it and gives you the results; but that php doesn't change unless the webserver is restarted
#
[jeremycherfas]
The other thing is that even the most basic beginner tutorials don’t tell you much about this sort of thing. They tell you how to do things, but not how to set things up to make doing them easier.
#
KartikPrabhu
what does sudo have to do with the browser?
#
KartikPrabhu
or even php?
#
[jeremycherfas]
Right. But I had to learn how to show error messages in the browser too.
#
petermolnar
you could tail the webserver log instead
#
[jeremycherfas]
That stumped me for a long time
#
petermolnar
so the webserver normally pushed it's thoughts to a logfile
#
[jeremycherfas]
The apache log? Or the php log? Or both?
#
petermolnar
depends on the setup
#
petermolnar
but if it's mod_php, it wil most probably be in apache log
#
petermolnar
however, I have never used a mac for this and I haven't played with apache for years now, so I'm not the best person to ask the details :(
#
[jeremycherfas]
That’s exactly my point. Where do I go to learn about a good setup? Seems to me that’s not easy to find. I know people have individual preferences but it would be good to see what those are and adapt.
#
petermolnar
there is never a one true setup
#
aaronpk
the good "out of the box" setups tend to be things like MAMP
#
aaronpk
but then they mostly work for 90% of the use cases and when you want to do something they didn't plan for, like run a different PHP version, it's often more difficult than if you had not used it in the first place
#
aaronpk
[jeremycherfas]: including the term "deploy" in your searches might turn up more results
#
aaronpk
that'll mostly include stuff about deploying to production servers but the knowledge gained from that can apply to dev environments and even mac dev setups as well
#
[jeremycherfas]
Thanks aaronpk. I really like MAMP for the other things that I do and now that I’ve got a bit of a better understanding of browser vs command line I will probably be able to make better progress. Will search for deploy too. Tomorrow.
KartikPrabhu joined the channel
#
aaronpk
it's taken a while but i finally have a good setup on my mac for development, including SSL certificates, the ability to run php and ruby apps, and an environment nearly identical to the production servers i run things on
#
[jeremycherfas]
That’s encouraging.
#
aaronpk
and most importantly, detailed notes on how to re-create the environment for when i set up a new computer
#
snarfed
aaronpk++ for good local dev setup. important investment, takes work but pays off. not breaking prod, being able to work with flaky or no network, etc
#
Loqi
aaronpk has 78 karma in this channel (1447 overall)
#
snarfed
...and for the notes nudge. e.g. https://snarfed.org/2013-03-02_mac_os_x
#
aaronpk
yeah! it's kind of magical being able to do a full test of logging in to stuff via my local indieauth.com, posting from micropub clients to my local website, all on a plane with no wifi.
#
Loqi
[Ryan Barrett] Mac OS X
#
[jeremycherfas]
That does sound amazing, and way beyond anything I might need. But worth aspiring to.
snarfed, gRegorLove and sebsel joined the channel
#
blueyed
Regarding the "The authentication provider replied with an error: csrf_detected" error I still have with using GitHub as OpenID provider might be related to having a yubico u2f key registered with them.
#
blueyed
(and the browser not supporting it) I also get a strange error on their login form that something went wrong.
snarfed1, j4y_funabashi, [jeremycherfas], [miklb], snarfed, dougbeal|iOS, jjuran and calumryan joined the channel
#
[miklb]
aaronpk I’d love to read how you’ve set up local micropub/webmention testing
#
[miklb]
which also reminds me I need to tackle local SSL certs still
#
snarfed
[miklb]: if you're on wordpress, micropub.php has some example curl lines near the top for testing locally. (also it skips checking tokens if it's serving on localhost.)
#
snarfed
there's also shpub, etc
#
[miklb]
thanks. I’ll take a look
#
[miklb]
I have shpub set up, didn’t think about using that to test locally.
KartikPrabhu, snarfed, calumryan, plindner, mindB, myfreeweb, zoglesby, TheGillies, AlanPearce[m], eli_oat[m], schmarty, eli_oat, tbbrown and jjuran joined the channel