« first day (2498 days earlier)      last day (2676 days later) » 

13:03
@Duikboot wouldn't it just be id and not dish_id?
zrange key 0 -1 is so much faster than zscan 0
Negative :(
nevermind, I see it now
I dunno
Dammit in my head it's easy the operation that should be executed. But writing it down is hard in the SQL Query.
> The concept of forward secrecy is simple: client and server negotiate a key that never hits the wire...
What is wire?
13:10
@Duikboot It's Friday, so all you need is SELECT Drink, Rebecca FROM Fridge LEFT JOIN Rebecca ON 1 = 1 ORDER BY AlcoholByVolume DESC
4
hahahaha :D
@Tiffany The thing in between client and server
@DaveRandom E_NOT_ENOUGH_REBECCA
I first want to solve this thing :D
@PeeHaa how is that possible? I guess I need to look up forward secrecy?
13:11
Hahaha
I think there was some ELI5 image somewhere with mixing paint
Might be pulling it out of my ass though
@PeeHaa I found this which seems to explain it a bit better. Still a bit lost on it, but it makes better sense now.
Watch the entire thing btw if you want :)
yeah, I started it at the beginning
It gives a decent simplified overview of some stuff you have been doing the last days
13:21
thanks :)
Dayum this breaks my head :D
wow, it's so simple, but makes so much sense
the colors really help illustrate it
@Tiffany I know right
>< kopy.io/sYlW3 . ( IS where I am now at )
13:28
@PeeHaa I had a "woah! cool!" moment
I don't think it's the joins part because I retrieve that data. It' about grouping and SUM
Good :-)
Good... I feel like a I just woke up and I stil haven't accomplished anything :D kopy.io/PsSJp > <
Was a reply to tiffany :P
You are doing SQL and it's waaay too friday for doing sql
@Duikboot what are you trying to achieve?
13:31
Yeh, wait until Saturday for that
The example at the bottom. I want to get the sum of registered dishes.
@Duikboot ugh, please enable ONLY_FULL_GROUP_BY
Isn't that the default by now?
I seem to remember something regarding that
maybe, but he seems to have SELECT * in an aggregate query
in fact, just generally don't SELECT * as well
I am agree
13:36
OK
just finished the video, that was awesome :D
SELECT reservations.id, Sum(Cast(dish_reservation.amount AS INT)) AS total_amount
FROM reservations
INNER JOIN dish_reservation ON reservations.id = dish_reservation.reservation_id
GROUP BY reservations.id;
Without reading the transcript I'm guessing that's what you want
Anonymous
@Tiffany was it a video of me?
Possibly with a nested query to join dish_reservation back on and get the rest of the data from those rows
13:39
does Cast() work in RetardSQL?
o m g
@littlepootis dammit
a split second before I clicked it I was like "it can't be..." and it was
@DaveRandom It probably needs something like COAST instead
I take 5 minutes brake an checking the query to learnit: kopy.io/tHLap . that works btw
:D oO
thanks a lot!
@Duikboot seriously, enable ONLY_FULL_GROUP_BY and don't ever SELECT *
MySQL's weirdo thing where it lets you do that is a big part of the reason why I struggled for so long to understand aggregation
13:41
@JayIsTooCommon explained the Diffie-Hellman Exchange, which is really cool
once you stop using a thing that incomprehensibly violates the rules of logic it's simple
Anonymous
@Tiffany .. so, not a video of me?
@JayIsTooCommon do you have one?
Anonymous
@PeeHaa does
It's true
13:48
@DaveRandom I've been learning SQL wrong
@Tiffany install postgres, climb the steep but managable learning curve and never look back
or pay for MSSQL -_-
SQL Server is a decent RDBMS, despite what a lot of people will tell you
it sucks in combination with PHP though
Chris loves it. That's all I need to know
you guys ask novices too much. @Tiffany mysql works for the most part. if used correctly it's even fast
13:51
Also Marco's head will explode if he comes in while that is still on the screen
don't change it unless you have a reason to do so
@WesStark Speed is not the issue (mostly)
@DaveRandom Last time I used them together, you help me make them play together IIRC
@WesStark Postgres is something I want to learn at some point. Probably won't switch to it at work, but I'd like to understand it.
@IROEGBU yeh you can do it, in fact I do it regularly, but I don't enjoy it in comparison to C#
13:53
my knowledge of SQL has come from our ERP's codebase which sometimes uses SELECT *, parts of the ERP is written in PL/SQL
@DaveRandom Thanks a lot!!!!
Morning.
Morning levi
morning levi
trying to extent it now by adding the nam of the dish as well.
13:54
anyway, I gotta go train someone... cryptography will be put on hold :(
@Tiffany The main problem with SELECT *, btw, is that code can randomly break in unexpected ways when the schema is modified - e.g. you add a column to a table, somewhere there's a query which does SELECT * and iterates each row, expecting there to be only certain columns in the result set but not actually checking, suddenly you are leaking private data, or worse
@DaveRandom Selecting the dish.name does mean I have to add another inner join and I have to SELECT that specific field in the select part. Because else I am doing bad stuff because I do SELECT *
Imo the fact that you have no idea what it is doing when looking at it tomorrow is a much bigger one
YMMV IAMADBA
@Duikboot I'm not sure that this operation makes logical sense. You have a reservation which has multiple dishes associated with it. You are getting the total amount (an aggregate operation) but you are also getting individual dish records. If you keep the aggregate, which dish record are you getting? There's more than one...
13:58
TL;DR use two queries
if you remove/expand the aggregate, the total amount will appear for more than one row
@PeeHaa well maybe, or maybe just sum the amount in PHP...
Same difference :)
or you can have a column with the total that appears in each row, it's not invalid, but it can make the code that handles the result set more complex
and it will also make the query more complex
because MySQL doesn't have window functions
/cc @WesStark
.@Schwarzenegger has a blunt message for Nazis. https://t.co/HAbnejahtl
14:07
OK GREAT
but problem is encodeURIComponent method convert {value} in to this :%7Bvalue%7
then my url becomes like this : /root/delete/id?id1=%7Bvalue%7
Why this is happening?
because that's how URI encoding works?
why is that a problem?
... :P
Actually i am not sure whether above url is valid or not
> I passed my value through encodeURIComponent() and now my URI component is encoded. Why?
:-P
@Learning it is
!!? percent encoding
14:11
Search for "percent encoding" (https://www.google.com/search?q=percent+encoding&lr=lang_en)
• Percent-encoding - Wikipedia - Percent-encoding, also known as URL encoding, is a mechanism for encoding information in a Uniform… (https://en.wikipedia.org/wiki/Percent-encoding)
• URL Encode Decode - URL Percent Encoding and Deco… - Enter text to URL encode or decode. Converts the text into a percent encoded string. (http://www.url-encode-decode.com/)
• HTML URL Encoding Reference - W3 Schools - URL Encoding (Percent Encoding). URLs can only be sent over the Internet using the ASCII character-… (
The google plugin should strip W3schools results
god damn it
Anonymous
@DaveRandom censorship.
this is not a fucking democracy
Anonymous
14:12
Mr Kim Un Random
@DaveRandom previously i was doing looping and was constructing url on my own without using that method encodeURIComponent
But 1 user pointed out that i should use that method for url
Am i doing right sir?
you should encode the key as well
actually @Learning you should probably just use one of the 10 bajillion existing implementations, like stackoverflow.com/a/1714899/889949
it's pretty insane that JS doesn't have a built-in thing to do that
@kelunik Yeah, that sounds good and would probably be easier.
Morning.
@Ocramius re: https://www.reddit.com/r/PHP/comments/6tzo69/laravels_tap_as_a_separate_package/dlp0ghh/

You need to read the referenced article, https://mattstauffer.co/blog/introducing-laravels-tap-higher-order-tap-and-collection-tap
> Remember also that Taylor and Adam Wathan are the ones who originally popularized tap()—think of their influences and values.
1) Add complexity
2) Add latency
3) HYPE HYPE HYPE
14:27
is it just me, or is that a tool for making code more confusing for zero gain?
My favourite part of the argument for it is "removing the use of temporary variables", by adding at least 2 fcalls (and pssst, there's still temporary variables under the hood, let opcache do it's job)
ok good just checking I'm not missing something
1 min ago, by DaveRandom
is it just me, or is that a tool for making code more confusing for zero gain?
the name seems... odd
Did you mean Laravel or just this function?
Yes to both
14:30
@Leigh :-P
Don't forget, less lines of code makes your code better
sure, I always minify my PHP
I have occasionally idly wondered what the memory impact of minifying PHP code would be actually
not because I actually want to do it ofc, just academically
Assuming opcache on, on first pass of each file only
are e.g. object members stored in a HT with the full member name for each object? I assume no but never looked
After that no compilation, so minification has zero benefit
14:37
Is "for" redundant in this sentence?
> So everybody knows what's in that letter except for me
@Shafizadeh Eh, I'm not sure what the "official" stance is, but both ways are perfectly acceptable to me
What I mean is more whether there is a difference between when I do $obj->prop and $prop = 'prop'; $obj->$prop; (Assuming that $prop came from somewhere else where no static analysis optimisations are possible)
@Leigh ah ok thx
Are Apache server related Q's accepted here?
2
Q: Except (for) me

EiliaDespite several posts around preposition for except, such as this and this one, I'm still not sure if I understand how to use it correctly. In fact, following sentence (part of a song) has confused me. In fact you can keep everything, yeah, yeah, Except for me. I think the sentence could st...

14:40
like does the object carry around a HT of name => value or does name get looked up in the ce and then translate to e.g. a plain array in the object
@Leigh oh, exactly my question. thx
@hello if you must
I warn you now, this is likely to end with me telling you to use nginx instead
@DaveRandom Adding user to Apache group or give write access to httpd.conf file to a user? Which is a better practice?
@hello Use nginx instead
@DaveRandom denied!
@Leigh LOL. That was quick.
14:43
@Trowski both are easy enough, but CF is free and scales.
@hello define "user". Is this an account for running some other app or an actual person?
@DaveRandom Actual person
OK, can you expand on what you are doing? Like is this just enabling server administrators to administer the server?
@kelunik Yep. I've never used CloudFare, so if you'd like to set something up just let me know where to point the DNS.
In general I prefer to keep stuff like that restricted to people who can sudo anyway, in which case set it to 644 owned by root
14:45
Does "break a leg" mean "I hope you have a good presentation" ?
ok thx
!!? "break a leg" meaning
Search for ""break a leg" meaning" (https://www.google.com/search?q=%22break+a+leg%22+meaning&lr=lang_en)
• Break a leg - Wikipedia - "Break a leg" is an idiom in theatre used to wish a performer "good luck" in an ironic way. …. From… (https://en.wikipedia.org/wiki/Break_a_leg)
• Urban Dictionary: break a leg - One side has the word, one side has the definition. Microwave and dishwasher safe. Lotsa space for… (http://www.urbandictionary.com/define.php?term=break%20a%20leg)
• 'Break a leg' - the meaning and origin of this ph… - Meaning. Said to actors for good luck before they go on stage, e
tl;dr theatre people are superstitious to the point where they think that wishing someone good luck is bad luck
14:49
@DaveRandom Basically administer the server. I also have sudo, but do not wish to keep sudoing in and out each time I need to make slight config changes.
@IROEGBU thx
Not to be confused with "I'll break your legs"
@hello sudoing in and out?.... sudo vim /path/to/config. Be specific with your actions
@hello well if you don't want to sudo, I would create a group specifically for this purpose (httpd_admins or something) and chown root.apache_admins httpd.conf; chmod 664 httpd.conf
Does "take care of him" means "kill him" ?
@Shafizadeh It depends how you say it
14:56
@DaveRandom Nice. Thanks
@Leigh I read it - it's bullshit.
@Leigh ah ok
@Shafizadeh For example "I'll take care of this problem" = "I'll make this problem go away".
@Leigh "I will murder this problem"
No :p
Hooray for English \o/
14:59
@Leigh yeah got it, I know what it means, but now I'm watching a criminal movie. In this video, it means "killing"
"I will take care of this vase" != "I will kill this vase"
I will take care packages from the homeless...
@DaveRandom take care of yourself
In the good way, please, jokes aside you're huggable
I'm kinda bony tbh
15:02
And your hair smells different when you're awake
When I'm falling asleep there's a third smell
@DaveRandom you mean "bunny" ?
ahaha
DaveRabbit
@DaveRandom bony... tmi
15:04
What the actual fuck :P
lol at FIPO
First In, Pants Out?
Close. Fist*
I won't say what I was going to as I'm pretty sure it will get flagged
and that is really saying something
:D
Flags should just be disabled on fridays
And / or we should close chat on friday
FIFO == Friday In, Flags Out
15:07
:P
Gahd I just love remi
unrelated :D
Fabor In Penis Outrage
4
@DaveRandom I understand the query now and I would like to extend it a little by adding a parameter ( where ) . I would like to keep the same selection but I want to have a where clause on the ''reservation_date" field which is in reservations ( reservations.reservation_date. Is that possible? kopy.io/yqaBU .
Which means I minimize my result set by filtering on that field.
yes, the WHERE is evaluated before the GROUP BY
And also in the select: reservations.reservation_date ? ( . kopy.io/UrstY .)
you can just GROUP BY reservations.id, reservations.reservation_date if you want to include reservation_date in the output list
15:14
So B ?
:)
pro-tip: try it :-P
Seems to work nice <3 for DaveRandom.
have you enabled ONLY_FULL_GROUP_BY yet?
that will cause it to error if you do something wrong
OK cool, well in that case if you do something wrong now it will blow up in your face so it will be easy to tell
15:17
OK TOP! Thanks
it's also worth (IMO) enabling the ANSI_QUOTES mode
which changes the behaviour of double quotes to SQL standard
i.e. " becomes the same as `
this stuff allows you to write SQL that is more portable, but since no-one ever actually does that the real point is to help foster good practices
basically you should make your RDBMS as picky as possible/reasonable because that will make it a lot easier for you to start working with another RDBMS at some point in the future when you start working for some company that uses one
Does a http redirect need to have absolute path?
@NikiC did you have a patch for mt_rand (or intend to write one), or should I do it?
oh that's nice
true indeed! Thanks dave!
@Danack 2616 said yes, 7231 says no
> The field value consists of a single absolute URI. (2616)
15:24
Dammit, I need to extends the query again to grab the names of the dishes instead of the id's.
> The field value consists of a single URI-reference. When it has the form of a relative reference, the final value is computed by resolving it against the effective request URI (7231)
( Trying to load them ito a chart-JS chart ) (Now I get fcourse ) "[{"reservation_date":"ZON_A","id":1,"total_amount":"7"},{"reservation_date":"ZO‌​N_A","id":2,"total_amount":"9"}]"
basically 723x is a rewrite of 2616 that reflects what things actually implement @Danack, so it should be safe to use relative
@Duikboot it's OK to do more than one query, you know
MORNIGNS, AND EVENINGS O/
@DaveRandom given that I'm in a room with people who aren't complete idiots, any ideas how we've managed to screw up a varnish config to make it be in a redirect loop 'sometimes'.
e.g. curl doesn't suffer the problem, a browser does.
It also magically starts working about 20 minutes after the problem occurs.
15:35
have you managed to inspect the value of the Location header that's being sent out? (assuming this is a transient/heisenbug)
I'm not particularly familiar with varnish, more than the very basic stuff
is it possible that you are sending 304s with a location header?
I can imagine that browsers might respect the presence of a location header over the response code, whereas curl might not
totally just pulling stuff out of thin air there though
we were using 301, but changed to 307 to see if that made any difference.
> have you managed to inspect the value of the Location header that's being sent out?
We have geo location lookup setup. It should be redirecting:
@Danack well one notable difference there is that a browser will persist the 301 but curl won't
I can also imagine that a browser would eventually throw out the persisted 301 after n failures
again, no real basis for that though
example.com/ - which hits varnish to redirect to
example.com/?geo_country=gb - which should be passed to the backend.

Instead the 2nd request gets the exact same response as the first request...
@Danack is the geoloc just based on IP address or is it doing any magic with request headers?
> persist the 301
what does this mean?
I read about Keep-Alive, which makes sense, but I don't think it's related to this.
15:45
As in the browser will remember that it received a permanent redirect for that URI and it will just request the new target next time, without requesting the original URI first
@Tiffany Maybe reinforcing that 301 is permanent?
whereas curl doesn't persist that data anywhere, it will just request the original URI again
ahhhh
I really need to come up with a different "I get it now" response
@DaveRandom Extended the stuff by doing: kopy.io which gives me the expected resultset.
@Tiffany How about run screaming through your office to the nearest fountain and jump into it?
if you choose this, please video it
15:48
I have a list of cipher suites, and several of the cipher suites are suffixed with _P384 or _P256, what does this mean? haven't been able to find anything about it
@DaveRandom we actually have a fountain outside...
somehow I think it will end poorly... like me in a straight jacket
or you could get one of those kids party things that you blow and the thing unfurls and then it makes a noise
maybe a paper party hat
and streamers, you need streamers
why do I need these again?
I might come into the office like that one day and see if anyone says anything
@Tiffany understanding of a thing should be celebrated
hurray!
15:50
evening room
Is the following code safe:
            if(isset($_GET["forward"])) {
                header("Location: " . $_GET["forward"]);
            }
I mean you can do header injections
@Tiffany I imagine key size, have you got one of the full strings?
But not like it matters that much
@sweg_yolo_69 Obviously not
But what can you inject into headers that is malicious?
15:52
Any random url
So, if the user wants to get redirected to a random url he can do so
@DaveRandom TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384_P384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256_P384, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P256 just pulled a few out of the list, they are not in this order
@PeeHaa dunno, if someone can maliciously inject stuff into the query string they can just send the user somewhere else directly
user / malicious person
:p
15:53
@DaveRandom huh? Not sure if you are agreeing with me or not :P
Oh I see what you are saying
No no no no
Open redirects are used by malicious actors to hide their malicious urls
But isn't the only person that can inject something malicious into the query string the user himself?
Somebody may click on stackoverflow.com, but not on drivebyvirusdownload.com
@sweg_yolo_69 Of course not
What's preventing me from dumping the url on the web?
cryptography is fun! \o/
hi
is RegexBuddy software something that would be good to have?
should I buy it?
Another angle might be a phishing attack
15:56
@PeeHaa Don't really understand "What's preventing me from dumping the url on the web?"
1 min ago, by PeeHaa
Somebody may click on https://stackoverflow.com, but not on https://drivebyvirusdownload.com
I just shared two links
What is preventing you from clicking on it?
@DaveRandom just IP.
the fact that I know it's not gonna redirect me to manhub.com
As you can see I crafted the URL. not the user
I see what you mean
15:57
@PeeHaa laziness :P
:)
Also stuff like safe browsing may kick in when your site redirects to crap
Not 100% about that one
bitly links scare me
@Tiffany it seems to identify the curve used, they seem to be somewhat arbitrary identifiers referring to NIST specs about some mathematics I do not understand.
@PeeHaa oh right
@DaveRandom thanks

« first day (2498 days earlier)      last day (2676 days later) »