#dev 2017-10-24

2017-10-24 UTC
snarfed joined the channel
#
loqi.me
created /DB (+21) "prompted by tantek and dfn added by tantek"
(view diff)
#
loqi.me
created /datastore (+20) "prompted by tantek and dfn added by tantek"
(view diff)
[kevinmarks] and snarfed joined the channel
#
tantek
!tell petermolnar re: https://chat.indieweb.org/dev/2017-10-23/1508756804030000 did you survey https://indieweb.org/reacji#IndieWeb_Reacji_Posts first? If so what was the summary result?
#
Loqi
Ok, I'll tell them that when I see them next
#
Loqi
[petermolnar] question/survey: when you send a reacji, do you mark it up as u-in-reply-to or u-like-of or even u-boomark-of?
EmreSokullu, [miklb] and mblaney joined the channel
#
tantek.com
edited /email (+1048) "/* Security Issues */ phishing, spearphishing"
(view diff)
#
tantek.com
edited /email (+0) "/* spearphishing */ dfn"
(view diff)
#
tantek.com
created /spearphishing (+33) "prompted by aaronpk"
(view diff)
snarfed joined the channel
#
tantek
!tell bear for your review (off the top of my head because aaronpk asked) https://indieweb.org/email#phishing
#
Loqi
Ok, I'll tell them that when I see them next
#
tantek.com
edited /email (+128) "/* phishing */ examples, Apple ID bear post"
(view diff)
#
tantek.com
edited /iOS (+4) "/* Issues */ linky"
(view diff)
#
loqi.me
edited /Apple_ID (+78) "/* See Also */ new section"
(view diff)
#
Loqi
ok, I added "https://bear.im/bearlog/2017/297/apple-phishing-email.html" to the "See Also" section of /Apple_ID
#
Loqi
[Mike Taylor] Apple Phishing Email
#
tantek.com
edited /email (+11) "/* phishing */ dfn"
(view diff)
snarfed1 and eli_oat joined the channel
renem joined the channel
#
tantek.com
edited /reacji (+973) "Move slack to history and keep diagram purely for illustrative purposes at the top, more explicit how to about the markup of a reacji post, call for code example"
(view diff)
[miklb], [kpraslowicz] and tbbrown joined the channel
#
gRegorLove
what is web sign in
#
gRegorLove
Loqi y u no
dougbeal|iOS, snarfed and [eddie] joined the channel
#
[eddie]
!tell aaronpk: As you work on Microsub stuff if you have any realizations let me know! I’ve been working on a secret project when I’ve had some time here and there: https://github.com/EdwardHinkle/influx a node.js Microsub Server. My goal was to try to finish it and launch it incognito but with discussions being raised definitely wanna be part of those ?
#
Loqi
Ok, I'll tell them that when I see them next
#
Loqi
[EdwardHinkle] influx: A secret project
#
[eddie]
!tell aaronpk https://github.com/EdwardHinkle/influx/issues?q=is%3Aissue+is%3Aclosed shows what’s done. My current blocker is getting subscribed sites parsed and added to the respective channels
#
Loqi
Ok, I'll tell them that when I see them next
tantek, EmreSokullu and cweiske joined the channel
#
@lorcanD
“D-Lib Magazine will cease routine publication with this, our 265th issue” http://buff.ly/2too9mN
(twitter.com/_/status/885947315940450312)
#
cweiske
!tell aaronpk it would be nice if people other than you could put things on Loqi's block list
#
Loqi
Ok, I'll tell them that when I see them next
#
tantek
alright I've reported https://twitter.com/dallaslones as spam, not sure what else to do
#
cweiske
I did, too
renem joined the channel
#
GWG
Morning all
tantek, j12t, [kevinmarks] and EmreSokullu joined the channel
#
petermolnar
!tell aaronpk it would be nice to have people covering all timezones who can add to Loqi's blocklist
#
Loqi
Ok, I'll tell them that when I see them next
#
Loqi
petermolnar: tantek left you a message 7 hours, 32 minutes ago: re: https://chat.indieweb.org/dev/2017-10-23/1508756804030000 did you survey https://indieweb.org/reacji#IndieWeb_Reacji_Posts first? If so what was the summary result?
dgold joined the channel
#
dgold
morning!
#
Loqi
dgold: aaronpk left you a message 12 hours, 15 minutes ago: re: https://chat.indieweb.org/2017-10-21/1508610459552000 Correct, it requires a POST to trigger the distribution. Is that not clear from the docs? or did you just not find the docs? https://switchboard.p3k.io/docs
#
dgold
all the excitement over with?
#
Loqi
good morning
calumryan and jeremycherfas joined the channel
#
sknebel
morning!
j12t joined the channel
#
jeremycherfas
Hello sknebel
#
jeremycherfas
Glad I missed that spam storm.
#
dgold
ok - my nanopub script
#
dgold
it works perfectly on a testbed server
#
dgold
when I run queries on my main server, it fails to provide the source of posts
#
dgold
when I run micropub.rocks, that is
#
dgold
BUT when i run the _same queries_ from locations other than micropub.rocks, they work
#
dgold
e.g. micropublish.net, using curl, httpie or postman
#
jeremycherfas.net
edited /site-deaths (+316) "Site death of Opinion podcast hosting --~~~~"
(view diff)
#
jeremycherfas
!tell cweiske you mentioned something a few days back about installing pear and pecl so that I can then install SSH2. I'm confused about where I should be installing from. Trying to follow https://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/
#
Loqi
Ok, I'll tell them that when I see them next
#
cweiske
jeremycherfas, what exactly are you unsure of?
#
Loqi
cweiske: jeremycherfas left you a message 24 minutes ago: you mentioned something a few days back about installing pear and pecl so that I can then install SSH2. I'm confused about where I should be installing from. Trying to follow https://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/
#
jeremycherfas
Mostly about the various places and paths to things. Probably it comes down to my using MAMP for local development, which seems to have a whole suite of folders for different versions of PHP etc.
#
jeremycherfas
So if I want to add the SSH@ stuff, I don't know where it should go.
#
cweiske
what do you want to do with the ssh php extension?
#
jeremycherfas
So in /Applications/MAMP/bin/php/php7.1.6 I see pear and pecl, but I am not sure where in should be in order to use pecl to install ssh2
#
cweiske
$ pecl install ssh2
#
jeremycherfas
Oh, I want to be able to log into my remote server and then delete a file there.
#
cweiske
and simply using exec() with a ssh command is not feasible?
#
jeremycherfas
That's what zegnat was saying. I guess I need to look again at exec().
#
cweiske
$ ssh cweiske.de 'touch foo.txt'
#
cweiske
exec('ssh example.org ' . escapeshellarg('my command'));
#
cweiske
that should be all
#
jeremycherfas
You're saying I should give up on ssh2? OK. Back to the drawing board!
#
Zegnat
The example cweiske gave there is simply running whatever ssh you have installed on your machine from PHP, as if PHP was typing on the command line for you.
#
cweiske
you can use ssh2, install it with "pecl install ssh2"
#
cweiske
but I guess simply using the ssh command is easier
#
cweiske
and less likely to break
#
Zegnat
I wouldn’t bet on MAMP having proper pecl setup, to be honest. Who knows how stable that is...
#
jeremycherfas
This is where I get confused again about WHERE things are. Is the script on the remote server, or local?
#
Zegnat
locally
#
jeremycherfas
But the script has to log in to the remote server. Doesn't that require SSH2?
#
cweiske
the ssh2 php extension directly opens a ssh connection from php to the server
#
cweiske
if you use exec('ssh ..'), you're using php to execute the ssh client on your machine to connect
#
Zegnat
You have a commandline application `ssh` installed locally. And when you open your terminal you can use it to do something.
#
Zegnat
You can have a local PHP script execute things on the commandline for you with exec(), so your PHP script can do any SSH commands that you can do yourself.
#
Zegnat
Instead of trying to get some extra library bound to PHP for integrated SSH2, you can just test your command on your own commandline and use PHP’s exec() to run it.
#
Zegnat
That means you will be tied to your local machine’s ssh installation, but that should be fine, and you do not need to get any non-standard PHP setups going.
#
jeremycherfas
Thanks. It is becoming clearer. Maybe the first thing would be to set up passwordless login.
#
Zegnat
Looks like ostatus.org is no longer OStatus
[pfefferle] joined the channel
#
[pfefferle]
yes site is gone... I made a copy on github
#
Zegnat
jeremycherfas ha, yes, passwordless login is probably way easier than PHP’s exec() ;)
#
Zegnat
I do hope that made the functions workings a little more clear either way
#
Loqi
[OStatus] spec: OStatus Specification
#
jeremycherfas
Right. Got to go out.
#
cweiske
"easier than"?
#
jeremycherfas
A little, yes. Cweiske++ zegnat++
#
jeremycherfas
I guess that needs to be at the start of the line.
#
Loqi
cweiske has 18 karma in this channel (116 overall)
#
Loqi
zegnat has 30 karma in this channel (135 overall)
#
cweiske.de
edited /projects () "(-1307) remove broken links"
(view diff)
#
cweiske
ha. the wiki footer has "privacy policy" and "disclaimers" which both are 404
#
cweiske
jeremycherfas, do you already have a ssh key?
#
cweiske
if not: run ssh-keygen
#
cweiske
after that: ssh-copy-id user@server
#
cweiske
after that the key will be used for login automatically
#
jeremycherfas
There are good instructions at DreamHost, thanks.
j12t joined the channel
#
jeremycherfas
I seem to have three; github_rsa, id_rsa (which I think was generated for a previous dreamhost server, and user_rsa. And a file for known_hosts.
#
cweiske
is one of them passwordless?
#
cweiske
id_rsa for example?
#
jeremycherfas
Not sure how I would know.
#
cweiske
ssh-keygen -y -f filename
#
cweiske
it will ask for a password if it has one
#
jeremycherfas
Filename being id_rsa.pub?
#
cweiske
if you are in the .ssh directory
#
cweiske
otherwise the path to that file
#
jeremycherfas
Permissions 0644 for 'id_rsa.pub' are too open.
#
jeremycherfas
Which is odd
#
cweiske
is that the real error message?
#
jeremycherfas
That's the message I am getting, yes
#
cweiske
I was wrong
#
cweiske
filename is only "id_rsa"
#
cweiske
not the .pub
#
jeremycherfas
For all three. OK, I'll try that.
#
jeremycherfas
Id_rsa did not ask for a password. Just showed me the contents.
#
jeremycherfas
Contents of the pub file, that is.
#
jeremycherfas
I'm late. Must leave for an hour or so. Thanks so much for your help. Will resume later.
#
cweiske
are you using ssh-agent? did you ever run "ssh-agent add"?
#
cweiske
if not, then the key is without password already
John___ joined the channel
#
jeremycherfas
Done. I can now log in to my remote server without a password.
#
cweiske
now you can do the exec(ssh) thingy
#
jeremycherfas
Yup. Next step will be to pass a variable to the script.
#
cweiske
make sure to use escapeshellarg
j12t and eli_oat joined the channel
#
jeremycherfas
Better than just using doublequotes?
#
cweiske
yes, because inside the string may be double quotes, too
calumryan joined the channel
#
sknebel
cweiske++ for wiki gardening
#
Loqi
cweiske has 19 karma in this channel (117 overall)
#
www.svenknebel.de
edited /projects (-234) "/* Known */ remove outdated details"
(view diff)
#
cweiske
I used some random link checker service
#
cweiske
turns out that /site-deaths is full of dead links
#
www.svenknebel.de
edited /projects (-23) "/* WordPress */ petermolnar isn't wordpressing anymore, replace with GWG"
(view diff)
#
petermolnar
hm, I missed that somehow
#
petermolnar
I tried to clean up when I changed
#
jeremycherfas
But shouldn't we leave those dead links as a warning?
#
sknebel
which ones?
#
jeremycherfas
The ones in site deaths
#
cweiske
of course did I NOT delete dead links on /site-deaths
#
cweiske
only on other pages
#
jeremycherfas
Misunderstood.
snarfed and singpolyma joined the channel
#
jeremycherfas
If I ssh user@host in terminal, I am quickly taken to the server and shown the splash. But if I exec(ssh server@host); in php it seems to be stuck forever and then eventually returns with a broken pipe message.
#
jeremycherfas
Is this because I am not asking it to do something when it is there?
#
cweiske
I guess so, yes
#
cweiske
give it a command like "true"
#
cweiske
ssh user@host true
#
cweiske
or "date" if you want output
#
cweiske
ssh user@host date
#
jeremycherfas
$date = (Exec("ssh $server date")); gets stuck too.
#
cweiske
as which user are you executing this script?
#
cweiske
directly on command line?
#
cweiske
or via your browser by accessing a local apache/nginx?
snarfed joined the channel
#
jeremycherfas
On command line it works fine. I am trying to do this via PHP built-in server
#
cweiske
hm. works here
#
cweiske
$ curl localhost:1080/sshdate.php
#
cweiske
Di 24. Okt 15:53:03 CEST 2017
#
cweiske
echo exec('ssh cweiske.de date');
#
cweiske
$ cat sshdate.php
dougbeal|iOS joined the channel
#
jeremycherfas
Breakthrough! I had single quotes and I needed double, because I was passing $server as a variable.
#
petermolnar
jeremycherfas a long term tip: always use sprintf
#
jeremycherfas
Instead of echo?
#
petermolnar
or printf
#
petermolnar
if you want to echo
#
jeremycherfas
Yes, I've had that tip before, and had forgotten it.
#
petermolnar
I used . concat, {$var}, $var, etc, basically all the possible combinations in PHP
#
petermolnar
the only long term maintainable for me was printf/sprintf
#
cweiske
jeremycherfas, also server should be escaped
#
cweiske
exec('ssh ' . escapeshellarg($server) . ' ' . escapeshellarg($command));
#
jeremycherfas
I'm creating $server with escapewshellarg() before I call exec.
#
jeremycherfas
I'm creating $server with escapewshellarg() before I call exec.
#
jeremycherfas
Can I just concatenate commands after ssh like you just did?
#
cweiske
"ssh example.org echo foo bar baz" works
#
cweiske
or do you mean multiple commands?
#
cweiske
not only multiple arguments?
#
jeremycherfas
Multiple commands. Ssh cd rm
#
cweiske
"cd rm" can be put into one command
#
cweiske
"cd /path/to && rm file" is the same as "rm /path/to/file"
#
jeremycherfas
I'd quite like to test that file exists before rm
#
jeremycherfas
Nervousness?
#
jeremycherfas
But you're right. I don't absolutely need to.
#
cweiske
this works: $ ssh cweiske.de 'cd www && ls && date'
#
cweiske
I have to go.
#
jeremycherfas
You've been a huge help.
#
Loqi
[mathiasbynens] evil.sh: :speak_no_evil: Subtle and not-so-subtle shell tweaks that will slowly drive people insane.
#
petermolnar
eh, sorry, should have been -chat
#
jeremycherfas
Speaking of slowly going insane, php script.php string works perfectly the first time, with string doing what it should, but second and subsequent times, argv[1] stubbornly becomes 'r' and refuses to change.
#
jeremycherfas
How do I make sure argv[1] is null before calling the script? Is there any way?
#
jeremycherfas
I mean, not argv[1] -- that will be whatever I pass -- but when the script starts operating, how do I ensure that my targetvariable will be null before I set it to argv[1]?
John___ joined the channel
#
jeremycherfas
I guess I should create a gist
#
jeremycherfas
As I say, it worked perfectly the first time I ran `php delete-bad-filename.php badfile.yaml` from the command line.
#
jeremycherfas
Every subsequent time, $targetfile seems to be set to 'r'
j12t joined the channel
#
jeremycherfas
Forgive my stupidity; I had left the $ out of $argv, somehow.
#
schmarty
putting the "arg!" in argv
#
jeremycherfas
Hohoho More like aaaaarrrrrggggghhhhh
tbbrown and snarfed joined the channel
#
aaronpk
good morning
#
Loqi
aaronpk: [eddie] left you a message 11 hours, 36 minutes ago: As you work on Microsub stuff if you have any realizations let me know! I’ve been working on a secret project when I’ve had some time here and there: https://github.com/EdwardHinkle/influx a node.js Microsub Server. My goal was to try to finish it and launch it incognito but with discussions being raised definitely wanna be part of those ?
#
Loqi
aaronpk: [eddie] left you a message 11 hours, 35 minutes ago: https://github.com/EdwardHinkle/influx/issues?q=is%3Aissue+is%3Aclosed shows what’s done. My current blocker is getting subscribed sites parsed and added to the respective channels
#
Loqi
aaronpk: cweiske left you a message 8 hours, 25 minutes ago: it would be nice if people other than you could put things on Loqi's block list
#
Loqi
aaronpk: petermolnar left you a message 7 hours, 13 minutes ago: it would be nice to have people covering all timezones who can add to Loqi's blocklist
#
aaronpk
[eddie] awesome!
#
Loqi
good morning!
#
aaronpk
cweske: petermolnar: I'm not 100% sure if this works, but I think if the @indiewebcamp twitter account blocks someone it will stop showing up here as well. I know at least a few people have access to that twitter account.
#
aaronpk
i haven't actually restored the !block command here yet anyway
tantek, calumryan_, [kevinmarks], j12t and [cleverdevil] joined the channel
#
[cleverdevil]
eddie excited about your secret project! Would be an awesome companion to https://github.com/cleverdevil/together/
snarfed and [eddie] joined the channel
#
[eddie]
cleverdevil: That's exactly what I was thinking ? That's why I started showing more interest in together the other week. haha. It's basically modeled off of webmention.io so anyone could have a microsub server just by signing in with their web sign in.
#
[eddie]
The goal is to also have some form of export/import function so if they wanted to start on Influx and then transition to it or another microsub server on their own server, they could keep all of their history, etc. The data is stored as JSON objects and QuartzDB
#
Loqi
[eddie]: lol
KartikPrabhu joined the channel
#
[cleverdevil]
Well, so far grantcodes has done nearly all of the work on Together, but I see you sent over a pull request, too.
#
[cleverdevil]
You're welcome to use Together as your reference client for Influx, and to make any changes needed to make that happen.
#
[eddie]
Awesome ? Exactly, my goal with the pull request and downloading it was to get to know it a bit more so I have a client in mind as I'm designing it
#
[eddie]
He's been doing a great job, and I saw he created a new branch for adding channels which will be great
#
tantek
snarfed, you may be interested in https://test.activitypub.rocks/
#
snarfed
tantek: ooh it supports server to server now! it didn't before
#
Loqi
snarfed: tantek left you a message 18 hours, 33 minutes ago: welcome we're chatting about the first documented examples of webmention spam - see 2017 comments on adactio's post here: https://adactio.com/journal/6469
#
grantcodes
hmm secret project huh...
#
[eddie]
not secret anymore, obviously ?
#
grantcodes
Meant to merge that channels branch back into master. But it doesn't do anything, just pops out a fake list of channels
#
snarfed
aww https://test.activitypub.rocks/ doesn't actually test. it's just a form that generates an implementation report.
#
[cleverdevil]
Yeah, I took a look at it, and its a good start.
[jeremyzilar] joined the channel
#
grantcodes
I think I pushed up a gallery view for the photos feed as well :)
#
[eddie]
Nice ?
#
grantcodes
Oops it was still local, online now
#
[cleverdevil]
I'll check it out as well.
#
[cleverdevil]
I still like the idea of the channels being pinned to the left, like in the mockup.
#
sknebel
!tell snarfed: see https://chat.indieweb.org/social/2017-10-24#t1508865395522000 and surrounding, seems like its not fully online yet
#
Loqi
Ok, I'll tell them that when I see them next
#
Loqi
[ben_thatmustbeme] cwebber: the major thing is the test suite, and i got it written. I was deploying it this morning but ran in to servers issues. the software is good in theory, its just a matter of working through the deploy issues
#
grantcodes
@cleverdevil, yeah I just couldn't figure out how to do that yet :P
#
[cleverdevil]
That gallery view is ?
#
[cleverdevil]
For anyone who wants to see current progress ?
#
aaronpk
whoa awesome
#
[cleverdevil]
Its a distant dream to have all of this working, but all of the pieces are there!
#
[cleverdevil]
Building blocks, at least.
#
schmarty
ooh, thanks for the video, [cleverdevil] !
#
[eddie]
grantcodes++ for the gallery vide
#
Loqi
grantcodes has 2 karma in this channel (4 overall)
#
schmarty
and awesome work grantcodes
#
[eddie]
cleverdevil++ for the video
#
Loqi
cleverdevil has 6 karma in this channel (53 overall)
#
grantcodes
Yeah, as before kinda stuck untill there's some sort of backend.
#
aaronpk
heh yeah
#
aaronpk
really making me want to jump into developing a backend for this!
#
aaronpk
i wonder if i can get away with a super minimal UI backend kind of along the lines of webmention.io
#
[cleverdevil]
Well, the more the merrier!
#
[cleverdevil]
I think you definitely can. The bulk of the user experience will likely end up in readers.
#
aaronpk
i think it needs a bit of a UI, at least enough to tell whether it's working
#
aaronpk
the recent addition of the dashboard in webmention.io helps, but it was kind of opaque before
#
[cleverdevil]
Fair point.
#
aaronpk
but rendering posts in any form is always tricky, lots of edge cases, etc. so I gotta figure out what's the bare minimum I can get away with.
#
grantcodes
Was also thinking would be really great if websub supported websockets or something, instead of constant polling
#
[cleverdevil]
Maybe just presenting the raw data.
#
aaronpk
nothing in websub requires polling
#
[cleverdevil]
Rather than worry about rendering it.
#
aaronpk
that's the whole point
#
grantcodes
Oh sorry, microsub!
snarfed joined the channel
#
aaronpk
it wouldn't be too far fetched to extend the API to use the EventSource API
#
aaronpk
but that should always be a progressive enhancement thing
#
grantcodes
Yeah, it's complicated! I'm pretty sure the reader will require it's own server as well, so that could do the realtime pushing
#
aaronpk
for web-based readers likely yes
#
aaronpk
ideally it'd be possible to build a mobile/native reader app that talks directly to the microsub server with nothing in between
#
grantcodes
CORS is maybe going to kill your dreams there
#
aaronpk
CORS only affects web browsers tho, not native apps
#
grantcodes
oh really, I don't fully understand it, just know I always run into it ?
#
Loqi
snarfed: sknebel left you a message 24 minutes ago: see https://chat.indieweb.org/social/2017-10-24#t1508865395522000 and surrounding, seems like its not fully online yet
#
aaronpk
a microsub server could also just set the appropriate CORS headers to allow everything
#
[eddie]
If microsub is backend, CORS shouldn't be an issue though
#
[eddie]
right?
#
grantcodes
Yup, auth and discovery I think is the more common cors issue. Need to scrape the users page for the endpoints.
#
grantcodes
Maybe I can use something like anyorigin for that, but dependencies...
#
grantcodes
Or it would be easy to build my own, just always feels dirty to have a middleman like that haha
#
Loqi
nice
#
[eddie]
Ohhhhh that makes sense
raziellight joined the channel
#
KartikPrabhu
hi raziellight
#
raziellight
what is the difference between the two chats if you don't mind me asking?
#
[eddie]
aaronpk: My plan is for my microsub not show attempt any display and to rely on a reader for that. My dashboard will likely show how many posts each channel/subscription contains and maybe allow viewing the jf2 data
#
raziellight
i thought indieweb was essentially developing
#
raziellight
hihi :D
#
KartikPrabhu
raziellight: this one is more for dev stuff. the other one we try to keep the "code" stuff out of
#
KartikPrabhu
so that it is more accessible to beginners and people just coming in
#
raziellight
oh hmm odd
#
aaronpk
[eddie]: yeah that makes sense. stuff like "last fetched" and things
#
raziellight
ah i see
#
[eddie]
raziellight: There are people in the IndieWeb that don't "code" but use Wordpress and things like that
#
raziellight
oh..
#
[eddie]
aaronpk: exactly.
#
KartikPrabhu
raziellight: so yes. I do use Django and python
#
raziellight
ah i see
#
raziellight
like i was looking at snippets awhile ago, and i feel like a core tenent of programming is or atleast should be inserting data that is maybe sometimes variable
#
raziellight
this is how things are created, and atom based approaches as in the book, and component based web design is taking a hold
#
tantek
raziellight:
#
tantek
what is cassis
#
Loqi
CASSIS, short for Client And Server Scripting Implementation Subset, is an intersection of the syntaxes of Javascript and PHP, as well as an open source library, cassis.js, that enables writing code once, and having it natively execute in both JS and PHP https://indieweb.org/CASSIS
#
raziellight
i feel like there should be libraries that essentially let you select and insert commonly used applications would be an ideal form of reducing repetition and keystrokes
#
KartikPrabhu
raziellight: yes. I do that in Django using templates for components
#
raziellight
hmm yeah i have been just looking at templates, and was trying to understand the difference between using templates and snippets
#
KartikPrabhu
again it depends on what you are using. for JS + PHP Cassis seems to be good but I have not used it since I use python
#
tantek
what is a snippet?
#
Loqi
It looks like we don't have a page for "snippet" yet. Would you like to create it?
#
raziellight
they both seem to achieve similar aims, but templates tend to be more part of the webpage construction, where as the snippet is more a command that input common reusable code in the first place
#
KartikPrabhu
raziellight: right. snippets are bits of reusable backend code and tempaltes are for rendering them on the we page
#
raziellight
but very similar. i remember trying to reduce repetition using templates, but ultimately failed and feel snippets may be a better solution. a snippet is essentially a block of code binded to a command where by code can be reused
#
KartikPrabhu
you can use both
#
raziellight
hmm ya..
#
raziellight
for reusable code, but i feel like a lot of repetitive tasks could better be done using snippets rather than def blocks
#
raziellight
but this is a whole other story that i will eventually figure out. i want there to be libraries for which people can browze and insert code to create from components into specific webpages. and it's a project i'm willing to take on
#
KartikPrabhu
raziellight: i suppose that depends on your style
#
raziellight
but i feel like this should exist..
#
raziellight
or people all have their own private collections
#
raziellight
which seems like an aweful lot of repeating
#
raziellight
so that's the gist of what i'm trying to accomplish
#
KartikPrabhu
raziellight: be careful not to get trapped into https://xkcd.com/927/
#
raziellight
there are a few shabby repositories i've found highly disorganized and not refined
#
tantek
only a few? ;)
#
raziellight
lol.. ya well there is variation and there is reptition
#
KartikPrabhu
my repos are highly disorganized too. Mianly because I am just making stuff for my own site
#
raziellight
so ultimately it should be good to catalog the variation and make it easy to goto the variation, but there seems to be more tools to create more variation and less tools to do more repetition
#
raziellight
i see
#
raziellight
ya.. well i am a very analytical and organize person who is on a mission to make things more organized
#
raziellight
organized*
#
KartikPrabhu
raziellight: maybe a good approach is to make something for your site and keep it well-maintained and documented and people will use it
#
aaronpk
KartikPrabhu++
#
Loqi
kartikprabhu has 4 karma in this channel (154 overall)
#
raziellight
ya well i'm definitely going to do that as i reinvent the wheel :o!
#
tantek
KartikPrabhu++ yes that's a good approach :)
#
Loqi
kartikprabhu has 5 karma in this channel (155 overall)
#
raziellight
lol :D
#
tantek
raziellight: what's your personal site?
#
raziellight
and add some engines and wheels to it while i'm at it
#
raziellight
i don't have a personal site. i'm in the process of analyzing web page design to better improve efficiency
#
raziellight
but i want to make a site.. and i'm in the process of not only making a site, but also setting myself up to reuse code and make it easier to make sites in the future
#
raziellight
i have three goals. better organizating. making a website. and making stuff to make it easier a website
#
raziellight
to make a website*
#
tantek
a personal site is a good way to try out ways to be more efficient
#
raziellight
ya exactly :D
#
tantek
and good to just start with a simple home page
#
tantek
rather than over-architecting for components and such
#
raziellight
but like i said i'm highly analytical, and am weighing my options
#
raziellight
so i appreciate any insight or methods that i come upon
#
tantek
it has nothing to do with being highly analytical or not, it's about putting it into practice so you get real world iteration
#
raziellight
that have already been made
#
tantek
science vs philosophy
#
tantek
all philosophy = zero efficiency because nothing ever gets done
#
KartikPrabhu
right. I started out with a pretty bad mish-mash of code for my site. But now that I have it in place I can move things around and organise it
#
tantek
raziellight: do you have a personal domain?
#
raziellight
ya you're right. it is. i guess i am carefully treading my steps forward so i can create a good workflow as i learn and improve
#
raziellight
no tantek. i've been working on organization software i've yet to publish. it's my first real piece of code that i've built
#
tantek
just start making something. best way to learn
#
raziellight
and i want to get better at web design
#
raziellight
ya well i'm probably going to start making snippets to make my webpage
#
raziellight
and templates or some combination of the two
#
raziellight
and figure this out
#
KartikPrabhu
I learnt python to make my site so you can learn while making
#
raziellight
i know python
#
raziellight
and i know html and css and done very little in javascript
#
tantek
raziellight: forget software. just start with a static HTML home page
#
tantek
get it up on your personal domain
#
tantek
and then iterate from there
#
tantek
without something real that you're iterating with, any software you write will risk becoming an architecture astronomy project
#
snarfed
tantek++
#
Loqi
tantek has 17 karma in this channel (397 overall)
#
raziellight
architecture astronomy? :D
#
tantek
you may ask "what is"
#
KartikPrabhu
what is architecture astronomy?
#
Loqi
architecture astronomy is the practice of analyzing problems, seeing patterns, and then generalizing to higher and higher level abstractions on top of those patterns to the point where the abstractions become so general, so vague, so detached from the original problems being analyzed, that they don't mean anything at all https://indieweb.org/architecture_astronomy
#
raziellight
well ya thank you for the advise. i was very well going to do just that, but also started thinking about how i can reuse what i do
#
tantek
do first, then think about how can you reuse what you do
#
raziellight
because i've created a webpage base frame like three times now? and it's getting repetitive
#
raziellight
or more..
#
raziellight
probably more
#
tantek
perhaps because such frames depend on their specific use-cases
#
raziellight
so i realized snippets were what i need
#
tantek
hence why it is important to do first, generalize later
#
tantek
what is a snippet
#
Loqi
It looks like we don't have a page for "snippet" yet. Would you like to create it?
#
tantek
not clear that anyone needs snippets
#
raziellight
a snippet is a reusable piece of code that is set to a command
#
loqi.me
created /snippet (+88) "prompted by tantek and dfn added by raziellight"
(view diff)
#
raziellight
it's definitely useful
#
tantek
raziellight: how do you define useful? what sites are using them?
#
tantek
raziellight: that definition is so abstract as to be meaningless
#
tantek
a command to or from what to or from what?
#
raziellight
tantek it is not a matter of websites using them. it's a way to write code in a quicker more repetitive component based fashion while still providing arguments for the variation
#
tantek
that sounds like functions or methods
#
tantek
what's different about a snippet?
#
raziellight
for example you write div<tab> and it completes <div class="%1">%2</div>
#
raziellight
creating things is a process of inserting code. snippets is a way to do that in a repetitive manner. if there was a snippet for every component in existence, all creation of webpage would be a matter of having the snippets organized enough to first goto and find the snippet. and then copy and pasting
#
raziellight
but that is on a grand scale
#
raziellight
there are more modest collections i've found in the wild
#
raziellight
maybe some people like writing code one letter at a time. but this is a possible waay to be super productive
#
tantek
I don't really see any improved efficiency there. In my experience HTML + microformats are easy enough to type directly. My text editor (BBEdit) already autocompletes open tags with close tags.
#
tantek
I have yet to find code typing to be even close to what is limiting productivity
#
tantek
keystrokes are not the hard problem. good UI and UX design typically is.
#
tantek
no code "snippets" are going to solve that
#
tantek
nor make you "super productive" at building anything usable
#
raziellight
well if it's component based, good ui and ux design can be built into the snippets
#
tantek
completely disagree. can you show even one example of a good ui or ux that was built with snippets?
#
tantek
or is that a hypothesis waiting to be tested?
#
raziellight
well i don't have a production ready example. only exploring and asking around may you find someone who has got it to that level
#
raziellight
this is all in the design phase for myself personally
#
tantek
that's my point - I don't think that's a well founded hypothesis
#
raziellight
but i have a vision of component based web design that i'm willing to think over carefully to something usable
#
aaronpk
Bootstrap is kind of that idea. it has saved me some time since it has some pretty good defaults for things like form elements and UI controls
#
tantek
and time would be better spent to try just making a simple HTML home page for yourself instead, to understand the use-case
#
raziellight
ya exactly aaronpk. like bootstrap, but in components, and ready at hand in the text editor
#
raziellight
for easy commands and searching and browzing
tbbrown joined the channel
#
aaronpk
i really don't think typing in the text editor is the bottleneck of development
#
raziellight
i already know how to make a webpage. what i am after is to do it very productively
#
tantek
hmm just got a OSX update for Safari 10.1.2, and sec-up 2017-003 10.10.5 - anyone apply that update yet?
#
raziellight
and my personal webpage will probably start with just like you said
#
raziellight
but that's only one of my goals
#
raziellight
what do you think is aaron?
#
raziellight
i've already seen many attempts going in the direction of component based web design. react. jsx. some google projects.. etc
#
KartikPrabhu
raziellight: designing using components does not have to be with huge frameworks like React
#
raziellight
is react huge? i'm tottally unaware of this. i just read the tutorial
#
KartikPrabhu
as I mentioned. I use components in my backend and then put them together into a webpage
#
KartikPrabhu
it is a pretty big javascript dependency just to render a webpage
#
raziellight
ya well i guess i'll continue to fumble around until i have this all figured out
#
KartikPrabhu
raziellight: there is no need to have it figured out before building
#
raziellight
but ya i forgot about that django page. i'm definitely going to be reinspecting it
#
tantek
raziellight: yes its huge. it's like 100x the size of a simple HTML home page
#
KartikPrabhu
i found it more useful to make my site. and then see which patterns are being repeated and then later move them into their own "component"
#
tantek
^^^ this
#
tantek
raziellight: empirical iteration tends to be more efficient than a priori design (what it sounds like you're doing)
#
raziellight
well ya i mean if everyone all has their own libraries and this is repeated, then ya that's the only approach i have going for me
#
tantek
so if efficiency is what you're after, make first, optimize second
#
tantek
you don't need a library for a home page
#
raziellight
i have tried empirical iteraction in developing skill in a game. i've found it far from efficient. it's a lot of trial and error and mucking about. i've adopted a more analytical approach now to skill building
#
tantek
trial and error should be analytical, that's the point
#
raziellight
part of that analysis made me realize the usefulness of snippets, which i'm definitely going to use
#
tantek
also not sure how "skill in a game" translates to making a home page or website
#
raziellight
well ya i can see that. analytical trial and error where a model is created, but that is different than trial and error without any vision or knowledge gained from it or very little
#
tantek
what's even less efficient than that is no trial, only analysis
#
raziellight
it definitely translates. they are two different skills, but the process by which one changes sequences of events and conditions to create an optimal workflow holds true to both
#
tantek
how can you conclude it translates without first building a home page?
#
raziellight
ya well you got me there :D
#
tantek
seems like a pretty big assumption to declare "definitely"
#
raziellight
i was mucking about awhile ago with template engines, and that went no where
#
raziellight
so it's not like i'm not trying things
#
tantek
you don't need a template engine for a home page
#
raziellight
it definitely translates..
#
raziellight
i know i know
#
tantek
hard to take a claim like "definitely" seriously without evidence (e.g. a home page)
#
tantek
it sounds like you're making extra work for yourself with trying things that are inessential to what you're trying to make
#
tantek
which sounds inefficient
#
KartikPrabhu
raziellight: I fear you are falling into the architecture astronomy trap
#
raziellight
hmm it's plain as day to me. i went through a whole learning curve with that game. it was quite amazing. what i learned there can be applied to other skills in some ways
#
KartikPrabhu
what is python?
#
Loqi
Python is a programming language and web server runtime environment used for many IndieWeb projects https://indieweb.org/Python
#
tantek
perhaps could be, rather than can be
#
raziellight
ya kartik i may be a little bit..
#
tantek
without doing, you can't conclude "can be"
#
tantek
certainly not very analytical to make such a conclusion
#
KartikPrabhu
raziellight: if you want to look at reusable code that some of us are using check out https://indieweb.org/Python for python
#
tantek
lunch time
#
raziellight
ah thank you kartik :D i'll check it out
#
raziellight
this is actually great kartik. a list of examples where people are actually using code and making a success of it
#
raziellight
i remember making a webpage from scratch ages ago with just html back in the age of tables. i was so proud i did the code myself. then i learned to code and it opened a whole world for me
#
raziellight
i mean programming code
#
KartikPrabhu
most of those things do one small task. but you can glue them together
#
raziellight
anyway brb going to get some tea and go over these examples. this is invaluable information and i feel would be great if there was more of it
#
raziellight
for newbies and what have you
#
raziellight
i guess to be clear what i learned from that game is that there is trial and error and repeating the same mistake over again until you slowly very slowly change, or there is the way of analysis and trial and error where by you analyze and try and get feedback and create models which to be more effective. they lead to dramatically different results in skill level
#
raziellight
and the rate in learning
#
KartikPrabhu
raziellight: yes. I think tantek was pointing out that the "trial and error" is also essential along with analysis
#
raziellight
but yes i will try to be careful not to land in the analysis paralysis trap
#
raziellight
yes i see that :D
#
raziellight
some kind of mid ground :D
#
KartikPrabhu
so I would recommend starting with a simple homepage and building up from there using both analysis and trial and error
#
raziellight
but i feel like writing good code is also a lot of careful planning which i've found successful in my first major project
#
raziellight
will do. i think these indieweb examples are a great place to start. going to get into them now
#
raziellight
thank you again for your patience and your help kartik :D
#
KartikPrabhu
sure thing
snarfed and tantek joined the channel
#
tantek.com
edited /Loqi (+210) "/* Bugs */ more !cancel variants"
(view diff)
tantek and snarfed joined the channel
#
snarfed
GWG++ i saw! github notifs :P
#
Loqi
gwg has 15 karma in this channel (265 overall)
#
tantek
aaronpk I'm going to go out on a limb and suggest blocking that account from Loqi's Twitter search as it (and its material) is not really appropriate for #indieweb-dev per our Code of Conduct
#
tantek
sknebel++
#
Loqi
sknebel has 23 karma in this channel (66 overall)
#
GWG
snarfed: I found a Micropub problem
[tantek] joined the channel
#
GWG
I tried to use Quill's itinerary posting. It said a location was returned, but no post was created
#
tantek.com
edited /SMS (-27) "shorten dfn for irc"
(view diff)
#
loqi.me
created /phone_number (+229) "prompted by tantek and dfn added by tantek"
(view diff)
#
loqi.me
edited /phone_number (+81) "/* See Also */ new section"
(view diff)
#
loqi.me
edited /phone_number (+64) "tantek added "https://twitter.com/swiftonsecurity/status/922857208488103936" to "See Also""
(view diff)
#
loqi.me
edited /SMS (+19) "tantek added "[[phone number]]" to "See Also""
(view diff)
#
aaronpk
i can block the twitter account but i don't really have a block mechanism for the superfeedr pings
#
tantek
by domain name?
#
aaronpk
sure there just isn't code for that yet
#
aaronpk
with the twitter search i have a list i add accounts to
#
snarfed
GWG: thanks! feel free to file and/or fix!
#
GWG
snarfed, I am trying to figure out why it failed.
[kevinmarks] joined the channel
#
[kevinmarks]
Razielight - in a sense micropub and webmention are examples of standard forms that you can use on multiple domains
#
raziellight
yes kevin ! i just found out about micropub and webmention. micropub + h-entry p-category is the answer i've been looking for plus boilerplate to solve all my problems
#
raziellight
create a webpage. check. organize bookmarks. check. organize everything. check. share everything and keep backups. check. reuse code. check. it is all coming together
#
raziellight
this is really an awesome little community you got going here
#
raziellight
now i just have to write the code and i'm golden
KartikPrabhu joined the channel
#
raziellight
wb kartik
#
raziellight
i see a way forward to solve everything in one kartik ! i must say i'm excited
[chrisaldrich] joined the channel
#
GWG
snarfed, when did Bridgy start sending location data in mentions?
#
snarfed
GWG: got me
#
snarfed
GWG: been a while
#
GWG
chrisaldrich just pointed this out
#
GWG
Bridgy to Webmention to Semantic Linkbacks to Simple Location.
#
raziellight
dang there's even a browser plugin for micropub in firefox :o
#
GWG
The feature worked automatically without me realizing it
#
snarfed
interop++
#
Loqi
interop has 1 karma in this channel (2 overall)
#
snarfed
emergent++
#
Loqi
emergent has 1 karma
#
raziellight
no micropub for emacs? :O
millette joined the channel
#
snarfed
emacs++
#
Loqi
emacs has 1 karma
[tantek] joined the channel
#
tantek.com
edited /database-antipattern (+392) "/* Fragile */ Too many connections"
(view diff)
#
KartikPrabhu
raziellight: cool, what did you decide t use?
#
00dani.me
edited /User:00dani.me () "(-1031) update my indieweb status - a lot has changed since last time!"
(view diff)
#
raziellight
well kartik i am still learning, but it seems that i can post bookmarks online. i can link that to my program and create an html/css/javascript ui. i also found skelton which seems like a great simple css boilerplate
#
raziellight
i can use h-entry and category to post and link into my software(hopefully) . this will also be the start of me building a usable app and will improve my ability to create another webpage i want
#
raziellight
like everything fits, and i'm astounded. i just have to figure out how to use micropub indieauth with python
#
raziellight
if i'm getting this straight i might be able to use eve as a simple curl request, but i'm still not sure how that actually posts the data. i'm guessing it's plugged into like a database on the backend
dougbeal|iOS joined the channel
#
raziellight
how do you post?
#
raziellight
and what is actually changing the post request to html?
#
raziellight
but this is *huge* this heads me in three directions i wanted to in one. if i take this one direction. i didn't realize this was possible. might i add this with a little work and browser integration this could be a great way to manage bookmarks
#
raziellight
backup share exchange everything
#
snarfed
LOCKSS++
#
Loqi
lockss has 1 karma
#
KartikPrabhu
raziellight: as I mentioned I use Django in the backend and so currently I am using its posting interface. I want to switch to micropub though
#
raziellight
hmm
#
raziellight
i'm not sure how it's all put together. i'm looking at kaku's code right now. have you any experience with those flask engines at all, and your opinion on them?
#
KartikPrabhu
I haven't used Flask much. It is similar to Django but more lightweight
#
KartikPrabhu
if you need help with kaku you can ask bear
#
raziellight
i'm just wondering what i can use to take the post events and turn that into html on my webpage
#
raziellight
is there no micropub library for that in python?
#
raziellight
or like put them in a database or something for query
#
KartikPrabhu
micropub is only about what requests are sent for posting. To save them in a database or something you'll have to write your own code, since that depends on what your backend is
#
raziellight
hmm i see
#
raziellight
i'm just trying to figure out what i need. a restful api like eve i'm thinking..
#
raziellight
and then some work on parsing the requests
#
KartikPrabhu
what is hugo?
#
Loqi
Hugo is a static site generator written in Go https://indieweb.org/Hugo
#
KartikPrabhu
what is hyde
#
Loqi
It looks like we don't have a page for "hyde" yet. Would you like to create it?
#
loqi.me
created /hyde (+58) "prompted by KartikPrabhu and dfn added by KartikPrabhu"
(view diff)
#
KartikPrabhu
raziellight: right the parsing stuff depends on your backend. the posting can be done by micropub requests
#
[kevinmarks]
you could use jinja2 templates to turn posted data into html in python
#
raziellight
red wind and kaku seem like multi purpose libraries. but what i need, unless it's so simple that it's not been created, is a library that just handles micropub requests
#
raziellight
or am i wrong about that?
#
raziellight
ya forsure kevin. i have studied jinja2 a bit. what i'm very inexperienced in is handling requests
#
KartikPrabhu
depends on what you mean handle, since again that depends on what backend you are using
#
raziellight
handle as the first point where by a micropub request is handled and have something done with it
#
raziellight
i guess it must listen for a post request but i am essentially in the dark about what happens when it it recieved
#
KartikPrabhu
that is what I mean. it depends on what you want to do, put in a database, write to file etc...
#
KartikPrabhu
so there is no general thing for it
#
raziellight
i guess my concern is not so much where to put it, but the parsing that the micro format specs cover
#
raziellight
like handling all the tags and category and stuff
#
raziellight
but i guess it may be directly put into a database with those table headers..
#
KartikPrabhu
raziellight: the microformats parsing is to parse a webpage not to handle incoming requests
#
KartikPrabhu
micropub will send the post data either as a form-encoded format or as a JSON dictionary
#
raziellight
hmm ok that would simplify things if it's just json..
#
raziellight
i guess stick the tags in my tinydb and the posts in some kind of sql database
#
raziellight
that would be a start
#
raziellight
oh hey.. have you heard of flask micropub
#
raziellight
i just found it
#
KartikPrabhu
yes i have seen it mentioned
#
KartikPrabhu
never used it since it is Flask
#
raziellight
this might be exactly what i'm looking for
#
raziellight
why did you decide to go with django over flask?
#
KartikPrabhu
i didn't decide. I just started using Django as it had good docs
#
raziellight
ah i see
#
raziellight
ya i tried django. great docs. but pretty complicated and i never got anything made with it. then again i didn't have much to make at the time
#
KartikPrabhu
right. I have heard Flask is simpler. but you also get a lot less out-of-the-box
#
raziellight
ya exactly. and django has a pretty nice repository of add-ons
#
raziellight
flask is so dead simple. it's really easy to learn
#
[kevinmarks]
a POST in python gives you a request which has a dictionary of the posted elements
#
raziellight
er i think flask micropub is for clients :o
#
raziellight
ah i see kevin ty
#
[kevinmarks]
so you put the ones you want into a dictionary, and then call jinja2 with the dictionary
#
raziellight
oh that sounds dead simple
#
raziellight
but how is a request handled? does it require an api or something like eve
#
raziellight
or special indieauth code
#
KartikPrabhu
raziellight: you can use existing micropub clients like Quill to post on your site. You will need to use indieauth for that
#
KartikPrabhu
Quill will send a POST request and then your backend can handle that request like [kevinmarks] said
#
raziellight
no i mean endpoints. there seems to be plenty for clients. and if i get this straight i can just pretty much use a post with curl even
#
raziellight
but for endpoints i'm not sure how to handle it.
#
KartikPrabhu
you might have to write that code on your own depending on what you want to do with the data
#
[kevinmarks]
python uses WSGI so whichever framework will usually end up giving you a request object in your handler
#
raziellight
ya i think that might be the case kartik. i'm definitely going to have to write some of my own code. but i guess it somehow gets to a dictionary. if i can handle the post request and get it in a dictionary i'm golden
[eddie] joined the channel
#
[eddie]
raziellight: one of the first things I did when making my Micropub Server was to create an endpoint that just logged whatever POST body was received. Then I used Quill to post to it and see what data I received
#
raziellight
i'm total newb at such matters like recieving requests so please excuse me if i'm missing something basic
#
raziellight
oh right eddie
#
KartikPrabhu
right [eddie]. making small steps is more helpful than thinking about the whole picture right away
#
raziellight
hey sweet snarfed. this is what i need i think!
#
raziellight
bmed!
#
raziellight
ya i was wondering if i just needed some kind of request library
#
snarfed
in general, there are 5-10 libs for any common webapp task, in any language. don't write code yourself unless you have a good reason to :P
#
raziellight
ya snarfed :D exactly. finding the code to reuse seems to be the hard part !
#
snarfed
really? google?
#
raziellight
well sometimes you don't know what to search for
#
raziellight
better browzing options and waypoints would be super useful for another way to look for stuff
#
raziellight
but ya.. right now that's what we got. google and effort
#
raziellight
or duckduckgo :D
#
snarfed
try searching with the closest keywords you can think of, then take better keywords you find from there and search with those, and repeat
#
raziellight
ya that's essentially what i do :o
#
raziellight
:)
#
snarfed
btw here's another big collection of utilities for working with http reqs, resps, urls, etc: https://github.com/snarfed/webutil/blob/master/util.py
#
raziellight
been browzing the indieweb wiki though. and been learning as much as i can
#
raziellight
sweet ty. bmed!
snarfed joined the channel
#
[eddie]
!tell aaonpk: More adventures in Compass. I've got this error: [RuntimeException]
#
Loqi
Ok, I'll tell them that when I see them next
#
[eddie]
SplFileInfo::openFile(/var/compass/datageneral/2017/10/08.meta): failed to open stream: Permission denied Do jobs run under a different user than php-fpm? Because looking at the permissions for that file it should match the php-fpm fine