#dev 2019-09-26

2019-09-26 UTC
cikavuveDiscord[, [jgmac1106], t-mo, [tantek], [Michael_Beckwit and [jeremycherfas] joined the channel
#
[jeremycherfas]
Coming to this conversation very late, but Byword has had a publish button for a long time now. Originally WordPress but may be others by now.
[Rose], GWG, vilhalmer, [tonz] and [Lewis_Cowles] joined the channel
#
aaronpk
snarfed: does bridgy fetch Instagram profile pages or just photo permalinks? I'm seeing drastically different limits on profile pages
[dominik] joined the channel
#
petermolnar
anyone knows if any of the cloud providers have a free tier for full text search ?
#
[Lewis_Cowles]
I think Algolia & elastic.co does, however you’re limited in terms of accesses and size of DB if I remember rightly
#
[Lewis_Cowles]
AWS probably has something or you could install something awful on a box
#
[Lewis_Cowles]
All are incredibly limited [petermolnar_]
#
[Lewis_Cowles]
Heroku AFAIK could use free-tier postgres
gxt joined the channel
#
Zegnat
Any cloud provider that gives you enough space and processing power to run SQLite, petermolnar? ;)
#
[Rose]
`mysql -u ownyourgram -p ownyourgram < schema/schema.sql` is the correct command [jhsheridan]
#
[Rose]
You need the space after the -p
[JHSheridan] joined the channel
#
[JHSheridan]
ok I'm here
#
[JHSheridan]
[Rose] I caught that typo, and I I meant to put it in when I pasted it above
#
[JHSheridan]
but same issue unfortunately
#
[JHSheridan]
I really dislike slack, but it's nice to be able to see the messages that came in before I was in here rather than running a bouncer
#
Zegnat
[JHSheridan]: really dumb question, but, schema/schema.sql is readable from where you are on the terminal? It isn’t that the access denied error is coming from reading the file?
#
[Rose]
I was hoping you'd caught the typo, my next guess would be the same as Zegnat
#
[JHSheridan]
-rw-rw-r--
jgmac1106 joined the channel
#
Zegnat
I mean, there are only so many ways you can run an sql file into the mysql cli, so I have no idea why this wouldn’t work, haha
#
[Rose]
You're in the right directory?
#
[Rose]
That's something silly I've done myself more often that I would prefer 😛
Frodohack and [jgmac1106] joined the channel
#
Zegnat
Alternatively the question is whether the user ownyourgram was really granted access. But I don’t see how that could’ve gone wrong
#
aaronpk
Sometimes MySQL is picky about localhost vs 127.0.0.1
#
aaronpk
also usually that space isn't required after the -p
#
aaronpk
domt worry about Travis, there's some other issue right now with one of the tests
#
Zegnat
[Rose]: looks like you are going to need the cookie too: `Access to undeclared static property: Config::$igCookie`
#
[Rose]
Darn it
#
aaronpk
Ah I forgot the new config params in the Travis cold
#
[Rose]
Loqi doesn't even like cookies, why would Travis need it?
#
[Rose]
You want to take over the fixes Aaron or should I continue?
#
Zegnat
Travis doesn’t need it, the rest of OwnYourGram needs it :P
#
aaronpk
Go for it!
#
[Rose]
So we also need newUsersAllowed
#
[JHSheridan]
ok I figure it out... my host was localhost instead of 127.0.0.1
#
[JHSheridan]
so the script ran
#
[JHSheridan]
then I go to run my php server... which works
#
Zegnat
[Rose] you could try tunning phpunit locally and see if it fails ;)
#
Zegnat
Just make sure to use the travis config file
#
[JHSheridan]
until I load the page
Frodohack left the channel
#
[JHSheridan]
[Thu Sep 26 17:23:56 2019] PHP Fatal error: Uncaught Error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in /home/jhsheridan/Projects/OwnYourGram/lib/helpers.php:4
#
[JHSheridan]
Stack trace:
#
[JHSheridan]
#2 /home/jhsheridan/Projects/OwnYourGram/vendor/autoload.php(7): ComposerAutoloaderInit745d49f0bf3c95f7fa7c4f8c079eebcb::getLoader()
#
[JHSheridan]
#1 /home/jhsheridan/Projects/OwnYourGram/vendor/composer/autoload_real.php(56): composerRequire745d49f0bf3c95f7fa7c4f8c079eebcb('00d2825a126da51...', '/home/jhsherida...')
#
[JHSheridan]
#4 {main}
#
[JHSheridan]
#3 /home/jhsheridan/Projects/OwnYourGram/public/index.php(3): require('/home/jhsherida...')
#
[JHSheridan]
[Thu Sep 26 17:23:56 2019] 127.0.0.1:40282 [500]: / - Uncaught Error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in /home/jhsheridan/Projects/OwnYourGram/lib/helpers.php:4
#
[JHSheridan]
Stack trace:
#
[JHSheridan]
#1 /home/jhsheridan/Projects/OwnYourGram/vendor/composer/autoload_real.php(56): composerRequire745d49f0bf3c95f7fa7c4f8c079eebcb('00d2825a126da51...', '/home/jhsherida...')
#
Zegnat
[JHSheridan]: I think that happens when you have an older PHP or somehow got ahold of PHP without PDO support for MySQL?
#
[JHSheridan]
running 7.2.19
#
[Rose]
Do you have the right PHP libraries?
#
jgmac1106
all this problem with ownyouryorgram….maybe it is time to walk away rather than keep giving facebook more and more money
#
[Rose]
Theoretically PDO should be enabled by default my brain says
#
Zegnat
Yeah, my brain says the same, [Rose]
#
[Rose]
This concurs
#
[Rose]
Argh, travis is still failing. The command "./vendor/bin/phpunit --bootstrap vendor/autoload.php tests" exited with 1.
#
Zegnat
Have you tried running phpunit locally? :P
#
[JHSheridan]
I have considered this [jgmac1106]. I go back and forth on it
#
Zegnat
[JHSheridan]: could you run `php -m | grep pdo_`?
#
petermolnar
Zegnat: the only reason I'm looking into cloud is to keep up to date... my rough guess is that 50+% of use search use cases out there could be covered with SQLite
#
jgmac1106
a deeply personal choice, having to choose to between being able to send a picutre to a friend or supporting a compnay that unleashes hate, anger,and envy on the world..if only there was another way to send a pic to a friend….
#
[JHSheridan]
[Zegnat] I get no output and an error exit in my terminal
#
[JHSheridan]
maybe that is the issue?
#
[JHSheridan]
[jgmac1106] what way do you prefer to share photos w/ friends when they are presumably all locked into the silos?
#
jgmac1106
like I said deeply personal choice. sometimes silo have to win because of critical mass
#
jgmac1106
I just put them on my website and then sms a link
#
jgmac1106
and I still Twitter so totally pot = kettle both #000000 here
#
jgmac1106
been working hard on my multiphoto views like https://jgregorymcverry.html/oceancity2019, I need to make a single photo post and then figure out how to make the galleries next
#
jgmac1106
oops: https://jgregorymcverry.com/oceancity2019.html still some work to do but getting close
#
[JHSheridan]
responded in #indieweb
#
Zegnat
[JHSheridan]: weird. That is a problem. `php -m` should tell you all the photos y modules you have available
#
[JHSheridan]
when I just run php -m it runs
#
[JHSheridan]
and I see PDO in there
#
[JHSheridan]
not sure why piping it to grep was an issue
#
Zegnat
That's just even more confusing then. Do you have the pdo mysql module?
#
Zegnat
And the PHP on your cli is the same as used by your webserver?
#
Zegnat
If so, no clue why it would fail on calling MySQL
#
[JHSheridan]
"WARNING: Module pdo_mysql ini file doesn't exist under /etc/php/7.2/mods-available" maybe I don't have the module with mysql
#
@WesterinkDavid
Zo, net het (ongebruikte) disqus systeem op mijn website vervangen door webmentions. Ziet er beter uit vind ik, nu ik de css tenminste wat in orde heb ;-)
(twitter.com/_/status/1177159330380099584)
#
Zegnat
[JHSheridan]: yeah, that sounds likely then.
#
Zegnat
When I piped `php -m` to grep it told me I had 4 different `pdo_*` modules, one of them being `pdo_mysql`
#
Zegnat
I honestly thought it came with by default
#
[JHSheridan]
I will hack on this more later. Thanks [Rose] and [Zegnat] for all your help.
#
@dev_nikema
#100DaysOfCode - [42/100] WebMentions, WordPress, new web server, new email server on MailGun. Not too much coding today but lots of tech-ing. https://unbootcamp.me/blog/hoping-to-enter-the-indieweb/ https://nikema.dev/posts/100-days-of-code-42-100/ cc: @alt_dev_nikema, @un_bootcamp, @PopSchoolsCode #WomenWhoCode #DevsOfColor
(twitter.com/_/status/1177164527244169216)
[tonz] and [KevinMarks] joined the channel
#
[JHSheridan]
well I got PDO working I think, but now I've got another error
#
[JHSheridan]
Type: PDOException
#
[JHSheridan]
Code: 1045
#
[JHSheridan]
Line: 253
#
[JHSheridan]
Message: SQLSTATE[HY000] [1045] Access denied for user 'ownyourgram'@'localhost' (using password: NO)
#
[JHSheridan]
weird that it's not using a password, right?
#
aaronpk
youv'e defined the password in the config.php file?
#
GWG
aaronpk: Does x-ray generate a summary property when none is provided?
#
[JHSheridan]
thank you aaronpk... I am dumb
#
[JHSheridan]
it's up and running locally!
#
GWG
I have an issue filed to generate a summary when a URL is provided to Parse This, my xray equivalent, so it can be optionally displayed.
#
GWG
I don't want to display the entire content field, which was the alternate request
#
aaronpk
i remember a discussion around this, and something about being able to distinguish between a hand-authored summary and an automatically generated summary
#
[JHSheridan]
I'm up and running locally, but seems to be having an issue verifying my instagram. There's definitely a link in there, and I've had it verified using the online service
#
aaronpk
well that's a start!
#
aaronpk
that sounds like the same problem i'm having with the hosted version
#
aaronpk
oh make sure you don't have an xray host defined in the config file
#
[JHSheridan]
xray='false'
#
aaronpk
should be false without quotes
#
[JHSheridan]
sigh... I am sorry I'm filling up this chat with my dumb typo errors... haha
#
[JHSheridan]
found it!
#
aaronpk
cool now it should be making the request to instagram from your server and not google cloud
#
[JHSheridan]
it seems to be stuck on the test post part
#
[JHSheridan]
I'm doing all this on my local machine
#
aaronpk
that's progress too!
#
aaronpk
does it report an error?
#
[JHSheridan]
no errors... just got the spinning icon on the test post page.. been running about 10 min
#
aaronpk
can you check the javascript console?
#
aaronpk
whatever happens when you click test will be instant
#
[JHSheridan]
whan warning in my terminal
#
[JHSheridan]
one*
#
[JHSheridan]
127.0.0.1:44158 [404]: /instagram/photos.json - No such file or directory
#
aaronpk
did you use the built-in php server for this?
#
aaronpk
php -S 127.0.0.1:8080?
#
[JHSheridan]
no errors in my console
#
[JHSheridan]
yep... php -s 127.0.0.1:8080
#
aaronpk
hm i thought that sent everything through index.php...
#
aaronpk
ok try this:
#
aaronpk
cd public
#
aaronpk
php -S 127.0.0.1:8080 index.php
#
aaronpk
oh great now the css won't load
#
[JHSheridan]
was just about to type thatr
#
[JHSheridan]
I do see this tho:
#
[JHSheridan]
Error!
#
[JHSheridan]
We didn't find any photos in your Instagram profile. If your account is set to "private", OwnYourGram will not be able to import your photos. If you're sure you've posted photos and your account is public and are still seeing this message, you can report an issue.
#
[JHSheridan]
There was an error posting the photo to your website. Please check that you're handling the expected parameters and returning the "Location" header and try again.
#
aaronpk
that's cause the JS didn't load
#
[JHSheridan]
but also
#
[JHSheridan]
Raw response:
#
[JHSheridan]
Great!
#
[JHSheridan]
Your website accepted the photo! View your post at the link below. Automatic import is now enabled for your site!
#
[JHSheridan]
oh... that makes sense
#
aaronpk
yeah you're seeing all the possible messages
#
aaronpk
ok so apparently the built-in web server needs its own routing script :(
#
aaronpk
one sec, i can do this quickly i think
#
[JHSheridan]
you're the man aaron!
#
aaronpk
just pushed the change, pull that down and then run php -S 127.0.0.1:8080 router.php
[pfefferle] joined the channel
#
[JHSheridan]
ok
#
[JHSheridan]
It's up and running
#
[JHSheridan]
but now I get to the test post page and it's blank
#
[JHSheridan]
I mean... the page loads, but no photos
#
[JHSheridan]
I do have one error in the console
#
[JHSheridan]
"TypeError: data.items is undefined"
#
aaronpk
i definitely need some better error handling and debugging here
#
aaronpk
can you load /instagram/photos.json in your browser?
#
aaronpk
and see if there are any errors there or any errors in the PHP console?
#
[JHSheridan]
loads the dashboard, but I don't see any errors
#
[JHSheridan]
well it looks like the dashboard
#
[JHSheridan]
but maybe it isn't
#
[JHSheridan]
I'm not sure what it should look like
#
[JHSheridan]
not sure if you can see that screenshot or not depending on how you're hooked in to IRC
#
aaronpk
ok something is still wrong with the command line router
#
aaronpk
i don't usually run apps this way, i was hoping it would just work
#
[JHSheridan]
I don't think it's the dashboard
#
Zegnat
Hmm, I thought it wouldn’t go through the router at all for existing files? That is a bit weird.
#
aaronpk
ok this is weird, everything except that particular path is handled by the router
#
aaronpk
wait no
#
aaronpk
ok anything in a subfolder is not being handled properly
#
aaronpk
i don't understand why that would be
#
aaronpk
i'm stumped. it seems like whenever the URL ends with .json then it doesn't get handled right
#
aaronpk
i suppose the quickest way to fix this is to just remove the .json from the URLs
krychu and [Lewis_Cowles] joined the channel
#
[JHSheridan]
Gotta sign off for the evening. It's after 8pm in indonesia. Can help do some more testing tomorrow. Thanks for all your help y'all
#
aaronpk
thanks for being one of the first to try this out!
#
[JHSheridan]
least I can do!
neoaboriginal1, t-mo, jeremych_, gxt, jgmac1106, psyonityDiscord[, [schmarty], [tonz], [frank] and [tantek] joined the channel
#
jeremycherfas
Very I-am-not-a-developer question: having cargo culted my new theme, I'm left with a lot of JS from the theme I modified that I am pretty sure I no longer need. Is there some formal way of testing whether a site uses everything it has included in the head, or do I just delete one by one and wait for something to break?
#
[Lewis_Cowles]
you can console.log each function and scan the console, or have it queue up telemetry which talks to a server which can track more rigorously over-time
#
[Lewis_Cowles]
Almost never delete unless you’re certain, but worry if it’s too JS laden
#
aaronpk
hm yeah, that's tough. I usually look for possible entry points into a JS file. that'd be things like globally defined functions, or code that traverses the DOM. once you identify the entry points, you can look for things that would cause those to be entered.
#
jeremycherfas
Some are obvious, like a thing that formats a masonry-styled wall of excerpts, which I definitely do not want. Others maybe less so. I suppose looking through the JS would be more generally useful.
#
aaronpk
yeah i think you just have to comb through all the code
#
jeremycherfas
Erk. Well, i will probably gain by doing so.
#
jeremycherfas
Actually, taking a detailed look now, it isn't as bad as I thought, because most of the baggage is stylesheets, which I know I don't need. There JS I can probably cope with.
#
@dascritch
Dis, @edasfr , je vois que tu supporte les webmentions https://indieweb.org/Webmention . Ça ressemble furieusement aux rétroliens que j'ai dû remiser tellement ils étaient pollués par les spams
(twitter.com/_/status/1177242629731495936)
#
@edasfr
↩️ oui oui, webmention, pingback et trackback sont similaires sur le principe, avec les mêmes limites ou presques
(twitter.com/_/status/1177244061985640449)
#
@franckpaul
↩️ on cherche d'abord un webmention, sinon un trackback, sinon un pingback, dans cet ordre. Premier trouvé a gagné :-)
(twitter.com/_/status/1177246536725618689)
#
@franckpaul
↩️ et on voit chez Nicolas le ping que j'avais fait à l'époque (https://nicolas-hoizey.com/2017/07/so-long-disqus-hello-webmentions.html) avec une belle image de surcroit :-)
(twitter.com/_/status/1177247470532907008)
#
@franckpaul
↩️ je viens de tester avec Chrome (dotclear 2.15.1), sur mon billet que j'ai cité et le résultat : https://webmention.io/nicolas-hoizey.com/xmlrpc|https://nicolas-hoizey.com/2017/07/so-long-disqus-hello-webmentions.html donc a priori pas de soucis vu d'ici
(twitter.com/_/status/1177248520409141249)
[schmarty] joined the channel
#
@WesterinkDavid
No more #disqus on My Autistic self. Using #webmentions from now on. Just a little update post via https://buff.ly/2nuPp5P
(twitter.com/_/status/1177254763370569729)
[snarfed] and [pfefferle] joined the channel
#
[snarfed]
aaronpk: bridgy fetches both profile pages and photo permalinks
#
[snarfed]
i switched it to use a logged in cookie (for a test account) a while back though, so that's probably the main difference btw it and OYG right now
#
aaronpk
Hm k. I tried sending a logged in cookie but I’m not sure that’s actually working. I did most of the code on the plane with slow internet so wasn’t able to test things as well as I’d like.
#
aaronpk
Also to really test I need to deploy XRay and see what it does on google cloud and my connection wasn’t stable enough for that
[aaronpk], [jgmac1106] and gxt joined the channel
#
[snarfed]
gl once you're on the ground!
#
[snarfed]
unrelated, wow, interesting. mastodon's API is standard OAuth 2, including registering apps beforehand...but since it's decentralized, there's no single place to register an app. so they have an API _for registering apps_, per instance. makes sense, just interesting.
[Rose], [tantek], jjuran, [schmarty], chimo, [KevinMarks], jgmac1106, leg, krychu, [jgmac1106] and dopplergange joined the channel
#
@rakyll
When you finish a PhD in computer science, they take you to a special room and explain that you must never use recursion in real life. Its only purpose is to make programming hard for undergrads. https://twitter.com/Grady_Booch/status/1177340563932119040
(twitter.com/_/status/1177362139629047808)
#
Loqi
ok, I added "https://twitter.com/rakyll/status/1177362139629047808?s=20" to the "See Also" section of /Recursion https://indieweb.org/wiki/index.php?diff=65036&oldid=63550
jgmac1106, [jgmac1106] and IWSlackGateway joined the channel