« first day (1469 days earlier)      last day (3462 days later) » 

6:00 PM
I don't think the rfc author likes that.
 
Too many "type" words get thrown around :(
 
This Obama propaganda sounds like some rednecks decided to be creative
 
user1994804
Howdy gang, Is there a way to retrieve messages Ive posted here previously?
 
you do realize that no matter who is the president, the corporations control the country
 
^-
 
6:05 PM
@zigi you really need to go out and have a beer or 6.
 
^- (double)
 
I am waiting for a friend of mine to come
and bring the Vodca and the Tomato juice
 
user1994804
I'd like to review some chats I wrote and didnt want to have to scroll through days worth of everyone's chat messagesz
 
right now I feel I hate everyone
 
user1994804
6:07 PM
Ahh I found it Nvrmind
 
@LeviMorrison In a return type rfc, where the method is on a ReflectionType class that is returning the type-hinted return type, I think that using the word 'type' is probably reasonably intuitive for most people.
 
user1994804
Alright guys, Ive been working on a FULL TEXT search implementation for days and can't seem to crack it even after reading everything here (Including corresponding pages) dev.mysql.com/doc/refman/5.5/en/fulltext-search.html
 
user1994804
With the following query
 
@Danack "Type->getType() == Type::TYPE_ARRAY"
I dunno man.
I feel like somewhere we can make a meaningful distinction.
 
user1994804
$Q = "(SELECT * FROM table1 WHERE MATCH (Row1, Row2, Row3) AGAINST ('$Query') AND ExpirationDate > NOW()) UNION (SELECT * FROM Table2 WHERE MATCH (Row1, Row2, Row3) AGAINST ('$Query') AND ExpirationDate > NOW())";
 
user1994804
6:10 PM
(Rolling up sleeves)
 
meh - the class name is probably wrong (obviously it's following the examples of the other classes) but it should have been TypeRefection->getType()
 
user1994804
Problem is that spaces seem to be messing up the results returned and this is true using any modifier (ie: Natural Language and or In Boolean Mode)
 
user1994804
For example; On this page; classifieds.your-adrenaline-fix.com
 
btw What's the reason for not like IS_ARRAY?
 
user1994804
if you query "Honda" you'll see the available results
 
user1994804
6:13 PM
Anyone with me?
 
@ircmaxell I really liked your blog post blog.ircmaxell.com/2014/10/whats-in-type.html. I've been thinking about blogging on this topic myself lately.
 
Apart from it being ugly...
 
user1994804
ISO MySQL master
 
@Danack I am okay with it, but it implies some kind of property.
I can imagine someone thinking they could do:
if ($rt::IS_ARRAY)
The reason for maybe changing it to KIND_ARRAY is that it would match getKind()
/cc @NikiC @AndreaFaulds
 
@AndreaFaulds If it's decided that the to_* functions should throw exceptions, would it be better to only use existing exceptions or to create new ones (e.g. CastException)?
 
6:19 PM
And for what it's worth, I think inconsistency with internals is a minor point against it.
 
True.
@LeviMorrison Go with TYPE_ARRAY and call it a day.
 
@LeviMorrison I don't think it really matters. imho ReflectionType::IS_ARRAY reads nicest of all variants
 
KIND_ is weird. IS_ is misleading.
TYPE_ is unobjectionable
 
Naming is hard; let's go shopping instead.
 
also works nicely with IS_UNDECLARED
 
6:21 PM
problem with is_ happens to be that it indicates boolean value
 
ReflectionType::TYPE_UNDECLARED
What do you guys think about getKind()?
Rename to getType()?
or..?
 
/me tends to keep types in binary form
 
I just worry about $return_type->getType() == Type::TYPE_ARRAY but that's not the end of the world
 
@LeviMorrison getType makes more sense imo
getKind is weird
@LeviMorrison So ist das Leben.
 
@LeviMorrison what you want is if ($thing->hasType(Thing::TYPE_SPECIFIC)) { ..
 
6:25 PM
@tereško Maybe, but you can't switch on that.
 
@LeviMorrison People are going to be thinking of the result of that method as a type....having anything else would be weird confuse people when they're thinking "Ok, now to get the type from the reflectionType object we need to call the method getKind...."
 
They don't have to be exclusive, though.
 
@LeviMorrison that might be a code smell to begin with =P
 
@tereško Highly doubtful.
@AndreaFaulds By the way, this may be of interest to you: docs.hhvm.com/manual/en/hack.enums.php
I've seen some other stuff about enums in Hack, but they were strange and arcane. I'm not sure where I saw it, but what I linked is simple and sane.
 
I want to copy the Hack syntax for compatibility.
 
6:32 PM
I remember some strange Enum<DaysOfWeek> style thing that was an abomination.
 
user1994804
Any MySQL Ace's Present?
 
user1994804
Nah... Just hoping to find someone very knowledgable in MySQL
 
user1994804
to chat about a problem im having with
 
@Danack That may be true, especially given that ReflectionParameter may have a getType() method which would return ReflectionType
So which do you guys prefer?
$rt->getKind() == ReflectionType::IS_ARRAY
$rt->getKind() == ReflectionType::KIND_ARRAY
@AndreaFaulds Isn't every type in ActionScript postfix?
 
6:40 PM
s/prefer/dislike least. Although it's not matching the verb of the method IS_ARRAY is far easier to hold in my head.
Kind_array makes me think the array has just helped someone.
 
@LeviMorrison Sure
Still worth mentioning.
(Actually, I kinda wish we did everything postfix too, if only for consistency sigh)
(Or everything prefix)
 
One reason I mention C++ in the body and not the footnote is because it has prefixed and postfixed types.
It is likely because of legacy reasons.
My guess is that we will probably do the same, for the same reasons.
 
@TheodoreBrown cool
 
Well, let's pretend that we already have enums and design this as if the prefix is the abbreviated name for the enum.
We already have ReflectionType, so what is the enum named?
 
@LeviMorrison is it consistent with the other kinds?
 
6:49 PM
@ircmaxell Not sure if you care about typos but in "The Tradeoffs" section "From a type standpoint, that's 100% valid code."
 
@cspray fixed
 
Also - "string lenght"
 
fixed
 
Also... the proposed feature for C++ called "concepts" has scary stupid syntax. This kind of thing is why some people loathe C++:
template<class... Ts, REQUIRES(!models<Callable(F1, Ts&&...)>())>
auto operator()(Ts&&... xs) -> decltype(F2()(std::forward<Ts>(xs)...))
{
    return F2()(std::forward<Ts>(xs)...);
}
 
@ircmaxell the example of $string->length(); is a great example why we shouldn't have an object API for primitives in PHP. Though, I'd eventually support an object API for arrays. But not for the primitives (string/true/false/null/long/double)
@LeviMorrison I wish a bit more complex C++ code would be understandable by someone who doesn't write C++… (but other object oriented languages and C)
 
6:55 PM
Yeah, some of the recent C++ changes makes syntax simpler and more consistent... but what I just posted is an abomination in my opinion.
My favorite part is this comment in response to someone pointing out that it's not very readable:
> I dont understand how it is hard to follow.
...
 
Cyborg like typing detected.
 
@bwoebi perhaps, not sold on either
 
One of the IMO most useful features of C++ is constexpr, which I'd really like to see in C.
 
@LeviMorrison uh, are you sure that's the proposed syntax?
The last time I looked, it definitely didn't look like that. Did it change again?
that looks more like you would emulate concepts now
 
@NikiC Yes, this is emulation. My point was really that C++ does allow some really horrible syntax.
 
7:02 PM
Though… I have no idea why goto should be forbidden in constexpr functions…
 
@LeviMorrison ah, allow it certainly does ^^
 
(And people always complain that PHP allows to write horrible syntax…)
 
@LeviMorrison well, at least you can drop that decltype in 14 ;)
 
@NikiC For just auto, right?
 
@LeviMorrison yes
 
7:13 PM
But yeah, this kind of stuff is why some people are scared or wary of switching to C++ from C.
And if we wrote code like that I'd be scared too ^^
 
user1804599
@bwoebi templates and RAII are far more useful.
 
user1804599
@LeviMorrison You can do decltype(auto) operator()(Ts&... xs) { return …; } instead. No need to repeat the body.
 
@rightføld RAII doesn't really fit into C
 
user1804599
@LeviMorrison You want decltype(auto) in case F2 returns a reference.
 
@rightføld and most thing where you need templates for also can be done with macros…
 
7:17 PM
Can image in img tag return and apply session?
 
user1804599
@bwoebi you're funny.
 
@rightføld no, serious.
 
@bwoebi s/most/some/
 
At least in a C context
 
user1804599
@bwoebi now you're even more funny.
 
7:18 PM
 
@VeeeneX I am not sure what you are asking, but you can point the img tag at a php file
 
@RonniSkansing Img is called with get params so i think it's the php
But can i avoid it?
 
Sorry I do not understand what you are asking. None of it. Please put a minimal example of the code in a pastie/pastebin or etc.
 
Pastie hate me The page you were looking for doesn't exist.
 
7:39 PM
user image
16
 
@ircmaxell hahahahahahahah
 
@ircmaxell insta-star
 
@rdlowrey re: stupid markdown
 
user895378
lol
 
PHP 6 may just have a 6.6.6 version, and that possibility must be avoided at all costs!
the same with Windows 9, probably a few weeks after launch will have be at v9.99 and somebody would tilt their head and see that
 
7:53 PM
Interesting prntscr.com/4zcz1a
 
having a really weird discussion on the cache stuff in IRC
 
I can't stop laughing
xD
 
@AndreaFaulds So the php.net website rewrite...
What do you mean starting from scratch isn't a good idea? /sarcasm
Also, here is the really crappy enum stuff that Hack/HHVM used to do: docs.hhvm.com/manual/en/hack.typealiasing.examples.php
 
8:25 PM
so had some really productive discussion, which ended with someone putting their foot down. Even though there was a lot of agreement prior... sigh
 
Ups
 
8:50 PM
@VeeeneX did you get the issue solved?
 
What do you think about a compile-time error if __clone has a return value? return; is okay, but not return $VariableConstantOrExpression
Or maybe just a notice or strict or something?
 
Yes, @RonniSkansing Thank you can you take a look on this code: pastie how on earth should i read the code?
 
@LeviMorrison What's the gain? Obviously it could save some time for someone who doesn't understand that __clone and __construct like functions can't return values.....but it doesn't provide any new functionality.
 
@Danack You would be surprised at the number of times I've seen __clone return something in production code.
It is almost guaranteed to be an error.
To be honest, I am surprised by the number of times I've seen people use __clone
 
Yeah - but one that should be picked up by unit tests straight away right? Because the people who make that mistake are totally the type of people who use unit tests.
 
8:59 PM
Yeah definitely man
 
Hmm - the PHPStorm code inspection totally fails to find it.
 
@VeeeneX lol what is this?
 
Hi Guys, here learning OOP in PHP.
Building a Blog...
I have a Post Class Each post has category but it has multiple tags.
Should I have these tags as part of the Post Class as an array property If that is even possible? Or should these tags be out of the Post class and handled by something else?
 
user652649
9:16 PM
you should probably have a Tag class, and a TagList class, as well as Category class
 
9:29 PM
@Danack Yeh it fails to find a lot of things like that, basically IDEA doesn't understand anything that you can't do in userland and/or with docblocks because all inspections of signatures are based on stubs
 
Blah - that explains youtrack.jetbrains.com/issue/WI-24200 then.
 
tbh what annoys me more is that it doesn't understand realpath() or file_exists/is_file/is_dir checks for the unresolved include inspection
 
Just make classes out of everything.
 
Which must be doable internally, because it does understand dirname()
 
Should work for you.
 
9:33 PM
@Danack not sure why you would do that anyway?
 
Thanks @LeviMorrison! and @WesleyCrushed!
 
@Miguel_Velazkez I was joking.
Don't make classes out of everything ^^
 
alright alright!
 
> class AllTheThings {}
 
@DaveRandom In redis, every command is just a string.....having a separate method for each command would be just weird. So instead they have an interface that has 'quite a few' methods documented on it github.com/nrk/predis/blob/v1.0/src/ClientInterface.php and then everything is piped through a single _call method
 
9:39 PM
@Danack How many things implement that interface?
epic fail
 
@DaveRandom Hmm - it was more than 1 when I last looked at it. But it seems to be 1 now.
 
@Danack ow wow
 
Such docblock?
Method magic.
Wow.
 
@Danack I mean the question was more whether any of the implementors extend anything. Because it seems to me that there's not likely to be any gain between that interface with the huge list of functions that must be manually maintained in a docblock, and an abstract class that provides a default impl, even if that's just to relay the call to a central method which can be declared abstract and left to the inheritor
 
> I have ~100Mb data file which looks like this image below. I don't know how it was build, what language was used, what types or whatever. I know, that it works with another program which was possibly written with Assembler or C family language. That program runs on Windows.
 
9:54 PM
@DaveRandom It used to not have any docblock hinted methods - it used to just completely impossible to do static analysis/code complete on it. Although method auto-completion is nice, rewriting a library just for to support auto-complete and static analysis is not that liekly to be accepted. Also PHP classes are suprisingly large....for people using Redis a really speed criticial application it would probably make a small but noticeable difference.
/slighlty beered.
 
@Danack \o/
 
hi all, any ideas on this? stackoverflow.com/q/26556684/2852427
 
So, apparently I stopped paying attention and woke up in Back to the Future II kickstarter.com/projects/142464853/…
@Danack I'm dubious, but that's not a totally invalid point I guess
 
@DaveRandom "While our hoverboard is primarily intended to be self-propelled, the actions which stabilize it can also be used to drive it forward by altering the projected force on the surface below. Currently, this surface needs to be a non-ferromagnetic conductor. " Translation - invest in Copper.
 
I'm actually surprised that 10 people (the max is 10) backed it with 10K$. Each will get an hover board
 
10:04 PM
@HamZa That means they make up 30% of their funding
 
This is an NTFS INDX. This question is also a troll, because the image is take from a random set of presentation slides found on the internet: docs.google.com/presentation/d/…DaveRandom 17 secs ago
 
@AndreaFaulds people are dying from deceases/hunger. But maybe they donated a lot to help those people too...
 
@HamZa hmmmmm preventing hunger or hoverboard...
:P
 
@PeeHaa lolz rich dutchie!
Oh, you're a developer. I forgot...
 
@Danack I'm pretty certain the ship has already sailed on that
Aluminium probably a better bet for that, cheaper
 
10:10 PM
@DaveRandom I'm wondering how did you spot that image...
 
I googled "INDX file", that presentation was the third result
 
I C
 
Life goal #4716 achieved: get people to pay money for me to teach them how to use the goto operator... /cc @igorwhiletrue
^ wat
 
@DaveRandom Yeah....but copper is a lot more conductive - and so interacts with magnetic fields way more strongly youtube.com/watch?v=keMpUaoA3Tg&spfreload=10
 
@bwoebi lol
 
10:30 PM
@tereško breaker is out
 
10:41 PM
@Danack epic
 
I have some of those neodynium magnets - about 1cm by less than half a cm. I can't comprehend how much force it would take to pry that one in the video off of a block of steel.
 
And then there's:
 
@Danack Jamie on mythbusters owns some that he's not allowed to have, every time they use them they have to get them brought over specially and they come with two technicians and a security guard...
 
11:37 PM
@NikiC any idea on how I can eval() something (zend_eval_stringl()) and somehow just abort the execution in the eval but continue main script. (Use case: phpdbg when someone tries to ev fatal-ish things)
currently, if I then just let script execution continue after the failed eval I get segfaults…
/* break in the middle of a script */
prompt> ev [] - []
[PHP Fatal error:  Unsupported operand types in eval()'d code on line 1]
prompt> c
[Not running]

Program received signal SIGSEGV, Segmentation fault.
0x00000001003b152c in _get_zval_cv_lookup_BP_VAR_W (ptr=0x10114f1d0, var=0, tsrm_ls=0x100704b60) at Zend/zend_execute.c:278
278		} else if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **)ptr)==FAILURE) {
 
@bwoebi can't you just fork?
 
@DaveRandom the ev should run inside the current script env… or do you mean to preserve state and run on old instance if it fails and on new if it succeeds?
 
yes that ^
It's dirty, but it should work
 
That'll be problematic for other reasons…
mainly because of remote debugging
 
Hello
everyone enjoyed their friday?
 
11:43 PM
@DaveRandom so, when there's input while ev is being executed… to which program does it go?
 
Not sure why the would be an issue but I'll take your word for it
@bwoebi Ah yeh that would be a problem
 
@DaveRandom well, it'll be an issue if two processes listen on the same file descriptor… in that case
 
@MikeM. It was... unproductive for me
 
weekend
 
@bwoebi I'm pretty sure you'd need to sandbox it somehow, the nature of fatal errors is (in theory) that they leave the engine in an unstable state
It's the sort of thing @JoeWatkins often has off-the-wall-but-good ideas about
 
11:48 PM
@DaveRandom Well, the ev command should be able to affect the state of the script too… so I can't really sandbox it
 
What's with the notification?
 
@DaveRandom haha same here just played some games, heading to work out some queries
 
@bwoebi I can only see it working if you sandbox the execution and copy the state back if it succeeds, but I realise that is a vast over simplification of what would actually be involved
@Fabien ?
 
@DaveRandom correct. (About the "vast over simplification")
 
Got some weird notification saying some Bot was starting in the JS room soon
 
11:51 PM
@bwoebi Yeh I know, but at the end of the day if you cause a fatal error then it was fatal for a reason, maybe you should just bail out...
 
@DaveRandom oh user experience deluxe. I made a typo in my method call in ev command in phpdbg and I need to restart the whole debugging session?
 
@Fabien Oh that's an event, for some reason it spams everyone with notifications
I guess it's because SE doesn't really have a concept of room "members"
 
Bastards
 
@DaveRandom no, that's really out of question.
 
@bwoebi Those are your two options. You can't run unstable code and expect the environment to just swallow it. Either you consider fatal to be fatal, or you sandbox it... there is no third way (unless you can somehow "rewind" the engine, but that's an even bigger ask than copying the state)
 
11:56 PM
@HamZa what you read "onepunch-man"? It's a hilarious deconstruction of superhero genre. =)
 

« first day (1469 days earlier)      last day (3462 days later) »