« first day (2019 days earlier)      last day (3157 days later) » 

15:00
@PeeHaa plus every day I spend on SO the fewer fucks I have left to give about it, and every time I visit meta the decrease is 10-fold
It's true
@JoeWatkins ugh, too much Bob now :-D
I totally missed you as they're talking all the time about the crypto-Bob :-D
I need a new name, lol
@ircmaxell I struggle to wrap my head around this sort of thing whenever I come across it. Have you got a ref that will help me understand why this is true?
@bwoebi we'll call you Alice to avoid confusion
@bwoebi How about Alice?
15:01
In probability theory, the birthday problem or birthday paradox concerns the probability that, in a set of randomly chosen people, some pair of them will have the same birthday. By the pigeonhole principle, the probability reaches 100% when the number of people reaches 367 (since there are only 366 possible birthdays, including February 29). However, 99.9% probability is reached with just 70 people, and 50% probability with 23 people. These conclusions are based on the assumption that each day of the year (except February 29) is equally probable for a birthday. While this makes for an amusing...
@PaulCrovella hey!
Can someone help me?, I'm coding for comments and I need help,if(old data!= new data) { alert("New Comments!") } else { alert("No New Comments!") }
@NikiC I lol'd
looks like the votes are in
@ircmaxell oh, this old chestnut :-)
let me try and comprehend it for like the 900th time
15:02
@DaveRandom I don't have hard numbers on it, but my guess is for that to work with such a low-entropy source as phone numbers, you would have to make hash time > 1 day
yeh that ain't gonna work :-P
@NikiC too funny … laughing hard :-D
I would attempt to increase the entropy. One way would be to use a salt, but then Alice would need to re-hash with the salt for every lookup (way too expensive)
@CharlesCraft50, what help you are exactly looking for
This is precisely the issue, they have to be precomputed because the lookup has to be done in a sane time
15:05
Doesnt anyone use mercurial here?
@EntrePrAmar If theres is a new data in table, the div will refresh using load in jquery and if not just echo No New Comments, I mean like in stackoverflow
@DaveRandom the only thing I get from that is a craving for cake ...
I did think about phonenum + postcode but that's likely to reduce the accuracy - it's likely that Bob's data set is not identical to Alice's when you start looking at pairs of fields
@JoeWatkins brb, bakery break
15:07
Get it?
@CharlesCraft50, using PHP, mysql right?
@EntrePrAmar Yes, also jquery/ajax
@DaveRandom what other fields are available?
I'd say Surname or First name + phone number would be enough to increase the entropy
that's more likely to reduce accuracy than a postcode would
@ircmaxell Okay, that instinctively sounds way too few people (23) to get to 50% so I wrote a quick script to do the math.... Today I learned....
15:09
@ircmaxell I do have surnames in the data, but there's no guarantee it's correct... probably a much higher hit rate than postcode though
@ircmaxell From what he said earlier, many of the fields may not be reliable (i,e. if Alice received a number from source 1, and source 2 had the same number with an incorrectly typed name ... ok what @DaveRandom just said... :p
Actually that's resolvable with humans as well (call centre agents can verify that correct surname is present before record is sent)
@DaveRandom even if it's correct it may not match kalzumeus.com/2010/06/17/…
@DaveRandom well, what's your tolerance for false-positives vs false negatives?
@Sara yeah, it's really weird. Math is fun
@Sara BTW: did you find a gig yet?
And the Monty Hall problem too. Fuck that statistics insanity.
15:11
@CharlesCraft50, write a server side script php script to read your comments table last row then make a ajax call under onload event or using refresh event
@ircmaxell Nope. Still fielding.
@PaulCrovella can be normalised (e.g. to lower case with all spaces stripped), will always be ascii (everyone has UK keyboards). It's imperfect but probably good enough.
@Sara is that the variable change one?
@Sara interested in NYC by any chance?
@EntrePrAmar I will try
15:12
@ircmaxell As yet unspecified, but I understand enough about that approach to be able to inform those making the decisions :-)
@ircmaxell Not inherently against it, but it's expensive and strange and not-california.
Ok /lazy, I looked, it is :p
@CharlesCraft50, if you need specific help, post your question by showing us your efforts
@Sara the monty hall problem makes more sense when you consider what your chances were of choosing poorly
https://en.wikipedia.org/wiki/Monty_Hall_problem
Wikipedia can explain it better than me.
15:13
@Sara we've got a few good roles open, if you want to do a quick phone call / hangout for a little bit to talk about that, let me know
@CharlesCraft50, glad to help u
@DaveRandom nice :)
@EntrePrAmar Thanks
@PaulCrovella Nah, I understand the reasoning behind it. It just makes me angry. Viscerally.
@ircmaxell Who's "we"?
@CharlesCraft50, you re welcome
15:14
@DaveRandom I was thinking more about points like 1-5, 7, 8, etc.
public recruiting over room 11 :-D
@bwoebi I've seen interviews happen over world of warcraft. this is positively normal.
@bwoebi yup :D
@Sara ... ser ... i ... ously?!? o____O
15:16
@bwoebi Yep. He worked for Sourceforge for like five years
@DaveRandom would we agree that if Bob was able to brute force a number Alice had, the number alone wouldn't be enough to resell it?
not surprising... you get to know people a lot over long periods of time...
(since the original concern was Alice being able to brute-force Bobs query?)
I stopped by to spam out something, that i actually think you folks might like. proifits go to jordi! madeinproduction.com/collections/composer
Already got a hoodie and a tshirt, shoo ;)
oh wait, composer
15:17
@Leigh you got the new composer thing? :p
yeah, brand new today!
is there a hoodie ?
Hi guys, I've just done the no-framework tutorial by Patrick at https://github.com/PatrickLouys/no-framework-tutorial/

What do you recommend me for a next step? Any CRUD or other tutorial that you advise?
I got the PHP 6 one
@JoeWatkins i can get one
@Leigh Yes that's not really a concern, since comparing against a complete historical list of alice's clients. Bob's data is a current prospect, alice's data is simply someone who has been interested in this at some point between now and the dawn of time.
15:18
@Leigh nice. well here's more stuff. limited edition has floppy on the back too. for fun
@PhilSturgeon literally one ? :)
@JoeWatkins lol i mean i can make one. hang about
@DaveRandom so, the idea of Alice sending a Bloom Filter to Bob could realistically work?
@PhilSturgeon are they available in 5¼-inch floppy?
@PaulCrovella yes for $100
15:19
I imagined you walking into the sweat shop and cracking a whip "a hoodie for krakjoe, now!" ...
@Leigh Googles "Bloom Filter"
@DaveRandom probabilistic way of determining if an item is in a set, but doesn't store the items themselves
I'm still working on a PoC btw
15:20
@ScottArciszewski tnx :-)
@ircmaxell yeah, I've already done that mistake … searched for nikic/fastroute, while it is nikic/fast-route :x
@ircmaxell the internet, where every mistake you ever made is played out in such slow motion, that it lasts forever :D
@Leigh then... um... yes?
@JoeWatkins eih, he owned up to it, so nothing bad there
just made me smile
15:22
yeah me too ...
3 hours ago, by DaveRandom
I think I have been overcomplicating it
half a day later :P
obviously indexing on a HMAC output will be much faster in a RDBMS
@ScottArciszewski I think you misunderstand the requirements
I love a good cat expression.
15:25
because Alice cann't know the phone number until Bob knows that Alice doesn't have it
oh, that sounds tricky
like a reverse zero-knowledge proof: proof of ignorance?
@ScottArciszewski Protocol needs to determine if an item is a member of a set without the owner of the item viewing the set, or the owner of the set knowing the item
Yea we discussed ZKPs earlier, little math heavy :p
neat squiggly characters though
@ScottArciszewski precisely
I don't know that that can be done against a realistic threat model
15:27
Well, it's not a proof of ignorance as mcuh
more prove that Alice didn't steal the info
Please please dont fight
haha
@Phoenix who's fighting?
if you asked Alice if she had a specific number, she could lie and add that number to db and say no
15:28
me and me
this is saying "we want to ask if she has the number, without giving her the number"
she doesn't have to be ignorant of it, she can lie and say she doesn't have it when she does
she ??
2 hours ago, by Florian Margaine
@DaveRandom the "proper" solution is definitely a broker that both Alice and Bob trust though...
@ircmaxell I don't think that's worth thinking about. There's no incentive for Alice to lie about that afaik
Can you guys recommend me any CRUD package that I can install with composer?
I'll run that service for a small fee
15:29
get in line
@JoeWatkins okay, I think I've now fixed the last issue left in multi-types patch
@FlorianMargaine I know, that's why it's not a proof-of-ignorance
@bwoebi you ... got rid of internals ?? :D
12
Hey, how to use plus properly? my Code: $("#cmtsLimitId").val($("#cmtsLimitId").val() + 3); cmtsLimitId value is 5, Result: 53
15:30
@JoeWatkins hahahaha… no, only the patch sadly, not fixed politics
@bwoebi I bet you didn't from my perspective ;-)
@bwoebi okay, that will have to do, for now ...
I'm inclined to agree with @FlorianMargaine here, this sounds like the minimum number of parties that can solve the problem is 3, not 2.
@ircmaxell Your feedback is always welcome … was talking about technical issues (segfaults, leaks…)
@ScottArciszewski It's one of the first things I said when I was asked the question... I've learned a lot from the ensuing discussion though, so I thank everyone a lot for chipping in :-)
user924016
user895378
@bwoebi I'm going to try it out in the next couple of weeks for a streaming video uploader thing to put videos on aws s3 ... problem is I have to emit rabbit mq events and don't have a non-blocking amqp lib
> UNHACKABILITY AND INCORRUPTIBILITY OF OPERATING SYSTEM. I CAN MAKE ANY OPERATING SYSTEM AS UNHACKABLE AND INCORRUPTIBLE OPERATING SYSTEM.
lol
so, he discovered "turn the server off and deep freeze it?"
user895378
So I need to dig into the existing userland amqp lib and see if I can wrap/hack it to be non-blocking
15:36
@rdlowrey That's actually good :P
user895378
IKR
I kinda want something like that :D
user895378
amqp is the worst
@rdlowrey as said, I just need you to provide a nice API
user895378
@bwoebi yeah, I just have no idea what that would look like right now
15:36
then I can look at the backend
'elo u
@rdlowrey dunno… I bet you're already using one in an alternate language… possibly you can take some ideas over…?
Help, why 5 + 5 is equal to 55?
@PeeHaa plus you get a free lance with every order
user895378
maybe ... I'm just going to see how much work it will take to rip apart this thing and make it non-blocking: github.com/php-amqplib/php-amqplib
15:37
@CharlesCraft50 you're writing Javascript, not PHP…
@bwoebi yep
user924016
heh
@CharlesCraft50 then you're in the wrong room
I think 5 . 5 is equal to 55
const 5 = 27.5;
15:39
@rdlowrey I bet it's a lot of work, as you'll have to wire Promises through the whole lib…
Rewriting from scratch may be eventually easier, with the protocol parsing (if it's good) copied.
Bobs-MacBook-Pro-2:~ bob$ ~/php-src-X/sapi/cli/php -r 'function bar() { print "called"; } function foo(callable $foo = "bar") { $foo(); } foo();'

Fatal error: Default value for parameters with callable type can only be NULL in Command line code on line 1
Bobs-MacBook-Pro-2:~ bob$ ~/php-src-X/sapi/cli/php -r 'function bar() { print "called"; } function foo(callable $foo = FOO) { $foo(); } const FOO = "bar"; foo();'
called
@NikiC ^ wtf, arbitrary limitation??
Ok, works in PHP, lol: echo 5 + 5; instead of echo 5 . 5;
@bwoebi heh
(@NikiC note: the callability check is performed properly if FOO doesn't evaluate to a callable expr)
@NikiC I'd fix it in 7.0 and open a bug in tracker … Do you agree with me?
@rdlowrey doesn't rabbit have a fire and forget mode?
> Balls.. Void my last comment..
15:45
?
@bwoebi Which direction do you want to fix it in?
@NikiC Allow default callables
well you can't do that, can you ?
@bwoebi hrm
why not?
15:46
Helo
callable $foo = [SomeUndefinedClass::class, "method"] ?
@JoeWatkins like that would be allowed, yes
when would you do the check ?
defaults are currently checked at compile time ...
Yeah ... I don't think allowing this makes sense
15:47
But in StackExchange there's stack overflow in italian language?
I'd stick to only allowing null
I.e. fix towards status quo
@JoeWatkins Do you speak w me?
@MattewDeveloper what does google say?
Google say no lol
I just need to share this...
@JoeWatkins actually, defaults in constant( AST)s in general are only checked at call-time
Randomly perusing through the @SwiftLang source code... This feels like such a PHP reaction. https://github.com/apple/swift/blob/master/lib/Parse/ParseExpr.cpp https://t.co/90uLaMmluu
"Our devs have too much muscle memory, let's fix that for them by changing the syntax to ignore that extra character."
I'm writing my first line in PHP lol
@bwoebi I'd rather it were consistent in all cases ... easier to say "callable has to be null by default, will raise error otherwise" than it is to explain under what conditions it can be non null, and when you might get an error ...
15:51
@JoeWatkins well, callable means actually, object, string or array … and callable.
the first we may check statically, the latter not.
@Sara whenever I see llvm, I run away ...
@JoeWatkins You cannot outrun the LLVM.
@JoeWatkins Nothin' wrong with LLVM. It's come a long way in the past five years.
In fact, clang is a bad-ass compiler.
does it still have bc breaks every 5 minutes ? is that how they came a long way ?
The issue with LLVM is that the code using it looks that unreadable…
15:55
Nah, it's settled down.
even asm is much more readable than code using LLVM …
Eh... have to disagree.
I have tried to write toys with it ... couple of years ago now but it was so hard to be compatible with the range of versions in the wild ...
@Sara well, pure asm has the advantage of being easily distinguishable in context, while LLVM code is just a wall of code
none of them ever saw the light of day ... I actually started thinking about home growing a codegen :s
15:57
you can deeply analyze it, but you absolutely can't skim it and understand foreign code using LLVM quickly
I find/found the same, but there are actually certain idioms that you get used too and that make it easier once you have cursory familiarity ...
agree
I may look again some time this year ... probably nothing will come out ... but if it's calmed down, that was my main problem with it, would come back to it every month or so to work on some toy and a bunch of really core stuff had changed, iirc one time it was the name of a basic block ...
may have been something else, but it was a really quite core component ... instruction pointer, basic block, something like that ...
trivial to fix but a pita ...
at any rate, there's nothing more complete at the moment, I don't think ... or wasn't then ... probably still isn't ...
I wish libjit had been finished ... it's just sitting now, half baked ... forever, probably ...
16:14
news.php.net/php.internals/92792 … I am running … far … far away…
@JoeWatkins Oh, you're brave
@bwoebi you could skill fully avoid that question by skilfully avoiding that question ... just a thought ... if you're looking for ways to achieve that, you're looking for some kind of "x" on the tab of the browser window ... if you can't find that, cover your eyes ?
@JoeWatkins hehe
look, for the last time: void !== null
if you approach that, than a union with void is a syntax error
because it makes no sense
whereas a union with null makes perfect sense
16:17
@ircmaxell yes, we're all clear about that
@ircmaxell you're right, but I think that we don't make enough of a distinction between null and void to really matter ... there still is no void, we just check for the right kind of null, but we can only do this in one (or a few) places ... it's not a robust implementation at all ...
that's not really quite true. You can't have a return with a value inside of a void function
so there is a distinction
though past discussions try to limit the distinction rather than own it
it's a distinction that only matters within the function itself, it doesn't mean shit to a caller
@ircmaxell yeah but this is only enforced in one place, once you passed the ast (or code) onto something else, there's no difference, there's still implicit return null in every function ..
16:22
@ircmaxell PHP is not C, the reason people like PHP so much is because they don't have to deal with those distinctions
2 days ago, by bwoebi
function nothing(): void { print 1; }
nothing(); // fail
(function(callable $cb) {
    return $cb(); // valid
})();
(function(callable(): void $cb) { /* just example syntax, don't know what RFC passes yet */
    return $cb(); // invalid
})();
@ircmaxell ^ your thoughts?
No one (who works with PHP) really cares.
this makes it awkward to work with void, and seems to me, makes it a mistake, or subpar implementation ... in some way ... but I'm always wrong, and bob has some good arguments in favour of both ...
then no point in having the conversation
16:23
@ircmaxell I don't think that's true, I mean, this is my opinion after all.
well I care, I work with php :)
I'm a developer, not a language designer
But that's my take.
@bwoebi nothing() wouldn't fail, but the return $cb(); should fail IMHO
@ircmaxell even if the result of $cb will end up actually unused?
it's just a generic return value which is returned
PHP lets you ignore return values all the time...
16:25
Are return types enforced in compile time, or runtime?
@ircmaxell oops, I meant $foo = nothing(); // fail
Runtime
@MadaraUchiha runtime, except void.
@bwoebi See, that "except" bothers me
@bwoebi that I'm not as sold on, I think that should be a static analysis thing, not an engine thing
16:26
You should have very very good reasons to have exceptions in your newer features
Agreed
@bwoebi OHHH, nevermind, I thought you ttyped the return of the callback as void, not mixed
(not Exception exception, a conceptual exception)
Exceptions in the mental model are confusing
@bwoebi in that case, I think there shouldn't be an error there.
@ircmaxell nah the calling function is mixed, the callback is typed void
16:27
yeah, I missed that
and in the other example both are mixed
I was kinda hoping your first response to that code was going to be "what is that awful mess with callable" ...
Jay
Jay
hey
Jay
Jay
How can I use SELECT statement to only get the date part of DATETIME?
and then use it to get just the time
I tried
DATE(column) AS added_date
DATEPART(yyyy, alerts.created) AS alert_date
this doesn't seem to work
Wes
Wes
16:39
try CAST(DATEPART(yyyy, alerts.created) AS date) AS alert_date or whatever the syntax is (don't remember it at the moment)
Jay
Jay
EXTRACT(YEAR FROM OrderDate) AS OrderYear
actyally I read datepart doesn't work with mysql
I am trying extract
but that doesn't work too
Wes
Wes
yeah just guessing, try the CAST
<?php
$a = 1;
$b = 1;
var_dump($a + $b);
Quiz: What does this code print?
Wes
Wes
int(2)?
seems to easy ?
we're missing something ...
is there some invisible unicode character that actually means a billion or some shit ?
16:44
@Wes Sometimes...
(╯°□°)╯︵ ┻━┻
To put it differently: What do you need to do for that not to print int(2)?
You're allowed to include it in a different file ^^
16:46
$b = class {
function __destruct() { $GLOBALS['a'] = "fuck you, buddy"; }
};
include('nikic.php');
@Sara yay!
ob_start() ... ob_clean()
This, btw, is why Hack prohibits main scope code.
This is how you detect the compiler person in a room.
3
:p
Is it the use of swearing? Is that how you tell?
16:49
$a = 1;
$b = 2;
var_dump($a + $b);
^ now, no destructors allowed
@bwoebi Yeah I was really curious why nothing(); was a failure ^_^
$a =& $b;
include('bob.php');
That was an easy one.
:-D
@Sara I have an alternate solution:
need to respond to tom @Levi
declare(ticks=1);
register_tick_function(function(){ $GLOBALS["a"] = "hehe"; })
16:52
Fucking ticks.... (╯°□°)╯︵ ┻━┻
@JoeWatkins Yes but I'm not sure how to respond just yet.
yeah they need killing with fire ...
not tom, the ticks ...
where do all these tables keep coming from
Honestly I don't think Tom's proposal actually any merit...
@PaulCrovella I think @NikiC keeps following around turning them rightside up. He's a nice guy like that.
16:53
doesn't matter, not up to you, need to accomodate everyone if possible ...
I don't see how adding a syntax that only works for return types and not for parameters makes any sense.
@Sara You mistake my motivation. It's just not possible to properly rage if all the tables are already upside down...
7
(I already outlined that logic in the respective thread)
we don't need syntax for parameter types ...
@NikiC hahahaha <3
Jay
Jay
16:55
can't get this CAST working
anyone help me with it?
function (ClassType $a = null, $concrete_param); // would like to deprecate this
It's just a hack if we have proper nullable types.
it's never happening ...
@LeviMorrison please!
It can happen, but it means deprecation in 7.1/7.2 and actual removal in 8.0 or later
@LeviMorrison yes, but but that's rather something to deprecate with 7.3 or PHP 8
I think that boat sailed, the only problem we have is actually return types ... that's a reason to consider it on it's own ...
16:56
^^
@Sara Probably not deprecated in 7.1, yeah.
7.1 or 7.2 IMO is too early to deprecate
Too soon.
If we wait till 7.3, then we can't remove till 9.0 (which is an option, just saying though)
Jay
Jay
DATE_FORMAT(alerts_history.created, "%Y-%m-%d") AS alert_date
16:57
I'm pretty sure some people thought the boat for scalar types had sailed as well, and we have those.
@Sara I think it's a viable option though.
honestly, I don't see that being voted in, that it seems better to you is not a reason to change it ...
These are the things which should be deprecated for like 4-5 years first
I'm working on the assumption that 8.0 is going to come in the 7.5 timeframe (as discussed a couple years ago)
@bwoebi Yeah, it's viable. My only point (which you agreed with, effectively) is that 7.3 deprecation to an 8.0 removal is too quick.
The problem is that the old codebases have no way to be post-removal compatible if they have no nullable union types yet.
16:59
I'd just deprecate it in 8.0 and let them both happily co-exist without warnings in 7.
we need decisions on these things quickly ... please don't make it dependant on changes you want in some future version ... the only problem we have now is return types, if that's solved we can move forward ... if you want to extend that to param types, and deprecate current syntax, can't that happen later, so the rest of us can get on ?
@LeviMorrison or that eventually.

« first day (2019 days earlier)      last day (3157 days later) »