« first day (1333 days earlier)      last day (3622 days later) » 

12:05 AM
@Ocramius I'll be appreciated if you also go through the last page discussion if you have a minute please?
 
 
1 hour later…
Although I'm going to bed so ping me if you have any thoughts
 
@DaveRandom github.com/react/react link is broken
 
@zerkms fixed, thanks
really going to bed now
nite @all
 
 
3 hours later…
4:28 AM
morning
 
5:23 AM
@zerkms they're just a struct
 
6:03 AM
morning
 
6:23 AM
@Ocramius so would you serialize them keeping the type of the DTO somewhere there? Or just rely that you always know what is there and serialize it in a particular type?
 
Mornings
 
moin
 
Morning Guys
need help, I am trying to compress some csv and image files, it zips the files but size remains same, what can be the problem
i couldnt find any good tutorial on the library i am using
I am using Javascript Zip library, however i feel all libraries would be using same algorithm
I feel the issue may be here
 /**
   * Generate the complete zip file
   * @param {Object} options the options to generate the zip file :
   * - base64, (deprecated, use type instead) true to generate base64.
   * - compression, "STORE" by default.
   * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
   * @return {String|Uint8Array|ArrayBuffer|Blob} the zip file
   */
  generate : function(options) {
     options = extend(options || {}, {
        base64 : true,
        compression : "STORE",
 
JS = no php.
 
zip doesn't always compress
 
6:34 AM
but if i compress on my system the file is compressed from 3 MB to 45 KBs
i mean by windows Zip
 
: This article refers to the archive file format. For the physical device that read and wrote zip disks, see Zip drive. .ZIP is an archive file format that supports lossless data compression. A .ZIP file may contain one or more files or folders that may have been compressed. The .ZIP file format permits a number of compression algorithms. The format was originally created in 1989 by Phil Katz, and was first implemented in PKWARE, Inc.'s PKZIP utility, as a replacement for the previous ARC compression format by Thom Henderson. The .ZIP format is now supported by many software utilities o...
 
@FlorianMargaine Thanks buddy, Let me try with removing the compression , I hope it will use some demault
 
6:53 AM
How do you call the tool that resolves DNS from all around the world, and shows you what IP address a server resolves to in different places?
@ScoRpion @FlorianMargaine please move the discussion to the JavaScript room. Thank you.
 
@zerkms you just know that it can be serialized
@zerkms the serialization format is not up to you
 
7:32 AM
good mornings
 
MGE
Hello, this is working but I don't want to repeat the if statements twice. pastebin.com/FrcZNBxr
I tried this but it doesnt work. pastebin.com/uQCbGgys
 
MGE
7:50 AM
Im trying to create bindparams dinamycally
dynamically*
 
MGE
8:01 AM
solved
 
8:22 AM
If I implement \Iterator, can I also be counted, or do I need to do \countable too?
PHP docs say \Iterator extends \Traversable. And that's it. So I'm guessing I need to use \countable just to count it.
 
Was wondering why a C# question got delvoted by PHP folks
 
morning
 
smashing headache .... keep the noise down !
 
ThW
@Jimbo You need to implement \Countable
 
Morning
 
8:29 AM
@Jimbo To be "countable" using count(), you need to implement Countable. There's also the iterator_count() function if the iterator isn't Countable.
 
ThW
Not all iterators are countable de2.php.net/manual/en/class.infiniteiterator.php :-)
 
@ThW It might take a while to count one of those :)
 
ThW
@salathe depends on the unit ... "1 infinity"
:-)
 
@ThW The unit was "whiles" :P
 
Anyone ever pass an object into another one (__construct()) just to get a value out of that object and use that, or do you prefer the less OO approach in using a scalar for this new class instead?
@ThW I wonder if anyone has ever actually used that iterator
 
8:35 AM
@Jimbo *raises hand*
Though, I might be biased a bit.
 
@salathe That's "okay" though, isn't it?
 
morning!
 
What's okay?
 
morning
 
Passing around an object, just to get a single value out of it
 
8:39 AM
morning Peehaa
 
For example, I have a service that'll get downloads via an IP address. It simply needs an ip address to work.
I can either pass in the Server object and call getIpAddress() to get the address, OR...
 
@BoltClock We have the fine ability to recognize crap in a language agnostic way :) We are that good :D
 
I can make it non-OO and let it just take a string $ipAddress. The first way is OO, but ties it to my application. The second way is non-OO, but makes it usable cross-application.
 
Git deployment question. If there's a file that has to be different because of DB settings etc, how do you handle that with git? .gitignore it and place it manually?
 
@Fabien depends on the company
 
8:40 AM
@Jimbo I'd rather just pass in the dependency (an IP address), but that's just me. If you want to go all OO, make the IP address its own object :P
 
Value Objects
Hmm
 
@Fabien Use a deployment file which include the actual settings file and ignore the actual settings file
 
@salathe Omg, I didn't realise.. I actually have a Value Object within my application called IpAddress :D
Nice one!
 
@Jimbo though, personally, I'd just pass in the IP as a string and move on to something more interesting.
 
8:41 AM
Include that file in your bootstrap @Fabien
 
a good idea is to use environment variables
 
And that file would be outside the git repo? Or at least not included.
 
at my company, we do that: have one file per environment, like settings.php__ENV__, settings.php__DEV__, etc, and have a build step to mv the right file
other prefer to keep the files out of the git repo
 
I could do with that
 
This only needs to be simple. It's Drupal anyway :-/
3 different servers and DBs
 
8:44 AM
Currently I have dev.yml, staging.yml, live.yml - the contents of which is read depending on the environment key in global.yml
 
How does it know which server/environment it's on?
 
@FlorianMargaine +1 for setting environment variables
 
@Fabien You set it in global.yml... /me cries
 
@salathe the issue with php... it's hard to set them
 
So global.yml would be in .gitignore?
 
8:45 AM
with other stacks, you can simply do VAR=val ./run-app
 
@FlorianMargaine yeah... I'm looking at you PHP-FPM!
 
@Fabien Yep.
 
@Fabien yeah, we use the settings.php__ENV__ convention for drupal websites at work
but it means a build step
 
This feels like something that could be a useful feature in Git.
 
it means the passwords are in git though
not always a good idea
 
8:48 AM
Mind you, if they're all on their own branch, maybe it's a non-issue.
@FlorianMargaine Yeah :(. Always iffy about that one. Work had it already like this. Private repos with passwords.
 
@Fabien yup
it works with closed-source that are never going to be released
at web agencies this is often the case, so it's ok
 
ThW
I am switching the build process to phing at the moment, specific stuffs goes into build.properties - and this file is not in the VCS
 
We really need to step away from using ftp to update our sites anyway.
 
@ThW our build process is based on phing. I'm not a fan tbh.
 
mornings
 
ThW
8:51 AM
to be more exact it is based on phing + composer
 
still.... xml.
need I say more?
 
ThW
@FlorianMargaine Yes
 
Morning Dave
 
how can anyone find sane to write functions in XML? It's just so verbose
 
ThW
@FlorianMargaine in an IDE like PHPStorm you get code completion for any XML with a DTD/XSD
 
8:54 AM
so your argument is: use PHPStorm and you'll be fine writing XML?
 
Any of you on OSX btw? I need a good ssh client that supports saving 'profiles' or something to easy ssh in to different servers.
Basically I need PuTTy
 
ThW
Any IDE that supports XML
 
@Fabien any terminal + ~/.ssh/config
@ThW you're still not mentioning the "reading" part
 
ThW
Reading XML and manipulating is a lot easier then for example JSON
 
@FlorianMargaine It'll be for my office so I am trying to avoid sending a global config thingy.
 
8:58 AM
@ThW well, we agree to disagree then :)
@Fabien uh?
 
ThW
@FlorianMargaine Usually, the first thing I do with JSON is converting it into a DOM, so I can use Xpath to read it.
 
You're going to hate me, I love json for it's simplicity D:
 
ThW
@Jimdo - it is just to much work avoiding undefined property messages
 
@FlorianMargaine I am looking for an app that will hold the ssh connections and details (keys) rather than creating a bunch of aliases
 
@Fabien oh...
 
9:03 AM
This will go to a fair few people in the office.
 
so, a config file
you can specify the identity (key) to use in the config file
honestly, putty is needed on windows because there isn't the ssh client on it, osx/linux don't need that
 
Aye, but I do like the feature to easily setup ssh profiles on it.
Useful when there's a fair few servers.
 
Ah cool cheers.
Will try it out.
 
9:19 AM
Cheers @FlorianMargaine this should work fine.
 
@Fabien cool, will know
~/.ssh/config is portable over linux though
 
If a servers hostname doesn't feel accurate, are there any repercussions of changing it?
 
depends
 
9:41 AM
@ThW I can't agree more :)
 
Ape-driven development has resulted in many servers where a simple unsalted hashing is used; and even servers where passwords are stored as cleartext or some easily reversible homemade encoding. source
 
hello y'all.. just had graduated college.. thanks to stackoverflow and to php lovers.. ;)
 
@Cecil Grats
 
thanks again..
 
9:55 AM
@Cecil LIES :D
 
hm.. why would i lie?
 
There is no php college :)
Maybe one or two subjects.
 
well i didnt mention php college.. but, u'r right.. part of our subjects..
users here are really helpful..
 
@webarto Leave the poor boy alone, (s)he's only come to say thanks :-P
gratz @Cecil
 
btw, im a girl.. :)
 
9:59 AM
I'm going to be charitable and assume that you use SO as a learning tool and not a do-my-work-for-me-tool
 
learned so much lessons actually
including the guidelines here.. :)
helped me think and think a lot..
 
@Cecil rule 16 violation :-P
 
haha.. no rule 16
 
@DaveRandom LOL
 

The (false) Kiss

Jan 19 at 14:27, 46 seconds total – 9 messages, 5 users, 2 stars

Bookmarked Jan 19 at 14:28 by Second Rikudo

 
10:02 AM
Lusitanian's mother is a rule 16 violation.
 
@Jimbo She's not on the interent AFAIK
 
@SecondRikudo Oh yeah, sorry. I forgot to upload the video.
 
There are no girls in the internet. Everyone who claims that, actually is a 40+ years beardie with a vodka bottle near keyboard
 
yay.. new horizonts
The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner
I've even didn't know that such thing is possible to write (:
 
10:06 AM
@Cecil Congrats.
 
btw, morning room
 
0
Q: create task for task scheduler using schtasks. Add task in folder

user369122using schtasks via the command line (http://technet.microsoft.com/en-us/library/cc772785%28v=ws.10%29.aspx#BKMK_once), is it possible to add a task to a specific folder (in the scheduler)? And if so, does this folder need to exist, before you add the task? (windows 7 and 8) kind regards, Matthijs

 
and good luck in all the things after graduatio, @Cecil
 
ThW
btw I added an XML output to the PhpCss demo page :-P
 
Yeah, welcome to life :P
 
10:07 AM
@Cecil No, this rule 16
 
@DaveRandom I can't even pass PHP related exam because I haven't attended it...
Talkin' 'bout college logic.
 
@webarto Ironically that's not even true :-P
 
@DaveRandom I remember seeing this guy. He was young and full of passion.
 
I'll be learning php (hopefully 5 and not 4) in the next semester. :D
 
now procedure testing code is 200+ lines and it's going to be more :\
 
10:12 AM
@AlmaDo That's integration test not unit-test, I guess. :Ь
 
@Leri no. it's a code for testing routine, which does tests for stored procedures. And I've only added DDL checks
such as - test if procedure creates or drops something (like table or view)
 
@AlmaDo oH.
BTW, how do you guys unit-test unit-testing library?
 
:D
@Leri it's definitely bad code :p But in terms of stored SQL code there's no rule "method should contain few lines of code"
 
@AlmaDo I like the readability. Nice job.
 
@Leri is that readable ?
 
10:19 AM
@AlmaDo Pretty much yes. Only long strings make it a little bit ugly. However, it's hard to follow logic without scrolling.
 
@Leri long strings.. yes. I'll add something like "GENERATE_ERROR_MESSAGE" function for that
but there are many things even in DDL that should be added. For now it can only check if the corresponding DDL entity exists (or does not exist). It can't check if created column, for instance, has proper type
 
@AlmaDo Why not export logic as mysql functions?
It'd be pretty much the same but more encapsulated and separated.
 
@Leri what do you mean?
there are two things: 1. All signals must be handled in current scope. 2. All cursors may be defined & fetched only in current scope
so those are things which can not be separated
other things - well, they are. I've made that for DDL checks
 
@AlmaDo Well, stuff like this query
 
6 mins ago, by Alma Do
@Leri long strings.. yes. I'll add something like "GENERATE_ERROR_MESSAGE" function for that
but actually, it will be little improvement - because I'll have to pass all the arguments. May be I'll add more functions for each particular case, but that's hard to scale if that would be needed
 
10:31 AM
@AlmaDo The latter will cause maintenance hell unless you can think of a way to register that functions in one place (imagine, array of callables that are indexed by keys).
 
@Leri there are no arrays in mysql, but I can always create service table with that ans then process it with cursor
I only hope that won't be overcomplicated for user (but not for developer)
Too much work to do for that mysql-unit for now
 
Mornin
 
I'm having a terrible day ...
I kinda hope you are all having terrible days too ...
 
@JoeWatkins How so?
@JoeWatkins I'm having a terrible day.
 
I can't build up any focus, I'm just going round in circles
and getting it wrong ...
 
10:46 AM
@JoeWatkins I'm super sleepy and I have to fix a bug
It would take me 10 minutes to fix it normally (with test)
running around it since 2 hours
 
MOAR TEA
 
Hey @Ocramius, I have a quick Q on doctrine associations when you have a sec. Also, yes more tea
 
@DaveRandom I AM ALREADY AT THE 6TH COFFEE!!!!one11!
@Jimbo see room guidelines
:P
 
I am 98% tea, all the time ...
 
Did I say coffee? Coffee is for losers. Real men drink tea. See? ^
 
10:47 AM
I'd rather smoke crack than drink coffee ... it has roughly the same effect ...
 
You get used to it
 
@JoeWatkins Take a break
 
Smoking crack, I mean...
 
@Ocramius Fair enough :P I'm trying to set up two entities with a One-to-one BI-DI rel. Each Server can have one Client: For some reason, --dump-sql is not creating a client property within Server.
 
what's the one with chocolate in ? I sometimes have that ... v late at night on long drives ...
@Ocramius haha
 
10:48 AM
Rest up, eat something light. Stay away from screens for at least 2 hours.
 
/**
 * @ORM\OneToOne(targetEntity="Client", mappedBy="server")
 */
private $client;
 
@Jimbo only one side has the association at db level
 
^ That's in Server
Oh rly? :o
 
@SecondRikudo er ... hi ... I'm krakjoe, that never gets to happen ...
 
@JoeWatkins Make it happen.
 
10:49 AM
also, avoid making it bi-directional. It will eager load all the time, and you don't want that
 
@Ocramius So I can definitely do Server::getClient() and it'll return the Client object?
 
Say you need to do something and leave.
 
leave what ?? skin ?? I work from home, you don't get to leave ...
 
@Jimbo yes
@Jimbo orm:validate-schema
 
@Ocramius Danke
 
10:52 AM
@PeeHaa hmm, I didn't know that. Could you help me find a way of doing that? Does google know? also, what is the best practice for this? — Cas Nouwens 1 min ago
O_o
me: You can not do that
OP: ok I understand now. can you help me do it
 
Never mind, just read the question. :)
 
@DanLugg THANK YOU!
 
@Ocramius YOU'RE WELCOME!?
 
Y U GUYS SHOUT?
 
11:00 AM
SHUT UP
(:
 
LOL
 
@Leri Linked it either way
 
I know what the problem is ...
actually no I don't .... stupid monkey brain is everywhere ...
 
Have you tried turning it off and on again?
 
11:14 AM
Somebody has ever experimented Hack ?
 
I've experimented with LSD
 
How does it feel ?
 
Hacky
 
@GotchaRob I dunno, I'll tell you when the effects wear off
 
11:15 AM
@PeeHaa And it turns out this is what OP actually wanted. :/ I see the main problem is to express what they want for some people (I kinda can't get why that's the case so often).
 
Well guys, you made my day on only 2 minutes, GG
 
GG GGGGGGG GGGGGGGGGGGGGGGGGGGGGGGGGGGoodbye, I'm going to work.
 
@GotchaRob played around with hack a bit. It's cool, but useless until there's a way to backport code to native PHP
 
lol
@SecondRikudo hello, my enemy :)
 
11:20 AM
Oh god, ennemies.. get down
 
@Ocramius Struggling to choose between "Don't mince your words" and "What's your beef?"
 
the old variable syntax satisfies Principle of Lease Astonishment though
 
@SecondRikudo What are you upto today?
 
@Naruto Doing some JS today
 
@owners: somebody should clean some of the starred msgs ------>
 
11:23 AM
Killed one, what else do you want rid of?
 
@SecondRikudo Ooeee!! Traitor! What are you creating?
 
@DaveRandom All the bold things are really irrelevant. :)
 
I'm hesitant to nuke things with >2 stars, second opinion @PeeHaa?
 
@DaveRandom in Germany, that's Hack
 
@DaveRandom on the flipside, do you want to give people a reason to talk about hhvm ??
 
11:29 AM
@Ocramius Ahh. So maybe something along the lines of "In Soviet Russia, HHVM hacks you!"
@JoeWatkins A fair point
 
The bolds things, they may attract the attention of the cons / pros and create an endless debate
 
actually, we're, going to kill it ...
it will not be a long time before the whole enterprise is rendered pointless ... I'm not talking about the things we're playing with at the moment, but the inevitable ... it is inevitable that zend will get a JIT capable executor, inevitable, at that point, the whole project is pointless ... since i can already see it becoming pointless, I'm totally bored of it ... it's no longer a useful conversation to have ...
also, I'm not in a good mood, but my opinion doesn't change whatever, it's pointless ...
 
In any case, there will be an executor JIT and it's even referenced in the draft ideas for PHP6 w/ Zend
 
you mean the list from pierre ?
 
yeah
"Improve OPcodes, compilation and runtime (perf, features, jit, fixed address jump usage, etc)" & "JIT compiler (libjit?)" these parts
 
11:37 AM
that was mostly pretty unrealistic ... it might not be there with the beginning of 6 ...
ng addresses performance, as much as I think is necessary for now ... I don't know what that comment about jump usage means, jumps are fixed addresses calculated on pass two, whoever wrote that wasn't as clued up as it might seem ... libjit doesn't really provide an interface to build jit's, it's a very basic interface to build JIT'ing compilers ... it doesn't really do anything but code generation, for the zend engine to have a jit by 6 is not real
not least of all at the base there will be ng and a mixture of 64bit improvements, all largely untested ...
 
> bother with windows ... anyone ?
@JoeWatkins Yes, sometimes I am stuck with windows at work. ^
:D
 
@Leri ever built PHP / or any libraries there ?
I really hate developing on windows, someone else will do it ...
 
@JoeWatkins I wanted to do it several times but could not configure properly. I should admit, I never tried to resolve config problems using google.
Maybe I can try it once again after real work.
 
there's a bunch of info on wiki about vs and sdk versions and whatever, I remember none of it ...
I haven't built libjit there, I dunno how to do that, imagine it's pretty standard, whatever the standard is ...
 
@JoeWatkins I have a build env for PHP set up on win
 
11:44 AM
@DaveRandom What thing with two stars?
 
@PeeHaa Oh it's just that people want to nuke the bolded stars -->
 
@DaveRandom maybe try getting a jitfu build going ... it will probably break ...
 
@DaveRandom Go for it. It's not like a have made my business model around it :D
 
(you'll need to build libjit too)
 
@JoeWatkins I'll have a crack over lunch, the hard part will be building libjit probably
 
11:46 AM
you'll need a simple config.w32 I don't think I done/kept one for it...
probably yeah ...
 
I'll freely admit that I got my build env working through a lot of guesswork and shouting at my computer, I don't really know how it actually works
 
@DaveRandom In phpstorm what is "Resource Root"? Do you mark your /vendor directory as such?
 
@JoeWatkins I hate writing/compiling anything in C on windows (that always ends up in swearing :D). I'll check on wiki later, thanks.
 
@Leri Well an important part of programming is the ability to ask the right questions imho
 
actually once you get going, it's slow but reliable, I dunno if anyone else gets this but whenever I install a windows vm, it works a while, then every single time I start or shut it down it wants to do updates, then it boots and rolls them back and repeats and gets longer and longer, so fuck mr gates, I cannot be bothered with it anymore ...
I think the instructions are wrong @DaveRandom ...
last time, I just downloaded the latest vs and latest php and it all worked, no strange directories, no deps, nothing ... it still works now but takes one year to boot ...
 
11:48 AM
I've to go, have all a nice day ;)
 
@Jimbo Isn't it more about docroot? Can't remember, I know I used it once for something but I forget what
 
I'm just trying to allow vendor/ to be searchable, but also get rid of all the todo's that Doctrine has lovingly provided in my todo list
 
@JoeWatkins Which instructions, the ones that are buried in the wiki somewhere?
 
yeah, somewhere
 
@Jimbo PRs :P
 
11:50 AM
lol
 
I think at one point all that messing about was required, but it doesn't seem to be now, vs2012/w8
 
@PeeHaa It's important part of life, in general. No offense but if someone can't ask a question in an understandable way (after 10 tries), I'd question his/her IQ. :)
 
@Jimbo Are you sure the vendor directory isn't just excluded from indexing?
Either way, you can add it as an external library and it will be indexed (which seems kind of stupid but it should work)
@JoeWatkins I'm on vs2013/8.1 iirc, I spent like a day getting it to work but now it works every time without incident (unless I fucked up, obv)
 
I can't remember the config options, but if you figure out how to build libjit, put headers/lib somewhere sensible and then something like --with-extra-includes and --with-extra-deps, configure --help will show you, it's windows specific ... when building libjit, the only option you definitely should not use is anything like --enable-interpreter or --with-interpreter ..
 
@JoeWatkins OK no worries, I'm going to run down to greggs and then I'll see what I can do
 
11:59 AM
cool ta
 

« first day (1333 days earlier)      last day (3622 days later) »