« first day (5 days earlier)      last day (629 days later) » 

01:09
btw I made a PR for travis: github.com/Mego/PPCG-v2/pull/17
 
2 hours later…
03:09
Are we using this: pythonhosted.org/Flask-OpenID for open-id?
Anonymous
@Downgoat We probably will, but we need OAuth2 first (for SE logins)
03:27
oh, I thought SE used openid
are we going to use gravatar for avatars?
how do I add a column to the DB, do I just add it to the ppcg.sql file?
@Downgoat Yep. So that you don't have to rebuild your databse, run ALTER TABLE table_name ADD column_name datatype
btw will we use an in-memory database to manage sessions? or will we use mysql
:O we can use redis
Anonymous
@Downgoat Yep
Anonymous
@Downgoat Flask will manage session data
is it ok if we use redis to store some user stuff
I need to generate a key to associate session to userid
Anonymous
03:42
That seems like overengineering
I once spent two hours trying to get GitLab to use my gravatar.
True story.
@Mego how else would I associate the two?
Anonymous
@Downgoat With the DB? users.auth_key
You're saying to store their auth_key directly in the cookie?
Anonymous
Encrypted, of course
03:43
oh, does flask do that for us?
Anonymous
Yep, automatically, even. You just need to give it an encryption key
oh ok that's nice
Anonymous
app.secret_key = whatever
ok, should I set the secret_key to random bytes generated on server-startup?
@Downgoat Wouldn't that cause everything to be lost everytime there's maintenence and we take the server down
03:46
yeah, that's the downside
well not everything, only sessions
Hopefully our site doesn't go down as often as SO does wen you're nearing a deadline.
I think next on our priority list should be getting ORM and models going so we can effectively communicate between DB and rest of app
I have 0 idea how SQLAlchemy and all works though
google says to have flask's session just contain a meaningless session_id, and store important information on backend, should we do that or is secret_key enoguh
for front end are we OK with vanilla js + babel or do we want framework
Anonymous
@Downgoat That could work. We'd have to associate the session ID with the user in the DB, and be able to update it somehow...
Anonymous
@Downgoat Vanilla + Babel is fine. We could use jQuery if we had a reason to.
Can we also use react :3
03:59
We should aim to minimize the amount of javascript needed.
Make the page load faster
:( ok so no react
If the site is basically usable with JavaScript turned off, mission acomplished.
though if we want to have things like drop-downs that needs JavaScript
I was planning you click "Log In" and it'll give you a modal rather than opening an entier new page
Anonymous
@Downgoat Dropdowns can be done in pure CSS+HTML
Anonymous
But JS makes it cleaner
Anonymous
04:04
We should definitely try to support noscript as much as possible
@Mego we will have to have hidden checkboxes and be buggy on mobile (beacuse responsive layout) though
Anonymous
True... A good mobile experience will put us way ahead of SE :P
We could also have a desktop app powered by electron.
can't tell if serious or sarcastic >_<
@Downgoat Kinda both? When I said it it was sarcastic but then I realized I want that to be a thing and electron is the only feasible way for that to happen.
04:19
can anyone figure out how to use babel with flask
it seems like a pretty common pattern
but all resources on interwebs seem to not show how they are compiled
that is unfortunately a different thing named babel, that babel is for internationalization/language translation
Ah
04:53
ok i made my own plugin :P
Nice
Why is github detecting our project to be half PLpgSQL?
@Mego you know how some Github readmes have a little fancy widget that indicated something like TravisCI Build: Passing? How do we do that?
@Pavel beacuse of giant ppcg.sql file
@Downgoat Right but it didn't detect it before
@Pavel [![Build Status](https://travis-ci.org/Mego/PPCG-v2.svg?branch=master)](https://travis-ci‌​.org/Mego/PPCG-v2)
Also it isn't PLpgSQL
@Downgoat Ty
Anonymous
05:08
@Pavel It got picked up when I added views
Huh
Wonder why that happened
Anonymous
Idk GitHub's lang detection is weird
I remember one time I used a tool on my code to generate docs. The docs took over and made my 100% Java project a 97% HTML project.
Anonymous
That's why you push a doc-generating script and use readthedocs
The Linux kernel is 96% C, but they managed to stick some C++ and Objective-C in there too. Somehow Perl got in.
Anonymous
05:12
@Pavel Perl is probably build scripts, Objective-C is probably misdetected C
05:25
:D ok 1 hour later I think browserify plugin is working :D
05:43
@Mego would you know why this tempalte errors:
{% if g.user is not None %}
<div>
    <div class="button accent"><a>Login</a></div>
</div>
{% else %}
{% endif %}
jinja2.exceptions.TemplateAssertionError: no test named 'None'
Anonymous
@Downgoat none is lowercase in jinja
Anonymous
It doesn't make a whole lot of sense
@Mego Isn't it specifically a Python template language?
Anonymous
I'm guessing there's some obscure parsing reason why it's not None
Anonymous
Or maybe Jinja just really hates titlecase
05:47
@Downgoat <a href> will make it so the link doesn't do anything by itself but will make it change the cursor when you mouse over it. It'll look nicer until we actually write the code for it.
I actually discovered this by accident around 5 minutes ago playing around with the f12 console
Anonymous
@Pavel I don't think the href attr is necessary for that
@Mego It's true. Try removing href in the f12 console of some <a>, the cursor will stop changing when you mouse over.
I can just do cursor: pointer in CSS
@Downgoat That sounds overkill for a temporary placeholder. The href attribute will have to be filled in at a later point anyway.
well depends if we are doing modal signin or navigate-to-new-page-then-redircet signin
05:58
I know href="javascript:void(0)" is a common idiom, but I am unsure what it is for.
Anonymous
@Downgoat Either popup or modal IMO. Popup has the benefit of being able to work with noscript.
Anonymous
@Pavel I think that's a holdover from when blank href attrs caused errors (like on IE7/8)
Does PPCGv2 support IE8?
Does PPCGv2 support IE?
Weird, I am not able to animate SVG fill
@Pavel yes
@Pavel no
do we really want to
like nobody even uses anymore
No
06:22
and IE <=9 is stupid
Is there something like Babel that works to make the entire page more compatible, not just the JS?
we do have a lot of things to do that
but IE is just that bad
SO doesn't even work on IE<=8 to my knoledge
well it might work, but not properly
Anonymous
We can just let Babel sort it out. If something doesn't work or is slow on IE, it's IE's fault.
BrowserStack is free for FOSS projects, do we want to use it?
Anonymous
Do we need it? What does it do?
06:25
@Mego Among other things, emulates every browser ever to make testing easier.
Anonymous
Could be useful
Anonymous
We should also use some sort of usability test like WAVE
Including mobile browsers, which are particularly hard to test when the website is only accessible through localhost
@Mego The have a full list of 1100 entries: browserstack.com/list-of-browsers-and-platforms?product=live
@Pavel I mean both use same rendering engine AFAIK so you can just use responsive design mode
how to open a popover without JS?
without using form elements
@Downgoat By changing it's position to something outside the viewport when it isn't visible, perhaps?
Anonymous
06:34
@Downgoat Open in new tab/window?
like how would I reveal a div when an element is clicked without JS? I think I'd need it
You know how you can do history.pushstate in order to change the URL without reloading? Is it possible to do that server-side like a kind of redirect?
19
Q: Hide Show content-list with only CSS, no javascript used

Frederic KizarI've been searching for a good trick to make a Hide/Show content or a list with only CSS and no javascript. I've managed to make this action: <!DOCTYPE html> <head> <style> #cont {display: none; } .show:focus + .hide {display: inline; } .show:focus + .hide + #cont {display:...

I added noscript because I assume a lot of things like voting, etc. will use AJAX
@Pavel oh, interesting
I pushed what I have to GH under vihanb/add-openid, if anyone else wants to take a stab code is there
 
8 hours later…
14:49
browser stack is really neat
if tests fail it will give you screenshots of the state of the system when i failed too
@Downgoat this sounds like a reason to use javascript
is this related to a user having js disabled?
@Downgoat I personally avoid modals like the plague when it's up to me. I think it's usually a shit user experience
@Mego Does it also cache sessions? We probably don't want to be going to the database on every request
@Downgoat I'm confused what you mean by this
Anonymous
@Poke Yes, session data is cached
@Mego are we thinking about scalability? what happens if we want to put 4 servers behind a load balancer? Are we going to have sticky sessions? How often do cached sessions persist information to the database
Anonymous
@Poke Let's get one server up before we start thinking about more than one
or update their cache, for that matter
okay
@Poke maybe a good spot to look into what css3 can do i guess
but then your browser support goes down a bit
worth noting that most of the top bar doesn't work on SE if javascript is disabled
@Pavel I think folks also use href="#"
Anonymous
15:15
@Poke That scrolls to the top of the page, which isn't always desired
@Mego true true but iirc you could do <a href="#" onClick="return false;"> to not jump
at that point it's not really much different than <a href="javascript:;"> though
except maybe in old versions of IE
different if you want to open the link in a new tab too
 
2 hours later…
16:54
@Mego does that mean this is not right: github.com/Mego/PPCG-v2/blob/…
I am going to use blue as theme color for now assuming everyone likes blue
 
2 hours later…
18:59
@Downgoat Blue is nice, but try to avoid the SE beta site look as much as you can
oh don't worry
19:43
what is the first oauth provider we want to add?
20:01
do we have a domain we are planning to use?
Auth needs redirect url :|
@Downgoat stack exchange? :]
@Downgoat why the face
because that means we need a domain
@Poke don't want to do SE first beacuse my SE open id is borked so I won't be able to login :P >_<
@Downgoat it should be pretty easy to update in the future. any reason not to just pick something now or use localhost?
you can use your hosts file, right?
:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD authorization worked
you already got to authorization or do you mean authentication
20:13
okay well 100% authorization and 50% authorization
cough
20:40
Pro Tip: if your code is not working, make sure you spelt the variable correctly
are you not using an ide?
@Poke I have heard tale that there are still people out there who refuse to write code in anything but vim with the syntax highlighting and all autocomplete off.
@Poke ew no
@Pavel but then you spend time trying to figure out why your code is broken
only to realize it's because you typo'd a variable name
not to mention all the other things you needlessly spend time on
@Downgoat do you just add a bunch of temporary log lines when trying to debug an issue since you don't have access to an interactive debugger?
flask seems to kill all STDOUT so it wasn't very useful
20:51
log to stderr
lulz
@Downgoat PyCharm is A) the best thing ever, and B) free.
I am doing front end part anyway rn
pycharm is too clunky for my liking
@Pavel s/PyCharm/JetBrains products/
ftfy
@Downgoat PyCharm supports frontend too.
@Poke unless you count DataGrip the rest aren't relevant to the project.
that's true but they're all pretty darn good
i've been slowly migrating off of eclipse and onto intellij for my java development
20:57
idk how to get the login screen to look more better
any idea on what else to put
@Poke The only thing that Eclipse does better than IntelliJ is that JUnit is a PITA to configure with IntelliJ.
I still have no idea what an Arquillian container is and how do I use one.
@Pavel there are some small things here and there that i like with eclipse better but idk if i just haven't found the config in intellij. for example when you change a version number of a maven dependency eclipse with automatically download it for you whereas intellij marks it red until you rebuild
@Poke There's a setting for that in IntelliJ.
any idea where
btw @Poke are you familar with SQLAlchemy
21:02
@Downgoat i've used it but i haven't personally set it up
@Poke IDK it just popped up as one of the fixes when I did alt+enter on the red dependency.
https://github.com/wrycu/DiscordCharting/blob/master/app/config.py
https://github.com/wrycu/DiscordCharting/blob/master/app/flask_app/discord_charting/controllers.py
there should be some good examples in there
@Poke The jetbrains naming scheme for public betas though. I currently have an EAP, a Nightly, a Beta, and a Preview build installed of JetBrains products.
haha nice
@Downgoat was that the kind of stuff you were looking for?
kind of. Idk anything about SQL alchemy but Mego said that's what we should use for ORM
21:13
Woah I see huge progress has been made since yesterday. Incredible job everyone
ok I have the front-end authorization part done but idk what we need to pass to backend I have some auth id but do I need to provide some provider info?
i don't think i've actually made great use of the orm part of sqlalchemy. i just have used it to abstract away raw sql
@Mr.Xcoder ikr Downgoat is like frontend wizard
ok front end login is 100% done
I also have sessions done
we just need to implement 1) DB communicate 2) endpoints
problem is idk how to do either :|
Well I guess congrats to Downgoat then :D
21:27
Right now the front end posts a JWT to /login (source) but not sure how we'd store that in a DB
oh crap forgot to finish docs
Q: Do you (currently) test the site with localhost?
@Mr.Xcoder Yes
@Mr.Xcoder yeah
I was just wondering about what it currently looks like :P
"Login" brings up a login modal and posts/tags 404
21:29
Looks very cool +1
@Downgoat We should add the Discord button in somewhere, assuming we use the same PPCG discord we already have.
oh maybe in the footer (which does not exist yet :P)
ಠ_ಠ I cannot find index.html lol
@Mr.Xcoder It's in templates/
21:32
Found it
>_< I thought you meant /index.html 404d :P
@Downgoat The same place that we put te copyright/privacy policy links is maybe not the best place for a chat link we want everyone to be able to see.
Also we should have a visible button with all the rules. We should have a single page that contains all existing consensuses and... we should have something like a meta section or smth?
@Mr.Xcoder we will put that on the side side
But IDK if that's among the current concerns. Also (for the future): Random challenge picker
21:38
Someone make ORM first then we can talk about features :P
Object-relational mapping?
Yeah models with sqlalchemy
... I hate databases (and backend in general)
My mini-apps for iOS all use Firebase xP
I hate frontend. I know how HTML CSS and JS work but I just have no idea how to put it together into making pretty things.
I like backend. Backend has no visuals.
I guess it depends on the taste
21:42
@Pavel that's not the reason to hate frontend. The reason to hate frontend is because after you finally make it look pretty you find that it doesn't work in firefox or safari or if the window is slightly wider or whathaveyou
@Poke Well, that's what BrowserStack is for.
browserstack will find the problem but it won't fix it for you
that'll take another 4 hours of random css attribute combinations
@Poke Well, that’s what Downgoat is for :P
Indeed, life would be much simpler, but indisputably more boring, if everyone used the same browser on the same platform
Unless browser wars are your idea of excitement I don't think it would be more boring.
21:45
I like fails like this one (platform wars, not browser ones)
So... does anyone want to volunteer to work on the ORM?
Definitely not me
i'll consider it but i don't have a lot of free time
so if you want it in a more timely manner you might need to jump on it yourself :\
@Mego would you be able to? (see above)
22:28
Am I pythoning right CMC golf: if not json or not ('token' in json)
@Downgoat if not json or 'token' not in json
@Downgoat if 'token' not in (json or {}) is even shorter. I assume json is a dict, if it's an array replace {} with [], if it's a string replace {} with ''.
For full golf, if'token'not in(json or{})
Actually, it doesn't matter with the last type is, since 'token' not in <any empty iterable> will always return true anyway.
22:49
codegolf.org is available for \$8
23:11
@Poke how do I connect to a MySQL databaes? The docs show like 100 different type of mysql
@Mego looks like SQLAlchemy can create tables. Would we use that then instead of the ppcg.sql?
@Downgoat Yes, that is the point.
so I can delete ppcg.sql and DROP TABLE ppcg; and then use SQL Alchemy
Well why would you drop the database
*DROP DATABASE ppcg;
@Pavel idk maybe incompatible with new format
@Downgoat Why would it be? And if it is, you can DROP and ALTER individual tables in ppcg as needed
23:18
how do you do string formatting in python3
does 'goat %s moat' % 'boat' sstill work
@Downgoat Yes.
:O I can use fstring
That is also a thing
also @Poke how do I assosiate a create_engine(...) with a Declarative
Do we want unique username?
that we we cant have imposter downgoat
Unique log-in username and id, and a display name visible to everyone that isn't necessarily unique and can be changed at will.
23:32
there is no login username we are use openid
so google/SE will handle that
Won't we eventually in the distant future have our own login system?
if that is the case then we can become an openid provider
yep
so we have three levels right (0 - user, 1 - mod, 2 - admin)?
@Downgoat Admin doesn't get additional permissions through the website, they just are able to directly access the database.
23:48
@Downgoat it has different connection strings based on what driver is being used
@Downgoat pretty sure a lot of stuff is annotation-driven. You create a Base class and then you can invoke declarative_base() from sqlalchemy
sec let me grab the docs
@Pavel oh ok

« first day (5 days earlier)      last day (629 days later) »