« first day (1842 days earlier)      last day (3112 days later) » 

Abe
12:52 AM
evening
 
o/
 
Abe
yo \o
 
Anonymous
\o
 
Anonymous
I just put 8 developer tool logos from front-awesome into my CV.
 
Anonymous
[root@John Doe ~]#
 
Anonymous
1:03 AM
the header ^^
 
Abe
i'm changing an existing project to experiment some stuff - like using the model for previewing a set of changes without actually committing them. it was already possible but since i was using too many exceptions that would have been a pita. still...
just pretending this is a good idea.
 
Anonymous
1:36 AM
@Abe that picture describes my life so accurately, I almost died laughing :)
 
Anonymous
I might just frame and hang it on a wall
 
Abe
you should have starred only that, not my awkward engineering
:D
there:
user image
9
and btw, i almost died laughing too
 
Anonymous
I could star that everyday :D
 
Abe
one of the best memes i've seen this year :D
 
Anonymous
I was not however laughing out of joy. It was a sadness laughter. :)
 
Abe
1:43 AM
haha
it's fine, it will be like that for your entire life
 
that's a face i make xD
 
Abe
especially considering you are a programmer
 
Abe
1:59 AM
i heard @PeeHaa went trick or treating dressed as haskell programmer tonight
 
2:15 AM
@NikiC Could I get another review when you have some free time? github.com/php/php-src/pull/1494 both builds pass now
also anyone else who has some free time, is bored
Also some more tests are probably in order
 
 
1 hour later…
3:42 AM
for some reason a TTF font doesn't decode on the website, but when I download it, it works fine in Windows. Any idea? rxtron.com/me/splatoon/index.html
 
void RFC vote at 24:7, has stuck that way for a while. it's plateaued already?
 
@Andrea you would get a 25:7 from me if I had Karma!
This will just facilitate my love for refs + void though..
Which is way better than multi-return any day
@Andrea also you hate Google+Facebook, but use the beast that is Twitter
When are we all migrating back to IRC...
 
4:40 AM
moin
 
Morning
 
morning rtheunissen
 
 
1 hour later…
5:50 AM
yesterday felt a week long ... today is going to feel another week long ...
bike is ready, in showroom of dealership with SOLD sticker on it ... but I'm not allowed to pick it up until Monday still ... so painful ...
 
Just one more day wait :)
 
6:43 AM
omg, someone on my facebook said "trickle treat" ....
I didn't know I knew anyone that stupid ...
 
6:54 AM
hi
 
7:44 AM
:-)
 
 
4 hours later…
11:38 AM
@hakre yeah, I think so
@Danack that's exactly what it looks like: it is normal to ask like that in Germany to avoid any gender ambiguity.
 
> This will just facilitate my love for refs + void though.. Which is way better than multi-return any day
@Ocramius Under what scenarios could it be legal to specify the gender required for a job position?
 
what's up folks
?
 
@Andrea How good is your Japan? Can you translate this? :P twitter.com/mashimalofuwawa/status/660646989923639297
 
12:13 PM
mornin
 
1:14 PM
@Abe :P
Mornign
 
Abe
o/
 
1:45 PM
 
@Jimbo written your PR for Auryn yet?
and morning!
 
That's actually why I've come online, I'm going to take a look now ;)
 
@Danack Which PR?
 
Auryn - there was a thing that was removed between 0.14 and 1.0 - being able to do:
 
Ah that parameter argument?
 
1:51 PM
$injector->delegate('SomeClass', 'someCallable', [':foo' => 'bar'])
@Jimbo I think just copying what leigh(?) did in that original patch would still be appropriate.
yep.
 
I wasn't planning on just doing that >.>
Although, a lot's changed since then
 
Yeah, I meant applying it by hand, not an automated merge.
 
I know :)
 
JSG
2:48 PM
Is there anyway of taking the cookies and session details and send them into header location redirect?
 
Abe
3:02 PM
@JSG sounds like a really bad idea
 
Hi! :]
 
@kelunik *Japanese and no, I can't translate that, but Twitter has automatic machine translation
 
Yes, both Google and Bing have it, but it doesn't make sense to me. But was actually to another user probably, not me.
 
Yeah
 
Abe
3:25 PM
Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space Ctrl+Space
 
@Abe Do you ever press Ctrl+Space?
 
Abe
i do, when i have no hopes anymore
actually i've disabled the autopopup, i prefer having it only when i need it, otherwise it just slows me down
 
JSG
@Abe I am using CURL to transfer data to a URL (encrypted data) which is getting sent. Next thing i need is the user to now land on that page to complete the purchase. Now i can transfer them but the data never follows
what would be teh best approach?
 
Abe
4:23 PM
@JSG you are not giving enough information to properly answer this
i want to improve my repository design, someone's around for some rubber ducking? :D
 
In my app I need to store a huge (hundreds of thousands, maybe even milions) of rows that have an ID and an integer that will be incremented by one many times. I'll be creating up to 50 (rarely more, usually less) new records per second. I figured redis will be the best solution for this. Only I'm not sure which data type I should use - a list, key:value, hash set, sorted set? And how do I get the value of last inserted ID when creating a new one (or incrementing it automatically)?
 
Abe
4:37 PM
is it a map? is it ordered?
also "millions" seems like a job a database should do
 
@NikiC Thanks! Using zend_set_local_var_str() with estrndup() to copy the var name first seemed to work.
 
@Abe you don't need a person for rubber ducking :/
you need/use a rubber duck for rubber ducking ...
 
Abe
i don't have one :(
 
4:53 PM
@Abe
@Abe I'm not sure if it needs to be ordered - I just need to be able to access the integer values by ID
It should be like an expanding array of integers. All I need is an ID (array element index) and its value
I'm using MySQL for this right now, but it's too slow and from what I've been reading I think Redis should be much faster at this task
 
Abe
"how do I get the value of last inserted ID" - so the ID is known or not? read: is actually an id or an offset? will it be populated in sequential order?
are you using indexes in mysql :P
 
I'm afraid I'm not. Could "alter table mytable add index(id)" help with performance?
 
Abe
lol :D
of course that will help
 
It's the first time I'm dealing with enough data to start having performance issues, so never really knew what indexing does.
 
@Andrew It'll help for reading the data, but it'll have negative effects for writing it.
 
5:04 PM
Do I need need to somehow proccess the existing data to use indexing, or just adding an index is enough?
 
@Andrew You just add it to the table
 
Abe
it is enough, but don't do that blindly, you can use an auto increment index, or unique index, which are even faster
 
@Andrew What column(s) do you heavily search by?
 
5:20 PM
I use a numerical ID (which is a primary key and auto incremented) to search for rows and less often a varchar(50)
@tpunt
 
@Andrew If the numerical ID is the primary key, then it's already indexed... If you search the varchar(50) field fairly often, and you don't use wild cards at the start of the string to search (because MySQL indexes strings from the left, IIRC), then you could index that. However, I would be very conservative with using indexes - especially on tables which are written too frequently.
 
My string is actually an IP address. I guess I could use INET_ATON to store it as an integer. But not sure how to handle ipv6
Oh there's INET6_ATON, just found it
 
5:41 PM
Anyone who separates into both application and domain layers, do you label these "Application" and "Domain" directories?
 
Anonymous
yes.
 
Anonymous
I like app better though.
 
@Jimbo /htdocs and /include :P
 
Anonymous
Which domain registrars are good and reliable? I'm transferring my domains from resellerclub due to poor customer support.
 
Abe
5:57 PM
@Jimbo currently, "\TheCompany\Enterprise\*" and "\TheCompany\Applications\SiteXYZ\*"
 
I'm just refactoring to nicer namespaces
 
Abe
sitexyz is not necessarily a specific site, could just be a set of controllers that i can use on several sites
@Jimbo UoW yay or nay?
 
Yay, but only because I haven't seen better, which I guess can be said about a lot of things
 
Abe
using the "dirty" flag on DO's makes me feel dirty myself...
tbh i don't like how uow is usually designed. if i had the time i would have something smarter
but that's the idea, no need for a different name
 
6:17 PM
If you have a parent / child relationship where the child object cannot exist in isolation without having a parent, would it be weird to enforce this by asking for the parent in the child's constructor and having that child call the parent to add itself to it's parents children?
public function __construct(Parent $parent) { $parent->addChild($this); }
I feel that makes logical sense, but then instead of doing a nice (new Parent)->addChild(new Child);, I have to do (new Child($parent))
 
Not weird, and doctrine has to do a lot of that internally (I believe).
 
The could would read much more naturally for me if I were calling addChild, but I'm turning that on it's head :/
Also, children should not know about their parents..
 
Insert, "maybe you don't know about your father" joke here.
 
lol
13
Q: What is the best way to initialize a child's reference to its parent?

Steven BrosharI'm developing an object model that has lots of different parent/child classes. Each child object has a reference to its parent object. I can think of (and have tried) several ways to initialize the parent reference, but I find significant drawbacks to each approach. Given the approaches descr...

> There's nothing to prevent high cohesion between two classes that are used commonly together (e.g. an Order and LineItem will commonly reference each other). However, in these cases, I tend to adhere to Domain Driven Design rules and model them as an Aggregate with the Parent being the Aggregate Root. This tells us that the AR is responsible for the lifetime of all objects in its aggregate.

So it would be most like your scenario four where the parent exposes a method to create its children accepting any necessary parameters to properly initialize the children and adding it to the collect
 
> There are ways of passing messages from child to parent through events.
Fuck that.
 
6:22 PM
So, if the parent is an aggregate root (which is is), I need to be telling the parent to addNewChild($data)
Which makes it a factory method
FML
 
meh - or just not worry about code 'clean-ness' there as it's getting in the way of having stuff be sane.
 
I do find this stuff interesting though, I like code clean-ness :) Hence my brain melting and me not just going "F-it"
But, screw events for basic entities
 
There are problems that are just not solvable.....circular dependencies are probably one of them.
Or at least aren't solvable without making a significant and poor value trade-off somewhere else.
 
Yeah, you're right. I'll stick with enforcing a child only existing for a given parent, it makes sense contextually
 
In particular you could work around the children having to know about the parents by merging the child class with the parent classes......which is a massive tradeoff against SRP.
 
6:29 PM
Bah… why are things from 5.3 still undocumented :-(
 
@bwoebi Because you didn't document them yet! :P
 
@NikiC I did just now.
 
Abe
@Jimbo i don't see nothing wrong with that
much better than the other :P
 
6:44 PM
I forgot do spaces in titles like National Cone Day count when thinking about the number you put for the mysql db type?
 
Abe
@Jimbo the problem is when Child can live without a Parent 3v4l.org/MLhMW
 
@Abe Problem also is that multiple steps have to happen to create the relationship, and one could easily omit that
 
Abe
@Jimbo but you can solve it with this: 3v4l.org/s2151
@Jimbo what do you mean?
if you use oop correctly* you can workaround any problem related to circular dependencies
[*] objects always kept in valid state, and use identity equality (===) when using mutable objects, and == when using immutable stuff
 
7:04 PM
@bwoebi this is a case that could be solved by a superclass
@bwoebi this is a case that could be solved by a superclass
@Danack ick
 
@Andrea your better solution?
 
@SeanDuBois Twitter isn't creepy in the way that Google or Facebook are
 
Abe
@Jimbo did i confuse you :B my english is not very good
 
@Danack I'm not sure. The fact it accepts both suggests constructing a colour object is too cumbersome
 
@Abe Nope, I get it, I just don't like writing new Child, because then I can leave it at that and bam a child exists without a parent
 
7:08 PM
@Andrea it could… but that's not how PHP works, thus…
 
Abe
my example was referring to "child able to exist without a parent"
 
@bwoebi then fix how PHP works
 
Abe
in you case Child::__construct(Parent $parent); is correct
 
@Andrea :-P
 
....no, color objects come from internal representations, and can also represent more detailed stuff. The only option would be to not allow the simple representation. Or to duplicate the functions.
 
7:10 PM
So I can't do new Color("orange")?
 
You can. It's just a pain having to do that everywhere.
 
@Andrea basically, union types often are band-aid for missed common interfaces or with scalars.
 
exactly
@Danack yeah, I can understand that
 
But as the user, you hardly can fix the lib you use,
 
new Colour(Colour::ORANGE); // kill me now
 
7:12 PM
:-D
 
Abe
rofl
 
@Jimbo actually it's ImagickPixel because of reasons.
 
wat
 
Oh yeah, sorry, forgot the ColourFactory which takes an instance of AbstractPixelFactoryProvider
 
> color objects come from internal representations,
it represents other stuff internally....e.g. when you're iterating over the pixels in an image.
So Magick.gif
 
@SeanDuBois also, I use Google and Facebook, it's not like I have a choice
 
7:27 PM
@rdlowrey Do we reuse SSL contexts in Aerys now?
 
Abe
@Andrea you can replace facebook with smoke signals. works for me
 
@Andrea I have managed without Facebook+Twitter google is harder to shake for me
I dropped GMail and everything else, just Google Search
 
@Andrea you need facebook? Also, for most things you can avoid google…
 
but the muscle memory is there, I really should just use ddg
 
Abe
Interlocutor: hey, do you have facebook?
Me: nope, i use smoke signals
Interlocutor: [laughter]
Me: i wasn't joking
Interlocutor: o.o
 
7:40 PM
I hate the idea of the search bubble, that Google just returns results to me that will make me happy and continue using it
And a general dislike for depending on anything that can change at any time
 
@bwoebi yes, I do need to use Facebook.
and I do mostly avoid Google but that's not always an option
 
I don't think I have lost anything from not having a Facebook, and sure glad I don't have a Twitter when I hear about all the stupid feuds that start over it
@Jimbo Christmas GIFs already... I am not ready....
Sure not ready for Chicago winter
 
8:06 PM
@Jimbo Fuck that is horrible
It's COLOR for fuck's sake
 
@PeeHaa colouuuur :-)
 
@PeeHaa coloeur
 
@PeeHaa Is it shit!
 
:D
 
You're not American, you're supposed to be on our side!
Judas
 
8:12 PM
hehehe
@Jimbo Realted: the nazis also weren't murican... I see a pattern
 
Abe
8:30 PM
@Jimbo whenever you want start working on a DD design ping me. i'm looking for something more challenging for defining better patterns. my current projects are too simple with very little logic and they don't really need complex architectures
 
struggling with hexagonal architecure
 
Abe
i feel you @GK123512648 :B
 
lol. in time im sure ill get it just need more practice.
 
Abe
what are you struggling with specifically?
 
well after watch chris fadio at his laracon talk. many things but i dont want to drone with all of them. on question i guess
is what is the purpose of the application layer?
domain - > application -> infra
i know others have different layers and my quesiton is very broad
 
Abe
8:44 PM
i have no idea of laravel, but the application layer separates enterprise's domain from application's domain. for instance it can contain the user authentication @GK123512648
 
You know when you have a tonne of services? You should partition them like this. #php #ddd http://t.co/4DoIAPdQus
 
Abe
correct
 
The reason you abstract the application bit is that the data you pass into that can be from anywhere - can be from a HTTP request from the browser, can be websocket call, can be CLI
API... etc etc
 
Abe
or you can control access depending on the application rather than having it deeply rooted in the business layer
also you don't have to consider layers as finite structures, what matters most is separating concerns. Why would "SupercarManufacturer" (business) care if "FatRichBloke" (application) is only using the first gear?
 
 
1 hour later…
9:53 PM
390
Q: How to check if PHP array is associative or sequential?

WilcoPHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array contains only numeric keys? Basically, I want to be able to differentiate between this: $sequentialArray = array('apple', 'orange', 'tomato', 'carrot');...

They're all horrible answers!
 
Hi! I am trying to wrap my head around the command bus pattern and I am building a very simple sample application.The application is really simple, it consists of a form which users can fill and when the form is submitted, a payment is made and an email is sent to the user and an administrator/moderator. The form data is saved in a file/record/database.
 
@Sherif that's a horrible question
 
I have identified the major commands like RecordUserInformation and MarkRecordAsCompleteOnPayment and have some events like UserCompletedPayment and UserCancelledPayment ... however should the sending of the emails be events or commands?
And should they be triggered by events (like UserCompletedPayment) or should they be in the main flow of the application? How do you go about decided when to use commands and events? Should events trigger commands (doesn't that make a big hairball of interconnected commands and events)?
 
One guy went so far as to write a PHP extension for it.
This is like... "how many ways can you tell me that you don't understand PHP arrays?"
I mean ... seriously
I don't understand how he thinks array_keys_join is any less "overhead" than implode.
 
10:22 PM
Oh, I see. It's the overhead of array_keys, specifically. But good to know he can copy/paste code.
 
10:36 PM
@iroegbu Also, there are no bad questions. Only bad answers.
 
sdd
11:31 PM
@shachibista did you solve the problem, or still need help?
 

« first day (1842 days earlier)      last day (3112 days later) »