« first day (2829 days earlier)      last day (2105 days later) » 
00:00 - 23:0023:00 - 00:00

12:17 AM
hmm ... lemme check
nope, I have nothing
I have either forgotten about it or it was not significant enough
do you remember any context?
 
it referred to metroidvania but in a different way, maybe I can find it in search
ah, found it, Dead Cells
 
oh
yeah, that one is still on the wishlist
the discount was too small
nn
 
g'night
 
1:03 AM
hey guys
quick question
how it's commonly named the row wich contains the seo friendly url in a database?
i mean if the title is How is named this thing the seo field will be something like how-is-named-this
i now i can call it however i want but
idk i want to know that
lol
or should i just make a function and manipulate the string and leave that as the url
 
@GonzaloRodriguez I think typically it's called slug
 
1:22 AM
thanks!
 
2:05 AM
posted on July 14, 2018

New Cyanide and Happiness Comic

 
 
1 hour later…
3:21 AM
nn
 
Hey guys, I'm trying to grasp OOP, and while I understand the basics, what I don't understand is querying a DB and (for lack of understanding the proper wording) storing that array so other methods can iterate over it. For example, I have a User, and Product class. I want to be able to get all Product's that a User has, and (while probably wrong), I have achieved that. What I don't understand is how I can get all of a User's products, and then be able to call $user->hasProduct('Product A'), $user->hasProduct('Product B') without querying the databases each time.
 
@alturic I think you might want to look into caching?
but something like that you should only worry about if you absolutely know performance is going to be an issue, premature optimization is not a good idea
 
3:37 AM
See, and you might be reading my (most likely confusing) question "wrong" per se, but I'm not thinking about this from a performance standpoint *technically*. I'm simply looking at this from a it's crazy to constantly run that query.

I don't think it's caching really either? I have no problem /index.php and /products.php and /whatever.php having to run a *single* query to get the User's Products, that just makes sense for now. However, I use $user->hasProduct() in multiple places on the same page. For example (and heck, I might be going down the complete wrong road here), on a _nav.inc.php
I could easily run a query once, and store their products in $_SESSION, but that just seems... wrong. :P
 
have you looked into SOLID?
 
I don't mean this rudely, in the slightest, but what part specifically?
 
it's past my bed time, so not thinking clear enough at this point, but look into it: youtube.com/watch?v=KHBrDWIKW8Q
 
^ "What principle?"
 
3:41 AM
Alright, I'll watch and read them links. Thanks for your time! :)
 
4:14 AM
Hey me again
i'm trying to make a class for some methods
and i need to do something and then the functions are gonna return that something but doing something more
idk how to explain this
well i'm going to try
i have this class DateToString that has some properties: month, day, year, i'm trying to make a class that giving a date, when accessed in a static wat, it returns the property
sorry for my english btw
like DateToString::month("somedate")
and that returns the name of the month in a string
the thing is i dont want to repeat the first part of the code that is always the same except for the strftime function, so i'ts only a line of code that differs
soo i want to put all of the code that i repeat in the construct function
but i cant access to the property i write in the constructor because i have an error
Uncaught Error: Using $this when not in object context
that error
so... if someone understand what i said haha please help me
understood*
well i have a solution but idk if it's the best solution
initializing the class inside my static function with $obj = new static(); and then access to the property
that worked
:)
 
4:58 AM
Hi any one here
$enquiry = $this->getDoctrine()->getRepository('AppBundle:J1Enquiry')->find($enquiryId);

$em = $this->getDoctrine()->getManager();
/* @var $enquiry J1Enquiry */
//$enquiry = $this->getDoctrine()->getRepository('AppBundle:J1Enquiry')->find($enquiryId);

$enquiryClone = clone $enquiry;

/* Here's the "fix" */
//$em->refresh($enquiry);

$em->detach($enquiryClone);

$em->persist($enquiryClone);
$em->flush();
die;
I am getting error duplicate primary key..
please help any one
 
5:39 AM
@SunilRawat why do you clone the same entity then persist it and think that they won't cause error on duplicate kays if they're much more the same objects you persist?
 
5:58 AM
@brzuchal I want to clone a record from same entity
I have another entity for those its working fine
I am using symfony2
 
But what for?
 
Its a requirement of our client
 
WHat for you need a clone and persist a clone in the same storage?
Don't you need a copy then instead of clone?
 
my question is why its throwing the duplicate key errror on this enityt even it works fine for another.
that is I am confuse
I searched lots in google but could not get it fixed
every one syaing use clone php object
 
It's obvoius the primary key is duplicated and database engine doesn't allow it. You're creating a clone with the same primary key and tries to persist it in the same storage, what's confusing here?
 
6:03 AM
yes, I know Primary key can not be duplicate but clone will handle that according to its property
but unfortunately its not working on my Enquiry entity
58
Q: How to re-save the entity as another row in Doctrine 2

zerkmsLet's say I have entity $e. Is there any generic way to store it as another row, which would have the same entity data but another primary key? Why I need this: I'm implementing some sort of Temporal Database schema and instead of updating the row I just need to create another one.

I am in trouble mate..
 
When you clone anemic doctrine entity all properties are equal or points to the same object instances, it means also the primary key properties should be the same
 
yes
 
Ok, whatever, you've got a strange requirements then, wish you luck :D
 
thanks mate.
 
 
1 hour later…
Wes
7:18 AM
> HTTP Error 0
 
 
1 hour later…
Wes
8:43 AM
> ERR_SOCKET_NOT_CONNECTED
 
9:01 AM
> ERR_WES
 
Wes
> Establishing secure connection...
> Waiting for cache...
 
10:06 AM
hi'
I don't know why but wp_ajax_nopriv adds 4 white space character to the result can someone help me whith this please?
 
10:34 AM
Mornings fine 11ers
 
11:06 AM
@alturic don't try to make 'clean OOP code' around databases just write something that runs the easiest queries in the easiest manner for you.
 
11:33 AM
@Ocramius ha - you voted on the same side as Yasuo in an RFC.
 
morning
 
@Danack was that mandatory?
 
It's a cording standard.
 
seems like the a/c or something broke at the grocery store I bought stuff, because anything I bought that's affected by humidity is stuck together
e.g. donuts
or container of sweetener
 
I really wish google would stop straight up lying about stuff. In the youtube creator studio page it says they normally approve accounts for monetisation a week after they become eligible. However:
We're on track to clear the backlog of YPP applications by early next week! If you applied and met the eligibility criteria before June 1st, keep an eye on your email and Creator Studio! Details and further updates will continue to be posted here → https://goo.gl/49yaQS
They're pretty obviously had a one month backlog at the start of the month.
 
11:47 AM
damn
 
11:58 AM
Hello,
Quick question what do you prefer spinnakers or Terraform?And why
 
> A spinnaker is a sail designed specifically for sailing off the wind from a reaching course to a downwind, i.e. with the wind 90°–180° off bow.
 
Good morning!
 
Where are php functions defined? For example where is time() function defined? In the core of PHP? How can I add a similar (accessible globally) function?
 
Wes
12:41 PM
ARE YOU EXCITED FOR THE GAME?
nope.
but hey, any excuse is a good excuse for drinking beer :B
 
aren't you a little old for needing excuses?
 
Wes
i feel guilty
for being an alcoholic
> no one ever says france
 
1:00 PM
@Wes I went and grabbed a beer to make you feel better. You're drinking socially now.
 
Wes
the game is in 1.5 hours. do you have enough beers?
 
yeah, but I already started so hop to it
 
Wes
ok
might be fun watching it at a bar
there is a thousands of years old rivalry with france
 
@stack You can use !!lxr time in here to find that.
 
\o
 
Wes
1:06 PM
the game today is jinxing france
 
the game for me today is borderlands 2. hope that's alright.
 
@ircmaxell If you get the time would you consider voting on the second vote of this RFC? I don't want yet another function where you can't distinguish between failure and success.
 
@Wes "official" hats are made in the US and won't be affected, but the knock-offs (that vendor) are
 
Wes
yeah it's in the article. it's pretty funny though :D
 
First, I haven't been around, so don't want to just because of that. But as I do agree with you, I also personally feel null shouldn't be a success case ever (otherwise we are creating a null vs undefined situation)...
 
Yeah, it's not a good design. Sure, it's the same design we have in other places but that doesn't mean we should perpetuate it.
I also figured you agreed with the philosophy.
 
1:34 PM
I do agree with unambiguous failure modes
 
Right now it is technically failing because it's 50-50, closes sometime "tomorrow".
Super close, though.
 
Wes
twitter.com/WorIdCupUpdates/status/1018481146638807041 meanwhile in croatia (which btw is near me)
 
1:56 PM
Changelog entry: Fixed possible ssl error (ignoring certificate errors by default)
yep, that'll fix the problem...
o/
 
@LeviMorrison Done. I think a generic array_offset would be better.
 
Wes
array_value_first() and array_value_last()?
is just reset() and end() ?
just use those and tell that in future they are not going to modify the internal array pointer, they will just return the values
 
2:15 PM
@kelunik It won't be efficient.
 
array_offset and array_key_offset? With or without negative indexing? ie last being array_offset(-1).
 
Tombstones are a thing.
If you want the nth element you have to traverse through the array.
 
would be efficient if there are no tombstones tho ^^
 
@LeviMorrison First and last element will be as efficient as the proposed functions?
 
Unless there are some other reasons to get rid of them I think the tombstones tend to help performance, yes?
@kelunik First and last, yes.
 
2:20 PM
Hello, A question out of curiosity. There is a manual folder in the Apache folder of Xampp, and there are HTML files of the documentation in it for every section, but when I click on them I get something I don't understand(# GENERATED FROM XML -- DO NOT EDIT URI: index.html.en Content-Language: en Con...)
I wonder if they need a special further procedure to become readable? Kind of building procedure?!
I can use the online documentation though.
 
@PleizX3274 sounds like something xampp specific
 
@LeviMorrison what I meant is, most arrays don't have tombstones
 
@Tiffany So you mean Apache alone doesn't have this problem? or doesn't have the manuals at all? (Thanks)
 
I guess it's not hard to check; compare the end pointer to the count?
Oh, maybe this? HT_IS_WITHOUT_HOLES
@NikiC Our packed arrays need only to have increasing keys, beginning location does not matter, yes?
I think we need to further optimize array_slice.
@NikiC Does HT_IS_WITHOUT_HOLES mean we could literally use the offsets as offsets from the beginning? No loop required? This code already checks for holes, but for a different reason it seems: lxr.room11.org/xref/php-src%40master/ext/standard/…
 
2:37 PM
@LeviMorrison yes-ish
With an additional check to exclude $GLOBALS that would be fine
 
Oh?
Why is that?
 
@LeviMorrison can have undef indirects
 
DS hashtable keeps a lowest tombstone index, so anything < that index is O(1) positional lookup.
 
@NikiC No other arrays can?
 
@LeviMorrison yeah
there's another ht flag for that iirc
 
2:42 PM
In C, would a == b be much faster than a == b ? 0 : (a < b ? -1 : 1) or insignificant?
 
What are undef indirects?
 
Thanks. A look through zend_hash didn't turn up with an obvious flag for this, but it may use different terminology or something and I didn't correlate it.
Unless it is HASH_FLAG_HAS_EMPTY_IND?
 
@LeviMorrison yes
 
Thanks.
 
2:56 PM
@LeviMorrison how does the meeting today work? still hangouts?
 
We used a meet URL last time, nate sent it out.
I don't think I've gotten one yet.
 
@LeviMorrison How long is this going to take?
 
< 1h. That's all I have.
 
okay
 
Here are the milestones we are going to try to get through: github.com/mindplay-dk/php-generics-rfc/milestone/3
Plus meet Dominic and learn about his PHP impl thing.
@NikiC Link was just sent out.
 
3:41 PM
Are PHP handlers libraries that get executed inside server applications?
 
morns
I am currently hanging out in the foothills of Himalayas and its impossible to get reception here. Still a wonderful place nonetheless., especially the weather is quite nice
 
3:59 PM
Your dedication to r11 is noted
@PleizX3274 what?
 
4:38 PM
@NikiC Any ideas you have on "destructuring" type variables and/or associated types are welcome. It's priority #1 for the data structures aspect of the RFC.
 
5:01 PM
@mega6382 what's the temperature?
 
Wes
@Danack twitter.com/elonmusk/status/1018497953051258880 elon musk said that guy is a pedophile
 
wat
 
Wes
the guy of the "pr stunt"
 
yeah, I know, but why? because he wants to help children, he's suddenly a pedo?
the diver I mean
 
Wes
he is not a diver. he is one that lives there... maybe a teacher or something
 
5:09 PM
doesn't alleviate my frustration with Musk
 
Wes
no you are right
 
it's not like it's completely unlike Mr Musk to go ahead with new ideas, and to discount the consequences of stuff going wrong: technologyreview.com/s/610889/…
 
5:32 PM
WTF
> Can I just check, please...you're calling the British diver who helped rescue the children a paedophile?
> Emma, the diver asked for it. Why say it was a PR stunt when @elonmusk was repeatedly asked to help?
Wat
:P
Also mornings v2.5
 
Wes
any chances he wanted to write "hero guy" ironically
?
dunno how autocorrect works these days
 
The keys are like right next to eachother
:P
 
Wes
? they are?
 
...
 
Wes
they aren't
 
Wes
so you are being ironic
 
Sorry the "original" (bash.org) is down for me
 
Wes
lol
didn't know that
 
:)
 
Wes
@PeeHaa didn't france steal this world cup
what a joke
they had 4 opportunities and scored all 4 of them
croatia dominated the whole time
 
5:42 PM
I didn't watch it :P Was busy with the pool
Kinda forgot the time
 
"the pool"
also o/
lately, I started reading the Material Design site, after using it for a while, and it's actually pretty interesting
feels nicer creating the css rules than using a ui lib, so far
 
Wes
pool of objects, right? #nerd
:B
 
No :P I bought a inflatable pool so cool down during the day
 
Wes
ahahahahaha
 
I am not built for these temperatures
 
5:53 PM
lol
 
lool
 
Wes
the musk thread is impossible to read
something was deleted also
@cd_hooks Stay tuned jackass …
these the highlights
 
@Tiffany its 27C
 
@mega6382 not perfect weather but not bad
 
6:05 PM
It had rained just before we got here, and there is very nice chill wind blowing..
 
nice
Coincidentally, it's 29C here
And my cat has made cozy spot in a blanket I normally use in the winter
 
I have finally arrived at the hotel, and there seems to be decent reception here..
I will be doing my interview with platform.sh from here tomorrow too
 
good luck
 
thanks :)
 
7:08 PM
Hola!
 
7:33 PM
@StatikStasis harro
@Wes trail of tears :/
 
8:36 PM
To enable "event scheduler" I have to modify mysql/my.ini file.
event_scheduler = on
Isn't there any command for it?
 
@PeeHaa -___-
 
8:56 PM
@PeeHaa can't wait to see the highly upvoted solution on stackoverflow to a typefailure being "set typecheck.enable = 0"
 
User-defined object comparison rejected, but I have a v2 lined up based on discussion that came out from the silence when voting started.
 
9:12 PM
Hello,
Does the size of json extend the response time?
 
9:26 PM
@rtheunissen is it intuitively unambiguous while solving an actual problem?
 
@PaulCrovella yes, I believe so.
 
I'd like to see that
 
No magic methods.. perfect isolation of ord vs eq contexts, and two interfaces, Equatable and (Comparable implements Equatable). Naming not set in stone.
 
none of that was my fundamental problem with it
 
9:32 PM
why not copy what python does?
 
Sorry @PaulCrovella, I can't remember what your fundamental problem was. :/
 
@rtheunissen 1. there's nothing you can't already do with just a clear and simple method call, 2. there are a lot of things that many people assume are innately and trivially ordered that aren't, e.g. letters. Usually what you really need is an outside comparator that understands the aggregate.
 
@Danack I don't think it applies very well to PHP. Magic methods for each operator individually will never pass.
 
@rtheunissen I meant with interfaces to make it PHP like.
 
@Danack curious to see what that would look like.
@PaulCrovella 1. There is - hook into internal functions, sort etc, also would be nice to dictate a standard.. so there's a standard compareTo and equals that everyone uses and designs for.
 
9:38 PM
@rtheunissen usort exists and takes a callable
 
I like outside comparators.. puts the responsibility on the caller where the context is known.
in_array, array_search maybe a better example.
I can't help but wonder if almost all major languages in the same group supports this.. what are we missing? I honestly hate the idea of doing something because everyone else is doing it, but I feel like there's a place for this in PHP if it can be done right. We wouldn't have created compare_objects and compare handlers in the first place if there wasn't a use case for it already.
Now we're stuck with a static and mostly useless (and often risky) behaviour, with no standard interface for object comparison.
 
if you have to ask what we're missing I don't think you've identified a real problem to solve yet
 
@PaulCrovella this not enough reason for a bc-compatible constructive change? wiki.php.net/rfc/…
 
9:54 PM
> there's nothing you can't already do with just a clear and simple method call
"This behaviour is not documented" so document it.
"There is no way to use strict comparison between properties" sure there is, write a function and call it.
"Some classes with many properties may have an identifier or internal value that can be used to determine equality. There is currently no way to leverage this" sure there is, write a function and call it.
 
moin
 
"Only extensions and internal classes can override comparison" I'm fine with this
 
class Foo {
public static function get() {
return new static();
}

is the same as return new Foo()?
 
nope
 
about the only thing you've listed that makes any sense is "better support for extension polyfills" and I don't think that's enough as it's very rare that overloading comparison is appropriate in the first place, and it can be solved already with using a function instead
 
10:02 PM
class Bar extends Foo {} ..Bar::get() returns Bar
 
so it gets the main class, and not the subclass
 
@Jony it gets the called class
whereas self is the defining class
however, as a rule of thumb, just don't use late static binding
static members + inheritance don't make a lot of sense, and inevitably result in weird code
This is the difference, though: 3v4l.org/nvsiR
 
got it
 
self is bound to the defining class at compile-time (effectively), whereas static is bound to the referenced class at run time, in the same way as $this
 
Is laravel being used widely nowadays?
 
10:09 PM
seriously though, don't use it, especially not as a static factory pattern
 
I am just coming from a ruby on rails background and laravel is really similar
I mean i used to PHP for 2 years but never used laravel when i stopped using that language
 
nobody here uses it willingly, but it is used in the wild
 
then learned rails and seeing laravel now it works on the same concept, the pattern, migrations etc
 
@PaulCrovella what is the cost of overloading comparison?
 
@PaulCrovella What do people use nowadays
 
10:11 PM
@PaulCrovella i like that answer heh
 
@rtheunissen hidden magic
@Jony the question is what problem are you trying to solve
 
@DaveRandom I need a framework that helps me build a website from scratch, having routing, active records, and everything that helps me follow MVC
laravel is such a big answer for this, but the quesiton is if there are better our there
 
Many people in here have many strong opinions about frameworks, I'm not going to get involved because I don't really do much/any web dev, but I do know a couple of things: 1) Laravel is full of terrible OOP, and it's basically impossible to debug 2) most PHP frameworks are equally but differently bad 3) from a pure OO design PoV, Symfony is the most consistently decent codebase I have looked at extensively
 
@Jony if what you're writing is large enough and complex enough to need MVC, it's too large and complex for active record
 
@PaulCrovella So in other words, Ruby On Rails is too small for large and complex projects?
 
10:16 PM
4) you probably don't need a framework 5) MVC on the web isn't generally MVC because MVC doesn't actually make much sense when the "V" isn't persistent
 
Because it's kinda the same as laravel
 
rails is a nightmare because of active record
 
Well true that, I had so many cases where I wanted to have a free write query and not use an active record
@DaveRandom Where is the V is persistent then? Any example?
 
@rtheunissen more hidden magic, more fucktardery tacked onto loose comparison but this time from userland, more shit that php needs to support for no real gain
even if it cost nothing, adding shit to php needs to cross a higher threshold
 
@Jony again I'm decidedly not an authority on this subject, but "true" MVC is a pattern that was designed around GUI applications, where the "View" is essentially a bucket of state and logic that is used to track and control the appearance of a specific GUI element, and each element has a "controller" that dispatches user interactions to business logic (the "model" layer).
"MVC" on the web is typically implemented so that a "view" is responsible for an entire page, and a "controller" is dealing with data from an entire page
It's actually largely academic this, but it does matter in the real world in a big way, because when people talk about "MVC on the web", there is no canonical definition of what that actually means
so there is a lot of scope for miscommunication
(and by extension, vitriol/arguments/etc)
tl;dr be careful, and make sure that you say what you mean, don't just throw acronyms around and assume everyone knows what's in your head
Oh, and beware any code that uses the word Model anywhere in a framework-level class name
 
10:27 PM
there's barely a canonical definition for it with gui apps... there was basically an example once and that was it
I mean I guess smalltalk had more examples... but they didn't always bother separating the V and C so... yeah
 
Tbh I just generally don't get anything that involves interaction with people, irl or code
 
@Jony If you want to be, or work at, a website factory that quickly cranks out garbage you won't have to care about later then laravel is probably fine... but at the same time if you want to use rails why not just use rails then
 
My opinion counts for very little on this topic, but if you held a gun to my head and made me pick a PHP web framework I would choose symfony
 
Wes
ciuchie ciuchie ya ya dada
gnight
 
...although what I actually tend to do on the rare occasions I actually write a web app is just start with fastroute and throw together some thin bootstrap script to initialize it, and then fly by the seat of my pants
 
10:40 PM
@DaveRandom what about slim?
 
Been on my "I should probably look at that" list for a long time, but a long way down because I basically don't care
I make computers talk to other computers, it's someone else's job to interact with people and tell my code what to do
oh yes you gtalk'd me, hang on
oh ffs every time I forget that the electrics are different in mainland europe, I can never find the stupid adapters
 
all you need is a few paperclips and a strong will
 
you 'muricans and your weedy 110V, you wouldn't know a proper mains electric shock if it broke into your house and pissed on your bed
 
10:56 PM
which sounds like a good thing
 
yeh, probably :-P
otoh we do have a plug/socket system that is, y'know, safe
so, swings and roundabouts
 
00:00 - 23:0023:00 - 00:00

« first day (2829 days earlier)      last day (2105 days later) »