#dev 2020-02-27

2020-02-27 UTC
TraptedMind, [tantek] and KartikPrabhu joined the channel
#
[jgmac1106]
[chrisaldrich] I have gotten so close on two really popular event plugins to be proper h-events that work with semantic linkbacks
#
[jgmac1106]
its one vcard hcard I haven't deleted yet.....messes me up every time...if you have time some day you could probably show me what I am doing wrong
[chrisaldrich] joined the channel
#
[chrisaldrich]
Which ones? Where's the code?
#
[jgmac1106]
uggh I deleted it, but I have it saved it was for literacyeveryday.org
#
[jgmac1106]
I know I blogged about every single mess up I made, just taking a few days off I will dig it up
#
[jgmac1106]
But it was really really close...
#
[jgmac1106]
moving to wordpress
KartikPrabhu, TraptedMind, gRegorLove, beko, jjuran, nickodd, geoffo and [datashaman] joined the channel
#
[datashaman]
this might be useful for some.
#
Loqi
Managing kindle highlights with Python and GitHub
gRegorLove and [LewisCowles] joined the channel
#
[LewisCowles]
I don't know how all the write your own are coping. It's been a while since I've written greenfield without a team and It's kicking me places I'd forgotten about.
#
[LewisCowles]
❤ to all the DIY & NIH
[asuh] joined the channel
#
jacky
[LewisCowles]: haha, it's kind of exciting tbh
#
jacky
going from idea to functional thing every other day
[jeremycherfas] joined the channel
#
[jeremycherfas]
That could be handy. Thanks.
SpencerDub, [fluffy], [chrisaldrich], [xavierroy], cweiske, jjuran, uniquerockrz, strugee, [KevinMarks], [jeremycherfas], hs0ucy, [jgmac1106], KartikPrabhu, [datashaman] and [Jeff_Hawkins] joined the channel; nickodd and petermolnar left the channel
#
[jgmac1106]
is this true?: Tunes supports feeds that start with “https://”, but only from eight popular SSL certificate providers. If this feed uses HTTPS, this tests whether it uses a compatible certificate provider.
#
[jgmac1106]
• This feed uses the SSL certificate authority “*Google Trust Services*”, which is not compatible with iTunes.
hs0ucy joined the channel
#
[jgmac1106]
works on android enough for me,
#
aaronpk
Yea apple is not the best at http stuff
#
sknebel
they don't seem to have the list of accepted CAs in their documentation anymore though
#
sknebel
so maybe it's outdated
#
aaronpk
they tend to go way far on the “secure” spectrum often at the cost of using well accepted methods
KartikPrabhu joined the channel
#
aaronpk
oh no! indigenous isn’t in the app store anymore so i can’t get it on my ipad!
#
aaronpk
i didn’t realize how much it’s become baked in to my workflow
#
sknebel
time to dig out the developer account and thank Apple they made sideloading just as uncomforable as possible, not impossible? :P
KartikPrabhu joined the channel
#
@kevinmarks
↩️ Well, you can keep up with them via http://brid.gy (though not the only on Facebook ones as their api is only for exploitation, not for users)
(twitter.com/_/status/1233049542343450626)
#
aaronpk
ugh i guess so haha
#
aaronpk
i could publish it back to the app store on my developer account if that would help [eddie]
garrettw, [Jeff_Hawkins] and [jeremycherfas] joined the channel
#
[jeremycherfas]
Hey [aaronpk] When Overland sends a trip notice to a micropub, what is the payload? Is is just the entire trip {} blob? I’m thinking of setting up something to receive only that.
#
aaronpk
hm I don't remember actually
#
aaronpk
Oh right
[LewisCowles] joined the channel
#
aaronpk
so overland includes a start and end timestamp in the location update along with the rest of the normal properties
#
aaronpk
Compass sees that and then goes and looks up the JSON data for the whole trip, and sends that via micropub
#
aaronpk
Overland doesn't do micropub, and also has no concept of history really
#
[jeremycherfas]
Oh yeah; my mistake. I’m always confusing Compass and Overland in my head.
#
[jeremycherfas]
So it sends all the points for the trip, along with modality etc.
#
aaronpk
yeah, i think it sends it in a file upload
gRegorLove, [snarfed], geoffo, KartikPrabhu, SpencerDub, [Michael_Beckwit, [LewisCowles] and [jgmac1106] joined the channel
#
GWG
Trips are the issue I have on Android
#
sknebel
Zegnat: e.g. there's the NIST randomness beacon: https://beacon.nist.gov/home, but I'm fairly sure you can also construct something useful that doesn't need external parties at all to get random numbers
#
Zegnat
I was thinking if you want to webmention me with the move you are making your pokemon use, something needs to decide whether it hits or not. And neither me or you are trusted enough to decide it ourselves as that would easily allow for cheating.
#
Zegnat
Although I do not know about beacon, are those verifiable random numbers?
#
sknebel
NIST publishes a sequence of random numbers. so you could say "lets use the NIST beacon broadcast in 5 minutes"
#
Zegnat
Ah, yep, I have looked into that at some point, must have forgotten it was called beacon
#
sknebel
or you can do hash-based things
#
Zegnat
The problem with that one is the wait times I guess? E.g. you do an attack, then we need to wait for the number to see the result of it before I can make my move?
#
takev[m]
We could do that. Or just ping some sort of service that can do a webmention.
#
sknebel
sure, that works too :D
#
takev[m]
One issue I can think of is hidden information. Part of the strategy comes from both players selecting a move at the same time. So there needs to be a way to hide that information until the turn is executed.
#
sknebel
one way to "roll dice" with hashes: I publish a hash of some secret data. You say "I attack, random number decides if valid. Here's a random string of my choosing". I combine your string with my secret data, generate a result from that, reply "you lost. Here's my secret data, so you can verify you really lost"
#
Zegnat
The service may have a post that is the start signal. Only after receiving a reply from both parties will the service show and update the results
#
takev[m]
https://indieweb.org/Private-Webmention <-- Perhaps this could be good for hidden information?
#
aaronpk
it sounds like it requires a third party to coordinate things
#
Zegnat
Yes. Or really any /unlisted post could work. As long as you only mention the third party you do not really need to protect the page any further than from casual browsing finding it
#
aaronpk
or maybe there's way to do it with cryptography? can two people publish something that can only be unlocked after both people publish it? heh
#
sknebel
hashes can also precommit
#
takev[m]
I like the cut of your jib.
#
aaronpk
ah that's probably simpler
#
takev[m]
Yeah, I'm thinking hashes are the way to go.
#
sknebel
if you publish a hash it commits you to revealing a matching plaintext later
#
Zegnat
Yes, I can commit to what move I want to make. But that does not solve whether my move will actually hit/miss/be critical. I still need random there.
#
Zegnat
(As we are specifically talking Pokémon battles.)
#
sknebel
see above for that
#
takev[m]
sknebel: Yeah, I think that would work.
#
sknebel
combine a seed from you and a seed from your opponent to generate randomness
#
sknebel
your seed is committed (because you published a hash of it) but private before you reveal it (so the player going second can't create a seed that gives them the result they want)
#
sknebel
revealing it allows the opponent to check you didn't cheat
#
Zegnat
Aah. You would go “I will use data with hash(x) to decide whether your attack hit me.” Then I say “please add y to it”. Then the response is “the original data x + y gives a result if z”
#
Zegnat
That would work, yeah :)
#
takev[m]
How do we turn it into a 1-100 number?
KartikPrabhu joined the channel
#
Zegnat
You can just put x+y into any PRNG
#
takev[m]
So we need to agree on a PRNG ahead of time?
#
sknebel
yes, the algorithm needs to be agreed on
#
sknebel
(otherwise you could tweak the algorithm to give you the result you want :))
#
Zegnat
Although if PRNGs are too hard, almost anything can work. takeFirstByte(md5(x+y)) could be your algorithm. It does not really matter.
#
takev[m]
Should the hash for the PRNG be the same as the hash of the move?
#
takev[m]
In theory, since you are using both, then it shouldn't matter as you don't know the other's move.
#
takev[m]
But I don't know enough about hashes to argue one way or another.
#
sknebel
you'd always want some secret randomly choosen thing in there I guess so the other can't guess what the value is
#
Zegnat
First thought would be not to mix them
#
takev[m]
Actually, one issue is that if both players use the same move twice in a row, we'll get the same results both times. So a third piece of information would be good. Maybe turn number?
#
takev[m]
Er, yeah, my client didn't load your comments.
#
Zegnat
Turn number is already known by both players, so that does not help
#
takev[m]
Okay, so both players generate a random hash. When they exchange moves, they also send that hash. Once both are obtained, they combine the two in a PRNG and generate random numbers in the order dictated by speed and priority?
#
Zegnat
By the end of the conversation all secrets have been made public so all earlier made claims can be checked by both parties
#
takev[m]
(Obviously, a bot or service could make this smoother, but in theory everything can be done manually)
#
Zegnat
The example conversation only discussed hit/miss, but of course multiple random results can be pulled
#
Zegnat
sknebel: does that exchange look right to you? It is a little tricky to make sure you do not show secrets too early
swentel joined the channel
#
Zegnat
5 messages is as concise as my current brain can make it. But I am a bit woozy after 36ish hours of little food and little sleep, he
#
sknebel
yeah, looks right
#
takev[m]
The algorithm would probably be: For each pokemon, generate 1-N numbers. Assign them by speed and other factors. So, say we have a battle, and I've got a Pikachu and Zegnat has a Eevee. Eevee is faster. We generate 4 numbers, the first is chance to hit for Eevee, second is chance to crit for Eevee, third is chance to hit for Pikachu, fourth is chance to crit.
#
takev[m]
I need a whiteboard. :P
#
sknebel
(of course we have the entire social layer of "what does happen if you edit your post and then complain I didn't use the right secret" still. Sprinkle signatures on top? :P)
#
Zegnat
I guess that means both players first announce their move commits and the hashes of their secrets. Then both announce their secrets. And then the secrets are combined into a PRNG for x rolls? takev[m]
#
Zegnat
That might make more sense than my example exchange where both players need to generate rolls
#
sknebel
true, if it's simultanous turns that's more like it
#
Zegnat
sknebel: surely I then need a third party to sign those again? :P
#
Zegnat
sknebel: yeah, in Pokémon the moves only resolve once both parties have picked their move.
#
takev[m]
sknebel: I'm less concerned with cheating. I think this is more of a proof of concept of what is possible. :P
#
takev[m]
Zegnat: That looks good to me!
#
sknebel
Zegnat: no, you sign your post. I keep a copy and can show all your (nerdy enough...) friends that you posted that and then claimed you didn't, you cheat :P
#
Zegnat
Aah, I guess that could work :P
#
takev[m]
Yeah, since we are sending via Webmention, we are archiving a copy of the original post.
#
Zegnat
Though I would claim that public key was never mine to begin with, sknebel! :P
KartikPrabhu joined the channel
#
sknebel
there is a metaphor or two about web of trust in here, but I'm too tired for that
#
Zegnat
(This will devolve into writing the moves onto pieces of dated newspaper and photographing it next to my face, I guess)
#
takev[m]
Let's just focus on a scenario where both players are playing in good faith.
#
Zegnat
(I do have access to plenty of newspapers daily. Hmmmmm…)
#
sknebel
agreed, let's ignore that side path
#
Zegnat
So for every move it will be 2 messages for each player, and then one message from anyone (either one of the players or a helper) with “dice rolls”
#
Zegnat
1. commit secret and move, 2. reveal secret and move after both players have committed, 3. roll
#
takev[m]
Okay, so we sign the moves and send the signature to verify that we've committed. Once both players have committed, we can generate hashes and send them to each other at the same time as we send the plaintext post. From there, we can calculate what has happened.
[Jeff_Hawkins] joined the channel
#
takev[m]
Maybe we send the current status (HP/Effect/Fainted) of our team to each other in order to verify that we've finished, and the next turn can start.
#
Zegnat
You would send a hashed move (so it is blind for the other player) and the hash of your secret in the first message. Then the second message is both your move and your secret in the clear. Roll will be based on combining both clearsecrets.
#
takev[m]
That's probably easier.
#
takev[m]
Oh, one other thing. Your team is supposed to be a secretish. Like, they can know what the party is, but not really the items and stats. So perhaps at the start of the battle we send a hash of the party?
#
sknebel
would do it, yeah
#
takev[m]
We should record this discussion.
#
Zegnat
This entire discussion is logged on chat.indieweb.org/dev :)
#
takev[m]
Oh, nice.
#
Zegnat
So in that conversation the role of Oak could be anyone really, since it is just the generation of dice rolls
#
takev[m]
Oh good, that's far simpler than what I had in mind. I was thinking of doubles this entire time.
#
takev[m]
I think we just need to figure out how to mark this up, and we might be able to give it a spin soon.
#
Zegnat
Again, I may have stumbled somewhere, I am super tired, but I *think* that flow is secret enough to work.
#
takev[m]
I think with good faith actors, and a limited move set, then absolutely.
#
takev[m]
(I'm discounting things that hit a variable number of times, at the moment)
#
Zegnat
Honestly if you get it to work in plaintext first, you already have it working. You can then even do it cross-network with people who cannot add full mf2 markup anywhere.
#
Zegnat
takev[m]: one of the dice rolls could decide variable number of times. I do not remember the math on those moves though. Is it an equal distribution?
#
takev[m]
I'd have to look it up.
#
Zegnat
If you are as likely to get 1 hit as you are to get 5 hits, you can just take any of the dice and mod 5, or something
#
takev[m]
It gets complex in that each of those can crit as well. Hence why for the first trial, I'd like to avoid them.
#
Zegnat
This is why chess works very well when written out, and games like this get harder because people added rules that are only easy for computers :P
#
takev[m]
Yeah, certainly not doing this because it's efficent. :P
#
takev[m]
It's just cool.
#
takev[m]
who is Zegnat
#
Loqi
Martijn van der Ven is a long-time web tinkerer living in Sweden (CEST or Europe/Stockholm timezone). Pronouns: he or they https://indieweb.org/User:Vanderven.se/martijn/
#
takev[m]
Zegnat: I'm gonna create an event to try this out.
#
Zegnat
Sounds fun! Keep me in the loop. I am now going to grab a book and a blanket and try to catch some Zzzs
#
Zegnat
Thanks for the discussion all!
[Michael_Beckwit, [yo], geoffo, davepeck, KartikPrabhu and gRegorLove joined the channel
#
jacky
re: oauth + shade
#
jacky
I'm working on that incidently for $work and doing provider logic is not bad at all
[jgmac1106] joined the channel
#
[jgmac1106]
gRegorLove yeah just add an input field checkbox to syndicate to https://indieweb.xyz/en/bookclub/ though be cool if kickscondor added a way to sort by p-name or indiebookclub had option for a read post or h-review
#
gRegorLove
[jgmac1106], re: indiebookclub and syndication, if a micropub endpoint listed indieweb.xyz as a syndicate-to destination, IBC could show that as a checkbox...
#
gRegorLove
then if that box was checked, it would send an mp-syndicate-to command to your site. your site would need to handle the actual syndication.
#
[jgmac1106]
Ooh neat idea
#
Loqi
[gRegorLove] #15 Add micropub support for syndicate-to
#
gRegorLove
That's standard micropub, I can't claim any creative credit there :)
#
[jgmac1106]
... I still have to use telegraph. Known (and my Domain even less) do not recognize syndication endpoints
#
gRegorLove
Does anyone list indieweb.xyz as a syndicate-to in micropub?
#
gRegorLove
Disregard that, I guess it doesn't matter... simplest implementation is to list "[ ] syndicate to [name]" based on what the mp endpoint returns, don't need a pre-defined list.