« first day (2023 days earlier)      last day (2911 days later) » 

12:05 AM
/me sleeps
 
@NikiC Your fix landed finally: github.com/facebook/hhvm/commit/…
 
Wes
mmmh yum electricity
 
1:28 AM
My cat chewed through christmas lights once
240V, it survived
 
Wes
lol
 
Ekn
1:54 AM
lol lucky
 
I took 440vac across the hand once. That was fun.
 
Ekn
2:06 AM
fun? :p
that's quite dangerous o.o
although if across the hand it might be just short term pain, not sure...
hah lol'd
 
Wes
twitter.com/AwardsDarwin/status/726214072719556609 i love how the treadmill gets unbuilt and he's still convinced he can save it. watch it with audio :P
 
Ekn
lol ahaha
 
Wes
2:31 AM
 
Ekn
x_x ouch
 
@bwoebi Yes.
 
Wes
/me randomly adds +1 / -1 hoping that off by one errors would magically disappear #programming101
always pays off. no point in understanding the problem, just add +1 -1 till it works :B
 
dat swerve tho by the guy behind him
 
Wes
incredible reflexes
 
Ekn
2:43 AM
this is why I always got scars all over high school
I lived near a park that was always full of people with bikes and stuff
it's really fun but painful learning curve :p
 
Wes
how do you call in america those skateboards you use sitting on it?
 
Ekn
and I had to suffer double everytime because my teachers at conservatory would punish me for doing dangerous stuff
not sure, still a board? :p
 
Wes
well yeah, anyway... when i was i kid i did that with a skateboard. i ended up under a car, broke 6 bones and my mum even had to pay the car repairs :B
 
Ekn
x_x oh wow
 
Wes
because basically i replaced the car's bumper with myself :B
street luge is the name though, found it
 
Ekn
2:55 AM
ah just saw that, yeah
looks like it is so much fun :p
 
Wes
after that i avoided dangerous stuff... except php
 
Ekn
:)
 
Ekn
lol
hmm.. I might go to php mvd meetup meeting this week
free pizza & somewhat a reason to leave house :p
 
Wes
3:17 AM
should go running but i'm still broken from yesterday lol
 
Ekn
if you don't though it'd get worse next time, at least for me it happens.
take it easier maybe
 
Wes
will go tomorrow, i don't want to overdo. i will eventually but now it's too early, need full recover. i haven't slept enough today and it was a mistake
 
Ekn
sounds like the right decision then
 
@FélixGagnon-Grenier no, it just leads to "1" + 1 stuff, at some point, because people like convenience
 
Wes
\o marco
 
3:32 AM
o/ Anto'
oh, wait, I don't even know your real name :|
 
Wes
ha
antò :P
 
really wanna see the recording of yesterday's talk - didn't speak in German since ages
 
Wes
where do you live now?
i thought you worked in ger
so, looks like my doublylinkedlist works. was just too easy to implement it. something must be wrong
 
Yeh, I live in Frankfurt (or around it)
but my German is basically "no, I don't have a fidelity card"
for when I go to shops :P
 
Wes
:P
 
Wes
4:04 AM
@Leigh that wasn't a bad idea though. "you are not supposed to instantiate this as it's a private class" workaround
 
4:29 AM
@bwoebi I'm not sure, just wanted to be on the same side. Why do you think refcount will be >0? If the increment is done non-atomatically, i.e. as a separate load, increment, store, you may end up with two of those sequences overlapping
@JoeWatkins Is that on master? Does pthreads do anything funky with guards itself? The implementation changed recently, so if you manually reimplement them that will need to be adjusted
 
4:50 AM
@Sara Yay
@JoeWatkins That's the guards patch btw: github.com/php/php-src/commit/…
 
5:01 AM
anyone have a great php tutorial about create Chatroom?
 
Hello
what is try and catch and throw in php?
a functions or what?
 
Thanks!
Please explain to me this more please
Code may be surrounded in a try block, to facilitate the catching of potential exceptions.
 
5:39 AM
@NikiC can we please just export that function ?
 
@JoeWatkins I think so
I don't think anybody is going to complain if you slap a ZEND_API on it
 
cool
because second time in a year, don't want to end up with 5 implementations in a couple of years ...
 
Although, in hindsight, I think your test should have used \u{1F4A9} instead of \xFF
It would have looked like a few random bytes, but eventually someone would have looked up the codepoint. :D
 
is that the elephant?
 
noooooooooo
 
5:44 AM
@PaulCrovella It's the Java logo...
 
ah, that one
 
@Sara Yeah, I agree. Missed opportunity ^^
 
Fred would have appreciated it. :D
 
Wes
morning peeps
 
@Sara One issue I see with |> is error handling
 
Like, if an exception happens in the middle of a chain?
 
At least if it's targeted more at stdlib functions which like to return false
 
And that FREE never happens?
 
@Sara nah, exceptions are fine. I mean error return values
 
5:50 AM
errors schmerrors
 
Ah
|> @foo($$)
(j/k)
 
I nearly cried ...
hold on, that works doesn't it ?
that perl you just wrote there ?
 
@Sara btw, do you know that codepoint by heart or do you have to look it up? ^^
 
@NikiC I had to look it up. :)
 
@Sara awww, now I'm disappointed
 
5:54 AM
I'll try harder. :)
 
I'm on the fence on the pipe thing ... I like the idea of me being able to use it, but find the idea of other people being able to use it pretty scary ...
4
 
$$v ?:= ($x => $y($x, $$v))() |> $z($$, $$v) <=> $z($x, $$v) |> ($x => $y($$, $$v))(); // I CAN'T WAIT
 
Wes
sweet mother of baby jesus. can't php deprecate variable variables?
i can't believe people will do that on purpose, not even the most masochist laravel programmer :P
 
@Wes someone did this on purpose
3
 
> Well behaved tests do not leave their droppings all over the filesystem.
 
6:09 AM
@NikiC Dude, that errant test.sqlite file has been annoying me for weeks
@PaulCrovella Looks perfectly readable to me...
 
oh, then you've spotted the error in it
 
Yep
 
Wes
@PaulCrovella lol, but that is for fun
 
Well, a couple errors
More than a couple
Good God, man. Can you not PHP?
 
well, I added some other potential syntax that's been tossed around in here for kicks
@Wes I've looked at that thing every now and then for years and never entirely figured it out.
I get lost in its expressiveness, I suppose.
 
6:16 AM
I will admit though, it does have a slight odor of perl...
 
Morning
 
I strongly believe ?:= should be T_ZOIDBERG_WITH_TOUPEE
 
Ekn
:D
 
@PaulCrovella Eh... I may drop ?:= tbqh.
I still think it belongs in for consistency, but I can't defend it quite so well from a usefulness standpoint.
Also, APATHY
 
that's a shame, it's one of the cuter tokens we'd have
 
6:23 AM
is there an impl of null coalesce equal/assign yet ?
 
Don't think so
 
@JoeWatkins There's an implementation attached to ?:= but istr some unresolved issues
 
Mee too
me
 
@Sara How did you solve the combination of single-eval + short circuiting?
 
Ah, I remember now. My current version does an RW fetch for the empty check, then a W fetch for the default assign. But that's broken for getters/setters
Which is about where I table flipped and loaded up Civ5
 
6:31 AM
then gandhi nuked you and you flipped the table back over?
 
Ghandi's a prick
I'm on a marathon/huge-map game atm. Somewhere around turn 1000 and no end in sight
 
@NikiC zend_get_executed_scope doesn't always behave like EG(scope) ?
class A extends B {}
class B {
    public function method() {
         executed_scope is B no matter if invoked as A::method
    }
}
sucks ...
 
@JoeWatkins Are you confusing scope and called_scope there?
 
that's gone too ...
 
The scope is always the scope the method was defined in
@JoeWatkins It's under zend_get_called_scope now
 
6:36 AM
ah
well, that's probably nicer ...
 
7:02 AM
Moin
@JoeWatkins is it an ext or an userland lib?
 
part of pthreads
 
oh i see!!
 
I first thought of doing this about a week after the first release of pthreads ... and just didn't bother for the last few years :)
 
:P
 
it's not finished yet, I'll finish over the next few days ... there's enough to play with though ...
I haven't decide what to do about safety yet either ...
 
7:07 AM
hmm....
 
probably read/writes should be implicitly atomic, fits with the rest of pthreads
 
but I do know, that what you would create would be a reliable one....
 
yeah it's safe in that sense ... it has to be, in order to work at all :)
 
:D
 
what I meant was, if two contexts call Socket::write at the same time, pthreads should probably do something about that ... because that's never what you meant to do ...
(or Socket::read)
the only method that you need to be able to execute concurrently is accept, I think ...
 
7:11 AM
yes, just accept and ~write~.. :)
 
why would two contexts want to write at the same time ?
that's always going to have undefined results ... it seems best to disallow it, unless there's an actual use case that I don't know about ?
 
sorry.. I was confused at that moment.... only accept would work on a new thread....
thnx tho for working on it :)
 
0
Q: export data to excel sheet

Waqas_aamerI have used some code in which i am exporting database table data to excel sheet using php. But whenever it downloads the file first it opens with a error that it is not in supported format. By clicking yes it opens and show my complete data but in the last of the sheet the footer is also display...

can someboady give me guidance in this
i will be really thankfull
 
7:29 AM
Hello everyone, I'm having trouble with something that I'm sure is so easily solvable... I think it's just adding a little code to check whether a portfolio item has a 'Sold' tag.
0
Q: If Portfolio item has tag, add CSS

user2910809I've recently purchased the Stockholm theme and am trying to customize it: I would like to have the ability to mark certain Portfolio Items as being 'SOLD' with black squares in the top-left corner, as can be done with Products with 'SALE' blocks. An example is found here, under "latest items". ...

 
working with php 5.4
 
7:45 AM
Ugh, threads are really hard.
 
:"D
 
@Saitama It's one of my favorite SE sites
 
I've just spent the best part of 2 days trying to find a bug that was causing an application to freeze, and I just found somewhere that I forgot to release a lock when a thread died because of an exception. And because it's implicitly a bit of a heisenbug, the only way I can find out if fixing that fixed the problem is to run the app and wait for 2 days :-/
private $postLockQueue = new \SplPriorityQueue(); <-- can we not fix this by now? Is there still some engine limitation that prevents it?
 
@DaveRandom ha
using 7 yet @DaveRandom ?
 
yes
 
7:55 AM
you missed the whole php-ds thing ?
 
Apparently...
 
wait, we have some sane data structures?
 
possibly
 
:-P
 
Ekn
7:57 AM
I've read that twice this week
uh, the time to buy phpstorm has come
and, mornings
 
ormin ekin
 
Is it possible to break the foreach and continue it from the other div?
 
I don't understand the question
 
I mean stop the current loop which is in div1 and continue it in div2
 
HTML has no bearing on a PHP loop. You need to show some code. Please use a pastebin for any code sample that is more than 4 lines.
 
Ekn
8:03 AM
you know... it's easier showing your code to make people understand your context better
I was slow..
 
I was reading the question, for the 42nd time
 
Ekn
let 42 be thy answer
 
@JoeWatkins Do you know if there is a sane way in composer to say "if the extension is not installed, use the polyfill"?
 
the polyfill will only autoload when the extension is not present
 
8:08 AM
oh yeh, duhhhh
 
morning :)
 
Need more tea :-)
 
@JoeWatkins '
 
sorry
here I paste the code
it's in wordpress and currently it showing all the categories
 
I really hate wordpress ...
 
Ekn
8:10 AM
too many cats
 
@JoeWatkins no worries, we all do...
 
hehehe :D
sorry I haven't clean the code yet
 
Ekn
:'D
 
to avoid mouse hehehe
It can be?
 
8:13 AM
those kitties doesn't look happy..
 
Would you be?
 
@AnmolRaghuvanshiVersion2.0 and also, some of them appear to be copies of other cats in the bundle of cats
 
@JoeWatkins E_PHOTOSHOP
 
@JoeWatkins yeah didn't noticed that :-P
 
right now its out put
can I able to cut the loop and continue into the other div?
 
8:19 AM
@JoeWatkins Thanks for this, but also actually what's the status of inline property initialisation with objects (obviously as long as the ctor args are constant)?
Is there some technical reason why it's just not possible?
 
sorry I'm just getting idea, because if put break inside for each and loop again it wasn't continue
 
what do you mean by status ?
inline properties are an internal thing now (all declared props are inline [with/after the zend_object]), are you talking about that or something else ?
 
@JoeWatkins I mean:
31 mins ago, by DaveRandom
private $postLockQueue = new \SplPriorityQueue(); <-- can we not fix this by now? Is there still some engine limitation that prevents it?
 
oh oh
 
Rather than having to do it in the ctor
 
8:26 AM
it's doable, but there's been no movement in that direction
it was briefly discussed as part of use() on anon classes ...
 
Presumably it would be possible to just prepend some opcodes to the ctor?
 
yes, but
 
posted on April 30, 2016

New Cyanide and Happiness Comic

 
if we get typed properties, it may create inconsistency when some errors are compile errors and others are runtime exceptions ... we can't determine what the value is statically ... at the moment, we don't care because they are untyped, but if they have types we must care what the default value is ...
 
@JoeWatkins You mean if I do private IFoo $foo = new ConcreteFoo(); and you can't statically know whether ConcreteFoo is an IFoo?
 
8:34 AM
yeah
ConcreteFoo may not even exist when we are constructing that code ...
IFoo may not either ...
 
Can't you just consider using a type in a decl to constitute a "uasge" and trigger an autoload cycle?
In the 99% case I can't see this causing any issues, it might result in things getting autoloaded earlier than they currently do but that's it
 
we can't always autoload
 
why not?
 
@JoeWatkins And is that an issue?
 
@NikiC it seems like the kind of thing people would complain about, yeah
@DaveRandom it's not even just about autoloading ...
> In some cases classes must be declared before use. It only happens if some of the new features of PHP 5 (such as interfaces) are used. Otherwise the behaviour is the old.
 
8:41 AM
An alternative solution could be to just ignore the compile errors and let them explode at runtime...
That would be consistent
 
it wouldn't be consistent with the rest of php ...
 
I think there is exactly zero wrong with throwing for compile-time detectable problems and a runtime error for runtime detectable problems...
 
what's the original reason only constant expressions were allowed ?
 
Can you guys take a look at my question? stackoverflow.com/questions/36952735/…
 
@JoeWatkins Wait, which problems are detectable at run time? Assigning a scalar and what else?
 
8:47 AM
assigning anything
@NikiC also, how would this actually work, do we extend constant expressions, or some special support for properties is required ?
odd to be able to do private IFoo $foo = new Con; but not function(IFoo $foo = new Con) ...
 
@JoeWatkins Generally it's unclear when it would run (e.g. for static properties). But for normal properties that problem does not exist
 
yeah
 
@JoeWatkins Just inject it in the ctor
 
^ for me it is just syntactic sugar for exactly that, it should behave identically
 
that omits support for function args
 
8:49 AM
of course, that would not work if the ctor is not called
 
well new is always called
we can inject after that and before ctor, regardless of presence of ctor, right ?
 
@JoeWatkins you mean as something separate from the ctor?
 
yeah
or
forget about ctor and new, and actually set default values on the entry when the class is bound, and if it's not bound, then output a bind opcode ?
if you reflect on such a property, you expect a value I think ?
so in ZEND_DECLARE_CLASS[*]
?
also, why couldn't static props be initialized in there also ?
 
@JoeWatkins You don't want to reuse the same value for every object...
This must reevaluate on every object creation
 
hmm
but maybe suitable for statics though ?
reflection would just have to return null I guess ...
 
8:57 AM
@JoeWatkins We don't have a static ctor, I see no reason that something which is essentially syntactic sugar for ctor logic should be blocked by it not working for statics
 
it's not necessarily blocked
 
What I meant is, it doesn't need to work for statics
 
I omitted statics from typed properties, people didn't like that ...
 
People don't like anything :-P
 
well it leads people to say things like it's not a complete solution, and there's not a valid argument against that ...
 
9:00 AM
Well a complete solution would provide static ctors as well. Which makes it a separate issue... I don't know why I'm arguing this with you, you are not internals
 
I'm not ... I'm fine with omitting static properties ... just saying, there's reason to think people will resist that ...
I don't really think you can argue that it's a separate issue though, static ctors are a separate issue, but people don't see the difference - even if they know what the internal difference is - between static and member properties ...
I think, I might go outside ...
yes, I'm gonna do it ... lata all ...
 
Ekn
9:27 AM
I should go out too...
 
@NikiC don't we then have that problem in general? or is there a lock when copying structures (funcs etc.) from opcache?
 
@bwoebi things in opcache are never refcounted
 
@NikiC but we still are commonly refcounting copied arrays (at least at run-time in VM)?
 
@bwoebi "copied arrays"?
 
@NikiC (zval_copy'ed, not dup'ed)
 
9:36 AM
@bwoebi so? they still aren't refcounted
they're all immutable
 
but AFAIK we're sometimes just assuming something's refcountable e.g. if it's an array?
 
nope
 
@NikiC ah, we're indeed only assuming it for objects and refs
@NikiC but then, why dup? copy is doing a check against whether it's refcounted?
 
@JoeWatkins Can I borrow those cats ?
 
@bwoebi Persistent values in ZTS are refcounted
 
9:44 AM
@NikiC why?
 
@bwoebi It's just how it is right now ^^
 
@NikiC why haven't you fixed that instead?^^
 
Hello
 
@Ocramius your response on pipe operator … do you have derived that from real-world code or completely made it up? if the former, link?
 
10:29 AM
From today I'm user Linux (Ubuntu)
 
Anonymous
Does anyone know the first package to use packagist?
 
composer probably?
Or monolog...
 
@Ocramius especially steps like getRouter($app) looks a bit unrealistically to me (route definitions map to app handlers typically in definition file?? Also, emit is likely to be fed with method calls etc. The example looks like oversimplified for the sake of it
 
@bwoebi I keep meaning to do something about that
/**
  * Defines the node entity class.
  *
  * @ContentEntityType(
  *   id = "node",
  *   label = @Translation("Content"),
  *   bundle_label = @Translation("Content type"),
  *   handlers = {
  *     "storage" = "Drupal\node\NodeStorage",
  *     "storage_schema" = "Drupal\node\NodeStorageSchema",
  *     "view_builder" = "Drupal\node\NodeViewBuilder",
  *     "access" = "Drupal\node\NodeAccessControlHandler",
  *     "views_data" = "Drupal\node\NodeViewsData",
  *     "form" = {
  *       "default" = "Drupal\node\NodeForm",
what the actual fuck
 
@JoeWatkins oh yeah...
@JoeWatkins Only way to improve this is to switch to XML as the annotation format.
 
10:44 AM
@NikiC and don't forget a detailed dtd!
 
@bwoebi You mentioned that you're currently having "fun" with XML ... I'm so sorry for that
 
@NikiC At least it's just generating code … if it were parsing code … ugh.
 
this is an annotation ...
this isn't ...
 
@JoeWatkins Empty annotations are redundant and shall be removed :-D
 
@bwoebi Generating code from XML?
 
10:48 AM
@NikiC no, code is generating XML :-D
 
@bwoebi Ah, that's tame.
 
yeah
 
No, no, XML generating stack traces.
 
All good Java programmers know it ought to be the other way around
 
@bwoebi at least that would allow for easy authoring
 
10:50 AM
@NikiC but deciphering the legacy code is not tame :x
 
s/dtd/relax-ng/
 
@JoeWatkins This is how I imagine an "Introduction to Tax Law" book to look like
 
it's that complicated, it might be as well a parser…
 
@NikiC hehe
 
@NikiC I read that like a proposal to tax lawmakers for their laws initially
 
10:51 AM
I'm not sure that the proposal is clearly understood ...
> 1) ::class constants should resolve at compile time, relative to use
statements, anywhere in the annotation.
 
@PaulCrovella s/relax-ng/xml schema
 
I prefer relax ng
 
ding Found the stupidest thing for today.
 
am I misunderstanding, or does Larry think he's getting code from annotations ?
 
@JoeWatkins He just wants a constant-evaluated result
Which is imho very reasonable
 
10:55 AM
he keeps mentioning compile time, not sure what he means by that ...
 
I think it should do constant evaluation if it is evaluable
 
> Note: We do NOT need objects created at compile time or include time, or
even instantiation of the annotated class time. __Only at
reflection-lookup time.__
 
@JoeWatkins That's a different point
 
mornin
 
That's about validating the annotation structure using some kind of annotation definition (e.g. based on classes)
@tereško morning
 
10:56 AM
oh I see
 
Just wave it through so people can finally slap @Singleton onto their classes
 
isn't that the business of whatever is using attributes though ?
 
Can't we just all agree that attributes are anyway literally Hitler and be fine?
 
the proposal is that they are completely dumb, so I'm not sure why compile or execution or any other time is being talked about, the proposal does nothing more than provide dumb ast ...
@bwoebi lol
 

« first day (2023 days earlier)      last day (2911 days later) »