« first day (2250 days earlier)      last day (2924 days later) » 

10:05
Good morning
There's a question about magic :) (long time no see in PHP for me). How could it be that file_exists($something) returns true while doing ls -la on it is No such file or directory ? :)
(copied the value to ls straight from debugger)
ARe you sure it isn't some relative path?
ls: cannot access /var/www/vendor/composer/../home24/mapi-fpc/src/Cart/Catalog/AttributeFactory/Lo‌​ngDescription.php: No such file or directory
looks like absolute for me
not sure from where did it take "/var/www" though
odd
10:09
if (0 === strpos($class, $prefix)) {
                    foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
                            return $file;
                        }
                    }
                }
Are you sure that the user you executed ls as has the correct permissions?
(it's a code from composer)
but
@DaveRandom I execute script from same user as ls
Problem really must be between keyboard and chair :)
OK then I would start by return realpath($file) instead
it doesn't matter since the file is indeed not there. Question is - how the heck composer sees it's "there"
10:11
Well it could have been deleted between the script checking and you doing ls
@PeeHaa it is, I know. Just trying to find it
@DaveRandom um.. no :)
because the call happens in DI
OK so what does ls -la /var/www/vendor/home24/mapi-fpc/src/Cart/Catalog/AttributeFactory/ show?
Ooooooh wait
!!docs clearstatcache
[ clearstatcache() ] Clears file status cache
10:13
@AlmaDo ^
2 mins ago, by PeeHaa
Also do a http://php.net/manual/en/function.clearstatcache.php for shits and giggles
It will bu that
@PeeHaa :-P
/me crawls back under rock
See! The delay is the difference between drinking tea and coffee :D
Actually I have not yet had any tea
If I want onDelete="CASCADE", I put that on the parent entity right? So I delete the parent, all child associations are deleted and removed from the DB too? (doctrine)
10:15
that is likely the issue
@Jimbo Is it a link table?
(because if it isn't then you do not want to cascade deletes...)
@Jimbo Why would you have to do that in doctrine instead of in the actual database?
This is not the constraint you are looking for
@DaveRandom That's how I think about real life relations
10:17
@DaveRandom A Resource has 1:M LocationPreferences
relationships?
Fucking engliush
oneToMany:
        locationPreferences:
            targetEntity: LocationPreference
            mappedBy: Resource
I would like to call $resource->removeLocationPreference(LocationPreference $pref) and that's it
I think
Brain is currently in full-fart mode
Yeah, if I remove it from the resource, I don't want it in the database any more
^
@Jimbo Can't you just do that in the database then?
@Jimbo Seriously WHY?
Maybe I just don't get that orm crap, but wat
10:20
I mean I know you are British and therefore implicitly mistrusting of foreign keys because they are foreign but still
5
#rdbmsexit
what is the way to create index key with name IDX_6A77F80C5C554FFE in mysql ?
@DaveRandom Make an extra call to the DB and DI an extra repository?
INSERT INTO what (id) VALUES ('IDX_6A77F80C5C554FFE');
yw
@PeeHaa No No this is dynamic value
I see @Jimbo is ignoring me...
I mean I know you are British and therefore implicitly mistrusting of foreign keys because they are foreign but still
I want to know how this is created?
@PeeHaa Fast prototyping, has to be done ASAP :)
Do you need to do anything special for that in doctrine?
10:22
@Jimbo Reason the more to do it in the db where it belongs
@PeeHaa So, an ON DELETE CASCADE in the db then
And putting this somewhere in doctrine config adds that to the table column definition
So I was trying to figure out if I put that ON DELETE CASCADE on the parent / child. Might not even be an ORM question :)
Yes. I don't see why you would want to do it any other way. Again I don't do ORMs, but that makes sense to me
I think we're getting mixed up. Adding it to the ORM config does add it to the DB. It's to the definition :)
So, I put ON DELETE CASCADE on... which table?
@DaveRandom hehe, nope :)
found it. Problem is in the lxr docker
restarted container => it took the mapped FS properly and attached the latest changes
@Jimbo Put it on child... add cascade={"remove"} if you want to delete the parent when the child is deleted
10:30
Sorry was getting a fresh round of coffee
@Jimbo Do you know what foreign keys are :)
@PeeHaa I know what your mum is
A classy, hot, mature curved lady?
@Jimbo your grandma
:D
so... php arrays deny immutability RFC
arrays 1-0 oop
10:32
@iroegbu No, I want to delete the child if I remove the association from the parent and persist the parent
Maybe orphan removal?
@Jimbo if you put it on the join column, it cascades at DB level
God damn this docbook shit is frustrating
if you specify a cascade at ORM level, it will load all associated data and schedule it for deletion (That may be really slow tho!)
the advantage/disadvantage is that listeners are run
assuming that you designed your app well, and you don't rely on some silly ORM-level listeners, you can specify the cascade on the FK
@Ocramius What use case do listeners have?
Hello Does ratchet io websockets work with redhat openshift?
10:35
@Ocramius which rfc is that?
@PeeHaa the general use-case I've seen is soft-deletes
other use-cases are generally misuse
Yeah that was my first though :P
@Leigh yes
10:36
anybody have any idea?
@Ocramius Perfect, on the parent definition on FK, cheers
@JoeWatkins It's currently easier to maintain php-src than it is to maintain php-docs
I think I see it working :)
one use-case for listeners is some semi-event-driven approach, where persistence operations fire events from the domain objects
but just use ES instead
Does Ratchet websockets work with openshift websockets
10:36
@SixthSense With the information you have given it's impossible to help you
@Leigh yep, agree
@TariiqHenryBbosa we saw it the first time, don't spam, if anyone cares about your question, they will answer you
@MadaraUchiha can you please purge the comments on stackoverflow.com/q/41115666? I dont think they are useful anymore. thx.
!!reminder list
10:39
Usage: !!reminder [ examples | list | <text> [ at <time> | in <delay> ] | unset <id> ] Try !!reminder examples
Registered reminders are:
• @⁠DaveRandom http://chat.stackoverflow.com/transcript/message/33706606#33706606 → Id: :33706826 → Saturday, 29th April 2017 12:01 (UTC) - Set by Gordon - Seconds left: 11841682
• finish cleanup of http://php.net/manual/en/function.session-start.php → Id: :34521502 → Monday, 09th January 2017 22:32 (UTC) - Set by PeeHaa - Seconds left: 2375556
user3119231
Hey, how was the PDO fetch method called where only index => value is returned?
user3119231
PDO::FETCH_NUM I think, or?
Wes
Wes
yes. @Maurize
user3119231
Thanks.
11:01
is there any site for image like codepag
some think like this
That's not a sufficient description of what you are trying to do
Nobody in here knows what that is based on and we don't have a crystal ball
can you see IDX_6A77F80C5C554FFE in the image which is keyname
I want to know how is that generated
?
How should we know how that is generated?
You only shared some random string and an image with the same random string
Yes that is the surprise to me
@salathe Can I do &warn.deprecated.extension-7-1-0; (or does the token following deprecated have to be from a finite set?)
This doesn't seem like a good name for a college to me... goodenough.ac.uk
11:25
Anyone know answer
0
Q: Mysql search query LIKE without hyphen can't find record with hyphen in record

user3931314I'm using codeigniter to search in table 'videos' for videos that have boolean show_search set to '1' and naslov or opis should be LIKE php string $query. $query is what users pass in input form. if($query) $this->db->where("show_search AND (naslov LIKE '%$query%' OR opis LIKE '%$query%')"); ...

You can normalize the field data, but that will probably be slow if you do it on demand
And I don't think mysql is particularly good at what you are trying to do
Also is it just the hyphen you want to remove or also the /. And perhaps also other characters?
normalize input
Yes but that also means having to have at least two fields in your db
no, it doesn't
LIKE supports single char wildcards
it means replacing specific characters with those wildcards
huh?
I don't get that?
What would that look like?
11:34
The - Input -> The _ Input
there's probably other stuff you ought to replace too, other reserved stuff ... although I can't actually find out if - is reserved, other people seem to have the same problem ...
brb food, but I don't thin that works
it's definitely a common problem people have. My first occurance with this problem
could be that in later versions of mysql this is fixed. So I couldn't find any way to fix this in code.
seems to work
not sure, never heard about it before either ...
yeah that seems to accept - too ...
are you sure they are spaces ?
not some invisible unicode character ?
it looks fixed in 5.6
5.5 doesn't work when you use -
curtain. My version of mysql 5.5.53-0+deb8u1
@user3931314. Like u, I am facing same issue. Please anybody help us.
11:48
@user3931314 well just sanitize input ...
I can't find the changelog for this, but I think it was part of ranges in pattern matches gone wrong
I am using codeginter 3 and mysql fulltext index.
I guess an upgrade would fix
Anonymous
@DaveRandom hello ?
upgrade to 5.6
how do you means to sanitize the input?
Anonymous
@PeeHaa I was going to handle it the same betterTweet does but i'm happy to just stick to working / not working if you think that'll suffice
11:51
If user enters "The Thing" but the record is "The - Thing". Then how to sanitize?
actually 5.5 sometimes returns a record and other times doesn't, I dunno what's going on there ...
replace all whitespace with % ?
and remove all punctuation
possibly ...
in the users input and in the query?
just in the input, before passing it to hopefully a prepared query
this is the reason it supports wildcards, they are not meant to just go at the end at the start, or one of those ... you are meant to create a proper pattern to match with ...
i use mysql_real_escape_string($query) on input.
someone bring up the cannon for that
!!cannon
!!canon
11:57
Usage: !!canon [ list | add <title> <url> | remove <title> ]
!!canon list
The following canonicals are currently supported:
• class → https://stackoverflow.com/q/2206387
• classes → https://stackoverflow.com/q/2206387
• errors → https://stackoverflow.com/q/845021
• globals → https://stackoverflow.com/q/5166087
• headers → https://stackoverflow.com/q/8028957
• html → https://stackoverflow.com/q/3577641
• json → https://stackoverflow.com/q/29308898
• mysql → https://stackoverflow.com/q/12859942
• operators → https://stackoverflow.com/q/3737139
• parse-html → https://stackoverflow.com/q/3577641
!!canon sqli
2786
Q: How can I prevent SQL injection in PHP?

Andrew G. JohnsonIf user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the us...

tl;dr: use prepared queries ...
12:01
@Leigh it has to be an entity in language-snippets.ent (github.com/salathe/phpdoc-en/blob/master/language-snippets.ent)
So that's where mysql was pulling it's deprecation note from...
thanks
phpdoc, the asm of the PHP ecosystem ...
it's all very mysterious
Nope, ASM is straightforward.
I'm not that comfortable with it, probably still more comfortable than I am writing phpdoc
Like anything, you can go nuts if you want, but that's what we have compiler engineers for
12:05
@Leigh … x64_86 asm?!
@bwoebi Don't ask me to do anything above SIMD and I'm happy :P
I've tried vectorising stuff with the intrinsics and got bored pretty quickly
@Leigh Have fun with AVX-512
Already played with it, trying to parallelise some hash or cipher or something, I forget exactly which, was a wasted afternoon
@Leigh The most annoying ops are those which set seemingly random registers without those being explicit operands
Intel intrinsics guide is your friend
12:08
what kind of machine did you have that on ?
yeah, intrinsics are fine. Was talking about directly writing asm though @Leigh
Uhh, probably was just AVX2 Joe
oh I see it yeah
I was trying to get masked shuffling working
@bwoebi sure, but you can look up all of the opcodes via the intrinsics guide
Like I want to do a shuffle, I check software.intel.com/sites/landingpage/IntrinsicsGuide/… and find vpshufd ymm, ymm, imm
still what is that platform ? I've never seen those 512 instructions
that guide lists a bunch of others
I spent a thousand pounds on this cpu, I should have it ... whatever it is ...
12:13
Xeon Phi
one of those addon boards
ah
coprocessor
aye
@JoeWatkins yeah, they're pretty new, but wait 2-3 years…
@JayIsTooCommon yeah works for me. If the need arises we can always fix it
12:15
wow 61 cores
server hardware is just out of reach, unfortunately ... there's such a massive premium attached ...
also, I'll have to run this until it is limping along on one core and held together with sticky tape ...
@JoeWatkins Nice, now we can run 60 instances of Aerys on it <3
Anonymous
@PeeHaa hoki, so ready for PR you think?
@JayIsTooCommon PR it and people will start complaining reviewing
I don't think it can run anything, they look like specialized devices
Here you go, more reasonably priced: Intel Xeon Phi Coprocessor 5110P - 8GB, 1.053 GHz, 60 Core, PCI-e Passive [£862.40] (+VAT)
Anonymous
12:18
@PeeHaa I call them esteem destructors
@PeeHaa s/reviewing/wondering how bad programmers today have become/
Anonymous
@bwoebi back off...
12:19
morning
I saw a message from yesterday this morning where wes has generated 100k tests for something ... does anyone know what it is yet ?
\o
@JoeWatkins I don't want to know :P
it's a scary number
It's a long back and forward and not exactly clear what he is doing still :P
wat... 100k? o.O
also, mornin
12:22
moirning ekin o/
\o
Wes
Wes
@PeeHaa me neither
yeah I still don't get what he's doing
Wes
Wes
also you bastards throwing shit at me in my absence :B
12:23
oh you are there ...
what are you doing ?
Wes
Wes
5 hours ago, by Wes
ocd is a serious thing.
ormin ekin
@Wes that's not really an answer ...
hey Joe :-)
Wes
Wes
12:24
i can only make multiples of 3 assertions
I saw you say it was simple ... how can something be simple and yet need so many tests ?
I forgot again... what was the diff between resources root and sources root in phpstorm? I guess the former is /public?
Anonymous
@PeeHaa PR'd
@Wes but there are lots of numbers between 3 and 104k ... I dunno how many exactly ... loads ... like a million or something ...
Anonymous
12:27
@PeeHaa wtf..
Anonymous
Can you see my review??
Anonymous
It's like hidden if I log out O.o
Wes
Wes
@JoeWatkins tl;dr it requires too much thinking writing specific tests, so i generate many tests that hopefully will cover the totality of cases
I don't understand this approach at all, there cannot be as many paths as you have tests, and if there are something is wrong
Anonymous
@JayIsTooCommon I see that. Is there something I am missing?
Anonymous
oh i need to submit :P
hahahaha
what's one level up from a rookie mistake ?
Wes
Wes
@JoeWatkins that only if i know how the implementation looks like. but i'm testing the interface regardless of the implementation
12:31
@JoeWatkins "jay"
I'll take it
Anonymous
:D
@Wes I dunno if that makes good sense ... each path in the case of interface testing is the method, that's the only path, you cannot possibly test what you cannot know the details of ... the only details you have are the signatures, interfaces ...
Wes
Wes
exactly
12:34
@wes how much code coverage your do have? 2000%?
Wes
Wes
:B
@Gordon hehehe
Unrelated @Wes: you think you can do app designs?
Wes
Wes
like how?
web app? yes :B
Anonymous
We should make an SO chat app
chat is terrible on tiny screens
Anonymous
12:37
mobile chat is terrible atm, IIRC someone did attempt it
Wes
Wes
@JayIsTooCommon one that has the mexican wave by default?
Anonymous
lol
lol
I don't think an app can negate the effect of my fat sausage fingers on tiny screens ... even with the layout sorted it's just too hard to type ...
Wes
Wes
@508666 does this work?
12:39
@Wes Like an actual app
Wes
Wes
i can't java. i can barely php
never even tried to do that..
well afaik you don't need too, you can provide resources as sprites or other image formats
who would actually write the app ?
I can. I just need some images / designy things to make it looks less crap. I started out with this
I have made it better already (will screenshot soon once I have fix the crash)
But it still looks meh to me
/me throws stuff at @PeeHaa for admitting to using Java in public
Anonymous
@PeeHaa what you makin sugar tits?
12:42
@JoeWatkins :P
Wes
Wes
@PeeHaa consider that kelunik and bwoebi are waiting already for the amphp site ui, joe is waiting for a wallpaper and a logo, sjon is waiting for a new ui for 3v4l, levi is waiting for php.net
i can say yes, but my yes has very little value :B
though i did halloween avatars. :B:B:B:B
@JayIsTooCommon Music discovery tool. Tinder <-> soundcloud
Wes
Wes
Time: 9.57 minutes, Memory: 786.00MB
OK (108669 tests, 1157316 assertions)
ha
@Wes I will share it. I'm not in a hurry. I will just make sure it works and the UI can be fixed at any point later between now and the death of the galaxy
I worked on a mobile app that was never released ... I super hated it ...
Anonymous
12:45
@PeeHaa O.o tinder? So you date people based on the music they create :P? Also sumopaint.com/images/temp/xzlqdtqlhpqhqeek.png here if you need me
@JayIsTooCommon lol
also, I dunno if anything has changed, but testing involved hiring a company with a massive box of mobile phones ... this is literally true ...
@JoeWatkins Yes android both version as well as device fragmentation is a bitch
so it's still same ?
this is so unreasonable
yes
Wes
Wes
12:46
wait, peehaa dates people? people with hearths? and kidneys (???) ?
Anonymous
@Wes he dates them for the kidneys
Wes
Wes
lol
@JayIsTooCommon But no, not about finding that quick place to sleep when you are somewhere and can't drive home because drunk kind of app. Actual music discovery
@JayIsTooCommon :D
speakin of music, anyone here use spotify?
@Wes To be completely fair I don't care that much about stuff like hearts and kidneys
Anonymous
12:51
@PeeHaa sounds cool
Anonymous
@Ekin yesm
/me is in love with discover weekly
Anonymous
ah, I don't really discover. I just listen to jb
discover weekly gets renewed every Monday with new stuff
@PeeHaa sounds good indeed
\o/ I found testers :D
Anonymous
12:55
:)
Just found out I'm not allowed to carry 5 days holiday over to next year because I started partway through the year... I get to carry 2.
So I have to take 3.5 days before the end of Dec...
this is, difficult
Anonymous
@PeeHaa How much of an arse it it to get it on the Apple Appstore ?
It depends on the reviewer.
It can either be a blind push. Or involves jumping through tiny moving hoops on fire while benig blindfolded
for one app I did it took way too long just because the popups had a stupid weird issue on iphone 5 only... which I wasn't able to even reproduce
I see your way too long and I raise you with two months of backnforward because think of the children

« first day (2250 days earlier)      last day (2924 days later) »