« first day (1872 days earlier)      last day (3067 days later) » 

 
1 hour later…
1:54 AM
Does anyone know a theme/plugin for bootstrap to make the forms not look like something designed for a three year old?
 
2:15 AM
hello danack
 
Hello.
 
It can use php to capture packets locally? Just like Wireshark does.
 
using extension?
network packets
hello mary
 
@RowAraujo I don't think so. That would require using native system calls that are not exposed in PHP. It could be done by an extension maybe, but I don't know of one that does that.
 
2:20 AM
@Danack Ok Thx
 
@MaryDaisySanchez It look like your avatar is singing Ode to Joy: youtube.com/watch?v=xpcUxwpOQ_A
 
hahaha
Meep Meep Meep Meep Meep Meep Meep Meep Meep Meep Meep Meep Meeeeeeeeeep Meep-Meep
 
2:48 AM
really?
T_T
 
....I like the muppets.
 
3:24 AM
@DanLugg I think the issue is that new is what makes the object, not the constructor.
 
3:37 AM
@Abe as a user of websites I'd like it if web developers bothered to test in Firefox so I wouldn't have to switch to Chrome to fill in a bloody support ticket
And as an occasional front-end dev, my only real complaints about Firefox are its incorrect (or more precisely, lack of) 3D CSS depth-sorting, and its <input> box model bugs
 
@LeviMorrison Sure, a new method could still be "magic" though.
T::new(T $this, ...$params) : T where T instanceof self
And $this, of course, is allocated and passed in.
 
4:19 AM
github.com/do-aki/gophp_sample a sample of php extension by golang
 
 
2 hours later…
6:10 AM
moin
 
6:37 AM
morning Joe
 
6:50 AM
morning
hi all i am passing one value with get method and value of the parameter i am doing url encode

a value looks somthing like this 11520-2653

while reciving on the other file

i am getting 11520 2653
i short - is getting replace by space .. anby one know why this is happning
*in short
any one ?
 
@JoeWatkins I'm so pissed off right. Refactored some tests for a good two hours, then "phpize --clean" deleted them all. I closed Sublime because I thought it was confused. Nope, anything tests/*.php is kaput.
:'(
Trying to remember what changes I made.
Should commit more often heh
 
?
 
7:09 AM
@rtheunissen awwwww
 
Good morning
 
hi all i am passing one value with get method and value of the parameter i am doing url encode

a value looks somthing like this 11520-2653

while reciving on the other file

i am getting 11520 2653
 
Abe
morning
 
7:15 AM
"" && ""
 
Abe
@Andrea it's not that sites don't work in firefox... it's just slow as hell
 
7:43 AM
hello
 
7:58 AM
hi
any body knows how to remove attribute from left sidebar filter in magento
 
@santosh here pll will only say gm .. ther won't have any intrest in solving prob
 
gm all
 
morning
 
hi
i have a query i tried all i know by my self
can any one here whold like to help ?
 
So.. I started with php a few months ago and like to learn oop. is it that hard?
 
8:12 AM
nop , it's easy ..
and very usefull
 
8:30 AM
if you're passionate about it , its very easy
 
Ah, okay. understood it (been working with it without knowing it's oop :D ). so, basically, i re-invented it for myself^^
 
morning!
 
moin
 
8:45 AM
Hey guys, I have a sort of career-related question, when you want to just go through another technical interview, do you let the recruiter know it somehow? I.e. do you tell them that you're not really going to change place, but of course provided you like the interview in the future you will consider their company?
Or its common practice to just go through all the interviews like you're seriously considering accepting their offer and then turning the offer down in the end?
 
why would you want to go through an interview for a position you have no intention of accepting ?
 
Interview practice and its a good way to assess your market value I think.
 
sounds like a waste of everyone's time ...
 
@JoeWatkins fucking done, recreated the work I lost. 144/144 passing yuss
 
w00t
 
8:53 AM
\o
I am so wet right now. It's GRIM today. One of those days where you wish you drove to work.
 
I posted a question earlier concerning PHP and checking radio inputs that people have already selected in their account edit page, someone kindly helped me, but I am unable to identify which variable I should be placing using the function someone gave me
I am rather new to php and coding in general so I feel like it is pretty obvious for people with experience :P
This was my original post with the function answered at the bottom - stackoverflow.com/questions/34012396/…
 
posted on December 01, 2015 by nlecointre

/* by Maïa */

2
 
9:20 AM
mornig
its that bad, I can't spell morning
 
I get to experience my morning in about 9 hours :P
 
9:37 AM
Hey @JoeWatkins, is pthreads ever going to work with native PHP arrays?
 
good mornalsndogeing
 
@S.Pinkus no
moin @salathe
 
Damn
 
morning Joe
 
moin
@S.Pinkus you don't need it too, you can use threaded objects as if they are arrays ...
 
9:41 AM
Yeah I know but what if I have some existing class I want to reuse in my thread?
(that uses arrays...)
 
chances are it's not suitable anyway, you need to write code that is designed to multithread to get expected behaviour ...
you can write code that works as normal php code, and when pthreads is loaded, monkey patch it for threading ... or you could use polyfill ...
or you can keep chalk and cheese separately ... which is preferable ... but not always achievable ...
 
"monkey patch"?
 
sssshhhh don't tell anyone ...
 
Ah I see. I'll give it go (quietly) :0
 
9:45 AM
<?php
class Mine {
	public function __construct(array $array) {
		$this->array = $array;
	}
}


if (extension_loaded('pthreads')) {
	Threaded::extend(Mine::class);
}

$mine = new Mine([1,2,3]);

var_dump($mine->array);
?>
krakjoe@fiji:/usr/src/pthreads$ php -dextension=pthreads.so monkey.php
object(Volatile)#2 (3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
krakjoe@fiji:/usr/src/pthreads$ php monkey.php
array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}
krakjoe@fiji:/usr/src/pthreads$
like that ...
magic ... dark magic, that we don't talk about ...
it really would be better if code intended to multithread was written with that in mind ... at least you will need to consider how the code will work when patched ...
sorry for wall of junk chaps ...
moin @Jimbo
 
Mogguh
 
mohaa
 
moohoo
 
muhhuh
 
you can use the term "duck punching" in place of "monkey patching" ...
duck punching
 
9:52 AM
@JoeWatkins So that seemed to work but:
<?php
class Mine {
public $arr;

public function __construct(array $arr) {
$this->arr = $arr;
}

public function push($v) {
$this->arr[] = $v;
}
}

Threaded::extend(Mine::class);
$mine = new Mine([1,2,3]);
var_dump($mine->array);
$mine->push(123);
var_dump($mine->array);
[sam@localhost Threads]$~/local/bin/php Mine.php
NULL
NULL
[sam@localhost Threads]$~/local/bin/php -v
PHP 5.6.15 (cli) (built: Nov 26 2015 19:35:00)
 
typos
 
In your orig code, I could access the array al right. But in above the mutator does not work.
 
arr != array
 
Dude..
But the push still doesn't work.
<?php
class Mine {
public $arr;

public function __construct(array $arr) {
$this->arr = $arr;
}

public function push($v) {
$this->arr[] = $v;
}
}

Threaded::extend(Mine::class);
$mine = new Mine([1,2,3]);
var_dump($mine->arr);
$mine->push(123);
var_dump($mine->arr);
 
well it does ...
<?php
class Mine {
	public function __construct(array $array) {
		$this->array = $array;
	}

	public function push($mixed) {
		$this->array[count($this->array)] = $mixed;
	}
}


if (extension_loaded('pthreads')) {
	Threaded::extend(Mine::class);
}

$mine = new Mine([1,2,3]);

var_dump($mine->array);

$mine->push([4,5,6]);

var_dump($mine->array);
?>
 
Abe
9:59 AM
morning (v2)
 
moin
@S.Pinkus actually looks buggy ...
 
Yeah nah that didn't work on my system either.
So unknown bug??
 
what didn't work ?
show me output
 
<?php
class Mine {
public function __construct(array $array) {
$this->array = $array;
}

public function push($mixed) {
$this->array[count($this->array)] = $mixed;
}
}
Threaded::extend(Mine::class);
$mine = new Mine([1,2,3]);
var_dump($mine->array);
$mine->push([4,5,6]);
var_dump($mine->array);
[sam@localhost Threads]$~/local/bin/php Mine2.php
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
 
CTRL+K formats code
version of php are you using ?
 
10:06 AM
PHP 5.6.15 built with ZTS
 
use php7, it's a billion miles better ...
I'm not really working on v2 anymore ...
 
Yeah was thinking about given it a try. You've convinced me. Though it might be a v2 thing.
 
obviously it doesn't work on php5, the array is serialized ;)
 
Not really sure what that means .. :)
 
10:10 AM
in effect, you are doing this
class Mine {
	public function __construct(array $array) {
		$this->array = serialize($array);
	}

	public function push($mixed) {
		(unserialize($this->array))[] = $mixed;
	}
}
the unserialized array in push is not the same array as the one serialized in constructor ...
because serial ...
 
Oooh. That would fuck things up ;)
 
php7 ftw ...
 
Compiling now :)
 
do you read my blog ?
the manual is out of date for v3 ... there are a few blog posts you should read probably ..
 
Abe
just got unions and intersections working
 
10:16 AM
 
Abe
dammit, md?
 
Abe
:P
 
yeah, stupid md
 
> 1 days
 
10:19 AM
@JoeWatkins Cool thx. I knew it existed haven't had much of a look yet. I will for sure when I get time. Would be good to understand some of the technical barriers. I'm not fully getting that array limitations right now -- don't worry I'll read the blog.
 
shivers
 
I thought I explained it pretty well ...
I'm not great at explaining stuff ... I must assume you know something you don't know I think ... but I dunno what it is ...
 
I've just changed the stack frame layout of the PHP VM locally… not sure if I should be scared of myself…
 
@bwoebi what interesting thing are you testing ?
 
@JoeWatkins *disappointed face*
 
10:21 AM
Probably - I don't much. I'll work my way through those blogs.
 
Abe
@bwoebi @LeviMorrison @marcio @Andrea you were wondering what would be the best syntax for `typedef`? my idea is that it should be:
union ABC{
    A;
    B;
    C;
}
because we can have generic unions as well:
union ABC<$T1 is Baz>{
    A;
    B<Foo<$T1>>;
    C<$T1>;
}
 
@salathe yeah I know, I'm getting too it ... I changed the API, like class into interface, and I'm not really sure how to document that ...
and moved methods ...
last time I removed something from the manual, someone opened a bug ... are we supposed to remove manual pages if classes go away or what ?
 
@JoeWatkins trying to eliminate EX(call), making fcalls a slight bit faster and having arg freeing being managed by liveness
 *                             +========================================+
 *                             | ARG[N+1] (extra_args)                  |
 *                             | ...                                    |
 *    EX_CV_NUM(-num_args) --> | VAR[0] = ARG[N]                        |
 *                             | ...                                    |
 *                             | VAR[op_array->num_args-1] = ARG[1]     |
 *                             +----------------------------------------+
 
I haven't looked at this livelyness thing much yet, is there explanation anywhere ?
 
Abe
just got the declaration working, i only need to modify the parser :D
 
10:23 AM
@JoeWatkins no, not really… it's just ranges where certain temporaries are alive and need to be freed in case there's an exception in between
 
oh that sounds simple
what kind of gains does bench see ?
 
@JoeWatkins I haven't even compiled yet… making a lot of changes first
 
/me awaits result
 
Me too… I hope everything is going to work out, but…
 
Abe
opinions, bwoebi? (read it like youtube.com/watch?v=wOdfNwD9cEA :D)
 
10:26 AM
yeah... php
union ABC<$T1 is Baz>{
    A;
    B<Foo<$T1>>;
    C<$T1>;
}
wtf
do you really mean union ?
 
Abe
i do
 
wtf?
@JoeWatkins not "yeah… php"; Changes have massive impact either way…
 
oic
I don't think you mean union, that doesn't make sense ...
 
Abe
or something like
union ABC<$T1 is Baz> includes A<$T1>, B, C;
 
you're going to get brain all over my office ...
 
10:29 AM
здравствуйте
 
hai @DejanMarjanovic
 
I initially wanted to retain order, but I realized I need to be able to pass more args… and I can't really just push it at the end, because I need it in a continuous block, and that's not possible because interleaved fcalls
Also, this should eliminate some shifting around of args…
 
@JoeWatkins there's a choice to make; if the class came from a version that is no longer supported, you can remove it entirely if you really want. Or (my preference) keep it there but make sure the version info is correct. If you do the latter, it's sometimes good to put a "this is from an unsupported version, you should be using XYZ instead" warning box somewhere.
 
Abe
@JoeWatkins so you have two types, A<$T1 is X> and B, you want to get an union out of them:

A<X> | B
A<XChild> | B
A<XAnotherChild> | B
A<XInfiniteChildren> | B

why not just:

union AB<$T1 is X> includes A<$T1>, B;
 
what about a class that used to be a class and now is an interface with less methods ?
 
10:32 AM
The only side-effect is that internal variadic args now receive a zval array in reverse order, but that shouldn't affect too much code…
 
I think it's going to feel messy ... when php7 is released, the old version will become unsupported ... I know it's not ideal to remove stuff, but for the sake of newcomers I think I have too ...
@Abe concentrate on what can be supported today ...
 
@JoeWatkins I'd like to see a changelog section
 
Abe
union Collection<$T1 is mixed> includes Map<$T1> | Sequence<$T1> | Set<$T1>;
function typeCheck(Collection<Stuff> $stuff){}
 
Andy moderators here? There's a stackoverflow.com/users/5625086/melissa-d-johnson spamming with "buy your dissertation here" links
 
@MadaraUchiha ^ (also, status:confirmed)
 
10:36 AM
is php7 really out tomorrow?
 
Abe
@JoeWatkins i started specifically to have the big picture before any change is attempted to be made to the php type system...
 
Nope, Dec 3rd is the expected date, that's Thursday
 
Thanks @MarkBaker
 
Abe
i deeply believe that modifying the type system must take count of all those features summed together @JoeWatkins
 
@salathe so I could totally change it and have a changelog explaining why I guess ...
@Abe they don't exist ...
 
10:38 AM
@JoeWatkins yeah it doesn't need to be much "Version X.Y: changed from class to interface, removed methods a(), b(), c(), and d()"
 
Abe
@JoeWatkins i'm saying that if levi decides to implement just unions, we need to know how they will work with all future related features...
 
@Abe Firefox is slower for some things, faster for others
 
@salathe I'll do that ...
some weekend soon ...
 
@Andrea Concur. Gecko's indexedDB implementation is a zillion times faster than blink's, for instance.
 
Abe
@Andrea i know that on linux firefox is slightly better... but you wouldn't think that if you used it on windows...
 
10:40 AM
@Abe that's really weird syntax and only works for unions
@Abe ?
 
@Abe looking forward is good, trying to solve problems we don't have is questionable however ... you don't have to listen to me, at all ... but I'd concentrate on the justification and impl. of what we need now ... how it works with features from the future isn't your problem in the end ...
 
Abe
@Andrea on windows firefox feels like i'm running a pentium 3 in the year 2078
@Andrea what other operations could be done with typedef?
 
sounds anecdotal
 
@Abe microsoft have a history of going back to "one" ... a pentium 3 in 2078 might be fucking awesome ...
 
Abe
lol
@Andrea though, don't skip what i said please. this and this. i find that useful, though i'm not sure about the syntax either. suggestions?
 
10:51 AM
Is there a significant performance hit for using sprintf over standard concatenation?
9
Q: Performance of variable expansion vs. sprintf in PHP

elitalonRegarding performance, is there any difference between doing: $message = "The request $request has $n errors"; and $message = sprintf('The request %s has %d errors', $request, $n); in PHP? I would say that calling a function involves more stuff, but I do not know what's PHP doing behind th...

^ For reference.
 
significant in what way ?
 
Abe
i use 'baz' . $baz . 'baz' most of times
 
@AwalGarg Handled by another mod
 
you can probably measure the difference, but it really doesn't matter ...
and if it does matter, then php is the wrong language ...
 
@Abe and how are you going to call combined types like A & B ?
 
Abe
10:56 AM
@bwoebi intersection AandB<$T1 is Baz> includes A<$T1>, B; maybe?
 
And mixed variants?
 
Abe
@bwoebi example?
 
(A & B) | C
@JoeWatkins I'm really waiting for the times where every constant factor will be negligible…
 
Personally, I always find using sprintf() to be more easily readable
 
@Abe that's confusing syntax to me
I don't see what's wrong with the traditional syntax
 
10:59 AM
@MarkBaker It depends… if you have simple vars, no, not really… If you interleave fcalls etc, I can understand why sprintf() can be more readable…
 
Abe
@bwoebi
when named can only be either unions or intersections, unless you name them both:
intersection AandB<$T1 is Foo> includes A<$T1>, B;
union AandBorC<$T1 is Foo> includes AandB<$T1>, C;
or even
union FooAandBorC includes AandB<Foo>, C;
 
@Sean yes, but unless you're Facebook you definitely shouldn't be worrying about it
 
@Andrea Yeah, such is the way with most of those trivial choices ^^
 
@Abe I don't like that too much… You're going to have a bloated syntax where people use dummy identifiers to get their expected expression
 
Abe
and actually also this would be supported:
union AandBorC<$T1 is Foo> includes (A<$T1> & B<$T1>), C;
well, my point is that also named unions and intersections could be parameterizable. i have no idea about the syntax
if you help me defining one, i will use it in my lib...
 
11:04 AM
@Abe aliasing things that aren't unions
 
Abe
and why not have a dedicated syntax just for that?
 
It's unnecessary complexity
Hack and C have already solved this problem well. Don't reinvent the wheel without a good justification
Programmers don't want to learn two different syntaxes for unions
 
Abe
do we agree that parameterizable named unions/intersections would be useful?
 
If we had generics, perhaps. That doesn't require your syntax
 
Abe
okay, feel free to suggest :D
 
11:09 AM
typedef Foo<T> = Bar<T> | Baz;
 
^ this.
 
Though I think it is worth focussing on what we actually can do now. I don't see generics getting done or in for 7.1
 
Abe
typedef Foo<T is Qux> = Bar<T> | Baz;
hmm... it's ok, i just dislike "typedef"...
 
@Andrea generics are nearly just as a big topic as scalar typehints I feel.
 
Call it type then
@bwoebi sure, but they're also much more complicated
 
Abe
11:13 AM
@Andrea that's for sure... no need to rush, needs proper testing first
 
@Andrea true
 
Abe
@Andrea this is why i'm doing this... :P
once you get all the semantics defined and working and we are sure they are tested... magic could happen
the more i get into them though, the simpler i think they are
i thought variance would have been an hard topic, but it's actually very simple to understand
 
The biggest problem with generics is the fact that every piece of code that is dealing with accepting objects of certain types, uses zend_string as a representation of type and there are hundreds if not thousands of places like this
 
@nikita2206 and it's not just internals either
 
@Andrea yup
 
11:21 AM
@Abe variance is a hard problem to implement though due to PHP's lazy behavior
 
the task is to implement it in the binary compatible way
 
@nikita2206 hmm?
 
@Andrea EOTHER is the only error code Win32API has
 
@nikita2206 we're going to have to change the type representation either way.
 
@bwoebi I'm not sure it can be done in 7.* at all
 
Abe
11:23 AM
with type representation you mean that one attached to objects?
 
@nikita2206 why not? we allow that degree of internal break. And I doubt the break will be that important. At least most funcs don't ever interact with higher level types or even the structs holding these.
It's nothing like the zval and hash API changes which impacted really everything.
 
@bwoebi I mean, zend_arg_info will need to be changed. Well if everyone uses macros for constructing arg_infos then I guess you're right
zpp also
 
@nikita2206 which everyone does.
zpp? why?
only the zpp funcs
 
although there could be another version of zpp that would support new features
 
the signatures need no change?
@nikita2206 that's why we expect zval then and then verify type for these special cases. … we don't need special zpp there.
 
Abe
11:28 AM
more info about the zend_string representation? because even with generics it's still a string
unless i'm missing something..
though you guys are too negative sometimes... i hate that you don't share the same excite i have for such a great feature :P i understand it's not going to be easy to implement... but that's not a valid reason to get down about it... :D
 
11:47 AM
Hi, can any 1 tell me if open cart stores theme names as reference in db?
 
@noobie-php I doubt anyone here knows. but why dont you check the database and find out?
 
@Gordon: i am currently looking in my DB but cant find it, i just asked for reference i.e may be i missed something
 
no clue. sorry.
 
I get that feeling that @Gordon is more active here since stepping down as SO mod… ^^
 
@bwoebi doubt it, but feel free to analyze the transcript ;)
 
11:58 AM
Hey @Gordon , why'd you step back from moderating? No time?
 
@BenjaminGruenbaum yes, that's the main reason. when I was elected I was working from home and had full control over how I spent the day. Then I took a permanent position, which required moving and commuting. That had a noticeable impact already. Then the baby was born …
 
Yeah, that makes perfect sense. Thanks for your service.
 
you're welcome
 
When you check your 11 year old daughters phone to make sure they are being safe, and see this ... https://t.co/q1d1jbvh4x
11
 
12:07 PM
lmao
 
haha
She's learning ;)
 
@JoeWatkins It must make your heart swell with pride, even if it is PHP 5.5.12
 
@JoeWatkins congrats… can I get a sister with the same attitude please? :-D
 
Just make sure she gets composer, phpunit, etc as well
 
@DaveRandom wow
 
12:18 PM
hehe, tis pretty cool ... I dunno what she was doing ... I must get her a desktop computer ...
 
@JoeWatkins or better get her a laptop…
 
@Andrea (was sarcasm if not obvious :-P)
 
@DaveRandom oh
 
she has access to one of those ... gets interrupted by brother and mother though ....
 
@JoeWatkins nah, her own…
 
Anonymous
12:20 PM
@Gordon +1 for becoming a dad in your 30s.
 
@JoeWatkins and put everything on it but Windows…
 
Windows is the only decent non-Apple desktop OS though
 
@Andrea - I assume you're talking Desktop, and not <barf bag="ready">Metro</barf>
 
Metro's dead, Jim
 
So's IE7 (officially), but we know it's like Lord Lucan..... somewhere out there
 
12:26 PM
I mean, the full-screen UI of 8 is dead. Which is a bit of a shame, but it is
 
Only if by "a bit of" you mean "not even remotely"
 
1:14 PM
Hmm I have to create a new company website where only me will be making changes.
I don't think there is a reason I should use a CMS in this case.
 
posted on December 01, 2015 by nlecointre

/* by Frankie */

 
foo
 
bar
 
o/
 
¯\_(ツ)_/¯
 
1:40 PM
Good morning
 
morning
 
1:56 PM
@NikiC this should be the standard programmer greeting.
 
Flagorama in the C++ room this morning
 

« first day (1872 days earlier)      last day (3067 days later) »