« first day (1943 days earlier)      last day (3230 days later) » 

00:00
I don't think that's the right direction though. Think of SplDoublyLinkedList
The solution should work for something that isn't necessarily based on a buffer.
But that brings us back to square one with zend_object_iterator
Iteration would just have to remain slower for now.
if it's not base on a known thing, such as a buffer, you have to use an adapter, what zend_object_iterator is
@LeviMorrison you answered "shortcutting" :D
@NikiC bah… there I have a better trick … env USE_ZEND_ALLOC=0 and then command script import lldb.macosx.heap … ^^
okay, now I have to guess what the datastructure is … size 272, address at offset 40
first 8 bytes are 0xff, weird
posted on February 09, 2016 by kelunik

- Disable peer verification if specified in options with `verify_peer_name` on legacy systems (PHP 5.5)

andat the other location first 8 bytes are 0x00
so not a zval nor a refcounted type
looks like some array of pointers…
@NikiC @rtheunissen what if instead of using a zend_object_iterator, we ask the object a foreach handler, which we use in a while loop. This handler moves the pos itself and return the current value.
00:12
Isn't that just zend_object_iterator though?
it could use zend_object_handler
but to be consistent I think it should be in the zned_object_iterator
Sorry meant iterator..
we just had a function for foreach
the same way we have a get_current one
so the internal iteration is optimized for the custom data structure
I think there's an outside loop though
You can't yield in C, so there's a handler around both the array and object case.
Could be very wrong on that though.
" so there's a handler around both the array and object case. " don't understand, sorry, not native english
00:19
You'll see that there is no loop within that opcode handler
Roughly: if valid, set current data, move forward, continue
6048 while (1) {
So an internal iterator (like what Vector::filter would use) can't be used for foreach
That while(1) is just to skip deleted buckets I think
y my bad
" I think there's an outside loop though " just made sense :D
I'm very new to all this so I'm not sure about it either
me too, I started to learn with Joe's youtube videos
00:26
Yo yo yo.

I'm trying to wrap my head around mysql connections.

So with an average low performance server. Let's just say 1GB RAM Lamp with average processor speed. How many mysql connections can be open concurrently?
@user2800382 try it :)
Lol I'm guessing tehre are tools that allow you to 'load' up the server in a development environment right?
@bwoebi can you share the dump?
@NikiC figured it out, was arData
@user2800382 haven't you googled that ?
00:30
@bwoebi and did you track it down further?
@NikiC yes, still tracking
1:30 am ... damn. And my GF doesn't yell at me <3
CU guys, hf and gn :)
@NikiC oh, I see
There's a problem in php-src
Cyclic reference not detected by garbage collector involving Generators
oh
it's a known issue :D
I might even have a bug logged for it...
goddamn :x
00:35
I haven't bothered to implement that get_gc handler yet :D
fml
because Generator->value is only destroyed at dtor of the generator itself
@NikiC :-(
Reverse engineering memory is not fun… pah.
posted on February 10, 2016 by kelunik

**[Commit Log](https://github.com/kelunik/acme/compare/1fd1eb2028623424957f47ee687bc75f7aa0b577...386f6692e247e73ddc1550abf45e408b35bb8c0a)** - Fixed `Registration` constructor types - Added documentation - Disable peer verification in `selfVer...

And the worst about that is that I'm unable to break that cycle… pah.
no unsetCurrent() for me … pfff
@NikiC I totally now need to bother you every day until you have implemented it :-D
01:06
@NikiC general question: what do you think about requiring the & on caller as well as on callee side for pass-by-ref? from a language standpoint (technical advantages aside ;-))
 
1 hour later…
02:24
0
A: PHP's Infinit value in Bitwise Operations returns strange values

AndreaFirst off, ^ itself isn't what's special here. If you XOR anything with zero, or OR anything with zero, you just get back the original answer. What you're seeing here is not part of the operation itself, but rather what happens before the operation: the bitwise operators take integers, so PHP con...

02:35
@Andrea cool, was wondering about that, but couldn't quite find in the code where the change happened.
@jbafford I finally did just now
updated my answer
03:21
That email again. https://t.co/eIK3ycUB42
my answer's even better now
links to the C99 standard :D
04:18
hello guys
any one here ?
nope
:) it mean yup
@jbafford
can u give me suggestion ? what is better between core php vs framework
your question is unclear
do you mean, why use a framework, like say, Symfony or ZF, as opposed to not using one at all?
in general: a large part of your app is uninteresting boilerplate (routing, request and response handling, library abstractions, etc). Frameworks implement that boilerplate for you so you can focus on writing the code that makes your app actually interesting.
In theory, it'll be higher quality code than you could ever write yourself, because many other people have worked on/tested/improved it.
04:30
hmm right say
You'll also take a hit in fine-grained control and runtime efficiency (each framework will impose a certain way of doing things; and being as generic as they are imposes an efficiency burden), but make it up in programmer efficiency (you won't waste time writing that crap).
hmmm right
I hear that when working on framework project, it become difficult to handle for large applications. it is true ?
I would highly recommend using a framework to start with, and then if your application has performance problem, then work around or remove the framework selectively.
but in core php it become easy for large applications
Probably your application will not actually get to the point that the framework is a performance burden.
If it does, you need to weigh the costs of how you want to proceed: do you just throw more hardware at it (which shouldn't be too difficult, if you at least design your app to assume that that will happen, which you should, because that's the only way you're going to get redundancy anyway)? Do you replace parts of the framework? All? Refactor part of the application out and onto separate hardware/with a lighter framework/etc?
04:40
it's also good to know how to wire shit together yourself, github.com/PatrickLouys/no-framework-tutorial is a place to start with that
/me nods
it's a lot easier to appreciate what a framework does for you after you've tried to (poorly) write your own framework.
hmm @jb
what mean in simply
@jbafford thanks to reply
It's not at all bad. Core PHP helps you write the code and understand the code. when the developer at begin stage, we strongly recommended to learn Core PHP, cause we don't want to see you as a bad developer. According to World theory, easy always gives best result with strong base. As per the world theory, if you know core PHP, you would reach your goal by using framework PHP
user924016
04:57
any of you got exp. with CVE's?
user924016
and mornings
morning
user924016
I got this msg on twitter today "@skansing, Hi, thanks for discovering those problems fixed in WordPress v4.4.2. However, cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2222 … still needs filling in." ... so the cve-2016-2222 is the ssrf vuln I reported to wp.. but do I need to do something regarding the CVE?
No having any idea about that Ronni :-(
05:06
nope
user924016
05:28
@ircmaxell sorry to ping you, I hope you can help me with the question regarding feedback/filling CVE ^
indeed
@AnmolRaghuvanshiVersion1.0
'nin @Anmol
06:27
good morning, room
Wes
Wes
\o
Hi All
SELECT t1.teamid, t1.teamname, GROUP_CONCAT(t2.name SEPARATOR ' / ') as teammembers, SUM(t3.score) as overallscore FROM teams AS t1 INNER JOIN team_members AS t2 ON t1.teamid = t2.teamid GROUP BY t1.teamid, t1.teamname INNER JOIN stage_responses AS t3 ON t1.teamid = t3.teamid GROUP BY t1.teamid
^ What is wrong with this code?
For information, the stage_reponses table is empty
06:47
I don't think you can have two separate group bys. feel free to prove me wrong
SELECT
  t1.teamid,
  t1.teamname,
  GROUP_CONCAT(t2.name SEPARATOR ' / ') as teammembers,
  SUM(t3.score) as overallscore
FROM teams AS t1
INNER JOIN team_members AS t2 ON (t1.teamid = t2.teamid)
INNER JOIN stage_responses AS t3 ON (t1.teamid = t3.teamid)
GROUP BY
  t1.teamid,
  t1.teamname
@FélixGagnon-Grenier ok thanks
this is actually printing 0 rows
I have content in t1 and t2 but not in t3
inner joins might have that effect. left join will return rows with null values....
yup you are absolutely right
Thanks :)
Wes
Wes
07:05
the sum was giving double value. so I modified the query
SELECT
  t1.teamid,
  t1.teamname,
  GROUP_CONCAT(t2.name SEPARATOR ' / ') as teammembers

FROM teams AS t1
INNER JOIN team_members AS t2 ON (t1.teamid = t2.teamid)
LEFT JOIN (SELECT SUM(score) as overallscore FROM stage_responses AS t3 GROUP BY t3.teamid) AS t3 ON (t1.teamid = t3.teamid)
GROUP BY
  t1.teamid,
  t1.teamname
^ this isn't working
seems like I can't even debug a query
Good morning!
Still alive 'eh @FélixGagnon-Grenier
you have to actually select the overallscore from the subquery @Mr_Green
yeah, trying to @Epodax :P
07:18
Get some more coffee
and also... the syntax is off. you have like two t3s right there
@FélixGagnon-Grenier I am completely new to this queries somehow made this
what am I missing here?
please
basic query syntax. You can't have two group by nor two identical table aliases
@Epodax if I do that I will never sleep. I still nurture the idea of sleeping before the sun gets up..!
@FélixGagnon-Grenier Resistance is futile :p
that it is...
oh well, I'll drink more beer, that might actually get me really tired faster
07:21
It certainly works for me
thanks I updated the query which isn't working
SELECT
  t1.teamid,
  t1.teamname,
  GROUP_CONCAT(t2.name SEPARATOR ' / ') as teammembers
FROM teams AS t1
INNER JOIN team_members AS t2 ON (t1.teamid = t2.teamid)
LEFT JOIN (SELECT SUM(t3.score) as overallscore FROM stage_responses) AS t3 ON (t1.teamid = t3.teamid)
GROUP BY
  t1.teamid,
  t1.teamname
Back when I was getting off my sleep meds I used to drink a couple of beers or a shot the start of it, just because it made me so damn sleepy.
lol.... must be great on health :p
SELECT
  t1.teamid,
  t1.teamname,
  GROUP_CONCAT(t2.name SEPARATOR ' / ') as teammembers,
  t3.overallscore
FROM teams AS t1
INNER JOIN team_members AS t2 ON (t1.teamid = t2.teamid)
LEFT JOIN (
  SELECT
    SUM(score) as overallscore,
    teamid
  FROM stage_responses
) AS t3 ON (t1.teamid = t3.teamid)
GROUP BY
  t1.teamid,
  t1.teamname
few things @Mr_Green. You have to select the field on which you want to join the subquery. you also have to select the field from the resulting subquery like any normal field
I don't drink a lot in general, so I don't think it was all that bad :P
anyways, who ever said meds and alcohol was bad, can't be true!
07:24
Hehe, well, I didn't MIX them, I was getting off one and starting the other xD
like a boss
I probably took way worse shit than that in my life
@FélixGagnon-Grenier great thanks I am referring your code now. working fine.
I find stopping drinking alcohol was easier than sleeping meds. Sleeping meds can be annoying addictive.
@Mr_Green cool man. hope that's the first of many sucessful queries
haha yeah first was ofcourse select * from table :)
07:26
yeah I guess so.. never took any, though if I stop alcohol I might realize I can't sleep as well
we all start somewhere :p
Indeed ^^
@Wes that is an underrated post.
Wes
Wes
puff. and phpstorm disappeared while i was writing in it. no errors. it just closed
did you accidentally write ctrl and q?
Wes
Wes
nop
07:34
moin
(I'm at that point of the night where when I say stupid shit like that I find myself funny. hehe)
o/
morning champs!
@JoeWatkins please change you handle to @TheWatkinator
(for no other reason than shits and giggles)
07:57
morning
Wes
Wes
it's so satisfying when it happens that you finish doing some work early in the day. yay, i have (possibly) a day off
08:32
morning :D
@Wes For me that would be a day of fiddling with the thing I just finished
Hoodie arrived! Bonus photo with the fluffies :D https://t.co/cGifGTU2Zy
Mornin'!
08:49
@Sean Your twitter top picture is funny
@Jimbo Height of my maturity :P I wrote a small bit of JavaScript to convert all tags, text, etc. into "butt"
Then inspected it using firebug, man that was a little way back now haha
Morning.
morning
morning
Wes
Wes
@DaveRandom if it was something cool, i'd do that too... but it isn't
09:04
posted on February 10, 2016 by nlecointre

/* by The Chaos */

2
@Jimbo how do make the "morning" like tag ?? just curious :D
[tag:your-tag-here]
[tag:tag-tag-tag-:D]
oh
Wes
Wes
no spaces maybe, and a-zA-Z0-9-
Yeh there are limits on the chars allowed, I forget what they are exactly
No, + and # at least are also allowed (, )
Wes
Wes
right
@Sean she doesn't look very fluffy to me..
it turns to lower case #D...
oh
@Andrew chat.stackoverflow.com/rooms/1/sandbox for a lot of playing with chat please :-)
@DaveRandom Sorry :(, too excited. its the first time I discover that
09:09
Mornigngifd
@DaveRandom thanks :D
@PeeHaa
Huh, never knew the comment of an SSH key was important
ormingn
Changed my private key comment and my passphrase wouldn't work
@PeeHaa \o
09:12
@Sean That should matter
do you mean shouldn't ?
Yea :P
:p Well, it did for some bizarro reason
yeah, I don't think it should matter either ...
2
A: How can I change the comment field of an RSA key (SSH)?

jhcaicedI just did a small test modifying the "Comment:" line of my private RSA key and it appears to be fixed at creation of the key. It is a RSA key generated with Putty, and after modifying the comment in the key, the passwd did not work, i have to reverse the edit to the same original comment for i...

TIL
09:15
Is the key encrypted?
what happens if you omit the comment completely ?
remove/omit
Yep
"Couldn't load private key file (file format error)"
The file is probably has a MAC that you've invalidated
I think we're talking about removing the comment from the public part of the key
@JoeWatkins private
09:18
oooh ...
you can't change the private part ...
Like that answer, importing it back into puttygen, changing the comment and re-saving the private key works fine
I didn't read it properly ...
or your original question :D
don't worry, I didn't write any code yet today ...
@Leigh I assume this, I doubt the comment is actually part of the key, it's more likely treated as a checksum
@Sean Look at the difference in files, there will presumably only be a very small difference in the base64 part
@DaveRandom Yep, the Private-MAC key is the only thing that has changed /cc @Leigh
(That and the comment :p)
09:39
@Ocramius Generic factories? As in, a factory that returns random objects or ones of a certain interface?
welcome @tereško
rning
@DaveRandom I don't have a Comment: line in my key, so it's likely that he has some weird format that does checksums
(I have a comment in my key, but not a "Comment:" line)
@bwoebi I think it would be good for clarity. It would make obvious that it's sort(&$array) and not $array = sort($array) etc.
@FlorianMargaine E_PUTTY probably
09:41
Generally, if the compiler can't figure out what it means, it's not a bad guess that the programmer can't either :P
it does a few weird non-unixy things
@DaveRandom eff it then
@bwoebi I can do a dirty fix for your particular issue :D
Morning folks! I
09:49
moin
@Jimbo FooFactory#__invoke(ContainerInterface $c) : Foo
that's the kind of setup I have. While tightly coupling the container internals via type hints (in specific "macro-factories") can bring some advantages in compiled languages, in PHP that is just a useless complication, and increases maintenance load by a lot from my experience.
pretty satisfying point to be imgur.com/ha3Nyaj
is anemic domain model considered needed to be avoided??
Huh. Am I missing something? Locally, htmlentities('£') appears as '£', but on our staging domain it's showing as £.
@Andrew to be avoided
09:57
The charset on the page is UTF-8, naturally.
Is it put into a table then fetched out again?
!!canon utf8
533
Q: UTF-8 all the way through

mercutioI'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL and...

@Ocramius thanks :)
(check table charset on your staging domain)
09:58
@Andrew note that anemic domain is perfectly ok for CRUD-only apps, but you must be 100% sure that what you'll have in the future is also staying CRUD-only
@Ocramius Hmm, to be fair I __construct(Injector $injector), although tbf I can do away with service location in my factory and even just directly inject some of the specific objects needed to help with the complex object creation. I do tend to be more explicit in my factories - even if it means a few more classes
@Jimbo that couples your factory with the lifecycle of the container. Are the lifecycles of those two equivalent?
(it is kind-of a big assumption)
all my factories are stateless
Hmm, why would they be different?
the same factory may as well be used in different contexts.
Anyone here use Drupal?
10:01
@Leigh Nah. Just hardcoded ^^
@Jimbo service location is 90% of what the factory internals do, tbh
@Ocramius I find them useful for things I don't have a compile time, like request parameters. But still, I don't get how two lifecycles may be different (in fact to be completely honest, I've never seen this - could you give me an example ELI5?)
@Sean I'd say the charset is being overridden somewhere then. Are you sure staging is a replica of production down to the last detail?
@Jimbo request parameters are not a service... so why do you do that stuff in a service factory?
@Ocramius I can have factories for things other than services
But tbh, that's how I've done it in the past and you're entirely right
10:03
Yeah, we're talking about service factories in that thread
Yep, forgetting about application and domain layer seperation
anyway, if you re-use the same factory to retrieve a service between two different request lifecycles, assuming any of your services may retain state (this happens, sadly), you have a problem
because now your factory has this retained state by transitivity
Hi guys
@Ocramius Are we talking things to do with websockets and servers, for example, because in PHP the typical request -> response -> dead means that I'd never need to keep something between two request lifecycles
Check out my question, Really need help
-1
Q: Login with Facebook got Error on server

Vintage BeefLogin with facebook doesn't work on my server but it worked on localhost check out error on My site My login.php <?php ob_start(); include 'init.php'; require_once 'config.php'; //initalize user class $user_obj = new Cl_User(); /*********Facebook Login **********/ require_once('Facebook/Face...

10:05
(except obvious stuff like session etc)
@Jimbo workers, websockets, even just simple http servers
Ah, now I get it. In an event loop for example
php devs are sloppy in this, but it's getting better with PSR-7-based dispatchers
I just wish PHP supported function autoloading - I'd get rid of any risk of state injection in service factories, heh
I think a lot of PHP devs aren't doing what you're talking about though, using workers, websockets etc
Building PHP docker containers! My image was 4GB!!!! I just reduced it to 1.8GB, still too big, but a big saving. Has anyone else got any experience with keeping their images nice and small ?
10:08
And those that do, well they'll be aware of this
I wiped composer cache, npm cache, node_modules dir, cache/logs dir.
@PaulDragoonis AFAIK there are several project which target tiny containers
@PaulDragoonis start them from alpine linux
@Jimbo @Ocramius thanks for the interesting conversation :) will be keep in mind
10:10
@Jimbo that is changing. Even just re-running an e2e test twice and running memory profiling on it shows the leaks
@PeeHaa I am using a base image of php:php-56-fpm. On top of that I'm using 1.8GB.
What's a "base image" ?
@PeeHaa a previous layer. Usually started from an ubuntu box
@PaulDragoonis start from an alpine linux image, then install php-7-fpm on top of it
@Ocramius No wonder it is big :P
yeah
@PaulDragoonis btw, you can't really make docker images "smaller". Due to the immutable FS structure, they will always eat up more space as you add layers
10:15
Morning
the trick is having few layers, and small ones
@PeeHaa it's the image you inherit yours from, to re-use an existing image.
And don't do anything silly like building PHP inside the container
How you guys would approach the classic problem when you pass some parameters via HTTP and you need to distinct types for them? It will arrive as a string obviously, but let's say you need to distinct stuff like "42" (as a string) and 42 (as an integer)
easiest way I'm thinking of: packing to something that supports it (json, for example)
Can't you infer type from the parameter name?
10:18
no
i.e. you know the parameter named "price" will be an int
unfortunately, I can't
Not a problem I've had before, but simplest would probably be JSON encode as you suggest
@Leigh in ideal world :) But there are things like "attributes" which are things like "cpu_frequency" / "weight" (those are ints) or "brand name" / "manufacturer name" (those are strings) and those attributes are dynamic - I don't know even their names, the comparison type can be only determined by value
yeah, packing might be the easiest way
Bash is so rediculous sometimes, you need "fi" on its own line. I gotta do this.,

if [ -z ${SYMFONY__DATABASE_HOST} ]; then echo "env[SYMFONY__DATABASE_HOST] = ${SYMFONY__DATABASE_HOST}" >> /usr/local/etc/php-fpm.conf
fi
10:22
I think most people would put the bit after the semicolon on it's own line too
Damn you ninja @Leigh
well, after the "then" at least :x
Yeah
morning
I miss pascal ... if cond then begin end
10:24
VB FTW!
@kelunik Mogguh
you mean if condom then begin end
:p
no...
@Leigh I have 25 of these commands, trying to keep line numbers down to a minimum
It's looking like this.

if [ -z ${SYMFONY__DATABASE_HOST} ]; then echo "env[SYMFONY__DATABASE_HOST] = ${SYMFONY__DATABASE_HOST}" >> /usr/local/etc/php-fpm.conf
fi
if [ -z ${SYMFONY__DATABASE_USER} ]; then echo "env[SYMFONY__DATABASE_USER] = ${SYMFONY__DATABASE_USER}" >> /usr/local/etc/php-fpm.conf
fi
acceptable, but my OCD says that "fi" is looking lonely and needs to be up there with its friends :)
@PaulDragoonis Why?
just put them all into their own script and run that?
10:29
Did you just suggest to make 25 scripts? I assume I've misunderstood.
@PeeHaa Found a bug in your amphp socket lib with the acme client btw. :-)
To be honest, I could make a wee bash array and just loop over them.
Stupid PHP 5.5 and SSL.
@kelunik Wrong ping?
@PaulDragoonis Put all of the commands into a single script, and then run your fpm-gloop.sh >> fpm.conf
10:30
Okay, thanks for the advice
@PaulDragoonis It doesn't have to be on it's own line. You can easily do if [ something ]; then echo Wowzers; fi, but it's not really legible that way when you have long commands like yours.
@PeeHaa Nope, just pinging you to show that I'm actually working on it and you should try it eventually. :P
@Oldskool nope, i tried, syntax error.
@kelunik :D
The base library even has 2 tests now :-D
10:32
I got an email from letsencrypt about renewal hence I started looking at it again. Was planning to work on it this weekend, but I am waiting for your work to be done. So I can properly test it and contribute when needed without having two people working on the same bugs/things :-)
@PaulDragoonis omit brakcets
if test "$1" -eq "thing"; then statements; fi
like that ...
oh wait, that should work
I never read stuff properly ...
0
Q: How to post and read base64 encrypted data

Mathiasive just decided i want to learn how to encrypt data on my site so far ive been looking at base64 for my ajax, and then sha256 for database. but now im wondering about my post method. how should i encrypt my data. by doing one encrpytion on the entire string data: "type=" + window.btoa(escape(...

@JoeWatkins okay, thanks
10:50
> Spelling and grammar improved.
O.o
Not sure if sloppy or indian
2
E_WHAT!?
encodeing
--> encoding

« first day (1943 days earlier)      last day (3230 days later) »