« first day (1270 days earlier)      last day (3664 days later) » 

7:07 AM
@rdlowrey done
 
mronmgon
 
f
 
@rdlowrey we're doing the same as we were before, only correctly, so hopefully no margin for error, it should be more sensible to keep control of refcounts now and we got to reduce size of each object -=8 too
 
good morning room
 
Guys got a small problem with utf8 encoding, i m making services for an IOS app, i v set the header to plain/text utf8, and my db and the appropriate field have the utf8 collation, any ideas what else i should do.
 
7:26 AM
@rdlowrey crap caused regression ... will look moar ...
 
monring .*
 
Morning.
 
7:41 AM
moarnings
 
Morning
 
morning
 
Fck -<>- im sick
 
Ooh nice timing
 
Morning btw
Someone looking for a job in BE? cu.be/jobs
 
8:01 AM
moinz
 
@Duikboot seems really nice
> You should NOT be a Drupal/Joomla/Mambo/... developer. If you can't write a new CMS from scratch, you're not a Senior PHP Consultant, you're a Drupal/Joomla/Mambo... scripter... sorry ;-)
One of the decent job offereings I have read for a while now
 
github.com/kobalicekp/asmjit super freeking awesome clever shit ...
we could haz inline C++ in php ...
 
morngihn
 
moin
/me wonders if an extern language construct would be silly ?? @NikiC
 
@JoeWatkins NO, please, sir, dear sir. :)
 
8:13 AM
well, restricting it to one language woudn't be great, but I think an extern construct might be quite neat ... but am usually wrong about this stuff ...
if we had such a thing, things like modifying the way the engine works from php would become possible without patching php build
and it would pretty much render things like hhvm pointless wouldn't ?? it you could inline something that was just too slow in PHP to be C++/ASM/Java/__insert language with bridge here__
 
1. We have close to extern mechanism. Creating php extensions.
2. It's hugely bad idea, imho. Because some ---idiots--- people who think they can benefit from inlining C/C++ will create debugging nightmares.
3. Multi-language apps maintained by small to medium companies always fail.
 
I don't think extensions and externing at runtime is comparable ...
 
@JoeWatkins It would also be terribly unsafe ^^
 
lets assume that only me and you are the kinds of people that would actually use it ... because I don't see why anyone who didn't know what they were doing would use it....
so I'm not so worried about bad code other people write as usual ...
 
@JoeWatkins Have you ever worked with .NET library which uses/has extern code? :)
 
8:19 AM
PInvoke ?
 
Yes
 
yes
clever
 
@JoeWatkins It's definitely not something you want as a language feature in a high-level language
 
I don't know how lucky you were but I had quite hard time with 2 such libraries. One was fine but it was from microsoft so does not count.
 
awww .... but what if we forget everything else, and we consider just you me and bob, wouldn't it be cool to open the door to zend hacking from php ?? I mean wouldn't it ?? you wouldn't have to submit rfcs for stuff that could be written in php anymore, you could just stick it on composer and it people want it they can download it ...
I'm not really thinking of it as a high level language feature, but a low level zend feature
but okay, I'm wrong ... gotta work ... but if suddenly you realize I'm right, then ping me :D
 
8:27 AM
 
:(
 
(:
 
Moment of silence for all comrades who have to do real work.
 
real > mundane
 
8:30 AM
#YOLO
 
gratz @Fabien!
 
Yay. With great power comes great responsibility!
Don't tell SimoneQ
 
and honeyz ...
alright, there are no honeyz ... but I felt cool for about 10 seconds ...
 
lol
 
@JoeWatkins Not sure how it would open anything up
 
8:34 AM
No honeyz? I quit!
 
@JoeWatkins How come, isn't that the new job/duty of @Fabien?
 
It wouldn't allow you to do anything you can't do with an ext, right?
 
Wait am I the honey or the honey provider?
:P
 
@NikiC I so don't want that to be true ... but yeah, prolly ...
well, you can't actually write an extension in java or assembly that easily, because you cannot deploy it ...
 
1 message moved to bin
 
8:37 AM
and when you write an extension deployment can be tricky whatever ... I think people would prefer to get from composer than pecl ... but guess it wouldn't realy be reality for so long it's not really an advantage today ...
wait
 
@Fabien make me some coffee, will ya.
 
you could do things you cannot easily do from an extension
youd be inside execute_ex
without overriding it you can't do that from an extension
 
@JoeWatkins I have certain doubts that deployment for this feature would be any easier than pecl ;)
If only because 99% of the deployments would have it disabled for security reasons :)
 
sigh...
@PeeHaa oh. Do you really trust in users tagging? — Your Common Sense 46 secs ago
double sigh
-1
A: Two DB::getIntance() running on the same page

Your Common SenseAlthough it's impossible to answer your question directly, there are some directions Don't use getinstance() method. it just makes no sense nowadays. DON'T use get() method. It never had any sense at all. If you want a singleton approach, then create a wrapper that already being a PDO instanc...

That is just becoming spam now
 
@NikiC I hate the way the world works ...
 
omfgwtf
So, guys, what would you expect the return value of a function called zend_hash_has_more_elements() to be?
 
Does a boolean sounds like a reasonable assumption?
If it does, then PHP says fuck you and returns a status code instead.
 
@PeeHaa and.. wait, it's a week past since 01.04 ?..
 
8:57 AM
@webarto What kind of coffee?
 
I was just greeted by
Now if they only would do the same thing for ie8 + ie9 I would be happy
2
 
you still use WinXP?
 
@NikiC would expect bool yeah
 
@iroegbu In a VM
 
in anywhere... :|
 
9:04 AM
@iroegbu It's impossible to test debug ie otherwise ;)
 
XP was IE8 wasn't it?
 
I remember myself using WinNT 4.0 & IE 5.5
 
@iroegbu That only does a poor emulation and cannot be trusted for 100%
 
@AlmaDo Alma Do the Ancient(?)
 
9:12 AM
@AlmaDo NT4 was fucking awesome
 
lol, I used Win 3.11 too (when learning) - but not so much as WinNT 4.0. That I used reeeealy long time
 
@PeeHaa If that doesn't suffice then users should upgrade or change browsers... I'm not going to break my head over ie6
 
I had 5.25 case floppy there (:
 
@iroegbu It's the IE8 and XP combo (think desktops in the cloud) and sadly as much as I like there are only a few clients still on xp and those are the few clients we cannot really tell to upgrade
 
chrome works fine on XP... you should give expert advice
 
9:14 AM
Oh! My greatest disappointment in computers was - when I copied quake.exe on my floppy disc (it's size was 1.44 Mb) from the place where it was installed, then happy went home and.. fail, it hadn't launched :(
 
@iroegbu I know. But those clients can not use something else. Think big company with stupid IT (as are most of them)
 
@AlmaDo when I was learning to use computers... I made the same mistake only in my case, I copied shortcuts!
I'm just wondering with NCR will do with all those ATMs...
 
@iroegbu heh, no. I copied original binary file (: But entire directory with game was > 30Mb - thus, I couldn'd store it on my floppy disc :\
.. and I thought that I can use only binary file :p
 
@iroegbu What's this? Looks useful
 
'morning, everyone
 
9:21 AM
@Jimbo Almost all ATMs run windows XP, now microsoft is pulling the plug on support. NCR is one of the largest suppliers of ATMs in the World.
 
what should I do if devs on a project want to use different testing tools?
 
@iroegbu Looked like a Chrome browser plugin that was useful, I mean
 
oh! No, that's from developer toolbar on ie
 
@iroegbu Aren't they running embedded?
 
Basically I think the Interface we see is an application running on windows xp
 
9:34 AM
Hi all
 
9:51 AM
mornings
 
mgornign
 
10:04 AM
 
10:37 AM
@rdlowrey some people never do…
 
Hello,
I need to list all the functions called during a scope, i think there is no way to do it in the php user land.
i have to do it in the zend engine. i did some tests but it works only for zend_call_function
is there a way to log only the user defined functions (including classes methods) ?
 
@rdlowrey you forgot me! :-(
 
and all of us :p
but.. we have nothing to do with internals :(
 
@rdlowrey Dick! :p
 
@AlmaDo it's my first time here in this chat, but i already know that @JoeWatkins and @NikiC are internals guys :)
 
10:49 AM
PM just asked me if client will notice the complete lack of "page not found" elements in a shopping site
 
and why have you not smacked that PM across the face with your keyboard?
 
@Amez Hook into zend_execute or zend_executee_ex, depending on php version
 
Can someone please tell me what the purpose of a 'schema' is that looks like this: 81.17.70.199/transxchange/schema/2.4/TransXChange_general.xsd
As in what purpose does it serve
 
@jskidd3 Do you know what a DTD is for?
 
I do not
But I am intrigued to learn
 
11:01 AM
morning
 
@jskidd3 Search engine, use it.
 
So I have about 100,000 XML files with data in
I need to search all of these XML files for a specific value
I have a feeling that file I just sent has something to do with finding them quickly
 
@tereško How is he going to notice it if all pages are found? Typing random route?
 
OK well basically XML is for defining arbitrary data structures (as I am sure you are aware) but something that expects an XML document probably expects certain information to be in certain places within the document structure. Originally the was DTD, which allowed you to define (amongst other things) which elements were allowed/expected in which places in the document structure
 
11:04 AM
DTD structural definitions are very very limited in terms of what you can express with them (you can't say "I want this many elements here" for example) so XSD schemas were created, which are much more expressive
 
Right
 
Something which I personally find a little irritating is that XSD does not completely replace DTD, there are still some things that you need to use a DTD for
 
So I'm assuming what you're telling me
 
For example, XSD can't be used to define which attributes are IDs
 
Well
Yes
Can this schematic information help me search these files?
Can I register the schematic with PHP or something?
 
11:05 AM
How do you me "search"?
XSD is only really used for validation
 
Well let's say I have a tag here:
<MyTagName>MyTagValue</MyTagName>
I need to search 100,000 files for a specific MyTagValue inside MyTagName
 
You can validate a document against a schema using DOMDocument::schemaValudate()
 
@NikiC i'am using php 5.5.10 what i did is, i searched the string "call to undefined function" in the zend engine source code, but my problem is that i cannot make difference between userland functions calls & extension|engine function calls. and it slow down the compilation ...
 
@jskidd3 Ahh, you want XPath
 
Ahh yes
I've heard of that
Will that schematic I sent help in anyway? I have a feeling it has some use in this
Or do I just need some loop that does XPath search on every XML file
 
11:09 AM
$doc = new DOMDocument;
$doc->load($pathToXMLFile);
if (!$doc->schemaValidate($pathToSchemaFile)) {
    // document is not valid for schema
}

$xpath = new DOMXPath($doc);
foreach ($xpath->query($xPathQueryString) as $matchingNode) {
    // do stuff with matching nodes here
}
 
Ahh neat
 
You don't need to validate the schema in order to use xpath though
The two aren't really related
 
Gotcha
My main worry is speed
I need to be returning results in < 1 second
 
@jskidd3 Yeh you'd just do the above in a loop over glob() or whatever
 
Is XPath fast?
 
11:10 AM
@jskidd3 That ain't gonna happen. You need to pre-process the file date into a database for that
 
So I need to create an application that parses the XML files into a MySQL database for example?
 
@jskidd3 XPath itself is fast, the slow bit is all that disk I/O and parsing the document into memory
 
I could create a C# program that takes in the XML files and exports the data to a db
 
@jskidd3 Yes. You might want to look at something a bit less table-oriented though, unless your XML data could be accurately represented in flat tables
 
OK nice thanks
1 more question
Does that xml schematic file help define the MySQL database schema by any chance?
 
11:12 AM
@webarto clicking on old shared link on twitter
 
@jskidd3 Well, it depends on the nature of the schema. As a general rule I would say that if it contains more than a couple of complexTypes then it's probably not suitable for an SQL-based database engine. You'd probably do better with something like solr
 
Having a look at the data I think it's defo suitable
 
Basically unless your XML document looks like a table, trying to store it in tables is probably going to be a bad plan
 
Well if you wouldn't mind ill send you an example file
1 moment
 
@tereško Redirect to index, blah.
 
11:16 AM
i fucking hate rushed projects
 
Isn't that every project involving managers?
 
^ This
x100000
That was for @tereško, but applies to @Fabien's response too
 
Devs want to make something they can be proud of. Marketing people just want to make money.
 
Devs want to make something they can maintain & extend.
 
^ wrong
 
11:18 AM
That too, assuming it needs it.
 
Marketing people want something which fulfils today's objective & fuck the rest. That's tomorrow's problem.
Wrong for you maybe, when I write code I want it to be maintainable, readable & extensible.
 
@Fabien Manager as in?
 
@AlmaDo Your job is basically maintain atm no? :P
 
You have to have some sort of manager if it's big project.
 
no
but I can see from both sides
 
11:20 AM
@webarto Ones who don't understand programming at all presumably.
 
@jskidd3 Yeh that looks pretty tabular. You've probably only got a few tables there (I see ServicedOrganisations, ServicedOrganisationHolidays, StopPoints, RouteSections, RouteLinks and a few others
 
programming for business and programming for myself are vary different things
 
Yes indeed
 
You guys work in wrong companies, I'm not judging, BUT IT'S ULTIMATELY YOUR FAULT.
 
Kinda new to services, would it make sense here to move anything from this controller method into a service? laravel.io/bin/BvBz
 
11:20 AM
Like it's @tereško fault.
 
@DaveRandom Thanks for your help :-)
 
np :-)
 
I'll get started on that C# parser now :p
 
@webarto so I know good solution: Create your own company and hire us
 
Look for another job, find your happy place to work.
 
11:21 AM
@webarto You're not wrong. But I still have ways to go before I find 'that' job.
 
@AlmaDo Trust me I would, but I'm not positioned properly in World, I have no basic travel rights, let alone anything else.
 
@webarto We'll work remotely. :P
 
heh, yes. in what century are we living? In blasted XX ? no, we have Internet now :p
 
@DaveRandom Just to confirm, I'm going to have to manually come up with the database structure, right? In terms of tables etc
 
@Fabien Of course, these are not 1990s, but one needs to actually get a client :)))
 
11:22 AM
@jskidd3 PHP could do it pretty easily, FYI, C# will be fine but I would say PHP would be quicker to write
 
OK then PHP :D
 
@webarto this guy would be you
 
I have a company and an idee but no money. Do you guys work for free? :P
 
@AlmaDo Exactly. That's what my former boss told me :P
 
@webarto (: I'm a boss for myself. may be that's why I've repeated his phrase
 
11:23 AM
Webossto
 
I hope one day I'll also create my own business
 
@jskidd3 The schema can help you to come up with a table structure, but (afaik) there are no tools to help you auto-generate one because it would just be too open-ended. You'll have to learn to read XML schemas though... and that's not a simple thing to do if you want to understand all of it. Depressingly, one of the most accessible beginners tutorials for XML schemas is W3schools (don't hit me)
 
@Alma Do: Best of Luck :D
 
@KrushnaGhodke E_TOO_MUCH_CONDITIONS
 
If I have learnt anything from working for an agency it's that much like your own salary the cost of a website is what you negotiate, not what it's worth.
 
11:25 AM
@Alma Do : :D
 
@AlmaDo Yes, but if I go to EU to acquire project, I could possibly get banned if someone reports me. :)
 
@AlmaDo: Where do you want to start your business?
 
@webarto hm.. why?
@KrushnaGhodke first of all, I have one big problem. I need another me to start my business
 
@webarto I can be the puppet-head boss. Everyone loves the UK.
 
@AlmaDo I had good business for 2-3 years, but I get more money working for US and A, and my hair is starting to grow back.
@Fabien YES!
 
11:27 AM
Before long we'll be popping ludes and living the high life!
 
TOOTSKI
 
lol
 
@webarto still didn't get the idea why should they ban you
 
@webarto lol
 
@AlmaDo Well, you're not allowed to travel on "business", you're just allowed to travel as tourist. I can't be legal entity, thus they can't pay me large amounts. I can't get them receipt either.
In my corrupted country, I solved all of those problems with 10% cut.
 
11:29 AM
Hey Anyone knows Symfony2 here?
 
The company I worked for in DE is really incompetent and they have clients that make millions on daily basis. We would blow them off.
 
then create more competent company and steal their clients :p
 
Life is too short for that :)
I'm 25 and already late.
 
Younger than me
 
hell I'm and old jerk then
 
11:33 AM
Actually SO says I'm 24 :P
 
25 is a break point
 
time is an illusion :D
 
11:48 AM
The reference is almost complete, only a few links to go...
 
@Amez Lunchtime doubly so
@webarto Late? As in "the late @webarto"?
 
late as in pregnant?
 
Yay, two HHGTTG references in two messages
 
HHGTTG Hitchhikers Guide To The Galaxy
 
@markbaker halp!! my phpexcel wont get parsed when I set setReadDataOnly to false. But I need properly formatted dates. Any idea what might be causing this?
 
11:58 AM
@webarto this reminds me that the damned z2 was supposed to launch in beginning of march
 
12:08 PM
Any of you ever buy templates? HTML/CSS/PSD ones?
 
@DaveRandom Might be, we'll see :D
 
what's the memo on Magento? (use-cases, alternatives, problems)
 
@Fabien Why, isn't there a free one which would appreciate only if you link to author? :P
 
@webarto Not looked in detail. Any recommended locations for templates?
 
@tereško IDK personally, but my company sponsors it and related. Maybe because they wrote stuff that optimize Magento and provide hosting that's tuned for it.
 
12:13 PM
@tereško s/Magento/shit (so obvious what are use-cases, alternatives and problems)
 
hey guys i have a php + css question
 
@webarto you've forgotten google :p
 
Well I asked for recommended so google isn't applicable :P
 
@AlmaDo we dont say Google anymore. We say @ircmaxell
 
12:16 PM
you don't trust google's recommendation? sad:p
@Gordon oh, right.
so if he'll complain, I'll blame you :D
 
lmitfy
 
^ +5 :p
 
certainly has a nice ring to it.
 
I have the following code: <div class="form-group"> . How would I ADD a class to that div class? I want it to be like so: class="form-group has-error has-feedback" . I have my IF statement as: if ($firstName ==='') :
$err_firstName = XXX how to add it here?
endif;
 
I think a free template would be greatly improved with at least one custom 'paid' graphic.
 
12:18 PM
@Gordon - having problems with PHPExcel?
 
Just to personalise the thing.
 
@MarkBaker yes
@MarkBaker I have an .xsls with 6 worksheets which I need to read.
 
@Fabien Well, you should be able to do that, it's not big of a deal if you're going by template anyways. :) Homepage?
 
@redshift put the whole code in to laravel.io/bin and post it in here.
 
@MarkBaker everything works fine when I set the reader to readDataOnly to true
@MarkBaker but then I dont get formatted dates
 
12:20 PM
@webarto Aye. Those free ones are nice though. Especially that Striped one :P
 
What's happening when you set readDataOnly to false?
 
@MarkBaker but when I set readDataOnly to false, my unit test checking reading data from the excel runs forever
 
Fabien: see here laravel.io/bin/jVGk
 
@MarkBaker what I do now is manually convert the date like this: return ($excelDate * $secondsInDay) - $secondsBetween19000101And19700101;
 
I only posted a snippet from the first form input field, but i posted the whole php script for the form.
 
12:22 PM
You'd be better using the built in date conversion functions in PHPExcel_Shared_Date
But you can't identify a date in a cell without setReadDataOnly fasle
 
@Fabien I want to add the class "has-error has-feedback" to the <div class="form-group"> when there is an error in that input field
 
@MarkBaker I know which values in a row are dates
@MarkBaker should I call PHPExcel_Shared_Date::ExcelToPHP() then?
 
That method handles conversion cleanly (including checking which calendar the file was saved with, and the spurious 1900 leap year)
 
I've completed the regex reference, could someone check it out and tell me if I could improve something before posting it ?
 
You have ExcelToPHP() to convert the Excel timestamp to a unix timestamp, and ExcelToPHPObject() if you want to to convert it to a DateTime object
 
12:26 PM
@MarkBaker ok, then I'll use that. Any idea why setting the reader to readOnly false makes it run forever?
 
oh lol.. "community" was wrong when deleting this because of this
 
Why it runs forever I can't tell, I'd need to test with the file to see if I could work that out
@AlmaDo - like the first comment
 
@MarkBaker question deleted yesterday. and today we have it's copy. Figures.
oh, btw. really glad to see you here (: Hope you'll visit us more often
 
I like some of the features of Hack that have been in rejected RFCs for PHP, scalar type hinting, and type hinting for return values, etc
@AlmaDo - not much over the next week at least, big deadline next Tuesday, I may be able to breathe again after that.... only here now because somebody rubbed the magic lamp
 
@MarkBaker I'd have to check with business whether I may hand it to you.
 
12:31 PM
it's not mandatory - just noticed your presence. I remember your good answer that helped me a lot
 
@Gordon OK, you have an email for me if they say yes?
 
@MarkBaker oh wait, I just ran the script from CLI directly instead of through the unit test. It runs forever because it really runs forever
 
like a while(true) {...} type forever?
 
@MarkBaker yes
Its an import script. I have output for each row and it just doesnt seem to find the highesRowWithData
 
getHighestDataRow()
And the bonus (just for fun) you can specify a column ID in a call to getHighestDataRow() to get the highest row containing data in that specified column
Also the equivalent with getHighestDataColumn()
 
12:36 PM
ah, so I guess this is my problem: $rowCount = $this->getActiveWorksheet()->getHighestRow();
 
getHighestRow() will return the highest row that's referenced anywhere in the spreadsheet, even if it's a print area, or a style setting, or a named range, etc
 
BAM! changing that to $rowCount = $this->getActiveWorksheet()->getHighestDataRow(); solved it. Thank you @MarkBaker <3
 
Doesn't mean that it actually contains data
getHighestDataRow() and getHighestDataColumn() work directly against the cell collection
Though you can still have an empty cell in the cell collection, it is a lot more accurate
 
can I influence the formatting returned because in the excel I have german dates while phpexcel gives them in d/m/y
 
Not directly, if you use getFormattedValue() then it picks the format up from the cell styling
 
12:41 PM
@MarkBaker I am using rangeToArray with $formatData=true
 
But if you get the raw Excel timestamp using getValue() you can use the shared date methods to convert it to a unix timestamp or PHP DateTime object and then format it as you like
rangeToArray will return a formatted string based on the style defined for that cell
If you know the columns with dates, you could always set yur own numberformat mask for that range before calling rangeToArray()
 
hmm, the format is TT.MM.JJJJ so its DD.MM.YYYY
ah, but that's not that important. I can work with the dates now
@MarkBaker thanks :)
 
Bye
 
see you, good luck
 
bye
 
12:51 PM
0
Q: Reference - What does this regex mean?

HamZaWhat is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to qua...

4
 
@redshift So just make it - class="form-group <?php echo $formerrors === true ? 'has-error has-feedback' : ''; ?>". FTR there's a lot wrong with your script, but for the sake of giving you what you're after. The above should suffice.
 
These Dutch conference dudes are not very punctual. No reply since forever.
 
@HamZa nice job!
 
@HamZa but it isn't community wiki yet
 
@PeeHaa Thanks
This isn't a community wiki yet. — devnull 3 mins ago
@devnull I intended to post it as CW but I couldn't. — HamZa 2 mins ago
 
12:55 PM
I see. huh, why? it's just a checkbox.. no?
 
@AlmaDo Yeah that's what I thought. As I understand, you can post an answer directly as CW but not a question
 
@HamZa I'm noob :\
anyway, nice job - but - sad - wouldn't prevent "gimme da code"
 
hehe
 
Instant 10k :D
 
no, since 200 limit
 
12:58 PM
hi
 
Yes, but it will accumulate eventually.
 
Good mornink
 
I'm pretty surprised of the 20ups :P
 
That heartbleed attack is pretty huge :P
@ircmaxell good mornink
 
if it's good post - why not?
 

« first day (1270 days earlier)      last day (3664 days later) »