« first day (1888 days earlier)      last day (3076 days later) » 

11:02 PM
bench.php runs slower despite never using unary minus
uhhhhh
 
valgrind-verified?
 
No wait
bench.php runs faster
 
or just comparing bad versions?
 
I can't read
 
@Andrea Any idea why the literal value of PHP_INT_MIN isn't represented as an integer in PHP?
 
11:04 PM
@tpunt ah, I can explain that, yes
 
I'm curious :)
 
- isn't a negative sign, it's a unary minus (negation)
if you look at PHP_INT_MAX, you'll notice its absolute value is one less than PHP_INT_MIN's
 
Ah ok, so it's -(PHP_INT_MAX + 1)
 
so the problem is
yeah, that
C would have a similar problem but I think there's some sort of hack they have to make sure this works
 
Thanks, was just a little curious :)
 
11:06 PM
I want to fix this someday
 
And I want bigint support in PHP someday
 
At least we have PHP_INT_MIN now. Before PHP 7.0 we didn't have that constant, for some reason D:
 
var_dump(\std\numeric_limits('int')->min());
 
True, kind of weird having PHP_INT_MAX but not the inverse...
 
@Sara some day, Sara, some day :)
though
 
11:07 PM
HALP.... C++ is unbraining me
3
 
I'd like \php\Int::MIN or so :)
@Sara zombie stroustrup?
 
There are a LOT of things we could (but don't) do... :/
@Andrea unnnnnggghhhhhh templates.....
 
@Sara And even more things I'm happy we don't do.
 
Actual code I'm actually writing actually now:

template<NativeSig::Type retType, NativeSig::Type ...types> typename
std::enable_if<detail::SigTypeMap<retType>::byRef, void>::type
doSimpleMethodCall(BuiltinFunction func,
TypedValue& rv, void* ctx, TypedValue* args) {
void *ret = detail::SigTypeMap<retType>::retRef(rv);
using NativeFunc =
int64_t (*)(void*, void*, typename detail::SigTypeMap<types>::argType...);
auto nf = reinterpret_cast<NativeFunc>(func);
nf(ret, ctx, detail::SigTypeMap<types>::argValue(args)...);
 
@Andrea You broke them builds
 
11:12 PM
@NikiC oh shit
what the fuck, I swear I fixed that test
 
BAD ANDREA
NO BISCUIT
 
@Sara This needs a Ctrl+K
 
this is why you always run make test again...
 
Having no indentation doesn't make C++ template magic any easier to read ^^
 
:D
 
11:15 PM
@Sara What's the ETA on rewriting HHVM in Rust? :)
 
@NikiC I'll get right on that. Convincing nod
 
Though ... they don't do variadic generics yet, hrm. Too early
 
Rust 2.0 will probably be about when it's ready for mainstream.
There are still too many features that C++ programmers use regularly that aren't there or don't have equivalents.
 
@Andrea And don't forget that there's probably 32bit test variants as well
@LeviMorrison Ya
Ah, a nice bug bounty drama
TIL facebook employees aren't people
If you dump employee data, that doesn't count as privacy breach
Or at least that seems to be the logic
 
@NikiC yes, I realised that before you told me
I'm fixing them too :)
CFLAGS=-m32 is so easy
This is not the first time I have broken the build
hopefully it's the last, but we know that won't be true
 
11:26 PM
Why do people still write C++ nowadays? Have they still not learned that C++ usually tends to be unreadable and full of magic?
 
@Andrea Don't worry. As long as you don't break it every time you do a commit (like certain people those name starts with Y)...
 
Y? hmm...
 
11:37 PM
 
@bwoebi Because we don't have to screw around with void *.
C++'s templates are a lot more than generics, but generics are really powerful.
Also, constructors and destructors are really nice.
Those two reasons are basically why I reach for C++ and not C.
 
destructors are nice, but magic.
Also, in C++, you still have to manually delete objects…
having dtors is IMO mainly nice when having automatic refcounting…
@LeviMorrison generics are definitely powerful, but having to express a full generic signature everywhere is annoying.
 
@bwoebi They are not magic in C++.
They are completely deterministic.
 
@LeviMorrison Magic means, implicit.
 
Eh, I disagree. But even if it is magic then we definitely have degrees of magic.
 
11:48 PM
yeah. I'm just saying that you also could just call a function delete_foo(foo);
 
And destructors are a very different form of magic from some of the other unspeakable horrors of C++ :D
 
which does the delete and calls the dtor
 
@bwoebi That's not the problem destructors solve ...
The point is to not have such explicit calls and instead cleanup being automatic on all exit paths
 
you could have explicit methods for it too…
 
I would not be at all surprised if PHP had more than a hundred distinct leaks caused by missing cleanups in error paths
That's what destructors prevent and what an explicit call will simply never give you
 
11:52 PM
@NikiC but we'd also forget to call the delete though…?
 
@bwoebi I think you are confusing C++ and "C with classes". If you learned C++ in university, they probably teach the latter, not the former
You do not typically use delete in idiomatic C++ code
 
I never learned C++…
 
@Andrea yay, green build
 
^^
btw someday we should run dos2unix on the entire /tests dir
there's still a bunch of files with messed-up line endings
though we'd need to be careful not to hit the ones with intentionally broken ones
 
@Andrea not just there… there are even source files with \r\n's…
 
11:59 PM
@bwoebi If the delete calls happen in destructors you don't forget.
 
@bwoebi cries
 

« first day (1888 days earlier)      last day (3076 days later) »